From e5a70efeaa9fd96ce1242e5d582c8237319fade4 Mon Sep 17 00:00:00 2001
From: 张诺 <zhang_12370@163.com>
Date: 星期五, 10 四月 2026 11:13:15 +0800
Subject: [PATCH] Merge branch 'dev_天津_阳光印刷' of http://114.132.189.42:9002/r/product-inventory-management into dev_天津_阳光印刷
---
src/views/qualityManagement/metricMaintenance/index.vue | 153 ++++++++++++++++++++++++++++++++++++++++----------
1 files changed, 121 insertions(+), 32 deletions(-)
diff --git a/src/views/qualityManagement/metricMaintenance/index.vue b/src/views/qualityManagement/metricMaintenance/index.vue
index 876d10f..ee17428 100644
--- a/src/views/qualityManagement/metricMaintenance/index.vue
+++ b/src/views/qualityManagement/metricMaintenance/index.vue
@@ -1,7 +1,14 @@
<template>
<div class="app-container metric-maintenance">
- <!-- 宸︿晶锛氭娴嬫爣鍑嗗垪琛� -->
- <div class="left-panel">
+ <el-tabs v-model="activeTab" @tab-change="handleTabChange" class="metric-tabs">
+ <el-tab-pane label="鍘熸潗鏂欐楠�" name="0" />
+ <el-tab-pane label="杩囩▼妫�楠�" name="1" />
+ <el-tab-pane label="鍑哄巶妫�楠�" name="2" />
+ </el-tabs>
+ <el-row :gutter="16" class="metric-maintenance-row">
+ <!-- 宸︿晶锛氭娴嬫爣鍑嗗垪琛� -->
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" class="left-col">
+ <div class="left-panel">
<div class="toolbar">
<div class="toolbar-left"></div>
<div class="toolbar-right">
@@ -19,6 +26,7 @@
:isSelection="true"
:tableLoading="tableLoading"
:rowClassName="rowClassNameCenter"
+ :rowClick="handleTableRowClick"
@selection-change="handleSelectionChange"
@pagination="handlePagination"
:total="page.total"
@@ -50,21 +58,6 @@
@clear="handleQuery"
/>
</template>
- <template #inspectTypeHeader>
- <el-select
- v-model="searchForm.inspectType"
- placeholder="绫诲埆"
- clearable
- size="small"
- style="width: 120px"
- @change="handleQuery"
- @clear="handleQuery"
- >
- <el-option label="鍘熸潗鏂欐楠�" value="0" />
- <el-option label="杩囩▼妫�楠�" value="1" />
- <el-option label="鍑哄巶妫�楠�" value="2" />
- </el-select>
- </template>
<template #stateHeader>
<el-select
v-model="searchForm.state"
@@ -81,10 +74,12 @@
</el-select>
</template>
</PIMTable>
- </div>
+ </div>
+ </el-col>
- <!-- 鍙充晶锛氭爣鍑嗗弬鏁板垪琛� -->
- <div class="right-panel">
+ <!-- 鍙充晶锛氭爣鍑嗗弬鏁板垪琛� -->
+ <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12" class="right-col">
+ <div class="right-panel">
<div class="right-header">
<div class="title">鏍囧噯鍙傛暟</div>
<div class="desc" v-if="currentStandard">
@@ -131,7 +126,9 @@
</template>
</el-table-column>
</el-table>
- </div>
+ </div>
+ </el-col>
+ </el-row>
<!-- 鏂板 / 缂栬緫妫�娴嬫爣鍑� -->
<StandardFormDialog
@@ -180,6 +177,9 @@
const { proxy } = getCurrentInstance()
+// 绫诲埆 Tab锛�0=鍘熸潗鏂欙紝1=杩囩▼锛�2=鍑哄巶锛�
+const activeTab = ref('0')
+
// 宸︿晶鏍囧噯鍒楄〃锛氭暣琛屽唴瀹瑰眳涓紙閰嶅悎鏍峰紡锛�
const rowClassNameCenter = () => 'row-center'
@@ -212,7 +212,7 @@
standardNo: [{ required: true, message: '璇疯緭鍏ユ爣鍑嗙紪鍙�', trigger: 'blur' }],
standardName: [{ required: true, message: '璇疯緭鍏ユ爣鍑嗗悕绉�', trigger: 'blur' }],
inspectType: [{ required: true, message: '璇烽�夋嫨妫�娴嬬被鍨�', trigger: 'change' }],
- processId: [{ required: true, message: '璇烽�夋嫨宸ュ簭', trigger: 'change' }]
+ processId: [{ required: false, message: '璇烽�夋嫨宸ュ簭', trigger: 'change' }]
}
})
@@ -277,18 +277,20 @@
dataType: 'slot',
slot: 'standardNoCell',
minWidth: 160,
+ align: 'center',
headerSlot: 'standardNoHeader'
},
{
label: '鏍囧噯鍚嶇О',
prop: 'standardName',
minWidth: 180,
+ align: 'center',
headerSlot: 'standardNameHeader'
},
{
label: '绫诲埆',
prop: 'inspectType',
- headerSlot: 'inspectTypeHeader',
+ align: 'center',
dataType: 'tag',
formatData: (val) => {
const map = {
@@ -301,12 +303,21 @@
},
{
label: '宸ュ簭',
- prop: 'processId'
+ prop: 'processId',
+ align: 'center',
+ dataType: 'tag',
+ formatData: (val) => {
+ const target = processOptions.value.find(
+ (item) => String(item.value) === String(val)
+ )
+ return target?.label || val
+ }
},
{
label: '鐘舵��',
prop: 'state',
headerSlot: 'stateHeader',
+ align: 'center',
dataType: 'tag',
formatData: (val) => {
const map = {
@@ -325,7 +336,8 @@
{
label: '澶囨敞',
prop: 'remark',
- minWidth: 160
+ minWidth: 160,
+ align: 'center'
},
{
dataType: 'action',
@@ -369,6 +381,20 @@
]
}
])
+
+const handleTabChange = () => {
+ searchForm.value.standardNo = ''
+ searchForm.value.standardName = ''
+ searchForm.value.remark = ''
+ searchForm.value.state = ''
+ searchForm.value.processId = ''
+ searchForm.value.inspectType = activeTab.value
+ page.current = 1
+ currentStandard.value = null
+ detailTableData.value = []
+ paramSelectedRows.value = []
+ getStandardList()
+}
// 鏌ヨ鍒楄〃
const getStandardList = () => {
@@ -440,7 +466,13 @@
getStandardList()
}
-// 宸︿晶琛岀偣鍑伙紝鍔犺浇鍙充晶鍙傛暟
+// 琛ㄦ牸琛岀偣鍑伙紝鍔犺浇鍙充晶鍙傛暟
+const handleTableRowClick = (row) => {
+ currentStandard.value = row
+ loadDetail(row.id)
+}
+
+// 宸︿晶琛岀偣鍑伙紝鍔犺浇鍙充晶鍙傛暟锛堜繚鐣欑敤浜庢爣鍑嗙紪鍙峰垪鐨勭偣鍑伙級
const handleStandardRowClick = (row) => {
currentStandard.value = row
loadDetail(row.id)
@@ -560,14 +592,23 @@
processId: ''
})
} else if (type === 'edit' && row) {
- Object.assign(standardForm.value, row)
+ Object.assign(standardForm.value, {
+ ...row,
+ // 纭繚 inspectType 鍜� state 杞崲涓哄瓧绗︿覆锛屼互鍖归厤 el-select 鐨� value 绫诲瀷
+ inspectType: row.inspectType !== null && row.inspectType !== undefined ? String(row.inspectType) : '',
+ state: row.state !== null && row.state !== undefined ? String(row.state) : '0',
+ // 纭繚 processId 杞崲涓哄瓧绗︿覆鎴栨暟瀛楋紙鏍规嵁瀹為檯闇�瑕侊級
+ processId: row.processId !== null && row.processId !== undefined ? row.processId : ''
+ })
} else if (type === 'copy' && row) {
const { id, ...rest } = row
Object.assign(standardForm.value, {
...rest,
id: undefined,
standardNo: '',
- state: '0'
+ state: '0',
+ // 纭繚 inspectType 杞崲涓哄瓧绗︿覆
+ inspectType: rest.inspectType !== null && rest.inspectType !== undefined ? String(rest.inspectType) : ''
})
}
standardDialogVisible.value = true
@@ -657,6 +698,7 @@
}
onMounted(() => {
+ searchForm.value.inspectType = activeTab.value
getProcessList()
getStandardList()
})
@@ -664,16 +706,39 @@
<style scoped>
.metric-maintenance {
- display: flex;
- gap: 16px;
+ padding: 0;
+ min-width: 0;
+}
+
+.metric-tabs {
+ margin: 10px;
+}
+
+.metric-maintenance-row {
+ width: 100%;
+}
+
+.metric-maintenance-row .left-col,
+.metric-maintenance-row .right-col {
+ margin-bottom: 16px;
}
.left-panel,
.right-panel {
- flex: 1;
+ min-width: 0;
background: #ffffff;
padding: 16px;
box-sizing: border-box;
+ overflow: hidden;
+ height: 100%;
+ min-height: 400px;
+}
+
+@media (max-width: 768px) {
+ .left-panel,
+ .right-panel {
+ padding: 12px;
+ }
}
.toolbar {
@@ -681,6 +746,8 @@
justify-content: space-between;
align-items: center;
margin-bottom: 12px;
+ flex-wrap: wrap;
+ gap: 8px;
}
.toolbar-left {
@@ -692,6 +759,9 @@
.toolbar-right {
flex-shrink: 0;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 8px;
}
.search-label {
@@ -751,4 +821,23 @@
:deep(.center-table .el-table__body-wrapper td .cell) {
text-align: center !important;
}
-</style>
\ No newline at end of file
+
+/* PIMTable 琛ㄥご灞呬腑 */
+:deep(.lims-table .pim-table-header-cell) {
+ text-align: center;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+}
+
+:deep(.lims-table .pim-table-header-title) {
+ text-align: center;
+ width: 100%;
+}
+
+:deep(.lims-table .pim-table-header-extra) {
+ width: 100%;
+ margin-top: 4px;
+}
+</style>
--
Gitblit v1.9.3