diff --git a/dist.zip b/dist.zip index 1ed2224..b5e609e 100644 Binary files a/dist.zip and b/dist.zip differ diff --git a/src/api/api-lock.json b/src/api/api-lock.json index 2333a38..00bc8d8 100644 --- a/src/api/api-lock.json +++ b/src/api/api-lock.json @@ -3534,6 +3534,170 @@ } ] }, + { + "description": "导出盘点申请单列表", + "name": "downloadAuditExcel", + "method": "get", + "path": "/apply/audit/download-excel", + "response": { + "typeArgs": [], + "typeName": "", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "parameters": [ + { + "description": "盘点类型", + "required": false, + "in": "query", + "name": "auditType", + "dataType": { + "typeArgs": [], + "typeName": "", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": ["'SCAN'", "'MANUAL'"], + "typeProperties": [] + } + }, + { + "description": "盘点人", + "required": false, + "in": "query", + "name": "taker", + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + }, + { + "description": "创建日期", + "required": false, + "in": "query", + "name": "createDate", + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + }, + { + "description": "审核状态", + "required": false, + "in": "query", + "name": "reviewResults", + "dataType": { + "typeArgs": [ + { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": ["'WAIT_SCAN'", "'WAIT_SUBMIT'", "'WAIT_REVIEW'", "'PASS'", "'REJECT'"], + "typeProperties": [] + } + ], + "typeName": "Array", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + } + ] + }, + { + "description": "导出申请单列表", + "name": "downloadExcel_1", + "method": "get", + "path": "/apply/download-excel", + "response": { + "typeArgs": [], + "typeName": "", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + }, + "parameters": [ + { + "description": "申请类型(1入库 3出库 4盘点)", + "required": true, + "in": "query", + "name": "applyType", + "dataType": { + "typeArgs": [], + "typeName": "number", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + }, + { + "description": "物料类型", + "required": false, + "in": "query", + "name": "type", + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + }, + { + "description": "物料编码", + "required": false, + "in": "query", + "name": "code", + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + }, + { + "description": "物料名称", + "required": false, + "in": "query", + "name": "name", + "dataType": { + "typeArgs": [], + "typeName": "string", + "isDefsType": false, + "templateIndex": -1, + "compileTemplateKeyword": "#/definitions/", + "enum": [], + "typeProperties": [] + } + } + ] + }, { "description": "查询申请单详情", "name": "detail_1", @@ -4146,7 +4310,7 @@ "name": "type", "dataType": { "typeArgs": [], - "typeName": "number", + "typeName": "string", "isDefsType": false, "templateIndex": -1, "compileTemplateKeyword": "#/definitions/", @@ -4401,7 +4565,7 @@ "name": "type", "dataType": { "typeArgs": [], - "typeName": "number", + "typeName": "string", "isDefsType": false, "templateIndex": -1, "compileTemplateKeyword": "#/definitions/", diff --git a/src/api/material/mods/apply/downloadAuditExcel.ts b/src/api/material/mods/apply/downloadAuditExcel.ts new file mode 100644 index 0000000..efe1394 --- /dev/null +++ b/src/api/material/mods/apply/downloadAuditExcel.ts @@ -0,0 +1,32 @@ +/** + * @desc 导出盘点申请单列表 + */ +import { defaultSuccess, defaultError, http } from '@/plugins/axios' +import type { AxiosResponse } from 'axios' +export interface Params { + /** 盘点类型 */ + auditType?: 'SCAN' | 'MANUAL' + /** 盘点人 */ + taker?: string + /** 创建日期 */ + createDate?: string + /** 审核状态 */ + reviewResults?: Array<'WAIT_SCAN' | 'WAIT_SUBMIT' | 'WAIT_REVIEW' | 'PASS' | 'REJECT'> +} + +export default async function ( + params: Params, + success: (data: void) => void = defaultSuccess, + fail: (error: { code: string; error?: string }) => void = defaultError, +): Promise { + return http({ + method: 'get', + url: `/apply/audit/download-excel`, + + params, + }) + .then((data: AxiosResponse) => { + success(data.data) + }) + .catch((error: { code: string; error?: string }) => fail(error)) +} diff --git a/src/api/material/mods/apply/downloadExcel.ts b/src/api/material/mods/apply/downloadExcel.ts new file mode 100644 index 0000000..9492ef1 --- /dev/null +++ b/src/api/material/mods/apply/downloadExcel.ts @@ -0,0 +1,32 @@ +/** + * @desc 导出申请单列表 + */ +import { defaultSuccess, defaultError, http } from '@/plugins/axios' +import type { AxiosResponse } from 'axios' +export interface Params { + /** 申请类型(1入库 3出库 4盘点) */ + applyType: number + /** 物料类型 */ + type?: string + /** 物料编码 */ + code?: string + /** 物料名称 */ + name?: string +} + +export default async function ( + params: Params, + success: (data: void) => void = defaultSuccess, + fail: (error: { code: string; error?: string }) => void = defaultError, +): Promise { + return http({ + method: 'get', + url: `/apply/download-excel`, + + params, + }) + .then((data: AxiosResponse) => { + success(data.data) + }) + .catch((error: { code: string; error?: string }) => fail(error)) +} diff --git a/src/api/material/mods/apply/index.ts b/src/api/material/mods/apply/index.ts index 8cb749a..fcc47c7 100644 --- a/src/api/material/mods/apply/index.ts +++ b/src/api/material/mods/apply/index.ts @@ -4,6 +4,8 @@ */ import searchPage from './searchPage' import saveApply from './saveApply' +import downloadAuditExcel from './downloadAuditExcel' +import downloadExcel from './downloadExcel' import detail from './detail' import searchAuditPage from './searchAuditPage' import auditApply from './auditApply' @@ -20,6 +22,8 @@ import getWaitScanData from './getWaitScanData' export default { searchPage, saveApply, + downloadAuditExcel, + downloadExcel, detail, searchAuditPage, auditApply, diff --git a/src/api/material/mods/material/downloadExcel.ts b/src/api/material/mods/material/downloadExcel.ts index 8123594..7f0fe27 100644 --- a/src/api/material/mods/material/downloadExcel.ts +++ b/src/api/material/mods/material/downloadExcel.ts @@ -5,7 +5,7 @@ import { defaultSuccess, defaultError, http } from '@/plugins/axios' import type { AxiosResponse } from 'axios' export interface Params { /** 类型 */ - type?: number + type?: string /** 搜索关键词 */ key?: string } diff --git a/src/api/material/mods/material/materials.ts b/src/api/material/mods/material/materials.ts index 7626361..8173f23 100644 --- a/src/api/material/mods/material/materials.ts +++ b/src/api/material/mods/material/materials.ts @@ -1,33 +1,33 @@ /** * @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; - /** 类型 */ - type?: number; - /** 搜索关键词 */ - key?: string; + /** 页码 */ + page?: number + /** 页面大小 */ + size?: number + /** 类型 */ + type?: string + /** 搜索关键词 */ + key?: string } 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: `/materials`, + return http({ + method: 'get', + url: `/materials`, - 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/views/stock/component/apply-form.vue b/src/views/stock/component/apply-form.vue index 7392f4f..6630f51 100644 --- a/src/views/stock/component/apply-form.vue +++ b/src/views/stock/component/apply-form.vue @@ -186,7 +186,7 @@ const tableData = ref>([]) // 物料选择器 - const typeVal = ref('') + const typeVal = ref() const options = ref<{ label: string; value: number }[]>([]) const materialList = ref([]) const getMaterialList = async () => { diff --git a/src/views/stock/report/materialReport-page.vue b/src/views/stock/report/materialReport-page.vue index 8ff2cfb..b0ace43 100644 --- a/src/views/stock/report/materialReport-page.vue +++ b/src/views/stock/report/materialReport-page.vue @@ -2,15 +2,30 @@