Funny 3 年之前
父节点
当前提交
d69f0230ab

二进制
dist.rar


+ 2 - 3
src/App.vue

@@ -24,6 +24,7 @@ export default {
         require("../static/audio/order-received.mp3"),
         require("../static/audio/rider-cancel.mp3"),
         require("../static/audio/user-go-cancel.mp3"),
+        require("../static/audio/over-time.mp3"),
       ],
       src: require("../static/audio/alone.mp3"),
       timer: null,
@@ -46,7 +47,7 @@ export default {
         this.getSoundMsg();
       }, 5000);
     });
-    // 诱导用户发点击动作,否则页面刷新后不会自动播放音频
+    // 诱导用户发点击动作,否则页面刷新后不会自动播放音频
     let userInfo = localStorage.getItem("userInfo");
     if (userInfo) {
       let nickname = JSON.parse(userInfo).nickname;
@@ -70,8 +71,6 @@ export default {
             let url = this.audioList.filter((v) => {
               return v.includes(name);
             })[0];
-            console.log("name", name);
-            console.log("url", url);
             this.url = url + "?t=" + new Date().getTime();
           }
         } else {

+ 1 - 3
src/api/http.js

@@ -3,7 +3,7 @@ import qs from 'qs';
 import { message } from 'element-ui';
 const requestUrl = 'http://153.37.175.42:8086/'; // 测试内部接口
 // const requestUrl = 'http://121.4.100.145:8082/'; // 测试内部接口
-//const requestUrl = 'https://api.liebaoai.cn/'; // 统一正式接口
+// const requestUrl = 'https://api.liebaoai.cn/'; // 统一正式接口
 //创建axios实例
 const service = axios.create({
   timeout: 30000 //超时时间
@@ -18,8 +18,6 @@ service.interceptors.request.use(config => {
     'token': token,
     'aliasId': '',
     'platformType': 'pc',
-    // 'content-type': params.method == "GET" ? 'application/x-www-form-urlencoded' : 'application/json;charset=utf-8',
-    //'Content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
   }
   config.params = {
     t: Date.parse(new Date()),

+ 2 - 2
src/api/tool.js

@@ -100,9 +100,9 @@ export default {
     let time2 = time1[1].split(":");
     let time3 = time1[0].split("-");
     if (disparityTime % 1 === 0) {
-      return `${time3[1]}/${time3[2]} ${time2[0] - disparityTime}:00`;
+      return `${time3[1]}-${time3[2]} ${time2[0] - disparityTime}:00`;
     } else {
-      return `${time3[1]}/${time3[2]} ${time2[0] -
+      return `${time3[1]}-${time3[2]} ${time2[0] -
         Math.ceil(disparityTime)}:30`;
     }
   },

+ 43 - 15
src/components/Home.vue

@@ -23,13 +23,16 @@
     </el-row>
 
     <el-row class="order_list">
-      <el-col :span="24" v-loading="isLoading">
-        <order-list :list="orderList" :tabNum="tabNum"></order-list>
+      <el-col :span="24" v-if="orderList.length" v-loading="isLoading">
+        <order-list class="list" :list="orderList" :tabNum="tabNum"></order-list>
         <div style="text-align: center">
           <el-pagination :current-page.sync="params.pageNum" @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[10, 20, 50, 100]" :page-size="params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" background>
           </el-pagination>
         </div>
       </el-col>
+      <el-col class="empty-data" v-else>
+        <img src="../../static/image/empty-data.png" />
+      </el-col>
     </el-row>
   </div>
 </template>
@@ -94,6 +97,7 @@ export default {
       markerNum: "",
       clickBool: false,
       timer: null,
+      timer2: null,
       searchKey: "",
     };
   },
@@ -110,15 +114,23 @@ export default {
       this.getMarker();
       if (this.tabNum < 2) {
         this.getRefreshOrder();
-      } else {
-        // this.getOrder()
       }
     }, 5000);
+    this.timer2 = setInterval(() => {
+      this.getMarker();
+      if (this.tabNum >= 2) {
+        this.getOrder();
+      }
+    }, 60000);
+  },
+  mounted() {
+    
   },
-  mounted() {},
   beforeDestroy() {
     clearInterval(this.timer);
     this.timer = null;
+    clearInterval(this.timer2);
+    this.timer2 = null;
   },
   destroyed() {
     bus.$off("pullData");
@@ -213,15 +225,13 @@ export default {
             element.takeTimeTxt = this.$tool.timeago(
               new Date(element.sendTime).getTime()
             );
-            if (_this.tabNum == 1) {
-              if (element.exceptTime) {
-                element.timeTxt = _this.$tool.eosFormatTime2(
-                  element.exceptTime,
-                  element.delayTime
-                );
-              } else {
-                element.timeTxt = "";
-              }
+            if (element.exceptTime && element.delayTime) {
+              element.timeTxt = _this.$tool.eosFormatTime2(
+                element.exceptTime,
+                element.delayTime
+              );
+            } else {
+              element.timeTxt = "";
             }
             this.orderList.push(element);
           });
@@ -294,7 +304,7 @@ export default {
 
 .mainContent {
   width: 100%;
-
+  height: 100%;
   .order_tab {
     width: 100%;
     height: 74px;
@@ -399,7 +409,25 @@ export default {
 
   .order_list {
     width: 100%;
+    height: calc(100vh - 180px);
     margin-top: 10px;
+    .list {
+      position: relative;
+      height: calc(100vh - 210px);
+      overflow: hidden;
+    }
+    .empty-data {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      background-color: #fff;
+      height: 100%;
+
+      img {
+        width: 349px;
+        height: 222px;
+      }
+    }
   }
 }
 </style>

+ 1 - 0
src/components/orderComponents/orderAMap.vue

@@ -69,6 +69,7 @@ export default {
         if (res.code === 200) {
           console.log("object", res.data);
           this.addressDetail = res.data[0];
+          this.addressDetail.address = address;
           let splitPoint = this.addressDetail.location.indexOf(",");
           console.log("splitPoint", splitPoint);
           this.lng = this.addressDetail.location.slice(0, splitPoint);

+ 112 - 91
src/components/orderComponents/orderList.vue

@@ -1,11 +1,77 @@
 <template>
   <div>
-    <el-row>
-      <el-col :span="18">
-        <div v-loading="isLoading" element-loading-text="正在计算中...">
-          <div class="empty-data" v-if="list && list.length < 1">
-            <img src="../../../static/image/empty-data.png" />
+    <el-row class="track-detail">
+      <!-- 订单追踪、订单详情 -->
+      <el-col :span="7">
+        <div class="order_detail">
+          <div class="detail_title">
+            <div v-show="buttonStatus !== 0 && buttonStatus !== 10" class="detail_txt" @click="orderDetailStutus = 0" :class="{ detail_txt_ac: !orderDetailStutus }">
+              订单跟踪
+            </div>
+            <div class="detail_txt" @click="orderDetailStutus = 1" :class="{ detail_txt_ac: !!orderDetailStutus }">
+              订单详情
+            </div>
+          </div>
+          <order-track v-show="showTrack" :hasLocation="hasLocation" :buttonStatus="buttonStatus" :trackOrder="trackOrder" v-if="!orderDetailStutus && needTrack"></order-track>
+          <order-detail v-show="showDetail" :buttonStatus="buttonStatus" :orderDetail="orderDetail" v-else></order-detail>
+          <!-- 订单跟踪、订单详情底部按钮 -->
+          <div class="bottom-btns" v-show="showDetail || showTrack">
+            <!-- 新订单 -->
+            <div class="btns" v-if="buttonStatus === 0">
+              <el-button size="small" @click.native="itemAddRemark(list[curIdx].id, list[curIdx])" class="btn_bots">添加备注</el-button>
+              <el-button size="small" @click.native="iGnoreOrder(list[curIdx].id)" class="btn_bots">忽略订单</el-button>
+              <el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" class="btn_bots">补打发票</el-button>
+              <el-button size="small" @click.native="deleteItem(list[curIdx])" class="btn_bots btn">发起配送</el-button>
+            </div>
+            <!-- 预约单 -->
+            <div class="btns" v-if="buttonStatus === 10">
+              <div class="btn_bot">
+                <el-dropdown>
+                  <span class="el-dropdown-link">更多</span>
+                  <el-dropdown-menu slot="dropdown">
+                    <el-dropdown-item @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId"><span style="color: #fc7200">补打发票</span></el-dropdown-item>
+                    <el-dropdown-item @click.native="iGnoreOrder(list[curIdx].id)">忽略订单</el-dropdown-item>
+                  </el-dropdown-menu>
+                </el-dropdown>
+              </div>
+              <el-button size="small" @click.native="itemAddRemark(list[curIdx].id, list[curIdx])" class="btn_bots">添加备注</el-button>
+              <el-button size="small" @click.native="settingTime(list[curIdx])" class="btn_bots btn">{{
+                  list[curIdx].delayTime ? "修改定时" : "定时发单"
+                }}</el-button>
+              <el-button size="small" @click.native="deleteItem(list[curIdx])" class="btn_bots btn">发起配送</el-button>
+            </div>
+            <!-- 待接单 -->
+            <div class="btns" v-if="buttonStatus === 1">
+              <el-button size="small" @click.native="cancelOrder(list[curIdx].id)" class="btn_bots">取消订单</el-button>
+              <el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId" class="btn_bots">补打发票</el-button>
+              <el-button size="small" @click.native="addTip(list[curIdx].id)" class="btn_bots btn">加小费</el-button>
+            </div>
+            <!-- 取货中 -->
+            <div class="btns" v-if="buttonStatus === 2">
+              <el-button size="small" @click.native="cancelOrder(list[curIdx].id)" class="btn_bots">取消订单</el-button>
+              <el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId" class="btn_bots btn">补打发票</el-button>
+            </div>
+            <!-- 配送中 -->
+            <div class="btns" v-if="buttonStatus === 3">
+              <el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId" class="btn_bots btn">补打发票</el-button>
+            </div>
+            <!-- 异常单 -->
+            <div class="btns" v-if="buttonStatus === -2">
+              <el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId" class="btn_bots">补打发票</el-button>
+              <el-button size="small" @click.native="orderBack(list[curIdx].id)" class="btn_bots btn">撤回订单</el-button>
+            </div>
+            <!-- 已取消 -->
+            <div class="btns" v-if="buttonStatus === -1">
+              <!-- <el-button size='small' @click.native="orderPrinter(list[curIdx].waimaiOrderId)" class="btn_bots btn">再来一单</el-button> -->
+            </div>
           </div>
+        </div>
+      </el-col>
+    </el-row>
+    <el-row class="list-info">
+      <el-col :span="17">
+        <div v-loading="isLoading" element-loading-text="正在计算中...">
+          
           <div :class="
               curIdx === i ? 'order_item active-order-item' : 'order_item'
             " @click="chooseOrder(item, i)" v-for="(item, i) in list" :key="i">
@@ -22,7 +88,7 @@
                 <div class="sign_txt" v-if="item.waimaiOrderId && item.takeType == 0">
                   立即送达
                 </div>
-                <div class="sign_d" v-if="item.buttonStatus === 10">{{item.timeTxt}}自动发起配送</div>
+                <div class="sign_d" v-if="item.buttonStatus === 10 && item.timeTxt">{{item.timeTxt}}自动发起配送</div>
                 <!-- <div class="sign_d">预约 09/10 17:30自动发起配送</div> -->
               </div>
               <!-- 新订单 -->
@@ -97,11 +163,11 @@
                 }}<span>{{ item.receiptPhone }}</span>
               </div>
               <div class="address">
-                {{ item.receiptProvinceName }}
-                {{ item.receiptCityName }}
+                <!-- {{ item.receiptProvinceName }}
+                {{ item.receiptCityName }} -->
                 {{ item.receiptDistrictName }}
                 {{ item.receiptAddress }}
-                <span v-if="item.orderDistance" @click.stop="checkMap(item)">
+                <span class="distance" v-if="item.orderDistance" @click.stop="checkMap(item)">
                   <i class="el-icon-location"></i>
                   <span v-if="item.orderDistance < 1000">
                     {{ item.orderDistance }}m
@@ -117,72 +183,6 @@
           <!-- <div v-if="item.caution" class="itme_r">备注:{{ item.caution }}</div> -->
         </div>
       </el-col>
-      <!-- 订单追踪、订单详情 -->
-      <el-col :span="6">
-        <div class="order_detail">
-          <div class="detail_title">
-            <div v-show="buttonStatus !== 0 && buttonStatus !== 10" class="detail_txt" @click="orderDetailStutus = 0" :class="{ detail_txt_ac: !orderDetailStutus }">
-              订单跟踪
-            </div>
-            <div class="detail_txt" @click="orderDetailStutus = 1" :class="{ detail_txt_ac: !!orderDetailStutus }">
-              订单详情
-            </div>
-          </div>
-          <order-track v-show="showTrack" :hasLocation="hasLocation" :buttonStatus="buttonStatus" :trackOrder="trackOrder" v-if="!orderDetailStutus && needTrack"></order-track>
-          <order-detail v-show="showDetail" :buttonStatus="buttonStatus" :orderDetail="orderDetail" v-else></order-detail>
-          <!-- 订单跟踪、订单详情底部按钮 -->
-          <div v-show="showDetail || showTrack">
-            <!-- 新订单 -->
-            <div class="btns" v-if="buttonStatus === 0">
-              <el-button size="small" @click.native="itemAddRemark(list[curIdx].id, list[curIdx])" class="btn_bots">添加备注</el-button>
-              <el-button size="small" @click.native="iGnoreOrder(list[curIdx].id)" class="btn_bots">忽略订单</el-button>
-              <el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" class="btn_bots">补打发票</el-button>
-              <el-button size="small" @click.native="deleteItem(list[curIdx])" class="btn_bots btn">发起配送</el-button>
-            </div>
-            <!-- 预约单 -->
-            <div class="btns" v-if="buttonStatus === 10">
-              <div class="btn_bot">
-                <el-dropdown>
-                  <span class="el-dropdown-link">更多</span>
-                  <el-dropdown-menu slot="dropdown">
-                    <el-dropdown-item @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId"><span style="color: #fc7200">补打发票</span></el-dropdown-item>
-                    <el-dropdown-item @click.native="iGnoreOrder(list[curIdx].id)">忽略订单</el-dropdown-item>
-                  </el-dropdown-menu>
-                </el-dropdown>
-              </div>
-              <el-button size="small" @click.native="itemAddRemark(list[curIdx].id, list[curIdx])" class="btn_bots">添加备注</el-button>
-              <el-button size="small" @click.native="settingTime(list[curIdx])" class="btn_bots btn">{{
-                  list[curIdx].delayTime ? "修改定时" : "定时发单"
-                }}</el-button>
-              <el-button size="small" @click.native="deleteItem(list[curIdx])" class="btn_bots btn">发起配送</el-button>
-            </div>
-            <!-- 待接单 -->
-            <div class="btns" v-if="buttonStatus === 1">
-              <el-button size="small" @click.native="cancelOrder(list[curIdx].id)" class="btn_bots">取消订单</el-button>
-              <el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId" class="btn_bots">补打发票</el-button>
-              <el-button size="small" @click.native="addTip(list[curIdx].id)" class="btn_bots btn">加小费</el-button>
-            </div>
-            <!-- 取货中 -->
-            <div class="btns" v-if="buttonStatus === 2">
-              <el-button size="small" @click.native="cancelOrder(list[curIdx].id)" class="btn_bots">取消订单</el-button>
-              <el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId" class="btn_bots btn">补打发票</el-button>
-            </div>
-            <!-- 配送中 -->
-            <div class="btns" v-if="buttonStatus === 3">
-              <el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId" class="btn_bots btn">补打发票</el-button>
-            </div>
-            <!-- 异常单 -->
-            <div class="btns" v-if="buttonStatus === -2">
-              <el-button size="small" @click.native="orderPrinter(list[curIdx].waimaiOrderId)" v-if="list[curIdx].waimaiOrderId" class="btn_bots">补打发票</el-button>
-              <el-button size="small" @click.native="orderBack(list[curIdx].id)" class="btn_bots btn">撤回订单</el-button>
-            </div>
-            <!-- 已取消 -->
-            <div class="btns" v-if="buttonStatus === -1">
-              <!-- <el-button size='small' @click.native="orderPrinter(list[curIdx].waimaiOrderId)" class="btn_bots btn">再来一单</el-button> -->
-            </div>
-          </div>
-        </div>
-      </el-col>
     </el-row>
     <!-- 发起配送 -->
     <send-order-popup :tabNum="tabNum" ref="sendOrderPopup"></send-order-popup>
@@ -819,6 +819,7 @@ export default {
           break;
 
         default:
+          name = "已取消";
           break;
       }
       return name;
@@ -844,6 +845,26 @@ export default {
 
 <!-- Add "scoped" attribute to limit CSS to this component only -->
 <style lang="scss" scoped="scoped">
+.el-row {
+  position: absolute !important;
+  width: 100%;
+  left: 0;
+  top: 0;
+}
+.track-detail {
+  display: flex;
+  justify-content: flex-end;
+  height: calc(100vh - 210px);
+  /deep/ .el-col {
+    // margin-right: 15px;
+    height: 100%;
+    // z-index: 2;
+  }
+}
+.list-info {
+  height: calc(100vh - 210px);
+  overflow-y: auto;
+}
 .choose-self {
   padding-top: 25px;
   border-bottom: 1px solid #eee;
@@ -1009,17 +1030,6 @@ export default {
   border: none !important;
   background-color: #fc7200;
 }
-.empty-data {
-  font-size: 0;
-  text-align: center;
-  background-color: #fff;
-  padding: 100px 0;
-
-  img {
-    width: 349px;
-    height: 222px;
-  }
-}
 .active-order-item {
   border: 2px solid #fc7200;
   height: 136px !important;
@@ -1141,10 +1151,13 @@ export default {
     padding: 5px 20px;
     height: 80px;
   }
-  .address span {
-    cursor: pointer;
-    font-size: 12px;
-    color: #b1b1b1;
+  .address {
+    .distance {
+      margin-left: 10px;
+      color: blue;
+      cursor: pointer;
+      font-size: 16px;
+    }
   }
 }
 
@@ -1154,12 +1167,19 @@ export default {
   color: #b1b1b1;
 }
 .order_detail {
+  position: relative;
   width: 100%;
+  height: 100%;
   border-left: 10px solid #f1f2f5;
   background: #fff;
   box-sizing: border-box;
   border-left: 10px solid #f1f2f5;
-
+  .bottom-btns {
+    position: absolute;
+    bottom: 0;
+    left: 0;
+    width: 100%;
+  }
   .detail_title {
     width: 100%;
     height: 44px;
@@ -1179,6 +1199,7 @@ export default {
       border-bottom: 2px solid #fafafa;
       margin-right: 28px;
       cursor: pointer;
+      z-index: 2;
     }
 
     .detail_txt_ac {

+ 1 - 0
src/components/orderComponents/orderTrack.vue

@@ -142,6 +142,7 @@ export default {
           break;
 
         default:
+          name = "已取消";
           break;
       }
       return name;

+ 46 - 62
src/components/orderSearch.vue

@@ -1,18 +1,14 @@
 <template>
   <div class="mainContent">
     <el-row class="order_tab">
-      <el-col :span="12" class="search">
-        <div class="header_serch">
-          <div class="search_inp">
-            <el-input @keydown.enter.native="seachEnterFun" size="medium" class="inp" clearable v-model="params.searchKey" placeholder="请输入手机号/姓名/地址/订单编号"></el-input>
-            <!-- <el-button size="medium" @click="search" type="primary" slot="append" icon="el-icon-search"></el-button> -->
-          </div>
-          <!-- 1.0.0版本暂不开发该功能 -->
-          <!-- <div class="Manual">手动发单</div> -->
-        </div>
+      <el-col :span="8" class="search">
+        <el-input size="small" @keydown.enter.native="seachEnterFun" class="inp" clearable v-model="params.searchKey" placeholder="请输入手机号/姓名/地址/订单编号"></el-input>
       </el-col>
       <el-col :span="24">
         <div class="order_list_sel">
+          <!-- <div class="sel_item">
+            <el-input size="small" @keydown.enter.native="seachEnterFun" class="inp" clearable v-model="params.searchKey" placeholder="请输入手机号/姓名/地址/订单编号"></el-input>
+          </div> -->
           <div class="sel_item">
             <span class="name">门店:</span>
             <el-select size="small" class="item1" v-model="params.shopId" placeholder="请选择门店">
@@ -42,13 +38,16 @@
     </el-row>
 
     <el-row class="order_list">
-      <el-col :span="24" v-loading="isLoading">
-        <order-list :list='orderList' :tabNum='tabNum'></order-list>
+      <el-col :span="24" v-if="orderList.length" v-loading="isLoading">
+        <order-list class="list" :list='orderList' :tabNum='tabNum'></order-list>
         <div style="text-align: center;">
           <el-pagination :current-page.sync="params.pageNum" @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-sizes="[10, 20, 50, 100]" :page-size="params.pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" background>
           </el-pagination>
         </div>
       </el-col>
+      <el-col class="empty-data" v-else>
+        <img src="../../static/image/empty-data.png" />
+      </el-col>
     </el-row>
   </div>
 </template>
@@ -143,6 +142,12 @@ export default {
     this.getShopList();
     this.getOrder();
   },
+  mounted(){
+    this.$nextTick(()=>{
+      let bady = document.getElementById("scroll")
+      console.log(1111,bady);
+    })
+  },
   destroyed() {
     bus.$off("refreshData2");
   },
@@ -199,15 +204,13 @@ export default {
             element.takeTimeTxt = this.$tool.timeago(
               new Date(element.sendTime).getTime()
             );
-            if (_this.tabNum == 1) {
-              if (element.exceptTime) {
-                element.timeTxt = _this.$tool.eosFormatTime2(
-                  element.exceptTime,
-                  element.delayTime
-                );
-              } else {
-                element.timeTxt = "";
-              }
+            if (element.exceptTime && element.delayTime) {
+              element.timeTxt = _this.$tool.eosFormatTime2(
+                element.exceptTime,
+                element.delayTime
+              );
+            } else {
+              element.timeTxt = "";
             }
             this.orderList.push(element);
           });
@@ -245,56 +248,19 @@ export default {
 .mainContent {
   width: 100%;
   .order_tab {
+    display: flex;
+    flex-direction: column;
+    justify-content: space-around;
     width: 100%;
     background: #fff;
+    height: 90px;
     .search {
-      display: flex;
       margin-left: 20px;
-      .header_serch {
-        width: 80%;
-        height: 74px;
-        padding-right: 25px;
-        box-sizing: border-box;
-        display: flex;
-        align-items: center;
-        .Manual {
-          width: 118px;
-          height: 44px;
-          background: #fc7200;
-          border-radius: 6px;
-          font-size: 16px;
-          font-weight: 500;
-          color: #ffffff;
-          text-align: center;
-          line-height: 44px;
-          margin-left: 18px;
-        }
-
-        .search_inp {
-          width: 380px;
-          height: 44px;
-          display: flex;
-          align-items: center;
-          position: relative;
-
-          .inp {
-            width: 100%;
-            // height: 44px;
-            border: none;
-          }
-
-          .btn {
-            font-size: 22px;
-            position: absolute;
-            right: 15px;
-          }
-        }
-      }
     }
     .order_list_sel {
       display: flex;
       align-items: center;
-      margin: 0 0 10px 20px;
+      margin: 0 0 0 20px;
       .sel_item {
         display: flex;
         align-items: center;
@@ -311,6 +277,24 @@ export default {
   .order_list {
     width: 100%;
     margin-top: 10px;
+    .list {
+      position: relative;
+      height: calc(100vh - 220px);
+      overflow: hidden;
+      // overflow-y: auto;
+    }
+    .empty-data {
+      display: flex;
+      align-items: center;
+      justify-content: center;
+      background-color: #fff;
+      height: 100%;
+
+      img {
+        width: 349px;
+        height: 222px;
+      }
+    }
   }
 }
 </style>

+ 27 - 24
src/components/settingComponents/voiceSetting.vue

@@ -1,32 +1,34 @@
 <template>
   <div class="voice">
-    <div class="top-set">
-      <div class="t-left">
-        自动接单
-      </div>
-      <div class="t-right">
-        <el-switch @change="updateConfig" v-model="openAutoorder" :active-value="1" :inactive-value="0" />
-      </div>
-    </div>
-    <div class="top-set">
-      <div class="t-left">
-        自动配送(暂不支持预约单)
-        <span @click="centerDialogVisible = true">[时长设置]</span>
-      </div>
-      <div class="t-right">
-        <span>默认下单{{autodeliveryOrderTime}}分钟后</span>
-        <el-switch @change="autodelivery" v-model="openAutodelivery" :active-value="1" :inactive-value="0" />
+    <template v-if="memberType === 1">
+      <div class="top-set">
+        <div class="t-left">
+          自动接单
+        </div>
+        <div class="t-right">
+          <el-switch @change="updateConfig" v-model="openAutoorder" :active-value="1" :inactive-value="0" />
+        </div>
       </div>
-    </div>
-    <div class="top-set">
-      <div class="t-left">
-        自动打印
-        <span>(开启后将为您自动打印小票)</span>
+      <div class="top-set">
+        <div class="t-left">
+          自动配送(暂不支持预约单)
+          <span @click="centerDialogVisible = true">[时长设置]</span>
+        </div>
+        <div class="t-right">
+          <span>默认下单{{autodeliveryOrderTime}}分钟后</span>
+          <el-switch @change="autodelivery" v-model="openAutodelivery" :active-value="1" :inactive-value="0" />
+        </div>
       </div>
-      <div class="t-right">
-        <el-switch @change="updateConfig" v-model="openPrintSwitch" :active-value="1" :inactive-value="0" />
+      <div class="top-set">
+        <div class="t-left">
+          自动打印
+          <span>(开启后将为您自动打印小票)</span>
+        </div>
+        <div class="t-right">
+          <el-switch @change="updateConfig" v-model="openPrintSwitch" :active-value="1" :inactive-value="0" />
+        </div>
       </div>
-    </div>
+    </template>
     <div class="voice-content">
       <div class="top-set" style="border-bottom: 1px solid #eee;">
         <div class="t-left">
@@ -89,6 +91,7 @@ export default {
       centerDialogVisible: false,
       autodeliveryIds: [],
       deliveryList: [], // 运力列表
+      memberType: this.$store.state.userInfo.memberType,
     };
   },
   created() {

+ 14 - 1
src/components/shopAccount.vue

@@ -12,7 +12,7 @@
     </el-row>
 
     <el-row class="content">
-      <component :is="activeName"></component>
+      <component v-if="renderComponent" :is="activeName"></component>
     </el-row>
   </div>
 </template>
@@ -41,10 +41,23 @@ export default {
         { name: "消费明细", index: 3 },
       ],
       tab_ac: 0,
+      renderComponent: true,
     };
   },
   methods: {
+    forceRerender() {
+      // 从 DOM 中删除 my-component 组件
+      this.renderComponent = false;
+      this.$nextTick(() => {
+        // 在 DOM 中添加 my-component 组件
+        this.renderComponent = true;
+      });
+    },
     changeTabs(i) {
+      if (i === this.tab_ac) {
+        this.forceRerender();
+        return;
+      }
       this.tab_ac = i;
       switch (i) {
         case 0:

+ 1 - 1
src/components/shopCompoents/shopAdd.vue

@@ -126,7 +126,7 @@ export default {
       this.$refs.orderMap.chooseLocation();
     },
     getAddressDetail(v, lng, lat) {
-      this.form.address = v.formattedAddress;
+      this.form.address = v.address;
       this.form.provinceName = v.province;
       this.form.cityName = v.city;
       this.form.cityCode = v.citycode;

+ 14 - 2
src/components/shopInfo.vue

@@ -13,7 +13,7 @@
 
     <el-row class="content">
       <el-col :span="24">
-        <component :is="activeName"></component>
+        <component v-if="renderComponent" :is="activeName"></component>
       </el-col>
     </el-row>
   </div>
@@ -44,6 +44,7 @@ export default {
         { name: "绑定打印机", index: 3 },
       ],
       tab_ac: 0,
+      renderComponent: true,
     };
   },
   created() {
@@ -53,12 +54,23 @@ export default {
     let i = this.$route.query.tab_ac;
     if (i) {
       this.changeTabs(Number(i));
-      // this.$route.query = {}
     }
   },
   mounted() {},
   methods: {
+    forceRerender() {
+      // 从 DOM 中删除 my-component 组件
+      this.renderComponent = false;
+      this.$nextTick(() => {
+        // 在 DOM 中添加 my-component 组件
+        this.renderComponent = true;
+      });
+    },
     changeTabs(i) {
+      if (i === this.tab_ac) {
+        this.forceRerender();
+        return;
+      }
       this.tab_ac = i;
       switch (i) {
         case 0:

+ 1 - 1
src/views/home.vue

@@ -88,7 +88,7 @@ export default {
   right: 0;
   top: 80px;
   bottom: 0;
-  overflow-y: auto;
+  overflow-y: hidden;
   background-color: #f1f2f5;
   padding: 10px;
   min-width: 550px;

static/audio/新提示音+语音 2-5.mp3 → static/audio/over-time.mp3