fix:销售出库、销售退货、转移调拨、装箱管理、SN码、外协发料、外协入库、工艺流程和检测模板的单位名称问题解决

This commit is contained in:
zhangxuanming 2025-02-08 16:35:13 +08:00
parent bcbd1ee603
commit 4d5ea536e7
10 changed files with 142 additions and 133 deletions

View File

@ -82,7 +82,7 @@
</el-table-column>
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="操作" align="center" v-if="optType !='view'" width="100px" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
@ -129,8 +129,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure">
<el-input v-model="form.unitOfMeasure" placeholder="请选择产品" disabled/>
<el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitName" placeholder="请选择产品" disabled/>
</el-form-item>
</el-col>
</el-row>
@ -283,6 +283,7 @@ export default {
this.form.itemName = obj.itemName;
this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.unitName = obj.unitName
}
},
//

View File

@ -19,7 +19,7 @@
<el-table-column label="BOM物料编号" width="120" align="center" prop="itemCode" />
<el-table-column label="BOM物料名称" width="200" align="center" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="itemSpc" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="物料/产品" align="center" prop="itemOrProduct" >
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_item_product" :value="scope.row.itemOrProduct"/>

View File

@ -42,7 +42,7 @@
<el-table-column label="产品物料名称" align="center" width="120px" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="最低检测数" align="center" width="100px" prop="quantityCheck" />
<el-table-column label="单位" align="center" width="100px" prop="unitOfMeasure" />
<el-table-column label="单位" align="center" width="100px" prop="unitName" />
<el-table-column label="最大不合格数" align="center" prop="quantityUnqualified" />
<el-table-column label="最大致命缺陷率" align="center" prop="crRate" >
<template slot-scope="scope">
@ -126,8 +126,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure">
<el-input v-model="form.unitOfMeasure" readonly="readonly" />
<el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitName" readonly="readonly" />
</el-form-item>
</el-col>
</el-row>
@ -351,6 +351,7 @@ export default {
this.form.itemName = obj.itemName;
this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.unitName = obj.unitName
}
},
}

View File

@ -41,7 +41,7 @@
<el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
<el-table-column label="产品物料名称" width="120px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="领料数量" align="center" prop="quantityIssued" />
<el-table-column label="批次号" align="center" prop="batchCode" />
<el-table-column label="仓库名称" align="center" prop="warehouseName" />
@ -110,8 +110,8 @@
</el-row>
<el-row>
<el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure">
<el-input v-model="form.unitOfMeasure" readonly="readonly" />
<el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitName" readonly="readonly" />
</el-form-item>
</el-col>
<el-col :span="8">
@ -366,6 +366,7 @@ export default {
this.form.areaName = obj.areaName;
this.form.quantityIssued = obj.quantityOnhand;
this.form.quantityMax = obj.quantityOnhand;
this.form.unitName = obj.unitName
}
},
}

View File

@ -41,7 +41,7 @@
<el-table-column label="产品物料编码" width="120" align="center" prop="itemCode" />
<el-table-column label="产品物料名称" width="150" align="center" prop="itemName" />
<el-table-column label="规格型号" align="center" prop="specification" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="入库数量" align="center" prop="quantityRecived" />
<el-table-column label="批次号" width="100" align="center" prop="batchCode" />
<el-table-column label="仓库" width="100" align="center" prop="warehouseName" />
@ -104,8 +104,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure">
<el-input v-model="form.unitOfMeasure" readonly="readonly" />
<el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitName" readonly="readonly" />
</el-form-item>
</el-col>
</el-row>
@ -427,6 +427,7 @@ export default {
this.form.itemName = obj.itemName;
this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.unitName = obj.unitName
}
},
//IQC

View File

@ -31,10 +31,10 @@
<el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" width="150px" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="装箱数量" align="center" prop="quantityPackage" />
<el-table-column label="生产工单编号" width="150px" align="center" prop="workorderCode" />
<el-table-column label="批次号" align="center" prop="batchCode" />
<el-table-column label="批次号" align="center" prop="batchCode" />
<el-table-column label="有效期" align="center" prop="expireDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.expireDate, '{y}-{m}-{d}') }}</span>
@ -59,7 +59,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
@ -103,8 +103,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure">
<el-input v-model="form.unitOfMeasure" readonly="readonly" />
<el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitName" readonly="readonly" />
</el-form-item>
</el-col>
</el-row>
@ -290,6 +290,7 @@ export default {
this.form.itemName = row.productName;
this.form.specification = row.specification;
this.form.unitOfMeasure = row.unitOfMeasure;
this.form.unitName = obj.unitName
}
},
/** 新增按钮操作 */

