积分审核

This commit is contained in:
yanran200730
2023-04-18 17:30:47 +08:00
parent 14575cbb33
commit de50f365af

View File

@@ -2,13 +2,13 @@
<ai-detail class="detail">
<template slot="title">
<ai-title title="积分审核" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
<template #rightBtn>
<el-button size="small" type="primary" @click="isShow = true" v-if="info.status === '0'">审核</el-button>
</template>
</ai-title>
</template>
<template slot="content">
<ai-card title="基本信息">
<template #right>
<el-button size="small" type="primary" @click="isShow = true" v-if="info.status === '0'">审核</el-button>
</template>
<template #content>
<ai-wrapper>
<ai-info-item label="事件类型" isLine :value="info.applyItemName"></ai-info-item>
@@ -16,11 +16,22 @@
<ai-info-item label="手机号" :value="info.phone"></ai-info-item>
<ai-info-item label="所属地区" :value="info.areaName"></ai-info-item>
<ai-info-item label="所属网格" :value="info.girdName"></ai-info-item>
<ai-info-item label="审核时间" v-if="info.auditTime" :value="info.auditTime"></ai-info-item>
<ai-info-item label="审核时间" v-if="info.status === '1'" :value="info.auditTime"></ai-info-item>
<ai-info-item label="申请时间" v-if="info.status === '0'" :value="info.createTime"></ai-info-item>
<ai-info-item label="状态">
<span>{{ dict.getLabel('appIntegralApplyEventStatus', info.status) }}</span>
<span v-if="info.status === '1'" style="margin-left: 10px; color: green">积分+{{ info.applyIntegral }}</span>
</ai-info-item>
</ai-wrapper>
</template>
</ai-card>
<ai-card title="事件信息">
<template #right>
<el-button size="small" type="primary" @click="showEvent" v-if="info.status === '0'">编辑</el-button>
</template>
<template #content>
<ai-wrapper>
<ai-info-item label="积分值" isLine :value="info.applyIntegral"></ai-info-item>
<ai-info-item label="事件描述" isLine :value="info.content"></ai-info-item>
<ai-info-item label="活动附件" isLine>
<div class="files">
@@ -51,6 +62,29 @@
</el-form-item>
</el-form>
</ai-dialog>
<ai-dialog
:visible.sync="isShowEvent"
@onConfirm="onEventConfirm"
@close="onClose"
width="890px"
title="编辑">
<el-form class="ai-form" :model="eventForm" label-width="120px" ref="eventForm">
<el-form-item label="积分值" prop="applyIntegral" :rules="[{required: true, message: '请输入积分值', trigger: 'change'}]">
<el-input-number style="width: 200px;" size="small" :precision="2" type="input" v-model="eventForm.applyIntegral" clearable placeholder="请输入积分值" :min="0"></el-input-number>
</el-form-item>
<el-form-item prop="content" label="事件描述" style="width: 100%" :rules="[{required: true, message: '请输入事件描述', trigger: 'blur'}]">
<el-input size="small" type="textarea" :rows="5" v-model="eventForm.content" clearable placeholder="请输入事件描述"></el-input>
</el-form-item>
<el-form-item style="width: 100%" label="事件附件" prop="files" :rules="[{required: true, message: '请选择事件附件', trigger: 'change'}]">
<ai-uploader
:instance="instance"
fileType="file"
v-model="eventForm.files"
:limit="9">
</ai-uploader>
</el-form-item>
</el-form>
</ai-dialog>
</template>
</ai-detail>
</template>
@@ -72,6 +106,12 @@
auditDesc: '',
auditStatus: ''
},
eventForm: {
files: [],
content: '',
applyIntegral: ''
},
isShowEvent: false,
isShow: false
}
},
@@ -94,17 +134,46 @@
}
})
}
if (res.data.status === '0') {
this.eventForm.files = res.data.files
this.eventForm.content = res.data.content
this.eventForm.applyIntegral = res.data.applyIntegral
}
}
}
})
},
showEvent () {
this.eventForm.files = this.info.files
this.eventForm.content = this.info.content
this.eventForm.applyIntegral = this.info.applyIntegral
this.isShowEvent = true
},
onClose () {
this.id = ''
this.form.auditDesc = ''
this.form.auditStatus = ''
},
onEventConfirm () {
this.$refs.eventForm.validate((valid) => {
if (valid) {
this.instance.post(`/app/appintegraluserapply/updateByGirdMember`, {
...this.eventForm,
id: this.params.id
}).then(res => {
if (res.code == 0) {
this.$message.success('编辑成功!')
this.isShowEvent = false
this.getInfo()
}
})
}
})
},
onConfirm () {
this.$refs.form.validate((valid) => {
if (valid) {