()
const updatePlanTableMaxHeight = async () => {
await nextTick()
const tableTop = tableRef.value?.$el?.getBoundingClientRect().top ?? 0
- const paginationHeight = planPaginationRef.value?.getBoundingClientRect().height ?? 72
+ const paginationHeight = planPaginationRef.value?.$el?.getBoundingClientRect().height ?? 72
const pageBottomGap = 56
const availableHeight = window.innerHeight - tableTop - paginationHeight - pageBottomGap
planTableMaxHeight.value = Math.min(window.innerHeight, Math.max(240, Math.floor(availableHeight)))
diff --git a/src/views/iot/deviceattributetype/index.vue b/src/views/iot/deviceattributetype/index.vue
index 1a8dbb9c..184ce013 100644
--- a/src/views/iot/deviceattributetype/index.vue
+++ b/src/views/iot/deviceattributetype/index.vue
@@ -166,7 +166,7 @@ const planPaginationRef = ref
()
const updatePlanTableMaxHeight = async () => {
await nextTick()
const tableTop = tableRef.value?.$el?.getBoundingClientRect().top ?? 0
- const paginationHeight = planPaginationRef.value?.getBoundingClientRect().height ?? 72
+ const paginationHeight = planPaginationRef.value?.$el?.getBoundingClientRect().height ?? 72
const pageBottomGap = 56
const availableHeight = window.innerHeight - tableTop - paginationHeight - pageBottomGap
planTableMaxHeight.value = Math.min(window.innerHeight, Math.max(240, Math.floor(availableHeight)))
diff --git a/src/views/iot/historyData/index.vue b/src/views/iot/historyData/index.vue
index 65728f9a..091cb1c2 100644
--- a/src/views/iot/historyData/index.vue
+++ b/src/views/iot/historyData/index.vue
@@ -196,7 +196,7 @@ const planPaginationRef = ref()
const updatePlanTableMaxHeight = async () => {
await nextTick()
const tableTop = tableRef.value?.$el?.getBoundingClientRect().top ?? 0
- const paginationHeight = planPaginationRef.value?.getBoundingClientRect().height ?? 72
+ const paginationHeight = planPaginationRef.value?.$el?.getBoundingClientRect().height ?? 72
const pageBottomGap = 56
const availableHeight = window.innerHeight - tableTop - paginationHeight - pageBottomGap
planTableMaxHeight.value = Math.min(window.innerHeight, Math.max(240, Math.floor(availableHeight)))
diff --git a/src/views/mold/taskConfiguration/TaskConfigurationForm.vue b/src/views/mold/taskConfiguration/TaskConfigurationForm.vue
index a2bd89d0..2fefde5f 100644
--- a/src/views/mold/taskConfiguration/TaskConfigurationForm.vue
+++ b/src/views/mold/taskConfiguration/TaskConfigurationForm.vue
@@ -11,28 +11,38 @@
-
-
-
+
+
+
+ {{ t('common.select') }}
+
+
+
-
-
-
+
+
+
+ {{ t('common.select') }}
+
+
+
{{ t('common.cancel') }}
+
+
+
+
+
+
diff --git a/src/views/mold/taskConfiguration/index.vue b/src/views/mold/taskConfiguration/index.vue
index cc5029d7..fbbb0779 100644
--- a/src/views/mold/taskConfiguration/index.vue
+++ b/src/views/mold/taskConfiguration/index.vue
@@ -107,7 +107,8 @@
{{ t('EquipmentManagement.TaskManagement.createWorkOrder') }}
@@ -164,7 +165,7 @@ const planPaginationRef = ref()
const updatePlanTableMaxHeight = async () => {
await nextTick()
const tableTop = tableRef.value?.$el?.getBoundingClientRect().top ?? 0
- const paginationHeight = planPaginationRef.value?.getBoundingClientRect().height ?? 72
+ const paginationHeight = planPaginationRef.value?.$el?.getBoundingClientRect().height ?? 72
const pageBottomGap = 56
const availableHeight = window.innerHeight - tableTop - paginationHeight - pageBottomGap
planTableMaxHeight.value = Math.min(window.innerHeight, Math.max(240, Math.floor(availableHeight)))
@@ -253,6 +254,8 @@ const openForm = (type: string, row?: TaskManagementVO) => {
formRef.value.open(type, row)
}
+const isTaskEnabled = (row: TaskManagementVO) => row.enabled === true || (row.enabled as any) === 'true'
+
const handleDelete = async (id?: number) => {
if (!id) return
try {
@@ -264,11 +267,25 @@ const handleDelete = async (id?: number) => {
}
const ticketLoadingId = ref(undefined)
-const handleCreateTicket = async (id?: number) => {
- if (!id) return
- ticketLoadingId.value = id
+const handleCreateTicket = async (row?: TaskManagementVO) => {
+ if (!row?.id) return
+ if (!isTaskEnabled(row)) {
+ message.warning(t('EquipmentManagement.TaskManagement.createTicketDisabledTip'))
+ return
+ }
+
+ try {
+ await message.confirm(
+ t('EquipmentManagement.TaskManagement.createTicketConfirm'),
+ t('common.reminder')
+ )
+ } catch {
+ return
+ }
+
+ ticketLoadingId.value = row.id
try {
- await TaskManagementApi.createTaskManagementTicket(id)
+ await TaskManagementApi.createTaskManagementTicket(row.id)
message.success(t('EquipmentManagement.TaskManagement.createTicketSuccess'))
} catch {
message.error(t('EquipmentManagement.TaskManagement.createTicketFail'))
From 26b59f9ad2411a0f0d498ae91c938264c3d17b1c Mon Sep 17 00:00:00 2001
From: zhongwenkai <3478244299@qq.com>
Date: Thu, 9 Jul 2026 12:45:11 +0800
Subject: [PATCH 2/4] =?UTF-8?q?=E7=82=B9=E6=A3=80=E4=BF=9D=E5=85=BB-?=
=?UTF-8?q?=E7=82=B9=E6=A3=80=E4=BF=9D=E5=85=BB=E8=AE=B0=E5=BD=95-?=
=?UTF-8?q?=E6=A8=A1=E5=85=B7=E5=B7=A5=E5=8D=95=E5=88=97=E8=A1=A8=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6=EF=BC=8C=E4=BC=98?=
=?UTF-8?q?=E5=8C=96=E5=8F=96=E6=B6=88=E9=80=BB=E8=BE=91=E5=92=8C=E8=AF=A6?=
=?UTF-8?q?=E6=83=85=E9=A1=B5=E6=8C=89=E9=92=AE=E4=BD=8D=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/mold/ticketManagement/index.ts | 4 +
src/locales/en.ts | 7 ++
src/locales/zh-CN.ts | 8 ++
.../components/TicketResultDialog.vue | 23 +++--
src/views/mold/workOrderInquiry/index.vue | 87 +++++++++++++++++--
5 files changed, 112 insertions(+), 17 deletions(-)
diff --git a/src/api/mold/ticketManagement/index.ts b/src/api/mold/ticketManagement/index.ts
index e85bc695..50ab32dc 100644
--- a/src/api/mold/ticketManagement/index.ts
+++ b/src/api/mold/ticketManagement/index.ts
@@ -54,6 +54,10 @@ export const TicketManagementApi = {
return await request.put({ url: `/mes/mold-ticket-results/batchUpdate`, data })
},
+ exportTicketManagement: async (params: any) => {
+ return await request.download({ url: `/mes/mold-ticket-management/export-excel`, params })
+ },
+
getInspectionByMoldId: async (params: { moldId: number; startTime?: string; endTime?: string }) => {
return await request.get({ url: `/mes/mold-ticket-management/getInspectionByMoldId`, params })
},
diff --git a/src/locales/en.ts b/src/locales/en.ts
index 81b7d0c5..11efe055 100644
--- a/src/locales/en.ts
+++ b/src/locales/en.ts
@@ -3828,6 +3828,7 @@ export default {
operatorName: 'Operator',
taskTime: 'Job Time',
taskEndTime: 'Planned End Time',
+ taskTimeRange: 'Job Time',
createTime: 'Create Time',
index: 'Index',
remark: 'Remark',
@@ -3837,10 +3838,16 @@ export default {
placeholderPlanType: 'Please select type',
placeholderJobStatus: 'Please select job status',
placeholderJobResult: 'Please select result',
+ placeholderOperatorName: 'Please select operator',
+ placeholderTaskTime: 'Please select job start time',
+ placeholderTaskEndTime: 'Please select job end time',
query: 'Query',
reset: 'Reset',
cancelConfirm: 'Confirm cancel selected tasks?',
cancelSuccess: 'Cancel task successful',
+ cancelOnlyUnworkedTip: 'Only unworked tickets can be canceled',
+ export: 'Export',
+ exportFilename: 'Mold Work Order Inquiry.xls',
inspectResultTitlePrefix: 'Inspection Result-',
inspectResultTitle: 'Inspection Result'
},
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index 54c42029..99168640 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -2198,6 +2198,7 @@ export default {
cancelReason: '取消原因',
cancelConfirm: '确认取消选中的任务吗?',
cancelSuccess: '取消任务成功',
+ cancelOnlyUnworkedTip: '只有未作业状态的工单才能取消任务',
cancelFail: '取消任务失败',
cancelOnlyUnworkedTip: '只有未作业状态的工单才能取消任务',
selectAllDecisionError: '请先为所有待检测记录选择通过或不通过',
@@ -3298,6 +3299,7 @@ export default {
operatorName: '作业人',
taskTime: '作业时间',
taskEndTime: '计划结束作业时间',
+ taskTimeRange: '作业时间',
createTime: '创建时间',
index: '序号',
remark: '备注',
@@ -3307,10 +3309,16 @@ export default {
placeholderPlanType: '请选择类型',
placeholderJobStatus: '请选择作业状态',
placeholderJobResult: '请选择结果',
+ placeholderOperatorName: '请选择作业人',
+ placeholderTaskTime: '请选择作业开始时间',
+ placeholderTaskEndTime: '请选择作业结束时间',
query: '查询',
reset: '重置',
cancelConfirm: '确认取消选中的任务吗?',
cancelSuccess: '取消任务成功',
+ cancelOnlyUnworkedTip: '只有未作业状态的工单才能取消任务',
+ export: '导出',
+ exportFilename: '模具工单查询.xls',
inspectResultTitlePrefix: '检验结果-',
inspectResultTitle: '检验结果'
},
diff --git a/src/views/mold/workOrderInquiry/components/TicketResultDialog.vue b/src/views/mold/workOrderInquiry/components/TicketResultDialog.vue
index 32d1f6cb..365c68e1 100644
--- a/src/views/mold/workOrderInquiry/components/TicketResultDialog.vue
+++ b/src/views/mold/workOrderInquiry/components/TicketResultDialog.vue
@@ -4,6 +4,17 @@
@@ -141,14 +152,8 @@
v-model:page-size="queryParams.pageSize" :background="true" :page-sizes="[10, 20, 30, 50, 100]" :pager-count="7"
:total="total" class="mt-15px mb-15px flex justify-end" layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange" @current-change="handleCurrentChange" />
-
-
+