Commit 1f98644e authored by Mac's avatar Mac
parents 55a17965 250a1a63
......@@ -290,7 +290,8 @@
<td v-if="OrderSource==9&&GetDetail.SourceID>0" @click="jumpPage('SettlementOrder',GetDetail.SourceID,2)"> <span class="_jump_page _font_bold">国内票务</span> </td>
<td v-else-if="OrderSource==10&&GetDetail.SourceID>0" @click="jumpPage('FinancialOrder',GetDetail.SourceID,3)"> <span class="_jump_page _font_bold">签证收支</span> </td>
<td v-else-if="OrderSource==4&&GetDetail.SourceID>0"@click="jumpPage('FinancialOrder',GetDetail,4)"> <span class="_jump_page _font_bold">机票收支</span> </td>
<td v-if="GetDetail.TemplateId === 43 || GetDetail.TemplateId === 48 || GetDetail.TemplateId === 53|| GetDetail.TemplateId === 56" @click="jumpPlanPage('leaderReimbursement',o.TCID)"> <span class="_jump_page _font_bold">用款计划</span> </td>
<td v-if="GetDetail.TemplateId === 43 || GetDetail.TemplateId === 48 || GetDetail.TemplateId === 53|| GetDetail.TemplateId === 56|| GetDetail.IsShowPlanUrl === 1" @click="jumpPlanPage('leaderReimbursement',o.TCID)"> <span class="_jump_page _font_bold">用款计划</span> </td>
<td v-if="GetDetail.IsShowPlanUrl === 1" @click="jumpPlanPage('leaderPay2',o.TCID)"> <span class="_jump_page _font_bold">领队报账</span> </td>
</tr>
</table>
<table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;margin-top:15px;" width="100%" v-else-if="OrderSource==10">
......@@ -579,7 +580,7 @@
<!-- <th width="100px">账户余额</th> -->
<th>金额</th>
<th width="70">币种</th>
<th width="50px">汇率</th>
<th width="150px">汇率</th>
<!-- <th>手续费</th> -->
<th width="100px">总金额</th>
<!-- <th>操作</th> -->
......@@ -634,7 +635,7 @@
<td>
<el-input v-model="i.Rate" @change="Calculation(1,index)" @blur="addList(2,index)" type="number" class=" _border_b_1"></el-input>
</td>
<td>{{Math.round(i.allMoney * 100) / 100}}</td>
<td>{{(Math.round(i.allMoney * 100)) / 100}}</td>
</tr>
</template>
<tr @keyup.enter="addList()" v-if="choiceMsg.Status=='1'">
......@@ -1309,10 +1310,15 @@ export default {
}
let allMoney = 0
this.payMsgList.forEach(x=>{
allMoney+= parseFloat(x.allMoney);
x.allMoney=Math.round(x.allMoney * 100) / 100;
allMoney+= x.allMoney;
// x.allMoney=(Math.round(x.allMoney * 100)) / 100;
})
let num=allMoney.toString().split(".")[1].length;
if(num==3){
allMoney=`${allMoney}1`;
}
this.allMoney = Math.round(allMoney * 100) / 100;
console.log(" this.allMoney", this.allMoney)
},
Financial_post_GetFinancLogList(){ // 获取单据日志
if(this.checkboxShow) return
......@@ -1508,9 +1514,13 @@ export default {
Rate = this.payMsgList[index].Rate==0?1:this.payMsgList[index].Rate,
Money = this.payMsgList[index].OriginalMoney;
Rate=Rate*100;
this.payMsgList[index].allMoney = Math.round(((Money*Rate)+fee) * 100) / 100 / 100;
// console.log('this.payMsgList[index].allMoney', this.payMsgList[index].allMoney)
let newmoney=Money*Rate+fee;
let num=newmoney.toString().split(".")[1].length;
if(num==1){
newmoney=`${newmoney}1`;
}
this.payMsgList[index].allMoney = Math.round( newmoney* 100) / 100 / 100;
} else {
this.payMsg.Fee = isNaN(parseFloat(this.payMsg.Fee))?0:parseFloat(this.payMsg.Fee);
this.payMsg.Rate = isNaN(parseFloat(this.payMsg.Rate))?0:parseFloat(this.payMsg.Rate);
......@@ -1518,8 +1528,16 @@ export default {
let fee = this.payMsg.Fee,
Rate = this.payMsg.Rate==0?1:this.payMsg.Rate,
Money = this.payMsg.OriginalMoney;
Rate=Rate*100;
this.payMsg.allMoney = Math.round(((Money*Rate)+fee) * 100) / 100 / 100;
Rate=Rate*100;
let newmoney=Money*Rate+fee;
if(newmoney.toString().split(".")[1]){
let num=newmoney.toString().split(".")[1].length;
if(num==1){
newmoney=`${newmoney}1`;
}
}
this.payMsg.allMoney = Math.round( newmoney* 100) / 100 / 100;
}
},
......
......@@ -377,7 +377,8 @@
<td v-if="OrderSource==9&&GetDetail.SourceID>0" @click="jumpPage('FinancialOrder',GetDetail,2)"> <span class="_jump_page _font_bold">国内票务</span> </td>
<td v-else-if="OrderSource==10&&GetDetail.SourceID>0" @click="jumpPage('FinancialOrder',GetDetail,3)"> <span class="_jump_page _font_bold">签证收支</span> </td>
<td v-else-if="OrderSource==4&&GetDetail.SourceID>0"@click="jumpPage('FinancialOrder',GetDetail,4)"> <span class="_jump_page _font_bold">机票收支</span> </td>
<td v-if="GetDetail.TemplateId === 43 || GetDetail.TemplateId === 48 || GetDetail.TemplateId === 53|| GetDetail.TemplateId === 56" @click="jumpPlanPage('leaderReimbursement',o.TCID)"> <span class="_jump_page _font_bold">用款计划</span> </td>
<td v-if="GetDetail.TemplateId === 43 || GetDetail.TemplateId === 48 || GetDetail.TemplateId === 53|| GetDetail.TemplateId === 56|| GetDetail.IsShowPlanUrl === 1" @click="jumpPlanPage('leaderReimbursement',o.TCID)"> <span class="_jump_page _font_bold">用款计划</span> </td>
<td v-if="GetDetail.IsShowPlanUrl === 1" @click="jumpPlanPage('leaderPay2',o.TCID)"> <span class="_jump_page _font_bold">领队报账</span> </td>
</tr>
</table>
<table border="1" bordercolor="#D2D2D2" style="border-collapse:collapse;margin-top:15px;" width="100%" v-else-if="OrderSource==10">
......
......@@ -302,7 +302,7 @@
</el-form-item>
</td>
<td height="26px">
<el-select filterable v-model='da.HangingAccountsType' :placeholder="$t('rule.qxzfyshuoming')" class=" _border_b_1">
<el-select filterable v-model='da.HangingAccountsType' @change="$forceUpdate()" :placeholder="$t('rule.qxzfyshuoming')" class=" _border_b_1">
<el-option :label='$t("fnc.w_shou")' :value='1' key='1'></el-option>
<el-option :label='$t("fnc.w_zhi")' :value='2' key='2'></el-option>
</el-select>
......@@ -681,7 +681,8 @@ export default {
leaderType:1,
resultCode:null,
loading2: false,
EmployeeId:0
EmployeeId:0,
isFist: true,
}
},methods:{
changeTCNum(t, i){
......@@ -1107,7 +1108,7 @@ export default {
if(i){
msg.ID=i;
}else{
this.msg.ClientID='';
this.msg.ClientID = this.isFist ? this.msg.ClientID : '';
this.msg.AccountNumber='';
this.msg.RemitterName='';
this.msg.IsLeader=1;
......@@ -1116,6 +1117,7 @@ export default {
if(res.data.resultCode == 1) {
let data = res.data.data;
let ClientAccountList = [];
this.isFist = false
if(i){
data.forEach(x=>{
let obj = {
......@@ -1211,7 +1213,6 @@ export default {
data.IsLeader = 1;
this.msg = JSON.parse(JSON.stringify(data));
this.msg.ClientType = this.msg.ClientType==0?'':this.msg.ClientType;
this.msg.ClientID = this.msg.ClientID==0?'':this.msg.ClientID;
this.msg.RB_Branch_Id = this.msg.RB_Branch_Id==0?this.getLocalStorage().RB_Branch_id:this.msg.RB_Branch_Id;
if (this.orderObj && this.orderObj.companyIDList && this.orderObj.companyIDList.length>0) {
this.msg.RB_Branch_Id = this.orderObj.companyIDList[0];
......@@ -1243,7 +1244,7 @@ export default {
x.currenName = y.Name;
}
})
allPrice = allPrice+parseFloat(x.bTotalPrice);
allPrice = x.HangingAccountsType === 1 ? allPrice + parseFloat(x.bTotalPrice) : allPrice - parseFloat(x.bTotalPrice);
});
this.allPrice = allPrice;
this.allPriceTo =this.$commonUtils.addCommas(Math.round(this.allPrice * 100) / 100)
......
......@@ -282,7 +282,7 @@
<el-tooltip class="item" effect="dark" content="新增" placement="top-start">
<el-button @click='AddHotel(item,subIndex)' icon="iconfont icon-tianjia" type="primary"></el-button>
</el-tooltip>
<el-tooltip v-if="item.HotelOrderList.length>1" class="item" effect="dark" content="删除"
<el-tooltip v-if="item.HotelOrderList.length>1||index==0" class="item" effect="dark" content="删除"
placement="top-start">
<el-button type="primary" icon="iconfont icon-shanchu" @click='DeleteHotel(item,subIndex)'>
</el-button>
......
......@@ -70,6 +70,7 @@
<th>客户信息</th>
<th>客户数量</th>
<th>订单状态</th>
<th>创建日期</th>
<th>退款状态</th>
</tr>
<tr>
......@@ -101,6 +102,7 @@
<span v-if="item.status==2">取消</span>
<span v-if="item.status==3">待付款</span>
</td>
<td>{{item.createDate}}</td>
<td>
<p v-if="item.RefundStatus!=1">
<span v-if="item.RefundStatus==2">退款中</span>
......
<style>
.OrderMgoodImg{
max-height: 40px;
}
</style>
<template>
<div class="flexOne">
<div class="query-box">
<ul class="user_time_picker">
<li>
<span>
<em>商品名称</em>
<el-input v-model="msg.goodsName" @keyup.enter.native="getList"></el-input>
</span>
</li>
<li>
<span>
<em>订单编号</em>
<el-input v-model="msg.orderNum" @keyup.enter.native="getList"></el-input>
</span>
</li>
<li>
<span>
<em>订单状态</em>
<el-select filterable v-model="msg.orderStatus">
<el-option label="不限" value=""></el-option>
<el-option label="待处理" :value="1"></el-option>
<el-option label="待配送" :value="2"></el-option>
<el-option label="配送中" :value="3"></el-option>
<el-option label="配送完成" :value="4"></el-option>
</el-select>
</span>
</li>
<li>
<input type="button" @click="getList" class="hollowFixedBtn" value="查询">
</li>
</ul>
</div>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr>
<th>商品信息编号</th>
<th>商品名称</th>
<th>购买数量</th>
<th>订单生成时间</th>
<th>商品图片</th>
<th>商品单价</th>
<th>订单编号</th>
<th>订单状态</th>
<th>订单总价</th>
<th>配送备注</th>
<th>操作</th>
</tr>
<tr v-for="item in dataList">
<td>{{item.goodsInfoId}}</td>
<td>{{item.goodsName}}</td>
<td>{{item.buyNum}}</td>
<td>
{{getDate(item.crateTime)}}
</td>
<td>
<img class="OrderMgoodImg" :src="item.goodsImg" alt=""/>
</td>
<td>{{item.goodsPrice}}</td>
<td>{{item.orderNum}}</td>
<td>
<span v-if="item.orderStatus==1">待处理</span>
<span v-if="item.orderStatus==2">待配送</span>
<span v-if="item.orderStatus==3">配送中</span>
<span v-if="item.orderStatus==4">配送完成</span>
</td>
<td>{{item.orderTotalPrice}}</td>
<td>{{item.sendRemark}}</td>
<td>
<input v-if="item.orderStatus==1" @click="setOrderStatus(item.id)" type="button" class="normalBtn" value="领取"/>
</td>
</tr>
</table>
<el-pagination background @current-change="handleCurrentChange" layout="total,prev, pager, next, jumper" :page-size=msg.pageSize :total=total>
</el-pagination>
<div class="noDataNotice" v-if="dataList.length<1">
<i class="iconfont icon-kong"></i>
<p>{{$t("active.ld_noData")}}</p>
</div>
</div>
</template>
<script>
import moment from 'moment'
export default {
data() {
return {
//请求
msg: {
orderStatus:'',
orderNum:'',
goodsName:'',
pageSize: 15,
pageIndex: 1,
},
loading:false,
dataList:[],
total:0,
};
},
mounted() {
this.getList();
},
filters: {
},
methods: {
handleCurrentChange(val){
this.msg.pageIndex=val;
this.getList();
},
//获取数据
getList() {
this.loading = true;
this.apiJavaPost("/api/IntegralManager/getOrderPageList", this.msg, res => {
this.loading = false;
if (res.data.resultCode === 1) {
this.dataList = res.data.data.pageData;
this.total= res.data.data.count;
} else {
this.Error(res.data.message)
}
}, null);
},
getDate(date){
return moment(date).format("YYYY-MM-DD HH:mm:ss");
},
setOrderStatus(id){
var msg = {
id:id
}
this.apiJavaPost("/api/IntegralManager/doDispose", msg, res => {
if (res.data.resultCode === 1) {
this.Success(res.data.message);
this.getList();
} else {
this.Error(res.data.message)
}
}, null);
}
}
};
</script>
\ No newline at end of file
......@@ -135,18 +135,21 @@
color: #fff;
border: 1px solid #d1d1d1;
}
.disClick:hover {
background-color: #d1d1d1 !important;
cursor: default !important;
box-shadow: none !important;
}
.busInfo .comBTM{
margin-bottom:10px;
.busInfo .comBTM {
margin-bottom: 10px;
}
.busInfo .comBTM:last-child{
.busInfo .comBTM:last-child {
margin-bottom: 0;
}
.park_List {
width: 50px;
height: 34px;
......@@ -205,14 +208,15 @@
<div style="width: 100%; overflow-x: auto;margin-top:20px;" class="ownScrollbarStyle">
<el-form :rules="rules">
<el-table :data="PlanTableData" style="width:100%" border v-loading='loading'>
<el-table-column fixed label="日期" prop="UseTimeStr" min-width="120"></el-table-column>
<el-table-column fixed label="日期" prop="UseTimeStr" min-width="110"></el-table-column>
<el-table-column fixed label="酒店名称" prop="HotelName" min-width="200"></el-table-column>
<el-table-column fixed label="用车计划" min-width="350">
<el-table-column fixed label="用车计划" min-width="185">
<template slot-scope="scope">
<!-- {{scope.$index+1}} -->
<div v-for="(subItem,subIndex) in scope.row.BusPlanOrderList" class="comBTM">
<em>
<!--接机送机-->
<el-select class="w150" placeholder="请选择" v-model="subItem.AirportPickUp" :disabled="forbidInput"
<el-select class="w120" placeholder="请选择" v-model="subItem.AirportPickUp" :disabled="forbidInput"
@change="getBusPrice(subItem)">
<el-option :key="0" :value="0" label="请选择"></el-option>
<el-option v-for="childitem in BusAirportPickUpList" :key="childitem.Id" :label="childitem.Name"
......@@ -220,20 +224,12 @@
</el-option>
</el-select>
</em>
<!--用车类型-->
<!-- <span v-for="childItem in UseTypeArray" class="BusinfoSpan">
<span v-if="childItem.Id==1" class="subName"
:class="{'spanCked':subItem.UseType==childItem.Id,'disSpan':forbidInput==true}"
@click="UseTypeClick(childItem.Id,scope.$index,subIndex);getBusPrice(scope.row)">{{childItem.Name}}</span>
</span> -->
<span style="width:30px;display:inline-block;">
<a v-if="subIndex>0" @click="DeleteSubItem(scope.row,subIndex),getBusPrice(subItem)"
<span style="display:inline-block;margin-left:5px;" v-if="subIndex>0">
<a @click="DeleteSubItem(scope.row,subIndex),getBusPrice(subItem)"
style="color:blue;cursor:pointer">删除</a>
</span>
<span style="display:inline-block;width:30px;margin-left:5px;">
<span class="busAddbtn" @click="AddSubItem(scope.row)" v-if="subIndex==0">
<i class="iconfont icon-img_haha"></i>
</span>
<span style="display:inline-block;margin-left:5px;" v-if="subIndex==0">
<a @click="AddSubItem(scope.row)" style="color:blue;cursor:pointer">添加</a>
</span>
</div>
</template>
......@@ -267,7 +263,6 @@
</el-option>
</el-select>
</div>
</template>
</el-table-column>
<el-table-column label="车辆类型" min-width="150">
......@@ -293,7 +288,7 @@
<el-option label='预付' :value='3'></el-option>
<el-option label='合团公司支付' :value='6'></el-option>
<el-option label='自由活动-无用车' :value='7'></el-option>
<el-option label="酒店接送~免車資" :value='8'></el-option>
<el-option label="酒店接送" :value='8'></el-option>
</el-select>
</div>
</template>
......@@ -306,17 +301,20 @@
</div>
</template>
</el-table-column>
<el-table-column label="定团号" min-width="230">
<el-table-column label="订团号" min-width="215">
<template slot-scope="scope">
<!-- <div :class="{'BusTyleFirst':scope.$index==0}">
<el-input class='w170' type="text" v-model="scope.row.BookGroup"></el-input>
<el-tooltip class="item" effect="dark" content="同上" placement="top">
<i class="iconfont icon-tongshang" style="cursor:pointer;" v-if="scope.$index!=0"
@click="getBeforeInfo(scope.$index),getBusPrice(scope.row)"></i>
</el-tooltip>
</div> -->
<div v-for="subItem in scope.row.BusPlanOrderList" class="comBTM">
<el-input class='w170' type="text" v-model="subItem.BookGroup"></el-input>
<div class="comBTM" v-for="(subItem,subIndex) in scope.row.BusPlanOrderList">
<template v-if="scope.$index==0&&subIndex==0">
<i class="iconfont icon-tongshang" style="opacity:0;filter:alpha(opacity=0); "></i>
<el-input class='w150' type="text" v-model="subItem.BookGroup"></el-input>
</template>
<template v-else>
<el-tooltip class="item" effect="dark" content="同上" placement="top">
<i class="iconfont icon-tongshang" style="cursor:pointer;"
@click="getBeforeInfo(scope.$index,subIndex),getBusPrice(subItem)"></i>
</el-tooltip>
<el-input class='w150' type="text" v-model="subItem.BookGroup"></el-input>
</template>
</div>
</template>
</el-table-column>
......@@ -342,27 +340,27 @@
</div>
</template>
</el-table-column>
<el-table-column label="高速费用" min-width="150">
<el-table-column label="高速费用" min-width="140">
<template slot-scope="scope">
<div v-for="subItem in scope.row.BusPlanOrderList" class="comBTM">
<el-input v-model="subItem.HighSpeedPrice" @keyup.native="checkPrice(subItem,'HighSpeedPrice')"
placeholder="请输入费用"></el-input>
placeholder="请输入费用" :disabled="isShowBtn==1?true:false" class='w135'></el-input>
</div>
</template>
</el-table-column>
<el-table-column label="高速费用付款方式" min-width="150">
<el-table-column label="高速费用付款方式" min-width="140">
<template slot-scope="scope">
<div>
<div v-for="(subItem,index) in scope.row.BusPlanOrderList" class="comBTM">
<el-select class='sel' v-model='subItem.HighSpeedPayType' :placeholder="$t('pub.pleaseSel')"
@change="PayTypeChange(subItem)">
<el-select class='sel w135' v-model='subItem.HighSpeedPayType' :placeholder="$t('pub.pleaseSel')"
@change="PayTypeChange(subItem)" :disabled="isShowBtn==1?true:false">
<el-option label='请选择' :value='0'></el-option>
<el-option label='现付' :value='1'></el-option>
<el-option label='公司结算' :value='2'></el-option>
<el-option label='预付' :value='3'></el-option>
<el-option label='合团公司支付' :value='6'></el-option>
<el-option label='自由活动-无用车' :value='7'></el-option>
<el-option label="酒店接送~免車資" :value='8'></el-option>
<el-option label="酒店接送" :value='8'></el-option>
</el-select>
</div>
</div>
......@@ -371,15 +369,16 @@
<el-table-column label="使用人数" min-width="100">
<template slot-scope="scope">
<div v-for="subItem in scope.row.BusPlanOrderList" class="comBTM">
<el-input v-model="subItem.UseNum" @keyup.native="checkPrice(subItem,'UseNum')"></el-input>
<el-input v-model="subItem.UseNum" @keyup.native="checkPrice(subItem,'UseNum')"
:disabled="isShowBtn==1?true:false"></el-input>
</div>
</template>
</el-table-column>
<el-table-column label="成本价" min-width="150">
<el-table-column label="成本价" min-width="140">
<template slot-scope="scope">
<div v-for="subItem in scope.row.BusPlanOrderList" class="comBTM">
<el-input v-model="subItem.CostPrice" @keyup.native="checkPrice(subItem,'CostPrice')"
placeholder="请输入成本价"></el-input>
placeholder="请输入成本价" :disabled="isShowBtn==1?true:false" class="w135"></el-input>
</div>
</template>
</el-table-column>
......@@ -405,7 +404,7 @@
</template>
</el-table-column>
</el-table>
<div class="upBtnList" v-if="isShowBtn==0">
<div class="upBtnList">
<input type="button" class="normalBtn" :class="{'disClick':!isSubmit}" @click="SaveList(0)"
:disabled="disButton" value="保存草稿" />
<input type="button" class="normalBtn" :class="{'disClick':!isSubmit}" @click="SaveList(1)"
......@@ -433,27 +432,6 @@
DayNum: 0,
TotalNumber: 0
},
/*表单json*/
// PostData: {
// Id: 0,
// BusCode: "",
// DriverName: "",
// DriverTel: "",
// BusType: 0,
// CarrierNum: "",
// BusNum: "",
// StartDate: "",
// UseDays: "",
// SupplierId: "",
// CostPrice: "",
// SalesPrice: "",
// Country: 0,
// Province: 0,
// City: 0,
// District: 0,
// PlanList: [],
// TCID: 0
// },
PostData: [],
//公用信息
CommonList: [],
......@@ -560,7 +538,7 @@
GuideName: '',
loading: false,
isSubmit: true,
isShowBtn:0
isShowBtn: 1, //1禁用高速费,成本费,高速付款方式文本框
};
},
methods: {
......@@ -576,44 +554,46 @@
getBusPrice(obj) {
let tempCostFee = 0;
var tempHighSpeedFee = 0;
if (obj.BusType) {
obj.PayType = 2;
obj.HighSpeedPayType = 1;
let busTypeObj = this.BusTypeList.find(item => item.Id === obj.BusType);
if (busTypeObj) {
//接送价格
if (obj.AirportPickUp == 1 || obj.AirportPickUp == 2) {
tempCostFee += parseFloat(busTypeObj.ReceivePrice);
//接送高速
tempHighSpeedFee += parseFloat(busTypeObj.PickUpHighSpeedFee);
}
//全天价格
if (obj.AirportPickUp == 12) {
tempCostFee += parseFloat(busTypeObj.AllDayPrice);
//全天高速
tempHighSpeedFee += parseFloat(busTypeObj.AllDayHighSpeedFee);
}
if (!obj.HighSpeedPrice) {
obj.HighSpeedPrice = 0;
}
if (!obj.CostPrice) {
obj.CostPrice = 0;
}
if (obj.HighSpeedPrice == 0) {
obj.HighSpeedPrice = tempHighSpeedFee;
}
if (obj.CostPrice == 0) {
obj.CostPrice = tempCostFee;
}
}
if (obj.AirportPickUp == 3 || obj.AirportPickUp == 4) {
obj.PayType = 8;
} else if (obj.AirportPickUp == 13) {
obj.PayType = 7;
} else {
obj.PayType = null;
obj.PayType = 0;
}
//高速付款方式默认现付
obj.HighSpeedPayType = 1;
let busTypeObj = this.BusTypeList.find(item => item.Id === obj.BusType);
if (busTypeObj) {
//接送价格
if (obj.AirportPickUp == 1 || obj.AirportPickUp == 2) {
tempCostFee += parseFloat(busTypeObj.ReceivePrice);
//接送高速
tempHighSpeedFee += parseFloat(busTypeObj.PickUpHighSpeedFee);
}
//全天价格
if (obj.AirportPickUp == 12) {
tempCostFee += parseFloat(busTypeObj.AllDayPrice);
//全天高速
tempHighSpeedFee += parseFloat(busTypeObj.AllDayHighSpeedFee);
}
if (!obj.HighSpeedPrice) {
obj.HighSpeedPrice = 0;
}
if (!obj.CostPrice) {
obj.CostPrice = 0;
}
if (obj.HighSpeedPrice == 0) {
obj.HighSpeedPrice = tempHighSpeedFee;
}
if (obj.CostPrice == 0) {
obj.CostPrice = tempCostFee;
}
}
},
AddSubItem(item) {
let msg = Object.assign({}, item.BusPlanOrderList[0]);
msg.Id=0;
msg.Id = 0;
item.BusPlanOrderList.push(msg);
},
DeleteSubItem(item, index) {
......@@ -676,9 +656,11 @@
if (response.data.resultCode == 1) {
this.PlanTableData = response.data.data.busExtend.BusPlanReportList;
this.PlanTableData.forEach(x => {
if (x.BookGroup == '' || x.BookGroup == null) {
x.BookGroup = this.$route.query.NewCombinationNum;
}
x.BusPlanOrderList.forEach(subItem => {
if (subItem.BookGroup == '' || subItem.BookGroup == null) {
subItem.BookGroup = this.$route.query.NewCombinationNum;
}
})
});
this.PostData = response.data.data.busExtend;
this.CommonList = response.data.data.commonList;
......@@ -708,20 +690,7 @@
}, err => {})
}
},
//用车类型点击事件
UseTypeClick(value, index, subIndex) {
if (this.forbidInput == true) {
return;
}
if (
this.PlanTableData[index].DetailList[subIndex].UseType == "0" ||
this.PlanTableData[index].DetailList[subIndex].UseType != value
) {
this.PlanTableData[index].DetailList[subIndex].UseType = value;
} else if (this.PlanTableData[index].DetailList[subIndex].UseType == value) {
this.PlanTableData[index].DetailList[subIndex].UseType = "0";
}
},
//司机住宿点击事件
AccommodationCLick(value, item) {
if (
......@@ -797,9 +766,21 @@
this.PostData.CostPrice = CoastPrice;
},
//获取同上信息
getBeforeInfo(index) {
let oldPlanData = this.PlanTableData[index - 1];
let newPlanData = this.PlanTableData[index];
getBeforeInfo(index, subIndex) {
let oldPlanData = {};
//判断是否为当天最后一条数据
if (this.PlanTableData[index].BusPlanOrderList.length > 1) {
if (subIndex == 0) {
oldPlanData = this.PlanTableData[index - 1].BusPlanOrderList[this.PlanTableData[index - 1].BusPlanOrderList
.length - 1];
} else {
oldPlanData = this.PlanTableData[index].BusPlanOrderList[subIndex - 1];
}
} else {
oldPlanData = this.PlanTableData[index - 1].BusPlanOrderList[this.PlanTableData[index - 1].BusPlanOrderList
.length - 1];
}
let newPlanData = this.PlanTableData[index].BusPlanOrderList[subIndex];
newPlanData.DriverName = oldPlanData.DriverName;
newPlanData.DriverTel = oldPlanData.DriverTel;
newPlanData.BusNum = oldPlanData.BusNum;
......
<style>
.comCheckHotel{
padding-bottom:20px;
border-bottom:1px solid #d1d1d1;
}
.comCheckHotel>div{
float:left;
width:120px;
border-right:1px solid #d1d1d1;
height:200px;
overflow: auto
}
.comCheckHotel>div:last-child{
width:230px;
border:none;
}
.comCk_list{
cursor: pointer;
padding:0 20px;
margin:0 15px 5px 0;
}
.cm_Inventory{
margin-left:20px;
color:red;
display: inline-block;
}
.cm_hotelTitle{
width:100%;
text-align: center;
margin-bottom:20px;
border-bottom: 1px solid #d1d1d1;
padding:0 20px 10px 20px;
}
.com_SaveBtn{
margin:10px 20px 0 45%;
}
.ckedList{
background-color: #E95252;
color:#fff;
}
</style>
<template>
<div>
<div class="cm_hotelTitle">酒店信息</div>
<div class="clearfix comCheckHotel">
<div>
<div class="comCk_list" v-for="(item,index) in dataList" :class="{'ckedList':ckindexOne==index}" @click="getCityList(item),ckindexOne=index">
{{item.ProvinceName}}
</div>
</div>
<div>
<div class="comCk_list" v-for="(item,index) in cityList" :class="{'ckedList':ckindexTwo==index}" @click="getHotelList(item),ckindexTwo=index">
{{item.CityName}}
</div>
</div>
<div>
<div class="comCk_list" v-for="item in HotelList">
<input type="checkbox" v-model="item.isChecked" @click="getCheck(item)" style=""/>
{{item.Name}}<span class="cm_Inventory">{{item.Inventory}}</span>
</div>
</div>
</div>
<input type="button" class="normalBtn com_SaveBtn" @click="sendCkedHotel()" value="保存"/>
</div>
</template>
<script>
export default {
// props:["sDate"],
data() {
return {
dataList:[],
cityList:[],
HotelList:[],
ckindexOne:-1,
ckindexTwo:-1,
ID:0,
HotelName:''
};
},
methods: {
getCheckHotel(sDate){
this.$forceUpdate();
this.apipost('hotel_post_GetHasStockHotelList_V2', {
//1-只查询有库存的酒店
IsMoreThanZero: 0,
Country: "651",
IsAllHotel: 1,
sDate: sDate
}, res => {
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
this.dataList.forEach(x=>{
x.cityList.forEach(y=>{
y.HotelList.forEach(z=>{
z.isChecked=false;
})
})
})
console.log(this.dataList,'子组件');
} else {
this.Error(res.data.message)
}
}, err => {})
},
getCityList(item){
this.cityList = item.cityList;
this.HotelList = [];
},
getHotelList(item){
this.HotelList = item.HotelList;
},
getCheck(item){
this.HotelList.forEach(x=>{
x.isChecked = false;
})
item.isChecked = !item.isChecked;
this.$forceUpdate();
},
//向父组件传递选中酒店
sendCkedHotel(){
console.log(this.dataList,'重选');
this.dataList.forEach(x=>{
x.cityList.forEach(y=>{
y.HotelList.forEach(z=>{
if(z.isChecked){
this.ID = z.ID;
this.HotelName = z.Name;
}
})
})
})
this.$emit("childHotel", this.ID,this.HotelName);
}
},
mounted(){
}
};
</script>
......@@ -3331,7 +3331,8 @@ export default {
meta: {
title: '商品类型'
}
},
},
{
path: '/IntegralMall',
name: 'IntegralMall',
......@@ -3348,6 +3349,22 @@ export default {
title: '新增商品'
}
},
{
path: '/CommodityActive',
name: 'CommodityActive',
component: resolve => require(['@/components/activity/CommodityActive'], resolve),
meta: {
title: '商品活动'
}
},
{
path: "/OrderManagement",
name: "OrderManagement",
component: resolve => require(['@/components/activity/OrderManagement'], resolve),
meta: {
title: '商城订单管理'
}
}
]
},
{
......
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