|
|
|
@ -56,7 +56,7 @@ |
|
|
|
<el-form-item label="出生日期" prop="birthDate"> |
|
|
|
<el-date-picker v-model="form.birthDate" type="date" value-format="yyyy-MM-dd" placeholder="出生日期" |
|
|
|
:style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'" @change="changeBirthDate" |
|
|
|
prefix-icon="" /> |
|
|
|
prefix-icon="" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
@ -183,7 +183,8 @@ |
|
|
|
<el-row> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item label="体检中心" prop="organizationUnitId"> |
|
|
|
<el-select v-model="form.organizationUnitId" placeholder="请选择" filterable :disabled="peisid ? true:false" |
|
|
|
<el-select v-model="form.organizationUnitId" placeholder="请选择" filterable |
|
|
|
:disabled="peisid ? true : false" |
|
|
|
:style="'width:' + Math.floor((window.pageWidth - 530) / 4.8) + 'px;'"> |
|
|
|
<el-option v-for="item in dict.organization" :key="item.id" :label="item.displayName" |
|
|
|
:value="item.id"> |
|
|
|
@ -192,15 +193,17 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item label="是否VIP" prop="isVip"> |
|
|
|
<!-- |
|
|
|
<el-radio v-model="form.isVip" label="Y">是</el-radio> |
|
|
|
<el-radio v-model="form.isVip" label="N">否</el-radio> |
|
|
|
--> |
|
|
|
<el-checkbox v-model="form.isVipBox" @change="changeBox('isVip')" /> |
|
|
|
<el-form-item label="单位体检次数" prop="isVip" label-width="110px"> |
|
|
|
<el-select v-model="form.customerOrgRegisterId" placeholder="次数" size="small" |
|
|
|
:disabled="form.customerOrgId == dict.personOrgId" |
|
|
|
:style="'width:' + Math.floor((window.pageWidth - 674) / 4.8) + 'px;'" @change="changeMedicalTimes" |
|
|
|
value-key="id"> |
|
|
|
<el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes" |
|
|
|
:value="item.id" /> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="电话随访" prop="isPhoneFollow"> |
|
|
|
<!-- |
|
|
|
<el-radio v-model="form.isPhoneFollow" label="Y">是</el-radio> |
|
|
|
@ -209,6 +212,15 @@ |
|
|
|
<el-checkbox v-model="form.isPhoneFollowBox" @change="changeBox('isPhoneFollow')" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2"> |
|
|
|
<el-form-item label="VIP" prop="isVip" label-width="50px"> |
|
|
|
<!-- |
|
|
|
<el-radio v-model="form.isVip" label="Y">是</el-radio> |
|
|
|
<el-radio v-model="form.isVip" label="N">否</el-radio> |
|
|
|
--> |
|
|
|
<el-checkbox v-model="form.isVipBox" @change="changeBox('isVip')" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
<el-form-item label="隐藏姓名" prop="isNameHide"> |
|
|
|
<!-- |
|
|
|
@ -224,7 +236,7 @@ |
|
|
|
<el-radio v-model="form.isLock" label="Y">是</el-radio> |
|
|
|
<el-radio v-model="form.isLock" label="N">否</el-radio> |
|
|
|
--> |
|
|
|
<el-checkbox v-model="form.isLockBox" @change="changeBox('isLock')" /> |
|
|
|
<el-checkbox v-model="form.isLockBox" @change="changeBox('isLock')" /> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3"> |
|
|
|
@ -310,7 +322,7 @@ |
|
|
|
</el-image> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<PatientRegisterItem :patientRegisterForm="form" :payTypeFlag="payTypeFlag"/> |
|
|
|
<PatientRegisterItem :patientRegisterForm="form" :payTypeFlag="payTypeFlag" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="margin-left: 10px;width:110px;"> |
|
|
|
@ -346,13 +358,13 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<div style="margin-top: 30px;"> |
|
|
|
<el-button type="primary" class="btnClass" @click="payTypeFlag ='0'">全个人支付</el-button> |
|
|
|
<el-button type="primary" class="btnClass" @click="payTypeFlag = '0'">全个人支付</el-button> |
|
|
|
</div> |
|
|
|
<div class="btn"> |
|
|
|
<el-button type="primary" class="btnClass" @click="payTypeFlag ='1'">全单位支付</el-button> |
|
|
|
<el-button type="primary" class="btnClass" @click="payTypeFlag = '1'">全单位支付</el-button> |
|
|
|
</div> |
|
|
|
<div class="btn"> |
|
|
|
<el-button type="primary" class="btnClass" @click="payTypeFlag ='2'">全赠送</el-button> |
|
|
|
<el-button type="primary" class="btnClass" @click="payTypeFlag = '2'">全赠送</el-button> |
|
|
|
</div> |
|
|
|
<div class="btn"> |
|
|
|
<el-button type="success" class="btnClass" @click="toCharge(form.patientRegisterNo)">收费</el-button> |
|
|
|
@ -364,23 +376,19 @@ |
|
|
|
<div style="position: absolute;top:40px;left:160px;display: flex; flex-wrap: wrap; height:60px;"> |
|
|
|
<div class="query"> |
|
|
|
<span>查找: 条码号</span> |
|
|
|
<el-input placeholder="条码号" v-model="query.patientRegisterNo" size="small" clearable |
|
|
|
style="width: 140px" /> |
|
|
|
<el-input placeholder="条码号" v-model="query.patientRegisterNo" size="small" clearable style="width: 140px" /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>档案号</span> |
|
|
|
<el-input placeholder="档案号" v-model="query.patientNo" size="small" clearable |
|
|
|
style="width: 100px" /> |
|
|
|
<el-input placeholder="档案号" v-model="query.patientNo" size="small" clearable style="width: 100px" /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>姓名</span> |
|
|
|
<el-input placeholder="姓名" v-model="query.patientName" size="small" clearable |
|
|
|
style="width: 80px" /> |
|
|
|
<el-input placeholder="姓名" v-model="query.patientName" size="small" clearable style="width: 80px" /> |
|
|
|
</div> |
|
|
|
<div class="query"> |
|
|
|
<span>手机号</span> |
|
|
|
<el-input placeholder="预约手机号" v-model="query.tel" size="small" clearable |
|
|
|
style="width: 120px" /> |
|
|
|
<el-input placeholder="预约手机号" v-model="query.tel" size="small" clearable style="width: 120px" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
@ -438,7 +446,7 @@ |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
<!-- 拍照 --> |
|
|
|
<el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="600" |
|
|
|
<el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="600" |
|
|
|
:close-on-click-modal="false" :append-to-body="true"> |
|
|
|
<Camera :id="form.id" /> |
|
|
|
</el-dialog> |
|
|
|
@ -463,7 +471,7 @@ import { mapState } from "vuex"; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import mm from "../../utlis/mm"; |
|
|
|
|
|
|
|
import { objCopy, setNull, dddw, parseID, birthdayToAge,deepCopy } from "../../utlis/proFunc"; |
|
|
|
import { objCopy, setNull, dddw, parseID, birthdayToAge, deepCopy, arrayFilter } from "../../utlis/proFunc"; |
|
|
|
import Camera from "./Camera.vue"; |
|
|
|
import PatientRegisterItem from "./PatientRegisterItem.vue"; |
|
|
|
import LisRequest from "./LisRequest.vue"; |
|
|
|
@ -481,8 +489,8 @@ export default { |
|
|
|
return { |
|
|
|
apiurl: mm.apiurl, |
|
|
|
brushTimes: 0, |
|
|
|
payTypeFlag:'', |
|
|
|
peisid:null, |
|
|
|
payTypeFlag: '', |
|
|
|
peisid: null, |
|
|
|
form: { |
|
|
|
id: "", //id |
|
|
|
patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000... |
|
|
|
@ -491,7 +499,7 @@ export default { |
|
|
|
customerOrgGroupId: null, //分组 |
|
|
|
medicalPackageId: null, //套餐 |
|
|
|
patientName: "", //姓名 |
|
|
|
birthDate: "", //字符串 如:2012-01-29 |
|
|
|
birthDate: null, //日期型 |
|
|
|
sexId: "U", //性别 默认未知U |
|
|
|
age: null, //年龄 |
|
|
|
jobCardNo: "", //工卡号 |
|
|
|
@ -530,8 +538,10 @@ export default { |
|
|
|
isNameHideBox: false, //隐藏姓名 |
|
|
|
isPhoneFollowBox: false, //电话随访 |
|
|
|
isLockBox: false, //是否锁住 |
|
|
|
customerOrgRegisterId: null, |
|
|
|
isMaxMedicalTimes: 'N', |
|
|
|
}, //单位 记录 目前新增与更新是一致 |
|
|
|
|
|
|
|
customerOrgRegisterList: [], //单位体检次数列表 |
|
|
|
defaultNull: [ |
|
|
|
"customerOrgId", |
|
|
|
"customerOrgGroupId", |
|
|
|
@ -562,17 +572,18 @@ export default { |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
created() { |
|
|
|
created() { |
|
|
|
this.peisid = window.sessionStorage.getItem('peisid'); |
|
|
|
if(!this.form.id){ |
|
|
|
if (!this.form.id) { |
|
|
|
this.form.organizationUnitId = this.peisid; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() { |
|
|
|
objCopy(this.formInitData, this.form); |
|
|
|
objCopy(this.formInitData, this.form); |
|
|
|
this.initBox(); |
|
|
|
this.getCustomerOrgRegisterList() |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
@ -583,6 +594,48 @@ export default { |
|
|
|
console.log("this.form1", this.form); |
|
|
|
}, |
|
|
|
|
|
|
|
//获取单位体检次数列表,并默认赋最后一次体检次数 |
|
|
|
async getCustomerOrgRegisterList() { |
|
|
|
this.customerOrgRegisterList = [] |
|
|
|
if (this.form.customerOrgId == this.dict.personOrgId){ |
|
|
|
this.form.customerOrgRegisterId = null |
|
|
|
return |
|
|
|
} |
|
|
|
try { |
|
|
|
let res = await getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}`); |
|
|
|
let res1 = await getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`); |
|
|
|
this.customerOrgRegisterList = arrayFilter(res1.data, 'isComplete', 'N') |
|
|
|
//要把已完成体检的次数去掉 |
|
|
|
if (this.customerOrgRegisterList.length > 0) { |
|
|
|
this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id |
|
|
|
//this.changeCustomerOrgGroupId() |
|
|
|
this.changeMedicalTimes() |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.log(error) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//修改单位体检次数 |
|
|
|
changeMedicalTimes() { |
|
|
|
|
|
|
|
this.form.customerOrgGroupId = null |
|
|
|
this.changeCustomerOrgGroupId() |
|
|
|
|
|
|
|
//获取体检次数下的分组 |
|
|
|
this.getCustomerOrgGroup(this.form.customerOrgRegisterId) |
|
|
|
}, |
|
|
|
|
|
|
|
//获取体检次数下的分组 |
|
|
|
getCustomerOrgGroup(customerOrgRegisterId){ |
|
|
|
this.patientRegister.customerOrgGroup = [] |
|
|
|
getapi(`/api/app/customerorggroup/getlistinfilter?CustomerOrgRegisterId=${customerOrgRegisterId}`).then(res => { |
|
|
|
if (res.code != - 1) { |
|
|
|
this.patientRegister.customerOrgGroup = res.data.items; |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
//修改出生日期 |
|
|
|
changeBirthDate() { |
|
|
|
this.form.age = birthdayToAge(this.form.birthDate) |
|
|
|
@ -592,14 +645,14 @@ export default { |
|
|
|
changeIdNo() { |
|
|
|
let ret = parseID(this.form.idNo) |
|
|
|
if (ret.age != -1) { |
|
|
|
this.form.birthDate = ret.birthday |
|
|
|
this.form.birthDate = new Date(ret.birthday) |
|
|
|
this.form.age = ret.age |
|
|
|
this.form.sexId = ret.sex |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//分组改变时触发 |
|
|
|
changeCustomerOrgGroupId() { |
|
|
|
changeCustomerOrgGroupId() { |
|
|
|
this.patientRegister.customerOrgGroupChange++; |
|
|
|
if (this.form.id) this.Onsubmit('form', false); |
|
|
|
}, |
|
|
|
@ -645,13 +698,26 @@ export default { |
|
|
|
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.birthDate = new Date(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; |
|
|
|
|
|
|
|
if (this.form.birthDate) { |
|
|
|
this.form.age = birthdayToAge(this.form.birthDate) |
|
|
|
} |
|
|
|
|
|
|
|
if (this.form.idNo) { |
|
|
|
let ret = parseID(this.form.idNo) |
|
|
|
|
|
|
|
if (!this.form.birthDate) this.form.birthDate = new Date(ret.birthday) |
|
|
|
if (!this.form.age) this.form.age = ret.age |
|
|
|
if (!this.form.sexId) this.form.age = ret.sex |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
ldddw(arrayData, key, value, display) { |
|
|
|
@ -664,39 +730,39 @@ export default { |
|
|
|
|
|
|
|
changeBox(type) { |
|
|
|
//赋值 |
|
|
|
if(this.form[type + 'Box']){ |
|
|
|
if (this.form[type + 'Box']) { |
|
|
|
this.form[type] = 'Y'; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.form[type] = 'N'; |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
initBox(){ |
|
|
|
if(this.form.isVip == 'Y'){ |
|
|
|
|
|
|
|
initBox() { |
|
|
|
if (this.form.isVip == 'Y') { |
|
|
|
this.form.isVipBox = true; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.form.isVipBox = false; |
|
|
|
} |
|
|
|
|
|
|
|
if(this.form.isNameHide == 'Y'){ |
|
|
|
if (this.form.isNameHide == 'Y') { |
|
|
|
this.form.isNameHideBox = true; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.form.isNameHideBox = false; |
|
|
|
} |
|
|
|
|
|
|
|
if(this.form.isPhoneFollow == 'Y'){ |
|
|
|
if (this.form.isPhoneFollow == 'Y') { |
|
|
|
this.form.isPhoneFollowBox = true; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.form.isPhoneFollowBox = false; |
|
|
|
} |
|
|
|
|
|
|
|
if(this.form.isLock == 'Y'){ |
|
|
|
if (this.form.isLock == 'Y') { |
|
|
|
this.form.isLockBox = true; |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
this.form.isLockBox = false; |
|
|
|
} |
|
|
|
|
|
|
|
if(!this.form.id){ |
|
|
|
if (!this.form.id) { |
|
|
|
this.form.organizationUnitId = this.peisid; |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -735,8 +801,8 @@ export default { |
|
|
|
|
|
|
|
if (this.form.id.length < 1) { |
|
|
|
//id为空则新增 |
|
|
|
console.log(`/api/app/patient-register/return-info`, body); |
|
|
|
postapi(`/api/app/patient-register/return-info`, body).then( |
|
|
|
console.log(`/api/patientregister/createreturninfo`, body); |
|
|
|
postapi(`/api/patientregister/createreturninfo`, body).then( |
|
|
|
(res) => { |
|
|
|
if (res.code == 1) { |
|
|
|
//console.log('res',res) |
|
|
|
@ -756,9 +822,9 @@ export default { |
|
|
|
} |
|
|
|
); |
|
|
|
} else { |
|
|
|
//id不为空则编辑 |
|
|
|
console.log(`/api/app/patient-register?PatientRegisterId=${this.form.id}`, body); |
|
|
|
putapi(`/api/app/patient-register?PatientRegisterId=${this.form.id}`, body).then((res) => { |
|
|
|
//id不为空则编辑 api/patientregister/updatepatientregister |
|
|
|
console.log(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body); |
|
|
|
postapi(`/api/patientregister/updatepatientregister?PatientRegisterId=${this.form.id}`, body).then((res) => { |
|
|
|
if (res.code == 1) { |
|
|
|
if (msgTip) this.$message.success("更新 操作成功"); |
|
|
|
this.patientRegister.query.times++; |
|
|
|
@ -1012,16 +1078,23 @@ export default { |
|
|
|
this.patientRegister.mergeAsbitemVisble = true; |
|
|
|
}, |
|
|
|
|
|
|
|
toCharge(patientRegisterNo){ |
|
|
|
toCharge(patientRegisterNo) { |
|
|
|
this.patientRegister.patientRegisterRd.patientRegisterNo = patientRegisterNo; |
|
|
|
this.$router.push({ path: "/charge" }); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
watch: { |
|
|
|
|
|
|
|
"form.customerOrgId"(newVal, oldVal) { |
|
|
|
//console.log('editTimes newVal:',newVal,' oldVal:',oldVal) |
|
|
|
if (newVal != oldVal) { |
|
|
|
this.getCustomerOrgRegisterList() |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
//新增或编辑 |
|
|
|
"editTimes"(newVal, oldVal) { |
|
|
|
//console.log('editTimes newVal:',newVal,' oldVal:',oldVal) |
|
|
|
@ -1045,9 +1118,11 @@ export default { |
|
|
|
}; |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
::v-deep .el-button{ |
|
|
|
padding: 10px 5px; /* 原值:12px 20px; */ |
|
|
|
::v-deep .el-button { |
|
|
|
padding: 10px 5px; |
|
|
|
/* 原值:12px 20px; */ |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-form-item { |
|
|
|
margin-bottom: 0px; |
|
|
|
} |
|
|
|
@ -1063,7 +1138,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-icon-date:before { |
|
|
|
content: "" |
|
|
|
content: "" |
|
|
|
} |
|
|
|
|
|
|
|
.btn { |
|
|
|
@ -1073,8 +1148,8 @@ export default { |
|
|
|
.btnClass { |
|
|
|
width: 110px; |
|
|
|
} |
|
|
|
|
|
|
|
.query { |
|
|
|
margin-left: 10px; |
|
|
|
} |
|
|
|
|
|
|
|
</style> |