shizhongqi пре 4 година
родитељ
комит
c0c473b6bb
3 измењених фајлова са 346 додато и 9 уклоњено
  1. 332 0
      ghsApp/src/admin/home/newOrderList.vue
  2. 13 9
      ghsApp/src/admin/home/workbench.vue
  3. 1 0
      ghsApp/src/pages.json

+ 332 - 0
ghsApp/src/admin/home/newOrderList.vue

@@ -0,0 +1,332 @@
+<template>
+  <view 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">
+        <DateSelect class="bar" top="0" @selectDateFn="selectDateFn" defaultShowName='时间' />
+      </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" :isScanEnv="isScanEnv" @printOrder="printOrder"></OrderItem>
+
+        </div>
+      </block>
+      <block v-else>
+        <app-wrapper-empty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
+      </block>
+    </div>
+
+    <NotLogin></NotLogin>
+
+  </view>
+</template>
+<script>
+import AppTabs from "@/components/plugin/tabs";
+import NotLogin from "@/components/not-login";
+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 DropShopSelect from "@/components/module/shopSelect";
+import OrderItem from "./components/OrderItem";
+import DateSelect from "@/components/module/dateSelect";
+import { cloudPrintOrder } from "@/api/order"
+export default {
+  name: "order-list",
+  components: {
+    AppTabs,
+    AppWrapperEmpty,
+    ModalModule,
+    //AppSearchModule,
+    DropShopSelect,
+    OrderItem,
+    DateSelect,
+    NotLogin
+  },
+  mixins: [list],
+  computed: { ...mapGetters(["getLoginInfo", "getDictionariesInfo"]) },
+  data() {
+    return {
+      isScanEnv:false,
+    	orderId:'',
+      seekVal: "",
+      isShow: false, //是否显选择时间段
+      customizationTime: [], //时间段
+      customizationTimeType: "", //时间段
+      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:'客户',
+      searchTime:'',
+      startTime:'',
+      endTime:''
+    };
+  },
+  onPullDownRefresh() {
+    this.resetList();
+    this._list()
+    uni.stopPullDownRefresh()
+  },
+  onReachBottom() {
+    if (!this.list.finished) {
+      this._list().then((res) => {
+        uni.stopPullDownRefresh();
+      });
+    } else {
+      uni.stopPullDownRefresh();
+    }
+  },
+  mounted() {
+  },
+  onLoad(option) {
+    let tabIndex = uni.getStorageSync("switchTabQuery") || null;
+    if (tabIndex) {
+      uni.removeStorageSync("switchTabQuery");
+      this.tabIndex = parseInt(tabIndex.tabIndex);
+    }
+    this._list();
+
+    // #ifdef APP-PLUS
+    if(this.$util.isScanEnv()){
+      this.isScanEnv = true
+    }
+	  //#endif
+
+  },
+  onShow() {
+
+  },
+  methods: {
+    printOrder(item){
+      let that = this
+      uni.showLoading({title: '打印中...'});
+      cloudPrintOrder({id:item.id}).then((res) => {
+        uni.hideLoading()
+        if(res.code == 1){
+          if(res.data.hasNoPrint == 1){
+            that.$util.confirmModal({content:'请先设置打印机'},() => {
+              that.$util.pageTo({url: "/admin/shop/print"})
+            })
+          }else{
+            item.printNum++
+          }
+        }
+      })
+    },
+    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()
+        }
+      })
+    },
+    selectDateFn(val) {
+      this.searchTime = val.searchTime
+      this.startTime = val.startTime
+      this.endTime = val.endTime
+      this.resetList();
+      this._list();
+    },
+    searchFn(e) {
+      this.resetList();
+      this.seekVal = e;
+      this._list()
+    },
+    _list() {
+      return getListB({
+        searchTime: this.searchTime,
+        startTime: this.startTime,
+        endTime: this.endTime,
+        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;
+    /* 手机mobile屏幕小于1000px */
+    @media screen and (max-width: 1100px) {
+      width: 100%;
+    }
+    /* 收银台cashier屏幕大于1000px */
+    @media screen and (min-width:1100px) {
+      width: 40%;
+    }    
+    z-index: 9;
+  }
+  .input-wrap_box {
+    background-color: #fff;
+    position: fixed;
+    top: 0;
+    z-index: 10;
+    /* 手机mobile屏幕小于1000px */
+    @media screen and (max-width: 1100px) {
+      width: 100%;
+    }
+    /* 收银台cashier屏幕大于1000px */
+    @media screen and (min-width:1100px) {
+      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>

+ 13 - 9
ghsApp/src/admin/home/workbench.vue

@@ -33,15 +33,15 @@
 
 
 		<div class="module-com order-wrap">
 		<div class="module-com order-wrap">
 			<div class="total-blo">
 			<div class="total-blo">
-			<div class="total-list"> 
-			<div class="app-color-3">今日实收</div><div class="list-num">{{todayActIncome}}</div>
-			</div>
-			<div class="total-list"> 
-			<div class="app-color-3">今日欠款</div><div class="list-num">{{todayDebt}}</div> 
-			</div>
-			<div class="total-list"> 
-			<div class="app-color-3">总欠款</div><div class="list-num">{{totalDebt}}</div> 
-			</div>
+				<div class="total-list" @click="pageToNewOrderList(1)"> 
+					<div class="app-color-3">今日实收</div><div class="list-num">{{todayActIncome}}</div>
+				</div>
+				<div class="total-list" @click="pageToNewOrderList(2)"> 
+					<div class="app-color-3">今日欠款</div><div class="list-num">{{todayDebt}}</div> 
+				</div>
+				<div class="total-list" @click="pageToNewOrderList(3)"> 
+					<div class="app-color-3">总欠款</div><div class="list-num">{{totalDebt}}</div> 
+				</div>
 			</div>
 			</div>
 		</div>
 		</div>
 
 
@@ -273,6 +273,10 @@ export default {
 		pageToFn(item) {
 		pageToFn(item) {
 			this.$util.pageTo({url: item.page})
 			this.$util.pageTo({url: item.page})
 		},
 		},
+		pageToNewOrderList(item) {
+			console.log(item)
+			this.$util.pageTo({url: 'admin/home/newOrderList?type=' + item})
+		},
 		getMyMall(){
 		getMyMall(){
 			console.log('pagesPurchase/ghsProduct?shopId='+ this.loginInfo.shopId+'&id=0&ghsShopAdminId='+this.loginInfo.shopAdminId)
 			console.log('pagesPurchase/ghsProduct?shopId='+ this.loginInfo.shopId+'&id=0&ghsShopAdminId='+this.loginInfo.shopAdminId)
 			uni.navigateToMiniProgram({
 			uni.navigateToMiniProgram({

+ 1 - 0
ghsApp/src/pages.json

@@ -6,6 +6,7 @@
 		{"path": "admin/home/callback","style": {"navigationBarTitleText": "","enablePullDownRefresh": true}},
 		{"path": "admin/home/callback","style": {"navigationBarTitleText": "","enablePullDownRefresh": true}},
 		{"path": "admin/home/console","style": {"navigationBarTitleText": ""}},
 		{"path": "admin/home/console","style": {"navigationBarTitleText": ""}},
 		{"path": "admin/home/order","style": {"navigationBarTitleText": "订单","enablePullDownRefresh": true}},
 		{"path": "admin/home/order","style": {"navigationBarTitleText": "订单","enablePullDownRefresh": true}},
+		{"path": "admin/home/newOrderList","style": {"navigationBarTitleText": "订单查看","enablePullDownRefresh": true}},
 		{"path": "admin/home/member","style": {"navigationBarTitleText": "客户","enablePullDownRefresh": true}},
 		{"path": "admin/home/member","style": {"navigationBarTitleText": "客户","enablePullDownRefresh": true}},
 		{"path": "admin/home/apply","style": {"navigationBarTitleText": "应用","enablePullDownRefresh": true}},
 		{"path": "admin/home/apply","style": {"navigationBarTitleText": "应用","enablePullDownRefresh": true}},
 		{"path": "admin/home/me","style": {"navigationBarTitleText": "我的","enablePullDownRefresh": true,"navigationStyle": "custom"}},
 		{"path": "admin/home/me","style": {"navigationBarTitleText": "我的","enablePullDownRefresh": true,"navigationStyle": "custom"}},