Commit 6ba1d797 authored by yanglilong's avatar yanglilong

'修改'

parents 0327141a 21e2ac2a
// 基础api
export default {
getUserInfo: `/getUserInfo`,
corporateCodeList: "/backstage/auth/corporateList",
// getUserInfo: `/getUserInfo`,
payorCodeList: "/backstage/auth/payorListNopage",
corporateCodeList: "/backstage/auth/corporateList", // 根据payorCode查询
planCodeList: "/backstage/auth/planList", // 根据corporCode查询
uploadImg: "/common/upload",
specialtyList: "/backstage/auth/specialtyList",
coverageCode: "/backstage/auth/coverageMasterList",
};
// 客户管理api
export default {
getCustomerList: "/backstage/auth/patientList",
updateCustomList: "/backstage/auth/updatePatientPolicy",
createCustomer: "/backstage/auth/createPatient",
customerDetail: "/backstage/auth/patientDetail",
};
// 福利管理api
export default {};
export default {
benefitType: "/backstage/auth/benefitMasterList",
coverageList: "/backstage/auth/coverageList",
};
......@@ -8,10 +8,46 @@ const GETUSERINFO = (params) => {
params,
});
};
// get corporate Code
const GETCORPORATECODE = (data) => {
// 保险公司下拉数据
const GETPAYORCODE = (data) => {
return req.post(apis.payorCodeList, {
data,
});
};
// get corporate Code 根据保险公司获取客户公司
const GETCORPORATECODEBYPAYOR = (data) => {
return req.post(apis.corporateCodeList, data);
};
// get plan Code 根据客户公司获取保险计划
const GETPLANCODEBYCORP = (data) => {
return req.post(apis.planCodeList, data);
};
// 科室信息
const GETSPECIALTYLIST = (data) => {
return req.post(apis.specialtyList, data);
};
// 上传图片
const UPLOADIMG = (data) => {
return req.post(apis.uploadImg, data);
};
// 责任累类型列表
const GETCOVERAGECODE = (data) => {
return req.post(apis.coverageCode, data);
};
// 对象数组
export default { GETUSERINFO, GETCORPORATECODE };
export default {
GETUSERINFO,
GETPAYORCODE,
GETCORPORATECODEBYPAYOR,
GETPLANCODEBYCORP,
GETSPECIALTYLIST,
UPLOADIMG,
GETCOVERAGECODE,
};
......@@ -2,9 +2,29 @@
import apis from "../apis_moudles/";
import req from "../request";
// 对象数组
// get custom list
const GETCUSTOMERLIST = function (data) {
return req.post(apis.getCustomerList, data);
};
export default { GETCUSTOMERLIST };
// get custom detail
const GETCUSTOMERDETAIL = function (data) {
return req.post(apis.customerDetail, data);
};
// add or update custom data
const UPDATECUSTOMDATA = function (data) {
return req.post(apis.updateCustomList, data);
};
// 创建新用户
const CREATENEWCUSTOMER = function (data) {
return req.post(apis.createCustomer, data);
};
export default {
GETCUSTOMERLIST,
GETCUSTOMERDETAIL,
UPDATECUSTOMDATA,
CREATENEWCUSTOMER,
};
// 福利管理函数库
// import apis from "../apis_moudles/index";
// import req from "../request";
import apis from "../apis_moudles/welfare.js";
import req from "../request";
const GETBENEGITTYPE = () => {
return req.post(apis.benefitType);
};
const GETCOVERAGELIST = (data) => {
return req.post(apis.coverageList, data);
};
// 对象数组
export default {};
export default { GETBENEGITTYPE, GETCOVERAGELIST };
......@@ -170,6 +170,13 @@ select {
vertical-align: middle;
}
.success.ant-btn-link {
color: #4cd964;
}
.danger.ant-btn-link {
color: #ff3b30;
}
// 菜单默认样式及激活样式重置
.menu {
.icon-class {
......@@ -244,6 +251,17 @@ select {
// .fs(21);
.pa(0, 8, 0, 8)
}
// 编辑的时候字体颜色修改
.ant-input,
.ant-select{
width: 100%;
color: #2B63FF;
}
// 操作栏fixed状态 层级太高会遮住展开的内容
.ant-table-expanded-row{
position: relative;
z-index: 2;
}
}
.ant-btn-primary{
background-color: #2B63FF;
......@@ -267,21 +285,64 @@ select {
}
}
.custom-info {
.ant-pagination-item-active {
.fs(16);
border: none;
// vertical-align: baseline;
.ant-pagination {
.ant-pagination-item-active {
.fs(16);
border: none;
// vertical-align: baseline;
}
.ant-pagination-item-link {
.fs(16);
.lh(22);
.pa(7, 15, 7, 15);
display: inline-block;
background-color: #f8fafb;
border: none;
}
.ant-pagination-item:not(.ant-pagination-item-active) {
display: none;
}
.current-page {
color: #4d7cfe;
}
.size-change {
.w(107);
.mg-l(40);
background-color: #f8fafb;
border: none;
}
}
.ant-radio-group{
.ant-radio-button-wrapper{
.pa(8, 17, 8, 17);
.lh(20);
vertical-align: bottom;
border: none;
border-radius: 4px;
background-color: #F8FAFB;
&:before{
content: none;
}
.ant-pagination-item-link {
.fs(16);
.lh(22);
.pa(7, 15, 7, 15);
display: inline-block;
background-color: #f8fafb;
border: none;
&:hover{
color: #2B63FF;
}
.ant-pagination-item:not(.ant-pagination-item-active) {
display: none;
}
.ant-radio-button-wrapper-checked{
border: none;
color: #2B63FF;
background-color: #F1F5FF;
&:before{
content: none;
}
}
\ No newline at end of file
&:hover{
border: none;
background-color: #F1F5FF;
color: #2B63FF;
}
}
}
.text-r{
text-align: right;
}
\ No newline at end of file
import Vue from "vue";
import {
Button,
Input,
Select,
DatePicker,
notification,
menu,
dropdown,
FormModel,
Row,
Col,
menu,
dropdown,
Table,
InputNumber,
message,
pagination,
FormModel,
Select,
DatePicker,
Input,
InputNumber,
Radio,
upload,
Button,
notification,
popconfirm,
Modal
modal,
} from "ant-design-vue";
export default () => {
let els = [
Button,
Input,
notification,
Row,
Col,
menu,
dropdown,
Table,
message,
pagination,
FormModel,
Row,
Col,
Select,
DatePicker,
Table,
Input,
InputNumber,
message,
pagination,
Radio,
upload,
Button,
notification,
popconfirm,
Modal
modal,
];
// 注册
els.forEach((item) => {
......
<template>
<div
class="icon-class"
:style="`font-size:${size}px`"
@click.stop="clickEvent"
>
<div class="icon-class" :style="`font-size:${size}px`" @click="clickEvent">
<svg class="icon" aria-hidden="true">
<use :xlink:href="iconName" />
</svg>
......
// 福利管理路由表,分包名称:welfare
export default {
path: "/welfare",
name: "Welfare",
name: "welfare",
component: () => {
return import(/* webpackChunkName: "Welfare" */ "@/views/welfare");
},
......
This diff is collapsed.
......@@ -3,12 +3,12 @@
<!-- form -->
<a-form-model ref="form" layout="vertical" :model="form">
<a-row :gutter="30">
<a-col :xl="5" :lg="6" :sm="12">
<a-col :xl="6" :lg="6" :sm="12">
<a-form-model-item label="病历号码">
<a-input v-model="form.mrnNo" placeholder="请输入病历号"></a-input>
</a-form-model-item>
</a-col>
<a-col :xl="5" :lg="6" :sm="12">
<a-col :xl="6" :lg="6" :sm="12">
<a-form-model-item label="客户姓名">
<a-input
v-model="form.patientName"
......@@ -24,16 +24,20 @@
></a-date-picker>
</a-form-model-item>
</a-col>
<a-col :xl="4" :lg="6" :sm="12">
<a-col :xl="5" :lg="6" :sm="12">
<a-form-model-item label="保险公司">
<a-select v-model="form.payorId" placeholder="请选择保险公司">
<a-select-option v-for="item in companyCode" :key="item.corpCode">
<a-select-option
v-for="item in companyCode"
:key="item.corpCode"
:value="item.id"
>
{{ item.longName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :xl="5" :lg="6" :sm="12">
<a-col :xl="6" :lg="6" :sm="12">
<a-form-model-item label="保单号码">
<a-input
v-model="form.policyNo"
......@@ -41,13 +45,13 @@
></a-input>
</a-form-model-item>
</a-col>
<a-col :xl="24" :lg="18" :sm="12" class="none-label">
<a-col :xl="18" :lg="18" :sm="12" class="none-label">
<a-form-model-item label="button">
<a-button type="primary"
><Icon name="ssiadd" size="14" />新建客户信息</a-button
<a-button type="primary" @click="addNewCustom"
><Icon name="ssiadd" :size="14" />新建客户信息</a-button
>
<a-button class="mar-left10" type="primary" @click="handlerSearch">
<Icon name="ssisearch_active" size="14" />查询
<Icon name="ssisearch_active" :size="14" />查询
</a-button>
</a-form-model-item>
</a-col>
......@@ -61,10 +65,19 @@
row-key="mrnNo"
:scroll="{ x: true }"
:pagination="pagination"
:customRow="handlerRowClick"
@change="onChange"
>
<template slot="operation" slot-scope="">
<a-button type="link">修改</a-button>
<template slot="operation" slot-scope="record">
<a-button
v-if="record.isEdit"
type="link"
@click.stop="saveChange(record)"
>保存</a-button
>
<a-button v-else type="link" @click.stop="changeDataStatus(record)"
>修改</a-button
>
<a-button type="link" class="success">新增</a-button>
<a-popconfirm
title="你确定要关闭吗?"
......@@ -83,29 +96,34 @@
export default {
data() {
const columns = [
{ title: "病历号", dataIndex: "mrnNo", ellipsis: true, width: 180 },
{
title: "客户姓名",
dataIndex: "patientName",
ellipsis: true,
width: 120,
},
{ title: "出生日期", dataIndex: "birthday", ellipsis: true, width: 180 },
{ title: "性别", dataIndex: "sex", ellipsis: true, width: 80 },
{ title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 180 },
{ title: "保单号码", dataIndex: "policyNo", ellipsis: true, width: 190 },
{
title: "保险有效日期",
dataIndex: "startDate",
ellipsis: true,
title: "病历号",
dataIndex: "mrnNo",
width: 180,
customRender: (val, row) => {
if (row.isEdit) {
return <a-input v-model={row.mrnNo}></a-input>;
}
return val;
},
},
{
title: "保险终止日期",
dataIndex: "endDate",
ellipsis: true,
width: 180,
title: "客户姓名",
dataIndex: "patientName",
width: 120,
customRender: (val, row) => {
if (row.isEdit) {
return <a-input v-model={row.patientName}></a-input>;
}
return val;
},
},
{ title: "出生日期", dataIndex: "birthday", width: 180 },
{ title: "性别", dataIndex: "sex", width: 80 },
{ title: "保险公司", dataIndex: "payorName", width: 180 },
{ title: "保单号码", dataIndex: "policyNo", width: 190 },
{ title: "保险有效日期", dataIndex: "startDate", width: 180 },
{ title: "保险终止日期", dataIndex: "endDate", width: 180 },
{
title: "操作",
key: "operation",
......@@ -129,13 +147,10 @@ export default {
},
created() {
this._getCustomerList();
this._getCorporateCode();
this._getPayorCode();
},
computed: {
pagination() {
// if (!this.pager || !this.dataList.length) {
// return false;
// }
const { pageNum, pageSize } = this.pager;
const pages = Math.ceil(this.total / pageSize);
return {
......@@ -155,8 +170,6 @@ export default {
if (current !== pageNum) {
return undefined;
}
// originalElement.children = undefined;
// originalElement.text = `${current} / ${pages}`;
return (
<p>
<span class="current-page">{current}</span> / {pages}
......@@ -178,11 +191,54 @@ export default {
}
return originalElement;
},
onChange: (pager) => this.onChange(pager),
};
},
},
methods: {
handlerRowClick(record) {
const { id, patientPolicyId } = record;
return {
style: {
color: record.isEdit ? "#2B63FF" : "#252631",
},
on: {
click: () => {
if (record.isEdit) {
return true;
}
this.$router.push({
name: "welfare",
query: { id, patientPolicyId },
});
},
},
};
},
// 修改按钮
changeDataStatus(record) {
this.$set(record, "isEdit", true);
},
saveChange(record) {
record.isEdit = undefined;
record.isNew = undefined;
},
// customDeal(columns) {
// return columns.map((item) => {
// return {
// ...item,
// ellipsis: true,
// customRender: (text, record, index) => {
// const data = item.customRender
// ? item.customRender(text, record, index)
// : text;
// if (record.isEdit) {
// return "";
// }
// return data;
// },
// };
// });
// },
onChange(pager) {
const { current } = pager;
// console.log(pager);
......@@ -212,12 +268,12 @@ export default {
deleteData() {
this.$message.success("删除成功");
},
_getCorporateCode() {
const params = {
longName: "",
payorId: 0,
};
this.$apis.GETCORPORATECODE(params).then((res) => {
// 新建客户信息
addNewCustom() {
this.$router.push("/customer/edit");
},
_getPayorCode() {
this.$apis.GETPAYORCODE({}).then((res) => {
this.companyCode = res.content || [];
});
},
......@@ -241,22 +297,7 @@ export default {
opacity: 0;
}
}
.current-page {
color: #4d7cfe;
}
.size-change {
.w(107);
.mg-l(40);
background-color: #f8fafb;
border: none;
}
.ant-btn .icon-class {
.mg-r(10);
}
.success.ant-btn-link {
color: #4cd964;
}
.danger.ant-btn-link {
color: #ff3b30;
}
</style>
<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>
<template>
<div>
<!-- 分类 -->
<div class="classify clearfix">
<a-button :type="!type ? 'primary' : ''">全部</a-button>
<a-button
:type="item.code === type ? 'primary' : ''"
v-for="item in welfareType"
:key="item.code"
>
{{ item.name }}
</a-button>
<div class="save-btn">
<a-button type="danger" @click="addNew">
<Icon name="ssiadd" :size="14" />新增
</a-button>
<a-button type="primary">
<Icon name="ssidownload" :size="14" />保存
</a-button>
</div>
</div>
<!-- table -->
<a-table
:columns="columns"
:data-source="dataList"
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
v-if="record.isEdit"
type="link"
@click.stop="saveEditData(record)"
>
保存
</a-button>
<a-button v-else type="link" @click.stop="editData(record, index)">
修改
</a-button>
<a-button type="link" class="success">新增</a-button>
<a-popconfirm
title="你确定要关闭吗?"
ok-text="确定"
cancel-text="取消"
@confirm="deleteData(record, index)"
>
<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: {
type: Object,
required: true,
},
},
components: {
benefits,
},
data() {
const columns = [
{
title: "责任项目",
dataIndex: "coverageCode",
width: 180,
customRender: (val, row) => {
if (row.isEdit) {
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;
},
},
{ title: "责任项目列表", dataIndex: "patientName", width: 120 },
{
title: "是否直付",
dataIndex: "isdirect",
width: 180,
customRender: (val, row) => {
if (row.isEdit) {
return (
<a-radio-group
v-model={row.isdirect}
default-value={row.isdirect}
button-style="solid"
>
<a-radio-button value="Y"> </a-radio-button>
<a-radio-button class="mar-left10" value="N">
</a-radio-button>
</a-radio-group>
);
}
return val;
},
},
{ title: "单位", dataIndex: "sex", width: 80 },
{ title: "年限额", dataIndex: "payorName", width: 180 },
{ title: "剩余额度(¥)", dataIndex: "policyNo", width: 190 },
{ title: "次限额(¥)", dataIndex: "startDate", width: 180 },
// { title: "次免赔额(¥)", dataIndex: "endDate", width: 180 },
// { title: "自付比例", dataIndex: "endDate", width: 180 },
// { title: "备注", dataIndex: "endDate", width: 180 },
{
title: "操作",
key: "operation",
width: "175px",
fixed: "right",
scopedSlots: { customRender: "operation" },
},
];
return {
columns,
dataList: [{ coverageCode: 22 }],
expandedRowKeys: [],
type: "",
welfareType: [],
pager: {
pageNum: 1,
pageSize: 10,
},
total: 0,
coverageCode: [],
};
},
watch: {
coverageForm: {
deep: true,
handler: function () {
this.type = "";
this._getCoverageList();
},
},
},
mounted() {
this._getSpecialtyCode();
// this._getCoverageList();
},
computed: {
pagination() {
return this.initPageConfig(
{ ...this.pager, total: this.total },
this.onWelfareSizeChange
);
},
},
methods: {
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) {
record.isEdit = undefined;
},
deleteData(record, index) {
if (record.isNew) {
this.dataList.splice(index, 1);
return true;
}
this.dataList.splice(index, 1);
},
initPageConfig(pager, sizeChange) {
const { pageNum, pageSize, total } = pager;
const pages = Math.ceil(total / pageSize);
return {
current: pageNum,
pageSize,
size: "large",
position: "bottom",
align: "right",
total: this.total,
hideOnSinglePage: false,
itemRender: (current, type, originalElement) => {
if (type === "prev") {
originalElement.children = undefined;
originalElement.text = "上一页";
}
if (type === "page") {
if (current !== pageNum) {
return undefined;
}
return (
<p>
<span class="current-page">{current}</span> / {pages}
</p>
);
}
if (type === "next") {
originalElement.children = undefined;
originalElement.text = "下一页";
return (
<div>
{originalElement}
<a-input-number
onblur={sizeChange}
class="size-change"
></a-input-number>
</div>
);
}
return originalElement;
},
};
},
onWelfareChange(pager) {
const { current } = pager;
// console.log(pager);
this.pager.pageNum = current;
// this._getCustomerList();
},
onWelfareSizeChange(e) {
e && e.stopPropagation();
const val = e.target.value * 1;
if (!val || val < 0) {
return false;
}
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 || [];
});
},
_getCoverageList() {
const { corpCode, payorCode, planCode } = this.coverageForm;
this.$apis
.GETCOVERAGELIST({
corpCode,
payorCode,
planCode,
specialtyCode: this.type,
})
.then((res) => {
this.dataList = res.content || [];
});
},
_getCoverageCode() {
if (this.coverageCode && this.coverageCode.length) {
return true;
}
this.$apis.GETCOVERAGECODE().then((res) => {
this.coverageCode = res.content || [];
});
},
},
};
</script>
<style lang="less" scoped>
.none-label {
text-align: right;
}
.classify {
.pa(10, 20, 10, 20);
.mg-t(30);
.mg-b(10);
background-color: #f8fafb;
.ant-btn:not(:first-child) {
.mg-l(30);
}
.save-btn {
float: right;
}
}
.icon-class {
.mg-r(10);
}
</style>
This diff is collapsed.
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