Commit fa795363 authored by 吴婷慧's avatar 吴婷慧

Merge branch 'yanglilong' into dev-wth

parents a64b5bd0 9b2ab5f4
...@@ -10,5 +10,8 @@ module.exports = { ...@@ -10,5 +10,8 @@ module.exports = {
rules: { rules: {
"no-console": process.env.NODE_ENV === "production" ? "warn" : "off", "no-console": process.env.NODE_ENV === "production" ? "warn" : "off",
"no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off",
"max-line-length": "off",
"object-property-newline": "off",
"prettier/prettier": "off"
}, },
}; };
...@@ -14,6 +14,7 @@ export default { ...@@ -14,6 +14,7 @@ export default {
payorDelete: "/backstage/auth/payorDelete", //保险公司删除 payorDelete: "/backstage/auth/payorDelete", //保险公司删除
/*-------------折扣信息-----------------*/ /*-------------折扣信息-----------------*/
payorAddDiscount: "/backstage/auth/payorAddDiscount", //编辑折扣信息 payorAddDiscount: "/backstage/auth/payorAddDiscount", //新增折扣信息
payorAddDiscountBenefit: "/backstage/auth/payorAddDiscountBenefit", //编辑折扣信息
payorDiscountDelete: "/backstage/auth/payorDiscountDelete", //删除折扣信息 payorDiscountDelete: "/backstage/auth/payorDiscountDelete", //删除折扣信息
}; };
...@@ -55,10 +55,14 @@ const PAYORDELETE = (data) => { ...@@ -55,10 +55,14 @@ const PAYORDELETE = (data) => {
}; };
/*-------------折扣信息-----------------*/ /*-------------折扣信息-----------------*/
//编辑折扣信息 //新增折扣信息
const PAYORADDDISCOUNT = (data) => { const PAYORADDDISCOUNT = (data) => {
return req.post(apis.payorAddDiscount, data); return req.post(apis.payorAddDiscount, data);
}; };
//编辑折扣信息
const PAYORADDDISCOUNTBENEFIT = (data) => {
return req.post(apis.payorAddDiscountBenefit, data);
};
//删除折扣信息 //删除折扣信息
const PAYORDISCOUNTDELETE = (data) => { const PAYORDISCOUNTDELETE = (data) => {
return req.post(apis.payorDiscountDelete, data); return req.post(apis.payorDiscountDelete, data);
...@@ -77,5 +81,6 @@ export default { ...@@ -77,5 +81,6 @@ export default {
PAYORUPDATE, PAYORUPDATE,
PAYORDELETE, PAYORDELETE,
PAYORADDDISCOUNT, PAYORADDDISCOUNT,
PAYORADDDISCOUNTBENEFIT,
PAYORDISCOUNTDELETE PAYORDISCOUNTDELETE
}; };
...@@ -14,6 +14,11 @@ export default { ...@@ -14,6 +14,11 @@ export default {
path: "company", path: "company",
name: "InfoCompany", name: "InfoCompany",
component: () => import("@/views/info/company") component: () => import("@/views/info/company")
},
{
path: "companyDetail",
name: "InfoCompanyDetail",
component: () => import("@/views/info/companyDetail")
} }
] ]
}; };
<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-table <a-table :columns="columns" :data-source="dataList" :scroll="{ x: 'max-content' }" :pagination="false">
:columns="columns" <div v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index" :key="col.dataIndex" >
:data-source="dataList"
:scroll="{ x: 'max-content' }"
:pagination="false"
>
<div
v-for="col in columns"
:slot="col.dataIndex"
slot-scope="text, record, index"
:key="col.dataIndex"
@click.stop="seeDetail(record)"
>
<template v-if="col.dataIndex == 'operation'"> <template v-if="col.dataIndex == 'operation'">
<a-button type="link" @click.stop="editEvt(record, index)">{{ <a-button type="link" @click.stop="editEvt(record)">修改</a-button>
record.edit ? "保存" : "修改" <a-button type="link" @click.stop="detailEvt(record)">查看</a-button>
}}</a-button> <a-button type="link" class="danger" @click.stop="delRecord(index)">删除</a-button>
<a-button type="link" class="success">新增</a-button>
<a-button type="link" class="danger" @click.stop="delRecord(index)"
>删除</a-button
>
</template> </template>
<template v-else> <template v-else>
<a-input <span>{{ text }}</span>
v-if="record.edit"
placeholder="请输入"
v-model="record[col.dataIndex]"
/>
<span v-else>{{ text }}</span>
</template> </template>
</div> </div>
</a-table> </a-table>
<!--分页--> <!--分页-->
<BurtPagination :pagination="pagination" @pageChange="getData" /> <BurtPagination :pagination="pagination" @pageChange="getData" />
<a-modal :title="editFormObj.id ? '编辑' : '新增'" :visible="dialogShow" width="60%" :maskClosable="false"
<!--详细信息--> okText="确定" cancelText="取消"
<companyInfo /> @ok="handleEditOK"
<!--折扣信息--> @cancel="dialogShow = false">
<Discount /> <a-form-model layout="vertical" ref="editForm" :model="editFormObj" :rules="editRules">
<a-row :gutter="30">
<a-col :lg="12" :xs="24">
<a-form-model-item label="公司名称" prop="longName">
<a-input v-model.trim="editFormObj.longName" placeholder="保险公司名称" />
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="医生英文名" prop="englishName">
<a-input v-model.trim="editFormObj.englishName" placeholder="保险医生英文名" />
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="联系电话" prop="contactPhone">
<a-input v-model.trim="editFormObj.contactPhone" placeholder="联系电话" />
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="联系地址" prop="address">
<a-input v-model.trim="editFormObj.address" placeholder="联系地址" />
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="Protal链接" prop="portalUrl">
<a-input v-model.trim="editFormObj.portalUrl" placeholder="Protal链接" />
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="联系人" prop="contactPerson">
<a-input v-model.trim="editFormObj.contactPerson" placeholder="联系人" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</div> </div>
</template> </template>
<script> <script>
import BurtPagination from "@/components/CUSTOMER/pagation"; import BurtPagination from "@/components/CUSTOMER/pagation";
import Discount from "./components/companyDiscount";
import companyInfo from "./components/companyInfo";
const columns = [ const columns = [
{ { title: "序号", dataIndex: "id",width: 120},
title: "序号", { title: "保险公司名称",dataIndex: "longName", ellipsis: true, scopedSlots: { customRender: "longName" },width: 130},
dataIndex: "id", { title: "医生英文名", dataIndex: "englishName",ellipsis: true,scopedSlots: { customRender: "englishName" },width: 105},
width: 120, { title: "联系电话", dataIndex: "contactPhone", scopedSlots: { customRender: "contactPhone" }, width: 125},
}, { title: "联系地址", dataIndex: "address", ellipsis: true, scopedSlots: { customRender: "address" }, width: 180},
{ { title: "Protal链接", dataIndex: "portalUrl", ellipsis: true, scopedSlots: { customRender: "portalUrl" }, width: 155 },
title: "保险公司名称", { title: "联系人", dataIndex: "contactPerson", ellipsis: true, scopedSlots: { customRender: "contactPerson" },width: 100},
dataIndex: "longName", { title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" },fixed: "right", width: "170px",align: "center"},
ellipsis: true,
scopedSlots: { customRender: "longName" },
width: 130,
},
{
title: "医生英文名",
dataIndex: "englishName",
ellipsis: true,
scopedSlots: { customRender: "englishName" },
width: 105,
},
{
title: "联系电话",
dataIndex: "contactPhone",
scopedSlots: { customRender: "contactPhone" },
width: 125,
},
{
title: "联系地址",
dataIndex: "address",
ellipsis: true,
scopedSlots: { customRender: "address" },
width: 180,
},
{
title: "Protal链接",
dataIndex: "portalUrl",
ellipsis: true,
scopedSlots: { customRender: "portalUrl" },
width: 155,
},
{
title: "联系人",
dataIndex: "contactPerson",
ellipsis: true,
scopedSlots: { customRender: "contactPerson" },
width: 100,
},
{
title: "操作",
dataIndex: "operation",
scopedSlots: { customRender: "operation" },
fixed: "right",
width: "170px",
},
]; ];
export default { export default {
data() { data() {
return { return {
dialogShow: false,
columns, columns,
pagination: { pagination: {
pageNum: 1, pageNum: 1,
...@@ -112,12 +80,22 @@ export default { ...@@ -112,12 +80,22 @@ export default {
total: 0, total: 0,
}, },
dataList: [], dataList: [],
editFormObj: {
id: "",
longName: "",
englishName: "",
contactPhone: "",
address: "",
portalUrl: "",
contactPerson: "",
},
editRules: {
longName: [{ required: true, message: "请输入", trigger: "blur" }],
},
}; };
}, },
components: { components: {
BurtPagination, BurtPagination,
companyInfo,
Discount
}, },
created() { created() {
this.getData(); this.getData();
...@@ -134,35 +112,42 @@ export default { ...@@ -134,35 +112,42 @@ export default {
if (res.returnCode == "0000") { if (res.returnCode == "0000") {
let content = res.content || {}; let content = res.content || {};
this.pagination.total = content.total || 0; this.pagination.total = content.total || 0;
this.dataList = (content.list || []).map((item) => { this.dataList = content.list || [];
return {
...item,
edit: false,
};
});
} else { } else {
this.$message.error(res.returnMsg); this.$message.error(res.returnMsg);
} }
}); });
}, },
//编辑 //编辑
editEvt(record, index) { editEvt(record) {
this.dataList.forEach((item, i) => { this.editFormObj = {
if (index != i) { id: record.id || "",
item.edit = false; longName: record.longName || "",
englishName: record.englishName || "",
contactPhone: record.contactPhone || "",
address: record.address || "",
portalUrl: record.portalUrl || "",
contactPerson: record.contactPerson || ""
};
this.dialogShow = true;
},
//编辑保存
handleEditOK(){
this.$refs.editForm.validate((valid) => {
if (valid) {
this.$apis
.PAYORUPDATE(this.editFormObj)
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("编辑成功");
this.dialogShow = false;
this.getData();
} else {
this.$message.error(res.returnMsg);
}
});
} }
}); });
record.edit = !record.edit;
//保存
if (!record.edit) {
this.$apis.PAYORUPDATE(record).then((res) => {
if (res.returnCode == "0000") {
this.$message.success("编辑成功");
} else {
this.$message.error(res.returnMsg);
}
});
}
}, },
//删除 //删除
delRecord(index) { delRecord(index) {
...@@ -187,6 +172,14 @@ export default { ...@@ -187,6 +172,14 @@ export default {
}, },
}); });
}, },
detailEvt(record){
this.$router.push({
path: '/info/companyDetail',
query: {
id: record.id
}
})
},
//查看详情 //查看详情
seeDetail(record) { seeDetail(record) {
//没有编辑 //没有编辑
......
<template>
<div class="white_bg burt-container">
<!--详细信息-->
<companyInfo :detailObj="detailObj" />
<!--折扣信息-->
<Discount v-if="detailObj.id" :detailObj="detailObj" @getDetail="getDetail" />
</div>
</template>
<script>
import companyInfo from "./components/companyInfo";
import Discount from "./components/companyDiscount";
export default {
data(){
return {
id: '', //公司id
detailObj: { //公司详情
discountList: [], //折扣列表
}
}
},
components: {
companyInfo,
Discount
},
created(){
this.id = this.$route.query.id;
this.getDetail();
},
methods: {
//获取详细信息
getDetail() {
this.$apis.PAYORDETAIL({
id: this.id,
})
.then((res) => {
if (res.returnCode == "0000") {
this.detailObj = res.content || {};
} else {
this.$message.error(res.returnMsg);
}
});
},
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<template> <template>
<!--折扣信息--> <!--折扣信息-->
<div class="discount-container"> <div class="discount-container">
<div class="title-div">下面的是写死为1001这条保险公司的-----折扣信息</div> <div class="flex btns-div">
<a-table <div class="title-div">折扣信息</div>
:columns="columns" <div class="flex btns">
:data-source="tableList" <a-button type="primary" icon="plus" @click.stop="editEvt({})">新增</a-button>
:scroll="{ x: 'max-content' }" <a-button type="primary">医科理赔申请书模版</a-button>
:pagination="false" <a-button type="primary">齿科理赔申请书模版</a-button>
> <a-button type="primary">预授权申请书模版</a-button>
<div </div>
v-for="col in columns" </div>
:slot="col.dataIndex" <a-table :columns="columns" :data-source="tableList" :scroll="{ x: 'max-content' }" :pagination="false" >
slot-scope="text, record, index" <div v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index" :key="col.dataIndex">
:key="col.dataIndex"
>
<template v-if="col.dataIndex == 'operation'"> <template v-if="col.dataIndex == 'operation'">
<a-button type="link" @click.stop="editEvt(record, index)">{{ <a-button type="link" @click.stop="editEvt(record)">修改</a-button>
record.edit ? "保存" : "修改" <a-button type="link" class="danger" @click.stop="delRecord(index)">删除</a-button>
}}</a-button>
<a-button type="link" class="success">新增</a-button>
<a-button type="link" class="danger" @click.stop="delRecord(index)"
>删除</a-button
>
</template> </template>
<template <template v-else-if="col.dataIndex == 'benefits'" slot-scope="text, record">
v-else-if="col.dataIndex == 'benefits'" <a-select v-if="record.edit" v-model="record.benefits2" placeholder="请选择" mode="multiple">
slot-scope="text, record" <a-select-option :value="item.benefitCode" v-for="item in benefitType" :key="item.benefitCode">{{ item.description }}</a-select-option>
>
<a-select
v-if="record.edit"
v-model="record.benefits2"
placeholder="请选择"
mode="multiple"
>
<a-select-option
:value="item.benefitCode"
v-for="item in benefitType"
:key="item.benefitCode"
>{{ item.description }}</a-select-option
>
</a-select> </a-select>
<span v-else>{{ filterType(record.benefits2) }}</span> <span v-else>{{ filterType(record.benefits2) }}</span>
</template> </template>
<template v-else> <template v-else>
<a-input <a-input v-if="record.edit" placeholder="请输入" v-model="record[col.dataIndex]"/>
v-if="record.edit"
placeholder="请输入"
v-model="record[col.dataIndex]"
/>
<span v-else>{{ text }}</span> <span v-else>{{ text }}</span>
</template> </template>
</div> </div>
</a-table> </a-table>
<!--分页--> <!--分页-->
<BurtPagination :pagination="pagination" @pageChange="getTableList" /> <BurtPagination :pagination="pagination" @pageChange="getTableList" />
<a-modal title="编辑" :visible="dialogShow" width="60%" :maskClosable="false"
okText="确定" cancelText="取消" @ok="handleEditOK" @cancel="dialogShow = false">
<a-form-model layout="vertical" ref="editForm" :model="editFormObj" :rules="editRules">
<a-row :gutter="30">
<a-col :lg="12" :xs="24">
<a-form-model-item label="项目" prop="benefits">
<a-select v-model="editFormObj.benefits2" placeholder="请选择" mode="multiple">
<a-select-option :value="item.benefitCode" v-for="item in benefitType" :key="item.benefitCode">{{ item.description }}</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="12" :xs="24">
<a-form-model-item label="折扣比例" prop="ratio">
<a-input v-model.trim="editFormObj.ratio" placeholder="折扣比例" type="number" :min="0" />
</a-form-model-item>
</a-col>
<a-col :xs="24">
<a-form-model-item label="备注" prop="remark">
<a-input type="textarea" v-model.trim="editFormObj.remark" placeholder="备注" />
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</div> </div>
</template> </template>
<script> <script>
import BurtPagination from "@/components/CUSTOMER/pagation"; import BurtPagination from "@/components/CUSTOMER/pagation";
const columns = [ const columns = [
{ { title: "序号", dataIndex: "id", width: 205},
title: "序号", { title: "项目",dataIndex: "benefits", ellipsis: true, scopedSlots: { customRender: "benefits" },width: 310, },
dataIndex: "id", { title: "折扣比例", dataIndex: "ratio", ellipsis: true, scopedSlots: { customRender: "ratio" },width: 190,},
width: 205, { title: "备注", dataIndex: "remark", scopedSlots: { customRender: "remark" }, width: 180,},
}, { title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" },fixed: "right", width: "170px" },
{
title: "项目",
dataIndex: "benefits",
ellipsis: true,
scopedSlots: { customRender: "benefits" },
width: 310,
},
{
title: "折扣比例",
dataIndex: "ratio",
ellipsis: true,
scopedSlots: { customRender: "ratio" },
width: 190,
},
{
title: "备注",
dataIndex: "remark",
scopedSlots: { customRender: "remark" },
width: 180,
},
{
title: "操作",
dataIndex: "operation",
scopedSlots: { customRender: "operation" },
fixed: "right",
width: "170px",
},
]; ];
export default { export default {
props: {
detailObj: {
discountList: []
}
},
data() { data() {
return { return {
dialogShow: false,
columns, columns,
pagination: { pagination: {
pageNum: 1, pageNum: 1,
pageSize: 5, pageSize: 5,
total: 0, total: 0,
}, },
dataList: [], //所有的折扣信息 dataList: [],//所有的折扣信息
tableList: [], //显示 tableList: [], //显示
benefitType: [], //福利类型 benefitType: [], //福利类型
benefitTypeObj: {}, //福利类型对象 benefitTypeObj: {}, //福利类型对象
editFormObj: {
id: "",
benefits2: [],
ratio: "",
remark: ""
},
editRules: {
benefits2: [{ required: true, message: "请选择", trigger: "blur" }],
ratio: [{ required: true, message: "请输入", trigger: "blur" }],
},
}; };
}, },
components: { components: {
BurtPagination, BurtPagination,
}, },
watch: {
detailObj: {
handler(newVal){
let list = newVal.discountList || [];
this.pagination.total = list.length;
this.dataList = list;
this.getTableList();
},
immediate: true,
deep: true
}
},
async created() { async created() {
await this.getBenefitType(); this.getBenefitType();
this.getData();
}, },
methods: { methods: {
//过滤器 //过滤器
...@@ -140,23 +140,6 @@ export default { ...@@ -140,23 +140,6 @@ export default {
}); });
}); });
}, },
//获取列表
getData() {
this.$apis
.PAYORDETAIL({
id: 1001,
})
.then((res) => {
if (res.returnCode == "0000") {
let list = res.content.discountList || [];
this.pagination.total = list.length;
this.dataList = list;
this.getTableList();
} else {
this.$message.error(res.returnMsg);
}
});
},
//分页 //分页
getTableList() { getTableList() {
let list = this.dataList.slice( let list = this.dataList.slice(
...@@ -166,42 +149,48 @@ export default { ...@@ -166,42 +149,48 @@ export default {
this.tableList = list.map((item) => { this.tableList = list.map((item) => {
return { return {
...item, ...item,
edit: false,
benefits2: item.benefits ? item.benefits.split(",") : [], benefits2: item.benefits ? item.benefits.split(",") : [],
}; };
}); });
}, },
//编辑 //编辑
editEvt(record, index) { editEvt(record) {
this.tableList.forEach((item, i) => { this.editFormObj = {
if (index != i) { id: record.id || "",
item.edit = false; benefits2: record.benefits2 || [],
} ratio: record.ratio || "",
}); remark: record.remark || ""
record.edit = !record.edit; };
//保存 this.dialogShow = true;
if (!record.edit) { },
this.$apis //编辑保存
.PAYORADDDISCOUNT({ handleEditOK() {
payorId: 1001, this.$refs.editForm.validate((valid) => {
id: record.id, if (valid) {
ratio: record.ratio, let funcName = this.editFormObj.id? 'PAYORADDDISCOUNTBENEFIT': 'PAYORADDDISCOUNT';
remark: record.remark, this.$apis[funcName]({
discountBenefitList: (record.benefits2 || []).map((item) => { payorId: this.detailObj.id,
id: this.editFormObj.id,
ratio: this.editFormObj.ratio,
remark: this.editFormObj.remark,
discountBenefitList: (this.editFormObj.benefits2 || []).map((item) => {
return { return {
benefitCode: item, benefitCode: item,
discountId: record.id, discountId: this.editFormObj.id,
}; };
}), }),
}) })
.then((res) => { .then((res) => {
if (res.returnCode == "0000") { if (res.returnCode == "0000") {
this.$message.success("编辑成功"); this.$message.success("编辑成功");
this.dialogShow = false;
this.$emit('getDetail');
} else { } else {
this.$message.error(res.returnMsg); this.$message.error(res.returnMsg);
} }
}); });
} }
});
}, },
//删除 //删除
delRecord(index) { delRecord(index) {
...@@ -211,18 +200,17 @@ export default { ...@@ -211,18 +200,17 @@ export default {
okText: "确定", okText: "确定",
cancelText: "取消", cancelText: "取消",
onOk: () => { onOk: () => {
this.$apis this.$apis.PAYORDISCOUNTDELETE({
.PAYORDISCOUNTDELETE({ id: this.tableList[index].id,
id: this.tableList[index].id, })
}) .then((res) => {
.then((res) => { if (res.returnCode == "0000") {
if (res.returnCode == "0000") { this.$message.success("删除成功");
this.$message.success("删除成功"); this.tableList.splice(index, 1);
this.tableList.splice(index, 1); } else {
} else { this.$message.error(res.returnMsg);
this.$message.error(res.returnMsg); }
} });
});
}, },
}); });
}, },
...@@ -239,4 +227,10 @@ export default { ...@@ -239,4 +227,10 @@ export default {
color: #252631; color: #252631;
font-weight: bold; font-weight: bold;
} }
.btns-div{
justify-content: space-between;
.ant-btn{
margin-left: 30px;
}
}
</style> </style>
<template> <template>
<div class="info-div"> <div class="info-div">
<div class="title-div">下面的是写死为1001这条保险公司的-----详细信息</div>
<a-form-model ref="form" layout="vertical"> <a-form-model ref="form" layout="vertical">
<a-row :gutter="30"> <a-row :gutter="30">
<a-col :lg="6" :sm="12"> <a-col :lg="6" :sm="12">
...@@ -10,10 +9,7 @@ ...@@ -10,10 +9,7 @@
</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="保险公司英文名称">
<a-input <a-input v-model="detailObj.englishName" placeholder="保险公司英文名称" />
v-model="detailObj.englishName"
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">
...@@ -35,20 +31,12 @@ ...@@ -35,20 +31,12 @@
<a-row :gutter="30"> <a-row :gutter="30">
<a-col :lg="12" :sm="12"> <a-col :lg="12" :sm="12">
<a-form-model-item label="合同起始日期"> <a-form-model-item label="合同起始日期">
<a-date-picker <a-date-picker v-model="detailObj.startDate" format="YYYY年MM月DD日" placeholder="选择日期"/>
v-model="detailObj.startDate"
format="YYYY年MM月DD日"
placeholder="选择日期"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="12" :sm="12"> <a-col :lg="12" :sm="12">
<a-form-model-item label="合同终止日期"> <a-form-model-item label="合同终止日期">
<a-date-picker <a-date-picker v-model="detailObj.endDate" format="YYYY年MM月DD日" placeholder="选择日期"/>
v-model="detailObj.endDate"
format="YYYY年MM月DD日"
placeholder="选择日期"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -60,26 +48,17 @@ ...@@ -60,26 +48,17 @@
</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="网络联系人">
<a-input <a-input v-model="detailObj.contactPerson" placeholder="请输入联系人"/>
v-model="detailObj.contactPerson"
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="理赔件邮寄地址">
<a-input <a-input v-model="detailObj.claimAddress" placeholder="理赔件邮寄地址"/>
v-model="detailObj.claimAddress"
placeholder="理赔件邮寄地址"
/>
</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="保险公司联系电话">
<a-input <a-input v-model="detailObj.contactPhone" placeholder="保险公司联系电话"/>
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">
...@@ -99,34 +78,22 @@ ...@@ -99,34 +78,22 @@
</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="客服邮件地址">
<a-input <a-input v-model="detailObj.customerEmail" placeholder="客服邮件地址" />
v-model="detailObj.customerEmail"
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="预授权邮件地址">
<a-input <a-input v-model="detailObj.authorEmail" placeholder="预授权邮件地址" />
v-model="detailObj.authorEmail"
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="理赔邮件地址">
<a-input <a-input v-model="detailObj.claimEmail" placeholder="理赔邮件地址" />
v-model="detailObj.claimEmail"
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="保险公司Protal链接"> <a-form-model-item label="保险公司Protal链接">
<a-input <a-input v-model="detailObj.portalUrl" placeholder="保险公司Protal链接" />
v-model="detailObj.portalUrl"
placeholder="保险公司Protal链接"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="4" :sm="12"> <a-col :lg="4" :sm="12">
...@@ -136,11 +103,7 @@ ...@@ -136,11 +103,7 @@
</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="密码">
<a-input <a-input type="password" v-model="detailObj.loginPwd" placeholder="密码" />
type="password"
v-model="detailObj.loginPwd"
placeholder="密码"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -159,42 +122,27 @@ ...@@ -159,42 +122,27 @@
<script> <script>
export default { export default {
props: {
detailObj: {}
},
data() { data() {
return { return {
detailObj: {}
} }
}, },
created(){
this.getDetail()
},
methods: { methods: {
//获取详细信息
getDetail() {
this.$apis
.PAYORDETAIL({
id: 1001,
})
.then((res) => {
if (res.returnCode == "0000") {
this.detailObj = res.content || {};
} else {
this.$message.error(res.returnMsg);
}
});
},
//新建保存 //新建保存
handlerSava(){ handlerSava(){
this.$apis this.$apis.CREATEPAY({
.CREATEPAY({ ...this.detailObj
...this.detailObj })
}) .then((res) => {
.then((res) => { if (res.returnCode == "0000") {
if (res.returnCode == "0000") { this.$message.success("新建成功");
this.$message.success("新建成功"); } else {
} else { this.$message.error(res.returnMsg);
this.$message.error(res.returnMsg); }
} });
});
} }
}, },
}; };
......
...@@ -10,19 +10,12 @@ ...@@ -10,19 +10,12 @@
</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="医疗机构英文名">
<a-input <a-input v-model="detailObj.englishName" placeholder="医疗机构英文名" />
v-model="detailObj.englishName"
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="营业时间">
<a-date-picker <a-date-picker v-model="detailObj.businessHours" format="YYYY年MM月DD日" placeholder="选择日期"/>
v-model="detailObj.businessHours"
format="YYYY年MM月DD日"
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">
...@@ -32,18 +25,12 @@ ...@@ -32,18 +25,12 @@
</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="诊所地址(中文)">
<a-input <a-input v-model="detailObj.address" placeholder="诊所地址(中文)" />
v-model="detailObj.address"
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="诊所地址(英文)">
<a-input <a-input v-model="detailObj.englishAddr" placeholder="诊所地址(英文)" />
v-model="detailObj.englishAddr"
placeholder="诊所地址(英文)"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -63,11 +50,7 @@ ...@@ -63,11 +50,7 @@
</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="银行账号">
<a-input <a-input v-model="detailObj.bankAccount" type="number" placeholder="银行账号" />
v-model="detailObj.bankAccount"
type="number"
placeholder="银行账号"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -77,45 +60,27 @@ ...@@ -77,45 +60,27 @@
<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="Beneficiiary Name 账号"> <a-form-model-item label="Beneficiiary Name 账号">
<a-input <a-input v-model="detailObj.accountNameEng" placeholder="Beneficiiary Name 账号" />
v-model="detailObj.accountNameEng"
placeholder="Beneficiiary Name 账号"
/>
</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="Bank Account No 银行账号"> <a-form-model-item label="Bank Account No 银行账号">
<a-input <a-input v-model="detailObj.bankAccountEng" placeholder="Bank Account No 银行账号"/>
v-model="detailObj.bankAccountEng"
placeholder="Bank Account No 银行账号"
/>
</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="Bank Name 银行名称"> <a-form-model-item label="Bank Name 银行名称">
<a-input <a-input v-model="detailObj.bankAddrEng" type="number" placeholder="Bank Name 银行名称" />
v-model="detailObj.bankAddrEng"
type="number"
placeholder="Bank Name 银行名称"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :sm="12"> <a-col :sm="12">
<a-form-model-item label="Bank Address 银行地址"> <a-form-model-item label="Bank Address 银行地址">
<a-input <a-input v-model="detailObj.bankAddr" type="number" placeholder="Bank Address 银行地址"/>
v-model="detailObj.bankAddr"
type="number"
placeholder="Bank Address 银行地址"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :sm="12"> <a-col :sm="12">
<a-form-model-item label="Swift Code 国际电汇代码"> <a-form-model-item label="Swift Code 国际电汇代码">
<a-input <a-input v-model="detailObj.telegraphicTransferCode" type="number" placeholder="Swift Code 国际电汇代码" />
v-model="detailObj.telegraphicTransferCode"
type="number"
placeholder="Swift Code 国际电汇代码"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
...@@ -127,40 +92,29 @@ ...@@ -127,40 +92,29 @@
</a-upload> </a-upload>
</div> --> </div> -->
<div class="title-div">医生信息</div> <div class="title-div">医生信息</div>
<a-table <a-table :columns="columns" :data-source="dataList" :scroll="{ x: 'max-content' }" :pagination="false">
:columns="columns"
:data-source="dataList"
:scroll="{ x: 'max-content' }"
:pagination="false"
>
<template slot="specialtyList" slot-scope="text, record"> <template slot="specialtyList" slot-scope="text, record">
<a-select <span>{{ filterSpecialty(record.specialtyList) }}</span>
v-if="record.edit"
v-model="record.specialtyList2"
placeholder="请选择"
mode="multiple"
>
<a-select-option
:value="item.id"
v-for="item in specialtyList"
:key="item.id"
>{{ item.specialtyDesc }}</a-select-option
>
</a-select>
<span v-else>{{ filterSpecialty(record.specialtyList2) }}</span>
</template> </template>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click.stop="editEvt(record, index)">{{ <a-button type="link" @click.stop="editEvt(record)">{{ record.edit ? "保存" : "修改"}}</a-button>
record.edit ? "保存" : "修改" <a-button type="link" class="danger" @click.stop="delRecord(index)">删除</a-button>
}}</a-button>
<a-button type="link" class="success">新增</a-button>
<a-button type="link" class="danger" @click.stop="delRecord(index)"
>删除</a-button
>
</template> </template>
</a-table> </a-table>
<!--分页--> <!--分页-->
<BurtPagination :pagination="pagination" @pageChange="getDoctorList" /> <BurtPagination :pagination="pagination" @pageChange="getDoctorList" />
<a-modal title="编辑" :visible="dialogShow" width="700px" :maskClosable="false"
okText="确定" cancelText="取消"
@ok="handleEditOK" @cancel="dialogShow = false">
<a-form-model ref="editForm" :model="editFormObj"
:rules="editRules" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-model-item label="科室" prop="specialtyList">
<a-select v-model="editFormObj.specialtyList" placeholder="请选择" mode="multiple">
<a-select-option :value="item.id" v-for="item in specialtyList" :key="item.id">{{ item.specialtyDesc }}</a-select-option>
</a-select>
</a-form-model-item>
</a-form-model>
</a-modal>
</div> </div>
</template> </template>
...@@ -195,12 +149,16 @@ const columns = [ ...@@ -195,12 +149,16 @@ const columns = [
dataIndex: "operation", dataIndex: "operation",
scopedSlots: { customRender: "operation" }, scopedSlots: { customRender: "operation" },
fixed: "right", fixed: "right",
width: "170px", width: "120px",
align: "center",
}, },
]; ];
export default { export default {
data() { data() {
return { return {
dialogShow: false,
labelCol: { span: 4 },
wrapperCol: { span: 20 },
columns, columns,
dataList: [], dataList: [],
detailObj: {}, //详细信息 detailObj: {}, //详细信息
...@@ -211,6 +169,15 @@ export default { ...@@ -211,6 +169,15 @@ export default {
}, },
specialtyList: [], //科室列表 specialtyList: [], //科室列表
specialtyObj: {}, //科室对象 specialtyObj: {}, //科室对象
editFormObj: {
id: "",
specialtyList: [],
},
editRules: {
specialtyList: [
{ required: true, message: "请选择", trigger: "change" },
],
},
}; };
}, },
components: { components: {
...@@ -272,15 +239,14 @@ export default { ...@@ -272,15 +239,14 @@ export default {
let content = res.content || {}; let content = res.content || {};
this.pagination.total = content.total || 0; this.pagination.total = content.total || 0;
this.dataList = (content.list || []).map((item) => { this.dataList = (content.list || []).map((item) => {
let specialtyList2 = (item.specialtyList || []).map( let specialtyList = (item.specialtyList || []).map(
(innerItem) => { (innerItem) => {
return innerItem.specialtyId; return innerItem.specialtyId;
} }
); );
return { return {
...item, ...item,
specialtyList2: specialtyList2 || [], specialtyList: specialtyList || [],
edit: false,
}; };
}); });
} else { } else {
...@@ -288,33 +254,37 @@ export default { ...@@ -288,33 +254,37 @@ export default {
} }
}); });
}, },
//编辑 editEvt(record) {
editEvt(record, index) { this.editFormObj = {
this.dataList.forEach((item, i) => { id: record.id || "",
if (index != i) { specialtyList: record.specialtyList || [],
item.edit = false; };
this.dialogShow = true;
},
//编辑保存
handleEditOK() {
this.$refs.editForm.validate((valid) => {
if (valid) {
this.$apis
.DOCTORUPDATE({
id: this.editFormObj.id,
specialtyList: this.editFormObj.specialtyList.map((item) => {
return {
specialtyId: item,
};
}),
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("编辑成功");
this.dialogShow = false;
this.getDoctorList();
} else {
this.$message.error(res.returnMsg);
}
});
} }
}); });
record.edit = !record.edit;
//保存
if (!record.edit) {
this.$apis
.DOCTORUPDATE({
id: record.id,
specialtyList: record.specialtyList2.map((item) => {
return {
specialtyId: item,
};
}),
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("编辑成功");
} else {
this.$message.error(res.returnMsg);
}
});
}
}, },
//删除医生 //删除医生
delRecord(index) { delRecord(index) {
......
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