From 8a7dded6413d99bd5b505eadecd0b824690696fd Mon Sep 17 00:00:00 2001 From: wwl <xchao828@163.com> Date: 星期二, 31 十二月 2024 17:56:36 +0800 Subject: [PATCH] 1 --- src/views/system/tijian/index.vue | 330 ++++++++++++++++++++++++++++++++---------------------- 1 files changed, 195 insertions(+), 135 deletions(-) diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue index 7dcebe1..9d0231d 100644 --- a/src/views/system/tijian/index.vue +++ b/src/views/system/tijian/index.vue @@ -135,6 +135,14 @@ }, ]" > + + <span + slot="label" + style="display: inline-block; border-bottom: 2px solid blue" + @click="openname" + > + 濮撳悕 + </span> <el-input v-model="form.cusName" placeholder="璇疯緭鍏ュ鍚�" @@ -327,7 +335,7 @@ /> </el-form-item> - <el-form-item label="骞撮緞 " prop="age"> + <el-form-item label="骞撮緞" prop="age"> <el-input v-model="form.age" :disabled="isDisabled" @@ -368,13 +376,15 @@ /> </el-form-item> - <el-form-item label="鍗曚綅鍚嶇О" prop="dictCompId"> + <el-form-item label="鍗曚綅鍚嶇О" prop="compName"> <el-select - :remote-method="getRemoteData" + :disabled="isDisabled" v-model="form.compName" remote + default-first-option + allow-create filterable - style="width: 300px" + style="width: 200px" placeholder="璇烽�夋嫨鍗曚綅鍚嶇О" clearable @change="idFn1" @@ -383,13 +393,13 @@ v-for="dict in CompanyList" :key="dict.cnName" :label="dict.cnName" - :value="dict.drugManufacturerId" + :value="dict.cnName" /> </el-select> - <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i> + <!-- <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i> --> </el-form-item> - <el-form-item label="鏂囧寲绋嬪害" prop="wenHua"> + <el-form-item label="鏂囧寲绋嬪害" prop="wenHua" label-width="93px"> <el-input :disabled="isDisabled" v-model="form.wenHua" @@ -518,7 +528,8 @@ > <el-button type="primary" plain size="mini" @click="setImage()" >鎷嶇収</el-button - ><br /> + > + <br /> </div> </div> </el-col> @@ -862,28 +873,6 @@ </el-table-column> </el-table> <h3 style="font-weight: 600">鍚堣锛歿{ marryall }}鍏�</h3> - <!-- <el-collapse v-model="activeName" accordion v-if="list1"> - <div> - <el-collapse-item title="璇烽�夋嫨椤圭洰"> - <el-table - :data="DataList" - border - style="width: 100%" - height="400" - :span-method="objectSpanMethod" - > - <el-table-column - prop="proName" - label="椤圭洰" - width="180" - > - </el-table-column> - <el-table-column prop="ordPrice" label="鍘熶环"> - </el-table-column> - </el-table> - </el-collapse-item> - </div> - </el-collapse> --> </div> </el-col> </el-row> @@ -1099,7 +1088,29 @@ </div> </el-dialog> - <div style="text-align: center; margin-bottom: 10px"> + <div + style=" + display: flex; + align-items: center; + justify-content: flex-start; + width: 100%; + " + > + <div + style=" + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + margin-left: 46px; + font-size: 16px; + margin-right: 20px; + " + > + <span v-if="this.tableData1[0]">{{ this.tableData1[0].pacName || "" }}</span> 宸查�夐」鐩潯鏁帮細<span + style="font-weight: 700; color: red; margin-right: 5px" + >{{ this.tableData1.length || 0 }}</span + >鏉� + </div> 宸查�夐」鐩垪琛� </div> <div @@ -1122,8 +1133,6 @@ <template slot="title"> <div style="width: 70%"> {{ - item.pacName + - ":" + item.parentName + " (搴旀敹閲戦:" + item.ordPrice + @@ -1136,7 +1145,7 @@ <div style="width: 20%"> <el-button type="primary" - @click="candelete(item)" + @click.stop="candelete(item)" style="float: right" >鍒� 闄�</el-button > @@ -1148,7 +1157,7 @@ style="width: 100%" height="270" > - <el-table-column prop="s" label="椤圭洰" width="180"> + <el-table-column prop="proName" label="椤圭洰" width="180"> </el-table-column> <el-table-column prop="proType" label="鎬у埆" width="180"> <template @@ -1495,10 +1504,12 @@ </span> </el-dialog> <Packages ref="aaa" @add="handleChanges" /> + <selectName ref="bbb" @add="handleChangesName"/> </div> </template> <script> +import selectName from "@/components/selectName"; import { dataURLtoFile, random } from "./file"; import { getInfo } from "@/api/login"; import { @@ -1508,9 +1519,8 @@ getByTjNum, } from "@/api/hosp/customer"; import { getPrintSetUp } from "@/api/system/examcharge"; -import axios from "axios"; -import { getIp } from "@/utils/auth"; import { + tuantiSelect, deptTreeSelect, projectGetList, getOrder, @@ -1519,6 +1529,7 @@ getCusIdcard, getPackageListName, getaddtTransition, + tuantiqueren, getTransitionList, getByTeamNo, delTbBycusCardIdAndProId, @@ -1554,6 +1565,7 @@ VTreeTransfer, historyTj, Packages, + selectName, }, data() { return { @@ -1575,7 +1587,7 @@ lishi: false, table: false, HistoryList: {}, - index: 0, + index: [], names: "", inputSSS: "", dictType: [ @@ -1765,7 +1777,7 @@ CompanyList: [], form: { cusIdcard: "", - tjType: "3", + tjType: "", cusSex: 1, cusNational: "1", cusMarryStatus: "5", @@ -1817,13 +1829,18 @@ this.getCurrentDateTime(); this.startTimer(); this.getList1(); + // this.getData(); }, - mounted() { - - }, + mounted() {}, methods: { + openname() { + + this.$refs.bbb.open = true; + this.$refs.bbb.title = "鎼滅储濮撳悕"; + this.$refs.bbb.getList(); + }, getCompanyList() { this.loading = true; getconfigKey("team_reservation_default_day").then((res) => { @@ -1866,25 +1883,18 @@ this.title = "娣诲姞浣撴鍗曚綅淇℃伅缁存姢"; }, idFn1(value) { - if (value) { - this.form.dictCompId = value; + const originalCompId = this.form.dictCompId; + this.form.compName = value; this.CompanyList.forEach((item) => { - if (item.drugManufacturerId == this.form.dictCompId) { - this.form.compName = item.cnName; + if (item.cnName == this.form.compName) { + this.form.dictCompId = item.drugManufacturerId; } }); - } - }, - getRemoteData(query) { - if (query) { - let compName = query; - queryCompany(compName).then((response) => { - this.CompanyList = response.data; - this.CompanyList.forEach((item) => { - this.objs = item; - }); - }); + + if (this.form.dictCompId === originalCompId) { + this.form.dictCompId = ""; + } } }, getCurrentDateTime() { @@ -2348,16 +2358,15 @@ if (this.form.cusSex === "鏈煡") { this.form.cusSex = 2; } + if (this.form.tjType === '') { + this.form.tjType = this.dict.type.dict_team[0].value; + } + addCustomer(this.form).then((response) => { this.responseList = response.data; + this.$modal.msgSuccess("鏂板鎴愬姛"); - // let cusSex = this.form.cusSex; - // //鍏ㄩ儴濂楅 - // deptTreeSelect(cusSex).then((response) => { - // this.newpacName = response.rows; - // this.loading = false; - // }); - // this.handleQuery(); + _this.tcShow = true; _this.tcShows = true; _this.isDisabled = true; @@ -2391,7 +2400,7 @@ this.discount = this.form.discount; } if (this.form.tjType === null) { - this.form.tjType = "3"; + this.form.tjType = this.dict.type.dict_team[0].value; } if (this.form.cusMarryStatus === "null") { this.form.cusMarryStatus = "5"; @@ -2423,9 +2432,11 @@ this.list1 = false; this.list2 = true; this.list3 = false; + this.top = false; } else { this.list1 = true; this.TotalPrice = "0.00"; + this.top = false; } }); } else { @@ -2474,13 +2485,9 @@ this.$message.warning("鏈煡鍒扮敤鎴蜂俊鎭�"); } }); - // .catch((error) => { - // this.$message.error("姝ょ敤鎴蜂笉瀛樺湪"); - // }); } else { let configKey = "getInfoFromSqlData"; getconfigKey(configKey).then((res) => { - if (res.code == 200) { if (res.msg == "N") { var websocket = null; @@ -2490,7 +2497,6 @@ } else if ("MozWebSocket" in window) { websocket = new MozWebSocket(url); } else { - } if (websocket == null) { @@ -2516,23 +2522,15 @@ var jsonObj = { // name: "readCert", }; - // var jStr = JSON.stringify(jsonObj); - // this.websocket.send(jStr); + this.dialogVisible = false; }; //鎺ユ敹鍒版秷鎭殑鍥炶皟鏂规硶 websocket.onmessage = (event) => { - var resultObj = eval("(" + event.data + ")"); - //resultFlag涓�0浠h〃璇诲崱鎴愬姛 - - // TODO 浠ヤ笅浠g爜鍙兘鏄尘宸濅娇鐢ㄧ殑 - // this.jingChuanHandlerWebSocketResult(resultObj) this.readCardWebSocket(resultObj); }; - - //杩炴帴鍏抽棴鐨勫洖璋冩柟娉� websocket.onclose = function () { alert("璇诲崱鍣ㄨ繛鎺ュ叧闂�"); }; @@ -2544,43 +2542,16 @@ this.cardreader = true; _this.cardreaderradio = 3; _this.inputSSS = ""; - // let url = window.location.protocol + "//" + window.location.host; - - // axios - // .get("http://localhost:81/dev-api/readCertCardInfos") - // .then((res) => { - - // }) - // .catch((err) => { - - // }); - - // readCertCardInfos().then((res) => { - // _this.form.cusName = res.data.name; - // _this.form.cusSex = - // res.data.sex; - // _this.form.cusNational = res.data.mz; - // _this.form.cusBrithday = res.data.csrq; - // if (_this.form.cusBrithday) { - // _this.form.cusBrithday = _this.form.cusBrithday.replace( - // /^(\d{4})(\d{2})(\d{2})$/, - // "$1-$2-$3" - // ); - // } - // _this.form.cusAddr = res.data.addres; - // _this.form.cusIdcard = res.data.card; - // }); } } }); } }, + // 鏈�鏂颁娇鐢╳ebSocket閫氫俊 readCardWebSocket(resultObj) { let _this = this; if (resultObj.code === 200 && resultObj.data.name != null) { - - //鍥炴樉鐩稿叧鏁版嵁 _this.form.cusName = resultObj.data.name; _this.form.cusSex = resultObj.data.sex == "0" ? "濂�" : "鐢�"; @@ -2678,7 +2649,6 @@ } else if ("MozWebSocket" in window) { websocket = new MozWebSocket(url); } else { - } if (websocket == null) { alert("11111"); @@ -2783,7 +2753,6 @@ } else if ("MozWebSocket" in window) { websocket = new MozWebSocket(url); } else { - } if (websocket == null) { alert("11111"); @@ -2888,7 +2857,19 @@ // this.form.cusName = param1[0].pacName; // this.form.cusPhone = param1[0].pacRemark; }, - + handleChangesName(params){ + this.form.cusName = params[0].xm + this.form.cusPhone = params[0].sjh + if (params[0].xb == '鐢�') { + this.form.cusSex = 0 + } + if (params[0].xb == '濂�') { + this.form.cusSex = 1 + } + if (params[0].xb == '鏈煡') { + this.form.cusSex = 2 + } + }, // selected(row, index) { // if (this.formPacId !== null) { // if (row.pacId == this.formPacId) { @@ -2943,16 +2924,27 @@ handle() { this.loading = true; this.name = this.queryParam.pacName; + let param = { + sex: this.form.cusSex, + dwId: this.form.dictCompId + } if (this.name) { getPackageListName(this.name).then((response) => { this.newpacName = response.data; this.loading = false; }); } else { - deptTreeSelect().then((response) => { + if(this.form.tjType == 1) { + tuantiSelect(param).then((response) => { + this.newpacName = response.data; + this.loading = false; + }) + } else{ + deptTreeSelect().then((response) => { this.newpacName = response.rows; this.loading = false; }); + } } }, @@ -3039,13 +3031,51 @@ }, Package() { - this.taocan = true; + this.activeNames = "first"; let cusSex = this.form.cusSex; this.datekey = Date.now(); //鍏ㄩ儴濂楅 - this.loading = true; - deptTreeSelect(cusSex).then((response) => { + + let param = { + sex: cusSex, + dwId: this.form.dictCompId || '' + } + if(this.form.tjType == 1) { + if(!this.form.dictCompId) { + this.$message({ + type: "warning", + message: "璇峰厛缁存姢鍗曚綅锛�", + }); + + } else { + this.taocan = true; + this.loading = true; + tuantiSelect(param).then((res) => { + this.newpacName = res.data; + try { + if (this.tableData1.length >= 1) { + this.newpacName.forEach((item3) => { + this.tableData1.forEach((item4) => { + item4.list.forEach((item6) => { + if (item6.pacName === item3.pacName) { + this.$nextTick(() => { + this.$refs.tb.toggleRowSelection(item3, true); + }); + throw Error(); + } + }); + }); + }); + } + } catch (error) {} + this.loading = false; + }) + } + } else { + this.taocan = true; + this.loading = true; + deptTreeSelect(cusSex).then((response) => { this.newpacName = response.rows; try { if (this.tableData1.length >= 1) { @@ -3065,7 +3095,9 @@ } catch (error) {} this.loading = false; }); - // this.getData(); + } + + }, // 鐐瑰嚮澶氶�夋鑾峰彇閫変腑鏁版嵁 @@ -3176,7 +3208,6 @@ this.loading = true; getProParentIdDxList().then((response) => { this.Treedata = response.data.list; - if (this.tableData[0]) { this.tableData[0].tjProjectList.forEach((selectionitem) => { @@ -3200,7 +3231,7 @@ }; getlistByZhId(datas).then((res) => { this.packagedataList = res.data.tjProjectList; - + this.DataLists = []; this.checkedListkey1 = []; for (var i = 0; i < this.packagedataList.length; i++) { @@ -3210,12 +3241,11 @@ getProSonDxList(proId).then((res) => { this.TreedataList = res.data.list; - this.TreedataList.forEach((item) => { // this.checkedListkey1.push(item.proId); this.DataLists.push(item); - + if (this.DataLists.length >= 1) { this.marryalls = 0; this.DataLists.forEach((item1) => { @@ -3411,7 +3441,6 @@ } }); }, - // // 榛樿鎺ュ彈鍥涗釜鍊� { 褰撳墠琛岀殑鍊�, 褰撳墠鍒楃殑鍊�, 琛岀殑涓嬫爣, 鍒楃殑涓嬫爣 } objectSpanMethod({ row, column, rowIndex, columnIndex }) { let fields = ["propinName"]; let cellValue = row[column.property]; @@ -3464,9 +3493,9 @@ pacId: _this.pacId, proIds: this.proIds, }; - getaddtTransition(data).then((response) => { + if (this.form.tjType == 1){ + tuantiqueren(data).then((response) => { if (response.code == 200) { - let cusId = this.form.cusIdcard; this.proIds = []; getTransitionList(cusId).then((response) => { @@ -3503,24 +3532,56 @@ }); } else { console.log(澶辫触浜�); - } }); + } else { + getaddtTransition(data).then((response) => { + if (response.code == 200) { + let cusId = this.form.cusIdcard; + this.proIds = []; + getTransitionList(cusId).then((response) => { + this.tableData1 = response.data; + this.TotalPrice1 = 0; + if (this.tableData1) { + this.tableData1.forEach((item) => { + this.TotalPrice1 += item.nowPrice; + if (item.tjCategory != null) { + this.tjCategory = item.tjCategory; + } + if (item.pacName == "鍗曢」") { + item.list.forEach((item9) => { + this.treeList.push(item9.proId); + }); + } + this.pacName = item.pacName; + }); + + const r = /^\+?[0-9][0-9]*$/; //姝f暣鏁帮紙鍙互0鎵撳ご锛� + let TotalPrice = this.TotalPrice1 * (this.discount / 10); + if (r.test(TotalPrice)) { + this.TotalPrice = TotalPrice + ".00"; + } else { + this.TotalPrice = TotalPrice; + } + this.list1 = false; + this.list3 = true; + this.list2 = false; + } else { + this.list1 = true; + this.TotalPrice = "0.00"; + } + }); + } else { + console.log(澶辫触浜�); + } + }); + } + + this.taocan = false; this.defaultKeys = []; this.DataLists = []; }, - // changeCategoryKeys(val) { - // this.proIds = []; - // this.proIds = val; - // if (this.DataList.length != 0) { - // this.DataList.forEach((item) => { - // this.proIds.push(item.proId); - // }); - // } else { - // this.proIds = []; - // } - // }, submitCheckinfee() { let _this = this; if (_this.tjCategory !== "") { @@ -3861,7 +3922,6 @@ }, }; </script> - <style> .el-form-item__error { -- Gitblit v1.8.0