| | |
| | | :confirm-working="isWorking" |
| | | @confirm="confirm" |
| | | > |
| | | <div class="box"> |
| | | <div class="box" id="section1"> |
| | | <div class="box_status"> |
| | | <div class="box_status_row" v-for="(item, index) in statusList" :key="index"> |
| | | <div :class="index <= i ? 'box_status_row_icon statusColor2 statusColor3' : 'box_status_row_icon'"> |
| | |
| | | </div> |
| | | <div class="box_desc_list_row"> |
| | | <el-form-item label="报案人联系方式" prop="informantPhone"> |
| | | <el-input v-model="form.informantPhone" placeholder="请输入"></el-input> |
| | | <el-input v-model="form.informantPhone" type="number" maxlength="11" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="box_desc_list_ZW"></div> |
| | |
| | | </el-form> |
| | | <div class="box_footer"> |
| | | <div class="box_footer_btns" v-if="i === 0"> |
| | | <el-button type="primary" @click="confirm(0)">暂存</el-button> |
| | | <el-button type="primary" :loading="isWorking" @click="confirm(0)">暂存</el-button> |
| | | <el-button type="primary" @click="next">下一步</el-button> |
| | | </div> |
| | | <div class="box_footer_btns" v-if="i === 1"> |
| | | <el-button @click="i--">上一步</el-button> |
| | | <el-button type="primary" @click="confirm(0)">暂存</el-button> |
| | | <el-button type="primary" @click="confirm(1)">提交</el-button> |
| | | <el-button @click="previousStep">上一步</el-button> |
| | | <el-button type="primary" :loading="isWorking" @click="confirm(0)">暂存</el-button> |
| | | <el-button type="primary" :loading="isWorking" @click="confirm(1)">提交</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | ...mapState(['userInfo']) |
| | | }, |
| | | data () { |
| | | var checkPhone = (rule, value, callback) => { |
| | | if (value === '') { |
| | | callback(new Error('请输入')); |
| | | } else if (!/^[1]\d{10}$/.test(value)) { |
| | | callback(new Error('手机号不合法')); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | | return { |
| | | i: 0, |
| | | id: null, |
| | |
| | | { required: true, message: '不能为空' } |
| | | ], |
| | | informantPhone: [ |
| | | { required: true, message: '不能为空' } |
| | | { required: true, validator: checkPhone } |
| | | ] |
| | | }, |
| | | pickerOptions: { |
| | |
| | | methods: { |
| | | open (title, id) { |
| | | this.title = title |
| | | this.continueReporting() |
| | | this.form.area = [] |
| | | this.i = 0 |
| | | this.solutionList = [] |
| | |
| | | } |
| | | }, |
| | | confirm (saveType) { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) return; |
| | | this.isWorking = true |
| | | saveSettleClaims({ ...this.form, saveType }) |
| | | .then(res => { |
| | | console.log(res) |
| | | if (saveType === 0) { |
| | | this.visible = false |
| | | } else { |
| | |
| | | .finally(() => { |
| | | this.isWorking = false |
| | | }) |
| | | }) |
| | | }, |
| | | previousStep() { |
| | | this.i-- |
| | | var element = document.getElementById('section1'); |
| | | element.scrollIntoView({ behavior: 'smooth' }); |
| | | }, |
| | | next () { |
| | | this.$refs.form.validate((valid) => { |
| | | if (!valid) return |
| | | this.i++ |
| | | // this.isWorking = true |
| | | // createSys(obj) |
| | | // .then(() => { |
| | | // this.visible = false |
| | | // this.$emit('success') |
| | | // }) |
| | | // .catch(e => { |
| | | // this.$tip.apiFailed(e) |
| | | // }) |
| | | // .finally(() => { |
| | | // this.isWorking = false |
| | | // }) |
| | | var element = document.getElementById('section1'); |
| | | element.scrollIntoView({ behavior: 'smooth' }); |
| | | }) |
| | | } |
| | | } |