md
This commit is contained in:
parent
822506330b
commit
233b036465
@ -7,7 +7,7 @@
|
|||||||
<span slot="label">
|
<span slot="label">
|
||||||
<span style="color: red">收退款类型</span>
|
<span style="color: red">收退款类型</span>
|
||||||
</span>
|
</span>
|
||||||
<el-radio-group v-model="form.recType">
|
<el-radio-group v-model="form.recType" @change="onRecTypeChange">
|
||||||
<el-radio :label="1">收款</el-radio>
|
<el-radio :label="1">收款</el-radio>
|
||||||
<el-radio :label="2">退款</el-radio>
|
<el-radio :label="2">退款</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
@ -338,7 +338,7 @@
|
|||||||
{{scope.row.hasApplyFee}}
|
{{scope.row.hasApplyFee}}
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="openBillMoney" :label="$t('收款金额')" align="center" width="120">
|
<el-table-column prop="openBillMoney" :label="$t('收/退款金额')" align="center" width="120">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-input-number :min="0.00" :max="scope.row.canApplyFee" v-model="scope.row.payMoney" placeholder="" :controls="false" :precision="2" @blur="(val)=>handleCalcFeeItem(scope.row)" @keyup.enter.native="handleCalcFeeItem(scope.row)" >
|
<el-input-number :min="0.00" :max="scope.row.canApplyFee" v-model="scope.row.payMoney" placeholder="" :controls="false" :precision="2" @blur="(val)=>handleCalcFeeItem(scope.row)" @keyup.enter.native="handleCalcFeeItem(scope.row)" >
|
||||||
<span slot="suffix">(CNY)</span>
|
<span slot="suffix">(CNY)</span>
|
||||||
@ -468,11 +468,13 @@ export default {
|
|||||||
initData() {
|
initData() {
|
||||||
|
|
||||||
this.reset();
|
this.reset();
|
||||||
|
|
||||||
|
this.form.recType=1;
|
||||||
this.form.payScope='1';
|
this.form.payScope='1';
|
||||||
this.form.payRelList=[];
|
this.form.payRelList=[];
|
||||||
this.changePayScope();
|
this.changePayScope();
|
||||||
|
|
||||||
this.form.recType=1;
|
|
||||||
console.log("===>initData2222===>",this.settleBillNo)
|
console.log("===>initData2222===>",this.settleBillNo)
|
||||||
if(this.settleBillNo){
|
if(this.settleBillNo){
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -500,56 +502,71 @@ export default {
|
|||||||
totalFee=origFee
|
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(){
|
async changePayScope(){
|
||||||
if(this.form.payScope==1){
|
|
||||||
this.form.payRelList=[];
|
// 收/ 退款
|
||||||
let hasPayMap = {}
|
if(this.form.payScope==1){
|
||||||
let resMap=await listHasPayMap({settleBillNo:this.settleBillNo});
|
this.form.payRelList=[];
|
||||||
if(resMap.rows&&resMap.rows.length>0){
|
let hasPayMap = {}
|
||||||
for(let i=0;i<resMap.rows.length;i++){
|
let resMap=await listHasPayMap({settleBillNo:this.settleBillNo});
|
||||||
let item=resMap.rows[i];
|
if(resMap.rows&&resMap.rows.length>0){
|
||||||
hasPayMap[item.billNo] = item.sumMoney
|
for(let i=0;i<resMap.rows.length;i++){
|
||||||
}
|
let item=resMap.rows[i];
|
||||||
|
hasPayMap[item.billNo] = item.sumMoney
|
||||||
}
|
}
|
||||||
console.log("===>hasPayMap==>",hasPayMap);
|
}
|
||||||
|
console.log("===>hasPayMap==>",hasPayMap);
|
||||||
|
|
||||||
let qParam={
|
let qParam={
|
||||||
settleBillNo:this.settleBillNo,
|
settleBillNo:this.settleBillNo,
|
||||||
pageNum:1,
|
pageNum:1,
|
||||||
pageSize:2000
|
pageSize:2000
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询子账单
|
// 查询子账单
|
||||||
let res=await listEmisSettleSubBill(qParam);
|
let res=await listEmisSettleSubBill(qParam);
|
||||||
console.log("===>=res==>",res)
|
console.log("===>=res==>",res)
|
||||||
if(res.code==200){
|
if(res.code==200){
|
||||||
res.rows.forEach(itemSubBill=>{
|
res.rows.forEach(itemSubBill=>{
|
||||||
let relItem={...itemSubBill};
|
let relItem={...itemSubBill};
|
||||||
relItem.payMoney=itemSubBill.billFee;
|
relItem.payMoney=itemSubBill.billFee;
|
||||||
relItem.hasApplyFee=0;
|
relItem.hasApplyFee=0;
|
||||||
|
|
||||||
console.log("===>=hasPayMap1111==>",hasPayMap[itemSubBill.billNo])
|
console.log("===>=hasPayMap1111==>",hasPayMap[itemSubBill.billNo])
|
||||||
if(itemSubBill.billNo in hasPayMap){
|
if(itemSubBill.billNo in hasPayMap){
|
||||||
|
if(this.form.recType==1){
|
||||||
relItem.hasApplyFee=hasPayMap[itemSubBill.billNo];
|
relItem.hasApplyFee=hasPayMap[itemSubBill.billNo];
|
||||||
relItem.payMoney=itemSubBill.billFee-hasPayMap[itemSubBill.billNo];
|
relItem.payMoney=itemSubBill.billFee-hasPayMap[itemSubBill.billNo];
|
||||||
}
|
}
|
||||||
|
else if(this.form.recType==2){
|
||||||
|
relItem.hasApplyFee=hasPayMap[itemSubBill.billNo];
|
||||||
if(relItem.payMoney>0){
|
relItem.payMoney=hasPayMap[itemSubBill.billNo];
|
||||||
this.form.payRelList.push(relItem);
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
}
|
|
||||||
this.handleCalcFeeItem();
|
|
||||||
|
|
||||||
}else{
|
if(relItem.payMoney>0){
|
||||||
|
this.form.payRelList.push(relItem);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
this.handleCalcFeeItem();
|
||||||
|
|
||||||
|
}else{
|
||||||
|
this.form.payRelList=[];
|
||||||
|
}
|
||||||
|
|
||||||
this.form.payRelList=[];
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
async addBillToApply(){
|
async addBillToApply(){
|
||||||
this.form.payRelList=[];
|
this.form.payRelList=[];
|
||||||
@ -585,8 +602,14 @@ export default {
|
|||||||
relItem.hasApplyFee=0;
|
relItem.hasApplyFee=0;
|
||||||
|
|
||||||
if(relItem.billNo in hasPayMap){
|
if(relItem.billNo in hasPayMap){
|
||||||
relItem.hasApplyFee=hasPayMap[itemSubBill.billNo];
|
if(this.form.recType==1){
|
||||||
relItem.payMoney=relItem.billFee-hasPayMap[itemSubBill.billNo];
|
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){
|
if(relItem.payMoney>0){
|
||||||
this.form.payRelList.push(relItem);
|
this.form.payRelList.push(relItem);
|
||||||
@ -595,6 +618,9 @@ export default {
|
|||||||
this.handleCalcFeeItem();
|
this.handleCalcFeeItem();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onRecTypeChange(){
|
||||||
|
this.changePayScope();
|
||||||
|
},
|
||||||
onPayeeSelect(item){
|
onPayeeSelect(item){
|
||||||
this.form.payMan=item;
|
this.form.payMan=item;
|
||||||
},
|
},
|
||||||
@ -673,6 +699,9 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
|
||||||
|
// 必须要有金额才能保存
|
||||||
|
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if(this.form.tradeDate){
|
if(this.form.tradeDate){
|
||||||
|
|||||||
@ -38,8 +38,9 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('交易时间')" align="center" prop="tradeDate" width="170" :show-overflow-tooltip="true" >
|
<el-table-column :label="$t('交易时间')" align="center" prop="tradeDate" width="170" :show-overflow-tooltip="true" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="scope.row.recType == '1'">{{ scope.row.tradeDate }}</span>
|
<span>{{ scope.row.tradeDate }}</span>
|
||||||
<span v-if="scope.row.recType == '2'">{{ scope.row.refundDate }}</span>
|
<!-- <span v-if="scope.row.recType == '1'">{{ scope.row.tradeDate }}</span> -->
|
||||||
|
<!-- <span v-if="scope.row.recType == '2'">{{ scope.row.refundDate }}</span> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('流水号')" align="center" prop="payId" width="170" :show-overflow-tooltip="true"/>
|
<el-table-column :label="$t('流水号')" align="center" prop="payId" width="170" :show-overflow-tooltip="true"/>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user