chenrui 9 mesi fa
parent
commit
c819467800

+ 12 - 9
src/views/easyPassManagement/shoppingManagement/addCategoryModal.vue

@@ -1,7 +1,7 @@
 <template>
   <a-modal
     centered
-    class="promotionRules-rule-modal"
+    class="add-category-modal"
     :footer="null"
     :maskClosable="false"
     :title="itemSn ? '编辑类目':'新增类目'"
@@ -10,7 +10,7 @@
     :width="700">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model
-        id="promotionRules-rule-form"
+        id="add-category-form"
         ref="ruleForm"
         :model="form"
         :rules="rules"
@@ -23,7 +23,7 @@
         <a-form-model-item label="上传图标" prop="logo">
           <Upload
             class="upload"
-            id="promotionEdit-imageSet"
+            id="add-category-imageSet"
             v-model="form.logo"
             ref="imageSet"
             :fileSize="10"
@@ -33,7 +33,7 @@
         </a-form-model-item>
         <a-form-model-item label="类目名称" prop="name">
           <a-input
-            id="promotionEdit-title"
+            id="add-category-title"
             :maxLength="30"
             v-model.trim="form.name"
             placeholder="请输入类目名称(最多5个字符)"
@@ -42,7 +42,7 @@
         </a-form-model-item>
         <a-form-model-item label="优先级" prop="tip">
           <a-input
-            id="promotionEdit-title"
+            id="add-category-title"
             :maxLength="30"
             v-model.trim="form.tip"
             placeholder="请输入正整数,数字越大优先级越低"
@@ -51,8 +51,8 @@
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
-        <a-button id="promotionRules-rule-modal-back" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
-        <a-button type="primary" id="promotionRules-rule-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="add-category-modal-back" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
+        <a-button type="primary" id="add-category-modal-save" @click="handleSave">保存</a-button>
       </div>
     </a-spin>
   </a-modal>
@@ -60,7 +60,9 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { Upload } from '@/components'
+// 接口
 import { promoRuleSave } from '@/api/promoRule'
 export default {
   name: 'AddCategoryModal',
@@ -78,17 +80,18 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
         labelCol: { span: 3 },
         wrapperCol: { span: 20 }
       },
-      spinning: false,
       form: {
         name: '', //  促销类型
         tip: '', //  正价品数量
         logo: undefined //  促销品数量
       },
