From 9ac544098039100a556ed61e0c781bab8294d10e Mon Sep 17 00:00:00 2001 From: andy <1042025947@qq.com> Date: Fri, 29 May 2026 11:51:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=BA=8F=E8=AE=A1=E5=88=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/submitLog.ts | 70 ++++++ src/router/index.ts | 16 +- src/views/biz/submitLog/index.vue | 382 ++++++++++++++++++++++++++++++ 3 files changed, 466 insertions(+), 2 deletions(-) create mode 100644 src/api/submitLog.ts create mode 100644 src/views/biz/submitLog/index.vue diff --git a/src/api/submitLog.ts b/src/api/submitLog.ts new file mode 100644 index 0000000..f8d1230 --- /dev/null +++ b/src/api/submitLog.ts @@ -0,0 +1,70 @@ +import { request } from '@/utils/request' + +// 派工工单汇报记录 类型定义 +export interface SubmitLog { + id?: number + + assingWorkId?: number + + processId?: number + + quantity?: number + + createTime?: string + + createBy?: string + +} + +// 派工工单汇报记录 API +export const submitLogApi = { + // 分页查询 + page(params: { page: number; pageSize: number; id?: number }) { + return request({ url: '/biz/submitLog/page', method: 'get', params }) + }, + + // 获取详情 + detail(id: string) { + return request({ url: `/biz/submitLog/${id}`, method: 'get' }) + }, + + // 新增 + create(data: SubmitLog) { + return request({ url: '/biz/submitLog', method: 'post', data }) + }, + + // 修改 + update(data: SubmitLog) { + return request({ url: '/biz/submitLog', method: 'put', data }) + }, + + // 删除 + delete(ids: string[]) { + return request({ url: `/biz/submitLog/${ids.join(',')}`, method: 'delete' }) + }, + + // 导出 + export(params?: { ids?: string[]; id?: number }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + if (params?.id !== undefined && params?.id !== null) p.id = params.id + return request({ url: `/biz/submitLog/export`, method: 'get', params: p, responseType: 'blob' }) + }, + + // 导入 + importData(file: File) { + const formData = new FormData() + formData.append('file', file) + return request<{ success: number; fail: number; errors: string[] }>({ + url: `/biz/submitLog/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/submitLog/template`, method: 'get', responseType: 'blob' }) + } +} diff --git a/src/router/index.ts b/src/router/index.ts index cddbf50..861bfd3 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -119,9 +119,15 @@ const routes: RouteRecordRaw[] = [ //运营管理 { path: 'biz/orderItem', - name: 'product', + name: 'orderItem', component: () => import('@/views/biz/orderItem/index.vue'), - meta: { title: '商品管理', icon: 'ListOutline' } + meta: { title: '生产订单', icon: 'ListOutline' } + }, + { + path: 'biz/orderProcessPlan', + name: 'orderProcessPlan', + component: () => import('@/views/biz/orderProcessPlan/index.vue'), + meta: { title: '工序计划', icon: 'ListOutline' } }, { path: 'biz/user', @@ -203,6 +209,12 @@ const routes: RouteRecordRaw[] = [ component: () => import('@/views/test/test/index.vue'), meta: { title: '测试菜单', icon: 'StarOutline' } }, + { + path: 'biz/submitLog', + name: 'submitLog', + component: () => import('@/views/biz/submitLog/index.vue'), + meta: { title: '派工工单汇报记录', icon: 'ListOutline' } + }, { // 开发工具 path: 'tool/gen', diff --git a/src/views/biz/submitLog/index.vue b/src/views/biz/submitLog/index.vue new file mode 100644 index 0000000..1b19de7 --- /dev/null +++ b/src/views/biz/submitLog/index.vue @@ -0,0 +1,382 @@ + + + + +