列表倒叙 上传凭证 bug修改

This commit is contained in:
fengachen
2021-10-20 13:37:53 +08:00
parent 9e707240f9
commit ec7bbe713f
8 changed files with 100 additions and 74 deletions
@@ -5,7 +5,10 @@ import {
import MeetingApi from '../../assets/js/http/meetingApi'
import signUpApi from '../../assets/js/http/signUp'
import {baseUrl,URL_CONFIG} from '../../assets/js/http/api'
import {
baseUrl,
URL_CONFIG
} from '../../assets/js/http/api'
Page({
/**
@@ -22,13 +25,13 @@ Page({
// 会议资料文件数组
meetingDataList: [],
// 缴费凭证id
imageIds:[],
imageIds: [],
// 订单后四位
ordeCode:'',
// 缴费凭证的回显
payRecordImgSrc:'',
ordeCode: '',
// 缴费凭证的回显
payRecordImgSrc: '',
// 签到图片的回显
signImgSrc:''
signImgSrc: ''
},
// 获取图片的id
@@ -38,32 +41,38 @@ Page({
})
},
// 订单后四位
setOrdeCode(e){
setOrdeCode(e) {
this.setData({
ordeCode:e.detail.value
ordeCode: e.detail.value
})
},
// 上传汇款凭证
editPayRecord(){
// 上传汇款凭证
editPayRecord() {
const param = {
id:this.data.meetingInfo.situationId,
orderCode:this.data.ordeCode,
paymentRecord:this.data.imageIds
id: this.data.meetingInfo.situationId,
orderCode: this.data.ordeCode,
paymentRecord: this.data.imageIds
}
if(Array.isArray(this.data.imageIds)){
param.paymentRecord = this.data.imageIds.join(',')
}
signUpApi.uploadPayRecord(param).then(res => {
console.log(res);
if(res.success){
if (res.success) {
wx.showToast({
title:res.message,
title: res.message,
icon: "success",
duration: 800,
duration: 2000,
success(){
wx.navigateBack({
delta: 1,
})
}
});
wx.navigateBack({
delta: 1,
})
}else{
} else {
wx.showToast({
title:res.message,
title: res.message,
icon: "error",
duration: 800,
});
@@ -78,19 +87,21 @@ Page({
if (res.success) {
this.setData({
singInPersonInfo: res.result,
ordeCode:res.result.orderCode
ordeCode: res.result.orderCode,
// 这是为了不点击图片上传的bug
imageIds: res.result.paymentRecord.split(',')
})
// 已经审核的获取审核凭证的src
if(res.result.checkResult !== 0){
if (res.result.checkResult !== 0) {
this.setData({
payRecordImgSrc:baseUrl + URL_CONFIG + 'sys/common/download/' + res.result.paymentRecord
payRecordImgSrc: baseUrl + URL_CONFIG + 'sys/common/download/' + res.result.paymentRecord,
})
}
console.log(this.data.payRecordImgSrc);
// 已经签到的获取签到的图片的src
if(res.result.checkIn === 1){
if (res.result.checkIn === 1) {
this.setData({
signImgSrc:baseUrl + URL_CONFIG + 'sys/common/download/' + res.result.checkFile
signImgSrc: baseUrl + URL_CONFIG + 'sys/common/download/' + res.result.checkFile
})
}
}
@@ -136,6 +147,7 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// 获取上一个页面的会议数据
const meetingInfo = JSON.parse(options.meetingInfo)
console.log(meetingInfo);
@@ -170,9 +182,7 @@ Page({
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
onReady: function () {},
/**
* 生命周期函数--监听页面显示
@@ -120,9 +120,8 @@
<view class="p-20">
<text class="validate">缴费凭证</text>
<!-- 未审核的显示 -->
<!-- 这里需要处理回显 -->
<view class="payment-text" wx:if="{{singInPersonInfo.checkResult !== 1}}">
<image-upload bindgetIds='getImagesId' maxLength='1' initImgsList="{{singInPersonInfo.paymentRecord}}"></image-upload>
<view class="payment-text" wx:if="{{singInPersonInfo.checkResult !== 1}}">
<image-upload bindgetIds='getImagesId' maxLength='1' initImgsList="{{singInPersonInfo.paymentRecord}}" id="img"></image-upload>
</view>
<!-- 审核通过的显示 -->
@@ -141,7 +140,7 @@
<!-- 审核通过后的订单后四位 -->
<view class="p-20" wx:if="{{ singInPersonInfo.checkResult === 1 }}">
<text class="validate">缴费订单号后四位数:{{singInPersonInfo.orderCode}}</text>
</view>
<view class="tip" wx:if="{{singInPersonInfo.payMOde === 2 }}">请在会议期间内上传缴费凭证和缴费订单号后四位</view>
</view>