Commit 71aa0ee2 authored by 华国豪's avatar 华国豪 🙄
parents 75d562ea 42eccf11
<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>
......@@ -308,16 +303,22 @@
</el-table-column>
<el-table-column label="定团号" min-width="230">
<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>
<template v-for="(subItem,subIndex) in scope.row.BusPlanOrderList">
<template v-if="scope.$index==0&&subIndex==0">
<div class="BusTyleFirst">
<el-input class='w170' type="text" v-model="subItem.BookGroup"></el-input>
</div>
</template>
<template v-else>
<div class="comBTM">
<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='w170' type="text" v-model="subItem.BookGroup"></el-input>
</div>
</template>
</template>
</template>
</el-table-column>
<el-table-column label="司机住宿" min-width="180">
......@@ -346,7 +347,7 @@
<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"></el-input>
</div>
</template>
</el-table-column>
......@@ -355,14 +356,14 @@
<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)">
@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,7 +372,8 @@
<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>
......@@ -379,7 +381,7 @@
<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"></el-input>
</div>
</template>
</el-table-column>
......@@ -405,7 +407,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 +435,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 +541,7 @@
GuideName: '',
loading: false,
isSubmit: true,
isShowBtn:0
isShowBtn: 1, //1禁用高速费,成本费,高速付款方式文本框
};
},
methods: {
......@@ -576,44 +557,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 +659,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 +693,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 +769,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>
......@@ -3357,6 +3357,14 @@ export default {
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