From 6eb098b9ea2673240e802e4aa460ddc67ec7d869 Mon Sep 17 00:00:00 2001
From: qx <1084500556@qq.com>
Date: 星期二, 12 八月 2025 09:50:35 +0800
Subject: [PATCH] Merge branch 'master' of http://101.42.27.146:5001/r/ltkj_peisweb
---
src/views/reservation/reservations/index.vue | 311 +++++++++++++++++++++++++++++----------------------
1 files changed, 178 insertions(+), 133 deletions(-)
diff --git a/src/views/reservation/reservations/index.vue b/src/views/reservation/reservations/index.vue
index 29c6928..b99dc91 100644
--- a/src/views/reservation/reservations/index.vue
+++ b/src/views/reservation/reservations/index.vue
@@ -605,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
@@ -620,7 +620,7 @@
>
<el-option
v-for="dict in CompanyList"
- :key="dict.cnName"
+ :key="dict.drugManufacturerId"
:label="dict.cnName"
:value="dict.drugManufacturerId"
/>
@@ -915,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"
@@ -941,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"
@@ -1396,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
@@ -1411,7 +1404,7 @@
>
<el-option
v-for="dict in CompanyList"
- :key="dict.cnName"
+ :key="dict.drugManufacturerId"
:label="dict.cnName"
:value="dict.drugManufacturerId"
/>
@@ -1716,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"
@@ -2128,7 +2121,7 @@
cusSex: null,
cusBrithday: null,
cusAddr: null,
- cusPhone: null,
+ phone: null,
yykssj: "", // 棰勭害寮�濮嬫椂闂�
yyjssj: "", // 棰勭害缁撴潫鏃堕棿
cusPostcode: null,
@@ -2140,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,
@@ -2195,7 +2235,7 @@
// cusAddr: [
// { required: true, message: "鐜板眳浣忓湴鍧�涓嶈兘涓虹┖", trigger: "blur" },
// ],
- cusPhone: [
+ phone: [
{ required: true, validator: checkPhoneNum, trigger: "blur" },
],
reservationTime: [
@@ -2235,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,
- companyId: null,
- reservationTime: null,
- isExpire: null,
- },
+
// 琛ㄥ崟鍙傛暟
form: {},
// 琛ㄥ崟鏍¢獙
@@ -2320,6 +2345,7 @@
created() {
this.getList();
},
+
methods: {
isAll(value) {
return value === "" || value === null;
@@ -2367,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;
@@ -2426,15 +2452,15 @@
this.title = "娣诲姞浣撴鍗曚綅淇℃伅缁存姢";
},
idFn1(value) {
- console.log(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;
});
@@ -2515,7 +2541,7 @@
proIds: null,
pacId: null,
company: null,
- drugManufacturerId:null,
+ drugManufacturerId: null,
companyId: null,
jobNo: null,
department: null,
@@ -2549,7 +2575,7 @@
cusSex: null,
cusBrithday: null,
cusAddr: null,
- cusPhone: null,
+ phone: null,
yykssj: "", // 棰勭害寮�濮嬫椂闂�
yyjssj: "", // 棰勭害缁撴潫鏃堕棿
cusPostcode: null,
@@ -2649,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) => {
@@ -2693,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;
@@ -2750,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) => {
@@ -2800,7 +2834,6 @@
this.discount = currentValue;
this.TotalPrice = (this.TotalPrice1 * (this.discount / 10)).toFixed(2);
},
-
Package() {
this.taocan = true;
this.datekey = Date.now();
@@ -3114,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,
@@ -3129,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,
@@ -3146,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,
@@ -3169,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]) {
@@ -3235,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,
@@ -3268,7 +3313,7 @@
} else {
this.$message.warning("璇烽�夋嫨鎮ㄨ浣撴鐨勫唴瀹�");
}
- },
+ }, */
// 鎾ら攢棰勭害路
handleDelete(row) {
--
Gitblit v1.8.0