diff --git a/pages.json b/pages.json index 87de893..f7634b1 100644 --- a/pages.json +++ b/pages.json @@ -1019,11 +1019,6 @@ "selectedIconPath": "static/icons/tabs_show_00.png", "pagePath": "pages/index/index", "text": "服务包" - }, { - "iconPath": "static/icons/tabs_icon_01.png", - "selectedIconPath": "static/icons/tabs_show_01.png", - "pagePath": "pages/college/test", - "text": "业务考试" }, { "iconPath": "static/icons/tabs_icon_02.png", "selectedIconPath": "static/icons/tabs_show_02.png", diff --git a/pages/business/bigFive.vue b/pages/business/bigFive.vue index b59f031..c01badf 100644 --- a/pages/business/bigFive.vue +++ b/pages/business/bigFive.vue @@ -43,12 +43,10 @@ } }, onLoad() { + const parentData = JSON.parse(decodeURIComponent(this.$Route.query.children)) + this.childrenArr = parentData + this.businessId = this.childrenArr[0].id }, - onShow() { - const parentData = JSON.parse(decodeURIComponent(this.$Route.query.children)) - this.childrenArr = parentData - this.businessId = this.childrenArr[0].id - }, methods: { // 选择业务类型 onBusiness(id){ diff --git a/pages/business/handle.vue b/pages/business/handle.vue index 279438b..943f007 100644 --- a/pages/business/handle.vue +++ b/pages/business/handle.vue @@ -18,20 +18,7 @@ - - - - - - - - - - - - - - + @@ -39,6 +26,23 @@ + + + + + + + + + 计算费用 + + + + + + + + @@ -56,34 +60,35 @@ pickertype : '', name : '', phone : '', - price : '', + price : 0, + diffPrice : '', priceValue : '', - amount : 0, + amount : '', needAmount : 0, + needDiff : 0, selectP : [], selectPIndex: 0 }; }, - onShow() { + onShow() { const parentData = JSON.parse(decodeURIComponent(this.$Route.query.record)) + this.needDiff = parentData.need_diff this.needAmount = parentData.need_amount this.pickerArr = parentData.child.data this.pickertype = parentData.type - this.selectP = parentData.select_p || [] + this.selectP = parentData.select_p || [] + if(parentData.child.has){ + this.amountTypeInfo() + } }, methods: { - // 获取标的额 - onKeyInput(e) { - this.amount = e.detail.value - this.settleInfo() - }, - // 标的额比例计算 settleInfo() { let { pickerArr, pickerIndex } = this let id = pickerArr[pickerIndex].id settleAmount({ - amount: this.pickertype == 'select' ? this.selectP[this.selectPIndex].key : this.amount, + amount : this.pickertype == 'select' ? this.selectP[this.selectPIndex].key : this.amount, + username: this.phone }, id).then(res => { this.price = res.price }).catch(err => { @@ -96,38 +101,46 @@ }) }) }, - - // 选择办理业务 pickerChange(e) { this.pickerIndex = e.detail.value // 获取三级分类服务费类型 this.amountTypeInfo(); + // 清空表单数据 + this.onClerFrom() }, // 选择资费信息 pickerSelectChange(e){ - this.selectPIndex = e.detail.value - this.settleInfo() - }, - + let { value } = e.detail + this.selectPIndex = value + // 清空表单数据 + this.onClerFrom() + }, + + // 清空数据信息 + onClerFrom(){ + this.amount = "" + this.price = 0 + this.priceValue = "" + this.name = "" + this.phone = "" + this.diffPrice = "" + }, // 三级分类服务费类型 amountTypeInfo() { - // this.$Route.query.bigFiveId let { pickerArr, pickerIndex } = this let id = pickerArr[pickerIndex].id amountType(id).then(res => { - let { type, need_amount, select_p } = res; + let { type, need_amount, select_p, need_diff } = res; + this.needDiff = need_diff this.pickertype = type this.needAmount = need_amount - - console.log(select_p) - this.selectP = select_p || [] - if(type == 'select'){ - this.settleInfo() - } + // if(type == 'select'){ + // this.settleInfo() + // } }).catch(err => { uni.showToast({ title: err.message, @@ -140,9 +153,9 @@ // 提交表单 onSubmit(){ - let { name, phone, pickerIndex, price, priceValue, amount, pickerArr, pickertype, selectP, selectPIndex } = this + let { name, phone, pickerIndex, price, priceValue, amount, pickerArr, pickertype, selectP, selectPIndex, diffPrice } = this if(pickertype != 'free') { - if(amount === ''){ + if(selectP.length <= 0 && amount === ''){ uni.showToast({ title: '请输入标的额', icon : 'none' @@ -180,11 +193,14 @@ let params = { big_id : pickerArr.length > 0 ? pickerArr[pickerIndex].id : this.$Route.query.bigFiveId, name : name, - amount : amount, + amount : amount || 0, mobile : phone, price : pickertype == 'free' ? priceValue : price, - select_key : selectP.length > 0 ? selectP[selectPIndex].key : '' + select_key : selectP.length > 0 ? selectP[selectPIndex].key : '', + diff_price : diffPrice } + + console.log(params) bigfiveStore(params).then(res => { let { order_type, order_id, order_no } = res; @@ -229,6 +245,8 @@ padding: 15rpx 0; &:last-child{ border: none; } label{ width: 200rpx; line-height: 70rpx; } + &.from-block-get{ padding-right: 200rpx; position: relative; } + .from-block-get-btn{ font-size: 32rpx; line-height: 100rpx; border-left:solid 1rpx #f3f3f3; color: $main-color; width: 170rpx; text-align: center; position: absolute; right: 0; top: 0; } .from-block-val{ width: calc(100% - 200rpx); text-align: right; line-height: 70rpx; &.price{ color: $main-color; font-weight: bold; } } diff --git a/pages/pay/pay.vue b/pages/pay/pay.vue index bf84fb7..367a34c 100644 --- a/pages/pay/pay.vue +++ b/pages/pay/pay.vue @@ -199,8 +199,6 @@ let order_type = this.$Route.query.orderType.replace(/\-/g, '\\') oderinfo( this.$Route.query.orderId, order_type).then(res => { let { order_no, price, score, order_id, rate, total_fire, can_use_channel } = res - - this.rate = rate this.totalFire = total_fire this.orderType = order_type diff --git a/pages/work/index.vue b/pages/work/index.vue index 7473eb3..c624038 100644 --- a/pages/work/index.vue +++ b/pages/work/index.vue @@ -9,15 +9,16 @@ {{userInfo.nickname}}{{identity.name}} - + 创建订单 - - + + + - 实习顾问专属权益 + 专属权益 @@ -25,7 +26,16 @@ - + + + + + @@ -64,7 +74,7 @@ - + @@ -129,7 +139,10 @@ synthesisData : {}, bigfiveArr : [], - captchaShow : false + captchaShow : false, + // 工作台权限 + isWorker : false, + workerHint : "" }; }, onShow() { @@ -212,7 +225,7 @@ indexData = res[1], synthesisData = res[2] - let { nickname, avatar, business_orders_count, isCertification, certification, isManager, isAnswer, identity, sign } = indexData + let { nickname, avatar, business_orders_count, isCertification, certification, isManager, isAnswer, identity, sign, is_worker, no_worker_message } = indexData this.rightsArr = rightsData this.userInfo = { nickname, @@ -225,11 +238,13 @@ this.orderCount = business_orders_count this.identity = identity this.sign = sign - this.synthesisData = synthesisData - + this.isWorker = is_worker + this.workerHint = no_worker_message uni.hideLoading() }).catch(err => { + + console.log(err) uni.showToast({ title: err.message, icon : 'none' @@ -294,6 +309,17 @@ .content{ padding-bottom: 30rpx; } + // 权限提示 + .work-hint{ + height: 50vh; + padding: 30rpx; + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + color: gray; + font-size: 30rpx; + } // 登录提示 .auth-null{ height: 100vh;