浏览代码

bug修改

wangfei 6 年前
父节点
当前提交
0df5419be4
共有 1 个文件被更改,包括 9 次插入12 次删除
  1. 9
    12
      src/pages/system/goodsManager/goodManager/edit.vue

+ 9
- 12
src/pages/system/goodsManager/goodManager/edit.vue 查看文件

63
             <div style="width:50%">
63
             <div style="width:50%">
64
               <el-select v-model="detailSpecs" multiple placeholder="请选择" style="width:100%;">
64
               <el-select v-model="detailSpecs" multiple placeholder="请选择" style="width:100%;">
65
                 <el-option
65
                 <el-option
66
-                  v-for="item in (Case === '' ? [] : specs.list)"
66
+                  v-for="item in ((Case || '') === '' ? [] : specs.list)"
67
                   :key="item.SpecId"
67
                   :key="item.SpecId"
68
                   :label="item.SpecName"
68
                   :label="item.SpecName"
69
                   :value="item.SpecId">
69
                   :value="item.SpecId">
78
             <div style="width:50%">
78
             <div style="width:50%">
79
               <el-select v-model="TypeId" placeholder="请选择商品类型">
79
               <el-select v-model="TypeId" placeholder="请选择商品类型">
80
                 <el-option
80
                 <el-option
81
-                  v-for="item in (Case === '' ? [] : types.list)"
81
+                  v-for="item in ((Case || '') === '' ? [] : types.list)"
82
                   :key="item.TypeId"
82
                   :key="item.TypeId"
83
                   :label="item.TypeName"
83
                   :label="item.TypeName"
84
                   :value="item.TypeId">
84
                   :value="item.TypeId">
172
           return x.ImgUrl
172
           return x.ImgUrl
173
         }
173
         }
174
       }).join(',')
174
       }).join(',')
175
+      if ((this.detail.CaseId || '') === '') {
176
+        this.$message({
177
+          type: 'error',
178
+          message: '案场不能为空'
179
+        })
180
+        return false
181
+      }
175
       if ((this.detail.GoodsName || '') === '') {
182
       if ((this.detail.GoodsName || '') === '') {
176
         this.$message({
183
         this.$message({
177
           type: 'error',
184
           type: 'error',
202
       }
209
       }
203
       if ((this.detail.GoodsId || '') === '') {
210
       if ((this.detail.GoodsId || '') === '') {
204
         this.detail.OrgId = this.orgid
211
         this.detail.OrgId = this.orgid
205
-        if (!this.detail.CaseId || this.detail.CaseId === '') {
206
-          this.detail.CaseId = this.caseid
207
-        }
208
-        if ((this.detail.CaseId || '') === '') {
209
-          this.$message({
210
-            type: 'error',
211
-            message: '案场不能为空'
212
-          })
213
-          return false
214
-        }
215
         this.AddGoods(this.detail)
212
         this.AddGoods(this.detail)
216
       } else {
213
       } else {
217
         if ((this.detail.CaseId || '') === '') {
214
         if ((this.detail.CaseId || '') === '') {