2022-03-18 14:45:15 +08:00
|
|
|
<template>
|
2022-06-13 09:57:52 +08:00
|
|
|
<section class="AddGird">
|
2022-03-18 14:45:15 +08:00
|
|
|
<div class="item-flex">
|
|
|
|
|
<div class="label">
|
|
|
|
|
<span class="tips">*</span>姓名
|
|
|
|
|
</div>
|
|
|
|
|
<div class="value">
|
2022-06-13 09:57:52 +08:00
|
|
|
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="name" maxlength="50"/>
|
2022-03-18 14:45:15 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-flex">
|
|
|
|
|
<div class="label">
|
|
|
|
|
<span class="tips">*</span>手机号
|
|
|
|
|
</div>
|
|
|
|
|
<div class="value">
|
2022-06-13 09:57:52 +08:00
|
|
|
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="phone" maxlength="50"/>
|
2022-03-18 14:45:15 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="item-flex">
|
|
|
|
|
<div class="label">
|
|
|
|
|
<span class="tips">*</span>所属网格
|
|
|
|
|
</div>
|
2022-06-13 09:57:52 +08:00
|
|
|
<div class="value">
|
2022-06-13 10:04:44 +08:00
|
|
|
<AiPagePicker type="gird" v-model="selectGird" valueObj nodeKey="id" formType="2">
|
2022-06-13 09:57:52 +08:00
|
|
|
<AiMore v-model="selectGird.girdName"/>
|
|
|
|
|
</AiPagePicker>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="footer" @click="confirm">确认添加</div>
|
2022-03-18 14:45:15 +08:00
|
|
|
</div>
|
2022-06-13 09:57:52 +08:00
|
|
|
</section>
|
2022-03-18 14:45:15 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {mapState} from 'vuex'
|
2022-06-13 09:57:52 +08:00
|
|
|
|
2022-03-18 14:45:15 +08:00
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
name: '',
|
|
|
|
|
phone: '',
|
|
|
|
|
selectGird: {}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {...mapState(['user'])},
|
|
|
|
|
onLoad() {
|
|
|
|
|
this.name = this.user.name || ''
|
|
|
|
|
this.phone = this.user.phone || ''
|
|
|
|
|
},
|
|
|
|
|
onShow() {
|
|
|
|
|
document.title = '网格员信息申报'
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
confirm() {
|
2022-06-13 09:57:52 +08:00
|
|
|
if (!this.name) {
|
2022-03-18 14:45:15 +08:00
|
|
|
return this.$u.toast('请输入姓名')
|
|
|
|
|
}
|
2022-06-13 09:57:52 +08:00
|
|
|
if (!this.phone) {
|
2022-03-18 14:45:15 +08:00
|
|
|
return this.$u.toast('请输入手机号')
|
|
|
|
|
}
|
2022-06-13 09:57:52 +08:00
|
|
|
if (!this.selectGird.girdName) {
|
2022-03-18 14:45:15 +08:00
|
|
|
return this.$u.toast('请选择所属网格')
|
|
|
|
|
}
|
|
|
|
|
this.$http.post(`/app/appgirdmemberapply/girdMemberCheck?name=${this.name}&phone=${this.phone}&girdName=${this.selectGird.girdName}`).then((res) => {
|
|
|
|
|
if (res.code == 0) {
|
|
|
|
|
uni.$emit('updateGird')
|
|
|
|
|
this.linkTo('./AddUserSuccess?status=1')
|
|
|
|
|
}
|
|
|
|
|
}).catch((err) => {
|
|
|
|
|
this.linkTo('./AddUserSuccess?status=0')
|
|
|
|
|
})
|
|
|
|
|
},
|
2022-03-18 17:37:40 +08:00
|
|
|
|
2022-03-18 14:45:15 +08:00
|
|
|
linkTo(url) {
|
2022-06-13 09:57:52 +08:00
|
|
|
uni.navigateTo({url})
|
2022-03-18 14:45:15 +08:00
|
|
|
},
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.AddGird {
|
2022-06-13 09:57:52 +08:00
|
|
|
.item-flex {
|
2022-03-18 14:45:15 +08:00
|
|
|
display: flex;
|
|
|
|
|
padding: 34px 32px;
|
|
|
|
|
background-color: #fff;
|
|
|
|
|
font-size: 32px;
|
|
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
|
|
margin-bottom: 16px;
|
2022-06-13 09:57:52 +08:00
|
|
|
|
|
|
|
|
.label {
|
2022-03-18 14:45:15 +08:00
|
|
|
font-weight: 400;
|
|
|
|
|
color: #333333;
|
|
|
|
|
line-height: 22px;
|
|
|
|
|
width: 150px;
|
2022-06-13 09:57:52 +08:00
|
|
|
|
|
|
|
|
.tips {
|
2022-03-18 14:45:15 +08:00
|
|
|
display: inline-block;
|
|
|
|
|
width: 16px;
|
|
|
|
|
color: #F46;
|
|
|
|
|
line-height: 44px;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-06-13 09:57:52 +08:00
|
|
|
|
|
|
|
|
.value {
|
2022-03-18 14:45:15 +08:00
|
|
|
width: calc(100% - 150px);
|
|
|
|
|
line-height: 44px;
|
|
|
|
|
text-align: right;
|
|
|
|
|
color: #666;
|
2022-06-13 09:57:52 +08:00
|
|
|
|
|
|
|
|
img {
|
2022-03-18 14:45:15 +08:00
|
|
|
width: 32px;
|
|
|
|
|
height: 32px;
|
|
|
|
|
vertical-align: middle;
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-06-13 09:57:52 +08:00
|
|
|
|
|
|
|
|
.color-999 {
|
2022-03-18 14:45:15 +08:00
|
|
|
color: #999;
|
|
|
|
|
}
|
|
|
|
|
}
|
2022-06-13 09:57:52 +08:00
|
|
|
|
|
|
|
|
.footer {
|
2022-03-18 14:45:15 +08:00
|
|
|
width: 100%;
|
|
|
|
|
height: 112px;
|
|
|
|
|
line-height: 112px;
|
|
|
|
|
background: #1365DD;
|
|
|
|
|
position: fixed;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
left: 0;
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 36px;
|
|
|
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
color: #FFF;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|