Browse Source

dj seo

master
pengjun 2 years ago
parent
commit
a04be7f0ee
  1. 47
      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

47
src/components/patientRegister/PatientRegisterEdit.vue

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

5
src/components/patientRegister/PatientRegisterList.vue

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

2
src/components/patientRegister/patientRegisterQuery.vue

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

Loading…
Cancel
Save