|
@@ -245,6 +245,12 @@
|
|
|
default() {
|
|
default() {
|
|
|
return '';
|
|
return '';
|
|
|
}
|
|
}
|
|
|
|
|
+ },
|
|
|
|
|
+ packingUnit: {
|
|
|
|
|
+ type: String,
|
|
|
|
|
+ default() {
|
|
|
|
|
+ return '';
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -300,7 +306,6 @@
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
-
|
|
|
|
|
arr.push(obj);
|
|
arr.push(obj);
|
|
|
});
|
|
});
|
|
|
this.packagingSpecification = arr;
|
|
this.packagingSpecification = arr;
|
|
@@ -336,7 +341,8 @@
|
|
|
label: 'KG',
|
|
label: 'KG',
|
|
|
value: 'KG'
|
|
value: 'KG'
|
|
|
}
|
|
}
|
|
|
- ]
|
|
|
|
|
|
|
+ ],
|
|
|
|
|
+ hasPushed: false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
created() {
|
|
created() {
|
|
@@ -344,11 +350,46 @@
|
|
|
'this.packageDispositionVOList-',
|
|
'this.packageDispositionVOList-',
|
|
|
this.packageDispositionVOList
|
|
this.packageDispositionVOList
|
|
|
);
|
|
);
|
|
|
|
|
+ if (this.packageDispositionVOList.length == 0) {
|
|
|
|
|
+ this.hasPushed = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ console.log(this.hasPushed, 'has');
|
|
|
|
|
+ },
|
|
|
|
|
+ mounted() {
|
|
|
|
|
+ console.log(this.packingRules, 'packingRules');
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ async defaultBuild(val) {
|
|
|
|
|
+ if (!this.hasPushed) {
|
|
|
|
|
+ let code = await getCode('package_disposition');
|
|
|
|
|
+ this.ruleItem = {
|
|
|
|
|
+ code: code,
|
|
|
|
|
+ name: '默认包装组',
|
|
|
|
|
+ status: 1,
|
|
|
|
|
+ minPackageCell: '1',
|
|
|
|
|
+ packageUnit: this.measuringUnit,
|
|
|
|
|
+ minConversionUnit: this.packingUnit,
|
|
|
|
|
+ inPackageCell: '',
|
|
|
|
|
+ inConversionUnit: '',
|
|
|
|
|
+ outPackageCell: '',
|
|
|
|
|
+ inConversionUnit: '',
|
|
|
|
|
+ outConversionUnit: ''
|
|
|
|
|
+ };
|
|
|
|
|
+ this.packagingSpecification.push(this.ruleItem);
|
|
|
|
|
+ console.log('111111第一次添加');
|
|
|
|
|
+ this.packingRules = this.ruleItem.code;
|
|
|
|
|
+ this.hasPushed = true;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ console.log('数组已经进行过push操作,无法再次添加元素。');
|
|
|
|
|
+ this.packagingSpecification = this.packagingSpecification.map(
|
|
|
|
|
+ (item) => {
|
|
|
|
|
+ return { ...item, minConversionUnit: val };
|
|
|
|
|
+ }
|
|
|
|
|
+ );
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
statusChange(value, indexs) {
|
|
statusChange(value, indexs) {
|
|
|
console.log(value);
|
|
console.log(value);
|
|
|
- console.log(this.packagingSpecification);
|
|
|
|
|
if (value == 1) {
|
|
if (value == 1) {
|
|
|
this.packagingSpecification = this.packagingSpecification.map(
|
|
this.packagingSpecification = this.packagingSpecification.map(
|
|
|
(item, index) => {
|
|
(item, index) => {
|
|
@@ -379,9 +420,9 @@
|
|
|
code: code,
|
|
code: code,
|
|
|
name: '',
|
|
name: '',
|
|
|
status: 0,
|
|
status: 0,
|
|
|
- minPackageCell: '',
|
|
|
|
|
|
|
+ minPackageCell: '1',
|
|
|
packageUnit: this.measuringUnit,
|
|
packageUnit: this.measuringUnit,
|
|
|
- minConversionUnit: '',
|
|
|
|
|
|
|
+ minConversionUnit: this.packingUnit,
|
|
|
inPackageCell: '',
|
|
inPackageCell: '',
|
|
|
inConversionUnit: '',
|
|
inConversionUnit: '',
|
|
|
outPackageCell: '',
|
|
outPackageCell: '',
|