jinjian1.1/pages/mine/history.vue

222 lines
5.6 KiB
Vue
Raw Permalink Normal View History

2024-11-05 16:29:09 +08:00
<template>
<view class="">
2024-11-26 15:27:53 +08:00
<!-- <u-subsection :list="list" fontSize='30' :current="current" @change="sectionChange"></u-subsection> -->
<scroll-view :scroll-y="true" upper-threshold='100' @scrolltolower="loadMore">
<view class="main" v-if="content.length">
2024-11-05 16:29:09 +08:00
<block v-for="(item, index) in content" :key="index">
<view class="list u-padding-10">
<u-row gutter="16">
<u-col span="4">
2024-11-26 15:27:53 +08:00
<image class="img" :src="JSON.parse(item.upward_img).A006"></image>
2024-11-05 16:29:09 +08:00
</u-col>
<u-col span="8">
<u-row align="center" class="center">
<u-col>
<view class="title">
2024-11-26 15:27:53 +08:00
{{ item.license_name }}
2024-11-05 16:29:09 +08:00
</view>
</u-col>
<u-col>
<view class="date">
2024-11-26 15:27:53 +08:00
进件日期 {{ item.account_date }}
2024-11-05 16:29:09 +08:00
</view>
</u-col>
<u-col>
2024-11-26 15:27:53 +08:00
<view class="status" style="display: flex; justify-content: space-between;">
<view class="">
进件状态<span :style="'color:'+item.color+';'">{{item.state==10?'资料上送':
item.state==11?'审核中':item.state==12?'审核失败'
:item.state==20?'待签约':item.state==21?'签约中':
item.state==22?'签约失败':item.state==30?'待实名认证':item.state==31?'实名认证中':
item.state==32?'实名认证失败':'已完成'}}</span>
</view>
<text @click="sign(item)" v-if="item.state==10"
style="color:#11a5e8;">资料确认</text>
<text @click="toSign(item)" v-if="item.state==20"
style="color:#11a5e8;">申请签约</text>
<text @click="realName(item)"
v-if="item.state==30||item.state==31||item.state==32"
style="color:#11a5e8;">实名认证</text>
<text @click="realName(item)" v-if="item.state==40"
style="color:#11a5e8;">实名认证结果</text>
<!-- toSign -->
2024-11-05 16:29:09 +08:00
</view>
</u-col>
</u-row>
</u-col>
</u-row>
</view>
</block>
</view>
2024-11-26 15:27:53 +08:00
<view class="" v-else style="margin-top: 200px; margin-left: 40%;">
暂无数据
</view>
2024-11-05 16:29:09 +08:00
</scroll-view>
</view>
</template>
<script>
2024-11-26 15:27:53 +08:00
import {
audit_info,
sign_to_ys,
account_list
} from '@/utils/api.js'
2024-11-05 16:29:09 +08:00
export default {
data() {
2024-11-26 15:27:53 +08:00
return { //审核中包含 1进件中我们平台审核、2审核中银盛审核、3待签约银盛审核、4已驳回、5已完成、6
// list: ['审核中', '已审核', '已驳回'],
2024-11-05 16:29:09 +08:00
current: 0,
2024-11-26 15:27:53 +08:00
content: [],
isSig: false,
page: 1,
size: 10
2024-11-05 16:29:09 +08:00
}
},
2024-11-26 15:27:53 +08:00
onShow() {
this.page = 1; // 初始化页码
this.size = 10; // 初始化每页条数
this.content = []; // 初始化内容列表
this.getlist()
},
loadMore() {
this.page += 1; // 翻到下一页
this.getlist(); // 重新获取数据
},
2024-11-05 16:29:09 +08:00
methods: {
2024-11-26 15:27:53 +08:00
//进件历史
getlist() {
const data = {
promoter_id: uni.getStorageSync('userInfo').promoter_id || '',
page: this.page,
size: this.size
}
account_list(data).then(res => {
if (res.data == null) {
// 处理没有数据的情况
console.log('没有更多数据');
} else {
// 处理正常数据
if (res.data.count < this.size) {
// 如果返回数据小于每页大小,表示数据加载完成
this.content = this.content.concat(res.data.data); // 合并当前内容
console.log('已加载所有数据');
} else {
this.content = this.content.concat(res.data.data); // 合并数据
}
}
console.log(this.content);
})
},
2024-11-05 16:29:09 +08:00
sectionChange(index) {
this.current = index;
2024-11-26 15:27:53 +08:00
},
//申请签约
sign(val) {
//资料确认
audit_info({
audit_flag: "Y",
sys_flow_id: val.sys_flow_id,
account_id: val.account_id
}).then(r => {
if (r.code !== 200) {
uni.hideLoading()
this.$u.toast(r.msg)
return
} else {
val.cust_id = r.data.cust_id
this.toSign(val)
}
})
},
//签约页面跳转
toSign(val) {
if (!val.cust_id) {
val.cust_id = JSON.parse(val.extend).cust_id
}
let _this = this
const a = JSON.parse(val.rates)
const params = {
cust_id: val.cust_id,
account_id: val.account_id,
// cust_id:'2024111535691955',
...a
}
sign_to_ys(params).then(result => {
if (result.code !== 200) {
_this.$u.toast(result.msg)
return
} else {
_this.sigUrl = result.data.sign_url
uni.showToast({
title: "签约申请成功"
})
_this.isSig = true
this.$u.route({
url: '/pages/index/sign?sigUrl=' + this.sigUrl,
})
}
})
},
//实名认证
realName(val) {
this.$u.route({
url: '/pages/mine/auth?val=' + JSON.stringify(val),
})
2024-11-05 16:29:09 +08:00
}
}
}
</script>
<style scoped lang="scss">
2024-11-26 15:27:53 +08:00
page {
background: #f8f8f8 !important;
}
2024-11-05 16:29:09 +08:00
.center {
align-items: center;
justify-content: flex-start;
display: flex !important;
flex-direction: column !important;
margin-left: 25rpx;
}
2024-11-26 15:27:53 +08:00
/deep/.u-subsection--button {
2024-11-05 16:29:09 +08:00
position: fixed;
z-index: 11;
}
2024-11-26 15:27:53 +08:00
2024-11-05 16:29:09 +08:00
.main {
2024-11-26 15:27:53 +08:00
// background-color: #F4F4F4;
// padding-top: 60rpx;
// font-size: 26rpx;
2024-11-05 16:29:09 +08:00
}
.main .list {
margin-top: 10rpx;
background-color: #ffffff;
}
.main .list .img {
width: 230rpx;
height: 160rpx;
border-radius: 14rpx;
}
.u-padding-10 {
padding: 30rpx !important;
}
.main .list .title,
.main .list .date,
.main .list .status {
height: 55rpx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 55rpx !important;
2024-11-26 15:27:53 +08:00
display: flex;
align-items: center;
font-size: 26rpx;
2024-11-05 16:29:09 +08:00
}
</style>