View File

@ -41,7 +41,7 @@
<el-table-column label="产品编码" width="120px" align="center" prop="itemCode" />
<el-table-column label="产品名称" width="150px" align="center" prop="itemName" :show-overflow-tooltip="true"/>
<el-table-column label="规格型号" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="出库数量" align="center" prop="quantitySalse" />
<el-table-column label="批次号" width="120px" align="center" prop="batchCode" />
<el-table-column label="仓库名称" align="center" prop="warehouseName" />
@ -94,8 +94,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure">
<el-input v-model="form.unitOfMeasure" placeholder="请输入单位" />
<el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitName" placeholder="请输入单位" />
</el-form-item>
</el-col>
</el-row>
@ -421,6 +421,7 @@ export default {
this.form.areaName = obj.areaName;
this.form.quantitySalse = obj.quantityOnhand;
this.form.quantityMax = obj.quantityOnhand;
this.form.unitName = obj.unitName
}
},
//OQC

View File

@ -30,7 +30,7 @@
<el-table-column label="产品编码" width="120" align="center" prop="itemCode" />
<el-table-column label="产品名称" width="150" align="center" prop="itemName" />
<el-table-column label="规格型号" width="150" align="center" prop="specification" :show-overflow-tooltip="true"/>
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="退货数量" align="center" prop="quantityRted" />
<el-table-column label="批次号" align="center" prop="batchCode" />
<el-table-column label="仓库" align="center" prop="warehouseName" />
@ -88,8 +88,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure">
<el-input v-model="form.unitOfMeasure" placeholder="请输入单位" />
<el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitName" placeholder="请输入单位" />
</el-form-item>
</el-col>
</el-row>
@ -266,6 +266,7 @@ export default {
this.form.itemName = obj.itemName;
this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.unitName = obj.unitName
}
},
//

View File

@ -68,7 +68,7 @@
<el-table-column label="产品编码" align="center" prop="itemCode" />
<el-table-column label="产品名称" align="center" prop="itemName" />
<el-table-column label="规格型号" align="center" prop="specification" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="批次号" align="center" prop="batchCode" />
<el-table-column label="SN码数量" align="center" prop="snNum" >
<template slot-scope="scope">
@ -308,6 +308,7 @@ export default {
this.form.itemName = obj.itemName;
this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.unitName = obj.unitName
}
},
}

View File

