Commit 194b83c0 authored by 周留芳's avatar 周留芳

回款管理修改

parent a413c7fc
<template> <template>
<div class="white_bg burt-container"> <div class="white_bg burt-container">
<Goback title="回款详情" /> <Goback title="回款详情" />
<!-- form --> <!-- form -->
<a-form-model ref="form" layout="vertical" :model="form"> <a-form-model ref="form" layout="vertical" :model="form">
<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-select v-model="form.payorCode" placeholder="请选择保险公司" allow-clear :disabled="!isEdit"> <a-select v-model="form.payorCode" placeholder="请选择保险公司" allow-clear :disabled="!isEdit" @change="_getNewEOBList">
<a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode"> <a-select-option v-for="item in companyOptions" :key="item.id" :value="item.payorCode">
{{ item.longName }} {{ item.longName }}
</a-select-option> </a-select-option>
</a-select> </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-date-picker format="YYYY-MM-DD" format-value="YYYY-MM-DD 00:00:00" v-model="form.backDate" 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 type="number" v-model="form.backAmountCny" 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">
<a-form-model-item label="回款金额(美元)"> <a-form-model-item label="回款金额(美元)">
<a-input type="number" v-model="form.backAmountUsd" placeholder="请输入金额" allow-clear :disabled="!isEdit" /> <a-input type="number" v-model="form.backAmountUsd" placeholder="请输入金额" allow-clear :disabled="!isEdit" />
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :lg="6" :sm="12"> <a-col :lg="6" :sm="12">
<a-form-model-item label="汇率差"> <a-form-model-item label="汇率差">
<a-input v-model="form.backExchangeRate" placeholder="请输入金额" allow-clear :disabled="!isEdit" /> <a-input v-model="form.backExchangeRate" 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="EOB编号"> <a-form-model-item label="EOB编号">
<a-input v-model="form.eobNos" placeholder="请输入EOB编号" allow-clear :disabled="!isEdit" /> <a-input v-model="form.eobNos" placeholder="请输入EOB编号" 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-upload name="file" :multiple="false" :showUploadList="true" :disabled="!isEdit" <a-upload name="file" :multiple="false" :showUploadList="true" :disabled="!isEdit"
:fileList="fileList" :fileList="fileList"
:customRequest="(file)=>uploadFile(file)" :customRequest="(file)=>uploadFile(file)"
:beforeUpload="()=>beforeUpload()" :beforeUpload="()=>beforeUpload()"
:remove="(file)=>removeFile(file)"> :remove="(file)=>removeFile(file)">
<a-button type="primary"> <Icon name="ssiupload" :size="18" />上传文件 </a-button> <a-button type="primary"> <Icon name="ssiupload" :size="18" />上传文件 </a-button>
</a-upload> </a-upload>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :md="24" :lg="7" class="none-label" v-if="isEdit"> <a-col :md="24" :lg="7" class="none-label" v-if="isEdit">
<a-form-model-item label="button"> <a-form-model-item label="button">
<a-button class="mar-left10" type="primary" @click="addNewEvt(0)"> <a-button class="mar-left10" type="primary" @click="addNewEvt(0)">
<Icon :name="backMoneyNo?'ssibaocun':'ssiadd'" :size="14" />暂存 <Icon :name="backMoneyNo?'ssibaocun':'ssiadd'" :size="14" />暂存
</a-button> </a-button>
<a-button class="mar-left10" type="primary" @click="addNewEvt(1)"> <a-button class="mar-left10" type="primary" @click="addNewEvt(1)">
<Icon :name="backMoneyNo?'ssibaocun':'ssiadd'" :size="14" />{{backMoneyNo?'结案':'新建回款'}} <Icon :name="backMoneyNo?'ssibaocun':'ssiadd'" :size="14" />结案
</a-button> </a-button>
</a-form-model-item> </a-form-model-item>
</a-col> </a-col>
<a-col :md="24" class="none-label" v-if="isEdit"> </a-row>
<a-form-model-item label="button"> </a-form-model>
<!-- <a-button class="mar-left10" type="primary" @click="handlerSearch"> <!-- 已关联账单 -->
<Icon name="ssisearch_active" :size="14" />查询 <template v-if="selectedRows.length > 0">
</a-button> --> <div class="table-title">已关联账单</div>
<a-button class="mar-left10" type="primary" @click="addNewEOB"> <a-table class="table-content" :columns="selectedColumns" :data-source="selectedRows" :scroll="{ x: true }" :pagination="false">
<Icon :name="isEditNewEOB?'ssibaocun':'ssiadd'" :size="14" />{{isEditNewEOB? '保存EOB': '添加EOB'}} </a-table>
</a-button> </template>
</a-form-model-item> <!-- table -->
</a-col> <div class="table-title">账单列表</div>
</a-row> <a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false" :rowKey="'id'"
</a-form-model> :row-selection="{ selectedRowKeys: selectedRowKeys, onSelect: onSelectChange, onSelectAll: onSelectAll }">
<!-- table --> </a-table>
<a-table :columns="columns" :data-source="dataList" :scroll="{ x: true }" :pagination="false" <BurtPagination :pagination="pagination" @pageChange="pageChange" />
:row-selection="isEditNewEOB? { selectedRowKeys: selectedRowKeys, onChange: onSelectChange }: null"> </div>
<template slot="eobNo" slot-scope="text,record"> </template>
<a @click="toEOBDetail(record)">{{text}}</a>
</template> <script>
<template slot="eobSts" slot-scope="text"> import Goback from "@/components/CUSTOMER/goback";
{{text | formatEOBStatus}} import BurtPagination from "@/components/CUSTOMER/pagation";
</template> import {EOBStatusOptions} from '@/utils/utilsdictOptions.js'
<template slot="eobBackDate" slot-scope="text"> import moment from "moment";
{{text?moment(text).format('YYYY-MM-DD'):''}} import mixins from "@/mixins";
</template> export default {
<template slot="operation" slot-scope="text, record"> data() {
<a-button type="link" @click.stop="editEvt(record)">修改</a-button> return {
<!-- <a-button v-if="record.backMoneyNo" type="link" class="danger" @click.stop="delRecord(index)">删除</a-button> --> isEdit: false,
</template> EOBStatusOptions,
</a-table> dialogShow: false,
<BurtPagination :pagination="pagination" @pageChange="pageChange" /> form: {
payorCode: '',
<a-modal title="编辑" :visible="dialogShow" width="700px" :maskClosable="false" backDate: null,
okText="确定" cancelText="取消" backAmountCny: '',
@ok="handleEditOK" @cancel="dialogShow = false"> backAmountUsd: '',
<a-form-model ref="editForm" :model="editFormObj" :rules="editRules"> backExchangeRate: '',
<a-row :gutter="30"> eobNos: '' // EOB编号
<a-col :lg="12" :sm="24"> },
<a-form-model-item label="EOB状态" prop="eobSts"> fileList: [], // 上传文件列表
<a-select v-model="editFormObj.eobSts" placeholder="请选择状态" allow-clear> dataList: [],
<a-select-option v-for="(item,i) in EOBStatusOptions" :key="i" :value="item.value">{{item.name}}</a-select-option> isEditNewEOB: false, //是否在新建回款
</a-select> companyOptions: [], //保险公司
</a-form-model-item> pagination: {
</a-col> pageNum: 1,
<a-col :lg="12" :sm="24"> pageSize: 10,
<a-form-model-item label="EOB核销时间" prop="eobBackDate"> total: 0,
<a-date-picker format="YYYY年MM月DD日" v-model="editFormObj.eobBackDate" placeholder="选择日期" /> },
</a-form-model-item> selectedRowKeys: [], // Check here to configure the default column
</a-col> selectedRows: [], // Check here to configure the default column
<a-col :lg="12" :xs="24"> backMoneyNo: '',
<a-form-model-item label="EOB回款(人民币)" prop="eobBackMoneyCny"> editRules: {
<a-input v-model.trim="editFormObj.eobBackMoneyCny" placeholder="EOB回款(人民币)" /> backAmountUsd: [{ required: true, message: "请输入", trigger: "blur" }],
</a-form-model-item> backAmount: [{ required: true, message: "请输入", trigger: "blur" }],
</a-col> },
<a-col :lg="12" :xs="24"> };
<a-form-model-item label="EOB回款(美元)" prop="eobBackMoneyUsd"> },
<a-input v-model.trim="editFormObj.eobBackMoneyUsd" placeholder="EOB回款(美元)" /> mixins: [mixins],
</a-form-model-item> components: {
</a-col> Goback,
</a-row> BurtPagination,
</a-form-model> },
</a-modal> computed: {
</div> columns() {
</template> const base = [
{ title: "账单编号", dataIndex: "receiptNo", ellipsis: true, width: 150 },
<script> // { title: "病历号", dataIndex: "mrnNo", ellipsis: true, width: 195 },
import Goback from "@/components/CUSTOMER/goback"; { title: "客户姓名",dataIndex: "patientName", ellipsis: true, width: 110 },
import BurtPagination from "@/components/CUSTOMER/pagation"; // { title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 160 },
import {EOBStatusOptions} from '@/utils/utilsdictOptions.js' { title: "账单日期", dataIndex: "createDate", ellipsis: true, width: 150 },
import moment from "moment"; { title: "收银", dataIndex: "receiptTellerName", ellipsis: true, width: 120,},
import mixins from "@/mixins"; { title: "账单金额", dataIndex: "actualAmount", ellipsis: true, width: 150,},
export default { { title: "回款金额", dataIndex: "backAmount", ellipsis: true, width: 150},
data() { { title: "余额", dataIndex: "residueBackAmount", ellipsis: true, width: 150,},
return { { title: "回款日期", dataIndex: "receiptDate", ellipsis: true, width: 150,},
isEdit: false, ];
EOBStatusOptions, return base
dialogShow: false, },
form: { selectedColumns() {
payorCode: '', const base = JSON.parse(JSON.stringify(this.columns))
backDate: null, base[5] = { title: "回款金额", dataIndex: "backAmount", ellipsis: true, width: 150, customRender: (val, row) => {
backAmountCny: '', return <a-input-number v-model={row.backAmount} allow-clear />
backAmountUsd: '', } }
backExchangeRate: '', return base
eobNos: '' // EOB编号 }
}, },
fileList: [], // 上传文件列表 created(){
dataList: [], const { backMoneyNo, isEdit } = this.$route.query
backEobList: [], // eob回款列表 this.backMoneyNo = backMoneyNo;
isEditNewEOB: false, //是否在新建回款 this.isEdit = isEdit;
companyOptions: [], //保险公司 this._getCompanyOptions();
pagination: { if(backMoneyNo){
pageNum: 1, const backMoneyDataDetail = JSON.parse(localStorage.getItem('backMoneyDataDetail') || '{}');
pageSize: 10, this.form = backMoneyDataDetail
total: 0, this.form.backDate = this.form.backDate ? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00') : null
},
selectedRowKeys: [], // Check here to configure the default column // 如果有上传附件则显示列表
backMoneyNo: '', if(backMoneyDataDetail.fileList) {
editFormObj: { this.fileList = backMoneyDataDetail.fileList.map(d => {
id: '', const file = {
eobNo: '', uid: Math.random()*10000,
eobSts: '', name: d.fileName,
eobBackDate: null, status: 'done',
eobBackMoneyCny: '', url: d.fileUrl,
eobBackMoneyUsd: '', }
}, return file
editRules: { })
backAmountUsd: [{ required: true, message: "请输入", trigger: "blur" }], }
backAmount: [{ required: true, message: "请输入", trigger: "blur" }], this.getData();
}, }
}; this._getNewEOBList();
}, },
mixins: [mixins], methods: {
components: { moment,
Goback, onSelectChange(selectedRow, selected) {
BurtPagination, if(selected) {
}, this.selectedRowKeys.push(selectedRow.id)
computed: { this.selectedRows.push(selectedRow)
columns() { } else {
const base = [ const index = this.selectedRowKeys.findIndex(item => item === selectedRow.id)
{ title: "账单编号", dataIndex: "receiptNo", scopedSlots: { customRender: 'eobNo' }, ellipsis: true, width: 150 }, this.selectedRowKeys.splice(index, 1)
// { title: "病历号", dataIndex: "mrnNo", ellipsis: true, width: 195 }, this.selectedRows.splice(index, 1)
{ title: "客户姓名",dataIndex: "patientName", ellipsis: true, width: 110 }, }
// { title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 160 }, },
{ title: "账单日期", dataIndex: "receiptDate", ellipsis: true, width: 150 }, onSelectAll(selected, selectedRows, changeRows) {
{ title: "收银", dataIndex: "receiptTellerName", ellipsis: true, width: 120,}, console.log(selected, selectedRows, changeRows)
{ title: "账单金额", dataIndex: "actualAmount", ellipsis: true, width: 150,}, if(selected) {
{ title: "回款金额", dataIndex: "backAmount", ellipsis: true, width: 150,}, this.selectedRowKeys = this.selectedRowKeys.concat(changeRows.map(item => item.id))
{ title: "回款日期", dataIndex: "receiptDate", ellipsis: true, width: 150,}, this.selectedRows = this.selectedRows.concat(changeRows)
// { title: "EOB号", dataIndex: "eobNo", ellipsis: true, width: 190 }, } else {
// { title: "EOB名称", dataIndex: "eobName", ellipsis: true, width: 160 }, changeRows.forEach(item => {
]; const findIndex = this.selectedRowKeys.findIndex(rowId => rowId === item.id)
// if(this.backMoneyNo && !this.isEditNewEOB && this.isEdit){ // 编辑状态下已经保存的数据才可进行操作 this.selectedRowKeys.splice(findIndex, 1)
// return base.concat([ this.selectedRows.splice(findIndex, 1)
// { title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" },fixed: "right", width: "170px", align: "center"}, })
// ]) }
// } },
return base pageChange(pager) {
} this.pagination = {
}, ...this.pagination,
created(){ ...pager
const { backMoneyNo, isEdit } = this.$route.query }
this.backMoneyNo = backMoneyNo; this._getNewEOBList()
this.isEdit = isEdit; },
this._getCompanyOptions(); // 获取保险公司下拉选项
if(backMoneyNo){ _getCompanyOptions() {
const backMoneyDataDetail = JSON.parse(localStorage.getItem('backMoneyDataDetail') || '{}'); this.$apis.GETCOMPANYOPTIONS().then((res) => {
this.form = backMoneyDataDetail this.companyOptions = res.content || [];
this.form.backDate = this.form.backDate ? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00') : null });
},
// 如果有上传附件则显示列表 // 获取已关联的账单
if(backMoneyDataDetail.fileList) { getData() {
this.fileList = backMoneyDataDetail.fileList.map(d => { this.$apis.QUERYBACKRECEIPTLIST({
const file = { pageNum: 1,
uid: Math.random()*10000, pageSize: 999,
name: d.fileName, backMoneyNo: this.backMoneyNo,
status: 'done', payorCode: this.form.payorCode
url: d.fileUrl, })
} .then((res) => {
return file if (res.returnCode == "0000") {
}) const list = res.content.list || [];
} this.selectedRowKeys = list.map(d => d.id)
this.selectedRows = list
this.getData(); } else {
} this.$message.error(res.returnMsg);
}, }
methods: { });
moment, },
// 查看的超链点击时链接已经生成好了,所以要点击的时候才set值才是对应的,不然存的都是最后一条数据 // 获取所有账单
setData(record){ _getNewEOBList(){
localStorage.setItem('EobDataDetail', JSON.stringify(record)); this.$apis.QUERYBACKRECEIPTINFOLIST({
}, pageNum: this.pagination.pageNum,
// EOB添加去查看的超链 pageSize: this.pagination.pageSize,
toEOBDetail(record){ payorCode: this.form.payorCode
const { eobNo } = record; })
localStorage.setItem('EobDataDetail', JSON.stringify(record)); .then((res) => {
this.$router.push({ if (res.returnCode == "0000") {
path: '/verification/detail', let content = res.content || {};
query: { this.pagination.total = content.total || 0;
eobNo this.dataList = content.list || [];
} } else {
}) this.$message.error(res.returnMsg);
}, }
onSelectChange(selectedRowKeys) { });
let arr = []; },
for(let i=0; i<selectedRowKeys.length; i++){ //新建/保存回款
let idx = selectedRowKeys[i]; addNewEvt(backStatus){
if(this.dataList[idx].backMoneyNo){ return new Promise((resolve,reject)=>{
this.$msg.destroy(); console.log(this.selectedRows)
this.$message.warning('回款编号已存在') if(!this.form.backAmountCny){
}else{ this.$message.warning("请输入回款金额");
arr.push(idx); reject();
} return;
} }
this.selectedRowKeys = arr; let receiptVoList = this.selectedRows.map(item => {
}, return {
pageChange(pager) { id: item.id,
this.pagination = { backAmount: item.backAmount,
...this.pagination, }
...pager })
} const valid = receiptVoList.some(item => {
if(this.isEditNewEOB) { // 点击添加EOB之后 分页数据查询就应该调EOB数据 return !item.backAmount
this._getNewEOBList() })
return true; if(valid) {
} this.$message.warning("存在关联账单未输入回款金额");
this.getData(); reject();
}, return;
// 获取保险公司下拉选项 }
_getCompanyOptions() {
this.$apis.GETCOMPANYOPTIONS().then((res) => { const formData = {
this.companyOptions = res.content || []; ...this.form,
}); receiptVoList,
}, backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00'):'',
handlerSearch() { backMoneyNo: this.backMoneyNo, //回款编号
this.pagination.pageNum = 1; backStatus // 0暂存 1结案
this.getData(); }
},
getData() { // 上传附件格式转换
this.$apis.QUERYBACKRECEIPTLIST({ formData.fileList = this.fileList.map(d => {
pageNum: this.pagination.pageNum, const file = {
pageSize: this.pagination.pageSize, fileName: d.name,
backMoneyNo: this.backMoneyNo fileUrl: d.url
}) }
.then((res) => { return file
if (res.returnCode == "0000") { })
let content = res.content || {};
this.pagination.total = content.total || 0; this.$apis.SAVEBACKMONEY(formData)
this.dataList = content.list || []; .then((res) => {
this.backEobList = this.dataList.map(d => d) if (res.returnCode == "0000") {
} else { this.backMoneyNo = res.content;
this.$message.error(res.returnMsg); this.$message.success("成功");
} this.selectedRowKeys = [];
}); this.getData();
},
//添加EOB // this.$router.go(-1);
addNewEOB(){ resolve();
this.isEditNewEOB = !this.isEditNewEOB; } else {
if(!this.isEditNewEOB){ //保存 this.$message.error(res.returnMsg);
this.addNewEvt(1) reject();
.then(()=>{ }
this.isEditNewEOB = false; });
}) })
}else{ //查询所有未加入的账单 },
this.pagination.pageNum = 1;
this._getNewEOBList() /* ======== 上传区域 ======== */
} // 上传之前
}, beforeUpload(){
_getNewEOBList(){ const len = this.fileList.length;
this.$apis.QUERYBACKRECEIPTINFOLIST({ if(len >= 5){
pageNum: this.pagination.pageNum, this.$message.warning('不能超过5个文件');
pageSize: this.pagination.pageSize return false;
}) }
.then((res) => { return true;
if (res.returnCode == "0000") { },
this.selectedRowKeys = []; // 删除文件
let content = res.content || {}; removeFile(file){
this.pagination.total = content.total || 0; let index;
this.dataList = content.list || []; this.fileList.forEach((item, i) => {
} else { if (item.uid == file.uid) {
this.$message.error(res.returnMsg); index = i;
} }
}); });
}, this.fileList.splice(index, 1);
//新建/保存回款 return true;
addNewEvt(backStatus){ },
return new Promise((resolve,reject)=>{ // 上传文件
if(!this.form.backAmountCny){ uploadFile(fileData){
this.$message.warning("请输入回款金额"); let formData = new FormData();
reject(); formData.append("file", fileData.file);
return; this.$apis.UPLOADIMG(formData)
} .then((res)=>{
fileData.onSuccess();
let backMoneyEobList = []; let tmp = {
if(!this.isEditNewEOB) { uid: Math.random()*10000,
backMoneyEobList = this.backEobList name: res.original,
} else { status: 'done',
this.dataList.forEach((item,index)=>{ url: res.url,
if(this.selectedRowKeys.indexOf(index)!=-1){ }
backMoneyEobList.push({ this.fileList.push(tmp);
id: item.id,
eobNo: item.eobNo, this.$forceUpdate();
eobSts: item.eobSts, })
eobBackDate: item.eobBackDate?moment(item.eobBackDate).format('YYYY-MM-DD 00:00:00'):'', }
eobBackMoneyCny: item.eobBackMoneyCny, },
eobBackMoneyUsd: item.eobBackMoneyUsd, };
}) </script>
}
}) <style lang="less" scoped>
} .none-label {
text-align: right;
const formData = { .ant-form-item-label {
...this.form, opacity: 0;
backMoneyEobList: backMoneyEobList, }
backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00'):'', }
backMoneyNo: this.backMoneyNo, //回款编号 .table-title {
backStatus // 0暂存 1结案 font-size: 15px;
} margin: 12px 0 6px;
}
// 上传附件格式转换 .table-content {
formData.fileList = this.fileList.map(d => { margin-bottom: 8px;
const file = { }
fileName: d.name, .ant-btn .icon-class {
fileUrl: d.url .mg-r(10);
} }
return file .success.ant-btn-link {
}) color: #4cd964;
}
this.$apis.SAVEBACKMONEY(formData) .danger.ant-btn-link {
.then((res) => { color: #ff3b30;
if (res.returnCode == "0000") { }
this.backMoneyNo = res.content; </style>
this.$message.success("成功");
this.selectedRowKeys = [];
this.getData();
// this.$router.go(-1);
resolve();
} else {
this.$message.error(res.returnMsg);
reject();
}
});
})
},
//删除记录
delRecord(index) {
this.$modal.confirm({
title: "删除",
content: "确定删除该条记录?",
okText: "确认",
cancelText: "取消",
onOk: () => {
this.$apis.DELETEBACKMONEY({
backMoneyNo: this.dataList[index].backMoneyNo,
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("删除成功");
this.dataList.splice(index, 1);
} else {
this.$message.error(res.returnMsg);
}
});
},
onCancel: () => {},
});
},
editEvt(record) {
this.editFormObj = {
id: record.id,
eobNo: record.eobNo || "",
eobSts: record.eobSts || "",
eobBackDate: record.eobBackDate?moment(record.eobBackDate).format('YYYY-MM-DD 00:00:00'):"",
eobBackMoneyCny: record.eobBackMoneyCny || "",
eobBackMoneyUsd: record.eobBackMoneyUsd || "",
};
this.dialogShow = true;
},
//编辑保存
handleEditOK() {
this.$refs.editForm.validate((valid) => {
if (valid) {
let editFormObj = {
...this.editFormObj,
eobBackDate: this.editFormObj.eobBackDate?moment(this.editFormObj.eobBackDate).format('YYYY-MM-DD 00:00:00'):"",
}
this.$apis.SAVEBACKMONEY({
...this.form,
backMoneyEobList: [editFormObj],
backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00'):'',
backMoneyNo: this.backMoneyNo, //回款编号
})
.then((res) => {
if (res.returnCode == "0000") {
this.$message.success("编辑成功");
this.dialogShow = false;
this.getData();
} else {
this.$message.error(res.returnMsg);
}
});
}
});
},
/* ======== 上传区域 ======== */
// 上传之前
beforeUpload(){
const len = this.fileList.length;
if(len >= 5){
this.$message.warning('不能超过5个文件');
return false;
}
return true;
},
// 删除文件
removeFile(file){
let index;
this.fileList.forEach((item, i) => {
if (item.uid == file.uid) {
index = i;
}
});
this.fileList.splice(index, 1);
return true;
},
// 上传文件
uploadFile(fileData){
let formData = new FormData();
formData.append("file", fileData.file);
this.$apis.UPLOADIMG(formData)
.then((res)=>{
fileData.onSuccess();
let tmp = {
uid: Math.random()*10000,
name: res.original,
status: 'done',
url: res.url,
}
this.fileList.push(tmp);
this.$forceUpdate();
})
}
},
};
</script>
<style lang="less" scoped>
.none-label {
text-align: right;
.ant-form-item-label {
opacity: 0;
}
}
.ant-btn .icon-class {
.mg-r(10);
}
.success.ant-btn-link {
color: #4cd964;
}
.danger.ant-btn-link {
color: #ff3b30;
}
</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