新增版本检测,合同记录,业绩账户调整

This commit is contained in:
唐明明
2023-04-24 15:48:36 +08:00
parent ef27f7d400
commit 598450e1a3
20 changed files with 969 additions and 41 deletions

146
pages/user/contract.vue Normal file
View File

@@ -0,0 +1,146 @@
<template>
<view class="content">
<!-- 合同信息 -->
<view class="block">
<view class="block-flex">
<label>合同ID</label>
<view class="block-val">{{id}}</view>
</view>
<view class="block-flex">
<label>合同数量</label>
<view class="nowrap block-val">{{files.length}}</view>
</view>
<view class="block-flex">
<label>附件数量</label>
<view class="nowrap block-val">{{attachments.length}}</view>
</view>
<view class="block-flex">
<label>创建时间</label>
<view class="nowrap block-val">{{created_at || '-'}}</view>
</view>
<view class="block-flex">
<label>更新时间</label>
<view class="nowrap block-val">{{updated_at || '-'}}</view>
</view>
</view>
<!-- 合同文件 -->
<view class="files-title">合同文件列表</view>
<view class="files">
<view class="files-flex" v-for="(item, index) in files" :key="index" @click="onPdf(item.fileName, item.downloadUrl)">
<view class="files-flex-title">{{item.fileName}}</view>
<view class="files-flex-id">{{item.fileId}}</view>
<u-icon class="files-flex-icon" name="arrow-right" size="28rpx"></u-icon>
</view>
</view>
<!-- 附件文件 -->
<view class="files-title">附件文件列表</view>
<view class="files">
<view class="files-flex" v-for="(item, index) in attachments" :key="index" @click="onPdf(item.fileName, item.downloadUrl)">
<view class="files-flex-title">{{item.fileName}}</view>
<view class="files-flex-id">{{item.fileId}}</view>
<u-icon class="files-flex-icon" name="arrow-right" size="28rpx"></u-icon>
</view>
</view>
</view>
</template>
<script>
const plugin = uni.requireNativePlugin('Pdf-Plugin')
import { getFlows } from '@/apis/interfaces/user.js'
export default {
data() {
return {
user : { name: '', mobile: '' },
id : '',
created_at : '',
updated_at : '',
files : [],
attachments : []
};
},
onLoad() {
// #ifdef APP-PLUS
uni.setUserCaptureScreen({
enable: false,
})
// #endif
},
created() {
// 获取合同数据
uni.showLoading({
title: '加载中...',
mask : true
})
getFlows(this.$Route.query.id).then(res => {
const { sign_flow_id, files, attachments, created_at, updated_at, user } = res
this.user = user
this.id = sign_flow_id
this.created_at = created_at
this.updated_at = updated_at
this.files = files
this.attachments = attachments
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
methods: {
onPdf(name, url){
plugin.showPdf({
title : name,
url : url,
maxScale : '20',
waterMark : '河北抖火法律咨询服务有限公司',
// this.user.name + ' ' + this.user.mobile,
})
}
},
onUnload() {
// #ifdef APP-PLUS
uni.setUserCaptureScreen({
enable: true
})
// #endif
}
}
</script>
<style lang="scss">
.content{ padding: 10rpx 30rpx; }
// 合同信息统计
.block {
background: white;
margin-bottom: 30rpx;
margin-top: 20rpx;
padding: 30rpx;
border-radius: $radius;
&-flex{
display: flex;
justify-content: space-between;
font-size: 30rpx;
line-height: 60rpx;
label{ color: gray; }
.block-val{ width: calc(100% - 200rpx); text-align: right; word-break:break-all; word-wrap: break-word; }
}
}
// 合同列表
.files{
background: white;
margin-bottom: 30rpx;
padding: 30rpx;
border-radius: $radius;
&-flex{
position: relative;
padding-right: 40rpx;
.files-flex-title{ font-weight: bold; font-size: 32rpx; }
.files-flex-id{ font-size: 28rpx; color: gray; }
.files-flex-icon{ position: absolute; right: 0; top: 50%; margin-top: -14rpx;}
}
}
.files-title{ padding-bottom: 20rpx; color: gray; font-size: 28rpx; }
</style>

View File

@@ -99,7 +99,16 @@
</view>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
<view class="border-solid-empty"></view>
<view class="border-solid-empty"></view>
<view class="nav-flex" @click="updateApp">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_08.png"></image>版本检测
</view>
<view class="nav-text">
<text>V{{version}}</text>
<u-icon name="arrow-right" color="#cacaca" size="34rpx" bold></u-icon>
</view>
</view>
<view class="nav-flex" @click="onNav('UserSet')">
<view class="nav-icon">
<image class="nav-icon-src" src="@/static/icons/user_nav_05.png"></image>设置
@@ -160,23 +169,20 @@
</template>
<script>
import {
info,
relationsVerify,
relationsBind,
submitTeamName,
} from '@/apis/interfaces/user.js'
import { info, relationsVerify, relationsBind, submitTeamName } from '@/apis/interfaces/user.js'
import { getVersions } from '@/apis/interfaces/versions'
export default {
data() {
return {
isAuth: false,
nickname: '',
identity: '',
team_name:'',
avatar: '',
certification: '',
return {
version : plus.runtime.version,
isAuth : false,
nickname : '',
identity : '',
team_name :'',
avatar : '',
certification : '',
// 绑定关系
bindTypeArr: [{
bindTypeArr : [{
name: '手机号',
value: 'mobile'
},
@@ -185,22 +191,22 @@
value: 'verify'
},
],
bindTypeVal: 'mobile',
showBind: false,
isInvitation: true,
parent: '',
invitationUser: {
avatar: '',
nickname: '',
username: ''
bindTypeVal : 'mobile',
showBind : false,
isInvitation : true,
parent : '',
invitationUser : {
avatar : '',
nickname : '',
username : ''
},
invitation: '',
yunyingShow:false, // 运营中心是否展示
yunying_name:'', // 运营名称
team_status:'', // 状态 0 不展示运营中心 1可以申请但是没有完善2申请完审核中3已通过已修改
team_id:'',
region_status:'', // 状态 0 不展示 大区中心 1可以申请但是没有完善2申请完审核中3已通过已修改
region_id:'',
invitation : '',
yunyingShow :false, // 运营中心是否展示
yunying_name :'', // 运营名称
team_status :'', // 状态 0 不展示运营中心 1可以申请但是没有完善2申请完审核中3已通过已修改
team_id :'',
region_status :'', // 状态 0 不展示 大区中心 1可以申请但是没有完善2申请完审核中3已通过已修改
region_id :'',
};
},
onShow() {
@@ -421,7 +427,73 @@
icon: 'none'
})
})
},
},
// 检查版本更新
updateApp() {
uni.showLoading({
title: '检查更新'
})
//#ifdef APP-PLUS
// 获取系统版本号
getVersions({
platform: plus.os.name,
version : plus.runtime.version
}).then(res => {
uni.hideLoading()
if (res.update) {
uni.showModal({
title: "更新提示",
content: res.note || '版本更新信息',
confirmText: "更新",
success: modalRes => {
if (modalRes.confirm) {
if (plus.os.name == "Android") {
uni.showToast({
title: '新版本下载中,将在下载完成后自动为您安装更新包',
icon: 'none'
})
uni.downloadFile({
url: res.info.download,
success: apkPick => {
plus.runtime.install(apkPick
.tempFilePath, '',
installRES => {
// 安装完成用于提示新版本引导,暂时无用
}, installERR => {
// 安装失败
})
},
fail(err) {
uni.showToast({
title: '安装包下载失败,请检查您的网络或稍后重试',
icon: 'none'
})
}
})
} else {
uni.showToast({
title: '暂无ios版本这块留着后续用',
icon: 'none'
})
}
}
}
})
return
}
uni.showModal({
title: "提示",
content: "当前已是最新版本",
showCancel: false,
})
}).catch(err => {
uni.showToast({
title: err.message,
icon: 'none'
})
})
//#endif
}
}
}
</script>
@@ -446,7 +518,15 @@
margin-right: $margin;
margin-top: 5rpx;
}
}
}
.nav-text{
display: flex;
justify-content: flex-end;
align-items: center;
color: #999;
font-size: 30rpx;
text{ padding-right: 10rpx; }
}
}
// 用户信息

View File

@@ -30,6 +30,14 @@
</view>
</view>
</view>
<view class="set-nav-block">
<view class="set-nav" @click="onNav('SignLog')">
<label>合同记录</label>
<view class="value nowrap">
<uni-icons type="right" color="gray"></uni-icons>
</view>
</view>
</view>
<view class="set-nav-block">
<view class="set-nav" @click="onLogout">
<label>退出登录</label>

80
pages/user/signLog.vue Normal file
View File

@@ -0,0 +1,80 @@
<template>
<view class="content">
<view class="log-blcok" v-for="(item, index) in logs" :key="index" @click="onInfo(item.business_order_id)">
<view class="flex">
<label>订单编号</label>
<view class="val">{{item.order_no}}</view>
</view>
<view class="flex">
<label>业务类型</label>
<view class="val">
<text v-for="(titem, tindex) in item.item_type" :key="tindex">{{titem.title}}</text>
</view>
</view>
<view class="flex">
<label>签约时间</label>
<view class="val">{{item.created_at}}</view>
</view>
</view>
</view>
</template>
<script>
import { getSignLogs, getFlows } from '@/apis/interfaces/user.js'
export default {
data() {
return {
logs: [],
};
},
created() {
this.getLog()
},
methods: {
getLog(){
uni.showLoading({
title: '加载中...',
mask : true
})
getSignLogs({
page: 1
}).then(res => {
this.logs = res.data
this.page = res.page
uni.hideLoading()
}).catch(err => {
uni.showToast({
title: err.message,
icon : 'none'
})
})
},
onInfo(id){
this.$Router.push({
name : 'SignContract',
params : { id }
})
}
}
}
</script>
<style lang="scss">
.content{ padding: 30rpx 30rpx 10rpx; box-sizing: border-box; }
// 订单列表
.log-blcok{
background: white;
border-radius: $radius;
padding: $padding;
position: relative;
// .log-icon{ position: absolute; right: $margin; top: 50%; margin-top: -14rpx; }
.flex{
display: flex;
justify-content: space-between;
font-size: 30rpx;
line-height: 60rpx;
label{ color: gray; }
}
}
</style>

View File

@@ -19,6 +19,7 @@
<text class="identity identity-1" v-if="item.identity.order == 1">普通用户</text>
<text class="identity identity-3" v-if="item.identity.order == 3">顾问</text>
</view>
<view class="nowrap submit">团队业绩{{ item.show_perf ? item.perf: '身份不符暂无业绩' }}</view>
<view class="nowrap submit">联系电话{{item.username}}</view>
<view class="nowrap submit">注册时间{{item.created_at}}</view>
</view>
@@ -74,6 +75,8 @@
page : this.page.current
}).then(res => {
let { users, count } = res;
console.log(users)
let atList = users.page.current == 1 ? [] : this.users
this.count = count
this.users = atList.concat(users.data)