From 3d32e3ae88a755ea71d7570cc367a268e4f29880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Thu, 1 Jul 2021 00:53:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B4=A2=E5=8A=A1=E5=8D=95?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/financial/dialog/DebtBillList.vue | 1 - .../financial/dialog/FinancialDetail.vue | 86 +++++- .../financial/mixins/FinancialModalMixin.js | 58 +++- .../financial/modules/AdvanceInModal.vue | 16 +- .../src/views/financial/modules/GiroModal.vue | 7 + .../views/financial/modules/ItemInModal.vue | 7 + .../views/financial/modules/ItemOutModal.vue | 7 + .../views/financial/modules/MoneyInModal.vue | 61 ++--- .../views/financial/modules/MoneyOutModal.vue | 255 +++++++++++------- jshERP-web/src/views/system/CustomerList.vue | 2 - jshERP-web/src/views/system/VendorList.vue | 2 - .../views/system/modules/CustomerModal.vue | 10 - .../src/views/system/modules/VendorModal.vue | 10 - 13 files changed, 337 insertions(+), 185 deletions(-) diff --git a/jshERP-web/src/views/financial/dialog/DebtBillList.vue b/jshERP-web/src/views/financial/dialog/DebtBillList.vue index a6731f26..cfb1bf74 100644 --- a/jshERP-web/src/views/financial/dialog/DebtBillList.vue +++ b/jshERP-web/src/views/financial/dialog/DebtBillList.vue @@ -52,7 +52,6 @@ rowKey="id" :columns="columns" :dataSource="dataSource" - :pagination="ipagination" :loading="loading" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: getType}" :customRow="rowAction"> diff --git a/jshERP-web/src/views/financial/dialog/FinancialDetail.vue b/jshERP-web/src/views/financial/dialog/FinancialDetail.vue index 7e7e7e2a..f12e256f 100644 --- a/jshERP-web/src/views/financial/dialog/FinancialDetail.vue +++ b/jshERP-web/src/views/financial/dialog/FinancialDetail.vue @@ -64,14 +64,23 @@ + + + {{model.totalPrice}} + + + {{model.discountMoney}} + + + + {{model.changeAmount}} - @@ -293,13 +302,33 @@ {{model.accountName}} + + + {{model.totalPrice}} + + + {{model.discountMoney}} + + + + {{model.changeAmount}} - - + + + + + + + + @@ -346,14 +375,38 @@ + + + {{model.accountName}} + + + + + {{model.totalPrice}} + + + {{model.discountMoney}} + + + + {{model.changeAmount}} - - - + + + + + + + + @@ -373,6 +426,7 @@ visible: false, model: {}, financialType: '', + fileList: [], labelCol: { xs: { span: 24 }, sm: { span: 6 }, @@ -415,9 +469,11 @@ { title: '备注',dataIndex: 'remark', width: '20%'} ], moneyOutColumns: [ - { title: '账户名称',dataIndex: 'accountName',width: '20%'}, - { title: '金额',dataIndex: 'eachAmount', width: '10%'}, - { title: '备注',dataIndex: 'remark', width: '30%'} + { title: '采购单据编号',dataIndex: 'billNumber',width: '20%'}, + { title: '应收欠款',dataIndex: 'needDebt', width: '10%'}, + { title: '已收欠款',dataIndex: 'finishDebt', width: '10%'}, + { title: '本次收款',dataIndex: 'eachAmount', width: '10%'}, + { title: '备注',dataIndex: 'remark', width: '20%'} ], } }, @@ -426,6 +482,18 @@ methods: { show(record, type) { this.financialType = type + //附件下载 + let fileName = record.fileName + if(fileName) { + let fileArr = fileName.split(",") + this.fileList = [] + for(let i=0; i { diff --git a/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js b/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js index c561669f..afaf0272 100644 --- a/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js +++ b/jshERP-web/src/views/financial/mixins/FinancialModalMixin.js @@ -47,7 +47,7 @@ export const FinancialModalMixin = { } }) this.$nextTick(() => { - this.form.setFieldsValue({'billTime':getNowFormatDateTime()}) + this.form.setFieldsValue({'billTime':getNowFormatDateTime(), 'totalPrice': 0, 'discountMoney': 0, 'changeAmount': 0}) }) this.$nextTick(() => { getAccount({}).then((res)=>{ @@ -147,25 +147,55 @@ export const FinancialModalMixin = { switch(column.key) { case "eachAmount": target.recalcAllStatisticsColumns() - that.autoChangePrice(target) + that.autoChangeAmount(target) break; } }, - //根据仓库和条码查询库存 - getStockByDepotBarCode(row, target){ - findStockByDepotAndBarCode({ depotId: row.depotId, barCode: row.barCode }).then((res) => { - if (res && res.code === 200) { - target.setValues([{rowKey: row.id, values: {stock: res.data.stock}}]) - target.recalcAllStatisticsColumns() - } - }) - }, - //改变优惠、本次付款、欠款的值 - autoChangePrice(target) { + //改变本次欠款的值 + autoChangeAmount(target) { let allEachAmount = target.statisticsColumns.eachAmount-0 + let discountMoney = this.form.getFieldValue('discountMoney')-0 + let changeAmount = (allEachAmount-discountMoney).toFixed(2) this.$nextTick(() => { - this.form.setFieldsValue({'changeAmount':allEachAmount}) + this.form.setFieldsValue({'totalPrice':allEachAmount, 'changeAmount':changeAmount}) }); + }, + //改变优惠金额 + onKeyUpDiscountMoney(e) { + const value = e.target.value-0 + let totalPrice = this.form.getFieldValue('totalPrice')-0 + let changeAmount = (totalPrice-value).toFixed(2) + this.$nextTick(() => { + this.form.setFieldsValue({'changeAmount':changeAmount}) + }); + }, + //选择欠款单据 + debtBillListOk(selectBillRows) { + if(selectBillRows && selectBillRows.length>0) { + this.requestSubTableDataEx(selectBillRows, this.accountTable); + } + }, + /** 查询某个tab的数据,给明细里面的金额赋值 */ + requestSubTableDataEx(selectBillRows, tab, success) { + tab.loading = true + let listEx = [] + let changeAmount = 0 + for(let i=0; i { + this.form.setFieldsValue({'totalPrice':changeAmount, 'changeAmount':changeAmount}) + }); + typeof success === 'function' ? success(res) : '' + tab.loading = false } } } \ No newline at end of file diff --git a/jshERP-web/src/views/financial/modules/AdvanceInModal.vue b/jshERP-web/src/views/financial/modules/AdvanceInModal.vue index 47b98090..3c1ff87b 100644 --- a/jshERP-web/src/views/financial/modules/AdvanceInModal.vue +++ b/jshERP-web/src/views/financial/modules/AdvanceInModal.vue @@ -52,7 +52,8 @@ :maxHeight="300" :rowNumber="false" :rowSelection="true" - :actionButton="true" /> + :actionButton="true" + @valueChange="onValueChange" /> @@ -62,13 +63,19 @@ - - + + + + + + + + @@ -152,7 +159,8 @@ } else { this.model.billTime = this.model.billTimeStr this.$nextTick(() => { - this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark', 'changeAmount')) + this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark', + 'totalPrice', 'discountMoney', 'changeAmount')) }); // 加载子表数据 let params = { diff --git a/jshERP-web/src/views/financial/modules/GiroModal.vue b/jshERP-web/src/views/financial/modules/GiroModal.vue index e12867ad..9f980a3e 100644 --- a/jshERP-web/src/views/financial/modules/GiroModal.vue +++ b/jshERP-web/src/views/financial/modules/GiroModal.vue @@ -188,6 +188,13 @@ info: JSON.stringify(billMain), rows: JSON.stringify(detailArr), } + }, + //改变本次欠款的值 + autoChangeAmount(target) { + let allEachAmount = target.statisticsColumns.eachAmount-0 + this.$nextTick(() => { + this.form.setFieldsValue({'changeAmount':allEachAmount}) + }); } } } diff --git a/jshERP-web/src/views/financial/modules/ItemInModal.vue b/jshERP-web/src/views/financial/modules/ItemInModal.vue index 17741d64..1bcab58b 100644 --- a/jshERP-web/src/views/financial/modules/ItemInModal.vue +++ b/jshERP-web/src/views/financial/modules/ItemInModal.vue @@ -199,6 +199,13 @@ info: JSON.stringify(billMain), rows: JSON.stringify(detailArr), } + }, + //改变本次欠款的值 + autoChangeAmount(target) { + let allEachAmount = target.statisticsColumns.eachAmount-0 + this.$nextTick(() => { + this.form.setFieldsValue({'changeAmount':allEachAmount}) + }); } } } diff --git a/jshERP-web/src/views/financial/modules/ItemOutModal.vue b/jshERP-web/src/views/financial/modules/ItemOutModal.vue index e1c2cca5..41c5ec28 100644 --- a/jshERP-web/src/views/financial/modules/ItemOutModal.vue +++ b/jshERP-web/src/views/financial/modules/ItemOutModal.vue @@ -200,6 +200,13 @@ info: JSON.stringify(billMain), rows: JSON.stringify(detailArr), } + }, + //改变本次欠款的值 + autoChangeAmount(target) { + let allEachAmount = target.statisticsColumns.eachAmount-0 + this.$nextTick(() => { + this.form.setFieldsValue({'changeAmount':allEachAmount}) + }); } } } diff --git a/jshERP-web/src/views/financial/modules/MoneyInModal.vue b/jshERP-web/src/views/financial/modules/MoneyInModal.vue index 70bb038d..6bcf3d0a 100644 --- a/jshERP-web/src/views/financial/modules/MoneyInModal.vue +++ b/jshERP-web/src/views/financial/modules/MoneyInModal.vue @@ -65,7 +65,8 @@ :maxHeight="300" :rowNumber="false" :rowSelection="false" - :actionButton="false" /> + :actionButton="false" + @valueChange="onValueChange" /> @@ -86,18 +87,24 @@ - - + + + + + + + + - + @@ -115,16 +122,13 @@ import { JEditableTableMixin } from '@/mixins/JEditableTableMixin' import { FinancialModalMixin } from '../mixins/FinancialModalMixin' import JUpload from '@/components/jeecg/JUpload' - import JEllipsis from '@/components/jeecg/JEllipsis' import JDate from '@/components/jeecg/JDate' - import Vue from 'vue' export default { name: "MoneyInModal", mixins: [JEditableTableMixin, FinancialModalMixin], components: { DebtBillList, JUpload, - JEllipsis, JDate }, data () { @@ -154,28 +158,25 @@ { title: '销售单据编号',key: 'billNumber',width: '20%', type: FormTypes.input, readonly: true }, { title: '应收欠款',key: 'needDebt', width: '10%', type: FormTypes.inputNumber, statistics: true, readonly: true }, { title: '已收欠款', key: 'finishDebt', width: '10%', type: FormTypes.inputNumber, statistics: true, readonly: true }, - { title: '本次收款',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请选择${title}', + { title: '本次收款',key: 'eachAmount', width: '10%', type: FormTypes.inputNumber, statistics: true, placeholder: '请输入${title}', validateRules: [{ required: true, message: '${title}不能为空' }] }, - { title: '备注',key: 'remark', width: '20%', type: FormTypes.input, placeholder: '请选择${title}'} + { title: '备注',key: 'remark', width: '20%', type: FormTypes.input, placeholder: '请输入${title}'} ] }, confirmLoading: false, validatorRules:{ organId:{ - rules: [ - { required: true, message: '请选择客户!' } - ] + rules: [{ required: true, message: '请选择客户!' }] }, handsPersonId:{ - rules: [ - { required: true, message: '请选择经手人!' } - ] + rules: [{ required: true, message: '请选择经手人!' }] }, accountId:{ - rules: [ - { required: true, message: '请选择收款账户!' } - ] + rules: [{ required: true, message: '请选择收款账户!' }] + }, + discountMoney:{ + rules: [{ required: true, message: '请输入优惠金额!' }] } }, url: { @@ -198,7 +199,7 @@ this.model.billTime = this.model.billTimeStr this.$nextTick(() => { this.form.setFieldsValue(pick(this.model,'organId', 'handsPersonId', 'billTime', 'billNo', 'remark', - 'accountId','changeAmount')) + 'accountId', 'totalPrice', 'discountMoney', 'changeAmount')) }); this.fileList = this.model.fileName // 加载子表数据 @@ -241,28 +242,6 @@ }, handleClear() { this.accountTable.dataSource = [] - }, - debtBillListOk(selectBillRows) { - if(selectBillRows && selectBillRows.length>0) { - this.requestSubTableDataEx(selectBillRows, this.accountTable); - } - }, - /** 查询某个tab的数据,给明细里面的价税合计赋值 */ - requestSubTableDataEx(selectBillRows, tab, success) { - tab.loading = true - let listEx = [] - for(let i=0; i - - - - - - - - - {{ item.supplier }} - - - - - - - - - {{ item.name }} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + {{ item.supplier }} + + + + + + + + + {{ item.name }} + + + + + + + + + + + + + + + + + + +
+ 新增 + + 清空 +
+
+
+ + + + + + + + + + + + + + + + + + {{ item.name }} + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+
+ +
\ No newline at end of file diff --git a/jshERP-web/src/views/system/CustomerList.vue b/jshERP-web/src/views/system/CustomerList.vue index b46e6387..42847937 100644 --- a/jshERP-web/src/views/system/CustomerList.vue +++ b/jshERP-web/src/views/system/CustomerList.vue @@ -125,9 +125,7 @@ { title: '手机号码', dataIndex: 'telephone',width:100,align:"center"}, { title: '联系电话', dataIndex: 'phoneNum',width:100,align:"center"}, { title: '期初应收',dataIndex: 'beginNeedGet',width:80,align:"center"}, - { title: '期初应付',dataIndex: 'beginNeedPay',width:80,align:"center"}, { title: '期末应收',dataIndex: 'allNeedGet',width:80,align:"center"}, - { title: '期末应付',dataIndex: 'allNeedPay',width:80,align:"center"}, { title: '税率(%)', dataIndex: 'taxRate',width:80,align:"center"}, { title: '状态',dataIndex: 'enabled',width:70,align:"center", scopedSlots: { customRender: 'customRenderFlag' } diff --git a/jshERP-web/src/views/system/VendorList.vue b/jshERP-web/src/views/system/VendorList.vue index 44834e1e..616c5109 100644 --- a/jshERP-web/src/views/system/VendorList.vue +++ b/jshERP-web/src/views/system/VendorList.vue @@ -124,9 +124,7 @@ { title: '联系人', dataIndex: 'contacts',width:70,align:"center"}, { title: '手机号码', dataIndex: 'telephone',width:110,align:"center"}, { title: '联系电话', dataIndex: 'phoneNum',width:100,align:"center"}, - { title: '期初应收',dataIndex: 'beginNeedGet',width:80,align:"center"}, { title: '期初应付',dataIndex: 'beginNeedPay',width:80,align:"center"}, - { title: '期末应收',dataIndex: 'allNeedGet',width:80,align:"center"}, { title: '期末应付',dataIndex: 'allNeedPay',width:80,align:"center"}, { title: '税率(%)', dataIndex: 'taxRate',width:80,align:"center"}, { title: '状态',dataIndex: 'enabled',width:70,align:"center", diff --git a/jshERP-web/src/views/system/modules/CustomerModal.vue b/jshERP-web/src/views/system/modules/CustomerModal.vue index e83a5a73..478fe5e1 100644 --- a/jshERP-web/src/views/system/modules/CustomerModal.vue +++ b/jshERP-web/src/views/system/modules/CustomerModal.vue @@ -51,21 +51,11 @@ - - - - - - - - - - diff --git a/jshERP-web/src/views/system/modules/VendorModal.vue b/jshERP-web/src/views/system/modules/VendorModal.vue index 57a16e58..18c6328c 100644 --- a/jshERP-web/src/views/system/modules/VendorModal.vue +++ b/jshERP-web/src/views/system/modules/VendorModal.vue @@ -46,21 +46,11 @@ - - - - - - - - - -