|
|
@@ -19,7 +19,7 @@
|
|
|
v-model="query.dot"
|
|
|
placeholder="批次号"
|
|
|
label="dot"
|
|
|
- :disabled="disabled || query.historyList.length||query.whether == 0"
|
|
|
+ :disabled="disabled || query.historyList.length || query.whether == 0"
|
|
|
:url="'/blade-sales-part/stockDesc/dotList?storageId=' + form.storageId + '&goodsId=' + query.goodsId"
|
|
|
:filterable="true"
|
|
|
:allowCreate="true"
|
|
|
@@ -218,6 +218,23 @@ export default {
|
|
|
if (row.id) {
|
|
|
itemRemove({ ids: row.id }).then(res => {
|
|
|
this.data.splice(index, 1);
|
|
|
+ let sum = 0;
|
|
|
+ let sendNumFinancing = 0;
|
|
|
+ let sendNumHave = 0;
|
|
|
+ for (let item of this.data) {
|
|
|
+ sum += Number(item.quantity);
|
|
|
+ sendNumFinancing += Number(item.quantityFinancing);
|
|
|
+ sendNumHave += Number(item.quantityHave);
|
|
|
+ }
|
|
|
+ let obj = {
|
|
|
+ ...this.query,
|
|
|
+ sendNum: sum,
|
|
|
+ inventory: this.qtyMax,
|
|
|
+ sendNumFinancing: sendNumFinancing,
|
|
|
+ sendNumHave: sendNumHave,
|
|
|
+ historyList: this.data
|
|
|
+ };
|
|
|
+ this.$emit("areaData", obj, this.index);
|
|
|
this.$message.success("操作成功!");
|
|
|
});
|
|
|
} else {
|
|
|
@@ -227,7 +244,7 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
addRow() {
|
|
|
- if (!this.query.dot&&this.query.whether == 1) {
|
|
|
+ if (!this.query.dot && this.query.whether == 1) {
|
|
|
return this.$message.error("请选择批次号!");
|
|
|
}
|
|
|
this.data.push({
|
|
|
@@ -241,7 +258,7 @@ export default {
|
|
|
let sendNumFinancing = 0;
|
|
|
for (let item of this.data.filter(item => item.quantity > 0)) {
|
|
|
sum += Number(item.quantity ? item.quantity : 0);
|
|
|
- sendNumFinancing += Number(item.quantityFinancing?item.quantityFinancing:0);
|
|
|
+ sendNumFinancing += Number(item.quantityFinancing ? item.quantityFinancing : 0);
|
|
|
}
|
|
|
if (sendNumFinancing > Number(this.query.inventoryFinancing)) {
|
|
|
return this.$message.error("融资数量不能超过" + this.query.inventoryFinancing);
|
|
|
@@ -256,8 +273,8 @@ export default {
|
|
|
let sum = 0;
|
|
|
let sendNumHave = 0;
|
|
|
for (let item of this.data.filter(item => item.quantity > 0)) {
|
|
|
- sum += Number(item.quantity?item.quantity:0);
|
|
|
- sendNumHave += Number(item.quantityHave?item.quantityHave:0);
|
|
|
+ sum += Number(item.quantity ? item.quantity : 0);
|
|
|
+ sendNumHave += Number(item.quantityHave ? item.quantityHave : 0);
|
|
|
}
|
|
|
|
|
|
if (sendNumHave > Number(this.query.inventoryHave)) {
|