Files
dvcp_v2_wxcp_app/src/apps/AppIntegralAudit/detail.vue

421 lines
10 KiB
Vue
Raw Normal View History

2022-02-14 15:02:14 +08:00
<template>
2022-02-15 09:09:50 +08:00
<div class="detail">
<div class="detail-list">
2022-02-15 10:55:42 +08:00
<div class="detail-info">
2022-02-17 19:45:25 +08:00
<div class="detail-name">申请人:<span>{{form.residentName}}</span></div>
2022-02-16 18:53:12 +08:00
<div class="detail-type">{{ $dict.getLabel('atWillReportType',form.applyIntegralType) }}</div>
2022-02-15 10:55:42 +08:00
</div>
<div class="detail-area">
2022-02-16 18:53:12 +08:00
<div class="time">{{ form.createTime }}</div>
2022-02-17 11:54:43 +08:00
<div class="address" v-if="form.areaId">
2022-02-15 18:42:21 +08:00
<img src="./img/address.png" alt="">
2022-02-23 20:59:21 +08:00
<span>{{ form.areaName }}</span>
2022-02-15 09:09:50 +08:00
</div>
</div>
2022-02-15 10:55:42 +08:00
<div class="detail-text">
2022-02-16 18:53:12 +08:00
{{ form.description }}
2022-02-15 09:09:50 +08:00
</div>
2022-02-15 10:55:42 +08:00
<div class="detail-img">
2022-02-16 18:53:12 +08:00
<img :src="item.url" alt="" v-for="(item, i) in form.applyFiles" :key="i" @click="previewImage(form.applyFiles, item.url)" />
2022-02-15 09:09:50 +08:00
</div>
</div>
2022-02-17 19:45:25 +08:00
<!-- 待审核 -->
<div class="integral" v-if="form.auditStatus == 0">
2022-02-15 14:38:58 +08:00
<div class="result">
2022-02-22 18:41:27 +08:00
<div><span style="color: #FF4466;">*</span>积分审核结果</div>
2022-02-15 14:38:58 +08:00
<div class="options">
2022-02-17 08:54:50 +08:00
<div class="opts-item" :class="opts? 'current': ''" @click="opts = 1">通过</div>
<div class="opts-item" :class="!opts? 'current': ''" @click="opts = 0">不通过</div>
2022-02-15 14:38:58 +08:00
</div>
</div>
<!-- 通过 -->
2022-02-17 08:54:50 +08:00
<div class="integral-select" v-if="opts === 1">
<div class="integral-item" @click="isShowType = true">
2022-02-22 18:41:27 +08:00
<div class="label"><span>*</span>积分类别</div>
2022-02-25 16:16:18 +08:00
<div class="value" >
2022-02-17 08:54:50 +08:00
<span :style="{color:data.auditIntegralType ? '' : '#999'}">{{ $dict.getLabel('atWillReportType',data.auditIntegralType) || '请选择' }}</span>
2022-02-15 14:38:58 +08:00
<u-icon name="arrow-right" color="#E1E2E3"/>
</div>
</div>
2022-02-17 11:54:43 +08:00
<div class="integral-item" @click="getType()">
2022-02-22 18:41:27 +08:00
<div class="label"><span>*</span>积分事项</div>
2022-02-17 11:54:43 +08:00
<div class="value">
<span :style="{color:data.ruleName ? '' : '#999'}">{{ data.ruleName || '请选择' }}</span>
2022-02-15 14:38:58 +08:00
<u-icon name="arrow-right" color="#E1E2E3"/>
</div>
</div>
2022-02-25 16:16:18 +08:00
<div class="integral-item">
2022-02-24 18:43:02 +08:00
<div class="label"><span style="margin-right: 8px;"></span>积分调整</div>
2022-02-24 14:18:00 +08:00
<div style="color: #E6736E;margin-right: 8px; font-weight: 600;" class="value">{{ data.integral }}</div>
2022-02-15 14:38:58 +08:00
</div>
</div>
<!-- 不通过 -->
<div class="reject" v-else>
2022-02-23 14:13:10 +08:00
<div><span style="color:#FF4466;">*</span>不通过理由</div>
2022-02-23 20:42:50 +08:00
<textarea class="reasons" placeholder="请输入不通过理由" :maxlength="500"
2022-02-17 08:54:50 +08:00
v-model="data.auditOpinion"></textarea>
2022-02-23 20:42:50 +08:00
<div class="tips">{{ data.auditOpinion.length }}/500</div>
2022-02-15 14:38:58 +08:00
</div>
2022-02-15 10:55:42 +08:00
2022-02-17 08:54:50 +08:00
<u-select :list="$dict.getDict('atWillReportType')" value-name="dictValue" label-name="dictName"
v-model="isShowType" @confirm="integralType"></u-select>
2022-02-17 11:54:43 +08:00
2022-02-17 19:45:25 +08:00
<u-select :list="typeList" value-name="id" label-name="ruleName"
2022-02-17 11:54:43 +08:00
v-model="isShowOption" @confirm="typeChange"></u-select>
2022-02-15 10:55:42 +08:00
</div>
2022-02-17 19:45:25 +08:00
<!-- 已审核 -->
2022-02-15 14:38:58 +08:00
<div class="readOnly" v-else>
2022-02-15 10:55:42 +08:00
<!-- 通过 -->
2022-02-23 20:39:47 +08:00
<div v-if="form.auditStatus==1">
2022-02-17 19:45:25 +08:00
<div class="item">
<div>积分审核</div>
<div>通过</div>
</div>
2022-02-15 10:55:42 +08:00
<div class="item">
<div>积分类别</div>
2022-02-17 19:45:25 +08:00
<div>{{ form.auditIntegralType }}</div>
2022-02-15 10:55:42 +08:00
</div>
<div class="item">
<div>积分事项</div>
2022-02-17 19:45:25 +08:00
<div>{{ form.auditRuleName }}</div>
2022-02-15 10:55:42 +08:00
</div>
<div class="item">
2022-02-24 18:43:02 +08:00
<div>积分调整</div>
2022-02-17 19:45:25 +08:00
<div style="color: #E6736E;">{{ form.auditIntegral }}</div>
2022-02-15 10:55:42 +08:00
</div>
</div>
<!-- 不通过 -->
2022-02-23 20:39:47 +08:00
<div v-if="form.auditStatus==2">
2022-02-17 19:45:25 +08:00
<div class="item">
<div>积分审核</div>
<div>不通过</div>
</div>
2022-02-15 10:55:42 +08:00
<div class="item nopass">
<div>不通过的理由</div>
2022-02-17 19:45:25 +08:00
<div class="textarea">{{ form.auditOpinion }}</div>
2022-02-15 10:55:42 +08:00
</div>
</div>
<div class="item">
<div>审核人</div>
2022-02-17 19:45:25 +08:00
<div>{{ form.auditUserName }}</div>
2022-02-15 10:55:42 +08:00
</div>
2022-02-25 14:40:15 +08:00
<div class="item">
2022-02-15 10:55:42 +08:00
<div>审核时间</div>
2022-02-17 19:45:25 +08:00
<div>{{ form.auditTime }}</div>
2022-02-15 10:55:42 +08:00
</div>
</div>
2022-02-23 20:59:21 +08:00
<div style="height: 70px"></div>
2022-02-17 19:45:25 +08:00
<div class="saveBtn" v-if="form.auditStatus == 0" @click="submit">保存</div>
2022-02-14 15:02:14 +08:00
</div>
</template>
<script>
export default {
name: 'detail',
data () {
return {
2022-02-16 18:53:12 +08:00
id: '',
2022-02-17 19:45:25 +08:00
auditType: 1,
2022-02-17 08:54:50 +08:00
opts: 1,
2022-02-15 14:38:58 +08:00
isShowType: false,
isShowOption: false,
getList: [],
2022-02-16 18:53:12 +08:00
reason: '',
2022-02-17 08:54:50 +08:00
form: {},
data: {
2022-02-17 11:54:43 +08:00
id: '',
2022-02-25 14:47:58 +08:00
auditIntegralType: '', //积分类型
2022-02-17 11:54:43 +08:00
auditOpinion: '', // 不通过理由
ruleName: '',
2022-02-17 19:45:25 +08:00
integral: '',
2022-02-23 20:31:44 +08:00
integralType: ''
2022-02-17 11:54:43 +08:00
},
typeList: [],
2022-02-14 15:02:14 +08:00
}
},
2022-02-16 18:53:12 +08:00
onLoad(o) {
this.$dict.load('atWillReportType','integralDeclareStatus').then(()=>{
this.id = o.id
2022-02-17 19:45:25 +08:00
this.nopass = o.nopass
2022-02-16 18:53:12 +08:00
this.getDetail()
})
},
2022-02-14 15:02:14 +08:00
methods: {
2022-02-17 19:45:25 +08:00
previewImage(images, img) {
uni.previewImage({
urls: images.map(v => v.url),
current: img
})
},
2022-02-16 18:53:12 +08:00
getDetail() {
this.$http.post(`/app/appvillagerintegraldeclare/queryDetailById?id=${this.id}`).then(res => {
if(res.code==0) {
2022-02-17 11:54:43 +08:00
this.form = res.data
2022-02-17 08:54:50 +08:00
this.$forceUpdate()
2022-02-16 18:53:12 +08:00
}
})
2022-02-17 08:54:50 +08:00
},
2022-02-17 11:54:43 +08:00
getType() {
if(!this.data.auditIntegralType) {
return this.$u.toast('请选择积分类别')
} else {
this.$http.post(`/app/appvillagerintegralrule/list?current=1&size=10&auditIntegralType=${this.data.auditIntegralType}`).then(res=>{
if(res.code == 0){
this.typeList = res.data.records
2022-02-17 13:56:32 +08:00
this.isShowOption=true
2022-02-17 11:54:43 +08:00
}
})
}
},
typeChange(e) {
this.data.ruleName = e[0].label
2022-02-17 19:45:25 +08:00
this.data.id = e[0].value
2022-02-17 11:54:43 +08:00
this.data.integral = e[0].value
2022-02-17 19:45:25 +08:00
this.typeList.map((item) => {
if(item.id == e[0].value) {
this.data.integral = item.integral
2022-02-23 20:31:44 +08:00
this.data.integralType = item.integralType
2022-02-17 19:45:25 +08:00
}
})
2022-02-17 11:54:43 +08:00
},
2022-02-17 08:54:50 +08:00
integralType(e) {
2022-02-17 11:54:43 +08:00
this.data.auditIntegralType = e[0].value
2022-02-25 16:16:18 +08:00
this.typeChange()
2022-02-17 08:54:50 +08:00
},
submit() {
2022-02-17 11:54:43 +08:00
if(this.opts==1){
if(!this.data.auditIntegralType) {
return this.$u.toast('请选择积分类别')
}
if(!this.data.ruleName) {
return this.$u.toast('请选择积分事项')
}
}
if(this.opts==0){
if(!this.data.auditOpinion) {
return this.$u.toast('请输入不通过理由')
}
}
2022-02-17 08:54:50 +08:00
this.$http.post('/app/appvillagerintegraldeclare/examine',null,{
params: {
id: this.id,
pass: this.opts,
2022-02-17 19:45:25 +08:00
auditRuleId: this.data.id,
auditIntegralType: this.data.auditIntegralType,
2022-02-25 14:47:58 +08:00
auditIntegral: this.data.integralType,
2022-02-17 19:45:25 +08:00
opinion: this.data.auditOpinion,
2022-02-23 20:31:44 +08:00
auditRuleName: this.data.ruleName,
2022-02-17 08:54:50 +08:00
}
2022-02-17 19:45:25 +08:00
}).then(()=>{
2022-02-17 11:54:43 +08:00
this.$u.toast('保存成功')
2022-02-17 19:45:25 +08:00
uni.$emit('update')
setTimeout(()=>{
uni.navigateBack()
},600)
2022-02-17 08:54:50 +08:00
})
2022-02-16 18:53:12 +08:00
}
2022-02-14 15:02:14 +08:00
},
onShow() {
2022-02-23 20:31:44 +08:00
document.title = '积分审核详情'
2022-02-14 15:02:14 +08:00
},
2022-02-16 18:53:12 +08:00
2022-02-14 15:02:14 +08:00
}
</script>
<style lang="scss" scoped>
2022-02-15 09:09:50 +08:00
.detail {
2022-02-15 10:55:42 +08:00
.detail-list {
padding: 20px 30px;
box-sizing: border-box;
background-color: #FFFFFF;
margin-bottom: 16px;
.detail-info {
display: flex;
justify-content: space-between;
height: 50px;
line-height: 50px;
.detail-name {
font-size: 30px;
font-weight: 600;
color: #333333;
}
.detail-type {
height: 50px;
line-height: 50px;
color: #135AB8;
font-size: 24px;
background-color: #e6edf7;
padding: 0 25px;
border-radius: 16px;
}
}
.detail-area {
display: flex;
2022-02-18 17:29:02 +08:00
color: #333333;
2022-02-15 10:55:42 +08:00
font-size: 22px;
2022-02-15 18:42:21 +08:00
margin: 15px 0;
2022-02-15 10:55:42 +08:00
.address {
display: flex;
margin-left: 30px;
2022-02-15 18:42:21 +08:00
img {
width: 32px;
height: 32px;
2022-02-15 10:55:42 +08:00
}
}
}
.detail-text {
color: #333333;
font-size: 30px;
2022-02-16 18:53:12 +08:00
margin-bottom: 30px;
2022-02-15 10:55:42 +08:00
}
.detail-img {
img {
2022-02-15 09:09:50 +08:00
width: 220px;
height: 220px;
margin-right: 8px;
2022-02-15 10:55:42 +08:00
}
img:nth-child(3n) {
margin-right: 0;
}
}
}
2022-02-15 14:38:58 +08:00
.integral {
font-size: 32px;
.result {
padding: 20px 30px;
box-sizing: border-box;
background-color: #FFFFFF;
2022-02-25 14:40:15 +08:00
// border-bottom: 1px solid #D8DDE6;
margin-bottom: 16px;
2022-02-15 14:38:58 +08:00
.options {
display: flex;
justify-content: space-between;
.opts-item {
width: 45%;
height: 112px;
line-height: 112px;
background: #F5F5F5;
text-align: center;
margin-top: 30px;
border-radius: 6px;
}
}
}
.current {
color: #1174fe;
background: #e7f1fe !important;
position: relative;
}
.integral-select {
padding: 0px 30px;
box-sizing: border-box;
background: #FFFFFF;
.integral-item {
2022-02-17 11:54:43 +08:00
width: 100%;
2022-02-15 14:38:58 +08:00
display: flex;
justify-content: space-between;
2022-02-17 11:54:43 +08:00
box-sizing: border-box;
2022-02-15 14:38:58 +08:00
padding: 34px 0;
border-bottom: 1px solid #D8DDE6;
2022-02-17 11:54:43 +08:00
2022-02-25 14:40:15 +08:00
2022-02-17 11:54:43 +08:00
.label {
width: 30%;
2022-02-22 18:41:27 +08:00
span {
color: #FF4466;
}
2022-02-17 11:54:43 +08:00
}
.value {
width: 70%;
text-align: right;
}
2022-02-15 14:38:58 +08:00
}
}
.reject {
padding: 30px 30px;
background: #FFFFFF;
.reasons {
margin-top: 30px;
width: 100%;
2022-02-17 08:54:50 +08:00
height: 200px;
2022-02-18 17:29:02 +08:00
color: #333333;
2022-02-15 14:38:58 +08:00
}
.tips {
margin-top: 30px;
text-align: right;
font-size: 30px;
color: #999;
}
}
}
2022-02-15 10:55:42 +08:00
.readOnly {
padding: 20px 30px;
box-sizing: border-box;
2022-02-15 14:38:58 +08:00
background: #FFFFFF;
2022-02-15 10:55:42 +08:00
.item {
display: flex;
justify-content: space-between;
padding: 30px 0;
font-size: 32px;
color: #333333;
border-bottom: 1px solid #D8DDE6;
.textarea {
margin-top: 30px;
2022-02-18 17:29:02 +08:00
color: #333333;
2022-02-15 10:55:42 +08:00
}
2022-02-15 09:09:50 +08:00
}
2022-02-15 10:55:42 +08:00
.nopass {
flex-direction: column;
border-bottom: 1px solid #D8DDE6;
}
.last {
border-bottom: none;
2022-02-15 09:09:50 +08:00
}
2022-02-15 10:55:42 +08:00
}
2022-02-15 14:38:58 +08:00
2022-02-15 10:55:42 +08:00
.saveBtn {
position: fixed;
bottom: 0;
height: 112px;
width: 100%;
line-height: 112px;
background-color: #3975C6;
font-size: 32px;
color: #FFFFFF;
text-align: center;
}
2022-02-15 09:09:50 +08:00
}
2022-02-14 15:02:14 +08:00
</style>