From 876f43e0fd34e084cc8a179a20afb51fe612eca3 Mon Sep 17 00:00:00 2001 From: qinxianzhangyao <11053546+qinxianzhangyao@user.noreply.gitee.com> Date: 星期六, 09 十二月 2023 18:59:31 +0800 Subject: [PATCH] qxtj --- src/views/system/tijianall/index.vue | 162 ++++++++++++++++++++++++++++++++--------------------- 1 files changed, 98 insertions(+), 64 deletions(-) diff --git a/src/views/system/tijianall/index.vue b/src/views/system/tijianall/index.vue index 5d40613..6ec80ab 100644 --- a/src/views/system/tijianall/index.vue +++ b/src/views/system/tijianall/index.vue @@ -461,7 +461,7 @@ >棰勭害鐧昏</el-button > <el-button - v-show="lishi" + v-show="lishi" type="primary" @click="cope" size="mini" @@ -469,7 +469,7 @@ > <el-button type="primary" - @click="inputChange" + @click="inputChanges" v-show="lishi" size="mini" :disabled="confirm" @@ -639,53 +639,19 @@ ></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-table> - </el-drawer> - <el-dialog + <el-dialog title="鎻愮ず" :visible.sync="dialogVisiblese" width="30%" :before-close="handleClose" > - <span>闇�瑕佸鍒舵渶杩戜竴娆$殑浣撴椤圭洰鍚楋紵</span> + <span>鏄惁澶嶅埗鏈�杩戜竴娆$殑浣撴椤圭洰锛�</span> <span slot="footer" class="dialog-footer"> <el-button @click="dialogVisiblese = false">鍙� 娑�</el-button> - <el-button type="primary" @click="dialogVisiblese = false" - >纭� 瀹�</el-button - > + <el-button type="primary" @click="copes">纭� 瀹�</el-button> </span> </el-dialog> + <historyTj :cusIdCard="form.cusIdcard" ref="historyTj"></historyTj> </div> </template> @@ -702,12 +668,14 @@ getGuide, getaddTj, getHistryTjOrderByCusIdCard, + getHistryTjOrderProByCusIdCard, } from "@/api/system/tijian"; import { MessageBox } from "element-ui"; import VTreeTransfer from "../tijian/TreeTransfer.vue"; +import historyTj from "@/components/historyTj/index"; export default { components: { - VTreeTransfer, + VTreeTransfer,historyTj }, dicts: [ "dict_user_national", @@ -749,7 +717,9 @@ // } // }; return { - dialogVisiblese:false, + proIdList: [], + tableDatas: [], + dialogVisiblese: false, lishi: false, table: false, HistoryList: {}, @@ -970,35 +940,99 @@ this.form.cusBrithday = birthday; this.form.age = age; } - let cusIdCard = this.form.cusIdcard; - getHistryTjOrderByCusIdCard(cusIdCard).then((res) => { - if (res.code == 200) { + + // let cusIdCard = this.form.cusIdcard; + // getHistryTjOrderByCusIdCard(cusIdCard).then((res) => { + // if (res.code == 200) { this.table = true; this.lishi = true; - this.HistoryList = res.data; - } - }); + // this.HistoryList = res.data; + // } + // }); } else { // return this.$message.error("璇疯緭鍏ユ纭殑韬唤璇佸彿锛�");; } }, - cope(){ - let cusIdCard = this.form.cusIdcard; - getHistryTjOrderByCusIdCard(cusIdCard).then((res) => { - if(res.data.length != 0){ - this.dialogVisiblese = true; - }else{ - this.$message.warning('鏆傛棤鍘嗗彶浣撴璁板綍锛�'); - } - }); + inputChanges(){ + this.$refs.historyTj.getlist(); }, - handleClose(done) { - this.$confirm('纭鍏抽棴锛�') - .then(_ => { - done(); - }) - .catch(_ => {}); - }, + cope() { + let cusIdCard = this.form.cusIdcard; + getHistryTjOrderProByCusIdCard(cusIdCard).then((res) => { + this.copeList = res.data; + if (res.msg !="鏆傛棤鍘嗗彶璁板綍") { + 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; + if (this.tableDatas.length != 0) { + this.tableDatas.forEach((item) => { + if (item.pacId != null) { + _this.pacId = item.pacId; + } else { + item.list.forEach((items) => { + _this.proIdList.push(items.proId); + console.log(_this.pacId, 888); + }); + } + }); + } else { + _this.pacId = ""; + } + let data = { + cusId, + pacId: _this.pacId, + proIds: _this.proIdList, + }; + 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) => { this.getInfodis = response.user.discount; -- Gitblit v1.8.0