mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-24 19:49:19 +08:00
refactor: 拼多多发布编辑页按基础信息/规格库存/服务承诺分区
This commit is contained in:
+316
-278
@@ -450,292 +450,303 @@ function onSkuTableWrapRef(el: HTMLElement | null) {
|
|||||||
</Teleport>
|
</Teleport>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="min-h-0 flex-1 space-y-4 overflow-y-auto overscroll-y-contain px-4 py-3"
|
class="publish-editor-sections min-h-0 flex-1 overflow-y-auto overscroll-y-contain px-4 py-4"
|
||||||
>
|
>
|
||||||
<div
|
<Card size="small" class="publish-editor-section" title="基础信息">
|
||||||
data-agent-field="goodsName"
|
<div
|
||||||
:class="{ 'agent-typing-field': agentTypingField === 'goodsName' }"
|
data-agent-field="goodsName"
|
||||||
>
|
:class="{ 'agent-typing-field': agentTypingField === 'goodsName' }"
|
||||||
<Form.Item label="商品标题" required>
|
>
|
||||||
<Input v-model:value="form.goodsName" :maxlength="60" show-count />
|
<Form.Item label="商品标题" required>
|
||||||
</Form.Item>
|
<Input v-model:value="form.goodsName" :maxlength="60" show-count />
|
||||||
</div>
|
</Form.Item>
|
||||||
<div
|
</div>
|
||||||
data-agent-field="goodsDesc"
|
<div
|
||||||
:class="{ 'agent-typing-field': agentTypingField === 'goodsDesc' }"
|
data-agent-field="goodsDesc"
|
||||||
>
|
:class="{ 'agent-typing-field': agentTypingField === 'goodsDesc' }"
|
||||||
<Form.Item label="商品描述">
|
>
|
||||||
<Input.TextArea
|
<Form.Item label="商品描述">
|
||||||
v-model:value="form.goodsDesc"
|
<Input.TextArea
|
||||||
:rows="2"
|
v-model:value="form.goodsDesc"
|
||||||
placeholder="可选,20-500 字"
|
:rows="2"
|
||||||
/>
|
placeholder="可选,20-500 字"
|
||||||
</Form.Item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Form.Item label="运费模板" required>
|
|
||||||
<Select
|
|
||||||
v-model:value="form.costTemplateId"
|
|
||||||
class="w-full"
|
|
||||||
:options="logisticsOptions"
|
|
||||||
placeholder="选择运费模板"
|
|
||||||
show-search
|
|
||||||
option-filter-prop="label"
|
|
||||||
:disabled="!form.pddShopId"
|
|
||||||
allow-clear
|
|
||||||
@change="(v: any) => loadCostTemplateDetail(v)"
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
|
||||||
|
|
||||||
<Card
|
|
||||||
v-if="form.costTemplateId || costTemplateDetailLoading"
|
|
||||||
size="small"
|
|
||||||
class="mb-3"
|
|
||||||
title="运费模板详情"
|
|
||||||
>
|
|
||||||
<Spin :spinning="costTemplateDetailLoading">
|
|
||||||
<template v-if="costTemplateDetail">
|
|
||||||
<Descriptions bordered size="small" :column="2" class="mb-3">
|
|
||||||
<Descriptions.Item label="模板名称">
|
|
||||||
{{ costTemplateDetail.templateName || '-' }}
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item label="计费方式">
|
|
||||||
{{ costTemplateDetail.costTypeLabel || '-' }}
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item label="增值服务">
|
|
||||||
{{ costTemplateDetail.additionalServiceLabel || '-' }}
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item label="其它">
|
|
||||||
<Space :size="4" wrap>
|
|
||||||
<Tag v-if="costTemplateDetail.sfFree" color="success">
|
|
||||||
顺丰包邮
|
|
||||||
</Tag>
|
|
||||||
<Tag
|
|
||||||
v-if="costTemplateDetail.freeDeliverHouse"
|
|
||||||
color="processing"
|
|
||||||
>
|
|
||||||
包邮区送货上门
|
|
||||||
</Tag>
|
|
||||||
<span
|
|
||||||
v-if="
|
|
||||||
!costTemplateDetail.sfFree &&
|
|
||||||
!costTemplateDetail.freeDeliverHouse
|
|
||||||
"
|
|
||||||
>
|
|
||||||
-
|
|
||||||
</span>
|
|
||||||
</Space>
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item label="包邮省份" :span="2">
|
|
||||||
<div
|
|
||||||
v-if="costTemplateDetail.freeProvinces?.length"
|
|
||||||
class="free-province-tags"
|
|
||||||
>
|
|
||||||
<Tag
|
|
||||||
v-for="(p, idx) in costTemplateDetail.freeProvinces"
|
|
||||||
:key="`${p.provinceId}-${idx}`"
|
|
||||||
>
|
|
||||||
{{ p.province || p.provinceId }}
|
|
||||||
</Tag>
|
|
||||||
</div>
|
|
||||||
<span v-else>暂无</span>
|
|
||||||
</Descriptions.Item>
|
|
||||||
<Descriptions.Item
|
|
||||||
v-if="costTemplateDetail.freeDeliverHouseAreas?.length"
|
|
||||||
label="送货上门地区"
|
|
||||||
:span="2"
|
|
||||||
>
|
|
||||||
{{
|
|
||||||
costTemplateDetail.freeDeliverHouseAreas
|
|
||||||
.map((a) => a.areaText)
|
|
||||||
.filter(Boolean)
|
|
||||||
.join('、') || '-'
|
|
||||||
}}
|
|
||||||
</Descriptions.Item>
|
|
||||||
</Descriptions>
|
|
||||||
|
|
||||||
<Table
|
|
||||||
v-if="costTemplateDetail.paidRegions?.length"
|
|
||||||
size="small"
|
|
||||||
:pagination="false"
|
|
||||||
:data-source="costTemplateDetail.paidRegions"
|
|
||||||
:row-key="(_: any, i?: number) => `paid-${i ?? 0}`"
|
|
||||||
:columns="[
|
|
||||||
{ title: '买家付邮地区', dataIndex: 'provincesText' },
|
|
||||||
{ title: '首费规则', key: 'first', width: 160 },
|
|
||||||
{ title: '续费规则', key: 'add', width: 160 },
|
|
||||||
{ title: '条件包邮', dataIndex: 'freeRuleText', width: 160 },
|
|
||||||
]"
|
|
||||||
>
|
|
||||||
<template #bodyCell="{ column, record }">
|
|
||||||
<template v-if="column.key === 'first'">
|
|
||||||
首{{ record.firstStandard ?? '-'
|
|
||||||
}}{{ costTemplateDetail?.costType === 1 ? 'kg' : '件' }}
|
|
||||||
/ {{ record.firstCostYuan ?? '-' }}元
|
|
||||||
</template>
|
|
||||||
<template v-else-if="column.key === 'add'">
|
|
||||||
续{{ record.addStandard ?? '-'
|
|
||||||
}}{{ costTemplateDetail?.costType === 1 ? 'kg' : '件' }}
|
|
||||||
/ {{ record.addCostYuan ?? '-' }}元
|
|
||||||
</template>
|
|
||||||
</template>
|
|
||||||
</Table>
|
|
||||||
</template>
|
|
||||||
<Empty
|
|
||||||
v-else-if="!costTemplateDetailLoading"
|
|
||||||
description="暂无模板详情"
|
|
||||||
:image="Empty.PRESENTED_IMAGE_SIMPLE"
|
|
||||||
/>
|
|
||||||
</Spin>
|
|
||||||
</Card>
|
|
||||||
|
|
||||||
<div class="grid grid-cols-2 gap-3">
|
|
||||||
<Form.Item label="参考价(元)" required>
|
|
||||||
<InputNumber
|
|
||||||
v-model:value="form.marketPriceYuan"
|
|
||||||
class="w-full"
|
|
||||||
:min="0.01"
|
|
||||||
:precision="2"
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label="发货时限" required>
|
|
||||||
<Select
|
|
||||||
v-model:value="form.shipmentLimitSecond"
|
|
||||||
class="w-full"
|
|
||||||
:options="[
|
|
||||||
{ label: '24小时', value: 86400 },
|
|
||||||
{ label: '48小时', value: 172800 },
|
|
||||||
]"
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label="满两件折扣" required>
|
|
||||||
<InputNumber
|
|
||||||
v-model:value="form.twoPiecesDiscount"
|
|
||||||
class="w-full"
|
|
||||||
:min="0"
|
|
||||||
:max="10"
|
|
||||||
:precision="1"
|
|
||||||
:step="0.1"
|
|
||||||
placeholder="9.5 表示 9.5 折,0 取消"
|
|
||||||
/>
|
|
||||||
</Form.Item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="flex flex-wrap gap-6">
|
|
||||||
<Form.Item label="假一赔十" required>
|
|
||||||
<Switch v-model:checked="form.isFolt" />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label="7天无理由" required>
|
|
||||||
<Switch v-model:checked="form.isRefundable" />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label="预售" required>
|
|
||||||
<Switch v-model:checked="form.isPreSale" />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label="二手" required>
|
|
||||||
<Switch v-model:checked="form.secondHand" />
|
|
||||||
</Form.Item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<template v-if="nonSaleProps.length">
|
|
||||||
<div class="mb-1 text-sm font-medium">类目属性</div>
|
|
||||||
<div class="grid grid-cols-2 gap-3">
|
|
||||||
<Form.Item
|
|
||||||
v-for="p in nonSaleProps"
|
|
||||||
:key="String(p.refPid)"
|
|
||||||
:label="p.name"
|
|
||||||
:required="!!p.required"
|
|
||||||
>
|
|
||||||
<CatPropertyField
|
|
||||||
v-model:value="form.goodsPropValues[String(p.refPid)]"
|
|
||||||
v-model:unit="form.goodsPropUnits[String(p.refPid)]"
|
|
||||||
:property="p"
|
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
|
||||||
|
|
||||||
<div class="grid grid-cols-2 gap-4">
|
<template v-if="nonSaleProps.length">
|
||||||
<Form.Item label="轮播图" required>
|
<div class="mb-1 text-sm font-medium">类目属性</div>
|
||||||
<Upload
|
<div class="grid grid-cols-2 gap-3">
|
||||||
v-model:file-list="carouselFileList"
|
<Form.Item
|
||||||
list-type="picture-card"
|
v-for="p in nonSaleProps"
|
||||||
accept="image/jpeg,image/png,image/jpg"
|
:key="String(p.refPid)"
|
||||||
:before-upload="beforeUploadCarousel"
|
:label="p.name"
|
||||||
:on-preview="onPreviewUploadFile"
|
:required="!!p.required"
|
||||||
:on-remove="onRemoveCarousel"
|
>
|
||||||
>
|
<CatPropertyField
|
||||||
<div>
|
v-model:value="form.goodsPropValues[String(p.refPid)]"
|
||||||
<PlusOutlined />
|
v-model:unit="form.goodsPropUnits[String(p.refPid)]"
|
||||||
<div class="mt-1 text-xs">选择</div>
|
:property="p"
|
||||||
</div>
|
/>
|
||||||
</Upload>
|
</Form.Item>
|
||||||
</Form.Item>
|
</div>
|
||||||
<Form.Item label="详情图" required>
|
</template>
|
||||||
<Upload
|
|
||||||
v-model:file-list="detailFileList"
|
|
||||||
list-type="picture-card"
|
|
||||||
accept="image/jpeg,image/png,image/jpg"
|
|
||||||
:before-upload="beforeUploadDetail"
|
|
||||||
:on-preview="onPreviewUploadFile"
|
|
||||||
:on-remove="onRemoveDetail"
|
|
||||||
>
|
|
||||||
<div>
|
|
||||||
<PlusOutlined />
|
|
||||||
<div class="mt-1 text-xs">选择</div>
|
|
||||||
</div>
|
|
||||||
</Upload>
|
|
||||||
</Form.Item>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
<div class="grid grid-cols-2 gap-4">
|
||||||
v-if="form.catId"
|
<Form.Item label="轮播图" required>
|
||||||
data-agent-field="spec"
|
<Upload
|
||||||
class="space-y-4"
|
v-model:file-list="carouselFileList"
|
||||||
:class="{ 'agent-typing-field': agentTypingField === 'spec' }"
|
list-type="picture-card"
|
||||||
>
|
accept="image/jpeg,image/png,image/jpg"
|
||||||
<SpecAxesCard
|
:before-upload="beforeUploadCarousel"
|
||||||
:spec-catalog="specCatalog"
|
:on-preview="onPreviewUploadFile"
|
||||||
:spec-axes="specAxes"
|
:on-remove="onRemoveCarousel"
|
||||||
:can-add-spec-axis="canAddSpecAxis"
|
>
|
||||||
:catalog-options-for-axis="catalogOptionsForAxis"
|
<div>
|
||||||
:spec-value-display="specValueDisplay"
|
<PlusOutlined />
|
||||||
:spec-value-auto-options="specValueAutoOptions"
|
<div class="mt-1 text-xs">选择</div>
|
||||||
@set-list-ref="onSpecAxesListRef"
|
</div>
|
||||||
@axis-catalog-change="onAxisCatalogChange"
|
</Upload>
|
||||||
@spec-value-input="onSpecValueInput"
|
</Form.Item>
|
||||||
@spec-value-commit="onSpecValueCommit"
|
<Form.Item label="详情图" required>
|
||||||
@spec-value-enter="onSpecValueEnter"
|
<Upload
|
||||||
@add-spec-value="addSpecValueSlot"
|
v-model:file-list="detailFileList"
|
||||||
@remove-spec-value="removeSpecValue"
|
list-type="picture-card"
|
||||||
@remove-spec-axis="removeSpecAxis"
|
accept="image/jpeg,image/png,image/jpg"
|
||||||
@add-spec-axis="addSpecAxis"
|
:before-upload="beforeUploadDetail"
|
||||||
|
:on-preview="onPreviewUploadFile"
|
||||||
|
:on-remove="onRemoveDetail"
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<PlusOutlined />
|
||||||
|
<div class="mt-1 text-xs">选择</div>
|
||||||
|
</div>
|
||||||
|
</Upload>
|
||||||
|
</Form.Item>
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
<Card size="small" class="publish-editor-section" title="规格与库存">
|
||||||
|
<div
|
||||||
|
v-if="form.catId"
|
||||||
|
data-agent-field="spec"
|
||||||
|
class="publish-editor-spec-stack"
|
||||||
|
:class="{ 'agent-typing-field': agentTypingField === 'spec' }"
|
||||||
|
>
|
||||||
|
<SpecAxesCard
|
||||||
|
:spec-catalog="specCatalog"
|
||||||
|
:spec-axes="specAxes"
|
||||||
|
:can-add-spec-axis="canAddSpecAxis"
|
||||||
|
:catalog-options-for-axis="catalogOptionsForAxis"
|
||||||
|
:spec-value-display="specValueDisplay"
|
||||||
|
:spec-value-auto-options="specValueAutoOptions"
|
||||||
|
@set-list-ref="onSpecAxesListRef"
|
||||||
|
@axis-catalog-change="onAxisCatalogChange"
|
||||||
|
@spec-value-input="onSpecValueInput"
|
||||||
|
@spec-value-commit="onSpecValueCommit"
|
||||||
|
@spec-value-enter="onSpecValueEnter"
|
||||||
|
@add-spec-value="addSpecValueSlot"
|
||||||
|
@remove-spec-value="removeSpecValue"
|
||||||
|
@remove-spec-axis="removeSpecAxis"
|
||||||
|
@add-spec-axis="addSpecAxis"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<SkuTableCard
|
||||||
|
v-model:bind-pick-sku-ids="bindPickSkuIds"
|
||||||
|
:sku-select-options="skuSelectOptions"
|
||||||
|
:sku-rows="skuRows"
|
||||||
|
:spec-axes-length="specAxes.length"
|
||||||
|
:sku-table-columns="skuTableColumns"
|
||||||
|
:sku-table-scroll-x="skuTableScrollX"
|
||||||
|
:sku-spec-cell-display="skuSpecCellDisplay"
|
||||||
|
:sku-spec-cell-auto-options="skuSpecCellAutoOptions"
|
||||||
|
:before-upload-sku="beforeUploadSku"
|
||||||
|
:on-preview-upload-file="onPreviewUploadFile"
|
||||||
|
@search="debouncedLoadSkuCandidates"
|
||||||
|
@dropdown-visible-change="onSkuSelectDropdownOpen"
|
||||||
|
@apply-internal-skus="applyInternalSkusInOrder"
|
||||||
|
@clear-internal-skus="clearInternalSkuBindings"
|
||||||
|
@set-table-wrap-ref="onSkuTableWrapRef"
|
||||||
|
@sku-spec-input="onSkuSpecCellInput"
|
||||||
|
@sku-spec-commit="onSkuSpecCellCommit"
|
||||||
|
@out-sku-sn-change="onOutSkuSnChange"
|
||||||
|
@out-sku-sn-blur="onOutSkuSnBlur"
|
||||||
|
@bind-internal-sku="bindInternalSku"
|
||||||
|
@sku-thumb-file-list-change="onSkuThumbFileListChange"
|
||||||
|
@apply-batch="applySkuBatchFields"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<Empty
|
||||||
|
v-else
|
||||||
|
description="请先选择叶子类目"
|
||||||
|
:image="Empty.PRESENTED_IMAGE_SIMPLE"
|
||||||
/>
|
/>
|
||||||
|
</Card>
|
||||||
|
|
||||||
<SkuTableCard
|
<Card size="small" class="publish-editor-section" title="服务与承诺">
|
||||||
v-model:bind-pick-sku-ids="bindPickSkuIds"
|
<Form.Item label="运费模板" required>
|
||||||
:sku-select-options="skuSelectOptions"
|
<Select
|
||||||
:sku-rows="skuRows"
|
v-model:value="form.costTemplateId"
|
||||||
:spec-axes-length="specAxes.length"
|
class="w-full"
|
||||||
:sku-table-columns="skuTableColumns"
|
:options="logisticsOptions"
|
||||||
:sku-table-scroll-x="skuTableScrollX"
|
placeholder="选择运费模板"
|
||||||
:sku-spec-cell-display="skuSpecCellDisplay"
|
show-search
|
||||||
:sku-spec-cell-auto-options="skuSpecCellAutoOptions"
|
option-filter-prop="label"
|
||||||
:before-upload-sku="beforeUploadSku"
|
:disabled="!form.pddShopId"
|
||||||
:on-preview-upload-file="onPreviewUploadFile"
|
allow-clear
|
||||||
@search="debouncedLoadSkuCandidates"
|
@change="(v: any) => loadCostTemplateDetail(v)"
|
||||||
@dropdown-visible-change="onSkuSelectDropdownOpen"
|
/>
|
||||||
@apply-internal-skus="applyInternalSkusInOrder"
|
</Form.Item>
|
||||||
@clear-internal-skus="clearInternalSkuBindings"
|
|
||||||
@set-table-wrap-ref="onSkuTableWrapRef"
|
<Card
|
||||||
@sku-spec-input="onSkuSpecCellInput"
|
v-if="form.costTemplateId || costTemplateDetailLoading"
|
||||||
@sku-spec-commit="onSkuSpecCellCommit"
|
size="small"
|
||||||
@out-sku-sn-change="onOutSkuSnChange"
|
class="cost-template-detail-card"
|
||||||
@out-sku-sn-blur="onOutSkuSnBlur"
|
title="运费模板详情"
|
||||||
@bind-internal-sku="bindInternalSku"
|
>
|
||||||
@sku-thumb-file-list-change="onSkuThumbFileListChange"
|
<Spin :spinning="costTemplateDetailLoading">
|
||||||
@apply-batch="applySkuBatchFields"
|
<template v-if="costTemplateDetail">
|
||||||
/>
|
<Descriptions bordered size="small" :column="2" class="mb-3">
|
||||||
</div>
|
<Descriptions.Item label="模板名称">
|
||||||
|
{{ costTemplateDetail.templateName || '-' }}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="计费方式">
|
||||||
|
{{ costTemplateDetail.costTypeLabel || '-' }}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="增值服务">
|
||||||
|
{{ costTemplateDetail.additionalServiceLabel || '-' }}
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="其它">
|
||||||
|
<Space :size="4" wrap>
|
||||||
|
<Tag v-if="costTemplateDetail.sfFree" color="success">
|
||||||
|
顺丰包邮
|
||||||
|
</Tag>
|
||||||
|
<Tag
|
||||||
|
v-if="costTemplateDetail.freeDeliverHouse"
|
||||||
|
color="processing"
|
||||||
|
>
|
||||||
|
包邮区送货上门
|
||||||
|
</Tag>
|
||||||
|
<span
|
||||||
|
v-if="
|
||||||
|
!costTemplateDetail.sfFree &&
|
||||||
|
!costTemplateDetail.freeDeliverHouse
|
||||||
|
"
|
||||||
|
>
|
||||||
|
-
|
||||||
|
</span>
|
||||||
|
</Space>
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item label="包邮省份" :span="2">
|
||||||
|
<div
|
||||||
|
v-if="costTemplateDetail.freeProvinces?.length"
|
||||||
|
class="free-province-tags"
|
||||||
|
>
|
||||||
|
<Tag
|
||||||
|
v-for="(p, idx) in costTemplateDetail.freeProvinces"
|
||||||
|
:key="`${p.provinceId}-${idx}`"
|
||||||
|
>
|
||||||
|
{{ p.province || p.provinceId }}
|
||||||
|
</Tag>
|
||||||
|
</div>
|
||||||
|
<span v-else>暂无</span>
|
||||||
|
</Descriptions.Item>
|
||||||
|
<Descriptions.Item
|
||||||
|
v-if="costTemplateDetail.freeDeliverHouseAreas?.length"
|
||||||
|
label="送货上门地区"
|
||||||
|
:span="2"
|
||||||
|
>
|
||||||
|
{{
|
||||||
|
costTemplateDetail.freeDeliverHouseAreas
|
||||||
|
.map((a) => a.areaText)
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('、') || '-'
|
||||||
|
}}
|
||||||
|
</Descriptions.Item>
|
||||||
|
</Descriptions>
|
||||||
|
|
||||||
|
<Table
|
||||||
|
v-if="costTemplateDetail.paidRegions?.length"
|
||||||
|
size="small"
|
||||||
|
:pagination="false"
|
||||||
|
:data-source="costTemplateDetail.paidRegions"
|
||||||
|
:row-key="(_: any, i?: number) => `paid-${i ?? 0}`"
|
||||||
|
:columns="[
|
||||||
|
{ title: '买家付邮地区', dataIndex: 'provincesText' },
|
||||||
|
{ title: '首费规则', key: 'first', width: 160 },
|
||||||
|
{ title: '续费规则', key: 'add', width: 160 },
|
||||||
|
{ title: '条件包邮', dataIndex: 'freeRuleText', width: 160 },
|
||||||
|
]"
|
||||||
|
>
|
||||||
|
<template #bodyCell="{ column, record }">
|
||||||
|
<template v-if="column.key === 'first'">
|
||||||
|
首{{ record.firstStandard ?? '-'
|
||||||
|
}}{{ costTemplateDetail?.costType === 1 ? 'kg' : '件' }}
|
||||||
|
/ {{ record.firstCostYuan ?? '-' }}元
|
||||||
|
</template>
|
||||||
|
<template v-else-if="column.key === 'add'">
|
||||||
|
续{{ record.addStandard ?? '-'
|
||||||
|
}}{{ costTemplateDetail?.costType === 1 ? 'kg' : '件' }}
|
||||||
|
/ {{ record.addCostYuan ?? '-' }}元
|
||||||
|
</template>
|
||||||
|
</template>
|
||||||
|
</Table>
|
||||||
|
</template>
|
||||||
|
<Empty
|
||||||
|
v-else-if="!costTemplateDetailLoading"
|
||||||
|
description="暂无模板详情"
|
||||||
|
:image="Empty.PRESENTED_IMAGE_SIMPLE"
|
||||||
|
/>
|
||||||
|
</Spin>
|
||||||
|
</Card>
|
||||||
|
|
||||||
|
<div class="grid grid-cols-2 gap-3">
|
||||||
|
<Form.Item label="参考价(元)" required>
|
||||||
|
<InputNumber
|
||||||
|
v-model:value="form.marketPriceYuan"
|
||||||
|
class="w-full"
|
||||||
|
:min="0.01"
|
||||||
|
:precision="2"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="发货时限" required>
|
||||||
|
<Select
|
||||||
|
v-model:value="form.shipmentLimitSecond"
|
||||||
|
class="w-full"
|
||||||
|
:options="[
|
||||||
|
{ label: '24小时', value: 86400 },
|
||||||
|
{ label: '48小时', value: 172800 },
|
||||||
|
]"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="满两件折扣" required>
|
||||||
|
<InputNumber
|
||||||
|
v-model:value="form.twoPiecesDiscount"
|
||||||
|
class="w-full"
|
||||||
|
:min="0"
|
||||||
|
:max="10"
|
||||||
|
:precision="1"
|
||||||
|
:step="0.1"
|
||||||
|
placeholder="9.5 表示 9.5 折,0 取消"
|
||||||
|
/>
|
||||||
|
</Form.Item>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-wrap gap-6">
|
||||||
|
<Form.Item label="假一赔十" required>
|
||||||
|
<Switch v-model:checked="form.isFolt" />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="7天无理由" required>
|
||||||
|
<Switch v-model:checked="form.isRefundable" />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="预售" required>
|
||||||
|
<Switch v-model:checked="form.isPreSale" />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label="二手" required>
|
||||||
|
<Switch v-model:checked="form.secondHand" />
|
||||||
|
</Form.Item>
|
||||||
|
</div>
|
||||||
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -785,6 +796,33 @@ function onSkuTableWrapRef(el: HTMLElement | null) {
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
/* 分区 Card 纵向间距(gap 比 space-y 对 ant-card 更稳定) */
|
||||||
|
.publish-editor-sections {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.publish-editor-sections :deep(.publish-editor-section.ant-card) {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 规格与库存:销售规格 / SKU 子卡片间距 */
|
||||||
|
.publish-editor-spec-stack {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.publish-editor-spec-stack :deep(.ant-card) {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* 服务与承诺:运费模板详情与下方参考价等字段 */
|
||||||
|
.cost-template-detail-card {
|
||||||
|
margin-bottom: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
/* 智能体逐字改写时的轻量高亮,便于视线跟上 */
|
/* 智能体逐字改写时的轻量高亮,便于视线跟上 */
|
||||||
.agent-typing-field {
|
.agent-typing-field {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
+12
@@ -192,6 +192,7 @@ function onColumnBatchEnter(
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
<div class="sku-table-card-stack">
|
||||||
<Card size="small" title="内部 SKU 拉入">
|
<Card size="small" title="内部 SKU 拉入">
|
||||||
<div class="flex flex-wrap items-center gap-2">
|
<div class="flex flex-wrap items-center gap-2">
|
||||||
<Select
|
<Select
|
||||||
@@ -491,9 +492,20 @@ function onColumnBatchEnter(
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</Teleport>
|
</Teleport>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
.sku-table-card-stack {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sku-table-card-stack :deep(.ant-card) {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.sku-batch-header {
|
.sku-batch-header {
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
Reference in New Issue
Block a user