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
This diff is collapsed.
<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 { ...@@ -3357,6 +3357,14 @@ export default {
title: '商品活动' 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