|
@@ -74,7 +74,7 @@
|
|
|
<containerTitle title="商品信息" />
|
|
|
<basic-container>
|
|
|
<avue-crud ref="crud" :data="dataList" :option="tableOption" :cell-style="cellStyle" @saveColumn="saveColumn"
|
|
|
- @resetColumn="resetColumn">
|
|
|
+ @resetColumn="resetColumn" :table-loading="goodsLoading">
|
|
|
<template slot="headerSerial" slot-scope="{ column }">
|
|
|
<el-button type="primary" icon="el-icon-circle-plus-outline" circle size="mini" :disabled="
|
|
|
disabled || !form.storageId || confirmDisabled || checkDisabled
|
|
@@ -308,6 +308,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ goodsLoading: false,
|
|
|
orderNumber: true,
|
|
|
pageLoading: false,
|
|
|
btnLoading: false,
|
|
@@ -829,7 +830,10 @@ export default {
|
|
|
: 0
|
|
|
);
|
|
|
this.$set(form, "stock", a.balanceQuantity);
|
|
|
- });
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.goodsLoading = false
|
|
|
+ });
|
|
|
return form;
|
|
|
},
|
|
|
getStockInfo2(data) {
|
|
@@ -862,7 +866,10 @@ export default {
|
|
|
let arr = [];
|
|
|
await getLotNo(data).then(res => {
|
|
|
arr = res.data.data ? res.data.data : [];
|
|
|
- });
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ this.goodsLoading = false
|
|
|
+ });
|
|
|
return arr;
|
|
|
},
|
|
|
importGoods() {
|
|
@@ -874,6 +881,7 @@ export default {
|
|
|
this.selectionList.forEach(e => {
|
|
|
this.dataList.forEach(async (item, index) => {
|
|
|
if (index == this.reData.index) {
|
|
|
+ this.goodsLoading = true
|
|
|
getMarketPrice({ code: e.code, isFreight: 0, isLabel: 0 }).then(
|
|
|
response => {
|
|
|
if (response.data.data.length > 0) {
|
|
@@ -941,6 +949,7 @@ export default {
|
|
|
itemId: e.id
|
|
|
})
|
|
|
});
|
|
|
+ this.goodsLoading = true
|
|
|
salesOrderEntry({ typeId: 1, isFreight: 0, isLabel: 0, billType: "XS", tradeType: "JXS", storageId: this.form.storageId, salesOrderEntry: goodsList }).then(res => {
|
|
|
let data = res.data.data
|
|
|
arr.forEach((e, index) => {
|
|
@@ -967,8 +976,12 @@ export default {
|
|
|
$cellEdit: true
|
|
|
});
|
|
|
});
|
|
|
- })
|
|
|
+ }).finally(() => {
|
|
|
+ this.goodsLoading = false
|
|
|
+ });
|
|
|
+
|
|
|
} else {
|
|
|
+
|
|
|
let goodsList = []
|
|
|
let arr = []
|
|
|
arr = this.selectionList
|
|
@@ -978,7 +991,9 @@ export default {
|
|
|
itemId: e.id
|
|
|
})
|
|
|
});
|
|
|
+ this.goodsLoading = true
|
|
|
salesOrderEntry({ typeId: 1, isFreight: 0, isLabel: 0, billType: "XS", tradeType: "JXS", storageId: this.form.storageId, salesOrderEntry: goodsList }).then(res => {
|
|
|
+
|
|
|
let data = res.data.data
|
|
|
arr.forEach((e, index) => {
|
|
|
this.dataList.push({
|
|
@@ -1003,8 +1018,11 @@ export default {
|
|
|
batch: e.batch,
|
|
|
$cellEdit: true
|
|
|
});
|
|
|
- });
|
|
|
- })
|
|
|
+ })
|
|
|
+ }).finally(() => {
|
|
|
+ this.goodsLoading = false
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
this.dialogVisible = false;
|