howie 3 лет назад
Родитель
Сommit
e4e68072e7
1 измененных файлов с 11 добавлено и 2 удалено
  1. 11 2
      src/views/supply/policy/components/retail_form.vue

+ 11 - 2
src/views/supply/policy/components/retail_form.vue

@@ -478,6 +478,8 @@
                   placeholder="选择销售类型"
                   style="width: 100%"
                 >
+                <el-option  label="默认" :value="''"></el-option>
+
                   <el-option
                     v-for="item in ztypeList"
                     :key="item.id"
@@ -1096,8 +1098,12 @@ export default {
           this.$set(item, "status2", "");
           this.$set(item, "userList", this.userList);
         });
-        this.mainForm.k3ServiceName = this.goodsList[0].wallets[0].serviceId;
+
+            if (this.goodsList.length && this.goodsList[0].wallets.length) {
+                this.mainForm.k3ServiceName = this.goodsList[0].wallets[0].serviceId;
         this.mainForm.k3ServiceId = this.goodsList[0].wallets[0].serviceId;
+            }
+
         this.cusIndex = 0;
         this.total = 0;
         this.popDataArr = [];
@@ -1120,8 +1126,11 @@ export default {
         } else {
           this.goodsList = arrData;
         }
-        this.mainForm.k3ServiceName = this.goodsList[0].wallets[0].serviceId;
+         if (this.goodsList.length && this.goodsList[0].wallets.length) {
+                this.mainForm.k3ServiceName = this.goodsList[0].wallets[0].serviceId;
         this.mainForm.k3ServiceId = this.goodsList[0].wallets[0].serviceId;
+            }
+
         this.goodsList.forEach((item) => {
           this.$set(item, "status1", "");
           this.$set(item, "status2", "");