|
|
|
@ -18,15 +18,15 @@ |
|
|
|
|
|
|
|
<div class="mainbutton"> |
|
|
|
<div style="margin-left: 10px"> |
|
|
|
<el-button type="primary" @click="removedata">添加 <i class="el-icon-bottom"></i> |
|
|
|
<el-button type="primary" @click="addAbs">添加 <i class="el-icon-bottom"></i> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-left: 10px"> |
|
|
|
<el-button type="primary" @click="addselecteditems">移除 <i class="el-icon-top"></i> |
|
|
|
<el-button type="primary" @click="delAbs">移除 <i class="el-icon-top"></i> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-left: 10px"> |
|
|
|
<el-button type="success" @click="Onsubmit">保存 <i class="el-icon-check"></i> |
|
|
|
<el-button type="success" @click="onSubmit">保存 <i class="el-icon-check"></i> |
|
|
|
</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -73,7 +73,7 @@ export default { |
|
|
|
|
|
|
|
//patientRegisterAbs:[], //体检人员所选组合项目 放vuex |
|
|
|
patientRegisterAbsChoosed: [], //勾选的 体检人员所选组合项目 |
|
|
|
patientRegisterAbsDel: [], //体检人员 待删除的组合项目 |
|
|
|
//patientRegisterAbsDel: [], //体检人员 待删除的组合项目 |
|
|
|
|
|
|
|
patientRegisterAbsRd: { |
|
|
|
id: null, //更新不需传 |
|
|
|
@ -82,7 +82,7 @@ export default { |
|
|
|
patientRegisterId: null, //string($uuid) 登记流水号 |
|
|
|
standardPrice: 0, //number($double) 标准价格 |
|
|
|
chargePrice: 0, // number($double) 实收价格 |
|
|
|
payTypeFlag: "0000", // string 支付方式,比如是自费、免费、单位支付 |
|
|
|
payTypeFlag: "0", // string 支付方式,比如是自费、免费、单位支付 0自费、2免费、1单位支付 |
|
|
|
isCharge: "N", // string 是否已收费 |
|
|
|
//lisRequestId: null, // string($uuid)LIS申请ID |
|
|
|
amount: 1, // integer($int32) 数量 |
|
|
|
@ -97,31 +97,143 @@ export default { |
|
|
|
mounted() { }, |
|
|
|
|
|
|
|
methods: { |
|
|
|
//...mapActions(['getMedicalPackageAsb','getMedicalPackageAsb']), |
|
|
|
...mapActions(['getCustomerOrgGroup','getMedicalPackageAsb', 'getPatientRegisterAbs']), |
|
|
|
|
|
|
|
//保存按钮 |
|
|
|
onSubmit(val) { |
|
|
|
|
|
|
|
}, |
|
|
|
//移除按钮 |
|
|
|
addselecteditems() { }, |
|
|
|
//右侧勾选按钮 |
|
|
|
selecteditems(val) { }, |
|
|
|
// 添加按钮 |
|
|
|
removedata() { }, |
|
|
|
|
|
|
|
// 左侧未选 |
|
|
|
}, |
|
|
|
|
|
|
|
//未选组合项目 勾选情况 |
|
|
|
handleSelectionChange(val) { |
|
|
|
// this.selecteddata = val; |
|
|
|
this.asbItemChoosed = val; |
|
|
|
console.log(this.asbItemChoosed); |
|
|
|
//console.log(this.asbItemChoosed); |
|
|
|
}, |
|
|
|
|
|
|
|
// 添加组合项目 |
|
|
|
///api/app/register-asbitem/many/3fa85f64-5717-4562-b3fc-2c963f66afa6' |
|
|
|
addAbs() { |
|
|
|
let body = [] |
|
|
|
let checked = true |
|
|
|
if(this.asbItemChoosed.length < 1){ |
|
|
|
alert("请选择要添加的组合项目") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
//性别、年龄判断 |
|
|
|
// "displayName": "身高体重", |
|
|
|
// "shortName": "哈f哈", |
|
|
|
// "forSexId": "F", |
|
|
|
// "itemTypeId": "3a0b16de-75b9-c910-c61b-844709a88940", |
|
|
|
// "price": 0, |
|
|
|
//console.log('this.asbItemChoosed.length',this.asbItemChoosed.length) |
|
|
|
for(let i = 0;i<this.asbItemChoosed.length;i++){ |
|
|
|
if(this.patientRegisterForm.sexId == 'U') break //未选性别时,无需判断组合项目性别限制 |
|
|
|
if(this.asbItemChoosed[i].forSexId == 'U') continue |
|
|
|
if(this.asbItemChoosed[i].forSexId != this.patientRegisterForm.sexId){ |
|
|
|
alert(`所选项目:${this.asbItemChoosed[i].displayName},不适合当前人员性别`) |
|
|
|
checked = false |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
//console.log(222,checked) |
|
|
|
if(!checked) return |
|
|
|
|
|
|
|
for(let i = 0;i<this.asbItemChoosed.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 |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
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); |
|
|
|
if (res.code == 1) { |
|
|
|
//未选项目中移除,已选项中添加 |
|
|
|
this.getPatientRegisterAbs(this.patientRegisterForm.id) |
|
|
|
//刷新显示 未选组合项目 |
|
|
|
this.getAsbItemByItemType() |
|
|
|
|
|
|
|
this.$message.success("操作成功"); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
this.$message({type: "error",message: `操作失败,原因:${err}`}); |
|
|
|
}); |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//人员已选组合项目 勾选情况 |
|
|
|
selecteditems(val) { |
|
|
|
this.patientRegisterAbsChoosed = val |
|
|
|
}, |
|
|
|
|
|
|
|
//删除 人员已选中的组合项目 |
|
|
|
delAbs(){ |
|
|
|
let body = [] |
|
|
|
let checked = true |
|
|
|
if(this.patientRegisterAbsChoosed.length < 1){ |
|
|
|
alert("请选择要移除的组合项目") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
for(let i = 0;i<this.patientRegisterAbsChoosed.length;i++){ |
|
|
|
|
|
|
|
if(this.patientRegisterAbsChoosed[i].forSexId != this.patientRegisterForm.sexId){ |
|
|
|
alert(`所选项目:${this.patientRegisterAbsChoosed[i].displayName},不适合当前人员性别`) |
|
|
|
checked = false |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
//console.log(222,checked) |
|
|
|
if(!checked) return |
|
|
|
|
|
|
|
for(let i = 0;i<this.asbItemChoosed.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 |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
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); |
|
|
|
if (res.code == 1) { |
|
|
|
//未选项目中移除,已选项中添加 |
|
|
|
this.getPatientRegisterAbs(this.patientRegisterForm.id) |
|
|
|
//刷新显示 未选组合项目 |
|
|
|
this.getAsbItemByItemType() |
|
|
|
|
|
|
|
this.$message.success("操作成功"); |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch((err) => { |
|
|
|
this.$message({type: "error",message: `操作失败,原因:${err}`}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//项目类别过滤 组合项目 |
|
|
|
getAsbItemByItemType() { |
|
|
|
//console.log('getAsbItemByItemType',typeof v) |
|
|
|
//console.log('getAsbItemByItemType',typeof this.itemTypeIds,this.itemTypeIds) |
|
|
|
let lv = ""; |
|
|
|
if (typeof this.itemTypeIds === "object") { |
|
|
|
lv = this.itemTypeIds[itemTypeIds.length - 1]; |
|
|
|
lv = this.itemTypeIds[this.itemTypeIds.length - 1]; |
|
|
|
} |
|
|
|
|
|
|
|
if (lv) { |
|
|
|
@ -134,11 +246,12 @@ export default { |
|
|
|
arrayReduce(this.dict.asbItem,[...this.patientRegister.patientRegisterAbs],"id=asbitemId"); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//体检登记的组合项目创建 |
|
|
|
registerAsbitem(body) { |
|
|
|
console.log("registerAsbitem"); |
|
|
|
postapi( |
|
|
|
`api/app/register-asbitem?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`, |
|
|
|
`/api/app/register-asbitem?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`, |
|
|
|
body |
|
|
|
).then((res) => { |
|
|
|
console.log("medicalPackageAsb", res); |
|
|
|
|