feat(subscriptions): 订阅详情支持一键创建续费订单
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<select name="merchant_id" required>
|
||||
<option value="">请选择站点</option>
|
||||
@foreach(($merchants ?? []) as $m)
|
||||
<option value="{{ $m->id }}" @selected((string)old('merchant_id') === (string)$m->id)>{{ $m->name }}</option>
|
||||
<option value="{{ $m->id }}" @selected((string)old('merchant_id', $defaults['merchant_id'] ?? '') === (string)$m->id)>{{ $m->name }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
@@ -27,7 +27,7 @@
|
||||
<select name="plan_id" required>
|
||||
<option value="">请选择套餐</option>
|
||||
@foreach(($plans ?? []) as $p)
|
||||
<option value="{{ $p->id }}" @selected((string)old('plan_id') === (string)$p->id)>
|
||||
<option value="{{ $p->id }}" @selected((string)old('plan_id', $defaults['plan_id'] ?? '') === (string)$p->id)>
|
||||
{{ $p->name }}({{ $billingCycleLabels[$p->billing_cycle] ?? $p->billing_cycle }} / ¥{{ number_format((float)$p->price, 2) }})
|
||||
</option>
|
||||
@endforeach
|
||||
@@ -39,31 +39,31 @@
|
||||
<span>订单类型</span>
|
||||
<select name="order_type" required>
|
||||
@foreach(($orderTypeLabels ?? []) as $value => $label)
|
||||
<option value="{{ $value }}" @selected(old('order_type', 'new_purchase') === $value)>{{ $label }}</option>
|
||||
<option value="{{ $value }}" @selected(old('order_type', $defaults['order_type'] ?? 'new_purchase') === $value)>{{ $label }}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span>购买数量(周期数)</span>
|
||||
<input type="number" min="1" max="120" name="quantity" value="{{ old('quantity', 1) }}" required>
|
||||
<input type="number" min="1" max="120" name="quantity" value="{{ old('quantity', $defaults['quantity'] ?? 1) }}" required>
|
||||
<small class="muted">例如:月付套餐 quantity=3 表示购买 3 个月;年付套餐 quantity=2 表示购买 2 年。</small>
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span>优惠金额(可选)</span>
|
||||
<input type="number" step="0.01" min="0" name="discount_amount" value="{{ old('discount_amount', 0) }}">
|
||||
<input type="number" step="0.01" min="0" name="discount_amount" value="{{ old('discount_amount', $defaults['discount_amount'] ?? 0) }}">
|
||||
</label>
|
||||
|
||||
<label>
|
||||
<span>支付渠道(可选)</span>
|
||||
<input name="payment_channel" value="{{ old('payment_channel') }}" placeholder="例如:offline / wechat / alipay">
|
||||
<input name="payment_channel" value="{{ old('payment_channel', $defaults['payment_channel'] ?? '') }}" placeholder="例如:offline / wechat / alipay">
|
||||
<small class="muted">当前阶段仅用于记录口径,支付回执/对账后续再补。</small>
|
||||
</label>
|
||||
|
||||
<label class="full">
|
||||
<span>备注(可选)</span>
|
||||
<textarea name="remark" rows="3" placeholder="可记录线下收款说明、对账备注等">{{ old('remark') }}</textarea>
|
||||
<textarea name="remark" rows="3" placeholder="可记录线下收款说明、对账备注等">{{ old('remark', $defaults['remark'] ?? '') }}</textarea>
|
||||
</label>
|
||||
|
||||
<div class="form-actions">
|
||||
|
||||
@@ -73,6 +73,8 @@
|
||||
<a href="/admin/platform-orders?site_subscription_id={{ $subscription->id }}" class="muted">查看关联平台订单(按订阅ID精确过滤)</a>
|
||||
<span class="muted">|</span>
|
||||
<a href="/admin/platform-orders?site_subscription_id={{ $subscription->id }}&syncable_only=1" class="muted">查看可同步订单</a>
|
||||
<span class="muted">|</span>
|
||||
<a href="/admin/platform-orders/create?merchant_id={{ $subscription->merchant_id }}&plan_id={{ $subscription->plan_id }}&order_type=renewal&quantity=1&remark={{ urlencode('来自订阅:' . $subscription->subscription_no) }}" class="muted">创建续费订单</a>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user