Browse Source

修改bug

chenrui 10 months ago
parent
commit
0c1e8ee4e7

+ 1 - 0
src/config/router.config.js

@@ -3558,6 +3558,7 @@ export const asyncRouterMap = [
                   title: '商城类目产品列表',
                   icon: 'file-ppt',
                   hidden: true,
+                  replaceTab: true,
                   permission: 'B_category_chooseProduct'
                 }
               }

+ 1 - 1
src/views/easyPassManagement/shoppingManagement/addCategoryModal.vue

@@ -39,7 +39,7 @@
             placeholder="请输入类目名称(最多5个字符)"
             allowClear/>
         </a-form-model-item>
-        <a-form-model-item label="优先级" prop="sort">
+        <a-form-model-item label="易码通优先级" prop="sort">
           <a-input-number
             style="width:100%;"
             id="add-category-sort"

+ 6 - 6
src/views/easyPassManagement/shoppingManagement/chooseProductsModal.vue

@@ -25,7 +25,7 @@
             <a-row :gutter="15">
               <a-col :md="8" :sm="24">
                 <a-form-model-item label="产品编码">
-                  <a-input id="chooseProducts-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
+                  <a-input id="chooseProducts-productCode" v-model.trim="queryParam.code" allowClear placeholder="请输入产品编码"/>
                 </a-form-model-item>
               </a-col>
               <a-col :md="8" :sm="24">
@@ -35,7 +35,7 @@
               </a-col>
               <a-col :md="8" :sm="24">
                 <a-form-model-item label="产品名称">
-                  <a-input id="chooseProducts-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
+                  <a-input id="chooseProducts-productName" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
                 </a-form-model-item>
               </a-col>
               <a-col :md="8" :sm="24">
@@ -135,9 +135,9 @@ export default {
       },
       //  查询条件
       queryParam: {
-        productCode: undefined, // 产品名称
+        code: undefined, // 产品名称
         origCode: undefined, // 产品编码
-        productName: undefined, // 原厂编码
+        name: undefined, // 原厂编码
         productBrandSn: undefined, //  产品品牌
         productType: [], // 产品分类
         productTypeSn1: '', //  产品一级分类
@@ -200,9 +200,9 @@ export default {
     },
     // 重置数据
     resetData () {
-      this.queryParam.productCode = undefined
+      this.queryParam.code = undefined
       this.queryParam.origCode = undefined
-      this.queryParam.productName = undefined
+      this.queryParam.name = undefined
       this.queryParam.productBrandSn = undefined
       this.queryParam.productTypeSn1 = ''
       this.queryParam.productTypeSn2 = ''

+ 1 - 0
src/views/easyPassManagement/shoppingManagement/list.vue

@@ -233,6 +233,7 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
+      console.log('4444444')
     },
     // 计算表格高度
     setTableH () {

+ 10 - 4
src/views/easyPassManagement/shoppingProducts/list.vue

@@ -34,6 +34,7 @@
                   :fieldNames="fieldNames"
                   :options="categoryOptions"
                   placeholder="请选择商城类目"
+                  @change="changeProductsCategory"
                   allowClear
                   v-model="category"/>
               </a-form-item>
@@ -208,7 +209,8 @@ export default {
         productTypeSn3: '', //  产品三级分类
         hotFlag: undefined, // 是否是热销产品
         status: undefined, // 状态
-        categorySn: undefined// 商城类目
+        categorySn1: undefined, // 商城一级类目
+        categorySn2: undefined// 商城二级类目
       },
       productNum: null, // 列表数据总条数
       categoryOptions: [], // 产品类目列表
@@ -221,8 +223,6 @@ export default {
         this.spinning = true
         if (this.itemCategorySn) {
           this.queryParam.categorySn = this.itemCategorySn
-        } else {
-          this.queryParam.categorySn = this.category ? this.category.length > 1 ? this.category[1] : this.category[0] : undefined
         }
         return shopProductList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
@@ -357,7 +357,8 @@ export default {
       this.queryParam.productTypeSn3 = ''
       this.queryParam.hotFlag = undefined
       this.queryParam.status = undefined
-      this.queryParam.categorySn = undefined
+      this.queryParam.categorySn1 = undefined
+      this.queryParam.categorySn2 = undefined
       this.productType = []
       this.category = []
       this.$refs.table.refresh(true)
@@ -382,6 +383,11 @@ export default {
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
+    // 商城类目
+    changeProductsCategory (val) {
+      this.queryParam.categorySn1 = val[0] ? val[0] : ''
+      this.queryParam.categorySn2 = val[1] ? val[1] : ''
+    },
     // 删除
     handleDel (row) {
       const _this = this