From 24112d26079c0010f0baff217d9ddcd9dfb595b4 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期日, 05 十一月 2023 17:31:05 +0800 Subject: [PATCH] 11 --- src/views/project/donationdetails/index.vue | 103 +++++++++++++++++++++++++++++++++++++-------------- 1 files changed, 74 insertions(+), 29 deletions(-) diff --git a/src/views/project/donationdetails/index.vue b/src/views/project/donationdetails/index.vue index c421180..0930948 100644 --- a/src/views/project/donationdetails/index.vue +++ b/src/views/project/donationdetails/index.vue @@ -1892,6 +1892,10 @@ <el-button @click="cancel">鍙� 娑�</el-button> </div> </div> + <!-- 瀹岀粨娴佺▼ --> + <div class="boxdiv" v-show="actives > 6"> + <h3>鍏ㄩ儴娴佺▼宸插畬缁擄紒</h3> + </div> </div> <!-- 闄勪欢寮圭獥 --> <el-dialog @@ -1908,11 +1912,11 @@ type="card" @tab-click="handleClick" > - <el-tab-pane label="娼滃湪鎹愮尞" :name="1"> </el-tab-pane> - <el-tab-pane label="鍖诲璇勪及" :name="2"> </el-tab-pane> + <el-tab-pane :label="activetele" :name="1"> </el-tab-pane> + <!-- <el-tab-pane label="鍖诲璇勪及" :name="2"> </el-tab-pane> <el-tab-pane label="鎹愮尞纭" :name="3"> </el-tab-pane> <el-tab-pane label="浼︾悊瀹℃煡" :name="4"> </el-tab-pane> - <el-tab-pane label="瀹屾垚鐧昏" :name="7"> </el-tab-pane> + <el-tab-pane label="瀹屾垚鐧昏" :name="7"> </el-tab-pane> --> </el-tabs> <div class="pdfimg"> <div class="box-pdf"> @@ -2248,6 +2252,8 @@ registerlist: [], //瀹屾垚闄勪欢 fileList: [], fileListto: [], + donatelist: [], //鎬� + activetele:'娼滃湪鎹愮尞', //涓婁紶闄勪欢璺緞 uploadFileUrl: process.env.VUE_APP_BASE_API + "/common/upload", //鏂囦欢涓婁紶token @@ -2267,6 +2273,9 @@ }; }, + created() { + this.infoid = this.$route.query.id; + }, mounted() { // this.id = this.$route.query.id; this.Getbasicinformation(); @@ -2274,7 +2283,7 @@ }, methods: { - // 鑾峰彇涓昏〃鏁版嵁 + // 鑾峰彇涓昏〃鍙婇檮灞炴暟鎹� Getbasicinformation() { // 宸︿晶娴佺▼鏁版嵁 getDonatebaseinfoflow(this.infoid).then(res => { @@ -2314,14 +2323,17 @@ this.residenceAddresss.qu = response.data.residencetownname; this.registerAddresss.qu = response.data.registertownname; }); + // 鑾峰彇浜岀骇琛� + this.GetAttacheddata(); }, // 鑾峰彇浜岀骇琛ㄦ暟鎹� GetAttacheddata() { let searchParam = { - infoid: this.form.id + infoid: this.infoid }; if (this.actives == 1) { this.annexfilesList = this.medicinelist; + this.activetele="鍖诲璇勪及"; listMedicalevaluation(searchParam).then(response => { if (response.code == 200 && response.rows[0]) { this.medicineform = response.rows[0]; @@ -2333,6 +2345,7 @@ }); } else if (this.actives == 2) { this.annexfilesList = this.affirmlist; + this.activetele="鎹愮尞纭"; listRelativesconfirmation(searchParam).then(response => { if (response.code == 200 && response.rows[0]) { this.affirmform = response.rows[0]; @@ -2361,6 +2374,7 @@ }); } else if (this.actives == 3) { this.annexfilesList = this.ethiclist; + this.activetele="浼︾悊瀹℃煡"; listDonateflowchart(searchParam).then(response => { if (response.code == 200 && response.rows.length == 1) { @@ -2391,7 +2405,7 @@ if (response.code == 200) { if (response.data) { this.witnessform = response.data; - this.witnessform.infoid = this.form.id; + this.witnessform.infoid = this.infoid; } } else { this.$modal.msgError( @@ -2401,19 +2415,23 @@ }); } else if (this.actives == 6) { this.annexfilesList = this.registerlist; + this.activetele="瀹屾垚鐧昏"; + let accpre = { id: searchParam.infoid }; listnewDonatecompletioninfo(accpre).then(response => { if (response.code == 200 && response.rows.length) { this.accomplishform = response.rows[0]; - this.accomplishform.infoid = this.form.id; + this.accomplishform.infoid = this.infoid; } else { this.$modal.msgError("瀹屾垚鐧昏澶辫触锛�" + JSON.stringify(response)); } }); } else if (this.actives == 0) { this.annexfilesList = this.registerlist; + this.activetele="娼滃湪鎹愮尞"; + } }, /** 淇濆瓨涓昏〃鎸夐挳 */ @@ -2469,10 +2487,16 @@ } if (this.form.id != null) { + if (this.form.workflow == 0) { + this.form.workflow = 1; + } updateDonatebaseinfo(this.form).then(response => { this.$modal.msgSuccess("淇濆瓨鎴愬姛"); + Modifydonationattachment(this.donatelist).then(res => { + console.log(res); + }); this.Getbasicinformation(); - this.Processvalidation(); + // this.Processvalidation(); this.open = false; }); } else { @@ -2481,8 +2505,11 @@ addDonatebaseinfo(this.form).then(response => { if (response.code == 200) { this.$modal.msgSuccess("鏂板鎴愬姛"); + Modifydonationattachment(this.donatelist).then(res => { + console.log(res); + }); this.Getbasicinformation(); - this.Processvalidation(); + // this.Processvalidation(); this.open = false; } else { this.$modal.msgError("鏂板澶辫触锛�" + response.msg); @@ -2496,7 +2523,7 @@ Savethedetails() { console.log(this.actives); if (this.actives == 1) { - this.medicineform.infoid = this.form.id; + this.medicineform.infoid = this.infoid; this.$refs["medicineform"].validate(valid => { if (valid) { if (this.medicineform.id != null) { @@ -2508,11 +2535,11 @@ this.$modal.msgSuccess("鍖诲璇勪及淇℃伅鏂板鎴愬姛"); }); } - this.submitForm(); + this.Processvalidation(); } }); } else if (this.actives == 2) { - this.affirmform.infoid = this.form.id; + this.affirmform.infoid = this.infoid; this.$refs["affirmform"].validate(valid => { if (valid) { if (this.affirmform.id != null) { @@ -2527,11 +2554,11 @@ this.$modal.msgSuccess("鎹愮尞纭淇℃伅鏂板鎴愬姛"); }); } - this.submitForm(); + this.Processvalidation(); } }); } else if (this.actives == 3) { - this.ethicform.infoid = this.form.id; + this.ethicform.infoid = this.infoid; this.$refs["ethicform"].validate(valid => { if (valid) { if (this.ethicform.id != null) { @@ -2543,11 +2570,11 @@ this.$modal.msgSuccess("浼︾悊瀹℃煡淇℃伅鏂板鎴愬姛"); }); } - this.submitForm(); + this.Processvalidation(); } }); } else if (this.actives == 4) { - this.allocationform.infoid = this.form.id; + this.allocationform.infoid = this.infoid; this.$refs["allocationform"].validate(valid => { if (valid) { let arrallo = []; @@ -2565,11 +2592,11 @@ this.$modal.msgSuccess("鍣ㄥ畼鎹愮尞淇℃伅鏂板鎴愬姛"); }); } - this.submitForm(); + this.Processvalidation(); } }); } else if (this.actives == 5) { - this.witnessform.infoid = this.form.id; + this.witnessform.infoid = this.infoid; this.$refs["witnessform"].validate(valid => { let coordinatedusernameIndex = this.coordinatorlist1.findIndex( item => this.witnessform.coordinateduserido == item.reportNo @@ -2603,11 +2630,11 @@ this.$modal.msgSuccess("鑾峰彇瑙佽瘉淇℃伅鏂板鎴愬姛"); }); } - this.submitForm(); + this.Processvalidation(); } }); } else if (this.actives == 6) { - this.accomplishform.infoid = this.form.id; + this.accomplishform.infoid = this.infoid; this.$refs["accomplishform"].validate(valid => { if (valid) { if (this.accomplishform.id) { @@ -2620,7 +2647,7 @@ this.$modal.msgSuccess("瀹屾垚鐧昏鎴愬姛"); }); } - this.submitForm(); + this.Processvalidation(); } }); } @@ -2629,9 +2656,13 @@ on_click(e) { console.log(e); // if (e != "" || e != null) { - this.actives = e; + if (this.form.workflow >= e) { + this.actives = e; + this.Processvalidation(e); + } else { + this.$modal.msgWarning("璇峰厛瀹屾垚鍓嶉儴姝ラ"); + } // } - this.Processvalidation(); }, // 鍣ㄥ畼鍒嗛厤鏍忕洰鎺у埗 changeorganState(value) { @@ -2652,7 +2683,7 @@ organname: temporganname, organno: value, id: null, - infoid: this.form.id, + infoid: this.infoid, donorno: this.form.donorno, transplanthospitalname: null, transplanthospitalno: null, @@ -2682,7 +2713,7 @@ this.$modal.msgSuccess("鍒犻櫎鎴愬姛"); }); } else { - this.allocationform.splice(deleteIndex, 1); + this.allocationform.splice(organIndex, 1); } } }) @@ -2705,8 +2736,10 @@ console.log(this.actives); if (this.form.workflow == this.actives) { this.form.workflow++; - this.GetAttacheddata(); + this.submitForm(); + // this.GetAttacheddata(); } else if (this.form.workflow > this.actives) { + // this.submitForm(); this.GetAttacheddata(); } else { this.$modal.msgWarning("璇峰厛瀹屾垚鍓嶉儴姝ラ"); @@ -2780,12 +2813,16 @@ this.registerlist = arr; } // 鍒犻櫎鏃朵慨鏀逛富鍒梔elFlag + console.log(delvalue); const index = this.donatelist.indexOf(delvalue); + console.log(index); if (index !== -1) { if (delvalue.id) { this.donatelist[index].delFlag = 1; + console.log("淇敼鑰佹暟鎹悗", this.donatelist); } else { this.donatelist.splice(index, 1); + console.log("鍒犻櫎鏂版暟鎹悗", this.donatelist); } } else { console.log("鏌ヨ涓嶅埌鍙兘鏄柊鏁版嵁鏃爄d"); @@ -2793,6 +2830,7 @@ // 鏂板鏃朵慨鏀逛富鍒� if (addvalue.annexurl) { this.donatelist.push(addvalue); + console.log("鏂板鍚�", this.donatelist); } }, //鏂囦欢涓婁紶 @@ -2809,10 +2847,15 @@ // this.form.filename = file.raw.name; this.previewpdf = true; this.$modal.msgSuccess(response.msg); - this.fileListto.push({ + let addvalue = { annexname: file.name, - annexurl: response.fileName - }); + annexurl: response.fileName, + delFlag: 0, + infoid: this.infoid, + annexfilestype: this.actives + }; + this.fileListto.push(addvalue); + this.Newconversion(this.fileListto, "", addvalue); this.pdfimgsrcList.push( this.Networkheader + "/prod-api" + response.fileName ); @@ -2882,7 +2925,9 @@ ); this.pdfimgsrcList.splice(indexlist, 1); const index = this.getIndexInArray(this.fileListto, row); + this.Newconversion(this.fileListto, this.fileListto[index], ""); this.fileListto.splice(index, 1); + console.log(index); }, // 鐐瑰嚮涓婄Щ moveupdowfile(row) { -- Gitblit v1.9.3