修复bug
This commit is contained in:
parent
5bb6609ef8
commit
5614e315b0
@ -11,6 +11,8 @@ import { Pencil, Eraser } from 'lucide-vue-next'
|
||||
import { Button } from '@/components/ui/button'
|
||||
import { useTabStore } from '@/pinia/tab'
|
||||
import { useHtFeeMethodReloadStore } from '@/pinia/htFeeMethodReload'
|
||||
import { matchPricingPaneReload, usePricingPaneReloadStore } from '@/pinia/pricingPaneReload'
|
||||
import { ZXFW_RELOAD_SERVICE_KEY } from '@/lib/zxFwPricingSync'
|
||||
import {
|
||||
AlertDialogAction,
|
||||
AlertDialogCancel,
|
||||
@ -89,6 +91,7 @@ const props = defineProps<{
|
||||
}>()
|
||||
const tabStore = useTabStore()
|
||||
const htFeeMethodReloadStore = useHtFeeMethodReloadStore()
|
||||
const pricingPaneReloadStore = usePricingPaneReloadStore()
|
||||
|
||||
const createRowId = () => `fee-method-${Date.now()}-${Math.random().toString(16).slice(2, 8)}`
|
||||
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], () => {
|
||||
if (!detailGridOptions.context) return
|
||||
detailGridOptions.context.fixedNames = hasFixedNames.value
|
||||
|
||||
@ -39,6 +39,7 @@ const props = defineProps<{
|
||||
dict: DictSource
|
||||
disableBudgetEditWhenStandardNull?: boolean
|
||||
excludeNotshowByZxflxs?: boolean
|
||||
initBudgetValueFromStandard?: boolean
|
||||
}>()
|
||||
|
||||
const detailRows = ref<FactorRow[]>([])
|
||||
@ -108,7 +109,7 @@ const buildDefaultRows = (): FactorRow[] => {
|
||||
code: item.code,
|
||||
name: item.name,
|
||||
standardFactor,
|
||||
budgetValue: null,
|
||||
budgetValue: props.initBudgetValueFromStandard ? standardFactor : null,
|
||||
remark: '',
|
||||
path: buildCodePath(item.code, id, codeIdMap)
|
||||
}
|
||||
|
||||
@ -132,6 +132,7 @@ watch(
|
||||
watch(
|
||||
() => pricingPaneReloadStore.seq,
|
||||
(nextVersion, prevVersion) => {
|
||||
console.log(pricingPaneReloadStore.seq)
|
||||
if (nextVersion === prevVersion || nextVersion === 0) return
|
||||
const contractId = String(props.contractId || '').trim()
|
||||
if (!contractId) return
|
||||
|
||||
@ -51,5 +51,6 @@ onActivated(() => {
|
||||
|
||||
<template>
|
||||
<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>
|
||||
|
||||
@ -60,6 +60,7 @@ onActivated(() => {
|
||||
:dict="filteredMajorDict"
|
||||
:disable-budget-edit-when-standard-null="true"
|
||||
:exclude-notshow-by-zxflxs="true"
|
||||
:init-budget-value-from-standard="true"
|
||||
|
||||
/>
|
||||
</template>
|
||||
|
||||
@ -26,6 +26,7 @@ export const usePricingPaneReloadStore = defineStore('pricingPaneReload', {
|
||||
at: Date.now()
|
||||
}
|
||||
this.seq += 1
|
||||
console.log(this.seq)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user