积分代申请
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
</div>
|
||||
<div class="user-info">
|
||||
<img :src="item.photo" alt="" v-if="item.photo">
|
||||
<img src="./img/user-img.png" alt="" v-else>{{ item.name }}
|
||||
<img src="./img/user-img.png" alt="" v-else>
|
||||
{{ nodeKey == 'openId' ? item.realName : item.name }}
|
||||
<span v-if="isShowPhone && item.mobile">({{item.mobile}})</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,114 +0,0 @@
|
||||
<template>
|
||||
<div class="integralApply">
|
||||
<div class="card-list" v-if="list.length">
|
||||
<div class="card" v-for="(item,index) in list" :key="index" @click="$linkTo(`./integralDetail?id=${item.id}`)">
|
||||
<div class="left">
|
||||
<div class="title">{{ item.applyItemName }}</div>
|
||||
<div class="time">{{ item.createTime.slice(0,16) }}</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="integral">+{{ item.applyIntegral }}</div>
|
||||
<div class="status" :class="item.status==0? 'status0':item.status==1? 'status1':'status2'">{{ $dict.getLabel('appIntegralApplyEventStatus',item.status) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<AiEmpty :description="`暂无数据`" class="emptyWrap" v-else/>
|
||||
<AiAdd @add="toAdd"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "integralApply",
|
||||
appName: "积分申请",
|
||||
data() {
|
||||
return {
|
||||
current: 1,
|
||||
list: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toAdd() {
|
||||
uni.navigateTo({url: './integralAdd'})
|
||||
},
|
||||
getList() {
|
||||
this.$http.post(`/app/appintegraluserapply/listByAppletUser`,null,{
|
||||
params: {
|
||||
current: this.current,
|
||||
size: 10
|
||||
}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.list = this.current==1 ? res.data.records: [...this.list, ...res.data.records]
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
onShow() {
|
||||
document.title = '积分代申请'
|
||||
this.$dict.load('appIntegralApplyEventStatus').then(()=> {
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current++
|
||||
this.getList()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.integralApply {
|
||||
padding: 24px 0 130px 0;
|
||||
box-sizing: border-box;
|
||||
|
||||
.card-list {
|
||||
background: #FFF;
|
||||
.card {
|
||||
padding: 32px 40px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #EEEEEE;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.left {
|
||||
width: calc(100% - 200px);
|
||||
.title {
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.time {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
margin-top: 8px;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
width: 200px;
|
||||
text-align: right;
|
||||
.integral {
|
||||
font-size: 38px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.status {
|
||||
font-size: 28px;
|
||||
font-weight: 400;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.status0 {
|
||||
color: #FF9A40;
|
||||
}
|
||||
.status1 {
|
||||
color: #5AAD6A;
|
||||
}
|
||||
.status2 {
|
||||
color: #CD413A;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
</style>
|
||||
@@ -32,7 +32,7 @@
|
||||
<div @click.stop="pushNew(item.id)" v-else>推送精选</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="user-name">{{item.createUserName}}<span>积分+{{item.applyIntegral}}</span></div>
|
||||
<div class="user-name">{{item.integralUserName}}<span>积分+{{item.applyIntegral}}</span></div>
|
||||
<div class="time-flex">
|
||||
<span>{{item.createTime}}</span>
|
||||
<span :class="`color-${item.status}`">{{ $dict.getLabel('appIntegralApplyEventStatus', item.status) }}</span>
|
||||
@@ -46,7 +46,7 @@
|
||||
<u-select v-model="isShowType" :list="typeList" value-name="id" label-name="ruleName" @confirm="typeConfirm"></u-select>
|
||||
<u-modal v-model="showPush" :show-cancel-button="true" content="是否将精选内容对全体居民公开,选择否将只对本村/社区公开"
|
||||
confirm-text="是" cancel-text="否" @confirm="pushNewConfirm(1)" @cancel="pushNewConfirm(1)" :mask-close-able="true"></u-modal>
|
||||
|
||||
<AiAdd @add="toAdd"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -164,7 +164,10 @@ export default {
|
||||
this.search.type = ''
|
||||
this.search.typeName = ''
|
||||
this.getListInit()
|
||||
}
|
||||
},
|
||||
toAdd() {
|
||||
uni.navigateTo({url: './integralAdd'})
|
||||
},
|
||||
},
|
||||
onReachBottom() {
|
||||
this.current = this.current + 1;
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
<div :class="`color-${info.status}`">{{ $dict.getLabel('appIntegralApplyEventStatus', info.status) }}</div>
|
||||
</div>
|
||||
<div class="user-flex">
|
||||
<div>申请人:{{info.createUserName}}</div>
|
||||
<div>申请人:{{info.integralUserName}}</div>
|
||||
<div>电话号码:<span style="color:#1365DD;" @click="callPhone(info.phone)">{{info.phone}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="title-flex">
|
||||
<p>申请信息</p>
|
||||
<div style="color:#1365DD;">
|
||||
<div style="color:#1365DD;" v-if="info.status == 0">
|
||||
<span style="margin-right:16px" v-if="isEdit" @click="isEdit=false;getDetail()">取消</span>
|
||||
<span @click="edit">{{isEdit ? '保存' : '编辑'}}</span>
|
||||
</div>
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="info-flex solid">
|
||||
<div class="label">积分值</div>
|
||||
<div class="value">
|
||||
<u-input type="number" placeholder="请输入" input-align="right" placeholder-style="color:#999;font-size:16px;" height="40" v-model="info.applyIntegral" maxlength="5" v-if="isEdit"/>
|
||||
<u-number-box v-model="info.applyIntegral" input-height="44" size="14" :min="1" :max="100" v-if="isEdit"></u-number-box>
|
||||
<span v-else>{{info.applyIntegral}}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -98,7 +98,8 @@ export default {
|
||||
info: {},
|
||||
showVideo: false,
|
||||
videoUrl: '',
|
||||
isEdit: false
|
||||
isEdit: false,
|
||||
flag: false
|
||||
};
|
||||
},
|
||||
onLoad(option) {
|
||||
@@ -117,6 +118,7 @@ export default {
|
||||
this.info = res.data
|
||||
this.info.images = res.data.files.filter(e => (['jpeg', 'jpg', 'png'].includes(e.name.split('.')[1])))
|
||||
this.info.videos = res.data.files.filter(e => (['mp4'].includes(e.name.split('.')[1])))
|
||||
this.flag = false
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -167,14 +169,42 @@ export default {
|
||||
},
|
||||
edit() {
|
||||
if(this.isEdit) {
|
||||
this.editConfirm()
|
||||
this.submit()
|
||||
}else {
|
||||
this.isEdit = true
|
||||
}
|
||||
},
|
||||
editConfirm() {
|
||||
submit() {
|
||||
if(this.flag) return
|
||||
|
||||
}
|
||||
if (!this.info.content) {
|
||||
return this.$u.toast('请输入详细描述')
|
||||
}
|
||||
|
||||
if ((this.info.images.length + this.info.videos.length) > 9) {
|
||||
return this.$u.toast('图片和视频不得超过9个')
|
||||
} else {
|
||||
this.info.files = [...this.info.images,...this.info.videos]
|
||||
}
|
||||
|
||||
this.flag = true
|
||||
this.$http.post(`/app/appintegraluserapply/updateByGirdMember`,{
|
||||
...this.info,
|
||||
userId: this.info.integralUserId,
|
||||
// phone: this.info.phone,
|
||||
// applyItemId: this.info.applyItemId,
|
||||
// content: this.info.content,
|
||||
// girdId: this.info.girdId,
|
||||
// id: this.info.id
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
this.$u.toast('提交成功')
|
||||
uni.$emit('updateList')
|
||||
this.getDetail()
|
||||
this.isEdit = false
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -2,8 +2,10 @@
|
||||
<div class="integralAdd">
|
||||
<div class="item">
|
||||
<div class="left"><span class="tips">*</span>姓名</div>
|
||||
<div class="right" :class="form.name ? '' : 'color-999'" @click="toSelectUser">{{form.name || '请选择'}}
|
||||
<u-icon name="arrow-right" color="#ddd" size="28"></u-icon>
|
||||
<div class="right" :class="form.name ? '' : 'color-999'" >
|
||||
<AiPagePicker single @select="handleSelectUser" type="sysUser" style="width:100%;text-align:right;" action="/app/appwechatuserqujing/listByFdAppletUser" nodeKey="openId">
|
||||
<AiMore v-model="form.name"/>
|
||||
</AiPagePicker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
@@ -16,7 +18,9 @@
|
||||
</div>
|
||||
<div class="item mar-b32">
|
||||
<div class="left"><span class="tips">*</span>事件类型</div>
|
||||
<AiSelect class="right" :list="dictList" v-model="form.applyItemId"></AiSelect>
|
||||
<div class="right">
|
||||
<AiSelect :list="dictList" v-model="form.applyItemId"></AiSelect>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item mar-b32">
|
||||
<div class="left"><span class="tips">*</span>积分值</div>
|
||||
@@ -49,7 +53,7 @@
|
||||
<!-- <AiPagePicker type="gird" v-model="form.girdId" :params="{ formType: 2 }" @select="handleSelectGrid" nodeKey="id">
|
||||
<AiMore v-model="form.girdName"/>
|
||||
</AiPagePicker> -->
|
||||
<div class="right">{{user.girdName}}</div>
|
||||
<div class="right">{{form.girdName}}</div>
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
@@ -66,8 +70,12 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
form: {
|
||||
name: '',
|
||||
userId: '',
|
||||
phone: '',
|
||||
idNumber: '',
|
||||
applyItemId: '',
|
||||
applyIntegral: '',
|
||||
applyIntegral: 0,
|
||||
applyItemName: '',
|
||||
content: '',
|
||||
files: [],
|
||||
@@ -90,6 +98,8 @@ export default {
|
||||
this.id = o.id
|
||||
this.getDetail()
|
||||
}
|
||||
this.form.girdId = this.user.girdId
|
||||
this.form.girdName = this.user.girdName
|
||||
this.$dict.load(['clapEventStatus'])
|
||||
this.getType()
|
||||
},
|
||||
@@ -108,6 +118,10 @@ export default {
|
||||
submit() {
|
||||
if(this.flag) return
|
||||
|
||||
if (!this.form.name) {
|
||||
return this.$u.toast('请选择代申请人员')
|
||||
}
|
||||
|
||||
if (!this.form.applyItemId) {
|
||||
return this.$u.toast('请选择事件类型')
|
||||
}
|
||||
@@ -122,17 +136,13 @@ export default {
|
||||
this.form.files = [...this.form.images,...this.form.videos]
|
||||
}
|
||||
|
||||
if (!this.form.girdId) {
|
||||
return this.$u.toast('请选择所属网格')
|
||||
}
|
||||
|
||||
this.flag = true
|
||||
this.$http.post(`/app/appintegraluserapply/addOrUpdate`,{
|
||||
this.$http.post(`/app/appintegraluserapply/add`,{
|
||||
...this.form
|
||||
}).then(res=> {
|
||||
if(res?.data) {
|
||||
this.$u.toast('提交成功')
|
||||
uni.$emit('edit')
|
||||
uni.$emit('updateList')
|
||||
setTimeout(()=> {
|
||||
uni.navigateBack()
|
||||
},500)
|
||||
@@ -141,7 +151,7 @@ export default {
|
||||
},
|
||||
// 事件类型
|
||||
getType() {
|
||||
this.$http.post(`/app/appintegralrule/listByFdAndGirdInfo`).then(res=> {
|
||||
this.$http.post(`/app/appintegralrule/listByFD`).then(res=> {
|
||||
if(res?.data) {
|
||||
this.list = res.data
|
||||
this.dictList = res.data.map(v => {
|
||||
@@ -167,8 +177,11 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
toSelectUser() {
|
||||
console.log(122)
|
||||
handleSelectUser(v) {
|
||||
this.form.name = v?.[0]?.realName || ""
|
||||
this.form.userId = v?.[0]?.openId || ""
|
||||
this.form.phone = v?.[0]?.phone || ""
|
||||
this.form.idNumber = v?.[0]?.idNumber || ""
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -244,9 +257,9 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
::v-deep .display {
|
||||
display: inline-block;
|
||||
}
|
||||
// ::v-deep .display {
|
||||
// display: inline-block;
|
||||
// }
|
||||
.footer{
|
||||
width: 100%;
|
||||
height: 96px;
|
||||
Reference in New Issue
Block a user