添加:提现添加第三方代发功能

This commit is contained in:
wuhui_zzw 2023-10-10 15:53:29 +08:00
parent 6f175a8f45
commit b056601c02
6 changed files with 367 additions and 39 deletions

View File

@ -1,6 +1,7 @@
// var host = 'https://gl.cdwwzc.com/',uniacid = '115';
// var host = 'https://ht.cdwwzc.com/',uniacid = '1';// wx27de59c2d28d5a5f
var host = 'https://jank.cdlfjy.com/',uniacid = '30';
// var host = 'https://jank.cdlfjy.com/',uniacid = '30';
var host = 'https://jank.test.cdlfjy.com/',uniacid = '30';
module.exports = {host, uniacid};
// 获取第三方配置信息 覆盖当前配置信息
let config = wx.getExtConfigSync() || {};

View File

@ -101,7 +101,26 @@ Page({
setAlipay: false,
setinWX: '',
setinAlipay: '',
setinAlipayName: ''
setinAlipayName: '',
// 第三方代发相关信息
staff: {
name: '',
tel: '',
card_type: '1',// 卡类型1=对私2=对公
bank_sub_name: '',// 开户银行支行名称:对公必填
bank_act_name: '',//银行卡持有人姓名
card_num: '',// 银行卡卡号
account_id: '',// 银行卡持有人身份证号码
account_id_start: '',// 证件有效期开始时间,格式YYYYMMDD
mer_type: '3',// 商户类型1=个体户3=个人
},
third_party_show: false,
date_time_show: false,
minDate: new Date(2000, 0, 1).getTime(),
selected_time: 0,
is_show_signing: false,
signing_url: '',
},
/**
@ -755,6 +774,9 @@ Page({
} else if (manual.manual_type == 3) {
title = `${manual.name}-支付宝`;
tips = `通过审核后将由工作人员将打款到您的支付宝!`;
} else if (manual.manual_type == 4) {
title = `${manual.name}-第三方代发`;
tips = `通过审核后将第三方代发到您的银行卡!`;
}
console.log(title);
this.setData({
@ -1070,20 +1092,11 @@ Page({
// let routerPath = "";
let that = this;
switch (manual_type) {
case "bank":
msg = "请先填写银行卡信息";
// routerPath = "/packageA/member/memberBank/memberBank";
break;
case "wechat":
msg = "请先填写微信信息";
// routerPath = "/packageA/member/info/info";
break;
case "alipay":
msg = "请先填写支付宝信息";
// routerPath = "/packageA/member/info/info";
break;
default:
break;
case "bank":msg = "请先填写银行卡信息";break;
case "third_party":msg = "请先完善相关信息";break;
case "wechat":msg = "请先填写微信信息";break;
case "alipay":msg = "请先填写支付宝信息";break;
default:break;
}
// let that = this;
wx.showModal({
@ -1093,6 +1106,8 @@ Page({
if (res.confirm) {
if (manual_type == 'bank') {
that.getBankCard();
}else if (manual_type == 'third_party') {
that.thirdPartyBankCardInfo();
} else if (manual_type == 'wechat') {
// 微信
that.setData({
@ -1510,6 +1525,11 @@ Page({
setAlipay: false
});
},
createCardClose(){
this.setData({
createCardShow: false
});
},
payTypebtn(e) {
let val = e.detail;
this.setData({
@ -1634,4 +1654,175 @@ Page({
// Do something when catch error
}
},
/****** 第三方代发相关操作 ********************/
// 获取第三方银行卡配置信息
thirdPartyBankCardInfo(){
let _this = this;
let defaultStaff = this.data.staff;
app._postNetWork({
url: app.getNetAddresss("plugin.use-staff.api.index.getInfo"),
success: function (response) {
let res = response.data;
_this.setData({
staff: Object.values(res.data).length > 0 ? res.data : defaultStaff,
third_party_show: true,
});
// 处理时间
if(res.data.account_id_start){
let start = res.data.account_id_start;
let year = start.slice(0,4);
let month = parseInt(start.slice(4,6)) - 1;
let day = start.slice(6,8);
_this.setData({
selected_time: new Date(year, month, day).getTime()
});
}
},
fail: function (res) {
console.log(res.msg);
}
});
},
// 关闭第三方配置弹出框
thirdPartyPopupClose(){
this.setData({
third_party_show: false
});
},
// 配置信息改变
thirdPartyConfigChange(e) {
let key = e.currentTarget.dataset.key;
let value = e.detail;
this.setData({
['staff.' + key]: value
});
},
// 显示时间选择器
showDateTime(){
this.setData({
date_time_show: true,
});
},
// 隐藏时间选择器
closeDateTime(){
this.setData({
date_time_show: false,
});
},
// 身份证有效期开始时间改变
datetimePickerChange(e){
let value = e.detail;
this.setData({
selected_time: value,
});
},
// 确认改变时间
confirmChangeDatetime(){
let datetime = this.data.selected_time;
let time = new Date(datetime);
let year = time.getFullYear() + "";
let month = time.getMonth() + 1;
let day = time.getDate();
month = month < 10 ? "0" + month : month;
day = day < 10 ? "0" + day : day;
let date = year + month + day;
this.setData({
['staff.account_id_start']: date,
date_time_show: false,
});
},
// 提交第三方配置信息
thirdPartySubmitEdit(){
let _this = this;
let staff = _this.data.staff;
let tips = '';
// 判断信息是否完善
console.log(staff);
if (app._isTextEmpty(staff.name)) tips = '请输入联系人姓名';
else if (app._isTextEmpty(staff.tel)) tips = '请输入联系人电话';
else if (staff.card_type == 2 && app._isTextEmpty(staff.bank_sub_name)) tips = '请输入开户银行支行名称';
else if (app._isTextEmpty(staff.bank_act_name)) tips = '请输入银行卡持有人姓名';
else if (app._isTextEmpty(staff.card_num)) tips = '请输入银行卡卡号';
else if (app._isTextEmpty(staff.account_id)) tips = '请输入银行卡持有人身份证号码';
else if (app._isTextEmpty(staff.account_id_start)) tips = '请选择银行卡持有人身份证有效期开始时间';
if (!app._isTextEmpty(tips)){
wx.showModal({
showCancel: false,
content: tips,
success() {}
});
return;
}
app._postNetWork({
url: app.getNetAddresss("plugin.use-staff.api.index.applyToJoin"),
data:{
info: staff
},
success: function (response) {
let res = response.data;
if(parseInt(res.result) === 1){
wx.showModal({
showCancel: false,
content: '提交成功,审核开户中...',
success() {
_this.thirdPartyBankCardInfo();
}
});
}
else{
wx.showModal({
showCancel: false,
content: res.msg,
success() {
_this.thirdPartyBankCardInfo();
}
});
}
},
fail: function (res) {
console.log('请求失败:',res.msg);
}
});
},
// 获取签约合同信息
goToSigning(){
let _this = this;
wx.showLoading({
title: "加载中..."
});
app._postNetWork({
url: app.getNetAddresss("plugin.use-staff.api.index.getContractInfo"),
success: function (response) {
let res = response.data;
wx.hideLoading();
if(parseInt(res.result) === 1){
_this.setData({
is_show_signing: true,
signing_url: res.data.sign_url,
});
}
else{
wx.showModal({
showCancel: false,
content: res.msg,
success() {
_this.thirdPartyBankCardInfo();
}
});
}
},
fail: function (res) {
console.log(res.msg);
}
});
},
// 关闭签约弹框
closeSigning(){
console.log("点击关闭");
this.setData({
is_show_signing: false,
});
},
});

