From a8c1a388f66585d83097b698f307b45bfabf24a7 Mon Sep 17 00:00:00 2001 From: shaoleiliu-netizen123 <480188199@qq.com> Date: Mon, 27 Jul 2026 17:53:59 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/device.ts | 11 +- src/api/deviceOperationLog.ts | 72 +++++++ src/api/issuerecord.ts | 102 +++++++++ src/api/nccode.ts | 9 + src/components/DetailPage.vue | 9 + src/views/biz/basicProcessPlan/index.vue | 1 + src/views/biz/device/DeviceOperationLog.vue | 221 ++++++++++++++++++++ src/views/biz/device/index.vue | 46 +++- src/views/biz/orderProcessPlan/board.vue | 4 +- src/views/biz/orderProcessPlan/pgitem.vue | 4 +- src/views/biz/qualityItem/index.vue | 1 + src/views/biz/station/index.vue | 2 + src/views/lllustrated/index.vue | 9 +- 13 files changed, 473 insertions(+), 18 deletions(-) create mode 100644 src/api/deviceOperationLog.ts create mode 100644 src/api/issuerecord.ts create mode 100644 src/components/DetailPage.vue create mode 100644 src/views/biz/device/DeviceOperationLog.vue diff --git a/src/api/device.ts b/src/api/device.ts index ad1776b..0439cee 100644 --- a/src/api/device.ts +++ b/src/api/device.ts @@ -103,11 +103,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 +125,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/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/issuerecord.ts b/src/api/issuerecord.ts new file mode 100644 index 0000000..f45ed9c --- /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; id?: number; status?: 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/nccode.ts b/src/api/nccode.ts index 1de4ba7..a13d29e 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/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/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/DeviceOperationLog.vue b/src/views/biz/device/DeviceOperationLog.vue new file mode 100644 index 0000000..262cf66 --- /dev/null +++ b/src/views/biz/device/DeviceOperationLog.vue @@ -0,0 +1,221 @@ + + + + + \ No newline at end of file diff --git a/src/views/biz/device/index.vue b/src/views/biz/device/index.vue index dd4cf32..1d4dda1 100644 --- a/src/views/biz/device/index.vue +++ b/src/views/biz/device/index.vue @@ -74,6 +74,7 @@ :loading="loading" :row-key="(row) => row.id" :scroll-x="1200" + v-model:checked-row-keys="selectedIds" />
+ + + + + + + + +
@@ -239,10 +255,15 @@ 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 { issueRecordApi } from '@/api/issuerecord' const message = useMessage() const dialog = useDialog() const router = useRouter() +//设备Id +const deviceId = ref(undefined) + //设备负责人列表 const deviceManagerList = ref<{ label: string, value: any }[]>([]) @@ -256,8 +277,8 @@ const title = ref('') //设备下发记录 const deviceIssueRecordList = ref<[]>([]) - - +//操作日志抽屉 +const deviceOperationLogDrawerVisible = ref(false) // 搜索表单 const searchForm = reactive({ @@ -365,12 +386,14 @@ const columns: DataTableColumns = [ { label: '设备异常记录', key: 'deviceErrorLog', - }, { label: '设备下发记录', key: 'deviceDispatchLog', - + }, + { + label: '设备操作日志', + key: 'deviceOperationLog', } ], onSelect: (key: string) => { switch (key) { @@ -380,6 +403,9 @@ const columns: DataTableColumns = [ case "deviceDispatchLog": handleDeviceDispatchLog(row) break + case "deviceOperationLog": + deviceOperationLog(row) + break } } }, { @@ -531,6 +557,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') @@ -633,13 +660,22 @@ async function handleDeviceErrorLog(row: Device) { deviceErrorLogList.value = row.abnormalRecordList } + async function handleDeviceDispatchLog(row: Device) { const deviceId = row.id - //deviceIssueRecordList.value = await deviceIssueRecordApi.getDeviceDispatchLogList(deviceId) + deviceIssueRecordList.value = await issueRecordApi.getDeviceDispatchLogList(deviceId) +} + +async function deviceOperationLog(row: Device) { + deviceId.value = row.id + deviceOperationLogDrawerVisible.value = true + title.value = row.deviceName + "操作记录"; + } function doShowInner() { deviceAbnormalRecordDrawerVisible.value = false + deviceOperationLogDrawerVisible.value = false } onMounted(() => { diff --git a/src/views/biz/orderProcessPlan/board.vue b/src/views/biz/orderProcessPlan/board.vue index a2728f5..5f5c832 100644 --- a/src/views/biz/orderProcessPlan/board.vue +++ b/src/views/biz/orderProcessPlan/board.vue @@ -664,8 +664,8 @@ const submitLogModalVisible = ref(false) //汇报详情 function openDetailModel(order:ProcessPlanItemVO,procces?:OrderProcessPlanVO) { - submitLogModalVisible.value = true - const processId = procces.planId + // submitLogModalVisible.value = true + // const processId = procces.planId } diff --git a/src/views/biz/orderProcessPlan/pgitem.vue b/src/views/biz/orderProcessPlan/pgitem.vue index 10287b8..115f17b 100644 --- a/src/views/biz/orderProcessPlan/pgitem.vue +++ b/src/views/biz/orderProcessPlan/pgitem.vue @@ -82,15 +82,13 @@ \ No newline at end of file diff --git a/src/views/biz/device/DeviceOperationLog.vue b/src/views/biz/device/DeviceOperationLog.vue index 262cf66..0f05717 100644 --- a/src/views/biz/device/DeviceOperationLog.vue +++ b/src/views/biz/device/DeviceOperationLog.vue @@ -108,18 +108,54 @@ const columns = [ }, { title: '操作类型', - key: 'operationType' + key: 'operationTypeName' }, { title: '操作人员', - key: 'nickname' + key: 'userName' }, { title: '操作时间', key: 'createTime' + }, + { + title: '数据来源', + key: 'source', + render(row) { + var opt = row.source + if(opt == 1) return '终端' + if(opt == 2) return '后台' + return '-' + } } ] +const handleSearch = () => { + load() +} + +const handleReset = () => { + searchForm.value.createTime = null + searchForm.value.operationType = null + searchForm.value.userId = null + pagination.page = 1 + pagination.pageSize = 10 + load() +} + + +// 分页 +function handlePageChange(page: number) { + pagination.page = page + load() +} + +function handlePageSizeChange(pageSize: number) { + pagination.pageSize = pageSize + pagination.page = 1 + load() +} + onMounted(()=>{ getDeviceList() @@ -149,17 +185,17 @@ onMounted(()=>{ type="date" /> - - - - - + + + + + + + + + + + { + +
+ + + +
diff --git a/src/views/biz/device/index.vue b/src/views/biz/device/index.vue index 1d4dda1..99bf58c 100644 --- a/src/views/biz/device/index.vue +++ b/src/views/biz/device/index.vue @@ -131,10 +131,10 @@ @@ -202,10 +202,10 @@ - + + + + + + + + + + @@ -256,7 +271,8 @@ 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 { issueRecordApi } from '@/api/issuerecord' + +import DeviceDispatchLogPage from "@/views/biz/device/DeviceDispatchLog.vue"; const message = useMessage() const dialog = useDialog() const router = useRouter() @@ -276,6 +292,7 @@ const title = ref('') //设备下发记录 const deviceIssueRecordList = ref<[]>([]) +const deviceDispatchLogDrawerVisible = ref(false) //操作日志抽屉 const deviceOperationLogDrawerVisible = ref(false) @@ -318,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}) @@ -481,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 @@ -647,23 +673,29 @@ 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 issueRecordApi.getDeviceDispatchLogList(deviceId) + deviceId.value = row.id + deviceDispatchLogDrawerVisible.value = true + title.value = row.deviceName+"设备下发记录" } async function deviceOperationLog(row: Device) { @@ -676,6 +708,7 @@ async function deviceOperationLog(row: Device) { function doShowInner() { deviceAbnormalRecordDrawerVisible.value = false deviceOperationLogDrawerVisible.value = false + deviceDispatchLogDrawerVisible.value = false } onMounted(() => { From 147b802daf4f2f51cfd5e5061fa7dd6befa4004e Mon Sep 17 00:00:00 2001 From: wzt <3847407356@qq.com> Date: Tue, 28 Jul 2026 09:54:38 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E5=88=80=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pnpm-workspace.yaml | 10 +++--- src/api/tool.ts | 77 +++++++++++++++++++++++++++++++++++++++++++++ src/router/index.ts | 16 +++++----- 3 files changed, 90 insertions(+), 13 deletions(-) create mode 100644 src/api/tool.ts 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/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/router/index.ts b/src/router/index.ts index b2c625a..f190e34 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -290,16 +290,16 @@ const routes: RouteRecordRaw[] = [ meta: { title: '工序委外', icon: 'ListOutline' } }, { - path: 'biz/deviceGather', - name: 'deviceGather', - component: () => import('@/views/biz/deviceGather/index.vue'), - meta: { title: '设备采集', icon: 'ListOutline' } + path: 'biz/tool', + name: 'tool', + component: () => import('@/views/biz/tool/index.vue'), + meta: { title: '刀具管理', icon: 'ToolOutline' } }, { - path: 'biz/callingMaterials', - name: 'callingMaterials', - component: () => import('@/views/biz/callingMaterials/index.vue'), - meta: { title: '叫料记录', icon: 'ListOutline' } + path: 'biz/tool/usage', + name: 'toolUsage', + component: () => import('@/views/biz/tool/usage.vue'), + meta: { title: '刀具使用记录', icon: 'ToolOutline', activeMenu: '/biz/tool' } }, { // 开发工具 From 69e5e45478739967a0b348dcc8760809ca888efa Mon Sep 17 00:00:00 2001 From: andy <1042025947@qq.com> Date: Tue, 28 Jul 2026 11:25:45 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E8=AE=A2=E9=98=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/index.vue | 4 ++-- src/views/message/notice/index.vue | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/layout/index.vue b/src/layout/index.vue index 880415d..a91bac8 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -246,8 +246,8 @@ @@ -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 + submitLogModalVisible.value = true + 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,14 @@ async function handleImportUpload({ file }: UploadCustomRequestOptions) { loadData() } + +const orderId = ref(null) + +function openReportDetail(order) { + submitModalVisible.value = true + orderId.value = order.id +} + onMounted(loadData) 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..acabd19 --- /dev/null +++ b/src/views/biz/orderProcessPlan/components/ReportDetail.vue @@ -0,0 +1,295 @@ + + + + + \ No newline at end of file diff --git a/src/views/biz/orderProcessPlan/pgitem.vue b/src/views/biz/orderProcessPlan/pgitem.vue index 115f17b..6d736dc 100644 --- a/src/views/biz/orderProcessPlan/pgitem.vue +++ b/src/views/biz/orderProcessPlan/pgitem.vue @@ -95,6 +95,7 @@ obj:any, index:any section:string + workShop: string }>(), { obj:{} }) @@ -155,23 +156,23 @@ //加载工段 async function loadSection() { //根据section 进行匹配 - const res = await sectionApi.list({sectionName:props.section}) + const res = await sectionApi.list({sectionName:props.section,workShop:props.workShop}) const mesSection = res.MesSection; const mesDevice = res.MesDevice console.log(mesSection); - + sectionList.push({ label:mesSection.sectionName, value:mesSection.id - }) - props.obj.sectionId = mesSection.id - + }) + props.obj.sectionId = mesSection.id + deviceList.value = mesDevice.map((n:any)=>{ return { label:n.deviceName, value:n.id+'' } - }) + }) } // function searchSection(sectionId?:number){ diff --git a/src/views/production/componets/AssingWorkTreeTable.vue b/src/views/production/componets/AssingWorkTreeTable.vue index 4d9660d..afce329 100644 --- a/src/views/production/componets/AssingWorkTreeTable.vue +++ b/src/views/production/componets/AssingWorkTreeTable.vue @@ -11,17 +11,20 @@ - + + + +
@@ -506,10 +509,11 @@ async function loadDictOptions() { } //汇报信息弹窗 +const assingId = ref(null) function handleReportRecords(row:any) { showQcReport.value = true reportTitle.value = "汇报信息" - submitLogList.value = row.submitLogList + assingId.value = row.id baseInfo.value = {...row} baseInfo.value.logOrQuality = "log" } @@ -520,8 +524,7 @@ function handleReportRecords(row:any) { function handleQualityRecords(row:any) { showQcReport.value = true reportTitle.value = "质检信息" - qualityList.value = row.qualityTestingList - console.log(qualityList.value) + assingId.value = row.id baseInfo.value = {...row} baseInfo.value.logOrQuality = "Quality" } diff --git a/src/views/production/componets/QualityInfoPage.vue b/src/views/production/componets/QualityInfoPage.vue index 6feee68..9db9414 100644 --- a/src/views/production/componets/QualityInfoPage.vue +++ b/src/views/production/componets/QualityInfoPage.vue @@ -27,7 +27,7 @@ @@ -39,11 +39,11 @@ import { NCard, NDataTable, NGi,NTag, NGrid,DataTableColumns} from "naive-ui"; import {onMounted, ref,h} from "vue"; import { dictDataApi } from '@/api/org' -import {QualityTesting} from "@/api/qualityTesting.ts"; +import {QualityTesting,qualityTestingApi} from "@/api/qualityTesting.ts"; const props =defineProps( { - qualityTestingList:Object, + assingId:Object, baseInfo:Object } ) @@ -91,9 +91,15 @@ async function loadDictOptions() { } +const qualityTestingList = ref([]) +async function loadQualityTestingList() { + const res = await qualityTestingApi.loadQualityTestingList(props.assingId) + qualityTestingList.value = res +} onMounted(()=>{ loadDictOptions() + loadQualityTestingList() }) \ No newline at end of file From 23edd93c97426e858ed1660a6710b7fda2d11802 Mon Sep 17 00:00:00 2001 From: shaoleiliu-netizen123 <480188199@qq.com> Date: Tue, 28 Jul 2026 17:36:07 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E5=B7=A5=E5=BA=8F=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E6=B1=87=E6=8A=A5=E5=92=8C=E8=AE=A2=E5=8D=95=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E6=B1=87=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/nccode.ts | 3 +- src/api/submitLog.ts | 8 +- src/views/biz/orderProcessPlan/board.vue | 9 +- .../components/OrderReportDetail.vue | 200 +++++++++ .../components/ReportDetail.vue | 416 +++++++----------- 5 files changed, 378 insertions(+), 258 deletions(-) diff --git a/src/api/nccode.ts b/src/api/nccode.ts index a13d29e..d940394 100644 --- a/src/api/nccode.ts +++ b/src/api/nccode.ts @@ -97,6 +97,7 @@ export function exportNccode(params:any) { return request({ url: `biz/ncCode/export`, method: 'get', - params + params, + responseType: 'blob' }) } diff --git a/src/api/submitLog.ts b/src/api/submitLog.ts index 47a271b..97f7962 100644 --- a/src/api/submitLog.ts +++ b/src/api/submitLog.ts @@ -90,8 +90,12 @@ export const submitLogApi = { }, //根据工序Id查询汇报 - getProcessReportDetail(processId:number){ - return request({url:`/mes/report/submitLogToProcess/${processId}`,method:"get"}) + 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}) }, //加载汇报列表 diff --git a/src/views/biz/orderProcessPlan/board.vue b/src/views/biz/orderProcessPlan/board.vue index c764e8f..f61c1af 100644 --- a/src/views/biz/orderProcessPlan/board.vue +++ b/src/views/biz/orderProcessPlan/board.vue @@ -544,9 +544,9 @@ - + @@ -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() } }) + // } } // 点击聊天 From 7bdda83d459d5862a31226912d9fbc437eacba3d Mon Sep 17 00:00:00 2001 From: shaoleiliu-netizen123 <480188199@qq.com> Date: Wed, 29 Jul 2026 15:51:44 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=B8=8B=E5=8F=91=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/NCcode/index.vue | 828 --------------------- src/views/biz/device/DeviceDispatchLog.vue | 21 +- src/views/biz/device/index.vue | 2 +- 3 files changed, 14 insertions(+), 837 deletions(-) delete mode 100644 src/views/NCcode/index.vue diff --git a/src/views/NCcode/index.vue b/src/views/NCcode/index.vue deleted file mode 100644 index 972f49e..0000000 --- a/src/views/NCcode/index.vue +++ /dev/null @@ -1,828 +0,0 @@ - - - - - diff --git a/src/views/biz/device/DeviceDispatchLog.vue b/src/views/biz/device/DeviceDispatchLog.vue index eb2992d..7f5bafd 100644 --- a/src/views/biz/device/DeviceDispatchLog.vue +++ b/src/views/biz/device/DeviceDispatchLog.vue @@ -19,7 +19,7 @@ const searchForm = ref({ const pagination = reactive({ page: 1, - pageSize: 2, + pageSize: 10, itemCount: 0, showSizePicker: true, pageSizes: [10, 20, 50] @@ -62,8 +62,12 @@ const load = async()=>{ const columns = [ { - title: '下发编号', - key: 'issueCode' + title: '工序名称', + key: 'processName' + }, + { + title: '工序名称', + key: 'assingCode' }, { title: '下发类型', @@ -89,6 +93,12 @@ const columns = [ title: '下发时间', key: 'issueTime' }, + // { + // title: '下发文件', + // render(row) { + // return row. + // } + // }, { title: '备注', key: 'remark' @@ -138,11 +148,6 @@ onMounted(()=>{ - - - - -
- +