Funny 3 years ago
parent
commit
e8e6635f1a

+ 5 - 0
src/components/Home.vue

@@ -32,6 +32,7 @@
       </el-col>
       <el-col class="empty-data" v-else>
         <img src="../../static/image/empty-data.png" />
+        <div class="no-data">暂无订单数据</div>
       </el-col>
     </el-row>
   </div>
@@ -427,6 +428,7 @@ export default {
     }
     .empty-data {
       display: flex;
+      flex-direction: column;
       align-items: center;
       justify-content: center;
       background-color: #fff;
@@ -436,6 +438,9 @@ export default {
         width: 349px;
         height: 222px;
       }
+      .no-data {
+        color: #9EA7B7;
+      }
     }
   }
 }

+ 37 - 27
src/components/orderComponents/orderList.vue

@@ -130,7 +130,7 @@
               <!-- 配送中 -->
               <div class="order_item_header_r" v-if="item.buttonStatus === 3">
                 <el-tag v-if="tabNum === -1" class="header_r">配送中</el-tag>
-                <span class="header_r" v-if="item.exceptTime">预计{{ item.exceptTime }}送达</span>
+                <!-- <span class="header_r" v-if="item.exceptTime">预计{{ item.exceptTime }}送达</span> -->
                 <el-button size="small" class="btn" @click.stop="orderPrinter(item.waimaiOrderId)" v-if="item.waimaiOrderId">补打发票</el-button>
               </div>
               <!-- 异常单 -->
@@ -455,6 +455,32 @@ export default {
       this.reasonIndex = item.id;
       this.chooseReason = item.name;
     },
+    doCancelOrder() {
+      cancelOrder({
+        orderId: this.orderId,
+        cancelReason:
+          this.reasonIndex != 8 ? this.chooseReason : this.cancelReason,
+      }).then((res) => {
+        if (res.code == 200) {
+          this.$message({
+            message: "取消订单成功",
+            type: "success",
+          });
+          this.orderId = "";
+          this.cancelReason = "";
+          this.chooseReason = "";
+          this.reasonIndex = null;
+          bus.$emit("refreshData");
+          bus.$emit("refreshData2");
+          this.cancelStatus = false;
+        } else {
+          this.$message({
+            message: res.msg,
+            type: "error",
+          });
+        }
+      });
+    },
     // 取消订单
     commitCancelReason() {
       if (!this.reasonIndex) {
@@ -469,6 +495,13 @@ export default {
           type: "error",
         });
       }
+        console.log(222222,this.buttonStatus);
+
+      if (this.buttonStatus === 1) {
+        console.log(111111);
+        this.doCancelOrder();
+        return;
+      }
       this.$confirm("取消订单可能会存在违约金, 是否继续?", "提示", {
         confirmButtonText: "取消",
         cancelButtonText: "确定",
@@ -479,30 +512,7 @@ export default {
           this.cancelStatus = false;
         })
         .catch(() => {
-          cancelOrder({
-            orderId: this.orderId,
-            cancelReason:
-              this.reasonIndex != 8 ? this.chooseReason : this.cancelReason,
-          }).then((res) => {
-            if (res.code == 200) {
-              this.$message({
-                message: "取消订单成功",
-                type: "success",
-              });
-              this.orderId = "";
-              this.cancelReason = "";
-              this.chooseReason = "";
-              this.reasonIndex = null;
-              bus.$emit("refreshData");
-              bus.$emit("refreshData2");
-              this.cancelStatus = false;
-            } else {
-              this.$message({
-                message: res.msg,
-                type: "error",
-              });
-            }
-          });
+          this.doCancelOrder();
         });
     },
     // 取消定时发单
@@ -818,8 +828,8 @@ export default {
         return;
       }
       getRiderArriveTime({ orderId: this.orderId }).then((res) => {
-        if(res.code === 200){
-          this.riderArriveTime = res.data
+        if (res.code === 200) {
+          this.riderArriveTime = res.data;
         }
       });
     },

+ 5 - 0
src/components/orderSearch.vue

@@ -48,6 +48,7 @@
       </el-col>
       <el-col class="empty-data" v-else>
         <img src="../../static/image/empty-data.png" />
+        <div class="no-data">暂无订单数据</div>
       </el-col>
     </el-row>
   </div>
@@ -331,6 +332,7 @@ export default {
     }
     .empty-data {
       display: flex;
+      flex-direction: column;
       align-items: center;
       justify-content: center;
       background-color: #fff;
@@ -340,6 +342,9 @@ export default {
         width: 349px;
         height: 222px;
       }
+      .no-data {
+        color: #9EA7B7;
+      }
     }
   }
 }

