修改:运营中心人员入驻 - 支付金额区分为定金和总额,并且定金金额支持选择切换

This commit is contained in:
wuhui_zzw 2024-07-09 16:58:51 +08:00
parent 34978f92c6
commit 5355df0b77
3 changed files with 192 additions and 17 deletions

View File

@ -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',

View File

@ -120,6 +120,22 @@
</block>
<!--选择支付方式-->
<view class="pay-type" v-if="Number(pay_money) > 0 && Number(apply_info_id) <= 0">
<!-- 支付类型 定金 or 全额-->
<view class="pay-money-type">
<view class="left">
<view class="current-pay-info">
<view class="label-text">{{ Number(pay_money) === Number(current_set.total_money) ? '全额' : '定金' }}</view>
<view class="label-price">
<text class="unit">¥</text>{{ pay_money }}
</view>
</view>
<view class="arrears" v-if="Number(pay_money) < Number(current_set.total_money)">
剩余尾款{{ Number(current_set.total_money - pay_money).toFixed(2) }}
</view>
</view>
<view class="change-btn" v-if="Object.values(deposit_list).length > 0" @click="showChangePopup">切换</view>
</view>
<!--支付组件-->
<pay :payType="pay_info.pay_type" @change="changePayType"></pay>
</view>
<!--提交按钮-->
@ -140,9 +156,32 @@
@close="areaPopupChange(false)"
@changeAddress="areaChange"
></areaSelect>
<!-- 授权登录 -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authClose"></authorize>
<!-- 定金选择 -->
<uni-popup ref="paymentListPopup" type="bottom">
<view class="payment-list-content">
<view class="list">
<view class="box">
<view class="left">
<view class="price">¥{{ Number(current_set.total_money).toFixed(2) }}</view>
</view>
<view class="selected-btn" @click="changePayment(-1)">选中</view>
</view>
<view class="box" v-for="(item,index) in deposit_list" :key="index">
<view class="left">
<view class="price">¥{{ Number(item.deposit_price).toFixed(2) }}</view>
<view class="arrears" v-if="Number(item.surplus_price) > 0">
剩余尾款{{ Number(item.surplus_price).toFixed(2) }}
</view>
</view>
<view class="selected-btn" @click="changePayment(index)">选中</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
@ -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();
},
}
}
</script>
@ -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;
}
}
}
</style>

View File

@ -72,10 +72,10 @@
<!-- <text class="num">{{userInfo.total_visit_product || 0}}</text>-->
<!-- <view class="txt">浏览记录</view>-->
<!--</view>-->
<view class="num-item" @click="goMenuPage('/pages/users/online_payment/record/quota?quota_type=2')">
<!--<view class="num-item" @click="goMenuPage('/pages/users/online_payment/record/quota?quota_type=2')">
<text class="num">{{userInfo.vegetable_available || 0}}</text>
<view class="txt">特色菜卡积分</view>
</view>
</view>-->
<view class="num-item" @click="goMenuPage('/pages/users/online_payment/record/quota')">
<text class="num">{{userInfo.available || 0}}</text>
<view class="txt">酒卡积分</view>