diff --git a/src/components/patientRegister/PatientRegisterEditItemBatch.vue b/src/components/patientRegister/PatientRegisterEditItemBatch.vue index 2aee035..0f30511 100644 --- a/src/components/patientRegister/PatientRegisterEditItemBatch.vue +++ b/src/components/patientRegister/PatientRegisterEditItemBatch.vue @@ -266,6 +266,10 @@ export default { this.$message.warning("没有选择组合项目,不可执行此操作!"); return; } + let registerCheckAsbitems = deepCopy( + this.asbitemBatch.asbitemsTemp + ); + if (this.asbitemBatch.operate == "add") { this.asbitemBatch.asbitemsTemp.forEach((e, index) => { if (!e.amount || !e.chargePrice) { @@ -277,10 +281,6 @@ export default { return; } - let registerCheckAsbitems = deepCopy( - this.asbitemBatch.asbitemsTemp - ); - // createRegisterAsbitemDtos.forEach((e) => { // delete e.asbitemName; // return e; @@ -305,7 +305,6 @@ export default { registerCheckAsbitems } - try { //旧 /api/app/registerasbitem/createregisterasbitemincustomerorgmany let res = await postapi("/api/PatientRegister/BatchAddAsbitems", body); @@ -341,33 +340,62 @@ export default { // patientRegisterId: null, // asbitemIds: [], // } - let asbitemIds = []; + // let asbitemIds = []; if (this.asbitemBatch.isDeleteGroup) { body.isDeleteGroup = "Y"; } else { body.isDeleteGroup = "N"; } + body.registerCheckAsbitems = registerCheckAsbitems this.elProgress.display = true; this.elProgress.percentage = 0; for (let i = 0; i < this.multipleSelection.length; i++) { - this.asbitemBatch.asbitemsTemp.forEach((e) => { - asbitemIds.push(e.asbitemId); - }); - + // this.asbitemBatch.asbitemsTemp.forEach((e) => { + // asbitemIds.push(e.asbitemId); + // }); 旧的参数 + body.patientRegisterId = this.multipleSelection[i].id; - body.asbitemIds = asbitemIds; + // body.asbitemIds = asbitemIds; + + + // { 新的参数 + // "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", + // "isDeleteGroup": "string", + // "registerCheckAsbitems": [ + // { + // "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" + // } + // ] + // } try { - await postapi( - "/api/app/registerasbitem/deleteregisterasbitemincustomerorgmany", - body - ); - } catch (error) { - console.log("批量删除项目错误,原因:", error); + // 旧接口 /api/app/registerasbitem/deleteregisterasbitemincustomerorgmany + let res = await postapi("/api/PatientRegister/BatchDeleteAsbitems", body); + if (res.code == -1) { + try { + await this.$confirm(`人员 ${this.multipleSelection[i].patientName} 删除项目失败, 是否继续操作其他人员?`, "提示", { + confirmButtonText: "是", + cancelButtonText: "否", + type: "warning", + }) + } catch (error) { + console.log(error) // 取消 + isContinue = false; + } + } + } catch (err) { + try { + await this.$confirm(`人员 ${this.multipleSelection[i].patientName} 删除项目失败, 是否继续操作其他人员?`, "提示", { + confirmButtonText: "是", + cancelButtonText: "否", + type: "warning", + }) + } catch (error) { + console.log(error) // 取消 + isContinue = false; + } } - this.elProgress.percentage = Math.floor( - ((i + 1) * 100) / this.multipleSelection.length - ); + this.elProgress.percentage = Math.floor(((i + 1) * 100) / this.multipleSelection.length); } } diff --git a/src/components/patientRegister/PatientRegisterItem.vue b/src/components/patientRegister/PatientRegisterItem.vue index 885b064..5b41a20 100644 --- a/src/components/patientRegister/PatientRegisterItem.vue +++ b/src/components/patientRegister/PatientRegisterItem.vue @@ -655,7 +655,7 @@ export default { lfind = arrayExistObj(this.dataTransOpts.tableM.register_check_asbitem, 'asbitemId', e.asbitemId) if(lfind > -1){ tempRd = Object.assign({}, this.dataTransOpts.tableM.register_check_asbitem.splice(lfind,1)[0]) - if(e.id) this.prAsbDels.push(tempRd) + // if(e.id) this.prAsbDels.push(tempRd) } } }) @@ -765,7 +765,7 @@ export default { this.dataTransOpts.tableM.register_check_asbitem[i].groupPackageId = null }else{ tempRd = Object.assign({}, this.dataTransOpts.tableM.register_check_asbitem.splice(i,1)[0]) - if(tempRd.id) this.prAsbDels.push(tempRd) + // if(tempRd.id) this.prAsbDels.push(tempRd) } } } @@ -841,7 +841,7 @@ export default { this.dataTransOpts.tableM.register_check_asbitem[i].groupPackageId = null }else{ tempRd = Object.assign({}, this.dataTransOpts.tableM.register_check_asbitem.splice(i,1)[0]) - if(tempRd.id) this.prAsbDels.push(tempRd) + // if(tempRd.id) this.prAsbDels.push(tempRd) } } } diff --git a/src/components/patientRegister/PatientRegisterItem240407.vue b/src/components/patientRegister/PatientRegisterItem240407.vue new file mode 100644 index 0000000..885b064 --- /dev/null +++ b/src/components/patientRegister/PatientRegisterItem240407.vue @@ -0,0 +1,1188 @@ + + + +