Commit 374a8489 authored by WindyWTH's avatar WindyWTH

新建回款逻辑修改

parent de6c167d
...@@ -237,7 +237,7 @@ export default { ...@@ -237,7 +237,7 @@ export default {
{ title: "客户自付", dataIndex: "paidAmount", width: 100, align: 'center' }, { title: "客户自付", dataIndex: "paidAmount", width: 100, align: 'center' },
{ 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([ return base.concat([
{ title: "操作", key: "operation", width: "100px",fixed: "right",scopedSlots: { customRender: "operation" }}, { title: "操作", key: "operation", width: "100px",fixed: "right",scopedSlots: { customRender: "operation" }},
]); ]);
......
...@@ -109,21 +109,8 @@ import moment from "moment"; ...@@ -109,21 +109,8 @@ import moment from "moment";
import mixins from "@/mixins"; import mixins from "@/mixins";
export default { export default {
data() { 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 { return {
isEdit: false, isEdit: false,
columns,
EOBStatusOptions, EOBStatusOptions,
dialogShow: false, dialogShow: false,
form: { form: {
...@@ -162,6 +149,28 @@ export default { ...@@ -162,6 +149,28 @@ export default {
Goback, Goback,
BurtPagination, 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(){ created(){
const { backMoneyNo, isEdit } = this.$route.query const { backMoneyNo, isEdit } = this.$route.query
this.backMoneyNo = backMoneyNo; this.backMoneyNo = backMoneyNo;
...@@ -172,11 +181,6 @@ export default { ...@@ -172,11 +181,6 @@ export default {
this.form = backMoneyDataDetail? JSON.parse(backMoneyDataDetail): {}; this.form = backMoneyDataDetail? JSON.parse(backMoneyDataDetail): {};
this.getData(); this.getData();
} }
if(isEdit) {
this.columns.push(
{ title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" },fixed: "right", width: "170px", align: "center"},
)
}
}, },
methods: { methods: {
moment, moment,
...@@ -261,6 +265,13 @@ export default { ...@@ -261,6 +265,13 @@ export default {
}, },
//新建/保存回款 //新建/保存回款
addNewEvt(){ addNewEvt(){
return new Promise((resolve,reject)=>{
if(!this.form.backAmountCny){
this.$message.warning("请输入回款金额");
reject();
return;
}
let backMoneyEobList = []; let backMoneyEobList = [];
this.dataList.forEach((item,index)=>{ this.dataList.forEach((item,index)=>{
if(this.selectedRowKeys.indexOf(index)!=-1){ if(this.selectedRowKeys.indexOf(index)!=-1){
...@@ -280,17 +291,6 @@ export default { ...@@ -280,17 +291,6 @@ export default {
backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00'):'', backDate: this.form.backDate? moment(this.form.backDate).format('YYYY-MM-DD 00:00:00'):'',
backMoneyNo: this.backMoneyNo, //回款编号 backMoneyNo: this.backMoneyNo, //回款编号
} }
return new Promise((resolve,reject)=>{
let isData = false;
if(this.selectedRowKeys && this.selectedRowKeys.length){
isData = true;
}
if(! isData){
for(let i in this.form){
if(this.form[i]){ isData = true; return true; }
}
}
if(!isData){resolve(); return true;} // 没有数据不调接口保存直接修改显示状态就好了
this.$apis.SAVEBACKMONEY(formData) this.$apis.SAVEBACKMONEY(formData)
.then((res) => { .then((res) => {
if (res.returnCode == "0000") { if (res.returnCode == "0000") {
......
...@@ -192,7 +192,7 @@ export default { ...@@ -192,7 +192,7 @@ export default {
{ title: "个人欠费", dataIndex: "perNoPaidAmount", ellipsis: true, width: 85 }, { title: "个人欠费", dataIndex: "perNoPaidAmount", ellipsis: true, width: 85 },
{ title: "备注", dataIndex: "sendRemark", ellipsis: true, width: 120 }, { title: "备注", dataIndex: "sendRemark", ellipsis: true, width: 120 },
]; ];
if(this.eobNo && !this.isEditNewEob){ if(this.eobNo && !this.isEditNewEob && this.isEdit){ // 编辑状态下已经保存的数据才可进行操作
return base.concat([ return base.concat([
{ title: "操作", dataIndex: "operation", scopedSlots: { customRender: "operation" }, fixed: "right", width: "170px", align: "center"}, { 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