支持 khhao 快手双店铺ID匹配
This commit is contained in:
@@ -378,6 +378,7 @@ export interface AdminKuaishouCloudFulfillmentItem {
|
||||
provider: string
|
||||
platform: string
|
||||
shopId: string
|
||||
khhaoShopId: string
|
||||
internalSkuCode: string
|
||||
internalSkuName: string
|
||||
externalSkuCode: string
|
||||
|
||||
@@ -99,6 +99,7 @@ function createEmptyItem(): EditableItem {
|
||||
provider: 'khhao',
|
||||
platform: 'kuaishou',
|
||||
shopId: '',
|
||||
khhaoShopId: '',
|
||||
internalSkuCode: '',
|
||||
internalSkuName: '',
|
||||
externalSkuCode: '',
|
||||
@@ -128,6 +129,7 @@ function mapEditableItem(item: AdminKuaishouCloudFulfillmentItem): EditableItem
|
||||
provider: item.provider || 'khhao',
|
||||
platform: item.platform || 'kuaishou',
|
||||
shopId: item.shopId || '',
|
||||
khhaoShopId: item.khhaoShopId || '',
|
||||
internalSkuCode: item.internalSkuCode || '',
|
||||
internalSkuName: item.internalSkuName || '',
|
||||
externalSkuCode: item.externalSkuCode || '',
|
||||
@@ -156,6 +158,7 @@ function mapSaveItem(item: EditableItem): AdminKuaishouCloudFulfillmentItem {
|
||||
provider: item.provider.trim() || 'khhao',
|
||||
platform: item.platform.trim() || 'kuaishou',
|
||||
shopId: item.shopId.trim(),
|
||||
khhaoShopId: item.khhaoShopId.trim(),
|
||||
internalSkuCode: item.internalSkuCode.trim(),
|
||||
internalSkuName: item.internalSkuName.trim(),
|
||||
externalSkuCode: item.externalSkuCode.trim(),
|
||||
@@ -193,6 +196,7 @@ function hasMeaningfulContent(item: EditableItem) {
|
||||
|| item.cloudSkuName.trim()
|
||||
|| item.vnKey.trim()
|
||||
|| item.shopId.trim()
|
||||
|| item.khhaoShopId.trim()
|
||||
|| item.notes.trim()
|
||||
|| item.provider.trim() !== 'khhao'
|
||||
|| item.platform.trim() !== 'kuaishou'
|
||||
@@ -398,6 +402,7 @@ function createItemFromKhhaoOrder(item: AdminKhhaoOrderPreview): EditableItem {
|
||||
provider: item.provider || 'khhao',
|
||||
platform: item.platform || 'kuaishou',
|
||||
shopId: item.kuaishouShopId || item.shopId || '',
|
||||
khhaoShopId: item.khhaoShopId || item.shopId || '',
|
||||
internalSkuCode: '',
|
||||
internalSkuName: item.itemTitle || '',
|
||||
externalSkuCode: item.skuCode || '',
|
||||
@@ -425,7 +430,10 @@ function findExistingItemFromKhhaoOrder(order: AdminKhhaoOrderPreview) {
|
||||
const orderTitle = String(order.itemTitle || '').trim()
|
||||
|
||||
return items.value.find((item) => {
|
||||
const sameShop = !orderShopId || item.shopId.trim() === orderShopId || item.kuaishouConsumeShopId.trim() === orderShopId
|
||||
const sameShop = !orderShopId
|
||||
|| item.shopId.trim() === orderShopId
|
||||
|| item.khhaoShopId.trim() === String(order.khhaoShopId || '').trim()
|
||||
|| item.kuaishouConsumeShopId.trim() === orderShopId
|
||||
const sameItemId = orderItemId && item.externalItemId.trim() === orderItemId
|
||||
const sameSkuCode = orderSkuCode && item.externalSkuCode.trim() === orderSkuCode
|
||||
const sameTitle = orderTitle && [item.externalSkuName, item.internalSkuName, item.resolvedSkuName].some((value) => value.trim() === orderTitle)
|
||||
@@ -932,6 +940,10 @@ onMounted(loadConfigs)
|
||||
<span>店铺 ID</span>
|
||||
<input v-model="item.shopId" class="text-input" maxlength="80" placeholder="留空表示跨店铺共用" />
|
||||
</label>
|
||||
<label class="field-block">
|
||||
<span>khhao 店铺 ID</span>
|
||||
<input v-model="item.khhaoShopId" class="text-input" maxlength="80" placeholder="例如 10,可用于 khhao 内部店铺匹配" />
|
||||
</label>
|
||||
<label class="field-block">
|
||||
<span>外部 SKU</span>
|
||||
<input v-model="item.externalSkuCode" class="text-input" maxlength="120" placeholder="例如 khhao 的 skuCode" />
|
||||
|
||||
Reference in New Issue
Block a user