diff --git a/jshERP-web/src/views/bill/PurchaseInList.vue b/jshERP-web/src/views/bill/PurchaseInList.vue index 5c680dd9..14b92713 100644 --- a/jshERP-web/src/views/bill/PurchaseInList.vue +++ b/jshERP-web/src/views/bill/PurchaseInList.vue @@ -232,7 +232,7 @@ { title: '付款', dataIndex: 'changeAmount',width:60}, { title: '欠款', dataIndex: 'debt',width:60, customRender:function (text,record,index) { - let debt = record.discountLastMoney + record.otherMoney - record.changeAmount + let debt = record.discountLastMoney + record.otherMoney - (record.deposit + record.changeAmount) return debt? debt.toFixed(2):'' } }, diff --git a/jshERP-web/src/views/bill/PurchaseOrderList.vue b/jshERP-web/src/views/bill/PurchaseOrderList.vue index a31c85a4..092f6435 100644 --- a/jshERP-web/src/views/bill/PurchaseOrderList.vue +++ b/jshERP-web/src/views/bill/PurchaseOrderList.vue @@ -205,6 +205,7 @@ } } }, + { title: '支付订金', dataIndex: 'changeAmount',width:60}, { title: '状态', dataIndex: 'status', width: 80, align: "center", scopedSlots: { customRender: 'customRenderStatus' } }, diff --git a/jshERP-web/src/views/bill/SaleOrderList.vue b/jshERP-web/src/views/bill/SaleOrderList.vue index ae7a2045..22d502af 100644 --- a/jshERP-web/src/views/bill/SaleOrderList.vue +++ b/jshERP-web/src/views/bill/SaleOrderList.vue @@ -211,6 +211,7 @@ } } }, + { title: '收取订金', dataIndex: 'changeAmount',width:60}, { title: '状态', dataIndex: 'status', width: 70, align: "center", scopedSlots: { customRender: 'customRenderStatus' } }, diff --git a/jshERP-web/src/views/bill/SaleOutList.vue b/jshERP-web/src/views/bill/SaleOutList.vue index 257fde9b..e60f525a 100644 --- a/jshERP-web/src/views/bill/SaleOutList.vue +++ b/jshERP-web/src/views/bill/SaleOutList.vue @@ -232,7 +232,7 @@ { title: '收款', dataIndex: 'changeAmount',width:60}, { title: '欠款', dataIndex: 'debt',width:60, customRender:function (text,record,index) { - let debt = record.discountLastMoney + record.otherMoney - record.changeAmount + let debt = record.discountLastMoney + record.otherMoney - (record.deposit + record.changeAmount) return debt? debt.toFixed(2):'' } }, diff --git a/jshERP-web/src/views/bill/dialog/BillDetail.vue b/jshERP-web/src/views/bill/dialog/BillDetail.vue index bc60deb7..fc4f5ec4 100644 --- a/jshERP-web/src/views/bill/dialog/BillDetail.vue +++ b/jshERP-web/src/views/bill/dialog/BillDetail.vue @@ -237,8 +237,21 @@ {{model.discountLastMoney}} + + + + + {{model.accountName}} + + + + {{model.changeAmount}} + + + + @@ -314,6 +327,11 @@ {{model.accountName}} + + + {{model.deposit}} + + {{model.changeAmount}} @@ -324,8 +342,6 @@ {{model.debt}} - - @@ -476,8 +492,21 @@ {{model.discountLastMoney}} + + + + + {{model.accountName}} + + + + {{model.changeAmount}} + + + + @@ -553,6 +582,11 @@ {{model.accountName}} + + + {{model.deposit}} + + {{model.changeAmount}} @@ -563,6 +597,9 @@ {{model.debt}} + + + {{model.salesManStr}} @@ -1358,7 +1395,7 @@ } else { this.model.getAmount = this.model.changeAmount } - this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2) + this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.deposit - this.model.changeAmount).toFixed(2) this.$nextTick(() => { this.form.setFieldsValue(pick(this.model,'id')) }); diff --git a/jshERP-web/src/views/bill/dialog/LinkBillList.vue b/jshERP-web/src/views/bill/dialog/LinkBillList.vue index 24cc269b..f0d6cc2d 100644 --- a/jshERP-web/src/views/bill/dialog/LinkBillList.vue +++ b/jshERP-web/src/views/bill/dialog/LinkBillList.vue @@ -111,6 +111,7 @@ linkNumber: '', organId: '', discount: '', + deposit: '', remark: '', queryParam: { number: "", @@ -231,12 +232,13 @@ this.linkNumber = record.number this.organId = record.organId this.discount = record.discount + this.deposit = record.changeAmount - record.finishDeposit this.remark = record.remark this.loadDetailData(1) } } else { this.getSelectBillDetailRows(); - this.$emit('ok', this.selectBillDetailRows, this.linkNumber, this.organId, this.discount, this.remark) + this.$emit('ok', this.selectBillDetailRows, this.linkNumber, this.organId, this.discount, this.deposit, this.remark) this.close(); } }, diff --git a/jshERP-web/src/views/bill/mixins/BillListMixin.js b/jshERP-web/src/views/bill/mixins/BillListMixin.js index 9a9db0e5..c063f9a3 100644 --- a/jshERP-web/src/views/bill/mixins/BillListMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillListMixin.js @@ -46,6 +46,7 @@ export const BillListMixin = { //复制单据的时候需要移除关联单据的相关信息 record.linkNumber = '' record.billType = '' + record.deposit = '' this.$refs.modalForm.edit(record); this.$refs.modalForm.title = "复制新增"; this.$refs.modalForm.disableSubmit = false; diff --git a/jshERP-web/src/views/bill/mixins/BillModalMixin.js b/jshERP-web/src/views/bill/mixins/BillModalMixin.js index 6328be5c..68d9e646 100644 --- a/jshERP-web/src/views/bill/mixins/BillModalMixin.js +++ b/jshERP-web/src/views/bill/mixins/BillModalMixin.js @@ -212,9 +212,10 @@ export const BillModalMixin = { this.accountIdList = idList this.accountMoneyList = moneyList let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0 - let otherMoney = this.form.getFieldValue('otherMoney')-0 + let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0 let debt = (discountLastMoney + otherMoney - allPrice).toFixed(2) this.$nextTick(() => { + allPrice = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:allPrice this.form.setFieldsValue({'changeAmount':allPrice, 'debt':debt}) }); }, @@ -553,11 +554,16 @@ export const BillModalMixin = { autoChangePrice(target) { let allTaxLastMoney = target.statisticsColumns.taxLastMoney-0 let discount = this.form.getFieldValue('discount')-0 - let otherMoney = this.form.getFieldValue('otherMoney')-0 + let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0 + let deposit = this.form.getFieldValue('deposit') let discountMoney = (discount*0.01*allTaxLastMoney).toFixed(2)-0 let discountLastMoney = (allTaxLastMoney-discountMoney).toFixed(2)-0 let changeAmountNew = (discountLastMoney + otherMoney).toFixed(2)-0 + if(deposit) { + changeAmountNew = (changeAmountNew - deposit).toFixed(2)-0 + } this.$nextTick(() => { + changeAmountNew = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:changeAmountNew this.form.setFieldsValue({'discount':discount,'discountMoney':discountMoney,'discountLastMoney':discountLastMoney, 'changeAmount':changeAmountNew,'debt':0}) }); @@ -565,12 +571,17 @@ export const BillModalMixin = { //改变优惠率 onKeyUpDiscount(e) { const value = e.target.value-0 - let otherMoney = this.form.getFieldValue('otherMoney')-0 + let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0 + let deposit = this.form.getFieldValue('deposit') let allTaxLastMoney = this.$refs.materialDataTable.statisticsColumns.taxLastMoney-0 let discountMoneyNew = (allTaxLastMoney*value*0.01).toFixed(2)-0 let discountLastMoneyNew = (allTaxLastMoney - discountMoneyNew).toFixed(2)-0 let changeAmountNew = (discountLastMoneyNew + otherMoney).toFixed(2)-0 + if(deposit) { + changeAmountNew = (changeAmountNew - deposit).toFixed(2)-0 + } this.$nextTick(() => { + changeAmountNew = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:changeAmountNew this.form.setFieldsValue({'discountMoney':discountMoneyNew,'discountLastMoney':discountLastMoneyNew, 'changeAmount':changeAmountNew,'debt':0}) }); @@ -578,12 +589,17 @@ export const BillModalMixin = { //改变付款优惠 onKeyUpDiscountMoney(e) { const value = e.target.value-0 - let otherMoney = this.form.getFieldValue('otherMoney')-0 + let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0 + let deposit = this.form.getFieldValue('deposit') let allTaxLastMoney = this.$refs.materialDataTable.statisticsColumns.taxLastMoney-0 let discountNew = (value/allTaxLastMoney*100).toFixed(2)-0 let discountLastMoneyNew = (allTaxLastMoney - value).toFixed(2)-0 let changeAmountNew = (discountLastMoneyNew + otherMoney).toFixed(2)-0 + if(deposit) { + changeAmountNew = (changeAmountNew - deposit).toFixed(2)-0 + } this.$nextTick(() => { + changeAmountNew = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:changeAmountNew this.form.setFieldsValue({'discount':discountNew,'discountLastMoney':discountLastMoneyNew, 'changeAmount':changeAmountNew,'debt':0}) }); @@ -592,7 +608,24 @@ export const BillModalMixin = { onKeyUpOtherMoney(e) { const value = e.target.value-0 let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0 + let deposit = this.form.getFieldValue('deposit') let changeAmountNew = (discountLastMoney + value).toFixed(2)-0 + if(deposit) { + changeAmountNew = (changeAmountNew - deposit).toFixed(2)-0 + } + this.$nextTick(() => { + this.form.setFieldsValue({'changeAmount':changeAmountNew, 'debt':0}) + }); + }, + //改变扣除订金 + onKeyUpDeposit(e){ + const value = e.target.value-0 + let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0 + let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0 + let changeAmountNew = (discountLastMoney + otherMoney).toFixed(2)-0 + if(value) { + changeAmountNew = (changeAmountNew - value).toFixed(2)-0 + } this.$nextTick(() => { this.form.setFieldsValue({'changeAmount':changeAmountNew, 'debt':0}) }); @@ -601,8 +634,12 @@ export const BillModalMixin = { onKeyUpChangeAmount(e) { const value = e.target.value-0 let discountLastMoney = this.form.getFieldValue('discountLastMoney')-0 - let otherMoney = this.form.getFieldValue('otherMoney')-0 + let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0 + let deposit = this.form.getFieldValue('deposit') let debtNew = (discountLastMoney + otherMoney - value).toFixed(2)-0 + if(deposit) { + debtNew = (debtNew - deposit).toFixed(2)-0 + } this.$nextTick(() => { this.form.setFieldsValue({'debt':debtNew}) }); @@ -692,16 +729,21 @@ export const BillModalMixin = { allTaxLastMoney = allTaxLastMoney + (newDetail.taxLastMoney-0) } let discount = this.form.getFieldValue('discount')-0 - let otherMoney = this.form.getFieldValue('otherMoney')-0 + let otherMoney = this.form.getFieldValue('otherMoney')?this.form.getFieldValue('otherMoney')-0:0 + let deposit = this.form.getFieldValue('deposit') let discountMoney = (discount*0.01*allTaxLastMoney).toFixed(2)-0 let discountLastMoney = (allTaxLastMoney-discountMoney).toFixed(2)-0 let changeAmountNew = (discountLastMoney + otherMoney).toFixed(2)-0 + if(deposit) { + changeAmountNew = (changeAmountNew - deposit).toFixed(2)-0 + } if(this.prefixNo === 'LSCK' || this.prefixNo === 'LSTH') { this.$nextTick(() => { this.form.setFieldsValue({'changeAmount':allLastMoney,'getAmount':allLastMoney,'backAmount':0}) }); } else { this.$nextTick(() => { + changeAmountNew = this.prefixNo === 'CGDD' || this.prefixNo === 'XSDD'?0:changeAmountNew this.form.setFieldsValue({'discount':discount,'discountMoney':discountMoney,'discountLastMoney':discountLastMoney, 'changeAmount':changeAmountNew,'debt':0}) }); diff --git a/jshERP-web/src/views/bill/modules/PurchaseBackModal.vue b/jshERP-web/src/views/bill/modules/PurchaseBackModal.vue index 5dac25a7..a5c4bb80 100644 --- a/jshERP-web/src/views/bill/modules/PurchaseBackModal.vue +++ b/jshERP-web/src/views/bill/modules/PurchaseBackModal.vue @@ -369,7 +369,7 @@ this.$refs.linkBillList.show('入库', '采购', '供应商', "1") this.$refs.linkBillList.title = "选择采购入库" }, - linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, remark) { + linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) { this.rowCanEdit = false this.materialTable.columns[1].type = FormTypes.normal if(selectBillDetailRows && selectBillDetailRows.length>0) { diff --git a/jshERP-web/src/views/bill/modules/PurchaseInModal.vue b/jshERP-web/src/views/bill/modules/PurchaseInModal.vue index c3c63897..01a6205f 100644 --- a/jshERP-web/src/views/bill/modules/PurchaseInModal.vue +++ b/jshERP-web/src/views/bill/modules/PurchaseInModal.vue @@ -155,6 +155,11 @@ + + + + + @@ -166,8 +171,6 @@ - - @@ -234,6 +237,7 @@ visible: false, operTimeStr: '', prefixNo: 'CGRK', + depositStatus: false, fileList:[], rowCanEdit: true, model: {}, @@ -324,6 +328,7 @@ this.changeFormTypes(this.materialTable.columns, 'preNumber', 0) this.changeFormTypes(this.materialTable.columns, 'finishNumber', 0) if (this.action === 'add') { + this.depositStatus = false this.addInit(this.prefixNo) this.fileList = [] this.$nextTick(() => { @@ -335,7 +340,13 @@ this.materialTable.columns[1].type = FormTypes.normal } this.model.operTime = this.model.operTimeStr - this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.changeAmount).toFixed(2) + if(this.model.deposit) { + this.depositStatus = true + } else { + this.depositStatus = false + this.model.deposit = 0 + } + this.model.debt = (this.model.discountLastMoney + this.model.otherMoney - this.model.deposit - this.model.changeAmount).toFixed(2) if(this.model.accountId == null) { this.model.accountId = 0 this.manyAccountBtnStatus = true @@ -347,7 +358,7 @@ this.fileList = this.model.fileName this.$nextTick(() => { this.form.setFieldsValue(pick(this.model,'organId', 'operTime', 'number', 'linkNumber', 'remark', - 'discount','discountMoney','discountLastMoney','otherMoney','accountId','changeAmount','debt')) + 'discount','discountMoney','discountLastMoney','otherMoney','accountId','deposit','changeAmount','debt')) }); // 加载子表数据 let params = { @@ -409,7 +420,7 @@ this.$refs.linkBillList.show('其它', '采购订单', '供应商', "1,3") this.$refs.linkBillList.title = "选择采购订单" }, - linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, remark) { + linkBillListOk(selectBillDetailRows, linkNumber, organId, discount, deposit, remark) { this.rowCanEdit = false this.materialTable.columns[1].type = FormTypes.normal this.changeFormTypes(this.materialTable.columns, 'preNumber', 1) @@ -436,6 +447,11 @@ if(allTaxLastMoney) { let discountMoney = (discount*allTaxLastMoney/100).toFixed(2)-0 let discountLastMoney = (allTaxLastMoney - discountMoney).toFixed(2)-0 + let changeAmount = discountLastMoney + if(deposit) { + this.depositStatus = true + changeAmount = (discountLastMoney - deposit).toFixed(2)-0 + } this.$nextTick(() => { this.form.setFieldsValue({ 'organId': organId, @@ -443,7 +459,8 @@ 'discount': discount, 'discountMoney': discountMoney, 'discountLastMoney': discountLastMoney, - 'changeAmount': discountLastMoney, + 'deposit': deposit, + 'changeAmount': changeAmount, 'remark': remark }) }) diff --git a/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue b/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue index 6d9bea28..35878180 100644 --- a/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue +++ b/jshERP-web/src/views/bill/modules/PurchaseOrderModal.vue @@ -54,7 +54,7 @@ - + @@ -115,27 +115,61 @@ + + + + + + +
+ + +
新增结算账户
+
+ + {{ item.name }} + +
+ + + +
+
+ + + + + + +
- + + +