feat(assoc): v4.0.1 合伙人关联码、分佣账单与 H5 用户管理
订单佣金只认关联用户;合伙人备注写入独立表;H5 增加用户管理与首页统计。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -42,6 +42,7 @@ function initialDraft(): ProxyOrderDraft {
|
||||
promoCodeId: '',
|
||||
deliveryMode: 'ADDRESS',
|
||||
autoReceive: false,
|
||||
assocEnabled: true,
|
||||
}
|
||||
);
|
||||
}
|
||||
@@ -63,6 +64,7 @@ export default function ProxyOrderPage() {
|
||||
const [promoCodeId, setPromoCodeId] = useState(draft0.promoCodeId);
|
||||
const [deliveryMode, setDeliveryMode] = useState<PartnerProxyDeliveryMode>(draft0.deliveryMode);
|
||||
const [autoReceive, setAutoReceive] = useState(draft0.autoReceive);
|
||||
const [assocEnabled, setAssocEnabled] = useState(draft0.assocEnabled !== false);
|
||||
const [preview, setPreview] = useState<PartnerProxyOrderPreviewResult | null>(null);
|
||||
const [previewLoading, setPreviewLoading] = useState(false);
|
||||
const [submitting, setSubmitting] = useState(false);
|
||||
@@ -108,6 +110,7 @@ export default function ProxyOrderPage() {
|
||||
promoCodeId,
|
||||
deliveryMode,
|
||||
autoReceive,
|
||||
assocEnabled,
|
||||
...overrides,
|
||||
});
|
||||
}
|
||||
@@ -154,6 +157,7 @@ export default function ProxyOrderPage() {
|
||||
promoCodeId,
|
||||
deliveryMode,
|
||||
autoReceive,
|
||||
assocEnabled,
|
||||
]);
|
||||
|
||||
const selectedProduct = options?.products.find((p) => p.id === productId);
|
||||
@@ -390,6 +394,9 @@ export default function ProxyOrderPage() {
|
||||
quantity,
|
||||
promoCodeId: promoCodeId || undefined,
|
||||
skuId: skuId || undefined,
|
||||
assocPartnerAccountId: assocEnabled
|
||||
? options?.partners?.[0]?.id || undefined
|
||||
: undefined,
|
||||
};
|
||||
|
||||
setSubmitting(true);
|
||||
@@ -595,6 +602,17 @@ export default function ProxyOrderPage() {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="partner-form-section">
|
||||
<label className="partner-checkbox-row">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={assocEnabled}
|
||||
onChange={(e) => setAssocEnabled(e.target.checked)}
|
||||
/>
|
||||
<span>关联合伙人(本单计订单佣金;取消则本单不计)</span>
|
||||
</label>
|
||||
</section>
|
||||
|
||||
{(options?.promoCodes.length ?? 0) > 0 && (
|
||||
<section className="partner-form-section">
|
||||
<label className="partner-form-label">绑定推广码(选填)</label>
|
||||
|
||||
Reference in New Issue
Block a user