浏览代码

产品信息完善id

lilei 11 月之前
父节点
当前提交
8994f1d751

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1721114850301
+  "version": 1721120079425
 }

+ 1 - 1
src/views/customerManagement/customerInfo/detailModal.vue

@@ -56,7 +56,7 @@ export default {
       type: Boolean,
       default: false
     },
-    itemId: {
+    itemId: { // 客户id
       type: [Number, String],
       default: ''
     }

+ 10 - 9
src/views/customerManagement/customerInfo/edit.vue

@@ -47,7 +47,7 @@
           <a-row :gutter="15">
             <a-col :span="24">
               <a-form-model-item label="客户地址" prop="countySn" :labelCol="{ span: 3 }" :wrapperCol="{ span: 20 }">
-                <AreaList changeOnSelect ref="areaList" v-model="areaVal" @change="areaChange"></AreaList>
+                <AreaList id="customerManagementEdit-area" changeOnSelect ref="areaList" v-model="areaVal" @change="areaChange"></AreaList>
               </a-form-model-item>
             </a-col>
             <a-col :span="24">
@@ -94,7 +94,7 @@
             <a-col :span="8">
               <a-form-model-item label="收款方式" prop="settleStyleSn">
                 <a-select id="customerManagementEdit-settleStyleSn" v-model="form.settleStyleSn" allowClear placeholder="请选择收款方式">
-                  <a-select-option v-for="item in settleStyleList" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
+                  <a-select-option v-for="item in settleStyleList" :id="item.settleStyleSn" :value="item.settleStyleSn" :key="item.settleStyleSn">{{ item.name }}</a-select-option>
                 </a-select>
               </a-form-model-item>
             </a-col>
@@ -124,7 +124,7 @@ export default {
   components: { STable, VSelect, custType, AreaList },
   mixins: [commonMixin],
   props: {
-    model: {
+    model: { // 组件形式
       type: String,
       default: 'page'
     }
@@ -157,7 +157,7 @@ export default {
         priceType: '', //  价格类型
         settleStyleSn: undefined //  收款方式
       },
-      areaVal:[],
+      areaVal: [], // 地区值
       rules: {
         customerName: [{ required: true, message: '请输入客户名称', trigger: 'blur' }],
         contactMobile: [{ required: false, pattern: /^\d{11}$/, message: '请输入正确的手机号', trigger: 'blur' }],
@@ -172,6 +172,7 @@ export default {
     }
   },
   methods: {
+    // 过滤空格
     filterEmpty () {
       let str = this.form.customerName
       str = str.replace(/\ +/g, '')
@@ -179,8 +180,8 @@ export default {
       str = str.replace(/[\r\n]/g, '')
       this.form.customerName = str
     },
-    areaChange (val,opts) {
-      console.log(opts)
+    // 选择地区
+    areaChange (val, opts) {
       this.form.provinceSn = val[0] ? val[0] : undefined
       this.form.provinceName = opts[0] ? opts[0].name : ''
       this.form.citySn = val[1] ? val[1] : undefined
@@ -188,13 +189,13 @@ export default {
       this.form.countySn = val[2] ? val[2] : undefined
       this.form.countyName = opts[2] ? opts[2].name : ''
     },
-    //  获取客户信息
+    // 获取客户信息
     getDetail () {
       custFindById({ id: this.$route.params.id }).then(res => {
         if (res.status == 200) {
           res.data.satelliteFlag = res.data.dealerFlag
           this.form = Object.assign(this.form, res.data)
-          this.areaVal = [res.data.provinceSn,res.data.citySn,res.data.countySn]
+          this.areaVal = [res.data.provinceSn, res.data.citySn, res.data.countySn]
         } else {
           this.$refs.ruleForm.resetFields()
         }
@@ -237,7 +238,6 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
@@ -251,6 +251,7 @@ export default {
       this.getSettleStyleList() // 收款方式
       this.$refs.ruleForm.resetFields()
     },
+    // 初始化页面
     initPage () {
       this.getBaseData()
       if (this.$route.params.id) {

+ 18 - 15
src/views/customerManagement/customerInfo/list.vue

@@ -17,7 +17,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="最后销售时间">
-                <rangeDate ref="rangeSaleDate" @change="dateSaleChange" />
+                <rangeDate id="customerManagementList-date" ref="rangeSaleDate" @change="dateSaleChange" />
               </a-form-item>
             </a-col>
             <template v-if="advanced">
@@ -39,24 +39,24 @@
               </a-col> -->
               <a-col :md="6" :sm="24">
                 <a-form-item label="客户地址">
-                  <AreaList changeOnSelect ref="areaList" @change="areaChange"></AreaList>
+                  <AreaList id="customerManagementList-area" changeOnSelect ref="areaList" @change="areaChange"></AreaList>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="客户类型">
-                  <custType v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型"></custType>
+                  <custType id="customerManagementList-custType" v-model="queryParam.customerTypeSn" allowClear placeholder="请选择客户类型"></custType>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="启用状态">
-                  <v-select code="ENABLE_FLAG" v-model="queryParam.enabledFlag" allowClear placeholder="请选择启用状态"></v-select>
+                  <v-select id="customerManagementList-flag" code="ENABLE_FLAG" v-model="queryParam.enabledFlag" allowClear placeholder="请选择启用状态"></v-select>
                 </a-form-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="customerManagementList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="customerManagementList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="customerManagementList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -88,25 +88,31 @@
             type="link"
             class="button-primary"
             @click="handleEdit(record)"
-            id="customerManagementList-edit-btn">编辑</a-button>
+            :id="'customerManagementList-edit-'+record.id">编辑</a-button>
           <a-button
             size="small"
             v-if="$hasPermissions('B_customer_customerInfo_detail')"
             type="link"
             class="button-success"
             @click="handleDetail(record)"
-            id="customerManagementList-detail-btn">详情</a-button>
+            :id="'customerManagementList-detail-'+record.id">详情</a-button>
           <a-button
             size="small"
             v-if="$hasPermissions('B_customer_customerInfo_edit')"
             type="link"
             class="button-primary"
             @click="mergeCustomer(record)"
-            id="customerManagementList-edit-btn">合并</a-button>
+            :id="'customerManagementList-merge-'+record.id">合并</a-button>
           <span v-if="!$hasPermissions('B_customer_customerInfo_edit') && !$hasPermissions('B_customer_customerInfo_detail')">--</span>
         </template>
         <template slot="enableAction" slot-scope="text, record">
-          <a-switch v-if="$hasPermissions('B_customer_customerInfo_enable')" checkedChildren="启用" unCheckedChildren="禁用" v-model="record.enabledFlag" @change="changeFlagHandle(text, record)"/>
+          <a-switch
+            :id="'customerManagementList-switch-'+record.id"
+            v-if="$hasPermissions('B_customer_customerInfo_enable')"
+            checkedChildren="启用"
+            unCheckedChildren="禁用"
+            v-model="record.enabledFlag"
+            @change="changeFlagHandle(text, record)"/>
           <span v-else :style="{color:(record.enabledFlag==1?'#00aa00':'#999')}"> {{ record.enabledFlag==1? '已启用': '已禁用' }} </span>
         </template>
       </s-table>
@@ -147,7 +153,7 @@ export default {
         dealerFlag: undefined, //  是否卫星仓客户
         customerTypeSn: undefined, //  客户类型
         enabledFlag: '1', //  启用状态
-        relationType: undefined
+        relationType: undefined // 客户关系
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [
@@ -198,6 +204,7 @@ export default {
       this.queryParam.saleBeginDate = date[0] ? date[0] : ''
       this.queryParam.saleEndDate = date[1] ? date[1] : ''
     },
+    // 地区
     areaChange (val) {
       this.queryParam.provinceSn = val[0] ? val[0] : undefined
       this.queryParam.citySn = val[1] ? val[1] : undefined
@@ -281,6 +288,7 @@ export default {
       this.customerTemp = row
       this.openMergeModal = true
     },
+    // 关闭合并客户弹框
     closeMergeModal (flag) {
       this.customerTemp = ''
       this.openMergeModal = false
@@ -293,11 +301,6 @@ export default {
       this.itemId = ''
       this.openModal = false
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 4 - 2
src/views/customerManagement/customerInfo/mergeCustomerModal.vue

@@ -24,6 +24,7 @@
         <a-form-model-item label="被合并的客户名称:" prop="customerSnSource">
           <custList
             ref="custList"
+            id="merge-form-cust"
             :notSn="form.customerSnTarget"
             :dealerFlag="0"
             dealerDisabled
@@ -52,7 +53,7 @@ export default {
       type: Boolean,
       default: false
     },
-    params: {
+    params: { // 参数
       type: Object,
       default () {
         return {}
@@ -87,17 +88,18 @@ export default {
         this.form.customerSnSource = undefined
       }
     },
+    // 保存
     handleSave () {
       const _this = this
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
           _this.confirmedSubmit()
         } else {
-          console.log('error submit!!')
           return false
         }
       })
     },
+    // 确认合并
     confirmedSubmit () {
       const _this = this
       this.$confirm({

+ 5 - 5
src/views/customerManagement/customerMerge/index.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="合并时间">
-                <rangeDate ref="customerMergeDate" @change="dateSaleChange" />
+                <rangeDate id="customerManagementList-mergeDate" ref="customerMergeDate" @change="dateSaleChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -58,10 +58,10 @@ export default {
       spinning: false,
       tableHeight: 0,
       queryParam: { //  查询条件
-        beginDate: undefined,
-        endDate: undefined,
-        customerNameSource: '',
-        customerNameMain: ''
+        beginDate: undefined, // 开始时间
+        endDate: undefined, // 结束时间
+        customerNameSource: '', // 合并前客户名称
+        customerNameMain: '' // 合并后客户名称
       },
       disabled: false, //  查询、重置按钮是否可操作
       columns: [

+ 4 - 9
src/views/productManagement/newProduct/list.vue

@@ -17,7 +17,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item :label="($route.params.onlineFalg=='1'?'上':'下')+'线时间'">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="productInfoList-time" ref="rangeDate" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
@@ -40,7 +40,7 @@
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="productInfoList-advance">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -80,7 +80,7 @@
             type="link"
             class="button-success"
             @click="handleDetail(record)"
-            id="productInfoList-detail-btn">详情</a-button>
+            :id="'productInfoList-detail-'+record.id">详情</a-button>
         </template>
       </s-table>
     </a-spin>
@@ -110,7 +110,7 @@ export default {
         code: '', //  产品编码
         name: '', //  产品名称
         origCode: '', //  原厂编码
-        sysFlag: '0',
+        sysFlag: '0', // 是否箭冠产品
         productBrandSn: undefined, //  产品品牌
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
@@ -174,11 +174,6 @@ export default {
       this.productType = []
       this.$refs.table.refresh(true)
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  详情
     handleDetail (row) {
       this.itemId = row.productSn

+ 1 - 1
src/views/productManagement/newProduct/modal.vue

@@ -15,7 +15,7 @@
         bordered>
       </s-table>
       <div style="padding-top: 15px;">
-        <a-button @click="viewMore" block type="primary" ghost>查看更多{{ onlineFalg==1?'新品':'下线产品' }}</a-button>
+        <a-button id="modal-more-action" @click="viewMore" block type="primary" ghost>查看更多{{ onlineFalg==1?'新品':'下线产品' }}</a-button>
       </div>
     </a-spin>
   </div>

+ 2 - 24
src/views/productManagement/priceChangeRecord/list.vue

@@ -6,7 +6,7 @@
         <a-row :gutter="15">
           <a-col :md="6" :sm="24">
             <a-form-item label="变更时间">
-              <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+              <rangeDate id="productChangeRecordList-time" ref="rangeDate" :value="time" @change="dateChange" />
             </a-form-item>
           </a-col>
           <a-col :md="6" :sm="24">
@@ -34,14 +34,7 @@
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productChangeRecordList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productChangeRecordList-reset">重置</a-button>
-            <!-- <a-button
-              style="margin: 0 0 18px 8px"
-              type="primary"
-              class="button-warning"
-              @click="handleExport"
-              :loading="exportLoading"
-              id="productChangeRecordList-export">导出</a-button> -->
-            <a @click="advanced=!advanced" style="margin-left: 5px">
+            <a @click="advanced=!advanced" style="margin-left: 5px" id="productChangeRecordList-advanced">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
@@ -104,7 +97,6 @@ import rangeDate from '@/views/common/rangeDate.vue'
 import ProductBrand from '@/views/common/productBrand.js'
 import ProductType from '@/views/common/productType.js'
 import { productPriceChangeList, getCurrentDealer } from '@/api/product'
-// import { downloadExcel } from '@/libs/JGPrint.js'
 export default {
   name: 'ProductPriceChangeList',
   components: { STable, VSelect, rangeDate, ProductBrand, ProductType },
@@ -257,26 +249,12 @@ export default {
       this.productType = []
       this.$refs.table.refresh(true)
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
       this.queryParam.productTypeSn2 = val[1] ? val[1] : ''
       this.queryParam.productTypeSn3 = val[2] ? val[2] : ''
     },
-    //  导出
-    handleExport () {
-      const params = this.queryParam
-      this.exportLoading = true
-      // customerBundleExportDelay(params).then(res => {
-      //   this.exportLoading = false
-      // downloadExcel(res, '价格变更记录')
-      // })
-    },
     //  产品分类  列表
     pageInit () {
       const _this = this

+ 3 - 1
src/views/productManagement/productBrand/editModal.vue

@@ -52,10 +52,11 @@ export default {
       default: false
     },
     itemId: {
+      // 编辑时传id
       type: [Number, String],
       default: ''
     },
-    nowData: {
+    nowData: { // 当前操作数据
       type: Object,
       default: null
     }
@@ -84,6 +85,7 @@ export default {
     }
   },
   methods: {
+    // 过滤空格
     filterEmpty () {
       let str = this.form.brandName
       str = str.replace(/\ +/g, '')

+ 3 - 3
src/views/productManagement/productBrand/list.vue

@@ -41,7 +41,7 @@
         <!-- 状态 -->
         <template slot="enabledFlag" slot-scope="text, record">
           <a-switch
-            id="productBrandList-enable"
+            :id="'productBrandList-enable-'+record.id"
             checkedChildren="启用"
             unCheckedChildren="禁用"
             v-if="$hasPermissions('B_product_dealerProductBrand_enable')&&record.sysFlag == 0"
@@ -57,7 +57,7 @@
             type="link"
             class="button-primary"
             @click="handleEdit(record)"
-            id="productBrandList-edit-btn">编辑</a-button>
+            :id="'productBrandList-edit-'+record.id">编辑</a-button>
           <span v-else>--</span>
         </template>
       </s-table>
@@ -84,7 +84,7 @@ export default {
         enabledFlag: undefined //  状态
       },
       disabled: false, //  查询、重置按钮是否可操作
-      tableHeight: 0,
+      tableHeight: 0, // 表格高度
       columns: [
         { title: '序号', dataIndex: 'no', width: '10%', align: 'center' },
         { title: '产品品牌名称', dataIndex: 'brandName', width: '30%', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },

+ 3 - 1
src/views/productManagement/productCategory/editModal.vue

@@ -88,6 +88,7 @@ export default {
     }
   },
   methods: {
+    // 过滤空格
     filterEmpty () {
       let str = this.form.productTypeName
       str = str.replace(/\ +/g, '')
@@ -135,7 +136,8 @@ export default {
         if (this.nowData && this.nowData.namePaths) {
           let namePathsArr = []
           namePathsArr = this.nowData.namePaths.split(',')
-          if (this.itemId) { //  编辑    编辑时不显示当前分类
+          if (this.itemId) { //  编辑
+            // 编辑时不显示当前分类
             namePathsArr = namePathsArr.slice(0, namePathsArr.length - 1)
           }
           this.parentType = ''

+ 3 - 3
src/views/productManagement/productCategory/list.vue

@@ -26,7 +26,7 @@
             class="button-primary"
             size="small"
             icon="plus"
-            id="productCategory-addSubItem"
+            :id="'productCategory-addSubItem-'+record.id"
             @click="handleAdd(record)">新增子级</a-button>
           <a-button
             v-if="record.pid != 0 && $hasPermissions('B_product_dealerProductType_edit')&&record.sysFlag == 0"
@@ -34,7 +34,7 @@
             class="button-primary"
             size="small"
             icon="edit"
-            id="productCategory-edit"
+            :id="'productCategory-edit-'+record.id"
             @click="handleEdit(record)">编辑</a-button>
           <a-button
             v-if="record.pid != 0 && $hasPermissions('B_product_dealerProductType_del')&&record.sysFlag == 0"
@@ -42,7 +42,7 @@
             class="button-error"
             size="small"
             icon="delete"
-            id="productCategory-del"
+            :id="'productCategory-del-'+record.id"
             @click="handleDel(record)">删除</a-button>
           <span v-if="!(record.productTypeLevel<3 && $hasPermissions('B_product_dealerProductType_add')&&record.sysFlag == 0) && !(record.pid != 0 && $hasPermissions('B_product_dealerProductType_edit')&&record.sysFlag == 0) && !(record.pid != 0 && $hasPermissions('B_product_dealerProductType_del')&&record.sysFlag == 0)">--</span>
         </template>

+ 1 - 0
src/views/productManagement/productInfo/detailModal.vue

@@ -44,6 +44,7 @@ export default {
     }
   },
   computed: {
+    // 产品分类
     productTypeName () {
       const productTypeName1 = this.detailsData && this.detailsData.productTypeName1 ? this.detailsData.productTypeName1 : ''
       const productTypeName2 = this.detailsData && this.detailsData.productTypeName2 ? ' > ' + this.detailsData.productTypeName2 : ''

+ 8 - 30
src/views/productManagement/productInfo/edit.vue

@@ -92,7 +92,7 @@
               @keydown.enter.native="nextFocus('productBrandSn', 'productType', $event)"
             >
               <a-spin v-if="fetching" slot="notFoundContent" size="small" />
-              <a-select-option v-for="item in productBrandList" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
+              <a-select-option v-for="item in productBrandList" :id="item.brandSn" :key="item.brandSn" :value="item.brandSn" :disabled="item.enabledFlag==0">{{ item.brandName }}</a-select-option>
             </a-select>
             <a-button
               v-if="$hasPermissions('B_product_dealerProductBrand_add')"
@@ -134,19 +134,6 @@
               @keydown.enter.native="nextFocus('specialPrice', 'terminalPrice', $event)"
               allowClear /><span>元</span>
           </a-form-model-item>
-          <!-- <a-form-model-item label="成本价" v-if="pageType=='pages'" prop="cost">
-            <a-input-number
-              id="productInfoEdit-cost"
-              v-model="form.cost"
-              :min="0"
-              :max="999999"
-              :precision="2"
-              style="width: 90%;margin-right: 5px;"
-              placeholder="请输入成本价(0~999999)"
-              ref="cost"
-              @keydown.enter.native="nextFocus('cost', 'terminalPrice', $event)"
-              allowClear /><span>元</span>
-          </a-form-model-item> -->
           <a-form-model-item label="终端价" prop="terminalPrice">
             <a-input-number
               id="productInfoEdit-terminalPrice"
@@ -254,6 +241,7 @@ export default {
     }
   },
   computed: {
+    // 是否编辑
     isEdit () {
       return this.pageType == 'pages' ? !!this.$route.params.id : false
     }
@@ -284,9 +272,9 @@ export default {
         specialPrice: '', //  经销价
         terminalPrice: '', //  终端价
         carOwnersPrice: '', //  车主价
-        putCost: '',
-        putQty: '',
-        warehouse: []
+        putCost: '', // 成本价
+        putQty: '', // 数量
+        warehouse: [] // 仓库
       },
       rules: {
         name: [
@@ -301,15 +289,6 @@ export default {
         productType: [
           { required: true, message: '请选择产品分类', trigger: 'change' }
         ],
-        // specialPrice: [
-        //   { required: true, type: 'number', message: '请输入经销批发价', trigger: 'change' }
-        // ],
-        // terminalPrice: [
-        //   { required: true, type: 'number', message: '请输入终端价', trigger: 'change' }
-        // ],
-        // carOwnersPrice: [
-        //   { required: true, type: 'number', message: '请输入车主价', trigger: 'change' }
-        // ],
         putQty: [
           { required: true, type: 'number', message: '请输入数量', trigger: 'change' }
         ],
@@ -324,12 +303,12 @@ export default {
     }
   },
   methods: {
+    // 选择仓库
     warehouseChange () {
       this.$refs.ruleForm.clearValidate('warehouse')
     },
     // 搜索品牌
     searchBrand (value, defval) {
-      console.log('fetching user', value)
       this.fetching = true
       dealerProductBrandQuery({ 'queryWord': value }).then(res => {
         if (res.status == 200) {
@@ -347,8 +326,8 @@ export default {
         }
       })
     },
+    // 品牌筛选
     filterOption (input, option) {
-      console.log(input, option.data.attrs.pinyin)
       return (
         option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0 ||
         option.data.attrs.pinyin && option.data.attrs.pinyin.toLowerCase().indexOf(input.toLowerCase()) >= 0
@@ -410,7 +389,6 @@ export default {
             }
           })
         } else {
-          console.log('error submit!!')
           return false
         }
       })
@@ -461,6 +439,7 @@ export default {
         this.loadingPtype = false
       })
     },
+    // 初始化页面
     pageInit () {
       this.$refs.ruleForm.resetFields()
       this.getProductType()
@@ -476,7 +455,6 @@ export default {
         this.$refs['name'].focus()
         // 如果是其它页面新建产品
         if (this.pageType == 'modal') {
-          console.log(this.paramsData)
           this.form = Object.assign(this.form, this.paramsData)
           this.$refs.warehouse.setDefaultVal()
         }

+ 12 - 33
src/views/productManagement/productInfo/list.vue

@@ -32,11 +32,11 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="是否有库存">
-                  <a-select allowClear v-model="queryParam.stockEmptyFlag" placeholder="请选择查看是否有库存">
-                    <a-select-option value="0">
+                  <a-select id="productInfoList-stockEmptyFlag" allowClear v-model="queryParam.stockEmptyFlag" placeholder="请选择查看是否有库存">
+                    <a-select-option value="0" id="productInfoList-stockEmptyFlag0">
                     </a-select-option>
-                    <a-select-option value="1">
+                    <a-select-option value="1" id="productInfoList-stockEmptyFlag1">
                     </a-select-option>
                   </a-select>
@@ -46,14 +46,7 @@
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="searchForm()" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm()" :disabled="disabled" id="productInfoList-reset">重置</a-button>
-              <!-- <a-button
-                style="margin: 0 0 18px 8px"
-                type="danger"
-                @click="handleExport"
-                :disabled="disabled"
-                :loading="exportLoading"
-                id="inventoryQueryList-export">导出</a-button> -->
-              <a @click="advanced = !advanced" style="margin-left: 5px">
+              <a @click="advanced = !advanced" style="margin-left: 5px" id="productInfoList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'" />
               </a>
@@ -64,13 +57,12 @@
       <!-- 操作按钮 -->
       <div class="table-operator">
         <a-button v-if="$hasPermissions('B_product_dealerProduct_add')" id="productInfoList-add" type="primary" class="button-error" @click="handleEdit()">新增</a-button>
-        <!-- <a-button id="productInfoList-import" @click="handleImport" style="margin: 0 15px;">批量导入产品</a-button> -->
         <a-dropdown v-if="$hasPermissions('B_product_dealerProduct_enable')">
-          <a-menu slot="overlay" @click="handleMenuClick">
-            <a-menu-item key="1"> 批量启用</a-menu-item>
-            <a-menu-item key="2"> 批量禁用</a-menu-item>
+          <a-menu slot="overlay" @click="handleMenuClick" id="productInfoList-menus">
+            <a-menu-item key="1" id="productInfoList-menus-1"> 批量启用</a-menu-item>
+            <a-menu-item key="2" id="productInfoList-menus-2"> 批量禁用</a-menu-item>
           </a-menu>
-          <a-button type="danger" ghost style="margin-left: 5px">批量操作 <a-icon type="down" /> </a-button>
+          <a-button id="productInfoList-menus-action" type="danger" ghost style="margin-left: 5px">批量操作 <a-icon type="down" /> </a-button>
         </a-dropdown>
         <span v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys">已选 {{ rowSelectionInfo.selectedRowKeys.length }} 项</span>
       </div>
@@ -100,7 +92,7 @@
         <!-- 状态 -->
         <template slot="enabledFlag" slot-scope="text, record">
           <a-switch
-            id="productInfoList-enable"
+            :id="'productInfoList-enable-'+record.productSn"
             checkedChildren="启用"
             unCheckedChildren="禁用"
             v-if="$hasPermissions('B_product_dealerProduct_enable')&&record.enabledFlag!=undefined"
@@ -119,7 +111,7 @@
             type="link"
             class="button-primary"
             @click="handleEdit(record)"
-            id="productInfoList-edit-btn"
+            :id="'productInfoList-edit-'+record.productSn"
           >
             编辑
           </a-button>
@@ -129,7 +121,7 @@
             type="link"
             class="button-success"
             @click="handleDetail(record)"
-            id="productInfoList-detail-btn"
+            :id="'productInfoList-detail-'+record.productSn"
           >
             详情
           </a-button>
@@ -225,15 +217,6 @@ export default {
             return text || text == 0 ? _this.toThousands(text, 2) : '--'
           }
         },
-        // {
-        //   title: '成本价',
-        //   dataIndex: 'specialPrice',
-        //   width: '7%',
-        //   align: 'right',
-        //   customRender: function (text) {
-        //     return text || text == 0 ? _this.toThousands(text, 2) : '--'
-        //   }
-        // },
         {
           title: '终端价',
           dataIndex: 'terminalPrice',
@@ -345,11 +328,6 @@ export default {
         this.$router.push({ path: '/productManagement/productInfo/add' })
       }
     },
-    //  批量导入
-    handleImport () {},
-    filterOption (input, option) {
-      return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-    },
     //  详情
     handleDetail (row) {
       this.itemId = row.id
@@ -433,6 +411,7 @@ export default {
         }
       })
     },
+    // 更多操作
     handleMenuClick (e) {
       this.handleOutbounds(e.key)
     },

+ 6 - 4
src/views/productManagement/productInfoJg/editPriceModal.vue

@@ -26,6 +26,7 @@
         </a-form-model-item>
         <a-form-model-item label="自定义终端价" prop="dealerProductPrice.terminalPrice">
           <a-input-number
+            id="editPrice-form-terminalPrice"
             :min="0.01"
             :max="999999"
             :precision="2"
@@ -39,6 +40,7 @@
         </a-form-model-item>
         <a-form-model-item label="自定义车主价" prop="dealerProductPrice.carOwnersPrice">
           <a-input-number
+            id="editPrice-form-carOwnersPrice"
             :min="0.01"
             :max="999999"
             :precision="2"
@@ -82,13 +84,13 @@ export default {
         wrapperCol: { span: 16 }
       },
       form: {
-        code: '',
-        name: '',
+        code: '', // 编码
+        name: '', // 名称
         terminalPrice: '', // 终端建议价
         carOwnersPrice: '', //  车主建议价
         dealerProductPrice: {
-          terminalPrice: '',
-          carOwnersPrice: ''
+          terminalPrice: '', // 终端价
+          carOwnersPrice: ''// 车主价
         }
       }
     }

+ 1 - 1
src/views/productManagement/productInfoJg/importGuideModal.vue

@@ -17,7 +17,7 @@
           <ul>
             <li>1)导入的Excel文件中必须包含名称为“产品编码”、“自定义终端价”、“自定义车主价”的列,且名称必须相同,其他列可自定义,不影响数据导入</li>
             <li>2)如果导入的产品已经存在,则按照更新处理</li>
-            <li><a :href="templUrl"><a-icon type="download" />下载导入模板</a></li>
+            <li><a :href="templUrl" id="importGuide-tpl-link"><a-icon type="download" />下载导入模板</a></li>
           </ul>
         </div>
         <div class="explain-item">

+ 44 - 49
src/views/productManagement/productInfoJg/list.vue

@@ -25,11 +25,6 @@
                 <ProductBrand id="productInfoList-productBrandSn" placeholder="请选择产品品牌" v-model="queryParam.productBrandSn"></ProductBrand>
               </a-form-item>
             </a-col>
-            <!-- <a-col :md="6" :sm="24">
-              <a-form-item label="产品分类">
-              <ProductType id="productInfoList-productType" placeholder="请选择产品分类" :isDealer="true" @change="changeProductType" v-model="productType"></ProductType>
-              </a-form-item>
-            </a-col> -->
             <a-col :md="6" :sm="24">
               <a-form-item label="产品状态">
                 <v-select code="ONLINE_FLAG" id="productInfoList-onlineFalg" v-model="queryParam.onlineFalg " allowClear placeholder="请选择产品状态"></v-select>
@@ -42,11 +37,11 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="是否有库存">
-                <a-select allowClear v-model="queryParam.stockEmptyFlag" placeholder="请选择查看是否有库存">
-                  <a-select-option value="0">
+                <a-select allowClear id="productInfoList-stockEmptyFlag" v-model="queryParam.stockEmptyFlag" placeholder="请选择查看是否有库存">
+                  <a-select-option value="0" id="stockEmptyFlag-0">
                   </a-select-option>
-                  <a-select-option value="1">
+                  <a-select-option value="1" id="stockEmptyFlag-1">
                   </a-select-option>
                 </a-select>
@@ -56,7 +51,7 @@
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="searchForm(true)" :disabled="disabled" id="productInfoList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
+            <a @click="advanced=!advanced" style="margin-left: 5px" id="productInfoList-advanced">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
@@ -69,50 +64,50 @@
       <a-row :gutter="16">
         <a-col class="gutter-row" :span="8">
           <a-dropdown>
-            <a-menu slot="overlay" @click="handleMenuClick">
-              <a-menu-item key="1"> 批量启用</a-menu-item>
-              <a-menu-item key="2"> 批量禁用</a-menu-item>
+            <a-menu slot="overlay" @click="handleMenuClick" id="productInfoList-menus">
+              <a-menu-item key="1" id="productInfoList-menus0"> 批量启用</a-menu-item>
+              <a-menu-item key="2" id="productInfoList-menus1"> 批量禁用</a-menu-item>
             </a-menu>
-            <a-button ghost type="danger"> 批量操作 <a-icon type="down" /> </a-button>
+            <a-button id="productInfoList-menus-action" ghost type="danger"> 批量操作 <a-icon type="down" /> </a-button>
           </a-dropdown>
           <span v-if="rowSelectionInfo&&rowSelectionInfo.selectedRowKeys">已选 {{ rowSelectionInfo.selectedRowKeys.length }} 项</span>
         </a-col>
         <a-col class="gutter-row " :span="16" style="text-align: right;">
           <a-dropdown v-model="showCell">
-            <a-button type="link" class="button-default"> <a-icon type="setting" />  显示</a-button>
-            <a-menu slot="overlay">
+            <a-button id="productInfoList-showcell" type="link" class="button-default"> <a-icon type="setting" />  显示</a-button>
+            <a-menu slot="overlay" id="productInfoList-menus-show">
               <a-menu-item v-if="currentDealerInfo.dealerLevel && (currentDealerInfo.dealerLevel == 'CITY'||currentDealerInfo.dealerLevel == 'PROVINCE')">
-                <a-checkbox v-model="isProPrice">
+                <a-checkbox id="productInfoList-cell-1" v-model="isProPrice">
                   省级价
                 </a-checkbox>
               </a-menu-item>
               <a-menu-item v-if="currentDealerInfo.dealerLevel && (currentDealerInfo.dealerLevel == 'CITY'||currentDealerInfo.dealerLevel == 'PROVINCE')&&$hasPermissions('M_ShowAllCityPrice')">
-                <a-checkbox v-model="isCityPrice">
+                <a-checkbox id="productInfoList-cell-2" v-model="isCityPrice">
                   市级价
                 </a-checkbox>
               </a-menu-item>
               <a-menu-item v-if="currentDealerInfo.isShowSpecialPrice && currentDealerInfo.isShowSpecialPrice == '1'">
-                <a-checkbox v-model="isSpecialPrice">
+                <a-checkbox id="productInfoList-cell-3" v-model="isSpecialPrice">
                   特约价
                 </a-checkbox>
               </a-menu-item>
               <a-menu-item>
-                <a-checkbox v-model="isZdPrice">
+                <a-checkbox id="productInfoList-cell-4" v-model="isZdPrice">
                   终端价
                 </a-checkbox>
               </a-menu-item>
               <a-menu-item>
-                <a-checkbox v-model="isTerminalPrice">
+                <a-checkbox id="productInfoList-cell-5" v-model="isTerminalPrice">
                   自定义终端价
                 </a-checkbox>
               </a-menu-item>
               <a-menu-item>
-                <a-checkbox v-model="isCzPrice">
+                <a-checkbox id="productInfoList-cell-6" v-model="isCzPrice">
                   车主价
                 </a-checkbox>
               </a-menu-item>
               <a-menu-item>
-                <a-checkbox v-model="isCarOwnersPrice">
+                <a-checkbox id="productInfoList-cell-7" v-model="isCarOwnersPrice">
                   自定义车主价
                 </a-checkbox>
               </a-menu-item>
@@ -120,15 +115,15 @@
           </a-dropdown>
           <a-divider type="vertical" style="margin:5px 0;"/>
           <a-dropdown>
-            <a-menu slot="overlay" @click="handleActions">
-              <a-menu-item key="2">
+            <a-menu slot="overlay" @click="handleActions" id="productInfoList-actions">
+              <a-menu-item key="2" id="productInfoList-ac-2">
                 <a-icon type="export" />自定义报价导出
               </a-menu-item>
-              <a-menu-item key="1">
+              <a-menu-item key="1" id="productInfoList-ac-1">
                 <a-icon type="import" />自定义报价导入
               </a-menu-item>
             </a-menu>
-            <a-button type="link" class="button-default"> <a-icon type="unordered-list" />  更多</a-button>
+            <a-button id="productInfoList-ac-more" type="link" class="button-default"> <a-icon type="unordered-list" />  更多</a-button>
           </a-dropdown>
         </a-col>
       </a-row>
@@ -163,6 +158,7 @@
       <!-- 状态 -->
       <template slot="enabledFlag" slot-scope="text, record">
         <a-switch
+          :id="'productInfoList-switch-'+record.productSn"
           checkedChildren="启用"
           unCheckedChildren="禁用"
           v-if="$hasPermissions('B_JgProduct_enable')&&record.enabledFlag!=undefined"
@@ -180,13 +176,13 @@
           type="link"
           class="button-success"
           @click="handleDetail(record)"
-          id="productInfoList-detail-btn">详情</a-button>
+          :id="'productInfoList-detail-'+record.productSn">详情</a-button>
         <a-button
           size="small"
           type="link"
           class="button-primary"
           @click="handleEditPrice(record)"
-          id="productInfoList-price-btn">自定义报价</a-button>
+          :id="'productInfoList-price-'+record.productSn">自定义报价</a-button>
       </template>
     </s-table>
     <!-- 导入产品 -->
@@ -224,18 +220,19 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        onlineFalg: '',
-        enabledFlag: '1',
-        stockEmptyFlag: undefined
+        onlineFalg: '', // 是否上线
+        enabledFlag: '1', // 启用禁用
+        stockEmptyFlag: undefined // 是否缺货
       },
-      openGuideModal: false,
-      isTerminalPrice: true,
-      isCarOwnersPrice: true,
-      isProPrice: true,
-      isCityPrice: true,
-      isSpecialPrice: true,
-      isZdPrice: true,
-      isCzPrice: true,
+      openGuideModal: false, // 导入弹框
+      // 显示列选项
+      isTerminalPrice: true, // 终端价
+      isCarOwnersPrice: true, // 车主价
+      isProPrice: true, // 促销价
+      isCityPrice: true, // 市场价
+      isSpecialPrice: true, // 特约价
+      isZdPrice: true, // 终端指导价
+      isCzPrice: true, // 车主指导价
       openEditPriceModal: false, // 自定义报价弹窗
       iconShowFlag: false, // 列表配置图标显示
       disabled: false, //  查询、重置按钮是否可操作
@@ -262,8 +259,8 @@ export default {
       openModal: false, //  查看客户详情  弹框
       itemId: '', //  当前产品id
       productTypeList: [], //  分类下拉数据
-      rowSelectionInfo: null,
-      currentDealerInfo: {}
+      rowSelectionInfo: null, // 已选产品
+      currentDealerInfo: {} // 经销商信息
     }
   },
   computed: {
@@ -286,7 +283,7 @@ export default {
         { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: '6%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
       ]
-
+      // 动态显示价格列
       if (_this.currentDealerInfo.dealerLevel && (_this.currentDealerInfo.dealerLevel == 'PROVINCE' || _this.currentDealerInfo.dealerLevel == 'CITY')) { //  省级
         if (this.isProPrice) {
           arr.push(
@@ -308,7 +305,6 @@ export default {
       if (_this.currentDealerInfo.isShowSpecialPrice && _this.currentDealerInfo.isShowSpecialPrice == '1' && _this.isSpecialPrice) { //  是否展示特约价
         arr.push({ title: '特约价', dataIndex: 'specialPrice', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
-
       if (_this.isZdPrice) {
         arr.push({ title: '终端价', dataIndex: 'terminalPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       }
@@ -326,6 +322,7 @@ export default {
     }
   },
   methods: {
+    // 预览图片
     inited (viewer) {
       if (viewer) {
         const imageUrl = []
@@ -371,11 +368,6 @@ export default {
         }
       })
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  产品分类  change
     changeProductType (val, opt) {
       this.queryParam.productTypeSn1 = val[0] ? val[0] : ''
@@ -433,9 +425,11 @@ export default {
         }
       })
     },
+    // 更多操作
     handleMenuClick (e) {
       this.handleOutbounds(e.key)
     },
+    // 初始化页面
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -455,7 +449,7 @@ export default {
         _this.openEditPriceModal = true
       })
     },
-    // 导入导出
+    // 选择导入导出
     handleActions (e) {
       if (e.key == 1) {
         this.openGuideModal = true
@@ -463,6 +457,7 @@ export default {
         this.handleExport()
       }
     },
+    // 导出
     handleExport () {
       const _this = this
       const params = _this.queryParam

+ 6 - 10
src/views/productManagement/productOnlineInfo/list.vue

@@ -17,7 +17,7 @@
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="上线时间'">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="productInfoList-date" ref="rangeDate" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <template v-if="advanced">
@@ -49,7 +49,7 @@
                 :loading="exportLoading"
                 v-if="$hasPermissions('B_productOnlineInfoExport')"
                 id="inventoryQueryList-export">导出</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="productInfoList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'"/>
               </a>
@@ -80,7 +80,7 @@
             type="link"
             class="button-success"
             @click="handleDetail(record)"
-            id="productOnlineInfoList-detail-btn">详情</a-button>
+            :id="'productOnlineInfoList-detail-'+record.id">详情</a-button>
         </template>
       </s-table>
     </a-spin>
@@ -115,8 +115,8 @@ export default {
         productTypeSn1: '', //  产品一级分类
         productTypeSn2: '', //  产品二级分类
         productTypeSn3: '', //  产品三级分类
-        isOnlinePage: '1',
-        bizType: 'ONLINE'
+        isOnlinePage: '1', // 上线or下线
+        bizType: 'ONLINE' // 上线
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false, // 导出loading
@@ -178,11 +178,6 @@ export default {
       this.productType = []
       this.$refs.table.refresh(true)
     },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
     //  详情
     handleDetail (row) {
       this.itemId = row.productSn
@@ -212,6 +207,7 @@ export default {
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 205

+ 8 - 6
src/views/productManagement/productUniversal/list.vue

@@ -34,7 +34,7 @@
           <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
             <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="productUniversalList-refresh">查询</a-button>
             <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="productUniversalList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 5px">
+            <a @click="advanced=!advanced" style="margin-left: 5px" id="productUniversalList-advanced">
               {{ advanced ? '收起' : '展开' }}
               <a-icon :type="advanced ? 'up' : 'down'"/>
             </a>
@@ -77,11 +77,11 @@ export default {
       advanced: true, // 高级搜索 展开/关闭
       tableHeight: 0,
       queryParam: { //  查询条件
-        productCode: '',
-        productName: '',
-        onlineFalg: undefined,
-        productCommonName: '',
-        productCommonCode: ''
+        productCode: '', // 产品编码
+        productName: '', // 产品名称
+        onlineFalg: undefined, // 上线状态
+        productCommonName: '', // 通用产品名称
+        productCommonCode: ''// 通用产品编码
       },
       productType: [],
       disabled: false, //  查询、重置按钮是否可操作
@@ -129,12 +129,14 @@ export default {
       this.queryParam.productCommonCode = ''
       this.$refs.table.refresh(true)
     },
+    // 初始化页面
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235