Ver Fonte

Merge branch 'test' into 'master'

Test

See merge request quanshu/mp-ui-pc!110
zhong chunping há 3 anos atrás
pai
commit
fd740c9315

+ 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>

+ 2 - 0
src/views/business/ticket/create.vue

@@ -349,6 +349,7 @@
       title="添加盲豆奖品"
       :visible.sync="coinTableVisible"
       :before-close="close"
+      width="500px"
     >
       <el-form
         :model="coinForm"
@@ -361,6 +362,7 @@
             v-model="coinForm.quantity"
             size="small"
             placeholder="请输入盲豆数量"
+            style="width: 200px"
           />
         </el-form-item>
       </el-form>

+ 19 - 12
src/views/business/ticket/index.vue

@@ -14,6 +14,7 @@
           clearable
           size="small"
           style="width: 240px"
+          @clear="handleQuery"
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
@@ -108,7 +109,6 @@
         >
       </el-col>
 
-
       <right-toolbar
         :showSearch.sync="showSearch"
         @queryTable="getList()"
@@ -202,7 +202,7 @@
             >
             <el-button
               v-if="scope.row.status.value === 'on'"
-              v-hasPermi="['business:ticket:off']"
+              v-hasPermi="['business:ticket:on']"
               type="text"
               @click="setStatus(scope.row, 'off')"
               >下架</el-button
@@ -272,19 +272,28 @@ export default {
       importShow: false,
     };
   },
+  watch: {
+    $route: {
+      handler: function (val, oldVal) {
+        if (val.name == "Ticket") {
+          this.getList();
+        }
+      },
+    },
+  },
   created() {
     this.getList();
   },
   methods: {
     // 盲票组列表
     getList(reset) {
-     if (this.loading) {
-       return
-     }
-     this.loading = true
-     if (reset) {
-       this.queryParams = { pageNum: 1, pageSize: 20 }
-     }
+      if (this.loading) {
+        return;
+      }
+      this.loading = true;
+      if (reset) {
+        this.queryParams = { pageNum: 1, pageSize: 20 };
+      }
       getTicketList(
         "pageNum=" +
           this.pageParams.pageNum +
@@ -353,9 +362,7 @@ export default {
       this.getList();
     },
     // 重置
-    resetQuery() {
-
-    },
+    resetQuery() {},
     // 添加盲票组
     handleAdd() {
       this.$router.push({ name: "TicketCreate" });