From 484ad91e20259781d4d50df5bef6e5cdd0036f5d Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Thu, 31 Aug 2023 19:25:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- androidPrivacy.json | 6 +- api/shareholder.js | 7 +- pages.json | 10 +- pages/otherSetting/otherSetting.vue | 15 ++ pages/webView/webView.vue | 39 ++++ static/server/contract.js | 5 +- subpkg/shareCapital/shareCapital.vue | 306 ++++++++++++++++++++++++++- 7 files changed, 371 insertions(+), 17 deletions(-) create mode 100644 pages/webView/webView.vue diff --git a/androidPrivacy.json b/androidPrivacy.json index 45ea628..f5909b8 100644 --- a/androidPrivacy.json +++ b/androidPrivacy.json @@ -1,13 +1,13 @@ { "version" : "1.0.0", "prompt" : "template", - "title" : "隐私政策和服务协议", - "message" : "请你务必审慎阅读、充分理解\"服务协议\"和\"隐私政策\"各条款,你可阅读《服务协议》《服务协议》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", + "title" : "隐私政策和用户协议", + "message" : "请你务必审慎阅读、充分理解\"用户协议\"和\"隐私政策\"各条款,你可阅读《用户协议》《隐私政策》了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。", "buttonAccept" : "同意", "buttonRefuse" : "拒绝", "second" : { "title" : "确认提示", - "message" : "  进入应用前,你需先同意《服务协议》《服务协议》,否则将退出应用。", + "message" : "  进入应用前,你需先同意《用户协议》《隐私政策》,否则将退出应用。", "buttonAccept" : "同意并接受", "buttonRefuse" : "退出应用" }, diff --git a/api/shareholder.js b/api/shareholder.js index 777428c..66fe3e2 100644 --- a/api/shareholder.js +++ b/api/shareholder.js @@ -9,4 +9,9 @@ export const companyAccountLog = (data) => oahttp.get('/company_account_log/list /** * 股金详情 */ -export const companyShareholderInfo = (data) => oahttp.get('/company/shareholder_info', data) \ No newline at end of file +export const companyShareholderInfo = (data) => oahttp.get('/company/shareholder_info', data) + +/** + * 发起合同 + */ +export const initiateShareholderContract = (data) => oahttp.post('/company/initiate_shareholder_contract', data) \ No newline at end of file diff --git a/pages.json b/pages.json index b227fcb..3782e7d 100644 --- a/pages.json +++ b/pages.json @@ -176,6 +176,14 @@ "navigationBarBackgroundColor": "#0122C7", "navigationBarTextStyle": "white" } + }, { + "path": "pages/webView/webView", + "style": { + "navigationBarTitleText": "", + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#0122C7", + "navigationBarTextStyle": "white" + } } ], @@ -602,7 +610,7 @@ "path": "shareCapital/shareCapital", "style": { "navigationBarTitleText": "股金管理", - "enablePullDownRefresh": false, + "enablePullDownRefresh": true, "navigationBarBackgroundColor": "#0122C7", "navigationBarTextStyle": "white" } diff --git a/pages/otherSetting/otherSetting.vue b/pages/otherSetting/otherSetting.vue index 89a7c1c..6428a11 100644 --- a/pages/otherSetting/otherSetting.vue +++ b/pages/otherSetting/otherSetting.vue @@ -35,6 +35,14 @@ import { destroyAccount } from '@/api/oaUser.js'; { name: '注销账户' }, + { + name: '隐私政策', + url: 'https://worker-task.lihaink.cn/pc/policy/privacy' + }, + { + name: '用户协议', + url: 'https://worker-task.lihaink.cn/pc/policy/service' + }, { name: '联系我们' }, @@ -53,6 +61,8 @@ import { destroyAccount } from '@/api/oaUser.js'; case '版本更新': this.updateVersion();break; case '注销账户': this.unsubscribe();break; case '联系我们': this.connectUs();break; + case '隐私政策': this.navToWebView(e.url,'隐私政策');break; + case '用户协议': this.navToWebView(e.url,'用户协议');break; } }, updateVersion(){ @@ -96,6 +106,11 @@ import { destroyAccount } from '@/api/oaUser.js'; Toast('复制失败') } }) + }, + navToWebView(uri, title){ + uni.navigateTo({ + url:`/pages/webView/webView?title=${title}&uri=${uri}` + }) } } } diff --git a/pages/webView/webView.vue b/pages/webView/webView.vue new file mode 100644 index 0000000..de3ffdd --- /dev/null +++ b/pages/webView/webView.vue @@ -0,0 +1,39 @@ + + + + + diff --git a/static/server/contract.js b/static/server/contract.js index 3f24681..d034a5a 100644 --- a/static/server/contract.js +++ b/static/server/contract.js @@ -1,3 +1,4 @@ -export const companyContractType = [23, 24, 25, 29] -export const personnerContractType = [19, 20, 21, 22] \ No newline at end of file +export const companyContractType = [23, 24, 25, 29] // 公司合同 +export const personnerContractType = [19, 20, 21, 22] // 个人合同 +export const shareholderContractType = [40] // 股金合同 \ No newline at end of file diff --git a/subpkg/shareCapital/shareCapital.vue b/subpkg/shareCapital/shareCapital.vue index 06192f1..b438c15 100644 --- a/subpkg/shareCapital/shareCapital.vue +++ b/subpkg/shareCapital/shareCapital.vue @@ -9,7 +9,7 @@ - 《入股合同》 + 《股金合同》 {{shareholder.contract_time}} @@ -21,6 +21,60 @@ + + + + + + + + + + + 《股金合同》 + + {{shareholder.contract_time}} + + + + + + + 查看 + + + + + + + + + + + + + 《股金合同》 + + {{shareholder.contract_time}} + + + + + + + 查看 + + + + + + + + + 账单记录 @@ -55,6 +109,7 @@ 退股 上交 + @@ -65,8 +120,18 @@ } from "@/api/junziqian.js" import { companyAccountLog, - companyShareholderInfo + companyShareholderInfo, + initiateShareholderContract } from "@/api/shareholder.js" + import { + companyView, + initiateContract, + Draftingcontracts, + postsms + } from "@/api/company.js" + import { + dictDataLists + } from "@/api/oaPbulic.js" export default { data() { return { @@ -87,14 +152,32 @@ nomoreText: '没有更多记录了~~', status: 'loadmore' }, + timer: null, // 计时器 + timerCount: 0, //倒计时 + modelShow: false, + modelType: 1, + nowContractType: 40, //当前合同类型, 40为股金合同 }; }, - onLoad() { + onLoad(options) { this.initInfo(); 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() { - this.initLoad(); + onUnload() { + 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() { this.loadList(); @@ -128,10 +211,7 @@ navToContract(contract_no) { if (!contract_no) return Toast('暂无合同'); return uni.navigateTo({ - url: `/subpkg/pdfView/pdfView?url=${contract_no}`, - fail() { - uni.hideLoading(); - } + url: `/subpkg/pdfView/pdfView?url=${contract_no}` }) // download_file({ // applyNo: contract_no @@ -158,7 +238,90 @@ hand() { if(!this.shareholder.is_amount_turned) return 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('暂未开放') + }, } } @@ -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; + } \ No newline at end of file