Browse Source

dj seo

master
pengjun 2 years ago
parent
commit
a04be7f0ee
  1. 43
      src/components/patientRegister/PatientRegisterEdit.vue
  2. 2
      src/components/patientRegister/PatientRegisterItem.vue
  3. 5
      src/components/patientRegister/PatientRegisterList.vue
  4. 2
      src/components/patientRegister/patientRegisterQuery.vue

43
src/components/patientRegister/PatientRegisterEdit.vue

@ -64,7 +64,7 @@
</el-col>
<el-col :span="5">
<el-form-item label="身份证号" prop="idNo">
<el-input v-model="form.idNo" @change="changeIdNo" size="small"></el-input>
<el-input v-model="form.idNo" placeholder="身份证号" @change="changeIdNo" size="small"></el-input>
</el-form-item>
</el-col>
<el-col :span="5">
@ -411,7 +411,7 @@
</div>
<!--人员登记组合项目明细 register_check_asbitem-->
<div>
<PatientRegisterItem :prForm="form" :prAsbOpraOpts="prAsbOpraOpts" :triggerHeadSave="triggerHeadSave"
<PatientRegisterItem :prForm="form" :prAsbOpraOpts="prAsbOpraOpts"
:refreshFormId="refreshFormId" />
</div>
</div>
@ -962,6 +962,7 @@ export default {
}
this.preCustomerOrgId = this.patientRegister.query.customerOrgId
if (!patientRegisterId) { //
this.peoplePhoto = '' //
objCopy(this.formInit, this.form);
this.form.registerCheckAsbitems = []
this.form.medicalCenterId = this.peisid; //
@ -1127,7 +1128,7 @@ export default {
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
// this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
this.changeIdNo() //
} else {
@ -1250,6 +1251,7 @@ export default {
if (!this.form.idNo) return
this.Query(this.form.idNo)
let ret = parseID(this.form.idNo)
// console.log('changeIdNo',ret)
if (ret.age != -1) {
this.form.birthDate = new Date(ret.birthday)
this.form.age = ret.age
@ -1368,12 +1370,13 @@ export default {
//
madePrBody() {
//
let body = deepCopy(this.form);
// // console.log('this.form',this.form)
// // console.log('body',body)
// console.log('body',this.form,body)
if (this.form.birthDate) {
try {
body.birthDate = moment(body.birthDate).format("yyyy-MM-DD")
body.birthDate = moment(new Date(this.form.birthDate)).format("yyyy-MM-DD")
} catch (error) {
// this.form.birthDate != "Invalid date"
body.birthDate = null
@ -1446,6 +1449,7 @@ export default {
return false
}
let body = this.madePrBody()
// console.log('madePrBody',body)
body.registerCheckAsbitems = deepCopy(this.dataTransOpts.tableM.register_check_asbitem)
if (this.form.id) {
@ -1459,7 +1463,7 @@ export default {
postapi(`/api/PatientRegister/CreatePatientRegister`, body)
.then(res => {
if (res.code > -1) {
objCopy(res.data, this.form)
objCopy(res.data, this.form) // ()
this.dataTransOpts.tableS.patient_register = deepCopy(res.data)
@ -1477,7 +1481,7 @@ export default {
// this.refreshRegister(Object.assign({}, res.data))
//
if (this.patientRegister.photo && this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.patientRegister.photo);
if (this.peoplePhoto && this.peoplePhoto.indexOf("data:image") > -1) savePeoplePhoto(res.data.id, this.peoplePhoto);
//
if (!body.id) {
@ -1521,7 +1525,7 @@ export default {
return;
}
this.dataTransOpts.tableS.patient_register.id = ''
this.patientRegister.photo = '/pic/Photo.jpg'
this.peoplePhoto = '/pic/Photo.jpg'
this.patientRegister.patientRegisterId = '';
this.form.id = '';
this.form.patientId = '00000000-0000-0000-0000-000000000000';
@ -1595,7 +1599,7 @@ export default {
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.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({ showClose: true, message: "上传照片错误" + lres.code })
@ -1968,23 +1972,6 @@ export default {
// this.dataTransOpts.refresh.register_check_asbitem.D++
},
//
triggerHeadSave() {
//id api/patientregister/updatepatientregister
let body = this.madePrBody()
// // 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) {
// console.log("");
//
if (this.patientRegister.photo && this.patientRegister.photo.indexOf("data:image") > -1) savePeoplePhoto(this.form.id, this.patientRegister.photo);
objCopy(this.form, this.patientRegister.patientRegisterRd);
this.refreshRegister(Object.assign({}, this.form))
}
});
},
// IDform.id
refreshFormId() {
@ -2020,6 +2007,10 @@ export default {
//
event.preventDefault();
//
let placeholder = input.getAttribute('placeholder')
if(placeholder == '身份证号') this.changeIdNo()
//
for (let j = i + 1; j < inputs.length; j++) {
if (inputs[j].getAttribute('disabled') != "disabled") {

2
src/components/patientRegister/PatientRegisterItem.vue

@ -179,7 +179,7 @@ import { getPagePriv, checkPagePriv, arrayFilter, arrayReduce, arrayExistObj, dd
export default {
props: ["prForm", "prAsbOpraOpts", "triggerHeadSave", "refreshFormId"],
props: ["prForm", "prAsbOpraOpts", "refreshFormId"],
data() {
return {
pagePriv: {

5
src/components/patientRegister/PatientRegisterList.vue

@ -64,8 +64,7 @@
<div v-else-if="dropCol[index].prop == 'nationId'">
{{ dddw(dict.nation, "id", scope.row[dropCol[index].prop], "displayName") }}
</div>
<div v-else-if="dropCol[index].prop == 'birthDate'
|| dropCol[index].prop == 'creationTime'">
<div v-else-if="dropCol[index].prop == 'birthDate'">
{{ scope.row[dropCol[index].prop] ? moment(scope.row[dropCol[index].prop]).format('yyyy-MM-DD') : '' }}
</div>
<div v-else-if="dropCol[index].prop == 'maritalStatusId'">
@ -321,7 +320,7 @@ export default {
{ label: "介绍人", prop: "salesman", minWidth: 80, align: "center" },
{ label: "是否VIP", prop: "isVip", minWidth: 80, align: "center" },
{ label: "登记人", prop: "creatorName", minWidth: 80, align: "center" },
{ label: "登记日期", prop: "creationTime", minWidth: 80, align: "center" },
{ label: "登记日期", prop: "creationTime", minWidth: 130, align: "center" },
{ label: "是否上传", prop: "isUpload", minWidth: 80, align: "center" },
{ label: "高原/健康", prop: "qztlType", minWidth: 90, align: "center" },
{ label: "行车", prop: "qztlIsMain", minWidth: 50, align: "center" },

2
src/components/patientRegister/patientRegisterQuery.vue

@ -216,7 +216,7 @@ export default {
event.preventDefault();
//
console.log(input.getAttribute('placeholder'),input.value)
// console.log(input.getAttribute('placeholder'),input.value)
let placeholder = input.getAttribute('placeholder')
switch (placeholder) {
case '条码号':

Loading…
Cancel
Save