From ca8433c52ae795db9133006dbbc21815d9b89ca0 Mon Sep 17 00:00:00 2001 From: su1124 <1583764726@qq.com> Date: 星期三, 06 十二月 2023 15:52:07 +0800 Subject: [PATCH] su --- src/views/system/tijianall/index.vue | 185 +++++++++++++++++++++++++++++++++++++++------- 1 files changed, 157 insertions(+), 28 deletions(-) diff --git a/src/views/system/tijianall/index.vue b/src/views/system/tijianall/index.vue index 2426c75..d53d886 100644 --- a/src/views/system/tijianall/index.vue +++ b/src/views/system/tijianall/index.vue @@ -226,24 +226,24 @@ style="width: 190px" /> </el-form-item> - <el-form-item - label="浣撴绫诲瀷" - prop="tjType" - style="margin-right: 20px" + <el-form-item + label="浣撴绫诲瀷" + prop="tjType" + style="margin-right: 20px" + > + <el-select + style="width: 145px" + v-model="form.tjType" + placeholder="璇烽�夋嫨浣撴绫诲瀷" > - <el-select - style="width: 145px" - v-model="form.tjType" - placeholder="璇烽�夋嫨浣撴绫诲瀷" - > - <el-option - v-for="dict in dict.type.dict_team" - :key="dict.value" - :label="dict.label" - :value="parseInt(dict.value)" - ></el-option> - </el-select> - </el-form-item> + <el-option + v-for="dict in dict.type.dict_team" + :key="dict.value" + :label="dict.label" + :value="parseInt(dict.value)" + ></el-option> + </el-select> + </el-form-item> </el-form> </div> </el-col> @@ -427,7 +427,6 @@ label-width="75px" style="margin-left: 10px" > - <el-form-item label="搴旀敹閲戦" style="margin-right: 20px"> <el-input placeholder="搴旀敹閲戦" @@ -459,14 +458,23 @@ @click="submitPrice" size="mini" :disabled="confirm" - >棰勭害鐧昏</el-button> - <el-button + >棰勭害鐧昏</el-button + > + <el-button + v-show="lishi" + type="primary" + @click="cope" + size="mini" + >涓�閿鍒�</el-button + > + <el-button type="primary" @click="inputChange" v-show="lishi" size="mini" :disabled="confirm" - >鍘嗗彶浣撴璁板綍</el-button> + >鍘嗗彶浣撴璁板綍</el-button + > </el-form-item> </el-form> </template> @@ -631,14 +639,51 @@ ></iframe> </div> </el-dialog> - <el-drawer title="鍘嗗彶浣撴璁板綍" :visible.sync="table" direction="rtl" size="50%"> - <el-table :data="HistoryList" style="width:95%;margin-left:20px"> - <el-table-column property="tjNum" label="浣撴鍙�" align="center" :show-overflow-tooltip="true"></el-table-column> - <el-table-column property="userName" label="濮撳悕" align="center" :show-overflow-tooltip="true"></el-table-column> - <el-table-column property="tjTime" label="浣撴鏃堕棿" align="center" :show-overflow-tooltip="true"></el-table-column> - <el-table-column property="tjProName" label="浣撴椤圭洰" align="center" :show-overflow-tooltip="true"></el-table-column> + <el-drawer + title="鍘嗗彶浣撴璁板綍" + :visible.sync="table" + direction="rtl" + size="50%" + > + <el-table :data="HistoryList" style="width: 95%; margin-left: 20px"> + <el-table-column + property="tjNum" + label="浣撴鍙�" + align="center" + :show-overflow-tooltip="true" + ></el-table-column> + <el-table-column + property="userName" + label="濮撳悕" + align="center" + :show-overflow-tooltip="true" + ></el-table-column> + <el-table-column + property="tjTime" + label="浣撴鏃堕棿" + align="center" + :show-overflow-tooltip="true" + ></el-table-column> + <el-table-column + property="tjProName" + label="浣撴椤圭洰" + align="center" + :show-overflow-tooltip="true" + ></el-table-column> </el-table> </el-drawer> + <el-dialog + title="鎻愮ず" + :visible.sync="dialogVisiblese" + width="30%" + :before-close="handleClose" + > + <span>鏄惁澶嶅埗鏈�杩戜竴娆$殑浣撴椤圭洰锛�</span> + <span slot="footer" class="dialog-footer"> + <el-button @click="dialogVisiblese = false">鍙� 娑�</el-button> + <el-button type="primary" @click="copes">纭� 瀹�</el-button> + </span> + </el-dialog> </div> </template> @@ -655,6 +700,7 @@ getGuide, getaddTj, getHistryTjOrderByCusIdCard, + getHistryTjOrderProByCusIdCard, } from "@/api/system/tijian"; import { MessageBox } from "element-ui"; import VTreeTransfer from "../tijian/TreeTransfer.vue"; @@ -702,7 +748,9 @@ // } // }; return { - lishi:false, + tableDatas: [], + dialogVisiblese: false, + lishi: false, table: false, HistoryList: {}, index: 0, @@ -933,6 +981,81 @@ } else { // return this.$message.error("璇疯緭鍏ユ纭殑韬唤璇佸彿锛�");; } + }, + cope() { + let cusIdCard = this.form.cusIdcard; + getHistryTjOrderProByCusIdCard(cusIdCard).then((res) => { + console.log(res); + this.copeList = res.data; + if (res.data.length != 0) { + this.dialogVisiblese = true; + } else { + this.$message.warning("鏆傛棤鍘嗗彶浣撴璁板綍锛�"); + } + }); + }, + copes() { + let cusIdCard = this.form.cusIdcard; + getHistryTjOrderProByCusIdCard(cusIdCard).then((res) => { + this.tableDatas = res.data; + if (this.form.cusIdcard) { + var cusId = this.form.cusIdcard; + } else { + this.$message.warning("璇峰厛濉啓淇℃伅锛屽啀閫変綋妫�鍐呭"); + } + + let _this = this; + console.log(this.tableDatas.length); + if (this.tableDatas.length != 0) { + this.tableDatas.forEach((item) => { + _this.pacId = this.tableDatas.pacId; + _this.proId = this.tableDatas.proId; + console.log(_this.pacId, 888); + }); + + } else { + _this.pacId = ""; + } + let data = { + cusId, + pacId: _this.pacId, + proIds: _this.proId, + }; + getaddtTransition(data).then((response) => { + if (response.msg === "鎿嶄綔鎴愬姛") { + let cusId = this.form.cusIdcard; + getTransitionList(cusId).then((response) => { + this.tableData1 = response.data; + // this.checkSelectable(); + this.TotalPrice1 = 0; + if (this.tableData1) { + this.tableData1.forEach((item) => { + this.TotalPrice1 += item.nowPrice; + this.TotalPrice = this.TotalPrice1 + ".00"; + if (item.pacName === null) { + item.pacName = "鍗曢」"; + } + this.pacName = item.pacName; + }); + this.list1 = false; + this.list3 = true; + } else { + this.list1 = true; + this.TotalPrice = "0.00"; + } + }); + } + }); + this.taocan = false; + }); + this.dialogVisiblese = false; + }, + handleClose(done) { + this.$confirm("纭鍏抽棴锛�") + .then((_) => { + done(); + }) + .catch((_) => {}); }, getList1() { getInfo().then((response) => { @@ -1216,6 +1339,7 @@ // 鐐瑰嚮澶氶�夋鑾峰彇閫変腑鏁版嵁 handleSelectionChange(selection, row) { this.tableData = selection; + console.log(this.tableData); if (selection.length > 1) { let del_row = selection.shift(); this.$refs.tb.toggleRowSelection(del_row, false); //璁剧疆杩欎竴琛屽彇娑堥�変腑 @@ -1328,11 +1452,15 @@ // 鏈�鍚庢彁浜ゆ寜閽� submitPrice() { let _this = this; + console.log(_this.tableData1.length, 111); if (_this.tableData1.length > 0) { let userId = this.form.cusIdcard; + console.log(userId, 222); let tjType = this.form.tjType == 2 ? "涓汉" : "鍥㈤槦"; + console.log(this.tableData[0], 444); if (this.tableData[0]) { var pacId = this.tableData[0].pacId; + console.log(pacId, 333); } // let copeWith = this.TotalPrice1; // let paidIn = this.TotalPrice; @@ -1346,6 +1474,7 @@ // } let data; if (pacId) { + console.log(pacId); data = { pacId, department: this.form.department, -- Gitblit v1.8.0