+ 3 - 3
src/components/settingComponents/deliverySetting.vue

@@ -23,9 +23,9 @@
     </div>
     <el-dialog title="请选择对当前运力的操作!" :visible.sync="centerDialogVisible" width="600px" center>
       <span slot="footer" class="dialog-footer">
-        <el-button type="success" @click="changeDelivery(1)">推荐运力</el-button>
-        <el-button type="danger" @click="changeDelivery(2)">屏蔽运力</el-button>
-        <el-button type="primary" @click="changeDelivery(3)">恢复普通运力</el-button>
+        <el-button type="success" @click="changeDelivery(1)">推荐运力</el-button>
+        <el-button type="danger" @click="changeDelivery(2)">屏蔽运力</el-button>
+        <el-button type="primary" @click="changeDelivery(3)">重置运力</el-button>
       </span>
     </el-dialog>
   </div>

+ 1 - 1
src/components/settingComponents/voiceSetting.vue

@@ -122,7 +122,7 @@ export default {
           src = "../../../static/audio/not-enough.mp3";
           break;
         case 6:
-          src = "../../../static/audio/low-than.mp3";
+          src = "../../../static/audio/lower-than.mp3";
           break;
         case 7:
           src = "../../../static/audio/over-time.mp3";

+ 38 - 32
src/components/shopCompoents/shopAdd.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="shopAdd">
-    <el-dialog width="40%" :title="title" destroy-on-close center :visible.sync="showVisible">
+    <el-dialog width="600px" :title="title" destroy-on-close center :visible.sync="showVisible">
       <el-form :model="form">
         <el-form-item label="门店名称" label-width="103px">
           <el-input v-model="form.name" placeholder="请输入店铺名称" autocomplete="off" style="width: 100%"></el-input>
@@ -38,11 +38,14 @@
         <el-form-item label="审核中运力" label-width="103px" v-if="form.id && revieweds.length">
           <div class="reviewed">
             <div class="item" v-for="(item, i) in revieweds" :key="i">
-              <div class="left">
-                <img class="logo" :src="item.logo">
-                <span class="label">{{item.name}}</span>
+              <div class="left-wrap">
+                <div class="left">
+                  <img class="logo" :src="item.logo">
+                  <span class="label">{{item.name}}</span>
+                </div>
+                <div class="tip">{{showStatus(item.bindStatus)}}</div>
               </div>
-              <div class="tip">{{showStatus(item.bindStatus)}}</div>
+              <div v-show="item.authMsg" class="reason">原因:{{item.authMsg}}</div>
             </div>
           </div>
         </el-form-item>
@@ -114,7 +117,7 @@ export default {
               message: res.msg,
             });
           }
-        })
+        });
       } else {
         this.title = "新增门店";
         this.form = {
@@ -128,26 +131,26 @@ export default {
       }
       this.showVisible = true;
     },
-    showStatus(showStatus){
-      let name = ''
+    showStatus(showStatus) {
+      let name = "";
       switch (showStatus) {
         case 0:
-          name="未绑定"
+          name = "未绑定";
           break;
         case 1:
-          name="已绑定"
+          name = "已通过";
           break;
         case 2:
-          name="审核中"
+          name = "审核中";
           break;
         case 3:
-          name="已拒绝"
+          name = "审核失败";
           break;
-      
+
         default:
           break;
       }
-      return name
+      return name;
     },
     showMap() {
       this.$refs.orderMap.chooseLocation();
@@ -330,29 +333,32 @@ export default {
 
   .reviewed {
     .item {
-      display: flex;
-      align-items: center;
-      justify-content: space-between;
-      height: 40px;
-
-      .left {
+      .reason {
+        font-size: 12px;
+        color: crimson;
+      }
+      .left-wrap {
         display: flex;
         align-items: center;
-        line-height: 0;
-
-        .logo {
-          width: 20px;
-          height: 20px;
-          border-radius: 50%;
-          margin-right: 10px;
-        }
+        justify-content: space-between;
+        height: 40px;
+        .left {
+          display: flex;
+          align-items: center;
+          line-height: 0;
+          .logo {
+            width: 20px;
+            height: 20px;
+            border-radius: 50%;
+            margin-right: 10px;
+          }
 
-        .label {
-          font-size: 14px;
-          color: #000000;
+          .label {
+            font-size: 14px;
+            color: #000000;
+          }
         }
       }
-
       .tip {
         display: flex;
         align-items: center;