1
This commit is contained in:
parent
e94ecb4e63
commit
7ae618471d
@ -448,8 +448,6 @@ export function storeWarehouseOpenAccount(data: {
|
||||
contact_email?: string
|
||||
address?: string
|
||||
industry?: string
|
||||
logo_url?: string
|
||||
domain?: string
|
||||
auth_start?: string
|
||||
auth_end?: string
|
||||
print_quantity?: number
|
||||
|
||||
@ -140,7 +140,7 @@
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Search, Refresh } from '@element-plus/icons-vue'
|
||||
import { storeWarehouseWarehouseList } from '@/api/storeWarehouse.warehouse/storeWarehouse'
|
||||
import { storeWarehouseWarehouseList } from '@/api/storewarehouse.warehouse/storeWarehouse'
|
||||
import ScanBox from '@/components/ScanBox/index.vue'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
|
||||
|
||||
@ -54,9 +54,9 @@
|
||||
>
|
||||
<!-- 售后类型 -->
|
||||
<template #column-type="{ row }">
|
||||
<el-tag size="small" :type="typeTagType(row.type)">
|
||||
<span :class="getStatusTextClass(typeTagType(row.type))">
|
||||
{{ typeLabel(row.type) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<!-- 子类型 -->
|
||||
@ -66,32 +66,32 @@
|
||||
|
||||
<!-- 状态 -->
|
||||
<template #column-status="{ row }">
|
||||
<el-tag size="small" :type="statusTagType(row.status)">
|
||||
<span :class="getStatusTextClass(statusTagType(row.status))">
|
||||
{{ statusLabel(row.status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<!-- 角色组 -->
|
||||
<template #column-role_group="{ row }">
|
||||
<el-tag v-if="row.role_group" size="small" :type="roleGroupTagType(row.role_group)">
|
||||
<span v-if="row.role_group" :class="getStatusTextClass(roleGroupTagType(row.role_group))">
|
||||
{{ roleGroupLabel(row.role_group) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<!-- 仓库理赔 -->
|
||||
<template #column-claim_status="{ row }">
|
||||
<el-tag v-if="row.claim_status" size="small" :type="claimStatusTagType(row.claim_status)">
|
||||
<span v-if="row.claim_status" :class="getStatusTextClass(claimStatusTagType(row.claim_status))">
|
||||
{{ claimStatusLabel(row.claim_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<!-- 运方理赔 -->
|
||||
<template #column-carrier_claim_status="{ row }">
|
||||
<el-tag v-if="row.carrier_claim_status" size="small" :type="claimStatusTagType(row.carrier_claim_status)">
|
||||
<span v-if="row.carrier_claim_status" :class="getStatusTextClass(claimStatusTagType(row.carrier_claim_status))">
|
||||
{{ claimStatusLabel(row.carrier_claim_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
@ -250,7 +250,7 @@ import {
|
||||
CLAIM_STATUS_TAG_MAP,
|
||||
} from './afterSale-config'
|
||||
import { loadStores } from '@/api/index/index'
|
||||
import { extractStoreListFromResponse, fillStoreScanFieldOptions } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { extractStoreListFromResponse, fillStoreScanFieldOptions, getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import ScanBox from '@/components/ScanBox/index.vue'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
|
||||
|
||||
@ -50,9 +50,9 @@
|
||||
@refresh="handleRefresh"
|
||||
>
|
||||
<template #column-group_type="{ row }">
|
||||
<el-tag size="small" :type="groupTypeTagType(row.group_type)">
|
||||
<span :class="getStatusTextClass(groupTypeTagType(row.group_type))">
|
||||
{{ groupTypeLabel(row.group_type) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-sub_type="{ row }">
|
||||
@ -60,9 +60,9 @@
|
||||
</template>
|
||||
|
||||
<template #column-source_type="{ row }">
|
||||
<el-tag size="small" :type="row.source_type === 'api' ? 'success' : 'info'">
|
||||
<span :class="getStatusTextClass(row.source_type === 'api' ? 'success' : 'info')">
|
||||
{{ row.source_type === 'api' ? 'API' : row.source_type || '-' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-express_interfaces="{ row }">
|
||||
@ -75,15 +75,15 @@
|
||||
</template>
|
||||
|
||||
<template #column-is_blocked="{ row }">
|
||||
<el-tag size="small" :type="row.is_blocked ? 'danger' : 'success'">
|
||||
<span :class="getStatusTextClass(row.is_blocked ? 'danger' : 'success')">
|
||||
{{ row.is_blocked ? '已禁用' : '启用' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-ai_enabled="{ row }">
|
||||
<el-tag size="small" :type="row.ai_enabled ? 'success' : 'info'">
|
||||
<span :class="getStatusTextClass(row.ai_enabled ? 'success' : 'info')">
|
||||
{{ row.ai_enabled ? '开' : '关' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-actions="{ row }">
|
||||
@ -206,9 +206,9 @@
|
||||
<el-table-column prop="ext_id" label="外部ID" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column prop="direction" label="方向" width="80" align="center">
|
||||
<template #default="{ row: r }">
|
||||
<el-tag :type="r.direction === 'inbound' ? 'primary' : 'success'" size="small">
|
||||
<span :class="getStatusTextClass(r.direction === 'inbound' ? 'primary' : 'success')">
|
||||
{{ r.direction === 'inbound' ? '入站' : '出站' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="content" label="内容" min-width="200" show-overflow-tooltip />
|
||||
@ -242,7 +242,7 @@ import {
|
||||
inboxBindCode,
|
||||
} from '@/api/inbox/inbox'
|
||||
import { loadStores, loadExpressInterfaces } from '@/api/index/index'
|
||||
import { extractStoreListFromResponse, fillStoreScanFieldOptions, mapStoreListToSelectOptions } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { extractStoreListFromResponse, fillStoreScanFieldOptions, getStatusTextClass, mapStoreListToSelectOptions } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { expressIndexGetExpressList } from '@/api/setting.express/express'
|
||||
import { groupAvailableFields, groupColumns, groupToolbarButtons } from './group-config'
|
||||
import ScanBox from '@/components/ScanBox/index.vue'
|
||||
|
||||
@ -54,28 +54,28 @@
|
||||
@refresh="handleRefresh"
|
||||
>
|
||||
<template #column-direction="{ row }">
|
||||
<el-tag :type="row.direction === 'inbound' ? 'primary' : 'success'" size="small">
|
||||
<span :class="getStatusTextClass(row.direction === 'inbound' ? 'primary' : 'success')">
|
||||
{{ row.direction === 'inbound' ? '收件' : '回信' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-source_type="{ row }">
|
||||
<el-tag size="small" :type="row.source_type === 'api' ? '' : 'info'">
|
||||
<span :class="getStatusTextClass(row.source_type === 'api' ? 'primary' : 'info')">
|
||||
{{ sourceTypeLabel(row.source_type) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-target_type="{ row }">
|
||||
<el-tag size="small" :type="row.target_type === 'api' ? '' : 'info'">
|
||||
<span :class="getStatusTextClass(row.target_type === 'api' ? 'primary' : 'info')">
|
||||
{{ targetTypeLabel(row.target_type) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-push_status="{ row }">
|
||||
<template v-if="row.direction === 'outbound'">
|
||||
<el-tag size="small" :type="pushStatusTagType(row.push_status)">
|
||||
<span :class="getStatusTextClass(pushStatusTagType(row.push_status))">
|
||||
{{ pushStatusLabel(row.push_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
@ -112,19 +112,19 @@
|
||||
<el-descriptions-item label="仓库ID">{{ detailData.warehouse_id ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="货主">{{ detailData.store_name ?? detailData.store_id ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="消息方向">
|
||||
<el-tag :type="detailData.direction === 'inbound' ? 'primary' : 'success'" size="small">
|
||||
<span :class="getStatusTextClass(detailData.direction === 'inbound' ? 'primary' : 'success')">
|
||||
{{ detailData.direction === 'inbound' ? '收件' : '回信' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="父消息ID">{{ detailData.parent_id ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="来源类型">
|
||||
<el-tag size="small">{{ detailData.source_type ?? '-' }}</el-tag>
|
||||
<span :class="getStatusTextClass('primary')">{{ detailData.source_type ?? '-' }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="目标类型">
|
||||
<el-tag size="small">{{ detailData.target_type ?? '-' }}</el-tag>
|
||||
<span :class="getStatusTextClass('primary')">{{ detailData.target_type ?? '-' }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="目标渠道">
|
||||
<el-tag v-if="detailData.target_channel" size="small">{{ channelLabel(detailData.target_channel) }}</el-tag>
|
||||
<span v-if="detailData.target_channel" :class="getStatusTextClass('primary')">{{ channelLabel(detailData.target_channel) }}</span>
|
||||
<span v-else>-</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="群名称">{{ detailData.group_name ?? '-' }}</el-descriptions-item>
|
||||
@ -133,9 +133,9 @@
|
||||
<el-descriptions-item label="用户ID">{{ detailData.user_id ?? '-' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="推送状态">
|
||||
<template v-if="detailData.direction === 'outbound'">
|
||||
<el-tag size="small" :type="pushStatusTagType(detailData.push_status)">
|
||||
<span :class="getStatusTextClass(pushStatusTagType(detailData.push_status))">
|
||||
{{ pushStatusLabel(detailData.push_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
<span v-else>-</span>
|
||||
</el-descriptions-item>
|
||||
@ -205,15 +205,15 @@
|
||||
>
|
||||
<el-card shadow="hover" size="small">
|
||||
<div class="thread-card-header">
|
||||
<el-tag :type="item.direction === 'inbound' ? 'primary' : 'success'" size="small">
|
||||
<span :class="getStatusTextClass(item.direction === 'inbound' ? 'primary' : 'success')">
|
||||
{{ item.direction === 'inbound' ? '收件' : '回信' }}
|
||||
</el-tag>
|
||||
<el-tag v-if="item.target_channel" size="small" style="margin-left: 8px">
|
||||
</span>
|
||||
<span v-if="item.target_channel" :class="getStatusTextClass('primary')" style="margin-left: 8px">
|
||||
{{ channelLabel(item.target_channel) }}
|
||||
</el-tag>
|
||||
<el-tag v-if="item.direction === 'outbound'" size="small" style="margin-left: 8px" :type="pushStatusTagType(item.push_status)">
|
||||
</span>
|
||||
<span v-if="item.direction === 'outbound'" :class="getStatusTextClass(pushStatusTagType(item.push_status))" style="margin-left: 8px">
|
||||
{{ pushStatusLabel(item.push_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</div>
|
||||
<div class="thread-card-body">
|
||||
<p v-if="item.content" class="thread-content-text">{{ item.content }}</p>
|
||||
@ -241,7 +241,7 @@ import {
|
||||
inboxStats,
|
||||
} from '@/api/inbox/inbox'
|
||||
import { loadStores } from '@/api/index/index'
|
||||
import { extractStoreListFromResponse, fillStoreScanFieldOptions } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { extractStoreListFromResponse, fillStoreScanFieldOptions, getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { messageAvailableFields, messageColumns } from './message-config'
|
||||
import ScanBox from '@/components/ScanBox/index.vue'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
|
||||
@ -53,9 +53,9 @@
|
||||
>
|
||||
<!-- 售后类型 -->
|
||||
<template #column-type="{ row }">
|
||||
<el-tag size="small" :type="typeTagType(row.type)">
|
||||
<span :class="getStatusTextClass(typeTagType(row.type))">
|
||||
{{ typeLabel(row.type) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<!-- 子类型 -->
|
||||
@ -65,32 +65,32 @@
|
||||
|
||||
<!-- 状态 -->
|
||||
<template #column-status="{ row }">
|
||||
<el-tag size="small" :type="statusTagType(row.status)">
|
||||
<span :class="getStatusTextClass(statusTagType(row.status))">
|
||||
{{ statusLabel(row.status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<!-- 角色组 -->
|
||||
<template #column-role_group="{ row }">
|
||||
<el-tag v-if="row.role_group" size="small" :type="roleGroupTagType(row.role_group)">
|
||||
<span v-if="row.role_group" :class="getStatusTextClass(roleGroupTagType(row.role_group))">
|
||||
{{ roleGroupLabel(row.role_group) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<!-- 仓库理赔 -->
|
||||
<template #column-claim_status="{ row }">
|
||||
<el-tag v-if="row.claim_status" size="small" :type="claimStatusTagType(row.claim_status)">
|
||||
<span v-if="row.claim_status" :class="getStatusTextClass(claimStatusTagType(row.claim_status))">
|
||||
{{ claimStatusLabel(row.claim_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
<!-- 运方理赔 -->
|
||||
<template #column-carrier_claim_status="{ row }">
|
||||
<el-tag v-if="row.carrier_claim_status" size="small" :type="claimStatusTagType(row.carrier_claim_status)">
|
||||
<span v-if="row.carrier_claim_status" :class="getStatusTextClass(claimStatusTagType(row.carrier_claim_status))">
|
||||
{{ claimStatusLabel(row.carrier_claim_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
<span v-else>-</span>
|
||||
</template>
|
||||
|
||||
@ -127,34 +127,34 @@
|
||||
<el-descriptions :column="2" border size="small">
|
||||
<el-descriptions-item label="工单号">{{ selectedRow.after_sale_no || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="售后类型">
|
||||
<el-tag size="small" :type="typeTagType(selectedRow.type)">
|
||||
<span :class="getStatusTextClass(typeTagType(selectedRow.type))">
|
||||
{{ typeLabel(selectedRow.type) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="子类型">{{ subTypeLabel(selectedRow.sub_type) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="标题">{{ selectedRow.title || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<el-tag size="small" :type="statusTagType(selectedRow.status)">
|
||||
<span :class="getStatusTextClass(statusTagType(selectedRow.status))">
|
||||
{{ statusLabel(selectedRow.status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="优先级">{{ selectedRow.priority ?? '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="角色组">
|
||||
<el-tag v-if="selectedRow.role_group" size="small" :type="roleGroupTagType(selectedRow.role_group)">
|
||||
<span v-if="selectedRow.role_group" :class="getStatusTextClass(roleGroupTagType(selectedRow.role_group))">
|
||||
{{ roleGroupLabel(selectedRow.role_group) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
<span v-else>—</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="仓库理赔">
|
||||
<el-tag v-if="selectedRow.claim_status" size="small" :type="claimStatusTagType(selectedRow.claim_status)">
|
||||
<span v-if="selectedRow.claim_status" :class="getStatusTextClass(claimStatusTagType(selectedRow.claim_status))">
|
||||
{{ claimStatusLabel(selectedRow.claim_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
<span v-else>—</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="运方理赔">
|
||||
<el-tag v-if="selectedRow.carrier_claim_status" size="small" :type="claimStatusTagType(selectedRow.carrier_claim_status)">
|
||||
<span v-if="selectedRow.carrier_claim_status" :class="getStatusTextClass(claimStatusTagType(selectedRow.carrier_claim_status))">
|
||||
{{ claimStatusLabel(selectedRow.carrier_claim_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
<span v-else>—</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="工单ID">{{ selectedRow.id ?? '—' }}</el-descriptions-item>
|
||||
@ -234,7 +234,7 @@ import {
|
||||
CLAIM_STATUS_TAG_MAP,
|
||||
} from '@/views/afterSale/list/afterSale-config'
|
||||
import { loadStores } from '@/api/index/index'
|
||||
import { extractStoreListFromResponse, fillStoreScanFieldOptions } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { extractStoreListFromResponse, fillStoreScanFieldOptions, getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import type { ToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import ScanBox from '@/components/ScanBox/index.vue'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
|
||||
@ -4077,7 +4077,8 @@ async function submitFallbackOrderFetchByIds() {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
:deep(.el-overlay-dialog > .el-dialog) {
|
||||
:deep(.el-overlay-dialog > .el-dialog.wave-fixed-height-dialog),
|
||||
:deep(.el-overlay-dialog > .el-dialog.single-fetch-dialog) {
|
||||
height: 80vh;
|
||||
max-height: 80vh;
|
||||
position: fixed;
|
||||
@ -4097,7 +4098,8 @@ async function submitFallbackOrderFetchByIds() {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
:deep(.el-overlay-dialog > .el-dialog .el-dialog__body) {
|
||||
:deep(.el-overlay-dialog > .el-dialog.wave-fixed-height-dialog .el-dialog__body),
|
||||
:deep(.el-overlay-dialog > .el-dialog.single-fetch-dialog .el-dialog__body) {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
|
||||
@ -81,19 +81,19 @@
|
||||
<span>{{ row.available_quantity ?? '—' }}</span>
|
||||
</template>
|
||||
<template #column-is_sn_mgmt="{ row }">
|
||||
<el-tag size="small" :type="row.is_sn_mgmt === 'Y' ? 'success' : 'info'">
|
||||
<span :class="getStatusTextClass(row.is_sn_mgmt === 'Y' ? 'success' : 'info')">
|
||||
{{ row.is_sn_mgmt === 'Y' ? '是' : '否' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
<template #column-is_shelf_life_mgmt="{ row }">
|
||||
<el-tag size="small" :type="row.is_shelf_life_mgmt === 'Y' ? 'success' : 'info'">
|
||||
<span :class="getStatusTextClass(row.is_shelf_life_mgmt === 'Y' ? 'success' : 'info')">
|
||||
{{ row.is_shelf_life_mgmt === 'Y' ? '是' : '否' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
<template #column-is_batch_mgmt="{ row }">
|
||||
<el-tag size="small" :type="row.is_batch_mgmt === 'Y' ? 'success' : 'info'">
|
||||
<span :class="getStatusTextClass(row.is_batch_mgmt === 'Y' ? 'success' : 'info')">
|
||||
{{ row.is_batch_mgmt === 'Y' ? '是' : '否' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
<template #column-update_at_display="{ row }">
|
||||
<span>{{ row.update_at_display || '—' }}</span>
|
||||
@ -142,19 +142,19 @@
|
||||
<span v-else>—</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="序列号管理">
|
||||
<el-tag size="small" :type="selectedRow.is_sn_mgmt === 'Y' ? 'success' : 'info'">
|
||||
<span :class="getStatusTextClass(selectedRow.is_sn_mgmt === 'Y' ? 'success' : 'info')">
|
||||
{{ selectedRow.is_sn_mgmt === 'Y' ? '是' : '否' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="效期管理">
|
||||
<el-tag size="small" :type="selectedRow.is_shelf_life_mgmt === 'Y' ? 'success' : 'info'">
|
||||
<span :class="getStatusTextClass(selectedRow.is_shelf_life_mgmt === 'Y' ? 'success' : 'info')">
|
||||
{{ selectedRow.is_shelf_life_mgmt === 'Y' ? '是' : '否' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="批次管理">
|
||||
<el-tag size="small" :type="selectedRow.is_batch_mgmt === 'Y' ? 'success' : 'info'">
|
||||
<span :class="getStatusTextClass(selectedRow.is_batch_mgmt === 'Y' ? 'success' : 'info')">
|
||||
{{ selectedRow.is_batch_mgmt === 'Y' ? '是' : '否' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="打包要求" :span="2">{{ selectedRow.packing_requirements || '—' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ selectedRow.create_at_display || '—' }}</el-descriptions-item>
|
||||
@ -264,6 +264,7 @@ import Log from '@/views/stock/stock/component/log.vue'
|
||||
import AsyncExportProgressDialog from '@/components/AsyncExportProgressDialog.vue'
|
||||
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
|
||||
import type { ToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { useAsyncExportTask } from '@/composables/useAsyncExportTask'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
|
||||
|
||||
@ -111,9 +111,9 @@
|
||||
show-overflow-tooltip
|
||||
>
|
||||
<template v-if="col.prop === 'match_status_label'" #default="{ row }">
|
||||
<el-tag size="small" :type="getReceivingCompareStatusTagType(row.match_status)">
|
||||
<span :class="getStatusTextClass(getReceivingCompareStatusTagType(row.match_status))">
|
||||
{{ row.match_status_label }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -124,6 +124,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch, onActivated } from 'vue'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import {
|
||||
getEntryDetail,
|
||||
@ -407,6 +408,8 @@ defineExpose({
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "../../../order/orderManagement/styles/order-sub.scss";
|
||||
|
||||
.entry-binding-relations {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@ -51,9 +51,9 @@
|
||||
</el-button>
|
||||
</template>
|
||||
<template #column-remaining_quantity="{ row }">
|
||||
<el-tag size="small" :type="Number(row.remaining_quantity) > 0 ? 'warning' : 'info'">
|
||||
<span :class="getStatusTextClass(Number(row.remaining_quantity) > 0 ? 'warning' : 'info')">
|
||||
{{ row.remaining_quantity ?? 0 }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
<template #column-pending_total="{ row }">
|
||||
<span>{{ row.pending_total ?? 0 }}</span>
|
||||
@ -76,6 +76,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, reactive, ref, watch, onMounted } from 'vue'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
import {
|
||||
@ -388,6 +389,8 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "../../../order/orderManagement/styles/order-sub.scss";
|
||||
|
||||
.entry-details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@ -379,12 +379,10 @@ export function canDirectInboundOperate(status: unknown): boolean {
|
||||
return !['COMPLETED', 'CANCELLED'].includes(upper) && upper !== '已完成' && upper !== '已作废'
|
||||
}
|
||||
|
||||
/** 是否允许绑定收货(仅 CREATED / 已创建 状态可操作) */
|
||||
/** 是否允许绑定收货(任意订单状态均可绑定收货单,含“已完成”;无状态值的行除外) */
|
||||
export function canBindEntryOrder(status: unknown): boolean {
|
||||
if (status === null || status === undefined || status === '') return false
|
||||
const normalized = String(status).trim()
|
||||
const upper = normalized.toUpperCase()
|
||||
return upper === 'CREATED' || normalized === '已创建'
|
||||
return true
|
||||
}
|
||||
|
||||
/** 是否允许开始入库(状态为 CREATED 且已绑定收货单) */
|
||||
|
||||
@ -58,20 +58,20 @@
|
||||
@refresh="loadData"
|
||||
>
|
||||
<template #column-order_status="{ row }">
|
||||
<el-tag :type="getEntryOrderStatusTagType(row.order_status)" size="small">
|
||||
<span :class="getStatusTextClass(getEntryOrderStatusTagType(row.order_status))">
|
||||
{{ formatEntryOrderStatus(row.order_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
<template #column-hasReceiving="{ row }">
|
||||
<el-tag size="small" :type="row.hasReceiving ? 'success' : 'info'">
|
||||
<span :class="getStatusTextClass(row.hasReceiving ? 'success' : 'info')">
|
||||
{{ row.hasReceiving ? '已绑定' : '未绑定' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-sync_status="{ row }">
|
||||
<el-tag :type="getSyncStatusType(row.sync_status)" size="small">
|
||||
<span :class="getStatusTextClass(getSyncStatusType(row.sync_status))">
|
||||
{{ translateEntryField('sync_status', row.sync_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-sync_message="{ row }">
|
||||
@ -98,9 +98,9 @@
|
||||
</template>
|
||||
|
||||
<template #column-source_type="{ row }">
|
||||
<el-tag size="small" :type="row.source_type === 'WMS' ? '' : row.source_type === 'QM' ? 'warning' : 'success'">
|
||||
<span :class="getStatusTextClass(row.source_type === 'WMS' ? 'primary' : row.source_type === 'QM' ? 'warning' : 'success')">
|
||||
{{ translateEntryField('source_type', row.source_type) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-order_create_time="{ row }">
|
||||
@ -187,6 +187,7 @@ import WarehouseSelect from '@/components/WarehouseSelect.vue'
|
||||
import AsyncExportProgressDialog from '@/components/AsyncExportProgressDialog.vue'
|
||||
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
|
||||
import type { ToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { useAsyncExportTask } from '@/composables/useAsyncExportTask'
|
||||
import * as indexApi from '@/api/index/index'
|
||||
import * as entryApi from '@/api/storage.entry/entry'
|
||||
|
||||
@ -62,7 +62,7 @@ export const columns = [
|
||||
{ prop: 'created_at', label: '流水时间', width: 160, sortable: true },
|
||||
{ prop: 'transaction_type', label: '流水类型', width: 90 },
|
||||
{ prop: 'stock_id', label: '商品ID', width: 90, copyAction: 'copy' as const },
|
||||
{ prop: 'store_id', label: '货主ID', width: 90 },
|
||||
// { prop: 'store_id', label: '货主ID', width: 90 },
|
||||
{ prop: 'warehouse_id', label: '仓库ID', width: 90 },
|
||||
{ prop: 'stock_quantity', label: '库存变动', width: 90 },
|
||||
{ prop: 'lock_quantity', label: '锁定变动', width: 90 },
|
||||
|
||||
@ -57,21 +57,21 @@
|
||||
@refresh="loadData"
|
||||
>
|
||||
<template #column-status="{ row }">
|
||||
<el-tag v-if="row.status" :type="statusTagType(row.status)" size="small">
|
||||
<span v-if="row.status" :class="getStatusTextClass(statusTagType(row.status))">
|
||||
{{ statusText(row.status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-detail_status="{ row }">
|
||||
<el-tag v-if="row.detail_status" :type="detailStatusTagType(row.detail_status)" size="small">
|
||||
<span v-if="row.detail_status" :class="getStatusTextClass(detailStatusTagType(row.detail_status))">
|
||||
{{ detailStatusText(row.detail_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-storage_status="{ row }">
|
||||
<el-tag v-if="row.storage_status" :type="storageStatusTagType(row.storage_status)" size="small">
|
||||
<span v-if="row.storage_status" :class="getStatusTextClass(storageStatusTagType(row.storage_status))">
|
||||
{{ storageStatusText(row.storage_status) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-delivery_method="{ row }">
|
||||
@ -157,6 +157,7 @@ import WarehouseSelect from '@/components/WarehouseSelect.vue'
|
||||
import AsyncExportProgressDialog from '@/components/AsyncExportProgressDialog.vue'
|
||||
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
|
||||
import type { ToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { useAsyncExportTask } from '@/composables/useAsyncExportTask'
|
||||
import * as indexApi from '@/api/index/index'
|
||||
import * as receivingApi from '@/api/storage_receiving/receiving'
|
||||
|
||||
@ -192,7 +192,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, computed } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { storeWarehouseWarehouseList } from '@/api/storeWarehouse.warehouse/storeWarehouse'
|
||||
import { storeWarehouseWarehouseList } from '@/api/storewarehouse.warehouse/storeWarehouse'
|
||||
import { storeWarehouseUnbind, storeWarehouseRename, storeWarehouseConfirmSign } from '@/api/storewarehouse.store/storeWarehouse'
|
||||
import ScanBox from '@/components/ScanBox/index.vue'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
|
||||
@ -2186,8 +2186,8 @@ async function submitOpenAccount() {
|
||||
// 仅提交非空值
|
||||
const optionalFields = [
|
||||
'password', 'real_name', 'business_license', 'contact_phone',
|
||||
'legal_person', 'contact_email', 'address', 'industry', 'logo_url',
|
||||
'domain', 'auth_start', 'auth_end', 'apply_reason', 'store_remask', 'warehouse_remask'
|
||||
'legal_person', 'contact_email', 'address', 'industry',
|
||||
'auth_start', 'auth_end', 'apply_reason', 'store_remask', 'warehouse_remask'
|
||||
]
|
||||
for (const field of optionalFields) {
|
||||
const val = openAccountForm[field]
|
||||
|
||||
@ -93,8 +93,6 @@ export const openAccountFormDefault = {
|
||||
contact_email: '',
|
||||
address: '',
|
||||
industry: '',
|
||||
logo_url: '',
|
||||
domain: '',
|
||||
auth_start: '',
|
||||
auth_end: '',
|
||||
print_quantity: 0,
|
||||
|
||||
@ -12,9 +12,7 @@
|
||||
<slot />
|
||||
</template>
|
||||
<template v-else-if="config.type === 'tag'">
|
||||
<el-tag size="small" :type="resolvedTagType">
|
||||
{{ displayValue }}
|
||||
</el-tag>
|
||||
<span :class="statusTextClass">{{ displayValue }}</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span>{{ displayValue }}</span>
|
||||
@ -25,6 +23,7 @@
|
||||
import { computed } from 'vue'
|
||||
import type { ColumnSlotConfig } from '../config/template-config'
|
||||
import { TAG_RESOLVERS, translate, formatTime } from '../config/template-config'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
defineOptions({ name: 'ColumnCellRenderer' })
|
||||
|
||||
@ -61,5 +60,12 @@ const resolvedTagType = computed(() => {
|
||||
// 最后使用固定值
|
||||
return (typeof tagType === 'string' ? tagType : 'info')
|
||||
})
|
||||
|
||||
/** 轻量状态文字 class(替代 el-tag) */
|
||||
const statusTextClass = computed(() => getStatusTextClass(resolvedTagType.value))
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "../../../../../order/orderManagement/styles/order-sub.scss";
|
||||
</style>
|
||||
|
||||
|
||||
@ -21,9 +21,9 @@
|
||||
>
|
||||
<!-- tag 渲染 -->
|
||||
<template v-if="field.renderType === 'tag'">
|
||||
<el-tag size="small" :type="resolveTagType(field, getRowData()?.[field.key])">
|
||||
<span :class="getStatusTextClass(resolveTagType(field, getRowData()?.[field.key]))">
|
||||
{{ resolveDisplayValue(field, getRowData()?.[field.key]) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
<!-- pre 渲染 -->
|
||||
<template v-else-if="field.renderType === 'pre'">
|
||||
@ -44,6 +44,7 @@
|
||||
import { ref, watch } from 'vue'
|
||||
import { TAG_RESOLVERS, translate, formatTime } from '../template-config'
|
||||
import type { DetailSectionConfig, DetailFieldConfig } from '../template-config'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
defineOptions({ name: 'DetailPanel' })
|
||||
|
||||
@ -128,6 +129,7 @@ function resolveTagType(field: DetailFieldConfig, value: any): string {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "../../../../../../order/orderManagement/styles/order-sub.scss";
|
||||
/* 容器对齐 order/orderManagement 的 OrderDetailPanel(.order-detail-view) */
|
||||
.detail-panel {
|
||||
flex: 1;
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
<el-table-column prop="action" label="操作类型" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column label="结果" width="90" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag size="small" :type="resultTagType(row)">{{ row.result }}</el-tag>
|
||||
<span :class="getStatusTextClass(resultTagType(row))">{{ row.result }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="说明" min-width="220" show-overflow-tooltip>
|
||||
@ -48,6 +48,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
defineOptions({ name: 'LogPanel' })
|
||||
|
||||
@ -160,6 +161,7 @@ const logs = computed<LogItem[]>(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "../../../../../../order/orderManagement/styles/order-sub.scss";
|
||||
/* 对齐 order/orderManagement 的 log.vue(el-table 表格 + 本地分页) */
|
||||
.log-panel {
|
||||
flex: 1;
|
||||
|
||||
@ -50,15 +50,15 @@
|
||||
<el-table-column label="路径 (Path)" prop="path" min-width="220" show-overflow-tooltip />
|
||||
<el-table-column label="类型" prop="type" width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="permissionTypeTagMap[row.type] || 'info'" size="small">{{ permissionTypeNameMap[row.type] || row.type }}</el-tag>
|
||||
<span :class="getStatusTextClass(permissionTypeTagMap[row.type] || 'info')">{{ permissionTypeNameMap[row.type] || row.type }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序" prop="sort" width="80" align="center" />
|
||||
<el-table-column label="状态" prop="status" width="90" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.status === 1 ? 'success' : 'danger'" size="small">
|
||||
<span :class="getStatusTextClass(row.status === 1 ? 'success' : 'danger')">
|
||||
{{ row.status === 1 ? '启用' : '禁用' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="220" align="center" fixed="right">
|
||||
@ -206,6 +206,7 @@ import { ref, reactive, computed, onMounted } from 'vue'
|
||||
import { permissionList, permissionAdd, permissionUpdate, permissionDelete } from '@/api/setting.permission/permission'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import {
|
||||
permissionRules,
|
||||
defaultCreateTemp,
|
||||
@ -510,6 +511,8 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "../../../order/orderManagement/styles/order-sub.scss";
|
||||
|
||||
.permission-container {
|
||||
height: calc(100vh - 84px);
|
||||
display: flex;
|
||||
|
||||
@ -13,9 +13,9 @@
|
||||
<div class="row">
|
||||
<div class="name">{{ p.name }}</div>
|
||||
<div class="meta">
|
||||
<el-tag :type="p.status === 'online' ? 'success' : 'danger'" size="small">
|
||||
<span :class="getStatusTextClass(p.status === 'online' ? 'success' : 'danger')">
|
||||
{{ p.status === 'online' ? '在线' : '离线' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</div>
|
||||
<div class="default" v-if="p.is_default">(默认)</div>
|
||||
</div>
|
||||
@ -30,6 +30,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
const props = defineProps<{ id: string | number | null }>()
|
||||
|
||||
@ -94,7 +95,9 @@ watch(() => props.id, (val) => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
@use "../../../../order/orderManagement/styles/order-sub.scss";
|
||||
|
||||
.component-list-detail {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
@ -11,9 +11,9 @@
|
||||
<div class="title">{{ comp.name }}</div>
|
||||
<div class="meta">IP: {{ comp.ip }}</div>
|
||||
<div class="status">
|
||||
<el-tag :type="comp.status === 'online' ? 'success' : 'danger'" size="small">
|
||||
<span :class="getStatusTextClass(comp.status === 'online' ? 'success' : 'danger')">
|
||||
{{ comp.status === 'online' ? '在线' : '离线' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</div>
|
||||
<div class="selected" v-if="props.id && String(props.id) === String(comp.id)">(已选中)</div>
|
||||
</div>
|
||||
@ -27,6 +27,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
const props = defineProps<{ id: string | number | null }>()
|
||||
|
||||
@ -79,7 +80,9 @@ onMounted(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
@use "../../../../order/orderManagement/styles/order-sub.scss";
|
||||
|
||||
.print-computer-detail {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
@ -12,9 +12,7 @@
|
||||
<slot />
|
||||
</template>
|
||||
<template v-else-if="config.type === 'tag'">
|
||||
<el-tag size="small" :type="resolvedTagType">
|
||||
{{ displayValue }}
|
||||
</el-tag>
|
||||
<span :class="statusTextClass">{{ displayValue }}</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span>{{ displayValue }}</span>
|
||||
@ -25,6 +23,7 @@
|
||||
import { computed } from 'vue'
|
||||
import type { ColumnSlotConfig } from '../config/template-config'
|
||||
import { TAG_RESOLVERS, translate, formatTime } from '../config/template-config'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
defineOptions({ name: 'ColumnCellRenderer' })
|
||||
|
||||
@ -61,5 +60,12 @@ const resolvedTagType = computed(() => {
|
||||
// 最后使用固定值
|
||||
return (typeof tagType === 'string' ? tagType : 'info')
|
||||
})
|
||||
|
||||
/** 轻量状态文字 class(替代 el-tag) */
|
||||
const statusTextClass = computed(() => getStatusTextClass(resolvedTagType.value))
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "../../../../order/orderManagement/styles/order-sub.scss";
|
||||
</style>
|
||||
|
||||
|
||||
@ -21,9 +21,9 @@
|
||||
>
|
||||
<!-- tag 渲染 -->
|
||||
<template v-if="field.renderType === 'tag'">
|
||||
<el-tag size="small" :type="resolveTagType(field, getRowData()?.[field.key])">
|
||||
<span :class="getStatusTextClass(resolveTagType(field, getRowData()?.[field.key]))">
|
||||
{{ resolveDisplayValue(field, getRowData()?.[field.key]) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
<!-- pre 渲染 -->
|
||||
<template v-else-if="field.renderType === 'pre'">
|
||||
@ -44,6 +44,7 @@
|
||||
import { ref, watch } from 'vue'
|
||||
import { TAG_RESOLVERS, translate } from '../template-config'
|
||||
import type { DetailSectionConfig, DetailFieldConfig } from '../template-config'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
defineOptions({ name: 'DetailPanel' })
|
||||
|
||||
@ -111,6 +112,8 @@ function resolveTagType(field: DetailFieldConfig, value: any): string {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "../../../../../order/orderManagement/styles/order-sub.scss";
|
||||
|
||||
.detail-panel {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
@ -17,9 +17,7 @@
|
||||
<div class="log-header">
|
||||
<span class="log-operator">{{ log.operator }}</span>
|
||||
<span class="log-action">{{ log.action }}</span>
|
||||
<el-tag v-if="log.result === '成功'" size="small" type="success">成功</el-tag>
|
||||
<el-tag v-else-if="log.result === '失败'" size="small" type="danger">失败</el-tag>
|
||||
<el-tag v-else size="small" type="info">{{ log.result }}</el-tag>
|
||||
<span :class="getStatusTextClass(resolveLogResultTag(log.result))">{{ log.result }}</span>
|
||||
</div>
|
||||
<div v-if="log.detail" class="log-detail">{{ log.detail }}</div>
|
||||
<div class="log-time">{{ log.time }}</div>
|
||||
@ -31,6 +29,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
defineOptions({ name: 'LogPanel' })
|
||||
|
||||
@ -43,6 +42,13 @@ interface LogItem {
|
||||
level: 'success' | 'info' | 'warning' | 'error'
|
||||
}
|
||||
|
||||
/** 将日志结果映射为 el-tag type → 状态色 */
|
||||
function resolveLogResultTag(result: string): string {
|
||||
if (result === '成功') return 'success'
|
||||
if (result === '失败') return 'danger'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
/** 当前选中行数据(用于生成关联日志) */
|
||||
row: Record<string, any> | null
|
||||
@ -128,6 +134,8 @@ const logs = computed<LogItem[]>(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "../../../../../order/orderManagement/styles/order-sub.scss";
|
||||
|
||||
.log-panel {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
@ -54,9 +54,9 @@
|
||||
<el-table-column label="描述" prop="description" min-width="160" show-overflow-tooltip />
|
||||
<el-table-column label="状态" prop="status" width="80" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="row.status === 1 ? 'success' : 'danger'" size="small">
|
||||
<span :class="getStatusTextClass(row.status === 1 ? 'success' : 'danger')">
|
||||
{{ row.status === 1 ? '启用' : '停用' }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="210" align="center" fixed="right">
|
||||
@ -179,7 +179,7 @@
|
||||
<el-table-column label="路径" prop="path" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column label="类型" prop="type" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="permissionTypeTagMap[row.type] || 'info'" size="small">{{ permissionTypeNameMap[row.type] || row.type }}</el-tag>
|
||||
<span :class="getStatusTextClass(permissionTypeTagMap[row.type] || 'info')">{{ permissionTypeNameMap[row.type] || row.type }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -199,6 +199,7 @@ import { ref, reactive, computed, onMounted, nextTick } from 'vue'
|
||||
import { roleList, roleAdd, roleDelete, roleUpdate, permissionroleList } from '@/api/setting.role/role'
|
||||
import { permissionList } from '@/api/setting.permission/permission'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import {
|
||||
roleRules,
|
||||
defaultRoleTemp,
|
||||
@ -628,6 +629,7 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@use "../../../order/orderManagement/styles/order-sub.scss";
|
||||
.role-container {
|
||||
height: calc(100vh - 84px);
|
||||
display: flex;
|
||||
|
||||
@ -29,6 +29,36 @@ export const WEIGHT_TYPE_MAP: Record<number, string> = {
|
||||
3: '冷链'
|
||||
}
|
||||
|
||||
function pad2(n: number): string {
|
||||
return String(n).padStart(2, '0')
|
||||
}
|
||||
|
||||
/** 格式化时间显示:兼容秒/毫秒时间戳、ISO/带 T 字符串、已格式化字符串;无效值返回 '--' */
|
||||
export function formatDateTime(value: unknown): string {
|
||||
if (value === null || value === undefined || value === '') return '--'
|
||||
|
||||
const text = String(value).trim()
|
||||
// 已是 YYYY-MM-DD HH:mm:ss(或带 T 的 ISO),直接规整为 YYYY-MM-DD HH:mm:ss
|
||||
if (/^\d{4}-\d{2}-\d{2}/.test(text)) {
|
||||
return text.replace('T', ' ').slice(0, 19) || '--'
|
||||
}
|
||||
|
||||
let ts: number
|
||||
if (/^\d+$/.test(text)) {
|
||||
ts = Number(text)
|
||||
} else {
|
||||
const date = new Date(text)
|
||||
if (Number.isNaN(date.getTime())) return text
|
||||
return `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())} ${pad2(date.getHours())}:${pad2(date.getMinutes())}:${pad2(date.getSeconds())}`
|
||||
}
|
||||
|
||||
if (!Number.isFinite(ts) || ts <= 0) return text
|
||||
// 秒级时间戳(10 位)放大到毫秒
|
||||
const date = new Date(ts < 1e12 ? ts * 1000 : ts)
|
||||
if (Number.isNaN(date.getTime())) return text
|
||||
return `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())} ${pad2(date.getHours())}:${pad2(date.getMinutes())}:${pad2(date.getSeconds())}`
|
||||
}
|
||||
|
||||
export const storeExpressBindingPolicyColumns = [
|
||||
{ prop: 'id', label: 'ID', width: '80', sortable: true },
|
||||
{ prop: 'custom_name', label: '策略名称', minWidth: '160', showOverflowTooltip: true },
|
||||
@ -44,8 +74,8 @@ export const storeExpressBindingPolicyColumns = [
|
||||
{ prop: 'priority', label: '优先级', width: '90' },
|
||||
{ prop: 'is_enabled', label: '状态', width: '100' },
|
||||
{ prop: 'remark', label: '备注', minWidth: '160', showOverflowTooltip: true },
|
||||
{ prop: 'created_at', label: '创建时间', minWidth: '160' },
|
||||
{ prop: 'updated_at', label: '更新时间', minWidth: '160' },
|
||||
{ prop: 'created_at', label: '创建时间', minWidth: '160', formatter: (row: any) => formatDateTime(row.created_at) },
|
||||
{ prop: 'updated_at', label: '更新时间', minWidth: '160', formatter: (row: any) => formatDateTime(row.updated_at) },
|
||||
{ prop: 'actions', label: '操作', width: '180', fixed: 'right' }
|
||||
]
|
||||
|
||||
|
||||
@ -46,16 +46,17 @@
|
||||
@refresh="loadList"
|
||||
>
|
||||
<template #column-status="{ row }">
|
||||
<el-tag :type="formatWorkbenchStatus(row.status).type" size="small">
|
||||
<span :class="getStatusTextClass(formatWorkbenchStatus(row.status).type)">
|
||||
{{ formatWorkbenchStatus(row.status).text }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template #column-device_ids="{ row }">
|
||||
<el-tag v-if="Array.isArray(row.device_ids) && row.device_ids.length > 0" type="success" size="small">
|
||||
已绑定 {{ row.device_ids.length }} 个
|
||||
</el-tag>
|
||||
<el-tag v-else type="info" size="small">未绑定</el-tag>
|
||||
<span
|
||||
v-if="Array.isArray(row.device_ids) && row.device_ids.length > 0"
|
||||
:class="getStatusTextClass('success')"
|
||||
>已绑定 {{ row.device_ids.length }} 个</span>
|
||||
<span v-else :class="getStatusTextClass('info')">未绑定</span>
|
||||
</template>
|
||||
|
||||
<template #column-created_at="{ row }">
|
||||
@ -134,9 +135,9 @@
|
||||
<el-descriptions-item label="名称">{{ detailData.name || '--' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="条码">{{ detailData.barcode || '--' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="状态">
|
||||
<el-tag :type="formatWorkbenchStatus(detailData.status).type" size="small">
|
||||
<span :class="getStatusTextClass(formatWorkbenchStatus(detailData.status).type)">
|
||||
{{ formatWorkbenchStatus(detailData.status).text }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">{{ detailData.remark || '--' }}</el-descriptions-item>
|
||||
<el-descriptions-item label="创建时间">{{ formatTime(detailData.created_at) }}</el-descriptions-item>
|
||||
@ -283,7 +284,10 @@ import type { FormInstance, FormRules } from 'element-plus'
|
||||
import ScanBox from '@/components/ScanBox/index.vue'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
|
||||
import type { ToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import {
|
||||
getStatusTextClass,
|
||||
type ToolbarButtonConfig
|
||||
} from '@/views/order/orderManagement/config/order-common-config'
|
||||
import {
|
||||
list as workbenchList,
|
||||
detail as workbenchDetail,
|
||||
|
||||
@ -12,9 +12,7 @@
|
||||
<slot />
|
||||
</template>
|
||||
<template v-else-if="config.type === 'tag'">
|
||||
<el-tag size="small" :type="resolvedTagType">
|
||||
{{ displayValue }}
|
||||
</el-tag>
|
||||
<span :class="statusTextClass">{{ displayValue }}</span>
|
||||
</template>
|
||||
<template v-else>
|
||||
<span>{{ displayValue }}</span>
|
||||
@ -25,6 +23,7 @@
|
||||
import { computed } from 'vue'
|
||||
import type { ColumnSlotConfig } from '../config/template-config'
|
||||
import { TAG_RESOLVERS, translate, formatTime } from '../config/template-config'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
defineOptions({ name: 'ColumnCellRenderer' })
|
||||
|
||||
@ -61,5 +60,12 @@ const resolvedTagType = computed(() => {
|
||||
// 最后使用固定值
|
||||
return (typeof tagType === 'string' ? tagType : 'info')
|
||||
})
|
||||
|
||||
/** 轻量状态文字 class(替代 el-tag) */
|
||||
const statusTextClass = computed(() => getStatusTextClass(resolvedTagType.value))
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "../../../../order/orderManagement/styles/order-sub.scss";
|
||||
</style>
|
||||
|
||||
|
||||
@ -21,9 +21,9 @@
|
||||
>
|
||||
<!-- tag 渲染 -->
|
||||
<template v-if="field.renderType === 'tag'">
|
||||
<el-tag size="small" :type="resolveTagType(field, getRowData()?.[field.key])">
|
||||
<span :class="getStatusTextClass(resolveTagType(field, getRowData()?.[field.key]))">
|
||||
{{ resolveDisplayValue(field, getRowData()?.[field.key]) }}
|
||||
</el-tag>
|
||||
</span>
|
||||
</template>
|
||||
<!-- pre 渲染 -->
|
||||
<template v-else-if="field.renderType === 'pre'">
|
||||
@ -44,6 +44,7 @@
|
||||
import { ref, watch } from 'vue'
|
||||
import { TAG_RESOLVERS, translate } from '../template-config'
|
||||
import type { DetailSectionConfig, DetailFieldConfig } from '../template-config'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
defineOptions({ name: 'DetailPanel' })
|
||||
|
||||
@ -111,6 +112,8 @@ function resolveTagType(field: DetailFieldConfig, value: any): string {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "../../../../../order/orderManagement/styles/order-sub.scss";
|
||||
|
||||
.detail-panel {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
@ -17,9 +17,7 @@
|
||||
<div class="log-header">
|
||||
<span class="log-operator">{{ log.operator }}</span>
|
||||
<span class="log-action">{{ log.action }}</span>
|
||||
<el-tag v-if="log.result === '成功'" size="small" type="success">成功</el-tag>
|
||||
<el-tag v-else-if="log.result === '失败'" size="small" type="danger">失败</el-tag>
|
||||
<el-tag v-else size="small" type="info">{{ log.result }}</el-tag>
|
||||
<span :class="getStatusTextClass(resolveLogResultTag(log.result))">{{ log.result }}</span>
|
||||
</div>
|
||||
<div v-if="log.detail" class="log-detail">{{ log.detail }}</div>
|
||||
<div class="log-time">{{ log.time }}</div>
|
||||
@ -31,6 +29,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
defineOptions({ name: 'LogPanel' })
|
||||
|
||||
@ -43,6 +42,13 @@ interface LogItem {
|
||||
level: 'success' | 'info' | 'warning' | 'error'
|
||||
}
|
||||
|
||||
/** 将日志结果映射为 el-tag type → 状态色 */
|
||||
function resolveLogResultTag(result: string): string {
|
||||
if (result === '成功') return 'success'
|
||||
if (result === '失败') return 'danger'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
const props = defineProps<{
|
||||
/** 当前选中行数据(用于生成关联日志) */
|
||||
row: Record<string, any> | null
|
||||
@ -128,6 +134,8 @@ const logs = computed<LogItem[]>(() => {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@use "../../../../../order/orderManagement/styles/order-sub.scss";
|
||||
|
||||
.log-panel {
|
||||
padding: 8px 0;
|
||||
}
|
||||
|
||||
@ -95,10 +95,11 @@
|
||||
/>
|
||||
<!-- device_ids 列:显示绑定数量 -->
|
||||
<template v-else-if="colProp === 'device_ids'">
|
||||
<el-tag v-if="Array.isArray(row.device_ids) && row.device_ids.length > 0" type="success" size="small">
|
||||
已绑定 {{ row.device_ids.length }} 个
|
||||
</el-tag>
|
||||
<el-tag v-else type="info" size="small">未绑定</el-tag>
|
||||
<span
|
||||
v-if="Array.isArray(row.device_ids) && row.device_ids.length > 0"
|
||||
:class="getStatusTextClass('success')"
|
||||
>已绑定 {{ row.device_ids.length }} 个</span>
|
||||
<span v-else :class="getStatusTextClass('info')">未绑定</span>
|
||||
</template>
|
||||
<!-- login_code 列:展示登录码并提供二维码查看 -->
|
||||
<template v-else-if="colProp === 'login_code'">
|
||||
@ -513,6 +514,7 @@ import ColumnCellRenderer from './components/ColumnCellRenderer.vue'
|
||||
import OperationCellRenderer from './components/OperationCellRenderer.vue'
|
||||
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
|
||||
import type { ToolbarButtonConfig as OrderToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { getStatusTextClass } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import {
|
||||
list as workbenchList,
|
||||
detail as workbenchDetail,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user