From 18f35fe78de41a1b240758c91e05380decb48978 Mon Sep 17 00:00:00 2001 From: lkk <364857242@qq.com> Date: 星期五, 25 七月 2025 17:39:59 +0800 Subject: [PATCH] 1 --- src/views/reservation/reservations/index.vue | 370 +++++++++++++++++++++++++++++++++------------------- 1 files changed, 233 insertions(+), 137 deletions(-) diff --git a/src/views/reservation/reservations/index.vue b/src/views/reservation/reservations/index.vue index c887aac..b99dc91 100644 --- a/src/views/reservation/reservations/index.vue +++ b/src/views/reservation/reservations/index.vue @@ -119,10 +119,10 @@ /> </el-form-item> - <el-form-item label="鍗曚綅鍚嶇О" prop="company"> + <el-form-item label="鍗曚綅鍚嶇О" prop="companyId"> <el-select :remote-method="getRemoteData" - v-model="queryParams.company" + v-model="queryParams.companyId" remote default-first-option allow-create @@ -142,6 +142,18 @@ <i class="el-icon-circle-plus-outline" @click="handleAdd1"></i> </el-form-item> + <!-- <el-form-item label="濂楅鍚嶇О" prop="dwDeptName"> + <el-select v-model="queryParams.dwDeptName" placeholder="璇烽�夋嫨濂楅鍚嶇О" clearable style="width: 100%" + @change="idFn2"> + <el-option v-for="dict in deptList" :key="dict.id" :label="dict.dwDeptName" :value="dict.id" /> + </el-select> + </el-form-item> + + <el-form-item label="鍒嗙粍鍚嶇О" prop="groupingName"> + <el-select v-model="queryParams.groupingName" placeholder="璇烽�夋嫨鍒嗙粍鍚嶇О" clearable style="width: 100%"> + <el-option v-for="dict in groupingList" :key="dict.id" :label="dict.pacName" :value="dict.id" /> + </el-select> + </el-form-item> --> <el-form-item label="棰勭害鏃堕棿"> <el-date-picker clearable @@ -184,6 +196,7 @@ /> </el-select> </el-form-item> + <el-form-item> <el-button type="primary" @@ -319,7 +332,7 @@ <span>{{ parseTime(scope.row.reservationTime, "{y}-{m}-{d}") }}</span> </template> </el-table-column> - <el-table-column + <!-- <el-table-column label="浣撴绫诲瀷" align="center" prop="tjType" @@ -329,7 +342,7 @@ <template slot-scope="scope"> <dict-tag :options="dict.type.dict_team" :value="scope.row.tjType" /> </template> - </el-table-column> + </el-table-column> --> <el-table-column label="濠氬Щ" align="center" @@ -379,9 +392,23 @@ :show-overflow-tooltip="true" /> <el-table-column - label="閭" + label="濂楅鍚嶇О" align="center" - prop="email" + prop="dwDeptName" + :show-overflow-tooltip="true" + width="160px" + /> + <el-table-column + label="鍒嗙粍鍚嶇О" + align="center" + prop="groupingName" + :show-overflow-tooltip="true" + width="160px" + /> + <el-table-column + label="鍗曚綅閮ㄩ棬" + align="center" + prop="department" :show-overflow-tooltip="true" width="160px" /> @@ -578,10 +605,10 @@ style="width: 160px" /> </el-form-item> - <el-form-item label="鍗曚綅鍚嶇О" prop="company"> + <el-form-item label="鍗曚綅鍚嶇О" prop="companyId"> <el-select :remote-method="getRemoteData" - v-model="formIn.company" + v-model="formIn.companyId" remote default-first-option allow-create @@ -593,7 +620,7 @@ > <el-option v-for="dict in CompanyList" - :key="dict.cnName" + :key="dict.drugManufacturerId" :label="dict.cnName" :value="dict.drugManufacturerId" /> @@ -888,24 +915,16 @@ align="center" > </el-table-column> - <el-table-column + <!-- <el-table-column prop="proType" label="鎬у埆" width="50" align="center" > <template slot-scope="scope"> - <template v-if="isAll(scope.row.proType)"> - 鍏ㄩ儴 - </template> - <template v-else> - <dict-tag - :options="dict.type.sys_user_sex" - :value="scope.row.proType" - /> - </template> + {{ scope.row.proType || '鍏ㄩ儴' }} </template> - </el-table-column> + </el-table-column> --> <el-table-column prop="ordPrice" @@ -914,10 +933,11 @@ > </el-table-column> <el-table-column label="鎶樻墸" width="160px" align="center"> + <!-- @input="validateDiscount(scope.row)" --> + <template slot-scope="scope"> <el-input-number v-model.number="scope.row.discount" - @input="validateDiscount(scope.row)" placeholder="杈撳叆鎶樻墸" size="small" type="number" @@ -1369,10 +1389,10 @@ style="width: 160px" /> </el-form-item> - <el-form-item label="鍗曚綅鍚嶇О" prop="company"> + <el-form-item label="鍗曚綅鍚嶇О" prop="companyId"> <el-select :remote-method="getRemoteData" - v-model="formIn.company" + v-model="formIn.companyId" remote default-first-option allow-create @@ -1384,7 +1404,7 @@ > <el-option v-for="dict in CompanyList" - :key="dict.cnName" + :key="dict.drugManufacturerId" :label="dict.cnName" :value="dict.drugManufacturerId" /> @@ -1689,10 +1709,10 @@ > </el-table-column> <el-table-column label="鎶樻墸" width="160px" align="center"> + <!-- @input="validateDiscount(scope.row)" --> <template slot-scope="scope"> <el-input-number v-model.number="scope.row.discount" - @input="validateDiscount(scope.row)" placeholder="杈撳叆鎶樻墸" size="small" type="number" @@ -1920,7 +1940,12 @@ </template> <script> -import { addComp, addPlOrderAndDetail } from "@/api/system/comp"; +import { + addComp, + addPlOrderAndDetail, + Deptlist, + getDwAndDwDept, +} from "@/api/system/comp"; import Big from "big.js"; import { Loading } from "element-ui"; import { @@ -1989,6 +2014,8 @@ taocan: false, webSocket: null, defaultKeys: [], + deptList: [], + groupingList: [], value1: "", pacName: "", hides: false, @@ -2094,7 +2121,7 @@ cusSex: null, cusBrithday: null, cusAddr: null, - cusPhone: null, + phone: null, yykssj: "", // 棰勭害寮�濮嬫椂闂� yyjssj: "", // 棰勭害缁撴潫鏃堕棿 cusPostcode: null, @@ -2106,31 +2133,78 @@ cusIntroduce: null, cusNumber: null, cusIsvip: null, + orderByColumn: "reservationTime", + isAsc: "desc", + name: "", + reservationTime: null, + idCard: null, + phoe: null, + email: null, + tjType: null, + companyId: null, + isExpire: null, }, + // 鏌ヨ鍙傛暟 + /* queryParams: { + pageNum: 1, + pageSize: 10, + orderByColumn: "reservationTime", + isAsc: "desc", + name: null, + reservationTime: null, + idCard: null, + phoe: null, + email: null, + tjType: null, + companyId: null, + reservationTime: null, + isExpire: null, + }, */ + /* formIn: { + name: "", + // age: "", + // idCard: "", + // remark: null, + // pacName: "", + // cusaddr: null, + // idType: null, + // ageUnit: null, + // sex: null, + // phoe: "", + // nation: null, + // email: "", + // marriage: null, + // address: "", + // tjCategory: null, + company: "", + // career: null, + // reservationTime: null, + // timeRegion: null, + // indexCard: "", + // department: "", + }, */ + fmobj: {}, formIn: { name: "", - age: "", + idType: "", idCard: "", - remark: null, - pacName: "", - cusaddr: null, - idType: null, - ageUnit: null, - sex: null, + age: "", + ageUnit: "", + sex: "", phoe: "", - nation: null, + nation: "", email: "", - marriage: null, + marriage: "", address: "", - tjCategory: null, - company: "", - career: null, - reservationTime: null, - timeRegion: null, - indexCard: "", + tjCategory: "", department: "", + companyId: "", + company: "", + career: "", + reservationTime: "", + timeRegion: "", + indexCard: "", }, - fmobj: {}, // 琛ㄥ崟鏍¢獙 form1: {}, open1: false, @@ -2161,7 +2235,7 @@ // cusAddr: [ // { required: true, message: "鐜板眳浣忓湴鍧�涓嶈兘涓虹┖", trigger: "blur" }, // ], - cusPhone: [ + phone: [ { required: true, validator: checkPhoneNum, trigger: "blur" }, ], reservationTime: [ @@ -2201,22 +2275,7 @@ valueUrls: "ws://127.0.0.1:6789/websocket", drawer: false, drawer1: false, - // 鏌ヨ鍙傛暟 - queryParams: { - pageNum: 1, - pageSize: 10, - orderByColumn: "reservationTime", - isAsc: "desc", - name: null, - reservationTime: null, - idCard: null, - phoe: null, - email: null, - tjType: null, - company: null, - reservationTime: null, - isExpire: null, - }, + // 琛ㄥ崟鍙傛暟 form: {}, // 琛ㄥ崟鏍¢獙 @@ -2286,6 +2345,7 @@ created() { this.getList(); }, + methods: { isAll(value) { return value === "" || value === null; @@ -2333,7 +2393,7 @@ .then(() => { this.TotalPrice1 = 0; getTransitionList1(row.cusId).then((response) => { - this.tableData1 = response.data; + this.tableData1 = response.data.list; this.tableData1.forEach((item) => { this.TotalPrice1 += item.ordPrice; @@ -2394,13 +2454,27 @@ idFn1(value) { if (value) { this.form.dictCompId = value; - this.CompanyList.forEach((item) => { - if (item.drugManufacturerId == this.form.dictCompId) { - this.form.compName = item.cnName; - this.queryParams.company = item.cnName; - } + console.log(value) + // this.CompanyList.forEach((item) => { + // if (item.drugManufacturerId == this.form.dictCompId) { + // this.form.compName = item.cnName; + // this.queryParams.company = item.cnName; + // } + // }); + Deptlist(value).then((response) => { + this.deptList = response.data; }); } + }, + idFn2(value) { + let data = { + deptId: value, + dwId: this.form.dictCompId, + }; + getDwAndDwDept(data).then((response) => { + // 閮ㄩ棬鍚嶇О + this.groupingList = response.data; + }); }, /** 鏌ヨ浣撴棰勭害鍒楄〃 */ getList() { @@ -2467,6 +2541,7 @@ proIds: null, pacId: null, company: null, + drugManufacturerId: null, companyId: null, jobNo: null, department: null, @@ -2500,7 +2575,7 @@ cusSex: null, cusBrithday: null, cusAddr: null, - cusPhone: null, + phone: null, yykssj: "", // 棰勭害寮�濮嬫椂闂� yyjssj: "", // 棰勭害缁撴潫鏃堕棿 cusPostcode: null, @@ -2600,7 +2675,7 @@ let cusId = response.data.idCard; getTransitionList1(cusId).then((response) => { if (response.data) { - this.tableData1 = response.data; + this.tableData1 = response.data.list; if (this.tableData1.length != 0) { this.TotalPrice1 = 0; this.tableData1.forEach((item) => { @@ -2644,41 +2719,28 @@ /** 淇敼璇︾粏鎸夐挳鎿嶄綔 */ handleUpdate1(row) { this.title = "棰勭害璇︾粏淇℃伅"; - this.formIn = row; - if (this.formIn.timeRegion === 0) { - this.formIn.timeRegion = "8:00-9:00"; - } - if (row.timeRegion === 1) { - this.formIn.timeRegion = "9:00-10:00"; - } - if (row.timeRegion === 2) { - this.formIn.timeRegion = "10:00-11:00"; - } - if (row.timeRegion === 3) { - this.formIn.timeRegion = "11:00-12:00"; - } - if (this.formIn.isExpire === 1) { - this.tijiao1 = false; - } - this.drawer1 = true; - if (this.formIn.discount != null) { - this.discount = this.formIn.discount; - } + //鍏ㄩ儴濂楅 - if (this.formIn.sex != null) { - let cusSex = this.formIn.sex; + if (row.sex != null) { + let cusSex = row.sex; deptTreeSelect(cusSex).then((response) => { this.newpacName = response.rows; 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(); - } - }); + // item4.list.forEach((item6) => { + // if (item6.pacName === item3.pacName) { + // this.$nextTick(() => { + // this.$refs.tb.toggleRowSelection(item3, true); + // }); + // throw Error(); + // } + // }); + if (item4.pacName === item3.pacName) { + this.$nextTick(() => { + this.$refs.tb.toggleRowSelection(item3, true); + }); + throw Error(); + } }); }); this.loading = false; @@ -2701,42 +2763,63 @@ this.loading = false; }); } - let id = this.formIn.id; + let id = row.id; this.list1 = true; - (this.tableData1 = []), - (this.newpacName = []), - getReservation(id).then((response) => { - if (response.data) { - let cusId = response.data.idCard; - getTransitionList1(cusId).then((response) => { - if (response.data) { - this.tableData1 = response.data; + (this.tableData1 = []), (this.newpacName = []), (this.drawer1 = true); + getReservation(id).then((response) => { + if (response.data) { + this.formIn = response.data; - if (this.tableData1.length != 0) { - this.TotalPrice1 = 0; - this.tableData1.forEach((item) => { - this.TotalPrice1 += item.nowPrice; - this.TotalPrice = ( - this.TotalPrice1 * - (this.discount / 10) - ).toFixed(2); - if (item.pacName === null) { - item.pacName = "鍗曢」"; - } - }); - this.list1 = false; - this.list3 = true; - } else { - this.list1 = true; - } + if (this.formIn.timeRegion === 0) { + this.formIn.timeRegion = "8:00-9:00"; + } + if (row.timeRegion === 1) { + this.formIn.timeRegion = "9:00-10:00"; + } + if (row.timeRegion === 2) { + this.formIn.timeRegion = "10:00-11:00"; + } + if (row.timeRegion === 3) { + this.formIn.timeRegion = "11:00-12:00"; + } + if (this.formIn.isExpire === 1) { + this.tijiao1 = false; + } + // this.drawer1 = true; + if (this.formIn.discount != null) { + this.discount = this.formIn.discount; + } + let cusId = this.formIn.idCard; + getTransitionList1(cusId).then((response) => { + if (response.data) { + this.tableData1 = response.data.list; + console.log("tableData1", this.tableData1); + + if (this.tableData1.length != 0) { + this.TotalPrice1 = 0; + this.tableData1.forEach((item) => { + this.TotalPrice1 += item.nowPrice; + this.TotalPrice = ( + this.TotalPrice1 * + (this.discount / 10) + ).toFixed(2); + if (item.pacName === null) { + item.pacName = "鍗曢」"; + } + }); + this.list1 = false; + this.list3 = true; } else { - this.tableData1 = []; - this.list3 = false; this.list1 = true; } - }); - } - }); + } else { + this.tableData1 = []; + this.list3 = false; + this.list1 = true; + } + }); + } + }); /** 鏌ヨ閮ㄩ棬涓嬫媺鏍戠粨鏋� */ projectGetList().then((response) => { @@ -2751,7 +2834,6 @@ this.discount = currentValue; this.TotalPrice = (this.TotalPrice1 * (this.discount / 10)).toFixed(2); }, - Package() { this.taocan = true; this.datekey = Date.now(); @@ -3065,12 +3147,19 @@ if (this.formIn.timeRegion === "11:00-12:00") { this.formIn.timeRegion = 3; } + this.CompanyList.forEach((item) => { + if (item.drugManufacturerId === this.formIn.companyId) { + this.formIn.company = item.cnName; + } + }); + let data; if (pacId) { data = { id: this.formIn.id, isExpire: this.formIn.isExpire, address: this.formIn.address, + companyId: this.formIn.companyId, company: this.formIn.company, department: this.formIn.department, discount: this.discount, @@ -3080,7 +3169,7 @@ name: this.formIn.name, nation: this.formIn.nation, pacId, - phoe: this.formIn.cusPhone, + phoe: this.formIn.phoe, reservationTime: this.formIn.reservationTime, sex: this.formIn.sex, timeRegion: this.formIn.timeRegion, @@ -3097,6 +3186,7 @@ id: this.formIn.id, isExpire: this.formIn.isExpire, address: this.formIn.address, + companyId: this.formIn.companyId, company: this.formIn.company, department: this.formIn.department, discount: this.discount, @@ -3120,19 +3210,23 @@ }; } tjReappoint(data).then((res) => { + console.log("鎺ュ彛鍝嶅簲", res); if (res.code === 200) { this.$modal.msgSuccess("棰勭害鎴愬姛"); + Object.assign(this.formIn, data); + this.getList(); + this.$tab.refreshPage(); + _this.drawer = false; } - _this.drawer = false; }); - this.getList(); - this.$tab.refreshPage(); + // this.getList(); + // this.$tab.refreshPage(); // } else { // this.$message.warning("璇烽�夋嫨鎮ㄨ浣撴鐨勫唴瀹�"); // } }, // 鏈�鍚庢彁浜ゆ寜閽� - submitPrice1() { + /* submitPrice1() { let _this = this; if (_this.tableData1.length > 0) { if (this.tableData[0]) { @@ -3186,7 +3280,7 @@ id: this.formIn.id, isExpire: this.formIn.isExpire, address: this.formIn.address, - company: this.formIn.company, + companyId: this.formIn.companyId, department: this.formIn.department, discount: this.discount, email: this.formIn.email, @@ -3219,7 +3313,7 @@ } else { this.$message.warning("璇烽�夋嫨鎮ㄨ浣撴鐨勫唴瀹�"); } - }, + }, */ // 鎾ら攢棰勭害路 handleDelete(row) { @@ -3359,12 +3453,14 @@ -moz-border-radius: 2em; border-radius: 2em; } + .dialog-footer2 { width: 960px; height: 36px; display: flex; justify-content: center; } + /* 淇敼 婊戝潡 */ #printIframe::-webkit-scrollbar-thumb { background-color: #dcdfe6; -- Gitblit v1.8.0