Commit b243e057 authored by youjie's avatar youjie

no message

parent dd5806c9
......@@ -9,7 +9,8 @@
<table class="Receipt_table" border="1"
:class="[GetDetail.Type==1 || GetDetail.Type==5?'_border_color_r':'_border_color_b',isPrintPage?'_border_color_p':'']"
:bordercolor="GetDetail.Type==1|| GetDetail.Type==5?'#c94052':'#106BAF'"
style="border-collapse:collapse;width: 95%;">
:style="{'width':GetDetail&&GetDetail.DetailList&&GetDetail.DetailList.length>1?'95%':'100%'}"
style="border-collapse:collapse;">
<tr>
<th rowspan="2" width="150">{{$t('fnc.fyshuoming')}}</th>
<th rowspan="2" width="100">{{$t('hotel.hotel_Currency')}}</th>
......@@ -32,23 +33,30 @@
<el-input v-model="item.Rate" type="text"
class="w80 _border_b_1"
style="border-bottom: 1px solid #333;margin-bottom: 5px;"
@change="addList(item,daIn)"></el-input>
@change="addList(item,0)"></el-input>
</td>
<td height="26px" style="position: relative;">
{{item.Money}}
<span v-if="!daIn&&GetDetail.DetailList.length>1"
@click="copyRate(item.Rate)"
@click="copyRate(item.Rate,item.CurrencyName)"
style="position: absolute;right: -45px;top: 10px;color: #33B3FF;cursor: pointer;">同下</span>
</td>
</tr>
</template>
<tr>
<td height="26px"></td>
<td height="26px">合计</td>
<td height="26px"></td>
<td height="26px">{{currentMoney}}</td>
<td height="26px"></td>
<td height="26px">{{benMoney}}</td>
</tr>
<tr>
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
</tr>
<!-- <tr v-if="GetDetail.CashierDetail&&GetDetail.CashierDetail.length&&(GetDetail.Type!=1|| GetDetail.Type!=5)">
<td height="34px" class="">{{$t('tips.jiaoyifangshi')}}</td>
<td height="34px" colspan="4" class="_color_b">
......@@ -139,19 +147,19 @@ export default {
},
methods:{
copyRate(t){
for(let i = 0; i < this.GetDetail.DetailList.length; i++) {
if(this.GetDetail.DetailList[i].Rate!=t){
this.GetDetail.DetailList[i].Rate = t
}
if(i+1==this.GetDetail.DetailList.length){
this.calculation()
copyRate(t,n){
for(let i = 0; i < this.GetDetail.DetailList.length; i++) {
if(this.GetDetail.DetailList[i].Rate!=t&&this.GetDetail.DetailList[i].CurrencyName==n){
this.GetDetail.DetailList[i].Rate = t
}
if(i+1==this.GetDetail.DetailList.length){
this.calculation()
}
}
}
},
addList(t, i) { // 添加
t.Money = (t.Rate*100)* t.Money
t.Money = t.Money/100
t.Money = (t.Rate*10000000)* t.Money
t.Money = t.Money/10000000
if(!i){
this.calculation()
}else{
......@@ -161,26 +169,34 @@ export default {
},
calculation(i){
if(!i){
let Money = 0
let benMoney = 0
this.currentMoney = 0
this.benMoney = 0
this.GetDetail.DetailList.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = (x.Rate*100)*x.OriginalMoney
x.Money = (x.Money/100).toFixed(2)
x.Money = x.Rate*x.OriginalMoney
x.Money = Math.round(x.Money)
// x.Money = Math.round(x.Money * 100) / 100
x.OriginalMoney = Math.round(x.OriginalMoney * 100) / 100
this.currentMoney += parseFloat(x.OriginalMoney);
this.benMoney += parseFloat(x.Money);
Money = parseFloat(x.Money)*100
benMoney += Money
this.benMoney = benMoney/100;
})
}else{
let Money = 0
let benMoney = 0
this.benMoney2 = 0
this.GetDetail.CashierDetail.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = (x.Rate*100)*x.OriginalMoney
x.Money = (x.Money/100).toFixed(2)
x.Money = x.Rate*x.OriginalMoney
x.Money = Math.round(x.Money)
x.OriginalMoney = Math.round(x.OriginalMoney * 100) / 100
this.benMoney2 += parseFloat(x.Money);
Money = parseFloat(x.Money)*100
benMoney += Money
this.benMoney2 = benMoney/100;
})
}
......
......@@ -7,7 +7,8 @@
@click.stop v-loading='loading'>
<table class="Receipt_table" border="1"
:class="[GetDetail.Type==1|| GetDetail.Type==5?'_border_color_r':'_border_color_b',isPrintPage?'_border_color_p':'']" :bordercolor="GetDetail.Type==1|| GetDetail.Type==5?'#c94052':'#106BAF'"
style="border-collapse:collapse;width: 95%;">
:style="{'width': GetDetail&&GetDetail.DetailList&&GetDetail.DetailList.length>1?'95%':'100%'}"
style="border-collapse:collapse;">
<tr>
<th rowspan="2" width="150">{{$t('fnc.fyshuoming')}}</th>
<th rowspan="2" width="100">{{$t('hotel.hotel_Currency')}}</th>
......@@ -29,22 +30,29 @@
<el-input v-model="item.Rate" type="text"
class="w80 _border_b_1"
style="border-bottom: 1px solid #333;margin-bottom: 5px;"
@change="addList(item)"></el-input>
@change="addList(item,0)"></el-input>
</td>
<td height="26px" style="position: relative;">{{item.Money}}
<span v-if="!daIn&&GetDetail.DetailList.length>1"
@click="copyRate(item.Rate)"
@click="copyRate(item.Rate,item.CurrencyName)"
style="position: absolute;right: -45px;top: 10px;color: #33B3FF;cursor: pointer;">同下</span>
</td>
</tr>
</template>
<tr>
<td height="26px"></td>
<td height="26px">合计</td>
<td height="26px"></td>
<td height="26px">{{currentMoney}}</td>
<td height="26px"></td>
<td height="26px">{{benMoney}}</td>
</tr>
<tr>
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
</tr>
<tr>
<td colspan="1">{{$t('fnc.shouxufei')}}<br/><span class="_font_size12">{{$t('fnc.khyuanbi')}}</span></td>
<td colspan="1" class="_font_size12" >{{GetDetail.OriginalFee}}</td>
......@@ -106,9 +114,9 @@ export default {
this.printTime = y + '' + m + '' + d + ' ' + h + ':' + min + ':' + s;
},
methods:{
copyRate(t){
copyRate(t,n){
for(let i = 0; i < this.GetDetail.DetailList.length; i++) {
if(this.GetDetail.DetailList[i].Rate!=t){
if(this.GetDetail.DetailList[i].Rate!=t&&this.GetDetail.DetailList[i].CurrencyName==n){
this.GetDetail.DetailList[i].Rate = t
}
if(i+1==this.GetDetail.DetailList.length){
......@@ -117,8 +125,8 @@ export default {
}
},
addList(t, i) { // 添加
t.Money = (t.Rate*100)* t.Money
t.Money = t.Money/100
t.Money = (t.Rate*10000000)* t.Money
t.Money = t.Money/10000000
if(!i){
this.calculation()
}else{
......@@ -128,26 +136,34 @@ export default {
},
calculation(i){
if(!i){
let Money = 0
let benMoney = 0
this.currentMoney = 0
this.benMoney = 0
this.GetDetail.DetailList.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = (x.Rate*100)*x.OriginalMoney
x.Money = (x.Money/100).toFixed(2)
x.Money = x.Rate*x.OriginalMoney
x.Money = Math.round(x.Money)
// x.Money = Math.round(x.Money * 100) / 100
x.OriginalMoney = Math.round(x.OriginalMoney * 100) / 100
this.currentMoney += parseFloat(x.OriginalMoney);
this.benMoney += parseFloat(x.Money);
Money = parseFloat(x.Money)*100
benMoney += Money
this.benMoney = benMoney/100;
})
}else{
let Money = 0
let benMoney = 0
this.benMoney2 = 0
this.GetDetail.CashierDetail.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = (x.Rate*100)*x.OriginalMoney
x.Money = (x.Money/100).toFixed(2)
x.Money = x.Rate*x.OriginalMoney
x.Money = Math.round(x.Money)
x.OriginalMoney = Math.round(x.OriginalMoney * 100) / 100
this.benMoney2 += parseFloat(x.Money);
Money = parseFloat(x.Money)*100
benMoney += Money
this.benMoney2 = benMoney/100;
})
}
......@@ -178,13 +194,6 @@ export default {
data.AuditSteps.reverse();
this.GetDetail = data;
this.benMoney2 = 0
this.GetDetail.CashierDetail.forEach(x=>{
x.UnitPrice = this.$commonUtils.addCommas(Math.round(x.UnitPrice * 100) / 100)
x.Money = (x.Rate*100)*x.OriginalMoney
x.Money = (x.Money/100).toFixed(2)
x.OriginalMoney = Math.round(x.OriginalMoney * 100) / 100
this.benMoney2 += parseFloat(x.Money);
})
this.loading=false
this.$set(this.$data,"GetDetail",data);
}
......
......@@ -87,7 +87,7 @@
if(GetDetail.CashierDetail.length>0){
this.parameters.BankList = []
GetDetail.CashierDetail.forEach(itme=>{
let data = {ID:itme.ID,Rate:itme.Rate,Money:itme.Money,OriginalMoney:itme.Money}
let data = {ID:itme.ID,Rate:itme.Rate,Money:itme.Money,OriginalMoney:itme.OriginalMoney}
this.parameters.BankList.push(data)
})
}
......
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