Browse Source

EDIT

master
pengjun 2 years ago
parent
commit
4354c4779c
  1. 68
      src/components/patientRegister/PatientRegisterEdit.vue
  2. 4
      src/store/index.js

68
src/components/patientRegister/PatientRegisterEdit.vue

@ -315,7 +315,7 @@
</el-form>
<el-image
:style="'position: absolute;top:65px;right:' + (110 + Math.floor((window.pageWidth - 750) / 24)) + 'px; width: 150px; height: 160px;'"
:src="photoParse(patientRegister.photo)">
:src="peoplePhoto">
<div slot="placeholder" class="image-slot">
加载中<span class="dot">...</span>
</div>
@ -376,19 +376,23 @@
<div style="position: absolute;top:40px;left:160px;display: flex; flex-wrap: wrap; height:60px;">
<div class="query">
<span>查找&nbsp;&nbsp;条码号</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" @change="quickQuery('patientRegisterNo')"/>
</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" @change="quickQuery('patientNo')" />
</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" @change="quickQuery('patientName')" />
</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" @change="quickQuery('tel')" />
</div>
</div>
@ -492,6 +496,13 @@ export default {
brushTimes: 0,
payTypeFlag: '',
peisid: null,
peoplePhoto: '',
query: {
patientRegisterNo: '',
patientNo: '',
patientName: '',
tel: ''
},
form: {
id: "", //id
patientId: "00000000-0000-0000-0000-000000000000", //ID 00000-0000...
@ -584,14 +595,46 @@ export default {
objCopy(this.formInitData, this.form);
this.initBox();
this.getCustomerOrgRegisterList()
this.getPeoplePhoto(this.patientRegister.photo)
},
computed: {
...mapState(["window", "dict", "patientRegister", "customerOrg", "projPriv"]),
},
methods: {
photoParse,
//
quickQuery(type) {
let url = '/api/app/patient-register/patient-register-or-patient?SType='
switch (type) {
case 'patientNo':
url += `2&PatientNo=${this.query.patientNo}`
break;
case 'patientRegisterNo':
url += `1&PatientRegisterNo=${this.query.patientRegisterNo}`
break;
case 'tel':
url += `3&Phone=${this.query.tel}`
break;
case 'patientName':
url += `4&PatientName=${this.query.patientName}`
break;
default:
break;
}
console.log(url)
getapi(url)
.then((res) => {
if (res.code != -1) {
console.log('按条码号查个人数据', res.data)
objCopy(res.data, this.form)
}
});
},
//
peopleIcCard() {
this.$peisAPI.peopleIcCard().then(res => {
//console.log('peopleIcCard',res)
@ -791,7 +834,7 @@ export default {
//
let body = deepCopy(this.form);
if(this.form.birthDate){
if (this.form.birthDate) {
body.birthDate = moment(this.form.birthDate).format("yyyy-MM-DD")
}
@ -854,7 +897,7 @@ export default {
if (res.code == 1) {
if (msgTip) this.$message.success("更新 操作成功");
//
if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo);
if (this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo);
this.patientRegister.query.times++;
//this.patientRegister.saveTimes++; //
}
@ -953,7 +996,9 @@ export default {
})
},
getPeoplePhoto(photo) {
this.peoplePhoto = photoParse(photo)
},
// (isPreview)
async guidePrint(ReportCode, isPreview) {
@ -1180,9 +1225,8 @@ export default {
//
"patientRegister.photo"(newVal, oldVal) {
//console.log('patientRegister.patientRegisterRd.id newVal',newVal,' oldVal',oldVal)
if (newVal != oldVal) {
//console.log('newVal',newVal)
this.form.photo = newVal;
if (newVal && newVal != oldVal) {
this.getPeoplePhoto(newVal)
}
},
},

4
src/store/index.js

@ -245,7 +245,9 @@ export default new Vuex.Store({
}, //读取身份证信息
},
},
getters: {},
getters: {
},
mutations: {
//同步更改状态

Loading…
Cancel
Save