Commit 6b9a9b36 authored by 朱彩云's avatar 朱彩云

Merge branch 'ECCS-1820' into 'master'

核销管理-新建回款时逻辑修改

See merge request !17
parents 8f9a68b1 374a8489
......@@ -237,7 +237,7 @@ export default {
{ title: "客户自付", dataIndex: "paidAmount", width: 100, align: 'center' },
{ title: "理赔金额", dataIndex: "paidamount", width: 100, align: 'center' },
];
if(! this.isEditNewBill){
if(this.sendBatchNo && ! this.isEditNewBill && this.isEdit){ // 编辑状态下已经保存的数据才可进行操作
return base.concat([
{ title: "操作", key: "operation", width: "100px",fixed: "right",scopedSlots: { customRender: "operation" }},
]);
......
......@@ -109,21 +109,8 @@ import moment from "moment";
import mixins from "@/mixins";
export default {
data() {
const columns = [
{ title: "EOB编号", dataIndex: "eobNo", ellipsis: true, width: 150 },
{ title: "EOB名称", dataIndex: "eobName", ellipsis: true, width: 195 },
{ title: "核销时间", dataIndex: "eobBackDate", ellipsis: true, width: 110, scopedSlots: { customRender: "eobBackDate" }, },
{ title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 110 },
{ title: "EOB状态", dataIndex: "eobSts", ellipsis: true, width: 110, scopedSlots: { customRender: "eobSts" } },
{ title: "EOB赔付金额(人民币)", dataIndex: "eobAmountCny", ellipsis: true, width: 190,},
{ title: "EOB赔付金额(美元)", dataIndex: "eobAmountUsd", ellipsis: true, width: 190,},
{ title: "EOB回款金额(人民币)", dataIndex: "eobBackMoneyCny", ellipsis: true, width: 190,},
{ title: "EOB回款金额(美元)", dataIndex: "eobBackMoneyUsd", ellipsis: true, width: 190,},
{ title: "汇率差", dataIndex: "backExchangeRate", ellipsis: true, width: 110 },
];
return {
isEdit: false,
columns,
EOBStatusOptions,
dialogShow: false,
form: {
......@@ -162,6 +149,28 @@ export default {
Goback,
BurtPagination,
},
computed: {
columns() {
const base = [
{ title: "EOB编号", dataIndex: "eobNo", ellipsis: true, width: 150 },
{ title: "EOB名称", dataIndex: "eobName", ellipsis: true, width: 195 },
{ title: "核销时间", dataIndex: "eobBackDate", ellipsis: true, width: 110, scopedSlots: { customRender: "eobBackDate" }, },
{ title: "保险公司", dataIndex: "payorName", ellipsis: true, width: 110 },
{ title: "EOB状态", dataIndex: "eobSts", ellipsis: true, width: 110, scopedSlots: { customRender: "eobSts" } },
{ title: "EOB赔付金额(人民币)", dataIndex: "eobAmountCny", ellipsis: true, width: 190,},
{ title: "EOB赔付金额(美元)", dataIndex: "eobAmountUsd", ellipsis: true, width: 190,},
{ title: "EOB回款金额(人民币)", dataIndex: "eobBackMoneyCny", ellipsis: true, width: 190,},
{ title: "EOB回款金额(美元)", dataIndex: "eobBackMoneyUsd", ellipsis: true, width: 190,},
{ title: "汇率差", dataIndex: "backExchangeRate", ellipsis: true, width: 110 },
];
if(this.backMoneyNo && !this.isEditNewEOB && this.isEdit){ // 编辑状态下已经保存的数据才可进行操作
return base.concat([
{ title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" },fixed: "right", width: "170px", align: "center"},
])
}
return base
}
},
created(){
const { backMoneyNo, isEdit } = this.$route.query
this.backMoneyNo = backMoneyNo;
......@@ -172,11 +181,6 @@ export default {
this.form = backMoneyDataDetail? JSON.parse(backMoneyDataDetail): {};
this.getData();
}
if(isEdit) {
this.columns.push(
{ title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" },fixed: "right", width: "170px", align: "center"},
)
}
},
methods: {
moment,
......@@ -261,36 +265,32 @@ export default {
},
//新建/保存回款
addNewEvt(){
let backMoneyEobList = [];
this.dataList.forEach((item,index)=>{
if(this.selectedRowKeys.indexOf(index)!=-1){
backMoneyEobList.push({
id: item.id,
eobNo: item.eobNo,
eobSts: item.eobSts,
eobBackDate: item.eobBackDate?moment(item.eobBackDate).format('YYYY-MM-DD 00:00:00'):'',
eobBackMoneyCny: item.eobBackMoneyCny,
eobBackMoneyUsd: item.eobBackMoneyUsd,
})
}
})
let formData = {
...this.form,
backMoneyEobList: backMoneyEobList,
backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00'):'',
backMoneyNo: this.backMoneyNo, //回款编号
}
return new Promise((resolve,reject)=>{
let isData = false;
if(this.selectedRowKeys && this.selectedRowKeys.length){
isData = true;
if(!this.form.backAmountCny){
this.$message.warning("请输入回款金额");
reject();
return;
}
if(! isData){
for(let i in this.form){
if(this.form[i]){ isData = true; return true; }
let backMoneyEobList = [];
this.dataList.forEach((item,index)=>{
if(this.selectedRowKeys.indexOf(index)!=-1){
backMoneyEobList.push({
id: item.id,
eobNo: item.eobNo,
eobSts: item.eobSts,
eobBackDate: item.eobBackDate?moment(item.eobBackDate).format('YYYY-MM-DD 00:00:00'):'',
eobBackMoneyCny: item.eobBackMoneyCny,
eobBackMoneyUsd: item.eobBackMoneyUsd,
})
}
})
let formData = {
...this.form,
backMoneyEobList: backMoneyEobList,
backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00'):'',
backMoneyNo: this.backMoneyNo, //回款编号
}
if(!isData){resolve(); return true;} // 没有数据不调接口保存直接修改显示状态就好了
this.$apis.SAVEBACKMONEY(formData)
.then((res) => {
if (res.returnCode == "0000") {
......
......@@ -192,7 +192,7 @@ export default {
{ title: "个人欠费", dataIndex: "perNoPaidAmount", ellipsis: true, width: 85 },
{ title: "备注", dataIndex: "sendRemark", ellipsis: true, width: 120 },
];
if(this.eobNo && !this.isEditNewEob){
if(this.eobNo && !this.isEditNewEob && this.isEdit){ // 编辑状态下已经保存的数据才可进行操作
return base.concat([
{ title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" }, fixed: "right", width: "170px", align: "center"},
])
......
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