Commit 78903bcb authored by zhengke's avatar zhengke

修改

parent 75abd0ef
...@@ -2,124 +2,211 @@ ...@@ -2,124 +2,211 @@
<view> <view>
<view class="searchBox flex-between"> <view class="searchBox flex-between">
<view class="flex-center"> <view class="flex-center">
<u-search placeholder="请输入订单号" style="width:600rpx" bg-color="#fff" height="60" :show-action="false" v-model="keyword"></u-search> <u-search v-if="orderType==1" placeholder="请输入订单号" style="width:600rpx" bg-color="#fff" height="60"
:show-action="false" v-model="msg1.OrderNo"></u-search>
<u-search v-if="orderType==2" placeholder="请输入订单号" style="width:600rpx" bg-color="#fff" height="60"
:show-action="false" @change="getList2()" v-model="msg2.ReOrderNo"></u-search>
</view> </view>
<view class="flex-center"> <view class="flex-center">
取消 取消
</view> </view>
</view> </view>
<!-- <view> <view v-if="orderList.length > 0"
<saleAfterOrderItem style="height: calc(100vh - 100rpx);width: calc(100vw);overflow: hidden;box-sizing: border-box;">
:data="item" <scroll-view :scroll-y="true" :enable-back-to-top="true" :enable-flex="true" @scrolltolower="lower"
:orderType="orderType" :style="{ height: '100%' }">
@update="updateList" <view v-for="(item,index) in orderList" :key="index">
v-if="orderType === 2" <saleAfterOrderItem :data="item" :orderType="orderType" @update="updateList"
/> v-if="orderType === 2" />
</view> --> </view>
</scroll-view>
</view>
</view> </view>
</template> </template>
<script> <script>
import tabbar from "./components/tabbar.vue"; import tabbar from "./components/tabbar.vue";
import orderItem from "./components/orderItem.vue"; import orderItem from "./components/orderItem.vue";
import saleAfterOrderItem from "./components/saleAfterOrderItem.vue"; import saleAfterOrderItem from "./components/saleAfterOrderItem.vue";
export default { export default {
components: { components: {
tabbar, tabbar,
orderItem, orderItem,
saleAfterOrderItem, saleAfterOrderItem,
}, },
data() { data() {
return { return {
orderType: 1, //1普通订单,2售后订单 orderType: 1, //1普通订单,2售后订单
loading: false, loading: false,
status: "loadmore", status: "loadmore",
loadText: { loadText: {
loadmore: "轻轻上拉,加载更多", loadmore: "轻轻上拉,加载更多",
loading: "努力加载中", loading: "努力加载中",
nomore: "没有更多了", nomore: "没有更多了",
}, },
page_count: 1, page_count: 1,
msg: { msg1: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
Name: "", Name: "",
OrderSource: 0, OrderSource: 0,
OrderType: 0, OrderType: 0,
DeliveryMethod: 0, DeliveryMethod: 0,
OrderId: 0, OrderId: 0,
StartTime: "", StartTime: "",
EndTime: "", EndTime: "",
OrderStatus: 0, OrderStatus: 0,
OrderNo: "", OrderNo: "",
MerchantsNo: "", MerchantsNo: "",
UserName: "", UserName: "",
UserId: "", UserId: "",
GoodsName: "", GoodsName: "",
Consignee: "", Consignee: "",
Mobile: "", Mobile: "",
ProductCode: "", ProductCode: "",
Recycled: 2, Recycled: 2,
AnchorName: "", AnchorName: "",
IsSelectPayMoney: 0, IsSelectPayMoney: 0,
IsOffline: -1, IsOffline: -1,
} },
}; msg2: {
}, pageIndex: 1,
methods: { pageSize: 15,
lower(e) { OrderSource: 0,
if (this.msg.pageIndex < this.page_count) { OrderType: 0,
this.msg.pageIndex++; DeliveryMethod: 0,
this.status = "loading"; OrderId: 0,
if (this.timer) { StartTime: "",
clearTimeout(this.timer); EndTime: "",
} OrderNo: "",
this.timer = setTimeout(async () => { UserName: "",
await this.getList(); UserId: 0,
clearTimeout(this.timer); GoodsName: "",
}, 500); SelectStatus: 0,
} else { ReOrderNo: "",
this.status = "nomore"; Consignee: "",
} Mobile: "",
}, },
//普通订单数据 readMsg:{
getList() { Id:0,
this.loading = true; Type:1
this.requestAdmin("/api/order/GetGoodsOrderPageList", this.msg, (res) => { },
this.loading = false; orderList: [],
this.page_count = res.data.pageCount; };
console.log(res,'数据'); },
}); methods: {
}, getList1() {
}, uni.showLoading({
onLoad(options) { title: '加载中'
uni.setNavigationBarTitle({ });
title: "订单管理", this.requestAdmin("/api/order/GetGoodsOrderPageList", this.msg1, (res) => {
}); uni.hideLoading();
if(options.OrderNo){ this.page_count = res.data.pageCount;
this.msg.OrderNo = options.OrderNo if (this.page_count == 1) {
} this.status = "nomore";
console.log(options,'options'); }
this.getList(); if (this.msg1.pageIndex === 1) {
}, this.orderList = res.data.pageData;
}; } else {
this.orderList = [...this.orderList, ...res.data.pageData];
}
});
},
//售后订单数据
getList2() {
uni.showLoading({
title: '加载中'
});
this.requestAdmin("/api/order/GetGoodsOrderAfterPageList", this.msg2, (res) => {
uni.hideLoading();
this.page_count = res.data.pageCount;
if (this.msg2.pageIndex === 1) {
this.orderList = res.data.pageData;
} else {
this.orderList = [...this.orderList, ...res.data.pageData];
}
});
},
// 刷新页面
updateList() {
if (this.orderType === 1) {
this.msg1.pageIndex = 1;
this.getList1();
} else if (this.orderType === 2) {
this.msg2.pageIndex = 1;
this.getList2();
}
},
lower(e) {
if (this.orderType === 1) {
if (this.msg1.pageIndex < this.page_count) {
this.msg1.pageIndex++;
this.status = "loading";
this.getList1();
}
} else if (this.orderType === 2) {
if (this.msg2.pageIndex < this.page_count) {
this.msg2.pageIndex++;
this.status = "loading";
this.getList2();
this.status = "nomore";
}
}
},
//订单标记已读
getOrderRead(){
this.requestAdmin("/api/MemberUser/SetAdminMessageLook", this.readMsg, (res) => {
if(res.resultCode==1){
// uni.showToast({
// title: res.message,
// icon: 'none',
// })
}
});
},
},
onLoad(options) {
uni.setNavigationBarTitle({
title: "订单管理",
});
if (options.OrderNo) {
this.msg2.ReOrderNo = options.OrderNo
}
if (options?.orderType) {
if (options.orderType == 3) {
this.orderType = 2;
this.getList2();
} else {
this.orderType = 1;
this.getList1();
}
this.readMsg.Type=options.orderType
}
if(options?.Id){
this.readMsg.Id = options.Id;
this.getOrderRead();
}
},
};
</script> </script>
<style> <style>
.searchBox { .searchBox {
height: 90rpx; height: 90rpx;
background-color: #efeff4; background-color: #efeff4;
padding: 0 40rpx 0 20rpx; padding: 0 40rpx 0 20rpx;
} }
.flex-between { .flex-between {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
} }
.flex-center { .flex-center {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
</style> </style>
...@@ -107,7 +107,6 @@ ...@@ -107,7 +107,6 @@
if (res.resultCode == 1) { if (res.resultCode == 1) {
this.dataList = this.dataList.concat(res.data.pageData); this.dataList = this.dataList.concat(res.data.pageData);
this.page_count = res.data.pageCount; this.page_count = res.data.pageCount;
console.log(this.dataList,'datalist');
} }
} }
); );
...@@ -120,14 +119,10 @@ ...@@ -120,14 +119,10 @@
} else { } else {
this.status = "nomore"; this.status = "nomore";
} }
},
//订单标记已读
getOrderRead(){
}, },
goOrderDetail(item){ goOrderDetail(item){
uni.navigateTo({ uni.navigateTo({
url: "/pages/MallMange/orderDetail?OrderNo="+item.OrderNo url: "/pages/MallMange/orderDetail?OrderNo="+item.OrderNo+'&orderType='+this.msg.Type+'&Id='+item.Id
}); });
} }
} }
......
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