View File

@ -9,6 +9,7 @@
"van-radio": "../../../dist/radio/index",
"van-radio-group": "../../../dist/radio-group/index",
"van-icon": "../../../dist/icon/index",
"van-datetime-picker": "../../../dist/datetime-picker/index",
"van-field":"/dist/field/index",
"van-picker":"/dist/picker/index",
"van-sticky":"/dist/sticky/index",

View File

@ -59,7 +59,7 @@
</view>
</view>
<van-sticky offset-top="40" bind:scroll="stickChange">
<view class="elementsin_bottom" wx:if="{{checkList.length > 0}}" catchtap="_getWithdrawType" style="background-color:{{stickStatus?'rgb(250, 138, 77,1)':''}}">
<view class="elementsin_bottom" catchtap="_getWithdrawType" style="background-color:{{stickStatus?'rgb(250, 138, 77,1)':''}}">
<icon class="iconfont {{withTypeTipsIcon}}"></icon>
<view class="elementsin_bottom_text" wx:if="{{pay_type}}">
<view class="elementsin_bottom_text_top">{{ withTypeTipsTitle }}</view>
@ -238,16 +238,16 @@
<view class="txt" wx:if="{{manual.manual_type == 1}}">{{ manual.other_name }}-银行卡</view>
<view class="txt" wx:if="{{manual.manual_type == 2}}">{{ manual.other_name }}-微信</view>
<view class="txt" wx:if="{{manual.manual_type == 3}}">{{ manual.other_name }}-支付宝</view>
<view>
通过审核后将由工作人员打款到您的{{ manual.manual_type == 1 ? "银行卡" : manual.manual_type == 2 ? "微信" : "支付宝" }}
</view>
<view class="userTxt txtTwo">
<view wx:if="{{manual.manual_type == 1 && (manual.member_name && manual.bank_card)}}">
{{ manual.member_name }} {{ manual.bank_card }}
</view>
<view class="modify" wx:if="{{manual.manual_type == 1 && manual.bank_card}}" catchtap="editUser">
修改信息
<view class="txt" wx:if="{{manual.manual_type == 4}}">{{ manual.other_name }}-第三方代发</view>
<view wx:if="{{manual.manual_type != 4}}">通过审核后将由工作人员打款到您的{{ manual.manual_type == 1 ? "银行卡" : manual.manual_type == 2 ? "微信" : "支付宝" }}</view>
<view wx:else>通过审核后将第三方代发到您的银行卡</view>
<view class="userTxt txtTwo" wx:if="{{manual.manual_type == 1}}">
<view wx:if="{{manual.member_name && manual.bank_card}}">{{ manual.member_name }} {{ manual.bank_card }}</view>
<view class="modify" wx:if="{{manual.bank_card}}" catchtap="editUser">修改信息</view>
</view>
<view class="userTxt txtTwo" wx:if="{{manual.manual_type == 4}}">
<view wx:if="{{manual.use_staff_name && manual.use_staff_card_num}}">{{ manual.use_staff_name }} {{ manual.use_staff_card_num }}</view>
<view class="modify" wx:if="{{manual.use_staff_card_num}}" catchtap="thirdPartyBankCardInfo">修改信息</view>
</view>
</view>
<view class="withdrawal_box_list_check">
@ -259,11 +259,11 @@
</view>
</van-popup>
<!-- 银行卡信息 -->
<van-popup show="{{createCardShow}}" position="bottom" custom-style="height: 70%" bind:close="show1CloseBtn">
<van-popup show="{{createCardShow}}" position="bottom" custom-style="height: 70%" bind:close="createCardClose">
<view class="bandBox">
<view class="h2">
填写银行卡
<i class="iconfont icon-close11" catchtap="show1CloseBtn"></i>
<i class="iconfont icon-close11" catchtap="createCardClose"></i>
</view>
<view class="rule">
<view class="ruleLeft">开户行:</view>
@ -605,3 +605,121 @@
</view>
</van-popup>
</view> -->
<!-- 第三方代发信息 -->
<van-popup show="{{third_party_show}}" position="bottom" custom-style="height: 85%" bind:close="thirdPartyPopupClose">
<view class="bandBox">
<view class="h2">
完善信息
<i class="iconfont icon-close11" catchtap="thirdPartyPopupClose"></i>
</view>
<view class="rule">
<view class="ruleLeft">联系人:</view>
<view class="ruleRighe">
<van-field value="{{staff.name}}" required placeholder="请输入联系人姓名" data-key="name" bind:input="thirdPartyConfigChange" />
</view>
</view>
<view class="rule">
<view class="ruleLeft">联系人电话:</view>
<view class="ruleRighe">
<van-field value="{{staff.tel}}" required placeholder="请输入联系人电话" data-key="tel" bind:input="thirdPartyConfigChange" />
</view>
</view>
<view class="rule">
<view class="ruleLeft">银行卡类型:</view>
<view class="ruleRighe">
<van-radio-group value="{{staff.card_type}}" direction="horizontal" data-key="card_type" bind:change="thirdPartyConfigChange">
<view class="ruleRightContent">
<van-radio class="ruleRightContentRadio" name="1">对私</van-radio>
<van-radio class="ruleRightContentRadio" name="2">对公</van-radio>
</view>
</van-radio-group>
</view>
</view>
<view class="rule" wx:if="{{staff.card_type == 2}}">
<view class="ruleLeft">开户银行支行:</view>
<view class="ruleRighe">
<van-field value="{{staff.bank_sub_name}}" required placeholder="请输入开户银行支行名称" data-key="bank_sub_name" bind:input="thirdPartyConfigChange" />
</view>
</view>
<view class="rule">
<view class="ruleLeft">持有人姓名:</view>
<view class="ruleRighe">
<van-field value="{{staff.bank_act_name}}" required placeholder="请输入银行卡持有人姓名" data-key="bank_act_name" bind:input="thirdPartyConfigChange" />
</view>
</view>
<view class="rule">
<view class="ruleLeft">卡号:</view>
<view class="ruleRighe">
<van-field value="{{staff.card_num}}" required placeholder="请输入银行卡卡号" data-key="card_num" bind:input="thirdPartyConfigChange" />
</view>
</view>
<view class="rule">
<view class="ruleLeft">身份证号码:</view>
<view class="ruleRighe">
<van-field value="{{staff.account_id}}" required placeholder="请输入银行卡持有人身份证号码" data-key="account_id" bind:input="thirdPartyConfigChange" />
</view>
</view>
<view class="rule">
<view class="ruleLeft">身份证有效期:</view>
<view class="ruleRighe">
<van-field value="{{staff.account_id_start}}" required readonly placeholder="请选择身份证有效期开始时间" catchtap="showDateTime"/>
</view>
</view>
<view class="rule">
<view class="ruleLeft">商户类型:</view>
<view class="ruleRighe">
<van-radio-group value="{{staff.mer_type}}" required data-key="mer_type" bind:change="thirdPartyConfigChange">
<view class="ruleRightContent">
<van-radio class="ruleRightContentRadio" name="1">个体户</van-radio>
<van-radio class="ruleRightContentRadio" name="3">个人</van-radio>
</view>
</van-radio-group>
</view>
</view>
<!--操作按钮-->
<view wx:if="{{staff.id > 0}}">
<!--入驻状态1=待开户2=开户成功待签约3=开户失败4=签约成功5=签约失败-->
<view wx:if="{{staff.status == 2}}" class="bandSave" catchtap="goToSigning">去签约</view>
<view wx:else class="bandSave" catchtap="thirdPartySubmitEdit">提交修改</view>
</view>
<view wx:else class="bandSave" catchtap="thirdPartySubmitEdit">提交保存</view>
<!--开户状态-->
<view class="status-tips" wx:if="{{staff.status == 1}}">待审核开户中...</view>
<!--<view class="status-tips" wx:if="{{staff.status == 2}}">开户成功待签约</view>-->
<view class="status-tips" wx:if="{{staff.status == 3}}">开户失败,请检查信息是否填写错误</view>
<!--<view class="status-tips" wx:if="{{staff.status == 4}}">签约成功</view>-->
<view class="status-tips" wx:if="{{staff.status == 5}}">签约失败</view>
<!-- 签约页面 -->
<web-view wx:if="{{signing_url}}" src="{{signing_url}}"></web-view>
</view>
</van-popup>
<!-- 时间选择器 年月日 -->
<van-popup show="{{date_time_show}}" position="bottom" custom-style="height: 85%" bind:close="closeDateTime">
<view class="bandBox">
<view class="h2">
身份证有效期开始时间
<i class="iconfont icon-close11" catchtap="closeDateTime"></i>
</view>
<van-datetime-picker
value="{{selected_time}}"
type="date"
title="选择年月日"
bind:input="datetimePickerChange"
min-date="{{minDate}}"
visible-item-count="8"
show-toolbar="{{false}}"
/>
<view class="bandSave" catchtap="confirmChangeDatetime">确认</view>
</view>
</van-popup>

