diff --git a/src/api/material/mods/apply/searchAuditPage.ts b/src/api/material/mods/apply/searchAuditPage.ts index 0d23bc3..b4fe789 100644 --- a/src/api/material/mods/apply/searchAuditPage.ts +++ b/src/api/material/mods/apply/searchAuditPage.ts @@ -1,39 +1,37 @@ /** * @desc 分页查询盘点列表 */ -import { defaultSuccess, defaultError, http } from '@/plugins/axios'; -import type { AxiosResponse } from 'axios'; -import type { IPage } from '@/api/api'; +import { defaultSuccess, defaultError, http } from '@/plugins/axios' +import type { AxiosResponse } from 'axios' +import type { IPage } from '@/api/api' export interface Params { - /** 页码 */ - page?: number; - /** 页面大小 */ - size?: number; - /** 盘点类型 */ - auditType?: 'ALL' | 'PARTIAL'; - /** 盘点人 */ - taker?: string; - /** 创建日期 */ - createDate?: string; - /** 审核状态 */ - reviewResults?: Array< - 'WAIT_SCAN' | 'WAIT_SUBMIT' | 'WAIT_REVIEW' | 'PASS' | 'REJECT' - >; + /** 页码 */ + page?: number + /** 页面大小 */ + size?: number + /** 盘点类型 */ + auditType?: 'ALL' | 'PARTIAL' + /** 盘点人 */ + taker?: string + /** 创建日期 */ + createDate?: string + /** 审核状态 */ + reviewResults?: Array<'WAIT_SCAN' | 'WAIT_SUBMIT' | 'WAIT_REVIEW' | 'PASS' | 'REJECT'> } export default async function ( - params: Params, - success: (data: IPage) => void = defaultSuccess, - fail: (error: { code: string; error?: string }) => void = defaultError, + params: Params, + success: (data: IPage) => void = defaultSuccess, + fail: (error: { code: string; error?: string }) => void = defaultError, ): Promise { - return http({ - method: 'get', - url: `/audit-applies`, + return http({ + method: 'get', + url: `/audit-applies`, - params, - }) - .then((data: AxiosResponse, unknown>) => { - success(data.data); - }) - .catch((error: { code: string; error?: string }) => fail(error)); + params, + }) + .then((data: AxiosResponse, unknown>) => { + success(data.data) + }) + .catch((error: { code: string; error?: string }) => fail(error)) } diff --git a/src/components/page-container/page-container.vue b/src/components/page-container/page-container.vue index e55260d..4374bf6 100644 --- a/src/components/page-container/page-container.vue +++ b/src/components/page-container/page-container.vue @@ -169,7 +169,7 @@ line-height: 28px; } - @media (width <= 576px) { + @media (width <=576px) { .content { display: block; } diff --git a/src/views/stock/report/inboundReport-page.vue b/src/views/stock/report/inboundReport-page.vue index ae03b91..a5b80b0 100644 --- a/src/views/stock/report/inboundReport-page.vue +++ b/src/views/stock/report/inboundReport-page.vue @@ -6,7 +6,7 @@ @@ -77,14 +101,19 @@ import api from '@/api' import { IPage } from '@/api/api' import resultForm from '../stocktaking/result-form.vue' + import { Dayjs } from 'dayjs' const applyIdRef = ref() - const searchKey = ref('') const auditPage = ref>() const loading = ref(false) const confirmLoading = ref(false) const reviewResult = ref<'PASS' | 'REJECT'>('PASS') const remark = ref('') + // 搜索条件 + const startDate = ref() + const taker = ref('') + const status = ref>() + const auditType = ref<'ALL' | 'PARTIAL'>() // 加载数据的方法 const loadData = async (page = 1, size = 10) => { @@ -93,7 +122,13 @@ { page: page, size: size, - reviewResults: ['WAIT_SUBMIT', 'WAIT_SCAN', 'WAIT_REVIEW', 'PASS', 'REJECT'], + auditType: auditType.value, + //ISO 8601 的完整日期时间格式为:YYYY-MM-DDTHH:mm:ss,其中 T 是日期和时间之间的分隔符。 + // 对于 LocalDateTime,不需要时区信息(即不包含 Z 或者 +/-HH:mm),因为 LocalDateTime 本身没有时区概念。 + // 获取 ISO 8601 格式的字符串,但需要去掉 'Z' 和时区部分 + createDate: startDate.value?.toISOString().replace('Z', '').slice(0, -1), + taker: taker.value, + reviewResults: status.value, }, (data) => { auditPage.value = data diff --git a/src/views/stock/stocktaking/stocktaking-page.vue b/src/views/stock/stocktaking/stocktaking-page.vue index 35f9af4..a809800 100644 --- a/src/views/stock/stocktaking/stocktaking-page.vue +++ b/src/views/stock/stocktaking/stocktaking-page.vue @@ -56,7 +56,7 @@ 开始扫码