refactor(admin): use dialog for inbound relationships
This commit is contained in:
@@ -12,7 +12,7 @@ import ApiErrorMeta from '@/shared/components/ApiErrorMeta.vue'
|
||||
import DataTable, { type DataTableColumn } from '@/shared/components/DataTable.vue'
|
||||
import ListPageLayout from '@/shared/components/ListPageLayout.vue'
|
||||
import LoadErrorState from '@/shared/components/LoadErrorState.vue'
|
||||
import InboundCodeRelationshipDrawer from '@/shared/components/InboundCodeRelationshipDrawer.vue'
|
||||
import InboundCodeRelationshipDialog from '@/shared/components/InboundCodeRelationshipDialog.vue'
|
||||
import QueryToolbar, { type QueryField, type QueryModel } from '@/shared/components/QueryToolbar.vue'
|
||||
import { listPlatformInbounds } from '../core/api'
|
||||
import type { InboundOrderSummary } from '../core/types'
|
||||
@@ -45,8 +45,8 @@ const warehouseOptions = ref<Array<{ label: string; value: string }>>([])
|
||||
const selectedInbound = ref<InboundOrderSummary | null>(null)
|
||||
const measurementDialogOpen = ref(false)
|
||||
const reviewDialogOpen = ref(false)
|
||||
const relationshipOpen = ref(false)
|
||||
const relationshipInboundCode = ref('')
|
||||
const relationshipDialogOpen = ref(false)
|
||||
const relationshipDialogInboundCode = ref('')
|
||||
const batchReviewLoading = ref(false)
|
||||
const selectedReviewRows = ref<InboundOrderSummary[]>([])
|
||||
let requestSerial = 0
|
||||
@@ -196,8 +196,8 @@ function openDetail(row: InboundOrderSummary) {
|
||||
function openRelationship(row: InboundOrderSummary) {
|
||||
const code = row.inboundCode?.trim()
|
||||
if (!code) return
|
||||
relationshipInboundCode.value = code
|
||||
relationshipOpen.value = true
|
||||
relationshipDialogInboundCode.value = code
|
||||
relationshipDialogOpen.value = true
|
||||
}
|
||||
|
||||
function handleTaskChanged() {
|
||||
@@ -391,7 +391,7 @@ onBeforeUnmount(() => { disposed = true; requestSerial += 1; optionsRequestSeria
|
||||
@submitted="handleMeasurementSubmitted"
|
||||
@closed="clearSelectedInbound"
|
||||
/>
|
||||
<InboundCodeRelationshipDrawer v-if="relationshipOpen" v-model="relationshipOpen" :inbound-code="relationshipInboundCode" :can-read-base="access.can('platform:order:list')" :can-read-loading="access.can('platform:firstleg:smart-loading:list')" :can-read-overseas="access.can('platform:overseas-warehouse:inventory:list')" />
|
||||
<InboundCodeRelationshipDialog v-if="relationshipDialogOpen" v-model="relationshipDialogOpen" :inbound-code="relationshipDialogInboundCode" :can-read-base="access.can('platform:order:list')" :can-read-loading="access.can('platform:firstleg:smart-loading:list')" :can-read-overseas="access.can('platform:overseas-warehouse:inventory:list')" />
|
||||
</AdminPage>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user