feat(web-admin): append pound QR links in copy-to-driver text
Include multi-line public pound QR URLs after the driver link when dibang slips exist. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
5b4c1bc991
commit
ab3a90c3f5
5 files changed
+58
-4
No files matched your search
@@ -35,6 +35,7 @@
|
||||
:show-arrange-links="showArrangeActions"
|
||||
:arrange-driver-url="driverUrl"
|
||||
:arrange-site-records="siteRecords"
|
||||
:arrange-inventory-records="inventoryRecords"
|
||||
:show-archive-io-fields="showArchiveIoFields"
|
||||
:show-archive-price-fields="showArchivePriceFields"
|
||||
:show-inbound-outbound-qty="showInboundOutboundQty"
|
||||
@@ -95,6 +96,7 @@
|
||||
hasDibangInventoryRecords,
|
||||
driverUrl,
|
||||
siteRecords,
|
||||
inventoryRecords,
|
||||
qrcodeVisible,
|
||||
selectedInventoryId,
|
||||
selectedInventoryUnit,
|
||||
|
||||
@@ -427,6 +427,7 @@
|
||||
outboundOrderApi,
|
||||
planApi,
|
||||
type PlIoOrder,
|
||||
type TransportInventoryLink,
|
||||
type TransportSiteLink
|
||||
} from '@/api/pl'
|
||||
import {
|
||||
@@ -462,7 +463,8 @@
|
||||
} from '@/utils/db-site-summary'
|
||||
import {
|
||||
buildDriverSummaryFromPlan,
|
||||
buildDriverStopBlocksFromPlan
|
||||
buildDriverStopBlocksFromPlan,
|
||||
buildPoundQrcodeLinksFromInventoryRecords
|
||||
} from '@/utils/pl-driver-summary'
|
||||
import {
|
||||
formatPlanProductListText,
|
||||
@@ -487,6 +489,7 @@
|
||||
showArrangeLinks?: boolean
|
||||
arrangeDriverUrl?: string
|
||||
arrangeSiteRecords?: TransportSiteLink[]
|
||||
arrangeInventoryRecords?: TransportInventoryLink[]
|
||||
feedbackEditable?: boolean
|
||||
/** 将司机/现场/地磅回传区块镜像渲染到归档左侧等目标节点 */
|
||||
feedbackMirrorTo?: string | HTMLElement | null
|
||||
@@ -508,6 +511,7 @@
|
||||
showArrangeLinks: false,
|
||||
arrangeDriverUrl: '',
|
||||
arrangeSiteRecords: () => [],
|
||||
arrangeInventoryRecords: () => [],
|
||||
feedbackEditable: false,
|
||||
feedbackMirrorTo: null,
|
||||
hideNav: false,
|
||||
@@ -1166,6 +1170,10 @@
|
||||
return
|
||||
}
|
||||
const getUnitLabel = (unit: string) => dictStore.getLabel('crm_product_unit', unit) || unit
|
||||
const inventorySource =
|
||||
props.arrangeInventoryRecords?.length
|
||||
? props.arrangeInventoryRecords
|
||||
: dibangPlanRows.value.map((row) => row.link)
|
||||
const text = buildDriverSummaryFromPlan({
|
||||
plan: plan.value || undefined,
|
||||
planNo: plan.value?.planNo,
|
||||
@@ -1176,7 +1184,8 @@
|
||||
driverUrl: url,
|
||||
products: products.value,
|
||||
getUnitLabel,
|
||||
stopBlocks: buildDriverStopBlocksFromPlan(plan.value, getUnitLabel)
|
||||
stopBlocks: buildDriverStopBlocksFromPlan(plan.value, getUnitLabel),
|
||||
poundQrcodeLinks: buildPoundQrcodeLinksFromInventoryRecords(inventorySource)
|
||||
})
|
||||
await navigator.clipboard.writeText(text)
|
||||
ElMessage.success('已复制给司机')
|
||||
|
||||
Reference in new issue
Block a user