|
|
@@ -2,26 +2,24 @@
|
|
|
<view class="app-main app-content">
|
|
|
<view class="input-wrap_box">
|
|
|
|
|
|
- <view @click="setSearchType" style="font-size:30upx;margin-right:10upx;color:#666666">
|
|
|
+ <view @click="setSearchType" style="font-size:28upx;margin-right:10upx;color:#666666">
|
|
|
<text>{{searchTypeName}}</text>
|
|
|
<i class="iconfont iconsanjiao_xia"></i>
|
|
|
</view>
|
|
|
|
|
|
- <!-- <view> <AppSearchModule placeholder="输入拼音首字母搜索" @input="searchFn"/> </view> -->
|
|
|
+ <view> <AppSearchModule placeholder="输入拼音首字母搜索" @input="searchFn"/> </view>
|
|
|
|
|
|
- <view class="select-dn_bx">
|
|
|
+ <!-- <view class="select-dn_bx">
|
|
|
<DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</view>
|
|
|
<view class="app-tabs">
|
|
|
- <app-tabs :tabs="tabs" :isFixed="false" :top="50" :currentTab="tabIndex" :height="100" @change="change" itemWidth="20%" />
|
|
|
+ <app-tabs :tabs="tabs" :isFixed="false" :top="50" :currentTab="tabIndex" :height="100" @change="change" itemWidth="33%" />
|
|
|
</view>
|
|
|
<div class="list-wrap">
|
|
|
<block v-if="!$util.isEmpty(list.data)">
|
|
|
<div class="list" v-for="(item, index) in list.data" :key="index">
|
|
|
-
|
|
|
<OrderItem :item="item" :isScanEnv="isScanEnv" @printOrder="printOrder"></OrderItem>
|
|
|
-
|
|
|
</div>
|
|
|
</block>
|
|
|
<block v-else>
|
|
|
@@ -40,11 +38,11 @@ import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
import ModalModule from "@/components/plugin/modal";
|
|
|
import { list } from "@/mixins";
|
|
|
import { mapGetters } from "vuex";
|
|
|
-import { getListB} from "@/api/order";
|
|
|
-//import AppSearchModule from "@/components/module/app-search";
|
|
|
+import { getNewOrderList} from "@/api/order";
|
|
|
+import AppSearchModule from "@/components/module/app-search";
|
|
|
import DropShopSelect from "@/components/module/shopSelect";
|
|
|
import OrderItem from "./components/OrderItem";
|
|
|
-import DateSelect from "@/components/module/dateSelect";
|
|
|
+//import DateSelect from "@/components/module/dateSelect";
|
|
|
import { cloudPrintOrder } from "@/api/order"
|
|
|
export default {
|
|
|
name: "order-list",
|
|
|
@@ -52,10 +50,10 @@ export default {
|
|
|
AppTabs,
|
|
|
AppWrapperEmpty,
|
|
|
ModalModule,
|
|
|
- //AppSearchModule,
|
|
|
+ AppSearchModule,
|
|
|
DropShopSelect,
|
|
|
OrderItem,
|
|
|
- DateSelect,
|
|
|
+ //DateSelect,
|
|
|
NotLogin
|
|
|
},
|
|
|
mixins: [list],
|
|
|
@@ -69,32 +67,23 @@ export default {
|
|
|
customizationTime: [], //时间段
|
|
|
customizationTimeType: "", //时间段
|
|
|
tabIndex: 0,
|
|
|
+ selectType: 0,
|
|
|
tabs: [
|
|
|
{
|
|
|
- name: "全部",
|
|
|
+ name: "今日实收",
|
|
|
value: 0,
|
|
|
id: 0,
|
|
|
},
|
|
|
{
|
|
|
- name: "待付款",
|
|
|
+ name: "今日欠款",
|
|
|
value: 0,
|
|
|
id: 1,
|
|
|
},
|
|
|
{
|
|
|
- name: "待配送",
|
|
|
+ name: "所有欠款",
|
|
|
value: 0,
|
|
|
id: 2,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "配送中",
|
|
|
- value: 0,
|
|
|
- id: 3,
|
|
|
- },
|
|
|
- {
|
|
|
- name: "已完成",
|
|
|
- value: 0,
|
|
|
- id: 4,
|
|
|
- },
|
|
|
+ }
|
|
|
],
|
|
|
selectItemId: "",
|
|
|
operateIndex: null,
|
|
|
@@ -126,14 +115,11 @@ export default {
|
|
|
uni.stopPullDownRefresh();
|
|
|
}
|
|
|
},
|
|
|
- mounted() {
|
|
|
- },
|
|
|
onLoad(option) {
|
|
|
- let tabIndex = uni.getStorageSync("switchTabQuery") || null;
|
|
|
- if (tabIndex) {
|
|
|
- uni.removeStorageSync("switchTabQuery");
|
|
|
- this.tabIndex = parseInt(tabIndex.tabIndex);
|
|
|
- }
|
|
|
+ this.selectType = parseInt(option.type)
|
|
|
+ console.log(this.selectType)
|
|
|
+ this.tabIndex = parseInt(option.type) - 1
|
|
|
+
|
|
|
this._list();
|
|
|
|
|
|
// #ifdef APP-PLUS
|
|
|
@@ -141,10 +127,6 @@ export default {
|
|
|
this.isScanEnv = true
|
|
|
}
|
|
|
//#endif
|
|
|
-
|
|
|
- },
|
|
|
- onShow() {
|
|
|
-
|
|
|
},
|
|
|
methods: {
|
|
|
printOrder(item){
|
|
|
@@ -191,11 +173,12 @@ export default {
|
|
|
this._list()
|
|
|
},
|
|
|
_list() {
|
|
|
- return getListB({
|
|
|
+ return getNewOrderList({
|
|
|
searchTime: this.searchTime,
|
|
|
startTime: this.startTime,
|
|
|
endTime: this.endTime,
|
|
|
- status: this.tabs[this.tabIndex].id,
|
|
|
+ //status: this.tabs[this.tabIndex].id,
|
|
|
+ type: this.selectType,
|
|
|
name: this.seekVal,
|
|
|
page: this.list.page,
|
|
|
searchType:this.searchType,
|
|
|
@@ -204,11 +187,12 @@ export default {
|
|
|
if (this.$util.isEmpty(res.data)){
|
|
|
return false
|
|
|
}
|
|
|
- this.tabs[0].value = res.data.totalNum || 0;
|
|
|
- this.tabs[1].value = res.data.shop.unPayOrder || 0;
|
|
|
- this.tabs[2].value = res.data.shop.unSendOrder || 0;
|
|
|
- this.tabs[3].value = res.data.shop.sendingOrder || 0;
|
|
|
- this.tabs[4].value = res.data.shop.finishOrder || 0;
|
|
|
+
|
|
|
+ this.tabs[0].value = '';
|
|
|
+ this.tabs[1].value = '';
|
|
|
+ this.tabs[2].value = '';
|
|
|
+
|
|
|
+ this.tabs[res.data.type - 1].value = res.data.totalNum == 0 ? '' : res.data.totalNum;
|
|
|
});
|
|
|
},
|
|
|
change(e) {
|
|
|
@@ -216,6 +200,7 @@ export default {
|
|
|
return false;
|
|
|
} else {
|
|
|
this.tabIndex = e.index;
|
|
|
+ this.selectType = e.index + 1;
|
|
|
this.resetList();
|
|
|
this._list();
|
|
|
}
|