提交
This commit is contained in:
1 parent
c8cec132bf
commit
19c5aaa8f5
95 files changed
+309129
-9838
No files matched your search
@@ -159,7 +159,7 @@
|
||||
class="pl-stop-feedback-dibang-item"
|
||||
:class="{ 'pl-stop-feedback-dibang-item--split': dibangRows.length > 1 }"
|
||||
>
|
||||
<p v-if="dibangRows.length > 1" class="pl-stop-feedback-ticket__product">
|
||||
<p class="pl-stop-feedback-ticket__product">
|
||||
{{ dibangProductLabel(row, idx) }}
|
||||
</p>
|
||||
<div class="pl-stop-feedback-ticket__qty pl-stop-feedback-ticket__qty--compact">
|
||||
@@ -219,6 +219,7 @@
|
||||
import type { TransportStopFeedback } from '@/api/pl'
|
||||
import AttachmentUploadField from '@/components/business/attachment-upload-field/index.vue'
|
||||
import { formatKgToTon } from '@/components/business/db/db-related-view'
|
||||
import type { PlanFormProductRow } from '@/composables/usePlContractToPlan'
|
||||
import type { PlPlanTransportDibangRow } from '@/composables/usePlPlanViewDetail'
|
||||
import { formatDateTime } from '@/utils/format'
|
||||
import { isPlInternalCustomerName } from '@/utils/pl-internal-customer'
|
||||
@@ -229,6 +230,8 @@
|
||||
customerName?: string
|
||||
generateDibang?: number
|
||||
dibangRows?: PlPlanTransportDibangRow[]
|
||||
/** 用于解析 CRM 标准产品名(库内 link.productName 可能是别名) */
|
||||
planProductRows?: PlanFormProductRow[]
|
||||
driverFeedback?: TransportStopFeedback | null
|
||||
siteFeedback?: TransportStopFeedback | null
|
||||
/** 段级无备注时回退展示(如运输单级司机回传备注) */
|
||||
@@ -245,6 +248,7 @@
|
||||
customerName: '',
|
||||
generateDibang: 0,
|
||||
dibangRows: () => [],
|
||||
planProductRows: () => [],
|
||||
driverFeedback: null,
|
||||
siteFeedback: null,
|
||||
fallbackRemark: '',
|
||||
@@ -388,8 +392,37 @@
|
||||
return { qty: String(qty), unit: ` ${unit}` }
|
||||
}
|
||||
|
||||
function resolvePlanProductRow(row: PlPlanTransportDibangRow) {
|
||||
const id = String(row.link.planProductId || '').trim()
|
||||
if (!id) return undefined
|
||||
return (props.planProductRows || []).find((p) => String(p.id || '').trim() === id)
|
||||
}
|
||||
|
||||
function dibangProductLabel(row: PlPlanTransportDibangRow, idx: number): string {
|
||||
return row.link.productName || row.inventory?.product || `地磅 ${idx + 1}`
|
||||
const planRow = resolvePlanProductRow(row)
|
||||
// 优先 CRM 标准名;link.productName / planRow.productName 可能是别名
|
||||
const product = (
|
||||
String(planRow?.standardProductName || '').trim() ||
|
||||
row.inventory?.product ||
|
||||
row.weighing?.cargoName ||
|
||||
String(planRow?.productName || '').trim() ||
|
||||
row.link.productName ||
|
||||
''
|
||||
).trim()
|
||||
const specification = (
|
||||
String(planRow?.model || '').trim() ||
|
||||
row.inventory?.specification ||
|
||||
row.weighing?.specification ||
|
||||
''
|
||||
).trim()
|
||||
if (!product && !specification) return `地磅 ${idx + 1}`
|
||||
if (!specification) return product
|
||||
if (!product) return specification
|
||||
if (product.endsWith(specification)) {
|
||||
const base = product.slice(0, -specification.length).trimEnd()
|
||||
return base ? `${base} ${specification}` : specification
|
||||
}
|
||||
return `${product} ${specification}`
|
||||
}
|
||||
|
||||
function dibangBatchNo(row: PlPlanTransportDibangRow): string {
|
||||
@@ -492,6 +525,11 @@
|
||||
&--dibang {
|
||||
background: linear-gradient(90deg, #fff7ed 0%, #f8fafc 100%);
|
||||
}
|
||||
|
||||
// 标题栏与正文第一行间距
|
||||
& + * {
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.pl-stop-feedback-ticket__who {
|
||||
@@ -513,7 +551,7 @@
|
||||
|
||||
.pl-stop-feedback-ticket__product {
|
||||
margin: 0;
|
||||
padding: 8px 10px 0;
|
||||
padding: 0 10px;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #334155;
|
||||
@@ -600,7 +638,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
padding: 8px 10px 0;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.pl-stop-feedback-ticket__product-row {
|
||||
@@ -644,7 +682,7 @@
|
||||
}
|
||||
|
||||
.pl-stop-feedback-ticket__empty {
|
||||
padding: 12px 10px;
|
||||
padding: 7px 10px 12px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user