优化
This commit is contained in:
@@ -22,7 +22,7 @@ import { overseasBusinessPermissions } from '../permissions'
|
||||
import { statusLabel, money, dateTime, text } from '../procurementPresentation'
|
||||
import type { PlatformProcurement } from '../procurementTypes'
|
||||
import { directionLabel } from '../procurementDirection'
|
||||
import { requireReviewedProcurementFees } from '../procurementOutboundFees'
|
||||
import { hasProcurementFeeDetails } from '../procurementOutboundFees'
|
||||
const route = useRoute(); const router = useRouter(); const auth = useAuthStore(); const access = useAccessPreviewStore()
|
||||
const purchaseId = computed(() => typeof route.params.purchaseId === 'string' ? route.params.purchaseId : '')
|
||||
const customerId = computed(() => typeof route.query.customerId === 'string' ? route.query.customerId : '')
|
||||
@@ -30,9 +30,10 @@ const detail = ref<PlatformProcurement | null>(null), workflow = ref<Procurement
|
||||
const loadError = ref<ApiErrorDetails | null>(null), operationError = ref<ApiErrorDetails | null>(null), downloading = ref('')
|
||||
const order = computed(() => detail.value?.customerView.order)
|
||||
const feePanel = ref<InstanceType<typeof BusinessDocumentFees>>()
|
||||
async function beforeOutbound() {
|
||||
if (!feePanel.value) throw new Error('费用明细尚未加载完成,请稍后重试')
|
||||
requireReviewedProcurementFees(await feePanel.value.getFees())
|
||||
async function beforeOutbound(): Promise<boolean | null> {
|
||||
if (!feePanel.value) return null
|
||||
try { return !hasProcurementFeeDetails(await feePanel.value.getFees()) }
|
||||
catch { return null }
|
||||
}
|
||||
const fields = computed(() => [
|
||||
['客户', order.value?.customerName], ['采购方向', directionLabel(order.value?.procurementDirection)], ['收货仓', order.value?.actualWarehouseName || order.value?.plannedWarehouseName],
|
||||
|
||||
Reference in New Issue
Block a user