feat(finance): 优化师傅提现规则动态下发展示与免手续费配置
这个提交包含在:
@@ -32,13 +32,13 @@ INSERT INTO `fa_finance_config` (`name`, `group`, `title`, `value`, `remark`, `u
|
||||
('withdraw_require_realname', 'withdraw', '强制实名认证方可提现', '1', '1=必须通过师傅实名认证, 0=不强制(注:微信单笔>=2000元强制要求实名)', UNIX_TIMESTAMP()),
|
||||
('withdraw_min_amount', 'withdraw', '单笔最低提现金额(元)', '10.00', '微信新版商家转账要求扣除手续费后实际到账净额不低于0.10元', UNIX_TIMESTAMP()),
|
||||
('withdraw_max_amount', 'withdraw', '单笔最高提现金额(元)', '200.00', '须与微信商户后台商家转账单笔限额一致(微信官方硬上限20000元)', UNIX_TIMESTAMP()),
|
||||
('withdraw_daily_amount', 'withdraw', '单人单日累计提现上限(元)', '2000.00', '0表示不限;须不超过微信商户单用户日收款限额', UNIX_TIMESTAMP()),
|
||||
('withdraw_daily_amount', 'withdraw', '单人单日累计提现上限(元)', '200.00', '0表示不限;须不超过微信商户单用户日收款限额', UNIX_TIMESTAMP()),
|
||||
('withdraw_daily_count', 'withdraw', '单人单日最多提现次数', '3', '0表示不限制每日提现申请笔数', UNIX_TIMESTAMP()),
|
||||
('withdraw_allow_weekdays', 'withdraw', '允许提现周期(星期)', '1,2,3,4,5,6,7', '1~7代表周一至周日,逗号分隔', UNIX_TIMESTAMP()),
|
||||
('withdraw_time_start', 'withdraw', '每日允许提现开始时间', '00:00', '格式 HH:mm', UNIX_TIMESTAMP()),
|
||||
('withdraw_time_end', 'withdraw', '每日允许提现结束时间', '23:59', '格式 HH:mm', UNIX_TIMESTAMP()),
|
||||
('withdraw_fee_mode', 'withdraw', '提现手续费计收方式', 'percent', 'percent=按比例收取, fixed=按笔固定收取, free=免收手续费', UNIX_TIMESTAMP()),
|
||||
('withdraw_fee_rate', 'withdraw', '提现通道手续费率(%)', '0.60', 'percent模式下按提现申请金额计算的百分比费率', UNIX_TIMESTAMP()),
|
||||
('withdraw_fee_mode', 'withdraw', '提现手续费计收方式', 'free', 'percent=按比例收取, fixed=按笔固定收取, free=免收手续费', UNIX_TIMESTAMP()),
|
||||
('withdraw_fee_rate', 'withdraw', '提现通道手续费率(%)', '0.00', 'percent模式下按提现申请金额计算的百分比费率', UNIX_TIMESTAMP()),
|
||||
('withdraw_fee_fixed', 'withdraw', '提现单笔固定手续费(元)', '0.00', 'fixed模式下每笔提现固定扣除的手续费', UNIX_TIMESTAMP()),
|
||||
('withdraw_fee_min', 'withdraw', '单笔最低保底手续费(元)', '0.00', 'percent模式下单笔手续费下限,0表示不保底', UNIX_TIMESTAMP()),
|
||||
('withdraw_fee_max', 'withdraw', '单笔最高封顶手续费(元)', '0.00', 'percent模式下单笔手续费上限,0表示不封顶', UNIX_TIMESTAMP()),
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
-- 提现手续费默认调整为免手续费,并将单人单日提现上限同步为当前商户平台最低版额度 ¥200.00
|
||||
-- (均支持后续在后台「财务配置 -> 师傅提现规则」随时灵活调整)
|
||||
SET NAMES utf8mb4;
|
||||
|
||||
UPDATE `fa_finance_config`
|
||||
SET `value` = 'free', `updatetime` = UNIX_TIMESTAMP()
|
||||
WHERE `name` = 'withdraw_fee_mode';
|
||||
|
||||
UPDATE `fa_finance_config`
|
||||
SET `value` = '200.00', `updatetime` = UNIX_TIMESTAMP()
|
||||
WHERE `name` = 'withdraw_daily_amount';
|
||||
@@ -523,8 +523,8 @@
|
||||
<div class="fc-card-box">
|
||||
<div class="fc-card-box-header">
|
||||
<h3 class="fc-card-box-title">
|
||||
<i class="fa fa-percent text-info"></i> 提现通道手续费
|
||||
<small>通常按 0.60% 抵扣微信官方商户号资金出款成本</small>
|
||||
<i class="fa fa-percent text-info"></i> 提现手续费设置
|
||||
<small>支持在后台随时灵活切换免手续费、按比例或按笔固定计收(微信官方商家转账本身不收转账手续费)</small>
|
||||
</h3>
|
||||
</div>
|
||||
<div class="fc-card-box-body">
|
||||
@@ -532,9 +532,9 @@
|
||||
<label class="control-label col-xs-12 col-sm-2">手续费方式:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<select id="c-wd-fee-mode" class="form-control js-wd-fee-mode js-wd-fee-field" name="row[withdraw_fee_mode]">
|
||||
<option value="percent" {if $cfg.withdraw_fee_mode == 'percent'}selected{/if}>按比例收取 (%) - 推荐</option>
|
||||
<option value="free" {if $cfg.withdraw_fee_mode == 'free'}selected{/if}>免手续费(推荐:平台全额承担)</option>
|
||||
<option value="percent" {if $cfg.withdraw_fee_mode == 'percent'}selected{/if}>按比例收取 (%)</option>
|
||||
<option value="fixed" {if $cfg.withdraw_fee_mode == 'fixed'}selected{/if}>每笔固定金额 (元/笔)</option>
|
||||
<option value="free" {if $cfg.withdraw_fee_mode == 'free'}selected{/if}>免手续费(平台替师傅全额承担)</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -556,7 +556,7 @@
|
||||
<input id="c-wd-fee-max" type="number" step="0.01" min="0" class="form-control js-wd-fee-field" name="row[withdraw_fee_max]" value="{$cfg.withdraw_fee_max|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
<span class="fc-field-note">推荐费率 0.60%,最少与最多填 0 表示不设保底和封顶</span>
|
||||
<span class="fc-field-note">最少与最多填 0 表示不设保底和封顶</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1535,6 +1535,10 @@ class Master extends MasterBase
|
||||
'updatetime' => $now,
|
||||
]);
|
||||
|
||||
$feeNote = $fee > 0
|
||||
? '手续费 ¥' . number_format($fee, 2, '.', '')
|
||||
: '免手续费';
|
||||
|
||||
Db::name('wallet_log')->insert([
|
||||
'user_type' => 'master',
|
||||
'user_id' => (int)$lockedMaster['id'],
|
||||
@@ -1542,7 +1546,7 @@ class Master extends MasterBase
|
||||
'amount' => -$amount,
|
||||
'balance' => $newMoney,
|
||||
'order_id' => 0,
|
||||
'remark' => '提现申请(手续费 ¥' . number_format($fee, 2, '.', '') . ',预计到账 ¥' . number_format($arrive, 2, '.', '') . ')',
|
||||
'remark' => '提现申请(' . $feeNote . ',预计到账 ¥' . number_format($arrive, 2, '.', '') . ')',
|
||||
'createtime' => $now,
|
||||
]);
|
||||
Db::commit();
|
||||
|
||||
@@ -47,13 +47,13 @@ class FinanceConfigService
|
||||
'withdraw_require_realname' => '1',
|
||||
'withdraw_min_amount' => '10.00',
|
||||
'withdraw_max_amount' => '200.00',
|
||||
'withdraw_daily_amount' => '2000.00',
|
||||
'withdraw_daily_amount' => '200.00',
|
||||
'withdraw_daily_count' => '3',
|
||||
'withdraw_allow_weekdays' => '1,2,3,4,5,6,7',
|
||||
'withdraw_time_start' => '00:00',
|
||||
'withdraw_time_end' => '23:59',
|
||||
'withdraw_fee_mode' => 'percent',
|
||||
'withdraw_fee_rate' => '0.60',
|
||||
'withdraw_fee_mode' => 'free',
|
||||
'withdraw_fee_rate' => '0.00',
|
||||
'withdraw_fee_fixed' => '0.00',
|
||||
'withdraw_fee_min' => '0.00',
|
||||
'withdraw_fee_max' => '0.00',
|
||||
@@ -323,11 +323,11 @@ class FinanceConfigService
|
||||
: -1;
|
||||
|
||||
if ($cfg['fee_mode'] === 'free' || ($cfg['fee_mode'] === 'percent' && $cfg['fee_rate'] <= 0) || ($cfg['fee_mode'] === 'fixed' && $cfg['fee_fixed'] <= 0)) {
|
||||
$feeText = '免通道手续费';
|
||||
$feeText = '免提现手续费';
|
||||
} elseif ($cfg['fee_mode'] === 'fixed') {
|
||||
$feeText = '手续费 ¥' . number_format($cfg['fee_fixed'], 2, '.', '') . '/笔';
|
||||
} else {
|
||||
$feeText = '通道费率 ' . rtrim(rtrim(number_format($cfg['fee_rate'], 2, '.', ''), '0'), '.') . '%';
|
||||
$feeText = '手续费率 ' . rtrim(rtrim(number_format($cfg['fee_rate'], 2, '.', ''), '0'), '.') . '%';
|
||||
if ($cfg['fee_min'] > 0 || $cfg['fee_max'] > 0) {
|
||||
$parts = [];
|
||||
if ($cfg['fee_min'] > 0) {
|
||||
@@ -342,7 +342,88 @@ class FinanceConfigService
|
||||
|
||||
$minTxt = rtrim(rtrim(number_format($cfg['min_amount'], 2, '.', ''), '0'), '.');
|
||||
$maxTxt = rtrim(rtrim(number_format($cfg['max_amount'], 2, '.', ''), '0'), '.');
|
||||
$ruleTip = "完工核销后工费即刻入账;单笔 ¥{$minTxt}~¥{$maxTxt} 可提现,{$feeText}。";
|
||||
$minFmt = number_format($cfg['min_amount'], 2, '.', '');
|
||||
$maxFmt = number_format($cfg['max_amount'], 2, '.', '');
|
||||
|
||||
if ($cfg['daily_amount'] > 0) {
|
||||
$dailyAmtTxt = rtrim(rtrim(number_format($cfg['daily_amount'], 2, '.', ''), '0'), '.');
|
||||
$remainAmtTxt = rtrim(rtrim(number_format(max(0.00, (float)$remainDailyAmount), 2, '.', ''), '0'), '.');
|
||||
$remainAmtFmt = number_format(max(0.00, (float)$remainDailyAmount), 2, '.', '');
|
||||
$amountRuleText = "单笔 ¥{$minFmt} ~ ¥{$maxFmt},每日累计上限 ¥{$dailyAmtTxt}(今日剩余 ¥{$remainAmtFmt})";
|
||||
$dailyLimitSub = "日限 ¥{$dailyAmtTxt} · 剩 ¥{$remainAmtTxt}";
|
||||
} else {
|
||||
$amountRuleText = "单笔 ¥{$minFmt} ~ ¥{$maxFmt},每日不限累计额度";
|
||||
$dailyLimitSub = '单日不限累计额度';
|
||||
}
|
||||
|
||||
if ($cfg['daily_count'] > 0) {
|
||||
$dailyCountText = "每日最多 {$cfg['daily_count']} 次(今日剩余 {$remainDailyCount} 次)";
|
||||
$dailyCountMain = "每日最多 {$cfg['daily_count']} 次";
|
||||
$dailyCountSub = "今日剩余 {$remainDailyCount} 次";
|
||||
} else {
|
||||
$dailyCountText = '每日不限提现次数';
|
||||
$dailyCountMain = '每日不限次数';
|
||||
$dailyCountSub = '不限申请笔数';
|
||||
}
|
||||
|
||||
$weekdayLabel = self::formatAllowWeekdaysLabel($cfg['allow_weekdays']);
|
||||
$openTimeText = $weekdayLabel . ' ' . $cfg['time_start'] . ' - ' . $cfg['time_end'];
|
||||
|
||||
$arrivalParts = [];
|
||||
if (in_array('wechat', $cfg['channels'], true)) {
|
||||
if ($cfg['transfer_mode'] === 'wx_mch_transfer') {
|
||||
if ($cfg['audit_mode'] === 'auto_small' && $cfg['auto_max_amount'] > 0) {
|
||||
$autoMaxTxt = rtrim(rtrim(number_format($cfg['auto_max_amount'], 2, '.', ''), '0'), '.');
|
||||
$arrivalParts[] = "微信零钱:单笔 ≤ ¥{$autoMaxTxt} 免审自动发起转账,24小时内确认收款实时到账;超出额度经财务审核通过后,确认收款实时到账";
|
||||
} else {
|
||||
$arrivalParts[] = '微信零钱:财务审核通过后发起转账,24小时内在页面确认收款实时到账';
|
||||
}
|
||||
} else {
|
||||
$arrivalParts[] = '微信零钱:财务审核并人工打款后到账';
|
||||
}
|
||||
}
|
||||
if (in_array('bank', $cfg['channels'], true)) {
|
||||
$arrivalParts[] = '银行储蓄卡:财务审核并打款至收款银行卡后到账';
|
||||
}
|
||||
$arrivalTimeText = implode(';', $arrivalParts);
|
||||
|
||||
if (in_array('wechat', $cfg['channels'], true) && $cfg['transfer_mode'] === 'wx_mch_transfer') {
|
||||
if ($cfg['audit_mode'] === 'auto_small' && $cfg['auto_max_amount'] > 0) {
|
||||
$autoMaxTxt = rtrim(rtrim(number_format($cfg['auto_max_amount'], 2, '.', ''), '0'), '.');
|
||||
$arrivalMain = '确认收款实时到账';
|
||||
$arrivalSub = "≤¥{$autoMaxTxt}免审 · 24h内确认";
|
||||
} else {
|
||||
$arrivalMain = '审核后实时到账';
|
||||
$arrivalSub = '转账后24h内确认收款';
|
||||
}
|
||||
} else {
|
||||
$arrivalMain = '财务审核打款';
|
||||
$arrivalSub = in_array('bank', $cfg['channels'], true) ? '审核后打款至银行卡' : '审核后人工打款到账';
|
||||
}
|
||||
|
||||
$realnameText = $cfg['require_realname']
|
||||
? '需完成师傅实名认证审核通过后方可发起提现'
|
||||
: ($cfg['max_amount'] >= self::WX_TRANSFER_REALNAME_THRESHOLD
|
||||
? '单笔满 ¥2,000.00 需完成实名认证'
|
||||
: '大额提现按微信规范校验实名');
|
||||
|
||||
$ruleGrid = [
|
||||
['key' => 'amount', 'label' => '可提现额度', 'value' => "¥{$minTxt} ~ ¥{$maxTxt}", 'sub' => $dailyLimitSub],
|
||||
['key' => 'count', 'label' => '每日提现次数', 'value' => $dailyCountMain, 'sub' => $dailyCountSub],
|
||||
['key' => 'time', 'label' => '提现时间', 'value' => "{$cfg['time_start']} - {$cfg['time_end']}", 'sub' => $weekdayLabel . '开放申请'],
|
||||
['key' => 'arrival', 'label' => '到账时间', 'value' => $arrivalMain, 'sub' => $arrivalSub],
|
||||
];
|
||||
|
||||
$rules = [
|
||||
['key' => 'amount', 'label' => '可提现额度', 'value' => $amountRuleText],
|
||||
['key' => 'count', 'label' => '每日提现次数', 'value' => $dailyCountText],
|
||||
['key' => 'time', 'label' => '提现时间', 'value' => $openTimeText],
|
||||
['key' => 'arrival', 'label' => '到账时间', 'value' => $arrivalTimeText],
|
||||
['key' => 'fee', 'label' => '手续费说明', 'value' => $feeText],
|
||||
['key' => 'auth', 'label' => '认证要求', 'value' => $realnameText],
|
||||
];
|
||||
|
||||
$ruleTip = "单笔 ¥{$minTxt}~¥{$maxTxt} 可提现,{$dailyCountText},{$openTimeText} 开放,{$feeText}。";
|
||||
if (!$cfg['enabled']) {
|
||||
$ruleTip = $cfg['close_tip'];
|
||||
}
|
||||
@@ -377,10 +458,43 @@ class FinanceConfigService
|
||||
'audit_mode' => $cfg['audit_mode'],
|
||||
'auto_max_amount' => $cfg['auto_max_amount'],
|
||||
'arrival_desc' => $arrivalDesc,
|
||||
'amount_rule_text' => $amountRuleText,
|
||||
'daily_count_text' => $dailyCountText,
|
||||
'open_time_text' => $openTimeText,
|
||||
'arrival_time_text' => $arrivalTimeText,
|
||||
'realname_text' => $realnameText,
|
||||
'rule_grid' => $ruleGrid,
|
||||
'rules' => $rules,
|
||||
'rule_tip' => $ruleTip,
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 将允许提现星期数组格式化为可读中文周期
|
||||
*/
|
||||
protected static function formatAllowWeekdaysLabel(array $weekdays): string
|
||||
{
|
||||
$days = array_values(array_unique(array_map('intval', $weekdays)));
|
||||
sort($days);
|
||||
if ($days === [1, 2, 3, 4, 5, 6, 7]) {
|
||||
return '每日';
|
||||
}
|
||||
if ($days === [1, 2, 3, 4, 5]) {
|
||||
return '周一至周五';
|
||||
}
|
||||
if ($days === [6, 7]) {
|
||||
return '周六、周日';
|
||||
}
|
||||
$dayNames = [1 => '周一', 2 => '周二', 3 => '周三', 4 => '周四', 5 => '周五', 6 => '周六', 7 => '周日'];
|
||||
$labels = [];
|
||||
foreach ($days as $d) {
|
||||
if (isset($dayNames[$d])) {
|
||||
$labels[] = $dayNames[$d];
|
||||
}
|
||||
}
|
||||
return !empty($labels) ? implode('、', $labels) : '每日';
|
||||
}
|
||||
|
||||
/**
|
||||
* 校验师傅发起的提现请求(全量业务规则 + 微信小程序商家转账硬规范)
|
||||
*
|
||||
|
||||
@@ -26,16 +26,14 @@
|
||||
<view class="action-block">
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<button
|
||||
class="btn-wx-primary clickable-hover"
|
||||
class="btn-phone-primary clickable-hover"
|
||||
:class="{ disabled: loading, 'btn-shake': needShake }"
|
||||
:open-type="agreePolicy ? 'getPhoneNumber' : ''"
|
||||
@getphonenumber="onGetPhoneNumber"
|
||||
@tap="handleTapButton"
|
||||
>
|
||||
<view class="wx-icon-wrap">
|
||||
<image class="wx-svg-icon" src="/static/icons/wechat.svg" mode="aspectFit" />
|
||||
</view>
|
||||
<text class="btn-text">{{ loading ? '安全授权中...' : '微信手机号一键登录' }}</text>
|
||||
<image class="phone-svg-icon" src="/static/icons/login-phone-white.svg" mode="aspectFit" />
|
||||
<text class="btn-text">{{ loading ? '安全登录中...' : '手机号快捷登录' }}</text>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
|
||||
@@ -286,12 +284,12 @@
|
||||
return '隐私保护指引尚未生效,请稍后重试或联系客服';
|
||||
}
|
||||
if (msg.includes('no permission') || msg.includes('unauthorized')) {
|
||||
return '当前暂不支持微信手机号快捷登录,请联系客服';
|
||||
return '当前暂不支持手机号快捷登录,请联系客服';
|
||||
}
|
||||
if (msg.includes('quota') || msg.includes('limit')) {
|
||||
return '手机号验证次数已达上限,请稍后再试';
|
||||
}
|
||||
return '获取微信手机号失败,请重试';
|
||||
return '获取手机号失败,请重试';
|
||||
}
|
||||
|
||||
function formatLoginError(err, fallback) {
|
||||
@@ -546,7 +544,7 @@
|
||||
}, 500);
|
||||
} catch (err) {
|
||||
loading.value = false;
|
||||
toast(formatLoginError(err, '微信手机号登录失败,请重试'));
|
||||
toast(formatLoginError(err, '手机号登录失败,请重试'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -759,30 +757,25 @@
|
||||
}
|
||||
.btn-account-primary::after { border: none; }
|
||||
.btn-account-primary.disabled { opacity: 0.65; }
|
||||
.btn-wx-primary {
|
||||
.btn-phone-primary {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
border-radius: 50rpx;
|
||||
background: linear-gradient(135deg, #07C160 0%, #05A351 100%);
|
||||
box-shadow: 0 12rpx 28rpx rgba(7, 193, 96, 0.28);
|
||||
background: linear-gradient(135deg, #FFA93F 0%, #F0710D 100%);
|
||||
box-shadow: 0 12rpx 28rpx rgba(240, 113, 13, 0.28);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
}
|
||||
.btn-wx-primary::after { border: none; }
|
||||
.btn-wx-primary.disabled { opacity: 0.65; }
|
||||
.wx-icon-wrap {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
border-radius: 50%;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 18rpx;
|
||||
.btn-phone-primary::after { border: none; }
|
||||
.btn-phone-primary.disabled { opacity: 0.65; }
|
||||
.phone-svg-icon {
|
||||
width: 38rpx;
|
||||
height: 38rpx;
|
||||
margin-right: 14rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.wx-svg-icon { width: 34rpx; height: 34rpx; }
|
||||
.btn-text {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
|
||||
@@ -68,10 +68,39 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 结算规则提示(完全由后台配置中心动态下发) -->
|
||||
<view class="tips-bar" v-if="ruleTipText">
|
||||
<image class="tips-ico" src="/static/icons/info-orange.svg" mode="aspectFit" />
|
||||
<text class="tips-txt">{{ ruleTipText }}</text>
|
||||
<!-- 提现规则紧凑宫格卡片(完全由后台配置中心动态下发) -->
|
||||
<view class="rule-card" v-if="withdrawCfg">
|
||||
<view class="rule-card-head">
|
||||
<view class="rule-head-left">
|
||||
<image class="rule-head-ico" src="/static/icons/withdraw-rule.svg" mode="aspectFit" />
|
||||
<text class="rule-head-title">提现规则</text>
|
||||
</view>
|
||||
<view class="rule-head-right">
|
||||
<text class="rule-status-pill" :class="{ paused: !withdrawEnabled }">
|
||||
{{ withdrawEnabled ? '正常开放' : '暂停提现' }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="rule-pause-bar" v-if="!withdrawEnabled && withdrawCloseTip">
|
||||
<text class="rule-pause-txt">{{ withdrawCloseTip }}</text>
|
||||
</view>
|
||||
|
||||
<view class="rule-grid" v-if="ruleGridItems.length > 0">
|
||||
<view class="rule-tile" v-for="item in ruleGridItems" :key="item.key">
|
||||
<text class="tile-lab">{{ item.label }}</text>
|
||||
<text class="tile-val">{{ item.value }}</text>
|
||||
<text class="tile-sub" v-if="item.sub">{{ item.sub }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="rule-footer-bar" v-if="ruleFooterSummary" @tap="showRuleDetailDrawer = true">
|
||||
<text class="rule-footer-txt">{{ ruleFooterSummary }}</text>
|
||||
<view class="rule-more-btn">
|
||||
<text class="rule-more-txt">细则</text>
|
||||
<image class="rule-more-ico" src="/static/icons/arrow-right-orange.svg" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 收支账单与提现明细 -->
|
||||
@@ -247,11 +276,18 @@
|
||||
<text class="meta-item">单笔 ¥{{ formatMoney(minWithdraw) }} - ¥{{ formatMoney(singleLimit) }}{{ hasDailyAmountLimit ? ` · 今日剩余额度 ¥${formatMoney(todayRemain)}` : '' }}{{ hasDailyCountLimit ? ` · 剩余 ${remainDailyCount} 次` : '' }}</text>
|
||||
<text class="meta-item warn" v-if="withdrawErrorHint">{{ withdrawErrorHint }}</text>
|
||||
<text class="meta-item estimate" v-else-if="parsedWithdraw >= minWithdraw">
|
||||
{{ Number(withdrawFee) > 0 ? `通道手续费 ¥${withdrawFee} · ` : '免收手续费 · ' }}预计到账 ¥{{ withdrawArrive }}
|
||||
{{ Number(withdrawFee) > 0 ? `提现手续费 ¥${withdrawFee} · ` : '免提现手续费 · ' }}预计到账 ¥{{ withdrawArrive }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="drawer-rule-box" v-if="withdrawCfg && drawerWithdrawRules.length > 0">
|
||||
<view class="drawer-rule-item" v-for="item in drawerWithdrawRules" :key="item.key">
|
||||
<text class="drawer-rule-tag">{{ item.label }}</text>
|
||||
<text class="drawer-rule-desc">{{ item.value }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view
|
||||
class="drawer-submit clickable-hover"
|
||||
:class="{ disabled: !canSubmitWithdraw }"
|
||||
@@ -319,6 +355,27 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 提现完整规则详情半屏抽屉 -->
|
||||
<view class="drawer-mask" v-if="showRuleDetailDrawer" @tap="showRuleDetailDrawer = false">
|
||||
<view class="drawer-panel rule-detail-panel" @tap.stop>
|
||||
<view class="drawer-head">
|
||||
<text class="drawer-title">提现规则说明</text>
|
||||
<view class="drawer-close" @tap="showRuleDetailDrawer = false">
|
||||
<image class="close-ico" src="/static/icons/close.svg" mode="aspectFit" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="rule-detail-list">
|
||||
<view class="rule-detail-item" v-for="item in displayWithdrawRules" :key="item.key">
|
||||
<text class="rd-lab">{{ item.label }}</text>
|
||||
<text class="rd-val">{{ item.value }}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="drawer-submit clickable-hover" @tap="showRuleDetailDrawer = false">我知道了</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 账单流水详情半屏抽屉 -->
|
||||
<view class="drawer-mask" v-if="activeLog" @tap="activeLog = null">
|
||||
<view class="drawer-panel" @tap.stop>
|
||||
@@ -386,6 +443,7 @@
|
||||
const filterType = ref('all');
|
||||
|
||||
const showWithdrawDrawer = ref(false);
|
||||
const showRuleDetailDrawer = ref(false);
|
||||
const withdrawAmount = ref('');
|
||||
const selectedChannel = ref('wechat');
|
||||
const bankAccount = ref('');
|
||||
@@ -416,6 +474,95 @@
|
||||
const arrivalDescText = computed(() => withdrawCfg.value?.arrival_desc || '微信零钱(确认收款即到账)');
|
||||
const ruleTipText = computed(() => withdrawCfg.value?.rule_tip || '');
|
||||
|
||||
function fmtTrimMoney(v) {
|
||||
const n = Number(v || 0);
|
||||
if (!Number.isFinite(n)) return '0';
|
||||
return n.toFixed(2).replace(/\.?0+$/, '');
|
||||
}
|
||||
|
||||
function formatWeekdaysLabel(days) {
|
||||
const arr = Array.isArray(days) ? [...new Set(days.map(Number).filter(n => n >= 1 && n <= 7))].sort((a, b) => a - b) : [];
|
||||
const joined = arr.join(',');
|
||||
if (!joined || joined === '1,2,3,4,5,6,7') return '每日';
|
||||
if (joined === '1,2,3,4,5') return '周一至周五';
|
||||
if (joined === '6,7') return '周六、周日';
|
||||
const map = { 1: '周一', 2: '周二', 3: '周三', 4: '周四', 5: '周五', 6: '周六', 7: '周日' };
|
||||
return arr.map(d => map[d]).filter(Boolean).join('、') || '每日';
|
||||
}
|
||||
|
||||
const ruleGridItems = computed(() => {
|
||||
const cfg = withdrawCfg.value;
|
||||
if (!cfg) return [];
|
||||
if (Array.isArray(cfg.rule_grid) && cfg.rule_grid.length > 0) {
|
||||
return cfg.rule_grid;
|
||||
}
|
||||
const weekdayLabel = formatWeekdaysLabel(cfg.allow_weekdays);
|
||||
const dailyLimitSub = hasDailyAmountLimit.value
|
||||
? `日限 ¥${fmtTrimMoney(cfg.daily_amount)} · 剩 ¥${fmtTrimMoney(todayRemain.value)}`
|
||||
: '单日不限累计额度';
|
||||
const countMain = hasDailyCountLimit.value ? `每日最多 ${Number(cfg.daily_count)} 次` : '每日不限次数';
|
||||
const countSub = hasDailyCountLimit.value ? `今日剩余 ${remainDailyCount.value} 次` : '不限申请笔数';
|
||||
const arrivalMain = cfg.transfer_mode === 'wx_mch_transfer'
|
||||
? (cfg.audit_mode === 'auto_small' && Number(cfg.auto_max_amount) > 0 ? '确认收款实时到账' : '审核后实时到账')
|
||||
: '财务审核打款';
|
||||
const arrivalSub = cfg.transfer_mode === 'wx_mch_transfer'
|
||||
? (cfg.audit_mode === 'auto_small' && Number(cfg.auto_max_amount) > 0
|
||||
? `≤¥${fmtTrimMoney(cfg.auto_max_amount)}免审 · 24h内确认`
|
||||
: '转账后24h内确认收款')
|
||||
: '财务打款至收款账户';
|
||||
return [
|
||||
{ key: 'amount', label: '可提现额度', value: `¥${fmtTrimMoney(minWithdraw.value)} ~ ¥${fmtTrimMoney(singleLimit.value)}`, sub: dailyLimitSub },
|
||||
{ key: 'count', label: '每日提现次数', value: countMain, sub: countSub },
|
||||
{ key: 'time', label: '提现时间', value: `${cfg.time_start || '00:00'} - ${cfg.time_end || '23:59'}`, sub: `${weekdayLabel}开放申请` },
|
||||
{ key: 'arrival', label: '到账时间', value: arrivalMain, sub: arrivalSub }
|
||||
];
|
||||
});
|
||||
|
||||
const ruleFooterSummary = computed(() => {
|
||||
const cfg = withdrawCfg.value;
|
||||
if (!cfg) return '';
|
||||
const parts = [];
|
||||
if (cfg.fee_text) parts.push(cfg.fee_text);
|
||||
if (cfg.require_realname) {
|
||||
parts.push('需完成实名认证');
|
||||
} else if (cfg.realname_text) {
|
||||
parts.push(cfg.realname_text);
|
||||
}
|
||||
return parts.join(' · ');
|
||||
});
|
||||
|
||||
const displayWithdrawRules = computed(() => {
|
||||
const cfg = withdrawCfg.value;
|
||||
if (!cfg) return [];
|
||||
if (Array.isArray(cfg.rules) && cfg.rules.length > 0) {
|
||||
return cfg.rules;
|
||||
}
|
||||
const list = [];
|
||||
if (cfg.amount_rule_text) {
|
||||
list.push({ key: 'amount', label: '可提现额度', value: cfg.amount_rule_text });
|
||||
}
|
||||
if (cfg.daily_count_text) {
|
||||
list.push({ key: 'count', label: '每日提现次数', value: cfg.daily_count_text });
|
||||
}
|
||||
if (cfg.open_time_text) {
|
||||
list.push({ key: 'time', label: '提现时间', value: cfg.open_time_text });
|
||||
}
|
||||
if (cfg.arrival_time_text || cfg.arrival_desc) {
|
||||
list.push({ key: 'arrival', label: '到账时间', value: cfg.arrival_time_text || cfg.arrival_desc });
|
||||
}
|
||||
if (cfg.fee_text) {
|
||||
list.push({ key: 'fee', label: '手续费说明', value: cfg.fee_text });
|
||||
}
|
||||
if (cfg.realname_text) {
|
||||
list.push({ key: 'auth', label: '认证要求', value: cfg.realname_text });
|
||||
}
|
||||
return list;
|
||||
});
|
||||
|
||||
const drawerWithdrawRules = computed(() => {
|
||||
return displayWithdrawRules.value.filter(item => ['count', 'time', 'arrival', 'fee'].includes(item.key));
|
||||
});
|
||||
|
||||
const minWithdraw = computed(() => Number(withdrawCfg.value?.min_amount ?? withdrawLimits.value.min_amount ?? 0.1));
|
||||
const singleLimit = computed(() => Number(withdrawCfg.value?.max_amount ?? withdrawLimits.value.single_limit ?? 200));
|
||||
const hasDailyAmountLimit = computed(() => Number(withdrawCfg.value?.daily_amount ?? withdrawLimits.value.daily_user_limit ?? 0) > 0);
|
||||
@@ -839,26 +986,157 @@
|
||||
opacity: 0.55;
|
||||
}
|
||||
|
||||
/* 规则提示条 */
|
||||
.tips-bar {
|
||||
/* 提现规则紧凑宫格卡片 */
|
||||
.rule-card {
|
||||
margin: 20rpx $yjyf-space-md 0;
|
||||
padding: 18rpx 22rpx;
|
||||
background: $yjyf-primary-bg;
|
||||
border-radius: $yjyf-radius-sm;
|
||||
padding: 22rpx $yjyf-space-md;
|
||||
background: $yjyf-bg-card;
|
||||
border-radius: $yjyf-radius-md;
|
||||
box-shadow: $yjyf-shadow-card;
|
||||
}
|
||||
.rule-card-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
.rule-head-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10rpx;
|
||||
}
|
||||
.rule-head-ico {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.rule-head-title {
|
||||
font-size: $yjyf-font-body;
|
||||
font-weight: 700;
|
||||
color: $yjyf-text-main;
|
||||
}
|
||||
.rule-head-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.tips-ico {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
margin-right: 12rpx;
|
||||
.rule-status-pill {
|
||||
height: 38rpx;
|
||||
padding: 0 14rpx;
|
||||
border-radius: $yjyf-radius-pill;
|
||||
background: rgba($yjyf-success, 0.12);
|
||||
color: $yjyf-success;
|
||||
font-size: $yjyf-font-micro;
|
||||
font-weight: 600;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
.rule-status-pill.paused {
|
||||
background: rgba($yjyf-danger, 0.1);
|
||||
color: $yjyf-danger;
|
||||
}
|
||||
.rule-pause-bar {
|
||||
margin-bottom: 16rpx;
|
||||
padding: 14rpx 18rpx;
|
||||
border-radius: $yjyf-radius-sm;
|
||||
background: rgba($yjyf-danger, 0.08);
|
||||
}
|
||||
.rule-pause-txt {
|
||||
font-size: $yjyf-font-sub;
|
||||
color: $yjyf-danger;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.rule-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 14rpx;
|
||||
}
|
||||
.rule-tile {
|
||||
padding: 18rpx 20rpx;
|
||||
border-radius: $yjyf-radius-sm;
|
||||
background: $yjyf-bg-page;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
}
|
||||
.tile-lab {
|
||||
font-size: $yjyf-font-micro;
|
||||
color: $yjyf-text-secondary;
|
||||
line-height: 1.3;
|
||||
}
|
||||
.tile-val {
|
||||
margin-top: 8rpx;
|
||||
font-size: $yjyf-font-body;
|
||||
font-weight: 700;
|
||||
color: $yjyf-text-main;
|
||||
line-height: 1.3;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.tile-sub {
|
||||
margin-top: 6rpx;
|
||||
font-size: $yjyf-font-micro;
|
||||
color: $yjyf-text-regular;
|
||||
line-height: 1.35;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.rule-footer-bar {
|
||||
margin-top: 16rpx;
|
||||
padding: 14rpx 18rpx;
|
||||
border-radius: $yjyf-radius-sm;
|
||||
background: $yjyf-primary-bg;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16rpx;
|
||||
}
|
||||
.rule-footer-txt {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: $yjyf-font-micro;
|
||||
color: $yjyf-text-regular;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.rule-more-btn {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4rpx;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.tips-txt {
|
||||
flex: 1;
|
||||
.rule-more-txt {
|
||||
font-size: $yjyf-font-micro;
|
||||
font-weight: 600;
|
||||
color: $yjyf-primary;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.rule-more-ico {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
}
|
||||
.rule-detail-panel {
|
||||
max-height: 82vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.rule-detail-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16rpx;
|
||||
}
|
||||
.rule-detail-item {
|
||||
padding: 18rpx 22rpx;
|
||||
border-radius: $yjyf-radius-sm;
|
||||
background: $yjyf-bg-page;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6rpx;
|
||||
}
|
||||
.rd-lab {
|
||||
font-size: $yjyf-font-micro;
|
||||
color: $yjyf-text-secondary;
|
||||
}
|
||||
.rd-val {
|
||||
font-size: $yjyf-font-sub;
|
||||
color: $yjyf-text-main;
|
||||
font-weight: 500;
|
||||
line-height: 1.5;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* 账单卡片 */
|
||||
@@ -1274,7 +1552,36 @@
|
||||
.balance-value { color: $yjyf-text-main; font-weight: 600; font-variant-numeric: tabular-nums; }
|
||||
.withdraw-panel .meta-item { line-height: 1.5; }
|
||||
.withdraw-panel .estimate { color: $yjyf-text-regular; }
|
||||
.withdraw-panel .drawer-submit { margin-top: 36rpx; box-shadow: $yjyf-shadow-button; }
|
||||
.drawer-rule-box {
|
||||
margin-top: 24rpx;
|
||||
padding: 18rpx 22rpx;
|
||||
border-radius: $yjyf-radius-md;
|
||||
background: $yjyf-bg-page;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10rpx;
|
||||
}
|
||||
.drawer-rule-item {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
gap: 16rpx;
|
||||
}
|
||||
.drawer-rule-tag {
|
||||
width: 136rpx;
|
||||
flex-shrink: 0;
|
||||
font-size: $yjyf-font-micro;
|
||||
color: $yjyf-text-secondary;
|
||||
line-height: 1.45;
|
||||
}
|
||||
.drawer-rule-desc {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
font-size: $yjyf-font-micro;
|
||||
color: $yjyf-text-regular;
|
||||
line-height: 1.45;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.withdraw-panel .drawer-submit { margin-top: 32rpx; box-shadow: $yjyf-shadow-button; }
|
||||
.withdraw-panel .drawer-submit.disabled { box-shadow: none; }
|
||||
|
||||
.detail-hero {
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
||||
<rect x="6" y="2" width="12" height="20" rx="2.5" ry="2.5"/>
|
||||
<line x1="10" y1="5.5" x2="14" y2="5.5"/>
|
||||
<circle cx="12" cy="18" r="0.9" fill="#FFFFFF" stroke="none"/>
|
||||
</svg>
|
||||
|
之后 宽度: | 高度: | 大小: 356 B |
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24" fill="none">
|
||||
<rect x="4" y="3" width="16" height="18" rx="3" fill="#FFF7F0" stroke="#F0710D" stroke-width="1.8"/>
|
||||
<path d="M8 8.5H16" stroke="#F0710D" stroke-width="1.8" stroke-linecap="round"/>
|
||||
<path d="M8 12.5H16" stroke="#F0710D" stroke-width="1.8" stroke-linecap="round"/>
|
||||
<path d="M8 16.5H12.5" stroke="#F0710D" stroke-width="1.8" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
之后 宽度: | 高度: | 大小: 459 B |
在新工单中引用
屏蔽一个用户