From 9a31250d5318970e3b387a80388e6cdaf8d73854 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期三, 04 六月 2025 18:17:47 +0800
Subject: [PATCH] 提交
---
company/src/components/enterprise/onlineReporting.vue | 77 +++++++++++++++++++++-----------------
1 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/company/src/components/enterprise/onlineReporting.vue b/company/src/components/enterprise/onlineReporting.vue
index 5e21033..bdb78be 100644
--- a/company/src/components/enterprise/onlineReporting.vue
+++ b/company/src/components/enterprise/onlineReporting.vue
@@ -7,7 +7,7 @@
: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'">
@@ -181,7 +181,7 @@
</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>
@@ -393,13 +393,13 @@
</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>
@@ -432,6 +432,15 @@
...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,
@@ -521,7 +530,7 @@
{ required: true, message: '涓嶈兘涓虹┖' }
],
informantPhone: [
- { required: true, message: '涓嶈兘涓虹┖' }
+ { required: true, validator: checkPhone }
]
},
pickerOptions: {
@@ -544,6 +553,7 @@
methods: {
open (title, id) {
this.title = title
+ this.continueReporting()
this.form.area = []
this.i = 0
this.solutionList = []
@@ -758,40 +768,37 @@
}
},
confirm (saveType) {
- this.isWorking = true
- saveSettleClaims({ ...this.form, saveType })
- .then(res => {
- console.log(res)
- if (saveType === 0) {
- this.visible = false
- } else {
- this.id = res
- this.i = 2
- }
- this.$emit('success')
- }).catch(err => {
- this.$tip.apiFailed(err)
- })
- .finally(() => {
- this.isWorking = false
+ this.$refs.form.validate((valid) => {
+ if (!valid) return;
+ this.isWorking = true
+ saveSettleClaims({ ...this.form, saveType })
+ .then(res => {
+ if (saveType === 0) {
+ this.visible = false
+ } else {
+ this.id = res
+ this.i = 2
+ }
+ this.$emit('success')
+ }).catch(err => {
+ this.$tip.apiFailed(err)
+ })
+ .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' });
})
}
}
--
Gitblit v1.9.3