YY 2 роки тому
батько
коміт
41162a7f09
1 змінених файлів з 2 додано та 8 видалено
  1. 2 8
      src/views/platActivi/act/parts/goods/goodsSpec.vue

+ 2 - 8
src/views/platActivi/act/parts/goods/goodsSpec.vue

@@ -30,7 +30,7 @@ export default {
     const that = this;
     return {
       // 列表
-      opera: [{ label: '添加', method: 'add' }],
+      opera: [{ label: '添加', method: 'add', display: (i) => i.num > 0 }],
       fields: [
         { label: '规格名称', model: 'name', showTip: false },
         { label: '实际销售价格', model: 'sell_money' },
@@ -54,13 +54,7 @@ export default {
       info.goods = this.goods;
       let res = await this.gQuery({ skip, limit, ...info });
       if (this.$checkRes(res)) {
-        let list = [];
-        for (const p1 of res.data) {
-          if (p1.num > 0) {
-            list.push(p1);
-          }
-        }
-        this.$set(this, 'list', list);
+        this.$set(this, 'list', res.data);
         this.$set(this, 'total', res.total);
       }
     },