Browse Source

志愿者模块增加 黑名单功能 张勇

master
zhangyongzhangyong 6 years ago
parent
commit
9d55ad7900
  1. 61
      src/views/modules/user/volunteerinfo-check.vue
  2. 12
      src/views/modules/user/volunteerinfo-detail.vue
  3. 17
      src/views/modules/user/volunteerinfo.vue

61
src/views/modules/user/volunteerinfo-check.vue

@ -9,6 +9,7 @@
:model="dataForm" :model="dataForm"
:rules="dataRule" :rules="dataRule"
ref="dataForm" ref="dataForm"
v-if="clickStatus === 1"
@keyup.enter.native="dataFormSubmitHandle()" @keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"
> >
@ -27,10 +28,31 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template slot="footer"> <el-form
:model="dataForm"
:rules="dataRule"
ref="dataForm"
v-if="clickStatus === 2"
@keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : '80px'"
>
<el-form-item label="填写原因" prop="failureReason">
<el-input
v-model="dataForm.failureReason"
maxlength="50"
show-word-limit
placeholder="请您填写拉入黑名单原因,50字以内"
></el-input>
</el-form-item>
</el-form>
<template slot="footer" v-if="clickStatus === 1">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button> <el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button> <el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
</template> </template>
<template slot="footer" v-if="clickStatus === 2">
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
<el-button type="primary" @click="blackListSubmitHandle()">{{ $t('confirm') }}</el-button>
</template>
</el-dialog> </el-dialog>
</template> </template>
@ -46,6 +68,7 @@ export default {
failureReason: '', failureReason: '',
tagIds: [] tagIds: []
}, },
clickStatus: '',
tagOptions: [], tagOptions: [],
userGridList: [] userGridList: []
} }
@ -110,6 +133,42 @@ export default {
1000, 1000,
{ leading: true, trailing: false } { leading: true, trailing: false }
), ),
//
blackListSubmitHandle: debounce(
function () {
this.$refs['dataForm'].validate(valid => {
if (!valid) {
return false
}
let postData = {
id: this.dataForm.id,
auditStatus: '3',
failureReason: this.dataForm.failureReason
}
this.$http['post'](
'/app-user/volunteerinfo/volunteerInfoCheck',
postData
)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
this.visible = false
this.$emit('refreshDataList')
}
})
})
.catch(() => {})
})
},
1000,
{ leading: true, trailing: false }
),
showLeaderFlagFormatter (row, column, cellValue, index) { showLeaderFlagFormatter (row, column, cellValue, index) {
if (cellValue === '1') { if (cellValue === '1') {
return '是' return '是'

12
src/views/modules/user/volunteerinfo-detail.vue

@ -16,13 +16,13 @@
<span>{{dataForm.fullName}}</span> <span>{{dataForm.fullName}}</span>
</el-form-item> </el-form-item>
<el-form-item label="性别" prop="sex"> <el-form-item label="性别" prop="sex">
<span>{{dataForm.mobile}}</span> <span>{{dataForm.sex}}</span>
</el-form-item> </el-form-item>
<el-form-item label="出生日期" prop="birthday"> <el-form-item label="出生日期" prop="birthdayString">
<span>{{dataForm.identityNo}}</span> <span>{{dataForm.birthdayString}}</span>
</el-form-item> </el-form-item>
<el-form-item label="手机号" prop="mobile"> <el-form-item label="手机号" prop="mobile">
<span>{{dataForm.identityNo}}</span> <span>{{dataForm.mobile}}</span>
</el-form-item> </el-form-item>
<el-form-item label="身份证号" prop="identityNo"> <el-form-item label="身份证号" prop="identityNo">
<span>{{dataForm.identityNo}}</span> <span>{{dataForm.identityNo}}</span>
@ -36,8 +36,8 @@
<el-form-item label="积分" prop="points"> <el-form-item label="积分" prop="points">
<span>{{dataForm.points}}</span> <span>{{dataForm.points}}</span>
</el-form-item> </el-form-item>
<el-form-item label="成为志愿者时间" prop="registTime"> <el-form-item label="成为志愿者时间" prop="registTimeString">
<span>{{dataForm.registTime}}</span> <span>{{dataForm.registTimeString}}</span>
</el-form-item> </el-form-item>
</el-form> </el-form>
<template slot="footer"> <template slot="footer">

17
src/views/modules/user/volunteerinfo.vue

@ -44,10 +44,10 @@
header-align="center" header-align="center"
align="center" align="center"
></el-table-column> ></el-table-column>
<el-table-column prop="birthday" label="出生日期" header-align="center" align="center"></el-table-column> <el-table-column prop="birthdayString" label="出生日期" header-align="center" align="center"></el-table-column>
<el-table-column prop="mobile" label="联系电话" header-align="center" align="center"></el-table-column> <el-table-column prop="mobile" label="联系电话" header-align="center" align="center"></el-table-column>
<el-table-column prop="identityNo" label="身份证" header-align="center" align="center"></el-table-column> <el-table-column prop="identityNo" label="身份证" header-align="center" align="center"></el-table-column>
<el-table-column prop="registTime" label="认证时间" header-align="center" align="center"></el-table-column> <el-table-column prop="registTimeString" label="认证时间" header-align="center" align="center"></el-table-column>
<el-table-column <el-table-column
prop="auditStatus" prop="auditStatus"
label="状态" label="状态"
@ -69,9 +69,13 @@
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click="checkHandle(scope.row.id)" @click="checkHandle(scope.row.id,1)"
v-if="scope.row.auditStatus == 0"
>审批</el-button> >审批</el-button>
<el-button
type="text"
size="small"
@click="checkHandle(scope.row.id, 2)"
>拉入黑名单</el-button>
<el-button type="text" size="small" @click="pointsAdjustHandle(scope.row.id)">积分调整</el-button> <el-button type="text" size="small" @click="pointsAdjustHandle(scope.row.id)">积分调整</el-button>
<!-- <el-button type="text" size="small" @click="deleteHandle(scope.row.id)">积分记录</el-button> --> <!-- <el-button type="text" size="small" @click="deleteHandle(scope.row.id)">积分记录</el-button> -->
</template> </template>
@ -202,10 +206,11 @@ export default {
}) })
}, },
// //
checkHandle (userId) { checkHandle (userId, clickStatus) {
this.volunteerinfoCheckVisible = true this.volunteerinfoCheckVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.volunteerinfoCheck.dataForm.id = userId this.$refs.volunteerinfoCheck.dataForm.id = userId
this.$refs.volunteerinfoCheck.clickStatus = clickStatus
this.$refs.volunteerinfoCheck.init() this.$refs.volunteerinfoCheck.init()
}) })
}, },
@ -235,6 +240,8 @@ export default {
return '审核通过' return '审核通过'
} else if (state === '2') { } else if (state === '2') {
return '审核不通过' return '审核不通过'
} else if (state === '3') {
return '已拉入黑名单'
} }
} }
}, },

Loading…
Cancel
Save