Commit ffe58fce authored by yanglilong's avatar yanglilong

Merge branch 'yanglilong' of git.ssish.com:sunhailiang/bims into test

parents 4a550955 06a35f6a
<template> <template>
<div class="info-div"> <div class="info-div">
<Goback title="保险公司详情" /> <Goback title="保险公司详情" />
<a-form-model ref="form" layout="vertical"> <a-form-model ref="form" layout="vertical" :model="detailObj" :rules="formRules">
<a-row :gutter="30"> <a-row :gutter="30">
<a-col :lg="6" :sm="12"> <a-col :lg="6" :sm="12">
<a-form-model-item label="保险公司名称"> <a-form-model-item label="保险公司名称" prop="longName">
<a-input v-model="detailObj.longName" placeholder="保险公司名称" /> <a-input v-model="detailObj.longName" placeholder="保险公司名称" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</a-row> </a-row>
<a-row :gutter="30"> <a-row :gutter="30">
<a-col :lg="3" :sm="12"> <a-col :lg="3" :sm="12">
<a-form-model-item label="有效"> <a-form-model-item label="有效" prop="status">
<a-select v-model="detailObj.status" placeholder="请选择"> <a-select v-model="detailObj.status" placeholder="请选择">
<a-select-option value="1">有效</a-select-option> <a-select-option value="1">有效</a-select-option>
<a-select-option value="2">无效</a-select-option> <a-select-option value="2">无效</a-select-option>
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</a-row> </a-row>
</a-col> </a-col>
<a-col :lg="10" :sm="12"> <a-col :lg="10" :sm="12">
<a-form-model-item label="保险公司地址"> <a-form-model-item label="保险公司地址" prop="address">
<a-input v-model="detailObj.address" placeholder="保险公司地址" /> <a-input v-model="detailObj.address" placeholder="保险公司地址" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -65,12 +65,12 @@ ...@@ -65,12 +65,12 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="4" :sm="12"> <a-col :lg="4" :sm="12">
<a-form-model-item label="保险公司联系电话"> <a-form-model-item label="保险公司联系电话" prop="contactPhone">
<a-input v-model="detailObj.contactPhone" placeholder="保险公司联系电话"/> <a-input v-model="detailObj.contactPhone" placeholder="保险公司联系电话"/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="6" :sm="12"> <a-col :lg="6" :sm="12">
<a-form-model-item label="客服电话"> <a-form-model-item label="客服电话" prop="customerTel">
<a-input v-model="detailObj.customerTel" placeholder="客服电话" /> <a-input v-model="detailObj.customerTel" placeholder="客服电话" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="6" :sm="12"> <a-col :lg="6" :sm="12">
<a-form-model-item label="保险公司邮件地址"> <a-form-model-item label="保险公司邮件地址" prop="email">
<a-input v-model="detailObj.email" placeholder="保险公司邮件地址" /> <a-input v-model="detailObj.email" placeholder="保险公司邮件地址" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -160,6 +160,14 @@ export default { ...@@ -160,6 +160,14 @@ export default {
data() { data() {
return { return {
countyList: [], countyList: [],
formRules: {
longName: [{ required: true, message: "请输入保险公司名称", trigger: "blur" }],
status: [{ required: true, message: "请选择是否有效", trigger: "change" }],
address: [{ required: true, message: "请输入保险公司地址", trigger: "blur" }],
contactPhone: [{ required: true, message: "请输入保险公司联系电话", trigger: "blur" }],
customerTel: [{ required: true, message: "请输入客服电话", trigger: "blur" }],
email: [{ required: true, message: "请输入保险公司邮件地址", trigger: "blur" }],
},
} }
}, },
components: { components: {
...@@ -194,26 +202,30 @@ export default { ...@@ -194,26 +202,30 @@ export default {
}, },
//新建保存 //新建保存
handlerSava(){ handlerSava(){
let formData = { this.$refs.form.validate((valid) => {
...this.detailObj, if (valid) {
claimApplicationTemplate: this.detailObj.claimApplicationTemplate.length>0? this.detailObj.claimApplicationTemplate[0].url: '', let formData = {
authApplicationTemplate: this.detailObj.authApplicationTemplate.length>0? this.detailObj.authApplicationTemplate[0].url: '', ...this.detailObj,
} claimApplicationTemplate: this.detailObj.claimApplicationTemplate.length>0? this.detailObj.claimApplicationTemplate[0].url: '',
let api = this.detailObj.id? 'PAYORUPDATE': 'CREATEPAY'; authApplicationTemplate: this.detailObj.authApplicationTemplate.length>0? this.detailObj.authApplicationTemplate[0].url: '',
this.$apis[api](formData)
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("保存成功");
if(!this.detailObj.id){
this.$router.replace({
path: '/info/companyDetail',
query: {
id: res.content
}
})
} }
} else { let api = this.detailObj.id? 'PAYORUPDATE': 'CREATEPAY';
this.$message.error(res.returnMsg); this.$apis[api](formData)
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("保存成功");
if(!this.detailObj.id){
this.$router.replace({
path: '/info/companyDetail',
query: {
id: res.content
}
})
}
} else {
this.$message.error(res.returnMsg);
}
});
} }
}); });
}, },
......
<template> <template>
<div class="white_bg burt-container"> <div class="white_bg burt-container">
<div class="title-div">申请日期</div> <div class="title-div">申请日期</div>
<a-form-model ref="form" layout="vertical"> <a-form-model ref="form" layout="vertical" :model="detailObj" :rules="formRules">
<a-row :gutter="30"> <a-row :gutter="30">
<a-col :lg="8" :sm="12"> <a-col :lg="8" :sm="12">
<a-form-model-item label="医疗机构名称"> <a-form-model-item label="医疗机构名称" prop="longName">
<a-input v-model="detailObj.longName" placeholder="医疗机构名称" /> <a-input v-model="detailObj.longName" placeholder="医疗机构名称" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="8" :sm="12"> <a-col :lg="8" :sm="12">
<a-form-model-item label="医疗机构英文名"> <a-form-model-item label="医疗机构英文名" prop="englishName">
<a-input v-model="detailObj.englishName" placeholder="医疗机构英文名" /> <a-input v-model="detailObj.englishName" placeholder="医疗机构英文名" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="8" :sm="12"> <a-col :lg="8" :sm="12">
<a-form-model-item label="联系电话"> <a-form-model-item label="联系电话" prop="telNo1">
<a-input v-model="detailObj.telNo1" placeholder="请输入联系电话" /> <a-input v-model="detailObj.telNo1" placeholder="请输入联系电话" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="10" :sm="12"> <a-col :lg="10" :sm="12">
<a-form-model-item label="诊所地址(中文)"> <a-form-model-item label="诊所地址(中文)" prop="address">
<a-input v-model="detailObj.address" placeholder="诊所地址(中文)" /> <a-input v-model="detailObj.address" placeholder="诊所地址(中文)" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
...@@ -185,6 +185,12 @@ export default { ...@@ -185,6 +185,12 @@ export default {
specialtyObj: {}, //科室对象 specialtyObj: {}, //科室对象
countyList: [], countyList: [],
languageList: [], languageList: [],
formRules: {
longName: [{ required: true, message: "请输入医疗机构名称", trigger: "blur" }],
englishName: [{ required: true, message: "请输入医疗机构英文名", trigger: "blur" }],
telNo1: [{ required: true, message: "请输入联系电话", trigger: "blur" }],
address: [{ required: true, message: "请输入诊所地址(中文)", trigger: "blur" }]
},
editFormObj: { editFormObj: {
id: "", id: "",
doctorCode: '', doctorCode: '',
...@@ -294,12 +300,16 @@ export default { ...@@ -294,12 +300,16 @@ export default {
}, },
//保存 //保存
saveEvt(){ saveEvt(){
this.$apis.PROVIDERUPDATE({...this.detailObj}) this.$refs.form.validate((valid) => {
.then((res) => { if(valid){
if (res.returnCode == "0000") { this.$apis.PROVIDERUPDATE({...this.detailObj})
this.$message.success("保存成功"); .then((res) => {
} else { if (res.returnCode == "0000") {
this.$message.error(res.returnMsg); this.$message.success("保存成功");
} else {
this.$message.error(res.returnMsg);
}
});
} }
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment