From f9ba34d72a8473afc1ee7ab3548c64193fedb75d Mon Sep 17 00:00:00 2001 From: shaoleiliu-netizen123 <480188199@qq.com> Date: Tue, 11 Aug 2026 11:49:50 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=89=A9=E6=96=99=E7=BC=96=E7=A0=81=20?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=90=8D=E7=A7=B0=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/biz/flowingAround/index.vue | 2 ++ src/views/biz/qualityTesting/index.vue | 12 +++++++ .../componets/AssingWorkTreeTable.vue | 31 +++++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/src/views/biz/flowingAround/index.vue b/src/views/biz/flowingAround/index.vue index 318d919..3bc4dc7 100644 --- a/src/views/biz/flowingAround/index.vue +++ b/src/views/biz/flowingAround/index.vue @@ -181,6 +181,8 @@ const formRules = { // 表格列 const columns: DataTableColumns = [ { type: 'selection' }, + { title: '物料名称', key: 'materialName' }, + { title: '物料编码', key: 'materialCode' }, { title: '当前序ID', key: 'currentlyPrefaceName' }, { title: '下一序ID', key: 'nextPrefaceName' }, { title: '业务来源', key: 'businessName' }, diff --git a/src/views/biz/qualityTesting/index.vue b/src/views/biz/qualityTesting/index.vue index 958fe58..95eee87 100644 --- a/src/views/biz/qualityTesting/index.vue +++ b/src/views/biz/qualityTesting/index.vue @@ -478,6 +478,18 @@ const formRules = { const columns: DataTableColumns = [ { type: 'selection' }, { title: '质检编号', key: 'qcNo',align: 'center' }, + { + title: '物料名称', + key: 'materialName', + align: 'center', + width: 150 + }, + { + title: '物料编码', + key: 'materialCode', + align: 'center', + width: 120 + }, { title: '来源类型', key: 'sourceType',align: 'center', render(row) { const val = row.sourceType diff --git a/src/views/production/componets/AssingWorkTreeTable.vue b/src/views/production/componets/AssingWorkTreeTable.vue index 9a84a36..978a12d 100644 --- a/src/views/production/componets/AssingWorkTreeTable.vue +++ b/src/views/production/componets/AssingWorkTreeTable.vue @@ -185,6 +185,37 @@ const AssingWorkColumns :DataTableColumns = [ key: 'processCode', minWidth: 200 }, + { + align:'center', + title: '是否质检', + key: 'qualityInspection', + minWidth: 200, + render(row) { + var opt = row.qualityInspection + if (opt == 0) { + return h(NTag, { type: 'error', size: 'small' }, { default: () => "否" }) + } + if (opt == 1) { + return h(NTag, { type: 'success', size: 'small' }, { default: () => "是" }) + } + } + }, + { + align:'center', + title: '是否入库', + key: 'storageEntry', + minWidth: 200, + render(row) { + var opt = row.storageEntry + if (opt == 0) { + return h(NTag, { type: 'error', size: 'small' }, { default: () => "否" }) + } + if (opt == 1) { + return h(NTag, { type: 'success', size: 'small' }, { default: () => "是" }) + } + } + }, + { align:'center', title: '派工状态', From da1f401a7e594f3622409f93ae478e8adcd15020 Mon Sep 17 00:00:00 2001 From: tzy <1042411602@qq.com> Date: Tue, 11 Aug 2026 16:37:50 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E6=B5=81=E8=BD=AC=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/production.ts | 16 +- src/views/biz/orderProject/index.vue | 1 + .../componets/AssingWorkTreeTable.vue | 157 +++++++++++------- src/views/production/myassigtask/index.vue | 47 ++++-- 4 files changed, 142 insertions(+), 79 deletions(-) diff --git a/src/api/production.ts b/src/api/production.ts index 6949e0d..7037443 100644 --- a/src/api/production.ts +++ b/src/api/production.ts @@ -4,6 +4,7 @@ export interface AssingWork { id:number, processId:number, processName:number, + processCode?:string, userId:string, quantity:number, rework:number, @@ -22,6 +23,11 @@ export interface AssingWork { workshopId:number, sectionId:number, deviceId:number, + deviceName?:string, + workshopName?:string, + sectionName?:string, + materialCode?:string, + materialName?:string, traceId:number, qcNum:number } @@ -65,7 +71,15 @@ export function pauseresume(data:any) { } //我的派工任务 -export function mytasks(params:{page:number,pageSize:number,processName:string}) { +export function mytasks(params:{ + page:number + pageSize:number + processName?:string + processId?:number | string + assingCode?:string + materialCode?:string + materialName?:string +}) { return request({ url: `/mes/dispatch/my-tasks`, method: 'get', diff --git a/src/views/biz/orderProject/index.vue b/src/views/biz/orderProject/index.vue index 509d8c5..515d0f8 100644 --- a/src/views/biz/orderProject/index.vue +++ b/src/views/biz/orderProject/index.vue @@ -50,6 +50,7 @@
-
- - - {{ AssingWorkAllExpanded ? '全部收起' : '全部展开' }} - - -
-
- - - -
+
+ + {{ AssingWorkAllExpanded ? '全部收起' : '全部展开' }} + + + + +
@@ -135,6 +132,9 @@ const AssingWorkTableData = ref([]) const AssingWorkExpandedKeys = ref>([]) const processName = ref() +const assingCode = ref() +const materialCode = ref() +const materialName = ref() //派工详情弹窗 @@ -153,7 +153,7 @@ const AssingWorkColumns :DataTableColumns = [ align:"center", title:"派工编号", key:"assingCode", - minWidth:150, + width: 170, render(row:any) { return h( 'a', @@ -175,21 +175,43 @@ const AssingWorkColumns :DataTableColumns = [ }, { align:'center', - title: '工序名称', - key: 'processName', - minWidth: 200 + title: '物料编码', + key: 'materialCode', + width: 120, + ellipsis: { tooltip: true }, + render(row:any) { + return row.materialCode || '-' + } }, { + align:'center', + title: '物料名称', + key: 'materialName', + width: 140, + ellipsis: { tooltip: true }, + render(row:any) { + return row.materialName || '-' + } + }, + + { + align:'center', + title: '工序名称', + key: 'processName', + width: 120, + ellipsis: { tooltip: true } + }, + /*{ align:'center', title: '工序编号', key: 'processCode', - minWidth: 200 - }, + width: 100 + }, */ { align:'center', title: '是否质检', key: 'qualityInspection', - minWidth: 200, + width: 90, render(row) { var opt = row.qualityInspection if (opt == 0) { @@ -204,7 +226,7 @@ const AssingWorkColumns :DataTableColumns = [ align:'center', title: '是否入库', key: 'storageEntry', - minWidth: 200, + width: 90, render(row) { var opt = row.storageEntry if (opt == 0) { @@ -220,7 +242,7 @@ const AssingWorkColumns :DataTableColumns = [ align:'center', title: '派工状态', key: 'assingStatus', - minWidth: 150, + width: 90, render(row:any) { const val = row.assingStatus const opt = qcAssingStatusOptions.value.find(o => o.value === val || String(o.value) === String(val)) @@ -246,31 +268,32 @@ const AssingWorkColumns :DataTableColumns = [ align:'center', title: '工位/设备', key: 'deviceName', - minWidth: 200 + width: 110, + ellipsis: { tooltip: true } }, { align:'center', title: '数量', - minWidth: 100, + width: 70, key: 'quantity' }, { align:'center', title: '完成数量', key: 'completedQuantity', - minWidth: 150 + width: 80 }, { align:'center', title: '完成时间', key: 'completedTime', - minWidth: 180 + width: 160 }, { align:'center', title: '状态', key: 'status', - minWidth: 100, + width: 80, render(row:any) { if(row.status == 0){ return h(NTag, { @@ -309,7 +332,7 @@ const AssingWorkColumns :DataTableColumns = [ align:'center', title: '操作', key: 'action', - width: 250, + width: 180, fixed: 'right', render(row:any) { const buttons:any = [] @@ -433,25 +456,34 @@ function handlePageSizeChange(pageSize: number) { } // //获取列表数据 -function getlist() { - try{ - mytasks({ - page:pagination.page, - pageSize:pagination.pageSize, - processName:processName.value - }).then((rps:any) => { - AssingWorkTableData.value = rps.records - pagination.itemCount = rps.total - }) - }catch(error) { - console.log(error); - +async function getlist() { + tableLoading.value = true + try { + const rps: any = await mytasks({ + page: pagination.page, + pageSize: pagination.pageSize, + processName: processName.value || undefined, + assingCode: assingCode.value || undefined, + materialCode: materialCode.value || undefined, + materialName: materialName.value || undefined, + }) + AssingWorkTableData.value = rps?.records ?? [] + pagination.itemCount = rps?.total ?? 0 + } catch (error) { + console.error(error) + } finally { + tableLoading.value = false } } -const loadTableData = async(params:Record) => { - processName.value = params.processName - getlist() +const loadTableData = async (params: Record = {}) => { + processName.value = params.processName || undefined + assingCode.value = params.assingCode || undefined + materialCode.value = params.materialCode || undefined + materialName.value = params.materialName || undefined + pagination.page = 1 + AssingWorkExpandedKeys.value = [] + await getlist() } @@ -659,8 +691,11 @@ defineExpose({