Browse Source

FIX:修改添加商品

Long 1 month ago
parent
commit
fe2a99cfc0
1 changed files with 3 additions and 1 deletions
  1. 3 1
      src/views/store/storeProduct/index.vue

+ 3 - 1
src/views/store/storeProduct/index.vue

@@ -1157,8 +1157,10 @@ export default {
             return this.$message.warning('请点击生成规格!');
           }
           // 组装companyIds
-          if (this.form.companyIds.length != 0) {
+          if (this.form.companyIds.length) {
             this.form.companyIds = this.form.companyIds.join(',');
+          } else {
+            this.form.companyIds = null;
           }
           addOrEdit(this.form).then(response => {
             if (response.code === 200) {