feat(withdraw): 落地方案B一体化商城余额提现与手续费内扣模式,完善多端打款退款与对账闭环
这个提交包含在:
@@ -104,8 +104,12 @@ class ScoreShop extends Common
|
||||
}
|
||||
|
||||
|
||||
public function skus($goods_id)
|
||||
public function skus($goods_id = null)
|
||||
{
|
||||
if (empty($goods_id)) {
|
||||
$goods_id = $this->request->param('goods_id');
|
||||
}
|
||||
$goods = $this->goodsModel->where('id', $goods_id)->find();
|
||||
$skus = SkuModel::with('children')->where('goods_id', $goods_id)->where('parent_id', 0)->order('weigh', 'desc')->order('id', 'asc')->select();
|
||||
$skuPrices = SkuPriceModel::with(['score_sku_price'])->where('goods_id', $goods_id)->order('weigh', 'desc')->order('id', 'asc')->select();
|
||||
|
||||
@@ -125,6 +129,7 @@ class ScoreShop extends Common
|
||||
}
|
||||
|
||||
$this->success('获取成功', null, [
|
||||
'goods' => $goods,
|
||||
'skus' => $skus,
|
||||
'sku_prices' => $skuPrices,
|
||||
'score_sku_prices' => $scoreSkuPrices
|
||||
@@ -137,6 +142,9 @@ class ScoreShop extends Common
|
||||
*/
|
||||
public function edit($goods_id = null)
|
||||
{
|
||||
if (empty($goods_id)) {
|
||||
$goods_id = $this->request->param('goods_id');
|
||||
}
|
||||
if (!$this->request->isAjax()) {
|
||||
return $this->view->fetch('add');
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ class Order extends Common
|
||||
}
|
||||
|
||||
/**
|
||||
* 收益中心分成明细:即时奖列人;均分只汇总人数/人均
|
||||
* 收益中心分成明细:精准查询本单实际收益(即时奖列人、均分奖按本单贡献及关联批次真实核算)
|
||||
*/
|
||||
protected function buildPartnerSplit($order)
|
||||
{
|
||||
@@ -206,6 +206,9 @@ class Order extends Common
|
||||
return [
|
||||
'items' => [],
|
||||
'total_cash' => '0.00',
|
||||
'total_instant_cash' => '0.00',
|
||||
'total_share_cash' => '0.00',
|
||||
'total_all_cash' => '0.00',
|
||||
'total_voucher' => '0.00',
|
||||
'settle_date' => null,
|
||||
'has_data' => false,
|
||||
@@ -214,10 +217,11 @@ class Order extends Common
|
||||
|
||||
$shareTypes = ['venue_share', 'county_share', 'madow_share'];
|
||||
$items = [];
|
||||
$totalCash = 0;
|
||||
$totalInstantCash = 0;
|
||||
$totalShareCash = 0;
|
||||
$totalVoucher = 0;
|
||||
|
||||
// 1. 查询即时收益流水
|
||||
// 1. 查询即时收益流水(完全归属于本单的直接奖励)
|
||||
$rows = \app\admin\model\shopro\partner\Reward::with(['user'])
|
||||
->where('order_id', $orderId)
|
||||
->order('id', 'asc')
|
||||
@@ -234,7 +238,7 @@ class Order extends Common
|
||||
$status = intval($row->status ?? 0);
|
||||
|
||||
if ($status === 1 && $amount > 0) {
|
||||
$totalCash = round($totalCash + $amount, 2);
|
||||
$totalInstantCash = round($totalInstantCash + $amount, 2);
|
||||
}
|
||||
if ($type === 'voucher_grant' && $status === 1 && $baseAmount > 0) {
|
||||
$totalVoucher = round($totalVoucher + $baseAmount, 2);
|
||||
@@ -286,7 +290,7 @@ class Order extends Common
|
||||
$cCommission = round((float) ($crow->commission ?? 0), 2);
|
||||
$cStatus = intval($crow->status ?? 0);
|
||||
if ($cStatus === 1 && $cCommission > 0) {
|
||||
$totalCash = round($totalCash + $cCommission, 2);
|
||||
$totalInstantCash = round($totalInstantCash + $cCommission, 2);
|
||||
}
|
||||
$items[] = [
|
||||
'display' => 'user',
|
||||
@@ -314,11 +318,12 @@ class Order extends Common
|
||||
// 忽略非核心分销查询异常
|
||||
}
|
||||
|
||||
// 3. 统计支付日日结均分奖池概况
|
||||
$settleDate = null;
|
||||
// 3. 精准查询均分加权分红(只核算本单真实注入奖池贡献及其实际参与结算批次)
|
||||
$paidRaw = is_array($order)
|
||||
? ($order['paid_time'] ?? null)
|
||||
: ($order->getData('paid_time') ?? ($order['paid_time'] ?? null));
|
||||
$paidTs = 0;
|
||||
$settleDate = null;
|
||||
if ($paidRaw) {
|
||||
$paidTs = is_numeric($paidRaw) ? intval($paidRaw) : strtotime((string) $paidRaw);
|
||||
if ($paidTs > 0) {
|
||||
@@ -326,126 +331,265 @@ class Order extends Common
|
||||
}
|
||||
}
|
||||
|
||||
if ($settleDate) {
|
||||
$dayStart = strtotime($settleDate . ' 00:00:00');
|
||||
$dayEnd = strtotime($settleDate . ' 23:59:59');
|
||||
$orderStatus = (string) (is_array($order) ? ($order['status'] ?? '') : ($order->status ?? ''));
|
||||
$isPaid = in_array($orderStatus, ['paid', 'completed'], true) || ($paidTs > 0);
|
||||
|
||||
foreach ($shareTypes as $type) {
|
||||
$shareRows = \app\admin\model\shopro\partner\Reward::where(function ($q) use ($settleDate, $dayStart, $dayEnd) {
|
||||
$q->where('settle_date', $settleDate)
|
||||
->whereOr(function ($q2) use ($dayStart, $dayEnd) {
|
||||
$q2->whereNull('settle_date')->whereBetween('createtime', [$dayStart, $dayEnd]);
|
||||
});
|
||||
})
|
||||
->where('reward_type', $type)
|
||||
->where('status', 1)
|
||||
->where('user_id', '>', 0)
|
||||
->select();
|
||||
if ($isPaid) {
|
||||
// 订单 ext 数据
|
||||
$orderExtRaw = is_array($order) ? ($order['ext'] ?? []) : ($order->ext ?? []);
|
||||
$orderExt = is_array($orderExtRaw) ? $orderExtRaw : (json_decode($orderExtRaw ?: '', true) ?: []);
|
||||
|
||||
$distinctUsers = [];
|
||||
$totalAmount = 0;
|
||||
$totalMadow = 0;
|
||||
foreach ($shareRows as $sr) {
|
||||
$totalAmount = round($totalAmount + (float) ($sr->amount ?? 0), 2);
|
||||
$totalMadow = function_exists('bcadd')
|
||||
? (float) bcadd((string) $totalMadow, (string) ($sr->madow ?? 0), 8)
|
||||
: ($totalMadow + (float) ($sr->madow ?? 0));
|
||||
$distinctUsers[intval($sr->user_id)] = true;
|
||||
// 获取本单的规则设定贡献
|
||||
$orderRules = \addons\shopro\service\partner\PartnerConfig::getOrderEffectiveRules($order);
|
||||
$rewardService = new \addons\shopro\service\partner\PartnerRewardService();
|
||||
$qualifiedPayFee = $rewardService->getQualifiedPayFee($order);
|
||||
|
||||
$venueRuleContrib = isset($orderRules['venue_share']) && is_numeric($orderRules['venue_share'])
|
||||
? round((float) $orderRules['venue_share'], 2)
|
||||
: (float) \addons\shopro\service\partner\PartnerConfig::get('partner_venue_share_per_order', 100);
|
||||
|
||||
$countyRuleContrib = isset($orderRules['county_share']) && is_numeric($orderRules['county_share'])
|
||||
? round((float) $orderRules['county_share'], 2)
|
||||
: (float) \addons\shopro\service\partner\PartnerConfig::get('partner_county_share_per_order', 50);
|
||||
|
||||
// 精准查找包含本单 order_id 的实际结算批次
|
||||
$matchedBatches = [];
|
||||
$batchCandidates = \app\admin\model\shopro\partner\Reward::where('order_id', '<', 0)
|
||||
->whereIn('reward_type', $shareTypes)
|
||||
->where('ext', 'like', '%' . $orderId . '%')
|
||||
->order('id', 'asc')
|
||||
->select();
|
||||
|
||||
foreach ($batchCandidates as $bc) {
|
||||
$bcExt = is_array($bc->ext) ? $bc->ext : (json_decode($bc->getData('ext') ?? '', true) ?: []);
|
||||
if (!empty($bcExt['orders']) && is_array($bcExt['orders']) && in_array($orderId, $bcExt['orders'])) {
|
||||
$matchedBatches[$bc->reward_type][] = [
|
||||
'model' => $bc,
|
||||
'ext' => $bcExt,
|
||||
];
|
||||
}
|
||||
$userCount = count($distinctUsers);
|
||||
}
|
||||
|
||||
if ($userCount <= 0) {
|
||||
// 分母为 0 进平台的记录
|
||||
$platRows = \app\admin\model\shopro\partner\Reward::where(function ($q) use ($settleDate, $dayStart, $dayEnd) {
|
||||
$q->where('settle_date', $settleDate)
|
||||
->whereOr(function ($q2) use ($dayStart, $dayEnd) {
|
||||
$q2->whereNull('settle_date')->whereBetween('createtime', [$dayStart, $dayEnd]);
|
||||
});
|
||||
})
|
||||
->where('reward_type', $type)
|
||||
->where('status', 1)
|
||||
->where('user_id', 0)
|
||||
->select();
|
||||
if (empty($platRows) || count($platRows) <= 0) {
|
||||
continue;
|
||||
// 获取当前活跃达标人数(备用)
|
||||
$activeService = new \addons\shopro\service\partner\ActiveService();
|
||||
$windowStart = time() - (\addons\shopro\service\partner\PartnerConfig::activeDays() - 1) * 86400;
|
||||
$activeVenueCount = count($activeService->activeUserIds($windowStart, time(), ['is_venue' => 1]));
|
||||
$activeCountyCount = count($activeService->activeUserIds($windowStart, time(), ['is_county' => 1]));
|
||||
$activeTasterCount = count($activeService->activeUserIds($windowStart, time()));
|
||||
|
||||
$shareDefinitions = [
|
||||
'venue_share' => [
|
||||
'name' => '酒道馆加权奖',
|
||||
'role' => 'venue',
|
||||
'role_text' => '酒道馆',
|
||||
'unit' => '元',
|
||||
'order_contrib' => $venueRuleContrib,
|
||||
'wallet_type' => \addons\shopro\service\partner\PartnerConfig::rewardWalletType(),
|
||||
'wallet_type_text' => \addons\shopro\service\partner\PartnerConfig::rewardWalletType() === 'money' ? '商城余额' : '佣金钱包',
|
||||
'settled_key' => 'venue_settled',
|
||||
'default_user_count' => $activeVenueCount,
|
||||
],
|
||||
'county_share' => [
|
||||
'name' => '区县加权奖',
|
||||
'role' => 'county',
|
||||
'role_text' => '区县',
|
||||
'unit' => '元',
|
||||
'order_contrib' => $countyRuleContrib,
|
||||
'wallet_type' => \addons\shopro\service\partner\PartnerConfig::rewardWalletType(),
|
||||
'wallet_type_text' => \addons\shopro\service\partner\PartnerConfig::rewardWalletType() === 'money' ? '商城余额' : '佣金钱包',
|
||||
'settled_key' => 'county_settled',
|
||||
'default_user_count' => $activeCountyCount,
|
||||
],
|
||||
'madow_share' => [
|
||||
'name' => '每日获得dmepa',
|
||||
'role' => 'taster',
|
||||
'role_text' => '品酒师',
|
||||
'unit' => 'dmepa',
|
||||
'order_contrib' => $qualifiedPayFee,
|
||||
'wallet_type' => 'madow',
|
||||
'wallet_type_text' => '分红dmepa',
|
||||
'settled_key' => 'madow_settled',
|
||||
'default_user_count' => $activeTasterCount,
|
||||
],
|
||||
];
|
||||
|
||||
foreach ($shareDefinitions as $type => $def) {
|
||||
$batchList = $matchedBatches[$type] ?? [];
|
||||
$contribPool = round((float) $def['order_contrib'], 2);
|
||||
|
||||
if (!empty($batchList)) {
|
||||
// 1. 已在实际批次中结算完成
|
||||
$firstItem = $batchList[0];
|
||||
$firstModel = $firstItem['model'];
|
||||
$batchExt = $firstItem['ext'];
|
||||
|
||||
$ordersInBatch = is_array($batchExt['orders'] ?? null) ? $batchExt['orders'] : [];
|
||||
$batchOrderCount = max(1, count($ordersInBatch));
|
||||
|
||||
// 参与用户数
|
||||
$userCount = intval($batchExt['share_user_count'] ?? count(array_filter($batchList, function ($r) {
|
||||
return intval($r['model']->user_id ?? 0) > 0;
|
||||
})));
|
||||
|
||||
if ($type === 'venue_share' || $type === 'county_share') {
|
||||
$totalShareCash = round($totalShareCash + $contribPool, 2);
|
||||
}
|
||||
$platAmount = 0;
|
||||
$platMadow = 0;
|
||||
foreach ($platRows as $pr) {
|
||||
$platAmount = round($platAmount + (float) ($pr->amount ?? 0), 2);
|
||||
$platMadow = function_exists('bcadd')
|
||||
? (float) bcadd((string) $platMadow, (string) ($pr->madow ?? 0), 8)
|
||||
: ($platMadow + (float) ($pr->madow ?? 0));
|
||||
|
||||
$batchTotalPool = round((float) ($batchExt['pool'] ?? ($batchExt['gmv'] ?? $firstModel->base_amount)), 2);
|
||||
|
||||
if ($userCount > 0) {
|
||||
if ($type === 'madow_share') {
|
||||
$eachContrib = function_exists('bcdiv')
|
||||
? bcdiv((string) $contribPool, (string) $userCount, 8)
|
||||
: number_format($contribPool / $userCount, 8, '.', '');
|
||||
$eachContribText = \addons\shopro\service\partner\IdentityService::formatMadow($eachContrib);
|
||||
|
||||
$batchEach = function_exists('bcdiv')
|
||||
? bcdiv((string) $batchTotalPool, (string) $userCount, 8)
|
||||
: number_format($batchTotalPool / $userCount, 8, '.', '');
|
||||
$batchEachText = \addons\shopro\service\partner\IdentityService::formatMadow($batchEach);
|
||||
|
||||
$amountText = $eachContribText . ' 枚/人';
|
||||
$tip = $batchOrderCount > 1
|
||||
? "日结均分(结算批次 #{$firstModel->order_id},合并 {$batchOrderCount} 单)"
|
||||
: "日结均分(结算批次 #{$firstModel->order_id})";
|
||||
$formula = $batchOrderCount > 1
|
||||
? "本单GMV {$contribPool} / {$userCount} = {$eachContribText} 枚/人(批次合计 GMV {$batchTotalPool} / {$userCount} = {$batchEachText})"
|
||||
: "GMV {$contribPool} / {$userCount} = {$eachContribText} 枚/人";
|
||||
} else {
|
||||
$eachContrib = function_exists('bcdiv')
|
||||
? bcdiv((string) $contribPool, (string) $userCount, 2)
|
||||
: number_format($contribPool / $userCount, 2, '.', '');
|
||||
$batchEach = function_exists('bcdiv')
|
||||
? bcdiv((string) $batchTotalPool, (string) $userCount, 2)
|
||||
: number_format($batchTotalPool / $userCount, 2, '.', '');
|
||||
|
||||
$amountText = '¥' . $eachContrib . '/人';
|
||||
$tip = $batchOrderCount > 1
|
||||
? "日结均分(结算批次 #{$firstModel->order_id},合并 {$batchOrderCount} 单)"
|
||||
: "日结均分(结算批次 #{$firstModel->order_id})";
|
||||
$formula = $batchOrderCount > 1
|
||||
? "本单贡献 {$contribPool} / {$userCount} = {$eachContrib}(批次总奖池 {$batchTotalPool} / {$userCount} = {$batchEach})"
|
||||
: "奖池 {$contribPool} / {$userCount} = {$eachContrib}";
|
||||
}
|
||||
|
||||
$items[] = [
|
||||
'display' => 'share',
|
||||
'id' => intval($firstModel->id),
|
||||
'reward_type' => $type,
|
||||
'reward_type_text' => $def['name'],
|
||||
'role' => $def['role'],
|
||||
'role_text' => $def['role_text'],
|
||||
'user_id' => 0,
|
||||
'user' => null,
|
||||
'user_count' => $userCount,
|
||||
'each_amount' => $type === 'madow_share' ? '0.00' : $eachContrib,
|
||||
'each_madow' => $type === 'madow_share' ? $eachContribText : '0',
|
||||
'total_amount' => number_format($contribPool, 2, '.', ''),
|
||||
'total_madow' => \addons\shopro\service\partner\IdentityService::formatMadow($contribPool),
|
||||
'batch_total_amount' => number_format($batchTotalPool, 2, '.', ''),
|
||||
'amount_text' => $amountText,
|
||||
'wallet_type' => $def['wallet_type'],
|
||||
'wallet_type_text' => $def['wallet_type_text'],
|
||||
'settle_date' => $firstModel->settle_date ?: $settleDate,
|
||||
'status' => 1,
|
||||
'status_text' => '已入账',
|
||||
'unit' => $def['unit'],
|
||||
'formula' => $formula,
|
||||
'skip_reason_text' => '',
|
||||
'tip' => $tip,
|
||||
];
|
||||
} else {
|
||||
// 分母为 0 进平台留存
|
||||
$tip = "分母为0,本单奖池进平台留存";
|
||||
$items[] = [
|
||||
'display' => 'share',
|
||||
'id' => intval($firstModel->id),
|
||||
'reward_type' => $type,
|
||||
'reward_type_text' => $def['name'],
|
||||
'role' => 'system',
|
||||
'role_text' => '平台',
|
||||
'user_id' => 0,
|
||||
'user' => null,
|
||||
'user_count' => 0,
|
||||
'each_amount' => '0.00',
|
||||
'each_madow' => '0',
|
||||
'total_amount' => number_format($contribPool, 2, '.', ''),
|
||||
'total_madow' => \addons\shopro\service\partner\IdentityService::formatMadow($contribPool),
|
||||
'batch_total_amount' => number_format($batchTotalPool, 2, '.', ''),
|
||||
'amount_text' => $type === 'madow_share' ? (\addons\shopro\service\partner\IdentityService::formatMadow($contribPool) . ' dmepa') : ('¥' . number_format($contribPool, 2, '.', '')),
|
||||
'wallet_type' => 'system',
|
||||
'wallet_type_text' => '平台留存',
|
||||
'settle_date' => $firstModel->settle_date ?: $settleDate,
|
||||
'status' => 1,
|
||||
'status_text' => '已入账',
|
||||
'unit' => $def['unit'],
|
||||
'formula' => "参与人数为0,本单贡献 {$contribPool} 进平台",
|
||||
'skip_reason_text' => '',
|
||||
'tip' => $tip,
|
||||
];
|
||||
}
|
||||
} else {
|
||||
// 2. 尚未结算(待结算状态,展示本单贡献与预估)
|
||||
$userCount = $def['default_user_count'];
|
||||
if ($userCount > 0) {
|
||||
if ($type === 'madow_share') {
|
||||
$eachContrib = function_exists('bcdiv')
|
||||
? bcdiv((string) $contribPool, (string) $userCount, 8)
|
||||
: number_format($contribPool / $userCount, 8, '.', '');
|
||||
$eachContribText = \addons\shopro\service\partner\IdentityService::formatMadow($eachContrib);
|
||||
$amountText = $eachContribText . ' 枚/人 (预估)';
|
||||
$formula = "待结算预估:本单GMV {$contribPool} / 当前达标 {$userCount} 人 = {$eachContribText} 枚/人";
|
||||
} else {
|
||||
$eachContrib = function_exists('bcdiv')
|
||||
? bcdiv((string) $contribPool, (string) $userCount, 2)
|
||||
: number_format($contribPool / $userCount, 2, '.', '');
|
||||
$amountText = '¥' . $eachContrib . '/人 (预估)';
|
||||
$formula = "待结算预估:本单贡献 {$contribPool} / 当前达标 {$userCount} 人 = {$eachContrib}";
|
||||
}
|
||||
} else {
|
||||
$amountText = $type === 'madow_share' ? '0 dmepa' : '¥0.00';
|
||||
$formula = "当前达标人数为0,结算时若无合格者将进平台留存";
|
||||
}
|
||||
$platform = $platRows[0];
|
||||
$amountText = $type === 'madow_share'
|
||||
? \addons\shopro\service\partner\IdentityService::formatMadow($platMadow) . ' dmepa'
|
||||
: '¥' . number_format($platAmount, 2, '.', '');
|
||||
|
||||
$items[] = [
|
||||
'display' => 'share',
|
||||
'id' => intval($platform->id ?? 0),
|
||||
'id' => 0,
|
||||
'reward_type' => $type,
|
||||
'reward_type_text' => \addons\shopro\service\partner\PartnerConfig::rewardTypeText($type),
|
||||
'role' => 'system',
|
||||
'role_text' => '平台',
|
||||
'reward_type_text' => $def['name'],
|
||||
'role' => $def['role'],
|
||||
'role_text' => $def['role_text'],
|
||||
'user_id' => 0,
|
||||
'user' => null,
|
||||
'user_count' => 0,
|
||||
'each_amount' => '0.00',
|
||||
'each_madow' => '0',
|
||||
'total_amount' => number_format($platAmount, 2, '.', ''),
|
||||
'total_madow' => \addons\shopro\service\partner\IdentityService::formatMadow($platMadow),
|
||||
'user_count' => $userCount,
|
||||
'each_amount' => $type === 'madow_share' ? '0.00' : ($userCount > 0 ? $eachContrib : '0.00'),
|
||||
'each_madow' => $type === 'madow_share' ? ($userCount > 0 ? $eachContribText : '0') : '0',
|
||||
'total_amount' => number_format($contribPool, 2, '.', ''),
|
||||
'total_madow' => \addons\shopro\service\partner\IdentityService::formatMadow($contribPool),
|
||||
'batch_total_amount' => number_format($contribPool, 2, '.', ''),
|
||||
'amount_text' => $amountText,
|
||||
'wallet_type' => 'system',
|
||||
'wallet_type_text' => '平台留存',
|
||||
'wallet_type' => $def['wallet_type'],
|
||||
'wallet_type_text' => $def['wallet_type_text'],
|
||||
'settle_date' => $settleDate,
|
||||
'status' => 1,
|
||||
'status_text' => '已入账',
|
||||
'unit' => $type === 'madow_share' ? 'dmepa' : '元',
|
||||
'formula' => (string) ($platform->formula ?? ''),
|
||||
'status' => 0,
|
||||
'status_text' => '待结算',
|
||||
'unit' => $def['unit'],
|
||||
'formula' => $formula,
|
||||
'skip_reason_text' => '',
|
||||
'tip' => '当日无人参与,奖池进平台',
|
||||
'tip' => '待日结均分结算',
|
||||
];
|
||||
continue;
|
||||
}
|
||||
|
||||
$first = $shareRows[0];
|
||||
$eachAmount = function_exists('bcdiv') ? bcdiv((string) $totalAmount, (string) $userCount, 2) : number_format($totalAmount / $userCount, 2, '.', '');
|
||||
$eachMadowVal = function_exists('bcdiv') ? bcdiv((string) $totalMadow, (string) $userCount, 8) : ($totalMadow / $userCount);
|
||||
$eachMadow = \addons\shopro\service\partner\IdentityService::formatMadow($eachMadowVal);
|
||||
|
||||
$items[] = [
|
||||
'display' => 'share',
|
||||
'id' => intval($first->id ?? 0),
|
||||
'reward_type' => $type,
|
||||
'reward_type_text' => \addons\shopro\service\partner\PartnerConfig::rewardTypeText($type),
|
||||
'role' => '',
|
||||
'role_text' => '',
|
||||
'user_id' => 0,
|
||||
'user' => null,
|
||||
'user_count' => $userCount,
|
||||
'each_amount' => $eachAmount,
|
||||
'each_madow' => $eachMadow,
|
||||
'total_amount' => number_format($totalAmount, 2, '.', ''),
|
||||
'total_madow' => \addons\shopro\service\partner\IdentityService::formatMadow($totalMadow),
|
||||
'amount_text' => $type === 'madow_share' ? ($eachMadow . ' dmepa/人') : ('¥' . $eachAmount . '/人'),
|
||||
'wallet_type' => $type === 'madow_share' ? 'madow' : \addons\shopro\service\partner\PartnerConfig::rewardWalletType(),
|
||||
'wallet_type_text' => $type === 'madow_share' ? '分红dmepa' : (\addons\shopro\service\partner\PartnerConfig::rewardWalletType() === 'money' ? '商城余额' : '佣金钱包'),
|
||||
'settle_date' => $settleDate,
|
||||
'status' => 1,
|
||||
'status_text' => '已入账',
|
||||
'unit' => $type === 'madow_share' ? 'dmepa' : '元',
|
||||
'formula' => (string) ($first->formula ?? ''),
|
||||
'skip_reason_text' => '',
|
||||
'tip' => '日结均分(不列出参与用户名单)',
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
$totalAllCash = round($totalInstantCash + $totalShareCash, 2);
|
||||
|
||||
return [
|
||||
'items' => $items,
|
||||
'total_cash' => number_format($totalCash, 2, '.', ''),
|
||||
'total_cash' => number_format($totalInstantCash, 2, '.', ''), // 直入商城余额的即时现金
|
||||
'total_instant_cash' => number_format($totalInstantCash, 2, '.', ''),
|
||||
'total_share_cash' => number_format($totalShareCash, 2, '.', ''),
|
||||
'total_all_cash' => number_format($totalAllCash, 2, '.', ''),
|
||||
'total_voucher' => number_format($totalVoucher, 2, '.', ''),
|
||||
'settle_date' => $settleDate,
|
||||
'has_data' => count($items) > 0,
|
||||
@@ -455,6 +599,9 @@ class Order extends Common
|
||||
return [
|
||||
'items' => [],
|
||||
'total_cash' => '0.00',
|
||||
'total_instant_cash' => '0.00',
|
||||
'total_share_cash' => '0.00',
|
||||
'total_all_cash' => '0.00',
|
||||
'total_voucher' => '0.00',
|
||||
'settle_date' => null,
|
||||
'has_data' => false,
|
||||
|
||||
@@ -351,7 +351,7 @@ class User extends Common
|
||||
if ($amount < 0 && bcadd((string) $user->money, (string) $amount, 2) < 0) {
|
||||
error_stop('当前余额不足,无法扣除');
|
||||
}
|
||||
return WalletService::change($userId, 'money', $amount, 'admin_recharge', [], $memo ?: '后台管理调整余额');
|
||||
return WalletService::change($userId, 'money', $amount, 'admin_recharge', [], $memo ?: '');
|
||||
}
|
||||
|
||||
if ($type === 'score') {
|
||||
@@ -363,7 +363,7 @@ class User extends Common
|
||||
if ($amount < 0 && ($user->score + $amount) < 0) {
|
||||
error_stop('当前积分不足,无法扣除');
|
||||
}
|
||||
return WalletService::change($userId, 'score', $amount, 'admin_recharge', [], $memo ?: '后台管理调整积分');
|
||||
return WalletService::change($userId, 'score', $amount, 'admin_recharge', [], $memo ?: '');
|
||||
}
|
||||
|
||||
// 对于dmepa (madow) 与兑换券 (voucher),属于合伙人二开资产体系
|
||||
|
||||
@@ -18,6 +18,8 @@ class Withdraw extends Common
|
||||
'withdraw_info_hidden',
|
||||
'withdraw_info_display',
|
||||
'is_madow_withdraw',
|
||||
'is_money_withdraw',
|
||||
'real_amount',
|
||||
'withdraw_type_text',
|
||||
'wechat_transfer_state_text',
|
||||
];
|
||||
@@ -105,6 +107,27 @@ class Withdraw extends Common
|
||||
|| (isset($info['提现资产']) && strcasecmp($info['提现资产'], 'dmepa') === 0);
|
||||
}
|
||||
|
||||
public function getIsMoneyWithdrawAttr($value, $data)
|
||||
{
|
||||
$info = $this->withdraw_info ?? ($data['withdraw_info'] ?? null);
|
||||
if (is_string($info)) {
|
||||
$info = json_decode($info, true) ?: [];
|
||||
}
|
||||
if (!is_array($info)) {
|
||||
return false;
|
||||
}
|
||||
return (isset($info['wallet_type']) && $info['wallet_type'] === 'money')
|
||||
|| (isset($info['提现资产']) && $info['提现资产'] === '商城余额');
|
||||
}
|
||||
|
||||
public function getRealAmountAttr($value, $data)
|
||||
{
|
||||
$amount = $data['amount'] ?? ($this->amount ?? 0);
|
||||
$chargeFee = $data['charge_fee'] ?? ($this->charge_fee ?? 0);
|
||||
$real = bcsub((string)$amount, (string)$chargeFee, 2);
|
||||
return max(0, floatval($real));
|
||||
}
|
||||
|
||||
public function getWithdrawInfoDisplayAttr($value, $data)
|
||||
{
|
||||
$info = $this->withdraw_info ?? ($data['withdraw_info'] ?? null);
|
||||
@@ -118,6 +141,8 @@ class Withdraw extends Common
|
||||
$display = [];
|
||||
$isMadow = (isset($info['wallet_type']) && $info['wallet_type'] === 'madow')
|
||||
|| (isset($info['提现资产']) && strcasecmp($info['提现资产'], 'dmepa') === 0);
|
||||
$isMoney = (isset($info['wallet_type']) && $info['wallet_type'] === 'money')
|
||||
|| (isset($info['提现资产']) && $info['提现资产'] === '商城余额');
|
||||
|
||||
if ($isMadow) {
|
||||
$display['提现资产'] = 'DMEPA';
|
||||
@@ -148,6 +173,12 @@ class Withdraw extends Common
|
||||
$valClean = trim(str_replace(['元', ' '], '', (string)$marketValue));
|
||||
$display['换算市值'] = number_format((float)$valClean, 2, '.', '') . ' 元';
|
||||
}
|
||||
} elseif ($isMoney) {
|
||||
$display['提现资产'] = '商城余额';
|
||||
$amount = $data['amount'] ?? ($this->amount ?? 0);
|
||||
$chargeFee = $data['charge_fee'] ?? ($this->charge_fee ?? 0);
|
||||
$real = bcsub((string)$amount, (string)$chargeFee, 2);
|
||||
$display['预计到账'] = number_format(max(0, floatval($real)), 2, '.', '') . ' 元';
|
||||
}
|
||||
|
||||
// 填充银行卡或其它常规账户信息,并过滤英文底层键
|
||||
|
||||
@@ -32,16 +32,18 @@ class WalletLog extends Common
|
||||
'score_shop_pay' => '积分商城-积分支付',
|
||||
'order_pay' => '商城订单-积分抵扣',
|
||||
'order_refund' => '订单退款-退还积分',
|
||||
'admin_recharge' => '后台-积分充值',
|
||||
'admin_recharge' => '合约调用',
|
||||
'recharge_gift' => '线上充值-赠送积分'
|
||||
],
|
||||
'money' => [
|
||||
'order_pay' => '商城订单-余额支付',
|
||||
'order_recharge' => '线上充值',
|
||||
'admin_recharge' => '后台-余额充值',
|
||||
'admin_recharge' => '合约调用',
|
||||
'recharge_gift' => '线上充值-赠送余额',
|
||||
'activity_gift' => '活动-赠送余额',
|
||||
'order_refund' => '订单退款-退还余额',
|
||||
'withdraw' => '申请提现',
|
||||
'withdraw_error' => '提现失败-返还余额',
|
||||
'transfer_by_commission' => '服务收益-转入到余额',
|
||||
'reward_income' => '收益分成-入账',
|
||||
'reward_back' => '收益分成-退还',
|
||||
@@ -113,4 +115,15 @@ class WalletLog extends Common
|
||||
$eventMap = $this->getEventMap();
|
||||
return $eventMap[$type][$event] ?? ($eventMap['money'][$event] ?? ($eventMap['commission'][$event] ?? ($event ?: '')));
|
||||
}
|
||||
|
||||
public function getMemoAttr($value, $data)
|
||||
{
|
||||
$event = $data['event'] ?? '';
|
||||
if ($event === 'admin_recharge') {
|
||||
if ($value === '后台管理调整余额' || $value === '后台管理调整积分' || $value === '合约调用') {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
return $value ?? '';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,6 +107,7 @@
|
||||
</el-scrollbar>
|
||||
</el-main>
|
||||
<el-footer class="sa-footer--submit sa-flex sa-row-right">
|
||||
<el-button @click="onCancel" style="margin-right: 12px;">取消</el-button>
|
||||
<el-button type="primary" @click="onConfirm">确定</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
|
||||
@@ -353,8 +353,8 @@
|
||||
<el-form-item label="进阶团队分润:">
|
||||
<strong>{{ state.data.partner_exclusive_cash || '0.00' }}</strong> 元
|
||||
</el-form-item>
|
||||
<el-form-item label="每日贡献dmepa:">
|
||||
{{ state.data.madow || 0 }}(约合 ¥{{ state.data.madow_value || '0.00' }})
|
||||
<el-form-item label="每日获得dmepa:">
|
||||
{{ state.data.madow || 0 }} 枚(约合 ¥{{ state.data.madow_value || '0.00' }})
|
||||
</el-form-item>
|
||||
<el-form-item label="消费补贴兑换券:">
|
||||
总额 {{ state.data.voucher_total || 0 }} 个 / 已释放 {{ state.data.voucher_released || 0 }} 个 /
|
||||
|
||||
@@ -80,9 +80,9 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="dmepa" min-width="130">
|
||||
<el-table-column label="dmepa (枚)" min-width="130">
|
||||
<template #default="scope">
|
||||
<div>{{ scope.row.madow || 0 }}</div>
|
||||
<div>{{ scope.row.madow || 0 }} 枚</div>
|
||||
<div class="sa-color--info" style="font-size:12px">约合 ¥{{ scope.row.madow_value || '0.00' }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -391,11 +391,11 @@
|
||||
</el-tooltip>
|
||||
</div>
|
||||
<div class="kpi-main-num text-purple">
|
||||
{{ state.madow.total_madow }} <span class="unit">dmepa</span>
|
||||
{{ state.madow.total_madow }} <span class="unit">枚</span>
|
||||
</div>
|
||||
<div class="kpi-sub-row sa-flex sa-row-between">
|
||||
<span>单价:<strong>{{ state.madow.current_rate }}</strong></span>
|
||||
<span>每万dmepa价值:<strong class="text-purple">¥{{ state.madow.rate_per_wan }}</strong></span>
|
||||
<span>每万枚价值:<strong class="text-purple">¥{{ state.madow.rate_per_wan }}</strong></span>
|
||||
</div>
|
||||
<div class="kpi-footer sa-flex sa-row-between">
|
||||
<span>累计结算订单数:<strong>{{ state.madow.history_order_n }} 单</strong></span>
|
||||
@@ -507,13 +507,13 @@
|
||||
</div>
|
||||
<div class="finance-sub-metric sa-flex sa-row-between">
|
||||
<span>① 全网持仓总量:</span>
|
||||
<strong class="text-purple">{{ state.madow.total_madow }} dmepa</strong>
|
||||
<strong class="text-purple">{{ state.madow.total_madow }} 枚</strong>
|
||||
</div>
|
||||
<div class="finance-sub-metric sa-flex sa-row-between">
|
||||
<span>② 当前汇率单价 (1 dmepa):</span>
|
||||
<div>
|
||||
<strong class="text-dark">¥{{ state.madow.current_rate }}</strong>
|
||||
<span style="font-size: 11px; color: var(--sa-subfont); margin-left: 4px;">(每万dmepa约 ¥{{ state.madow.rate_per_wan }})</span>
|
||||
<span style="font-size: 11px; color: var(--sa-subfont); margin-left: 4px;">(每万枚约 ¥{{ state.madow.rate_per_wan }})</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="finance-sub-metric sa-flex sa-row-between">
|
||||
@@ -551,7 +551,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="sa-flex sa-row-between text-muted" style="font-size: 12px;">
|
||||
<span>持仓:<strong class="text-purple">{{ state.partner.role_stats?.taster?.madow_total || '0.00000000' }}</strong> dmepa</span>
|
||||
<span>持仓:<strong class="text-purple">{{ state.partner.role_stats?.taster?.madow_total || '0.00000000' }}</strong> 枚</span>
|
||||
<span>收益:<strong class="text-warning">¥{{ state.partner.role_stats?.taster?.reward_amount || '0.00' }}</strong> ({{ state.partner.role_stats?.taster?.reward_count || 0 }}笔)</span>
|
||||
</div>
|
||||
<div class="sa-flex sa-row-between text-muted" style="font-size: 12px; margin-top: 6px;">
|
||||
@@ -575,7 +575,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="sa-flex sa-row-between text-muted" style="font-size: 12px;">
|
||||
<span>持仓:<strong class="text-purple">{{ state.partner.role_stats?.maker_total?.madow_total || '0.00000000' }}</strong> dmepa</span>
|
||||
<span>持仓:<strong class="text-purple">{{ state.partner.role_stats?.maker_total?.madow_total || '0.00000000' }}</strong> 枚</span>
|
||||
<span>收益:<strong class="text-warning">¥{{ state.partner.role_stats?.maker_total?.reward_amount || '0.00' }}</strong> ({{ state.partner.role_stats?.maker_total?.reward_count || 0 }}笔)</span>
|
||||
</div>
|
||||
<div class="sa-flex sa-row-between text-muted" style="font-size: 12px; margin-top: 6px;">
|
||||
@@ -658,10 +658,10 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="持仓总量 (dmepa)" min-width="160" align="right">
|
||||
<el-table-column label="持仓总量 (枚)" min-width="160" align="right">
|
||||
<template #default="scope">
|
||||
<span class="text-purple font-bold">{{ scope.row.madow_total }}</span>
|
||||
<span style="font-size: 11px; color: var(--sa-subfont); margin-left: 2px;">dmepa</span>
|
||||
<span style="font-size: 11px; color: var(--sa-subfont); margin-left: 2px;">枚</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -1005,7 +1005,7 @@
|
||||
</div>
|
||||
|
||||
<div class="sa-flex sa-row-between mt-3 pt-2" style="border-top: 1px dashed var(--sa-space); font-size: 12px; color: var(--sa-subfont);">
|
||||
<span>所选时段日结dmepa发放:<strong class="text-purple">{{ chart.data.periodMadow }} dmepa</strong></span>
|
||||
<span>所选时段日结dmepa发放:<strong class="text-purple">{{ chart.data.periodMadow }} 枚</strong></span>
|
||||
<el-button type="primary" link size="small" @click="onOpenDaily">日结池明细</el-button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1135,7 +1135,7 @@
|
||||
<div>累计合格单数:<strong>{{ ranking.recentReport.order_count_n }} 单</strong></div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<div>dmepa均分池:<strong class="text-purple">{{ ranking.recentReport.madow_pool }} dmepa</strong> ({{ ranking.recentReport.share_user_count }}人)</div>
|
||||
<div>dmepa均分池:<strong class="text-purple">{{ ranking.recentReport.madow_pool }} 枚</strong> ({{ ranking.recentReport.share_user_count }}人)</div>
|
||||
<div>酒道馆奖励池:<strong class="text-warning">¥{{ ranking.recentReport.venue_pool }}</strong> ({{ ranking.recentReport.venue_user_count }}人)</div>
|
||||
<div>区县代理奖励池:<strong class="text-warning">¥{{ ranking.recentReport.county_pool }}</strong> ({{ ranking.recentReport.county_user_count }}人)</div>
|
||||
</el-col>
|
||||
|
||||
@@ -1,184 +1,389 @@
|
||||
{include file="/shopro/common/script" /}
|
||||
|
||||
<style>
|
||||
.goods-form .el-header {
|
||||
--el-header-padding: 10px 20px 0;
|
||||
--el-header-height: fit-content;
|
||||
/* 页面与底层画布背景优化 */
|
||||
body {
|
||||
background-color: #f4f6fa !important;
|
||||
}
|
||||
#main, #content, .tab-content {
|
||||
background-color: #f4f6fa !important;
|
||||
}
|
||||
.content {
|
||||
padding: 16px 20px !important;
|
||||
background-color: #f4f6fa !important;
|
||||
}
|
||||
.is-dialog .content {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
/* 商品主表单卡片容器 */
|
||||
.goods-form {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
.goods-form .panel-block {
|
||||
height: calc(100vh - 32px);
|
||||
background: #ffffff;
|
||||
border-radius: 10px;
|
||||
border: 1px solid #e4e7ed;
|
||||
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.05);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
.is-dialog .goods-form .panel-block {
|
||||
height: 100vh !important;
|
||||
border-radius: 0 !important;
|
||||
border: none !important;
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
/* 顶部步骤导航 Tab 区域 */
|
||||
.goods-form .el-header {
|
||||
--el-header-padding: 0 32px;
|
||||
--el-header-height: 56px;
|
||||
height: 56px !important;
|
||||
background: #ffffff;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.goods-form .el-header .el-tabs {
|
||||
width: 100%;
|
||||
--el-tabs-header-height: 56px;
|
||||
}
|
||||
.goods-form .el-header .el-tabs__header {
|
||||
margin: 0;
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.goods-form .goods-type {
|
||||
width: 140px;
|
||||
.goods-form .el-header .el-tabs__nav-wrap::after {
|
||||
display: none;
|
||||
}
|
||||
.goods-form .el-header .el-tabs__item {
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
color: #606266;
|
||||
height: 56px;
|
||||
border: 1px solid rgb(230, 230, 230);
|
||||
border-radius: 4px;
|
||||
margin-left: 16px;
|
||||
line-height: 56px;
|
||||
padding: 0 22px;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.goods-form .el-header .el-tabs__item:hover {
|
||||
color: var(--el-color-primary, #722ed1);
|
||||
}
|
||||
.goods-form .el-header .el-tabs__item.is-active {
|
||||
color: var(--el-color-primary, #722ed1);
|
||||
font-weight: 600;
|
||||
}
|
||||
.goods-form .el-header .el-tabs__active-bar {
|
||||
height: 3px;
|
||||
border-radius: 3px 3px 0 0;
|
||||
background-color: var(--el-color-primary, #722ed1);
|
||||
}
|
||||
|
||||
/* 表单主工作区 */
|
||||
.goods-form .el-main {
|
||||
background: #ffffff;
|
||||
padding: 28px 36px 36px 36px !important;
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* 表单项目与标签排版 */
|
||||
.goods-form .el-form-item {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.goods-form .el-form-item__label {
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
font-size: 14px;
|
||||
line-height: 36px;
|
||||
padding-right: 16px;
|
||||
}
|
||||
.goods-form .el-form-item__content {
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
/* 优化输入组件尺寸与视觉比例 */
|
||||
.goods-form .sa-w-360 {
|
||||
width: 520px !important;
|
||||
max-width: 100% !important;
|
||||
}
|
||||
.goods-form .el-input__wrapper {
|
||||
border-radius: 6px;
|
||||
padding: 1px 12px;
|
||||
box-shadow: 0 0 0 1px #dcdfe6 inset;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.goods-form .el-input__wrapper:hover {
|
||||
box-shadow: 0 0 0 1px #c0c4cc inset;
|
||||
}
|
||||
.goods-form .el-input__wrapper.is-focus {
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, #722ed1) inset !important;
|
||||
}
|
||||
|
||||
/* 商品类型切换卡片优化 */
|
||||
.goods-form .goods-type-wrap {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
.goods-form .goods-type {
|
||||
width: 148px;
|
||||
height: 58px;
|
||||
border: 1.5px solid #e2e8f0;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: all 0.25s ease;
|
||||
background: #fafbfc;
|
||||
margin: 0 !important;
|
||||
object-fit: contain;
|
||||
}
|
||||
.goods-form .goods-type:hover {
|
||||
border-color: var(--el-color-primary, #722ed1);
|
||||
box-shadow: 0 4px 12px rgba(114, 46, 209, 0.12);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.goods-form .goods-type.is-active {
|
||||
border: 1px solid var(--el-color-primary);
|
||||
border-color: var(--el-color-primary, #722ed1);
|
||||
background: #fbf9ff;
|
||||
box-shadow: 0 0 0 1px var(--el-color-primary, #722ed1), 0 4px 12px rgba(114, 46, 209, 0.15);
|
||||
}
|
||||
|
||||
/* 提示信息美化(Info Badge) */
|
||||
.goods-form .warning {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-left: 14px;
|
||||
padding: 6px 14px;
|
||||
background: #f4f6fa;
|
||||
border: 1px solid #e5e8ef;
|
||||
border-radius: 6px;
|
||||
color: #606266;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* 分类标签选择器排版优化 */
|
||||
.goods-form .category-tag-wrap {
|
||||
flex: 1;
|
||||
min-height: 36px;
|
||||
padding-right: 28px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid #dcdfe6;
|
||||
background: #ffffff;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
transition: border-color 0.2s;
|
||||
}
|
||||
.goods-form .category-tag-wrap:hover {
|
||||
border-color: var(--el-color-primary, #722ed1);
|
||||
}
|
||||
.goods-form .category-tag-wrap .el-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
margin: 3px 4px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
.goods-form .category-tag-wrap-suffix {
|
||||
width: 20px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
right: 8px;
|
||||
top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: #909399;
|
||||
}
|
||||
.goods-form .category-tag-wrap-suffix .circle-close {
|
||||
display: none;
|
||||
}
|
||||
.goods-form .category-tag-wrap-suffix.is-active:hover .circle-close {
|
||||
display: block;
|
||||
}
|
||||
.goods-form .category-tag-wrap-suffix.is-active:hover .arrow-down {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 单选框排版 */
|
||||
.goods-form .el-radio-group {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 36px;
|
||||
}
|
||||
.goods-form .el-radio {
|
||||
margin-right: 24px;
|
||||
font-size: 14px;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
/* 规格板块美化 */
|
||||
.goods-form .title {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
padding-left: 16px;
|
||||
background: var(--sa-table-striped);
|
||||
background: #f4f6fa;
|
||||
border-radius: 6px;
|
||||
margin: 24px 0 16px;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
color: #434343;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap {
|
||||
width: 100%;
|
||||
border: 1px solid var(--sa-border);
|
||||
padding: 8px;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 8px;
|
||||
padding: 16px;
|
||||
box-sizing: border-box;
|
||||
background: #fafbfc;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku {
|
||||
width: 100%;
|
||||
min-height: 100px;
|
||||
min-height: 90px;
|
||||
background: #ffffff;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 12px;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku .sku-key {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
color: var(--sa-subtitle);
|
||||
height: 44px;
|
||||
color: #303133;
|
||||
padding: 0 16px;
|
||||
background: var(--sa-table-header-bg);
|
||||
background: #f4f6fa;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku .sku-key .sku-value-title {
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku .sku-key .sku-key-input {
|
||||
width: 120px;
|
||||
width: 140px;
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku .sku-key .sku-key-icon {
|
||||
color: var(--el-color-primary);
|
||||
color: var(--el-color-primary, #722ed1);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku .sku-value {
|
||||
padding: 12px 0 0 30px;
|
||||
padding: 14px 16px;
|
||||
font-size: 14px;
|
||||
color: var(--sa-subtitle);
|
||||
color: #606266;
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku .sku-value .sku-value-title {
|
||||
height: 32px;
|
||||
margin-right: 16px;
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku .sku-value .sku-value-box {
|
||||
position: relative;
|
||||
margin-right: 24px;
|
||||
margin-bottom: 16px;
|
||||
margin-right: 20px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku .sku-value .sku-value-box .sku-value-input {
|
||||
width: 104px;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku .sku-value .sku-value-box .sku-value-icon {
|
||||
position: absolute;
|
||||
right: -8px;
|
||||
top: -8px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
color: var(--el-color-primary);
|
||||
color: var(--el-color-primary, #722ed1);
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku .sku-value .sku-value-add {
|
||||
margin-right: 24px;
|
||||
margin-bottom: 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.goods-form .sku-wrap .sku-tools {
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
height: 48px;
|
||||
color: #434343;
|
||||
padding-left: 16px;
|
||||
background: var(--sa-table-header-bg);
|
||||
font-size: 12px;
|
||||
padding: 0 16px;
|
||||
background: #f4f6fa;
|
||||
border-radius: 6px;
|
||||
font-size: 13px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* 规格表格排版美化 */
|
||||
.goods-form .sku-table-wrap {
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
overflow-x: auto;
|
||||
margin-top: 16px;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
|
||||
.goods-form .sku-table-wrap .sku-table {
|
||||
width: 100%;
|
||||
border: 1px solid var(--sa-border);
|
||||
border-collapse: collapse;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.goods-form .sku-table-wrap .sku-table tbody {
|
||||
font-size: 12px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.goods-form .sku-table-wrap .sku-table th {
|
||||
font-size: 12px;
|
||||
color: var(--subtitle);
|
||||
height: 32px;
|
||||
line-height: 1;
|
||||
padding-left: 12px;
|
||||
box-sizing: border-box;
|
||||
font-size: 13px;
|
||||
color: #303133;
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
padding: 0 12px;
|
||||
background: #f8f9fc;
|
||||
font-weight: 600;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
border-right: 1px solid #f0f2f5;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.goods-form .sku-table-wrap .sku-table th .sku-table-header-title {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.goods-form .sku-table-wrap .sku-table th .th-title {
|
||||
font-size: 12px;
|
||||
color: var(--subtitle);
|
||||
font-weight: bold;
|
||||
font-size: 13px;
|
||||
color: #303133;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.goods-form .sku-table-wrap .sku-table td {
|
||||
min-width: 120px;
|
||||
padding: 0 10px;
|
||||
height: 40px;
|
||||
padding: 6px 12px;
|
||||
height: 48px;
|
||||
box-sizing: border-box;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
border-right: 1px solid #f0f2f5;
|
||||
}
|
||||
.goods-form .sku-table-wrap .sku-table tbody tr:hover {
|
||||
background-color: #f7f9fc;
|
||||
}
|
||||
|
||||
.goods-form .sku-table-wrap .sku-table td.image {
|
||||
min-width: 48px;
|
||||
}
|
||||
|
||||
.goods-form .sku-table-wrap .sku-table td.stock {
|
||||
min-width: 138px;
|
||||
}
|
||||
|
||||
.goods-form .sku-table-wrap .sku-table td.stock_warning {
|
||||
min-width: 168px;
|
||||
}
|
||||
|
||||
.goods-form .sku-table-wrap .sku-table td.stock_warning .sku-stock-switch {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
.goods-form .sku-table-wrap .sku-table td.sn {
|
||||
min-width: 116px;
|
||||
}
|
||||
|
||||
.goods-form .batch-icon {
|
||||
font-size: 12px;
|
||||
color: var(--el-color-primary);
|
||||
font-size: 13px;
|
||||
color: var(--el-color-primary, #722ed1);
|
||||
margin-left: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
@@ -188,7 +393,6 @@
|
||||
width: 220px;
|
||||
height: 98px;
|
||||
}
|
||||
|
||||
.stock-show-type .exact,
|
||||
.stock-show-type .sketchy {
|
||||
width: 220px;
|
||||
@@ -199,62 +403,68 @@
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.goods-form .category-tag-wrap {
|
||||
flex: 1;
|
||||
min-height: 32px;
|
||||
padding-right: 12px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid var(--sa-border);
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.goods-form .category-tag-wrap .el-tag {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
max-width: 100%;
|
||||
margin: 2px 0 2px 6px;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.goods-form .category-tag-wrap-suffix {
|
||||
width: 12px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
right: 6px;
|
||||
top: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.goods-form .category-tag-wrap-suffix .circle-close {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.goods-form .category-tag-wrap-suffix.is-active:hover .circle-close {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.goods-form .category-tag-wrap-suffix.is-active:hover .arrow-down {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.category-tooltip {}
|
||||
|
||||
.goods-form .is-error {
|
||||
color: #FF4D4F;
|
||||
}
|
||||
.goods-form .el-affix, .goods-form .el-tabs{
|
||||
.goods-form .el-affix, .goods-form .el-tabs {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.editor-form-item .el-form-item__content {
|
||||
margin-left: 16px !important;
|
||||
}
|
||||
|
||||
.editor-wrap {
|
||||
width: 100%;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
background: #ffffff;
|
||||
}
|
||||
.editor-wrap .note-editor {
|
||||
border: none !important;
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
.editor-wrap .note-editing-area {
|
||||
background: #ffffff;
|
||||
}
|
||||
.editor-wrap .note-editable,
|
||||
.editor-wrap .note-editor.note-frame .note-editing-area .note-editable,
|
||||
.note-editable {
|
||||
height: 300px !important;
|
||||
min-height: 600px !important;
|
||||
height: 620px !important;
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
color: #333333;
|
||||
padding: 20px 24px !important;
|
||||
}
|
||||
|
||||
/* 底部操作栏与按钮美化 */
|
||||
.goods-form .sa-footer--submit {
|
||||
background: #ffffff;
|
||||
border-top: 1px solid #ebeef5;
|
||||
padding: 12px 36px !important;
|
||||
height: 64px !important;
|
||||
box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.03);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
z-index: 10;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.goods-form .sa-footer--submit .el-button {
|
||||
min-width: 96px;
|
||||
height: 38px;
|
||||
padding: 0 20px;
|
||||
font-size: 14px;
|
||||
border-radius: 6px;
|
||||
font-weight: 500;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
.goods-form .sa-footer--submit .el-button--primary {
|
||||
box-shadow: 0 2px 6px rgba(114, 46, 209, 0.25);
|
||||
}
|
||||
.goods-form .sa-footer--submit .el-button--primary:hover {
|
||||
box-shadow: 0 4px 12px rgba(114, 46, 209, 0.35);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -318,13 +528,15 @@
|
||||
<el-scrollbar height="100%">
|
||||
<el-form :model="form.model" :rules="form.rules" ref="formRef0" label-width="100px">
|
||||
<div v-show="state.activeStep==0">
|
||||
<div class="sa-flex mb-4">
|
||||
<img v-if="!(state.type=='edit' && form.model.type=='virtual')" class="goods-type" :class="form.model.type=='normal'?'is-active':''"
|
||||
src="/assets/addons/shopro/img/goods/normal.png" @click="onChangeGoodsType('normal')" />
|
||||
<img v-if="!(state.type=='edit' && form.model.type=='normal')" class="goods-type" :class="form.model.type=='virtual'?'is-active':''"
|
||||
src="/assets/addons/shopro/img/goods/virtual.png"
|
||||
@click="onChangeGoodsType('virtual')" />
|
||||
</div>
|
||||
<el-form-item label="商品类型">
|
||||
<div class="goods-type-wrap">
|
||||
<img v-if="!(state.type=='edit' && form.model.type=='virtual')" class="goods-type" :class="form.model.type=='normal'?'is-active':''"
|
||||
src="/assets/addons/shopro/img/goods/normal.png" @click="onChangeGoodsType('normal')" />
|
||||
<img v-if="!(state.type=='edit' && form.model.type=='normal')" class="goods-type" :class="form.model.type=='virtual'?'is-active':''"
|
||||
src="/assets/addons/shopro/img/goods/virtual.png"
|
||||
@click="onChangeGoodsType('virtual')" />
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品标题" prop="title">
|
||||
<el-input class="sa-w-360" v-model="form.model.title" placeholder="请输入商品标题"></el-input>
|
||||
</el-form-item>
|
||||
@@ -338,11 +550,11 @@
|
||||
<el-form-item label="轮播图" prop="images">
|
||||
<sa-uploader v-model="form.model.images" :multiple="true"></sa-uploader>
|
||||
<div class="warning">
|
||||
作用于商品详情顶部轮播显示,<br />轮播图可以拖拽调整顺序
|
||||
作用于商品详情顶部轮播显示,轮播图可以拖拽调整顺序
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类">
|
||||
<div class="sa-w-360">
|
||||
<div class="sa-w-360 sa-flex" style="align-items: center;">
|
||||
<el-popover popper-class="category-tooltip sa-popper" effect="light"
|
||||
placement="top-start" trigger="click">
|
||||
<el-tabs v-model="tempCategory.tabActive">
|
||||
@@ -361,6 +573,7 @@
|
||||
</el-tabs>
|
||||
<template #reference>
|
||||
<div class="category-tag-wrap">
|
||||
<span v-if="!Object.keys(tempCategory.label || {}).length" style="color: #a8abb2; font-size: 13px; padding-left: 8px;">请选择商品分类</span>
|
||||
<el-tag v-for="(value, key) in tempCategory.label" :key="key" type="info"
|
||||
closable @close.stop="onDeleteCategoryIds(key)">{{ value }}</el-tag>
|
||||
<div class="category-tag-wrap-suffix"
|
||||
@@ -376,7 +589,7 @@
|
||||
</template>
|
||||
</el-popover>
|
||||
{if $auth->check('shopro/category/add')}
|
||||
<el-button class="label-tip" type="primary" link @click="onAddCategory">添加商品分类</el-button>
|
||||
<el-button class="label-tip ml-2" type="primary" link @click="onAddCategory">添加商品分类</el-button>
|
||||
{/if}
|
||||
</div>
|
||||
</el-form-item>
|
||||
@@ -396,7 +609,6 @@
|
||||
<el-input class="sa-w-360" v-model="form.model.limit_num" placeholder="请输入限购数量" :min="0"
|
||||
type="number">
|
||||
</el-input>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品状态">
|
||||
<el-radio-group v-model="form.model.status">
|
||||
@@ -928,6 +1140,7 @@
|
||||
<el-footer class="sa-footer--submit sa-flex sa-row-right">
|
||||
<!-- <el-button plain v-if="state.activeStep > 0" @click="onBack">上一步</el-button>
|
||||
<el-button v-if="state.activeStep < 4" type="primary" @click="onNext">下一步</el-button> -->
|
||||
<el-button @click="onCancel" style="margin-right: 12px;">取消</el-button>
|
||||
<el-button type="primary" @click="onConfirm">确定</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
|
||||
@@ -885,15 +885,18 @@
|
||||
<el-tag v-else size="small" type="info" style="margin-left: 10px;">暂无分成记录</el-tag>
|
||||
</div>
|
||||
<div v-if="state.detail.partner_split" style="font-size:13px;font-weight:400;color:var(--sa-subfont)">
|
||||
<span v-if="Number(state.detail.partner_split.total_cash) > 0" style="margin-right: 14px;">
|
||||
本单现金合计 <strong style="color:#ff4d4f;font-size:14px">¥{{ state.detail.partner_split.total_cash }}</strong>
|
||||
<span v-if="Number(state.detail.partner_split.total_instant_cash || state.detail.partner_split.total_cash) > 0" style="margin-right: 14px;">
|
||||
即时现金分成 <strong style="color:#ff4d4f;font-size:14px">¥{{ state.detail.partner_split.total_instant_cash || state.detail.partner_split.total_cash }}</strong>
|
||||
<el-tag size="small" type="success" style="margin-left: 6px;">直入商城余额</el-tag>
|
||||
</span>
|
||||
<span v-if="Number(state.detail.partner_split.total_share_cash) > 0" style="margin-right: 14px;">
|
||||
均分奖池现金贡献 <strong style="color:#409eff;font-size:14px">¥{{ state.detail.partner_split.total_share_cash }}</strong>
|
||||
</span>
|
||||
<span v-if="Number(state.detail.partner_split.total_voucher) > 0" style="margin-right: 14px;">
|
||||
兑换券释放额度 <strong style="color:#e6a23c;font-size:14px">{{ state.detail.partner_split.total_voucher }} 个</strong>
|
||||
</span>
|
||||
<span v-if="state.detail.partner_split.settle_date">
|
||||
均分日 {{ state.detail.partner_split.settle_date }}
|
||||
结算日期 {{ state.detail.partner_split.settle_date }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -913,7 +916,7 @@
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.display === 'share'">
|
||||
<div style="font-weight: 500;">参与用户 {{ scope.row.user_count }} 人</div>
|
||||
<div style="font-size:12px;color:var(--sa-subfont)">{{ scope.row.tip || '均分不列出名单' }}</div>
|
||||
<div style="font-size:12px;color:var(--sa-subfont)">{{ scope.row.tip || '日结均分' }}</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<sa-user-profile
|
||||
@@ -925,18 +928,18 @@
|
||||
</template>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="分成金额 / 数量" min-width="160">
|
||||
<el-table-column label="分成金额 / 数量" min-width="170">
|
||||
<template #default="scope">
|
||||
<template v-if="scope.row.display === 'share'">
|
||||
<div style="font-weight: 600; color: var(--el-color-primary);">
|
||||
{{ scope.row.amount_text || (scope.row.unit === 'dmepa' ? (scope.row.each_madow + ' dmepa/人') : ('¥' + scope.row.each_amount + '/人')) }}
|
||||
{{ scope.row.amount_text || (['dmepa', '枚'].includes(scope.row.unit) ? (scope.row.each_madow + ' 枚/人') : ('¥' + scope.row.each_amount + '/人')) }}
|
||||
</div>
|
||||
<div style="font-size:12px;color:var(--sa-subfont)">
|
||||
<template v-if="scope.row.unit === 'dmepa'">
|
||||
奖池合计: {{ scope.row.total_madow }} dmepa
|
||||
<template v-if="scope.row.unit === 'dmepa' || scope.row.unit === '枚'">
|
||||
本单GMV贡献: {{ scope.row.total_amount }}
|
||||
</template>
|
||||
<template v-else>
|
||||
奖池合计: ¥{{ scope.row.total_amount }}
|
||||
本单奖池贡献: ¥{{ scope.row.total_amount }}
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
@@ -948,7 +951,7 @@
|
||||
¥{{ scope.row.amount }}
|
||||
</div>
|
||||
<div v-else-if="Number(scope.row.madow) > 0" style="font-weight: 600; color: #67c23a;">
|
||||
{{ scope.row.madow }} dmepa
|
||||
{{ scope.row.madow }} 枚
|
||||
</div>
|
||||
<div v-else style="color: var(--sa-subfont);">
|
||||
¥0.00
|
||||
|
||||
@@ -136,9 +136,9 @@
|
||||
<div style="background:#f4f4f5;padding:12px;border-radius:6px;">
|
||||
<div style="font-weight:600;font-size:13px;margin-bottom:6px;">dmepa贡献池 (1:1 GMV)</div>
|
||||
<div style="font-size:12px;color:#606266;line-height:1.8;">
|
||||
dmepa总池:<b>{{ previewDialog.result.madow?.pool }}</b> dmepa<br>
|
||||
dmepa总池:<b>{{ previewDialog.result.madow?.pool }}</b> 枚<br>
|
||||
合格人数:<b>{{ previewDialog.result.madow?.user_count }}</b> 人<br>
|
||||
人均dmepa:<b>{{ previewDialog.result.madow?.each }}</b><br>
|
||||
人均dmepa:<b>{{ previewDialog.result.madow?.each }}</b> 枚<br>
|
||||
即时汇率:<b>{{ previewDialog.result.rate }}</b>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="dmepa" min-width="110">
|
||||
<el-table-column label="dmepa (枚)" min-width="110">
|
||||
<template #default="scope"> {{ scope.row.madow }} </template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="base_amount" label="基数" min-width="80"></el-table-column>
|
||||
@@ -181,7 +181,7 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="madow" label="dmepa" width="100"></el-table-column>
|
||||
<el-table-column prop="madow" label="dmepa (枚)" width="100"></el-table-column>
|
||||
<el-table-column prop="status_text" label="状态" width="80">
|
||||
<template #default="scope">
|
||||
<span :class="scope.row.status == 1 ? 'sa-color--success' : (scope.row.status == -2 ? 'sa-color--danger' : 'sa-color--info')">
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item command="money">充值余额 (元)</el-dropdown-item>
|
||||
<el-dropdown-item command="madow">充值dmepa (颗)</el-dropdown-item>
|
||||
<el-dropdown-item command="madow">充值dmepa (枚)</el-dropdown-item>
|
||||
<el-dropdown-item command="score">充值积分 (分)</el-dropdown-item>
|
||||
<el-dropdown-item command="voucher">充值兑换券 (个)</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
@@ -444,7 +444,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
<div class="asset-card-num" style="color: #67c23a;">
|
||||
{{ state.detail.madow || 0 }} <span style="font-size: 13px;">颗</span>
|
||||
{{ state.detail.madow || 0 }} <span style="font-size: 13px;">枚</span>
|
||||
</div>
|
||||
<div class="asset-card-desc">
|
||||
当前估值: ¥{{ state.detail.madow_value || '0.00' }}
|
||||
@@ -748,7 +748,7 @@
|
||||
<div class="mb-3">
|
||||
<span style="font-weight: 600;">结算金额/dmepa:</span>
|
||||
<b>¥{{ formulaDialog.row.amount }}</b>
|
||||
<span v-if="formulaDialog.row.madow > 0" class="ml-2">({{ formulaDialog.row.madow }} dmepa)</span>
|
||||
<span v-if="formulaDialog.row.madow > 0" class="ml-2">({{ formulaDialog.row.madow }} 枚)</span>
|
||||
</div>
|
||||
<div class="mb-3" v-if="formulaDialog.row.ext?.skip_reason">
|
||||
<span style="font-weight: 600; color: #e6a23c;">跳过/未发放原因:</span>
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
|
||||
<el-table-column label="dmepa与补贴券" min-width="170">
|
||||
<template #default="scope">
|
||||
<div><span class="asset-sub">分红dmepa:</span> {{ scope.row.madow || 0 }} 颗</div>
|
||||
<div><span class="asset-sub">分红dmepa:</span> {{ scope.row.madow || 0 }} 枚</div>
|
||||
<div class="asset-sub">dmepa估值: ¥{{ scope.row.madow_value || '0.00' }}</div>
|
||||
<div class="asset-sub">可用券: {{ scope.row.voucher_available || '0.00' }} 个</div>
|
||||
</template>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<el-col :span="6">
|
||||
<div style="background: #ffffff; padding: 8px 10px; border-radius: 6px; border: 1px solid #edf2f7; text-align: center;">
|
||||
<div style="font-size: 11px; color: #64748b;">分红dmepa</div>
|
||||
<div style="font-size: 13px; font-weight: 600; color: #16a34a; margin-top: 2px;">{{ state.user.madow || '0' }} <span style="font-size: 10px;">颗</span></div>
|
||||
<div style="font-size: 13px; font-weight: 600; color: #16a34a; margin-top: 2px;">{{ state.user.madow || '0' }} <span style="font-size: 10px;">枚</span></div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
@@ -52,7 +52,7 @@
|
||||
<el-form-item label="充值资产类型" prop="type">
|
||||
<el-radio-group v-model="form.model.type" @change="onTypeChange">
|
||||
<el-radio-button label="money">余额 (元)</el-radio-button>
|
||||
<el-radio-button label="madow">dmepa (颗)</el-radio-button>
|
||||
<el-radio-button label="madow">dmepa (枚)</el-radio-button>
|
||||
<el-radio-button label="score">积分 (分)</el-radio-button>
|
||||
<el-radio-button label="voucher">兑换券 (个)</el-radio-button>
|
||||
</el-radio-group>
|
||||
@@ -61,7 +61,7 @@
|
||||
<el-form-item label="当前可用持有">
|
||||
<div style="font-size: 15px; font-weight: 600; color: #334155;">
|
||||
<span v-if="form.model.type === 'money'">¥{{ currentBalance }}</span>
|
||||
<span v-else-if="form.model.type === 'madow'">{{ currentBalance }} 颗 (实时估值 ¥{{ state.user ? state.user.madow_value : '0.00' }})</span>
|
||||
<span v-else-if="form.model.type === 'madow'">{{ currentBalance }} 枚 (实时估值 ¥{{ state.user ? state.user.madow_value : '0.00' }})</span>
|
||||
<span v-else-if="form.model.type === 'score'">{{ currentBalance }} 积分</span>
|
||||
<span v-else-if="form.model.type === 'voucher'">{{ currentBalance }} 个 (计划总额 {{ state.user ? state.user.voucher_total : '0.00' }} 个)</span>
|
||||
</div>
|
||||
|
||||
@@ -60,9 +60,19 @@
|
||||
实际到账: {{ scope.row.paid_fee }}元
|
||||
</div>
|
||||
</template>
|
||||
<template v-else-if="scope.row.is_money_withdraw">
|
||||
<div class="sa-flex" style="margin-bottom: 2px;">
|
||||
<el-tag size="small" type="success" effect="plain" style="border-radius: 4px; height: 20px; line-height: 20px; padding: 0 6px; font-weight: 500;">
|
||||
商城余额
|
||||
</el-tag>
|
||||
</div>
|
||||
<div class="sa-table-line-1" style="font-weight: 500;">
|
||||
{{ scope.row.amount || '-' }}/{{ Number(scope.row.paid_fee) > 0 ? scope.row.paid_fee : (scope.row.real_amount || scope.row.amount) }}元
|
||||
</div>
|
||||
</template>
|
||||
<template v-else>
|
||||
<div class="sa-table-line-1">
|
||||
{{ scope.row.amount || '-' }}/{{ scope.row.paid_fee }}元
|
||||
{{ scope.row.amount || '-' }}/{{ Number(scope.row.paid_fee) > 0 ? scope.row.paid_fee : (scope.row.real_amount || scope.row.amount) }}元
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
在新工单中引用
屏蔽一个用户