Commit 9389093a authored by 吴春's avatar 吴春

Merge branch 'B2C' of http://gitlab.oytour.com/zk123/jz_travel into B2C

parents 6b763d38 99547a29
...@@ -127,6 +127,7 @@ ...@@ -127,6 +127,7 @@
<template v-else>暂无司机信息</template> <template v-else>暂无司机信息</template>
</view> </view>
<view v-if="params.type>1&&params.type<5" class="row justify-center items-center"> <view v-if="params.type>1&&params.type<5" class="row justify-center items-center">
<view v-if="params.type==2" class="row justify-center items-center" @click="showOptionVisible(3)"> <view v-if="params.type==2" class="row justify-center items-center" @click="showOptionVisible(3)">
<view class="nameTitle"> <view class="nameTitle">
{{ datas.HotelOrderList[datas.hotelIndex].ReimburseList.ActualUseInfo?datas.HotelOrderList[datas.hotelIndex].ReimburseList.ActualUseInfo:datas.HotelOrderList[datas.hotelIndex].NewHotelName }} {{ datas.HotelOrderList[datas.hotelIndex].ReimburseList.ActualUseInfo?datas.HotelOrderList[datas.hotelIndex].ReimburseList.ActualUseInfo:datas.HotelOrderList[datas.hotelIndex].NewHotelName }}
...@@ -213,9 +214,18 @@ ...@@ -213,9 +214,18 @@
</template> </template>
</view> </view>
<view class="headeDatasCurrency row justify-between" @click="showOptionVisible(2)"> <view class="headeDatasCurrency row justify-between" @click="showOptionVisible(2)">
<view> <view v-if="params.type==1">
实际金额:¥{{ datas&&datas.TotalMoney>=0?datas.TotalMoney.toFixed(2):0.0 }} 实际金额:¥{{ datas&&datas.TotalMoney>=0?datas.TotalMoney.toFixed(2):0.0 }}
</view> </view>
<view v-else-if="params.type==2">
实际金额:¥{{ datas&&datas.HotelOrderList&&datas.HotelOrderList[datas.hotelIndex].TotalMoney>=0?datas.HotelOrderList[datas.hotelIndex].TotalMoney.toFixed(2):0.0 }}
</view>
<view v-else-if="params.type==3">
实际金额:¥{{ datas&&datas.DiningSummaryList&&datas.DiningSummaryList[datas.diningIndex].TotalMoney>=0?datas.DiningSummaryList[datas.diningIndex].TotalMoney.toFixed(2):0.0 }}
</view>
<view v-else="params.type==4">
实际金额:¥{{ datas&&datas.ScenicStatisticsList&&datas.ScenicStatisticsList[datas.scenicIndex].TotalMoney>=0?datas.ScenicStatisticsList[datas.scenicIndex].TotalMoney.toFixed(2):0.0 }}
</view>
<view class="row items-center"> <view class="row items-center">
<text style="color: red;">*</text> <text style="color: red;">*</text>
<text class="ML10">币种:{{ currencyObj.name }}</text> <text class="ML10">币种:{{ currencyObj.name }}</text>
......
...@@ -89,34 +89,38 @@ ...@@ -89,34 +89,38 @@
</headeDatas> </headeDatas>
</view> </view>
<!-- 车信息--> <!-- 车信息-->
<productInfor1 v-if="params.type==1" :data="params" :dataIndex1="params.dataIndex1" @change="getNewData" :optionList="busTypeList"> <productInfor1 v-if="params.type==1" :data="params" :dataIndex1="params.dataIndex1" @change="getNewData"
:optionList="busTypeList">
</productInfor1> </productInfor1>
<!-- 酒店信息--> <!-- 酒店信息-->
<productInfor2 :data="params" v-if="params.type==2" @change="getNewData" :optionList="hotelTypeList"> <productInfor2 v-else-if="params.type==2" :data="params" :dataIndex2="params.dataIndex2"
@change="getNewData" :optionList="hotelTypeList">
</productInfor2> </productInfor2>
<!-- 餐食信息--> <!-- 餐食信息-->
<productInfor3 :data="params" v-else-if="params.type==3" @change="getNewData" :optionList="diningTypeList"> <productInfor3 v-else-if="params.type==3" :data="params" :dataIndex3="params.dataIndex3"
@change="getNewData" :optionList="diningTypeList">
</productInfor3> </productInfor3>
<!-- 门票信息--> <!-- 门票信息-->
<productInfor4 :data="params" v-else-if="params.type==4" @change="getNewData" :optionList="scenicTypeList"> <productInfor4 v-else-if="params.type==4" :data="params" :dataIndex4="params.dataIndex4"
@change="getNewData" :optionList="scenicTypeList">
</productInfor4> </productInfor4>
<!-- 其它信息--> <!-- 其它信息-->
<otherInfor1 :currencyList="currencyList" :data="params" v-else-if="params.type==5" @change="getNewData" <otherInfor1 v-else-if="params.type==5" :currencyList="currencyList" :data="params" @change="getNewData"
:options="otherTypeList"></otherInfor1> :options="otherTypeList"></otherInfor1>
<!-- 小费收入--> <!-- 小费收入-->
<otherInfor2 :currencyList="currencyList" :data="params" v-else-if="params.type==6" @change="getNewData"> <otherInfor2 v-else-if="params.type==6" :currencyList="currencyList" :data="params" @change="getNewData">
</otherInfor2> </otherInfor2>
<!-- 团费小计--> <!-- 团费小计-->
<otherInfor3 :currencyList="currencyList" :data="params" v-else-if="params.type==7" @change="getNewData"> <otherInfor3 v-else-if="params.type==7" :currencyList="currencyList" :data="params" @change="getNewData">
</otherInfor3> </otherInfor3>
<!-- 自费收入--> <!-- 自费收入-->
<otherInfor4 :currencyList="currencyList" :data="params" v-else-if="params.type==8" @change="getNewData"> <otherInfor4 v-else-if="params.type==8" :currencyList="currencyList" :data="params" @change="getNewData">
</otherInfor4> </otherInfor4>
<!-- 自费支出--> <!-- 自费支出-->
<otherInfor5 :currencyList="currencyList" :data="params" v-else-if="params.type==9" @change="getNewData"> <otherInfor5 v-else-if="params.type==9" :currencyList="currencyList" :data="params" @change="getNewData">
</otherInfor5> </otherInfor5>
<!-- 购物报账--> <!-- 购物报账-->
<otherInfor6 :currencyList="currencyList" :data="params" v-else-if="params.type==10" @change="getNewData" <otherInfor6 v-else-if="params.type==10" :currencyList="currencyList" :data="params" @change="getNewData"
:options="shopTypeList"></otherInfor6> :options="shopTypeList"></otherInfor6>
</scroll-view> </scroll-view>
<view v-if="params.IsOperation==0" class="saveBox" @click="saveData"> <view v-if="params.IsOperation==0" class="saveBox" @click="saveData">
...@@ -534,9 +538,11 @@ ...@@ -534,9 +538,11 @@
} }
if (this.loading) return if (this.loading) return
this.loading = true this.loading = true
uni.showLoading() uni.showLoading({
title: '保存中...'
})
this.apipost("dmcstatistics_post_SetNewLeaderApplyList_V2", this.params, (res) => { this.apipost("dmcstatistics_post_SetNewLeaderApplyList_V2", this.params, (res) => {
console.log("dmcstatistics_post_SetNewLeaderApplyList_V2",JSON.parse(JSON.stringify(res.data))); uni.hideLoading()
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.loading = false this.loading = false
uni.showToast({ uni.showToast({
...@@ -544,10 +550,8 @@ ...@@ -544,10 +550,8 @@
icon: 'success', icon: 'success',
duration: 2000 duration: 2000
}); });
uni.hideLoading()
this.init() this.init()
} }
}, (failed) => { }, (failed) => {
this.loading = false this.loading = false
uni.showToast({ uni.showToast({
...@@ -567,31 +571,113 @@ ...@@ -567,31 +571,113 @@
this.scrollLeft = item.left this.scrollLeft = item.left
}, },
init() { init() {
uni.showLoading() uni.showLoading({
title: '数据加载中...'
});
this.apipost("dmcstatistics_post_GetNewLeaderPayMoneyStatics", this.msg, (res) => { this.apipost("dmcstatistics_post_GetNewLeaderPayMoneyStatics", this.msg, (res) => {
console.log("dmcstatistics_post_GetNewLeaderPayMoneyStatics",JSON.parse(JSON.stringify(res.data)));
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.params = res.data; this.params = res.data;
console.log("dmcstatistics_post_GetNewLeaderPayMoneyStatics", JSON.parse(JSON.stringify(
this.params)));
for (let i = 1; i < 5; i++) { for (let i = 1; i < 5; i++) {
this.$set(this.params, `dataIndex${i}`, 0); this.$set(this.params, `dataIndex${i}`, 0);
} }
this.$set(this.params, `type`, this.oldDataIndex); this.$set(this.params, `type`, this.oldDataIndex);
for (let i = 0; i < this.params.ScenicList.length; i++) {
this.$set(this.params.ScenicList[i], `TotalMoney`, 0); if (this.params.BusList && this.params.BusList.length > 0) {
this.$set(this.params.ScenicList[i], `scenicIndex`, 0); for (let i = 0; i < this.params.BusList.length; i++) {
this.$set(this.params.BusList, `TotalMoney`, 0);
}
this.params.BusList.forEach(item => {
var totalMoney = 0;
if (item.ReimburseList && item.ReimburseList.ReimburseDetailsList && item
.ReimburseList.ReimburseDetailsList.length > 0) {
item.ReimburseList.ReimburseDetailsList.forEach(subItem => {
totalMoney += subItem.UserNum * subItem.UnitPrice
})
} }
for (let i = 0; i < this.params.DiningList.length; i++) { item.TotalMoney = totalMoney;
this.$set(this.params.DiningList[i], `TotalMoney`, 0); })
this.$set(this.params.DiningList[i], `diningIndex`, 0);
} }
if (this.params && this.params.HotelOrderListReport && this.params.HotelOrderListReport
.length > 0) {
for (let i = 0; i < this.params.HotelOrderListReport.length; i++) { for (let i = 0; i < this.params.HotelOrderListReport.length; i++) {
this.$set(this.params.HotelOrderListReport[i], `TotalMoney`, 0); this.$set(this.params.HotelOrderListReport[i], `TotalMoney`, 0);
this.$set(this.params.HotelOrderListReport[i], `hotelIndex`, 0); this.$set(this.params.HotelOrderListReport[i], `hotelIndex`, 0);
} }
this.params.HotelOrderListReport.forEach(item => {
if (item.HotelOrderList && item.HotelOrderList.length > 0) {
item.HotelOrderList.forEach(subItem => {
var totalMoney = 0;
if (subItem.ReimburseList.ReimburseDetailsList && subItem
.ReimburseList.ReimburseDetailsList.length > 0) {
subItem.ReimburseList.ReimburseDetailsList.forEach(
childItem => {
totalMoney += childItem.UserNum * childItem
.UnitPrice
})
}
subItem.TotalMoney = totalMoney;
});
}
});
console.log("this.params.HotelOrderListReport",this.params.HotelOrderListReport)
}
if (this.params && this.params.DiningList && this.params.DiningList.length > 0) {
for (let i = 0; i < this.params.DiningList.length; i++) {
this.$set(this.params.DiningList[i], `TotalMoney`, 0);
this.$set(this.params.DiningList[i], `diningIndex`, 0);
}
this.params.DiningList.forEach(item => {
if (item.DiningSummaryList && item.DiningSummaryList.length > 0) {
item.DiningSummaryList.forEach(subItem => {
var totalMoney = 0;
if (subItem.ReimburseList && subItem.ReimburseList
.ReimburseDetailsList && subItem.ReimburseList
.ReimburseDetailsList.length > 0) {
subItem.ReimburseList.ReimburseDetailsList.forEach(
childItem => {
totalMoney += childItem.UserNum * childItem
.UnitPrice
})
}
subItem.TotalMoney = totalMoney;
})
}
})
}
if (this.params && this.params.ScenicList && this.params.ScenicList.length > 0) {
for (let i = 0; i < this.params.ScenicList.length; i++) {
this.$set(this.params.ScenicList[i], `TotalMoney`, 0);
this.$set(this.params.ScenicList[i], `scenicIndex`, 0);
}
this.params.ScenicList.forEach(item => {
if (item.ScenicStatisticsList && item.ScenicStatisticsList.length > 0) {
item.ScenicStatisticsList.forEach(subItem => {
var totalMoney = 0;
if (subItem.ReimburseList && subItem.ReimburseList
.ReimburseDetailsList && subItem.ReimburseList
.ReimburseDetailsList.length > 0) {
subItem.ReimburseList.ReimburseDetailsList.forEach(
childItem => {
totalMoney += childItem.UserNum * childItem
.UnitPrice
})
}
subItem.TotalMoney = totalMoney;
})
}
});
}
if (res.data.CountryIds) { if (res.data.CountryIds) {
this.getShoppingType(res.data.CountryIds) this.getShoppingType(res.data.CountryIds)
} }
for (let i = 0; i < this.params.OtherOrderInfo.OtherList.length; i++) { for (let i = 0; i < this.params.OtherOrderInfo.OtherList.length; i++) {
let obj = this.params.OtherOrderInfo.OtherList[i] let obj = this.params.OtherOrderInfo.OtherList[i]
if (obj.UseDate == null && obj.UnitPrice == 0 && obj.Rebate == 0 && obj.VoucherPic != if (obj.UseDate == null && obj.UnitPrice == 0 && obj.Rebate == 0 && obj.VoucherPic !=
......
...@@ -239,13 +239,11 @@ function goZanYangUrl() { ...@@ -239,13 +239,11 @@ function goZanYangUrl() {
//验证只能输入2位小数【负数:isMinus传true】 //验证只能输入2位小数【负数:isMinus传true】
function checkPrice(value, isMinus) { function checkPrice(value, isMinus) {
console.log("checkPrice1", value);
var newValue = ''; var newValue = '';
if (value) { if (value) {
newValue = value + ''; newValue = value + '';
} }
var t = newValue.length > 0 ? newValue[0] : ''; var t = newValue.length > 0 ? newValue[0] : '';
console.log("checkPrice2", newValue);
newValue = newValue.replace(/[^\d.]/g, ''); //清除“数字”和“.”以外的字符 newValue = newValue.replace(/[^\d.]/g, ''); //清除“数字”和“.”以外的字符
newValue = newValue.replace(/\.{2,}/g, '.'); //只保留第一个. 清除多余的 newValue = newValue.replace(/\.{2,}/g, '.'); //只保留第一个. 清除多余的
newValue = newValue newValue = newValue
...@@ -263,12 +261,10 @@ function checkPrice(value, isMinus) { ...@@ -263,12 +261,10 @@ function checkPrice(value, isMinus) {
//验证只能输入整数【负数:isMinus传true】 //验证只能输入整数【负数:isMinus传true】
function checkInteger(value, isMinus) { function checkInteger(value, isMinus) {
console.log("checkInteger1", value)
var newValue = ''; var newValue = '';
if (value) { if (value) {
newValue = value + ''; newValue = value + '';
} }
console.log("checkInteger2", newValue)
var t = newValue.length > 0 ? newValue[0] : ''; var t = newValue.length > 0 ? newValue[0] : '';
newValue = newValue.replace(/[^\d]/g, ''); newValue = newValue.replace(/[^\d]/g, '');
//是否允许负数 //是否允许负数
......
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