diff --git a/src/views/emis/emisSettlePayRecord/panel/PayRecordInput.vue b/src/views/emis/emisSettlePayRecord/panel/PayRecordInput.vue
index 426763f0..29648db3 100644
--- a/src/views/emis/emisSettlePayRecord/panel/PayRecordInput.vue
+++ b/src/views/emis/emisSettlePayRecord/panel/PayRecordInput.vue
@@ -7,7 +7,7 @@
收退款类型
-
+
收款
退款
@@ -338,7 +338,7 @@
{{scope.row.hasApplyFee}}
-
+
handleCalcFeeItem(scope.row)" @keyup.enter.native="handleCalcFeeItem(scope.row)" >
(CNY)
@@ -468,11 +468,13 @@ export default {
initData() {
this.reset();
+
+ this.form.recType=1;
this.form.payScope='1';
this.form.payRelList=[];
this.changePayScope();
- this.form.recType=1;
+
console.log("===>initData2222===>",this.settleBillNo)
if(this.settleBillNo){
this.loading = true;
@@ -500,56 +502,71 @@ export default {
totalFee=origFee
}
- this.form.payMoney = totalFee.toFixed(2);
+
+ if(this.form.recType==1){
+ this.form.payMoney = totalFee.toFixed(2);
+ }
+ else if(this.form.recType==2){
+ this.form.refundMoney = totalFee.toFixed(2);
+ }
},
+
async changePayScope(){
- if(this.form.payScope==1){
- this.form.payRelList=[];
- let hasPayMap = {}
- let resMap=await listHasPayMap({settleBillNo:this.settleBillNo});
- if(resMap.rows&&resMap.rows.length>0){
- for(let i=0;i0){
+ for(let i=0;ihasPayMap==>",hasPayMap);
+ }
+ console.log("===>hasPayMap==>",hasPayMap);
- let qParam={
- settleBillNo:this.settleBillNo,
- pageNum:1,
- pageSize:2000
- }
+ let qParam={
+ settleBillNo:this.settleBillNo,
+ pageNum:1,
+ pageSize:2000
+ }
- // 查询子账单
- let res=await listEmisSettleSubBill(qParam);
- console.log("===>=res==>",res)
- if(res.code==200){
- res.rows.forEach(itemSubBill=>{
- let relItem={...itemSubBill};
- relItem.payMoney=itemSubBill.billFee;
- relItem.hasApplyFee=0;
+ // 查询子账单
+ let res=await listEmisSettleSubBill(qParam);
+ console.log("===>=res==>",res)
+ if(res.code==200){
+ res.rows.forEach(itemSubBill=>{
+ let relItem={...itemSubBill};
+ relItem.payMoney=itemSubBill.billFee;
+ relItem.hasApplyFee=0;
- console.log("===>=hasPayMap1111==>",hasPayMap[itemSubBill.billNo])
- if(itemSubBill.billNo in hasPayMap){
+ console.log("===>=hasPayMap1111==>",hasPayMap[itemSubBill.billNo])
+ if(itemSubBill.billNo in hasPayMap){
+ if(this.form.recType==1){
relItem.hasApplyFee=hasPayMap[itemSubBill.billNo];
relItem.payMoney=itemSubBill.billFee-hasPayMap[itemSubBill.billNo];
}
-
-
- if(relItem.payMoney>0){
- this.form.payRelList.push(relItem);
+ else if(this.form.recType==2){
+ relItem.hasApplyFee=hasPayMap[itemSubBill.billNo];
+ relItem.payMoney=hasPayMap[itemSubBill.billNo];
}
- });
+ }
- }
- this.handleCalcFeeItem();
- }else{
+ if(relItem.payMoney>0){
+ this.form.payRelList.push(relItem);
+ }
+ });
+
+ }
+ this.handleCalcFeeItem();
+
+ }else{
+ this.form.payRelList=[];
+ }
- this.form.payRelList=[];
- }
},
async addBillToApply(){
this.form.payRelList=[];
@@ -585,8 +602,14 @@ export default {
relItem.hasApplyFee=0;
if(relItem.billNo in hasPayMap){
- relItem.hasApplyFee=hasPayMap[itemSubBill.billNo];
- relItem.payMoney=relItem.billFee-hasPayMap[itemSubBill.billNo];
+ if(this.form.recType==1){
+ relItem.hasApplyFee=hasPayMap[itemSubBill.billNo];
+ relItem.payMoney=relItem.billFee-hasPayMap[itemSubBill.billNo];
+ }
+ else if(this.form.recType==2){
+ relItem.hasApplyFee=hasPayMap[itemSubBill.billNo];
+ relItem.payMoney=hasPayMap[itemSubBill.billNo];
+ }
}
if(relItem.payMoney>0){
this.form.payRelList.push(relItem);
@@ -595,6 +618,9 @@ export default {
this.handleCalcFeeItem();
}
},
+ onRecTypeChange(){
+ this.changePayScope();
+ },
onPayeeSelect(item){
this.form.payMan=item;
},
@@ -673,6 +699,9 @@ export default {
},
/** 提交按钮 */
submitForm() {
+
+ // 必须要有金额才能保存
+
this.$refs["form"].validate(valid => {
if (valid) {
if(this.form.tradeDate){
diff --git a/src/views/emis/emisSettlePayRecord/panel/PayRecordList.vue b/src/views/emis/emisSettlePayRecord/panel/PayRecordList.vue
index 37d420c9..8c341252 100644
--- a/src/views/emis/emisSettlePayRecord/panel/PayRecordList.vue
+++ b/src/views/emis/emisSettlePayRecord/panel/PayRecordList.vue
@@ -38,8 +38,9 @@
- {{ scope.row.tradeDate }}
- {{ scope.row.refundDate }}
+ {{ scope.row.tradeDate }}
+
+