Commit 28d55d42 authored by 吴婷慧's avatar 吴婷慧

ECCS-1459测试问题修改

parent 556d0dca
...@@ -11,9 +11,10 @@ export default { ...@@ -11,9 +11,10 @@ export default {
conditionList: "/backstage/auth/conditionList", conditionList: "/backstage/auth/conditionList",
addCondition: "/backstage/auth/conditionCreate", addCondition: "/backstage/auth/conditionCreate",
editCondition: "/backstage/auth/conditionEdit", editCondition: "/backstage/auth/conditionEdit",
benefitList: "/backstage/auth/benefitList", benefitList: "/backstage/auth/benefitListShow",
addBenefit: "/backstage/auth/createBenefit", addBenefit: "/backstage/auth/createBenefit",
editBenefit: "/backstage/auth/benefitEdit", editBenefit: "/backstage/auth/benefitEdit",
getFrequencyCode: "/backstage/auth/frequencyList", getFrequencyCode: "/backstage/auth/frequencyList",
getLimitCode: "/backstage/auth/limitList", getLimitCode: "/backstage/auth/limitList",
remainingQuotaSet: "/backstage/auth/remainingQuotaSet" // 修改剩余金额
}; };
...@@ -66,6 +66,11 @@ const GETLIMITCODE = (data) => { ...@@ -66,6 +66,11 @@ const GETLIMITCODE = (data) => {
return req.post(apis.getLimitCode, data); return req.post(apis.getLimitCode, data);
}; };
// 修改剩余金额
const SETREMAININGQUOTA = (data) => {
return req.post(apis.remainingQuotaSet, data);
};
// 对象数组 // 对象数组
export default { export default {
GETBENEGITTYPE, GETBENEGITTYPE,
...@@ -84,4 +89,5 @@ export default { ...@@ -84,4 +89,5 @@ export default {
EDITCOVERAGEDATA, EDITCOVERAGEDATA,
GETFREQUENCYCODE, GETFREQUENCYCODE,
GETLIMITCODE, GETLIMITCODE,
SETREMAININGQUOTA
}; };
...@@ -283,6 +283,14 @@ export default { ...@@ -283,6 +283,14 @@ export default {
this.$apis.GETCUSTOMERDETAIL(data).then((res) => { this.$apis.GETCUSTOMERDETAIL(data).then((res) => {
if (res.returnCode === "0000") { if (res.returnCode === "0000") {
let data = res.content || {}; let data = res.content || {};
// type === '2'说明是新增保单,需要把客户信息清空
if(type === '2') {
const { mrnNo, idNo, patientName, birthday, sex } = data
this.form = { ...this.form, mrnNo, idNo, patientName, birthday, sex }
this.medCardCopeFiles = [];
this.idCardCopeFiles = [];
return true
}
this._getCorporateCode(data.payorId); this._getCorporateCode(data.payorId);
this._getPlanCode(data.corpId); this._getPlanCode(data.corpId);
const medCardCopeFiles = data.medCardCopeFiles || []; const medCardCopeFiles = data.medCardCopeFiles || [];
...@@ -301,29 +309,6 @@ export default { ...@@ -301,29 +309,6 @@ export default {
name: item.fileName, name: item.fileName,
}) })
}) })
// type === '2'说明是新增保单,需要把客户信息清空
if(type === '2') {
data = {
...data,
payorId: undefined,
corpName: '',
idType: undefined,
policyNo: '',
firstEnrollmentTime: '',
startDate: '',
cardNo: '',
policyDircetArea: undefined,
waitingPeriod: 'N',
isUndertakeAnamnesis: "N",
endDate: '',
planName: undefined,
remark: '',
medCardCopeFiles: [],
idCardCopeFiles: [], // 身份证复印件
}
this.medCardCopeFiles = [];
this.idCardCopeFiles = [];
}
this.form = data; this.form = data;
} }
// this.dataList = (res.content && res.content.list) || []; // this.dataList = (res.content && res.content.list) || [];
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
<span>{{text | formatSex}}</span> <span>{{text | formatSex}}</span>
</template> </template>
<template slot="operation" slot-scope="record"> <template slot="operation" slot-scope="record">
<a-button type="link" @click.stop="changeDataStatus(record)">修改</a-button> <a-button type="link" v-if="!record.isExpired" @click.stop="changeDataStatus(record)">修改</a-button>
<a-button type="link" @click.stop="printClaimPdf(record)">打印理赔申请书</a-button> <a-button type="link" @click.stop="printClaimPdf(record)">打印理赔申请书</a-button>
<a-button type="link" @click.stop="changeDataStatus(record, '2')">新增保单</a-button> <a-button type="link" @click.stop="changeDataStatus(record, '2')">新增保单</a-button>
<!-- <a-button type="link" class="success">新增</a-button> --> <!-- <a-button type="link" class="success">新增</a-button> -->
...@@ -86,9 +86,21 @@ export default { ...@@ -86,9 +86,21 @@ export default {
{ title: "出生日期", dataIndex: "birthday", width: 170, customRender: dateFormat}, { title: "出生日期", dataIndex: "birthday", width: 170, customRender: dateFormat},
{ title: "性别", dataIndex: "sex", width: 80, scopedSlots: { customRender: "sex" } }, { title: "性别", dataIndex: "sex", width: 80, scopedSlots: { customRender: "sex" } },
{ title: "保险公司", dataIndex: "payorName", width: 180 }, { title: "保险公司", dataIndex: "payorName", width: 180 },
{ title: "保单号码", dataIndex: "policyNo", width: 190 }, { title: "保险卡号", dataIndex: "cardNo", width: 190 },
{ title: "保单生效日期", dataIndex: "startDate", width: 170, customRender: dateFormat }, { title: "保单生效日期", dataIndex: "startDate", width: 170, customRender: (val, row) => {
{ title: "保单终止日期", dataIndex: "endDate", width: 170, customRender: dateFormat }, const formatDate = dateFormat(val)
if (row.isExpired) {
return <span class="red-text">{formatDate}</span>
}
return formatDate;
}},
{ title: "保单终止日期", dataIndex: "endDate", width: 170, customRender: (val, row) => {
const formatDate = dateFormat(val)
if (row.isExpired) {
return <span class="red-text">{formatDate}</span>
}
return formatDate;
}},
{ title: "操作", key: "operation", width: "270px", fixed: "right", scopedSlots: { customRender: "operation" }, align: 'center'}, { title: "操作", key: "operation", width: "270px", fixed: "right", scopedSlots: { customRender: "operation" }, align: 'center'},
]; ];
return { return {
...@@ -198,8 +210,13 @@ export default { ...@@ -198,8 +210,13 @@ export default {
...this.pager, ...this.pager,
}; };
this.$apis.GETCUSTOMERLIST(data).then((res) => { this.$apis.GETCUSTOMERLIST(data).then((res) => {
this.dataList = (res.content && res.content.list) || [];
this.pager.total = (res.content && res.content.total) || 0; this.pager.total = (res.content && res.content.total) || 0;
const data = (res.content && res.content.list) || [];
data.forEach(item => {
item.isExpired = moment(item.endDate).valueOf() < moment(new Date()).valueOf()
});
console.log(data)
this.dataList = data;
}); });
}, },
}, },
...@@ -215,4 +232,7 @@ export default { ...@@ -215,4 +232,7 @@ export default {
.ant-btn .icon-class { .ant-btn .icon-class {
.mg-r(10); .mg-r(10);
} }
.red-text{
color: red;
}
</style> </style>
...@@ -5,16 +5,11 @@ ...@@ -5,16 +5,11 @@
<a-button type="primary" @click.stop="addCompany">新建保险公司</a-button> <a-button type="primary" @click.stop="addCompany">新建保险公司</a-button>
</div> </div>
<a-table :columns="columns" :data-source="dataList" :scroll="{ x: 'max-content' }" :pagination="false"> <a-table :columns="columns" :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" > <template slot='operation' slot-scope="record">
<template v-if="col.dataIndex == 'operation'">
<a-button type="link" @click.stop="editEvt(record)">修改</a-button> <a-button type="link" @click.stop="editEvt(record)">修改</a-button>
<a-button type="link" class="success" @click.stop="detailEvt(record)">查看</a-button> <a-button type="link" class="success" @click.stop="detailEvt(record)">查看</a-button>
<a-button type="link" class="danger" @click.stop="delRecord(index)">删除</a-button> <a-button type="link" class="danger" @click.stop="delRecord(index)">删除</a-button>
</template> </template>
<template v-else>
<span>{{ text }}</span>
</template>
</div>
</a-table> </a-table>
<!--分页--> <!--分页-->
<BurtPagination :pagination="pagination" @pageChange="getData" /> <BurtPagination :pagination="pagination" @pageChange="getData" />
...@@ -62,18 +57,23 @@ ...@@ -62,18 +57,23 @@
<script> <script>
import BurtPagination from "@/components/CUSTOMER/pagation"; import BurtPagination from "@/components/CUSTOMER/pagation";
const columns = [
{ title: "序号", dataIndex: "id",width: 120},
{ title: "保险公司名称",dataIndex: "longName", 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: "200px",align: "center"},
];
export default { export default {
data() { data() {
const columns = [
{ title: "序号", dataIndex: "id",width: 120},
{ title: "保险公司名称",dataIndex: "longName", ellipsis: true,width: 130},
{ title: "保险公司英文名", dataIndex: "englishName",ellipsis: true,width: 105},
{ title: "联系电话", dataIndex: "contactPhone", width: 125, customRender: (val) => {
const valArr = val && val.split(/,|\n/ig) || [];
const valStr = valArr.join('<br />')
return <span domPropsInnerHTML={valStr}></span>
}},
{ title: "联系地址", dataIndex: "address", ellipsis: true, width: 180},
{ title: "Protal链接", dataIndex: "portalUrl", ellipsis: true, width: 155 },
{ title: "联系人", dataIndex: "contactPerson", ellipsis: true, width: 100},
{ title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" },fixed: "right", width: "200px",align: "center"},
];
return { return {
dialogShow: false, dialogShow: false,
columns, columns,
......
...@@ -25,24 +25,43 @@ ...@@ -25,24 +25,43 @@
</a-table> </a-table>
</div> </div>
</div> --> </div> -->
<a-collapse v-model="activeKeys" expand-icon-position="right" :bordered="false"> <!-- <a-collapse v-model="activeKeys" expand-icon-position="right" :bordered="false">
<a-collapse-panel v-for="item in benefitData" :key="item.benefitCode" :header="item.benefitCode + ' ' +item.benefitDesc"> <a-collapse-panel v-for="item in benefitData" :key="item.benefitCode" :header="item.benefitCode + ' ' +item.benefitDesc">
<div> <div>
<a-row class="policy_line" :gutter="10"> <a-row class="policy_line" :gutter="10">
<a-col :span="6">事先授权:</a-col> <a-col :span="6">事先授权:</a-col>
<a-col :span="6">等待期:{{ item.waitingPeriod }}</a-col> <a-col :span="6">等待期:{{ item.waitingPeriod }}</a-col>
<!-- <a-col :span="6">年限额:</a-col> <a-col :span="6">年限额:</a-col>
<a-col :span="6">赔付比例:</a-col> --> <a-col :span="6">赔付比例:</a-col>
</a-row> </a-row>
</div> </div>
<condition :formData="{ ...item, conditionType: '01' }" /> <condition :formData="{ ...item, conditionType: '01' }" />
</a-collapse-panel> </a-collapse-panel>
</a-collapse> </a-collapse> -->
<a-row v-for="(item, index) in benefitData" :key="item.benefitCode" class="policy_line" :gutter="10">
<a-col :span="12">{{item.benefitCode + ' ' +item.benefitDesc}}</a-col>
<a-col :span="12" class="border-r">
<a-row :gutter="10">
<a-col :span="12">{{item.benefitConditionDesc}}</a-col>
<a-col :span="12" class="border-r" v-if="item.remainingQuota || item.remainingQuota === 0">
<a-row v-if="item.isEditRemainingQuota">
<a-col :span="14">
<a-input v-model="remainingQuotaForm[item.benefitCode]" placeholder="请输入剩余金额"></a-input>
</a-col>
<a-col :span="10">
<a-button type="link" @click="saveRemainingQuota(item, index)">保存</a-button>
<a-button type="link" @click="editRemainingQuota(item, index)">取消</a-button>
</a-col>
</a-row>
<p v-else @dblclick="editRemainingQuota(item, index)" title="双击可编辑剩余金额">剩余{{item.remainingQuota}}元</p>
</a-col>
</a-row>
</a-col>
</a-row>
</div> </div>
</template> </template>
<script> <script>
import condition from "../condition";
export default { export default {
props: { props: {
...@@ -52,18 +71,53 @@ export default { ...@@ -52,18 +71,53 @@ export default {
}, },
}, },
components: { components: {
condition,
}, },
data() { data() {
return { return {
benefitData: [], benefitData: [],
activeKeys: "", activeKeys: "",
remainingQuotaForm: {}
}; };
}, },
mounted() { mounted() {
this._getBenefitData(); this._getBenefitData();
}, },
methods: { methods: {
// 编辑剩余金额的打开与取消
editRemainingQuota(data, index) {
const val = data.isEditRemainingQuota
if (! val) {
this.remainingQuotaForm[data.benefitCode] = data.remainingQuota;
}
this.$set(this.benefitData[index], 'isEditRemainingQuota', !val)
},
// 剩余金额保存
saveRemainingQuota(data, index) {
const { benefitCode, corpCode, coverageCode, patientId, payorCode, planCode } = data;
const remainingQuota = this.remainingQuotaForm[benefitCode]
if (! remainingQuota) {
this.$message.error('剩余金额不能为空')
return false;
}
if (! /^\d+$|^\d*\.\d+$/g.test(remainingQuota)) {
this.$message.error('剩余金额应该为数字')
return false;
}
const params = {
benefitCode, corpCode, coverageCode, patientId, payorCode, planCode,
remainingQuota,
quotaType: '01' // 额度类型(01:福利额度 02:责任额度 03:计划额度)
}
this.$apis.SETREMAININGQUOTA(params).then(res => {
if(res.returnCode === '0000') {
this.$message.success(res.returnMsg || '保存成功')
this.editRemainingQuota(data, index) // 转换编辑状态
this.benefitData[index].remainingQuota = remainingQuota // 直接赋值, 就不请求数据初始化了
} else {
this.$message.error(res.returnMsg || '保存失败')
}
})
},
_getBenefitData() { _getBenefitData() {
const { corpCode, coverageCode, payorCode, planCode } = this.formData; const { corpCode, coverageCode, payorCode, planCode } = this.formData;
const data = { corpCode, coverageCode, payorCode, planCode }; const data = { corpCode, coverageCode, payorCode, planCode };
...@@ -77,7 +131,7 @@ export default { ...@@ -77,7 +131,7 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
.benefits { .benefits {
.pa(0, 20, 10, 20); .pa(0, 0, 10, 0);
background-color: #fff; background-color: #fff;
.save-btn { .save-btn {
.mg-t(20); .mg-t(20);
...@@ -88,10 +142,14 @@ export default { ...@@ -88,10 +142,14 @@ export default {
} }
} }
.policy_line { .policy_line {
display: flex;
align-items: center;
.pa(0, 30, 0, 30); .pa(0, 30, 0, 30);
line-height: 60px; min-height: 60px;
// &:not(:last-child) { line-height: 1.5;
border-bottom: 1px solid #f8fafb; border-bottom: 1px solid #f8fafb;
// } .border-r{
border-right: 1px solid #f8fafb;
}
} }
</style> </style>
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<a-col :span="6">赔付比例:</a-col> <a-col :span="6">赔付比例:</a-col>
</a-row> </a-row>
</div> </div>
<condition :formData="{ ...item, conditionType: '02' }" /> <condition class="conditions" :formData="{ ...item, conditionType: '02' }" />
<benefits :formData="item" /> <benefits :formData="item" />
</a-collapse-panel> </a-collapse-panel>
</a-collapse> </a-collapse>
...@@ -194,6 +194,9 @@ export default { ...@@ -194,6 +194,9 @@ export default {
float: right; float: right;
} }
} }
.conditions{
.pa(0, 30, 0, 30)
}
.icon-class { .icon-class {
.mg-r(10); .mg-r(10);
} }
......
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