|
|
|
@ -17,8 +17,8 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="档案号" prop="patientId"> |
|
|
|
<el-input v-model="form.patientId" disabled></el-input> |
|
|
|
<el-form-item label="档案号" prop="patientNo"> |
|
|
|
<el-input v-model="form.patientNo" disabled></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6" /> |
|
|
|
@ -26,7 +26,7 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="姓名" prop="patientName"> |
|
|
|
<el-input v-model="form.patientName"></el-input> |
|
|
|
<el-input v-model="form.patientName" @blur="query(form.patientName)"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
@ -68,13 +68,20 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="体检类别" prop="medicalTypeId"> |
|
|
|
<el-select v-model="form.medicalTypeId" placeholder="请选择"> |
|
|
|
<el-select v-model="form.medicalTypeId" placeholder="请选择" filterable> |
|
|
|
<el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="人员类别" prop="personnelTypeId"> |
|
|
|
<el-select v-model="form.personnelTypeId" placeholder="请选择" filterable> |
|
|
|
<el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="工卡号" prop="jobCardNo"> |
|
|
|
<el-input v-model="form.jobCardNo"></el-input> |
|
|
|
@ -95,7 +102,44 @@ |
|
|
|
<el-input v-model="form.jobTitle"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
|
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="邮箱" prop="email"> |
|
|
|
<el-input v-model="form.email"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="身份证号" prop="idNo"> |
|
|
|
<el-input v-model="form.idNo" @blur="query(form.idNo)"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="地址" prop="address"> |
|
|
|
<el-input v-model="form.address"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="邮政编码" prop="postalCode"> |
|
|
|
<el-input v-model="form.postalCode"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="电话" prop="telephone"> |
|
|
|
<el-input v-model="form.telephone"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="手机号" prop="mobileTelephone"> |
|
|
|
<el-input v-model="form.mobileTelephone"></el-input> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="民族" prop="nationId"> |
|
|
|
<el-select v-model="form.nationId" placeholder="请选择" filterable> |
|
|
|
<el-option v-for="item in dict.nation" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="介绍人" prop="salesman"> |
|
|
|
<el-input v-model="form.salesman"></el-input> |
|
|
|
@ -153,7 +197,7 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="分组" prop="customerOrgGroupId"> |
|
|
|
<el-select v-model="form.customerOrgGroupId" placeholder="请选择" filterable clearable |
|
|
|
:disabled="form.customerOrgId == '00000000-0000-0000-0000-000000000000' ? false : true"> |
|
|
|
:disabled="form.customerOrgId === dict.personOrgId ? true : false"> |
|
|
|
<el-option v-for="item in patientRegister.customerOrgGroup" :key="item.id" :label="item.displayName" |
|
|
|
:value="item.id"> |
|
|
|
</el-option> |
|
|
|
@ -163,7 +207,7 @@ |
|
|
|
<el-col :span="6"> |
|
|
|
<el-form-item label="套餐" prop="medicalPackageId"> |
|
|
|
<el-select v-model="form.medicalPackageId" placeholder="请选择" filterable clearable |
|
|
|
:disabled="form.customerOrgId == '00000000-0000-0000-0000-000000000000' ? true : false"> |
|
|
|
:disabled="form.customerOrgId === dict.personOrgId ? false : true"> |
|
|
|
<el-option v-for="item in dict.medicalPackage" :key="item.id" :label="item.displayName" :value="item.id"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
@ -213,6 +257,7 @@ |
|
|
|
</div> |
|
|
|
</el-image> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 按钮区域 --> |
|
|
|
<div style="margin-left: 10px;" width="120px"> |
|
|
|
<div class="btn"> |
|
|
|
@ -237,6 +282,44 @@ |
|
|
|
<el-button type="primary" @click="">复制新增</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
<!-- 人员档案列表 --> |
|
|
|
<el-dialog title="人员档案列表" :visible.sync="dialogVisible" width="800" :append-to-body="true"> |
|
|
|
<el-table :data="patientList" border width="800" height="480" row-key="id" size="small" |
|
|
|
class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" ref="patientList"> |
|
|
|
<el-table-column type="index" width="30"/> |
|
|
|
<el-table-column prop="displayName" label="姓名" /> |
|
|
|
<el-table-column prop="sexId" label="性别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ ldddw(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') }}</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') }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="nationId" label="民族"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ ldddw(dict.nation, 'id', scope.row.nationId, 'displayName') }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="idNo" label="身份证号" /> |
|
|
|
<el-table-column prop="telephone" label="电话" /> |
|
|
|
<el-table-column prop="mobileTelephone" label="手机号" /> |
|
|
|
<el-table-column label="末次体检" /> |
|
|
|
<el-table-column label="体检次数" /> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button @click="dialogVisible = false">取 消</el-button> |
|
|
|
<el-button type="primary" @click="choosePatient">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
@ -244,7 +327,7 @@ |
|
|
|
import moment from 'moment'; |
|
|
|
import { mapState } from 'vuex' |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { tcdate, objCopy } from '../../utlis/proFunc' |
|
|
|
import { objCopy,setNull,dddw } from '../../utlis/proFunc' |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
@ -252,15 +335,11 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
data: { |
|
|
|
|
|
|
|
organizationdata: [], //体检中心数据 |
|
|
|
customerOrgType: [], //单位类别 |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
form: { |
|
|
|
id: '', //id |
|
|
|
patientId: '00000000-0000-0000-0000-000000000000', //档案号ID 选择了档案就传档案号,未选就传00000-0000... |
|
|
|
patientNo:'',//档案号 |
|
|
|
customerOrgId: null, //单位编号 |
|
|
|
customerOrgGroupId: null, //分组 |
|
|
|
medicalPackageId: null,//套餐 |
|
|
|
@ -287,15 +366,40 @@ export default { |
|
|
|
isMedicalStart: 'N', //体检开始标志 【创建编辑时不操作】 |
|
|
|
patientRegisterNo: '', //条码号 【创建编辑时不操作】 |
|
|
|
medicalTimes: 1, //条码号 【创建编辑时不操作】 |
|
|
|
organizationUnitId: null //体检中心 |
|
|
|
}, //单位 记录 目前新增与更新是一致 |
|
|
|
organizationUnitId: null, //体检中心 |
|
|
|
address:'', //地址 |
|
|
|
email:'', //email |
|
|
|
idNo:'', //身份证号 |
|
|
|
telephone:'', //电话 |
|
|
|
mobileTelephone:'', //手机号 |
|
|
|
nationId:null, //民族编号 |
|
|
|
postalCode:'', //邮编 |
|
|
|
}, //单位 记录 目前新增与更新是一致 |
|
|
|
|
|
|
|
defaultNull:[ |
|
|
|
'customerOrgId', |
|
|
|
'customerOrgGroupId', |
|
|
|
'medicalPackageId', |
|
|
|
'age', |
|
|
|
'medicalTypeId', |
|
|
|
'personnelTypeId', |
|
|
|
'sexHormoneTermId', |
|
|
|
'organizationUnitId', |
|
|
|
'nationId', |
|
|
|
], //一般uuid字段为空时,需设置为null值 |
|
|
|
|
|
|
|
rules: { |
|
|
|
patientName: [ |
|
|
|
{ required: true, message: "请输入姓名", trigger: "blur" }, |
|
|
|
], |
|
|
|
organizationUnitId: [ |
|
|
|
{ required: true, message: "请填写体检中心", trigger: "blur" }, |
|
|
|
], |
|
|
|
}, |
|
|
|
|
|
|
|
dialogVisible:false, |
|
|
|
patientList:[],//人员列表(用于判断人员多次体检) |
|
|
|
patientChoosed:{}, //查重选中的人员 |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
@ -308,7 +412,7 @@ export default { |
|
|
|
//表单赋值 |
|
|
|
//console.log('mounted this.patientRegister.patientRegisterRd',this.patientRegister.patientRegisterRd) |
|
|
|
objCopy(this.patientRegister.patientRegisterRd, this.form) |
|
|
|
//console.log('mounted this.form',this.form) |
|
|
|
console.log('mounted this.form',this.form) |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
@ -320,6 +424,58 @@ export default { |
|
|
|
console.log('this.form1', this.form) |
|
|
|
}, |
|
|
|
|
|
|
|
//根据姓名,身份证号 查询档案信息,用于判断人员多次体检 |
|
|
|
query(param){ |
|
|
|
//编辑的时候不查重 |
|
|
|
if(this.form.id || !param) return |
|
|
|
this.dialogVisible = true |
|
|
|
console.log(param) |
|
|
|
getapi(`/api/app/patient/in-filter?Filter=${param}`) |
|
|
|
.then( |
|
|
|
(res) => { |
|
|
|
if(res.code == 1){ |
|
|
|
//console.log('res',res) |
|
|
|
this.patientList = res.data.items |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
}, |
|
|
|
|
|
|
|
//列表选中 |
|
|
|
rowick(row){ |
|
|
|
this.patientChoosed = row |
|
|
|
}, |
|
|
|
|
|
|
|
//确定选择人员 |
|
|
|
choosePatient(){ |
|
|
|
if(!this.patientChoosed){ |
|
|
|
alert("请选中人员档案信息") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
this.dialogVisible = false |
|
|
|
|
|
|
|
this.form.patientId = this.patientChoosed.id |
|
|
|
this.form.patientName = this.patientChoosed.displayName |
|
|
|
this.form.sexId = this.patientChoosed.sexId |
|
|
|
this.form.maritalStatusId = this.patientChoosed.maritalStatusId |
|
|
|
this.form.birthDate = this.patientChoosed.birthDate |
|
|
|
this.form.nationId = this.patientChoosed.nationId |
|
|
|
this.form.idNo = this.patientChoosed.idNo |
|
|
|
this.form.telephone = this.patientChoosed.telephone |
|
|
|
this.form.mobileTelephone = this.patientChoosed.mobileTelephone |
|
|
|
//this.form.patientNo = this.patientChoosed.patientNo |
|
|
|
//this.form.medicalTimes = this.patientChoosed.medicalTimes + 1 |
|
|
|
}, |
|
|
|
|
|
|
|
ldddw(arrayData, key, value, display) { |
|
|
|
return dddw(arrayData, key, value, display) |
|
|
|
}, |
|
|
|
|
|
|
|
lmoment(date, forMat) { |
|
|
|
return moment(new Date(date)).format(forMat) |
|
|
|
}, |
|
|
|
|
|
|
|
//提交 |
|
|
|
Onsubmit(formName) { |
|
|
|
this.$refs[formName].validate((valid) => { |
|
|
|
@ -332,39 +488,51 @@ export default { |
|
|
|
delete body.medicalTimes |
|
|
|
delete body.completeFlag |
|
|
|
delete body.isMedicalStart |
|
|
|
delete body.patientNo |
|
|
|
|
|
|
|
delete body.customerOrgGroupId |
|
|
|
delete body.medicalPackageId |
|
|
|
|
|
|
|
|
|
|
|
setNull(body,this.defaultNull) |
|
|
|
|
|
|
|
//日期转换 |
|
|
|
console.log('body.birthDate',body.birthDate) |
|
|
|
if(body.birthDate){ |
|
|
|
body.birthDate = moment(new Date(body.birthDate)).format('yyyy-MM-DD') |
|
|
|
} |
|
|
|
console.log('body.birthDate',body.birthDate) |
|
|
|
//moment(pub.dateAddSeconds(new Date('2022-12-09T02:39:33.983Z'),60*60)).format('yyyyMMDDHHmmssSSS') |
|
|
|
|
|
|
|
|
|
|
|
console.log('this.form.id',this.form.id) |
|
|
|
console.log('body',body) |
|
|
|
if (this.form.id.length < 1) { |
|
|
|
//id为空则新增 |
|
|
|
|
|
|
|
postapi(`/api/app/patient-register`, body).then( |
|
|
|
postapi(`/api/app/patient-register`, body) |
|
|
|
.then( |
|
|
|
(res) => { |
|
|
|
if(res.code == 1){ |
|
|
|
//console.log('res',res) |
|
|
|
this.$message.success("创健 操作成功"); |
|
|
|
this.patientRegister.patientRegisterId = res.id |
|
|
|
this.patientRegister.patientRegisterRd = res |
|
|
|
objCopy(res.data,this.form) |
|
|
|
this.patientRegister.patientRegisterId = res.data.id |
|
|
|
this.patientRegister.patientRegisterRd = res.data |
|
|
|
this.patientRegister.query.times++ |
|
|
|
|
|
|
|
return getapi(`/api/app/patient/${this.form.patientId}`) |
|
|
|
} |
|
|
|
} |
|
|
|
) |
|
|
|
.then( |
|
|
|
(res) => { |
|
|
|
if(res.code == 1){ |
|
|
|
//返写档案号 |
|
|
|
this.form.patientNo = res.data.patientNo |
|
|
|
} |
|
|
|
} |
|
|
|
); |
|
|
|
|
|
|
|
} else { |
|
|
|
//id不为空则编辑 |
|
|
|
putapi(`/api/app/patient-register/${this.form.id}`, body).then( |
|
|
|
//id不为空则编辑 |
|
|
|
putapi(`/api/app/patient-register?PatientRegisterId=${this.form.id}`, body).then( |
|
|
|
(res) => { |
|
|
|
this.$message.success("更新 操作成功"); |
|
|
|
objCopy(this.patientRegister.patientRegisterRd,this.form) |
|
|
|
this.patientRegister.query.times++ |
|
|
|
} |
|
|
|
); |
|
|
|
} |
|
|
|
@ -372,16 +540,13 @@ export default { |
|
|
|
alert('未通过数据校验'); |
|
|
|
return false; |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//新增弹框 |
|
|
|
add() { |
|
|
|
this.customerOrg.customerOrgId = '' |
|
|
|
this.customerOrg.customerOrgRd = { |
|
|
|
id: '', isLock: 'N', |
|
|
|
isActive: 'Y' |
|
|
|
} |
|
|
|
// |
|
|
|
}, |
|
|
|
|
|
|
|
//删除 |
|
|
|
@ -398,15 +563,21 @@ export default { |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
watch: { |
|
|
|
'patientRegister.patientRegisterRd.customerOrgId'(newVal, oldVal) { |
|
|
|
//新增触发 |
|
|
|
'patientRegister.addTimes'(newVal, oldVal) { |
|
|
|
//console.log('patientRegister.addTimes newVal:',newVal,' oldVal:',oldVal) |
|
|
|
if (newVal != oldVal) { |
|
|
|
//console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId) |
|
|
|
objCopy(this.patientRegister.patientRegisterRd, this.form) |
|
|
|
//console.log('this.patientRegister.patientRegisterRdInit',this.patientRegister.patientRegisterRdInit) |
|
|
|
objCopy(this.patientRegister.patientRegisterRdInit, this.form) |
|
|
|
//console.log('this.form',this.form) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//编辑触发 |
|
|
|
'patientRegister.patientRegisterRd.id'(newVal, oldVal) { |
|
|
|
if (newVal != oldVal) { |
|
|
|
//console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId) |
|
|
|
//console.log('patientRegister.patientRegisterRd.id newVal:',newVal,' oldVal:',oldVal) |
|
|
|
if (newVal != oldVal) { |
|
|
|
//console.log('newVal:',newVal) |
|
|
|
objCopy(this.patientRegister.patientRegisterRd, this.form) |
|
|
|
} |
|
|
|
}, |
|
|
|
|