Bläddra i källkod

bugfix;代码优化;

Funny 2 år sedan
förälder
incheckning
06582d2974

+ 9 - 0
src/components/accountCompoents/consumption.vue

@@ -218,6 +218,15 @@ export default {
         case 3:
           name = "饿百";
           break;
+         case 4:
+          name = "山塘";
+          break;
+         case 5:
+          name = "美团闪购";
+          break;
+         case 6:
+          name = "京东到家";
+          break;
         case 99:
           name = "手动发单";
           break;

+ 6 - 5
src/components/accountCompoents/wallet.vue

@@ -18,9 +18,9 @@
       <div class="recharge_title">充值金额</div>
       <div class="recharge_list recharge_list_m">
         <div @click="chooseMoney(v,i)" :class="curIdx === i ? 'item item_ac' : 'item'" v-for="(v,i) in moneyList" :key="i"><span v-if="v.couponList || v.giveValue" class="item_tips">充值有礼</span>{{v.value}}元</div>
-        <el-input type='num' @focus="open" v-model="value" clearable :class="curIdx === -1 ? 'item item_ac' : 'item'" placeholder="其他金额" />
+        <el-input @focus="open" v-model="inputValue" clearable :class="curIdx === -1 ? 'item item_ac' : 'item'" placeholder="其他金额" />
       </div>
-      <div class="recharge_coupon" v-if="couponList.length || giveValue">
+      <div class="recharge_coupon" v-if="curIdx!==-1 && (couponList.length || giveValue)">
         <div class="recharge_coupon_top">
           <img src="../../../static/image/recharge_coupon.png" alt="" srcset="">
           <div class="recharge_coupon_top_left">充{{moneyList[curIdx].value}}元,
@@ -111,7 +111,7 @@ export default {
       payAmount: 0,
       centerDialogVisible: false,
       text: "",
-      value: "",
+      inputValue: "",
       checked: false,
       memberType: this.$store.state.userInfo.memberType,
       couponList: [],
@@ -132,6 +132,7 @@ export default {
   created() {
     this.getWallet();
     this.getRechargeList();
+    this.$store.dispatch("getUserInfo");
   },
   methods: {
     goDetail() {
@@ -188,7 +189,7 @@ export default {
       });
     },
     chooseMoney(v, i) {
-      this.value = "";
+      this.inputValue = "";
       this.curIdx = i;
       this.money = v.value;
       this.id = v.id;
@@ -203,7 +204,7 @@ export default {
     },
     recharge() {
       let params = {
-        money: this.value ? this.value : this.money,
+        money: this.inputValue ? this.inputValue : this.money,
         paymentType: this.paymentType,
         createType: 1,
         id: this.id,

+ 19 - 26
src/components/orderComponents/orderList.vue

@@ -115,7 +115,7 @@
                 <!-- <el-button size='small' @click.stop="iGnoreOrder(item.id)">忽略订单</el-button> -->
                 <!-- <el-button size='small' @click.stop="itemAddRemark(item.id, item)">添加备注</el-button> -->
                 <el-button v-if="item.waimaiOrderId" size="small" class="btn" @click.stop="settingTime(item)">{{
-                  item.delayTime ? "修改定时" : "定时发单"
+                  item.delayTime ? "修改定时" : "预约发单"
                 }}</el-button>
 
                 <el-button v-else size="small" class="btn" @click.stop="sendNow(item)">立即配送</el-button>
@@ -430,6 +430,7 @@ export default {
       return { background: bgColor };
     },
     againSend(order) {
+      let orderCopy = this.$tool.deepClone(order);
       if ([97, 98].includes(order.buttonStatus)) {
         this.$confirm("当前订单已完成,确认要再次发起配送吗?", "提示", {
           confirmButtonText: "确定",
@@ -437,34 +438,26 @@ export default {
           center: true,
         })
           .then(() => {
-            this.showParentOrderSn = true;
-            if (
-              order.waimaiOrderId &&
-              !order.addDelivery &&
-              order.buttonStatus !== -2
-            ) {
-              order.waimaiOrderId = null;
-              order.id = null;
-              order.waimaiId = null;
-              order.weight = 1;
-            }
-            this.getValuation(order);
+            this.beforeValuation(orderCopy);
           })
           .catch(() => {});
       } else {
-        this.showParentOrderSn = true;
-        if (
-          order.waimaiOrderId &&
-          !order.addDelivery &&
-          order.buttonStatus !== -2
-        ) {
-          order.waimaiOrderId = null;
-          order.id = null;
-          order.waimaiId = null;
-          order.weight = 1;
-        }
-        this.getValuation(order);
+        this.beforeValuation(orderCopy);
+      }
+    },
+    beforeValuation(orderCopy) {
+      this.showParentOrderSn = true;
+      if (
+        orderCopy.waimaiOrderId &&
+        !orderCopy.addDelivery &&
+        orderCopy.buttonStatus !== -2
+      ) {
+        orderCopy.waimaiOrderId = null;
+        orderCopy.id = null;
+        orderCopy.waimaiId = null;
+        orderCopy.weight = 1;
       }
+      this.getValuation(orderCopy);
     },
     paySuccess() {
       this.showCode = false;
@@ -652,6 +645,7 @@ export default {
       this.cancelStatus = true;
     },
     chooseOrder(v, index) {
+      this.curIdx = index;
       this.buttonStatus = this.list[index].buttonStatus;
       if (this.buttonStatus === 0 || this.buttonStatus === 10) {
         this.needTrack = false;
@@ -660,7 +654,6 @@ export default {
         this.needTrack = true;
         this.orderDetailStutus = 0;
       }
-      this.curIdx = index;
       this.getDetailOrder();
       this.getTrackOrder();
       this.getRiderArriveTime();

+ 2 - 2
src/components/orderComponents/orderTrack.vue

@@ -126,13 +126,13 @@ export default {
       let data = itemList.find((v) => {
         return v.orderStatus === 5;
       });
-      return data.nodeTime || "--";
+      return (data && data.nodeTime) || "--";
     },
     shipperReceiveTime(itemList) {
       let data = itemList.find((v) => {
         return v.orderStatus === 2;
       });
-      return data.nodeTime || "--";
+      return (data && data.nodeTime) || "--";
     },
     showCancelType(type) {
       let name = "";

+ 4 - 15
src/components/settingComponents/print/greetingCardPrinter.vue

@@ -94,11 +94,11 @@
               </div>
               <div class="setting-params">
                 <div class="card-title">贺卡尺寸</div>
-                <el-input ref="cardWidth" :disabled="[9,11].includes(params.sizeType)" v-model="params.cardWidth" @change="checkCardWidth">
+                <el-input ref="cardWidth" :disabled="[9,11].includes(params.sizeType)" v-model="params.cardWidth">
                   <template slot="prepend">宽</template>
                   <template slot="append">毫米</template>
                 </el-input>
-                <el-input ref="cardHeight" :disabled="[9,11].includes(params.sizeType)" v-model="params.cardHeight" @change="checkCardHeight">
+                <el-input ref="cardHeight" :disabled="[9,11].includes(params.sizeType)" v-model="params.cardHeight">
                   <template slot="prepend">高</template>
                   <template slot="append">毫米</template>
                 </el-input>
@@ -463,25 +463,13 @@ export default {
       return isShow;
     },
     ...mapMutations(["SET_USERINFO"]),
-    checkCardWidth(e) {
-      if (e < 195) {
-        this.$message.error(`自定义纸张宽度不可小于195毫米!`);
-        this.$refs.cardWidth.focus();
-      }
-    },
-    checkCardHeight(e) {
-      if (e < 145) {
-        this.$message.error(`自定义纸张高度不可小于145毫米!`);
-        this.$refs.cardHeight.focus();
-      }
-    },
     saveCard() {
       if (this.params.sizeType === 0) {
         if (this.params.cardWidth < 195) {
           this.$refs.cardWidth.focus();
           return this.$message.error(`自定义纸张宽度不可小于195毫米!`);
         }
-        if (this.params.cardWidth < 145) {
+        if (this.params.cardHeight < 145) {
           this.$refs.cardHeight.focus();
           return this.$message.error(`自定义纸张高度不可小于145毫米!`);
         }
@@ -628,6 +616,7 @@ export default {
       if (v) this.form = this.$tool.deepClone(v);
       if (this.form.id) return;
       this.form.name = `贺卡打印云盒${new Date().getTime()}`;
+      this.cloudList = []
     },
     changeShop(e) {
       if (e.at(-1)) {

+ 4 - 1
src/components/settingComponents/print/printerAdd.vue

@@ -146,7 +146,10 @@ export default {
           message: "请填写打印机编号!",
         });
       }
-      if (this.form.deviceType !== 25 && !this.form.deviceSecret.trim()) {
+      if (
+        this.form.deviceType !== 25 &&
+        (!this.form.deviceSecret || !this.form.deviceSecret.trim())
+      ) {
         return this.$message({
           type: "error",
           message: "请填写打印机Key!",