Commit 4f728bf3 authored by 沈良进's avatar 沈良进

save

parent 4fa75ef3
...@@ -1040,23 +1040,25 @@ ...@@ -1040,23 +1040,25 @@
let jpaObj = this.allCurrencyList.find(item => { let jpaObj = this.allCurrencyList.find(item => {
return item.ID === 3; //筛选出匹配数据 return item.ID === 3; //筛选出匹配数据
}); });
obj.OrderDetailsList.forEach((item, index) => { // obj.OrderDetailsList.forEach((item, index) => {
var tempPrice = 0; // var tempPrice = 0;
var coefficient = 1; // var coefficient = 1;
//税别 // //税别
if (obj.TaxType == 2) { // if (obj.TaxType == 2) {
coefficient = 1 + this.XiaoFeiTaxFee; // coefficient = 1 + this.XiaoFeiTaxFee;
} // }
if (index == 4 && obj.DMCPayType == 9) { // if (index == 4 && obj.DMCPayType == 9) {
tempPrice = 0; // tempPrice = 0;
} else { // } else {
tempPrice = item.UnitPrice * (item.BookNum - item.HotelDiscount) * (coefficient - item.RebateRatio / // tempPrice = item.UnitPrice * (item.BookNum - item.HotelDiscount) * (coefficient - item.RebateRatio /
100); // 100);
} // }
totalPrice += tempPrice; // totalPrice += tempPrice;
}) // })
totalPrice += obj.ParkFee + obj.CityTax + obj.InTangTax; // totalPrice += obj.ParkFee + obj.CityTax + obj.InTangTax;
obj.TotalPrice = totalPrice.toFixed(2); const item = obj.OrderDetailsList.find(item => item.HouseType === 2) || {TotalPrice: 0}
console.log(item, obj.OrderDetailsList)
obj.TotalPrice = item.TotalPrice.toFixed(2);
if (this.LineId == 14) { if (this.LineId == 14) {
if (currentObj && currentObj.ID > 0) { if (currentObj && currentObj.ID > 0) {
//人民币 //人民币
...@@ -1080,7 +1082,7 @@ ...@@ -1080,7 +1082,7 @@
} }
} }
// 将金额总计的值赋值给金额小计 // 将金额总计的值赋值给金额小计
obj.OrderDetailsList[0].TotalPrice = Number(totalPrice).toFixed(2); obj.OrderDetailsList[0].TotalPrice = Number(obj.TotalPrice).toFixed(2);
this.$forceUpdate(); this.$forceUpdate();
}, },
changeTotalPrice(obj) { changeTotalPrice(obj) {
......
...@@ -388,7 +388,7 @@ ...@@ -388,7 +388,7 @@
</div> </div>
</td> </td>
<td :rowspan="2*outItem.PriceCommonList.length" v-if='index==0'> <td :rowspan="2*outItem.PriceCommonList.length" v-if='index==0'>
<span @click="showDialog(0, item.OfferId)" style="cursor: pointer">{{item.OfferId}}</span> <span @click="showDialog(0, item.OfferId)" style="cursor: pointer" v-if="item.OfferId">报价单</span>
</td> </td>
<td :rowspan="2*outItem.PriceCommonList.length" v-if='index==0' style="width: 150px;"> <td :rowspan="2*outItem.PriceCommonList.length" v-if='index==0' style="width: 150px;">
<el-popover width="100" trigger="click" popper-class="DMC_HotelPop"> <el-popover width="100" trigger="click" popper-class="DMC_HotelPop">
......
...@@ -624,11 +624,13 @@ ...@@ -624,11 +624,13 @@
<span style="color:red"> 不含税</span> <span style="color:red"> 不含税</span>
</template> </template>
</td> </td>
<td> <td v-if="subItem.OrderDetailsList.length === 1">
{{moneyFormat(childItem.UnitPrice*(childItem.BookNum-childItem.HotelDiscount))}} {{subItem.OrderDetailsList[0].TotalPrice ? subItem.OrderDetailsList[0].TotalPrice : moneyFormat(childItem.UnitPrice*(childItem.BookNum-childItem.HotelDiscount))}}
</td> </td>
<td v-else>
{{moneyFormat(childItem.UnitPrice*(childItem.BookNum-childItem.HotelDiscount))}}</td>
<td v-if="childIndex==0" :rowspan="subItem.OrderDetailsList.length"> <td v-if="childIndex==0" :rowspan="subItem.OrderDetailsList.length">
{{hotelTotalPrice(subItem.OrderDetailsList)}} {{hotelTotalPrice(subItem.OrderDetailsList, subItem)}}
</td> </td>
<td v-if="subIndex==0 && childIndex == 0" :rowspan="item.row">{{subItem.TradingTotalPrice}}</td> <td v-if="subIndex==0 && childIndex == 0" :rowspan="item.row">{{subItem.TradingTotalPrice}}</td>
<td v-if="childIndex==0" :rowspan="subItem.OrderDetailsList.length"> <td v-if="childIndex==0" :rowspan="subItem.OrderDetailsList.length">
...@@ -2176,7 +2178,7 @@ ...@@ -2176,7 +2178,7 @@
this.apipost('dmcstatistics_post_GetNewLeaderPayStatics_V1', this.msg, res => { this.apipost('dmcstatistics_post_GetNewLeaderPayStatics_V1', this.msg, res => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
console.log('dmcstatistics_post_GetNewLeaderPayStatics_V1', res.data.data)
this.list = res.data.data; this.list = res.data.data;
// 预计金额 // 预计金额
this.planPriceList = this.list.planPriceList; this.planPriceList = this.list.planPriceList;
...@@ -2346,6 +2348,7 @@ ...@@ -2346,6 +2348,7 @@
Hoteldest[i].row = row Hoteldest[i].row = row
} }
this.HotelDataList = this.unique(Hoteldest, 'id'); this.HotelDataList = this.unique(Hoteldest, 'id');
console.log('dmcstatistics_post_GetNewLeaderPayStatics_V1 result', this.list)
} else { } else {
this.$message.error(res.data.message); this.$message.error(res.data.message);
} }
...@@ -2387,7 +2390,8 @@ ...@@ -2387,7 +2390,8 @@
} }
return this.moneyFormat(totalPrice) return this.moneyFormat(totalPrice)
}, },
hotelTotalPrice(obj) { hotelTotalPrice(obj, data) {
console.log('hotelTotalPrice', obj, data)
let totalPrice = 0 let totalPrice = 0
obj.forEach(x => { obj.forEach(x => {
if (x.PayStyle === 1) { if (x.PayStyle === 1) {
...@@ -2396,6 +2400,10 @@ ...@@ -2396,6 +2400,10 @@
totalPrice += 0 totalPrice += 0
} }
}) })
// 新版,直接使用后端返回的价格
if(obj.length === 1 && obj[0].TotalPrice) {
totalPrice = obj[0].TotalPrice
}
return this.moneyFormat(totalPrice) return this.moneyFormat(totalPrice)
}, },
getzongJE() { getzongJE() {
......
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