+      // 必填项验证
       rules: {
         name: [{ required: true, message: '请选择促销类型', trigger: 'change' }],
         tip: [{ required: true, message: '请输入正价品数量', trigger: 'blur' }],
@@ -164,7 +167,7 @@ export default {
 </script>
 
 <style lang="less">
-.promotionRules-rule-modal {
+.add-category-modal {
 	.ant-modal-body {
 		padding: 40px 40px 24px;
 	}

+ 26 - 8
src/views/easyPassManagement/shoppingManagement/editProductModal.vue

@@ -1,7 +1,8 @@
 <template>
   <a-modal
     centered
-    class="promotionRules-rule-modal"
+    class="edit-product-modal"
+    id="edit-product-modal"
     :footer="null"
     :maskClosable="false"
     :title="编辑"
@@ -10,7 +11,7 @@
     :width="700">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model
-        id="promotionRules-rule-form"
+        id="edit-product-form"
         ref="ruleForm"
         :model="form"
         :rules="rules"
@@ -23,26 +24,40 @@
             code="PRINT_STATUS"
             placeholder="请选择售价类型"
             allowClear
+            id="edit-product-printStatus"
           ></v-select>
         </a-form-model-item>
         <a-form-model-item label="售价" prop="name">
-          <a-input-number :min="0" :max="999999999" :precision="2" :step="0.1" placeholder="请输入产品售价" />
+          <a-input-number
+            id="edit-product-price"
+            :min="0"
+            :max="999999999"
+            :precision="2"
+            :step="0.1"
+            placeholder="请输入产品售价" />
         </a-form-model-item>
         <a-form-model-item label="热销产品" prop="tip">
           <v-select
             v-model="queryParam.printStatus"
             code="FlAG"
+            id="edit-product-printStatus"
             placeholder="请选择是否是热销产品"
             allowClear
           ></v-select>
         </a-form-model-item>
         <a-form-model-item label="热销产品优先级" prop="tip">
-          <a-input-number :min="0" :max="999999999" :precision="0" :step="1" placeholder="请输入正整数,数字越大优先级越低" />
+          <a-input-number
+            id="edit-product-money"
+            :min="0"
+            :max="999999999"
+            :precision="0"
+            :step="1"
+            placeholder="请输入正整数,数字越大优先级越低" />
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
-        <a-button id="promotionRules-rule-modal-back" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
-        <a-button type="primary" id="promotionRules-rule-modal-save" @click="handleSave">保存</a-button>
+        <a-button id="edit-product-modal-back" @click="isShow = false" style="margin-right: 15px;">取消</a-button>
+        <a-button type="primary" id="edit-product-modal-save" @click="handleSave">保存</a-button>
       </div>
     </a-spin>
   </a-modal>
@@ -50,7 +65,9 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { VSelect } from '@/components'
+// 接口
 import { promoRuleSave } from '@/api/promoRule'
 export default {
   name: 'AddCategoryModal',
@@ -68,17 +85,18 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
       formItemLayout: {
         labelCol: { span: 3 },
         wrapperCol: { span: 20 }
       },
-      spinning: false,
       form: {
         name: '', //  促销类型
         tip: '', //  正价品数量
         logo: undefined //  促销品数量
       },
+      // 必填项校验
       rules: {
         name: [{ required: true, message: '请选择促销类型', trigger: 'change' }],
         tip: [{ required: true, message: '请输入正价品数量', trigger: 'blur' }],
@@ -154,7 +172,7 @@ export default {
 </script>
 
 <style lang="less">
-.promotionRules-rule-modal {
+.edit-product-modal {
 	.ant-modal-body {
 		padding: 40px 40px 24px;
 	}

+ 8 - 22
src/views/easyPassManagement/shoppingManagement/list.vue

@@ -1,9 +1,9 @@
 <template>
-  <a-card size="small" :bordered="false" class="marketingDivisionSetNew-wrap">
+  <a-card size="small" :bordered="false" class="shoppingManagementList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 操作按钮 -->
       <div ref="tableSearch" class="table-operator" style="border: 0;">
-        <a-button id="marketingDivisionSetNew-add" type="primary" @click="addCategory">新增类目</a-button>
+        <a-button id="shoppingManagementList-addType" type="primary" @click="addCategory">新增类目</a-button>
       </div>
       <!-- 列表 -->
       <s-table
@@ -40,27 +40,27 @@
             type="link"
             class="button-info"
             @click="handleEdit(record)"
-            :id="'marketingDivisionSetNew-edit-btn'+record.id">编辑</a-button>
+            :id="'shoppingManagementList-edit-btn'+record.id">编辑</a-button>
           <a-button
             size="small"
             type="link"
             class="button-info"
             v-if="record.type && record.type == 'root'"
             @click="addZone(record)"
-            :id="'marketingDivisionSetNew-edit-btn'+record.id">添加子类目</a-button>
+            :id="'shoppingManagementList-edit-btn'+record.id">添加子类目</a-button>
           <a-button
             size="small"
             type="link"
             class="button-success"
             v-else
             @click="handleAddProduct(record)"
-            :id="'marketingDivisionSetNew-edit-btn'+record.id">添加产品</a-button>
+            :id="'shoppingManagementList-edit-btn'+record.id">添加产品</a-button>
           <a-button
             size="small"
             type="link"
             class="button-error"
             @click="handleDel(record)"
-            :id="'marketingDivisionSetNew-del-btn'+record.id">删除</a-button>
+            :id="'shoppingManagementList-del-btn'+record.id">删除</a-button>
         </template>
       </s-table>
     </a-spin>
@@ -70,18 +70,6 @@
       :openModal="openCategoryModal"
       @ok="$refs.table.refresh()"
       @close="openCategoryModal=false"></addCategoryModal>
-    <!-- 新增分区 -->
-    <addZoneModal
-      v-drag
-      :openModal="openZoneModal"
-      :parentData="parentData"
-      @ok="$refs.table.refresh()"
-      @close="openZoneModal=false"></addZoneModal>
-    <!-- 查看经销商 -->
-    <viewDealers
-      :showModal="openDealerModal"
-      :parentData="parentData"
-      @close="openDealerModal=false"></viewDealers>
   </a-card>
 </template>
 
@@ -90,12 +78,10 @@ import { commonMixin } from '@/utils/mixin'
 // 组件
 import { STable, VSelect } from '@/components'
 import addCategoryModal from './addCategoryModal.vue'
-// import addZoneModal from './addZoneModal.vue'
-// import viewDealers from './viewDealers.vue'
 // 接口
 import { subareaQueryAll, deleteSubareaBySn, deleteSubareaAreaBySn } from '@/api/subarea'
 export default {
-  name: 'MarketingDivisionSetNew',
+  name: 'ShoppingManagementList',
   mixins: [commonMixin],
   components: { STable, VSelect, addCategoryModal },
   data () {
@@ -253,7 +239,7 @@ export default {
 }
 </script>
 <style lang="less">
-  .marketingDivisionSetNew-wrap{
+  .shoppingManagementList-wrap{
     height: 100%;
   }
 </style>

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

@@ -1,28 +1,28 @@
 <template>
   <div>
-    <a-card size="small" :bordered="false" class="rebateSettingsList-wrap searchBoxNormal">
+    <a-card size="small" :bordered="false" class="shoppingProductsList-wrap searchBoxNormal">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" id="shoppingProductsList-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品名称">
-                <a-input id="productPricingList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
+                <a-input id="shoppingProductsList-name" v-model.trim="queryParam.name" allowClear placeholder="请输入产品名称"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="产品编码/原厂编码">
-                <a-input id="productPricingList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
+                <a-input id="shoppingProductsList-queryWord" v-model.trim="queryParam.queryWord" allowClear placeholder="请输入产品编码/原厂编码"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="品牌">
-                <ProductBrand id="productPricingList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
+                <ProductBrand id="shoppingProductsList-productBrandSn" v-model="queryParam.productBrandSn"></ProductBrand>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="产品分类">
-                <ProductType id="productPricingList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
+                <ProductType id="shoppingProductsList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -41,11 +41,11 @@
     <a-card size="small" :bordered="false">
       <!-- 操作按钮 -->
       <div class="table-operator">
-        <a-button type="primary" @click="handleAddProduct">产品导入</a-button>
+        <a-button type="primary" id="shoppingProductsList-name" @click="handleAddProduct">产品导入</a-button>
         <span>
-          <a-button type="primary" class="button-info" @click="handleAdd">批量上架</a-button>
+          <a-button type="primary" id="shoppingProductsList-name" class="button-info" @click="handleAdd">批量上架</a-button>
           <a-button @click="handleAdd">批量下架</a-button>
-          <a-button type="primary" class="button-error" ghost @click="handleAdd">批量删除</a-button>
+          <a-button type="primary" class="button-error" id="shoppingProductsList-name" ghost @click="handleAdd">批量删除</a-button>
           <span>已选1项</span>
         </span>
       </div>
@@ -97,13 +97,15 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { STable, VSelect } from '@/components'
 import importGuideModal from './importGuideModal.vue'
 import productType from '@/views/common/productType.js'
 import productBrand from '@/views/common/productBrand.js'
+// 接口
 import { queryRebatePage } from '@/api/dealerRelation'
 export default {
-  name: 'RebateSettingsList',
+  name: 'ShoppingProductsList',
   mixins: [commonMixin],
   components: { STable, VSelect, importGuideModal, productType, productBrand },
   data () {