feat: 移除步梯搬运费,所有商品搬运费改为0元
- 清除所有商品的步梯搬运收费配置,floor_fee和free_floor全部置0 - 订单详情、服务详情页移除步梯搬运费相关显示项 - 提现规则调整为全部金额需后台审核,取消小额免审自动转账 - 新增师傅端收支账单明细页面,支持查看结算和提现记录 - 更新提现相关配置,降低最低提现金额至0.1元,取消提现次数限制
这个提交包含在:
@@ -44,11 +44,11 @@ class FinanceConfigService
|
||||
'withdraw_enabled' => '1',
|
||||
'withdraw_close_tip' => '系统正在进行财务结算维护,请稍后再发起提现',
|
||||
'withdraw_channels' => 'wechat',
|
||||
'withdraw_require_realname' => '1',
|
||||
'withdraw_min_amount' => '10.00',
|
||||
'withdraw_require_realname' => '0',
|
||||
'withdraw_min_amount' => '0.10',
|
||||
'withdraw_max_amount' => '200.00',
|
||||
'withdraw_daily_amount' => '200.00',
|
||||
'withdraw_daily_count' => '3',
|
||||
'withdraw_daily_count' => '0',
|
||||
'withdraw_allow_weekdays' => '1,2,3,4,5,6,7',
|
||||
'withdraw_time_start' => '00:00',
|
||||
'withdraw_time_end' => '23:59',
|
||||
@@ -59,7 +59,8 @@ class FinanceConfigService
|
||||
'withdraw_fee_max' => '0.00',
|
||||
'withdraw_transfer_mode' => 'wx_mch_transfer',
|
||||
'withdraw_audit_mode' => 'manual',
|
||||
'withdraw_auto_max_amount' => '50.00',
|
||||
'withdraw_audit_sla' => '24小时内',
|
||||
'withdraw_auto_max_amount' => '0.00',
|
||||
'wx_transfer_scene_id' => '1005',
|
||||
'wx_recv_perception' => '劳务报酬',
|
||||
'wx_job_type' => '上门安装维修师傅',
|
||||
@@ -211,9 +212,7 @@ class FinanceConfigService
|
||||
? $all['withdraw_transfer_mode']
|
||||
: 'wx_mch_transfer';
|
||||
|
||||
$auditMode = in_array($all['withdraw_audit_mode'], ['manual', 'auto_small'], true)
|
||||
? $all['withdraw_audit_mode']
|
||||
: 'manual';
|
||||
$auditMode = 'manual';
|
||||
|
||||
return [
|
||||
'enabled' => (int)$all['withdraw_enabled'] === 1 ? 1 : 0,
|
||||
@@ -234,7 +233,8 @@ class FinanceConfigService
|
||||
'fee_max' => round(max(0.00, (float)$all['withdraw_fee_max']), 2),
|
||||
'transfer_mode' => $transferMode,
|
||||
'audit_mode' => $auditMode,
|
||||
'auto_max_amount' => round(max(0.00, (float)$all['withdraw_auto_max_amount']), 2),
|
||||
'audit_sla' => mb_substr(trim((string)($all['withdraw_audit_sla'] ?? '24小时内')) ?: '24小时内', 0, 32),
|
||||
'auto_max_amount' => 0.00,
|
||||
'wx_scene_id' => trim((string)$all['wx_transfer_scene_id']) ?: '1005',
|
||||
'wx_perception' => mb_substr(trim((string)$all['wx_recv_perception']) ?: '劳务报酬', 0, 32),
|
||||
'wx_job_type' => mb_substr(trim((string)$all['wx_job_type']) ?: '上门安装维修师傅', 0, 32),
|
||||
@@ -351,14 +351,20 @@ class FinanceConfigService
|
||||
$minFmt = number_format($cfg['min_amount'], 2, '.', '');
|
||||
$maxFmt = number_format($cfg['max_amount'], 2, '.', '');
|
||||
|
||||
if ($cfg['daily_amount'] > 0) {
|
||||
if ($cfg['min_amount'] <= 0.10) {
|
||||
$amountRuleText = '平台不设额外门槛,限额按微信零钱转账规范执行';
|
||||
$amountGridValue = '按微信限额';
|
||||
$dailyLimitSub = '平台不设额外门槛';
|
||||
} elseif ($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})";
|
||||
$amountGridValue = "¥{$minFmt} ~ ¥{$maxTxt}";
|
||||
$dailyLimitSub = "日限 ¥{$dailyAmtTxt} · 剩 ¥{$remainAmtTxt}";
|
||||
} else {
|
||||
$amountRuleText = "单笔 ¥{$minFmt} ~ ¥{$maxFmt},每日不限累计额度";
|
||||
$amountGridValue = "¥{$minFmt} ~ ¥{$maxTxt}";
|
||||
$dailyLimitSub = '单日不限累计额度';
|
||||
}
|
||||
|
||||
@@ -368,74 +374,65 @@ class FinanceConfigService
|
||||
$dailyCountSub = "今日剩余 {$remainDailyCount} 次";
|
||||
} else {
|
||||
$dailyCountText = '每日不限提现次数';
|
||||
$dailyCountMain = '每日不限次数';
|
||||
$dailyCountSub = '不限申请笔数';
|
||||
$dailyCountMain = '不限次数';
|
||||
$dailyCountSub = '随结随提,灵活申请';
|
||||
}
|
||||
|
||||
$weekdayLabel = self::formatAllowWeekdaysLabel($cfg['allow_weekdays']);
|
||||
$openTimeText = $weekdayLabel . ' ' . $cfg['time_start'] . ' - ' . $cfg['time_end'];
|
||||
$timeGridSub = ($cfg['time_start'] === '00:00' && $cfg['time_end'] === '23:59')
|
||||
? $weekdayLabel . '全天开放'
|
||||
: $weekdayLabel . '开放申请';
|
||||
$auditSla = $cfg['audit_sla'] ?: '24小时内';
|
||||
|
||||
$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小时内在页面确认收款实时到账';
|
||||
}
|
||||
$arrivalParts[] = "微信零钱:提交后预计{$auditSla}完成财务审核并发起转账,请在24小时内确认收款后实时到账(逾期未确认资金自动退回账户余额)";
|
||||
} else {
|
||||
$arrivalParts[] = '微信零钱:财务审核并人工打款后到账';
|
||||
$arrivalParts[] = "微信零钱:提交后预计{$auditSla}完成财务审核并人工打款到账";
|
||||
}
|
||||
}
|
||||
if (in_array('bank', $cfg['channels'], true)) {
|
||||
$arrivalParts[] = '银行储蓄卡:财务审核并打款至收款银行卡后到账';
|
||||
$arrivalParts[] = "银行储蓄卡:提交后预计{$auditSla}完成财务审核并打款至收款银行卡";
|
||||
}
|
||||
$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内确认收款';
|
||||
}
|
||||
$arrivalMain = "{$auditSla}审核";
|
||||
$arrivalSub = '通过后确认即入账';
|
||||
} else {
|
||||
$arrivalMain = '财务审核打款';
|
||||
$arrivalSub = in_array('bank', $cfg['channels'], true) ? '审核后打款至银行卡' : '审核后人工打款到账';
|
||||
$arrivalMain = "{$auditSla}打款";
|
||||
$arrivalSub = in_array('bank', $cfg['channels'], true) ? '财务审核后打款到账' : '审核后人工打款到账';
|
||||
}
|
||||
|
||||
$realnameText = $cfg['require_realname']
|
||||
? '需完成师傅实名认证审核通过后方可发起提现'
|
||||
: ($cfg['max_amount'] >= self::WX_TRANSFER_REALNAME_THRESHOLD
|
||||
? '单笔满 ¥2,000.00 需完成实名认证'
|
||||
: '大额提现按微信规范校验实名');
|
||||
? '需完成师傅实名认证及校验6位支付密码,保障您的资金安全'
|
||||
: '提现需校验6位支付密码,保障您的资金安全';
|
||||
|
||||
$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' => 'amount', 'label' => '提现额度', 'value' => $amountGridValue, 'sub' => $dailyLimitSub],
|
||||
['key' => 'count', 'label' => '每日次数', 'value' => $dailyCountMain, 'sub' => $dailyCountSub],
|
||||
['key' => 'time', 'label' => '提现时间', 'value' => "{$cfg['time_start']} - {$cfg['time_end']}", 'sub' => $timeGridSub],
|
||||
['key' => 'arrival', 'label' => '到账时间', 'value' => $arrivalMain, 'sub' => $arrivalSub],
|
||||
];
|
||||
|
||||
$transferNotice = ($cfg['transfer_mode'] === 'wx_mch_transfer')
|
||||
? "工单完工核销后即可申请提现,{$feeText};提交后预计{$auditSla}由财务审核并发起转账,24小时内确认收款入账,逾期未确认或驳回将全额退回余额。"
|
||||
: "工单完工核销后即可申请提现,{$feeText};提交后预计{$auditSla}由财务审核打款,异常或驳回资金将全额退回余额。";
|
||||
|
||||
$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],
|
||||
['key' => 'notice', 'label' => '到账与费用', 'value' => $transferNotice],
|
||||
['key' => 'security', 'label' => '安全校验', 'value' => $realnameText . '。'],
|
||||
];
|
||||
|
||||
$ruleTip = "单笔 ¥{$minTxt}~¥{$maxTxt} 可提现,{$dailyCountText},{$openTimeText} 开放,{$feeText}。";
|
||||
$ruleTip = "{$amountRuleText},{$dailyCountText},{$openTimeText} 开放,{$arrivalMain},{$feeText}。";
|
||||
if (!$cfg['enabled']) {
|
||||
$ruleTip = $cfg['close_tip'];
|
||||
}
|
||||
|
||||
$arrivalDesc = $cfg['transfer_mode'] === 'wx_mch_transfer'
|
||||
? ($cfg['audit_mode'] === 'auto_small' ? '微信零钱(小额免审,确认收款即到账)' : '微信零钱(审核后小程序确认收款即到账)')
|
||||
? "微信零钱({$auditSla}审核,确认收款即到账)"
|
||||
: '微信零钱 / 人工财务打款';
|
||||
|
||||
return [
|
||||
@@ -462,6 +459,7 @@ class FinanceConfigService
|
||||
'fee_text' => $feeText,
|
||||
'transfer_mode' => $cfg['transfer_mode'],
|
||||
'audit_mode' => $cfg['audit_mode'],
|
||||
'audit_sla' => $auditSla,
|
||||
'auto_max_amount' => $cfg['auto_max_amount'],
|
||||
'arrival_desc' => $arrivalDesc,
|
||||
'amount_rule_text' => $amountRuleText,
|
||||
@@ -780,16 +778,18 @@ class FinanceConfigService
|
||||
$clean['withdraw_transfer_mode'] = $input['withdraw_transfer_mode'];
|
||||
}
|
||||
if (isset($input['withdraw_audit_mode'])) {
|
||||
if (!in_array($input['withdraw_audit_mode'], ['manual', 'auto_small'], true)) {
|
||||
throw new \InvalidArgumentException('无效的提现审核模式');
|
||||
$clean['withdraw_audit_mode'] = 'manual';
|
||||
$clean['withdraw_auto_max_amount'] = '0.00';
|
||||
}
|
||||
if (isset($input['withdraw_audit_sla'])) {
|
||||
$sla = trim((string)$input['withdraw_audit_sla']);
|
||||
if ($sla === '') {
|
||||
throw new \InvalidArgumentException('预计审核处理时效不能为空');
|
||||
}
|
||||
$clean['withdraw_audit_mode'] = $input['withdraw_audit_mode'];
|
||||
$clean['withdraw_audit_sla'] = mb_substr($sla, 0, 32);
|
||||
}
|
||||
if (isset($input['withdraw_auto_max_amount'])) {
|
||||
if (!is_numeric($input['withdraw_auto_max_amount']) || (float)$input['withdraw_auto_max_amount'] < 0 || (float)$input['withdraw_auto_max_amount'] > self::WX_TRANSFER_HARD_MAX) {
|
||||
throw new \InvalidArgumentException('小额免审自动转账上限须在 ¥0 ~ ¥20,000 之间');
|
||||
}
|
||||
$clean['withdraw_auto_max_amount'] = number_format(round((float)$input['withdraw_auto_max_amount'], 2), 2, '.', '');
|
||||
$clean['withdraw_auto_max_amount'] = '0.00';
|
||||
}
|
||||
|
||||
foreach ([
|
||||
|
||||
在新工单中引用
屏蔽一个用户