中性化库存凭据类型

This commit is contained in:
yml
2026-05-25 22:11:30 +08:00
parent 8ce16d9a36
commit 2103416c7b
14 changed files with 42 additions and 28 deletions
-2
View File
@@ -25,7 +25,6 @@ declare module 'vue' {
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
ElDialog: typeof import('element-plus/es')['ElDialog']
ElDropdown: typeof import('element-plus/es')['ElDropdown']
ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem']
ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu']
@@ -33,7 +32,6 @@ declare module 'vue' {
ElForm: typeof import('element-plus/es')['ElForm']
ElFormItem: typeof import('element-plus/es')['ElFormItem']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElInput: typeof import('element-plus/es')['ElInput']
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
ElMenu: typeof import('element-plus/es')['ElMenu']
+1 -1
View File
@@ -34,7 +34,7 @@ export const adminInventoryStatusOptions = [
export const adminInventoryCredentialTypeOptions = [
{ label: '全部凭据类型', value: '' },
{ label: '兑换码(领取链路)', value: 'tencent_code' },
{ label: '兑换码(领取链路)', value: 'claim_code' },
{ label: '卡号卡密', value: 'card_password' },
{ label: '账号密码', value: 'account_password' },
{ label: '激活链接', value: 'activation_link' },
@@ -142,7 +142,7 @@ function handleSkuSuggestionSelect(item: Record<string, unknown>) {
class="bulk-input"
/>
<p class="helper-text helper-text--spaced">
示例sjz_hdl_test01|tencent_code|sjz-20260412|A组|DJQFf7HgXXXXXXXXXX
示例sjz_hdl_test01|claim_code|sjz-20260412|A组|DJQFf7HgXXXXXXXXXX
</p>
<div class="action-row">
@@ -34,7 +34,7 @@ export function useAdminInventory() {
const filterInventoryGroupCode = ref('')
const entrySkuCode = ref('')
const entryCredentialType = ref('tencent_code')
const entryCredentialType = ref('claim_code')
const entryBatchNo = ref('')
const entryInventoryGroupCode = ref('')
const singleDisplayValue = ref('')
@@ -75,10 +75,10 @@ export function useAdminInventory() {
>()
for (const item of items.value) {
const key = `${item.skuCode}::${item.credentialType || 'tencent_code'}::${item.inventoryGroupCode || ''}`
const key = `${item.skuCode}::${item.credentialType || 'claim_code'}::${item.inventoryGroupCode || ''}`
const current = groupMap.get(key) || {
skuCode: item.skuCode,
credentialType: item.credentialType || 'tencent_code',
credentialType: item.credentialType || 'claim_code',
inventoryGroupCode: item.inventoryGroupCode || '',
totalCount: 0,
availableCount: 0,
@@ -147,7 +147,7 @@ export function useAdminInventory() {
function getCredentialTypeHint(value: string) {
const normalized = String(value || '').trim()
if (normalized === 'tencent_code')
if (normalized === 'claim_code')
return '当前领取链路会优先预占这一类兑换码,快手云履约等场景可按内部 SKU 统一匹配。'
if (normalized === 'card_password') return '适合卡号 / 卡密一体的库存项。'
if (normalized === 'account_password') return '适合账号密码、账号令牌等组合凭据。'
@@ -210,7 +210,7 @@ export function useAdminInventory() {
.filter(Boolean)
const rows: InventoryImportRow[] = []
const defaultSkuCode = entrySkuCode.value.trim()
const defaultCredentialType = entryCredentialType.value.trim() || 'tencent_code'
const defaultCredentialType = entryCredentialType.value.trim() || 'claim_code'
const defaultBatchNo = entryBatchNo.value.trim()
for (let index = 0; index < lines.length; index += 1) {
@@ -272,7 +272,7 @@ export function useAdminInventory() {
skuSuggestionsLoading.value = true
try {
const response = await fetchAdminInventorySkuSuggestions({
credentialType: entryCredentialType.value.trim() || 'tencent_code',
credentialType: entryCredentialType.value.trim() || 'claim_code',
inventoryGroupCode: entryInventoryGroupCode.value.trim(),
limit: 50,
})
@@ -302,7 +302,7 @@ export function useAdminInventory() {
try {
await createAdminInventoryItem({
skuCode: entrySkuCode.value.trim(),
credentialType: entryCredentialType.value.trim() || 'tencent_code',
credentialType: entryCredentialType.value.trim() || 'claim_code',
batchNo: entryBatchNo.value.trim(),
inventoryGroupCode: entryInventoryGroupCode.value.trim(),
displayValue: singleDisplayValue.value.trim(),