Commit 7dcdae8e by qinjianhui

fix: 挂起修改

parent 7f3b1bc2
...@@ -42,6 +42,7 @@ export function getFactoryOrderNewListApi( ...@@ -42,6 +42,7 @@ export function getFactoryOrderNewListApi(
pageSize: number, pageSize: number,
status?: string, status?: string,
subStatus?: number, subStatus?: number,
pauseReason?: number,
) { ) {
const body = normalizePodOrderQueryPayload({ ...data } as Record< const body = normalizePodOrderQueryPayload({ ...data } as Record<
string, string,
...@@ -55,6 +56,7 @@ export function getFactoryOrderNewListApi( ...@@ -55,6 +56,7 @@ export function getFactoryOrderNewListApi(
pageSize, pageSize,
status, status,
acceptedStatus: subStatus, acceptedStatus: subStatus,
pauseReason,
}, },
) )
} }
......
...@@ -5,7 +5,6 @@ import { ...@@ -5,7 +5,6 @@ import {
getFactoryOrderNewDetailApi, getFactoryOrderNewDetailApi,
getFactoryOrderNewListApi, getFactoryOrderNewListApi,
getFactoryOrderNewLogApi, getFactoryOrderNewLogApi,
getSuspendListApi,
} from '@/api/factoryOrderNew' } from '@/api/factoryOrderNew'
import type { SearchForm } from '@/types/api/factoryOrderNew' import type { SearchForm } from '@/types/api/factoryOrderNew'
import type { import type {
...@@ -70,29 +69,14 @@ export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) { ...@@ -70,29 +69,14 @@ export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) {
refresh: refreshTableList, refresh: refreshTableList,
} = usePageList<FactoryOrderNewListData>({ } = usePageList<FactoryOrderNewListData>({
query: (page, size) => { query: (page, size) => {
if (status.value === 'SUSPEND') { const isSuspend = status.value === 'SUSPEND'
return getSuspendListApi(
buildListQueryBody(),
page,
size,
suspendedSubTab.value,
).then(async (res) => {
const records = Array.isArray(res.data?.records)
? res.data.records
: []
await nextTick(() => {
tableRef.value.setCurrentRow(records[0])
currentRow.value = records[0] as never
})
return res.data
})
}
return getFactoryOrderNewListApi( return getFactoryOrderNewListApi(
buildListQueryBody(), buildListQueryBody(),
page, page,
size, size,
status.value === 'ALL' ? undefined : status.value, status.value === 'ALL' ? undefined : status.value,
getListPageAcceptedSubStatus(), getListPageAcceptedSubStatus(),
isSuspend ? suspendedSubTab.value : undefined,
).then(async (res) => { ).then(async (res) => {
const records = res.data.records || [] const records = res.data.records || []
await nextTick(() => { await nextTick(() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment