perf(fulfillment): 优化本地能力选号查询与索引
This commit is contained in:
@@ -77,7 +77,12 @@ export default function DouyuCollabShopModal({
|
||||
|
||||
const patch = async (
|
||||
shop: DouyuCollabShop,
|
||||
payload: { sort_order?: number; is_active?: boolean; remark?: string },
|
||||
payload: {
|
||||
aliases?: string[];
|
||||
sort_order?: number;
|
||||
is_active?: boolean;
|
||||
remark?: string;
|
||||
},
|
||||
) => {
|
||||
setBusy(true);
|
||||
try {
|
||||
@@ -150,6 +155,28 @@ export default function DouyuCollabShopModal({
|
||||
</Space>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '完整名称 / 别名(手工映射)',
|
||||
dataIndex: 'aliases',
|
||||
width: 300,
|
||||
render: (value: string[] | undefined, row) => (
|
||||
<Input
|
||||
size="small"
|
||||
defaultValue={(value || []).join(',')}
|
||||
disabled={!canEdit || busy}
|
||||
placeholder="多个名称用逗号分隔"
|
||||
onBlur={(event) => {
|
||||
const aliases = event.target.value
|
||||
.split(/[,,\n]/)
|
||||
.map((item) => item.trim())
|
||||
.filter(Boolean);
|
||||
if (aliases.join('\u0000') !== (value || []).join('\u0000')) {
|
||||
void patch(row, { aliases });
|
||||
}
|
||||
}}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
title: '排序',
|
||||
dataIndex: 'sort_order',
|
||||
@@ -225,12 +252,13 @@ export default function DouyuCollabShopModal({
|
||||
open={open}
|
||||
onCancel={onClose}
|
||||
footer={<Button onClick={onClose}>关闭</Button>}
|
||||
width={820}
|
||||
width={1080}
|
||||
destroyOnHidden
|
||||
>
|
||||
<Space direction="vertical" size={10} style={{ width: '100%' }}>
|
||||
<Text type="secondary">
|
||||
先在这里定义店铺,新建协作单时可以直接点选。停用只是不再出现在新建选择里,历史订单不受影响;
|
||||
完整名称/别名只按这里手工维护的映射归并平台同步店铺;筛选仍使用规范简称。
|
||||
重命名会自动同步已有订单,已有订单仍在使用的店铺不能删除。
|
||||
</Text>
|
||||
{canEdit && (
|
||||
|
||||
Reference in New Issue
Block a user