BUG 28299
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<span class="label"><span class="tips">*</span>类型</span>
|
||||
<div class="value" @click="selectClick('appSpecialTypeFive', 'userType')">
|
||||
<span
|
||||
:class="form.userType === '' ? 'color-999' : ''" >{{
|
||||
:class="form.userType === '' ? 'color-999' : ''">{{
|
||||
$dict.getLabel('appSpecialTypeFive', form.userType) || '请选择'
|
||||
}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="24"/>
|
||||
@@ -16,7 +16,7 @@
|
||||
<div class="value">
|
||||
|
||||
<u-input type="text" placeholder="请输入" v-model="form.name" input-align="right"
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false" />
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
@@ -24,36 +24,36 @@
|
||||
<div class="value">
|
||||
<u-input type="text" placeholder="请输入" v-model="form.idNumber" input-align="right"
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="18" :clearable="false"
|
||||
@input="changeIdNumber" />
|
||||
@input="changeIdNumber"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>性别</span>
|
||||
<div class="value">
|
||||
<u-input disabled placeholder="自动填充" v-model="form.gender" input-align="right"
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false" />
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="15" :clearable="false"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>出生日期</span>
|
||||
<div class="value">
|
||||
<u-input type="text" disabled placeholder="自动填充" v-model="form.birth" input-align="right"
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="19" :clearable="false" />
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="19" :clearable="false"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>联系电话</span>
|
||||
<div class="value">
|
||||
<u-input type="number" placeholder="请输入" v-model="form.phone" input-align="right"
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="11" :clearable="false" />
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="11" :clearable="false"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips">*</span>所属区域</span>
|
||||
<div class="value">
|
||||
<AiAreaPicker v-model="form.areaId" @select="areaSelect" :fullName.sync="form.areaName" mode="custom" all>
|
||||
<AiAreaPicker v-model="form.areaId" @select="areaSelect" :fullName.sync="form.areaName" mode="custom" all>
|
||||
<span class="label font" v-if="form.areaName" style="font-size: 16px">{{ form.areaName }}</span>
|
||||
<span v-else :class="form.areaName === '' ? 'color-999' : ''" >请选择</span>
|
||||
<span v-else :class="form.areaName === '' ? 'color-999' : ''">请选择</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="24" style="margin-left:4px;"/>
|
||||
</AiAreaPicker>
|
||||
</div>
|
||||
@@ -62,10 +62,10 @@
|
||||
<span class="label"><span class="tips"></span>详细地址</span>
|
||||
<div class="value">
|
||||
<u-input type="textarea" placeholder="请输入" v-model="form.address"
|
||||
placeholder-style="color:#999;font-size:16px;" :maxlength="20" auto-height />
|
||||
placeholder-style="color:#999;font-size:16px;" :maxlength="20" auto-height/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="item">
|
||||
<span class="label"><span class="tips"></span>所属网格</span>
|
||||
<div class="value" @click="showGird=true">
|
||||
@@ -83,7 +83,8 @@
|
||||
<span class="label"><span class="tips"></span>{{ item.label }}</span>
|
||||
<div class="value">
|
||||
<u-input type="text" placeholder="请输入" v-model="form[item.formDbName]" input-align="right"
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="item.maxlength" :clearable="false" />
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="item.maxlength"
|
||||
:clearable="false"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -91,7 +92,8 @@
|
||||
<span class="label"><span class="tips"></span>{{ item.label }}</span>
|
||||
<div class="value">
|
||||
<u-input type="number" placeholder="请输入" v-model="form[item.formDbName]" input-align="right"
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="item.maxlength" :clearable="false" />
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="item.maxlength"
|
||||
:clearable="false"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -99,7 +101,8 @@
|
||||
<span class="label"><span class="tips"></span>{{ item.label }}</span>
|
||||
<div class="value">
|
||||
<u-input type="number" placeholder="请输入" v-model="form[item.formDbName]" input-align="right"
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="item.maxlength" :clearable="false" @input="changeMoney" style="font-size: 16px"/>
|
||||
placeholder-style="color:#999;font-size:16px;" height="48" :maxlength="item.maxlength"
|
||||
:clearable="false" @input="changeMoney" style="font-size: 16px"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -107,7 +110,7 @@
|
||||
<span class="label"><span class="tips"></span>{{ item.label }}</span>
|
||||
<div class="value" @click="selectClick(item.dict, item.formDbName)">
|
||||
<span
|
||||
:class="form[item.formDbName] === '' ? 'color-999' : ''" >{{
|
||||
:class="form[item.formDbName] === '' ? 'color-999' : ''">{{
|
||||
$dict.getLabel(item.dict, form[item.formDbName]) || '请选择'
|
||||
}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="24"/>
|
||||
@@ -117,7 +120,7 @@
|
||||
<div class="item" v-if="item.type == 'time'">
|
||||
<span class="label"><span class="tips"></span>{{ item.label }}</span>
|
||||
<div class="value" @click="selectTime(item.formDbName)">
|
||||
<span :class="form[item.formDbName] === '' ? 'color-999' : ''" >{{
|
||||
<span :class="form[item.formDbName] === '' ? 'color-999' : ''">{{
|
||||
$dateFormat(form[item.formDbName], 'YYYY-MM-DD') || '请选择'
|
||||
}}</span>
|
||||
<u-icon name="arrow-right" color="#cccccc" size="24"/>
|
||||
@@ -128,7 +131,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="footer" @click="submit">
|
||||
<div class="btn">{{ isEdit? '保存' : '提交'}}</div>
|
||||
<div class="btn">{{ isEdit ? '保存' : '提交' }}</div>
|
||||
</div>
|
||||
|
||||
<u-picker mode="time" v-model="dateShow" :params="deteParams" start-year="1900" @confirm="dateConfirm">请选择
|
||||
@@ -395,9 +398,9 @@ export default {
|
||||
onLoad(o) {
|
||||
this.$dict.load('appSpecialSituation', 'appSpecialPlacement', 'appSpecialDenger', 'appSpecialCrime',
|
||||
'appSpecialControl', 'appSpecialDebug', 'appSpecialDrug', 'appSpecialChangeType', 'appSpecialCure', 'appSpecialDengerLevel',
|
||||
'appSpecialDisableLevel', 'appSpecialDisableType', 'appSpecialHealth', 'appSpecialMarriage', 'appSpecialTypeFive','isReflection','yesOrNo').then(() => {
|
||||
'appSpecialDisableLevel', 'appSpecialDisableType', 'appSpecialHealth', 'appSpecialMarriage', 'appSpecialTypeFive', 'isReflection', 'yesOrNo').then(() => {
|
||||
}),
|
||||
this.gridName()
|
||||
this.gridName()
|
||||
if (o) {
|
||||
this.isEdit = true
|
||||
this.id = o.id
|
||||
@@ -432,23 +435,11 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
changeIdNumber() {
|
||||
if (this.form.idNumber.length != 18) {
|
||||
return this.$u.toast('请输入正确的身份证号码')
|
||||
} else {
|
||||
var people = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber)
|
||||
this.form.birth = people.birthday
|
||||
this.form.gender = people.gender
|
||||
|
||||
let reg = /^[1-9]\d{5}(18|19|20)\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
|
||||
if (!reg.test(this.form.idNumber)) {
|
||||
return this.$u.toast('请输入正确的身份证号码')
|
||||
}
|
||||
}
|
||||
let people = this.$idCardNoUtil.getIdCardInfo(this.form.idNumber)
|
||||
this.form.birth = people.birthday
|
||||
this.form.gender = people.gender
|
||||
},
|
||||
|
||||
changeMoney() {
|
||||
let moneyReg = /^([0-9]{1,5})(\.[0-9]{1,3}){0,1}$/
|
||||
if (!moneyReg.test(this.form.income)) {
|
||||
@@ -484,7 +475,7 @@ export default {
|
||||
return this.$u.toast('请输入身份证号')
|
||||
}
|
||||
if (
|
||||
!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)
|
||||
!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)
|
||||
) {
|
||||
return this.$u.toast("请输入正确的身份证账号");
|
||||
}
|
||||
@@ -495,35 +486,35 @@ export default {
|
||||
return this.$u.toast('请选择区域')
|
||||
}
|
||||
if (this.form.userType == 1) {
|
||||
if (!/^([0-9]{1,5})(\.[0-9]{1,3}){0,1}$/.test(this.form.income)){
|
||||
if (!/^([0-9]{1,5})(\.[0-9]{1,3}){0,1}$/.test(this.form.income)) {
|
||||
return this.$u.toast('输入的数字不能超过10万')
|
||||
}
|
||||
}
|
||||
|
||||
var urlList = ['app/appspecialdisabled/addOrUpdate', 'app/appspecialmental/addOrUpdate', 'app/appspecialadjustment/addOrUpdate',
|
||||
'app/appspecialdrug/addOrUpdate','app/appspecialprison/addOrUpdate']
|
||||
'app/appspecialdrug/addOrUpdate', 'app/appspecialprison/addOrUpdate']
|
||||
|
||||
this.$http.post(urlList[this.form.userType], {
|
||||
...this.form,
|
||||
id: this.isEdit ? this.id : ''
|
||||
}).then(res => {
|
||||
if(res.code == 0) {
|
||||
}).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast(this.isEdit ? '信息保存成功' : '信息提交成功')
|
||||
uni.$emit('specialPeopleList')
|
||||
setTimeout(() => {
|
||||
uni.navigateBack()
|
||||
}, 600)
|
||||
this.isEdit = !this.isEdit
|
||||
} else if(res.code == 1) {
|
||||
} else if (res.code == 1) {
|
||||
this.$u.toast('保存失败,信息未填写')
|
||||
} else {
|
||||
this.$confirm('是否放弃编辑当前信息').then(()=>{
|
||||
this.$confirm('是否放弃编辑当前信息').then(() => {
|
||||
uni.navigateBack()
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
areaSelect(e){
|
||||
areaSelect(e) {
|
||||
this.form.areaId = e
|
||||
},
|
||||
|
||||
@@ -579,6 +570,7 @@ export default {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
font-size: 32px;
|
||||
|
||||
.u-icon {
|
||||
margin-left: 16px;
|
||||
}
|
||||
@@ -626,9 +618,9 @@ export default {
|
||||
}
|
||||
|
||||
::v-deep .uni-input-form,
|
||||
::v-deep .uni-textarea-textarea,
|
||||
::v-deep .uni-textarea-textarea,
|
||||
::v-deep .uni-input-input,
|
||||
::v-deep .uni-input-placeholder,
|
||||
::v-deep .uni-input-placeholder,
|
||||
::v-deep .uni-input-wrapper {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user