|
|
@ -560,17 +560,9 @@ export default {
|
|
|
|
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
|
|
|
|
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
|
|
|
|
return this.$message.error('单据数量不能为0');
|
|
|
|
return this.$message.error('单据数量不能为0');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// if (this.$isBlank(this.codeArray[i].batchNo)) {
|
|
|
|
|
|
|
|
// if (!this.codeArray[i].allowNoBatch) {
|
|
|
|
|
|
|
|
// return this.$message.error('批次号不能为空');
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
|
|
|
|
if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
|
|
|
|
return this.$message.error('生产日期与失效日期不能全部为空');
|
|
|
|
return this.$message.error('生产日期与失效日期不能全部为空');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// if (this.$isBlank(this.codeArray[i].expireDate)) {
|
|
|
|
|
|
|
|
// return this.$message.error('失效日期不能为空');
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -580,14 +572,6 @@ export default {
|
|
|
|
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
|
|
|
|
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
|
|
|
|
return this.$message.error('单据数量不能为0');
|
|
|
|
return this.$message.error('单据数量不能为0');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// if (!this.$isBlank(this.codeArray[i].productDate && this.codeArray[i].productDate.length != 6)) {
|
|
|
|
|
|
|
|
// return this.$message.error('生产日期格式错误');
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// if (!this.$isBlank(this.codeArray[i].expireDate && this.codeArray[i].expireDate.length != 6)) {
|
|
|
|
|
|
|
|
// return this.$message.error('失效日期不能为空');
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -704,15 +688,12 @@ export default {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
|
let tQuery = this.formData;
|
|
|
|
let tQuery = this.formData;
|
|
|
|
tQuery.status = status;
|
|
|
|
tQuery.status = status;
|
|
|
|
// if (!this.orderEditor) {
|
|
|
|
|
|
|
|
tQuery.subErpOrders = this.codeArray;
|
|
|
|
tQuery.subErpOrders = this.codeArray;
|
|
|
|
if (status == '3') {
|
|
|
|
if (status == '3') {
|
|
|
|
tQuery.subErpOrders.forEach((obj) => {
|
|
|
|
tQuery.subErpOrders.forEach((obj) => {
|
|
|
|
obj.reCount = obj.count;
|
|
|
|
obj.reCount = obj.count;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
insertStockOrderWeb(tQuery)
|
|
|
|
insertStockOrderWeb(tQuery)
|
|
|
|
.then(response => {
|
|
|
|
.then(response => {
|
|
|
|
this.loading = false;
|
|
|
|
this.loading = false;
|
|
|
|