Browse Source

bug修改

wangfei 6 years ago
parent
commit
efc2219e70
1 changed files with 15 additions and 8 deletions
  1. 15
    8
      src/pages/system/goodsManager/goodManager/edit.vue

+ 15
- 8
src/pages/system/goodsManager/goodManager/edit.vue View File

123
     }),
123
     }),
124
     Case: {
124
     Case: {
125
       get () {
125
       get () {
126
-        return this.detail.CaseId || this.caseid
126
+        return this.detail.CaseId
127
       },
127
       },
128
       set (val) {
128
       set (val) {
129
         this.UpdateInfo({ ...this.detail, CaseId: val })
129
         this.UpdateInfo({ ...this.detail, CaseId: val })
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
-      }
182
       if ((this.detail.GoodsName || '') === '') {
175
       if ((this.detail.GoodsName || '') === '') {
183
         this.$message({
176
         this.$message({
184
           type: 'error',
177
           type: 'error',
212
         if (!this.detail.CaseId || this.detail.CaseId === '') {
205
         if (!this.detail.CaseId || this.detail.CaseId === '') {
213
           this.detail.CaseId = this.caseid
206
           this.detail.CaseId = this.caseid
214
         }
207
         }
208
+        if ((this.detail.CaseId || '') === '') {
209
+          this.$message({
210
+            type: 'error',
211
+            message: '案场不能为空'
212
+          })
213
+          return false
214
+        }
215
         this.AddGoods(this.detail)
215
         this.AddGoods(this.detail)
216
       } else {
216
       } else {
217
+        if ((this.detail.CaseId || '') === '') {
218
+          this.$message({
219
+            type: 'error',
220
+            message: '案场不能为空'
221
+          })
222
+          return false
223
+        }
217
         this.UpdateGoods(this.detail)
224
         this.UpdateGoods(this.detail)
218
       }
225
       }
219
       this.$message({
226
       this.$message({