YY 2 years ago
parent
commit
b2aeabfcce
1 changed files with 10 additions and 6 deletions
  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);