|
|
@ -6,21 +6,21 @@ |
|
|
<td width="50%">建议:</td> |
|
|
<td width="50%">建议:</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td><el-input type="textarea" v-model="form.occupationalAbnormal" size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td> |
|
|
|
|
|
<td><el-input type="textarea" v-model="form.occupationalAbSuggestion" size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td> |
|
|
|
|
|
|
|
|
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.occupationalAbnormal" size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td> |
|
|
|
|
|
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.occupationalAbSuggestion" size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td width="50%">非职业性异常:</td> |
|
|
<td width="50%">非职业性异常:</td> |
|
|
<td width="50%">建议:</td> |
|
|
<td width="50%">建议:</td> |
|
|
</tr> |
|
|
</tr> |
|
|
<tr> |
|
|
<tr> |
|
|
<td><el-input type="textarea" v-model="form.noOccupationalAbnormal" size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td> |
|
|
|
|
|
<td><el-input type="textarea" v-model="form.noOccupAbSuggestion" size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td> |
|
|
|
|
|
|
|
|
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.noOccupationalAbnormal" size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td> |
|
|
|
|
|
<td><el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.noOccupAbSuggestion" size="small" :autosize="{ minRows: 8, maxRows: 8 }"></el-input></td> |
|
|
</tr> |
|
|
</tr> |
|
|
</table> |
|
|
</table> |
|
|
<div>处理意见:</div> |
|
|
<div>处理意见:</div> |
|
|
<div> |
|
|
<div> |
|
|
<el-input type="textarea" v-model="form.handleSuggestion" size="small" :autosize="{ minRows: 2, maxRows: 2 }"></el-input> |
|
|
|
|
|
|
|
|
<el-input type="textarea" v-model="dataTransOpts.tableS.patient_occupational_disease.handleSuggestion" size="small" :autosize="{ minRows: 2, maxRows: 2 }"></el-input> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
@ -39,32 +39,6 @@ export default { |
|
|
privs: [] // 页面权限 |
|
|
privs: [] // 页面权限 |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
form: { //联系人表单信息 |
|
|
|
|
|
id: "", |
|
|
|
|
|
customerOrgId: '', |
|
|
|
|
|
creationTime: null, |
|
|
|
|
|
lastModificationTime: null, |
|
|
|
|
|
creatorName: "", |
|
|
|
|
|
lastModifierName: "", |
|
|
|
|
|
displayName: "", |
|
|
|
|
|
title: "", |
|
|
|
|
|
remark: "", |
|
|
|
|
|
}, |
|
|
|
|
|
formInit: {}, |
|
|
|
|
|
contactMethodList: [], //联系方式(可修改) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Methodtypes: [ |
|
|
|
|
|
//{ value: '',label: '所有订单状态' }, |
|
|
|
|
|
{ value: "0", label: "电话" }, |
|
|
|
|
|
{ value: "1", label: "邮箱" }, |
|
|
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
rules: { |
|
|
|
|
|
displayName: [ |
|
|
|
|
|
{ required: true, message: "请输入名称", trigger: "blur" }, |
|
|
|
|
|
], |
|
|
|
|
|
}, |
|
|
|
|
|
}; |
|
|
}; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -72,12 +46,11 @@ export default { |
|
|
//获取用户当前页面的权限 |
|
|
//获取用户当前页面的权限 |
|
|
let userPriv = window.sessionStorage.getItem('userPriv') |
|
|
let userPriv = window.sessionStorage.getItem('userPriv') |
|
|
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) |
|
|
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) |
|
|
this.formInit = deepCopy(this.form) |
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//挂载完成 |
|
|
//挂载完成 |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.getFormData(this.dataTransOpts.tableS.contact_person.id) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
computed: { |
|
|
computed: { |
|
|
@ -87,124 +60,6 @@ export default { |
|
|
methods: { |
|
|
methods: { |
|
|
moment, checkPagePriv, |
|
|
moment, checkPagePriv, |
|
|
|
|
|
|
|
|
// 获取表单数据 |
|
|
|
|
|
getFormData(id) { |
|
|
|
|
|
if (!id) { |
|
|
|
|
|
this.form = deepCopy(this.formInit) |
|
|
|
|
|
this.form.customerOrgId = this.dataTransOpts.tableS.customer_org.id |
|
|
|
|
|
this.contactMethodList = [] |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
getapi(`/api/app/contact-person/${id}`) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
this.form = deepCopy(res.data) |
|
|
|
|
|
this.getContactMethodList(res.data.id) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//获取联系方式列表 |
|
|
|
|
|
//api/app/contact-method/in-contact-person-id?ContactPersonId=3a0c08ad-4304-138b-d9e6-a7338739dfc4' \ |
|
|
|
|
|
getContactMethodList(ContactPersonId) { |
|
|
|
|
|
if (!ContactPersonId) { |
|
|
|
|
|
this.contactMethodList = [] |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
getapi("/api/app/contact-method/in-contact-person-id", { |
|
|
|
|
|
ContactPersonId, |
|
|
|
|
|
}).then(res => { |
|
|
|
|
|
//console.log('res.data',res.data) |
|
|
|
|
|
if (res.code != -1) this.contactMethodList = res.data; |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//删除联系方式行 |
|
|
|
|
|
deleteRow(index) { |
|
|
|
|
|
this.$confirm("此操作确定后将永久删除该记录, 是否继续?", "提示", { |
|
|
|
|
|
confirmButtonText: "是", |
|
|
|
|
|
cancelButtonText: "否", |
|
|
|
|
|
type: "warning", |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.contactMethodList.splice(index, 1); |
|
|
|
|
|
//this.submit('form'); |
|
|
|
|
|
}).catch((err) => { |
|
|
|
|
|
if (err == 'cancel') { |
|
|
|
|
|
this.$message.info({ showClose: true, message: "已取消删除" }); |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//联系人信息提交 |
|
|
|
|
|
submit(formName) { |
|
|
|
|
|
let body = { |
|
|
|
|
|
customerOrgId: "", |
|
|
|
|
|
displayName: "", |
|
|
|
|
|
title: "", |
|
|
|
|
|
remark: "", |
|
|
|
|
|
}; |
|
|
|
|
|
this.$refs[formName].validate((valid, fields) => { |
|
|
|
|
|
if (!valid) { |
|
|
|
|
|
this.$message.warning({ showClose: true, message: fields[Object.keys(fields)[0]][0].message }); |
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
objCopy(this.form, body); |
|
|
|
|
|
let contactMethod = { |
|
|
|
|
|
contactPersonId: this.form.id, |
|
|
|
|
|
details: this.contactMethodList |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log("body,contactMethod", body, contactMethod); |
|
|
|
|
|
|
|
|
|
|
|
if (!this.form.id) { |
|
|
|
|
|
postapi("/api/app/contact-person", body) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
//console.log('api/app/contact-person') |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
this.form = res.data |
|
|
|
|
|
this.dataTransOpts.tableS.contact_person.id = res.data.id |
|
|
|
|
|
this.refFunc(['curChooseRow'], res.data) |
|
|
|
|
|
contactMethod.contactPersonId = res.data.id |
|
|
|
|
|
return postapi('/api/app/contactmethod/createmany', contactMethod); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
//console.log('api/app/contact-method/many') |
|
|
|
|
|
if (res && res.code != -1) { |
|
|
|
|
|
console.log("操作成功!"); |
|
|
|
|
|
this.dialogWin.ContactPersonEdit = false |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} else { |
|
|
|
|
|
putapi(`/api/app/contact-person/${this.form.id}`, body) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
if (res.code != -1) { |
|
|
|
|
|
this.refFunc(['curChooseRow'], this.form) |
|
|
|
|
|
return postapi('/api/app/contactmethod/createmany', contactMethod); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
.then((res) => { |
|
|
|
|
|
//console.log('api/app/contact-method/many') |
|
|
|
|
|
//this.getContactPersonList(this.customerOrgId); //改成局部刷新 |
|
|
|
|
|
if (res && res.code != -1) { |
|
|
|
|
|
console.log("操作成功!"); |
|
|
|
|
|
this.dialogWin.ContactPersonEdit = false |
|
|
|
|
|
} |
|
|
|
|
|
}); |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//新增联系方式 |
|
|
|
|
|
addMethod() { |
|
|
|
|
|
this.contactMethodList.push({ |
|
|
|
|
|
contactMethodValue: "", |
|
|
|
|
|
contactMethodType: "0", |
|
|
|
|
|
contactPersonId: this.form.id, |
|
|
|
|
|
}); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -218,12 +73,6 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
// 'customerOrgId' (newVal,oldVal){ |
|
|
|
|
|
// console.log('watch customerOrgId',newVal,oldVal) |
|
|
|
|
|
// if(newVal != oldVal){ |
|
|
|
|
|
// this.personId = '' |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
}, |
|
|
}, |
|
|
}; |
|
|
}; |
|
|
</script> |
|
|
</script> |
|
|
|