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/api/hosp/customer.js | 2 src/views/system/tijian/index.vue | 159 +++++++++++++++---- src/api/system/tijian.js | 20 ++ src/components/selectName/index.vue | 271 ++++++++++++++++----------------- 123.rar | 0 src/api/system/package.js | 8 6 files changed, 282 insertions(+), 178 deletions(-) diff --git a/123.rar b/123.rar new file mode 100644 index 0000000..871316f --- /dev/null +++ b/123.rar Binary files differ diff --git a/src/api/hosp/customer.js b/src/api/hosp/customer.js index ade2dbd..ce13d45 100644 --- a/src/api/hosp/customer.js +++ b/src/api/hosp/customer.js @@ -3,7 +3,7 @@ // 鏌ヨ瀹㈡埛淇℃伅鍒楄〃 export function listCustomer(query) { return request({ - url: '/hosp/customer/list', + url: '/hosp/customer/getcusList', method: 'get', params: query }) diff --git a/src/api/system/package.js b/src/api/system/package.js index f4b4e22..53e1f3f 100644 --- a/src/api/system/package.js +++ b/src/api/system/package.js @@ -115,7 +115,13 @@ } - +export function selectName(query) { + return request({ + url: '/hosp/customer/vcustomerlist', + method: 'get', + params: query + }) +} export function Packagestlist(query) { return request({ diff --git a/src/api/system/tijian.js b/src/api/system/tijian.js index 151dedd..bbe87d9 100644 --- a/src/api/system/tijian.js +++ b/src/api/system/tijian.js @@ -11,6 +11,17 @@ }, }); } +// 鏌ヨ鍥綋浣撴濂楅鍒楄〃 +export function tuantiSelect(param) { + return request({ + url: "/hosp/dwgrouping/huoqutuantitaocanxiangmu", + method: "get", + params: { + sex: param.sex, + dwId: param.dwId, + }, + }); +} // 姣忎釜椤圭洰 export function getIsRequired() { return request({ @@ -107,7 +118,14 @@ data: data, }); } - +// 娣诲姞杩囨浮琛ㄦ暟鎹� +export function tuantiqueren(data) { + return request({ + url: "/hosp/order/ttaddtTransition", + method: "post", + data: data, + }); +} // 鏌ヨ杩囨浮琛ㄦ暟鎹� export function getTransitionList(cusId) { return request({ diff --git a/src/components/selectName/index.vue b/src/components/selectName/index.vue index d180e54..7290472 100644 --- a/src/components/selectName/index.vue +++ b/src/components/selectName/index.vue @@ -1,154 +1,139 @@ <template> - <div> - <el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body> - <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="68px" v-if="openone != 2"> - <el-form-item label="濮撳悕" prop="pacCode"> - <el-input v-model="queryParams.pacCode" placeholder="璇疯緭鍏ュ鍚�" clearable @keyup.enter.native="handleQuery" - style="width: 120px;" /> - </el-form-item> - <el-form-item label="鎬у埆" prop="pacName"> - <el-input v-model="queryParams.pacName" placeholder="璇疯緭鍏ユ�у埆" clearable @keyup.enter.native="handleQuery" - style="width: 130px;" /> - </el-form-item> - <el-form-item label="鐢佃瘽鍙�" prop="pacRemark"> - <el-input v-model="queryParams.pacRemark" placeholder="璇疯緭鍏ョ數璇濆彿" clearable - @keyup.enter.native="handleQuery" style="width: 130px;" /> - </el-form-item> - <el-form-item label="韬唤璇佸彿" prop="pacRemark"> - <el-input v-model="queryParams.pacRemark" placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" clearable - @keyup.enter.native="handleQuery" style="width: 130px;" /> - </el-form-item> - <el-form-item> - <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> - </el-form-item> - </el-form> - <el-table :data="dataList" ref="elTable" v-loading="loading" @selection-change="handleSelectionChange" border - height="320px"> - <el-table-column type="selection" width="40" align="center" /> - <el-table-column label="搴忓彿" prop="xh" align="center" /> - <el-table-column label="缂栫爜" align="center" prop="pacCode" /> - <el-table-column label="鍚嶇О" align="center" prop="pacName" width="100px" /> - <el-table-column label="鎷奸煶鐮�" align="center" prop="detail" width="100px" /> - <el-table-column label="鍐呭" align="center" prop="pacRemark" /> - <el-table-column label="澶囨敞" align="center" prop="price" /> - </el-table> - <span slot="footer" class="dialog-footer"> - <el-button @click="open = false">鍙� 娑�</el-button> - <el-button type="primary" @click="handleOk">纭� 瀹�</el-button> - </span> - </el-dialog> - - </div> + <div> + <el-dialog + :title="title" + :visible.sync="open" + width="1200px" + append-to-body + > + <el-form + :model="queryParams" + ref="queryForm" + size="small" + :inline="true" + label-width="68px" + > + <el-form-item label="濮撳悕" prop="name"> + <el-input + v-model="queryParams.name" + placeholder="璇疯緭鍏ュ鍚�" + clearable + @keyup.enter.native="handleQuery" + style="width: 120px" + /> + </el-form-item> + <el-form-item label="鎵嬫満鍙�" prop="sjh"> + <el-input + v-model="queryParams.sjh" + placeholder="璇疯緭鍏ョ數璇濆彿" + clearable + @keyup.enter.native="handleQuery" + style="width: 130px" + /> + </el-form-item> + <el-form-item label="韬唤璇佸彿" prop="sfzh"> + <el-input + v-model="queryParams.sfzh" + placeholder="璇疯緭鍏ヨ韩浠借瘉鍙�" + clearable + @keyup.enter.native="handleQuery" + style="width: 200px" + /> + </el-form-item> + <el-form-item> + <el-button + type="primary" + icon="el-icon-search" + size="mini" + @click="handleQuery" + >鎼滅储</el-button + > + </el-form-item> + </el-form> + <el-table + :data="dataList" + ref="elTable" + v-loading="loading" + border + height="320px" + @selection-change="handleSelectionChange" + > + <el-table-column type="selection" width="40" align="center" /> + <el-table-column label="濮撳悕" prop="xm" align="center" /> + <el-table-column label="鎬у埆" prop="xb" align="center" /> + <el-table-column label="鑱旂郴鐢佃瘽" prop="lxdh" align="center" /> + <el-table-column label="韬唤璇佸彿" prop="sfzh" align="center" /> + </el-table> + <span slot="footer" class="dialog-footer"> + <el-button @click="open = false">鍙� 娑�</el-button> + <el-button type="primary" @click="handleOk">纭� 瀹�</el-button> + </span> + </el-dialog> + </div> </template> - + <script> -import { - Packagestlist, newGetTjPat, getTjYxjcList -} from "@/api/system/package"; +import { selectName } from "@/api/system/package"; import { getConfigKey } from "@/api/system/config"; export default { - name: 'Packages', - props: { - baogao: { - type: Array, - } - + name: "Packages", + props: { + baogao: { + type: Array, }, - data() { - return { - open: false, - openone: 0, - // 寮瑰嚭灞傛爣棰� - title: "", - dataList: [], - // 閬僵灞� - loading: false, - form: { - desc: "" - }, - queryParams: { - pacCode: "", - pacName: "", - pacRemark: "", - }, - list: [], - fList: {} - }; - }, - watch: { - 'baogao'(val, newVla) { - this.openone = 2 - // console.log(val, newVla) - this.dataList = val - // console.log(this.dataList); - - } - - }, - mounted() { - // this.getList() - }, - - created() { - // this.getList() - }, - methods: { - getbaogaoList() { - - }, - getAllList() { - this.loading = true - this.openone = 1 - newGetTjPat(this.queryParams).then(res => { - this.dataList = res.data - this.loading = false - }) - }, - getList() { - this.openone = 0 - this.loading = true - Packagestlist(this.queryParams).then(res => { - this.dataList = res.rows - this.loading = false - }) - }, - handleQuery() { - if (this.openone == 0) { - this.getList() - } else if (this.openone == 1) { - this.getAllList() - } else if (this.openone == 2) { - this.loading = true - getTjYxjcList(this.queryParams).then(res => { - this.dataList = res.data - this.loading = false - }) - } - }, - handleSelectionChange(selection) { - if (selection.length > 1) { - this.$refs.elTable.clearSelection(); // 娓呯┖鎵�鏈夐�夋嫨 - this.$refs.elTable.toggleRowSelection(selection.pop()); // 璁剧疆閫夋嫨椤� - } - this.list = selection; - }, - handleOk() { + }, + data() { + return { + open: false, + // 寮瑰嚭灞傛爣棰� + title: "", + dataList: [], + // 閬僵灞� + loading: false, + form: { + desc: "", + }, + queryParams: { + name: "", + sjh: "", + sfzh: "", + }, + list: [], + fList: {}, + }; + }, + mounted() { + }, + methods: { + handleOk() { this.open = false - if (this.list.length == 1) { - if (this.openone == 2) { - let configKey = "pacsUrl"; - getConfigKey(configKey).then((res) => { - window.open(res.msg+"?"+"colid0="+"202"+"&colvalue0="+this.list[0].xh+"&colid1="+"903"+"&colvalue1="+"2", "_blank"); - }); - } else { - this.$emit('add', this.list); - } - } + this.$emit('add', this.list); + }, + handleQuery() { + this.getList(); + }, + handleSelectionChange(selection) { + if (selection.length > 1) { + // 濡傛灉閫夋嫨浜嗗琛岋紝淇濈暀鏈�鍚庝竴琛� + this.$refs.elTable.clearSelection(); // 娓呯┖鎵�鏈夐�夋嫨 + this.$refs.elTable.toggleRowSelection(selection[selection.length - 1]); // 閲嶆柊閫夋嫨鏈�鍚庝竴椤� + } + // 鑾峰彇鏈�鍚庨�夋嫨鐨勮 + this.list = [selection[selection.length - 1]]; + console.log(this.list) + }, + getList() { + this.loading = true; + selectName(this.queryParams).then((res) => { + if (res.data) { + this.dataList = res.data; + this.loading = false; } - } -} + }); + }, + }, +}; </script> - + <style scoped></style> - \ No newline at end of file diff --git a/src/views/system/tijian/index.vue b/src/views/system/tijian/index.vue index 2b6af1b..9d0231d 100644 --- a/src/views/system/tijian/index.vue +++ b/src/views/system/tijian/index.vue @@ -135,11 +135,11 @@ }, ]" > - <!-- style="display: inline-block; border-bottom: 2px solid blue" - @click="openname" --> + <span slot="label" - + style="display: inline-block; border-bottom: 2px solid blue" + @click="openname" > 濮撳悕 </span> @@ -1101,12 +1101,12 @@ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - margin-left: 46px + margin-left: 46px; font-size: 16px; margin-right: 20px; " > - {{ this.tableData1[0].pacName || "" }} 宸查�夐」鐩潯鏁帮細<span + <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 >鏉� @@ -1504,7 +1504,7 @@ </span> </el-dialog> <Packages ref="aaa" @add="handleChanges" /> - <selectName ref="bbb" /> + <selectName ref="bbb" @add="handleChangesName"/> </div> </template> @@ -1520,6 +1520,7 @@ } from "@/api/hosp/customer"; import { getPrintSetUp } from "@/api/system/examcharge"; import { + tuantiSelect, deptTreeSelect, projectGetList, getOrder, @@ -1528,6 +1529,7 @@ getCusIdcard, getPackageListName, getaddtTransition, + tuantiqueren, getTransitionList, getByTeamNo, delTbBycusCardIdAndProId, @@ -1834,8 +1836,10 @@ methods: { openname() { + this.$refs.bbb.open = true; - this.$refs.bbb.title = "123"; + this.$refs.bbb.title = "鎼滅储濮撳悕"; + this.$refs.bbb.getList(); }, getCompanyList() { this.loading = true; @@ -2362,13 +2366,7 @@ 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; @@ -2859,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) { @@ -2914,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; }); + } } }, @@ -3010,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) { @@ -3036,7 +3095,9 @@ } catch (error) {} this.loading = false; }); - // this.getData(); + } + + }, // 鐐瑰嚮澶氶�夋鑾峰彇閫変腑鏁版嵁 @@ -3432,7 +3493,8 @@ 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 = []; @@ -3472,21 +3534,54 @@ 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 !== "") { -- Gitblit v1.8.0