Commit 78903bcb authored by zhengke's avatar zhengke

修改

parent 75abd0ef
...@@ -2,28 +2,33 @@ ...@@ -2,28 +2,33 @@
<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,
...@@ -40,7 +45,7 @@ export default { ...@@ -40,7 +45,7 @@ export default {
nomore: "没有更多了", nomore: "没有更多了",
}, },
page_count: 1, page_count: 1,
msg: { msg1: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
Name: "", Name: "",
...@@ -63,32 +68,100 @@ export default { ...@@ -63,32 +68,100 @@ export default {
AnchorName: "", AnchorName: "",
IsSelectPayMoney: 0, IsSelectPayMoney: 0,
IsOffline: -1, IsOffline: -1,
} },
msg2: {
pageIndex: 1,
pageSize: 15,
OrderSource: 0,
OrderType: 0,
DeliveryMethod: 0,
OrderId: 0,
StartTime: "",
EndTime: "",
OrderNo: "",
UserName: "",
UserId: 0,
GoodsName: "",
SelectStatus: 0,
ReOrderNo: "",
Consignee: "",
Mobile: "",
},
readMsg:{
Id:0,
Type:1
},
orderList: [],
}; };
}, },
methods: { methods: {
getList1() {
uni.showLoading({
title: '加载中'
});
this.requestAdmin("/api/order/GetGoodsOrderPageList", this.msg1, (res) => {
uni.hideLoading();
this.page_count = res.data.pageCount;
if (this.page_count == 1) {
this.status = "nomore";
}
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) { lower(e) {
if (this.msg.pageIndex < this.page_count) { if (this.orderType === 1) {
this.msg.pageIndex++; if (this.msg1.pageIndex < this.page_count) {
this.msg1.pageIndex++;
this.status = "loading"; this.status = "loading";
if (this.timer) { this.getList1();
clearTimeout(this.timer);
} }
this.timer = setTimeout(async () => { } else if (this.orderType === 2) {
await this.getList(); if (this.msg2.pageIndex < this.page_count) {
clearTimeout(this.timer); this.msg2.pageIndex++;
}, 500); this.status = "loading";
} else { this.getList2();
this.status = "nomore"; this.status = "nomore";
} }
}
}, },
//普通订单数据 //订单标记已读
getList() { getOrderRead(){
this.loading = true; this.requestAdmin("/api/MemberUser/SetAdminMessageLook", this.readMsg, (res) => {
this.requestAdmin("/api/order/GetGoodsOrderPageList", this.msg, (res) => { if(res.resultCode==1){
this.loading = false; // uni.showToast({
this.page_count = res.data.pageCount; // title: res.message,
console.log(res,'数据'); // icon: 'none',
// })
}
}); });
}, },
}, },
...@@ -96,13 +169,25 @@ export default { ...@@ -96,13 +169,25 @@ export default {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: "订单管理", title: "订单管理",
}); });
if(options.OrderNo){ if (options.OrderNo) {
this.msg.OrderNo = 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();
} }
console.log(options,'options');
this.getList();
}, },
}; };
</script> </script>
...@@ -112,11 +197,13 @@ export default { ...@@ -112,11 +197,13 @@ export default {
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;
......
...@@ -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