View File

@ -845,3 +845,21 @@
}
/* ------------------ */
.ruleRightContent{
width: calc(100% - (var(--cell-horizontal-padding,16px) * 2));
display: inline-flex!important;
flex-direction: row;
flex-wrap: wrap;
padding: 0 var(--cell-horizontal-padding,16px);
}
.ruleRightContent .ruleRightContentRadio:not(:first-child){
margin-left: var(--cell-horizontal-padding,16px);
}
.status-tips{
width: 100%;
text-align: center;
height: 50rpx;
line-height: 50rpx;
font-size: 28rpx;
color: #eb6f6f;
}

View File

@ -3,7 +3,7 @@
<!-- 今日红包 -->
<view class="view_two_1">
<view class="right_top" catchtap="golingqu" data-tag="old">领取记录</view>
<view class="right_buttom" catchtap="goedu">我的额度</view>
<!-- <view class="right_buttom" catchtap="goedu">我的额度</view> -->
<view class="redName">今日红包</view>
<view class="redMoney" wx:if="{{type_status.value == -3}}">
<view>{{type_status.receive_amounts}}
@ -19,10 +19,10 @@
<text wx:if="{{type_status.value == 3}}">立即领取</text>
</view>
<view class="redList">
<view class="redlis">
<!-- <view class="redlis">
<view>今日红包总额</view>
<view class="redisw">{{link.is_red_packet_all_amount == 1?'****':(amount?amount.amount : 0.00)}}</view>
</view>
</view> -->
<view class="redlis" wx:if="{{redData.is_open_infinite != 1}}">
<view>今日红包总量</view>
<view>{{link.is_red_packet_all_total == 1?'****':(amount?amount.number_sum : 0.00)}}</view>
@ -32,11 +32,11 @@
<view>{{redData.surplus_num}}</view>
</view>
</view>
<view style="text-align: center;margin-top:15rpx;font-size:14px">个人额度</view>
<view class="line">
<!-- <view style="text-align: center;margin-top:15rpx;font-size:14px">个人额度</view> -->
<!-- <view class="line">
<view class="noneLine" style="width:{{bfbMum+'%'}}"></view>
</view>
<view class="lineTxt">
</view> -->
<!-- <view class="lineTxt">
<view>
<view class="text_co">已领取</view>
<view class="text_mun">{{language['money']}}{{receive_log.receive_amount}}</view>
@ -45,7 +45,7 @@
<view class="text_co">剩余</view>
<view class="text_mun">{{language['money']}}{{syMun}}</view>
</view>
</view>
</view> -->
</view>
<view class="other-reward" wx:if="{{bonus.is_show == 1}}">
@ -69,7 +69,7 @@
</view>
<!-- 今日领取记录 -->
<view class="view_two_2">
<!-- <view class="view_two_2">
<view class="getRecord">
<view class="getTitle t_one">今日领取记录</view>
<view class="getTitle t_two">有{{receive_log.receive_num}}人已领取</view>
@ -114,11 +114,10 @@
</view>
</view>
</swiper-item>
<!-- </block> -->
</swiper>
</view>
</view>
</view>
</view> -->
<!-- 活动介绍 -->
<view class="view_two_3">
<view class="introduceBox">