Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -246,7 +246,11 @@ export default {
|
|||||||
grossWeight: null,
|
grossWeight: null,
|
||||||
netWeight: null,
|
netWeight: null,
|
||||||
warehouseId: null,
|
warehouseId: null,
|
||||||
actualWarehouseId: null
|
actualWarehouseId: null,
|
||||||
|
qualityStatus: '',
|
||||||
|
packagingRequirement: '',
|
||||||
|
packingStatus: '',
|
||||||
|
trimmingRequirement: ''
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
// 钢卷选择器可见性
|
// 钢卷选择器可见性
|
||||||
@@ -407,7 +411,8 @@ export default {
|
|||||||
materialName: data.materialName || (data.rawMaterial ? data.rawMaterial.rawMaterialName : ''),
|
materialName: data.materialName || (data.rawMaterial ? data.rawMaterial.rawMaterialName : ''),
|
||||||
productName: data.productName || (data.product ? data.product.productName : ''),
|
productName: data.productName || (data.product ? data.product.productName : ''),
|
||||||
specification: data.rawMaterial?.specification || data.product?.specification || '',
|
specification: data.rawMaterial?.specification || data.product?.specification || '',
|
||||||
bomItems: data.bomItemList || []
|
bomItems: data.bomItemList || [],
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
coilId: null,
|
coilId: null,
|
||||||
@@ -782,16 +787,8 @@ export default {
|
|||||||
.join(',');
|
.join(',');
|
||||||
|
|
||||||
const mergeData = {
|
const mergeData = {
|
||||||
|
...this.targetCoil,
|
||||||
enterCoilNo: enterCoilNos, // 拼接的入场钢卷号
|
enterCoilNo: enterCoilNos, // 拼接的入场钢卷号
|
||||||
currentCoilNo: this.targetCoil.currentCoilNo,
|
|
||||||
team: this.targetCoil.team,
|
|
||||||
materialType: this.targetCoil.materialType,
|
|
||||||
itemType: this.targetCoil.itemType,
|
|
||||||
itemId: this.targetCoil.itemId,
|
|
||||||
grossWeight: this.targetCoil.grossWeight,
|
|
||||||
netWeight: this.targetCoil.netWeight,
|
|
||||||
warehouseId: this.targetCoil.warehouseId,
|
|
||||||
actualWarehouseId: this.targetCoil.actualWarehouseId,
|
|
||||||
hasMergeSplit: 2, // 2表示合卷
|
hasMergeSplit: 2, // 2表示合卷
|
||||||
newCoils: this.sourceCoils.map(item => ({
|
newCoils: this.sourceCoils.map(item => ({
|
||||||
coilId: item.coilId,
|
coilId: item.coilId,
|
||||||
|
|||||||
@@ -120,6 +120,33 @@
|
|||||||
<el-table-column label="班组" align="center" prop="team" />
|
<el-table-column label="班组" align="center" prop="team" />
|
||||||
<el-table-column label="毛重" align="center" prop="grossWeight" />
|
<el-table-column label="毛重" align="center" prop="grossWeight" />
|
||||||
<el-table-column label="净重" align="center" prop="netWeight" />
|
<el-table-column label="净重" align="center" prop="netWeight" />
|
||||||
|
<el-table-column v-if="querys.materialType === '成品'" label="质量状态" align="center" prop="qualityStatus" />
|
||||||
|
<el-table-column v-if="querys.materialType === '成品'" label="切边要求" align="center" prop="trimmingRequirement" />
|
||||||
|
<el-table-column v-if="querys.materialType === '成品'" label="打包状态" align="center" prop="packingStatus" />
|
||||||
|
<el-table-column v-if="querys.materialType === '成品'" label="包装要求" align="center" prop="packagingRequirement" />
|
||||||
|
<!-- <el-form-item v-if="form.materialType === '成品'" label="质量状态" prop="qualityStatus">
|
||||||
|
<el-input v-model="form.qualityStatus" placeholder="请输入质量状态"
|
||||||
|
:disabled="readonly">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item v-if="form.materialType === '成品'" label="切边要求" prop="trimmingRequirement">
|
||||||
|
<el-input v-model="form.trimmingRequirement" placeholder="请输入切边要求"
|
||||||
|
:disabled="readonly">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item v-if="form.materialType === '成品'" label="打包状态" prop="packingStatus">
|
||||||
|
<el-input v-model="form.packingStatus" placeholder="请输入打包状态"
|
||||||
|
:disabled="readonly">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item v-if="form.materialType === '成品'" label="包装要求" prop="packagingRequirement">
|
||||||
|
<el-input v-model="form.packagingRequirement" placeholder="请输入包装要求"
|
||||||
|
:disabled="readonly">
|
||||||
|
</el-input>
|
||||||
|
</el-form-item> -->
|
||||||
<el-table-column label="关联信息" align="center" prop="parentCoilNos" :show-overflow-tooltip="true">
|
<el-table-column label="关联信息" align="center" prop="parentCoilNos" :show-overflow-tooltip="true">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.parentCoilNos && scope.row.hasMergeSplit === 1 && scope.row.dataType === 1">
|
<span v-if="scope.row.parentCoilNos && scope.row.hasMergeSplit === 1 && scope.row.dataType === 1">
|
||||||
@@ -452,13 +479,14 @@ export default {
|
|||||||
const item = findItemWithBom(row.itemType, row.itemId)
|
const item = findItemWithBom(row.itemType, row.itemId)
|
||||||
// 寻找boms中bom键名为'材质'的
|
// 寻找boms中bom键名为'材质'的
|
||||||
const material = item?.boms?.find(bom => bom.attrKey === '材质')
|
const material = item?.boms?.find(bom => bom.attrKey === '材质')
|
||||||
// 查找boms中bom键名为'规格'的
|
|
||||||
const specification = item?.boms?.find(bom => bom.attrKey === '规格')
|
console.log('规格', item)
|
||||||
this.labelRender.data = {
|
this.labelRender.data = {
|
||||||
...row,
|
...row,
|
||||||
itemName: item?.itemName || '',
|
itemName: item?.itemName || '',
|
||||||
material: material?.attrValue || '',
|
material: material?.attrValue || '',
|
||||||
specification: specification?.attrValue || item?.specification || '',
|
specification: item?.specification || '',
|
||||||
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
/** 下载二维码 */
|
/** 下载二维码 */
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default {
|
|||||||
// warehouseId: 111,
|
// warehouseId: 111,
|
||||||
},
|
},
|
||||||
hideWarehouseQuery: true,
|
hideWarehouseQuery: true,
|
||||||
labelType: '3',
|
labelType: '2',
|
||||||
hideType: false,
|
hideType: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -577,7 +577,11 @@ export default {
|
|||||||
grossWeight: null,
|
grossWeight: null,
|
||||||
netWeight: null,
|
netWeight: null,
|
||||||
warehouseId: null,
|
warehouseId: null,
|
||||||
actualWarehouseId: null
|
actualWarehouseId: null,
|
||||||
|
qualityStatus: '',
|
||||||
|
packagingRequirement: '',
|
||||||
|
packingStatus: '',
|
||||||
|
trimmingRequirement: ''
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -653,16 +657,9 @@ export default {
|
|||||||
currentCoilNo: this.motherCoil.currentCoilNo,
|
currentCoilNo: this.motherCoil.currentCoilNo,
|
||||||
hasMergeSplit: 1, // 1表示分条
|
hasMergeSplit: 1, // 1表示分条
|
||||||
newCoils: this.splitList.map(item => ({
|
newCoils: this.splitList.map(item => ({
|
||||||
enterCoilNo: this.motherCoil.enterCoilNo, // 子卷继承母卷的入场钢卷号
|
...item,
|
||||||
currentCoilNo: item.currentCoilNo,
|
|
||||||
team: item.team,
|
|
||||||
materialType: item.materialType,
|
|
||||||
itemType: item.itemType || this.motherCoil.itemType,
|
itemType: item.itemType || this.motherCoil.itemType,
|
||||||
itemId: item.itemId || this.motherCoil.itemId,
|
itemId: item.itemId || this.motherCoil.itemId,
|
||||||
grossWeight: item.grossWeight,
|
|
||||||
netWeight: item.netWeight,
|
|
||||||
warehouseId: item.warehouseId,
|
|
||||||
actualWarehouseId: item.actualWarehouseId,
|
|
||||||
hasMergeSplit: 1
|
hasMergeSplit: 1
|
||||||
}))
|
}))
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -260,7 +260,11 @@ export default {
|
|||||||
netWeight: null,
|
netWeight: null,
|
||||||
warehouseId: null,
|
warehouseId: null,
|
||||||
actualWarehouseId: null,
|
actualWarehouseId: null,
|
||||||
remark: ''
|
remark: '',
|
||||||
|
qualityStatus: '',
|
||||||
|
packagingRequirement: '',
|
||||||
|
packingStatus: '',
|
||||||
|
trimmingRequirement: ''
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
currentCoilNo: [
|
currentCoilNo: [
|
||||||
@@ -344,9 +348,6 @@ export default {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
|
||||||
// 不再需要watch,直接用@change事件处理
|
|
||||||
},
|
|
||||||
async created() {
|
async created() {
|
||||||
// 先加载库区列表
|
// 先加载库区列表
|
||||||
await this.loadWarehouses();
|
await this.loadWarehouses();
|
||||||
@@ -400,27 +401,11 @@ export default {
|
|||||||
|
|
||||||
// 填充当前信息(左侧)
|
// 填充当前信息(左侧)
|
||||||
this.currentInfo = {
|
this.currentInfo = {
|
||||||
coilId: data.coilId,
|
...data,
|
||||||
enterCoilNo: data.enterCoilNo || '',
|
|
||||||
currentCoilNo: data.currentCoilNo || '',
|
|
||||||
supplierCoilNo: data.supplierCoilNo || '',
|
|
||||||
team: data.team || '',
|
|
||||||
itemType: data.itemType || null,
|
|
||||||
itemId: data.itemId || null,
|
|
||||||
itemName: this.getItemName(data),
|
itemName: this.getItemName(data),
|
||||||
grossWeight: data.grossWeight,
|
|
||||||
netWeight: data.netWeight,
|
|
||||||
warehouseId: data.warehouseId,
|
|
||||||
actualWarehouseId: data.actualWarehouseId,
|
|
||||||
nextWarehouseName: this.getWarehouseName(data.warehouseId),
|
nextWarehouseName: this.getWarehouseName(data.warehouseId),
|
||||||
remark: data.remark || ''
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// 重新获取库区名称(确保warehouseList已加载)
|
|
||||||
if (data.warehouseId) {
|
|
||||||
this.currentInfo.nextWarehouseName = this.getWarehouseName(data.warehouseId);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 加载对应类型的物品列表
|
// 加载对应类型的物品列表
|
||||||
if (data.itemType) {
|
if (data.itemType) {
|
||||||
await this.loadItemList(data.itemType);
|
await this.loadItemList(data.itemType);
|
||||||
@@ -684,19 +669,10 @@ export default {
|
|||||||
|
|
||||||
// 构造更新数据(使用标准update接口,直接更新原记录)
|
// 构造更新数据(使用标准update接口,直接更新原记录)
|
||||||
const updateData = {
|
const updateData = {
|
||||||
|
...this.updateForm,
|
||||||
coilId: this.currentInfo.coilId,
|
coilId: this.currentInfo.coilId,
|
||||||
enterCoilNo: this.currentInfo.enterCoilNo,
|
enterCoilNo: this.currentInfo.enterCoilNo,
|
||||||
supplierCoilNo: this.currentInfo.supplierCoilNo,
|
supplierCoilNo: this.currentInfo.supplierCoilNo,
|
||||||
currentCoilNo: this.updateForm.currentCoilNo,
|
|
||||||
team: this.updateForm.team,
|
|
||||||
materialType: this.updateForm.materialType,
|
|
||||||
itemType: this.updateForm.itemType,
|
|
||||||
itemId: this.updateForm.itemId,
|
|
||||||
grossWeight: this.updateForm.grossWeight,
|
|
||||||
netWeight: this.updateForm.netWeight,
|
|
||||||
warehouseId: this.updateForm.warehouseId,
|
|
||||||
actualWarehouseId: this.updateForm.actualWarehouseId,
|
|
||||||
remark: this.updateForm.remark
|
|
||||||
// 注意:不要传newCoils,否则会走批量更新逻辑
|
// 注意:不要传newCoils,否则会走批量更新逻辑
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user