Commit 03020835 authored by 沈良进's avatar 沈良进
parents 05ddef12 61d8e276
...@@ -469,7 +469,7 @@ Vue.component('table-BranchName',{ //查看操作按钮 ...@@ -469,7 +469,7 @@ Vue.component('table-BranchName',{ //查看操作按钮
} }
}) })
Vue.component('table-operation',{ //查看操作按钮 Vue.component('table-operation',{ //查看操作按钮
template:`<span> template:`<span style="display: flex;flex-direction: wrap;">
<el-tooltip class="item" effect="dark" content="查看" placement="top"> <el-tooltip class="item" effect="dark" content="查看" placement="top">
<i v-if="rowData.Type !== 4" style="width: 30px; <i v-if="rowData.Type !== 4" style="width: 30px;
height: 30px; height: 30px;
......
...@@ -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,22 +33,29 @@ ...@@ -32,22 +33,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,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 v-if="GetDetail.CashierDetail&&GetDetail.CashierDetail.length">
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
</tr> </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>
...@@ -57,7 +65,7 @@ ...@@ -57,7 +65,7 @@
</template> </template>
</td> </td>
</tr> --> </tr> -->
<tr v-if="GetDetail.CashierDetail&&GetDetail.CashierDetail.length&&(GetDetail.Type!=1|| GetDetail.Type!=5)"> <tr v-if="GetDetail.CashierDetail&&GetDetail.CashierDetail.length">
<template v-for="(item,daIn) in GetDetail.CashierDetail"> <template v-for="(item,daIn) in GetDetail.CashierDetail">
<td height="34px" colspan="1" class="_color_b"> <td height="34px" colspan="1" class="_color_b">
<p class=" clearfix"><span class="_bold">{{item.Alias}}-</span><span class="">{{item.TypeName}}-</span><span >{{item.AccountType==""?$t('fnc.no'):item.AccountType}}</span> {{item.BankNo?'-':''}} <span>{{item.BankNo}}</span>{{item.Money}}</p> <p class=" clearfix"><span class="_bold">{{item.Alias}}-</span><span class="">{{item.TypeName}}-</span><span >{{item.AccountType==""?$t('fnc.no'):item.AccountType}}</span> {{item.BankNo?'-':''}} <span>{{item.BankNo}}</span>{{item.Money}}</p>
...@@ -139,9 +147,9 @@ export default { ...@@ -139,9 +147,9 @@ 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){
...@@ -150,8 +158,8 @@ export default { ...@@ -150,8 +158,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{
...@@ -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;
}) })
} }
...@@ -311,7 +327,7 @@ export default { ...@@ -311,7 +327,7 @@ export default {
GetDetail: { GetDetail: {
handler: function(val, oldVal) { handler: function(val, oldVal) {
let isAmount = true let isAmount = true
if(this.benMoney2>0){ if(this.GetDetail.CashierDetail&&this.GetDetail.CashierDetail.length){
if(this.benMoney2===this.benMoney){ if(this.benMoney2===this.benMoney){
isAmount = false isAmount = false
}else{ }else{
......
...@@ -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,21 +30,28 @@ ...@@ -29,21 +30,28 @@
<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 v-if="GetDetail.CashierDetail&&GetDetail.CashierDetail.length">
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
<td height="26px"></td>
</tr> </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>
...@@ -51,7 +59,7 @@ ...@@ -51,7 +59,7 @@
<td colspan="1">{{$t('fnc.shouxufei')}}<br/><span class="_font_size12">{{$t('fnc.khbweibi')}}</span></td> <td colspan="1">{{$t('fnc.shouxufei')}}<br/><span class="_font_size12">{{$t('fnc.khbweibi')}}</span></td>
<td colspan="2" class="_font_size12">{{GetDetail.Fee}}</td> <td colspan="2" class="_font_size12">{{GetDetail.Fee}}</td>
</tr> </tr>
<tr v-if="GetDetail.CashierDetail&&GetDetail.CashierDetail.length&&(GetDetail.Type!=1|| GetDetail.Type!=5)"> <tr v-if="GetDetail.CashierDetail&&GetDetail.CashierDetail.length">
<template v-for="(item,daIn) in GetDetail.CashierDetail"> <template v-for="(item,daIn) in GetDetail.CashierDetail">
<td height="34px" colspan="1" class="_color_b"> <td height="34px" colspan="1" class="_color_b">
<p class=" clearfix"><span class="_bold">{{item.Alias}}-</span><span class="">{{item.TypeName}}-</span><span >{{item.AccountType==""?$t('fnc.no'):item.AccountType}}</span> {{item.BankNo?'-':''}} <span>{{item.BankNo}}</span>{{item.Money}}</p> <p class=" clearfix"><span class="_bold">{{item.Alias}}-</span><span class="">{{item.TypeName}}-</span><span >{{item.AccountType==""?$t('fnc.no'):item.AccountType}}</span> {{item.BankNo?'-':''}} <span>{{item.BankNo}}</span>{{item.Money}}</p>
...@@ -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);
} }
...@@ -206,7 +215,7 @@ export default { ...@@ -206,7 +215,7 @@ export default {
GetDetail: { GetDetail: {
handler: function(val, oldVal) { handler: function(val, oldVal) {
let isAmount = true let isAmount = true
if(this.benMoney2>0){ if(this.GetDetail.CashierDetail&&this.GetDetail.CashierDetail.length){
if(this.benMoney2===(this.benMoney-this.GetDetail.Fee)){ if(this.benMoney2===(this.benMoney-this.GetDetail.Fee)){
isAmount = false isAmount = false
}else{ }else{
......
...@@ -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)
}) })
} }
......
...@@ -362,7 +362,7 @@ ...@@ -362,7 +362,7 @@
</li> </li>
<li> <li>
<button class="hollowFixedBtn" @click="resetPageIndex(),getControlList()">{{$t('pub.searchBtn')}}</button> <button class="hollowFixedBtn" @click="resetPageIndex(),getControlList()">{{$t('pub.searchBtn')}}</button>
<button class="hollowFixedBtn" @click='goToOpenTravel("TravelManager5")'>{{$t('sm.kaituan')}}</button> <!-- <button class="hollowFixedBtn" @click='goToOpenTravel("TravelManager5")'>{{$t('sm.kaituan')}}</button> -->
</li> </li>
</ul> </ul>
</div> </div>
......
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