From 7c4daa9c902ca7ae6492a64284ec2320befaf061 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期五, 28 八月 2026 16:38:30 +0800
Subject: [PATCH] 天津建城恒商贸 1.生产订单来源样式修改 2.生产追溯中生产订单号下拉框数据反显错误修改
---
src/views/productionManagement/productionOrder/index.vue | 29 ++++++++++----
src/views/productionManagement/productionTraceability/index.vue | 74 ++++++++++++++++++++++++++++++++++---
2 files changed, 88 insertions(+), 15 deletions(-)
diff --git a/src/views/productionManagement/productionOrder/index.vue b/src/views/productionManagement/productionOrder/index.vue
index 338c68f..fed5eb8 100644
--- a/src/views/productionManagement/productionOrder/index.vue
+++ b/src/views/productionManagement/productionOrder/index.vue
@@ -158,12 +158,12 @@
</template>
</el-dialog>
<!-- 鏉ユ簮鏁版嵁寮圭獥 -->
- <el-dialog
- v-model="sourceDataDialogVisible"
- title="鏉ユ簮鏁版嵁"
- width="1200px"
- >
- <div v-if="sourceRowData" class="applyno-summary1">
+ <el-dialog v-model="sourceDataDialogVisible"
+ title="鏉ユ簮鏁版嵁"
+ width="1200px"
+ custom-class="source-data-dialog">
+ <div v-if="sourceRowData"
+ class="applyno-summary1">
<div class="summary-item">
<span class="summary-label">浜у搧鍚嶇О锛�</span>
<span class="summary-value">
@@ -1006,9 +1006,20 @@
text-shadow: 0 1px 2px rgba(64, 158, 255, 0.2);
}
-.source-table-container {
- margin-top: 20px;
-}
+ .source-data-dialog {
+ display: flex;
+ flex-direction: column;
+ max-height: 80vh;
+
+ .el-dialog__body {
+ overflow-y: auto;
+ flex: 1;
+ }
+ }
+
+ .source-table-container {
+ margin-top: 20px;
+ }
.source-data-cards-container {
display: flex;
diff --git a/src/views/productionManagement/productionTraceability/index.vue b/src/views/productionManagement/productionTraceability/index.vue
index a726ad0..53ff013 100644
--- a/src/views/productionManagement/productionTraceability/index.vue
+++ b/src/views/productionManagement/productionTraceability/index.vue
@@ -13,7 +13,7 @@
filterable
remote
reserve-keyword
- placeholder="璇疯緭鍏ョ敓浜ц鍗曞彿"
+ placeholder="璇疯緭鍏ョ敓浜ц鍗曞彿鎼滅储"
:loading="npsNoLoading"
:remote-method="handleNpsNoSearch"
@change="handleSearch"
@@ -22,6 +22,18 @@
:key="option.id"
:label="option.npsNo + '-' + option.productName + '-' + option.model"
:value="option.id" />
+ <template #footer>
+ <div v-if="npsNoHasMore"
+ class="select-load-more"
+ @click="loadMoreNpsNo">
+ <span v-if="npsNoLoadingMore">鍔犺浇涓�...</span>
+ <span v-else>鐐瑰嚮鍔犺浇鏇村</span>
+ </div>
+ <div v-else-if="npsNoOptions.length > 0"
+ class="select-load-more no-more">
+ 娌℃湁鏇村浜�
+ </div>
+ </template>
</el-select>
</el-form-item>
</el-form>
@@ -310,7 +322,11 @@
});
const selectedNpsNo = ref(null);
const npsNoLoading = ref(false);
+ const npsNoLoadingMore = ref(false);
const npsNoOptions = ref([]);
+ const npsNoPage = reactive({ current: 1, size: 20, total: 0 });
+ const npsNoHasMore = computed(() => npsNoOptions.value.length < npsNoPage.total);
+ const npsNoSearchKeyword = ref("");
// 璇︽儏鏁版嵁
const rowData = reactive({
@@ -360,21 +376,45 @@
return "#67c23a";
};
- // 妯℃嫙鎼滅储鏂规硶
const handleNpsNoSearch = async query => {
+ npsNoSearchKeyword.value = query || "";
+ npsNoPage.current = 1;
+ npsNoOptions.value = [];
npsNoLoading.value = true;
try {
const res = await productOrderListPage({
npsNo: query || "",
- pageNum: 1,
- pageSize: 50,
+ current: npsNoPage.current,
+ size: npsNoPage.size,
});
- // 鍙傜収 productionOrder/index.vue 鐨勬暟鎹粨鏋� res.data.records
- npsNoOptions.value = res.data?.records || res.rows || [];
+ const records = res.data?.records || [];
+ npsNoOptions.value = records;
+ npsNoPage.total = res.data?.total || 0;
} catch (error) {
console.error(error);
} finally {
npsNoLoading.value = false;
+ }
+ };
+
+ const loadMoreNpsNo = async () => {
+ if (npsNoLoadingMore.value || !npsNoHasMore.value) return;
+ npsNoLoadingMore.value = true;
+ npsNoPage.current++;
+ try {
+ const res = await productOrderListPage({
+ npsNo: npsNoSearchKeyword.value,
+ current: npsNoPage.current,
+ size: npsNoPage.size,
+ });
+ const records = res.data?.records || [];
+ npsNoOptions.value = [...npsNoOptions.value, ...records];
+ npsNoPage.total = res.data?.total || 0;
+ } catch (error) {
+ console.error(error);
+ npsNoPage.current--;
+ } finally {
+ npsNoLoadingMore.value = false;
}
};
@@ -728,4 +768,26 @@
.param-detail-list {
padding: 10px;
}
+
+ .select-load-more {
+ text-align: center;
+ padding: 8px 0;
+ font-size: 13px;
+ color: #409eff;
+ cursor: pointer;
+ border-top: 1px solid #ebeef5;
+
+ &:hover {
+ background-color: #f5f7fa;
+ }
+
+ &.no-more {
+ color: #c0c4cc;
+ cursor: default;
+
+ &:hover {
+ background-color: transparent;
+ }
+ }
+ }
</style>
--
Gitblit v1.9.3