27609
This commit is contained in:
@@ -10,6 +10,10 @@
|
||||
<u-input v-model="toDay" disabled placeholder="请选择申请时间" />
|
||||
</u-form-item>
|
||||
|
||||
<u-form-item label="联系电话" prop="phone" required :border-bottom="false">
|
||||
<u-input v-model="forms.phone" placeholder="请输入联系电话" maxlength="11" />
|
||||
</u-form-item>
|
||||
|
||||
<div class="line"></div>
|
||||
|
||||
<u-form-item label="积分类型" prop="applyIntegralType" required :border-bottom="false" right-icon="arrow-right">
|
||||
@@ -47,7 +51,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
forms: {
|
||||
name: '',
|
||||
phone: '',
|
||||
auditTime: '',
|
||||
applyIntegralType: '',
|
||||
applyIntegralTypeValue: '',
|
||||
@@ -67,6 +71,8 @@ export default {
|
||||
var month = toDay.getMonth() + 1 < 10 ? '0' + (toDay.getMonth() + 1) : toDay.getMonth() + 1
|
||||
var data = toDay.getDate() < 10 ? '0' + toDay.getDate() : toDay.getDate()
|
||||
this.toDay = year + '-' + month + '-' + data
|
||||
|
||||
this.forms.phone = this.user.phone
|
||||
})
|
||||
},
|
||||
onShow() {},
|
||||
@@ -78,8 +84,13 @@ export default {
|
||||
|
||||
this.$refs.uForm.validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.forms.name) {
|
||||
return this.$u.toast('请输入申请人')
|
||||
if (!this.forms.phone) {
|
||||
return this.$u.toast('请输入联系电话')
|
||||
}
|
||||
|
||||
const regPhone = /^1(3[0-9]|4[01456879]|5[0-35-9]|6[2567]|7[0-8]|8[0-9]|9[0-35-9])\d{8}$/
|
||||
if (this.forms.phone && !regPhone.test(this.forms.phone)) {
|
||||
return this.$u.toast('请输入正确的手机号')
|
||||
}
|
||||
|
||||
if (!this.forms.applyIntegralType) {
|
||||
@@ -100,6 +111,7 @@ export default {
|
||||
this.$instance
|
||||
.post(`/app/appvillagerintegraldeclare/addOrUpdate`, {
|
||||
name: this.user.realName,
|
||||
residentPhone: this.forms.phone,
|
||||
applyIntegralType: this.forms.applyIntegralTypeValue,
|
||||
description: this.forms.description,
|
||||
applyFiles: imgs || [],
|
||||
|
||||
Reference in New Issue
Block a user