浏览代码

【管理后台】【商品管理】增加“是否支持兑换”的筛选项

guanglong 3 年之前
父节点
当前提交
2f329dc120
共有 1 个文件被更改,包括 15 次插入1 次删除
  1. 15 1
      src/views/business/goods/index.vue

+ 15 - 1
src/views/business/goods/index.vue

@@ -25,6 +25,13 @@
           <el-option label="已下架" value="off" />
         </el-select>
       </el-form-item>
+      <el-form-item label="是否支持兑换">
+        <el-select v-model="queryParams.exchangeShow" placeholder="请选择是否支持兑换" clearable @change="queryParams.pageNum = 1;getList()">
+          <el-option label="全部" value="" />
+          <el-option label="支持兑换" value="1" />
+          <el-option label="不支持兑换" value="0" />
+        </el-select>
+      </el-form-item>
       <el-form-item label="采购价格">
         <el-input v-model="queryParams.minCost" placeholder="最低采购价格" clearable @keyup.enter.native="queryParams.pageNum = 1;getList()" />
       </el-form-item>
@@ -76,6 +83,12 @@
           ¥{{$numberFormat(row.cost)}}
         </template>
       </el-table-column>
+      <el-table-column label="是否支持兑换" prop="exchangeShow">
+        <template slot-scope="{row}">
+          <span v-if="row.exchangeShow == '1'">支持</span>
+          <span v-if="row.exchangeShow == '0'">不支持</span>
+        </template>
+      </el-table-column>
       <el-table-column label="兑换盲豆数量" prop="exchangePrice" />
       <el-table-column label="销量" prop="exchangedQty" />
       <el-table-column label="库存" prop="quantity" />
@@ -130,6 +143,7 @@ export default {
         title: this.queryParams.title,
         goodsId: this.queryParams.goodsId,
         status: this.queryParams.status,
+        exchangeShow: this.queryParams.exchangeShow,
         minCost: accMul(this.queryParams.minCost, 100),
         maxCost: accMul(this.queryParams.maxCost, 100),
         minValue: accMul(this.queryParams.minValue, 100),
@@ -177,4 +191,4 @@ export default {
     }
   }
 }
-</script>
+</script>