Explorar o código

增加商品种类

peicj hai 1 día
pai
achega
3af84748b5
Modificáronse 1 ficheiros con 33 adicións e 0 borrados
  1. 33 0
      src/views/store/storeProduct/index.vue

+ 33 - 0
src/views/store/storeProduct/index.vue

@@ -37,6 +37,16 @@
               />
         </el-select>
       </el-form-item>
+      <el-form-item label="商品种类" prop="productKind">
+        <el-select   v-model="queryParams.productKind" placeholder="请选择商品种类" clearable size="small" >
+          <el-option
+            v-for="item in productKindOptions"
+            :key="item.dictValue"
+            :label="item.dictLabel"
+            :value="item.dictValue"
+          />
+        </el-select>
+      </el-form-item>
 
       <el-form-item label="所属仓库" prop="productType">
         <el-select v-model="queryParams.warehouseCode" placeholder="请选择仓库" clearable size="small">
@@ -171,6 +181,11 @@
               <el-tag prop="productType" v-for="(item, index) in productTypeOptions"    v-if="scope.row.productType==item.dictValue">{{item.dictLabel}}</el-tag>
           </template>
       </el-table-column>
+      <el-table-column label="种类" align="center" prop="productKind" >
+        <template slot-scope="scope">
+          <el-tag prop="productKind" v-for="(item, index) in productKindOptions"    v-if="scope.row.productKind==item.dictValue">{{item.dictLabel}}</el-tag>
+        </template>
+      </el-table-column>
       <el-table-column label="状态" align="center" prop="isShow" >
           <template slot-scope="scope">
               <el-tag prop="status" v-for="(item, index) in isShowOptions"    v-if="scope.row.isShow==item.dictValue">{{item.dictLabel}}</el-tag>
@@ -535,6 +550,16 @@
                   />
             </el-select>
         </el-form-item>
+        <el-form-item label="商品种类" prop="productKind">
+          <el-select style="width: 240px" v-model="form.productKind" placeholder="请选择商品种类" clearable size="small" >
+            <el-option
+              v-for="item in productKindOptions"
+              :key="item.dictValue"
+              :label="item.dictLabel"
+              :value="item.dictValue"
+            />
+          </el-select>
+        </el-form-item>
         <el-form-item label="所属仓库" prop="warehouseCode">
           <el-select v-model="warehouseModel" placeholder="请选择仓库" clearable size="small">
             <el-option
@@ -682,6 +707,8 @@ export default {
       isHotOptions:[],
       isShowOptions:[],
       categoryOptions:[],
+      //商品种类
+      productKindOptions:[],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -709,6 +736,7 @@ export default {
         productType: null,
         isShow: "1",
         barCode:null,
+        productKind:null,
 
       },
       // 表单参数
@@ -795,6 +823,9 @@ export default {
     this.getDicts("store_product_is_show").then((response) => {
       this.isShowOptions = response.data;
     });
+    this.getDicts("product_kind").then((response) => {
+      this.productKindOptions = response.data;
+    });
     getAllShippingTemplates().then(response => {
       this.templateList =response.data;
     });
@@ -1003,6 +1034,7 @@ export default {
         productInfo: null,
         keyword: null,
         barCode: null,
+        productKind: "1",
         cateId: null,
         price: null,
         vipPrice: null,
@@ -1105,6 +1137,7 @@ export default {
         this.form.productType = response.data.productType.toString();
         this.form.isDisplay = response.data.isDisplay.toString();
         this.form.specialProducts = response.data.specialProducts || 0;
+        this.form.productKind = response.data.productKind.toString();
 
         this.warehouseModel = response.data.warehouseId