修复bug

This commit is contained in:
wintsa 2026-03-10 16:22:50 +08:00
parent 5bb6609ef8
commit 5614e315b0
6 changed files with 22 additions and 2 deletions

View File

@ -11,6 +11,8 @@ import { Pencil, Eraser } from 'lucide-vue-next'
import { Button } from '@/components/ui/button' import { Button } from '@/components/ui/button'
import { useTabStore } from '@/pinia/tab' import { useTabStore } from '@/pinia/tab'
import { useHtFeeMethodReloadStore } from '@/pinia/htFeeMethodReload' import { useHtFeeMethodReloadStore } from '@/pinia/htFeeMethodReload'
import { matchPricingPaneReload, usePricingPaneReloadStore } from '@/pinia/pricingPaneReload'
import { ZXFW_RELOAD_SERVICE_KEY } from '@/lib/zxFwPricingSync'
import { import {
AlertDialogAction, AlertDialogAction,
AlertDialogCancel, AlertDialogCancel,
@ -89,6 +91,7 @@ const props = defineProps<{
}>() }>()
const tabStore = useTabStore() const tabStore = useTabStore()
const htFeeMethodReloadStore = useHtFeeMethodReloadStore() const htFeeMethodReloadStore = useHtFeeMethodReloadStore()
const pricingPaneReloadStore = usePricingPaneReloadStore()
const createRowId = () => `fee-method-${Date.now()}-${Math.random().toString(16).slice(2, 8)}` const createRowId = () => `fee-method-${Date.now()}-${Math.random().toString(16).slice(2, 8)}`
const createDefaultRow = (name = ''): FeeMethodRow => ({ const createDefaultRow = (name = ''): FeeMethodRow => ({
@ -606,6 +609,18 @@ watch(
} }
) )
watch(
() => pricingPaneReloadStore.seq,
(nextVersion, prevVersion) => {
if (nextVersion === prevVersion || nextVersion === 0) return
const contractId = String(props.contractId || '').trim()
if (!contractId) return
if (!matchPricingPaneReload(pricingPaneReloadStore.lastEvent, contractId, ZXFW_RELOAD_SERVICE_KEY)) return
void loadFromIndexedDB()
}
)
watch([hasFixedNames], () => { watch([hasFixedNames], () => {
if (!detailGridOptions.context) return if (!detailGridOptions.context) return
detailGridOptions.context.fixedNames = hasFixedNames.value detailGridOptions.context.fixedNames = hasFixedNames.value

View File

@ -39,6 +39,7 @@ const props = defineProps<{
dict: DictSource dict: DictSource
disableBudgetEditWhenStandardNull?: boolean disableBudgetEditWhenStandardNull?: boolean
excludeNotshowByZxflxs?: boolean excludeNotshowByZxflxs?: boolean
initBudgetValueFromStandard?: boolean
}>() }>()
const detailRows = ref<FactorRow[]>([]) const detailRows = ref<FactorRow[]>([])
@ -108,7 +109,7 @@ const buildDefaultRows = (): FactorRow[] => {
code: item.code, code: item.code,
name: item.name, name: item.name,
standardFactor, standardFactor,
budgetValue: null, budgetValue: props.initBudgetValueFromStandard ? standardFactor : null,
remark: '', remark: '',
path: buildCodePath(item.code, id, codeIdMap) path: buildCodePath(item.code, id, codeIdMap)
} }

View File

@ -132,6 +132,7 @@ watch(
watch( watch(
() => pricingPaneReloadStore.seq, () => pricingPaneReloadStore.seq,
(nextVersion, prevVersion) => { (nextVersion, prevVersion) => {
console.log(pricingPaneReloadStore.seq)
if (nextVersion === prevVersion || nextVersion === 0) return if (nextVersion === prevVersion || nextVersion === 0) return
const contractId = String(props.contractId || '').trim() const contractId = String(props.contractId || '').trim()
if (!contractId) return if (!contractId) return

View File

@ -51,5 +51,6 @@ onActivated(() => {
<template> <template>
<XmFactorGrid title="咨询分类系数明细" storage-key="xm-consult-category-factor-v1" :dict="filteredServiceDict" <XmFactorGrid title="咨询分类系数明细" storage-key="xm-consult-category-factor-v1" :dict="filteredServiceDict"
:disable-budget-edit-when-standard-null="true" :exclude-notshow-by-zxflxs="true" /> :disable-budget-edit-when-standard-null="true" :exclude-notshow-by-zxflxs="true"
:init-budget-value-from-standard="true" />
</template> </template>

View File

@ -60,6 +60,7 @@ onActivated(() => {
:dict="filteredMajorDict" :dict="filteredMajorDict"
:disable-budget-edit-when-standard-null="true" :disable-budget-edit-when-standard-null="true"
:exclude-notshow-by-zxflxs="true" :exclude-notshow-by-zxflxs="true"
:init-budget-value-from-standard="true"
/> />
</template> </template>

View File

@ -26,6 +26,7 @@ export const usePricingPaneReloadStore = defineStore('pricingPaneReload', {
at: Date.now() at: Date.now()
} }
this.seq += 1 this.seq += 1
console.log(this.seq)
} }
} }
}) })