|
|
|
@ -293,7 +293,7 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="创建时间"> |
|
|
|
<el-input :value="form.creationTime |
|
|
|
? lmoment(form.creationTime, 'yyyy-MM-DD') |
|
|
|
? moment(form.creationTime).format('yyyy-MM-DD') |
|
|
|
: '' |
|
|
|
" disabled size="small"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -306,7 +306,7 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="修改时间"> |
|
|
|
<el-input :value="form.lastModificationTime |
|
|
|
? lmoment(form.lastModificationTime, 'yyyy-MM-DD') |
|
|
|
? moment(form.lastModificationTime).format('yyyy-MM-DD') |
|
|
|
: '' |
|
|
|
" disabled size="small"></el-input> |
|
|
|
</el-form-item> |
|
|
|
@ -406,7 +406,7 @@ |
|
|
|
<el-table-column prop="lastTime" label="末次体检" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.lastTime"> |
|
|
|
{{ lmoment(scope.row.lastTime, "yyyy-MM-DD") }} |
|
|
|
{{ moment(scope.row.lastTime).format("yyyy-MM-DD") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -415,28 +415,28 @@ |
|
|
|
<el-table-column prop="sexId" label="性别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }} |
|
|
|
{{ dddw(dict.sex, "id", scope.row.sexId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="maritalStatusId" label="婚姻"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }} |
|
|
|
{{ dddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="birthDate" label="出生日期" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.birthDate"> |
|
|
|
{{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }} |
|
|
|
{{ moment(scope.row.birthDate).format("yyyy-MM-DD") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="nationId" label="民族"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ ldddw(dict.nation, "id", scope.row.nationId, "displayName") }} |
|
|
|
{{ dddw(dict.nation, "id", scope.row.nationId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -457,7 +457,7 @@ |
|
|
|
@row-click="registerRowClick" size="small"> |
|
|
|
<el-table-column prop="completeFlag" label="体检进度"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ ldddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div> |
|
|
|
<div>{{ dddw(dict.completeFlag, "id", scope.row.completeFlag, "displayName") }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="guidePrintTimes" label="打印" width="50"> |
|
|
|
@ -483,7 +483,7 @@ |
|
|
|
<el-table-column prop="patientName" label="姓名" /> |
|
|
|
<el-table-column prop="sexId" label="性别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div> |
|
|
|
<div>{{ dddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="age" label="年龄" /> |
|
|
|
@ -493,17 +493,17 @@ |
|
|
|
<el-table-column label="分组/套餐" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId"> |
|
|
|
{{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }} |
|
|
|
{{ dddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }} |
|
|
|
</div> |
|
|
|
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId"> |
|
|
|
{{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }} |
|
|
|
{{ dddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="nationId" label="民族"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ ldddw(dict.nation, "nationId", scope.row.nationId, "displayName") }} |
|
|
|
{{ dddw(dict.nation, "nationId", scope.row.nationId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -511,7 +511,7 @@ |
|
|
|
<el-table-column prop="birthDate" label="出生日期" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.birthDate"> |
|
|
|
{{ lmoment(scope.row.birthDate, "yyyy-MM-DD") }} |
|
|
|
{{ moment(scope.row.birthDate).format("yyyy-MM-DD") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -524,21 +524,21 @@ |
|
|
|
<el-table-column prop="maritalStatusId" label="婚姻状况"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }} |
|
|
|
{{ dddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="medicalTypeId" label="体检类别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.medicalTypeId !== dict.personOrgId"> |
|
|
|
{{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }} |
|
|
|
{{ dddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="personnelTypeId" label="人员类别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.personnelTypeId !== dict.personOrgId"> |
|
|
|
{{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }} |
|
|
|
{{ dddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
@ -553,7 +553,7 @@ |
|
|
|
<el-table-column prop="creatorName" label="登记人" /> |
|
|
|
<el-table-column prop="creationTime" label="登记日期" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div> |
|
|
|
<div v-if="scope.row.creationTime">{{ moment(scope.row.creationTime).format("yyyy-MM-DD") }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="isUpload" label="是否上传"> |
|
|
|
@ -758,6 +758,7 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
...mapActions(['getPatientRegisterAbs']), |
|
|
|
dddw,moment, |
|
|
|
|
|
|
|
//初始form表单数据 |
|
|
|
initFormData(){ |
|
|
|
@ -781,7 +782,7 @@ export default { |
|
|
|
`).then(res => { |
|
|
|
if(res.code != - 1){ |
|
|
|
customerOrgParentId = res.data //获取顶级单位ID |
|
|
|
return getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`) //获取单位体检次数信息 |
|
|
|
return getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${customerOrgParentId}`) //获取单位体检次数信息 |
|
|
|
} |
|
|
|
}).then(res =>{ |
|
|
|
if(res.code != - 1){ |
|
|
|
@ -937,6 +938,118 @@ export default { |
|
|
|
this.getCustomerOrgGroup(this.form.customerOrgRegisterId) |
|
|
|
}, |
|
|
|
|
|
|
|
//选中 套餐/分组 所包含的组合项目 |
|
|
|
getGroupPackageAsb(typeFlag, groupPackageId) { |
|
|
|
let delBody = {}; |
|
|
|
let url = typeFlag == 'group' ? |
|
|
|
'/api/app/customerorggroupdetail/getcustomerorggroupdetailinasbitem?CustomerOrgGroupId=' |
|
|
|
: '/api/app/medical-package-detail/medical-package-in-asbitem?MedicalPackageId='; |
|
|
|
let msg = typeFlag == 'group' ? '更换分组' : '更换套餐'; |
|
|
|
|
|
|
|
console.log(`${url}${groupPackageId}`); |
|
|
|
getapi(`${url}${groupPackageId}`) |
|
|
|
.then((res) => { |
|
|
|
console.log("getGroupPackageAsb", res); |
|
|
|
if (res.code != -1) { |
|
|
|
|
|
|
|
//移除旧分组或套餐的组合项目 |
|
|
|
delBody = this.removeGroupPackageAsb(); |
|
|
|
|
|
|
|
//添加或更新已选组合项目 |
|
|
|
this.addGroupPackageAsb(res.data, typeFlag,groupPackageId); |
|
|
|
//console.log('delBody', delBody,delBody['registerAsbitemIds'].length); |
|
|
|
if (delBody['registerAsbitemIds'].length > 0) { |
|
|
|
return postapi(`/api/app/registerasbitem/deletemany`, delBody) |
|
|
|
} else { |
|
|
|
this.onSubmit(msg); |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
.then(res => { |
|
|
|
//console.log('res', res); |
|
|
|
if (res && res.code != -1) { |
|
|
|
//添加新套餐的组合项目 |
|
|
|
this.onSubmit(msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
//移除旧分组或套餐的组合项目 |
|
|
|
removeGroupPackageAsb() { |
|
|
|
let body = { registerAsbitemIds: [] } |
|
|
|
let registerAsbitemIds = [] |
|
|
|
let chargeComplete = '' |
|
|
|
|
|
|
|
//体检基本信息未保存时,删除所有所选项目 |
|
|
|
if (!this.form.id) { |
|
|
|
this.patientRegister.patientRegisterAbs = []; |
|
|
|
return body; |
|
|
|
} |
|
|
|
|
|
|
|
//删除已选 分组或套餐的组合项目 ,如已收费或 已检时,将 groupPackageId 置为null |
|
|
|
for (let i = 0; i < this.patientRegister.patientRegisterAbs.length; i++) { |
|
|
|
if (!this.patientRegister.patientRegisterAbs[i].id) { |
|
|
|
this.patientRegister.patientRegisterAbs.splice(i, 1) |
|
|
|
i-- |
|
|
|
continue |
|
|
|
} |
|
|
|
if (this.patientRegister.patientRegisterAbs[i].isCharge == 'Y' || this.patientRegister.patientRegisterAbs[i].checkCompleteFlag != '0') { |
|
|
|
chargeComplete += this.patientRegister.patientRegisterAbs[i].asbitemName + ',' |
|
|
|
this.patientRegister.patientRegisterAbs[i].groupPackageId = null |
|
|
|
} else { |
|
|
|
//数据库有,才添加到待删除的数组中 |
|
|
|
if (this.patientRegister.patientRegisterAbs[i].id) { |
|
|
|
registerAsbitemIds.push(this.patientRegister.patientRegisterAbs[i].id) |
|
|
|
} |
|
|
|
this.patientRegister.patientRegisterAbs.splice(i, 1) |
|
|
|
i-- |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (chargeComplete) { |
|
|
|
this.$message({ type: "info", message: `所选项目:${chargeComplete}已收费或已检,不可删除!` }); |
|
|
|
} |
|
|
|
|
|
|
|
body = { registerAsbitemIds }; |
|
|
|
|
|
|
|
return body; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//添加新套餐/分组的组合项目 |
|
|
|
addGroupPackageAsb(groupPackageAsb, typeFlag, groupPackageId) { |
|
|
|
|
|
|
|
let payTypeFlag = '0'; //默认个人支付 |
|
|
|
let lfind = -1 |
|
|
|
|
|
|
|
|
|
|
|
if (this.form.customerOrgId != this.dict.personOrgId) payTypeFlag = '1' //单位支付 |
|
|
|
|
|
|
|
for (let i = 0; i < groupPackageAsb.length; i++) { |
|
|
|
lfind = arrayExistObj(this.patientRegister.patientRegisterAbs, 'asbitemId', groupPackageAsb[i].id) |
|
|
|
if (lfind > - 1) { |
|
|
|
this.patientRegister.patientRegisterAbs[lfind].groupPackageId = groupPackageId |
|
|
|
//editCount++ |
|
|
|
continue |
|
|
|
} |
|
|
|
let pojo = { |
|
|
|
asbitemId: groupPackageAsb[i].id, |
|
|
|
asbitemName: groupPackageAsb[i].displayName, |
|
|
|
patientRegisterId: this.form.id, |
|
|
|
standardPrice: groupPackageAsb[i].price, |
|
|
|
chargePrice: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailPrice:groupPackageAsb[i].price, |
|
|
|
payTypeFlag, |
|
|
|
discount: typeFlag == 'group' ? groupPackageAsb[i].discount:100, |
|
|
|
isCharge: "N", |
|
|
|
amount: typeFlag == 'group' ? groupPackageAsb[i].customerOrgGroupDetailAmount:1, |
|
|
|
groupPackageId: groupPackageId |
|
|
|
} |
|
|
|
this.patientRegister.patientRegisterAbs.push(pojo) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//获取体检次数下的分组 |
|
|
|
getCustomerOrgGroup(customerOrgRegisterId) { |
|
|
|
this.patientRegister.customerOrgGroup = [] |
|
|
|
@ -1059,17 +1172,7 @@ export default { |
|
|
|
this.registerVisible = false |
|
|
|
this.getPatientRegisterAbs(this.registerChoosed.id) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ldddw(arrayData, key, value, display) { |
|
|
|
return dddw(arrayData, key, value, display); |
|
|
|
}, |
|
|
|
|
|
|
|
lmoment(date, forMat) { |
|
|
|
return moment(new Date(date)).format(forMat); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
changeBox(type) { |
|
|
|
//赋值 |
|
|
|
if (this.form[type + 'Box']) { |
|
|
|
|