From 9a4ae6e750b7a4b1cf0768ed075722f2e8dc6026 Mon Sep 17 00:00:00 2001 From: yujk <990961482@qq.com> Date: Tue, 12 Oct 2021 16:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=93=B6=E5=86=9C=E6=94=AF=E4=BB=98=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E6=A8=A1=E5=9D=97=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bankAgriculture/paymentApproval.js | 25 ++ src/router/index.js | 9 + .../paymentApproval/approvalAdd10.vue | 204 +++++++-- .../paymentApproval/approvalAdd11.vue | 342 +++++++++------ .../paymentApproval/approvalAdd12.vue | 27 +- .../paymentApproval/approvalAdd2.vue | 4 +- .../paymentApproval/approvalAdd4.vue | 44 +- .../paymentApproval/approvalAdd5.vue | 262 +++++++++--- .../paymentApproval/approvalDetail.vue | 2 +- .../paymentApproval/approvalDetail10.vue | 32 +- .../paymentApproval/approvalDetail11.vue | 29 +- .../paymentApproval/approvalDetail12.vue | 43 +- .../paymentApproval/approvalDetail5.vue | 23 +- .../paymentApproval/approvalList4.vue | 2 +- .../paymentApproval/approvalList5.vue | 2 +- .../paymentApproval/approvalModify10.vue | 194 ++++++--- .../paymentApproval/approvalModify11.vue | 332 +++++++++------ .../paymentApproval/approvalModify12.vue | 397 +++++++++++------- .../paymentApproval/approvalModify5.vue | 329 ++++++++++----- .../paymentApproval/approvalProcess2.vue | 244 +++++++++++ 20 files changed, 1732 insertions(+), 814 deletions(-) create mode 100644 src/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess2.vue diff --git a/src/api/onlineHome/bankAgriculture/paymentApproval.js b/src/api/onlineHome/bankAgriculture/paymentApproval.js index 9a788742..b7ed1f2b 100644 --- a/src/api/onlineHome/bankAgriculture/paymentApproval.js +++ b/src/api/onlineHome/bankAgriculture/paymentApproval.js @@ -249,3 +249,28 @@ export const attachmentList = (data) => { params: data }) } +//删除已上传附件 +export function systemAttachment(ids) { + if (ids != undefined) { + return request({ + url: '/system/attachment/remove/' + ids, + method: 'get' + }) + } +} +// 查询转账账户详情详细 +export function getTransferProcess1(id) { + return request({ + url: '/yinnong/cash/getProcessSchedule/' + id, + method: 'get' + }) +} + +// 查询出纳账户设置列表 +export function listAccount(query) { + return request({ + url: '/cashier/account/list', + method: 'get', + params: query + }) +} diff --git a/src/router/index.js b/src/router/index.js index 1d5018de..38f2e4a6 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -1329,6 +1329,15 @@ export const constantRoutes = [ }, component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess'], resolve) }, + { + path: '/onlineHome/approvalProcess2', + name: 'approvalProcess2', + meta: { + title: '付款申请流程', + hidden: true, + }, + component: (resolve) => require(['@/views/onlineHome/bankAgriculture/paymentApproval/approvalProcess2'], resolve) + }, { path: '/onlineHome/collectionList', name: 'collectionList', diff --git a/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd10.vue b/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd10.vue index ae3d0bd9..2ecdd123 100644 --- a/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd10.vue +++ b/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd10.vue @@ -161,16 +161,6 @@

收款方信息

-
- - - -
@@ -182,7 +172,7 @@

上传附件

