Commit 21e2ac2a authored by 吴婷慧's avatar 吴婷慧

福利信息查询层级文婷

parent d6e01f55
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
export default { export default {
// getUserInfo: `/getUserInfo`, // getUserInfo: `/getUserInfo`,
payorCodeList: "/backstage/auth/payorListNopage", payorCodeList: "/backstage/auth/payorListNopage",
corporateCodeList: "/backstage/auth/corporateList", corporateCodeList: "/backstage/auth/corporateList", // 根据payorCode查询
planCodeList: "/backstage/auth/planList", planCodeList: "/backstage/auth/planList", // 根据corporCode查询
uploadImg: "/common/upload", uploadImg: "/common/upload",
specialtyList: "/backstage/auth/specialtyList", specialtyList: "/backstage/auth/specialtyList",
coverageCode: "/backstage/auth/coverageMasterList",
}; };
...@@ -17,12 +17,12 @@ const GETPAYORCODE = (data) => { ...@@ -17,12 +17,12 @@ const GETPAYORCODE = (data) => {
}; };
// get corporate Code 根据保险公司获取客户公司 // get corporate Code 根据保险公司获取客户公司
const GETCORPORATECODE = (data) => { const GETCORPORATECODEBYPAYOR = (data) => {
return req.post(apis.corporateCodeList, data); return req.post(apis.corporateCodeList, data);
}; };
// get plan Code 根据客户公司获取保险计划 // get plan Code 根据客户公司获取保险计划
const GETPLANCODE = (data) => { const GETPLANCODEBYCORP = (data) => {
return req.post(apis.planCodeList, data); return req.post(apis.planCodeList, data);
}; };
...@@ -36,12 +36,18 @@ const UPLOADIMG = (data) => { ...@@ -36,12 +36,18 @@ const UPLOADIMG = (data) => {
return req.post(apis.uploadImg, data); return req.post(apis.uploadImg, data);
}; };
// 责任累类型列表
const GETCOVERAGECODE = (data) => {
return req.post(apis.coverageCode, data);
};
// 对象数组 // 对象数组
export default { export default {
GETUSERINFO, GETUSERINFO,
GETPAYORCODE, GETPAYORCODE,
GETCORPORATECODE, GETCORPORATECODEBYPAYOR,
GETPLANCODE, GETPLANCODEBYCORP,
GETSPECIALTYLIST, GETSPECIALTYLIST,
UPLOADIMG, UPLOADIMG,
GETCOVERAGECODE,
}; };
...@@ -254,8 +254,14 @@ select { ...@@ -254,8 +254,14 @@ select {
// 编辑的时候字体颜色修改 // 编辑的时候字体颜色修改
.ant-input, .ant-input,
.ant-select{ .ant-select{
width: 100%;
color: #2B63FF; color: #2B63FF;
} }
// 操作栏fixed状态 层级太高会遮住展开的内容
.ant-table-expanded-row{
position: relative;
z-index: 2;
}
} }
.ant-btn-primary{ .ant-btn-primary{
background-color: #2B63FF; background-color: #2B63FF;
...@@ -336,3 +342,7 @@ select { ...@@ -336,3 +342,7 @@ select {
} }
} }
} }
.text-r{
text-align: right;
}
\ No newline at end of file
...@@ -387,7 +387,7 @@ export default { ...@@ -387,7 +387,7 @@ export default {
}, },
_getCorporateCode(val) { _getCorporateCode(val) {
this.$apis this.$apis
.GETCORPORATECODE({ .GETCORPORATECODEBYPAYOR({
longName: "", longName: "",
payorId: val, payorId: val,
}) })
...@@ -397,7 +397,7 @@ export default { ...@@ -397,7 +397,7 @@ export default {
}, },
_getPlanCode(val) { _getPlanCode(val) {
this.$apis this.$apis
.GETPLANCODE({ .GETPLANCODEBYCORP({
longName: "", longName: "",
corpId: val, corpId: val,
}) })
......
<template>
<div class="benefits">
<div>
<div class="text-r">
<a-button type="danger" class="save-btn">
<Icon name="ssiadd" :size="14" />新增
</a-button>
<a-table
:pagination="false"
:columns="considtionColumns"
:data-source="conditionData"
>
<template slot="operation" slot-scope="text, record">
<a-button v-if="record.isEdit" type="link"> 保存 </a-button>
<a-button v-else type="link"> 修改 </a-button>
<a-button type="link" class="success">新增</a-button>
<a-popconfirm
title="你确定要关闭吗?"
ok-text="确定"
cancel-text="取消"
>
<a-button type="link" class="danger">删除</a-button>
</a-popconfirm>
</template>
</a-table>
</div>
</div>
<div>
<div class="text-r">
<a-button type="danger" class="save-btn">
<Icon name="ssiadd" :size="14" />新增
</a-button>
<a-table
:pagination="false"
:columns="benefitColumns"
:data-source="benefitData"
>
<template slot="operation" slot-scope="text, record">
<a-button v-if="record.isEdit" type="link"> 保存 </a-button>
<a-button v-else type="link"> 修改 </a-button>
<a-button type="link" class="success">新增</a-button>
<a-popconfirm
title="你确定要关闭吗?"
ok-text="确定"
cancel-text="取消"
>
<a-button type="link" class="danger">删除</a-button>
</a-popconfirm>
</template>
</a-table>
</div>
</div>
</div>
</template>
<script>
export default {
props: {
coverageForm: {
type: Object,
required: true,
},
},
data() {
const considtionColumns = [
{ title: "限额", dataIndex: "index" },
{
title: "操作",
key: "operation",
width: "175px",
fixed: "right",
scopedSlots: { customRender: "operation" },
},
];
const benefitColumns = [
{ title: "责任列表", dataIndex: "index" },
{
title: "操作",
key: "operation",
width: "175px",
fixed: "right",
scopedSlots: { customRender: "operation" },
},
];
return {
considtionColumns,
benefitColumns,
conditionData: [{ index: "900" }],
benefitData: [{ index: "测试" }],
};
},
methods: {},
};
</script>
<style lang="less" scoped>
.benefits {
.pa(0, 20, 10, 20);
background-color: #fff;
.save-btn {
.mg-t(20);
.mg-b(10);
.icon-class {
.mg-r(10);
}
}
}
</style>
...@@ -23,10 +23,12 @@ ...@@ -23,10 +23,12 @@
<a-table <a-table
:columns="columns" :columns="columns"
:data-source="dataList" :data-source="dataList"
row-key="mrnNo" row-key="coverageCode"
:scroll="{ x: true }" :scroll="{ x: true }"
:pagination="pagination" :pagination="pagination"
:expanded-row-keys.sync="expandedRowKeys"
@change="onWelfareChange" @change="onWelfareChange"
@expand="handleExpand"
> >
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button <a-button
...@@ -49,11 +51,15 @@ ...@@ -49,11 +51,15 @@
<a-button type="link" class="danger">删除</a-button> <a-button type="link" class="danger">删除</a-button>
</a-popconfirm> </a-popconfirm>
</template> </template>
<template slot="expandedRowRender" slot-scope="record">
<benefits :coverageForm="record" />
</template>
</a-table> </a-table>
</div> </div>
</template> </template>
<script> <script>
import benefits from "../benefits";
export default { export default {
props: { props: {
coverageForm: { coverageForm: {
...@@ -61,6 +67,9 @@ export default { ...@@ -61,6 +67,9 @@ export default {
required: true, required: true,
}, },
}, },
components: {
benefits,
},
data() { data() {
const columns = [ const columns = [
{ {
...@@ -69,7 +78,23 @@ export default { ...@@ -69,7 +78,23 @@ export default {
width: 180, width: 180,
customRender: (val, row) => { customRender: (val, row) => {
if (row.isEdit) { if (row.isEdit) {
return <a-input v-model={row.coverageCode}></a-input>; return (
<a-select
v-model={row.coverageCode}
placeholder="请选择责任项目"
show-search
allow-clear
v-on:filterOption={this.filterCode}
>
{this.coverageCode.map((item) => {
return (
<a-select-option value={item.coverageCode}>
{item.coverageDesc}
</a-select-option>
);
})}
</a-select>
);
} }
return val; return val;
}, },
...@@ -114,7 +139,8 @@ export default { ...@@ -114,7 +139,8 @@ export default {
]; ];
return { return {
columns, columns,
dataList: [{}], dataList: [{ coverageCode: 22 }],
expandedRowKeys: [],
type: "", type: "",
welfareType: [], welfareType: [],
pager: { pager: {
...@@ -122,6 +148,7 @@ export default { ...@@ -122,6 +148,7 @@ export default {
pageSize: 10, pageSize: 10,
}, },
total: 0, total: 0,
coverageCode: [],
}; };
}, },
watch: { watch: {
...@@ -149,9 +176,16 @@ export default { ...@@ -149,9 +176,16 @@ export default {
addNew() { addNew() {
const item = { isEdit: true, isNew: true }; const item = { isEdit: true, isNew: true };
this.pager.pageSize++; this.pager.pageSize++;
this._getCoverageCode(); // 获取责任项目码表
this.dataList.unshift(item); this.dataList.unshift(item);
}, },
editData(record) { editData(record) {
this._getCoverageCode(); // 获取责任项目码表
const { coverageCode } = record;
const index = this.expandedRowKeys.indexOf(coverageCode);
if (index > -1) {
this.expandedRowKeys.splice(index, 1);
}
this.$set(record, "isEdit", true); this.$set(record, "isEdit", true);
}, },
saveEditData(record) { saveEditData(record) {
...@@ -221,6 +255,21 @@ export default { ...@@ -221,6 +255,21 @@ export default {
} }
this.pager.pageSize = val; this.pager.pageSize = val;
}, },
// 选择框筛选
filterCode(input, option) {
return (
option.componentOptions.children[0].text
.toLowerCase()
.indexOf(input.toLowerCase()) >= 0
);
},
handleExpand(expended, record) {
console.log(expended);
if (record.isEdit && expended) {
console.log(this.expandedRowKeys);
return false;
}
},
_getSpecialtyCode() { _getSpecialtyCode() {
this.$apis.GETSPECIALTYLIST().then((res) => { this.$apis.GETSPECIALTYLIST().then((res) => {
this.welfareType = res.content || []; this.welfareType = res.content || [];
...@@ -239,6 +288,14 @@ export default { ...@@ -239,6 +288,14 @@ export default {
this.dataList = res.content || []; this.dataList = res.content || [];
}); });
}, },
_getCoverageCode() {
if (this.coverageCode && this.coverageCode.length) {
return true;
}
this.$apis.GETCOVERAGECODE().then((res) => {
this.coverageCode = res.content || [];
});
},
}, },
}; };
</script> </script>
......
...@@ -388,7 +388,7 @@ export default { ...@@ -388,7 +388,7 @@ export default {
}, },
_getCorporateCode(val) { _getCorporateCode(val) {
this.$apis this.$apis
.GETCORPORATECODE({ .GETCORPORATECODEBYPAYOR({
longName: "", longName: "",
payorId: val, payorId: val,
}) })
...@@ -398,7 +398,7 @@ export default { ...@@ -398,7 +398,7 @@ export default {
}, },
_getPlanCode(val) { _getPlanCode(val) {
this.$apis this.$apis
.GETPLANCODE({ .GETPLANCODEBYCORP({
longName: "", longName: "",
corpId: val, corpId: val,
}) })
......
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