From e17811c1d7b1e6318af32a366d23bd586750b6d2 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期三, 27 十一月 2024 11:32:48 +0800 Subject: [PATCH] 2024 11 27 --- src/views/doctor/checkAll/index.vue | 860 ++++++++++++++++++++++++++++++++++----------------------- 1 files changed, 512 insertions(+), 348 deletions(-) diff --git a/src/views/doctor/checkAll/index.vue b/src/views/doctor/checkAll/index.vue index 8de4fc4..ef48f09 100644 --- a/src/views/doctor/checkAll/index.vue +++ b/src/views/doctor/checkAll/index.vue @@ -95,6 +95,7 @@ ref="table" border style="margin: 20px; width: 98%" + @current-change="handleCurrentChange" > <!-- <template slot="empty">鏁版嵁姝e湪鍔犺浇涓�</template> --> <el-table-column @@ -228,7 +229,7 @@ :total="total" :page.sync="queryParams.page" :limit.sync="queryParams.pageSize" - @pagination="getList" + @pagination="submitForm" /> </div> </div> @@ -242,69 +243,87 @@ :with-header="false" size="80%" > - <div style="font-size: 14px"> - <table - style=" - width: 96%; - margin: 10px 10px; - border: 1px solid #dfe6ec; - border-collapse: collapse; - " - cellspacing="4" - > - <caption style="background-color: #f8f8f9; font-size: 18px"> - {{ - tableAll.cusName - }}鐨勪綋妫�璧勬枡 - </caption> - <tr style="border: 1px solid #dfe6ec; border-collapse: collapse"> - <td style="border: 1px solid #dfe6ec; border-collapse: collapse"> - 濮撳悕锛� - </td> - <td style="border: 1px solid #dfe6ec; border-collapse: collapse"> - {{ tableAll.cusName }} - </td> - <td style="border: 1px solid #dfe6ec; border-collapse: collapse"> - 鎬у埆锛� - </td> - <td style="border: 1px solid #dfe6ec; border-collapse: collapse"> - {{ - tableAll.cusSex == 0 - ? "鐢�" - : tableAll.cusSex == 1 - ? "濂�" - : "鏈煡" - }} - </td> - </tr> - <tr style="border: 1px solid #dfe6ec; border-collapse: collapse"> - <td style="border: 1px solid #dfe6ec; border-collapse: collapse"> - 浣撴鍗曞彿锛� - </td> - <td style="border: 1px solid #dfe6ec; border-collapse: collapse"> - {{ tableAll.tjNumber }} - </td> - <td style="border: 1px solid #dfe6ec; border-collapse: collapse"> - 浣撴鏃堕棿锛� - </td> - <td style="border: 1px solid #dfe6ec; border-collapse: collapse"> - {{ tableAll.tjTime }} - </td> - </tr> - </table> - </div> <div> <el-row> <el-col :span="18"> - <div style="margin: 10px 10px"> - <el-radio-group - v-model="tjproject" - @input="radiotjprojectChange" - style="margin-left: 20px" + <div style="font-size: 14px"> + <table + style=" + width: 98%; + margin: 10px 10px; + border: 1px solid #dfe6ec; + border-collapse: collapse; + " + cellspacing="4" > - <el-radio-button label="0">浣撴椤圭洰</el-radio-button> - <el-radio-button label="1">鍖栭獙椤圭洰</el-radio-button> - </el-radio-group> + <caption style="background-color: #f8f8f9; font-size: 18px"> + {{ + tableAll.cusName + }}鐨勪綋妫�璧勬枡 + </caption> + <tr + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + height: 36px; + " + > + <td + style="border: 1px solid #dfe6ec; border-collapse: collapse" + > + 濮撳悕锛� + </td> + <td + style="border: 1px solid #dfe6ec; border-collapse: collapse" + > + {{ tableAll.cusName }} + </td> + <td + style="border: 1px solid #dfe6ec; border-collapse: collapse" + > + 鎬у埆锛� + </td> + <td + style="border: 1px solid #dfe6ec; border-collapse: collapse" + > + {{ + tableAll.cusSex == 0 + ? "鐢�" + : tableAll.cusSex == 1 + ? "濂�" + : "鏈煡" + }} + </td> + </tr> + <tr + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + height: 36px; + " + > + <td + style="border: 1px solid #dfe6ec; border-collapse: collapse" + > + 浣撴鍗曞彿锛� + </td> + <td + style="border: 1px solid #dfe6ec; border-collapse: collapse" + > + {{ tableAll.tjNumber }} + </td> + <td + style="border: 1px solid #dfe6ec; border-collapse: collapse" + > + 浣撴鏃堕棿锛� + </td> + <td + style="border: 1px solid #dfe6ec; border-collapse: collapse" + > + {{ tableAll.tjTime }} + </td> + </tr> + </table> </div> </el-col> <el-col :span="6"> @@ -342,227 +361,221 @@ <div style="font-size: 14px; overflow-y: auto; height: calc(100% - 11%)" > - <table - style=" - width: 96%; - margin: 10px 10px; - border: 1px solid #dfe6ec; - border-collapse: collapse; - " - cellspacing="4" + <div v-for="(item, index) in changedate" :key="index" + style="margin-left: 10px" > - <caption style="background-color: #f8f8f9"> - {{ - item.parent || "" - }} - </caption> - <tr - style="border: 1px solid #dfe6ec; border-collapse: collapse" - align="center" - > - <th - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - > - 妫�娴嬮」鐩� - </th> - <th - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - > - 妫�娴嬬粨鏋� - </th> - <th - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - > - 鍗曚綅 - </th> - <th - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - > - 鍙傝�冭寖鍥� - </th> - </tr> - - <tr + <div style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - height: 35px; text-align: center; - " - v-for="item1 in item.sons" - :key="item1.proId" - > - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - v-if="item1.project != null" - > - {{ item1.project.proName || "" }} - </td> - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - v-else - > - {{ item1.proName }} - </td> - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - > - {{ item1.proResult }} - <!-- <el-input v-model="item1.proResult" placeholder="璇疯緭鍏ュ唴瀹�"></el-input> --> - </td> - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - v-if="item1.project != null" - > - {{ item1.standard.company }} - </td> - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - v-else - > - {{ item1.proAdvice }} - </td> - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - v-if="item1.project != null" - > - {{ - item1.standard.tjStandardGtValue + - "-" + - item1.standard.tjStandardLtValue - }} - </td> - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - v-else - > - {{ item1.stanId }} - </td> - </tr> - <tr - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; + background-color: #aad8df; + margin-top: 10px; " > - <td>灏忕粨锛�</td> - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " + {{ item.parent || "" }} + </div> + <div v-if="item.xmlb == '0'"> + <el-table + :data="item.sons" + border + style="width: 100%" + :row-style="changRed" + :header-cell-style="{ background: '#aad8df' }" > - <el-input v-model="item.remark" disabled></el-input> - <!-- <el-select v-model="item.value" multiple filterable placeholder="璇烽�夋嫨" style="width: 100%" @change="xiAoJieChange($event, item)"> + <el-table-column align="center" label="妫�娴嬮」鐩�" width="240"> + <template slot-scope="scope"> + <div>{{ scope.row.proName }}</div> + </template> + </el-table-column> + <el-table-column + align="center" + prop="proResult" + label="妫�娴嬬粨鏋�" + width="180" + > + </el-table-column> + <el-table-column align="center" prop="" label="鍗曚綅"> + <template slot-scope="scope"> + <div v-if="scope.row.project != null"> + {{ scope.row.standard.company || "" }} + </div> + <div v-else>{{ scope.row.proAdvice }}</div> + </template> + </el-table-column> + <el-table-column align="center" prop="" label=" 鍙傝�冭寖鍥�"> + <template slot-scope="scope"> + <div v-if="scope.row.project != null"> + {{ + scope.row.standard.tjStandardGtValue || + "/" + "-" + scope.row.standard.tjStandardLtValue || + "/" + }} + </div> + <div v-else>{{ scope.row.stanId || "/" }}</div> + </template> + </el-table-column> + </el-table> + <table style="width: 100%" v-if="tjproject != '1'"> + <tr + style="border: 1px solid #dfe6ec; border-collapse: collapse" + > + <td + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + width: 7%; + " + > + 灏忕粨锛� + </td> + <td style="border: 1px solid #dfe6ec; width: 45%"> + <el-input v-model="item.remark" disabled></el-input> + <!-- <el-select v-model="item.value" multiple filterable placeholder="璇烽�夋嫨" style="width: 100%" @change="xiAoJieChange($event, item)"> <el-option v-for="item1 in item.parentAdvice" :key="item1.id" :label="item1.title" :value="item1.id"> </el-option> </el-select> --> - </td> - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - > - 涓绘鍖诲笀锛� - </td> - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - > - {{ item.doctorName }} - </td> - </tr> - <tr - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - > - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - > - 澶囨敞锛� - </td> - <td - style=" - border: 1px solid #dfe6ec; - border-collapse: collapse; - width: 200px; - " - colspan="2" - > - <textarea - placeholder="璇疯緭鍏ュ唴瀹�" - :autosize="{ minRows: 2, maxRows: 2 }" - style="width: 100%; height: 100%" - v-model="changedate[index].remark" - v-on:input="change" - ></textarea> - <!-- <el-input type="textarea" autosize > + </td> + <td + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + width: 15%; + " + > + 涓绘鍖诲笀锛� + </td> + <td + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + " + colspan="2" + > + {{ item.doctorName }} + </td> + </tr> + <tr + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + width: 200px; + " + > + <td + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + width: 240px; + " + > + 澶囨敞锛� + </td> + <td + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + " + colspan="3" + > + <textarea + placeholder="璇疯緭鍏ュ唴瀹�" + :autosize="{ minRows: 2, maxRows: 2 }" + style="width: 100%; height: 100%; resize: none" + v-model="changedate[index].remark" + v-on:input="change" + ></textarea> + <!-- <el-input type="textarea" autosize > </el-input> --> - </td> - </tr> - </table> - <div style="margin: 0 0px 10px 15px"> + </td> + </tr> + </table> + </div> + <div v-else> + <table style="width: 100%" v-if="tjproject != '1'"> + <tr style="border: 1px solid #dfe6ec"> + <td + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + width: 15%; + height: 52px; + " + > + 妫�鏌ユ墍瑙侊細 + </td> + <td + style="border: 1px solid #dfe6ec; height: 52px" + colspan="2" + > + <textarea + placeholder="璇疯緭鍏ュ唴瀹�" + :autosize="{ minRows: 3, maxRows: 4 }" + style="width: 100%; height: 100%; resize: none" + v-model="item.jgbx" + ></textarea> + </td> + </tr> + <tr + style="border: 1px solid #dfe6ec; border-collapse: collapse" + > + <td + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + width: 15%; + " + > + 妫�鏌ユ彁绀猴細 + </td> + <td + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + " + colspan="2" + > + <!-- <el-input v-model="item.remark"></el-input> --> + <textarea + placeholder="璇疯緭鍏ュ唴瀹�" + :autosize="{ minRows: 2, maxRows: 3 }" + style="width: 100%; height: 100%; resize: none" + v-model="item.remark" + ></textarea> + </td> + </tr> + <tr + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + width: 200px; + height: 36px; + " + > + <td + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + width: 15%; + " + > + 涓绘鍖诲笀锛� + </td> + <td + style=" + border: 1px solid #dfe6ec; + border-collapse: collapse; + " + colspan="2" + > + {{ item.doctorName }} + </td> + </tr> + </table> + </div> + </div> + + <div style="margin: 0 0px 10px 15px" v-if="tjproject != '1'"> <el-button type="primary" @click="propoChange" >蹇嵎寤鸿</el-button > @@ -575,6 +588,7 @@ ref="numberValidateForm" label-width="80px" class="demo-ruleForm" + v-if="tjproject != '1'" > <el-form-item label="鎬绘寤鸿"> <el-input @@ -587,15 +601,16 @@ </el-input> </el-form-item> </el-form> - <div slot="footer" class="dialog-footers" > + <div slot="footer" class="dialog-footers"> <el-button + v-if="tjproject == '0'" type="primary" size="mini" @click.stop="rowClick" icon="el-icon-edit-outline" >寮�澶勬柟</el-button > - <div v-if="tjproject == '0'" style="padding-left:10px ;"> + <div v-if="tjproject == '0'" style="padding-left: 10px"> <el-button type="primary" @click="determine" @@ -1137,6 +1152,9 @@ name: "checkAll", data() { return { + // 鏇存柊鎬绘寤鸿 + initialTotalCheckAdvice: "", + initialState: "", preObj: {}, baogao: [], flags: false, @@ -1495,9 +1513,9 @@ }, rowClick(row) { - if(row.tjNumber){ + if (row.tjNumber) { this.preObj = row; - }else{ + } else { this.preObj = this.tableAll; } this.$refs.Pre.open = true; @@ -1508,6 +1526,8 @@ radioChange(value) { this.loading = true; this.queryParams.checkStatus = value; + this.queryParams.page = 1; + this.queryParams.pageSize = 10; getcheckList(this.queryParams).then((response) => { if (response.data) { this.checkList = response.data.customers; @@ -1526,7 +1546,6 @@ }, eventchange(data) { this.dataText = data; - console.log(this.textarea1); if (this.textarea1 == null) { this.textarea1 = ""; } @@ -1559,14 +1578,14 @@ } this.changedate.forEach((item) => { // this.remark = item.remark; - item.sons.forEach((item3) => { - if (item3.standard.tjStandardGtValue === null) { - item3.standard.tjStandardGtValue = ""; - } - if (item3.standard.tjStandardLtValue === null) { - item3.standard.tjStandardLtValue = ""; - } - }); + // item.sons.forEach((item3) => { + // if (item3.standard.tjStandardGtValue === null) { + // item3.standard.tjStandardGtValue = ""; + // } + // if (item3.standard.tjStandardLtValue === null) { + // item3.standard.tjStandardLtValue = ""; + // } + // }); // item.remark = ""; }); } else { @@ -1591,12 +1610,12 @@ this.changedate.forEach((item) => { // this.remark = item.remark; item.sons.forEach((item3) => { - if (item3.standard.tjStandardGtValue === null) { - item3.standard.tjStandardGtValue = ""; - } - if (item3.standard.tjStandardLtValue === null) { - item3.standard.tjStandardLtValue = ""; - } + // if (item3.standard.tjStandardGtValue === null) { + // item3.standard.tjStandardGtValue = ""; + // } + // if (item3.standard.tjStandardLtValue === null) { + // item3.standard.tjStandardLtValue = ""; + // } }); // item.remark = ""; }); @@ -1639,6 +1658,7 @@ // 鎼滅储 submitForm() { + console.log(this.tjStatus); this.loading = true; this.queryParams.compId = this.CheckBox.drugManufacturerId; this.queryParams.checkStatus = this.tjStatus; @@ -1673,21 +1693,42 @@ this.resetForm("tableList"); this.submitForm(); }, + changRed({ row }) { + if (row.ycbz != "" && row.ycbz != null) { + // 鍙橀鑹茬殑鏉′欢 + return { + color: "red", // 杩欎釜return鐨勫氨鏄牱寮� 鍙互鏄痗olor 涔熷彲浠ユ槸backgroundColor + }; + } + }, + + /* changRed(row) { + if (row.label === "鈫�") { + return { + color: "green", // 璁剧疆涓婄澶翠负缁胯壊 + }; + } else if (row.label === "鈫�") { + return { + color: "red", // 璁剧疆涓嬬澶翠负绾㈣壊 + }; + } + // 榛樿棰滆壊 + return { + color: "black", + }; + }, */ + handleCurrentChange(val) { + if (val != null) { + this.handleClick(val); + } + }, // 鐐瑰嚮璇︽儏 handleClick(row) { this.$refs.Pre.open = false; this.tableAll = row; this.tjproject = "0"; - // if (this.tableAll.cusSex === 0) { - // this.tableAll.cusSex = "鐢�"; - // } - // if (this.tableAll.cusSex === 1) { - // this.tableAll.cusSex = "濂�"; - // } - // if (this.tableAll.cusSex === 2) { - // this.tableAll.cusSex = "鏈煡"; - // } + this.tjNumber = this.tableAll.tjNumber; getState(this.tjNumber).then((res) => { this.status = res.data; @@ -1707,22 +1748,30 @@ this.changedate = response.data; if (this.changedate) { this.changedate.forEach((item) => { - this.textarea1 = item.checkAdvice; + this.textarea1 = item.checkAdvice || ""; }); + + // 杩欓噷璁剧疆鍒濆鍊� + this.initialTotalCheckAdvice = this.textarea1; // 淇濆瓨鎬绘寤鸿 + + // 淇濆瓨鍒濆鐘舵�� + this.initialState = JSON.parse( + JSON.stringify(this.changedate) + ); + for (let i = 0; i < this.changedate.length; i++) { this.remark = this.changedate[i].remark; } this.changedate.forEach((item) => { // this.remark = item.remark; - item.sons.forEach((item3) => { - if (item3.standard.tjStandardGtValue === null) { - item3.standard.tjStandardGtValue = ""; - } - if (item3.standard.tjStandardLtValue === null) { - item3.standard.tjStandardLtValue = ""; - } - }); - // item.remark = ""; + // item.sons.forEach((item3) => { + // if (item3.standard.tjStandardGtValue === null) { + // item3.standard.tjStandardGtValue = ""; + // } + // if (item3.standard.tjStandardLtValue === null) { + // item3.standard.tjStandardLtValue = ""; + // } + // }); }); } else { this.$message({ @@ -1762,20 +1811,29 @@ for (let i = 0; i < this.changedate.length; i++) { this.remark = this.changedate[i].remark; } + this.initialState = JSON.parse( + JSON.stringify(this.changedate) + ); + this.changedate.forEach((item) => { - this.textarea1 = item.checkAdvice; + this.textarea1 = item.checkAdvice || ""; // this.remark = item.remark; - item.sons.forEach((item3) => { - if (item3.standard.tjStandardGtValue === null) { - item3.standard.tjStandardGtValue = ""; - } - if (item3.standard.tjStandardLtValue === null) { - item3.standard.tjStandardLtValue = ""; - } - }); + // item.sons.forEach((item3) => { + // if (item3.standard.tjStandardGtValue === null) { + // item3.standard.tjStandardGtValue = ""; + // } + // if (item3.standard.tjStandardLtValue === null) { + // item3.standard.tjStandardLtValue = ""; + // } + // }); // item.remark = ""; }); + + // 淇濆瓨鎬绘寤鸿 + this.totalCheckAdvice = this.changedate.map( + (item) => item.totalCheckAdvice + ); } else { this.$message({ type: "warning ", @@ -1826,28 +1884,44 @@ if (this.loading) { return; } - this.$confirm("纭畾瑕佹彁浜ゅ悧锛�") - .then((_) => { - this.loading = true; - this.timer = setTimeout(() => { - done(); - this.determine(); - // 鍔ㄧ敾鍏抽棴闇�瑕佷竴瀹氱殑鏃堕棿 - setTimeout(() => { - this.loading = false; - }, 400); - }, 2000); - }) - .catch((_) => { - this.drawer = false; - let data = { - userId: this.userId, - tjNumber: this.tjNumber, - state: 1, - id: this.MsgId, - }; - getfiedState(data).then((res) => {}); - }); + + // 妫�鏌ユ槸鍚︽湁淇敼 + let isModified = + JSON.stringify(this.changedate) !== JSON.stringify(this.initialState) || + (this.textarea1 !== this.initialTotalCheckAdvice && + this.textarea1 !== null); + console.log("Initial Total Check Advice:", this.initialTotalCheckAdvice); + + console.log("Current textarea1:", this.textarea1); + if (isModified) { + // 濡傛灉鏈変慨鏀癸紝寮瑰嚭纭妗� + this.$confirm("妫�娴嬪唴瀹规湁淇敼锛岀‘瀹氳鎻愪氦鍚楋紵") + .then(() => { + this.loading = true; + this.timer = setTimeout(() => { + done(); + this.determine(); + setTimeout(() => { + this.loading = false; + }, 400); + }, 2000); + }) + .catch(() => { + // 鐢ㄦ埛鍙栨秷鎿嶄綔 + this.drawer = false; + let data = { + userId: this.userId, + tjNumber: this.tjNumber, + state: 1, + id: this.MsgId, + }; + getfiedState(data).then((res) => {}); + this.submitForm(); + }); + } else { + // 濡傛灉娌℃湁淇敼锛岀洿鎺ュ叧闂� + done(); + } }, handleClose1() { this.jianqians = false; @@ -1873,10 +1947,8 @@ // }); // } // }, - change(vale) { - // console.log(this.changedate[index].remark); - }, - determine() { + change(vale) {}, + /* determine() { let tjNumber = this.tableAll.tjNumber; let advice = this.textarea1; let data = { @@ -1884,6 +1956,7 @@ advice, checkStatus: 1, }; + this.loading = true; getTjdetailList(data).then((response) => { if (response.code === 200) { this.$modal.msgSuccess("鎻愪氦鎴愬姛"); @@ -1894,13 +1967,22 @@ state: 1, id: this.MsgId, }; - gettoPdf(tjNumber).then((res) => { - this.$modal.msgSuccess("宸茬敓鎴愭姤鍛婏紒璇峰墠寰�鎶ュ憡鏍告敹椤甸潰纭锛�"); - }); + gettoPdf(tjNumber) + .then((res) => { + this.$modal.msgSuccess("宸茬敓鎴愭姤鍛婏紒璇峰墠寰�鎶ュ憡鏍告敹椤甸潰纭锛�"); + }) + .catch((error) => { + this.$modal.msgError( + "鎵撳嵃鎶ュ憡澶辫触锛岃鍓嶅線鎶ュ憡鎵撳嵃椤甸潰琛ユ墦鎶ュ憡锛�" + ); + }) getfiedState(data).then((res) => { this.drawer = false; }); - } + this.queryParams.page = 1; + this.queryParams.pageSize = 10; + this.submitForm(); + this.$forceUpdate(); }); for (let i = 0; i < this.changedate.length; i++) { @@ -1915,12 +1997,94 @@ ]; getModified(updateOrderRemarkVos).then((response) => {}); } - this.submitForm(); - this.$forceUpdate(); + // this.changedate.forEach((item) => { // this.proIds = item.parentId; // // this.remark = item.remark; // }); + }, */ + determine() { + let tjNumber = this.tableAll.tjNumber; + let advice = this.textarea1; + let data = { + tjNumber, + advice, + checkStatus: 1, + }; + + // 寮�濮嬪姞杞� + this.loading = true; + + // 鎻愪氦鏁版嵁 + getTjdetailList(data) + .then((response) => { + if (response.code === 200) { + this.$modal.msgSuccess("鎻愪氦鎴愬姛"); + + // 鍑嗗鐢熸垚鎶ュ憡鐨勮姹傛暟鎹� + let reportData = { + userId: this.userId, + tjNumber: tjNumber, + state: 1, + id: this.MsgId, + }; + + // 鐢熸垚鎶ュ憡骞朵繚鎸� loading 鎵撳紑 + const reportPromise = gettoPdf(tjNumber) + .then((res) => { + this.$modal.msgSuccess("宸茬敓鎴愭姤鍛婏紒璇峰墠寰�鎶ュ憡鏍告敹椤甸潰纭锛�"); + }) + .catch((error) => { + this.$modal.msgError( + "鎵撳嵃鎶ュ憡澶辫触锛岃鍓嶅線鎶ュ憡鎵撳嵃椤甸潰琛ユ墦鎶ュ憡锛�" + ); + }); + + // 鏇存柊鐘舵�佸苟鎻愪氦淇敼璇锋眰 + const statePromise = getfiedState(reportData).then((res) => { + this.drawer = false; + }); + + // 澶勭悊鍏朵粬淇敼鎿嶄綔 + const updatePromises = this.changedate.map((item) => { + this.proIds = item.parentId; + let remarks = item.remark; + let updateOrderRemarkVos = [ + { + tjNumber, + proId: this.proIds.toString(), + remarks, + }, + ]; + return getModified(updateOrderRemarkVos); // 杩斿洖 Promise + }); + + // 绛夊緟鎵�鏈夎姹傚畬鎴� + Promise.all([reportPromise, statePromise, ...updatePromises]) + .then(() => { + // 鎵�鏈夎姹傚畬鎴愶紝鍏抽棴 loading + this.loading = false; + // 鏇存柊鍒嗛〉淇℃伅 + this.queryParams.page = 1; + this.queryParams.pageSize = 10; + this.submitForm(); + this.$forceUpdate(); + }) + .catch((error) => { + // 澶勭悊閿欒鎯呭喌 + this.loading = false; + console.error("鍙戠敓閿欒:", error); + }); + } else { + // 鎻愪氦澶辫触锛屽叧闂� loading + this.loading = false; + } + }) + .catch((error) => { + // 鎻愪氦璇锋眰澶辫触锛屽叧闂� loading + this.loading = false; + console.error("鎻愪氦璇锋眰澶辫触:", error); + }); }, }, }; -- Gitblit v1.8.0