|
|
|
@ -2,69 +2,59 @@ |
|
|
|
<div style="margin-left: 10px"> |
|
|
|
<div> |
|
|
|
<span>项目类别</span> |
|
|
|
<el-cascader |
|
|
|
:options="dict.itemTypeTree" |
|
|
|
:props="{ |
|
|
|
checkStrictly: true, |
|
|
|
expandTrigger: 'hover', |
|
|
|
...customerOrg.treeprops, |
|
|
|
}" |
|
|
|
:show-all-levels="false" |
|
|
|
clearable |
|
|
|
filterable |
|
|
|
@change="getAsbItemByItemType" |
|
|
|
> |
|
|
|
<el-cascader :options="dict.itemTypeTree" v-model="itemTypeIds" |
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" :show-all-levels="false" |
|
|
|
clearable filterable @change="getAsbItemByItemType"> |
|
|
|
</el-cascader> |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="mainareaBox"> |
|
|
|
<el-table |
|
|
|
:header-cell-style="{ background: '#eef1f6' }" |
|
|
|
:data="dict.asbItem" |
|
|
|
height="350" |
|
|
|
@selection-change="handleSelectionChange" |
|
|
|
> |
|
|
|
<el-table :header-cell-style="{ background: '#eef1f6' }" :data="dict.asbItem" height="350" |
|
|
|
@selection-change="handleSelectionChange" size="small"> |
|
|
|
<el-table-column type="selection"></el-table-column> |
|
|
|
<el-table-column |
|
|
|
label="未选组合项目" |
|
|
|
prop="displayName" |
|
|
|
></el-table-column> |
|
|
|
<el-table-column label="未选组合项目" prop="displayName"></el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
|
|
|
|
<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="removedata">添加 <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="addselecteditems">移除 <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> |
|
|
|
|
|
|
|
<div class="mainareaBox"> |
|
|
|
<el-table |
|
|
|
:header-cell-style="{ background: '#eef1f6' }" |
|
|
|
:data="patientRegister.patientRegisterAbs" |
|
|
|
height="350" |
|
|
|
@selection-change="selecteditems" |
|
|
|
> |
|
|
|
<el-table :header-cell-style="{ background: '#eef1f6' }" :data="patientRegister.patientRegisterAbs" height="350" |
|
|
|
@selection-change="selecteditems" size="small"> |
|
|
|
<!-- temporaryselection personnelUnit.nogroupselected--> |
|
|
|
<el-table-column type="selection"></el-table-column> |
|
|
|
<el-table-column label="已选组合项目" width="110" prop="asbitemName" /> |
|
|
|
<el-table-column label="标准价格" prop="standardPrice" /> |
|
|
|
<el-table-column label="折扣" prop="amount" /> |
|
|
|
<el-table-column label="实收价格" prop="chargePrice" /> |
|
|
|
<el-table-column label="支付方式" prop="payTypeFlag" /> |
|
|
|
<el-table-column label="是否收费" prop="isCharge" /> |
|
|
|
<el-table-column label="实收价格" prop="chargePrice" > |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="patientRegister.patientRegisterAbs[scope.$index].chargePrice" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="数量" prop="amount"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="patientRegister.patientRegisterAbs[scope.$index].amount" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="支付方式" prop="payTypeFlag" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="patientRegister.patientRegisterAbs[scope.$index].payTypeFlag"> |
|
|
|
<el-option v-for="item in dict.payType" :key="item.id" :label="item.displayName" :value="item.id" width="100"/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
@ -78,25 +68,26 @@ export default { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
itemType: [], //项目类别 |
|
|
|
|
|
|
|
itemTypeIds:'', //被选中的项目类别ID |
|
|
|
asbItemChoosed: [], //勾选的 未选组合项目 |
|
|
|
|
|
|
|
//patientRegisterAbs:[], //体检人员所选组合项目 放vuex |
|
|
|
patientRegisterAbsChoosed: [], //勾选的 体检人员所选组合项目 |
|
|
|
|
|
|
|
patientRegisterAbsNew: [], //体检人员 待新增的组合项目 |
|
|
|
patientRegisterAbsAdd: [], //体检人员 待新增的组合项目 |
|
|
|
patientRegisterAbsEdit: [], //体检人员 待编辑的组合项目 |
|
|
|
patientRegisterAbsDel: [], //体检人员 待删除的组合项目 |
|
|
|
|
|
|
|
patientRegisterAbsRd: { |
|
|
|
id: null, |
|
|
|
id: null, //更新不需传 |
|
|
|
asbitemId: null, // string($uuid) 组合项目 |
|
|
|
asbitemName:'', //组合项目名称,更新不需传 |
|
|
|
patientRegisterId: null, //string($uuid) 登记流水号 |
|
|
|
standardPrice: 0, //number($double) 标准价格 |
|
|
|
chargePrice: 0, // number($double) 实收价格 |
|
|
|
payTypeFlag: "0000", // string 支付方式,比如是自费、免费、单位支付 |
|
|
|
isCharge: "N", // string 是否已收费 |
|
|
|
lisRequestId: null, // string($uuid)LIS申请ID |
|
|
|
//lisRequestId: null, // string($uuid)LIS申请ID |
|
|
|
amount: 1, // integer($int32) 数量 |
|
|
|
groupPackageId: null, // string($uuid) 分组或者套餐ID |
|
|
|
}, //单个添加的组合项目 |
|
|
|
@ -106,18 +97,18 @@ export default { |
|
|
|
...mapState(["dict", "customerOrg", "patientRegister", "personnelUnit"]), |
|
|
|
}, |
|
|
|
|
|
|
|
mounted() {}, |
|
|
|
mounted() { }, |
|
|
|
|
|
|
|
methods: { |
|
|
|
//...mapActions(['getMedicalPackageAsb','getMedicalPackageAsb']), |
|
|
|
//保存按钮 |
|
|
|
Onsubmit() {}, |
|
|
|
Onsubmit() { }, |
|
|
|
//移除按钮 |
|
|
|
addselecteditems() {}, |
|
|
|
addselecteditems() { }, |
|
|
|
//右侧勾选按钮 |
|
|
|
selecteditems(val) {}, |
|
|
|
selecteditems(val) { }, |
|
|
|
// 添加按钮 |
|
|
|
removedata() {}, |
|
|
|
removedata() { }, |
|
|
|
|
|
|
|
// 左侧未选 |
|
|
|
handleSelectionChange(val) { |
|
|
|
@ -127,11 +118,11 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//项目类别过滤 组合项目 |
|
|
|
getAsbItemByItemType(v) { |
|
|
|
getAsbItemByItemType() { |
|
|
|
//console.log('getAsbItemByItemType',typeof v) |
|
|
|
let lv = ""; |
|
|
|
if (typeof v === "object") { |
|
|
|
lv = v[v.length - 1]; |
|
|
|
if (typeof this.itemTypeIds === "object") { |
|
|
|
lv = this.itemTypeIds[itemTypeIds.length - 1]; |
|
|
|
} |
|
|
|
|
|
|
|
if (lv) { |
|
|
|
@ -141,11 +132,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
//刷新显示 未选组合项目 |
|
|
|
arrayReduce( |
|
|
|
this.dict.asbItem, |
|
|
|
[...this.patientRegister.patientRegisterAbs], |
|
|
|
"id=asbitemId" |
|
|
|
); |
|
|
|
arrayReduce(this.dict.asbItem,[...this.patientRegister.patientRegisterAbs],"id=asbitemId"); |
|
|
|
}, |
|
|
|
|
|
|
|
//体检登记的组合项目创建 |
|
|
|
@ -163,7 +150,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//选中分组所包含的组合项目 |
|
|
|
getCustomerOrgGroupAsb(customerOrgGroupId) { |
|
|
|
getCustomerOrgGroupAsb(customerOrgGroupId,oldVal) { |
|
|
|
console.log("getCustomerOrgGroupAsb"); |
|
|
|
getapi( |
|
|
|
`/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem?CustomerOrgGroupId=${customerOrgGroupId}` |
|
|
|
@ -176,20 +163,16 @@ export default { |
|
|
|
this.addCustomerOrgGroupAsb(customerOrgGroupId); |
|
|
|
|
|
|
|
//移除旧分组或套餐的组合项目 |
|
|
|
this.removeGroupPackageAsb(customerOrgGroupId); |
|
|
|
this.removeGroupPackageAsb(oldVal); |
|
|
|
|
|
|
|
//刷新显示 未选组合项目 |
|
|
|
arrayReduce( |
|
|
|
this.dict.asbItem, |
|
|
|
[...this.patientRegister.patientRegisterAbs], |
|
|
|
"id=asbitemId" |
|
|
|
); |
|
|
|
this.getAsbItemByItemType() |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//选中套餐所包含的组合项目 |
|
|
|
getMedicalPackageAsb(medicalPackageId) { |
|
|
|
getMedicalPackageAsb(medicalPackageId,oldVal) { |
|
|
|
console.log( |
|
|
|
`/api/app/medical-package-detail/medical-package-in-asbitem?MedicalPackageId=${medicalPackageId}` |
|
|
|
); |
|
|
|
@ -204,44 +187,32 @@ export default { |
|
|
|
this.addMedicalPackageAsb(medicalPackageId); |
|
|
|
|
|
|
|
//移除旧分组或套餐的组合项目 |
|
|
|
this.removeGroupPackageAsb(medicalPackageId); |
|
|
|
this.removeGroupPackageAsb(oldVal); |
|
|
|
|
|
|
|
//刷新显示 未选组合项目 |
|
|
|
arrayReduce( |
|
|
|
this.dict.asbItem, |
|
|
|
[...this.patientRegister.patientRegisterAbs], |
|
|
|
"id=asbitemId" |
|
|
|
); |
|
|
|
this.getAsbItemByItemType() |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//添加新分组的组合项目 |
|
|
|
addCustomerOrgGroupAsb(groupPackageId) { |
|
|
|
console.log('addCustomerOrgGroupAsb') |
|
|
|
let finded = false; |
|
|
|
for (let i = 0; i < this.patientRegister.customerOrgGroupAsb.lenth; i++) { |
|
|
|
for (let i = 0; i < this.patientRegister.customerOrgGroupAsb.length; i++) { |
|
|
|
finded = false; |
|
|
|
for ( |
|
|
|
let j = 0; |
|
|
|
j < this.patientRegister.patientRegisterAbs.lenth; |
|
|
|
j++ |
|
|
|
) { |
|
|
|
if ( |
|
|
|
this.patientRegister.customerOrgGroupAsb[i].asbitemId == |
|
|
|
this.patientRegister.patientRegisterAbs[j].asbitemId |
|
|
|
) { |
|
|
|
this.patientRegister.patientRegisterAbs[j].groupPackageId = |
|
|
|
groupPackageId; |
|
|
|
this.patientRegisterAbsEdit.push({ |
|
|
|
...this.patientRegister.patientRegisterAbs[j], |
|
|
|
}); |
|
|
|
finded = true; |
|
|
|
break; |
|
|
|
console.log('i',i,finded) |
|
|
|
for (let j = 0; j < this.patientRegister.patientRegisterAbs.length; j++) { |
|
|
|
if (this.patientRegister.customerOrgGroupAsb[i].asbitemId == this.patientRegister.patientRegisterAbs[j].asbitemId) { |
|
|
|
this.patientRegister.patientRegisterAbs[j].groupPackageId = groupPackageId |
|
|
|
this.patientRegisterAbsEdit.push({ ...this.patientRegister.patientRegisterAbs[j], }) |
|
|
|
finded = true |
|
|
|
} |
|
|
|
} |
|
|
|
if (!finded) { |
|
|
|
let asbItem = { |
|
|
|
asbitemId: this.patientRegister.customerOrgGroupAsb[i].asbitemId, // string($uuid) 组合项目 |
|
|
|
asbitemId: this.patientRegister.customerOrgGroupAsb[i].id, // string($uuid) 组合项目 |
|
|
|
asbitemName: this.patientRegister.customerOrgGroupAsb[i].displayName, // string($uuid) 组合项目 |
|
|
|
patientRegisterId: this.patientRegisterForm.id, //string($uuid) 登记流水号 |
|
|
|
standardPrice: this.patientRegister.customerOrgGroupAsb[i].price, //number($double) 标准价格 |
|
|
|
chargePrice: this.patientRegister.customerOrgGroupAsb[i].price, // number($double) 实收价格 |
|
|
|
@ -251,7 +222,8 @@ export default { |
|
|
|
amount: 1, // integer($int32) 数量 |
|
|
|
groupPackageId: groupPackageId, // string($uuid) 分组或者套餐ID |
|
|
|
}; |
|
|
|
this.patientRegister.customerOrgGroupAsb.push(); |
|
|
|
console.log('i',i,asbItem) |
|
|
|
this.patientRegister.patientRegisterAbs.push(asbItem); |
|
|
|
this.patientRegisterAbsAdd.push(asbItem); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -260,29 +232,19 @@ export default { |
|
|
|
//添加新套餐的组合项目 |
|
|
|
addMedicalPackageAsb(groupPackageId) { |
|
|
|
let finded = false; |
|
|
|
for (let i = 0; i < this.patientRegister.medicalPackageAsb.lenth; i++) { |
|
|
|
for (let i = 0; i < this.patientRegister.medicalPackageAsb.length; i++) { |
|
|
|
finded = false; |
|
|
|
for ( |
|
|
|
let j = 0; |
|
|
|
j < this.patientRegister.patientRegisterAbs.lenth; |
|
|
|
j++ |
|
|
|
) { |
|
|
|
if ( |
|
|
|
this.patientRegister.medicalPackageAsb[i].asbitemId == |
|
|
|
this.patientRegister.patientRegisterAbs[j].asbitemId |
|
|
|
) { |
|
|
|
this.patientRegister.patientRegisterAbs[j].groupPackageId = |
|
|
|
groupPackageId; |
|
|
|
this.patientRegisterAbsEdit.push({ |
|
|
|
...this.patientRegister.patientRegisterAbs[j], |
|
|
|
}); |
|
|
|
finded = true; |
|
|
|
break; |
|
|
|
for (let j = 0; j < this.patientRegister.patientRegisterAbs.length; j++) { |
|
|
|
if (this.patientRegister.medicalPackageAsb[i].asbitemId == this.patientRegister.patientRegisterAbs[j].asbitemId) { |
|
|
|
this.patientRegister.patientRegisterAbs[j].groupPackageId = groupPackageId |
|
|
|
this.patientRegisterAbsEdit.push({...this.patientRegister.patientRegisterAbs[j],}) |
|
|
|
finded = true |
|
|
|
} |
|
|
|
} |
|
|
|
if (!finded) { |
|
|
|
let asbItem = { |
|
|
|
asbitemId: this.patientRegister.medicalPackageAsb[i].asbitemId, // string($uuid) 组合项目 |
|
|
|
asbitemId: this.patientRegister.medicalPackageAsb[i].id, // string($uuid) 组合项目 |
|
|
|
asbitemName: this.patientRegister.medicalPackageAsb[i].displayName, // string($uuid) 组合项目 |
|
|
|
patientRegisterId: this.patientRegisterForm.id, //string($uuid) 登记流水号 |
|
|
|
standardPrice: this.patientRegister.medicalPackageAsb[i].price, //number($double) 标准价格 |
|
|
|
chargePrice: this.patientRegister.medicalPackageAsb[i].price, // number($double) 实收价格 |
|
|
|
@ -292,7 +254,7 @@ export default { |
|
|
|
amount: 1, // integer($int32) 数量 |
|
|
|
groupPackageId: groupPackageId, // string($uuid) 分组或者套餐ID |
|
|
|
}; |
|
|
|
this.patientRegister.customerOrgGroupAsb.push(asbItem); |
|
|
|
this.patientRegister.patientRegisterAbs.push(asbItem); |
|
|
|
this.patientRegisterAbsAdd.push(asbItem); |
|
|
|
} |
|
|
|
} |
|
|
|
@ -300,14 +262,9 @@ export default { |
|
|
|
|
|
|
|
//移除旧分组或套餐的组合项目 |
|
|
|
removeGroupPackageAsb(groupPackageId) { |
|
|
|
for (let i = 0; i < this.patientRegister.patientRegisterAbs.lenth; i++) { |
|
|
|
if ( |
|
|
|
this.patientRegister.patientRegisterAbs[i].groupPackageId == |
|
|
|
groupPackageId |
|
|
|
) { |
|
|
|
this.patientRegisterAbsDel.push({ |
|
|
|
id: this.patientRegister.patientRegisterAbs[i].id, |
|
|
|
}); |
|
|
|
for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) { |
|
|
|
if (this.patientRegister.patientRegisterAbs[i].groupPackageId == groupPackageId) { |
|
|
|
this.patientRegisterAbsDel.push({id: this.patientRegister.patientRegisterAbs[i].id,}); |
|
|
|
this.patientRegister.patientRegisterAbs.splice(i, 1); |
|
|
|
i--; |
|
|
|
} |
|
|
|
@ -319,27 +276,17 @@ export default { |
|
|
|
watch: { |
|
|
|
//分组改变,查出当前分组下对应的组合项目 |
|
|
|
"patientRegisterForm.customerOrgGroupId"(newVal, oldVal) { |
|
|
|
console.log( |
|
|
|
"watch patientRegisterForm.customerOrgGroupId newVal:", |
|
|
|
newVal, |
|
|
|
" oldVal:", |
|
|
|
oldVal |
|
|
|
); |
|
|
|
console.log("watch patientRegisterForm.customerOrgGroupId newVal:",newVal," oldVal:",oldVal); |
|
|
|
if (newVal != oldVal) { |
|
|
|
this.getCustomerOrgGroupAsb(newVal); |
|
|
|
this.getCustomerOrgGroupAsb(newVal,oldVal); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//套餐改变,查出当前套餐下对应的组合项目 |
|
|
|
"patientRegisterForm.medicalPackageId"(newVal, oldVal) { |
|
|
|
console.log( |
|
|
|
"watch patientRegisterForm.medicalPackageId newVal:", |
|
|
|
newVal, |
|
|
|
" oldVal:", |
|
|
|
oldVal |
|
|
|
); |
|
|
|
console.log("watch patientRegisterForm.medicalPackageId newVal:",newVal," oldVal:",oldVal); |
|
|
|
if (newVal != oldVal) { |
|
|
|
this.getMedicalPackageAsb(newVal); |
|
|
|
this.getMedicalPackageAsb(newVal,oldVal); |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|