1
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
"dependencies": {
|
||||
"@chongchong/shared": "link:./shared",
|
||||
"axios": "^1.18.1",
|
||||
"dayjs": "^1.11.21",
|
||||
"element-plus": "^2.14.3",
|
||||
"@lucide/vue": "^1.27.0",
|
||||
"pinia": "^4.0.2",
|
||||
|
||||
Generated
+3
@@ -17,6 +17,9 @@ importers:
|
||||
axios:
|
||||
specifier: ^1.18.1
|
||||
version: 1.18.1(debug@4.4.3)
|
||||
dayjs:
|
||||
specifier: ^1.11.21
|
||||
version: 1.11.21
|
||||
element-plus:
|
||||
specifier: ^2.14.3
|
||||
version: 2.14.3(vue@3.5.40(typescript@5.9.3))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { createApp } from 'vue'
|
||||
import { h } from 'vue'
|
||||
import 'dayjs/locale/zh-cn'
|
||||
import { createPinia } from 'pinia'
|
||||
import { ElConfigProvider } from 'element-plus'
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||||
|
||||
@@ -131,6 +131,7 @@ export interface MerchantUnifiedOrderQuery {
|
||||
keyword?: string
|
||||
fbaCode?: string
|
||||
orderNo?: string
|
||||
inboundCode?: string
|
||||
mainStatus?: ApiUnifiedOrderMainStatus
|
||||
receivingWarehouseId?: number | string
|
||||
destinationWarehouseId?: number | string
|
||||
|
||||
@@ -100,6 +100,7 @@ test('routes supported filters to C02 without sending DRAFT as a main status', (
|
||||
assert.match(storeSource, /interface ClientOrderReadQuery extends MerchantUnifiedOrderQuery/)
|
||||
assert.match(storeSource, /if \(query\.draftOnly\)/)
|
||||
assert.match(storeSource, /const unifiedQuery: MerchantUnifiedOrderQuery/)
|
||||
assert.match(storeSource, /inboundCode: query\.inboundCode/)
|
||||
assert.match(storeSource, /getMerchantUnifiedOrders\(unifiedQuery\)/)
|
||||
})
|
||||
|
||||
|
||||
@@ -461,6 +461,7 @@ async function getOrdersForClient(query: ClientOrderReadQuery = {}): Promise<Ord
|
||||
mainStatus: query.mainStatus,
|
||||
receivingWarehouseId: query.receivingWarehouseId,
|
||||
destinationWarehouseId: query.destinationWarehouseId,
|
||||
inboundCode: query.inboundCode,
|
||||
createdFrom: query.createdFrom,
|
||||
createdTo: query.createdTo,
|
||||
fbaCode: query.fbaCode,
|
||||
|
||||
@@ -122,8 +122,8 @@ test('requires FBA warehouse and cargo-level shipment, reference, SKU and UPC fi
|
||||
assert.ok(errors.includes('FBA 订单请填写 Amazon 仓库编码'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少客户 SKU'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少 UPC'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少 Shipment ID'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少 Reference ID'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少货件编号'))
|
||||
assert.ok(errors.includes('第 1 条货物缺少跟踪编号'))
|
||||
})
|
||||
|
||||
test('requires public destination ids while keeping private addresses detached from public warehouses', () => {
|
||||
|
||||
@@ -123,8 +123,8 @@ export function validateFirstLegOrderDraft(draft: FirstLegOrderDraft) {
|
||||
if (!item.packageType.trim()) errors.push(`${line}缺少包装类型`)
|
||||
if (draft.destinationType === 'FBA' && !item.sku.trim()) errors.push(`${line}缺少客户 SKU`)
|
||||
if (draft.destinationType === 'FBA' && !item.upc.trim()) errors.push(`${line}缺少 UPC`)
|
||||
if (draft.destinationType === 'FBA' && !item.shipmentId.trim()) errors.push(`${line}缺少 Shipment ID`)
|
||||
if (draft.destinationType === 'FBA' && !item.referenceId.trim()) errors.push(`${line}缺少 Reference ID`)
|
||||
if (draft.destinationType === 'FBA' && !item.shipmentId.trim()) errors.push(`${line}缺少货件编号`)
|
||||
if (draft.destinationType === 'FBA' && !item.referenceId.trim()) errors.push(`${line}缺少跟踪编号`)
|
||||
if (!Number.isInteger(item.pieces) || item.pieces <= 0) errors.push(`${line}件数必须为正整数`)
|
||||
if (!Number.isInteger(item.packageCount) || item.packageCount <= 0) errors.push(`${line}箱数必须为正整数`)
|
||||
if (!Number.isInteger(item.unitsPerPackage) || item.unitsPerPackage <= 0) errors.push(`${line}每箱数量必须为正整数`)
|
||||
|
||||
@@ -1544,7 +1544,8 @@ async function searchOrders(model: QueryModel) {
|
||||
const cargoKeyword = typeof model.cargoKeyword === 'string' ? model.cargoKeyword.trim() : ''
|
||||
const range = Array.isArray(createdRange) ? createdRange.filter((value): value is string => typeof value === 'string') : []
|
||||
const query = {
|
||||
keyword: cargoKeyword || undefined,
|
||||
keyword: undefined,
|
||||
inboundCode: cargoKeyword || undefined,
|
||||
orderNo: orderNo || undefined,
|
||||
receivingWarehouseId: typeof model.receivingWarehouseId === 'string' && model.receivingWarehouseId ? model.receivingWarehouseId : undefined,
|
||||
mainStatus: statusValue && statusValue !== 'DRAFT' ? statusValue : undefined,
|
||||
@@ -1554,9 +1555,9 @@ async function searchOrders(model: QueryModel) {
|
||||
createdTo: range[1] ? `${range[1]}T23:59:59` : undefined,
|
||||
}
|
||||
await store.load(query)
|
||||
const cargoMatched = cargoKeyword && store.orders.some((order) => orderMatchesCargoKeyword(order, cargoKeyword))
|
||||
const cargoMatched = cargoKeyword && store.orders.some((order) => order.status !== 'DRAFT' && orderMatchesCargoKeyword(order, cargoKeyword))
|
||||
if (cargoKeyword && !cargoMatched && statusValue !== 'DRAFT') {
|
||||
await store.load({ ...query, keyword: undefined, fbaCode: cargoKeyword })
|
||||
await store.load({ ...query, keyword: undefined, inboundCode: undefined, fbaCode: cargoKeyword })
|
||||
}
|
||||
selectedOrders.value = []
|
||||
orderTableVersion.value += 1
|
||||
|
||||
@@ -36,7 +36,7 @@ export interface MerchantQualification {
|
||||
tenantId: number | string
|
||||
qualificationType: MerchantQualificationType
|
||||
certificateNo: string | null
|
||||
documentUrl: string
|
||||
documentUrl?: string | null
|
||||
validTo: string | null
|
||||
status: QualificationStatus
|
||||
reviewComment: string | null
|
||||
|
||||
@@ -135,20 +135,23 @@ export const useTenantAdministrationStore = defineStore('tenant-administration',
|
||||
registeredAddress: profile.registeredAddress ?? '',
|
||||
auditStatus: profile.status,
|
||||
}
|
||||
qualifications.value = qualificationRecords.map((item) => ({
|
||||
qualifications.value = qualificationRecords.map((item) => {
|
||||
const documentUrl = typeof item.documentUrl === 'string' ? item.documentUrl : ''
|
||||
return {
|
||||
id: String(item.id),
|
||||
type: ({
|
||||
BUSINESS_LICENSE: '营业执照',
|
||||
LEGAL_PERSON_ID: '法人身份证',
|
||||
FREIGHT_FORWARDER_CERTIFICATE: '货代资质证书',
|
||||
BANK_ACCOUNT_LICENSE: '银行开户许可证',
|
||||
} as const)[item.qualificationType],
|
||||
fileName: item.documentUrl.split('/').pop() || '资质文件',
|
||||
} as const)[item.qualificationType] || '企业资质',
|
||||
fileName: documentUrl.split('/').pop() || '资质文件',
|
||||
status: normalizeQualificationStatus(item.status),
|
||||
expiresAt: item.validTo || '长期有效',
|
||||
updatedAt: '-',
|
||||
documentUrl: item.documentUrl,
|
||||
}))
|
||||
documentUrl,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function mapMerchantRole(role: MerchantRole): TenantRole {
|
||||
|
||||
Reference in New Issue
Block a user