Commit e1e01409 authored by 罗超's avatar 罗超

1

parent 14a9079d
...@@ -44,6 +44,9 @@ ...@@ -44,6 +44,9 @@
</template> </template>
<script> <script>
export default { export default {
props: {
data: Object,
},
data() { data() {
return {}; return {};
}, },
......
...@@ -2,13 +2,22 @@ ...@@ -2,13 +2,22 @@
<view class="orderpage"> <view class="orderpage">
<view class="typebox flex-center"> <view class="typebox flex-center">
<view class="typeItem flex-center"> <view class="typeItem flex-center">
<view class="typeItem1 flex-center activeType">普通订单</view> <view
<view class="typeItem1 flex-center">售后订单</view> class="typeItem1 flex-center"
:class="orderType === 1 ? 'activeType' : ''"
@click="changeOrderType(1)"
>普通订单</view
>
<view
class="typeItem1 flex-center"
:class="orderType === 2 ? 'activeType' : ''"
@click="changeOrderType(2)"
>售后订单</view
>
</view> </view>
</view> </view>
<view class="searchBox flex-between"> <view class="searchBox flex-between">
<view class="search flex-center"> <view class="search flex-center">
<!-- <input type="text"> -->
<u-icon name="search"></u-icon> <u-icon name="search"></u-icon>
<view>搜索</view> <view>搜索</view>
</view> </view>
...@@ -124,11 +133,14 @@ ...@@ -124,11 +133,14 @@
@change="changeTab" @change="changeTab"
></u-tabs> ></u-tabs>
</view> </view>
<u-empty v-if="orderList.length == 0" text="暂无内容" mode="list"></u-empty>
<view <view
v-if="orderList.length > 0"
style=" style="
height: calc(100vh - 50px); height: calc(100vh - 350rpx);
width: calc(100vw); width: calc(100vw);
overflow: hidden; overflow: hidden;
box-sizing: border-box;
padding-bottom: 20px; padding-bottom: 20px;
" "
> >
...@@ -139,9 +151,24 @@ ...@@ -139,9 +151,24 @@
@scrolltolower="lower" @scrolltolower="lower"
:style="{ height: '100%' }" :style="{ height: '100%' }"
> >
<orderItem /> <view v-for="(item, index) in orderList" :key="index">
<orderItem :data="item" />
</view>
<u-loadmore
:status="status"
:load-text="loadText"
:font-size="24"
:margin-top="20"
:margin-bottom="20"
bg-color="#999"
/>
</scroll-view> </scroll-view>
</view> </view>
<!-- 加载中 -->
<view class="flex-center" style="margin-top: 20rpx" v-if="loading">
<u-loading mode="flower" size="48"></u-loading>
<Text style="color: #999">加载中...</Text>
</view>
<tabbar></tabbar> <tabbar></tabbar>
</view> </view>
</template> </template>
...@@ -171,6 +198,14 @@ export default { ...@@ -171,6 +198,14 @@ export default {
days.push(i); days.push(i);
} }
return { return {
orderType: 1, //1普通订单,2售后订单
loading: false,
status: "loadmore",
loadText: {
loadmore: "轻轻上拉,加载更多",
loading: "努力加载中",
nomore: "没有更多了",
},
showModel: false, showModel: false,
timeStr: "", timeStr: "",
curIndex: 0, curIndex: 0,
...@@ -219,6 +254,7 @@ export default { ...@@ -219,6 +254,7 @@ export default {
}, },
], ],
currentTab: 0, currentTab: 0,
page_count: 1,
msg: { msg: {
pageIndex: 1, pageIndex: 1,
pageSize: 15, pageSize: 15,
...@@ -244,6 +280,7 @@ export default { ...@@ -244,6 +280,7 @@ export default {
IsOffline: -1, IsOffline: -1,
}, },
orderStatusList: [], orderStatusList: [],
orderList: [],
}; };
}, },
methods: { methods: {
...@@ -264,7 +301,8 @@ export default { ...@@ -264,7 +301,8 @@ export default {
changeTab(index) { changeTab(index) {
this.currentTab = index; this.currentTab = index;
this.msg.OrderStatus = this.orderStatusList[index].Id; this.msg.OrderStatus = this.orderStatusList[index].Id;
console.log(this.msg.OrderStatus); this.msg.pageIndex = 1;
this.getList();
}, },
lower(e) { lower(e) {
if (this.msg.pageIndex < this.page_count) { if (this.msg.pageIndex < this.page_count) {
...@@ -283,12 +321,23 @@ export default { ...@@ -283,12 +321,23 @@ export default {
}); });
}, },
getList() { getList() {
this.requestAdmin( this.loading = true;
"/api/order/GetGoodsOrderPageList", this.requestAdmin("/api/order/GetGoodsOrderPageList", this.msg, (res) => {
this.msg, this.loading = false;
(res) => {} this.page_count = res.data.pageCount;
); if (this.page_count == 1) {
this.status = "nomore";
}
if (this.msg.pageIndex === 1) {
this.orderList = res.data.pageData;
} else {
this.orderLis = [...this.orderList, ...res.data.pageData];
}
});
}, },
changeOrderType(n){
this.orderType=n
}
}, },
onLoad() { onLoad() {
this.timeStr = this.timeArr[0].name; this.timeStr = this.timeArr[0].name;
......
...@@ -773,7 +773,6 @@ ...@@ -773,7 +773,6 @@
this.showAuth = true; this.showAuth = true;
} }
this.isMallAdmin = this.mall_UserInfo.AdminId&&this.mall_UserInfo.AdminToken ? 1:0 this.isMallAdmin = this.mall_UserInfo.AdminId&&this.mall_UserInfo.AdminToken ? 1:0
console.log(445,this.isMallAdmin)
}, },
mounted() { mounted() {
this.getComponyStatus() this.getComponyStatus()
......
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