|
|
|
@ -4,8 +4,18 @@ |
|
|
|
<div style="display: flex"> |
|
|
|
<div :style="'width:' + (window.pageWidth - 110 - 20) + 'px;'"> |
|
|
|
<!--查询条件--> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '查找')" style="position: absolute;top:28px;left:180px;"> |
|
|
|
<PatientRegisterEditQuery /> |
|
|
|
<div style="position: absolute;top:28px;left:140px;display: flex;"> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '查找')"> |
|
|
|
<PatientRegisterEditQuery /> |
|
|
|
</div> |
|
|
|
<div style="display: flex;margin-left: 5px;"> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '读身份证')"> |
|
|
|
<el-button @click="peopleIcCard" class="commonbutton">读身份证</el-button> |
|
|
|
</div> |
|
|
|
<div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '拍照')"> |
|
|
|
<el-button type="primary" class="commonbutton" @click="photoGrah" icon="el-icon-camera">拍照</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<el-form ref="form" :model="form" label-width="80px" :rules="rules" size="medium"> |
|
|
|
@ -14,7 +24,7 @@ |
|
|
|
<el-form-item label="单位名称" prop="customerOrgId"> |
|
|
|
<el-cascader v-model="form.customerOrgId" :options="patientRegister.customerOrgTreeAll" |
|
|
|
:style="'width:' + Math.floor((window.pageWidth - 510) / 4.8) + 'px;'" filterable |
|
|
|
popper-class="example" |
|
|
|
popper-class="example" :show-all-levels="false" |
|
|
|
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" |
|
|
|
:disabled="(form.completeFlag == '3' || isDoctor != '1') ? true : false" size="small"> |
|
|
|
</el-cascader> |
|
|
|
@ -332,7 +342,7 @@ |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<el-image |
|
|
|
:style="'position: absolute;top:50px;right:' + (100 + Math.floor((window.pageWidth - 750) / 24)) + 'px; width: 150px; height: 160px;'" |
|
|
|
:style="'position: absolute;top:70px;right:' + (100 + Math.floor((window.pageWidth - 680) / 24)) + 'px; width: 130px; height: 140px;'" |
|
|
|
:src="peoplePhoto"> |
|
|
|
<div slot="placeholder" class="image-slot"> |
|
|
|
加载中<span class="dot">...</span> |
|
|
|
@ -346,11 +356,9 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="margin-left: 10px;"> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '拍照')"> |
|
|
|
<el-button type="primary" class="commonbutton" @click="photoGrah" icon="el-icon-camera">拍照</el-button> |
|
|
|
</div> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '读身份证')" class="btn"> |
|
|
|
<el-button @click="peopleIcCard" class="commonbutton">读身份证</el-button> |
|
|
|
|
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '新增')"> |
|
|
|
<el-button type="primary" class="commonbutton" @click="btnAdd">新增</el-button> |
|
|
|
</div> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '复制新增')" class="btn"> |
|
|
|
<el-button type="primary" class="commonbutton" @click="rdCopy">复制新增</el-button> |
|
|
|
@ -523,7 +531,7 @@ export default { |
|
|
|
|
|
|
|
peisid: null, |
|
|
|
peoplePhoto: '', |
|
|
|
|
|
|
|
preCustomerOrgId:'', // 上一个人的体检单位,只是在本组件点新增时才用到 |
|
|
|
form: { |
|
|
|
registerManType: 'customer', //登记人员类型,客服:customer 医生:doctor 支持在医生诊台处理登记人员 |
|
|
|
id: "", //id |
|
|
|
@ -552,7 +560,7 @@ export default { |
|
|
|
isVip: "N", //vip客户 |
|
|
|
remark: "", // |
|
|
|
isLock: "N", //是否锁住 |
|
|
|
completeFlag: "1", //完成标志 0:预登记,1:未检,2:部份已检,3:已总检 【创建编辑时不操作】 |
|
|
|
completeFlag: "1", //完成标志 0:预登记,1:正式登记(未检),2:部份已检,3:已总检 【创建编辑时不操作】 |
|
|
|
isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】 |
|
|
|
patientRegisterNo: "", //条码号 【创建编辑时不操作】 |
|
|
|
medicalTimes: 1, //条码号 【创建编辑时不操作】 |
|
|
|
@ -687,8 +695,8 @@ export default { |
|
|
|
...mapActions(['getPatientRegisterAbs']), |
|
|
|
dddw, moment, checkPagePriv, |
|
|
|
|
|
|
|
btnTest(){ |
|
|
|
console.log('form',this.form) |
|
|
|
btnTest() { |
|
|
|
console.log('form', this.form) |
|
|
|
}, |
|
|
|
//数据初始化 |
|
|
|
dictInit() { |
|
|
|
@ -798,48 +806,58 @@ export default { |
|
|
|
|
|
|
|
// 获取登记信息 初始form表单数据 |
|
|
|
async initFormData(patientRegisterId) { |
|
|
|
|
|
|
|
this.peisid = window.sessionStorage.getItem('peisid'); |
|
|
|
|
|
|
|
this.preCustomerOrgId = this.preCustomerOrgId || this.patientRegister.query.customerOrgId |
|
|
|
if (!patientRegisterId) { //添加 |
|
|
|
objCopy(this.formInit, this.form); |
|
|
|
this.form.medicalCenterId = this.peisid; //体检中收 |
|
|
|
this.form.customerOrgId = this.patientRegister.query.customerOrgId || this.dict.personOrgId //体检单位 |
|
|
|
this.form.customerOrgId = this.preCustomerOrgId || this.dict.personOrgId //体检单位 |
|
|
|
this.form.customerOrgParentId = await this.getParentCustomerOrgId(this.form.customerOrgId) //体检父单位 |
|
|
|
|
|
|
|
} else { |
|
|
|
// let res = await getapi(`/api/app/patient-register/${patientRegisterId}`) |
|
|
|
let res = await postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${patientRegisterId}`) |
|
|
|
// this.form = res.data 这种方式,会造成 checkbox 值变化不响应,故取消 |
|
|
|
objCopy(res.data,this.form) |
|
|
|
objCopy(res.data, this.form) |
|
|
|
} |
|
|
|
this.initBox(); |
|
|
|
this.getPeoplePhoto(this.form.photo) |
|
|
|
this.dataTransOpts.refresh.register_check_asbitem.D++ //触发所选组合项目刷新 |
|
|
|
|
|
|
|
// 单位/个人 的分组与套餐处理 |
|
|
|
await this.changeCustomerOrgId(this.form.customerOrgId) |
|
|
|
this.dataTransOpts.refresh.register_check_asbitem.M++ //触发所选组合项目刷新 |
|
|
|
|
|
|
|
|
|
|
|
this.changeCustomerOrgId(this.form.customerOrgId) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//选择单位 |
|
|
|
async changeCustomerOrgId(v) { |
|
|
|
// console.log('changeCustomerOrgId',v) |
|
|
|
let customerOrgId = "" |
|
|
|
if (Array.isArray(v) && v.length > 0) { |
|
|
|
customerOrgId = v[v.length - 1] |
|
|
|
} else { |
|
|
|
customerOrgId = v |
|
|
|
} |
|
|
|
this.preCustomerOrgId = customerOrgId |
|
|
|
let customerOrgParentId = await this.getParentCustomerOrgId(customerOrgId) |
|
|
|
|
|
|
|
if (customerOrgParentId) { |
|
|
|
if (customerOrgParentId != this.dict.personOrgId) this.getCustomerOrgRegisterList(customerOrgParentId) |
|
|
|
if (customerOrgParentId == this.dict.personOrgId){ |
|
|
|
this.form.customerOrgRegisterId = "00000000-0000-0000-0000-000000000001" |
|
|
|
}else{ |
|
|
|
// 获取体检次数 |
|
|
|
this.getCustomerOrgRegisterList(customerOrgParentId) |
|
|
|
} |
|
|
|
|
|
|
|
// 父单位被更改时,需要触发 修改 分组/套餐 |
|
|
|
if (this.form.customerOrgParentId != customerOrgParentId) { |
|
|
|
this.form.customerOrgGroupId = null |
|
|
|
this.form.medicalPackageId = null |
|
|
|
// 清除套餐分组标识 |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => { |
|
|
|
e.isBelongGroupPackage = 'N' |
|
|
|
}); |
|
|
|
|
|
|
|
if (customerOrgParentId == this.dict.personOrgId) { |
|
|
|
|
|
|
|
this.patientRegister.customerOrgGroup = [] |
|
|
|
@ -863,7 +881,7 @@ export default { |
|
|
|
if (!customerOrgId) return customerOrgParentId |
|
|
|
if (typeof customerOrgId == 'string') { |
|
|
|
try { |
|
|
|
let res = await getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}`) |
|
|
|
let res = await getapi(`/api/app/customer-org/parent/${customerOrgId}`) |
|
|
|
if (res.code != -1) customerOrgParentId = res.data |
|
|
|
} catch (error) { |
|
|
|
console.log('获取顶级单位ID出错:', error) |
|
|
|
@ -1058,6 +1076,7 @@ export default { |
|
|
|
|
|
|
|
//修改身份证,生成年龄、出生、性别 |
|
|
|
changeIdNo() { |
|
|
|
if(!this.form.idNo) return |
|
|
|
this.Query(this.form.idNo) |
|
|
|
let ret = parseID(this.form.idNo) |
|
|
|
if (ret.age != -1) { |
|
|
|
@ -1186,7 +1205,7 @@ export default { |
|
|
|
} else { |
|
|
|
this.form[type] = 'N'; |
|
|
|
} |
|
|
|
console.log('Box-type',this.form[type + 'Box'],this.form[type]) |
|
|
|
console.log('Box-type', this.form[type + 'Box'], this.form[type]) |
|
|
|
}, |
|
|
|
|
|
|
|
initBox() { |
|
|
|
@ -1296,7 +1315,7 @@ export default { |
|
|
|
return false |
|
|
|
} |
|
|
|
let body = this.madePrBody() |
|
|
|
body.registerCheckAsbitems = this.dataTransOpts.tableM.register_check_asbitem |
|
|
|
body.registerCheckAsbitems = deepCopy(this.dataTransOpts.tableM.register_check_asbitem) |
|
|
|
|
|
|
|
if (this.form.id) { |
|
|
|
// 更新时,先保存明细,再更新主表 |
|
|
|
@ -1309,10 +1328,13 @@ export default { |
|
|
|
postapi(`/api/PatientRegister/CreatePatientRegister`, body) |
|
|
|
.then(res => { |
|
|
|
if (res.code == 1) { |
|
|
|
this.form.id = res.data.id |
|
|
|
objCopy(res.data,this.form) |
|
|
|
|
|
|
|
this.dataTransOpts.tableS.patient_register = deepCopy(res.data) |
|
|
|
|
|
|
|
delete this.dataTransOpts.tableS.patient_register.registerCheckAsbitems |
|
|
|
|
|
|
|
// 保存成功赋 id 值等 |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem = deepCopy(res.data.registerCheckAsbitems) |
|
|
|
// //触发已选组合项目保存 |
|
|
|
// this.prAsbOpraOpts.formId = res.data.id |
|
|
|
@ -1327,18 +1349,24 @@ export default { |
|
|
|
if (this.patientRegister.photo && this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo); |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
// 人员新增 |
|
|
|
btnAdd(){ |
|
|
|
this.dataTransOpts.tableS.patient_register.id = '' |
|
|
|
this.dataTransOpts.refresh.patient_register.S++ |
|
|
|
}, |
|
|
|
|
|
|
|
//将现有的数据,复制并展现,但未保存 |
|
|
|
rdCopy() { |
|
|
|
if (!this.form.id) { |
|
|
|
this.$message.info("该信息尚未保存,不可执行此操作!"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
this.dataTransOpts.tableS.patient_register.id = '' |
|
|
|
this.patientRegister.photo = '/pic/Photo.jpg' |
|
|
|
this.patientRegister.patientRegisterId = ''; |
|
|
|
this.form.id = ''; |
|
|
|
@ -1348,7 +1376,8 @@ export default { |
|
|
|
this.form.medicalTimes = 1; |
|
|
|
this.form.patientName = ''; |
|
|
|
this.form.photo = ''; |
|
|
|
|
|
|
|
this.form.completeFlag = '1'; // |
|
|
|
|
|
|
|
// this.patientRegister.patientRegisterAbs.forEach(e => { |
|
|
|
// e.id = ''; |
|
|
|
// e.patientRegisterId = ''; |
|
|
|
@ -1356,15 +1385,20 @@ export default { |
|
|
|
// e.checkCompleteFlag = '0' |
|
|
|
// e.isLock = 'N' |
|
|
|
// }); |
|
|
|
// 触发明细项目复制 |
|
|
|
setTimeout(() => { |
|
|
|
this.prAsbOpraOpts.copyNew++ |
|
|
|
}, 20); |
|
|
|
|
|
|
|
// 触发明细项目复制 |
|
|
|
// setTimeout(() => { |
|
|
|
// this.prAsbOpraOpts.copyNew++ |
|
|
|
// }, 10); |
|
|
|
this.dataTransOpts.tableM.register_check_asbitem.forEach(e => { |
|
|
|
delete e.id |
|
|
|
e.patientRegisterId = '' |
|
|
|
e.isCharge = 'N' |
|
|
|
e.isLock = 'N' |
|
|
|
}); |
|
|
|
// console.log('this.patientRegister.patientRegisterAbs',this.patientRegister.patientRegisterAbs) |
|
|
|
this.$message.info("操作成功,请记得点保存"); |
|
|
|
this |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//删除 |
|
|
|
@ -1394,20 +1428,20 @@ export default { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (!this.$peisAPI) { |
|
|
|
this.$message.info({showClose:true,message:"此功能,需要在壳客户端才可运行!"}) |
|
|
|
this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" }) |
|
|
|
return |
|
|
|
} |
|
|
|
this.$peisAPI.photoGrah() |
|
|
|
.then(res => { |
|
|
|
console.log('this.$peisAPI.photoGrah 原始返回结果',res) |
|
|
|
console.log('this.$peisAPI.photoGrah 原始返回结果', res) |
|
|
|
let lres = JSON.parse(res) |
|
|
|
if (lres.code == 1) { |
|
|
|
let uploadPhoto = { |
|
|
|
patientRegisterId: this.form.id, |
|
|
|
photo: lres.data.Photo, |
|
|
|
}; |
|
|
|
this.peoplePhoto = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg':lres.data.PhotoFormat};base64,${lres.data.Photo}` |
|
|
|
this.patientRegister.photo = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg':lres.data.PhotoFormat};base64,${lres.data.Photo}` |
|
|
|
this.peoplePhoto = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}` |
|
|
|
this.patientRegister.photo = `data:image/${lres.data.PhotoFormat == 'jpg' ? 'jpeg' : lres.data.PhotoFormat};base64,${lres.data.Photo}` |
|
|
|
return postapi(`/api/app/patient-register/up-load-img`, uploadPhoto) |
|
|
|
} else { |
|
|
|
this.$message.error("上传照片错误" + lres.code) |
|
|
|
|