Commit 28c086c0 authored by wuchun's avatar wuchun
parents bb979cb4 9a157edd
......@@ -17,6 +17,28 @@
<span>{{ scope.row.FrID }}</span>
</template>
</el-table-column>
<el-table-column
label="单据类型"
width="120">
<template slot-scope="scope">
<span v-if="scope.row.Type==2" style="display: inline-block;
padding: 2px 8px;
color: white;
background-color: #E95252;
line-height: 16px;
border-radius: 4px;">
支出
</span>
<span v-if="scope.row.Type==1" style="display: inline-block;
padding: 2px 8px;
color: white;
background-color: #2BB87C;
line-height: 16px;
border-radius: 4px;">
收入
</span>
</template>
</el-table-column>
<el-table-column
prop=""
label="原币金额"
......@@ -48,25 +70,58 @@
</el-table-column>
</el-table>
</div>
<div class="totalMoney-box">
<div class="totalMoney-box" v-if="OriginalMoneyThe>0">
<div>
<span style="display: inline-block;
padding: 2px 8px;
color: white;
background-color: #E95252;
line-height: 16px;
border-radius: 4px;">
支出
</span>
</div>
<div>
<span>原币合计:</span>
<span style="color: red;">{{OriginalMoney}}</span>
<span style="color: red;">{{OriginalMoneyThe}}</span>
</div>
<template v-if="isHandlingCharge">
<div v-if="HandlingChargeMoney">
<template v-if="isHandlingChargeThe">
<div v-if="HandlingChargeMoneyThe">
<span>手续费合计:</span>
<span style="color: red;">{{HandlingChargeMoney}}</span>
<span style="color: red;">{{HandlingChargeMoneyThe}}</span>
</div>
<div>
<span>手续费差额:</span>
<div>
<el-input v-model="balanceMoney" type="Number" placeholder="请输入手续费差额"></el-input>
</div>
</template>
</div>
<div class="totalMoney-box" v-if="OriginalMoneyClosed>0" :style="{padding: OriginalMoneyThe>0&&isHandlingChargeThe?'0':'10px 0'}">
<div>
<span style="display: inline-block;
padding: 2px 8px;
color: white;
background-color: #2BB87C;
line-height: 16px;
border-radius: 4px;">
收入
</span>
</div>
<div>
<span>原币合计:</span>
<span style="color: red;">{{OriginalMoneyClosed}}</span>
</div>
<template v-if="isHandlingChargeClosed">
<div v-if="HandlingChargeMoneyClosed">
<span>手续费合计:</span>
<span style="color: red;">{{HandlingChargeMoneyClosed}}</span>
</div>
</template>
</div>
<div class="totalMoney-box" v-if="isHandlingChargeThe">
<div>
<span>手续费差额:</span>
<div>
<el-input v-model="balanceMoney" type="Number" placeholder="请输入手续费差额"></el-input>
</div>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button class="hollowFixedBtn" @click="close">{{$t('pub.cancelBtn')}}</el-button>
<el-button class="normalBtn" type="primary" @click="clicksubmit">{{$t('pub.sureBtn')}}生成</el-button>
......@@ -83,9 +138,15 @@
showDialog: true,
dataList: [],
OriginalMoney: 0,//原币合计
OriginalMoneyThe: 0,//原币合计支
OriginalMoneyClosed: 0,//原币合计付
balanceMoney: null,//差额
isHandlingCharge: false,
isHandlingCharge: false,//是否有手续费
isHandlingChargeThe: false,//是否有手续费支
isHandlingChargeClosed: false,//是否有手续费付
HandlingChargeMoney: null,//手续费
HandlingChargeMoneyThe: null,//手续费支
HandlingChargeMoneyClosed: null,//手续费付
};
},
watch: {
......@@ -95,18 +156,45 @@
this.OriginalMoney = 0
let OriginalMoney = 0
let HandlingChargeMoney = 0
this.OriginalMoneyThe = 0
let OriginalMoneyThe = 0
let HandlingChargeMoneyThe = 0
this.OriginalMoneyClosed = 0
let OriginalMoneyClosed = 0
let HandlingChargeMoneyClosed = 0
this.dataList.forEach(x=>{
x.DetailList.forEach(y=>{
if(y.CostTypeId==114){
this.isHandlingCharge = true
HandlingChargeMoney += (y.OriginalMoney*100)
}if(y.CostTypeId!=114){
OriginalMoney += (y.OriginalMoney*100)
}
})
if(x.Type==2){
x.DetailList.forEach(y=>{
if(y.CostTypeId==114){
this.isHandlingChargeThe = true
HandlingChargeMoneyThe += (y.OriginalMoney*100)
}if(y.CostTypeId!=114){
OriginalMoneyThe += (y.OriginalMoney*100)
}
})
}
if(x.Type==1){
x.DetailList.forEach(y=>{
if(y.CostTypeId==114){
this.isHandlingChargeClosed = true
HandlingChargeMoneyClosed += (y.OriginalMoney*100)
}if(y.CostTypeId!=114){
OriginalMoneyClosed += (y.OriginalMoney*100)
}
})
}
})
this.OriginalMoney = OriginalMoney/100
this.HandlingChargeMoney = HandlingChargeMoney/100
this.OriginalMoney = (OriginalMoneyThe-OriginalMoneyClosed)/100
this.HandlingChargeMoney = (HandlingChargeMoneyThe-HandlingChargeMoneyClosed)/100
this.OriginalMoneyThe = OriginalMoneyThe/100
this.HandlingChargeMoneyThe = HandlingChargeMoneyThe/100
this.OriginalMoneyClosed = OriginalMoneyClosed/100
this.HandlingChargeMoneyClosed = HandlingChargeMoneyClosed/100
},
deep: true,
immediate: true
......@@ -117,13 +205,14 @@
let ids
ids = this.dataList.map(x=>{ return x.FrID})
let orderObj = {
CostType: 1547,
CostType2: this.isHandlingCharge?1547:null,
CostType3: this.isHandlingCharge&&this.balanceMoney?114:null,//114转账手续费
HandlingChargeMoney: this.isHandlingCharge?this.HandlingChargeMoney:null,//手续费
balanceMoney: this.isHandlingCharge&&this.balanceMoney?this.balanceMoney:null,//差额
CostType: this.OriginalMoneyThe>0?1547:null,
CostType2: this.isHandlingChargeThe?1547:null,
CostType3: this.isHandlingChargeThe&&this.balanceMoney?114:null,//114转账手续费
HandlingChargeMoney: this.isHandlingChargeThe?this.HandlingChargeMoneyThe:null,//手续费
balanceMoney: this.isHandlingChargeThe&&this.balanceMoney?this.balanceMoney:null,//差额
OtherType: 75,
Money: this.OriginalMoney,
Money: this.OriginalMoneyThe>0?this.OriginalMoneyThe:null,
MoneyClosed: this.OriginalMoneyClosed>0?Number(`-${this.OriginalMoneyClosed}`):null,
isVerifyMoney: true,
ReFinanceIds: ids.join(','),//单号
ReFinanceId2: 3,//成本
......
......@@ -235,7 +235,8 @@
<el-tag size="mini" closable
style="margin-right: 5px;margin-bottom: 5px;"
v-for="(x,index) in multipleSelection"
:key="x.FrID" @close="handleClose([multipleSelection[index]])">
:key="x.FrID" @close="handleClose([multipleSelection[index]])"
:type="x.Type==2?'danger':'success'">
{{x.FrID}}/
<template v-for="(y,i) in x.DetailList">
{{y.CostTypeName}}:{{y.OriginalMoney}} {{i!=(x.DetailList.length-1)?',':''}}
......
......@@ -1762,6 +1762,7 @@
this.msg.detailList[t].Remark = this.orderObj.TCNUMS ? `地接费领取自动生成:${this.orderObj.TCNUMS}` : '';
}
} else {
this.msg.detailList[t].CostTypeName = x.Name;
this.detailList.CostTypeName = x.Name;
if (x.ID === 56) {
this.detailList.Remark = this.orderObj.TCNUMS ? `地接费领取自动生成:${this.orderObj.TCNUMS}` : '';
......@@ -1769,6 +1770,7 @@
}
}
})
this.$forceUpdate()
},
getRate(cID, i, t, index) { // 根据选择币种获取汇率
this.coinGetList.forEach(x => {
......@@ -2088,10 +2090,10 @@
UnitPriceTo: '',
Number: 1,
Rate: '',
CostTypeId: '',
CostTypeId: this.orderObj.CostType,
CurrencyId: '',
Remark: '',
CostTypeName: '',
CostTypeName: '支付月结预提成本或费用',
yTotalPrice: '',
yTotalPriceTo: '',
bTotalPrice: '',
......@@ -2100,14 +2102,16 @@
}
this.msg.detailList = []
if(this.orderObj.CostType){
msgObj.CostTypeId = this.orderObj.CostType
msgObj.CostTypeName = '支付月结预提成本或费用'
msgObj.UnitPrice = this.orderObj.Money
msgObj.UnitPriceTo = this.orderObj.Money
this.msg.detailList.push(JSON.parse(JSON.stringify(msgObj)))
}
if(this.orderObj.MoneyClosed){
msgObj.UnitPrice = this.orderObj.MoneyClosed
msgObj.UnitPriceTo = this.orderObj.MoneyClosed
this.msg.detailList.push(JSON.parse(JSON.stringify(msgObj)))
}
if(this.orderObj.CostType2||this.orderObj.CostType3){
msgObj.CostTypeName = '转账手续费'
if(this.orderObj.CostType2){
msgObj.CostTypeId = this.orderObj.CostType2
msgObj.UnitPrice = this.orderObj.HandlingChargeMoney
......@@ -2115,12 +2119,14 @@
this.msg.detailList.push(JSON.parse(JSON.stringify(msgObj)))
}
if(this.orderObj.CostType3){
msgObj.CostTypeName = '转账手续费'
msgObj.CostTypeId = this.orderObj.CostType3
msgObj.UnitPrice = this.orderObj.balanceMoney
msgObj.UnitPriceTo = this.orderObj.balanceMoney
this.msg.detailList.push(JSON.parse(JSON.stringify(msgObj)))
}
}
}else{
this.detailList.CostTypeId = this.orderObj.CostType ? this.orderObj.CostType : '';
this.detailList.UnitPrice = this.orderObj.Money ? this.orderObj.Money : 0;
......
......@@ -640,8 +640,10 @@
</el-table-column>
<el-table-column label="利润" style="background:#EAEAEA">
<template slot-scope="scope">
<span :class="{'cF1416C':scope.row.dueInMoney>0}">
<span class="fz15 fbold">{{moneyFormat((scope.row.income*100)-(scope.row.costMoney*100)-(scope.row.refundMoney*100)/100)}}</span>
<span :class="{'cF1416C':(scope.row.income*100-scope.row.costMoney*100-scope.row.refundMoney*100)/100>0}">
<span class="fz15 fbold">
{{moneyFormat((scope.row.income*100-scope.row.costMoney*100-scope.row.refundMoney*100)/100)}}
</span>
</span>
</template>
</el-table-column>
......
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