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..47a271b 100644 --- a/src/api/submitLog.ts +++ b/src/api/submitLog.ts @@ -87,5 +87,15 @@ export const submitLogApi = { //按派工单id查询汇报 getByDispatch(dispatchId:number){ return request({url:`/mes/report/bydispatch/${dispatchId}`,method:"get"}) + }, + + //根据工序Id查询汇报 + getProcessReportDetail(processId:number){ + return request({url:`/mes/report/submitLogToProcess/${processId}`,method:"get"}) + }, + + //加载汇报列表 + loadSumbitLog(assingId?:number){ + return request({url:`/mes/report/loadSumbitLog/${assingId}`,method:'get'}) } } diff --git a/src/router/index.ts b/src/router/index.ts index c0e6301..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/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/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/orderProcessPlan/board.vue b/src/views/biz/orderProcessPlan/board.vue index 5f5c832..c764e8f 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 + 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() })