Browse Source

this.$con

master
pengjun 4 months ago
parent
commit
50bc689ee3
  1. 37
      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. 13
      src/utlis/proApi.js

37
src/components/patientRegister/PatientRegisterEdit.vue

@ -209,9 +209,9 @@
</el-col> </el-col>
<el-col :span="3"> <el-col :span="3">
<el-form-item label="介绍人" prop="salesman"> <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 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-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -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() { peopleIcCard() {
if (!this.$peisAPI) { if (!this.$peisAPI) {
@ -1705,6 +1730,10 @@ export default {
let lres = JSON.parse(res) let lres = JSON.parse(res)
if (lres.code >= -1) { if (lres.code >= -1) {
let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation) let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
//
this.readCardAfter(idNos)
.then(() => {
this.form.patientName = idNos.Name this.form.patientName = idNos.Name
this.form.birthDate = idNos.birthDate this.form.birthDate = idNos.birthDate
this.form.sexId = idNos.sexId this.form.sexId = idNos.sexId
@ -1716,6 +1745,8 @@ export default {
// this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo // this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
// isNameContinue // isNameContinue
this.changeIdNo('N') // Y:N this.changeIdNo('N') // Y:N
})
} else { } else {
this.$message.error({ showClose: true, message: `${lres.message}` }) this.$message.error({ showClose: true, message: `${lres.message}` })
} }

2
src/components/patientRegister/PatientRegisterEditQuery.vue

@ -46,7 +46,7 @@
import { mapState, mapActions } from "vuex"; import { mapState, mapActions } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api"; 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"; import PatientRegisterForChoose from "./PatientRegisterForChoose.vue";
export default { export default {
components: { components: {

2
src/components/patientRegister/PatientRegisterList.vue

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

2
src/components/patientRegister/PatientRegisterRecoverList.vue

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

2
src/components/patientRegister/patientRegisterQuery.vue

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

2
src/components/patientRegister/patientRegisterRecoverListQuery.vue

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

13
src/utlis/proApi.js

@ -41,16 +41,17 @@ async function savePeoplePhoto(peopleId, photoBase64) {
photo: photoBase64.split(",")[1], photo: photoBase64.split(",")[1],
}; };
try { try {
lres = await postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
postapi(`/api/app/patient-register/up-load-img`, uploadPhoto)
.then(res => {
if (res.code > -1) {
let body = { let body = {
patientRegisterId: peopleId, patientRegisterId: peopleId,
photo: lres.data,
photo: res.data,
} }
await postapi(`/api/app/patient-register/update-photo`, body)
postapi(`/api/app/patient-register/update-photo`, body)
}
})
} catch (error) { } catch (error) {
lres = { code: -1, msg: error } lres = { code: -1, msg: error }
} }

Loading…
Cancel
Save