YY 2 年之前
父節點
當前提交
b2aeabfcce
共有 1 個文件被更改,包括 10 次插入6 次删除
  1. 10 6
      src/components/salesParts/detail.vue

+ 10 - 6
src/components/salesParts/detail.vue

@@ -285,17 +285,21 @@ export default {
       if (this.$checkRes(res)) {
         if (res.errcode == '0') {
           if (res.data.customer) {
-            let customer = res.data.customer.list;
-            this.$set(this, `customer`, customer);
-            customer[0].color = '#0bbd87';
+            if (res.data.customer.list) {
+              let customer = res.data.customer.list;
+              this.$set(this, `customer`, customer);
+              customer[0].color = '#0bbd87';
+            }
             if (res.data.customer.is_check == '已签收' && this.info.status == '3') this.$set(this, `active`, 3);
             if (res.data.customer.is_check == '已签收' && this.info.status == '2') this.$set(this, `active`, 3);
           }
           if (res.data.shop) {
             if (this.info.status == '3') this.$set(this, `active`, 4);
-            let shopList = res.data.shop.list;
-            this.$set(this, `shopList`, shopList);
-            shopList[0].color = '#0bbd87';
+            if (res.data.shop.list) {
+              let shopList = res.data.shop.list;
+              this.$set(this, `shopList`, shopList);
+              shopList[0].color = '#0bbd87';
+            }
             if (res.data.shop.is_check == '已签收' && this.info.status == '3') this.$set(this, `active`, 5);
           }
           this.$set(this, `activit`, res.data);