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

福利信息查询层级文婷

parent d6e01f55
......@@ -2,8 +2,9 @@
export default {
// getUserInfo: `/getUserInfo`,
payorCodeList: "/backstage/auth/payorListNopage",
corporateCodeList: "/backstage/auth/corporateList",
planCodeList: "/backstage/auth/planList",
corporateCodeList: "/backstage/auth/corporateList", // 根据payorCode查询
planCodeList: "/backstage/auth/planList", // 根据corporCode查询
uploadImg: "/common/upload",
specialtyList: "/backstage/auth/specialtyList",
coverageCode: "/backstage/auth/coverageMasterList",
};
......@@ -17,12 +17,12 @@ const GETPAYORCODE = (data) => {
};
// get corporate Code 根据保险公司获取客户公司
const GETCORPORATECODE = (data) => {
const GETCORPORATECODEBYPAYOR = (data) => {
return req.post(apis.corporateCodeList, data);
};
// get plan Code 根据客户公司获取保险计划
const GETPLANCODE = (data) => {
const GETPLANCODEBYCORP = (data) => {
return req.post(apis.planCodeList, data);
};
......@@ -36,12 +36,18 @@ const UPLOADIMG = (data) => {
return req.post(apis.uploadImg, data);
};
// 责任累类型列表
const GETCOVERAGECODE = (data) => {
return req.post(apis.coverageCode, data);
};
// 对象数组
export default {
GETUSERINFO,
GETPAYORCODE,
GETCORPORATECODE,
GETPLANCODE,
GETCORPORATECODEBYPAYOR,
GETPLANCODEBYCORP,
GETSPECIALTYLIST,
UPLOADIMG,
GETCOVERAGECODE,
};
......@@ -254,8 +254,14 @@ select {
// 编辑的时候字体颜色修改
.ant-input,
.ant-select{
width: 100%;
color: #2B63FF;
}
// 操作栏fixed状态 层级太高会遮住展开的内容
.ant-table-expanded-row{
position: relative;
z-index: 2;
}
}
.ant-btn-primary{
background-color: #2B63FF;
......@@ -335,4 +341,8 @@ select {
color: #2B63FF;
}
}
}
.text-r{
text-align: right;
}
\ No newline at end of file
......@@ -387,7 +387,7 @@ export default {
},
_getCorporateCode(val) {
this.$apis
.GETCORPORATECODE({
.GETCORPORATECODEBYPAYOR({
longName: "",
payorId: val,
})
......@@ -397,7 +397,7 @@ export default {
},
_getPlanCode(val) {
this.$apis
.GETPLANCODE({
.GETPLANCODEBYCORP({
longName: "",
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 @@
<a-table
:columns="columns"
:data-source="dataList"
row-key="mrnNo"
row-key="coverageCode"
:scroll="{ x: true }"
:pagination="pagination"
:expanded-row-keys.sync="expandedRowKeys"
@change="onWelfareChange"
@expand="handleExpand"
>
<template slot="operation" slot-scope="text, record, index">
<a-button
......@@ -49,11 +51,15 @@
<a-button type="link" class="danger">删除</a-button>
</a-popconfirm>
</template>
<template slot="expandedRowRender" slot-scope="record">
<benefits :coverageForm="record" />
</template>
</a-table>
</div>
</template>
<script>
import benefits from "../benefits";
export default {
props: {
coverageForm: {
......@@ -61,6 +67,9 @@ export default {
required: true,
},
},
components: {
benefits,
},
data() {
const columns = [
{
......@@ -69,7 +78,23 @@ export default {
width: 180,
customRender: (val, row) => {
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;
},
......@@ -114,7 +139,8 @@ export default {
];
return {
columns,
dataList: [{}],
dataList: [{ coverageCode: 22 }],
expandedRowKeys: [],
type: "",
welfareType: [],
pager: {
......@@ -122,6 +148,7 @@ export default {
pageSize: 10,
},
total: 0,
coverageCode: [],
};
},
watch: {
......@@ -149,9 +176,16 @@ export default {
addNew() {
const item = { isEdit: true, isNew: true };
this.pager.pageSize++;
this._getCoverageCode(); // 获取责任项目码表
this.dataList.unshift(item);
},
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);
},
saveEditData(record) {
......@@ -221,6 +255,21 @@ export default {
}
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() {
this.$apis.GETSPECIALTYLIST().then((res) => {
this.welfareType = res.content || [];
......@@ -239,6 +288,14 @@ export default {
this.dataList = res.content || [];
});
},
_getCoverageCode() {
if (this.coverageCode && this.coverageCode.length) {
return true;
}
this.$apis.GETCOVERAGECODE().then((res) => {
this.coverageCode = res.content || [];
});
},
},
};
</script>
......
......@@ -388,7 +388,7 @@ export default {
},
_getCorporateCode(val) {
this.$apis
.GETCORPORATECODE({
.GETCORPORATECODEBYPAYOR({
longName: "",
payorId: val,
})
......@@ -398,7 +398,7 @@ export default {
},
_getPlanCode(val) {
this.$apis
.GETPLANCODE({
.GETPLANCODEBYCORP({
longName: "",
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