@ -12,7 +12,7 @@
v-hasPermi="['mes:wm:transfer:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
@ -29,21 +29,21 @@
</el-row>
<el-table v-loading="loading" :data="transferlineList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="产品物料编码" width="120px" align="center" prop="itemCode" />
<el-table-column label="产品物料名称" width="150px" align="center" prop="itemName" />
<el-table-column label="规格型号" align="center" prop="specification" />
<el-table-column label="单位" align="center" prop="unitOfMeasure" />
<el-table-column label="单位" align="center" prop="unitName" />
<el-table-column label="转移数量" align="center" prop="quantityTransfer" />
<el-table-column label="生产工单" align="center" prop="workorderCode" />
<el-table-column label="供应商编码" width="100px" align="center" prop="vendorCode" />
<el-table-column label="供应商简称" width="100px" align="center" prop="vendorNick" />
<el-table-column label="批次号" width="150px" align="center" prop="batchCode" />
<el-table-column label="移出仓库" align="center" prop="fromWarehouseName" />
<el-table-column label="移出库区" width="120px" align="center" prop="fromLocationName" />
<el-table-column label="移出库位" align="center" prop="fromAreaName" />
<el-table-column label="移入仓库" align="center" prop="toWarehouseName" />
<el-table-column label="移入库区" width="120px" align="center" prop="toLocationName" />
<el-table-column label="供应商编码" width="100px" align="center" prop="vendorCode" />
<el-table-column label="供应商简称" width="100px" align="center" prop="vendorNick" />
<el-table-column label="批次号" width="150px" align="center" prop="batchCode" />
<el-table-column label="移出仓库" align="center" prop="fromWarehouseName" />
<el-table-column label="移出库区" width="120px" align="center" prop="fromLocationName" />
<el-table-column label="移出库位" align="center" prop="fromAreaName" />
<el-table-column label="移入仓库" align="center" prop="toWarehouseName" />
<el-table-column label="移入库区" width="120px" align="center" prop="toLocationName" />
<el-table-column label="移入库位" align="center" prop="toAreaName" />
<el-table-column label="操作" v-if="optType != 'view'" width="120px" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
@ -64,7 +64,7 @@
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
@ -75,7 +75,7 @@
<!-- 添加或修改转移单行对话框 -->
<el-dialog :title="title" :visible.sync="open" width="960px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="8">
<el-form-item label="产品物料" prop="itemCode">
@ -91,8 +91,8 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="单位" prop="unitOfMeasure">
<el-input v-model="form.unitOfMeasure" readonly="readonly" />
<el-form-item label="单位" prop="unitName">
<el-input v-model="form.unitName" readonly="readonly" />
</el-form-item>
</el-col>
</el-row>
@ -132,7 +132,7 @@
:options="warehouseOptions"
:props="warehouseProps"
@change="handleToWarehouseChanged"
>
>
</el-cascader>
</el-form-item>
</el-col>
@ -206,40 +206,40 @@ export default {
pageNum: 1,
pageSize: 10,
transferId: this.transferId,
materialStockId: null,
itemId: null,
itemCode: null,
itemName: null,
specification: null,
unitOfMeasure: null,
quantityTransfer: null,
quantityMax: null,
workorderId: null,
workorderCode: null,
batchCode: null,
fromWarehouseId:null,
fromWarehouseCode: null,
fromWarehouseName: null,
fromLocationId: null,
fromLocationCode: null,
fromLocationName: null,
fromAreaId: null,
fromAreaCode: null,
fromAreaName: null,
toWarehouseId: null,
toWarehouseCode: null,
toWarehouseName: null,
toLocationId: null,
toLocationCode: null,
toLocationName: null,
toAreaId: null,
toAreaCode: null,
toAreaName: null,
expireDate: null,
vendorId: null,
vendorCode: null,
vendorName: null,
vendorNick: null,
materialStockId: null,
itemId: null,
itemCode: null,
itemName: null,
specification: null,
unitOfMeasure: null,
quantityTransfer: null,
quantityMax: null,
workorderId: null,
workorderCode: null,
batchCode: null,
fromWarehouseId:null,
fromWarehouseCode: null,
fromWarehouseName: null,
fromLocationId: null,
fromLocationCode: null,
fromLocationName: null,
fromAreaId: null,
fromAreaCode: null,
fromAreaName: null,
toWarehouseId: null,
toWarehouseCode: null,
toWarehouseName: null,
toLocationId: null,
toLocationCode: null,
toLocationName: null,
toAreaId: null,
toAreaCode: null,
toAreaName: null,
expireDate: null,
vendorId: null,
vendorCode: null,
vendorName: null,
vendorNick: null,
},
//
form: {},
@ -247,10 +247,10 @@ export default {
rules: {
itemCode: [
{ required: true, message: "请选择移出的物资", trigger: "blur" }
],
],
toWarehouseId: [
{ required: true, message: "请指定移入仓库", trigger: "blur" }
],
],
quantityTransfer: [
{ required: true, message: "转移数量不能为空", trigger: "blur" }
], }
@ -271,16 +271,16 @@ export default {
});
},
getWarehouseList(){
getTreeList().then( response =>{
getTreeList().then( response =>{
this.warehouseOptions = response.data;
this.warehouseOptions.map(w =>{
w.children.map(l =>{
let lstr =JSON.stringify(l.children).replace(/locationId/g,'lId').replace(/areaId/g, 'pId').replace(/areaName/g,'pName');
let lstr =JSON.stringify(l.children).replace(/locationId/g,'lId').replace(/areaId/g, 'pId').replace(/areaName/g,'pName');
l.children = JSON.parse(lstr);
});
let wstr = JSON.stringify(w.children).replace(/warehouseId/g,'wId').replace(/locationId/g, 'pId').replace(/locationName/g,'pName');
w.children = JSON.parse(wstr);
let wstr = JSON.stringify(w.children).replace(/warehouseId/g,'wId').replace(/locationId/g, 'pId').replace(/locationName/g,'pName');
w.children = JSON.parse(wstr);
});
let ostr=JSON.stringify(this.warehouseOptions).replace(/warehouseId/g,'pId').replace(/warehouseName/g, 'pName');
@ -295,50 +295,50 @@ export default {
//
reset() {
this.form = {
lineId: null,
transferId: this.transferId,
materialStockId: null,
itemId: null,
itemCode: null,
itemName: null,
specification: null,
unitOfMeasure: null,
quantityTransfer: null,
workorderId: null,
workorderCode: null,
batchCode: null,
fromWarehouseId: this.fromWarehouseId,
fromWarehouseCode: null,
fromWarehouseName: null,
fromLocationId: null,
fromLocationCode: null,
fromLocationName: null,
fromAreaId: null,
fromAreaCode: null,
fromAreaName: null,
toWarehouseId: this.toWarehouseId,
toWarehouseCode: null,
toWarehouseName: null,
toLocationId: null,
toLocationCode: null,
toLocationName: null,
toAreaId: null,
toAreaCode: null,
toAreaName: null,
expireDate: null,
vendorId: null,
vendorCode: null,
vendorName: null,
vendorNick: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
lineId: null,
transferId: this.transferId,
materialStockId: null,
itemId: null,
itemCode: null,
itemName: null,
specification: null,
unitOfMeasure: null,
quantityTransfer: null,
workorderId: null,
workorderCode: null,
batchCode: null,
fromWarehouseId: this.fromWarehouseId,
fromWarehouseCode: null,
fromWarehouseName: null,
fromLocationId: null,
fromLocationCode: null,
fromLocationName: null,
fromAreaId: null,
fromAreaCode: null,
fromAreaName: null,
toWarehouseId: this.toWarehouseId,
toWarehouseCode: null,
toWarehouseName: null,
toLocationId: null,
toLocationCode: null,
toLocationName: null,
toAreaId: null,
toAreaCode: null,
toAreaName: null,
expireDate: null,
vendorId: null,
vendorCode: null,
vendorName: null,
vendorNick: null,
remark: null,
attr1: null,
attr2: null,
attr3: null,
attr4: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
@ -371,8 +371,8 @@ export default {
getTransferline(lineId).then(response => {
this.form = response.data;
this.fromWarehouse = response.data.fromWarehouseName+" / "+response.data.fromLocationName+" / "+response.data.fromAreaName;
this.warehouseInfo[0] = response.data.toWarehouseId;
this.warehouseInfo[1] = response.data.toLocationId;
this.warehouseInfo[0] = response.data.toWarehouseId;
this.warehouseInfo[1] = response.data.toLocationId;
this.warehouseInfo[2] = response.data.toAreaId;
this.open = true;
this.title = "修改转移单行";
@ -380,9 +380,9 @@ export default {
},
/** 提交按钮 */
submitForm() {
debugger;
debugger;
this.$refs["form"].validate(valid => {
if (valid) {
if (valid) {
if (this.form.lineId != null) {
updateTransferline(this.form).then(response => {
@ -423,7 +423,7 @@ export default {
this.form.itemCode = obj.itemCode;
this.form.itemName = obj.itemName;
this.form.specification = obj.specification;
this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.unitOfMeasure = obj.unitOfMeasure;
this.form.batchCode = obj.batchCode;
this.form.quantityTransfer = obj.quantityOnhand;
this.form.quantityMax = obj.quantityOnhand;
@ -440,12 +440,13 @@ export default {
this.form.vendorCode = obj.vendorCode;
this.form.vendorName = obj.vendorName;
this.form.workorderId = obj.workorderId;
this.form.workorderCode = obj.workorderCode;
this.form.workorderCode = obj.workorderCode;
this.fromWarehouse = obj.warehouseName +" / "+ obj.locationName +" / "+ obj.areaName;
this.form.unitName = obj.unitName
}
},
//
handleToWarehouseChanged(obj){
handleToWarehouseChanged(obj){
if(obj !=null){
this.form.toWarehouseId = obj[0];
this.form.toLocationId = obj[1];