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