Commit c32f4a01 authored by 周留芳's avatar 周留芳

回款详情样式优化

parent c816ef8f
<template> <template>
<div class="white_bg burt-container"> <div class="white_bg burt-container">
<img src="../../assets/image/home_bg.jpg" alt=""> <img src="../../assets/image/home_bg.jpg" alt="">
</div> </div>
</template> </template>
<script> <script>
export default{ export default{
data(){ data(){
return{ return{
} }
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.burt-container{ .burt-container{
height: calc(100vh - 116px); height: calc(100vh - 86px);
padding: 0; padding: 0;
img{ img{
width: 100%; width: 100%;
height: 100%; height: 100%;
object-fit: contain; object-fit: contain;
} }
} }
</style> </style>
\ No newline at end of file
<template>
<div class="sub-menu">
<router-link
tag="button"
:class="{ btn: true, 'btn-active': isVisit(item.path) }"
v-for="(item, index) in menuStack"
:key="item.path"
:to="item.path"
>
{{ item.title }}
<Icon v-if="menuStack.length>1"
@click="(e)=>closeMenu(e, index)"
:name="isVisit(item.path) ? 'ssiclose_active' : 'ssiclose'"
:size="16"
/>
</router-link>
<slot name="tips" />
</div>
</template>
<script>
import { mapState } from "vuex";
export default {
computed: {
...mapState({
menuStack: (state) => state.common.menuStack,
}),
},
methods: {
isVisit(val) {
const path = this.$route.path;
return path === val;
},
closeMenu(e, index) {
e.stopPropagation();
const menuStack = JSON.parse(JSON.stringify(this.menuStack));
const isVisit = this.isVisit(menuStack[index].path);
menuStack.splice(index, 1);
this.$store.commit("common/setMenuStack", menuStack);
if (isVisit) {
// 关闭的是当前正在查看的
const i = Math.max(0, index - 1);
this.$router.push(menuStack[i].path || "/");
}
},
},
};
</script>
<style lang="less" scoped>
.sub-menu {
width: 100%;
overflow-x: auto;
white-space: nowrap;
.mg-b(16);
.btn {
.fs(14);
.lh(20);
.pa(8, 13, 8, 13);
.mg-r(40);
color: #252631;
font-weight: bold;
border: none;
background-color: #fff;
border-radius: 5px;
cursor: pointer;
}
.btn-active {
color: #fff;
background-color: #2b63ff;
}
}
</style>
<template> <template>
<div class="menu-layout"> <div class="menu-layout">
<Header></Header> <Header></Header>
<div class="container"> <div class="container">
<Menu></Menu> <Menu></Menu>
<Loading /> <Loading />
<div class="content"> <div class="content">
<SubMenu></SubMenu> <router-view />
<router-view /> </div>
</div> </div>
</div> </div>
</div> </template>
</template>
<script>
<script> import Header from "./components/Header.vue";
import Header from "./components/Header.vue"; import Menu from "./components/menu";
import Menu from "./components/menu"; import Loading from "@/components/Loading/Loading.vue";
import SubMenu from "./components/menu/subMenu.vue";
import Loading from "@/components/Loading/Loading.vue"; export default {
components: {
export default { Header,
components: { Menu,
Header, Loading
Menu, },
SubMenu, data() {
Loading return {};
}, },
data() {
return {}; created() {},
}, mounted() {},
methods: {},
created() {}, };
mounted() {}, </script>
methods: {},
}; <style>
</script> .icon-class.arrow{
position: absolute;
<style> right: 0;
.icon-class.arrow{ top: 50%;
position: absolute; transform: translateY(-50%);
right: 0; }
top: 50%; </style>
transform: translateY(-50%); <style lang="less" scoped>
} .menu-layout {
</style> background-color: #f8fafb;
<style lang="less" scoped> font-family: "Helvetica" "Microsoft YaHei" "微软雅黑";
.menu-layout { .container {
background-color: #f8fafb; display: flex;
font-family: "Helvetica" "Microsoft YaHei" "微软雅黑"; position: relative;
.container { .pt(68);
display: flex; // min-height: calc(100vh - 50px);
position: relative; .content {
.pt(68); position: relative;
// min-height: calc(100vh - 50px); flex: 1;
.content { .mg-l(242);
position: relative; .pa(14, 40, 0, 40);
flex: 1; min-height: calc(100vh - 68px);
.mg-l(242); overflow-x: hidden;
.pa(14, 40, 0, 40); }
min-height: calc(100vh - 68px); }
overflow-x: hidden; .menu {
} position: fixed;
} .w(242);
.menu { height: calc(100vh - 68px);
position: fixed; overflow: auto;
.w(242); background-color: #fff;
height: calc(100vh - 68px); li{
overflow: auto; position: relative;
background-color: #fff; }
li{ }
position: relative; }
} </style>
}
}
</style>
<template> <template>
<div class="white_bg burt-container"> <div class="white_bg burt-container">
<Goback title="回款详情" /> <Goback title="回款详情" />
<!-- form --> <a-tabs v-model="activeKey" @change="paneChange">
<a-form-model ref="form" layout="vertical" :model="form"> <a-tab-pane v-for="pane in panes" :key="pane.key" :tab="pane.title">
<a-row :gutter="30"> <template v-if="activeKey === '0'">
<a-col :lg="6" :sm="12"> <!-- form -->
<a-form-model-item label="保险公司"> <a-form-model ref="form" layout="vertical" :model="form">
<a-select v-model="form.payorCode" placeholder="请选择保险公司" allow-clear :disabled="!isEdit" @change="changePayor">
<a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode">
{{ item.longName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="回款日期">
<a-date-picker format="YYYY-MM-DD" format-value="YYYY-MM-DD 00:00:00" v-model="form.backDate" placeholder="选择日期" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="回款金额(人民币)">
<a-input type="number" v-model="form.backAmountCny" placeholder="请输入金额" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="可核销余额">
<a-input v-model="residueBackAmount" disabled />
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="回款金额(美元)">
<a-input type="number" v-model="form.backAmountUsd" placeholder="请输入金额" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="汇率差">
<a-input v-model="form.backExchangeRate" placeholder="请输入金额" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="EOB编号">
<a-input v-model="form.eobNos" placeholder="请输入EOB编号" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="EOB备注">
<a-input v-model="form.eobRemark" placeholder="请输入EOB备注" allow-clear :disabled="!isEdit" />
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="上传附件">
<a-upload name="file" :multiple="false" :showUploadList="true" :disabled="!isEdit"
:fileList="fileList"
:customRequest="(file)=>uploadFile(file)"
:beforeUpload="()=>beforeUpload()"
:remove="(file)=>removeFile(file)">
<a-button type="primary"> <Icon name="ssiupload" :size="18" />上传文件 </a-button>
</a-upload>
</a-form-model-item>
</a-col>
<a-col :md="24" :lg="24" class="none-label" v-if="isEdit">
<a-form-model-item label="button">
<a-button class="mar-left10" type="primary" @click="addNewEvt(0)">
<Icon :name="backMoneyNo?'ssibaocun':'ssiadd'" :size="14" />暂存
</a-button>
<a-button class="mar-left10" type="primary" @click="addNewEvt(1)">
<Icon :name="backMoneyNo?'ssibaocun':'ssiadd'" :size="14" />结案
</a-button>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<div class="bill-content">
<!-- 已关联账单 -->
<template v-if="selectedRows.length > 0">
<div class="table-title">已关联账单</div>
<a-table class="table-content" :columns="selectedColumns" :data-source="selectedRows" :scroll="{ x: true, y: 200 }" :pagination="false">
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" class="danger" @click.stop="delRecord(record, index)">删除</a-button>
</template>
</a-table>
</template>
<!-- table -->
<template v-if="isEdit">
<a-row class="search-form">
<a-form-model ref="searchForm" layout="vertical" :model="searchForm">
<a-row :gutter="30"> <a-row :gutter="30">
<a-col :lg="6" :sm="12"> <a-col :lg="6" :sm="12">
<a-form-model-item label="账单日期"> <a-form-model-item label="保险公司">
<a-range-picker format="YYYY-MM-DD" value-format="YYYY-MM-DD" v-model="searchForm.billDate" :placeholder="['开始时间','结束时间']"/> <a-select
v-model="form.payorCode"
placeholder="请选择保险公司"
allow-clear
:disabled="!isEdit"
@change="changePayor"
>
<a-select-option
v-for="item in companyOptions"
:key="item.id"
:value="item.payorCode"
>
{{ item.longName }}
</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="5" :sm="12"> <a-col :lg="5" :sm="12">
<a-form-model-item label="病历号"> <a-form-model-item label="回款日期">
<a-input v-model="searchForm.mrnNo" placeholder="请输入病历号" allow-clear :disabled="!isEdit"/> <a-date-picker
format="YYYY-MM-DD"
format-value="YYYY-MM-DD 00:00:00"
v-model="form.backDate"
placeholder="选择日期"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="5" :sm="12"> <a-col :lg="5" :sm="12">
<a-form-model-item label="客户名称"> <a-form-model-item label="回款金额(人民币)">
<a-input v-model="searchForm.patientName" placeholder="请输入客户名称" allow-clear :disabled="!isEdit"/> <a-input
type="number"
v-model="form.backAmountCny"
placeholder="请输入金额"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="5" :sm="12"> <a-col :lg="5" :sm="12">
<div class="btn-div mar-bottom10 none-label"> <a-form-model-item label="可核销余额">
<a-button type="primary" @click="_getNewEOBList"> <a-input v-model="residueBackAmount" disabled />
<Icon name="ssisearch_active" :size="14" />查询 </a-form-model-item>
</a-button> </a-col>
</div> <a-col :lg="5" :sm="12">
<a-form-model-item label="回款金额(美元)">
<a-input
type="number"
v-model="form.backAmountUsd"
placeholder="请输入金额"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="汇率差">
<a-input
v-model="form.backExchangeRate"
placeholder="请输入金额"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="EOB编号">
<a-input
v-model="form.eobNos"
placeholder="请输入EOB编号"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="EOB备注">
<a-input
v-model="form.eobRemark"
placeholder="请输入EOB备注"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item>
</a-col>
<a-col :lg="5" :sm="12">
<a-form-model-item label="上传附件">
<a-upload
name="file"
:multiple="false"
:showUploadList="true"
:disabled="!isEdit"
:fileList="fileList"
:customRequest="(file) => uploadFile(file)"
:beforeUpload="() => beforeUpload()"
:remove="(file) => removeFile(file)"
>
<a-button type="primary">
<Icon name="ssiupload" :size="18" />上传文件
</a-button>
</a-upload>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
</template>
<template v-else>
<!-- form -->
<a-form-model
ref="form"
:labelCol="{ span: 5 }"
:wrapperCol="{ span: 16 }"
:model="form"
class="bill-form"
>
<a-row :gutter="30">
<a-col :lg="8" :sm="12">
<a-form-model-item label="保险公司">
<a-select
v-model="form.payorCode"
placeholder="请选择保险公司"
allow-clear
:disabled="!isEdit"
@change="changePayor"
>
<a-select-option
v-for="item in companyOptions"
:key="item.id"
:value="item.payorCode"
>
{{ item.longName }}
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :lg="8" :sm="12">
<a-form-model-item label="可核销余额">
<a-input v-model="residueBackAmount" disabled />
</a-form-model-item>
</a-col> </a-col>
</a-row> </a-row>
</a-form-model> </a-form-model>
</a-row> <div class="bill-content">
<div class="table-title">账单列表</div> <!-- 已关联账单 -->
<a-table :columns="columns" :data-source="dataList" :scroll="{ x: true, y: 200 }" :pagination="false" :rowKey="'id'" <template v-if="selectedRows.length > 0">
:row-selection="{ selectedRowKeys: selectedRowKeys, onSelect: onSelectChange, onSelectAll: onSelectAll }"> <div class="table-title">已关联账单</div>
</a-table> <a-table
<BurtPagination :pagination="pagination" @pageChange="pageChange" /> class="table-content"
</template> :columns="selectedColumns"
</div> :data-source="selectedRows"
:scroll="{ x: true, y: 300 }"
:pagination="false"
>
<template slot="operation" slot-scope="text, record, index">
<a-button
type="link"
class="danger"
@click.stop="delRecord(record, index)"
>删除</a-button
>
</template>
</a-table>
</template>
<!-- table -->
<template v-if="isEdit">
<a-row class="search-form">
<a-form-model
ref="searchForm"
layout="inline"
:labelCol="{ span: 8 }"
:wrapperCol="{ span: 16 }"
:model="searchForm"
>
<a-row :gutter="30">
<a-col :lg="6" :sm="10">
<a-form-model-item label="账单日期">
<a-range-picker
format="YYYY-MM-DD"
value-format="YYYY-MM-DD"
v-model="searchForm.billDate"
:placeholder="['开始时间', '结束时间']"
/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="10">
<a-form-model-item label="病历号">
<a-input
v-model="searchForm.mrnNo"
placeholder="请输入病历号"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item>
</a-col>
<a-col :lg="6" :sm="12">
<a-form-model-item label="客户名称">
<a-input
v-model="searchForm.patientName"
placeholder="请输入客户名称"
allow-clear
:disabled="!isEdit"
/>
</a-form-model-item>
</a-col>
<a-col :lg="4" :sm="12">
<div class="btn-div mar-bottom10 none-label">
<a-button type="primary" @click="_getNewEOBList">
<Icon name="ssisearch_active" :size="14" />查询
</a-button>
</div>
</a-col>
</a-row>
</a-form-model>
</a-row>
<div class="table-title">账单列表</div>
<a-table
:columns="columns"
:data-source="dataList"
:scroll="{ x: true, y: 300 }"
:pagination="false"
:rowKey="'id'"
:row-selection="{
selectedRowKeys: selectedRowKeys,
onSelect: onSelectChange,
onSelectAll: onSelectAll,
}"
>
</a-table>
<BurtPagination
:pagination="pagination"
@pageChange="pageChange"
/>
</template>
</div>
</template>
</a-tab-pane>
<div v-if="isEdit" slot="tabBarExtraContent">
<a-button class="mar-left10" type="primary" @click="addNewEvt(0)">
<Icon :name="backMoneyNo ? 'ssibaocun' : 'ssiadd'" :size="14" />暂存
</a-button>
<a-button class="mar-left10" type="primary" @click="addNewEvt(1)">
<Icon :name="backMoneyNo ? 'ssibaocun' : 'ssiadd'" :size="14" />结案
</a-button>
</div>
</a-tabs>
</div> </div>
</template> </template>
<script> <script>
import Goback from "@/components/CUSTOMER/goback"; import Goback from "@/components/CUSTOMER/goback";
import BurtPagination from "@/components/CUSTOMER/pagation"; import BurtPagination from "@/components/CUSTOMER/pagation";
import {EOBStatusOptions} from '@/utils/utilsdictOptions.js' import { EOBStatusOptions } from "@/utils/utilsdictOptions.js";
import moment from "moment"; import moment from "moment";
import mixins from "@/mixins"; import mixins from "@/mixins";
export default { export default {
...@@ -134,13 +271,13 @@ export default { ...@@ -134,13 +271,13 @@ export default {
EOBStatusOptions, EOBStatusOptions,
dialogShow: false, dialogShow: false,
form: { form: {
payorCode: '', payorCode: "",
backDate: null, backDate: null,
backAmountCny: '', backAmountCny: "",
backAmountUsd: '', backAmountUsd: "",
backExchangeRate: '', backExchangeRate: "",
eobNos: '', // EOB编号 eobNos: "", // EOB编号
eobRemark: '' // EOB备注 eobRemark: "", // EOB备注
}, },
fileList: [], // 上传文件列表 fileList: [], // 上传文件列表
dataList: [], dataList: [],
...@@ -153,7 +290,7 @@ export default { ...@@ -153,7 +290,7 @@ export default {
}, },
selectedRowKeys: [], // Check here to configure the default column selectedRowKeys: [], // Check here to configure the default column
selectedRows: [], // Check here to configure the default column selectedRows: [], // Check here to configure the default column
backMoneyNo: '', backMoneyNo: "",
editRules: { editRules: {
backAmountUsd: [{ required: true, message: "请输入", trigger: "blur" }], backAmountUsd: [{ required: true, message: "请输入", trigger: "blur" }],
backAmount: [{ required: true, message: "请输入", trigger: "blur" }], backAmount: [{ required: true, message: "请输入", trigger: "blur" }],
...@@ -161,11 +298,17 @@ export default { ...@@ -161,11 +298,17 @@ export default {
searchForm: { searchForm: {
billDate: [], billDate: [],
mrnNo: '', // 病历号 mrnNo: "", // 病历号
patientName: '', // 客户名字 patientName: "", // 客户名字
}, },
savedStatus: false, //是否已保存 savedStatus: false, //是否已保存
relatedList: [] relatedList: [],
panes: [
{ title: "基础信息", key: "0", show: true, content: "PaymentClaims" },
{ title: "账单列表", key: "1", show: false, content: "Insurance" },
],
activeKey: "0",
}; };
}, },
mixins: [mixins], mixins: [mixins],
...@@ -175,66 +318,143 @@ export default { ...@@ -175,66 +318,143 @@ export default {
}, },
computed: { computed: {
columns() { columns() {
const base = [ const base = [
{ title: "账单编号", dataIndex: "receiptNo", ellipsis: true, width: 150 }, {
{ title: "病历号", dataIndex: "mrnNo", ellipsis: true, width: 195 }, title: "账单编号",
{ title: "客户姓名",dataIndex: "patientName", ellipsis: true, width: 160 }, dataIndex: "receiptNo",
// { title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 160 }, ellipsis: true,
{ title: "账单日期", dataIndex: "receiptDate", ellipsis: true, width: 150 }, width: 150,
{ title: "收银", dataIndex: "receiptTellerName", ellipsis: true, width: 120,}, },
{ title: "账单金额", dataIndex: "actualAmount", ellipsis: true, width: 150,}, { title: "病历号", dataIndex: "mrnNo", ellipsis: true, width: 195 },
{ title: "回款金额", dataIndex: "writeOffAmount", ellipsis: true, width: 150}, {
{ title: "未清余额", dataIndex: "residueBackAmount", ellipsis: true, width: 150,}, title: "客户姓名",
]; dataIndex: "patientName",
return base ellipsis: true,
width: 160,
},
// { title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 160 },
{
title: "账单日期",
dataIndex: "receiptDate",
ellipsis: true,
width: 150,
},
{
title: "收银",
dataIndex: "receiptTellerName",
ellipsis: true,
width: 120,
},
{
title: "账单金额",
dataIndex: "actualAmount",
ellipsis: true,
width: 150,
},
{
title: "回款金额",
dataIndex: "writeOffAmount",
ellipsis: true,
width: 150,
},
{
title: "未清余额",
dataIndex: "residueBackAmount",
ellipsis: true,
width: 150,
},
];
return base;
}, },
selectedColumns() { selectedColumns() {
const base = JSON.parse(JSON.stringify(this.columns)) const base = JSON.parse(JSON.stringify(this.columns));
const changeAmount = this.changeAmount const changeAmount = this.changeAmount;
base[6] = { title: "回款金额", dataIndex: "backAmount", ellipsis: true, width: 150, customRender: (val, row) => { base[6] = {
return <a-input-number v-model={row.backAmount} allow-clear disabled={!this.isEdit} onBlur={() => {changeAmount(row)}} /> title: "回款金额",
} } dataIndex: "backAmount",
base[7] = { title: "未清余额", dataIndex: "residueBackAmount", ellipsis: true, width: 150, customRender: (val, row) => { ellipsis: true,
const residueBackAmount = Number(row.currentReceiptAmount || 0) - Number(row.backAmount || 0) width: 150,
return Number(residueBackAmount.toFixed(2)) customRender: (val, row) => {
} } return (
base.splice(6, 0, { title: "余末金额", dataIndex: "currentReceiptAmount", ellipsis: true, width: 150,}) <a-input-number
base.push({ title: "回款日期", dataIndex: "backDate", ellipsis: true, width: 150,}) v-model={row.backAmount}
if(this.isEdit) { allow-clear
base.push({ title: "操作", dataIndex: "operation", fixed: 'right', width: 100, scopedSlots: { customRender: "operation" }}) disabled={!this.isEdit}
onBlur={() => {
changeAmount(row);
}}
/>
);
},
};
base[7] = {
title: "未清余额",
dataIndex: "residueBackAmount",
ellipsis: true,
width: 150,
customRender: (val, row) => {
const residueBackAmount =
Number(row.currentReceiptAmount || 0) - Number(row.backAmount || 0);
return Number(residueBackAmount.toFixed(2));
},
};
base.splice(6, 0, {
title: "余末金额",
dataIndex: "currentReceiptAmount",
ellipsis: true,
width: 150,
});
base.push({
title: "回款日期",
dataIndex: "backDate",
ellipsis: true,
width: 150,
});
if (this.isEdit) {
base.push({
title: "操作",
dataIndex: "operation",
fixed: "right",
width: 100,
scopedSlots: { customRender: "operation" },
});
} }
return base return base;
}, },
// 可核销余额 // 可核销余额
residueBackAmount() { residueBackAmount() {
let totalMoney = Number(this.form.backAmountCny || 0) let totalMoney = Number(this.form.backAmountCny || 0);
this.selectedRows.forEach(item => { this.selectedRows.forEach((item) => {
totalMoney -= Number(item.backAmount) totalMoney -= Number(item.backAmount);
}) });
return Number(totalMoney.toFixed(2)) return Number(totalMoney.toFixed(2));
} },
}, },
created(){ created() {
const { backMoneyNo, isEdit } = this.$route.query const { backMoneyNo, isEdit } = this.$route.query;
this.backMoneyNo = backMoneyNo; this.backMoneyNo = backMoneyNo;
this.isEdit = isEdit; this.isEdit = isEdit;
this._getCompanyOptions(); this._getCompanyOptions();
if(backMoneyNo){ if (backMoneyNo) {
const backMoneyDataDetail = JSON.parse(localStorage.getItem('backMoneyDataDetail') || '{}'); const backMoneyDataDetail = JSON.parse(
this.form = backMoneyDataDetail localStorage.getItem("backMoneyDataDetail") || "{}"
this.form.backDate = this.form.backDate ? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00') : null );
this.form = backMoneyDataDetail;
this.form.backDate = this.form.backDate
? moment(this.form.backDate).format("YYYY-MM-DD 00:00:00")
: null;
// 如果有上传附件则显示列表 // 如果有上传附件则显示列表
if(backMoneyDataDetail.fileList) { if (backMoneyDataDetail.fileList) {
this.fileList = backMoneyDataDetail.fileList.map(d => { this.fileList = backMoneyDataDetail.fileList.map((d) => {
const file = { const file = {
uid: Math.random()*10000, uid: Math.random() * 10000,
name: d.fileName, name: d.fileName,
status: 'done', status: "done",
url: d.fileUrl, url: d.fileUrl,
} };
return file return file;
}) });
} }
this.getData(); this.getData();
} }
...@@ -242,92 +462,112 @@ export default { ...@@ -242,92 +462,112 @@ export default {
}, },
methods: { methods: {
moment, moment,
paneChange() {
this.panes.forEach((item) => {
item.show = false;
});
this.panes[Number(this.activeKey)].show = true;
},
changeAmount(row) { changeAmount(row) {
if((Number(row.actualAmount || 0) - Number(row.backAmount || 0)) < 0) { if (Number(row.actualAmount || 0) - Number(row.backAmount || 0) < 0) {
this.$message.warning("录入账单回款金额大于账单金额"); this.$message.warning("录入账单回款金额大于账单金额");
} }
}, },
onSelectChange(selectedRow, selected) { onSelectChange(selectedRow, selected) {
if(selected) { if (selected) {
this.selectedRowKeys.push(selectedRow.id) this.selectedRowKeys.push(selectedRow.id);
this.selectedRows.push(selectedRow) this.selectedRows.push(selectedRow);
} else { } else {
const index = this.selectedRowKeys.findIndex(item => item === selectedRow.id) const index = this.selectedRowKeys.findIndex(
this.selectedRowKeys.splice(index, 1) (item) => item === selectedRow.id
this.selectedRows.splice(index, 1) );
this._confirmDelReceipt([selectedRow]) this.selectedRowKeys.splice(index, 1);
this.selectedRows.splice(index, 1);
this._confirmDelReceipt([selectedRow]);
} }
}, },
onSelectAll(selected, selectedRows, changeRows) { onSelectAll(selected, selectedRows, changeRows) {
console.log(selected, selectedRows, changeRows) console.log(selected, selectedRows, changeRows);
if(selected) { if (selected) {
this.selectedRowKeys = this.selectedRowKeys.concat(changeRows.map(item => item.id)) this.selectedRowKeys = this.selectedRowKeys.concat(
this.selectedRows = this.selectedRows.concat(changeRows) changeRows.map((item) => item.id)
);
this.selectedRows = this.selectedRows.concat(changeRows);
} else { } else {
changeRows.forEach(item => { changeRows.forEach((item) => {
const findIndex = this.selectedRowKeys.findIndex(rowId => rowId === item.id) const findIndex = this.selectedRowKeys.findIndex(
this.selectedRowKeys.splice(findIndex, 1) (rowId) => rowId === item.id
this.selectedRows.splice(findIndex, 1) );
}) this.selectedRowKeys.splice(findIndex, 1);
this._confirmDelReceipt(changeRows) this.selectedRows.splice(findIndex, 1);
});
this._confirmDelReceipt(changeRows);
} }
}, },
delRecord(record, index) { delRecord(record, index) {
this.selectedRowKeys.splice(index, 1) this.selectedRowKeys.splice(index, 1);
this.selectedRows.splice(index, 1) this.selectedRows.splice(index, 1);
if(record.relationed) { if (record.relationed) {
// 已经关联的调用接口删除 // 已经关联的调用接口删除
this._confirmDelReceipt([record]) this._confirmDelReceipt([record]);
} }
}, },
_confirmDelReceipt(records) { _confirmDelReceipt(records) {
console.log(records) console.log(records);
if(!this.backMoneyNo) return; if (!this.backMoneyNo) return;
const receiptVoList = records.filter(item => { const receiptVoList = records
const findIndex = this.relatedList.findIndex(rowId => rowId === item.id) .filter((item) => {
return (findIndex > -1) const findIndex = this.relatedList.findIndex(
}).map(item => { (rowId) => rowId === item.id
return { );
id: item.id return findIndex > -1;
} })
}) .map((item) => {
console.log(receiptVoList) return {
if(receiptVoList.length === 0) return; id: item.id,
this.$apis.DELETERECEIPTRECORD({ };
backMoneyNo: this.backMoneyNo, });
receiptVoList console.log(receiptVoList);
}) if (receiptVoList.length === 0) return;
.then((res) => { this.$apis
if (res.returnCode == "0000") { .DELETERECEIPTRECORD({
this._getNewEOBList() backMoneyNo: this.backMoneyNo,
} else { receiptVoList,
this.$message.error(res.returnMsg); })
} .then((res) => {
}); if (res.returnCode == "0000") {
this._getNewEOBList();
} else {
this.$message.error(res.returnMsg);
}
});
}, },
// 修改保险公司 // 修改保险公司
changePayor() { changePayor() {
if(this.selectedRowKeys.length > 0 && (this.form.id || this.savedStatus)) { if (
this.selectedRowKeys.length > 0 &&
(this.form.id || this.savedStatus)
) {
this.$modal.confirm({ this.$modal.confirm({
title: "提示", title: "提示",
content: "是否解除已关联账单", content: "是否解除已关联账单",
okText: "确认", okText: "确认",
cancelText: "取消", cancelText: "取消",
onOk: () => { onOk: () => {
this.selectedRowKeys = [] this.selectedRowKeys = [];
this.selectedRows = [] this.selectedRows = [];
}, },
onCancel: () => {}, onCancel: () => {},
}); });
} }
this._getNewEOBList() this._getNewEOBList();
}, },
pageChange(pager) { pageChange(pager) {
this.pagination = { this.pagination = {
...this.pagination, ...this.pagination,
...pager, ...pager,
} };
this._getNewEOBList() this._getNewEOBList();
}, },
// 获取保险公司下拉选项 // 获取保险公司下拉选项
_getCompanyOptions() { _getCompanyOptions() {
...@@ -337,37 +577,39 @@ export default { ...@@ -337,37 +577,39 @@ export default {
}, },
// 获取已关联的账单 // 获取已关联的账单
getData() { getData() {
this.$apis.QUERYBACKRECEIPTLIST({ this.$apis
pageNum: 1, .QUERYBACKRECEIPTLIST({
pageSize: 999, pageNum: 1,
backMoneyNo: this.backMoneyNo, pageSize: 999,
payorCode: this.form.payorCode backMoneyNo: this.backMoneyNo,
}) payorCode: this.form.payorCode,
.then((res) => { })
if (res.returnCode == "0000") { .then((res) => {
const list = res.content.list || []; if (res.returnCode == "0000") {
this.selectedRowKeys = list.map(d => d.id) const list = res.content.list || [];
this.selectedRows = list.map(item => { this.selectedRowKeys = list.map((d) => d.id);
item.relationed = true this.selectedRows = list.map((item) => {
return item item.relationed = true;
}) return item;
this.relatedList = list.map(d => d.id) });
} else { this.relatedList = list.map((d) => d.id);
this.$message.error(res.returnMsg); } else {
} this.$message.error(res.returnMsg);
}); }
});
}, },
// 获取所有账单 // 获取所有账单
_getNewEOBList(){ _getNewEOBList() {
let billDate = this.searchForm.billDate || [] let billDate = this.searchForm.billDate || [];
this.$apis.QUERYBACKRECEIPTINFOLIST({ this.$apis
.QUERYBACKRECEIPTINFOLIST({
pageNum: this.pagination.pageNum, pageNum: this.pagination.pageNum,
pageSize: this.pagination.pageSize, pageSize: this.pagination.pageSize,
backMoneyNo: this.backMoneyNo, backMoneyNo: this.backMoneyNo,
payorCode: this.form.payorCode, payorCode: this.form.payorCode,
...this.searchForm, ...this.searchForm,
receiptEndDate: billDate[1] ? billDate[1] + ' 23:59:59' : undefined, receiptEndDate: billDate[1] ? billDate[1] + " 23:59:59" : undefined,
receiptStartDate: billDate[0] ? billDate[0] + ' 00:00:00' : undefined, receiptStartDate: billDate[0] ? billDate[0] + " 00:00:00" : undefined,
}) })
.then((res) => { .then((res) => {
if (res.returnCode == "0000") { if (res.returnCode == "0000") {
...@@ -379,59 +621,60 @@ export default { ...@@ -379,59 +621,60 @@ export default {
} }
}); });
}, },
//新建/保存回款 //新建/保存回款
addNewEvt(backStatus){ addNewEvt(backStatus) {
return new Promise((resolve,reject)=>{ return new Promise((resolve, reject) => {
console.log(this.selectedRows) console.log(this.selectedRows);
if(!this.form.payorCode){ if (!this.form.payorCode) {
this.$message.warning("请选择保险公司"); this.$message.warning("请选择保险公司");
reject(); reject();
return; return;
} }
if(!this.form.backDate){ if (!this.form.backDate) {
this.$message.warning("请选择回款日期"); this.$message.warning("请选择回款日期");
reject(); reject();
return; return;
} }
if(!this.form.backAmountCny){ if (!this.form.backAmountCny) {
this.$message.warning("请输入回款金额"); this.$message.warning("请输入回款金额");
reject(); reject();
return; return;
} }
let receiptVoList = this.selectedRows.map(item => { let receiptVoList = this.selectedRows.map((item) => {
return { return {
id: item.id, id: item.id,
backAmount: item.backAmount, backAmount: item.backAmount,
} };
}) });
const valid = receiptVoList.some(item => { const valid = receiptVoList.some((item) => {
return !item.backAmount return !item.backAmount;
}) });
if(valid) { if (valid) {
this.$message.warning("存在关联账单未输入回款金额"); this.$message.warning("存在关联账单未输入回款金额");
reject(); reject();
return; return;
} }
const formData = { const formData = {
...this.form, ...this.form,
receiptVoList, receiptVoList,
backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD HH:mm:ss'):'', backDate: this.form.backDate
backMoneyNo: this.backMoneyNo, //回款编号 ? moment(this.form.backDate).format("YYYY-MM-DD HH:mm:ss")
backStatus // 0暂存 1结案 : "",
} backMoneyNo: this.backMoneyNo, //回款编号
backStatus, // 0暂存 1结案
};
// 上传附件格式转换 // 上传附件格式转换
formData.fileList = this.fileList.map(d => { formData.fileList = this.fileList.map((d) => {
const file = { const file = {
fileName: d.name, fileName: d.name,
fileUrl: d.url fileUrl: d.url,
} };
return file return file;
}) });
this.$apis.SAVEBACKMONEY(formData) this.$apis.SAVEBACKMONEY(formData).then((res) => {
.then((res) => {
if (res.returnCode == "0000") { if (res.returnCode == "0000") {
this.backMoneyNo = res.content; this.backMoneyNo = res.content;
this.savedStatus = true; this.savedStatus = true;
...@@ -439,7 +682,7 @@ export default { ...@@ -439,7 +682,7 @@ export default {
this.selectedRowKeys = []; this.selectedRowKeys = [];
this.getData(); this.getData();
this._getNewEOBList(); this._getNewEOBList();
// this.$router.go(-1); // this.$router.go(-1);
resolve(); resolve();
} else { } else {
...@@ -447,21 +690,21 @@ export default { ...@@ -447,21 +690,21 @@ export default {
reject(); reject();
} }
}); });
}) });
}, },
/* ======== 上传区域 ======== */ /* ======== 上传区域 ======== */
// 上传之前 // 上传之前
beforeUpload(){ beforeUpload() {
const len = this.fileList.length; const len = this.fileList.length;
if(len >= 5){ if (len >= 5) {
this.$message.warning('不能超过5个文件'); this.$message.warning("不能超过5个文件");
return false; return false;
} }
return true; return true;
}, },
// 删除文件 // 删除文件
removeFile(file){ removeFile(file) {
let index; let index;
this.fileList.forEach((item, i) => { this.fileList.forEach((item, i) => {
if (item.uid == file.uid) { if (item.uid == file.uid) {
...@@ -472,25 +715,24 @@ export default { ...@@ -472,25 +715,24 @@ export default {
return true; return true;
}, },
// 上传文件 // 上传文件
uploadFile(fileData){ uploadFile(fileData) {
let formData = new FormData(); let formData = new FormData();
formData.append("file", fileData.file); formData.append("file", fileData.file);
this.$apis.UPLOADIMG(formData) this.$apis.UPLOADIMG(formData).then((res) => {
.then((res)=>{
fileData.onSuccess(); fileData.onSuccess();
let tmp = { let tmp = {
uid: Math.random()*10000, uid: Math.random() * 10000,
name: res.original, name: res.original,
status: 'done', status: "done",
url: res.url, url: res.url,
} };
this.fileList.push(tmp); this.fileList.push(tmp);
this.$forceUpdate(); this.$forceUpdate();
}) });
}, },
// 导出账单列表 // 导出账单列表
exportEvt() {} exportEvt() {},
}, },
}; };
</script> </script>
...@@ -525,15 +767,25 @@ export default { ...@@ -525,15 +767,25 @@ export default {
color: #ff3b30; color: #ff3b30;
} }
.burt-container { .burt-container {
height: calc(100vh - 86px);
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: calc(100vh - 110px); ::v-deep {
.bill-content { .ant-tabs {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
overflow-y: auto; }
overflow-x: hidden; }
padding-right: 12px; }
.bill-content {
height: calc(100vh - 256px);
overflow-y: auto;
overflow-x: hidden;
padding-right: 12px;
}
::v-deep .bill-form {
.ant-form .ant-form-item {
margin-bottom: 4px !important;
} }
} }
</style> </style>
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