From 27b82a03b34a55fcc31b188e148564dde3af2dc6 Mon Sep 17 00:00:00 2001 From: WXL <1785969728@qq.com> Date: 星期一, 30 十月 2023 10:35:14 +0800 Subject: [PATCH] 11 --- src/views/project/donationdetails/index.vue | 286 +++++++++++++++++++++++++++++++++++++++++++------------- src/api/project/donatebaseinfo.js | 7 + src/api/project/organallocation.js | 2 3 files changed, 227 insertions(+), 68 deletions(-) diff --git a/src/api/project/donatebaseinfo.js b/src/api/project/donatebaseinfo.js index 6a89785..e811706 100644 --- a/src/api/project/donatebaseinfo.js +++ b/src/api/project/donatebaseinfo.js @@ -16,6 +16,13 @@ method: 'get' }) } +// 鏌ヨ鎹愮尞宸ヤ綔娴� +export function getDonatebaseinfoflow(id) { + return request({ + url: '/project/donatebaseinfo/getWorkFlow/' + id, + method: 'get' + }) +} // 鏂板鎹愮尞鍩虹 export function addDonatebaseinfo(data) { diff --git a/src/api/project/organallocation.js b/src/api/project/organallocation.js index b57eb80..5822eb9 100644 --- a/src/api/project/organallocation.js +++ b/src/api/project/organallocation.js @@ -20,7 +20,7 @@ // 鏂板鍣ㄥ畼鍒嗛厤 export function addOrganallocation(data) { return request({ - url: '/project/organallocation', + url: '/project/organallocation/add', method: 'post', data: data }) diff --git a/src/views/project/donationdetails/index.vue b/src/views/project/donationdetails/index.vue index 90b3b72..f94db32 100644 --- a/src/views/project/donationdetails/index.vue +++ b/src/views/project/donationdetails/index.vue @@ -4,45 +4,150 @@ <div class="postfilx"> <div class="title">宸ヤ綔杩涚▼</div> <div style="height: 666px;"> - <el-steps direction="vertical" :active="3"> + <el-steps direction="vertical" :active="actives"> <el-step title="娼滃湪鎹愮尞" icon="el-icon-user"> - <template slot="description"> - <p>鎻愪氦鏃堕棿锛�<span>2023-9-20</span></p> - <p>瀹℃牳鏃堕棿锛�<span>2023-9-30</span></p> + <template + slot="description" + v-if="Processdata.donateorgan.createtime" + > + <p> + 鎻愪氦鏃堕棿锛�<span>{{ + parseTime(Processdata.donateorgan.createtime) + }}</span> + </p> + <p> + 鏇存柊鏃堕棿锛�<span>{{ + parseTime(Processdata.donateorgan.updatetime) + }}</span> + </p> </template> </el-step> - <el-step title="鍖诲璇勪及" icon="el-icon-edit-outline"> - <template slot="description"> - <p>鎻愪氦鏃堕棿锛�<span>2023-9-20</span></p> - <p>瀹℃牳鏃堕棿锛�<span>2023-9-30</span></p> + <el-step + title="鍖诲璇勪及" + icon="el-icon-edit-outline" + description="璇峰厛瀹屾垚鍓嶉儴姝ラ" + > + <template + slot="description" + v-if="Processdata.medicalevaluation.createtime" + > + <p> + 鎻愪氦鏃堕棿锛�<span>{{ + parseTime(Processdata.medicalevaluation.updatetime) + }}</span> + </p> + <p> + 鏇存柊鏃堕棿锛�<span>{{ + parseTime(Processdata.medicalevaluation.updatetime) + }}</span> + </p> </template> </el-step> <el-step title="鎹愮尞纭" - description="杩欐槸涓�娈靛緢闀垮緢闀垮緢闀跨殑鎻忚堪鎬ф枃瀛�" + description="璇峰厛瀹屾垚鍓嶉儴姝ラ" icon="el-icon-folder-checked" > + <template + slot="description" + v-if="Processdata.relativesconfirmation.createtime" + > + <p> + 鎻愪氦鏃堕棿锛�<span>{{ + parseTime(Processdata.relativesconfirmation.updatetime) + }}</span> + </p> + <p> + 鏇存柊鏃堕棿锛�<span>{{ + parseTime(Processdata.relativesconfirmation.updatetime) + }}</span> + </p> + </template> </el-step> <el-step title="浼︾悊瀹℃煡" - description="杩欐槸涓�娈靛緢闀垮緢闀垮緢闀跨殑鎻忚堪鎬ф枃瀛�" + description="璇峰厛瀹屾垚鍓嶉儴姝ラ" icon="el-icon-s-order" - ></el-step> + > + <template + slot="description" + v-if="Processdata.ethicalreviewopinions.createtime" + > + <p> + 鎻愪氦鏃堕棿锛�<span>{{ + parseTime(Processdata.ethicalreviewopinions.updatetime) + }}</span> + </p> + <p> + 鏇存柊鏃堕棿锛�<span>{{ + parseTime(Processdata.ethicalreviewopinions.updatetime) + }}</span> + </p> + </template> + </el-step> <el-step title="鍣ㄥ畼鍒嗛厤" - description="杩欐槸涓�娈靛緢闀垮緢闀垮緢闀跨殑鎻忚堪鎬ф枃瀛�" + description="璇峰厛瀹屾垚鍓嶉儴姝ラ" icon="el-icon-s-operation" - ></el-step> + > + <template + slot="description" + v-if="Processdata.organallocationService.createtime" + > + <p> + 鎻愪氦鏃堕棿锛�<span>{{ + parseTime(Processdata.organallocationService.updatetime) + }}</span> + </p> + <p> + 鏇存柊鏃堕棿锛�<span>{{ + parseTime(Processdata.organallocationService.updatetime) + }}</span> + </p> + </template> + </el-step> <el-step title="鑾峰彇瑙佽瘉" - description="杩欐槸涓�娈靛緢闀垮緢闀垮緢闀跨殑鎻忚堪鎬ф枃瀛�" + description="璇峰厛瀹屾垚鍓嶉儴姝ラ" icon="el-icon-s-management" - ></el-step> + > + <template + slot="description" + v-if="Processdata.donationwitness.createtime" + > + <p> + 鎻愪氦鏃堕棿锛�<span>{{ + parseTime(Processdata.donationwitness.updatetime) + }}</span> + </p> + <p> + 鏇存柊鏃堕棿锛�<span>{{ + parseTime(Processdata.donationwitness.updatetime) + }}</span> + </p> + </template> + </el-step> <el-step title="瀹屾垚鐧昏" - description="杩欐槸涓�娈靛緢闀垮緢闀垮緢闀跨殑鎻忚堪鎬ф枃瀛�" + description="璇峰厛瀹屾垚鍓嶉儴姝ラ" icon="el-icon-circle-check" - ></el-step> + > + <template + slot="description" + v-if="Processdata.donatecompletioninfo.createtime" + > + <p> + 鎻愪氦鏃堕棿锛�<span>{{ + parseTime(Processdata.donatecompletioninfo.updatetime) + }}</span> + </p> + <p> + 鏇存柊鏃堕棿锛�<span>{{ + parseTime(Processdata.donatecompletioninfo.updatetime) + }}</span> + </p> + </template> + </el-step> </el-steps> </div> </div> @@ -296,7 +401,8 @@ ></el-step> </el-steps> </div> - <div class="Ticket-button"> + <!-- 鍑瘉鏂囦欢 --> + <div class="Ticket-button" v-show="actives != 5 && actives != 4"> <el-button @click.native.prevent="Filepopup" type="success" >鍑瘉鏂囦欢</el-button > @@ -623,14 +729,16 @@ </el-row> </el-form> <div class="dialog-footer"> - <el-button v-show="showSaveBtn" type="primary" @click="submitForm" + <el-button + v-show="!showTerminationBtn" + type="primary" + @click="submitForm" >淇濆瓨鎹愮尞鑰呬俊鎭�</el-button > <el-button - v-show="showTerminationBtn" - type="primary" + :type="showTerminationBtn == 0 ? 'warning' : 'success'" @click="Terminationcase" - >缁堟妗堜緥</el-button + >{{ showTerminationBtn == 0 ? "缁堟妗堜緥" : "鎭㈠妗堜緥" }}</el-button > <el-button v-show="Reportforreview" @@ -852,14 +960,16 @@ </el-row> </el-form> <div class="dialog-footer"> - <el-button v-show="showSaveBtn" type="primary" @click="Savethedetails" + <el-button + v-show="!showTerminationBtn" + type="primary" + @click="Savethedetails" >淇濆瓨璇勪及淇℃伅</el-button > <el-button - v-show="showTerminationBtn" - type="primary" + :type="showTerminationBtn == 0 ? 'warning' : 'success'" @click="Terminationcase" - >缁堟妗堜緥</el-button + >{{ showTerminationBtn == 0 ? "缁堟妗堜緥" : "鎭㈠妗堜緥" }}</el-button > <el-button v-show="makeastepforward" @@ -1050,14 +1160,16 @@ </el-row> </el-form> <div class="dialog-footer"> - <el-button v-show="showSaveBtn" type="primary" @click="Savethedetails" + <el-button + v-show="!showTerminationBtn" + type="primary" + @click="Savethedetails" >淇濆瓨鎹愮尞淇℃伅</el-button > <el-button - v-show="showTerminationBtn" - type="primary" + :type="showTerminationBtn == 0 ? 'warning' : 'success'" @click="Terminationcase" - >缁堟妗堜緥</el-button + >{{ showTerminationBtn == 0 ? "缁堟妗堜緥" : "鎭㈠妗堜緥" }}</el-button > <el-button v-show="makeastepforward" @@ -1116,14 +1228,16 @@ </el-row> </el-form> <div class="dialog-footer" style="min-height: 500px; margin: 20px 0; "> - <el-button v-show="showSaveBtn" type="primary" @click="Savethedetails" + <el-button + v-show="!showTerminationBtn" + type="primary" + @click="Savethedetails" >淇濆瓨鎹愮尞淇℃伅</el-button > <el-button - v-show="showTerminationBtn" - type="primary" + :type="showTerminationBtn == 0 ? 'warning' : 'success'" @click="Terminationcase" - >缁堟妗堜緥</el-button + >{{ showTerminationBtn == 0 ? "缁堟妗堜緥" : "鎭㈠妗堜緥" }}</el-button > <el-button v-show="makeastepforward" @@ -1282,14 +1396,16 @@ </el-form-item> </el-form> <div class="dialog-footer"> - <el-button v-show="showSaveBtn" type="primary" @click="Savethedetails" + <el-button + v-show="!showTerminationBtn" + type="primary" + @click="Savethedetails" >淇濆瓨鎹愮尞淇℃伅</el-button > <el-button - v-show="showTerminationBtn" - type="primary" + :type="showTerminationBtn == 0 ? 'warning' : 'success'" @click="Terminationcase" - >缁堟妗堜緥</el-button + >{{ showTerminationBtn == 0 ? "缁堟妗堜緥" : "鎭㈠妗堜緥" }}</el-button > <el-button v-show="makeastepforward" @@ -1731,14 +1847,16 @@ </el-form> <div class="dialog-footer"> - <el-button v-show="showSaveBtn" type="primary" @click="Savethedetails" + <el-button + v-show="!showTerminationBtn" + type="primary" + @click="Savethedetails" >淇濆瓨鎹愮尞淇℃伅</el-button > <el-button - v-show="showTerminationBtn" - type="primary" + :type="showTerminationBtn == 0 ? 'warning' : 'success'" @click="Terminationcase" - >缁堟妗堜緥</el-button + >{{ showTerminationBtn == 0 ? "缁堟妗堜緥" : "鎭㈠妗堜緥" }}</el-button > <el-button v-show="makeastepforward" @@ -1964,14 +2082,16 @@ </el-row> </el-form> <div class="dialog-footer"> - <el-button v-show="showSaveBtn" type="primary" @click="Savethedetails" + <el-button + v-show="!showTerminationBtn" + type="primary" + @click="Savethedetails" >淇濆瓨鎹愮尞鑰呬俊鎭�</el-button > <el-button - v-show="showTerminationBtn" - type="primary" + :type="showTerminationBtn == 0 ? 'warning' : 'success'" @click="Terminationcase" - >缁堟妗堜緥</el-button + >{{ showTerminationBtn == 0 ? "缁堟妗堜緥" : "鎭㈠妗堜緥" }}</el-button > <el-button v-show="Reportforreview" @@ -1983,6 +2103,7 @@ </div> </div> </div> + <!-- 闄勪欢寮圭獥 --> <el-dialog v-dialogDrags :modal="false" @@ -1997,11 +2118,11 @@ type="card" @tab-click="handleClick" > - <el-tab-pane label="娼滃湪鎹愮尞" :name="0"> </el-tab-pane> - <el-tab-pane label="鍖诲璇勪及" :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="6"> </el-tab-pane> + <el-tab-pane label="娼滃湪鎹愮尞" :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-tabs> <div class="pdfimg"> <div class="box-pdf"> @@ -2106,7 +2227,8 @@ import { getDonatebaseinfo, addDonatebaseinfo, - updateDonatebaseinfo + updateDonatebaseinfo, + getDonatebaseinfoflow } from "@/api/project/donatebaseinfo"; import { listMedicalevaluation, @@ -2187,16 +2309,17 @@ witnessform: {}, accomplishform: {}, tableData: [], - actives: 0, + actives: 0, //杩涚▼ loading: false, // 淇濆瓨銆佺粓姝㈡寜閽‘璁� showSaveBtn: true, - showTerminationBtn: true, + showTerminationBtn: 0, //缁堟鐘舵�� 0-鏈粓姝� 1-宸茬粓姝� //閫夋嫨鍣ㄥ畼琛ㄥ崟 organalForm: { //鍣ㄥ畼鍒楄〃 organname: [] }, + Processdata: {}, //娴佺▼鏁版嵁 //鐪佸競鍖洪粯璁ゅ�艰缃紝鍙负绌� searchAddress: { sheng: "", @@ -2291,6 +2414,7 @@ { required: true, message: "璇疯緭鍏ユ姤鍛婁汉鑱旂郴鐢佃瘽", trigger: "blur" } ] }, + // 鍚勭骇鏄庣粏鏁堥獙 medicinerules: {}, affirmrules: {}, ethicrules: {}, @@ -2335,8 +2459,16 @@ Getbasicinformation() { console.log(this.infoid); console.log(this.hintitle); + // 宸︿晶娴佺▼鏁版嵁 + getDonatebaseinfoflow(this.infoid).then(res => { + console.log(res.data); + this.Processdata = res.data; + }); + // 琛ㄥ崟鏁版嵁 getDonatebaseinfo(this.infoid).then(response => { this.form = response.data; + this.showTerminationBtn = response.data.terminationCase; + this.actives = response.data.workflow; response.data.sex = parseInt(response.data.sex); this.form.id = response.data.id; this.form.diseasetype = this.form.diseasetype.split(","); @@ -2497,23 +2629,21 @@ this.form.redorganname = this.form.redorganno; } - //灏濊瘯鐢熸垚鎹愮尞缂栧彿锛堝凡缁忕敱addDonatebaseinfo鎺ュ彛涓敓鎴愬彇浠o級 - // getdonatorno(this.form).then((response) => { - // // alert(JSON.stringify(response)); - // this.reset(); - // }); - if (this.form.id != null) { updateDonatebaseinfo(this.form).then(response => { this.$modal.msgSuccess("淇濆瓨鎴愬姛"); this.Getbasicinformation(); + this.GetAttacheddata(); this.open = false; }); } else { + this.form.workflow = 1; this.form.recordstate = 0; addDonatebaseinfo(this.form).then(response => { if (response.code == 200) { this.$modal.msgSuccess("鏂板鎴愬姛"); + this.Getbasicinformation(); + this.GetAttacheddata(); this.open = false; } else { this.$modal.msgError("鏂板澶辫触锛�" + response.msg); @@ -2526,6 +2656,7 @@ // 淇濆瓨浜岀骇琛ㄦ寜閽� Savethedetails() { if (this.actives == 1) { + this.Processvalidation(); this.medicineform.infoid = this.form.id; this.$refs["medicineform"].validate(valid => { if (valid) { @@ -2540,8 +2671,8 @@ } }); } else if (this.actives == 2) { + this.Processvalidation(); this.affirmform.infoid = this.form.id; - this.$refs["affirmform"].validate(valid => { if (valid) { if (this.affirmform.id != null) { @@ -2555,6 +2686,7 @@ } }); } else if (this.actives == 3) { + this.Processvalidation(); this.ethicform.infoid = this.form.id; this.$refs["ethicform"].validate(valid => { if (valid) { @@ -2569,10 +2701,11 @@ } }); } else if (this.actives == 4) { + this.Processvalidation(); this.allocationform.infoid = this.form.id; this.$refs["allocationform"].validate(valid => { if (valid) { - if (this.allocationform.id != null) { + if (this.allocationform[0].id != null) { updateOrganallocation(this.allocationform).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); }); @@ -2585,6 +2718,7 @@ } }); } else if (this.actives == 5) { + this.Processvalidation(); this.witnessform.infoid = this.form.id; this.$refs["witnessform"].validate(valid => { if (valid) { @@ -2632,6 +2766,7 @@ } }); } else if (this.actives == 6) { + this.Processvalidation(); this.accomplishform.infoid = this.form.id; this.$refs["accomplishform"].validate(valid => { if (valid) { @@ -2657,6 +2792,7 @@ // } this.GetAttacheddata(); }, + // 鍣ㄥ畼鍒嗛厤鏍忕洰鎺у埗 changeorganState(value) { let organIndex = this.allocationform.findIndex( item => item.organno == value @@ -2720,10 +2856,28 @@ console.log("宸插埌杈炬渶澶у��"); } }, + // 鏇存敼杩涚▼鏁堥獙 + Processvalidation() { + console.log(this.form.workflow); + console.log(this.actives); + if (this.form.workflow == this.actives) { + this.form.workflow++; + } else if (this.form.workflow > this.actives) { + } else { + this.$modal.msgWarning("璇峰厛瀹屾垚鍓嶉儴姝ラ"); + return; + } + console.log(this.form.workflow); + }, // 涓婃姤瀹℃牳 Reportforreview() {}, // 缁堟妗堜緥 - Terminationcase() {}, + Terminationcase() { + this.form.terminationCase == 1 + ? (this.form.terminationCase = 0) + : (this.form.terminationCase = 1); + this.submitForm(); + }, // 杩斿洖涓婁竴椤� cancel() {}, // ------------------------绁ㄦ嵁 @@ -2800,12 +2954,10 @@ // 鐐瑰嚮绁ㄦ嵁 Filepopup(index, rows, row) { - this.tableDatatop = []; + this.activeName = this.actives + 1; + console.log(this.activeName); this.pdfimgsrcList = []; - this.invoDatatop = []; this.invoicepdfimgsrcList = []; - this.invoDatatop.push(row); - this.tableDatatop.push(row); this.atpresent = index; this.pdfVisible = true; console.log(this.rbDetails[index]); -- Gitblit v1.9.3