From f7824e3e86d6deae51e37d6b8ba232a086a58d06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E6=98=8E=E6=98=8E?= <970899069@qq.com> Date: Mon, 22 May 2023 17:31:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E5=8D=95=EF=BC=8C=E4=BC=81?= =?UTF-8?q?=E4=B8=9A=E5=B9=B4=E8=B4=B9=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/synthesize/enterprise.vue | 57 ++++++++++++-- pages/synthesize/entrust.vue | 44 +++++------ pages/synthesize/entrustCivil.vue | 10 ++- pages/synthesize/entrustWrite.vue | 127 ++++++++++++++---------------- pages/synthesize/individual.vue | 52 +++++------- pages/synthesize/service.vue | 1 - 6 files changed, 157 insertions(+), 134 deletions(-) diff --git a/pages/synthesize/enterprise.vue b/pages/synthesize/enterprise.vue index 8194ebd..1e886a4 100644 --- a/pages/synthesize/enterprise.vue +++ b/pages/synthesize/enterprise.vue @@ -12,7 +12,13 @@ {{item.title}} - {{item.is_open ? '续费' : '购买'}} + + 购买 + 续费 + 支付 + 审核中 + 被驳回 + @@ -27,12 +33,6 @@ {{item.price}}元/年 - - 服务期限: - - {{item.day}}天 - - 服务范围: @@ -80,6 +80,7 @@ yearSynthList({ type: 2 }).then(res => { + console.log(res) this.synthesisArr = res }).catch(err => { uni.showToast({ @@ -87,6 +88,47 @@ icon : 'none' }) }) + }, + // 购买企业服务包 + onBuy(index){ + let obj = this.synthesisArr[index] + switch (obj.button_status){ + case 3: + uni.showToast({ + title: '打款凭证审核中,请耐心等待', + icon : 'none' + }) + break; + case 4: + uni.showModal({ + title : '审核被驳回', + content : '驳回原因:' + obj.service_order.offline_pays.remark, + showCancel : false, + success : modalRes => { + if(modalRes.confirm){ + this.$Router.push({ + name : 'BankPay', + params : { + payId : obj.service_order.offline_pays.offline_pay_id, + type : 'edit', + orderId : obj.service_order.order_id, + orderType : obj.service_order.order_type.replace(/\\/g, '-'), + price : obj.price + } + }) + } + } + }) + break; + default: + this.$Router.push({ + name: 'StandWrite', + params: { + serveId: obj.synthesis_service_id + } + }) + break; + } } } } @@ -190,6 +232,7 @@ color: #582700; padding: 0 30rpx; border-radius: 50rpx; + font-size: 30rpx; box-shadow: 0 8rpx 6rpx rgba(0, 0, 0, .3); } } diff --git a/pages/synthesize/entrust.vue b/pages/synthesize/entrust.vue index 3a9d0bd..01a1f30 100644 --- a/pages/synthesize/entrust.vue +++ b/pages/synthesize/entrust.vue @@ -1,7 +1,7 @@ @@ -134,10 +124,10 @@ // 目前所在地 address : {}, - disabled : false, orderId : '', // 订单 ID orderType : '', // 订单类型 voucherState : false, // 上传凭证弹出 + price : '0.00', // 价格 } }, created() { @@ -145,6 +135,10 @@ title: '加载中...', mask : true }) + // 设置标题 + uni.setNavigationBarTitle({ + title: '案件委托-' + this.$Route.query.title + }) // 获取综法咨询-详情 this.getBusiness(); @@ -176,8 +170,8 @@ // 综法咨询-详情 getBusiness(){ entrustInfo(this.$Route.query.entrustId).then(res => { - let froms = res.params - froms.map(val => { + let { price, params } = res + params.map(val => { if(val.type === 'checkbox'){ val.value = [] }else if(val.type === 'select'){ @@ -186,12 +180,15 @@ val.value = "" } }) - this.paramsArr = froms + this.price = price + this.paramsArr = params }).catch(err => { uni.showToast({ title: err.message, icon : 'none' }) + }).finally(() => { + uni.hideLoading() }) }, @@ -243,11 +240,10 @@ entrustPost(this.$Route.query.entrustId, { data: dataArr, type: 'self', - channel: 'h5', + channel: 'App', user_id: '' }).then(res => { - this.disabled = true - this.expressSheet(res.entrust_order_id, res.order_type, res.can, res.price ) + this.expressSheet(res.entrust_order_id, res.order_type, res.can) }).catch( err => { uni.showToast({ title: err.message, @@ -257,51 +253,46 @@ }, // 选择支付方式 - expressSheet(id, type, can, price) { + expressSheet(id, type, can) { this.orderId = id this.orderType = type + + // 仅支持线下打款 + if(!can.online){ + this.onToBankPay() + return + } + // 选择线上、下支付方式 uni.showActionSheet({ itemList: ['线上支付', '线下支付'], success: sheetRes => { - if(sheetRes.tapIndex == 0) { - if(can.online) { - this.$Router.replace({name: 'FeePay', params: {orderId: id, orderType: type, price: price, payForm: 'entrust'}}) - return - } - this.voucherState = true - } else if (sheetRes.tapIndex == 1) { - this.$Router.replace({name: 'VoucherOpen', params: {orderId: id, orderType: type}}) + if(sheetRes.tapIndex == 0){ + this.$Router.replace({ + name: 'Pay', + params: { + paytype : 'synthesize', + orderId : id, + orderType : type.replace(/\\/g, '-') + }, + }) + return } - }, - fail: sheetFail => { - uni.showToast({ - title: '取消支付', - icon : 'none' - }) - setTimeout(()=>{ - this.$Router.replace({name: 'ExpandOrder'}) - },3000) - } + this.onToBankPay() + } }) + }, - - // 取消支付 - cancelPay() { - this.voucherState = false - uni.showToast({ - title: '取消支付', - icon : 'none' + // 去线下打款 + onToBankPay(){ + this.$Router.replace({ + name: 'BankPay', + params: { + orderId : this.orderId, + orderType : this.orderType.replace(/\\/g, '-'), + price : this.price + }, }) - setTimeout(()=>{ - this.$Router.replace({name: 'ExpandOrder'}) - },3000) - }, - - // 上传凭证 - clickOpen() { - this.voucherState = false - this.$Router.replace({name: 'VoucherOpen', params: {orderId: this.orderId, orderType: this.orderType}}) - }, + } } } diff --git a/pages/synthesize/individual.vue b/pages/synthesize/individual.vue index 1e50ee6..1ba7e58 100644 --- a/pages/synthesize/individual.vue +++ b/pages/synthesize/individual.vue @@ -38,18 +38,15 @@ - - - {{item.is_open ? '立即续费' : '立即开通'}} - - - {{item.is_open ? '立即续费' : '立即开通' }} - 打款审核中 - 打款被驳回 - + + 立即购买 + 立即续费 + 等待支付 + 打款审核中 + 打款被驳回 - 到期时间:{{item.service_user.ended_at}} + 到期时间:{{item.service_user.ended_at}} @@ -75,8 +72,6 @@ type: 1 }).then(res => { this.synthesisArr = res - - console.log(res) }).catch(err => { uni.showToast({ title: err.message, @@ -87,21 +82,17 @@ // 点击开通按钮 onBtn(index){ let obj = this.synthesisArr[index] - if(obj.service_order === null){ - this.onOpenPAY(obj.synthesis_service_id) - return - } - switch (obj.service_order.can.pay_status){ - case 1: - this.onOpenPAY(obj.synthesis_service_id) - break; - case 2: + + console.log(obj) + + switch (obj.button_status){ + case 3: uni.showToast({ title: '打款凭证审核中,请耐心等待', icon : 'none' }) break; - case 3: + case 4: uni.showModal({ title : '审核被驳回', content : '驳回原因:' + obj.service_order.offline_pays.remark, @@ -122,16 +113,15 @@ } }) break; + default: + this.$Router.push({ + name: 'PersonWrite', + params: { + serveId: obj.synthesis_service_id + } + }) + break; } - }, - // 填写支付信息 - onOpenPAY(serveId){ - this.$Router.push({ - name: 'PersonWrite', - params: { - serveId - } - }) } } } diff --git a/pages/synthesize/service.vue b/pages/synthesize/service.vue index 96f7008..ee381f4 100644 --- a/pages/synthesize/service.vue +++ b/pages/synthesize/service.vue @@ -39,7 +39,6 @@ // 案件委托-列表 yearServe(){ expandsList().then(res => { - console.log(res) this.entrustArr = res }).catch(err => { uni.showToast({