Browse Source

this.$con

master
pengjun 4 months ago
parent
commit
50bc689ee3
  1. 85
      src/components/patientRegister/PatientRegisterEdit.vue
  2. 2
      src/components/patientRegister/PatientRegisterEditQuery.vue
  3. 2
      src/components/patientRegister/PatientRegisterList.vue
  4. 2
      src/components/patientRegister/PatientRegisterRecoverList.vue
  5. 2
      src/components/patientRegister/patientRegisterQuery.vue
  6. 2
      src/components/patientRegister/patientRegisterRecoverListQuery.vue
  7. 35
      src/utlis/proApi.js

85
src/components/patientRegister/PatientRegisterEdit.vue

@ -208,10 +208,10 @@
</el-form-item>
</el-col>
<el-col :span="3">
<el-form-item label="介绍人" prop="salesman">
<el-select v-model="form.salesman" placeholder="请选择" filterable clearable allow-create
size="small">
<el-option v-for="item in dictSalesman" :key="item.id" :label="item.surname" :value="item.surname"/>
<el-form-item label="介绍人" prop="salesman">
<el-select v-model="form.salesman" placeholder="请选择" filterable clearable allow-create size="small">
<el-option v-for="item in dictSalesman" :key="item.id" :label="item.surname"
:value="item.surname" />
</el-select>
</el-form-item>
</el-col>
@ -568,12 +568,12 @@
class="el-table__body-wrapper tbody" highlight-current-row @row-click="rowick" @row-dblclick="patientDblclick"
ref="patientList">
<el-table-column type="index" width="30" align="center" />
<el-table-column prop="patientNo" label="档案号" min-width="80" align="center" sortable/>
<el-table-column prop="customerOrgName" label="单位" min-width="180" show-overflow-tooltip sortable/>
<el-table-column prop="patientNo" label="档案号" min-width="80" align="center" sortable />
<el-table-column prop="customerOrgName" label="单位" min-width="180" show-overflow-tooltip sortable />
<el-table-column prop="departmentName" label="部门" min-width="120" show-overflow-tooltip sortable>
<template slot-scope="scope">
<div>
{{ scope.row.customerOrgName == scope.row.departmentName ? '':scope.row.departmentName }}
{{ scope.row.customerOrgName == scope.row.departmentName ? '' : scope.row.departmentName }}
</div>
</template>
</el-table-column>
@ -584,8 +584,8 @@
</div>
</template>
</el-table-column>
<el-table-column prop="medicalTimes" label="次数" min-width="70" align="center" sortable/>
<el-table-column prop="displayName" label="姓名" min-width="70" align="center" sortable/>
<el-table-column prop="medicalTimes" label="次数" min-width="70" align="center" sortable />
<el-table-column prop="displayName" label="姓名" min-width="70" align="center" sortable />
<el-table-column prop="sexId" label="性别" min-width="50" align="center" sortable>
<template slot-scope="scope">
<div>
@ -614,9 +614,9 @@
</div>
</template>
</el-table-column>
<el-table-column prop="idNo" label="身份证号" min-width="160" align="center" sortable/>
<el-table-column prop="mobileTelephone" label="手机号" min-width="110" align="center" sortable/>
<el-table-column prop="telephone" label="电话" min-width="120" align="center" sortable/>
<el-table-column prop="idNo" label="身份证号" min-width="160" align="center" sortable />
<el-table-column prop="mobileTelephone" label="手机号" min-width="110" align="center" sortable />
<el-table-column prop="telephone" label="电话" min-width="120" align="center" sortable />
</el-table>
<span slot="footer" class="dialog-footer">
<el-button class="commonbutton" @click="dialogVisible = false" style="width:90px;">取消</el-button>
@ -1071,7 +1071,7 @@ export default {
hc_warn_mode: '1', //0-1-2-
dictSalesman:[] //
dictSalesman: [] //
};
},
@ -1321,9 +1321,9 @@ export default {
})
// {operatorTypes:["1","3"]}
postapi('/api/identity/users/GetListByOperatorType',{operatorTypes:["0","1","2","3","4"]})
postapi('/api/identity/users/GetListByOperatorType', { operatorTypes: ["0", "1", "2", "3", "4"] })
.then(res => {
if (res.code > -1) {
if (res.code > -1) {
this.dictSalesman = res.data
}
})
@ -1694,6 +1694,31 @@ export default {
})
},
// /
readCardAfter(idNos) {
return new Promise((resolve, reject) => {
if (this.form.id) {
resolve()
} else {
if ((this.form.patientName && this.form.patientName != idNos.Name) || (this.form.idNo && this.form.idNo != idNos.IDCode)) {
this.$confirm("当前人员姓名和身份证号与读取身份证信息不一致, 是否以读取到身份证的信息更新当前人员?", "提示", {
confirmButtonText: "是",
cancelButtonText: " 否 ",
type: "warning",
})
.then(() => {
resolve()
})
.catch(err => {
reject(err)
})
} else {
resolve()
}
}
})
},
//
peopleIcCard() {
if (!this.$peisAPI) {
@ -1705,17 +1730,23 @@ export default {
let lres = JSON.parse(res)
if (lres.code >= -1) {
let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
this.form.patientName = idNos.Name
this.form.birthDate = idNos.birthDate
this.form.sexId = idNos.sexId
this.form.age = idNos.age
this.form.nationId = idNos.nationId
this.form.idNo = idNos.IDCode
this.form.address = idNos.Address
this.peoplePhoto = 'data:image/bmp;base64,' + idNos.Photo
// this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
// isNameContinue
this.changeIdNo('N') // Y:N
//
this.readCardAfter(idNos)
.then(() => {
this.form.patientName = idNos.Name
this.form.birthDate = idNos.birthDate
this.form.sexId = idNos.sexId
this.form.age = idNos.age
this.form.nationId = idNos.nationId
this.form.idNo = idNos.IDCode
this.form.address = idNos.Address
this.peoplePhoto = 'data:image/bmp;base64,' + idNos.Photo
// this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
// isNameContinue
this.changeIdNo('N') // Y:N
})
} else {
this.$message.error({ showClose: true, message: `${lres.message}` })
}
@ -2059,7 +2090,7 @@ export default {
this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message });
return false
}
//
if (this.form['mobileTelephone']) {
if (!isValidMobileNumber(this.form['mobileTelephone'])) {

2
src/components/patientRegister/PatientRegisterEditQuery.vue

@ -46,7 +46,7 @@
import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { getPagePriv,checkPagePriv, objCopy, setNull, dddw,checkIDCode, parseID, birthdayToAge,ageToBirthday, deepCopy, arrayFilter, arrayReduce,parsIcCardtoLocal, photoParse, savePeoplePhoto, arrayExistObj } from "../../utlis/proFunc";
import { getPagePriv,checkPagePriv, objCopy, setNull, dddw,checkIDCode, parseID, birthdayToAge,ageToBirthday, deepCopy, arrayFilter, arrayReduce,parsIcCardtoLocal, photoParse, arrayExistObj } from "../../utlis/proFunc";
import PatientRegisterForChoose from "./PatientRegisterForChoose.vue";
export default {
components: {

2
src/components/patientRegister/PatientRegisterList.vue

@ -1923,7 +1923,7 @@ export default {
}
// 2()
if (upPhotoParam != "N" && photo) {
if (upPhotoParam == "Y" && photo) {
if (!e.photo) {
savePeoplePhoto(e.id, photo);
}

2
src/components/patientRegister/PatientRegisterRecoverList.vue

@ -544,7 +544,7 @@ export default {
}
// 2()
if (upPhotoParam != "N" && photo) {
if (upPhotoParam == "Y" && photo) {
if (!e.photo) {
savePeoplePhoto(e.id, photo);
}

2
src/components/patientRegister/patientRegisterQuery.vue

@ -289,6 +289,8 @@ export default {
this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
return
}
this.btnClear()
this.$peisAPI.peopleIcCard().then(res => {
console.log('peopleIcCard', res)
let lres = JSON.parse(res)

2
src/components/patientRegister/patientRegisterRecoverListQuery.vue

@ -691,7 +691,7 @@ export default {
}
// 2()
if (upPhotoParam != "N" && photo) {
if (upPhotoParam == "Y" && photo) {
if (!e.photo) {
savePeoplePhoto(e.id, photo);
}

35
src/utlis/proApi.js

@ -1,20 +1,20 @@
const {getapi, postapi, putapi, deletapi} = require('../api/api');
const { getapi, postapi, putapi, deletapi } = require('../api/api');
// 这种方式一般不推荐使用,因为同步(阻塞)方式 响应页面响应
//获取登记人员 所登记的组合项目
const getPrAsb = async (id) =>{
const getPrAsb = async (id) => {
let result = {
code: -1,
message:'',
data:[]
message: '',
data: []
}
if(!id) return result
if (!id) return result
try {
let res = await getapi(`/api/app/registerasbitem/getlistinpatientregisterid?PatientRegisterId=${id}`)
if(res.code != -1){
if (res.code != -1) {
// console.log(`getPrAsb:PatientRegisterId=${id}:data:`,res.data)
result.code = 1
result.message = "success"
@ -41,16 +41,17 @@ async function savePeoplePhoto(peopleId, photoBase64) {
photo: photoBase64.split(",")[1],
};
try {
lres = await postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
let body = {
patientRegisterId: peopleId,
photo: lres.data,
}
await postapi(`/api/app/patient-register/update-photo`, body)
postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
.then(res => {
if (res.code > -1) {
let body = {
patientRegisterId: peopleId,
photo: res.data,
}
postapi(`/api/app/patient-register/update-photo`, body)
}
})
} catch (error) {
lres = { code: -1, msg: error }
}
@ -76,7 +77,7 @@ function photoParse(photo) {
module.exports = {
getPrAsb,savePeoplePhoto,photoParse
getPrAsb, savePeoplePhoto, photoParse
}

Loading…
Cancel
Save