From 296e6d74df30394587c729b73ec013f09fff777c Mon Sep 17 00:00:00 2001 From: shaoleiliu-netizen123 <480188199@qq.com> Date: Tue, 4 Aug 2026 13:14:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B4=BE=E5=B7=A5=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/biz/device/index.vue | 7 - src/views/biz/stationHandover/index.vue | 37 ++-- .../componets/AssingWorkTreeTable.vue | 209 ++++++++++-------- src/views/production/myassigtask/index.vue | 46 +--- 4 files changed, 138 insertions(+), 161 deletions(-) diff --git a/src/views/biz/device/index.vue b/src/views/biz/device/index.vue index d3a3083..ff7a71a 100644 --- a/src/views/biz/device/index.vue +++ b/src/views/biz/device/index.vue @@ -112,13 +112,6 @@ /> - +
+ + + +
- + = [ { type: 'selection' }, - { title: '主键', key: 'id' }, { title: '设备/工位', key: 'deviceName' }, { title: '上机人', key: 'handoverPerson' }, { title: '接收人', key: 'receiverPerson' }, diff --git a/src/views/production/componets/AssingWorkTreeTable.vue b/src/views/production/componets/AssingWorkTreeTable.vue index 354e00f..279040a 100644 --- a/src/views/production/componets/AssingWorkTreeTable.vue +++ b/src/views/production/componets/AssingWorkTreeTable.vue @@ -64,6 +64,33 @@ + + + + + {{ assingWorkDetail.materialCode || '-' }} + {{ assingWorkDetail.materialName || '-' }} + {{ assingWorkDetail.processName || '-' }} + {{ assingWorkDetail.workshopName || '-' }} + {{ assingWorkDetail.sectionName || '-' }} + {{ assingWorkDetail.deviceName || '-' }} + {{ assingWorkDetail.assingCode || '-' }} + {{ assingWorkDetail.quantity ?? '-' }} + {{ handlerReWork(assingWorkDetail.rework) ?? '-' }} + {{ assingWorkDetail.reworkNum ?? '-' }} + {{ handlerPatchStatus(assingWorkDetail.assingStatus) ?? '-' }} + + + + + + + + @@ -78,14 +105,13 @@ import { import { mytasks,type AssingWork } from '@/api/production'; import { - NButton, NSpace, NTag, NDataTable, DataTableColumns + NButton, NSpace, NTag, NDataTable, DataTableColumns, NDescriptions, NDescriptionsItem } from 'naive-ui' import { dictDataApi } from '@/api/org' import { assingWorkDetailApi,AssingWorkDetail } from '@/api/AssingWorkDetail' -import { SubmitLog } from '@/api/submitLog' import SubmitLogInfoPage from "@/views/production/componets/SubmitLogInfoPage.vue"; -import {QualityTesting} from "@/api/qualityTesting.ts"; import QualityInfoPage from "@/views/production/componets/QualityInfoPage.vue"; +import Button from "naive-ui/es/button/src/Button"; const defaultBaseInfo = ref({ @@ -100,6 +126,7 @@ const defaultBaseInfo = ref({ const baseInfo = ref({...defaultBaseInfo}) const qcAssingStatusOptions = ref<{ label: string; value: any;class:any }[]>([]) +const qcAssingWorkDetailStatusOptions = ref<{ label: string; value: any;class:any }[]>([]) //汇报信息 const tableLoading = ref(false) @@ -109,6 +136,9 @@ const AssingWorkExpandedKeys = ref>([]) const processName = ref() +//派工详情弹窗 +const showAssingWorkDetail = ref(false) +const assingWorkDetail = ref({}) const AssingWorkColumns :DataTableColumns = [ @@ -118,34 +148,29 @@ const AssingWorkColumns :DataTableColumns = [ expandable:()=>true, renderExpand:(row) => renderAssingWorkExpand(row) }, - - { - align:"center", - title:"物料名称", - key:"materialName", - minWidth:150, - render(row:any) { - var opt = row.materialName - if(opt) return opt - return '-' - } - }, - { - align:"center", - title:"物料编码", - key:"materialCode", - minWidth:150, - render(row:any) { - var opt = row.materialCode - if(opt) return opt - return '-' - } - }, { align:"center", title:"派工编号", key:"assingCode", - minWidth:150 + minWidth:150, + render(row:any) { + return h( + 'a', + { + class: 'route-code-link', + href: 'javascript:;', + style: { + color: '#2080f0', + textDecoration: 'underline', + cursor: 'pointer', + }, + onClick: (e: MouseEvent) => { + viewAssingWorkDetail(row) + }, + }, + row.assingCode + ) + } }, { align:'center', @@ -172,23 +197,22 @@ const AssingWorkColumns :DataTableColumns = [ return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label }) } - //派工状态0待执行 1执行中 2质检中+3已汇报一4已关闭 - }, - { - align:'center', - title: '车间名称', - key: 'workshopName', - minWidth: 200 }, + // { + // align:'center', + // title: '车间名称', + // key: 'workshopName', + // minWidth: 200 + // }, + // { + // align:'center', + // title: '工段名称', + // key: 'sectionName', + // minWidth: 200 + // }, { align:'center', - title: '工段名称', - key: 'sectionName', - minWidth: 200 - }, - { - align:'center', - title: '工位名称', + title: '工位/设备', key: 'deviceName', minWidth: 200 }, @@ -198,22 +222,6 @@ const AssingWorkColumns :DataTableColumns = [ minWidth: 100, key: 'quantity' }, - { - align:'center', - title: '是否返工', - key: 'rework', - minWidth: 100, - render(row:any) { - const quit = row.rework === 1 - return h(NTag, {type: quit ? 'error' : 'success', size: 'small'}, {default: () => (quit ? '是' : '否')}) - } - }, - { - align:'center', - title: '返工次数', - key: 'reworkNum', - minWidth: 150 - }, { align:'center', title: '完成数量', @@ -228,23 +236,7 @@ const AssingWorkColumns :DataTableColumns = [ }, { align:'center', - title: '是否质检打回', - key: 'qualityReturn', - minWidth: 120, - render(row:any) { - const quit = row.qualityReturn === 1 - return h(NTag, {type: quit ? 'error' : 'success', size: 'small'}, {default: () => (quit ? '是' : '否')}) - } - }, - { - align:'center', - title: '质检打回数量', - key: 'qualityReturnNum', - minWidth: 150 - }, - { - align:'center', - title: '工序状态', + title: '状态', key: 'status', minWidth: 100, render(row:any) { @@ -281,18 +273,6 @@ const AssingWorkColumns :DataTableColumns = [ return '-' } }, - { - align:'center', - title: '暂停/改派时间', - key: 'pauseTime', - minWidth: 150 - }, - { - align:'center', - title: '暂停/改派原因', - key: 'reason', - minWidth: 150 - }, { align:'center', title: '操作', @@ -337,9 +317,6 @@ const AssingWorkColumns :DataTableColumns = [ const showQcReport = ref(false) const reportTitle = ref() -const submitLogList = ref([]) - -const qualityList = ref([]) //懒加载子级 const loadingRowIds = ref>(new Set()) @@ -360,26 +337,41 @@ const AssingWorkDetailColums:DataTableColumns = [ align:"center", title:"数量", key:"num", - width:150 + width:80 }, { align:"center", title:"来源", key:"source", - width:150, + width:100, render(row:any) { - var opt = row.deviceName + var opt = row.source if(opt == 1) return '设备' if(opt == 2) return '终端' if(opt == 3) return '后台' return '-' } }, + { + align:'center', + title: '质检状态', + key: 'status', + width: 100, + render(row:any) { + const val = row.status + const opt = qcAssingWorkDetailStatusOptions.value.find(o => o.value === val || String(o.value) === String(val)) + if (!opt) return val ?? '-' + + return h(NTag, { type: opt.class, size: 'small' }, { default: () => opt.label }) + + } + //派工状态0待执行 1执行中 2质检中+3已汇报一4已关闭 + }, { align:"center", title:"操作人", key:"userName", - width:150 + width:100 }, { align:"center", @@ -446,10 +438,13 @@ const AssingWorkAllExpanded = computed(()=>{ }) function AssingWorkToggleExpandAll() { - if(AssingWorkAllExpanded.value) { + console.log(AssingWorkTableData.value) + if(AssingWorkAllExpanded.value) { + console.log(AssingWorkTableData.value) AssingWorkExpandedKeys.value = [] }else{ AssingWorkExpandedKeys.value = AssingWorkTableData.value.map(RowKey) + console.log(AssingWorkTableData.value) } } @@ -493,8 +488,6 @@ function renderAssingWorkExpand(row: AssingWork) { async function getAssingWorkDetail(assingWorkId:number) { const res = await assingWorkDetailApi.selectAssingWorkDetailListByAssingWorkId(assingWorkId) - console.log(res); - return res } @@ -505,6 +498,10 @@ async function loadDictOptions() { const data = await dictDataApi.listByType('assing_status') qcAssingStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass })) }catch {} + try { + const data = await dictDataApi.listByType('assing_work_detail_status') + qcAssingWorkDetailStatusOptions.value = data.map(d => ({ label: d.dictLabel, value: (Number(d.dictValue) || d.dictValue),class:d.listClass })) + }catch {} } @@ -529,8 +526,28 @@ function handleQualityRecords(row:any) { baseInfo.value.logOrQuality = "Quality" } +const viewAssingWorkDetail= ((row:any)=>{ + showAssingWorkDetail.value = true + assingWorkDetail.value = row + console.log(assingWorkDetail.value) +}) +const handlerReWork = ((row:any)=>{ + if (row == 0) return '否' + if (row == 1) return '是' +}) + +const handlerPatchStatus = ((row:any)=>{ + const val = row + console.log(qcAssingStatusOptions.value) + const opt = qcAssingStatusOptions.value.find( + o => o.value === val || String(o.value) === String(val) + ) + if (!opt) return val ?? '-' + console.log( opt) + return opt.label +}) onMounted(()=>{ getlist() diff --git a/src/views/production/myassigtask/index.vue b/src/views/production/myassigtask/index.vue index 28d0354..10dfcb3 100644 --- a/src/views/production/myassigtask/index.vue +++ b/src/views/production/myassigtask/index.vue @@ -230,7 +230,7 @@ import { inspectio } from '@/api/production' import PlmModelDrawer from '@/components/PlmModelDrawer.vue' -import type { PlmModelOpenContext } from '@/api/plmModel' + import AssingWorkVue from '@/views/biz/flowingAround/assingWork.vue' import { qualityTestingApi, type QualityTesting } from '@/api/qualityTesting' import SumbitDetailCard from '@/components/SumbitDetailCard.vue' @@ -371,22 +371,6 @@ const columns = [ minWidth: 100, key: 'quantity' }, - { - align:'center', - title: '是否返工', - key: 'rework', - minWidth: 100, - render(row:any) { - const quit = row.rework === 1 - return h(NTag, {type: quit ? 'error' : 'success', size: 'small'}, {default: () => (quit ? '是' : '否')}) - } - }, - { - align:'center', - title: '返工次数', - key: 'reworkNum', - minWidth: 150 - }, { align:'center', title: '完成数量', @@ -405,22 +389,6 @@ const columns = [ key: 'createBy', minWidth: 150 }, - { - align:'center', - title: '是否质检打回', - key: 'qualityReturn', - minWidth: 120, - render(row:any) { - const quit = row.qualityReturn === 1 - return h(NTag, {type: quit ? 'error' : 'success', size: 'small'}, {default: () => (quit ? '是' : '否')}) - } - }, - { - align:'center', - title: '质检打回数量', - key: 'qualityReturnNum', - minWidth: 150 - }, { align:'center', title: '工序状态', @@ -460,18 +428,6 @@ const columns = [ return '-' } }, - { - align:'center', - title: '暂停/改派时间', - key: 'pauseTime', - minWidth: 150 - }, - { - align:'center', - title: '暂停/改派原因', - key: 'reason', - minWidth: 150 - }, { align:'center', title: '操作',