From 0f4299fce33df671fcf65f34c460976222b37fe7 Mon Sep 17 00:00:00 2001 From: xiaozhiyong Date: Tue, 21 Feb 2023 16:10:40 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/financialCenter/enterpriseRecharge.js | 20 +- src/components/autocomplete/index.vue | 4 + .../accountManagement/index.vue | 575 ++++++++++-------- .../enterpriseRecharge/components/add.vue | 142 ++++- .../enterpriseRecharge/components/addTurn.vue | 257 ++++++++ .../enterpriseRecharge/index.vue | 41 +- 6 files changed, 750 insertions(+), 289 deletions(-) create mode 100644 src/views/financialCenter/enterpriseRecharge/components/addTurn.vue diff --git a/src/api/financialCenter/enterpriseRecharge.js b/src/api/financialCenter/enterpriseRecharge.js index f31b7d2..6b0b0af 100644 --- a/src/api/financialCenter/enterpriseRecharge.js +++ b/src/api/financialCenter/enterpriseRecharge.js @@ -10,10 +10,14 @@ const getByPage = (params) => { const get = (query) => { return request.get(`/oil-finance/oilCompanyAccountReverse/get/${query}`); }; -//详情 +//公司详情 const getByCompanyId = (query) => { return request.get(`/oil-finance/oilCompanyAccount/getByCompanyId/${query}`); }; +//公司财务详情 +const getByCompanyIdSec = (query) => { + return request.get(`/oil-user/oilCompanyFinance/getByCompanyId/${query}`); +}; // 新增 const save = (params) => { return request.postJson("/oil-finance/oilCompanyAccountReverse/save", params); @@ -25,6 +29,17 @@ const update = (params) => { params ); }; +// 企业收款账户 +const getCascaderList = () => { + return request.get("/oil-finance/internalCompany/getCascaderList"); +}; +//公司 远程搜索 +const getLikeByNameSuccess = (params) => { + return request.postJson( + "/oil-user/oilCompanyInfo/getLikeByNameSuccess", + params + ); +}; export default { getByPage, @@ -32,4 +47,7 @@ export default { getByCompanyId, save, update, + getByCompanyIdSec, + getCascaderList, + getLikeByNameSuccess, }; diff --git a/src/components/autocomplete/index.vue b/src/components/autocomplete/index.vue index ec58e59..ef332a1 100644 --- a/src/components/autocomplete/index.vue +++ b/src/components/autocomplete/index.vue @@ -9,6 +9,7 @@ :remote-method="remoteMethod" @clear="list = []" :disabled="isDisabled" + @change="change" > diff --git a/src/views/financialCenter/accountManagement/index.vue b/src/views/financialCenter/accountManagement/index.vue index 15c9cb5..1c220ab 100644 --- a/src/views/financialCenter/accountManagement/index.vue +++ b/src/views/financialCenter/accountManagement/index.vue @@ -2,11 +2,23 @@
- + - + - + - + - +
查询 @@ -45,51 +64,75 @@ style="width: 100%" > > - + - + - - - - - - - + + + + + + + diff --git a/src/views/financialCenter/enterpriseRecharge/components/add.vue b/src/views/financialCenter/enterpriseRecharge/components/add.vue index f0940b4..9df9e48 100644 --- a/src/views/financialCenter/enterpriseRecharge/components/add.vue +++ b/src/views/financialCenter/enterpriseRecharge/components/add.vue @@ -8,9 +8,13 @@ :before-close="closeWindow" >
- + - + - - + + + + + + + @@ -106,10 +174,12 @@ export default { JSESSIONID: JSESSIONID, token: utils.bcrypt(JSESSIONID), }, + cascaderList: [], + companyFinance: {}, form: {}, refineryList: [], configAutocomplete: { - serveTarget: commonServe.getRefineryCompanyList, + serveTarget: serve.getLikeByNameSuccess, autocompleteKey: "name", labelKey: "name", valueKey: "id", @@ -135,12 +205,56 @@ export default { trigger: "change", }, ], + offlinePaymentCompany: [ + { + required: true, + message: "请输入线下汇款公司账户", + trigger: "blur", + }, + ], + offlineStartTime: [ + { + required: true, + message: "请选择线下交易发起时间", + trigger: "change", + }, + ], + offlineCompleteTime: [ + { + required: true, + message: "请选择线下交易完成时间", + trigger: "change", + }, + ], + offlineCompleteTime: [ + { + required: true, + message: "请选择企业收款账户", + trigger: "change", + }, + ], reverseRemark: [ { required: true, message: "请输入交易说明", trigger: "blur" }, ], }, }; }, + computed: { + rechargeRebateAmount() { + if ( + this.companyFinance.settlementModes === 1 || + this.companyFinance.settlementModes === 3 + ) { + return ( + (this.form.transactionAmount || 0) * + this.companyFinance.rechargeRebate + ); + } else return this.companyFinance.rechargeRebateAmount; + }, + }, + created() { + this.getCascaderList(); + }, methods: { openDrawer() { let { id } = this.controlWindows.addInfo; @@ -156,6 +270,14 @@ export default { }; Object.assign(this.configAutocomplete, configUpdata); }, + // 公司change + companyChange(id) { + if (id) { + serve.getByCompanyIdSec(id).then((res) => { + this.companyFinance = res.data; + }); + } + }, // 交易类型 change changeTransactionType(val) { if (val === "CHARGE_SALES") { @@ -177,9 +299,16 @@ export default { this.form.offlineTransactionProof = response.data.publicUrl; } }, + //企业收款账户 + getCascaderList() { + serve.getCascaderList().then((res) => { + this.cascaderList = res.data; + }); + }, submit() { this.$refs["form"].validate((valid) => { if (valid) { + let params = { transactionType: "RECHARGE", ...this.form }; this.judgeInterface(this.form).then((res) => { this.$message.success(res.msg); this.closeWindow(); @@ -210,6 +339,7 @@ export default { padding: 20px; .el-input, .el-select, + .el-cascader, .el-textarea, .el-autocomplete { width: 300px; diff --git a/src/views/financialCenter/enterpriseRecharge/components/addTurn.vue b/src/views/financialCenter/enterpriseRecharge/components/addTurn.vue new file mode 100644 index 0000000..0aa7c45 --- /dev/null +++ b/src/views/financialCenter/enterpriseRecharge/components/addTurn.vue @@ -0,0 +1,257 @@ + + + + + diff --git a/src/views/financialCenter/enterpriseRecharge/index.vue b/src/views/financialCenter/enterpriseRecharge/index.vue index 3728cf5..90c3187 100644 --- a/src/views/financialCenter/enterpriseRecharge/index.vue +++ b/src/views/financialCenter/enterpriseRecharge/index.vue @@ -83,6 +83,7 @@
企业充值 + 圈回
- + - 销账 @@ -258,6 +257,7 @@
+ { this.oilCompanyMatch = { ...firstRes.data, ...secondRes.data }; - this.controlWindows.detail = true; }); },