|
|
|
@ -100,7 +100,54 @@ export default { |
|
|
|
...mapActions(['getCustomerOrgGroup','getMedicalPackageAsb', 'getPatientRegisterAbs']), |
|
|
|
|
|
|
|
//保存按钮 |
|
|
|
onSubmit(val) { |
|
|
|
// [ |
|
|
|
// { |
|
|
|
// "registerAsbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", |
|
|
|
// "input": { |
|
|
|
// "chargePrice": 0, |
|
|
|
// "payTypeFlag": "string", |
|
|
|
// "isCharge": "string", |
|
|
|
// "amount": 0, |
|
|
|
// "groupPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" |
|
|
|
// } |
|
|
|
// } |
|
|
|
// ] |
|
|
|
|
|
|
|
onSubmit() { |
|
|
|
let body = [] |
|
|
|
if(this.patientRegister.patientRegisterAbs.length < 1){ |
|
|
|
alert("暂无可操作的数据") |
|
|
|
return |
|
|
|
} |
|
|
|
for(let i=0;i<this.patientRegister.patientRegisterAbs.length;i++){ |
|
|
|
body.push({ |
|
|
|
registerAsbitemId:this.patientRegister.patientRegisterAbs[i].id, |
|
|
|
input:{ |
|
|
|
chargePrice:this.patientRegister.patientRegisterAbs[i].chargePrice, |
|
|
|
payTypeFlag:this.patientRegister.patientRegisterAbs[i].payTypeFlag, |
|
|
|
isCharge:this.patientRegister.patientRegisterAbs[i].isCharge, |
|
|
|
amount:this.patientRegister.patientRegisterAbs[i].amount, |
|
|
|
groupPackageId:this.patientRegister.patientRegisterAbs[i].groupPackageId |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
console.log(`/api/app/register-asbitem/many`,body) |
|
|
|
putapi(`/api/app/register-asbitem/many`,body) |
|
|
|
.then((res) => { |
|
|
|
console.log("onSubmit", res); |
|
|
|
if (res.code == 1) { |
|
|
|
//未选项目中移除,已选项中添加 |
|
|
|
this.getPatientRegisterAbs(this.patientRegisterForm.id) |
|
|
|
//刷新显示 未选组合项目 |
|
|
|
this.getAsbItemByItemType() |
|
|
|
|
|
|
|
this.$message.success("操作成功"); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
this.$message({type: "error",message: `操作失败,原因:${err}`}); |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
@ -155,7 +202,7 @@ export default { |
|
|
|
console.log(`/api/app/register-asbitem/many/${this.patientRegisterForm.customerOrgId}`,body) |
|
|
|
postapi(`/api/app/register-asbitem/many/${this.patientRegisterForm.customerOrgId}`,body) |
|
|
|
.then((res) => { |
|
|
|
console.log("medicalPackageAsb", res); |
|
|
|
console.log("addAbs", res); |
|
|
|
if (res.code == 1) { |
|
|
|
//未选项目中移除,已选项中添加 |
|
|
|
this.getPatientRegisterAbs(this.patientRegisterForm.id) |
|
|
|
@ -177,6 +224,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//删除 人员已选中的组合项目 |
|
|
|
///api/app/register-asbitem/many?RegisterAsbitemIds=3fa85f64-5717-4562-b3fc-2c963f66afa6 |
|
|
|
delAbs(){ |
|
|
|
let body = [] |
|
|
|
let checked = true |
|
|
|
@ -186,32 +234,25 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
for(let i = 0;i<this.patientRegisterAbsChoosed.length;i++){ |
|
|
|
|
|
|
|
if(this.patientRegisterAbsChoosed[i].forSexId != this.patientRegisterForm.sexId){ |
|
|
|
alert(`所选项目:${this.patientRegisterAbsChoosed[i].displayName},不适合当前人员性别`) |
|
|
|
if(this.patientRegisterAbsChoosed[i].isCharge == 'Y') { |
|
|
|
alert(`所选项目:${this.patientRegisterAbsChoosed[i].displayName},已收费,不可删除!`) |
|
|
|
checked = false |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
//console.log(222,checked) |
|
|
|
|
|
|
|
if(!checked) return |
|
|
|
|
|
|
|
for(let i = 0;i<this.asbItemChoosed.length;i++){ |
|
|
|
for(let i = 0;i<this.patientRegisterAbsChoosed.length;i++){ |
|
|
|
body.push({ |
|
|
|
asbitemId: this.asbItemChoosed[i].id, |
|
|
|
patientRegisterId: this.patientRegisterForm.id, |
|
|
|
standardPrice: this.asbItemChoosed[i].price, |
|
|
|
chargePrice: this.asbItemChoosed[i].price, |
|
|
|
payTypeFlag: "0", |
|
|
|
isCharge: "N", |
|
|
|
amount: 1 |
|
|
|
RegisterAsbitemIds: this.patientRegisterAbsChoosed[i].id, |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
console.log(`/api/app/register-asbitem/many/${this.patientRegisterForm.customerOrgId}`,body) |
|
|
|
postapi(`/api/app/register-asbitem/many/${this.patientRegisterForm.customerOrgId}`,body) |
|
|
|
console.log(`/api/app/register-asbitem/many`,body) |
|
|
|
deletapi(`/api/app/register-asbitem/many`,body) |
|
|
|
.then((res) => { |
|
|
|
console.log("medicalPackageAsb", res); |
|
|
|
console.log("delAbs", res); |
|
|
|
if (res.code == 1) { |
|
|
|
//未选项目中移除,已选项中添加 |
|
|
|
this.getPatientRegisterAbs(this.patientRegisterForm.id) |
|
|
|
|