积分规则

This commit is contained in:
shijingjing
2022-02-17 11:54:43 +08:00
parent cdad9296a2
commit 3cef36cf6e
2 changed files with 69 additions and 19 deletions

View File

@@ -20,7 +20,7 @@
<div class="time">{{ item.createTime }}</div> <div class="time">{{ item.createTime }}</div>
</div> </div>
<div class="card-type"> <div class="card-type">
<div class="type" :style="{color: item.auditStatus==0? '#4181FF':item.auditStatus==1? '#baf07b' : '#dd5347'}">{{ $dict.getLabel('integralDeclareStatus',item.auditStatus) }}</div> <div class="type" :style="{color: item.auditStatus==0? '#4181FF':item.auditStatus==1? '#07c160' : '#dd5347'}">{{ $dict.getLabel('integralDeclareStatus',item.auditStatus) }}</div>
<div class="num">20</div> <div class="num">20</div>
</div> </div>
</div> </div>
@@ -68,7 +68,9 @@ export default {
this.$http.post('/app/appvillagerintegraldeclare/list',null,{ this.$http.post('/app/appvillagerintegraldeclare/list',null,{
params: { params: {
current: 1, current: 1,
size: 10,
description : this.keyword, description : this.keyword,
applyIntegralType: this.applyIntegralType,
auditStatus: this.tabIndex== 0 ? "" : this.tabIndex == 1 ? 0 : this.tabIndex == 2 ? "1|2" : '' auditStatus: this.tabIndex== 0 ? "" : this.tabIndex == 1 ? 0 : this.tabIndex == 2 ? "1|2" : ''
} }
}).then(res => { }).then(res => {

View File

@@ -8,7 +8,7 @@
</div> </div>
<div class="detail-area"> <div class="detail-area">
<div class="time">{{ form.createTime }}</div> <div class="time">{{ form.createTime }}</div>
<div class="address"> <div class="address" v-if="form.areaId">
<img src="./img/address.png" alt=""> <img src="./img/address.png" alt="">
<span>{{ form.areaId }}</span> <span>{{ form.areaId }}</span>
</div> </div>
@@ -34,23 +34,22 @@
<!-- 通过 --> <!-- 通过 -->
<div class="integral-select" v-if="opts === 1"> <div class="integral-select" v-if="opts === 1">
<div class="integral-item" @click="isShowType = true"> <div class="integral-item" @click="isShowType = true">
<div>积分类别</div> <div class="label">积分类别</div>
<div> <div class="value">
<span :style="{color:data.auditIntegralType ? '' : '#999'}">{{ $dict.getLabel('atWillReportType',data.auditIntegralType) || '请选择' }}</span> <span :style="{color:data.auditIntegralType ? '' : '#999'}">{{ $dict.getLabel('atWillReportType',data.auditIntegralType) || '请选择' }}</span>
<u-icon name="arrow-right" color="#E1E2E3"/> <u-icon name="arrow-right" color="#E1E2E3"/>
</div> </div>
</div> </div>
<div class="integral-item"> <div class="integral-item" @click="getType()">
<div>积分事项</div> <div class="label">积分事项</div>
<div> <div class="value">
<span :style="{color:data.auditIntegralType ? '' : '#999'}">{{ form.auditIntegralType || '请选择' }}</span> <span :style="{color:data.ruleName ? '' : '#999'}">{{ data.ruleName || '请选择' }}</span>
<u-icon name="arrow-right" color="#E1E2E3"/> <u-icon name="arrow-right" color="#E1E2E3"/>
</div> </div>
</div> </div>
<div class="integral-item last"> <div class="integral-item last">
<div>积分方式</div> <div class="label">积分方式</div>
<div style="color: #E6736E">+20</div> <div style="color: #E6736E" class="value">{{ data.integral }}</div>
</div> </div>
</div> </div>
<!-- 不通过 --> <!-- 不通过 -->
@@ -63,8 +62,9 @@
<u-select :list="$dict.getDict('atWillReportType')" value-name="dictValue" label-name="dictName" <u-select :list="$dict.getDict('atWillReportType')" value-name="dictValue" label-name="dictName"
v-model="isShowType" @confirm="integralType"></u-select> v-model="isShowType" @confirm="integralType"></u-select>
<u-select :list="getList" value-name="dictValue" label-name="dictName"
v-model="isShowOption" @confirm="pointTypeChange"></u-select> <u-select :list="typeList" value-name="integral" label-name="ruleName"
v-model="isShowOption" @confirm="typeChange"></u-select>
</div> </div>
@@ -126,9 +126,14 @@ export default {
reason: '', reason: '',
form: {}, form: {},
data: { data: {
id: '',
auditIntegralType: '', auditIntegralType: '',
auditOpinion: '', // auditIntegralName: '',
} auditOpinion: '', // 不通过理由
ruleName: '',
integral: ''
},
typeList: [],
} }
}, },
onLoad(o) { onLoad(o) {
@@ -142,16 +147,47 @@ export default {
getDetail() { getDetail() {
this.$http.post(`/app/appvillagerintegraldeclare/queryDetailById?id=${this.id}`).then(res => { this.$http.post(`/app/appvillagerintegraldeclare/queryDetailById?id=${this.id}`).then(res => {
if(res.code==0) { if(res.code==0) {
this.form = this.current > 1? [...this.form, ...res.data] : res.data this.form = res.data
this.$forceUpdate() this.$forceUpdate()
} }
}) })
}, },
getType() {
if(!this.data.auditIntegralType) {
return this.$u.toast('请选择积分类别')
} else {
this.isShowOption=true
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
// this.data.id = res.data.records.id
}
})
}
},
typeChange(e) {
// console.log(e);
this.data.ruleName = e[0].label
this.data.integral = e[0].value
},
integralType(e) { integralType(e) {
console.log(e); // this.data.auditIntegralName = e[0].label
this.data.auditIntegralType = e[0].label this.data.auditIntegralType = e[0].value
}, },
submit() { submit() {
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('请输入不通过理由')
}
}
this.$http.post('/app/appvillagerintegraldeclare/examine',null,{ this.$http.post('/app/appvillagerintegraldeclare/examine',null,{
params: { params: {
id: this.id, id: this.id,
@@ -160,6 +196,9 @@ export default {
} }
}).then(res=>{ }).then(res=>{
console.log(res); console.log(res);
this.$u.toast('保存成功')
}).catch(err=>{
console.log(err);
}) })
} }
}, },
@@ -275,10 +314,20 @@ export default {
background: #FFFFFF; background: #FFFFFF;
.integral-item { .integral-item {
width: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
box-sizing: border-box;
padding: 34px 0; padding: 34px 0;
border-bottom: 1px solid #D8DDE6; border-bottom: 1px solid #D8DDE6;
.label {
width: 30%;
}
.value {
width: 70%;
text-align: right;
}
} }
.integral-item:last-child { .integral-item:last-child {
@@ -338,7 +387,6 @@ export default {
} }
.saveBtn { .saveBtn {
position: fixed; position: fixed;
bottom: 0; bottom: 0;