|
|
@@ -89,6 +89,7 @@
|
|
|
ref="inventoryTableref"
|
|
|
:orderId="form.orderId"
|
|
|
:customerMark="this.customerMark"
|
|
|
+ :batchNo="batchNo"
|
|
|
></inventoryTable>
|
|
|
|
|
|
<div slot="footer" class="footer">
|
|
|
@@ -199,13 +200,15 @@
|
|
|
// 是否是修改
|
|
|
isUpdate: false,
|
|
|
processSubmitDialogFlag: false,
|
|
|
- businessId: ''
|
|
|
+ businessId: '',
|
|
|
+ batchNo:''
|
|
|
};
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
//打开新增编辑弹框
|
|
|
async open(type, row, orderId) {
|
|
|
+ this.batchNo = await getCode('lot_number_code');
|
|
|
this.title = type === 'add' ? '新增受托收货单' : '修改';
|
|
|
this.row = row;
|
|
|
if (orderId) {
|
|
|
@@ -280,16 +283,12 @@
|
|
|
item.bomCode = item.bomCode;
|
|
|
item.discountSinglePrice = 0;
|
|
|
item.singlePrice = 0;
|
|
|
+ item['batchNo'] = this.batchNo;
|
|
|
|
|
|
return item;
|
|
|
});
|
|
|
mbomCategoryList.push(...arr);
|
|
|
});
|
|
|
- const batchNoS = await this.getBatchNo(mbomCategoryList);
|
|
|
- console.log(batchNoS);
|
|
|
- mbomCategoryList.forEach((v, i) => {
|
|
|
- v['batchNo'] = batchNoS[i];
|
|
|
- });
|
|
|
}
|
|
|
console.log(mbomCategoryList, 'mbomCategoryList');
|
|
|
this.form = Object.assign({}, this.form, {
|
|
|
@@ -307,19 +306,19 @@
|
|
|
});
|
|
|
}
|
|
|
},
|
|
|
- getBatchNo(arr) {
|
|
|
- let promiseAll = [];
|
|
|
- arr.forEach((item) => {
|
|
|
- promiseAll.push(
|
|
|
- new Promise((resolve, reject) => {
|
|
|
- getCode('lot_number_code').then((res) => {
|
|
|
- resolve(res);
|
|
|
- });
|
|
|
- })
|
|
|
- );
|
|
|
- });
|
|
|
- return Promise.all(promiseAll);
|
|
|
- },
|
|
|
+ // getBatchNo(arr) {
|
|
|
+ // let promiseAll = [];
|
|
|
+ // arr.forEach((item) => {
|
|
|
+ // promiseAll.push(
|
|
|
+ // new Promise((resolve, reject) => {
|
|
|
+ // getCode('lot_number_code').then((res) => {
|
|
|
+ // resolve(res);
|
|
|
+ // });
|
|
|
+ // })
|
|
|
+ // );
|
|
|
+ // });
|
|
|
+ // return Promise.all(promiseAll);
|
|
|
+ // },
|
|
|
//发货单详情
|
|
|
async getSendSaleOrderDetail(id) {
|
|
|
this.businessId = id;
|