From 47859cf4fcb5fb26b063a28f4f64a1c19a2acb24 Mon Sep 17 00:00:00 2001 From: pengjun <158915633@qq.com> Date: Wed, 17 Jul 2024 16:50:20 +0800 Subject: [PATCH] room --- .../patientRegister/PatientRegisterList.vue | 60 +- src/components/report/BtnReport.vue | 5 +- .../report/PatientRegisterListNobtn.vue | 7 +- src/components/room/RoomAsbitem.vue | 762 +++++------------- src/components/room/RoomEdit.vue | 168 +--- src/components/room/room.vue | 233 ++---- 6 files changed, 377 insertions(+), 858 deletions(-) diff --git a/src/components/patientRegister/PatientRegisterList.vue b/src/components/patientRegister/PatientRegisterList.vue index 3c98810..9bca321 100644 --- a/src/components/patientRegister/PatientRegisterList.vue +++ b/src/components/patientRegister/PatientRegisterList.vue @@ -141,7 +141,10 @@ 人员登记
- 批量正式登记 + 批量正式登记 +
+
+ 批量转预登记
编辑 @@ -618,10 +621,11 @@ export default { if (isPreview) { this.$peisAPI.printPre(JSON.stringify(toOutShell)) .then(res => { - if (JSON.parse(res).code < 0) { - resolve(JSON.parse(res)) + let lres = JSON.parse(res) + if (lres.code > -1) { + resolve(lres) } else { - reject(JSON.parse(res).message) + reject(lres.message) } }) .catch((err) => { @@ -630,10 +634,11 @@ export default { } else { this.$peisAPI.print(JSON.stringify(toOutShell)) .then(res => { - if (JSON.parse(res).code > -1) { + let lres = JSON.parse(res) + if (lres.code > -1) { return postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [row.id]); } else { - reject(JSON.parse(res).message) + reject(lres.message) } }) .then(res => { @@ -662,10 +667,10 @@ export default { return new Promise((resolve, reject) => { this.guidePrintPromise("0008", false, row) .then(res => { - return this.lisPrint(row,"0002",false) + return this.lisPrint(row, "0002", false) }) .then(res => { - return this.pacsPrint(row,"0004",false) + return this.pacsPrint(row, "0004", false) }) .then(res => { resolve(res) @@ -677,7 +682,7 @@ export default { }, - async printPromise() { + async printPromise() { if (this.multipleSelection.length < 1) { this.$message.info({ showClose: true, message: "请勾选要打印人员检验检查条码的记录!" }); @@ -829,7 +834,7 @@ export default { }, //批量正式登记 - btnAddBatch() { + btnAddBatch(completeFlag) { let patientRegisterIds = [] //取消勾选,换成选择的方式 start // this.multipleSelection = []; @@ -843,14 +848,25 @@ export default { if (this.multipleSelection.length < 1) { - this.$message.info({ showClose: true, message: "请选择状态为预登记的记录!" }); + this.$message.info({ showClose: true, message: "请勾选要操作的记录!" }); return; } + this.multipleSelection.forEach(e => { - patientRegisterIds.push(e.id) + switch (completeFlag) { + case '0': + if(e.completeFlag == '1') patientRegisterIds.push(e.id) + break; + case '1': + if(e.completeFlag == '0') patientRegisterIds.push(e.id) + break; + } }); - let completeFlag = '1' + if(patientRegisterIds.length == 0){ + this.$message.info({ showClose: true, message: "没有可操作的数据!" }); + return; + } let body = { completeFlag, patientRegisterIds } postapi('/api/app/patientregister/updatepatientregistercompleteflagormedicalstartdate', body) .then(res => { @@ -1036,7 +1052,7 @@ export default { body.patientName = this.patientRegister.query.patientName; if (this.patientRegister.query.medicalTypeIds && this.patientRegister.query.medicalTypeIds.length > 0) - body.medicalTypeIds = this.patientRegister.query.medicalTypeIds; + body.medicalTypeIds = this.patientRegister.query.medicalTypeIds; if (this.patientRegister.query.completeFlags && this.patientRegister.query.completeFlags.length > 0) body.completeFlags = this.patientRegister.query.completeFlags; @@ -1063,14 +1079,24 @@ export default { body.phone = this.patientRegister.query.phone; if (this.patientRegister.query.idCardNo) - body = { idNo: this.patientRegister.query.idCardNo }; + body = { + idNo: this.patientRegister.query.idCardNo, + skipCount: this.loadOpts.skipCount, + maxResultCount: this.loadOpts.maxResultCount + }; if (this.patientRegister.query.patientNo) - body = { patientNo: this.patientRegister.query.patientNo }; + body = { + patientNo: this.patientRegister.query.patientNo, + skipCount: this.loadOpts.skipCount, + maxResultCount: this.loadOpts.maxResultCount + }; if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo, + skipCount: this.loadOpts.skipCount, + maxResultCount: this.loadOpts.maxResultCount }; // console.log("/api/app/patientregister/getlistinfilter", body); @@ -1382,7 +1408,7 @@ export default { ], BusinessCode: row.id }; - console.log('this.$peisAPI.toOutShell',toOutShell) + console.log('this.$peisAPI.toOutShell', toOutShell) if (isPreview) { this.$peisAPI.printPre(JSON.stringify(toOutShell)) .then(res => { diff --git a/src/components/report/BtnReport.vue b/src/components/report/BtnReport.vue index 75e32d0..70a9c43 100644 --- a/src/components/report/BtnReport.vue +++ b/src/components/report/BtnReport.vue @@ -162,13 +162,16 @@ export default { } else { // 上传成功 ,更新上传传状态 e.isUpload = 'Y' - console.log('btnUpReport success', JSON.parse(res)) + // console.log('btnUpReport success', JSON.parse(res)) } } else { let patientRegisterId = e.patientRegisterId let res2 = await postapi('/api/app/TransToWebPeis/TransPatientRegisterByPatientRegisterId', { patientRegisterId }) if (res2.code == -1) { console.log('TransToWebPeis err', res2) + }else{ + // 上传成功 ,更新备单状态 + e.isUploadAppoint = 'Y' } } diff --git a/src/components/report/PatientRegisterListNobtn.vue b/src/components/report/PatientRegisterListNobtn.vue index ce1bb1a..862efb8 100644 --- a/src/components/report/PatientRegisterListNobtn.vue +++ b/src/components/report/PatientRegisterListNobtn.vue @@ -16,7 +16,12 @@ - + + + + diff --git a/src/components/room/RoomAsbitem.vue b/src/components/room/RoomAsbitem.vue index 3f8f630..6c7114e 100644 --- a/src/components/room/RoomAsbitem.vue +++ b/src/components/room/RoomAsbitem.vue @@ -5,302 +5,130 @@
项目类别 - +
- + - - + +
-
- 添加 +
+ 添加
-
- 全部添加 +
+ 全部添加
-
- 移除 +
+ 移除 +
+
+ 全部移除
-
- 全部移除 -
-
+
-
+
快速选择 - +
- + - - - + + +
-
- 复制分组 -
-
- 复制套餐 -
-
- 保存 +
+ 保存
- - - - - - - - - - - - - - - - - - - - - - - - 取消 - 确定 - - - - - - - > - - - - - - - - - - - - - - - - - - - 取消 - 确定 - - +
diff --git a/src/components/room/RoomEdit.vue b/src/components/room/RoomEdit.vue index fe976df..fa3e00e 100644 --- a/src/components/room/RoomEdit.vue +++ b/src/components/room/RoomEdit.vue @@ -18,7 +18,7 @@ - + @@ -26,11 +26,10 @@ - + + style="width:310px;" filterable size="small" + :props="{ checkStrictly: true, expandTrigger: 'hover', label: 'displayName', value: 'id', id: 'id', children: 'treeChildren' }"> @@ -59,7 +58,7 @@
- 关闭 + 关闭 @@ -78,13 +77,13 @@ import { deepCopy, objCopy, arrayExistObj, + tcdate } from "../../utlis/proFunc"; -import CustomerOrgGroupAsbitem from "../../components/customerOrg/customerOrgGroupAsbitem.vue"; export default { components: { - CustomerOrgGroupAsbitem, + }, props: ["params"], data() { @@ -124,14 +123,19 @@ export default { moment, dddw, deepCopy, // 获取初始数据 - dictInit() { - //获取单位列表 - getapi("/api/app/customer-org/parent-all").then((res) => { + dictInit() { + //获取体检中心 + getapi("/api/app/organization-units/by-code-all").then((res) => { + if (res.code > -1) { + this.dict.medicalCenter = res.data; + } + }); + + // 项目类别 树结构 + getapi("/api/app/item-type/by-code-all").then((res) => { if (res.code != -1) { - this.customerOrgAll = res.data; - let lfind = arrayExistObj(this.customerOrgAll, "id", this.dict.personOrgId); - if (lfind > -1) this.customerOrgAll.splice(lfind, 1); - this.customerOrg = deepCopy(this.customerOrgAll); + this.dict.itemTypeTree = res.data; + tcdate(this.dict.itemTypeTree); } }); @@ -144,11 +148,11 @@ export default { }, // 生成表单数据 - getFormData(id) { - if (id) { - getapi(`/api/app/customer-org-group/${id}`) + getFormData(roomId) { + if (roomId) { + postapi('/api/app/Room/Get', { roomId }) .then(res => { - if (res.code != -1) { + if (res.code > -1) { this.form = deepCopy(res.data) } }) @@ -169,143 +173,43 @@ export default { let body = deepCopy(this.form); body.roomId = body.id - if(Array.isArray(this.form.itemTypeId) && this.form.itemTypeId.length > 0){ + if (Array.isArray(this.form.itemTypeId) && this.form.itemTypeId.length > 0) { body.itemTypeId = this.form.itemTypeId[this.form.itemTypeId.length - 1] - }else{ + } else { body.itemTypeId = this.form.itemTypeId } - if(!body.itemTypeId){ + if (!body.itemTypeId) { this.$message.warning("必须选择项目类别"); return false; } - + let url = "/api/app/Room/Create" if (this.form.id) { url = "/api/app/Room/Update" } - postapi(url,body).then(res => { - if(res.code > -1){ - this.dialogWin.RommEdit = false - this.dataTransOpts.refresh.room_detail.M++ - } - }) - }); - }, - - // - computePrice() { - if (!this.form.id) { - this.$message.warning("尚未保存信息,不可执行此操作!"); - return; - } - let customerOrgGroupId = this.form.id; - let customerOrgGroupAsbitems = []; //分组包含的套餐 - - getapi(`/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=${customerOrgGroupId}`) - .then((res) => { - if (res.code != -1) { - customerOrgGroupAsbitems = res.data; - - if (customerOrgGroupAsbitems.length < 1) { - this.$message.warning("当前分组尚未设置组合项目,不可执行此操作!"); - } else { - let body = { - customerOrgGroupId, - details: this.madeNewGroupAsbitems( - customerOrgGroupAsbitems, - this.form.price - ), - }; - console.log("body", body); - return postapi("/api/app/customerorggroupdetail/createcustomerorggroupdetailmany", body); + postapi(url, body).then(res => { + if (res.code > -1) { + if(!this.form.id){ + this.form.id = res.data.id } + this.dataTransOpts.tableS.room.id = this.form.id + this.dialogWin.RommEdit = false } }) - .then((res) => { - if (res.code != -1) { - //console.log("操作成功"); - //触发分组明细刷新 - this.form.id = ""; - //要做延时处理,否则不会触发监听 - setTimeout(() => { - this.form.id = customerOrgGroupId; - this.onSubmit("form"); - }, 100); - } - }); - }, - - madeNewGroupAsbitems(oldGroupAsbitems, newTotal) { - newTotal = Math.round(Number(newTotal) * 100) / 100; - let newGroupAsbitems = []; - let oldTotal = Number(0); - oldGroupAsbitems.forEach((e) => { - oldTotal += Number(e.asbitemMoney); //customerOrgGroupDetailMoney - }); - oldTotal = Math.round(Number(oldTotal) * 100) / 100; - - let discount = 0; - if (oldTotal != 0) discount = Math.round((newTotal * 10000) / oldTotal) / 100; - - oldTotal = Number(0); - oldGroupAsbitems.forEach((e) => { - e.customerOrgGroupDetailPrice = Math.round(e.price * discount) / 100; - e.customerOrgGroupDetailMoney = - Math.round( - e.customerOrgGroupDetailPrice * e.customerOrgGroupDetailAmount * 100 - ) / 100; - oldTotal += Number(e.customerOrgGroupDetailMoney); }); - oldTotal = Math.round(Number(oldTotal) * 100) / 100; - - //console.log('discount,oldTotal',discount,oldTotal) - - let didTotal = Math.round(Number(newTotal - oldTotal) * 100) / 100; - if (didTotal != 0) { - for (let i = 0; i < oldGroupAsbitems.length; i++) { - if (oldGroupAsbitems[i].customerOrgGroupDetailAmount == 1) { - oldGroupAsbitems[i].customerOrgGroupDetailPrice = - Math.round( - (Number(oldGroupAsbitems[i].customerOrgGroupDetailPrice) + - Number(didTotal)) * - 100 - ) / 100; - break; - } - } - } - - oldGroupAsbitems.forEach((e) => { - newGroupAsbitems.push({ - customerOrgGroupId: e.customerOrgGroupId, - asbitemId: e.asbitemId, - price: e.customerOrgGroupDetailPrice, - amount: e.customerOrgGroupDetailAmount, - }); - }); - - return newGroupAsbitems; }, - + }, //监听事件 - watch: { - // - // "customerOrgGroup.id"(newVal, oldVal) { - // console.log("customerOrgGroup.id ",newVal,oldVal); - // if (newVal != oldVal) { - // this.getCustomerOrgGroupAsbitems(newVal); - // } - // }, - + watch: { // 体检分组ID未切换换时 也可以强制刷新数据 "dataTransOpts.refresh.room.S": { // immediate: true, handler(newVal, oldVal) { console.log(`watch 体检分组 newVal:${newVal} oldVal:${oldVal} customerOrgGroupId: ${this.dataTransOpts.tableS.room.id}`); - this.getFormData(this.dataTransOpts.tableS.room.id); + if (newVal != oldVal) this.getFormData(this.dataTransOpts.tableS.room.id); } }, }, diff --git a/src/components/room/room.vue b/src/components/room/room.vue index 693a643..d810ccc 100644 --- a/src/components/room/room.vue +++ b/src/components/room/room.vue @@ -10,9 +10,8 @@
体检中心: - + {{ item.displayName }} @@ -25,7 +24,7 @@ - + @@ -46,7 +45,7 @@ - + @@ -83,10 +82,10 @@ 删除
- 置顶 + 置顶
- 置底 + 置底
保存排序 @@ -96,12 +95,12 @@
- +
- @@ -138,38 +137,22 @@ export default { }, tableData: [], //体检单位分组 - customerOrgId: "", //当前选中的体检单位id - customerOrgRegisterList: [], //体检次数列表 - customerOrgRegister: {}, //体检次数 - - curCustomerOrgGroup: {}, // 当前选中分组 - RoomEditParams: {}, //分组 新增时 用到参数 + curRoom: {}, // 当前选中房间 + RoomEditParams: {}, //房间 新增时 用到参数 medicalCenterId: "", // 体检中心 isDrag: false, form: { - //体检单位分组 - customerOrgId: "", //复制分组时用到(预留查历次分组) - isComplete: "N", //体检次数是否完成,如完成不允许调整分组项目 id: "", - medicalCenterId: null, //所属体检次数 displayName: "", - price: 0, + itemTypeId: "", + medicalCenterId: "", forSexId: "A", - maritalStatusId: "A", - ageLowerLimit: 0, - ageUpperLimit: 200, - jobPost: "", - jobTitle: "", - remark: "", - isMaxMedicalTimes: "N", + roomTypeFlag: "0", + queueTime: 0, + isActive: "Y" }, - formOri: {}, //用于对比分析哪些信息更改了 formInit: {}, //表单初始值 - rules: { - displayName: [{ required: true, message: "请填写分组名称", trigger: "blur" }], - }, - }; }, computed: { @@ -211,7 +194,7 @@ export default { this.tableData.forEach((item, index) => { result.push({ id: item.id, displayOrder: index }); }); - putapi("/api/app/customerorggroup/updatesortmany", { + postapi("/api/app/Room/updatesortmany", { itemList: result, }).then((res) => { console.log("操作成功"); @@ -221,26 +204,6 @@ export default { //初始化Sortable组件 rowDrop() { - // this.$nextTick(() => { - // const tbody = document.querySelector(".el-table__body-wrapper tbody"); - // const _this = this; - // Sortable.create(tbody, { - // handle: ".move", - // animation: 300, - // onEnd({ newIndex, oldIndex }) { - // _this.isDrag = false; - // const currRow = _this.tableData.splice(oldIndex, 1)[0]; - // _this.tableData.splice(newIndex, 0, currRow); - // _this.tableData.map((item, index) => { - // if (index == newIndex && index == oldIndex) { - // } else if (index == oldIndex) { - // } else if (index == newIndex) { - // } - // }); - // console.log(_this.tableData.map((item) => item.displayOrder)); - // }, - // }); - // }); this.$nextTick(() => { const el = document.querySelector(".el-table__body-wrapper tbody"); @@ -260,45 +223,36 @@ export default { }); }, - //置底 - btnSetBottom() { - if (!this.dataTransOpts.tableS.customer_org_group.id) { + // 置底 或 置顶 + btnSetBottomOrTop(sortType) { + if (!this.dataTransOpts.tableS.room.id) { this.$message.warning("请选择操作的数据"); return; } - let lfind = arrayExistObj(this.tableData, "id", this.dataTransOpts.tableS.customer_org_group.id); - let currentRow = {}; - - putapi( - `/api/app/customerorggroup/updatemanysort?id=${this.dataTransOpts.tableS.customer_org_group.id}&SortType=2` - ).then((res) => { - console.log("操作成功"); - currentRow = this.tableData.splice(lfind, 1)[0]; //删除并赋值 - this.tableData.push(currentRow); - this.$refs["tableData"].setCurrentRow(currentRow); - }); - }, - - //置顶 - btnSetTop() { - if (!this.dataTransOpts.tableS.customer_org_group.id) { - this.$message.warning("请选择操作的数据"); - return; + let body = { + roomId: this.dataTransOpts.tableS.room.id, + sortType } - - let lfind = arrayExistObj(this.tableData, "id", this.dataTransOpts.tableS.customer_org_group.id); - let currentRow = {}; - - putapi( - `/api/app/customerorggroup/updatemanysort?id=${this.dataTransOpts.tableS.customer_org_group.id}&SortType=1` - ).then((res) => { - console.log("操作成功"); - currentRow = this.tableData.splice(lfind, 1)[0]; - this.tableData.unshift(currentRow); - this.$refs["tableData"].setCurrentRow(currentRow); - }); + postapi('/api/app/Room/UpdateManySort', body) + .then((res) => { + if (res.code > -1) { + console.log("操作成功"); + let lfind = arrayExistObj(this.tableData, "id", body.roomId); + if (lfind > -1) { + let currentRow = {}; + currentRow = this.tableData.splice(lfind, 1)[0]; //删除并赋值 + if (sortType == 2) { + this.tableData.push(currentRow); + } else { + this.tableData.unshift(currentRow); + } + this.$refs["tableData"].setCurrentRow(currentRow); + } + } + }); }, + //选中颜色 handleRowClassName({ row, rowIndex }) { // highLightBg 为 'selected'的高亮 @@ -339,6 +293,8 @@ export default { //获取房间列表 getRoom(medicalCenterId) { + this.dataTransOpts.tableS.room.id = "" + this.curRoom = {} this.isDrag = false; objCopy(this.formInit, this.form); this.form.medicalCenterId = medicalCenterId; @@ -352,7 +308,7 @@ export default { }); }, - //选择体检中心 + //选择体检中心 changeMedicalCenter(v) { // console.log('changeMedicalCenter', v) this.getRoom(v) @@ -360,21 +316,18 @@ export default { //点击房间 rowClick(row) { - this.dataTransOpts.tableS.customer_org_group.id = row.id - this.curCustomerOrgGroup = deepCopy(row); - this.curCustomerOrgGroup.isComplete = this.customerOrgRegister.isComplete; - setTimeout(() => { - this.dataTransOpts.refresh.customer_org_group_detail.M++; - }, 20); + this.curRoom = row + this.dataTransOpts.tableS.room.id = row.id + this.dataTransOpts.refresh.room_detail.M++; }, // 新增(编辑调用时,传入id值) 弹框 btnAdd(id) { if (!id) this.dataTransOpts.tableS.room.id = '' - + this.dataTransOpts.refresh.room.S++ if (!id) this.dataTransOpts.refresh.room_detail.M++; //新增则清掉已选组合项目 - + this.RoomEditParams = { medicalCenterId: this.medicalCenterId } @@ -383,23 +336,19 @@ export default { //编辑弹框 btnEdit() { - if (!this.dataTransOpts.tableS.customer_org_group.id) { - this.$message.warning("请先选择体检分组"); + if (!this.dataTransOpts.tableS.room.id) { + this.$message.warning("请先选择分诊叫号房间"); return; } - this.btnAdd(this.dataTransOpts.tableS.customer_org_group.id) + this.btnAdd(this.dataTransOpts.tableS.room.id) }, //删除 btnDel() { - if (!this.dataTransOpts.tableS.customer_org_group.id) { + if (!this.dataTransOpts.tableS.room.id) { this.$message.warning("请选择需要操作的数据"); return; } - if (this.customerOrgRegister.isComplete.toUpperCase() == "Y") { - this.$message.warning("该单位体检次数已完成,不允许删除分组"); - return; - } this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { confirmButtonText: "是", @@ -407,17 +356,15 @@ export default { type: "warning", }) .then(() => { - return deletapi(`/api/app/customer-org-group/${this.dataTransOpts.tableS.customer_org_group.id}`); + return postapi('/api/app/Room/Delete', { roomId: this.dataTransOpts.tableS.room.id }); }) .then((res) => { if (res.code != -1) { console.log("删除成功"); - let lfind = arrayExistObj(this.tableData, "id", this.dataTransOpts.tableS.customer_org_group.id); + let lfind = arrayExistObj(this.tableData, "id", this.dataTransOpts.tableS.room.id); if (lfind > -1) this.tableData.splice(lfind, 1); - this.dataTransOpts.tableS.customer_org_group.id = '' - setTimeout(() => { - this.dataTransOpts.refresh.customer_org_group_detail.M++ - }, 20); + this.dataTransOpts.tableS.room.id = '' + this.dataTransOpts.refresh.room_detail.M++ } }) .catch((err) => { @@ -428,66 +375,12 @@ export default { }); }, - - - madeNewGroupAsbitems(oldGroupAsbitems, newTotal) { - newTotal = Math.round(Number(newTotal) * 100) / 100; - let newGroupAsbitems = []; - let oldTotal = Number(0); - oldGroupAsbitems.forEach((e) => { - oldTotal += Number(e.asbitemMoney); //customerOrgGroupDetailMoney - }); - oldTotal = Math.round(Number(oldTotal) * 100) / 100; - - let discount = 0; - if (oldTotal != 0) discount = Math.round((newTotal * 10000) / oldTotal) / 100; - - oldTotal = Number(0); - oldGroupAsbitems.forEach((e) => { - e.customerOrgGroupDetailPrice = Math.round(e.price * discount) / 100; - e.customerOrgGroupDetailMoney = - Math.round( - e.customerOrgGroupDetailPrice * e.customerOrgGroupDetailAmount * 100 - ) / 100; - oldTotal += Number(e.customerOrgGroupDetailMoney); - }); - oldTotal = Math.round(Number(oldTotal) * 100) / 100; - - //console.log('discount,oldTotal',discount,oldTotal) - - let didTotal = Math.round(Number(newTotal - oldTotal) * 100) / 100; - if (didTotal != 0) { - for (let i = 0; i < oldGroupAsbitems.length; i++) { - if (oldGroupAsbitems[i].customerOrgGroupDetailAmount == 1) { - oldGroupAsbitems[i].customerOrgGroupDetailPrice = - Math.round( - (Number(oldGroupAsbitems[i].customerOrgGroupDetailPrice) + - Number(didTotal)) * - 100 - ) / 100; - break; - } - } - } - - oldGroupAsbitems.forEach((e) => { - newGroupAsbitems.push({ - customerOrgGroupId: e.customerOrgGroupId, - asbitemId: e.asbitemId, - price: e.customerOrgGroupDetailPrice, - amount: e.customerOrgGroupDetailAmount, - }); - }); - - return newGroupAsbitems; - }, - // 关闭 分组 新增/编辑 close_dialogWinRoomEdit() { - let id = this.dataTransOpts.tableS.customer_org_group.id + let id = this.dataTransOpts.tableS.room.id if (id) { // 点编辑 或 新增有提交 - getapi(`/api/app/customer-org-group/${id}`) + postapi('/api/app/Room/Get', { roomId:id }) .then(res => { if (res.code != -1) { let lfind = -1 @@ -504,16 +397,18 @@ export default { this.$refs["tableData"].setCurrentRow(this.tableData[lfind]); // 更新 customer_org_group_detail 参数 - this.curCustomerOrgGroup = deepCopy(res.data); - this.curCustomerOrgGroup.isComplete = this.customerOrgRegister.isComplete; + this.curRoom = deepCopy(res.data); + + this.dataTransOpts.refresh.room_detail.M++; } }) } else { // 点 新增 但未提交 - this.dataTransOpts.tableS.customer_org_group.id = this.curCustomerOrgGroup.id || '' + this.dataTransOpts.tableS.room.id = this.curRoom.id || '' + this.dataTransOpts.refresh.room_detail.M++; } - this.dataTransOpts.refresh.customer_org_group_detail.M++; + }, }, };