| | |
| | | trigger: ['blur', 'change'] |
| | | }], |
| | | tonnage:[{ |
| | | type: 'string', |
| | | type: 'number', |
| | | required: true, |
| | | message: '请输入吨数', |
| | | trigger: ['blur', 'change'] |
| | |
| | | this.$refs.uForm.setRules(this.rules) |
| | | }, |
| | | onLoad(opt) { |
| | | |
| | | if(opt.params) { //查看 |
| | | this.submitShow = false |
| | | this.modelForm = Object.assign({},JSON.parse(opt.params)) |
| | | this.$nextTick(() => { |
| | | this.modelForm = Object.assign({},JSON.parse(opt.params)) |
| | | return |
| | | }) |
| | | console.log(this.modelForm,'接收到上个页面传过来的参数===') |
| | | return |
| | | } |
| | | this.modelForm.samplingTime = todayDate(); //当前时间 |
| | | this.modelForm.samplingPerson = uni.getStorageSync('name') |
| | |
| | | |
| | | }, |
| | | inputVal(val) { |
| | | let temp = val.replace(/[^0-9.]+/g,'') |
| | | this.$nextTick(() => { |
| | | this.modelForm.tonnage = temp |
| | | }) |
| | | console.log(val,'val----') |
| | | if(val) { |
| | | let temp = val.toString().replace(/[^0-9.]+/g,'') |
| | | this.$nextTick(() => { |
| | | this.modelForm.tonnage = Number(temp) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | } |