feat(order): 修复平台订单号搜索条件无法传递到后端的问题;feat(order-import): 导入任务模态框深色模式适配

This commit is contained in:
小蟑螂
2026-04-25 13:53:43 +08:00
parent 55eb2a1d3f
commit b023c1dc8e
2 changed files with 31 additions and 28 deletions
@@ -1111,7 +1111,7 @@ const shopOptions = computed(() => {
<Spin size="small" />
<div class="mt-2">加载中...</div>
</div>
<div v-else class="py-4 text-center text-gray-400">
<div v-else class="py-4 text-center text-gray-400 dark:text-gray-500 dark:text-gray-400">
暂无数据
</div>
</template>
@@ -1131,7 +1131,7 @@ const shopOptions = computed(() => {
<!-- 第二步:字段映射 -->
<div v-if="currentStep === 1" class="py-4">
<div class="mb-4 flex items-center justify-between">
<div class="text-sm text-gray-600">
<div class="text-sm text-gray-600 dark:text-gray-300">
请为每个订单字段选择对应的CSV列,必填字段必须绑定
</div>
<div class="flex items-center space-x-2">
@@ -1148,7 +1148,7 @@ const shopOptions = computed(() => {
<Spin size="small" />
<div class="mt-2">加载中...</div>
</div>
<div v-else class="py-4 text-center text-gray-400">
<div v-else class="py-4 text-center text-gray-400 dark:text-gray-500 dark:text-gray-400">
暂无模板
</div>
</template>
@@ -1158,7 +1158,7 @@ const shopOptions = computed(() => {
:value="template.id"
>
{{ template.name }}
<span class="ml-2 text-xs text-gray-400">
<span class="ml-2 text-xs text-gray-400 dark:text-gray-500 dark:text-gray-400">
({{ new Date(template.createTime).toLocaleDateString() }})
</span>
</Select.Option>
@@ -1177,10 +1177,10 @@ const shopOptions = computed(() => {
:key="fieldDef.id"
class="flex items-center space-x-4 rounded border p-3"
:class="{
'border-red-300 bg-red-50':
'border-red-300 dark:border-red-700 bg-red-50 dark:bg-red-900/30':
fieldDef.required && !fieldMappings[fieldDef.id]?.mappedHeader,
'border-blue-200 bg-blue-50': isMappingFromTemplate(fieldDef.id),
'border-yellow-200 bg-yellow-50': isMappingChangedFromTemplate(
'border-blue-200 dark:border-blue-700 bg-blue-50 dark:bg-blue-900/30': isMappingFromTemplate(fieldDef.id),
'border-yellow-200 dark:border-yellow-700 bg-yellow-50 dark:bg-yellow-900/30': isMappingChangedFromTemplate(
fieldDef.id,
),
}"
@@ -1188,14 +1188,14 @@ const shopOptions = computed(() => {
<div class="flex-1">
<div class="flex items-center space-x-2">
<span class="font-medium">{{ fieldDef.fieldLabel }}</span>
<span v-if="fieldDef.required" class="text-xs text-red-500">
<span v-if="fieldDef.required" class="text-xs text-red-500 dark:text-red-400">
(必填)
</span>
<span
v-if="
selectedTemplateId && isMappingFromTemplate(fieldDef.id)
"
class="ml-1 rounded bg-blue-100 px-1.5 py-0.5 text-xs text-blue-600"
class="ml-1 rounded bg-blue-100 dark:bg-blue-900/50 px-1.5 py-0.5 text-xs text-blue-600 dark:text-blue-400"
>
模板映射
</span>
@@ -1204,12 +1204,12 @@ const shopOptions = computed(() => {
selectedTemplateId &&
isMappingChangedFromTemplate(fieldDef.id)
"
class="ml-1 rounded bg-yellow-100 px-1.5 py-0.5 text-xs text-yellow-600"
class="ml-1 rounded bg-yellow-100 dark:bg-yellow-900/50 px-1.5 py-0.5 text-xs text-yellow-600 dark:text-yellow-300"
>
已变更
</span>
</div>
<div class="mt-1 text-xs text-gray-500">
<div class="mt-1 text-xs text-gray-500 dark:text-gray-400">
字段名: {{ fieldDef.fieldName }}
</div>
<div
@@ -1219,7 +1219,7 @@ const shopOptions = computed(() => {
(m) => m.fieldName === fieldDef.fieldName,
)
"
class="mt-1 text-xs text-gray-400"
class="mt-1 text-xs text-gray-400 dark:text-gray-500 dark:text-gray-400"
>
模板原映射:
{{
@@ -1262,7 +1262,7 @@ const shopOptions = computed(() => {
<!-- 第三步:订单状态映射 -->
<div v-if="currentStep === 2" class="py-4">
<div class="mb-4 flex items-center justify-between">
<div class="text-sm text-gray-600">
<div class="text-sm text-gray-600 dark:text-gray-300">
请为每个订单状态值映射到对应的系统订单状态(可选,可不映射)
</div>
<div class="flex items-center space-x-2">
@@ -1279,7 +1279,7 @@ const shopOptions = computed(() => {
<Spin size="small" />
<div class="mt-2">加载中...</div>
</div>
<div v-else class="py-4 text-center text-gray-400">
<div v-else class="py-4 text-center text-gray-400 dark:text-gray-500 dark:text-gray-400">
暂无模板
</div>
</template>
@@ -1289,7 +1289,7 @@ const shopOptions = computed(() => {
:value="template.id"
>
{{ template.name }}
<span class="ml-2 text-xs text-gray-400">
<span class="ml-2 text-xs text-gray-400 dark:text-gray-500 dark:text-gray-400">
({{ new Date(template.createTime).toLocaleDateString() }})
</span>
</Select.Option>
@@ -1304,7 +1304,7 @@ const shopOptions = computed(() => {
</div>
<div
v-if="uniqueStatusValues.length === 0"
class="py-8 text-center text-gray-400"
class="py-8 text-center text-gray-400 dark:text-gray-500 dark:text-gray-400"
>
未找到订单状态字段映射,请先在字段映射步骤中绑定status字段
</div>
@@ -1314,10 +1314,10 @@ const shopOptions = computed(() => {
:key="statusValue"
class="flex items-center space-x-4 rounded border p-3"
:class="{
'border-blue-200 bg-blue-50':
'border-blue-200 dark:border-blue-700 bg-blue-50 dark:bg-blue-900/30':
selectedStatusTemplateId &&
isStatusMappingFromTemplate(statusValue),
'border-yellow-200 bg-yellow-50':
'border-yellow-200 dark:border-yellow-700 bg-yellow-50 dark:bg-yellow-900/30':
selectedStatusTemplateId &&
isStatusMappingChangedFromTemplate(statusValue),
}"
@@ -1330,7 +1330,7 @@ const shopOptions = computed(() => {
selectedStatusTemplateId &&
isStatusMappingFromTemplate(statusValue)
"
class="ml-1 rounded bg-blue-100 px-1.5 py-0.5 text-xs text-blue-600"
class="ml-1 rounded bg-blue-100 dark:bg-blue-900/50 px-1.5 py-0.5 text-xs text-blue-600 dark:text-blue-400"
>
模板映射
</span>
@@ -1339,12 +1339,12 @@ const shopOptions = computed(() => {
selectedStatusTemplateId &&
isStatusMappingChangedFromTemplate(statusValue)
"
class="ml-1 rounded bg-yellow-100 px-1.5 py-0.5 text-xs text-yellow-600"
class="ml-1 rounded bg-yellow-100 dark:bg-yellow-900/50 px-1.5 py-0.5 text-xs text-yellow-600 dark:text-yellow-300"
>
已变更
</span>
</div>
<div class="mt-1 text-xs text-gray-500">CSV中的订单状态值</div>
<div class="mt-1 text-xs text-gray-500 dark:text-gray-400">CSV中的订单状态值</div>
<div
v-if="
selectedStatusTemplateId &&
@@ -1352,7 +1352,7 @@ const shopOptions = computed(() => {
(m) => m.csvStatus === statusValue,
)
"
class="mt-1 text-xs text-gray-400"
class="mt-1 text-xs text-gray-400 dark:text-gray-500 dark:text-gray-400"
>
模板原映射:
{{
@@ -1400,16 +1400,16 @@ const shopOptions = computed(() => {
<!-- 第四步:确认信息 -->
<div v-if="currentStep === 3" class="py-4">
<div class="space-y-4">
<div class="rounded bg-gray-50 p-4">
<div class="rounded bg-gray-50 dark:bg-gray-800 p-4">
<div class="mb-2 font-medium">店铺信息</div>
<div class="text-gray-700">
<div class="text-gray-700 dark:text-gray-200">
{{
shopList.find((s: ShopVO.Info) => s.id === selectedShopId)
?.name ?? '-'
}}
</div>
</div>
<div class="rounded bg-gray-50 p-4">
<div class="rounded bg-gray-50 dark:bg-gray-800 p-4">
<div class="mb-2 font-medium">字段映射</div>
<div class="space-y-2">
<div
@@ -1419,14 +1419,14 @@ const shopOptions = computed(() => {
:key="mapping.fieldDef.id"
class="flex justify-between text-sm"
>
<span class="text-gray-600">
<span class="text-gray-600 dark:text-gray-300">
{{ mapping.fieldDef.fieldLabel }}:
</span>
<span class="font-medium">{{ mapping.mappedHeader }}</span>
</div>
</div>
</div>
<div class="rounded bg-gray-50 p-4">
<div class="rounded bg-gray-50 dark:bg-gray-800 p-4">
<div class="mb-2 font-medium">订单状态映射</div>
<div class="space-y-2">
<div
@@ -1434,7 +1434,7 @@ const shopOptions = computed(() => {
:key="statusValue"
class="flex justify-between text-sm"
>
<span class="text-gray-600">{{ statusValue }}:</span>
<span class="text-gray-600 dark:text-gray-300">{{ statusValue }}:</span>
<span class="font-medium">
{{
orderStatusList.find(
@@ -394,6 +394,9 @@ const formOptions = computed(() => ({
component: 'Input',
componentProps: {
placeholder: '请输入平台订单号(回车搜索)',
onChange: (e: any) => {
searchForm.value.platformOrderNo = e.target.value;
},
onPressEnter: () => gridReloadRef.value?.(),
},
fieldName: 'platformOrderNo',