给单据录入界面增加仓库批量设置功能

This commit is contained in:
季圣华
2021-11-16 00:56:18 +08:00
parent fe29b1a7c2
commit 8c72a21918
13 changed files with 294 additions and 63 deletions

View File

@@ -229,6 +229,11 @@ export const BillModalMixin = {
this.$refs.memberModalForm.title = "新增会员";
this.$refs.memberModalForm.disableSubmit = false;
},
handleBatchSetDepot() {
this.$refs.batchSetDepotModalForm.add();
this.$refs.batchSetDepotModalForm.title = "批量设置仓库";
this.$refs.batchSetDepotModalForm.disableSubmit = false;
},
addDepot() {
this.$refs.depotModalForm.add();
this.$refs.depotModalForm.title = "新增仓库";
@@ -248,6 +253,21 @@ export const BillModalMixin = {
memberModalFormOk() {
this.initRetail()
},
batchSetDepotModalFormOk(depotId) {
this.getAllTable().then(tables => {
return getListData(this.form, tables)
}).then(allValues => {
//获取单据明细列表信息
let detailArr = allValues.tablesValue[0].values
//构造新的列表数组,用于存放单据明细信息
let newDetailArr = []
for(let detail of detailArr){
detail.depotId = depotId
newDetailArr.push(detail)
}
this.materialTable.dataSource = newDetailArr
})
},
depotModalFormOk() {
this.initDepot()
},