Commit 7dcdae8e by qinjianhui

fix: 挂起修改

parent 7f3b1bc2
......@@ -42,6 +42,7 @@ export function getFactoryOrderNewListApi(
pageSize: number,
status?: string,
subStatus?: number,
pauseReason?: number,
) {
const body = normalizePodOrderQueryPayload({ ...data } as Record<
string,
......@@ -55,6 +56,7 @@ export function getFactoryOrderNewListApi(
pageSize,
status,
acceptedStatus: subStatus,
pauseReason,
},
)
}
......
......@@ -5,7 +5,6 @@ import {
getFactoryOrderNewDetailApi,
getFactoryOrderNewListApi,
getFactoryOrderNewLogApi,
getSuspendListApi,
} from '@/api/factoryOrderNew'
import type { SearchForm } from '@/types/api/factoryOrderNew'
import type {
......@@ -70,29 +69,14 @@ export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) {
refresh: refreshTableList,
} = usePageList<FactoryOrderNewListData>({
query: (page, size) => {
if (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
})
}
const isSuspend = status.value === 'SUSPEND'
return getFactoryOrderNewListApi(
buildListQueryBody(),
page,
size,
status.value === 'ALL' ? undefined : status.value,
getListPageAcceptedSubStatus(),
isSuspend ? suspendedSubTab.value : undefined,
).then(async (res) => {
const records = res.data.records || []
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