7 changed files with 673 additions and 409 deletions
-
16src/components/patientRegister/PatientRegisterEdit.vue
-
397src/components/patientRegister/PatientRegisterItem.vue
-
3src/components/patientRegister/PatientRegisterList.vue
-
44src/components/patientRegister/customerOrgTreeAll.vue
-
5src/store/index.js
-
30src/utlis/proFunc.js
-
7src/views/customerOrg/patientRegister.vue
@ -1,138 +1,321 @@ |
|||||
<template> |
|
||||
|
<template>emType |
||||
|
<div style="margin-left: 10px;"> |
||||
<div> |
<div> |
||||
|
<span>项目类别</span> |
||||
|
<el-select |
||||
|
v-model="value" |
||||
|
placeholder="请选择" |
||||
|
style="margin-left: 20px" |
||||
|
@change="getAsbItemByItemType" |
||||
|
clearable |
||||
|
> |
||||
|
<el-option |
||||
|
v-for="item in itemType" |
||||
|
:key="item.id" |
||||
|
:label="item.displayName" |
||||
|
:value="item.id" |
||||
|
> |
||||
|
</el-option> |
||||
|
</el-select> |
||||
|
</div> |
||||
|
|
||||
|
<div class="mainareaBox"> |
||||
|
<el-table |
||||
|
:header-cell-style="{ background: '#eef1f6' }" |
||||
|
:data="asbItem" height="350" |
||||
|
@selection-change="handleSelectionChange" |
||||
|
> |
||||
|
<el-table-column type="selection"></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> |
||||
|
</div> |
||||
|
<div style="margin-left: 10px;"> |
||||
|
<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> |
||||
|
</div> |
||||
|
</div> |
||||
|
|
||||
|
|
||||
|
<div class="mainareaBox"> |
||||
|
<el-table |
||||
|
:header-cell-style="{ background: '#eef1f6' }" |
||||
|
:data="patientRegisterAbs" height="350" |
||||
|
@selection-change="selecteditems" |
||||
|
> |
||||
|
<!-- 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> |
||||
|
</div> |
||||
|
|
||||
</div> |
</div> |
||||
</template> |
</template> |
||||
<script> |
<script> |
||||
|
|
||||
|
import { mapState } from "vuex"; |
||||
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
||||
|
|
||||
|
import { arrayFilter, arrayReduce } from '../../utlis/proFunc' |
||||
export default { |
export default { |
||||
|
|
||||
|
props:['patientRegisterForm'], |
||||
data() { |
data() { |
||||
return { |
return { |
||||
data:{ |
|
||||
contactPerson:[] |
|
||||
}, |
|
||||
form: { |
|
||||
displayName: "", |
|
||||
englishShortName: "", |
|
||||
itemTypeId: "", |
|
||||
price: "", |
|
||||
priceItemId: "", |
|
||||
unitId: "", |
|
||||
defaultResult: "", |
|
||||
referenceRangeTypeFlag: "", |
|
||||
isProduceSummary: "", |
|
||||
isNameIntoSummary: "", |
|
||||
isDiagnosisFunction: "", |
|
||||
diagnosisFunction: "", |
|
||||
isCalculationItem: "", |
|
||||
calculationFunction: "", |
|
||||
isContinueProcess: "", |
|
||||
resultTemplateTypeFlag: "", |
|
||||
inputCheck: "", |
|
||||
isActive: "", |
|
||||
}, |
|
||||
|
|
||||
|
|
||||
dialogContactPerson: false, //联系人弹窗 显示控制 |
|
||||
dialogContactMethod: false, //联系方式弹窗 显示控制 |
|
||||
|
|
||||
|
|
||||
formContactPerson: { |
|
||||
|
|
||||
}, //联系人form表单数据 |
|
||||
|
|
||||
formContactMethod: { |
|
||||
|
|
||||
}, //联系方式form表单数据 |
|
||||
|
|
||||
rules: { |
|
||||
displayName: [ |
|
||||
{ required: true, message: "请输入名称", trigger: "blur" }, |
|
||||
], |
|
||||
englishShortName: [ |
|
||||
{ required: true, message: "请输入英文缩写", trigger: "blur" }, |
|
||||
], |
|
||||
itemTypeId: [ |
|
||||
{ required: true, message: "请输入项目类别", trigger: "blur" }, |
|
||||
], |
|
||||
price: [{ required: true, message: "请输入价格", trigger: "blur" }], |
|
||||
priceItemId: [ |
|
||||
{ required: true, message: "请输入价表项目编码", trigger: "blur" }, |
|
||||
], |
|
||||
unitId: [{ required: true, message: "请输入单位", trigger: "blur" }], |
|
||||
defaultResult: [ |
|
||||
{ required: true, message: "请输入默认结果", trigger: "blur" }, |
|
||||
], |
|
||||
referenceRangeTypeFlag: [ |
|
||||
{ required: true, message: "请输入参考范围类别", trigger: "blur" }, |
|
||||
], |
|
||||
isProduceSummary: [ |
|
||||
{ required: true, message: "请选择是生成小结", trigger: "blur" }, |
|
||||
], |
|
||||
isNameIntoSummary: [ |
|
||||
{ required: true, message: "请输择称进入小结", trigger: "blur" }, |
|
||||
], |
|
||||
isDiagnosisFunction: [ |
|
||||
{ required: true, message: "请选择启用诊断函数", trigger: "blur" }, |
|
||||
], |
|
||||
diagnosisFunction: [ |
|
||||
{ required: true, message: "请输入诊断函数", trigger: "blur" }, |
|
||||
], |
|
||||
isCalculationItem: [ |
|
||||
{ required: true, message: "请选择计算项目", trigger: "blur" }, |
|
||||
], |
|
||||
calculationFunction: [ |
|
||||
{ required: true, message: "请输入计算函数", trigger: "blur" }, |
|
||||
], |
|
||||
isContinueProcess: [ |
|
||||
{ required: true, message: "请选择继续处理", trigger: "blur" }, |
|
||||
], |
|
||||
resultTemplateTypeFlag: [ |
|
||||
{ |
|
||||
required: true, |
|
||||
message: "请输入结果模板类别标志", |
|
||||
trigger: "blur", |
|
||||
}, |
|
||||
], |
|
||||
inputCheck: [ |
|
||||
{ required: true, message: "请选择结果校验公式", trigger: "blur" }, |
|
||||
], |
|
||||
isActive: [{ required: true, message: "请选择启用", trigger: "blur" }], |
|
||||
}, |
|
||||
|
|
||||
isshow: false, |
|
||||
|
itemType: [], //项目类别 |
||||
|
|
||||
|
asbItemAll: [], //所有的组合项目 |
||||
|
asbItem: [], //显示的 未选组合项目 |
||||
|
asbItemChoosed: [], //勾选的 未选组合项目 |
||||
|
|
||||
|
patientRegisterAbs:[], //体检人员所选组合项目 |
||||
|
patientRegisterAbsChoosed:[], //勾选的 体检人员所选组合项目 |
||||
|
|
||||
|
patientRegisterAbsRd:{ |
||||
|
|
||||
|
}, //单个添加的组合项目 |
||||
|
|
||||
}; |
}; |
||||
}, |
}, |
||||
|
computed: { |
||||
|
...mapState(['dict', 'patientRegister','personnelUnit']), |
||||
|
}, |
||||
|
|
||||
created() { |
created() { |
||||
|
this.getItemType(); |
||||
|
this.getAbsItemAll(); |
||||
}, |
}, |
||||
|
|
||||
//挂载完成 |
|
||||
mounted(){ |
mounted(){ |
||||
|
|
||||
}, |
}, |
||||
|
|
||||
methods: { |
methods: { |
||||
|
//保存按钮 |
||||
|
Onsubmit() { |
||||
|
if (!this.personnelUnit.customerOrgGroupId) { |
||||
|
alert("请先选择单位分组"); |
||||
|
return; |
||||
|
} else { |
||||
|
postapi("/api/app/customer-org-group-detail/many", this.addrulst).then( |
||||
|
(res) => { |
||||
|
this.$message.success("操作成功"); |
||||
|
console.log(this.addrulst); |
||||
|
} |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
//移除按钮 |
||||
|
addselecteditems() { |
||||
|
//personnelUnit.nogroupselected |
||||
|
if (this.rightselctedata.length == 0) { |
||||
|
this.$message.warning("已选数据为空无法移动"); |
||||
|
} else { |
||||
|
let count = this.rightselctedata.length - 1; |
||||
|
for (var i = count; i >= 0; i--) { |
||||
|
// this.personnelUnit.nogroupselected.splice(i, 1); |
||||
|
if ( |
||||
|
// !this.rightselctedata.includes(this.rightselctedata[i].displayName) |
||||
|
[...new Set(this.rightselctedata)] |
||||
|
) { |
||||
|
this.asbItem.push(this.rightselctedata[i]); |
||||
|
this.personnelUnit.nogroupselected.splice(i, 1); |
||||
|
|
||||
//联系人 相关操作 |
|
||||
addContactPerson() { |
|
||||
this.$message.success("新增 addContactPerson"); |
|
||||
|
} |
||||
|
// this.asbItem.push(this.rightselctedata[i]); |
||||
|
} |
||||
|
// this. |
||||
|
this.rightselctedata.forEach((item) => { |
||||
|
this.addrulst.push({ |
||||
|
asbitemId: item.id, |
||||
|
price: item.price, |
||||
|
customerOrgGroupId: this.personnelUnit.customerOrgGroupId, |
||||
|
}); |
||||
|
}); |
||||
|
} |
||||
}, |
}, |
||||
editContactPerson() { |
|
||||
this.$message.success("编辑 editContactPerson"); |
|
||||
|
//右侧勾选按钮 |
||||
|
selecteditems(val) { |
||||
|
this.rightselctedata = val; |
||||
|
// this.personnelUnit.nogroupselected = val; |
||||
|
console.log(this.rightselctedata); |
||||
}, |
}, |
||||
delContactPerson() { |
|
||||
this.$message.success("删除 delContactPerson"); |
|
||||
|
// 添加按钮 |
||||
|
removedata() { |
||||
|
if (this.asbItemChoosed.length == 0) { |
||||
|
this.$message.warning("未选数据为空无法移动"); |
||||
|
} else { |
||||
|
this.saveornot = false; |
||||
|
let count = this.asbItemChoosed.length - 1; |
||||
|
for (var i = count; i >= 0; i--) { |
||||
|
// this.asbItem.splice(i, 1); |
||||
|
// this.personnelUnit.nogroupselected.push(this.asbItemChoosed[i]); |
||||
|
if ([...new Set(this.asbItemChoosed)]) { |
||||
|
this.asbItem.splice(i, 1); |
||||
|
this.personnelUnit.nogroupselected.push(this.asbItemChoosed[i]); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
this.asbItemChoosed.forEach((item) => { |
||||
|
this.addrulst.push({ |
||||
|
asbitemId: item.id, |
||||
|
price: item.price, |
||||
|
customerOrgGroupId: this.personnelUnit.customerOrgGroupId, |
||||
|
}); |
||||
|
}); |
||||
|
|
||||
|
} |
||||
}, |
}, |
||||
|
|
||||
rowickContactPerson(){ |
|
||||
this.$message.success("rowickContactPerson"); |
|
||||
|
// 左侧未选 |
||||
|
handleSelectionChange(val) { |
||||
|
// this.selecteddata = val; |
||||
|
this.asbItemChoosed = val; |
||||
|
console.log(this.asbItemChoosed); |
||||
}, |
}, |
||||
|
|
||||
|
//获取所有组合项目 |
||||
|
getAbsItemAll() { |
||||
|
getapi("/api/app/asbitem/in-filter?Filter").then((res) => { |
||||
|
this.asbItemAll = res.data.items; |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
|
||||
|
//项目类别过滤 组合项目 |
||||
|
getAsbItemByItemType(v) { |
||||
|
if(v){ |
||||
|
this.asbItem = [...this.asbItemAll] |
||||
|
}else{ |
||||
|
this.asbItem = arrayFilter(this.asbItemAll,'itemTypeId',v) |
||||
|
} |
||||
|
|
||||
|
//刷新显示 未选组合项目 |
||||
|
arrayReduce(this.asbItem,[...this.patientRegisterAbs],'id=asbitemId') |
||||
|
}, |
||||
|
|
||||
|
//获取所有项目类别 |
||||
|
getItemType() { |
||||
|
getapi("/api/app/item-type/by-code-all").then((res) => { |
||||
|
this.itemType = res.data; |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
|
//获取当前列表数据 |
||||
|
listeninglist() { |
||||
|
getapi( |
||||
|
`/api/app/customer-org-group/${this.personnelUnit.customerOrgGroupId}` |
||||
|
).then((res) => { |
||||
|
this.personnelUnit.form = res.data; |
||||
|
console.log(res); |
||||
|
}); |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
//获取分组所包含的组合项目 |
||||
|
getCustomerOrgGroupAsb(){ |
||||
|
console.log('getCustomerOrgGroupAsb'); |
||||
|
if(!this.patientRegisterForm.customerOrgGroupId || this.patientRegisterForm.customerOrgGroupId == this.dict.personOrgId ){ |
||||
|
return |
||||
|
} |
||||
|
getapi(`/api/app/customer-org-group-detail/customer-org-group-detail-in-asbitem?CustomerOrgGroupId=${this.patientRegisterForm.customerOrgGroupId}`) |
||||
|
.then((res) => { |
||||
|
console.log('getCustomerOrgGroupAsb',res); |
||||
|
if(res.code == 1){ |
||||
|
this.patientRegister.customerOrgGroupAsb = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
//获取套餐所包含的组合项目 |
||||
|
getMedicalPackageAsb(){ |
||||
|
if(!this.patientRegisterForm.medicalPackageId || this.patientRegisterForm.medicalPackageId == this.dict.personOrgId ){ |
||||
|
return |
||||
|
} |
||||
|
getapi(`/api/app/medical-package-detail/medical-package-in-asbitem?MedicalPackageId=${this.patientRegisterForm.medicalPackageId}`) |
||||
|
.then((res) => { |
||||
|
console.log('medicalPackageAsb',res); |
||||
|
if(res.code == 1){ |
||||
|
this.patientRegister.medicalPackageAsb = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
//获取体检登记的组合项目 api/app/register-asbitem/in-patient-register-id/3a0c3094-6f37-f5cc-9811-2bc249c081ce |
||||
|
getPatientRegisterAbs(patientRegisterId){ |
||||
|
getapi(`/api/app/register-asbitem/in-patient-register-id/${patientRegisterId}`) |
||||
|
.then((res) => { |
||||
|
console.log('patientRegisterAbs',res); |
||||
|
if(res.code == 1){ |
||||
|
this.patientRegisterAbs = res.data |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
|
||||
|
//体检登记的组合项目创建 |
||||
|
registerAsbitem(body){ |
||||
|
postapi(`api/app/register-asbitem?CustomerOrgId=${this.patientRegisterForm.customerOrgId}`,body) |
||||
|
.then((res) => { |
||||
|
console.log('medicalPackageAsb',res); |
||||
|
if(res.code == 1){ |
||||
|
//未选项目中移除,已选项中添加 |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
}, |
||||
|
|
||||
|
//监听事件 |
||||
|
watch: { |
||||
|
|
||||
|
//新增触发 |
||||
|
'patientRegister.addTimes'(newVal, oldVal) { |
||||
|
//console.log('patientRegister.addTimes newVal:',newVal,' oldVal:',oldVal) |
||||
|
if (newVal != oldVal) { |
||||
|
this.patientRegisterAbs = [] |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
//编辑触发 |
||||
|
'patientRegister.patientRegisterRd.id'(newVal, oldVal) { |
||||
|
console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal) |
||||
|
if (newVal != oldVal) { |
||||
|
this.getPatientRegisterAbs(newVal); |
||||
|
} |
||||
|
}, |
||||
|
|
||||
}, |
}, |
||||
}; |
}; |
||||
</script> |
</script> |
||||
<style scoped> |
<style scoped> |
||||
|
.mainareaBox { |
||||
|
border: 1px solid #000; |
||||
|
height: 350px; |
||||
|
margin-top: 10px; |
||||
|
} |
||||
|
.mainbutton { |
||||
|
display: flex; |
||||
|
margin-left: 20px; |
||||
|
padding: 5px 10px; |
||||
|
margin-top: 10px; |
||||
|
} |
||||
</style> |
</style> |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue