|
|
|
@ -739,17 +739,12 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
created() { |
|
|
|
this.initFormData() |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() { |
|
|
|
// objCopy(this.formInitData, this.form); |
|
|
|
// this.initBox(); |
|
|
|
// this.getCustomerOrgRegisterList() |
|
|
|
// this.getPeoplePhoto(this.patientRegister.photo) |
|
|
|
this.initFormData() |
|
|
|
}, |
|
|
|
|
|
|
|
computed: { |
|
|
|
@ -905,28 +900,28 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//获取单位体检次数列表,并默认赋最后一次体检次数 |
|
|
|
async getCustomerOrgRegisterList() { |
|
|
|
this.customerOrgRegisterList = [] |
|
|
|
if (this.form.customerOrgId == this.dict.personOrgId) { |
|
|
|
this.form.customerOrgRegisterId = null |
|
|
|
return |
|
|
|
} |
|
|
|
try { |
|
|
|
let res = await getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}`); |
|
|
|
let res1 = await getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`); |
|
|
|
this.customerOrgRegisterList = arrayFilter(res1.data, 'isComplete', 'N') |
|
|
|
|
|
|
|
//要把已完成体检的次数去掉 (查询时不能触发保存) |
|
|
|
// if (this.customerOrgRegisterList.length > 0) { |
|
|
|
// this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id |
|
|
|
// //this.changeCustomerOrgGroupId() |
|
|
|
// this.changeMedicalTimes() |
|
|
|
// } |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
console.log(error) |
|
|
|
} |
|
|
|
}, |
|
|
|
// async getCustomerOrgRegisterList() { |
|
|
|
// this.customerOrgRegisterList = [] |
|
|
|
// if (this.form.customerOrgId == this.dict.personOrgId) { |
|
|
|
// this.form.customerOrgRegisterId = null |
|
|
|
// return |
|
|
|
// } |
|
|
|
// try { |
|
|
|
// let res = await getapi(`/api/app/customer-org/parent/${this.form.customerOrgId}`); |
|
|
|
// let res1 = await getapi(`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${res.data}`); |
|
|
|
// this.customerOrgRegisterList = arrayFilter(res1.data, 'isComplete', 'N') |
|
|
|
|
|
|
|
// //要把已完成体检的次数去掉 (查询时不能触发保存) |
|
|
|
// // if (this.customerOrgRegisterList.length > 0) { |
|
|
|
// // this.form.customerOrgRegisterId = this.customerOrgRegisterList[this.customerOrgRegisterList.length - 1].id |
|
|
|
// // //this.changeCustomerOrgGroupId() |
|
|
|
// // this.changeMedicalTimes() |
|
|
|
// // } |
|
|
|
|
|
|
|
// } catch (error) { |
|
|
|
// console.log(error) |
|
|
|
// } |
|
|
|
// }, |
|
|
|
|
|
|
|
//修改单位体检次数 |
|
|
|
changeMedicalTimes() { |
|
|
|
@ -1638,12 +1633,12 @@ export default { |
|
|
|
//监听事件 |
|
|
|
watch: { |
|
|
|
|
|
|
|
"form.customerOrgId"(newVal, oldVal) { |
|
|
|
//console.log('editTimes newVal:',newVal,' oldVal:',oldVal) |
|
|
|
if (newVal != oldVal) { |
|
|
|
this.getCustomerOrgRegisterList() |
|
|
|
} |
|
|
|
}, |
|
|
|
// "form.customerOrgId"(newVal, oldVal) { |
|
|
|
// //console.log('editTimes newVal:',newVal,' oldVal:',oldVal) |
|
|
|
// if (newVal != oldVal) { |
|
|
|
// this.getCustomerOrgRegisterList() |
|
|
|
// } |
|
|
|
// }, |
|
|
|
|
|
|
|
//新增或编辑 |
|
|
|
"editTimes"(newVal, oldVal) { |
|
|
|
|