diff --git a/pages/agent/centerV2.vue b/pages/agent/centerV2.vue index 458bb64..353a7a2 100644 --- a/pages/agent/centerV2.vue +++ b/pages/agent/centerV2.vue @@ -186,7 +186,7 @@ export default { } // 通用菜单 menuList.push({ - title: '合同签约', + title: '合作协议', type: 'link', url: '/pages/agent/contract/index?role_type='+ agentType +'&role_id=' + agentId, icon: 'icon-bianji4', diff --git a/pages/agent/invite/index.vue b/pages/agent/invite/index.vue index a97c95e..e3d8895 100644 --- a/pages/agent/invite/index.vue +++ b/pages/agent/invite/index.vue @@ -120,6 +120,22 @@ + + + + + {{ Number(pay_money) === Number(current_set.total_money) ? '全额' : '定金' }}: + + ¥{{ pay_money }} + + + + 剩余尾款{{ Number(current_set.total_money - pay_money).toFixed(2) }}元 + + + 切换 + + @@ -140,9 +156,32 @@ @close="areaPopupChange(false)" @changeAddress="areaChange" > - + + + + + + + ¥{{ Number(current_set.total_money).toFixed(2) }} + + 选中 + + + + ¥{{ Number(item.deposit_price).toFixed(2) }} + + 剩余尾款{{ Number(item.surplus_price).toFixed(2) }}元 + + + 选中 + + + + + + @@ -168,6 +207,10 @@ export default { return { page_title: '修改申请信息', config: {}, + agent_base_set: {}, + current_set: {}, + deposit_list: {}, + deposit_index: -1, pay_money: 0,// 支付金额 // 登录相关 isAuto: false, //没有授权的不会自动授权 @@ -308,19 +351,18 @@ export default { getConfig(){ let _this = this; getAgentConfig().then(res => { - if (res.status == 200) { + if (Number(res.status) === 200) { _this.config = res.data || {}; - // 判断:是否需要审核 - switch (Number(_this.agent_type)) { - case 2: _this.pay_money = _this.config.province_money || 0;break; - case 3: _this.pay_money = _this.config.field_staff_money || 0;break; - case 4: _this.pay_money = _this.config.internal_staff_money || 0;break; - case 5: _this.pay_money = _this.config.operator_money || 0;break; - case 6: _this.pay_money = _this.config.partner_money || 0;break; - case 7: _this.pay_money = _this.config.mer_money || 0;break; - case 8: _this.pay_money = _this.config.delivery_money || 0;break; - case 9: _this.pay_money = _this.config.field_personnel_money || 0;break; - case 10: _this.pay_money = _this.config.external_personnel_money || 0;break; + _this.agent_base_set = _this.config.agent_base_set || {}; + _this.current_set = _this.agent_base_set[_this.agent_type] || {}; + _this.deposit_list = _this.current_set.deposit_list|| {}; + let totalMoney = _this.current_set.total_money || 0; + if(Object.values(_this.deposit_list).length > 0 && Number(totalMoney) > 0){ + _this.deposit_index = 0; + _this.pay_money = _this.deposit_list[_this.deposit_index].deposit_price || 0; + }else{ + _this.deposit_index = -1; + _this.pay_money = totalMoney || 0; } } }).catch(err => { @@ -453,6 +495,7 @@ export default { } applyInfo.pay_type = payInfo.pay_type applyInfo.return_url = payInfo.return_url + applyInfo.deposit_index = _this.deposit_index || 0; // 提交申请 submitAgentApplyInfo(applyInfo).then(res => { if (res.status == 200) { @@ -706,7 +749,26 @@ export default { }).catch(err => { this.$util.Tips({title: err}); }); - } + }, + // 点击显示切换支付项弹框 + showChangePopup(){ + this.$refs.paymentListPopup.open('bottom'); + }, + // 点击切换支付项 + changePayment(index){ + let _this = this; + _this.deposit_index = index; + if(Number(index) === Number(-1)){ + _this.pay_money = _this.current_set.total_money || 0; + }else{ + let info = _this.deposit_list[_this.deposit_index] || {}; + + _this.pay_money = info.deposit_price || 0; + } + _this.$refs.paymentListPopup.close(); + }, + + } } @@ -936,6 +998,62 @@ export default { } // 支付方式 .pay-type{ + //支付类型 + .pay-money-type{ + height: 120rpx; + padding: 20rpx; + width: 100%; + border: 2rpx solid #d9dce4; + border-radius: 15rpx; + display: inline-flex; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; + justify-content: space-between; + .left{ + display: inline-flex; + flex-direction: column; + flex-wrap: nowrap; + justify-content: center; + align-items: flex-start; + .current-pay-info{ + display: inline-flex; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; + justify-content: flex-start; + .label-text{ + font-size: 32rpx; + font-weight: bold; + } + .label-price{ + color: #E93323; + font-size: 38rpx; + font-weight: bold; + .unit{ + font-size: 28rpx; + margin-right: 5rpx; + } + } + } + .arrears{ + font-size: 26rpx; + height: 40rpx; + line-height: 40rpx; + color: #aaa; + } + } + .change-btn{ + font-size: 26rpx; + border-radius: 40rpx; + color: #fff; + background-color: #409eff; + border-color: #409eff; + height: 46rpx; + line-height: 46rpx; + padding: 0px 30rpx; + } + } .box-title{ margin: 30rpx 0; height: 50rpx; @@ -1017,4 +1135,61 @@ export default { } } } +.payment-list-content{ + background: #FFFFFF; + width: 100vw!important; + height: 80vh!important; + padding: 15rpx; + border-top-right-radius: 20rpx; + border-top-left-radius: 20rpx; + + .list{ + overflow: auto; + height: calc(100% - 60rpx); + .box{ + display: inline-flex; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; + justify-content: space-between; + padding: 20rpx 0; + width: 100%; + .left{ + width: calc(100% - 110rpx); + display: inline-flex; + flex-direction: column; + flex-wrap: nowrap; + align-items: flex-start; + justify-content: flex-start; + .price{ + width: 100%; + font-size: 36rpx; + height: 70rpx; + line-height: 70rpx; + color: #fb0000; + } + .arrears{ + font-size: 26rpx; + height: 40rpx; + line-height: 40rpx; + color: #aaa; + } + } + .selected-btn{ + width: 100rpx; + height: 50rpx; + line-height: 50rpx; + text-align: center; + font-size: 26rpx; + color: #fff; + background-color: #409eff; + border-color: #409eff; + border-radius: 50rpx; + } + } + .box:not(:last-child){ + border-bottom: 2rpx solid #f6f6f6; + } + } +} diff --git a/pages/user/index.vue b/pages/user/index.vue index 748cb1b..88c4320 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -72,10 +72,10 @@ - + {{userInfo.available || 0}} 酒卡积分