Commit b5d546e0 authored by 华国豪's avatar 华国豪 🙄

酒店新怎币种

parent 308b0856
......@@ -1495,14 +1495,14 @@ export default {
this.msg.FrID = this.$route.query.FrID;
this.Financial_post_Get(this.$route.query.FrID,0);
}else{
let TCID = (this.orderObj && this.orderObj.TCIDList && this.orderObj.TCIDList.length>0) ? this.orderObj.TCIDList[0] : 0
this.financeinfo_post_GetList(TCID);
this.msg.TemplateId = this.$route.query.id;
this.Financial_post_GetCostTypeList(this.$route.query.id);
this.BillName = userInfo.GroupName;
this.BillSonName = this.$route.query.Name;
this.FinancialFlowTemplate_post_GetProcessList(this.$route.query.id);
this.Financial_post_Get(0,parseInt(this.$route.query.id));
let TCID = (this.orderObj && this.orderObj.TCIDList && this.orderObj.TCIDList.length>0) ? this.orderObj.TCIDList[0] : 0
this.financeinfo_post_GetList(TCID);
}
if(this.$route.query.Conditon){
this.returnCode = this.$route.query.Conditon;
......
......@@ -541,27 +541,25 @@
<th>操作</th>
</tr>
<tr v-for='(item, index) in nav'>
<td :rowspan="nav.length" width="180" v-if="index===0">总金额:
<!-- {{moneyFormat(TotalNav.reimburseTotalPrice.PlanPrice)}} -->
<!-- ({{currencyTypeObj.}}) -->
<td>{{item.TCNUMS}}</td>
<td :rowspan="nav.length * CurrencyListMoney.length" width="180" v-if="index===0">总金额:
<span v-for="(cur,index) in CurrencyListMoney" :key="index+5000">{{cur.money}}
<span v-if="cur.CurrencyId>0"> ({{currencyTypeObj[cur.CurrencyId]}}) </span>
</br></span>
</td>
<td>{{item.TCNUMS}}</td>
</br></span>
</td>
<td style="padding: 5px 20px;">
<div style="margin:10px 0" v-for="cur in CurrencyListMoney">
<template v-for="leadr in cur.LeaderGetPriceArr">
<p style="padding-left:20px;display:inline-block" v-if="leadr.LeaderGetPrice>0">已领款:
<span style="color: red;">{{moneyFormat(leadr.LeaderGetPrice)}}<span v-if="cur.CurrencyId>0"> ({{currencyTypeObj[leadr.CurrencyId]}}) </span></span></p>
<el-input class="w300" v-if="leadr.LeaderGetPrice < leadr.PlanPrice"
type="number" v-model="leadr.LeaderGetPriceT"></el-input>
</template>
<p style="padding-left:20px;display:inline-block" >
已领款:
<span style="color: red;">
{{moneyFormat(leadr.LeaderGetPrice)}}
<span v-if="cur.CurrencyId > 0"> ({{currencyTypeObj[leadr.CurrencyId]}}) </span>
</span>
</p>
<el-input class="w300" v-if="leadr.LeaderGetPrice < leadr.PlanPrice" type="number" v-model="leadr.LeaderGetPriceT"></el-input>
</template>
</div>
</td>
<td>
<p v-for="(subItem, subIndex) in item.FinanceIds"><span class="cursorpointer text-decoration"
......@@ -574,9 +572,10 @@
<div style="margin:10px 0" v-for="(cur,index2) in CurrencyListMoney">
<template v-for="leadr in cur.LeaderGetPriceArr">
<input type="button" v-if="item.TeamType == 1 && index2==0" value="日当费" class="normalBtn" @click="goZhiDan(item, 2)" />
<input type="button" v-if="item.hideZDBtn" value="制单" class="normalBtn" @click="goZhiDan(item,0,leadr)" />
</template>
<el-tooltip class="item" effect="dark" :content="currencyTypeObj[leadr.CurrencyId]" placement="top">
<input type="button" v-if="item.hideZDBtn" value="制单" class="normalBtn" @click="goZhiDan(item,0,leadr)" />
</el-tooltip>
</template>
</div>
</td>
</tr>
......
......@@ -118,9 +118,24 @@
</td>
<td v-if="childIndex==0" :rowspan="3">
{{subItem.TotalPrice}}
<template v-if="subItem.NewTotalPrice">
<br /><span style="color:red;">{{subItem.NewTotalPrice}}</span>
</template>
</td>
<td v-if="childIndex==0" :rowspan="3">
<table class="dinnerTable">
<tr>
<td width="70" style="text-align:right;">币种:</td>
<td>
<el-select v-model="subItem.CurrencyId" placeholder="请选择" class='w135 sel'
@change="calculationPrice(subItem)">
<el-option :label="$t('pub.unlimitedSel')" :value='0'></el-option>
<el-option v-for="(item,index) in allCurrencyList" :key="index" :label="item.Name"
:value="item.ID">
</el-option>
</el-select>
</td>
</tr>
<tr>
<td width="60" style="text-align:right;">
付款方式:
......@@ -197,6 +212,7 @@
CurrentUserInfo: {},
//是否禁用按钮
IsDisabled: false,
allCurrencyList: [],
};
},
methods: {
......@@ -278,10 +294,52 @@
},
calculationPrice(obj) {
let totalPrice = 0;
obj.DiningPriceList.forEach(item => {
totalPrice += item.PeoplePrice * (item.PeopleNum - item.Discount) * (1 - item.DiscountPrice / 100);
//获取当前选中的对象
let currentObj = {};
if (obj.CurrencyId != 0) {
currentObj = this.allCurrencyList.find(item => {
return item.ID === obj.CurrencyId; //筛选出匹配数据
});
}
//日元
let jpaObj = this.allCurrencyList.find(item => {
return item.ID === 3; //筛选出匹配数据
});
obj.DiningPriceList.forEach((item, index) => {
var tempPrice = 0;
var coefficient = 1;
totalPrice += item.PeoplePrice * (item.PeopleNum - item.Discount) * (coefficient - item.DiscountPrice / 100);
totalPrice += tempPrice;
})
obj.TotalPrice = totalPrice.toFixed(2);
if (currentObj && currentObj.ID > 0) {
//人民币
if (currentObj.ID == 1) {
obj.NewTotalPrice = currentObj.Name + ":" + (totalPrice * jpaObj.PayRate).toFixed(2);
}
//日元
else if (currentObj.ID == 3) {
obj.NewTotalPrice = "";
} else {
if(currentObj.CurrentRate>1)
{
obj.NewTotalPrice = currentObj.Name + ":" + ((totalPrice*jpaObj.PayRate)/currentObj.CurrentRate).toFixed(2);
}
else
{
obj.NewTotalPrice = currentObj.Name + ":" + ((totalPrice*jpaObj.PayRate)*currentObj.CurrentRate).toFixed(2);
}
}
} else {
obj.NewTotalPrice = "";
}
this.$forceUpdate();
// let totalPrice = 0;
// obj.DiningPriceList.forEach(item => {
// totalPrice += item.PeoplePrice * (item.PeopleNum - item.Discount) * (1 - item.DiscountPrice / 100);
// })
// obj.TotalPrice = totalPrice.toFixed(2);
},
saveList(type) {
this.IsDisabled = true;
......@@ -356,6 +414,11 @@
this.TCNUM = this.$route.query.TCNUM;
this.GuestNum = this.$route.query.GuestNum;
this.getList();
this.apipost("financeinfo_post_GetList", {}, res => {
if (res.data.resultCode === 1) {
this.allCurrencyList = res.data.data;
}
}, err => {});
}
};
......
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