空白页+ 申请积分

This commit is contained in:
shijingjing
2022-11-30 15:29:30 +08:00
parent 2a9daa8389
commit e6c053b04f
3 changed files with 23 additions and 21 deletions

View File

@@ -64,7 +64,7 @@
<span style="margin-right: 8px"></span><span>上传佐证材料最多9张</span> <span style="margin-right: 8px"></span><span>上传佐证材料最多9张</span>
</div> </div>
<div style="margin-top: 10px;"> <div style="margin-top: 10px;">
<AiUploader v-model="form.files" :limit="9" multiple action="/admin/file/add2"></AiUploader> <AiUploader :def.sync="form.files" :limit="9" multiple action="/admin/file/add2"></AiUploader>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -5,16 +5,19 @@
</div> </div>
<h3>申请记录</h3> <h3>申请记录</h3>
<!-- @click="toEdit(item)" --> <!-- @click="toEdit(item)" -->
<div class="card" v-for="(item,index) in list" :key="index" > <div v-if="list.length">
<div class="top"> <div class="card" v-for="(item,index) in list" :key="index" >
<div class="top_title">{{ item.applyItem }}</div> <div class="top">
<div><span class="top_status" :class="item.status==0? 'status0' : item.status==1? 'status1': 'status2'">{{ $dict.getLabel('integralApplyStatus',item.status) }}</span></div> <div class="top_title">{{ item.applyItem }}</div>
</div> <div><span class="top_status" :class="item.status==0? 'status0' : item.status==1? 'status1': 'status2'">{{ $dict.getLabel('integralApplyStatus',item.status) }}</span></div>
<div class="bottom"> </div>
<div class="bottom_points">积分+{{ item.applyIntegral }}</div> <div class="bottom">
<div class="bottom_time">{{ item.createTime }}</div> <div class="bottom_points">积分+{{ item.applyIntegral }}</div>
<div class="bottom_time">{{ item.createTime }}</div>
</div>
</div> </div>
</div> </div>
<AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
</div> </div>
</template> </template>

View File

@@ -12,7 +12,7 @@
<div class="items"> <div class="items">
<div><span class="red">*</span><span class="color-666">上传图片</span></div> <div><span class="red">*</span><span class="color-666">上传图片</span></div>
<AiUploader style="margin-top: 12px;" v-model="form.files" :limit="1"></AiUploader> <AiUploader style="margin-top: 12px;" :def.sync="form.files" :limit="1" action="/admin/file/add2"></AiUploader>
</div> </div>
<div class="btn"> <div class="btn">
@@ -37,9 +37,7 @@ export default {
} }
}, },
onLoad(opt) { onLoad(opt) {
if(opt) { if(opt) {
console.log(opt);
this.getDetail(opt.id) this.getDetail(opt.id)
} }
document.title = '积分申请' document.title = '积分申请'
@@ -48,9 +46,8 @@ export default {
getDetail(id) { getDetail(id) {
this.$http.post(`/app/appintegralmemberapply/queryDetailById?id=${id}`).then(res=> { this.$http.post(`/app/appintegralmemberapply/queryDetailById?id=${id}`).then(res=> {
if(res?.data) { if(res?.data) {
// console.log(res);
this.form = res.data this.form = res.data
this.form.files = [res.data.voucherImageUrl] this.form.files = [{url:res.data.voucherImageUrl}]
} }
}) })
}, },
@@ -58,21 +55,23 @@ export default {
if(this.flag) return if(this.flag) return
if(!this.form.applyItem) { if(!this.form.applyItem) {
return this.$toast('请输入申请事项') return this.$u.toast('请输入申请事项')
} }
if(!this.form.applyIntegral) { if(!this.form.applyIntegral) {
return this.$toast('请输入积分数量') return this.$u.toast('请输入积分数量')
}
if(this.form.files.length) {
this.form.voucherImageUrl = this.form.files[0].url
} }
this.flag = true this.flag = true
this.$http.post(`/app/appintegralmemberapply/addOrUpdate`,{
...this.form, this.$http.post(`/app/appintegralmemberapply/addOrUpdate`,{...this.form}).then(res=> {
voucherImageUrl: 'http://respub.sinoecare.net/20221130/1-20221130092429.jpeg'
}).then(res=> {
if(res.code == 0) { if(res.code == 0) {
this.flag = false this.flag = false
this.$toast('提交成功') this.$u.toast('提交成功')
setTimeout(() => { setTimeout(() => {
uni.navigateBack() uni.navigateBack()
}, 600) }, 600)