feat: 移除步梯搬运费,所有商品搬运费改为0元
- 清除所有商品的步梯搬运收费配置,floor_fee和free_floor全部置0 - 订单详情、服务详情页移除步梯搬运费相关显示项 - 提现规则调整为全部金额需后台审核,取消小额免审自动转账 - 新增师傅端收支账单明细页面,支持查看结算和提现记录 - 更新提现相关配置,降低最低提现金额至0.1元,取消提现次数限制
这个提交包含在:
@@ -229,30 +229,12 @@ class Service extends Backend
|
||||
}
|
||||
$this->error(__('Parameter %s can not be empty', ''));
|
||||
}
|
||||
$this->view->assign(['floorFee' => '10.00', 'freeFloor' => 2]);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
private function normalizeFloorFees(array $params)
|
||||
{
|
||||
$mode = $this->request->post('floor_fee_mode', '');
|
||||
if ($mode !== 'free' && $mode !== 'paid') {
|
||||
return $params;
|
||||
}
|
||||
$fee = $mode === 'free' ? 0.0 : filter_var($params['floor_fee'] ?? null, FILTER_VALIDATE_FLOAT);
|
||||
if ($fee === false || $fee < 0 || $fee > 99999999.99 || round($fee, 2) !== $fee) {
|
||||
throw new ValidateException('每层费用须为 0 元或正数,且最多保留两位小数');
|
||||
}
|
||||
if ($fee === 0.0) {
|
||||
return array_replace($params, ['floor_fee' => 0, 'free_floor' => 0]);
|
||||
}
|
||||
$freeFloors = filter_var($params['free_floor'] ?? null, FILTER_VALIDATE_INT, [
|
||||
'options' => ['min_range' => 0, 'max_range' => 2147483647],
|
||||
]);
|
||||
if ($freeFloors === false) {
|
||||
throw new ValidateException('免费楼层数须为非负整数');
|
||||
}
|
||||
return array_replace($params, ['floor_fee' => $fee, 'free_floor' => $freeFloors]);
|
||||
return array_replace($params, ['floor_fee' => 0, 'free_floor' => 0]);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -425,7 +407,6 @@ class Service extends Backend
|
||||
$this->view->assign("row", $row);
|
||||
$this->view->assign("catName", $catName);
|
||||
$this->view->assign("specs", $specs ?: []);
|
||||
$this->view->assign(['floorFee' => $row->floor_fee, 'freeFloor' => $row->free_floor]);
|
||||
return $this->view->fetch();
|
||||
}
|
||||
|
||||
|
||||
@@ -14,10 +14,10 @@
|
||||
{/if}
|
||||
|
||||
<!-- 现代企业级 SaaS 统一视觉规范样式引擎 -->
|
||||
<link href="__CDN__/assets/css/theme-modern.css?v={$Think.config.site.version|htmlentities}-20261124c" rel="stylesheet">
|
||||
<link href="__CDN__/assets/css/theme-modern.css?v={$Think.config.site.version|htmlentities}-20261130a" rel="stylesheet">
|
||||
|
||||
<!-- 优匠优服 橙白企业级品牌视觉引擎 -->
|
||||
<link href="__CDN__/assets/css/theme-qibing-orange.css?v={$Think.config.site.version|htmlentities}-20261124c" rel="stylesheet">
|
||||
<link href="__CDN__/assets/css/theme-qibing-orange.css?v={$Think.config.site.version|htmlentities}-20261130a" rel="stylesheet">
|
||||
|
||||
<style>
|
||||
/* The image viewer sits above existing dialogs and has its own close control. */
|
||||
@@ -60,7 +60,7 @@
|
||||
var require = {
|
||||
config: {$config|json_encode}
|
||||
};
|
||||
require.config.site.version += "-admin-ui-fix-20261124c";
|
||||
require.config.site.version += "-admin-ui-fix-20261130d";
|
||||
if (require.config.controllername === 'merchant' || require.config.controllername === 'user.user') {
|
||||
require.config.site.version += "-identity-security-20261121";
|
||||
}
|
||||
|
||||
@@ -606,21 +606,17 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">提现审核模式:</label>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<select class="form-control js-wd-audit-mode" name="row[withdraw_audit_mode]">
|
||||
<option value="manual" {if $cfg.withdraw_audit_mode == 'manual'}selected{/if}>全部由财务人工审核(推荐:安全防刷)</option>
|
||||
<option value="auto_small" {if $cfg.withdraw_audit_mode == 'auto_small'}selected{/if}>小额免审自动打款(超过免审额度再转人工)</option>
|
||||
</select>
|
||||
<input type="hidden" name="row[withdraw_audit_mode]" value="manual">
|
||||
<input type="hidden" name="row[withdraw_auto_max_amount]" value="0.00">
|
||||
<p class="form-control-static text-primary"><strong>全部由财务人工审核</strong>(所有金额提现均需后台审核通过后再发起打款)</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group js-wd-auto-max">
|
||||
<label class="control-label col-xs-12 col-sm-2">小额免审上限:</label>
|
||||
<div class="col-xs-12 col-sm-4">
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">≤ ¥</span>
|
||||
<input type="number" step="0.01" min="0" max="20000" class="form-control" name="row[withdraw_auto_max_amount]" value="{$cfg.withdraw_auto_max_amount|htmlentities}">
|
||||
<span class="input-group-addon">元免审</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-2">预计审核时效:</label>
|
||||
<div class="col-xs-12 col-sm-5">
|
||||
<input type="text" maxlength="32" data-rule="required" class="form-control" name="row[withdraw_audit_sla]" value="{$cfg.withdraw_audit_sla|htmlentities}" placeholder="如:24小时内、1个工作日内">
|
||||
<span class="fc-field-note">展示在小程序提现规则中,向师傅与平台审核明确预计人工审核时长</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -381,7 +381,7 @@
|
||||
<div class="od-card-body">
|
||||
<div class="od-grid-list">
|
||||
<div class="od-item"><span class="od-item-k">基础服务费:</span><span class="od-item-v">¥{$row.base_amount}</span></div>
|
||||
<div class="od-item"><span class="od-item-k">步梯楼层费:</span><span class="od-item-v">¥{$row.floor_amount}</span></div>
|
||||
{if $row.floor_amount > 0}<div class="od-item"><span class="od-item-k">步梯楼层费:</span><span class="od-item-v">¥{$row.floor_amount}</span></div>{/if}
|
||||
<div class="od-item"><span class="od-item-k">远程费:</span><span class="od-item-v">¥{$row.distance_amount}</span></div>
|
||||
<div class="od-item"><span class="od-item-k">加急费:</span><span class="od-item-v">¥{$row.urgent_amount}</span></div>
|
||||
<div class="od-item"><span class="od-item-k">优惠券抵扣:</span><span class="od-item-v" style="color:#16a34a;">-¥{$row.discount_amount}</span></div>
|
||||
|
||||
@@ -93,7 +93,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="service/floor_fee" /}
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">排序权重:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="100">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -112,24 +119,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<label class="control-label col-xs-12 col-sm-4">排序权重:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="100">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<label class="control-label col-xs-12 col-sm-4">上架状态:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="radio">
|
||||
<span class="text-muted">商品新增后先以下架状态保存</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<label class="control-label col-xs-12 col-sm-2">上架状态:</label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<div class="radio">
|
||||
<span class="text-muted">商品新增后先以下架状态保存</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -216,14 +216,6 @@
|
||||
<dl class="service-detail-metadata">
|
||||
<div><dt>商品编号</dt><dd>{$row.id}</dd></div>
|
||||
{if $row.unit}<div><dt>商品单位</dt><dd>{$row.unit|htmlentities}</dd></div>{/if}
|
||||
<div>
|
||||
<dt>步梯搬运</dt>
|
||||
{if $row.floor_fee > 0}
|
||||
<dd>¥{$row.floor_fee|htmlentities}/层{if $row.free_floor > 0},{$row.free_floor|htmlentities} 层及以下免费{/if}</dd>
|
||||
{else /}
|
||||
<dd>不收费</dd>
|
||||
{/if}
|
||||
</div>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -143,7 +143,14 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{include file="service/floor_fee" /}
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group">
|
||||
<label class="control-label col-xs-12 col-sm-4">排序权重:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -162,25 +169,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<label class="control-label col-xs-12 col-sm-4">排序权重:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<label class="control-label col-xs-12 col-sm-4">上架状态:</label>
|
||||
<div class="col-xs-12 col-sm-8">
|
||||
<div class="radio">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group" style="margin-bottom:0;">
|
||||
<label class="control-label col-xs-12 col-sm-2">上架状态:</label>
|
||||
<div class="col-xs-12 col-sm-10">
|
||||
<div class="radio">
|
||||
{foreach name="statusList" item="vo"}
|
||||
<label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
|
||||
{/foreach}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1136,17 +1136,12 @@ class Home extends Base
|
||||
$floorAmount = 0;
|
||||
$urgentAmount = 0;
|
||||
} else {
|
||||
$floor = max(0, (int)$params['floor']);
|
||||
$freeFloor = isset($service['free_floor']) && (int)$service['free_floor'] >= 0 ? (int)$service['free_floor'] : 2;
|
||||
$floorFee = isset($service['floor_fee']) && (float)$service['floor_fee'] >= 0 ? (float)$service['floor_fee'] : 10.0;
|
||||
|
||||
if ((int)$params['has_elevator'] === 0 && $floor > $freeFloor) {
|
||||
$floorAmount = ($floor - $freeFloor) * $floorFee;
|
||||
}
|
||||
// 全平台商品步梯搬运不收费,floor / has_elevator 仅作订单楼层与电梯标签保留给接单师傅查看
|
||||
$floorAmount = 0;
|
||||
|
||||
$singleUrgent = max(20.0, min(200.0, round($base * 0.2, 2)));
|
||||
$urgentAmount = (int)$params['urgent'] === 1 ? $singleUrgent : 0;
|
||||
$total = round($base + $floorAmount + $urgentAmount, 2);
|
||||
$total = round($base + $urgentAmount, 2);
|
||||
}
|
||||
|
||||
$discount = 0;
|
||||
@@ -1173,15 +1168,15 @@ class Home extends Base
|
||||
'goods_amount' => $type === 'quote' ? 0 : round($goodsAmount, 2),
|
||||
'addon_amount' => $type === 'quote' ? 0 : round($addonAmount, 2),
|
||||
'base_amount' => $type === 'quote' ? 0 : round($base, 2),
|
||||
'floor_amount' => round($floorAmount, 2),
|
||||
'floor_amount' => 0.0,
|
||||
'urgent_amount' => round($urgentAmount, 2),
|
||||
'estimated_urgent_amount' => round(max(20.0, min(200.0, round($base * 0.2, 2))), 2),
|
||||
'total_amount' => $total,
|
||||
'discount_amount' => round($discount, 2),
|
||||
'pay_amount' => max(0, round($total - $discount, 2)),
|
||||
'coupon' => $couponInfo,
|
||||
'free_floor' => $type === 'custom' ? 0 : ($service ? (int)$service['free_floor'] : 0),
|
||||
'floor_fee' => $type === 'custom' ? 0 : round($service ? (float)$service['floor_fee'] : 0.0, 2),
|
||||
'free_floor' => 0,
|
||||
'floor_fee' => 0.0,
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1518,8 +1513,8 @@ class Home extends Base
|
||||
'unit' => $row['unit'],
|
||||
'price_text' => $priceText,
|
||||
'sales' => (int)$row['sales'],
|
||||
'floor_fee' => isset($row['floor_fee']) ? (float)$row['floor_fee'] : 0,
|
||||
'free_floor' => isset($row['free_floor']) ? (int)$row['free_floor'] : 0,
|
||||
'floor_fee' => 0.0,
|
||||
'free_floor' => 0,
|
||||
'need_model' => isset($row['need_model']) ? (int)$row['need_model'] : 1,
|
||||
'description' => isset($row['description']) ? $row['description'] : '',
|
||||
'tag' => isset($row['tag']) && $row['tag'] ? $row['tag'] : '明码标价',
|
||||
|
||||
@@ -1586,45 +1586,17 @@ class Master extends MasterBase
|
||||
return;
|
||||
}
|
||||
|
||||
// 3. 若命中「小额免审自动发起微信转账」,在本地事务外自动发起商家转账(失败必落库记录中文原因并明确回传,严禁静默吞掉)
|
||||
$autoInitiated = false;
|
||||
$canConfirmNow = false;
|
||||
$autoFailReason = '';
|
||||
if (
|
||||
$channel === 'wechat'
|
||||
&& $wdCfg['transfer_mode'] === 'wx_mch_transfer'
|
||||
&& $wdCfg['audit_mode'] === 'auto_small'
|
||||
&& $amount <= (float)$wdCfg['auto_max_amount']
|
||||
) {
|
||||
try {
|
||||
$autoWd = PaymentService::initiateWithdrawTransfer($withdrawId, '小额免审自动发起微信商家转账');
|
||||
$autoInitiated = true;
|
||||
$formattedAuto = $this->formatWithdrawItem($autoWd);
|
||||
$canConfirmNow = !empty($formattedAuto['can_confirm']);
|
||||
} catch (\Throwable $ae) {
|
||||
$autoFailReason = trim((string)$ae->getMessage());
|
||||
Db::name('withdraw')->where('id', $withdrawId)->update([
|
||||
'audit_msg' => mb_substr('【小额免审自动转账失败】' . $autoFailReason, 0, 480),
|
||||
'updatetime' => time(),
|
||||
]);
|
||||
\think\Log::error('[Master::withdraw auto_small] withdraw_id=' . $withdrawId . ' 自动转账失败: ' . $autoFailReason);
|
||||
}
|
||||
}
|
||||
|
||||
if ($canConfirmNow) {
|
||||
$tipMsg = '提现已自动审核通过,请立即确认收款入账微信零钱';
|
||||
} elseif ($autoFailReason !== '') {
|
||||
$tipMsg = '提现申请已提交并冻结金额,但微信自动转账发起失败:' . $autoFailReason . ',已记录原因待财务核查处理';
|
||||
} else {
|
||||
$tipMsg = '提现申请已提交,审核通过后请在钱包内确认收款';
|
||||
}
|
||||
// 3. 所有提现申请均需经过后台财务审核后打款
|
||||
$tipMsg = $channel === 'bank'
|
||||
? '提现申请已提交,审核通过后打款至银行卡'
|
||||
: '提现申请已提交,审核通过后请在钱包内确认收款';
|
||||
|
||||
$this->success($tipMsg, [
|
||||
'withdraw_id' => $withdrawId,
|
||||
'arrive_amount' => $arrive,
|
||||
'auto_initiated' => $autoInitiated,
|
||||
'can_confirm' => $canConfirmNow,
|
||||
'auto_fail_reason' => $autoFailReason,
|
||||
'auto_initiated' => false,
|
||||
'can_confirm' => false,
|
||||
'auto_fail_reason' => '',
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 ([
|
||||
|
||||
@@ -337,18 +337,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
|
||||
$('.js-wd-fee-mode').on('change', syncWdFeeMode);
|
||||
$('.js-wd-fee-field').on('input change', updateWithdrawFeePreview);
|
||||
|
||||
// 提现小额自动审核联动
|
||||
var syncWdAuditMode = function () {
|
||||
var am = $('.js-wd-audit-mode').val() || 'manual';
|
||||
if (am === 'auto_small') {
|
||||
$('.js-wd-auto-max').show();
|
||||
} else {
|
||||
$('.js-wd-auto-max').hide();
|
||||
}
|
||||
};
|
||||
syncWdAuditMode();
|
||||
$('.js-wd-audit-mode').on('change', syncWdAuditMode);
|
||||
|
||||
Form.api.bindevent($("#commission-default-form"), function (data, ret) {
|
||||
syncFormTokens(ret);
|
||||
}, function (data, ret) {
|
||||
|
||||
@@ -196,7 +196,8 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
|
||||
title: __('Operate'),
|
||||
table: table,
|
||||
class: 'col-operate-fixed',
|
||||
width: '260px',
|
||||
width: '250px',
|
||||
maxOperateButtons: 0,
|
||||
events: Table.api.events.operate,
|
||||
buttons: [
|
||||
{
|
||||
@@ -207,9 +208,20 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
|
||||
classname: 'btn btn-xs btn-info btn-detailone',
|
||||
extend: 'data-area=\'["85%","85%"]\''
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
text: '编辑',
|
||||
title: function (row) {
|
||||
return '编辑【' + row.name + '】商品档案与规格';
|
||||
},
|
||||
icon: 'fa fa-pencil',
|
||||
classname: 'btn btn-xs btn-success btn-editone',
|
||||
url: 'service/edit',
|
||||
extend: 'data-area=\'["88%","85%"]\''
|
||||
},
|
||||
{
|
||||
name: 'pricing_main',
|
||||
text: '服务与价格配置',
|
||||
text: '定价',
|
||||
title: function (row) {
|
||||
return '配置【' + row.name + '】的服务与价格';
|
||||
},
|
||||
@@ -218,17 +230,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
|
||||
url: 'service/pricing_main',
|
||||
extend: 'data-area=\'["92%","88%"]\''
|
||||
},
|
||||
{
|
||||
name: 'edit',
|
||||
text: '编辑商品',
|
||||
title: function (row) {
|
||||
return '编辑【' + row.name + '】商品档案与规格';
|
||||
},
|
||||
icon: 'fa fa-pencil',
|
||||
classname: 'btn btn-xs btn-success btn-dialog btn-editone',
|
||||
url: 'service/edit',
|
||||
extend: 'data-area=\'["88%","85%"]\''
|
||||
},
|
||||
{
|
||||
name: 'gallery',
|
||||
text: '图库',
|
||||
@@ -239,7 +240,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
|
||||
classname: 'btn btn-xs btn-info btn-dialog btn-gallery-srv',
|
||||
url: function (row) {
|
||||
return 'service/gallery/index?service_id=' + row.id + '&cat_id=' + row.cat_id;
|
||||
}
|
||||
},
|
||||
dropdown: '更多'
|
||||
},
|
||||
{
|
||||
name: 'del',
|
||||
text: '删除',
|
||||
title: __('Del'),
|
||||
classname: 'btn btn-xs btn-danger btn-delone',
|
||||
extend: 'data-toggle="tooltip" data-container="body"',
|
||||
dropdown: '更多'
|
||||
}
|
||||
],
|
||||
formatter: Table.api.formatter.operate
|
||||
@@ -666,12 +676,10 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
|
||||
// ==================== 3. 商品与规格基础档案编辑 ====================
|
||||
add: function () {
|
||||
Controller.api.bindSpecSimpleEvents();
|
||||
Controller.api.bindFloorFees();
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
edit: function () {
|
||||
Controller.api.bindSpecSimpleEvents();
|
||||
Controller.api.bindFloorFees();
|
||||
Form.api.bindevent($("form[role=form]"));
|
||||
},
|
||||
detail: function () {
|
||||
@@ -820,23 +828,6 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'backend/admin-table-layout',
|
||||
},
|
||||
|
||||
api: {
|
||||
bindFloorFees: function () {
|
||||
var $mode = $('#c-floor_fee_mode');
|
||||
var $fee = $('#c-floor_fee');
|
||||
function syncMode() {
|
||||
var free = $mode.val() === 'free';
|
||||
if (!free && Number($fee.val()) === 0) $fee.val('');
|
||||
$('#floor-fee-paid-fields').prop('hidden', free).find('input').prop('disabled', free);
|
||||
}
|
||||
$mode.on('change', syncMode).closest('form').on('reset', function () {
|
||||
setTimeout(syncMode, 0);
|
||||
});
|
||||
$fee.on('change', function () {
|
||||
if (this.value !== '' && Number(this.value) === 0) {
|
||||
$mode.val('free').trigger('change');
|
||||
}
|
||||
});
|
||||
},
|
||||
bindSpecSimpleEvents: function () {
|
||||
var specIndex = 1000;
|
||||
|
||||
|
||||
在新工单中引用
屏蔽一个用户