Commit 46b8f3d5 by wusiyi

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

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