|
|
@@ -0,0 +1,352 @@
|
|
|
+<template>
|
|
|
+ <div class="app-main app-content">
|
|
|
+
|
|
|
+ <view class="input-wrap_box">
|
|
|
+
|
|
|
+ <view @click="setSearchType" style="font-size:30upx;margin-right:10upx;color:#666666">
|
|
|
+ <text>{{searchTypeName}}</text>
|
|
|
+ <i class="iconfont iconsanjiao_xia"></i>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view>
|
|
|
+ <AppSearchModule placeholder="输英文字母搜索" @input="searchFn"/>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <view class="select-dn_bx">
|
|
|
+ <DropShopSelect
|
|
|
+ :menuObj="menuObj"
|
|
|
+ :selectItemId.sync="selectItemId"
|
|
|
+ :typeSelect="1"
|
|
|
+ top="0upx"
|
|
|
+ @selectSussess="selectSussess"
|
|
|
+ :typeTime="true"
|
|
|
+ />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="app-tabs">
|
|
|
+ <app-tabs
|
|
|
+ :tabs="tabs"
|
|
|
+ :isFixed="false"
|
|
|
+ :top="50"
|
|
|
+ :currentTab="tabIndex"
|
|
|
+ :height="100"
|
|
|
+ @change="change"
|
|
|
+ itemWidth="20%"
|
|
|
+ />
|
|
|
+ </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" @orderEventBtn="orderEventBtn"></OrderItem>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <app-wrapper-empty
|
|
|
+ title="暂无数据"
|
|
|
+ :is-empty="$util.isEmpty(list.data)"
|
|
|
+ />
|
|
|
+ </block>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <rangeDatePick
|
|
|
+ :show="isShow"
|
|
|
+ start="2000-01-01"
|
|
|
+ end="2200-12-01"
|
|
|
+ :value="customizationTime"
|
|
|
+ @change="timeChange"
|
|
|
+ @cancel="timeCancel"
|
|
|
+ themeColor="#4C83D6"
|
|
|
+ fields="day"
|
|
|
+ ></rangeDatePick>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+const Month = new Date().getMonth() + 1 < 10 ? "0" + (new Date().getMonth() + 1) : new Date().getMonth() + 1;
|
|
|
+const time = `${new Date().getFullYear()}-${Month}-${new Date().getDate()}`;
|
|
|
+import AppTabs from "@/components/plugin/tabs";
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
+import ModalModule from "@/components/plugin/modal";
|
|
|
+import { list } from "@/mixins";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
+import { getListB, freeShipping,confirmFinish,cancel } from "@/api/order";
|
|
|
+import AppSearchModule from "@/components/module/app-search";
|
|
|
+import DropShopSelect from "@/components/module/shopSelect";
|
|
|
+import rangeDatePick from "@/components/pyh-rdtpicker/pyh-rdtpicker.vue";
|
|
|
+import BLE from "@/mixins/BLE";
|
|
|
+import orderMixin from "@/mixins/order";
|
|
|
+import OrderItem from "./components/OrderItem";
|
|
|
+export default {
|
|
|
+ name: "order-list",
|
|
|
+ components: {
|
|
|
+ rangeDatePick,
|
|
|
+ AppTabs,
|
|
|
+ AppWrapperEmpty,
|
|
|
+ ModalModule,
|
|
|
+ AppSearchModule,
|
|
|
+ DropShopSelect,
|
|
|
+ OrderItem,
|
|
|
+ },
|
|
|
+ mixins: [list,BLE,orderMixin],
|
|
|
+ computed: { ...mapGetters(["getLoginInfo", "getDictionariesInfo"]) },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ orderId:'',
|
|
|
+ seekVal: "",
|
|
|
+ isShow: false, //是否显选择时间段
|
|
|
+ customizationTime: [], //时间段
|
|
|
+ customizationTimeType: "", //时间段
|
|
|
+ menuObj: "", //时间筛选列表
|
|
|
+ tabIndex: 0,
|
|
|
+ tabs: [
|
|
|
+ {
|
|
|
+ name: "全部",
|
|
|
+ value: 0,
|
|
|
+ id: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "待付款",
|
|
|
+ value: 0,
|
|
|
+ id: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "待配送",
|
|
|
+ value: 0,
|
|
|
+ id: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "配送中",
|
|
|
+ value: 0,
|
|
|
+ id: 3,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "已完成",
|
|
|
+ value: 0,
|
|
|
+ id: 4,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ selectItemId: "",
|
|
|
+ operateIndex: null,
|
|
|
+ operateData: {},
|
|
|
+ // 免发货
|
|
|
+ freeShipModal: false,
|
|
|
+ classifyForm: {
|
|
|
+ categoryId: "",
|
|
|
+ usageId: "",
|
|
|
+ },
|
|
|
+ searchType:0,
|
|
|
+ searchTypeName:'客户',
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.resetList();
|
|
|
+ this._list().then((res) => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+ if (!this.list.finished) {
|
|
|
+ this._list().then((res) => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ },
|
|
|
+ onLoad(option) {
|
|
|
+ let dateDefaultOption = [];
|
|
|
+ let list = this.getDictionariesInfo.dateDefaultOption;
|
|
|
+ if (!this.$util.isEmpty(list)){
|
|
|
+ for (let i = 0; i < list.length; i++) {
|
|
|
+ dateDefaultOption.push({ name: list[i].name, id: list[i].value });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.menuObj = {
|
|
|
+ title: "时间",
|
|
|
+ titleChild: "时间",
|
|
|
+ list: dateDefaultOption,
|
|
|
+ };
|
|
|
+ let tabIndex = uni.getStorageSync("switchTabQuery") || null;
|
|
|
+ if (tabIndex) {
|
|
|
+ uni.removeStorageSync("switchTabQuery");
|
|
|
+ this.tabIndex = parseInt(tabIndex.tabIndex);
|
|
|
+ }
|
|
|
+ this._list();
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ setSearchType(){
|
|
|
+ let that = this
|
|
|
+ uni.showActionSheet({
|
|
|
+ itemList: ['搜索类型:', '客户', '编号'],
|
|
|
+ success: function (respond) {
|
|
|
+ let currentIndex = respond.tapIndex
|
|
|
+ if(currentIndex == 0){
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ that.searchType = Number(currentIndex) - 1
|
|
|
+ that.searchTypeName = that.searchType == 0 ? '客户' : '编号'
|
|
|
+ that.searchFn()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ selectTime(type) {
|
|
|
+ (this.customizationTime = [time, time]),
|
|
|
+ (this.customizationTimeType = type),
|
|
|
+ (this.isShow = true);
|
|
|
+ },
|
|
|
+ //选择自定义时间确定
|
|
|
+ timeChange(e) {
|
|
|
+ this.isShow = false;
|
|
|
+ this.resetList();
|
|
|
+ this._list(this.customizationTimeType, e);
|
|
|
+ },
|
|
|
+ //选择自定义时间取消
|
|
|
+ timeCancel(e) {
|
|
|
+ this.isShow = false;
|
|
|
+ },
|
|
|
+ selectSussess(val) {
|
|
|
+ console.log(val);
|
|
|
+ if (val.select == "自定义") {
|
|
|
+ this.selectTime(val.selectItem.id);
|
|
|
+ } else {
|
|
|
+ this.resetList();
|
|
|
+ this._list(val.selectItem.id, "");
|
|
|
+ }
|
|
|
+ },
|
|
|
+ searchFn(e) {
|
|
|
+ this.resetList();
|
|
|
+ this.seekVal = e;
|
|
|
+ this._list();
|
|
|
+ },
|
|
|
+ _list(type, timeArr) {
|
|
|
+ return getListB({
|
|
|
+ searchTime: type,
|
|
|
+ startTime: timeArr ? timeArr[0] : "",
|
|
|
+ endTime: timeArr ? timeArr[1] : "",
|
|
|
+ status: this.tabs[this.tabIndex].id,
|
|
|
+ name: this.seekVal,
|
|
|
+ page: this.list.page,
|
|
|
+ searchType:this.searchType,
|
|
|
+ }).then((res) => {
|
|
|
+ this.completes(res);
|
|
|
+ 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;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ change(e) {
|
|
|
+ if (this.tabIndex == e.index) {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ this.tabIndex = e.index;
|
|
|
+ this.resetList();
|
|
|
+ this._list();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 关闭弹窗
|
|
|
+ modalCancel() {
|
|
|
+ this.freeShipModal = false;
|
|
|
+ },
|
|
|
+ classifyOrder(id) {
|
|
|
+ this.currentOrderId = id;
|
|
|
+ },
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.admin-button-com {
|
|
|
+ width: 140upx;
|
|
|
+ height: 60upx;
|
|
|
+ padding: 0;
|
|
|
+ line-height: 60upx;
|
|
|
+ text-align: center;
|
|
|
+ font-size: 26upx;
|
|
|
+ &.active {
|
|
|
+ border: 1upx solid #ccc;
|
|
|
+ }
|
|
|
+}
|
|
|
+page{
|
|
|
+ width: 750upx;
|
|
|
+ overflow: hidden;
|
|
|
+}
|
|
|
+.app-content {
|
|
|
+ padding-top: 100upx;
|
|
|
+ padding-bottom: 1upx;
|
|
|
+ overflow: hidden;
|
|
|
+ .select-dn_bx {
|
|
|
+ padding-left: 18upx;
|
|
|
+ }
|
|
|
+ .app-tabs {
|
|
|
+ position: fixed;
|
|
|
+ width: 40%;
|
|
|
+ z-index: 9;
|
|
|
+ }
|
|
|
+ .input-wrap_box {
|
|
|
+ background-color: #fff;
|
|
|
+ position: fixed;
|
|
|
+ top: 0;
|
|
|
+ z-index: 10;
|
|
|
+ width: 40%;
|
|
|
+ height: 100upx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ padding: 0 30upx;
|
|
|
+ & > view:nth-child(2) {
|
|
|
+ flex: 1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list-wrap {
|
|
|
+ padding-top: 100upx;
|
|
|
+ .list {
|
|
|
+ background-color: #fff;
|
|
|
+ margin-bottom: 20upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+.upload-confirm-wrap {
|
|
|
+ max-height: 600upx;
|
|
|
+ overflow-y: auto;
|
|
|
+ .modal-tit {
|
|
|
+ @include disFlex(center, center);
|
|
|
+ font-size: 40upx;
|
|
|
+ margin-top: 30upx;
|
|
|
+ margin-bottom: 50upx;
|
|
|
+ .iconfont {
|
|
|
+ color: #09bb07;
|
|
|
+ margin-right: 20upx;
|
|
|
+ font-size: 50upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .sel-wrap {
|
|
|
+ color: $fontColor2;
|
|
|
+ font-size: 32upx;
|
|
|
+ .sel-tit {
|
|
|
+ text-align: left;
|
|
|
+ }
|
|
|
+ .sel-btn {
|
|
|
+ @include disFlex(center, flex-start);
|
|
|
+ flex-wrap: wrap;
|
|
|
+ padding: 10upx 0 40upx;
|
|
|
+ .admin-button-com {
|
|
|
+ margin-right: 20upx;
|
|
|
+ margin-top: 20upx;
|
|
|
+ padding-top: 16upx;
|
|
|
+ padding-bottom: 16upx;
|
|
|
+ border-radius: 4upx;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|