From 2cdbad409e82d4354e4eca5cffa65c6bef7a4d20 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期一, 16 三月 2026 13:36:37 +0800
Subject: [PATCH] bom添加产品编码
---
src/views/productionManagement/productionProcess/index.vue | 68 +++++++++++++++++++++++-----------
1 files changed, 46 insertions(+), 22 deletions(-)
diff --git a/src/views/productionManagement/productionProcess/index.vue b/src/views/productionManagement/productionProcess/index.vue
index bef5379..af6bbfa 100644
--- a/src/views/productionManagement/productionProcess/index.vue
+++ b/src/views/productionManagement/productionProcess/index.vue
@@ -167,7 +167,7 @@
</el-input>
</div>
<el-table :data="filteredParamList"
- height="360"
+ height="300"
border
highlight-current-row
@current-change="handleParamSelect">
@@ -183,6 +183,18 @@
</template>
</el-table-column>
</el-table>
+ <!-- 鍒嗛〉鎺т欢 -->
+ <div class="pagination-container"
+ style="margin-top: 10px;">
+ <el-pagination v-model:current-page="paramPage.current"
+ v-model:page-size="paramPage.size"
+ :page-sizes="[10, 20, 50, 100]"
+ layout="total, sizes, prev, pager, next, jumper"
+ :total="paramPage.total"
+ @size-change="handleParamSizeChange"
+ @current-change="handleParamCurrentChange"
+ size="small" />
+ </div>
</div>
<!-- 鍙充晶鍙傛暟璇︽儏 -->
<div class="param-detail-area">
@@ -343,11 +355,6 @@
// 鍙傛暟鍒楄〃鏁版嵁
const paramList = ref([]);
const paramLoading = ref(false);
- const paramPage = reactive({
- current: 1,
- size: 10,
- total: 0,
- });
// 鏁版嵁瀛楀吀
const dictTypes = ref([]);
@@ -370,13 +377,11 @@
name: [{ required: true, message: "璇疯緭鍏ュ伐搴忓悕绉�", trigger: "blur" }],
salaryQuota: [
{
- required: true,
+ required: false,
message: "璇疯緭鍏ュ伐璧勫畾棰�",
trigger: "blur",
validator: (rule, value, callback) => {
- if (value === null || value === undefined || value === "") {
- callback(new Error("璇疯緭鍏ュ伐璧勫畾棰�"));
- } else if (isNaN(value) || value < 0) {
+ if (isNaN(value) || value < 0) {
callback(new Error("宸ヨ祫瀹氶蹇呴』鏄潪璐熸暟瀛�"));
} else {
callback();
@@ -392,6 +397,13 @@
const filteredParamList = ref([]);
const selectedParam = ref(null);
const paramSearchKeyword = ref("");
+
+ // 鍙�夊弬鏁板垎椤�
+ const paramPage = reactive({
+ current: 1,
+ size: 10,
+ total: 0,
+ });
// 缂栬緫鍙傛暟瀵硅瘽妗�
const editParamDialogVisible = ref(false);
@@ -677,10 +689,14 @@
return;
}
// 鑾峰彇鍙�夊弬鏁板垪琛�
- getBaseParamList({ paramName: paramSearchKeyword.value }).then(res => {
+ getBaseParamList({
+ paramName: paramSearchKeyword.value,
+ current: paramPage.current,
+ size: paramPage.size,
+ }).then(res => {
if (res.code === 200) {
- filteredParamList.value = res.data || [];
- page.total = res.data?.length || 0;
+ filteredParamList.value = res.data?.records || [];
+ paramPage.total = res.data?.total || 0;
} else {
ElMessage.error(res.msg || "鏌ヨ澶辫触");
}
@@ -695,14 +711,22 @@
};
const handleParamSearch = () => {
- const keyword = paramSearchKeyword.value.trim().toLowerCase();
- if (!keyword) {
- filteredParamList.value = availableParamList.value;
- } else {
- filteredParamList.value = availableParamList.value.filter(item =>
- item.paramName.toLowerCase().includes(keyword)
- );
- }
+ // 閲嶇疆鍒嗛〉
+ paramPage.current = 1;
+ // 閲嶆柊鍔犺浇鏁版嵁
+ handleSelectParam();
+ };
+
+ // 澶勭悊鍒嗛〉澶у皬鍙樺寲
+ const handleParamSizeChange = size => {
+ paramPage.size = size;
+ handleSelectParam();
+ };
+
+ // 澶勭悊褰撳墠椤电爜鍙樺寲
+ const handleParamCurrentChange = current => {
+ paramPage.current = current;
+ handleSelectParam();
};
const getParamTypeText = type => {
const typeMap = {
@@ -975,7 +999,7 @@
th {
background: transparent;
font-weight: 600;
- color: #ffffff;
+ // color: #ffffff;
border-bottom: none;
padding: 16px 0;
}
--
Gitblit v1.9.3