doum
9 天以前 0d0e67818a45161af14114211f43aafd232a6da2
admin/src/components/business/OperaHotCityWindow.vue
@@ -28,7 +28,7 @@
          </div>
      </el-form-item>
      <el-form-item label="排序码(升序)" prop="sortnum">
        <el-input v-model="form.sortnum" placeholder="请输入排序码(升序)" v-trim/>
        <el-input v-model="form.sortnum" type="number"  placeholder="请输入排序码(升序)" v-trim/>
      </el-form-item>
    </el-form>
  </GlobalAlertWindow>
@@ -48,7 +48,7 @@
        callback(new Error('请先选择省份'))
      } else if (!this.form.cityId) {
        callback(new Error('请选择城市'))
      }  else {
      } else {
        callback()
      }
    }
@@ -72,7 +72,7 @@
      rules: {
        cityId: [
          { required: true, validator: newRule, trigger: 'change' }
        ],
        ]
      }
    }
  },
@@ -81,13 +81,13 @@
      api: '/business/hotCity',
      'field.id': 'id'
    })
    listByParentId({type: 0, parentId: ''})
    listByParentId({ type: 0, parentId: '' })
      .then(data => {
          this.province = data
        })
        this.province = data
      })
  },
  methods: {
    selectProvince(val) {
    selectProvince (val) {
      this.form.cityId = ''
      this.cities = []
      listByParentId({ type: 1, parentId: val })
@@ -97,13 +97,12 @@
        .catch(e => {
          this.$tip.error(e)
        })
    },
    numInput() {
    numInput () {
      // =""
      this.form.sortnum = this.form.sortnum.replace(/^(0+)|[^\d]+/g,'')
    },
  },
      this.form.sortnum = this.form.sortnum.replace(/^(0+)|[^\d]+/g, '')
    }
  }
}
</script>