From 847acce9a481a0d17708854ec0d9fbfa16a5e7fa Mon Sep 17 00:00:00 2001 From: jishenghua <752718920@qq.com> Date: Sat, 3 Feb 2024 23:20:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E9=87=87=E8=B4=AD=E5=85=A5=E5=BA=93?= =?UTF-8?q?=E5=92=8C=E9=94=80=E5=94=AE=E5=87=BA=E5=BA=93=E5=85=B3=E8=81=94?= =?UTF-8?q?=E5=8D=95=E6=8D=AE=E7=9A=84=E6=97=B6=E5=80=99=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E9=BB=98=E8=AE=A4=E7=9A=84=E4=BB=93=E5=BA=93?= =?UTF-8?q?id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/bill/dialog/LinkBillList.vue | 20 ++++++++++++++++++- .../views/bill/modules/PurchaseInModal.vue | 3 ++- .../src/views/bill/modules/SaleOutModal.vue | 3 ++- 3 files changed, 23 insertions(+), 3 deletions(-) diff --git a/jshERP-web/src/views/bill/dialog/LinkBillList.vue b/jshERP-web/src/views/bill/dialog/LinkBillList.vue index 7a5d19f6..804a85a7 100644 --- a/jshERP-web/src/views/bill/dialog/LinkBillList.vue +++ b/jshERP-web/src/views/bill/dialog/LinkBillList.vue @@ -132,6 +132,7 @@ discountMoney: '', deposit: '', remark: '', + defaultDepotId: '', queryParam: { number: "", materialParam: "", @@ -254,6 +255,7 @@ }, handleOk () { if(this.selectType === 'list') { + this.getDepotByCurrentUser() this.getSelectBillRows(); this.selectType = 'detail' this.title = "选择单据明细" @@ -269,7 +271,7 @@ } else { if(this.selectedDetailRowKeys.length) { this.getSelectBillDetailRows() - this.$emit('ok', this.selectBillDetailRows, this.linkNumber, this.organId, this.discountMoney, this.deposit, this.remark) + this.$emit('ok', this.selectBillDetailRows, this.linkNumber, this.organId, this.discountMoney, this.deposit, this.remark, this.defaultDepotId) this.close() } else { this.$message.warning('抱歉,请选择单据明细!') @@ -349,6 +351,22 @@ } } }, + //加载默认仓库id + getDepotByCurrentUser() { + getAction('/depot/findDepotByCurrentUser').then((res) => { + if (res.code === 200) { + if (res.data.length === 1) { + this.defaultDepotId = res.data[0].id+'' + } else { + for (let i = 0; i < res.data.length; i++) { + if(res.data[i].isDefault){ + this.defaultDepotId = res.data[i].id+'' + } + } + } + } + }) + }, rowAction(record, index) { return { on: { diff --git a/jshERP-web/src/views/bill/modules/PurchaseInModal.vue b/jshERP-web/src/views/bill/modules/PurchaseInModal.vue index 27620beb..0aad53bc 100644 --- a/jshERP-web/src/views/bill/modules/PurchaseInModal.vue +++ b/jshERP-web/src/views/bill/modules/PurchaseInModal.vue @@ -433,7 +433,7 @@ this.$refs.linkBillList.show('其它', '采购订单', '供应商', "1,3") this.$refs.linkBillList.title = "选择采购订单" }, - linkBillListOk(selectBillDetailRows, linkNumber, organId, discountMoney, deposit, remark) { + linkBillListOk(selectBillDetailRows, linkNumber, organId, discountMoney, deposit, remark, depotId) { this.rowCanEdit = false this.materialTable.columns[1].type = FormTypes.normal this.changeFormTypes(this.materialTable.columns, 'preNumber', 1) @@ -450,6 +450,7 @@ info.taxMoney = (info.allPrice*taxRate/100).toFixed(2)-0 info.taxLastMoney = (info.allPrice + info.taxMoney).toFixed(2)-0 } + info.depotId = depotId ? depotId:'' info.linkId = info.id allTaxLastMoney += info.taxLastMoney listEx.push(info) diff --git a/jshERP-web/src/views/bill/modules/SaleOutModal.vue b/jshERP-web/src/views/bill/modules/SaleOutModal.vue index f950a41a..05927e1d 100644 --- a/jshERP-web/src/views/bill/modules/SaleOutModal.vue +++ b/jshERP-web/src/views/bill/modules/SaleOutModal.vue @@ -451,7 +451,7 @@ this.$refs.linkBillList.show('其它', '销售订单', '客户', "1,3") this.$refs.linkBillList.title = "选择销售订单" }, - linkBillListOk(selectBillDetailRows, linkNumber, organId, discountMoney, deposit, remark) { + linkBillListOk(selectBillDetailRows, linkNumber, organId, discountMoney, deposit, remark, depotId) { this.rowCanEdit = false this.materialTable.columns[1].type = FormTypes.normal this.changeFormTypes(this.materialTable.columns, 'preNumber', 1) @@ -468,6 +468,7 @@ info.taxMoney = (info.allPrice*taxRate/100).toFixed(2)-0 info.taxLastMoney = (info.allPrice + info.taxMoney).toFixed(2)-0 } + info.depotId = depotId ? depotId:'' info.linkId = info.id allTaxLastMoney += info.taxLastMoney listEx.push(info)