|
|
@ -55,13 +55,16 @@ |
|
|
<el-button class="commonbutton" type="danger" @click="asbitemDel(0)" style="width: 100px">删除全部</el-button> |
|
|
<el-button class="commonbutton" type="danger" @click="asbitemDel(0)" style="width: 100px">删除全部</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div style="margin-top: 5px"> |
|
|
<div style="margin-top: 5px"> |
|
|
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('0')" style="width: 100px">全个人支付</el-button> |
|
|
|
|
|
|
|
|
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('0')" |
|
|
|
|
|
style="width: 100px">全个人支付</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div style="margin-top: 5px"> |
|
|
<div style="margin-top: 5px"> |
|
|
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('1')" style="width: 100px">全单位支付</el-button> |
|
|
|
|
|
|
|
|
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('1')" |
|
|
|
|
|
style="width: 100px">全单位支付</el-button> |
|
|
</div> |
|
|
</div> |
|
|
<div style="margin-top: 5px"> |
|
|
<div style="margin-top: 5px"> |
|
|
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('2')" style="width: 100px">全赠送</el-button> |
|
|
|
|
|
|
|
|
<el-button class="commonbutton" type="primary" @click="changePayTypeFlag('2')" |
|
|
|
|
|
style="width: 100px">全赠送</el-button> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
@ -258,8 +261,7 @@ export default { |
|
|
|
|
|
|
|
|
//批量调整项目(确定按钮) |
|
|
//批量调整项目(确定按钮) |
|
|
async asbitemBatchHandle() { |
|
|
async asbitemBatchHandle() { |
|
|
let msg = "", |
|
|
|
|
|
body = {}; |
|
|
|
|
|
|
|
|
let msg = "", body = {}; |
|
|
if (this.asbitemBatch.asbitemsTemp.length == 0) { |
|
|
if (this.asbitemBatch.asbitemsTemp.length == 0) { |
|
|
this.$message.warning("没有选择组合项目,不可执行此操作!"); |
|
|
this.$message.warning("没有选择组合项目,不可执行此操作!"); |
|
|
return; |
|
|
return; |
|
|
@ -275,36 +277,63 @@ export default { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
let createRegisterAsbitemDtos = deepCopy( |
|
|
|
|
|
|
|
|
let registerCheckAsbitems = deepCopy( |
|
|
this.asbitemBatch.asbitemsTemp |
|
|
this.asbitemBatch.asbitemsTemp |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
createRegisterAsbitemDtos.forEach((e) => { |
|
|
|
|
|
delete e.asbitemName; |
|
|
|
|
|
return e; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
// createRegisterAsbitemDtos.forEach((e) => { |
|
|
|
|
|
// delete e.asbitemName; |
|
|
|
|
|
// return e; |
|
|
|
|
|
// }); |
|
|
|
|
|
|
|
|
this.elProgress.display = true; |
|
|
this.elProgress.display = true; |
|
|
this.elProgress.percentage = 0; |
|
|
this.elProgress.percentage = 0; |
|
|
|
|
|
let isContinue = true // 遇到错误是否继续 |
|
|
for (let i = 0; i < this.multipleSelection.length; i++) { |
|
|
for (let i = 0; i < this.multipleSelection.length; i++) { |
|
|
createRegisterAsbitemDtos.forEach((e) => { |
|
|
|
|
|
e.patientRegisterId = this.multipleSelection[i].id; |
|
|
|
|
|
return e; |
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
if (!isContinue) break; |
|
|
|
|
|
// createRegisterAsbitemDtos.forEach((e) => { |
|
|
|
|
|
// e.patientRegisterId = this.multipleSelection[i].id; |
|
|
|
|
|
// return e; |
|
|
|
|
|
// }); |
|
|
|
|
|
// body = { |
|
|
|
|
|
// medicalCenterId: this.multipleSelection[i].medicalCenterId, |
|
|
|
|
|
// createRegisterAsbitemDtos, |
|
|
|
|
|
// }; // 旧参数 |
|
|
|
|
|
|
|
|
body = { |
|
|
body = { |
|
|
medicalCenterId: this.multipleSelection[i].medicalCenterId, |
|
|
|
|
|
createRegisterAsbitemDtos, |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
patientRegisterId: this.multipleSelection[i].id, |
|
|
|
|
|
registerCheckAsbitems |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
try { |
|
|
await postapi( |
|
|
|
|
|
"/api/app/registerasbitem/createregisterasbitemincustomerorgmany", |
|
|
|
|
|
body |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
//旧 /api/app/registerasbitem/createregisterasbitemincustomerorgmany |
|
|
|
|
|
let res = await postapi("/api/PatientRegister/BatchAddAsbitems", body); |
|
|
|
|
|
if (res.code == -1) { |
|
|
|
|
|
try { |
|
|
|
|
|
await this.$confirm(`人员 ${this.multipleSelection[i].patientName} 增加项目失败, 是否继续操作其他人员?`, "提示", { |
|
|
|
|
|
confirmButtonText: "是", |
|
|
|
|
|
cancelButtonText: "否", |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
}) |
|
|
} catch (error) { |
|
|
} catch (error) { |
|
|
console.log("批量增加项目错误,原因:", error); |
|
|
|
|
|
|
|
|
console.log(error) // 取消 |
|
|
|
|
|
isContinue = false; |
|
|
} |
|
|
} |
|
|
this.elProgress.percentage = Math.floor( |
|
|
|
|
|
((i + 1) * 100) / this.multipleSelection.length |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
} 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); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
// { |
|
|
// { |
|
|
@ -342,8 +371,9 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
console.log("操作成功!"); |
|
|
|
|
|
this.dialogWin.PatientRegisterEditItemBatch = false; |
|
|
this.dialogWin.PatientRegisterEditItemBatch = false; |
|
|
|
|
|
|
|
|
|
|
|
this.elProgress.display = false; |
|
|
// 操作成功后,刷新列表 |
|
|
// 操作成功后,刷新列表 |
|
|
this.patientRegister.query.times++ |
|
|
this.patientRegister.query.times++ |
|
|
}, |
|
|
}, |
|
|
|