From 22271e641e4505ba906c3770905b7e84e3ad8d85 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期二, 02 四月 2024 17:05:57 +0800
Subject: [PATCH] mrshi
---
wx/pages/policyDetails/policyDetails.vue | 269 +++++++++++++++++++++++++++++++++++++++++------------
1 files changed, 207 insertions(+), 62 deletions(-)
diff --git a/wx/pages/policyDetails/policyDetails.vue b/wx/pages/policyDetails/policyDetails.vue
index 801054c..fd3c757 100644
--- a/wx/pages/policyDetails/policyDetails.vue
+++ b/wx/pages/policyDetails/policyDetails.vue
@@ -9,13 +9,14 @@
<text>淇濆崟鍙凤細{{info.code ? info.code : '-'}}</text>
</view>
<image v-if="info.statusCollect === 2" src="@/static/icon/progress_baozhangzhong@2x.png" mode="widthFix"></image>
- <image v-if="info.statusCollect === 0" src="@/static/icon/progress_daishenhe@2x.png" mode="widthFix"></image>
+ <image v-if="info.statusCollect === 0 || info.statusCollect === 22" src="@/static/icon/progress_daishenhe@2x.png" mode="widthFix"></image>
<image v-if="info.statusCollect === 7" src="@/static/icon/progress_daiqianshu@2x.png" mode="widthFix"></image>
<image v-if="info.statusCollect === 1" src="@/static/icon/progress_daichudan@2x.png" mode="widthFix"></image>
<image v-if="info.statusCollect === 5" src="@/static/icon/progress_shenqingtuihui@2x.png" mode="widthFix"></image>
<image v-if="info.statusCollect === 4" src="@/static/icon/progress_yituihui@2x.png" mode="widthFix"></image>
- <image v-if="info.statusCollect === 6" src="@/static/icon/progress_yiguanbi@2x.png" mode="widthFix"></image>
+ <image v-if="info.statusCollect === 6 || info.statusCollect === 25" src="@/static/icon/progress_yiguanbi@2x.png" mode="widthFix"></image>
<image v-if="info.statusCollect === 3" src="@/static/icon/progress_yiguoqi@2x.png" mode="widthFix"></image>
+ <image v-if="info.statusCollect === 26" src="@/static/icon/ic_toubaozhong.png" mode="widthFix"></image>
</view>
<view class="box_info_center">
<view class="box_info_center_x"></view>
@@ -86,36 +87,61 @@
</view>
</view>
</view>
- <view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 100rpx);"></view>
- <!-- 淇濋殰涓� -->
- <view class="details_footer" v-if="info.statusCollect === 2">
- <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅鎶曚繚鍗�"></u-button>
- <view style="width: 44rpx; height: 50rpx;"></view>
- <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅淇濋櫓鍗�"></u-button>
- </view>
- <!-- 寰呭鏍� -->
- <view class="details_footer" v-if="info.statusCollect === 0">
- <!-- show = true -->
- <u-button type="primary" shape="circle" color="#437CB3" @click="open1" :plain="true" text="鐢宠閫�鍥�"></u-button>
- </view>
- <!-- 寰呯缃� -->
- <view class="details_footer" v-if="info.statusCollect === 7">
- <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鐢宠閫�鍥�"></u-button>
- <view style="width: 44rpx; height: 50rpx;"></view>
- <u-button type="primary" shape="circle" color="#437CB3" @click="show1 = true" text="绛剧讲鎶曚繚鍗�"></u-button>
- </view>
- <!-- 寰呭嚭璐� -->
- <view class="details_footer" v-if="info.statusCollect === 1">
- <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鐢宠閫�鍥�"></u-button>
- <view style="width: 44rpx; height: 50rpx;"></view>
- <u-button type="primary" shape="circle" color="#437CB3" text="鏌ョ湅鎶曚繚鍗�"></u-button>
- </view>
- <!-- 宸查��鍥� -->
- <view class="details_footer" v-if="info.statusCollect === 4">
- <u-button type="primary" shape="circle" color="#437CB3" @click="show2 = true" :plain="true" text="鍏抽棴璁㈠崟"></u-button>
- <view style="width: 44rpx; height: 50rpx;"></view>
- <u-button type="primary" shape="circle" color="#437CB3" text="鍐嶆鎶曚繚"></u-button>
- </view>
+ <view style="width: 100%; height: calc(env(safe-area-inset-bottom) + 100rpx);" v-if="[2,0,7,1,4,22,25,26].includes(info.statusCollect)"></view>
+ <!-- 鐩翠繚 -->
+ <template v-if="info.solutionType === 0">
+ <!-- 淇濋殰涓� -->
+ <view class="details_footer" v-if="info.statusCollect === 2">
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅鎶曚繚鍗�" @click="seePdf(info.toubaodanSignedFile.fileurlFull)"></u-button>
+ <view style="width: 44rpx; height: 50rpx;"></view>
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅淇濋櫓鍗�" @click="seePdf(info.baoxiandanFile.fileurlFull)"></u-button>
+ </view>
+ <!-- 寰呭鏍� -->
+ <view class="details_footer" v-if="info.statusCollect === 0">
+ <!-- show = true -->
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鐢宠閫�鍥�" @click="show = true"></u-button>
+ </view>
+ <!-- 寰呯缃� -->
+ <view class="details_footer" v-if="info.statusCollect === 7">
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鐢宠閫�鍥�" @click="show = true"></u-button>
+ <view style="width: 44rpx; height: 50rpx;"></view>
+ <!-- @click="show1 = true" -->
+ <u-button type="primary" shape="circle" color="#437CB3" text="绛剧讲鎶曚繚鍗�" @click="signApplication"></u-button>
+ </view>
+ <!-- 寰呭嚭璐� -->
+ <view class="details_footer" v-if="info.statusCollect === 1">
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鐢宠閫�鍥�" @click="show = true"></u-button>
+ <view style="width: 44rpx; height: 50rpx;"></view>
+ <u-button type="primary" shape="circle" color="#437CB3" text="鏌ョ湅鎶曚繚鍗�" @click="seePdf(info.toubaodanSignedFile.fileurlFull)"></u-button>
+ </view>
+ <!-- 宸查��鍥� -->
+ <view class="details_footer" v-if="info.statusCollect === 4">
+ <u-button type="primary" shape="circle" color="#437CB3" @click="show2 = true" :plain="true" text="鍏抽棴璁㈠崟"></u-button>
+ </view>
+ </template>
+ <!-- 濮旀墭鎶曚繚 -->
+ <template v-else>
+ <!-- 寰呯缃� -->
+ <view class="details_footer" v-if="info.statusCollect === 7">
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="绛剧讲纭涔�" @click="openmessage(2)"></u-button>
+ <view style="width: 44rpx; height: 50rpx;"></view>
+ <u-button type="primary" shape="circle" color="#437CB3" text="绛剧讲鐢宠鍗�" @click="openmessage(3)"></u-button>
+ </view>
+ <!-- 寰呭鏍�/寰呭嚭璐� -->
+ <view class="details_footer" v-if="info.statusCollect === 0 || info.statusCollect === 1">
+ <u-button type="primary" shape="circle" color="#437CB3" :plain="true" text="鏌ョ湅鐢宠鍗�" @click="seePdf(info.shenqingdanFile.fileurlFull)"></u-button>
+ <view style="width: 44rpx; height: 50rpx;"></view>
+ <u-button type="primary" shape="circle" color="#437CB3" text="鏌ョ湅纭涔�" @click="seePdf(info.fanganFile.fileurlFull)"></u-button>
+ </view>
+ <!-- 宸查��鍥� -->
+ <view class="details_footer" v-if="info.statusCollect === 4">
+ <u-button type="primary" shape="circle" color="#437CB3" @click="show2 = true" :plain="true" text="鍏抽棴鐢宠"></u-button>
+ </view>
+ <!-- 鎶曚繚涓� -->
+ <view class="details_footer" v-if="info.statusCollect === 26 && info.unionApplyTbdStatus !== 0">
+ <u-button type="primary" shape="circle" color="#437CB3" text="绛剧讲鎶曚繚鍗�" @click="openmessage(1)"></u-button>
+ </view>
+ </template>
<!-- 鐢宠閫�鍥炵‘璁ゅ脊绐� -->
<u-modal :show="show" title="娓╅Θ鎻愮ず" :showCancelButton="true" cancelText="鎴戝啀鎯虫兂" confirmColor="#437CB3" @cancel="cancel" @confirm="confirm">
纭鐢宠閫�鍥烇紵
@@ -128,11 +154,15 @@
<u-modal :show="show1" title="鑾峰彇楠岃瘉鐮�" :showCancelButton="true" confirmColor="#437CB3" @cancel="cancel1" @confirm="confirm1">
<view class="code">
<view class="code_input">
- <input type="text" placeholder="杈撳叆楠岃瘉鐮�" />
+ <input type="text" v-model="code" placeholder="杈撳叆楠岃瘉鐮�" />
</view>
<view class="code_text">
- <text class="code_text_error">楠岃瘉鐮侀敊璇�</text>
- <text>鑾峰彇楠岃瘉鐮�</text>
+ <text class="code_text_error" v-if="error === 1">楠岃瘉鐮佷笉鑳戒负绌�</text>
+ <text class="code_text_error" v-else-if="error === 2">楠岃瘉鐮侀敊璇�</text>
+ <text v-else></text>
+
+ <text @click="send" v-if="num === 0">鑾峰彇楠岃瘉鐮�</text>
+ <text v-else>{{num}}</text>
</view>
</view>
</u-modal>
@@ -140,6 +170,7 @@
</template>
<script>
+ import { mapState } from 'vuex'
export default {
data() {
return {
@@ -150,8 +181,17 @@
list: [],
show: false,
show1: false,
- show2: false
+ show2: false,
+
+ type: null,
+ code: '',
+ num: 0,
+ error: false,
+ timer: null
};
+ },
+ computed: {
+ ...mapState(['userInfo'])
},
onLoad(options) {
this.orderId = options.orderId
@@ -162,6 +202,55 @@
this.applyDetailPage()
},
methods: {
+ send () {
+ this.$u.api.sendSms({
+ phone: this.userInfo.mobile
+ }).then(res => {
+ if (res.code === 200) {
+ this.num = 60
+ this.setTime()
+ }
+ })
+ },
+ setTime () {
+ this.timer = setInterval(() => {
+ if (this.num === 0) {
+ clearInterval(this.timer)
+ this.timer = null
+ return
+ }
+ this.num = this.num - 1
+ }, 1000)
+ },
+ // 鎵撳紑鍙戦�侀獙璇佺爜寮圭獥
+ openmessage(type) {
+ this.code = ''
+ clearInterval(this.timer)
+ this.error = ''
+ this.timer = null
+ this.num = 0
+ this.type = type
+ this.show1 = true
+ },
+ signApplication() {
+ uni.navigateTo({
+ url: `/pages/webView/webView?url=https://web.sandbox.junziqian.com/signInfo/viewDetail?ts=1711966477502&signNo=SSN1774742154020143104&sign=GHW6wWRJfEZiXO-gXZwTezR5CYUvhwbmoWHlPsqUCLA`
+ })
+ },
+ // 鏌ョ湅pdf
+ seePdf(url) {
+ if(!url) return;
+ uni.downloadFile({
+ url,
+ success: function (res) {
+ var filePath = res.tempFilePath;
+ uni.openDocument({
+ filePath: filePath,
+ success: function (res) {}
+ })
+ }
+ })
+ },
// 鑾峰彇璇︽儏
getDetails() {
this.$u.api.insuranceApplyById(this.orderId)
@@ -191,23 +280,6 @@
}
})
},
- open1() {
- uni.navigateToMiniProgram({
- appId: 'wxf7fd282cd119885f', // 瑕佹墦寮�鐨勫皬绋嬪簭鐨刟ppid
- path: 'pages/index/index', // 鎵撳紑鐨勯〉闈㈣矾寰勶紝鍙��
- extraData: {
- // 闇�瑕佷紶閫掔粰鐩爣灏忕▼搴忕殑鏁版嵁锛屽彲閫�
- },
- success(res) {
- // 鎵撳紑鎴愬姛鐨勫洖璋冿紝鍙��
- console.log('鎵撳紑鎴愬姛');
- },
- fail(err) {
- // 鎵撳紑澶辫触鐨勫洖璋冿紝鍙��
- console.log('鎵撳紑澶辫触', err);
- }
- });
- },
IdCard(UUserCard) {
let idcard = UUserCard.toString();
//鑾峰彇骞撮緞
@@ -221,38 +293,111 @@
return age;
},
confirm() {
- this.show = false
+ this.$u.api.applyOpt({
+ applyId: this.info.id,
+ optIllustration: '',
+ optType: 1
+ }).then(res => {
+ if (res.code === 200) {
+ this.getDetails()
+ this.show = false
+ }
+ })
},
cancel() {
this.show = false
},
confirm1() {
- this.show1 = false
+ if (!this.code) {
+ this.error = 1
+ return
+ }
+ // 绛剧讲鎶曚繚鍗�
+ if (this.type === 1) {
+ this.$u.api.validateCode({
+ code: this.code
+ }).then(res => {
+ if (res.code === 200) {
+ this.error = ''
+ this.show1 = false
+ this.$u.api.getSignLink(this.info.id)
+ .then(url => {
+ if (url.code === 200) {
+ uni.navigateTo({
+ url: `/pages/webView/webView?url=${url.data}`
+ })
+ }
+ })
+ } else {
+ this.error = 2
+ }
+ })
+ // 纭涔�
+ } else if (this.type === 2) {
+ this.$u.api.signTBQRSLink({
+ businessId: this.info.id,
+ code: this.code
+ }).then(res => {
+ if (res.code === 200) {
+ this.error = ''
+ this.show1 = false
+ uni.navigateTo({
+ url: `/pages/webView/webView?url=${res.data}`
+ })
+ } else {
+ this.error = 2
+ }
+ })
+ // 绛剧讲鐢宠鍗�
+ } else if (this.type === 3) {
+ this.$u.api.getMemberListOnlineSignLink({
+ businessId: this.info.id,
+ code: this.code
+ }).then(res => {
+ if (res.code === 200) {
+ this.error = ''
+ this.show1 = false
+ uni.navigateTo({
+ url: `/pages/webView/webView?url=${res.data}`
+ })
+ } else {
+ this.error = 2
+ }
+ })
+ }
},
cancel1() {
this.show1 = false
},
confirm2() {
- this.show2 = false
+ this.$u.api.applyOpt({
+ applyId: this.info.id,
+ optType: 2
+ }).then(res => {
+ if (res.code === 200) {
+ this.show2 = false
+ this.getDetails()
+ }
+ })
},
cancel2() {
this.show2 = false
},
returnStyle(type) {
- if ([2].includes(type)) {
+ if ([2,26].includes(type)) {
return 'linear-gradient( 180deg, #E5F7F1 0%, rgba(255,255,255,0) 100%);'
- } else if ([0,7,1].includes(type)) {
+ } else if ([0,7,1,22].includes(type)) {
return 'linear-gradient( 180deg, #FFF2E3 0%, rgba(255,255,255,0) 100%);'
- } else if ([5,4,6,3].includes(type)) {
+ } else if ([5,4,6,3,25].includes(type)) {
return '#f7f7f7'
}
},
returnStyle1(type) {
- if ([2].includes(type)) {
+ if ([2,26].includes(type)) {
return 'linear-gradient( 180deg, #E5F7F1 0%, rgba(255,255,255,0) 100%);'
- } else if ([0,7,1].includes(type)) {
+ } else if ([0,7,1,22].includes(type)) {
return 'linear-gradient( 180deg, #FFF2E3 0%, rgba(255,255,255,0) 100%);'
- } else if ([5,4,6,3].includes(type)) {
+ } else if ([5,4,6,3,25].includes(type)) {
return '#ffffff'
}
}
--
Gitblit v1.9.3