|
|
@@ -228,10 +228,11 @@
|
|
|
align="center"
|
|
|
width="100"
|
|
|
prop="ifPackageOk"
|
|
|
+ v-if="isShowPackage"
|
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
<template v-if="row.isSave">
|
|
|
- {{ row.ifPackageOk ? '是' : '否' }}
|
|
|
+ {{ row.ifPackageOk == 1 ? '是' : row.ifPackageOk == 0 ? '否' : '' }}
|
|
|
</template>
|
|
|
<el-form-item
|
|
|
v-else
|
|
|
@@ -250,6 +251,7 @@
|
|
|
align="center"
|
|
|
width="100"
|
|
|
prop="unpackUserName"
|
|
|
+ v-if="isShowPackage"
|
|
|
>
|
|
|
<template slot-scope="{ row, $index }">
|
|
|
<template v-if="row.isSave">
|
|
|
@@ -1749,7 +1751,7 @@
|
|
|
});
|
|
|
console.log(this.productList, 'this.productListtttttttttttt');
|
|
|
this.$nextTick(() => {
|
|
|
- // this.batchSave();
|
|
|
+ this.batchSave();
|
|
|
// this.listSaveArrs()
|
|
|
});
|
|
|
});
|
|
|
@@ -1908,7 +1910,7 @@
|
|
|
|
|
|
return {
|
|
|
index: this.productList.length + index,
|
|
|
- isSave: this.isShowPackage ? false : true,
|
|
|
+ isSave: true,
|
|
|
categoryId: item.id, // 物品id
|
|
|
categoryName: item.name, // 物品名称
|
|
|
categoryCode: item.code, // 物品编码
|
|
|
@@ -2424,7 +2426,14 @@
|
|
|
this.$message.error('请先保存所有产品信息');
|
|
|
return;
|
|
|
}
|
|
|
-
|
|
|
+ if(this.isShowPackage) {
|
|
|
+ const userNameLength = this.productList.filter(item => !item.unpackUserName).length
|
|
|
+ const packgeLength = this.productList.filter(item => !item.ifPackageOk).length
|
|
|
+ if(userNameLength || packgeLength) {
|
|
|
+ this.$message.error('请先填写拆包装责任人和包装完好与否');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
// 处理包装数据
|
|
|
let _packingList = [];
|
|
|
_packingList = this.packingList.map((packingItem) => {
|
|
|
@@ -2923,10 +2932,6 @@
|
|
|
`productList.${index}.warehouseId`,
|
|
|
|
|
|
];
|
|
|
- if(this.isShowPackage) {
|
|
|
- fileds.push(`productList.${index}.unpackUserName`,
|
|
|
- `productList.${index}.ifPackageOk`,)
|
|
|
- }
|
|
|
if (row.isSave) {
|
|
|
return Promise.resolve(true);
|
|
|
} else {
|
|
|
@@ -3072,12 +3077,7 @@
|
|
|
`productList.${index}.warehouseId`
|
|
|
];
|
|
|
|
|
|
- if(this.isShowPackage) {
|
|
|
- fileds.push(
|
|
|
- `productList.${index}.unpackUserName`,
|
|
|
- `productList.${index}.ifPackageOk`,
|
|
|
- )
|
|
|
- }
|
|
|
+
|
|
|
Promise.all(
|
|
|
fileds.map(
|
|
|
(item) =>
|