diff --git a/src/api/callingMaterials.ts b/src/api/callingMaterials.ts new file mode 100644 index 0000000..daece92 --- /dev/null +++ b/src/api/callingMaterials.ts @@ -0,0 +1,69 @@ +import { request } from '@/utils/request' + +// 叫料记录 类型定义 +export interface CallingMaterials { + id?: number + + userId?: number + + deviceId?: number + + status?: number + + createTime?: string + +} + +// 叫料记录 API +export const callingMaterialsApi = { + // 分页查询 + page(params: { page: number; pageSize: number; deviceId?: number; status?: number }) { + return request({ url: '/biz/callingMaterials/page', method: 'get', params }) + }, + + // 获取详情 + detail(id: string) { + return request({ url: `/biz/callingMaterials/${id}`, method: 'get' }) + }, + + // 新增 + create(data: CallingMaterials) { + return request({ url: '/biz/callingMaterials', method: 'post', data }) + }, + + // 修改 + update(data: CallingMaterials) { + return request({ url: '/biz/callingMaterials', method: 'put', data }) + }, + + // 删除 + delete(ids: string[]) { + return request({ url: `/biz/callingMaterials/${ids.join(',')}`, method: 'delete' }) + }, + + // 导出 + export(params?: { ids?: string[]; deviceId?: number; status?: number }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + if (params?.deviceId !== undefined && params?.deviceId !== null) p.deviceId = params.deviceId + if (params?.status !== undefined && params?.status !== null) p.status = params.status + return request({ url: `/biz/callingMaterials/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/callingMaterials/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/callingMaterials/template`, method: 'get', responseType: 'blob' }) + } +} diff --git a/src/api/deviceGather.ts b/src/api/deviceGather.ts new file mode 100644 index 0000000..722c0c0 --- /dev/null +++ b/src/api/deviceGather.ts @@ -0,0 +1,69 @@ +import { request } from '@/utils/request' + +// 设备采集 类型定义 +export interface DeviceGather { + id?: number + + deviceId?: number + + assingWorkId?: number + + userId?: number + + gatherNum?: number + + gatherTime?: string + +} + +// 设备采集 API +export const deviceGatherApi = { + // 分页查询 + page(params: { page: number; pageSize: number }) { + return request({ url: '/biz/deviceGather/page', method: 'get', params }) + }, + + // 获取详情 + detail(id: string) { + return request({ url: `/biz/deviceGather/${id}`, method: 'get' }) + }, + + // 新增 + create(data: DeviceGather) { + return request({ url: '/biz/deviceGather', method: 'post', data }) + }, + + // 修改 + update(data: DeviceGather) { + return request({ url: '/biz/deviceGather', method: 'put', data }) + }, + + // 删除 + delete(ids: string[]) { + return request({ url: `/biz/deviceGather/${ids.join(',')}`, method: 'delete' }) + }, + + // 导出 + export(params?: { ids?: string[] }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + return request({ url: `/biz/deviceGather/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/deviceGather/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/deviceGather/template`, method: 'get', responseType: 'blob' }) + } +} diff --git a/src/router/index.ts b/src/router/index.ts index 799e6a5..b2c625a 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -289,6 +289,18 @@ const routes: RouteRecordRaw[] = [ component: () => import('@/views/biz/outsourcing/index.vue'), meta: { title: '工序委外', icon: 'ListOutline' } }, + { + path: 'biz/deviceGather', + name: 'deviceGather', + component: () => import('@/views/biz/deviceGather/index.vue'), + meta: { title: '设备采集', icon: 'ListOutline' } + }, + { + path: 'biz/callingMaterials', + name: 'callingMaterials', + component: () => import('@/views/biz/callingMaterials/index.vue'), + meta: { title: '叫料记录', icon: 'ListOutline' } + }, { // 开发工具 path: 'tool/gen', diff --git a/src/views/biz/callingMaterials/index.vue b/src/views/biz/callingMaterials/index.vue new file mode 100644 index 0000000..0ff8943 --- /dev/null +++ b/src/views/biz/callingMaterials/index.vue @@ -0,0 +1,388 @@ + + + + + diff --git a/src/views/biz/deviceGather/index.vue b/src/views/biz/deviceGather/index.vue new file mode 100644 index 0000000..9a6479e --- /dev/null +++ b/src/views/biz/deviceGather/index.vue @@ -0,0 +1,361 @@ + + + + + diff --git a/src/views/biz/flowingAround/index.vue b/src/views/biz/flowingAround/index.vue index d00d0bb..318d919 100644 --- a/src/views/biz/flowingAround/index.vue +++ b/src/views/biz/flowingAround/index.vue @@ -438,23 +438,6 @@ const confirmResultOptions = computed(() => { }) -// const directionOptions = computed(() => { -// const baseOptions: any[] = [ -// { label: t('account.进账'), value: '进账' }, -// { label: t('account.出账'), value: '出账' }, -// ] - -// // 当 accountType === 'currency' 时,才追加“冻结”选项 -// // if (formRegulationData.accountType === 'currency') { -// // baseOptions.push({ label: t('account.冻结'), value: '冻结' }) -// // baseOptions.push({ label: t('account.解冻'), value: '解冻' }) -// // } - -// return baseOptions -// }) - - - // 加载字典选项 async function loadDictOptions() { try {