feat(报表/物料管理): 添加工单批次号显示并调整批次号字段命名
在工单报表组件中添加批次号字段显示,并将物料管理中的批次号字段统一重命名为"原材料批次号"
This commit is contained in:
@@ -20,8 +20,8 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="批次号" prop="batchNo">
|
||||
<el-input v-model="queryParams.batchNo" placeholder="请输入批次号" />
|
||||
<el-form-item label="原材料批次号" prop="batchNo">
|
||||
<el-input v-model="queryParams.batchNo" placeholder="请输入原材料批次号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="库位名称" prop="locationCode">
|
||||
<el-select v-model="queryParams.locationCode" filterable placeholder="请选择">
|
||||
@@ -84,7 +84,7 @@
|
||||
<el-table-column prop="supplierName" label="供应商名称" align="center" v-if="columns.showColumn('supplierName')" />
|
||||
<el-table-column prop="materialCode" label="物料编码" align="center" v-if="columns.showColumn('materialCode')" />
|
||||
<el-table-column prop="materialName" label="物料名称" align="center" v-if="columns.showColumn('materialName')" />
|
||||
<el-table-column prop="batchNo" label="批次号" align="center" v-if="columns.showColumn('batchNo')" />
|
||||
<el-table-column prop="batchNo" label="原材料批次号" align="center" v-if="columns.showColumn('batchNo')" />
|
||||
<el-table-column prop="currentQty" label="当前库存量" align="center" v-if="columns.showColumn('currentQty')">
|
||||
<template #default="scope">
|
||||
<span style="font-weight: bold">{{ scope.row.currentQty }}</span>
|
||||
@@ -208,14 +208,20 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="批次号" prop="batchNo">
|
||||
<el-input v-model="form.batchNo" placeholder="请输入批次号" />
|
||||
<el-form-item label="原材料批次号" prop="batchNo">
|
||||
<el-input v-model="form.batchNo" placeholder="请输入原材料批次号" />
|
||||
<!-- <el-select v-model="form.batchNo" filterable placeholder="请选择" :disabled="opertype == 3">
|
||||
<el-option v-for="item in options.batchNoOptions" :key="item.id" :label="item.typeCode" :value="item.typeName"> </el-option>
|
||||
</el-select> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="制造工单号" prop="workorder">
|
||||
<el-input v-model="form.workorder" placeholder="请输入制造工单号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="炉号" prop="stoveCode">
|
||||
<el-input v-model="form.stoveCode" placeholder="请输入炉号" />
|
||||
@@ -345,11 +351,11 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="批次号" prop="batchNo">
|
||||
<el-form-item label="原材料批次号" prop="batchNo">
|
||||
<!-- <el-select v-model="form.batchNo" filterable placeholder="请选择" :disabled="opertype == 3">
|
||||
<el-option v-for="item in options.batchNoOptions" :key="item.id" :label="item.typeCode" :value="item.typeName"> </el-option>
|
||||
</el-select> -->
|
||||
<el-input v-model="form.batchNo" placeholder="请输入批次号" />
|
||||
<el-input v-model="form.batchNo" placeholder="请输入原材料批次号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -507,8 +513,8 @@
|
||||
</el-col>
|
||||
|
||||
<el-col :lg="12">
|
||||
<el-form-item label="批次号" prop="batchNo">
|
||||
<el-input v-model="form.batchNo" placeholder="请输入批次号" />
|
||||
<el-form-item label="原材料批次号" prop="batchNo">
|
||||
<el-input v-model="form.batchNo" placeholder="请输入原材料批次号" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
@@ -594,7 +600,7 @@
|
||||
</el-table-column>
|
||||
<el-table-column prop="transactionType" label="出库类型" align="center" v-if="columns.showColumn('transactionType')" />
|
||||
<el-table-column prop="unit" label="计量单位" align="center" v-if="columns.showColumn('unit')" />
|
||||
<el-table-column prop="batchNo" label="批次号" align="center" v-if="columns.showColumn('batchNo')" />
|
||||
<el-table-column prop="batchNo" label="原材料批次号" align="center" v-if="columns.showColumn('batchNo')" />
|
||||
<!-- <el-table-column prop="orderNo" label="关联订单号" align="center" v-if="columns.showColumn('orderNo')" /> -->
|
||||
<el-table-column prop="workorder" label="工单号" align="center" v-if="columns.showColumn('workorder')" />
|
||||
<el-table-column prop="operator" label="操作员" align="center" v-if="columns.showColumn('operator')" />
|
||||
@@ -643,7 +649,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="transactionType" label="入库类型" align="center" v-if="columns.showColumn('transactionType')" />
|
||||
<el-table-column prop="batchNo" label="批次号" align="center" v-if="columns.showColumn('batchNo')" />
|
||||
<el-table-column prop="batchNo" label="原材料批次号" align="center" v-if="columns.showColumn('batchNo')" />
|
||||
<el-table-column prop="workorder" label="工单号" align="center" />
|
||||
<el-table-column prop="operator" label="操作员" align="center" />
|
||||
<el-table-column prop="remarks" label="备注" align="center" />
|
||||
@@ -714,7 +720,7 @@ const columns = ref([
|
||||
{ visible: false, align: 'center', type: '', prop: 'warehouseName', label: '仓库名称', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'locationCode', label: '库位编码', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'locationName', label: '库位名称', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'batchNo', label: '批次号', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'batchNo', label: '原材料批次号', showOverflowTooltip: true },
|
||||
{ visible: true, align: 'center', type: '', prop: 'currentQty', label: '当前库存量' },
|
||||
{ visible: false, align: 'center', type: '', prop: 'unit', label: '计量单位', showOverflowTooltip: true },
|
||||
{ visible: false, align: 'center', type: '', prop: 'productionDate', label: '生产日期', showOverflowTooltip: true },
|
||||
@@ -803,7 +809,7 @@ const state = reactive({
|
||||
warehouseCode: [{ required: true, message: '仓库编码不能为空', trigger: 'blur' }],
|
||||
locationCode: [{ required: true, message: '库位编码不能为空', trigger: 'blur' }],
|
||||
// inboundNo: [{ required: true, message: '入库单号不能为空', trigger: 'blur' }],
|
||||
batchNo: [{ required: true, message: '批次号不能为空', trigger: 'blur' }]
|
||||
batchNo: [{ required: true, message: '原材料批次号不能为空', trigger: 'blur' }]
|
||||
},
|
||||
rulesOut: {
|
||||
materialCode: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }],
|
||||
@@ -812,13 +818,13 @@ const state = reactive({
|
||||
warehouseCode: [{ required: true, message: '仓库编码不能为空', trigger: 'blur' }],
|
||||
locationCode: [{ required: true, message: '库位编码不能为空', trigger: 'blur' }],
|
||||
// outboundNo: [{ required: true, message: '出库单号不能为空', trigger: 'blur' }],
|
||||
batchNo: [{ required: true, message: '批次号不能为空', trigger: 'blur' }]
|
||||
batchNo: [{ required: true, message: '原材料批次号不能为空', trigger: 'blur' }]
|
||||
},
|
||||
rulesUpdate: {
|
||||
materialCode: [{ required: true, message: '物料编码不能为空', trigger: 'blur' }],
|
||||
warehouseCode: [{ required: true, message: '仓库编码不能为空', trigger: 'blur' }],
|
||||
locationCode: [{ required: true, message: '库位编码不能为空', trigger: 'blur' }],
|
||||
batchNo: [{ required: true, message: '批次号不能为空', trigger: 'blur' }],
|
||||
batchNo: [{ required: true, message: '原材料批次号不能为空', trigger: 'blur' }],
|
||||
currentQty: [{ required: true, message: '库存数量不能为空', trigger: 'blur' }]
|
||||
},
|
||||
options: {},
|
||||
|
||||
@@ -9,16 +9,14 @@
|
||||
<el-date-picker :clearable="false" v-model="queryParams.endDate" type="date" size="large" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="large" @click="getList()">
|
||||
查询
|
||||
</el-button>
|
||||
<el-button type="primary" size="large" @click="getList()"> 查询 </el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
</div>
|
||||
<vxe-table height="600" v-loading="loading" :data="list">
|
||||
<vxe-column type="seq" width="60"></vxe-column>
|
||||
<vxe-column field="workorder" title="工单号"></vxe-column>
|
||||
<vxe-column field="feedOrder" title="批次号"></vxe-column>
|
||||
<vxe-column field="productionName" title="主体品名"></vxe-column>
|
||||
<vxe-column field="productionCode" title="主体型号"></vxe-column>
|
||||
<vxe-column field="stoveCode" title="炉号"></vxe-column>
|
||||
@@ -44,7 +42,7 @@ const props = defineProps({
|
||||
processId: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
}
|
||||
})
|
||||
// watch([() => props.workorder, () => props.processId], () => {
|
||||
// getList();
|
||||
@@ -58,7 +56,7 @@ const queryParams = reactive({
|
||||
endDate: proxy.dayjs().endOf('day').toDate(),
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
processId: null,
|
||||
processId: null
|
||||
})
|
||||
import { GetWorkOrdersByDate } from '@/api/reportFlow/index'
|
||||
function getList() {
|
||||
@@ -67,7 +65,7 @@ function getList() {
|
||||
let params = queryParams
|
||||
params.workorder = props.workorder
|
||||
params.processId = props.processId
|
||||
GetWorkOrdersByDate(params).then(res => {
|
||||
GetWorkOrdersByDate(params).then((res) => {
|
||||
const { code, data } = res
|
||||
if (code == 200) {
|
||||
list.value = data
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<v-btn class="bg-blue-darken-1 mb-2" size="x-large" @click="getList()">
|
||||
刷新
|
||||
</v-btn>
|
||||
<v-btn class="bg-blue-darken-1 mb-2" size="x-large" @click="getList()"> 刷新 </v-btn>
|
||||
<vxe-table v-loading="loading" :data="list">
|
||||
<vxe-column type="seq" width="60"></vxe-column>
|
||||
<vxe-column field="workorder" title="工单号"></vxe-column>
|
||||
<vxe-column field="feedOrder" title="批次号"></vxe-column>
|
||||
<vxe-column field="processName" title="工序"></vxe-column>
|
||||
<vxe-column field="finishNum" title="完成数"></vxe-column>
|
||||
<vxe-column field="badNum" title="不良数"></vxe-column>
|
||||
@@ -24,10 +24,10 @@ const props = defineProps({
|
||||
processId: {
|
||||
type: [String, Number],
|
||||
default: ''
|
||||
},
|
||||
}
|
||||
})
|
||||
watch([() => props.workorder, () => props.processId], () => {
|
||||
getList();
|
||||
getList()
|
||||
})
|
||||
const loading = ref(false)
|
||||
const list = ref([])
|
||||
@@ -36,7 +36,7 @@ function getList() {
|
||||
loading.value = true
|
||||
list.value = []
|
||||
const params = { workorder: props.workorder, processId: props.processId }
|
||||
GetWorkOrderReportWorkList(params).then(res => {
|
||||
GetWorkOrderReportWorkList(params).then((res) => {
|
||||
if (res.code == 200) {
|
||||
list.value = res.data
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user