pengjun 2 years ago
parent
commit
15ebebecf7
  1. 6
      src/assets/css/global_input.css
  2. 54
      src/components/doctorCheck/PatientRegisterBase.vue
  3. 112
      src/components/patientRegister/PatientRegisterEdit.vue
  4. 13
      src/components/patientRegister/PatientRegisterForChoose.vue
  5. 708
      src/components/patientRegister/PatientRegisterItem.vue
  6. 2
      src/components/patientRegister/PatientRegisterList.vue
  7. 2
      src/components/patientRegister/patientRegisterAsbItem.vue
  8. 2
      src/store/index.js
  9. 3
      src/utlis/proFunc.js

6
src/assets/css/global_input.css

@ -7,6 +7,12 @@
/* 原始 默认 25 */
}
.el-input.is-disabled .el-input__inner {
color: #606060;
}
.el-textarea.is-disabled .el-textarea__inner {
color: #606060;
}
/* 带前标 输入框 左间距 */

54
src/components/doctorCheck/PatientRegisterBase.vue

@ -15,9 +15,12 @@
</div>
<div>
<span class="query">性别</span>
<!--
<el-select v-model="prBase.sexId" style="width: 80px;" size="small" disabled>
<el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
-->
<el-input v-model="prBase.sexName" size="small" style="width: 80px;" disabled />
</div>
<div>
<span class="query">体检次数</span>
@ -25,9 +28,12 @@
</div>
<div>
<span class="query">婚姻</span>
<!--
<el-select v-model="prBase.maritalStatusId" style="width: 80px;" size="small" disabled>
<el-option v-for="item in dict.maritalStatus" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
-->
<el-input v-model="prBase.maritalStatusName" size="small" style="width: 80px;" disabled />
</div>
<div>
<span class="query">体检日期</span>
@ -44,21 +50,30 @@
</div>
<div>
<span class="query">体检类别</span>
<!--
<el-select v-model="prBase.medicalTypeId" disabled style="width: 100px;" size="small">
<el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
-->
<el-input :value="prBase.medicalTypeName" style="width: 100px;" size="small" disabled />
</div>
<div>
<span class="query">人员类别</span>
<!--
<el-select v-model="prBase.personnelTypeId" disabled style="width: 100px;" size="small">
<el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
-->
<el-input :value="prBase.personnelTypeName" style="width: 100px;" size="small" disabled />
</div>
<div>
<span class="query">民族</span>
<!--
<el-select v-model="prBase.nationId" disabled style="width: 100px;" size="small">
<el-option v-for="item in dict.nation" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
-->
<el-input :value="prBase.nationName" style="width: 100px;" size="small" disabled />
</div>
<div>
<span class="query">手机</span>
@ -94,14 +109,19 @@ export default {
patientNo: '', //
patientName: '', //
sexId: '', //
sexName: '', //
medicalTimes: '', //
maritalStatusId: '', //
maritalStatusName: '', //
medicalStartDate: '', //
customerOrgParentName: '', //
customerOrgName: '', //
medicalTypeId: '', //
medicalTypeName: '', //
personnelTypeId: '', //
personnelTypeName: '', //
nationId: '', //
nationName: '', //
mobileTelephone: '', //
},
prBaseInit: {},
@ -153,13 +173,13 @@ export default {
onQueryByPatientRegisterNo() {
let patientRegisterNo = this.prBase.patientRegisterNo
let body = {
sType: 1,
// sType: 1,
patientRegisterNo,
isFilterPreRegistration: 'Y' // Y= N= N (CompleteFlag0null)
// isFilterPreRegistration: 'Y' // Y= N= N (CompleteFlag0null)
}
// console.log(`/api/app/patientregister/getpatientregisterorpatient`, body)
this.dataTransOpts.tableS.patient_register = { id: '', patientRegisterNo }
postapi('/api/app/patientregister/getpatientregisterorpatient', body)
postapi('/api/app/patientregister/GetAlreadyRegisterPatientRegisterByNo', body)
.then((res) => {
if (res.code != -1) {
if (res.data) this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
@ -174,13 +194,13 @@ export default {
onQueryByPatientNo() {
let patientNo = this.prBase.patientNo
let body = {
sType: 2,
// sType: 2,
patientNo,
isFilterPreRegistration: 'Y' // Y= N= N (CompleteFlag0null)
// isFilterPreRegistration: 'Y' // Y= N= N (CompleteFlag0null)
}
// console.log(`/api/app/patientregister/getpatientregisterorpatient`, body)
// console.log(`/api/app/patientregister/getpatientregisterorpatient`, body)
this.dataTransOpts.tableS.patient_register = { id: '', patientNo }
postapi('/api/app/patientregister/getpatientregisterorpatient', body)
postapi('/api/app/patientregister/GetAlreadyRegisterPatientRegisterByNo', body)
.then((res) => {
if (res.code != -1) {
if (res.data) this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
@ -205,6 +225,7 @@ export default {
if (res.code != -1) {
if (res.data.items.length == 1) {
this.dataTransOpts.tableS.patient_register.id = res.data.items[0].id
this.dataTransOpts.tableS.patient_register.patientRegisterNo = res.data.items[0].patientRegisterNo
setTimeout(() => {
this.dataTransOpts.refresh.patient_register.S++
}, 10);
@ -228,21 +249,24 @@ export default {
// }, 20);
},
//ID
getPatientRegister(patientRegisterId) {
if (!patientRegisterId) {
this.afterFind({ id: '' })
//patientRegisterNo
getPatientRegister(patientRegisterNo) {
if (!patientRegisterNo) {
this.afterFind({ id: '', patientRegisterNo: '' })
return
}
postapi(`/api/app/patientregister/getinfoorpatient?PatientRegisterId=${patientRegisterId}`)
let body = { patientRegisterNo }
postapi('/api/app/patientregister/GetAlreadyRegisterPatientRegisterByNo', body)
.then((res) => {
if (res.code != -1) {
this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
if (res.data) this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
}
})
.finally(() => {
this.afterFind(this.dataTransOpts.tableS.patient_register)
});
},
@ -307,8 +331,8 @@ export default {
"dataTransOpts.refresh.patient_register.S": {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.id}`);
this.getPatientRegister(this.dataTransOpts.tableS.patient_register.id)
console.log(`watch 组合项目列表 newVal: ${newVal} oldVal: ${oldVal} patient_register.id: ${this.dataTransOpts.tableS.patient_register.patientRegisterNo}`);
this.getPatientRegister(this.dataTransOpts.tableS.patient_register.patientRegisterNo)
// this.dataTransOpts.refresh.register_check.M++
}
},

112
src/components/patientRegister/PatientRegisterEdit.vue

@ -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:123
completeFlag: "1", // 0:123
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)

13
src/components/patientRegister/PatientRegisterForChoose.vue

@ -171,9 +171,9 @@ export default {
},
props:["params"], // params
data() {
return {
patientRegisterId:'', // ID
return {
patientRegisters:[], //
tableDataCurrentRow: {}, //
};
},
@ -206,7 +206,7 @@ export default {
//
registerRowClick(row){
this.patientRegisterId = row.id
this.tableDataCurrentRow = deepCopy(row)
},
//
@ -216,13 +216,14 @@ export default {
},
btnOk(){
if(!this.patientRegisterId){
if(!this.tableDataCurrentRow.id){
this.$message.warning("请选择体检人员!")
return
}
this.dataTransOpts.tableS.patient_register.id = this.patientRegisterId
this.dataTransOpts.tableS.patient_register = deepCopy(this.tableDataCurrentRow)
this.dataTransOpts.refresh.patient_register.S++
setTimeout(() => {
this.dataTransOpts.refresh.patient_register.S++
this.tableDataCurrentRow = {}
}, 10);
this.dialogWin.PatientRegisterForChoose = false
},

708
src/components/patientRegister/PatientRegisterItem.vue
File diff suppressed because it is too large
View File

2
src/components/patientRegister/PatientRegisterList.vue

@ -170,7 +170,7 @@
:visible.sync="dialogWin.PatientRegisterEdit" :close-on-click-modal="false" fullscreen
@close="close_dialogWin_PatientRegisterEdit">
<!-- :formInitData="patientRegister.patientRegisterRd" -->
<PatientRegisterEdit :isDoctor="'0'" :patientRegisterId="patientRegister.patientRegisterRd.id"
<PatientRegisterEdit :isDoctor="'1'" :patientRegisterId="patientRegister.patientRegisterRd.id"
:editTimes="editTimes" :refreshRegister="refreshRegister" :refFuncSetData="refFuncSetData"/>
</el-dialog>

2
src/components/patientRegister/patientRegisterAsbItem.vue

@ -7,7 +7,7 @@
<template slot-scope="scope">
<div>
<el-tooltip class="item" effect="dark" content="标五角星表示属于分组或套餐的项目" placement="left">
<i v-if="scope.row.groupPackageId" class="el-icon-star-on" style="font-size: 16px;color: purple;" />
<i v-if="scope.row.isBelongGroupPackage == 'Y'" class="el-icon-star-on" style="font-size: 16px;color: purple;" />
</el-tooltip>
{{ scope.$index + 1 }}
</div>

2
src/store/index.js

@ -329,7 +329,7 @@ export default new Vuex.Store({
customer_org_group_detail: { id: '' }, // 单位分组包含的组合项目明细
charge: { id: '' }, // 收费
menu_info: { id: '' }, // 菜单与页面
patient_register: { id: '' }, // 体检人员记录
patient_register: { id: '', patientRegisterNo: ''}, // 体检人员记录
register_check_asbitem: { id: '' }, // 体检人员登记的项目(合并前)
register_check: { id: '' }, // 体检人员登记的项目(合并后)
register_check_item: { id: '' }, // 体检人员登记的明细项目

3
src/utlis/proFunc.js

@ -180,9 +180,10 @@ exports.checkIDCode = checkIDCode;
function parseID(id) {
let ret = {
birthday: null,
age: null,
age: -1,
sex: 'U',
}
if(!id) return ret
if (!checkIDCode(id)) return ret
let yearInMs = 1000 * 60 * 60 * 24 * 365.2425;

Loading…
Cancel
Save