From 3c04cc662e034c13dad5f1c70376405deade022e Mon Sep 17 00:00:00 2001 From: yunuo970428 <405378304@qq.com> Date: Thu, 27 Mar 2025 17:36:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E8=9E=8D=E8=B5=84=E5=B9=B3?= =?UTF-8?q?=E4=BB=93=E4=BB=98=E6=AC=BE=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../financingClosingPayment.js | 14 +- .../src/api/anruifinmanagement/payment.js | 8 + .../financingClosingPayment.vue | 187 +++++++++++++----- 3 files changed, 155 insertions(+), 54 deletions(-) diff --git a/anrui-buscenter/anrui-finmanage-ui/src/api/anruifinmanagement/financingClosingPayment.js b/anrui-buscenter/anrui-finmanage-ui/src/api/anruifinmanagement/financingClosingPayment.js index fad7b4a5ce..dac6cda11d 100644 --- a/anrui-buscenter/anrui-finmanage-ui/src/api/anruifinmanagement/financingClosingPayment.js +++ b/anrui-buscenter/anrui-finmanage-ui/src/api/anruifinmanagement/financingClosingPayment.js @@ -10,15 +10,23 @@ export default { headers: { 'Content-Type': 'application/json' } }) }, - // 保存修改记录 - saveOrUpdate: function(params) { + // 保存 + saveOrUpdate: function(data) { return request({ url: '/fin/v1/finpaymentapplydetailsbeloweve/save', method: 'post', - data: params, + data: data, headers: { 'Content-Type': 'application/json' } }) }, + // 修改 + updateOpenDate: function(data) { + return request({ + url: '/fin/v1/finpayment/updateOpenDate', + method: 'post', + params: data + }) + }, // 通过sid查询一条记录 fetchBySid: function(sid) { return request({ diff --git a/anrui-buscenter/anrui-finmanage-ui/src/api/anruifinmanagement/payment.js b/anrui-buscenter/anrui-finmanage-ui/src/api/anruifinmanagement/payment.js index d26c3ec93f..acc607b28d 100644 --- a/anrui-buscenter/anrui-finmanage-ui/src/api/anruifinmanagement/payment.js +++ b/anrui-buscenter/anrui-finmanage-ui/src/api/anruifinmanagement/payment.js @@ -47,6 +47,14 @@ export default { }) }, // 根据分公司Sid获取本分公司下的付款信息 + selClosFundName: function(data) { + return request({ + url: '/fin/v1/finpayment/selClosFundName', + method: 'post', + params: data + }) + }, + // 根据分公司Sid获取本分公司下的付款信息 selectByUseOrgSid: function(data) { return request({ url: '/fin/v1/finpayment/selectByUseOrgSid', diff --git a/anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/financingClosingPayment/financingClosingPayment.vue b/anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/financingClosingPayment/financingClosingPayment.vue index ab5f4df826..4a67166cdb 100644 --- a/anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/financingClosingPayment/financingClosingPayment.vue +++ b/anrui-buscenter/anrui-finmanage-ui/src/views/anruifinmanagement/financingClosingPayment/financingClosingPayment.vue @@ -74,41 +74,35 @@ - + +
款项名称
- + + +
-
融资付款开通日期
- +
期数
+
-
期数
- +
平仓付款日期
+
-
付款单位
- - - - - +
平仓付款金额
+
-
银行账号
- - - - - - +
付款单位
+ {{ formobj.payCompany }}
收款单位
@@ -116,21 +110,21 @@
- +
开户行
{{ formobj.bank }}
-
- -
平仓付款日期
- -
- -
平仓付款金额
- +
收款银行账号
+ + + + +
+ +
备注
@@ -143,6 +137,21 @@ 取消
+ + + + + +
付款开通日期
+ +
+
+
+ +
@@ -152,7 +161,7 @@ import pageye from '@/components/pagination/pageye' import ButtonBar from '@/components/ButtonBar' import req from '@/api/anruifinmanagement/financingClosingPayment' import payment from '@/api/anruifinmanagement/payment' -import { getOrgSidByPath, getInvoicingList, fetchBySid } from '@/api/jichuxinxi/dictcommons' +import { getOrgSidByPath, fetchBySid } from '@/api/jichuxinxi/dictcommons' export default { name: 'FinancingClosingPayment', @@ -164,8 +173,15 @@ export default { data() { return { dialogVisible: false, + dialogVisibleByDate: false, + tempobj: { + openDate: '', + detailSid: '' + }, + costTitle_list: [], payCompany_list: [], receiveCompany_list: [], + receivingAccount_list: [], formobj: { sid: '', // sid remarks: '', @@ -173,7 +189,6 @@ export default { costTypeKey: '', costTypeValue: '', detailSid: '', // 付款申请明细的明细sid - openDate: '', // 融资付款开通日期 period: '', // 期数 payCompanySid: '', // 付款单位sid payCompany: '', // 付款单位名称 @@ -202,6 +217,13 @@ export default { btnKey: 'toAdd', btnLabel: '新增' }, + { + type: 'primary', + size: 'small', + icon: '', + btnKey: 'toEditByDate', + btnLabel: '编辑融资付款开通日期' + }, { type: 'danger', size: 'small', @@ -223,6 +245,7 @@ export default { tableKey: 0, list: [], sids: [], // 用于导出的时候保存已选择的SIDs + multipleSelection: [], listLoading: false, // 翻页 listQuery: { @@ -249,20 +272,12 @@ export default { }, created() { // 初始化变量 - this.init() this.getList() }, mounted() { this.$refs['btnbar'].setButtonList(this.btnList) }, methods: { - init() { - getInvoicingList({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => { - if (res.success) { - this.payCompany_list = res.data - } - }) - }, getNumber(val, limit) { val = val.replace(/[^0-9.]/g, '') // 保留数字 val = val.replace(/^00/, '0.') // 开头不能有两个0 @@ -296,6 +311,9 @@ export default { case 'toAdd': this.toAdd() break + case 'toEditByDate': + this.toEditByDate() + break case 'doDel': this.doDel() break @@ -308,6 +326,7 @@ export default { }, // 信息条数 获取点击时当前的sid handleSelectionChange(row) { + this.multipleSelection = row const aa = [] row.forEach(element => { aa.push(element.sid) @@ -378,6 +397,11 @@ export default { this.formobj.useOrgName = respsone.data.name } }) + payment.selClosFundName({ useOrgSid: resp.data }).then((res) => { + if (res.success) { + this.costTitle_list = res.data + } + }) payment.selectByUseOrgSid({ useOrgSid: resp.data }).then((res) => { if (res.success) { this.receiveCompany_list = res.data @@ -397,27 +421,56 @@ export default { req.fetchBySid(row.sid).then((res) => { if (res.success) { this.formobj = res.data + payment.selClosFundName({ useOrgSid: this.formobj.useOrgSid }).then((res) => { + if (res.success) { + this.costTitle_list = res.data + } + }) + payment.selectByUseOrgSid({ useOrgSid: this.formobj.useOrgSid }).then((res) => { + if (res.success) { + this.receiveCompany_list = res.data + this.receivingAccount_list = [] + this.receiveCompany_list.forEach((e) => { + if (e.companyName === this.formobj.receiveCompany && e.bank === this.formobj.bank) { + this.receivingAccount_list.push({ + receivingAccount: e.receivingAccount, + sid: e.detailSid + }) + } + }) + } + }) } }) }, - changePayCompany(value) { - const choose = this.payCompany_list.filter((item) => item.companyInvoicingName === value) + changeCostTitle(value) { + const choose = this.costTitle_list.filter((item) => item.closFundName === value) if (choose.length > 0 && choose !== null) { - this.formobj.payCompanySid = choose[0].companyInvoicingSid - } else { - this.formobj.payCompanySid = '' - } - }, - receiveCompanyChange(value) { - const choose = this.receiveCompany_list.filter((item) => item.receivingAccount === value) - if (choose !== null && choose.length > 0) { - this.formobj.receiveCompanySid = choose[0].sid - this.formobj.receiveCompany = choose[0].companyName + this.formobj.detailSid = choose[0].detailSid + this.formobj.payCompany = choose[0].payCompany + this.formobj.payCompanySid = choose[0].payCompanySid + this.formobj.receiveCompanySid = choose[0].receiveCompanySid + this.formobj.receiveCompany = choose[0].receiveCompany this.formobj.bank = choose[0].bank + this.formobj.receivingAccount = choose[0].receivingAccount + this.receivingAccount_list = [] + this.receiveCompany_list.forEach((e) => { + if (e.companyName === this.formobj.receiveCompany && e.bank === this.formobj.bank) { + this.receivingAccount_list.push({ + receivingAccount: e.receivingAccount, + sid: e.detailSid + }) + } + }) } else { + this.formobj.detailSid = '' + this.formobj.payCompany = '' + this.formobj.payCompanySid = '' this.formobj.receiveCompanySid = '' this.formobj.receiveCompany = '' this.formobj.bank = '' + this.formobj.receivingAccount = '' + this.receivingAccount_list = [] } }, handleConfirm() { @@ -447,7 +500,6 @@ export default { costTypeKey: '', costTypeValue: '', detailSid: '', // 付款申请明细的明细sid - openDate: '', // 融资付款开通日期 period: '', // 期数 payCompanySid: '', // 付款单位sid payCompany: '', // 付款单位名称 @@ -467,6 +519,39 @@ export default { createByName: '' } }, + toEditByDate() { + if (this.multipleSelection.length === 1) { + this.dialogVisibleByDate = true + this.$nextTick(() => { + this.$refs['temp_obj'].clearValidate() + }) + this.tempobj.openDate = this.multipleSelection[0].openDate + } else { + this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行操作' }) + } + }, + handleDateConfirm() { + this.tempobj.detailSid = this.multipleSelection[0].detailSid + this.$refs['temp_obj'].validate((valid) => { + if (valid) { + req.updateOpenDate({ sid: this.tempobj.detailSid, openDate: this.tempobj.openDate }).then((res) => { + if (res.success) { + this.$message({ showClose: true, type: 'success', message: '操作成功' }) + this.handleDateClose() + this.getList() + } + }) + } + }) + }, + handleDateClose() { + this.dialogVisibleByDate = false + this.$refs['temp_obj'].resetFields() + this.tempobj = { + openDate: '', + detailSid: '' + } + }, // 删除 doDel() { if (this.sids.length === 0) {