| | |
| | | callback(new Error('请先选择省份')) |
| | | } else if (!this.form.cityId) { |
| | | callback(new Error('请选择城市')) |
| | | } else { |
| | | } else { |
| | | callback() |
| | | } |
| | | } |
| | |
| | | rules: { |
| | | cityId: [ |
| | | { required: true, validator: newRule, trigger: 'change' } |
| | | ], |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | |
| | | 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 }) |
| | |
| | | .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> |
| | | |