chenrui před 9 měsíci
rodič
revize
36b0bbd130

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

@@ -103,9 +103,9 @@ export default {
       },
       // 必填项验证
       rules: {
+        iconUrl: [{ required: true, message: '请选择上传图标', trigger: 'change' }],
         categoryName: [{ required: true, message: '请输入类目名称', trigger: 'blur' }],
-        sort: [{ required: true, message: '请输入优先级', trigger: 'blur' }],
-        iconUrl: [{ required: true, message: '请选择上传图标', trigger: 'change' }]
+        sort: [{ required: true, message: '请输入优先级', trigger: 'blur' }]
       }
     }
   },

+ 5 - 9
src/views/easyPassManagement/shoppingManagement/chooseProductsModal.vue

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

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

@@ -164,7 +164,7 @@ export default {
       shopCategoryUpdateStatus(params).then(res => {
         if (res.status == 200) {
           _this.$message.success(res.message)
-          row.enableFlag = true
+          row.enableFlag = e
           _this.spinning = false
         } else {
           _this.spinning = false

+ 0 - 5
src/views/easyPassManagement/shoppingProducts/editProductModal.vue

@@ -185,11 +185,6 @@ export default {
         this.$emit('close')
         this.reSetForm()
       }
-    },
-    itemSn (newValue, oldValue) {
-      if (this.isShow && newValue) {
-        this.getDetail()
-      }
     }
   }
 }

+ 11 - 7
src/views/easyPassManagement/shoppingProducts/list.vue

@@ -153,7 +153,7 @@
     <!-- 导入产品 -->
     <importGuideModal :openModal="openGuideModal" @close="openGuideModal=false" @ok="hanldeOk" />
     <!-- 编辑 -->
-    <editProductModal :itemSn="itemProductSn" :openModal="openEditModal" @close="openEditModal=false" @ok="hanldeEditOk" ></editProductModal>
+    <editProductModal ref="editProduct" :itemSn="itemProductSn" :openModal="openEditModal" @close="openEditModal=false" @ok="hanldeEditOk" ></editProductModal>
   </div>
 </template>
 
@@ -241,21 +241,21 @@ export default {
     columns () {
       const _this = this
       const arr = [
-        { title: '序号', dataIndex: 'no', align: 'center', width: '60px' },
+        { title: '序号', dataIndex: 'no', align: 'center', width: '50px' },
         { title: '产品编码', dataIndex: 'productCode', width: '12%', align: 'center', scopedSlots: { customRender: 'productCode' } },
-        { title: '产品名称', dataIndex: 'productName', width: '16%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品名称', dataIndex: 'productName', width: '22%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '原厂编码', dataIndex: 'productOrigCode', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '品牌', dataIndex: 'productBrandName', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
         { title: '产品分类', align: 'center', width: '15%', scopedSlots: { customRender: 'productType' } },
         { title: '售价', dataIndex: 'price', width: '7%', align: 'right', customRender: function (text) { return text || text == 0 ? _this.toThousands(text, 2) : '--' } },
-        { title: '售价类型', dataIndex: 'priceType', scopedSlots: { customRender: 'priceType' }, align: 'center', width: '12%' },
+        { title: '售价类型', dataIndex: 'priceType', scopedSlots: { customRender: 'priceType' }, align: 'center', width: '10%' },
         { title: '终端价', dataIndex: 'terminalPrice', width: '7%', align: 'right', customRender: function (text) { return text || text == 0 ? _this.toThousands(text, 2) : '--' } },
         { title: '车主价', dataIndex: 'carOwnersPrice', width: '7%', align: 'right', customRender: function (text) { return text || text == 0 ? _this.toThousands(text, 2) : '--' } },
-        { title: '热销产品', dataIndex: 'hotFlag', scopedSlots: { customRender: 'hotFlag' }, align: 'center', width: '7%' },
+        { title: '热销产品', dataIndex: 'hotFlag', scopedSlots: { customRender: 'hotFlag' }, align: 'center', width: '6%' },
         { title: '优先级', dataIndex: 'hotSort', align: 'center', width: '7%', customRender: function (text) { return text || '--' } },
         { title: '添加时间', dataIndex: 'createDate', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
-        { title: '产品商城状态', dataIndex: 'statusDictValue', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '15%', align: 'center' }
+        { title: '产品商城状态', dataIndex: 'statusDictValue', align: 'center', width: '6%', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '14%', align: 'center' }
       ]
       if (!_this.itemCategorySn) {
         arr.splice(6, 0, { title: '商城类目', scopedSlots: { customRender: 'categoryName' }, width: '15%', align: 'center' })
@@ -346,6 +346,10 @@ export default {
     handleEdit (row) {
       this.itemProductSn = row.shopProductSn
       this.openEditModal = true
+      const _this = this
+      this.$nextTick(() => {
+        _this.$refs.editProduct.getDetail()
+      })
     },
     // 编辑成功
     hanldeEditOk () {