Commit 46b8f3d5 by wusiyi

fix: 修改工厂订单new订单状态包含挂起时的参数

parent 1117eb5a
......@@ -7,6 +7,7 @@ export interface StatusTreeNode {
export interface SearchForm {
status?: string
pauseReason?: number
platform?: string
craftCode?: string | string[]
thirdSkuCode?: string
......
......@@ -7,6 +7,7 @@ export interface StatusTreeNode {
export interface SearchForm {
status?: string
pauseReason?: number
platform?: string
craftCode?: string | string[]
thirdSkuCode?: string
......
......@@ -16,6 +16,8 @@ import type {
interface UseOrderListAndDetailOptions {
status: Ref<string>
// 查询的状态树,与左侧状态树参数不同,用于挂起状态下suspendReason参数的修改
treeStatus: Ref<string>
isCardLayout: Ref<boolean>
isTableLayout: Ref<boolean>
getQueryPayload: () => Record<string, unknown>
......@@ -26,6 +28,7 @@ interface UseOrderListAndDetailOptions {
export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) {
const {
status,
treeStatus,
isCardLayout,
isTableLayout,
getQueryPayload,
......@@ -69,14 +72,14 @@ export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) {
refresh: refreshTableList,
} = usePageList<FactoryOrderNewListData>({
query: (page, size) => {
const isSuspend = status.value === 'SUSPEND'
const isSuspendTree = treeStatus.value === 'SUSPEND'
return getFactoryOrderNewListApi(
buildListQueryBody(),
page,
size,
status.value === 'ALL' ? undefined : status.value,
getListPageAcceptedSubStatus(),
isSuspend ? suspendedSubTab.value : undefined,
isSuspendTree ? suspendedSubTab.value : undefined,
).then(async (res) => {
const records = res.data.records || []
await nextTick(() => {
......@@ -133,7 +136,8 @@ export function useOrderListAndDetail(options: UseOrderListAndDetailOptions) {
) {
return
}
const sortProp = LIST_SORT_PROP_BY_COLUMN[prop as keyof typeof LIST_SORT_PROP_BY_COLUMN]
const sortProp =
LIST_SORT_PROP_BY_COLUMN[prop as keyof typeof LIST_SORT_PROP_BY_COLUMN]
if (order === 'ascending') {
listSortProp.value = sortProp
listSortOrder.value = 'asc'
......
......@@ -1186,6 +1186,7 @@ const {
handleMainTableSortChange,
} = useOrderListAndDetail({
status: listQueryStatus,
treeStatus: status,
isCardLayout,
isTableLayout,
getQueryPayload: getListQueryPayload,
......
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