...
|
...
|
@@ -63,13 +63,18 @@ |
|
|
});
|
|
|
},
|
|
|
onClickCreate() {
|
|
|
this.tableData = this.$refs.goodsList.rebuildData;
|
|
|
this.tableData = this.$refs.goodsList.rebuildData.map(row => {
|
|
|
if (_.some(this.selection, {id: row.id})) {
|
|
|
row._checked = true;
|
|
|
}
|
|
|
return row;
|
|
|
});
|
|
|
|
|
|
let select = this.tableData.filter(i => {
|
|
|
return _.find(this.selection, (s) => s.id === i.id);
|
|
|
this.selection = this.selection.map(i => {
|
|
|
return _.find(this.tableData, (s) => s.id === i.id);
|
|
|
});
|
|
|
|
|
|
if (!select.every((i) => {
|
|
|
if (!this.selection.every((i) => {
|
|
|
return i.num && i.num <= i.buyingNums && i.num <= (i.buyingNums - i.shipmentsNums);
|
|
|
})) {
|
|
|
this.$Message.error('请正确填写发货数量');
|
...
|
...
|
@@ -77,7 +82,7 @@ |
|
|
return;
|
|
|
}
|
|
|
|
|
|
this.$refs.sendModal.show(this.id, select);
|
|
|
this.$refs.sendModal.show();
|
|
|
},
|
|
|
getGoods() {
|
|
|
return this.invoiceService.listProduct({
|
...
|
...
|
|