| | |
| | | |
| | | |
| | | <view class="content bgc-ff"> |
| | | <u-form labelPosition="left" :model="info" :rules="rules" ref="form" labelWidth="90" |
| | | :labelStyle="{fontSize:'28rpx'}"> |
| | | <u-form-item label="地址" prop="address" :borderBottom="false" v-if="!isScan"> |
| | | <u-form labelPosition="left" :model="info" ref="form" labelWidth="90" :labelStyle="{fontSize:'28rpx'}"> |
| | | <u-form-item label="地址" prop="address" required :borderBottom="false" v-if="!isScan"> |
| | | <view class="address-row flex"> |
| | | <view class="address-content f-28" v-if="info.address"> |
| | | {{info.address}} |
| | |
| | | lat: "", |
| | | recContent: "" |
| | | }, |
| | | rules: { |
| | | // 'name': { |
| | | // type: 'string', |
| | | // required: true, |
| | | // message: '请输入姓名', |
| | | // trigger: ['blur', 'change'] |
| | | // }, |
| | | // 'phone': { |
| | | // type: 'string', |
| | | // required: true, |
| | | // message: '请输入手机号', |
| | | // trigger: ['blur', 'change'] |
| | | // }, |
| | | // rules: { |
| | | // // 'name': { |
| | | // // type: 'string', |
| | | // // required: true, |
| | | // // message: '请输入姓名', |
| | | // // trigger: ['blur', 'change'] |
| | | // // }, |
| | | // // 'phone': { |
| | | // // type: 'string', |
| | | // // required: true, |
| | | // // message: '请输入手机号', |
| | | // // trigger: ['blur', 'change'] |
| | | // // }, |
| | | |
| | | |
| | | address: [{ |
| | | type: 'number', |
| | | required: true, |
| | | message: '请输入地址', |
| | | trigger: ['blur', 'change'] |
| | | }] |
| | | }, |
| | | // address: [{ |
| | | // type: 'number', |
| | | // required: true, |
| | | // message: '请输入地址', |
| | | // trigger: ['blur', 'change'] |
| | | // }] |
| | | // }, |
| | | showSelectDate: false, |
| | | workTime: Number(new Date()), |
| | | isShowPicker: false, |
| | |
| | | |
| | | onReady() { |
| | | //onReady 为uni-app支持的生命周期之一 |
| | | this.$refs.form.setRules(this.rules) |
| | | // this.$refs.form.setRules(this.rules) |
| | | }, |
| | | |
| | | methods: { |
| | |
| | | |
| | | |
| | | submitInfo() { |
| | | this.$refs.form.validate().then(valid => { |
| | | this.checkImages(); |
| | | if (this.isEdit) { |
| | | this.updateWorkLogRequest() |
| | | } else { |
| | | this.addWorkLogRequest() |
| | | } |
| | | }) |
| | | |
| | | this.checkImages(); |
| | | if (!this.info.address) { |
| | | this.$showTips("请选择地址") |
| | | return |
| | | } |
| | | if (this.isEdit) { |
| | | this.updateWorkLogRequest() |
| | | } else { |
| | | this.addWorkLogRequest() |
| | | } |
| | | |
| | | }, |
| | | |
| | | addWorkLogRequest() { |