Browse Source

1. 优化不限null 改为 0

MONSTER-ygh 11 months ago
parent
commit
3a3d04d10e

+ 6 - 6
src/views/tourism/productManagement/formBox/scenicAreaTicketsSpecsForm.vue

@@ -453,19 +453,19 @@ export default {
           if( !res.data.goodsPerformSpecial ) {
             obj['ageRadio'] = "-1"
           }
-          if( res.data.goodsPerformSpecial && res.data.goodsPerformSpecial.age ) {
+          if( res.data.goodsPerformSpecial && res.data.goodsPerformSpecial.age && res.data.goodsPerformSpecial.age != 0 ) {
             obj['ageRadio'] = "-2"
             obj['ageMin'] = res.data.goodsPerformSpecial.age.split('~')[0]
             obj['ageMax'] = res.data.goodsPerformSpecial.age.split('~')[1]
           }else {
             obj['ageRadio'] = "-1"
           }
-          if( res.data.goodsPerformSpecial && res.data.goodsPerformSpecial.sex ) {
+          if( res.data.goodsPerformSpecial && res.data.goodsPerformSpecial.sex && res.data.goodsPerformSpecial.sex != 0 ) {
             obj['sex'] = res.data.goodsPerformSpecial.sex
           }else {
             obj['sex'] = -1
           }
-          if( res.data.goodsPerformSpecial && res.data.goodsPerformSpecial.area ) {
+          if( res.data.goodsPerformSpecial && res.data.goodsPerformSpecial.area && res.data.goodsPerformSpecial.area != 0 ) {
             obj['areaRadio'] = "-2"
             obj['area'] = res.data.goodsPerformSpecial.area
           }else {
@@ -575,14 +575,14 @@ export default {
         }
       }
       params['goodsPerformSpecial'] = {}
-      params.goodsPerformSpecial['sex'] = params.sex == -1 ?null : params.sex
+      params.goodsPerformSpecial['sex'] = params.sex == -1 ?0 : params.sex
       if(params.ageRadio == -1) { // 指定年龄
-        params.goodsPerformSpecial['age'] = null
+        params.goodsPerformSpecial['age'] = 0
       }else if(params.ageRadio == -2) {
         params.goodsPerformSpecial['age'] = params.ageMin + "~" + params.ageMax
       }
       if(params.areaRadio == -1) { // 指定年龄
-        params.goodsPerformSpecial['area'] = null
+        params.goodsPerformSpecial['area'] = 0
       }else if(params.areaRadio == -2) {
         params.goodsPerformSpecial['area'] = params.area
       }