网格员申报信息

This commit is contained in:
liuye
2022-03-18 14:45:15 +08:00
parent e0a5747090
commit 20a4017a81
6 changed files with 227 additions and 2 deletions

View File

@@ -0,0 +1,136 @@
<template>
<div class="AddGird">
<div class="item-flex">
<div class="label">
<span class="tips">*</span>姓名
</div>
<div class="value">
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="name" maxlength="50" />
</div>
</div>
<div class="item-flex">
<div class="label">
<span class="tips">*</span>手机号
</div>
<div class="value">
<u-input type="text" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="48" v-model="phone" maxlength="50" />
</div>
</div>
<div class="item-flex">
<div class="label">
<span class="tips">*</span>所属网格
</div>
<div class="value" @click="linkTo('./SelectGird?formType=2')">
<span v-if="selectGird.girdName">{{selectGird.girdName}}</span>
<span style="color:#999;" v-else>请选择</span>
<img src="./components/img/right-icon.png" alt="" /></div>
</div>
<div class="footer" @click="confirm">确认添加</div>
</div>
</template>
<script>
import {mapState} from 'vuex'
export default {
data() {
return {
name: '',
phone: '',
selectGird: {}
}
},
computed: {...mapState(['user'])},
onLoad() {
console.log(this.user)
this.name = this.user.name || ''
this.phone = this.user.phone || ''
uni.$on('goback', (res) => {
this.selectGird = res
})
},
onShow() {
document.title = '网格员信息申报'
},
methods: {
confirm() {
if(!this.name){
return this.$u.toast('请输入姓名')
}
if(!this.phone){
return this.$u.toast('请输入手机号')
}
if(!this.selectGird.girdName){
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')
})
},
linkTo(url) {
uni.navigateTo({ url })
},
}
}
</script>
<style lang="scss" scoped>
.AddGird {
.item-flex{
display: flex;
padding: 34px 32px;
background-color: #fff;
font-size: 32px;
font-family: PingFangSC-Regular, PingFang SC;
margin-bottom: 16px;
.label{
font-weight: 400;
color: #333333;
line-height: 22px;
width: 150px;
.tips{
display: inline-block;
width: 16px;
color: #F46;
line-height: 44px;
}
}
.value{
width: calc(100% - 150px);
line-height: 44px;
text-align: right;
color: #666;
img{
width: 32px;
height: 32px;
vertical-align: middle;
margin-left: 8px;
}
}
.color-999{
color: #999;
}
}
.footer{
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>

View File

@@ -0,0 +1,74 @@
<template>
<div class="success">
<img src="./components/img/success.png" alt="" v-if="status">
<img src="./components/img/fail.png" alt="" v-else>
<p>{{status == 1 ? '信息申报成功!' : '信息申报失败!'}}</p>
<p class="text">{{status == 1 ? '重新进入即可开始正常使用' : '系统无法匹配该申报信息,请联系管理人员进行处理'}}</p>
<div class="footer" @click="back">{{status ? '确定' : '我知道了'}}</div>
</div>
</template>
<script>
export default {
data() {
return {
status: 1
}
},
onShow() {
document.title = '网格员信息申报'
},
onLoad(option) {
this.status = option.status
},
methods: {
back() {
uni.navigateBack({delta: 2})
}
},
}
</script>
<style lang="scss" scoped>
uni-page-body{
height: 100%;
background-color: #fff;
}
.success {
text-align: center;
img{
width: 192px;
height: 192px;
margin: 96px 0 16px 0;
}
p{
line-height: 50px;
color: #333;
font-size: 36px;
font-weight: 500;
text-align: center;
margin-bottom: 16px;
}
.footer{
width: calc(100% - 96px);
height: 88px;
line-height: 88px;
background: #1365DD;
box-shadow: inset 0px 1px 0px 0px #EEEEEE;
font-size: 32px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #FFF;
text-align: center;
border-radius: 8px;
margin-left: 48px;
}
.text{
line-height: 44px;
font-size: 28px;
width: 500px;
margin: 0 auto 72px;
word-break: break-all;
}
}
</style>

View File

@@ -21,6 +21,7 @@
<div v-if="!isAdmin" class="empty">
<img src="./components/img/no-admin.png" alt="">
<p>没有网格员权限<br />无法查看网格信息哦~</p>
<div class="add-btn" @click="linkTo('./AddUser')">网格员信息申报</div>
</div>
</div>
</template>
@@ -62,7 +63,7 @@ export default {
],
isTab: true,
isAdmin: false,
checkType: ''
checkType: 0,
}
},
@@ -115,6 +116,9 @@ export default {
uni.$on('goback', (res) => {
this.params = res
})
uni.$on('updateGird', (res) => {
this.isGirdUser()
})
},
onReachBottom() {
if(!this.tabIndex) {
@@ -128,6 +132,7 @@ export default {
.AppGridManagement {
height: 100vh;
}
.pad-t32{
padding-top: 32px;
}
@@ -217,5 +222,16 @@ export default {
color: #999;
line-height: 40px;
}
.add-btn{
width: 400px;
height: 88px;
line-height: 88px;
text-align: center;
border-radius: 8px;
background-color: #3267f0;
color: #fff;
font-size: 30px;
margin: 200px auto 0;
}
}
</style>

View File

@@ -143,7 +143,6 @@ export default {
submit() {
if (this.SelectGird.id != null) {
uni.$emit('goback', this.SelectGird)
console.log(this.SelectGird)
uni.navigateBack()
} else {
return this.$u.toast('请选择网格')

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB