更新功能

This commit is contained in:
weipengfei 2023-08-31 19:25:03 +08:00
parent 2ba47e2248
commit 484ad91e20
7 changed files with 371 additions and 17 deletions

View File

@ -1,13 +1,13 @@
{ {
"version" : "1.0.0", "version" : "1.0.0",
"prompt" : "template", "prompt" : "template",
"title" : "隐私政策和服务协议", "title" : "隐私政策和用户协议",
"message" : "请你务必审慎阅读、充分理解\"服务协议\"和\"隐私政策\"各条款,你可阅读<a href=\"https://worker-task.lihaink.cn/pc/policy/service\">《服务协议》</a>和<a href=\"https://worker-task.lihaink.cn/pc/policy/privacy\">《服务协议》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", "message" : "请你务必审慎阅读、充分理解\"用户协议\"和\"隐私政策\"各条款,你可阅读<a href=\"https://worker-task.lihaink.cn/pc/policy/service\">《用户协议》</a>和<a href=\"https://worker-task.lihaink.cn/pc/policy/privacy\">《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。",
"buttonAccept" : "同意", "buttonAccept" : "同意",
"buttonRefuse" : "拒绝", "buttonRefuse" : "拒绝",
"second" : { "second" : {
"title" : "确认提示", "title" : "确认提示",
"message" : "  进入应用前,你需先同意<a href=\"https://worker-task.lihaink.cn/pc/policy/service\">《服务协议》</a>和<a href=\"https://worker-task.lihaink.cn/pc/policy/privacy\">《服务协议》</a>,否则将退出应用。", "message" : "  进入应用前,你需先同意<a href=\"https://worker-task.lihaink.cn/pc/policy/service\">《用户协议》</a>和<a href=\"https://worker-task.lihaink.cn/pc/policy/privacy\">《隐私政策》</a>,否则将退出应用。",
"buttonAccept" : "同意并接受", "buttonAccept" : "同意并接受",
"buttonRefuse" : "退出应用" "buttonRefuse" : "退出应用"
}, },

View File

@ -9,4 +9,9 @@ export const companyAccountLog = (data) => oahttp.get('/company_account_log/list
/** /**
* 股金详情 * 股金详情
*/ */
export const companyShareholderInfo = (data) => oahttp.get('/company/shareholder_info', data) export const companyShareholderInfo = (data) => oahttp.get('/company/shareholder_info', data)
/**
* 发起合同
*/
export const initiateShareholderContract = (data) => oahttp.post('/company/initiate_shareholder_contract', data)

View File

@ -176,6 +176,14 @@
"navigationBarBackgroundColor": "#0122C7", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, {
"path": "pages/webView/webView",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false,
"navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white"
}
} }
], ],
@ -602,7 +610,7 @@
"path": "shareCapital/shareCapital", "path": "shareCapital/shareCapital",
"style": { "style": {
"navigationBarTitleText": "股金管理", "navigationBarTitleText": "股金管理",
"enablePullDownRefresh": false, "enablePullDownRefresh": true,
"navigationBarBackgroundColor": "#0122C7", "navigationBarBackgroundColor": "#0122C7",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }

View File

@ -35,6 +35,14 @@ import { destroyAccount } from '@/api/oaUser.js';
{ {
name: '注销账户' name: '注销账户'
}, },
{
name: '隐私政策',
url: 'https://worker-task.lihaink.cn/pc/policy/privacy'
},
{
name: '用户协议',
url: 'https://worker-task.lihaink.cn/pc/policy/service'
},
{ {
name: '联系我们' name: '联系我们'
}, },
@ -53,6 +61,8 @@ import { destroyAccount } from '@/api/oaUser.js';
case '版本更新': this.updateVersion();break; case '版本更新': this.updateVersion();break;
case '注销账户': this.unsubscribe();break; case '注销账户': this.unsubscribe();break;
case '联系我们': this.connectUs();break; case '联系我们': this.connectUs();break;
case '隐私政策': this.navToWebView(e.url,'隐私政策');break;
case '用户协议': this.navToWebView(e.url,'用户协议');break;
} }
}, },
updateVersion(){ updateVersion(){
@ -96,6 +106,11 @@ import { destroyAccount } from '@/api/oaUser.js';
Toast('复制失败') Toast('复制失败')
} }
}) })
},
navToWebView(uri, title){
uni.navigateTo({
url:`/pages/webView/webView?title=${title}&uri=${uri}`
})
} }
} }
} }

39
pages/webView/webView.vue Normal file
View File

@ -0,0 +1,39 @@
<template>
<view>
<!-- #ifdef APP-PLUS -->
<web-view :src="uri"></web-view>
<!-- #endif -->
<!-- #ifdef MP-WEIXIN -->
<web-view :src="uri"></web-view>
<!-- #endif -->
<!-- #ifdef H5 -->
<view style="height: 80vh;">
<iframe :src="uri" frameborder="0" scrolling="auto" width="100%" height="100%"></iframe>
</view>
<!-- #endif -->
</view>
</template>
<script>
export default {
data() {
return {
uri: '',
};
},
onLoad(options) {
this.uri = options.uri;
// #ifdef H5
if(options.title)uni.setNavigationBarTitle({
title:options.title
})
// #endif
//
// this.uri = decodeURIComponent(options.uri);
}
}
</script>
<style lang="scss">
</style>

