|
|
|
@ -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); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|