Commit b243e057 authored by youjie's avatar youjie

no message

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