Browse Source

修改bug

chenrui 9 months ago
parent
commit
ab4ab598a7

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

@@ -105,7 +105,7 @@ export default {
         priceType: 'TERMINAL_PRICE', // 售价类型
         price: '', // 售价
         hotFlag: undefined, // 是否是热销产品
-        hotSort: ''// 热销产品优先级
+        hotSort: undefined// 热销产品优先级
       },
       // 必填项校验
       rules: {
@@ -129,7 +129,7 @@ export default {
       shopProductDetail({ shopProductSn: this.itemSn }).then(res => {
         if (res.status == 200 && res.data) {
           res.data.oldPrice = res.data.price
-          res.data.hotSort = res.data.hotFlag == '0' ? '' : res.data.hotSort
+          res.data.hotSort = res.data.hotFlag == '0' ? undefined : res.data.hotSort
           this.form = res.data
           this.spinning = false
         } else {
@@ -140,7 +140,7 @@ export default {
     // 热销产品切换时清空数据
     handleHotProduct (e) {
       if (e == 0) {
-        this.form.hotSort = ''
+        this.form.hotSort = undefined
       }
     },
     //  保存
@@ -172,8 +172,8 @@ export default {
     reSetForm () {
       this.form.priceType = 'TERMINAL_PRICE'
       this.form.price = ''
-      this.form.hotFlag = 'undefined'
-      this.form.hotSort = ''
+      this.form.hotFlag = undefined
+      this.form.hotSort = undefined
       this.$refs.ruleForm.resetFields()
     }
   },

+ 2 - 2
src/views/easyPassManagement/shoppingProducts/list.vue

@@ -385,8 +385,8 @@ export default {
     },
     // 商城类目
     changeProductsCategory (val) {
-      this.queryParam.categorySn1 = val[0] ? val[0] : ''
-      this.queryParam.categorySn2 = val[1] ? val[1] : ''
+      this.queryParam.categorySn1 = val[0] ? val[0] : undefined
+      this.queryParam.categorySn2 = val[1] ? val[1] : undefined
     },
     // 删除
     handleDel (row) {