View File

@ -1,3 +1,4 @@
export const companyContractType = [23, 24, 25, 29] export const companyContractType = [23, 24, 25, 29] // 公司合同
export const personnerContractType = [19, 20, 21, 22] export const personnerContractType = [19, 20, 21, 22] // 个人合同
export const shareholderContractType = [40] // 股金合同

View File

@ -9,7 +9,7 @@
<view class="left"> <view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image> <image class="contract_img" src="../../static/img/contract/pdf.png"></image>
<view class="text"> <view class="text">
<view class="name">股合同</view> <view class="name">合同</view>
<view> <view>
<text>{{shareholder.contract_time}}</text> <text>{{shareholder.contract_time}}</text>
</view> </view>
@ -21,6 +21,60 @@
</view> </view>
</view> </view>
</view> </view>
<view class="need_contract" v-else>
<button v-if="shareholder.check_status==0" class="btns" style="width: 694rpx;height: 90rpx; margin: 0 auto;border-radius: 54rpx;overflow: hidden;background-color: #0122c7;color: #fff;" @click="clickContract(1)">
<u-icon name="../../static/img/company/HT.png" size="20" style="margin-right: 10rpx;"></u-icon>
发起合同
</button>
<view v-if="shareholder.check_status==1">
<button class="btn tips_center">合同已生成,请等待审核</button>
</view>
<view v-if="shareholder.check_status==2" class="card">
<view class="contract_box send">
<view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
<view class="text">
<view class="name">股金合同</view>
<view>
<text>{{shareholder.contract_time}}</text>
</view>
</view>
</view>
<view class="right" @click="navToContract(shareholder.contract_url)">
<!-- <image class="icon"></image> -->
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
<view>查看</view>
</view>
</view>
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line>
<view class="bottom">
<button class="send_btn" @click="clickContract(2)">发送合同</button>
</view>
</view>
<view v-if="shareholder.check_status==3" class="card">
<view class="contract_box send">
<view class="left">
<image class="contract_img" src="../../static/img/contract/pdf.png"></image>
<view class="text">
<view class="name">股金合同</view>
<view>
<text>{{shareholder.contract_time}}</text>
</view>
</view>
</view>
<view class="right" @click="navToContract(shareholder.contract_url)">
<!-- <image class="icon"></image> -->
<uni-icons type="paperclip" color="#3274F9"></uni-icons>
<view>查看</view>
</view>
</view>
<u-line color="#999999FF" style="margin: 31rpx 0;"></u-line>
<view class="bottom">
<button class="send_btn" @click="getPostsms" v-if="timerCount==0">再次发送短信</button>
<button class="send_btn tips_center" v-else>{{cTimerCount+'秒后可继续再次发送短信'}}</button>
</view>
</view>
</view>
<view class="card"> <view class="card">
<view class="c_title">账单记录</view> <view class="c_title">账单记录</view>
<u-line></u-line> <u-line></u-line>
@ -55,6 +109,7 @@
<view class="retreat" @click="retreat">退股</view> <view class="retreat" @click="retreat">退股</view>
<view class="hand" :class="{'disable': !shareholder.is_amount_turned}" @click="hand">上交</view> <view class="hand" :class="{'disable': !shareholder.is_amount_turned}" @click="hand">上交</view>
</view> </view>
<u-modal :show="modelShow" title="提醒" :content="modelType==1?'请检查信息无误后再生成合同':'请检查合同无误后再发送'" closeOnClickOverlay showCancelButton cancel-text="我再看看" confirm-text="确认无误" close="modelShow=false" @cancel="modelShow=false" @confirm="modelType==1?createContract():addContract();modelShow=false"></u-modal>
</view> </view>
</template> </template>
@ -65,8 +120,18 @@
} from "@/api/junziqian.js" } from "@/api/junziqian.js"
import { import {
companyAccountLog, companyAccountLog,
companyShareholderInfo companyShareholderInfo,
initiateShareholderContract
} from "@/api/shareholder.js" } from "@/api/shareholder.js"
import {
companyView,
initiateContract,
Draftingcontracts,
postsms
} from "@/api/company.js"
import {
dictDataLists
} from "@/api/oaPbulic.js"
export default { export default {
data() { data() {
return { return {
@ -87,14 +152,32 @@
nomoreText: '没有更多记录了~~', nomoreText: '没有更多记录了~~',
status: 'loadmore' status: 'loadmore'
}, },
timer: null, //
timerCount: 0, //
modelShow: false,
modelType: 1,
nowContractType: 40, //, 40
}; };
}, },
onLoad() { onLoad(options) {
this.initInfo(); this.initInfo();
this.initLoad(); this.initLoad();
let time = uni.getStorageSync('share_time' + this.id);
if (time > 0 && (time - Date.now()) / 1000 > 0) {
this.startTimer((time - Date.now()) / 1000);
}
}, },
onPullDownRefresh() { onUnload() {
this.initLoad(); if (this.timerCount > 0) uni.setStorageSync('share_time' + this.id, this.timerCount * 1000 + Date.now());
},
computed: {
cTimerCount() {
return this.timerCount;
}
},
async onPullDownRefresh() {
await this.initLoad();
uni.stopPullDownRefresh();
}, },
onReachBottom() { onReachBottom() {
this.loadList(); this.loadList();
@ -128,10 +211,7 @@
navToContract(contract_no) { navToContract(contract_no) {
if (!contract_no) return Toast('暂无合同'); if (!contract_no) return Toast('暂无合同');
return uni.navigateTo({ return uni.navigateTo({
url: `/subpkg/pdfView/pdfView?url=${contract_no}`, url: `/subpkg/pdfView/pdfView?url=${contract_no}`
fail() {
uni.hideLoading();
}
}) })
// download_file({ // download_file({
// applyNo: contract_no // applyNo: contract_no
@ -158,7 +238,90 @@
hand() { hand() {
if(!this.shareholder.is_amount_turned) return Toast('暂时无法上交'); if(!this.shareholder.is_amount_turned) return Toast('暂时无法上交');
Toast('暂无内容') Toast('暂无内容')
} },
clickContract(e){
this.modelType = e;
this.modelShow = true;
},
//
async createContract(data) {
uni.showLoading({
title: '合同生成中',
mask: true
})
let res = await initiateShareholderContract({
contract_type: this.nowContractType, //
})
this.initInfo();
uni.hideLoading();
Toast(res.msg || '合同已生成');
this.navTo('/subpkg/submit/submit?type=' + 1);
},
//
async addContract(data) {
try {
uni.showLoading({
title: '合同发送中',
mask: true
})
let res = await Draftingcontracts({
id: this.$store.state.app.userInfo.company_id,
contract_type: this.nowContractType,
});
this.initInfo();
this.startTimer();
uni.hideLoading();
Toast('合同已发送');
} catch (e) {
uni.hideLoading();
Toast(e.msg || '合同发送失败');
}
},
//
async getPostsms() {
try {
uni.showLoading({
title: '发送中',
mask: true
})
if (this.timerCount == 0) {
this.startTimer();
let res = await postsms({
id: this.id
})
Toast('短信已发送');
// this.navTo('/subpkg/submit/submit');
}
} catch (e) {
uni.hideLoading();
Toast(e.msg || '短信发送失败');
}
},
//
startTimer(time = 60) {
this.timerCount = time.toFixed(0);
this.timer = setInterval(() => {
this.timerCount--;
if (this.timerCount <= 0) {
clearInterval(this.timer);
this.loadUserDetail();
}
}, 1000);
},
navTo(url) {
if(url){
uni.showLoading({
title: '加载中',
mask: true
});
uni.navigateTo({
url: url,
success() {
uni.hideLoading()
}
})
}else Toast('暂未开放')
},
} }
} }
</script> </script>
@ -349,4 +512,127 @@
} }
} }
} }
.need_contract {
// padding-bottom: 30rpx;
.title {
font-size: 35rpx;
font-weight: 500;
color: #333333;
margin-bottom: 21rpx;
margin-left: 28rpx;
}
.card {
padding-top: 0;
margin: 28rpx;
padding: 28rpx;
background-color: #fff;
border-radius: 14rpx;
.contract_box {
display: flex;
justify-content: space-between;
.left {
display: flex;
.contract_img {
width: 102rpx;
height: 102rpx;
background: #F5F5F5;
border-radius: 14rpx 14rpx 14rpx 14rpx;
margin-right: 21rpx;
}
.text {
display: flex;
flex-direction: column;
justify-content: space-between;
.name {
font-size: 32rpx;
;
font-weight: 500;
color: rgba(0, 0, 0, 0.8);
line-height: 35rpx;
}
.nickname {
margin-right: 35rpx;
}
text {
height: 39rpx;
font-size: 28rpx;
font-weight: 400;
color: #666666;
line-height: 35rpx;
}
}
}
.right {
font-size: 28rpx;
font-weight: 500;
color: #3274F9;
line-height: 35rpx;
display: flex;
justify-content: center;
align-items: center;
.icon {
width: 35rpx;
height: 39rpx;
background-color: #3274F9;
opacity: 1;
margin-right: 10rpx
}
}
}
.send_btn {
width: 100%;
height: 84rpx;
background: $theme-oa-color;
border-radius: 42rpx 42rpx 42rpx 42rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
}
.tips_center {
background-color: #666;
color: #eee;
}
}
.btn {
margin: 0 auto;
margin-top: 32rpx;
// margin-bottom: 40rpx;
width: 694rpx;
height: 84rpx;
background: $theme-oa-color;
border-radius: 42rpx 42rpx 42rpx 42rpx;
color: #fff;
line-height: 80rpx;
text-align: center;
}
.tips_center {
background-color: #666;
color: #eee;
}
}
.btns {
color: white;
background-color: $theme-oa-color;
display: flex;
justify-content: center;
align-items: center;
}
</style> </style>