From 05ba4f608e7bacdc6bc32551226f63a30156fa9d Mon Sep 17 00:00:00 2001 From: guoxing <1369478551@qq.com> Date: Tue, 6 Aug 2024 14:58:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E9=87=87=E8=B4=AD=E8=AE=A2?= =?UTF-8?q?=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/userManage/index.js | 2 +- .../purchaseOrder/purchaseOrderAdd.vue | 88 +++++--- .../purchaseOrder/purchaseOrderInfo.vue | 2 +- .../purchaseOrder/relation/chooseproducts.vue | 7 +- src/views/purchase/purchaseReview/index.vue | 206 ++++++++++-------- src/views/system/menuManage/menuManage.vue | 9 +- 6 files changed, 179 insertions(+), 135 deletions(-) diff --git a/src/api/system/userManage/index.js b/src/api/system/userManage/index.js index 1b3109d..d948cd7 100644 --- a/src/api/system/userManage/index.js +++ b/src/api/system/userManage/index.js @@ -92,7 +92,7 @@ export function userSingle(data) { // 单条用户的角色列表 export function setRole(data) { return request({ - url: '/oms/apiadmin/sysrole/listAllByUserSid/' + data.sid, + url: '/oms/apiadmin/sysrole/listAllByUserSid/' + data.userSid + "/" + data.orgsid, method: 'post', data: data, headers: { diff --git a/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue b/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue index edfd11f..34e594e 100644 --- a/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue +++ b/src/views/purchase/purchaseOrder/purchaseOrderAdd.vue @@ -113,60 +113,58 @@ 删除 - + - - - + + + - + - + - + - + - - - + + + - + - - + + - + - + - + - - - + + + @@ -201,7 +199,7 @@
运费分摊方式
+ class="addinputw addinputInfo" @change="selectFreightShareType" :disabled="true"> @@ -234,7 +232,7 @@
其他费用分摊方式
+ class="addinputw addinputInfo" @change="selectOtherShareType" :disabled="true"> @@ -328,11 +326,11 @@ "discountAmount": "", "payableAmount": "", "freight": "", - "freightShareTypeKey": "", - "freightShareTypeValue": "", + "freightShareTypeKey": "002", + "freightShareTypeValue": "按金额分摊", "otherAmount": "", - "otherShareTypeKey": "", - "otherShareTypeValue": "", + "otherShareTypeKey": "002", + "otherShareTypeValue": "按金额分摊", "settleAccountKey": "", "settleAccountValue": "", "prepayment": "", @@ -562,7 +560,7 @@ }, // 清除分摊金额 并反算 - calculation(row, updateProp, event) { + calculation(row, updateProp) { this.formobj.purchaseBillAmount.freight = 0.00 this.formobj.purchaseBillAmount.otherAmount = 0.00 @@ -639,8 +637,23 @@ computeShareAmount() { // 分摊金额 = (采购运费+其他费用)*单价*数量/所有商品总价 - var price = Number(this.formobj.purchaseBillAmount.freight) + Number(this.formobj.purchaseBillAmount - .otherAmount) + // 001不分摊 不计算 + // 002按金额分摊 + // 003按重量分摊 暂未处理 + + var freight = this.formobj.purchaseBillAmount.freight // 采购运费 + var otherAmount = this.formobj.purchaseBillAmount.otherAmount // 其他运费 + + freight = this.formobj.purchaseBillAmount.freightShareTypeKey != '002' ? 0 : this.formobj.purchaseBillAmount + .freight + + otherAmount = this.formobj.purchaseBillAmount.otherShareTypeKey != '002' ? 0 : this.formobj.purchaseBillAmount + .otherAmount + + console.log("freight>>>", freight); + console.log("otherAmount>>>", otherAmount); + + var price = Number(freight) + Number(otherAmount) var all = 0 // 除去最后一个的分摊总和 var totalAmount = 0 // 原所有商品总价 @@ -677,6 +690,7 @@ if (Number(item.count) != 0) { if (Number(price) == 0) { + item.cost = (Number(item.cost) - Number(item.shareAmount) / Number(item.count)).toFixed(2) item.shareAmount = 0.00 } else { // 分摊金额 = (采购运费+其他费用)*单价*数量/所有商品总价 @@ -822,7 +836,7 @@ "cycle": value[i].purchaseCycle != null ? value[i].purchaseCycle : '', "deliveryDate": value[i].deliveryDate != null ? value[i].deliveryDate : '', "madeDate": value[i].manufactureDate != null ? value[i].manufactureDate : '', - "shelfLife": value[i].shelfLife != null ? value[i].shelfLife : '', + "shelfLife": value[i].shelfLife != null ? value[i].shelfLife : 0, "expireDate": value[i].overdueDate != null ? value[i].overdueDate : '', "batchNumber": value[i].batchNumber != null ? value[i].batchNumber : '', "goodsNum": value[i].itemNumber != null ? value[i].itemNumber : '', @@ -1054,6 +1068,7 @@ console.log('>>>>>>>>>selectFreightShareType', choose) this.formobj.purchaseBillAmount.freightShareTypeValue = choose[0].dictValue this.formobj.purchaseBillAmount.freightShareTypeKey = choose[0].dictKey + this.computeShareAmount() }, selectSettleAccount(val) { const choose = this.settlementList.filter((item) => item.dictKey == val) @@ -1066,6 +1081,7 @@ console.log('>>>>>>>>>selectOtherShareType', choose) this.formobj.purchaseBillAmount.otherShareTypeValue = choose[0].dictValue this.formobj.purchaseBillAmount.otherShareTypeKey = choose[0].dictKey + this.computeShareAmount() } } } diff --git a/src/views/purchase/purchaseOrder/purchaseOrderInfo.vue b/src/views/purchase/purchaseOrder/purchaseOrderInfo.vue index f84230d..30dbf18 100644 --- a/src/views/purchase/purchaseOrder/purchaseOrderInfo.vue +++ b/src/views/purchase/purchaseOrder/purchaseOrderInfo.vue @@ -77,7 +77,7 @@ - + diff --git a/src/views/purchase/purchaseOrder/relation/chooseproducts.vue b/src/views/purchase/purchaseOrder/relation/chooseproducts.vue index aaf6efb..7a721ab 100644 --- a/src/views/purchase/purchaseOrder/relation/chooseproducts.vue +++ b/src/views/purchase/purchaseOrder/relation/chooseproducts.vue @@ -13,12 +13,13 @@ {{ searchxianshitit }}