feat(pl): 吨千克克和升毫升按固定比例折算用证量。

同质量或体积单位不再要求手填系数,普通 http 页面也能生成幂等操作号。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
wuzilongandCursor committed 2026-11-05 21:14:15 +08:00
1 parent e7f942b399
commit da3ec62719
21 files changed
+277 -43

No files matched your search

@@ -75,6 +75,7 @@
import { formatCertQty } from './model'
import { useDictStore } from '@/store/modules/dict'
import { getProductUnitLabel } from '@/utils/crm-product-display'
import { randomOperationId } from '@/utils/random-id'
function inputQty(value: unknown) {
const text = formatCertQty(value)
return text === '—' ? '' : text
@@ -144,7 +145,7 @@
const id = cert.value.id,
type = kind.value,
signature = JSON.stringify({ id, type, ...body })
if (signature !== attempt.signature) attempt = { signature, id: crypto.randomUUID() }
if (signature !== attempt.signature) attempt = { signature, id: randomOperationId() }
saving.value = true
try {
await quotaAdjustmentApi.total(type, id, { ...body, operationId: attempt.id })
+2 -1
View File
@@ -607,6 +607,7 @@
import { useUserStore } from '@/store/modules/user'
import { useDictStore } from '@/store/modules/dict'
import { getProductUnitLabel } from '@/utils/crm-product-display'
import { randomOperationId } from '@/utils/random-id'
import { fetchGetMenuCodes } from '@/api/auth'
import {
quotaCertApi,
@@ -1573,7 +1574,7 @@
function openConfirm(row: QuotaCert) {
confirmRow.value = row
Object.assign(opening, {
operationId: crypto.randomUUID(),
operationId: randomOperationId(),
usedQty: '0',
singleUseConsumed: false,
reason: '',