fix(pl): 证用品类差量复用软删关联,并修正归档用证结转与证面品类展示。
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
6f20c0ff8a
commit
f865d8ed99
19 files changed
+445
-65
No files matched your search
@@ -25,6 +25,12 @@
|
||||
}}</span>
|
||||
</div>
|
||||
<div class="mp-wv-card__kv">
|
||||
<div class="mp-wv-card__kv-row"
|
||||
><span>系统客户</span><span>{{ row.customerName || '—' }}</span></div
|
||||
>
|
||||
<div class="mp-wv-card__kv-row"
|
||||
><span>证用品类</span><span>{{ certCategoryLabel(row) }}</span></div
|
||||
>
|
||||
<div class="mp-wv-card__kv-row"
|
||||
><span>销售单位</span><span>{{ salePartyName(row) || '—' }}</span></div
|
||||
>
|
||||
@@ -119,7 +125,7 @@
|
||||
} from '@/views/pl/quota-cert/cert-list-face'
|
||||
import { useDictStore } from '@/store/modules/dict'
|
||||
import { getProductUnitLabel } from '@/utils/crm-product-display'
|
||||
import { certStatusLabels } from './face-model'
|
||||
import { certCategoryLabel, certStatusLabels } from './face-model'
|
||||
|
||||
const props = defineProps<{
|
||||
keyword: string
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<MpWebviewShell @ready="ready = true">
|
||||
<MpWebviewShell @ready="onShellReady">
|
||||
<MpBusinessHeader title="客户用证" back-label="返回运输证件管理" @back="router.back()" />
|
||||
<main v-if="ready" class="mp-h5-list-content mp-h5-detail-page mp-plan-cert-list">
|
||||
<p v-if="error" class="mp-wv-empty" role="alert">
|
||||
@@ -34,11 +34,19 @@
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { fetchGetMenuCodes } from '@/api/auth'
|
||||
import { quotaStatisticsApi, type CustomerStatistics } from '@/api/pl/quota-cert'
|
||||
import MpWebviewShell from '@/layouts/MpWebviewShell.vue'
|
||||
import MpBusinessHeader from '@/components/mp/MpBusinessHeader.vue'
|
||||
import CustomerCertQuotaTab from '@/views/m/crm/contract/CustomerCertQuotaTab.vue'
|
||||
import '@/styles/mp-webview.scss'
|
||||
import './cert-mobile.scss'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
const ready = ref(false)
|
||||
|
||||
function onShellReady() {
|
||||
ready.value = true
|
||||
}
|
||||
const authReady = ref(false)
|
||||
const allowed = ref(false)
|
||||
const loading = ref(true)
|
||||
|
||||
@@ -30,6 +30,22 @@ const longFaceKeys = new Set([
|
||||
export type FaceField = { label: string; value: string; wide?: boolean }
|
||||
export type FaceGroup = { title: string; fields: FaceField[] }
|
||||
|
||||
export function certCategoryLabel(
|
||||
cert: Pick<QuotaCert, 'certType' | 'categoryName' | 'derivedCategoryNames'> & {
|
||||
certType?: CertType | null
|
||||
},
|
||||
kind?: CertType
|
||||
) {
|
||||
const certKind = kind || cert.certType
|
||||
if (certKind === 'transport') {
|
||||
const names = (cert.derivedCategoryNames || [])
|
||||
.map((item) => String(item || '').trim())
|
||||
.filter(Boolean)
|
||||
return names.join('、') || '—'
|
||||
}
|
||||
return String(cert.categoryName || '').trim() || '—'
|
||||
}
|
||||
|
||||
export function certFaceGroups(
|
||||
cert: QuotaCert,
|
||||
kind: CertType,
|
||||
@@ -51,6 +67,11 @@ export function certFaceGroups(
|
||||
label: '系统客户',
|
||||
value: String(cert.customerName || '').trim() || '—',
|
||||
wide: true
|
||||
},
|
||||
{
|
||||
label: '证用品类',
|
||||
value: certCategoryLabel(cert, kind),
|
||||
wide: true
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@
|
||||
]
|
||||
const placeholder = computed(() =>
|
||||
tab.value === 'contract'
|
||||
? '合同编号 / 名称 / 销售或购买单位'
|
||||
? '客户名称 / 编号'
|
||||
: tab.value === 'plan' || tab.value === 'ready'
|
||||
? '计划编号 / 供方 / 需方'
|
||||
: '证件编号 / 品名 / 销售或购买单位'
|
||||
|
||||
Reference in new issue
Block a user