- +
@@ -210,6 +200,7 @@ commonAttach, updateCash } from "../../../../api/onlineHome/bankAgriculture/paymentApproval"; + import Dialog from "vant/lib/dialog"; export default { name: "approvalAdd10", data() { @@ -265,7 +256,8 @@ outId:null, ynType:'2' }, - projectFundType:'' + projectFundType:'', + uploadFiles:[], }; }, created() { @@ -300,7 +292,7 @@ }) }); this.getDictionaries(); - this.getFileList(); + this.addChargeItme(); }, methods: { // 表单重置 @@ -488,7 +480,7 @@ }); this.$set(this.form, "expenditureAmount", total); }, - goAdd(){ + /*goAdd(){ if(this.chargeItme.length<1){ this.$notify({ type: 'danger', message: '请添加收款方信息' }); return; @@ -532,6 +524,99 @@ }) } }); + },*/ + goAdd(){ + if(this.chargeItme.length<1){ + this.$notify({ type: 'danger', message: '请添加收款方信息' }); + return; + } + if(this.form.remark != null && this.form.remark.indexOf("|")!=-1){ + this.$notify({ type: 'danger', message: '付款事由禁止包含!' }); + return; + } + if(this.form.capitalExpenditureType==2){ + if(this.projectForm.projectName==""||this.projectForm.projectName==null){ + this.$notify({ type: 'danger', message: '请选择项目名称!' }); + return; + } + if(this.projectForm.projectBillNum==""||this.projectForm.projectBillNum==null){ + this.$notify({ type: 'danger', message: '请输入工程发票号!' }); + return; + } + } + if(this.uploadFiles==null||this.uploadFiles.length==0){ + Dialog.confirm({ + title: '提示', + message: '此申请单中未上传任何附件,是否确认提交?', + }) + .then(() => { + addCash(this.form).then((response) => { + this.chargeItme.map(res => { + res.cashId = response.data.id + addCashdetail(res).then(r => { + if(this.form.capitalExpenditureType==2){ + this.projectForm.outId = response.data.id + this.$set(this.projectForm, "ynType", '2'); + addProjectto(this.projectForm).then(res => { + customSubmit(response.data.id).then(res => { + this.$toast.success('提交成功'); + setTimeout(function(){ + history.go(-1) + },2000) + }) + }) + }else{ + customSubmit(response.data.id).then(res => { + this.$toast.success('提交成功'); + setTimeout(function(){ + history.go(-1) + },2000) + }) + } + }) + }) + }); + }) + + }else{ + addCash(this.form).then((response) => { + console.log(this.uploadFiles) + this.uploadFiles.map(rr => { + const params = new FormData(); + params.append("tableId", response.data.id); + params.append("tableName", "t_yinnong_cash"); + params.append("bizPath", "upload"); + params.append("fileType", "0"); + params.append("file", rr); + commonAttach(params).then((r) => { + }) + }) + this.chargeItme.map(res => { + res.cashId = response.data.id + addCashdetail(res).then(r => { + if(this.form.capitalExpenditureType==2){ + this.projectForm.outId = response.data.id + this.$set(this.projectForm, "ynType", '2'); + addProjectto(this.projectForm).then(res => { + customSubmit(response.data.id).then(res => { + this.$toast.success('提交成功'); + setTimeout(function(){ + history.go(-1) + },2000) + }) + }) + }else{ + customSubmit(response.data.id).then(res => { + this.$toast.success('提交成功'); + setTimeout(function(){ + history.go(-1) + },2000) + }) + } + }) + }) + }); + } }, goUpdate(){ if(this.chargeItme.length<1){ @@ -552,29 +637,64 @@ return; } } - this.projectForm.outId = this.form.id - addCash(this.form).then((response) => { - this.chargeItme.map(res => { - res.cashId = response.data.id - addCashdetail(res).then(r => { - if(this.form.capitalExpenditureType==2){ - this.projectForm.outId = response.data.id - this.$set(this.projectForm, "ynType", '2'); - addProjectto(this.projectForm).then(res => { + if(this.uploadFiles==null||this.uploadFiles.length==0){ + addCash(this.form).then((response) => { + this.chargeItme.map(res => { + res.cashId = response.data.id + addCashdetail(res).then(r => { + if(this.form.capitalExpenditureType==2){ + this.projectForm.outId = response.data.id + this.$set(this.projectForm, "ynType", '2'); + addProjectto(this.projectForm).then(res => { + this.$toast.success('保存成功'); + setTimeout(function(){ + history.go(-1) + },2000) + }) + }else{ this.$toast.success('保存成功'); setTimeout(function(){ history.go(-1) },2000) - }) - }else{ - this.$toast.success('保存成功'); - setTimeout(function(){ - history.go(-1) - },2000) - } + } + }) }) - }) - }); + }); + }else{ + addCash(this.form).then((response) => { + console.log(this.uploadFiles) + this.uploadFiles.map(rr => { + const params = new FormData(); + params.append("tableId", response.data.id); + params.append("tableName", "t_yinnong_cash"); + params.append("bizPath", "upload"); + params.append("fileType", "0"); + params.append("file", rr); + commonAttach(params).then((r) => { + }) + }) + this.chargeItme.map(res => { + res.cashId = response.data.id + addCashdetail(res).then(r => { + if(this.form.capitalExpenditureType==2){ + this.projectForm.outId = response.data.id + this.$set(this.projectForm, "ynType", '2'); + addProjectto(this.projectForm).then(res => { + this.$toast.success('保存成功'); + setTimeout(function(){ + history.go(-1) + },2000) + }) + }else{ + this.$toast.success('保存成功'); + setTimeout(function(){ + history.go(-1) + },2000) + } + }) + }) + }); + } }, payeeSelectChange(select, i) { let obj = {}; @@ -675,22 +795,19 @@ } }, beforeRead(file) { - console.log(file) - console.log(this.fileList) - const params = new FormData(); - params.append("tableId", this.$route.query.id); - params.append("tableName", "t_yinnong_cash"); - params.append("bizPath", "upload"); - params.append("fileType", "0"); - params.append("file", file.file); - commonAttach(params).then((response) => { - console.log(response) + this.uploadFiles.push(file.file); + }, + deleteFile(file){ + this.uploadFiles.map((response,index) => { + if(file.file == response){ + this.uploadFiles.splice(index,1) + } }) }, getFileList(){ let oData= { tableId: this.$route.query.id, - tableName: "t_yinnong_transfer", + tableName: "t_yinnong_cash", bizPath: "upload", fileType: "0", } @@ -698,7 +815,6 @@ console.log(res) console.log(location.protocol+"//"+location.host+request.defaults.baseURL) res.rows.map(r => { - let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{})}) console.log(r) diff --git a/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd11.vue b/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd11.vue index c01e692d..91d076c5 100644 --- a/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd11.vue +++ b/src/views/onlineHome/bankAgriculture/paymentApproval/approvalAdd11.vue @@ -7,7 +7,7 @@ @click-left="$router.back(-1)" > @@ -59,7 +59,7 @@ - +

收款方信息

-
- - - -
- - - - + + + +

上传附件

- +
+ + 保存并提交 @@ -200,9 +192,15 @@ + +