diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 4e9e4a2..17490f2 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,6 +1,6 @@ allowBuilds: - '@parcel/watcher': set this to true or false - core-js: set this to true or false - electron-winstaller: set this to true or false - esbuild: set this to true or false - vue-demi: set this to true or false + '@parcel/watcher': true + core-js: true + electron-winstaller: true + esbuild: true + vue-demi: true diff --git a/src/api/device.ts b/src/api/device.ts index ad1776b..7324e36 100644 --- a/src/api/device.ts +++ b/src/api/device.ts @@ -20,7 +20,9 @@ export interface Device{ synEquipId?: number | null, createTime:string, updateTime:string - abnormalRecordList:[] + abnormalRecordList:[], + deviceManagers:[] + deviceManager:string } export interface DeviceRealtimeVO { @@ -103,11 +105,14 @@ export const deviceApi = { export( params?:{ ids?:string[], - deviceCode:any + deviceCode:any, + deviceFlag?:string }){ const p:Record = {} + console.log( params) if(params?.ids?.length) p.ids = params.ids.join(',') if(params?.deviceCode != undefined && params?.deviceCode !== null) p.sectionCode = params.deviceCode + if(params?.deviceFlag != undefined && params?.deviceFlag !== null) p.deviceFlag = params.deviceFlag return request({ url:`/biz/device/report`, method:"get", @@ -122,5 +127,11 @@ export const deviceApi = { method:"get", params }) + }, + deviceList() { + return request({ + url:"/biz/device/list", + method:"get" + }) } } \ No newline at end of file diff --git a/src/api/deviceAbnormalRecord.ts b/src/api/deviceAbnormalRecord.ts index f0b1aef..1b545f8 100644 --- a/src/api/deviceAbnormalRecord.ts +++ b/src/api/deviceAbnormalRecord.ts @@ -16,7 +16,7 @@ export interface DeviceAbnormalRecord { stationName?: string - abnormalType?: string + abnormalType?: number abnormalTypeName?: string @@ -53,7 +53,7 @@ export interface DeviceAbnormalRecord { // 设备异常记录表 API export const deviceAbnormalRecordApi = { // 分页查询 - page(params: { page: number; pageSize: number; id?: number; status?: string }) { + page(params: { page: number; pageSize: number; deviceId?: number; abnormalCode?: string,abnormalType?:number }) { return request({ url: '/biz/deviceAbnormalRecord/page', method: 'get', params }) }, diff --git a/src/api/deviceOperationLog.ts b/src/api/deviceOperationLog.ts new file mode 100644 index 0000000..592389c --- /dev/null +++ b/src/api/deviceOperationLog.ts @@ -0,0 +1,72 @@ +import { request } from '@/utils/request' + +// 设备操作日志 类型定义 +export interface DeviceOperationLog { + id?: number + + assingWorkId?: number + + userId?: number + + deviceId?: number + + source?: number + + operationType?: number + + createTime?: string + +} + +// 设备操作日志 API +export const deviceOperationLogApi = { + // 分页查询 + page(params: { page: number; pageSize: number; deviceId?: number; operationType?: number;userId?: number }) { + return request({ url: '/terminal/operation/page', method: 'get', params }) + }, + + // 获取详情 + detail(id: string) { + return request({ url: `/biz/deviceOperationLog/${id}`, method: 'get' }) + }, + + // 新增 + create(data: DeviceOperationLog) { + return request({ url: '/biz/deviceOperationLog', method: 'post', data }) + }, + + // 修改 + update(data: DeviceOperationLog) { + return request({ url: '/biz/deviceOperationLog', method: 'put', data }) + }, + + // 删除 + delete(ids: string[]) { + return request({ url: `/biz/deviceOperationLog/${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/deviceOperationLog/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/deviceOperationLog/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/deviceOperationLog/template`, method: 'get', responseType: 'blob' }) + } +} \ No newline at end of file diff --git a/src/api/errorNotification.ts b/src/api/errorNotification.ts index 5a81a83..526afaf 100644 --- a/src/api/errorNotification.ts +++ b/src/api/errorNotification.ts @@ -2,82 +2,82 @@ import { request } from '@/utils/request' // ErrorNotification 类型定义 export interface ErrorNotification { - id?: number + id?: number - subscriptionKey?: string + subscriptionKey?: string - title?: string + title?: string - subscriptionDeviceIds?: string + subscriptionDeviceIds?: string - subscriptionDiscoverField?: string + subscriptionDiscoverField?: string - sendingMethod?: string + sendingMethod?: string - discoverValue?: string + discoverValue?: string - detectionMethod?: string + detectionMethod?: string - notifier?: string + notifier?: string - createBy?: number + createBy?: number - crateTime?: string + crateTime?: string - notifierContent?: string + notifierContent?: string - abnormalReporting?: number + abnormalReporting?: number } // ErrorNotification API export const errorNotificationApi = { - // 分页查询 - page(params: { page: number; pageSize: number }) { - return request({ url: '/biz/errorNotification/page', method: 'get', params }) - }, + // 分页查询 + page(params: { page: number; pageSize: number }) { + return request({ url: '/biz/errorNotification/page', method: 'get', params }) + }, - // 获取详情 - detail(id: string) { - return request({ url: `/biz/errorNotification/${id}`, method: 'get' }) - }, + // 获取详情 + detail(id: number) { + return request({ url: `/biz/errorNotification/${id}`, method: 'get' }) + }, - // 新增 - create(data: ErrorNotification) { - return request({ url: '/biz/errorNotification', method: 'post', data }) - }, + // 新增 + create(data: ErrorNotification) { + return request({ url: '/biz/errorNotification', method: 'post', data }) + }, - // 修改 - update(data: ErrorNotification) { - return request({ url: '/biz/errorNotification', method: 'put', data }) - }, + // 修改 + update(data: ErrorNotification) { + return request({ url: '/biz/errorNotification', method: 'put', data }) + }, - // 删除 - delete(ids: string[]) { - return request({ url: `/biz/errorNotification/${ids.join(',')}`, method: 'delete' }) - }, + // 删除 + delete(ids: string[]) { + return request({ url: `/biz/errorNotification/${ids.join(',')}`, method: 'delete' }) + }, - // 导出 - export(params?: { ids?: string[] }) { - const p: Record = {} - if (params?.ids?.length) p.ids = params.ids.join(',') - return request({ url: `/biz/errorNotification/export`, method: 'get', params: p, responseType: 'blob' }) - }, + // 导出 + export(params?: { ids?: string[] }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + return request({ url: `/biz/errorNotification/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/errorNotification/import`, - method: 'post', - data: formData, - headers: { 'Content-Type': 'multipart/form-data' } - }) - }, + // 导入 + importData(file: File) { + const formData = new FormData() + formData.append('file', file) + return request<{ success: number; fail: number; errors: string[] }>({ + url: `/biz/errorNotification/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, - // 下载导入模板 - downloadTemplate() { - return request({ url: `/biz/errorNotification/template`, method: 'get', responseType: 'blob' }) - } -} + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/errorNotification/template`, method: 'get', responseType: 'blob' }) + } +} \ No newline at end of file diff --git a/src/api/illustrated.ts b/src/api/illustrated.ts index 83236e5..63f9f82 100644 --- a/src/api/illustrated.ts +++ b/src/api/illustrated.ts @@ -72,10 +72,18 @@ export function opertree() { }) } -//查询已上传文件 -export function filelist(id:any) { +//查询已上传文件 单文件 +export function filelist(fileId:any) { return request({ - url: `sys/file/${id}`, + url: `sys/file/${fileId}`, + method: 'get' + }) +} + +//查询已上传文件 多文件 +export function multifilelist(fileId:any) { + return request({ + url: `sys/file/getFile/${fileId}`, method: 'get' }) } diff --git a/src/api/issuerecord.ts b/src/api/issuerecord.ts new file mode 100644 index 0000000..ec6e12d --- /dev/null +++ b/src/api/issuerecord.ts @@ -0,0 +1,102 @@ +import { request } from '@/utils/request' + +// 下发记录表 类型定义 +export interface IssueRecord { + id?: number + + issueCode?: string + + issueType?: string + + issueTypeName?: string + + sourceId?: number + + sourceCode?: string + + sourceName?: string + + deviceId?: number + + status?: number + + statusName?: string + + issueTime?: string + + issueBy?: number + + completeTime?: string + + result?: string + + remark?: string + + createTime?: string + + createBy?: number + + assingId?: number + + processId?: number + +} + +// 下发记录表 API +export const issueRecordApi = { + // 分页查询 + page(params: { page: number; pageSize: number; issueCode?: string; status?: number;deviceId?:number }) { + return request({ url: '/biz/issueRecord/page', method: 'get', params }) + }, + + // 获取详情 + detail(id: number) { + return request({ url: `/biz/issueRecord/${id}`, method: 'get' }) + }, + + // 新增 + create(data: IssueRecord) { + return request({ url: '/biz/issueRecord', method: 'post', data }) + }, + + // 修改 + update(data: IssueRecord) { + return request({ url: '/biz/issueRecord', method: 'put', data }) + }, + + // 删除 + delete(ids: number[]) { + return request({ url: `/biz/issueRecord/${ids.join(',')}`, method: 'delete' }) + }, + + // 导出 + export(params?: { ids?: number[]; id?: number; status?: number }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + if (params?.id !== undefined && params?.id !== null) p.id = params.id + if (params?.status !== undefined && params?.status !== null) p.status = params.status + return request({ url: `/biz/issueRecord/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/issueRecord/import`, + method: 'post', + data: formData, + headers: { 'Content-Type': 'multipart/form-data' } + }) + }, + + // 下载导入模板 + downloadTemplate() { + return request({ url: `/biz/issueRecord/template`, method: 'get', responseType: 'blob' }) + }, + + //设备下发记录 + getDeviceDispatchLogList(deviceId: number) { + return request({ url: `/biz/issueRecord/deviceIssueRecords/${deviceId}`, method: 'get' }) + } +} \ No newline at end of file diff --git a/src/api/message.ts b/src/api/message.ts index 00b66ad..1584360 100644 --- a/src/api/message.ts +++ b/src/api/message.ts @@ -13,7 +13,12 @@ export interface SysNotice { status: number createBy?: number createName?: string - createTime?: string + createTime?: string, + abnormalReporting?:number, + reportReason?:string, + errorNotificationId?:number, + filler?:number, + filingStatus?:number, } export interface NoticeChannelOption { diff --git a/src/api/nccode.ts b/src/api/nccode.ts index 0160396..abf99da 100644 --- a/src/api/nccode.ts +++ b/src/api/nccode.ts @@ -67,6 +67,15 @@ export function issuecopy(data:any) { }) } +// 导出 +export function exportIssue(params?: { ids?: number[]; id?: number; status?: number }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + if (params?.id !== undefined && params?.id !== null) p.id = params.id + if (params?.status !== undefined && params?.status !== null) p.status = params.status + return request({ url: `/biz/ncCode/export`, method: 'get', params: p, responseType: 'blob' }) +} + //任务树 export function opertree() { return request({ diff --git a/src/api/orderProcessPlan.ts b/src/api/orderProcessPlan.ts index c53c3e1..a2491df 100644 --- a/src/api/orderProcessPlan.ts +++ b/src/api/orderProcessPlan.ts @@ -126,6 +126,8 @@ export interface ProcessPlanItemVO { assignWorkList?: AssignWorkItem[] + proWorkshop?: string + } @@ -224,6 +226,8 @@ export function processItemToEntity( orderItemId?: number, + proWorkshop?:string + ): OrderProcessPlan { return { @@ -256,7 +260,9 @@ export function processItemToEntity( storageEntry: item.storageEntry, - workCenterName:item.workCenterName + workCenterName:item.workCenterName, + + proWorkshop } diff --git a/src/api/qualityTesting.ts b/src/api/qualityTesting.ts index e038d50..54df286 100644 --- a/src/api/qualityTesting.ts +++ b/src/api/qualityTesting.ts @@ -103,5 +103,10 @@ export const qualityTestingApi = { // 下载导入模板 downloadTemplate() { return request({ url: `/biz/qualityTesting/template`, method: 'get', responseType: 'blob' }) + }, + + //加载质检单 + loadQualityTestingList(assingId:number) { + return request({url:`/mes/qc/loadQualityTestingList/${assingId}`,method:'get'}) } } \ No newline at end of file diff --git a/src/api/section.ts b/src/api/section.ts index 97c2110..a145595 100644 --- a/src/api/section.ts +++ b/src/api/section.ts @@ -68,7 +68,7 @@ export const sectionApi = { }) }, - list(params:{sectionName:string}) { + list(params:{sectionName:string,workShop:string}) { return request({ url:"/biz/section/listBySectionName", method:"get", diff --git a/src/api/submitLog.ts b/src/api/submitLog.ts index 7d8c5c6..97f7962 100644 --- a/src/api/submitLog.ts +++ b/src/api/submitLog.ts @@ -87,5 +87,19 @@ export const submitLogApi = { //按派工单id查询汇报 getByDispatch(dispatchId:number){ return request({url:`/mes/report/bydispatch/${dispatchId}`,method:"get"}) + }, + + //根据工序Id查询汇报 + getProcessReportDetail(params?:{page?:number;pageSize?:number;submitStatus?:number;processId?:number;}){ + return request({url:`/mes/report/submitLogToProcess`,method:"get",params}) + }, + //根据订单Id查询汇报 + getOrderItemReportDetail(params?:{page?:number;pageSize?:number;submitStatus?:number;orderItemId?:number;}){ + return request({url:`/mes/report/allSubmitLogByorderItemId`,method:"get",params}) + }, + + //加载汇报列表 + loadSumbitLog(assingId?:number){ + return request({url:`/mes/report/loadSumbitLog/${assingId}`,method:'get'}) } } diff --git a/src/api/system.ts b/src/api/system.ts index be64535..b193d3b 100644 --- a/src/api/system.ts +++ b/src/api/system.ts @@ -136,13 +136,6 @@ export const userApi = { }) }, - //获取设备负责人 - getEquipmentManager() { - return request({ - url:"/sys/user/getEquipmentManager", - method:"get" - }) - } } diff --git a/src/api/test01.ts b/src/api/test01.ts new file mode 100644 index 0000000..e69de29 diff --git a/src/api/tool.ts b/src/api/tool.ts new file mode 100644 index 0000000..a731824 --- /dev/null +++ b/src/api/tool.ts @@ -0,0 +1,77 @@ +import { request } from '@/utils/request' + +export interface Tool { + id?: number + toolCode: string + toolName: string + toolType: string + toolTypeId?: number + specModel: string + material: string + manufacturer: string + purchaseDate?: string | number + lifeCycle: number + usedCount?: number + status: number + remark: string + createTime?: string + updateTime?: string +} + +export const toolApi = { + page(params: { + page: number + pageSize: number + toolCode?: string + toolName?: string + status?: number + }) { + return request({ + url: '/biz/tool/page', + method: 'get', + params + }) + }, + + create(data: Tool) { + return request({ + url: '/biz/tool', + method: 'post', + data + }) + }, + + update(data: Tool) { + return request({ + url: '/biz/tool', + method: 'put', + data + }) + }, + + delete(ids: number[]) { + return request({ + url: `/biz/tool/${ids.join(',')}`, + method: 'delete' + }) + }, + + export(params?: { + ids?: number[] + toolCode?: string + toolName?: string + status?: number + }) { + const p: Record = {} + if (params?.ids?.length) p.ids = params.ids.join(',') + if (params?.toolCode) p.toolCode = params.toolCode + if (params?.toolName) p.toolName = params.toolName + if (params?.status != null) p.status = params.status + return request({ + url: '/biz/tool/report', + method: 'get', + params: p, + responseType: 'blob' + }) + } +} \ No newline at end of file diff --git a/src/components/DetailPage.vue b/src/components/DetailPage.vue new file mode 100644 index 0000000..a403c98 --- /dev/null +++ b/src/components/DetailPage.vue @@ -0,0 +1,9 @@ + + + \ No newline at end of file diff --git a/src/components/ErrorReportModal.vue b/src/components/ErrorReportModal.vue new file mode 100644 index 0000000..35d2b19 --- /dev/null +++ b/src/components/ErrorReportModal.vue @@ -0,0 +1,218 @@ + + + + + \ No newline at end of file diff --git a/src/layout/index.vue b/src/layout/index.vue index 880415d..1857970 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -246,8 +246,8 @@ @@ -382,6 +389,8 @@ import TabBar from '@/components/TabBar.vue' import SiteLogoMark from '@/components/SiteLogoMark.vue' import { noticeApi, chatApi, type SysNotice, type ChatMessage } from '@/api/message' import { iconMap as externalIconMap } from '@/utils/icons' +import ErrorReportModal from "@/components/ErrorReportModal.vue"; +import {errorNotificationApi} from "@/api/errorNotification.ts"; const route = useRoute() const router = useRouter() @@ -405,6 +414,7 @@ window.$message = message const collapsed = ref(false) const showProfileModal = ref(false) const showPasswordModal = ref(false) +const showErrorReportModal = ref(false) const messageTab = ref('notice') // 消息相关 @@ -599,18 +609,40 @@ function stripHtml(html: string | undefined): string { } // 点击通知 +//异常订阅内容 +const errorNotifiaction = ref({ + title: '', + devices: '', + sendingMethodName: '', + notifierName: '', + notifierContent: '' +}) +//是否需要填报 +const notice = ref( {}) async function handleNoticeClick(item: SysNotice) { - // 标记已读 - if (item.id) { - try { - await noticeApi.markAsRead(item.id) - // 刷新未读数量 - loadUnreadCount() - } catch (error) { - // 忽略 - } - } - router.push({ path: '/message/notice', query: { id: item.id?.toString() } }) + + + const res = await errorNotificationApi.detail(item.errorNotificationId); + errorNotifiaction.value = {...res} + errorNotifiaction.value.noticeId = item.id + notice.value = item + //异常填报直接弹窗 + showErrorReportModal.value = true + // if (item.abnormalReporting) { + // + // }else { + // // 标记已读 + // if (item.id) { + // try { + // await noticeApi.markAsRead(item.id) + // // 刷新未读数量 + // loadUnreadCount() + // } catch (error) { + // // 忽略 + // } + // } + // router.push({ path: '/message/notice', query: { id: item.id?.toString() } }) + // } } // 点击聊天 diff --git a/src/router/index.ts b/src/router/index.ts index 731ea1b..0036c26 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -289,18 +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: 'biz/tool', + // name: 'tool', + // component: () => import('@/views/biz/tool/index.vue'), + // meta: { title: '刀具管理', icon: 'ToolOutline' } + // }, + // { + // path: 'biz/tool/usage', + // name: 'toolUsage', + // component: () => import('@/views/biz/tool/usage.vue'), + // meta: { title: '刀具使用记录', icon: 'ToolOutline', activeMenu: '/biz/tool' } + // }, { path: 'biz/errorNotification', name: 'errorNotification', diff --git a/src/views/biz/basicProcessPlan/index.vue b/src/views/biz/basicProcessPlan/index.vue index eaac2a1..21c984b 100644 --- a/src/views/biz/basicProcessPlan/index.vue +++ b/src/views/biz/basicProcessPlan/index.vue @@ -47,6 +47,7 @@ :loading="loading" :row-key="(row) => row.id" :scroll-x="1200" + v-model:checked-row-keys="selectedIds" />
diff --git a/src/views/biz/device/DeviceAbnomarlRecord.vue b/src/views/biz/device/DeviceAbnomarlRecord.vue index 895ef06..206b6c0 100644 --- a/src/views/biz/device/DeviceAbnomarlRecord.vue +++ b/src/views/biz/device/DeviceAbnomarlRecord.vue @@ -1,21 +1,78 @@ \ No newline at end of file diff --git a/src/views/biz/device/DeviceOperationLog.vue b/src/views/biz/device/DeviceOperationLog.vue new file mode 100644 index 0000000..0f05717 --- /dev/null +++ b/src/views/biz/device/DeviceOperationLog.vue @@ -0,0 +1,273 @@ + + + + + \ No newline at end of file diff --git a/src/views/biz/device/index.vue b/src/views/biz/device/index.vue index dd4cf32..67f8f5c 100644 --- a/src/views/biz/device/index.vue +++ b/src/views/biz/device/index.vue @@ -4,7 +4,7 @@
- + @@ -74,6 +74,7 @@ :loading="loading" :row-key="(row) => row.id" :scroll-x="1200" + v-model:checked-row-keys="selectedIds" />
@@ -201,10 +202,10 @@ - + + + + + + + + + + + + + + + + + + +
@@ -239,10 +270,16 @@ import {sectionApi} from '@/api/section' import {SysUser, userApi} from '@/api/system' import {DeviceAbnormalRecord, deviceAbnormalRecordApi} from "@/api/deviceAbnormalRecord.ts"; import DeviceAbnormalRecordPage from '@/views/biz/device/DeviceAbnomarlRecord.vue' +import DeviceOperationLogPage from "@/views/biz/device/DeviceOperationLog.vue"; + +import DeviceDispatchLogPage from "@/views/biz/device/DeviceDispatchLog.vue"; const message = useMessage() const dialog = useDialog() const router = useRouter() +//设备Id +const deviceId = ref(undefined) + //设备负责人列表 const deviceManagerList = ref<{ label: string, value: any }[]>([]) @@ -255,9 +292,10 @@ const title = ref('') //设备下发记录 const deviceIssueRecordList = ref<[]>([]) +const deviceDispatchLogDrawerVisible = ref(false) - - +//操作日志抽屉 +const deviceOperationLogDrawerVisible = ref(false) // 搜索表单 const searchForm = reactive({ @@ -297,7 +335,9 @@ const defaultFormData: Device = { status: 0, deviceFlag: 'mes_equipment', synEquipId: null as number | null, - deviceManagerList: null as any | null + deviceManagerList: null as any | null, + deviceManagers: null as [string] | null, + deviceManager: null as String | null } const formData = reactive({...defaultFormData}) @@ -365,12 +405,14 @@ const columns: DataTableColumns = [ { label: '设备异常记录', key: 'deviceErrorLog', - }, { label: '设备下发记录', key: 'deviceDispatchLog', - + }, + { + label: '设备操作日志', + key: 'deviceOperationLog', } ], onSelect: (key: string) => { switch (key) { @@ -380,6 +422,9 @@ const columns: DataTableColumns = [ case "deviceDispatchLog": handleDeviceDispatchLog(row) break + case "deviceOperationLog": + deviceOperationLog(row) + break } } }, { @@ -455,16 +500,23 @@ function goRealtimeBoard() { // 编辑 function handleEdit(row: Device) { - + Object.assign(formData, defaultFormData) modalTitle.value = '编辑设备表' Object.assign(formData, row) - console.log(formData); - + const userIdList = [] + if (row.deviceManager) { + let manager = row.deviceManager.split(','); + manager.forEach(item => { + userIdList.push(Number(item)) + }) + } + formData.deviceManagers = userIdList modalVisible.value = true } // 提交 async function handleSubmit() { + await formRef.value?.validate() try { const submitData = {...formData} as Device @@ -531,6 +583,7 @@ async function handleExport() { const params: Record = {} if (selectedIds.value.length > 0) params.ids = selectedIds.value if (searchForm.deviceCode != null) params.deviceCode = searchForm.deviceCode + params.deviceFlag = "mes_equipment" const blob = await deviceApi.export(params) const url = window.URL.createObjectURL(blob) const link = document.createElement('a') @@ -620,26 +673,42 @@ async function loadSection() { //加载人员 async function handleUser() { - const res = await userApi.getEquipmentManager() - deviceManagerList.value = res + const res = await userApi.getPathList() + deviceManagerList.value = res.map((n:any)=>{ + return { + label:n.username, + value:n.id + } + }) } //查看设备异常记录 async function handleDeviceErrorLog(row: Device) { + deviceId.value = row.id deviceAbnormalRecordDrawerVisible.value = true title.value = row.deviceName+"异常记录" - deviceErrorLogList.value = row.abnormalRecordList } + async function handleDeviceDispatchLog(row: Device) { - const deviceId = row.id - //deviceIssueRecordList.value = await deviceIssueRecordApi.getDeviceDispatchLogList(deviceId) + deviceId.value = row.id + deviceDispatchLogDrawerVisible.value = true + title.value = row.deviceName+"设备下发记录" +} + +async function deviceOperationLog(row: Device) { + deviceId.value = row.id + deviceOperationLogDrawerVisible.value = true + title.value = row.deviceName + "操作记录"; + } function doShowInner() { deviceAbnormalRecordDrawerVisible.value = false + deviceOperationLogDrawerVisible.value = false + deviceDispatchLogDrawerVisible.value = false } onMounted(() => { diff --git a/src/views/biz/orderProcessPlan/board.vue b/src/views/biz/orderProcessPlan/board.vue index a2728f5..f61c1af 100644 --- a/src/views/biz/orderProcessPlan/board.vue +++ b/src/views/biz/orderProcessPlan/board.vue @@ -353,6 +353,7 @@ :obj="n" :index="i" :section="dispatchform.workCenterName" + :workShop="dispatchform.workShop" listname="list" @addhand="addpgnum" @delehand="deletenum(i)" @@ -531,10 +532,28 @@ - - + + + + + + + +
@@ -550,7 +569,7 @@ import { AddOutline, RemoveOutline, SearchOutline, RefreshOutline, CloudUploadOutline, DownloadOutline, ChevronDownOutline, CheckmarkCircleOutline, CheckmarkCircle, EllipseOutline, TimeOutline, PrintOutline, SyncOutline, PeopleOutline, - GitBranchOutline, CloseCircleOutline, LockClosedOutline, TrashOutline, + GitBranchOutline, CloseCircleOutline, LockClosedOutline, TrashOutline, EyeSharp, } from '@vicons/ionicons5' import { orderProcessPlanApi, @@ -568,8 +587,8 @@ import ProcessCard from './components/ProcessCard.vue' import PlmModelDrawer from '@/components/PlmModelDrawer.vue' import type { PlmModelOpenContext } from '@/api/plmModel' import Pgitem from './pgitem.vue' -import { submitLogApi } from '@/api/submitLog.ts' - +import ReportDetailPage from "@/views/biz/orderProcessPlan/components/ReportDetail.vue"; +import OrderReportDetailPage from "@/views/biz/orderProcessPlan/components/OrderReportDetail.vue"; const message = useMessage() @@ -609,7 +628,7 @@ const dispatchmodal = ref(false) const dispatchLoading = ref(false) const dispatchformRef = ref() const dispatchform = reactive({ - id: '', name: '', beginTime: '', endTime: '', quantity: '',workCenterName:'', + id: '', name: '', beginTime: '', endTime: '', quantity: '',workCenterName:'',proWorkshop:'', list: [{ sectionId:'',deviceId:'', quantity: '' }], }) const dispatchrules = {} @@ -617,6 +636,7 @@ const dispatchrules = {} const importModalVisible = ref(false) const plmModelDrawerRef = ref | null>(null) +const submitModalVisible = ref(false) const outsourceModalVisible = ref(false) const outsourceOptionsLoading = ref(false) @@ -659,13 +679,14 @@ function openPlmModel(order: OrderProcessPlanVO, process?: ProcessPlanItemVO) { //汇报记录详情 const submitLogModalVisible = ref(false) - +const processId = ref(null) //汇报详情 -function openDetailModel(order:ProcessPlanItemVO,procces?:OrderProcessPlanVO) { +function openDetailModel(order:ProcessPlanItemVO,process?:OrderProcessPlanVO) { submitLogModalVisible.value = true - const processId = procces.planId + console.log(process.planId) + processId.value = process.planId } @@ -704,6 +725,7 @@ const moreOptions = [ { label: '创建返工单', key: 'createRework', icon: dropdownIcon(SyncOutline) }, { label: '创建工序委外', key: 'createOutsource', icon: dropdownIcon(PeopleOutline) }, { label: '拆分工单', key: 'splitWorkOrder', icon: dropdownIcon(GitBranchOutline) }, + { label: '汇报详情', key: 'reportDetailView', icon: dropdownIcon(EyeSharp) }, ], }, { @@ -858,6 +880,11 @@ function onMoreSelect(key: string, order: OrderProcessPlanVO) { openOutsource(order) return } + if (key === 'reportDetailView') { + openReportDetail(order) + return; + } + const labels: Record = { print: '打印', createRework: '创建返工单', @@ -1034,7 +1061,7 @@ async function handleSubmit() { } function disphand(process: ProcessPlanItemVO, order?: OrderProcessPlanVO) { - const entity = processItemToEntity(process, order?.orderItemId) + const entity = processItemToEntity(process, order?.orderItemId,order?.proWorkshop) dispatchmodal.value = true dispatchformRef.value?.restoreValidation() @@ -1046,8 +1073,11 @@ function disphand(process: ProcessPlanItemVO, order?: OrderProcessPlanVO) { dispatchform.orderItemId = entity.orderItemId dispatchform.sort = entity.sort dispatchform.workCenterName = entity.workCenterName + dispatchform.workShop = entity.proWorkshop dispatchform.list = [{ sectionId:'',deviceId:'', quantity: '' }] + console.log(dispatchform) + } @@ -1120,6 +1150,15 @@ async function handleImportUpload({ file }: UploadCustomRequestOptions) { loadData() } + +const orderItemId = ref(null) + +function openReportDetail(order) { + submitModalVisible.value = true + orderItemId.value = order.orderItemId + +} + onMounted(loadData) diff --git a/src/views/biz/orderProcessPlan/components/OrderReportDetail.vue b/src/views/biz/orderProcessPlan/components/OrderReportDetail.vue new file mode 100644 index 0000000..e89e2ed --- /dev/null +++ b/src/views/biz/orderProcessPlan/components/OrderReportDetail.vue @@ -0,0 +1,211 @@ + + + + + \ No newline at end of file diff --git a/src/views/biz/orderProcessPlan/components/ProcessCard.vue b/src/views/biz/orderProcessPlan/components/ProcessCard.vue index d4d0094..6afd37d 100644 --- a/src/views/biz/orderProcessPlan/components/ProcessCard.vue +++ b/src/views/biz/orderProcessPlan/components/ProcessCard.vue @@ -84,7 +84,7 @@ >委外 汇报 diff --git a/src/views/biz/orderProcessPlan/components/ReportDetail.vue b/src/views/biz/orderProcessPlan/components/ReportDetail.vue new file mode 100644 index 0000000..ea77693 --- /dev/null +++ b/src/views/biz/orderProcessPlan/components/ReportDetail.vue @@ -0,0 +1,209 @@ + + + + + \ No newline at end of file diff --git a/src/views/biz/orderProcessPlan/pgitem.vue b/src/views/biz/orderProcessPlan/pgitem.vue index 10287b8..6d736dc 100644 --- a/src/views/biz/orderProcessPlan/pgitem.vue +++ b/src/views/biz/orderProcessPlan/pgitem.vue @@ -82,21 +82,20 @@