diff --git a/klp-ui/src/components/KLPService/ContractSelect/index.vue b/klp-ui/src/components/KLPService/ContractSelect/index.vue index 79d4b0c7..8c5b26dc 100644 --- a/klp-ui/src/components/KLPService/ContractSelect/index.vue +++ b/klp-ui/src/components/KLPService/ContractSelect/index.vue @@ -6,7 +6,8 @@ :label="item.contractCode" /> - + @@ -50,15 +51,16 @@ - +
- +
- + @@ -72,34 +74,25 @@ - +
暂无合同数据
@@ -159,16 +152,17 @@ export default { const storedContracts = localStorage.getItem('todayContracts'); if (storedContracts) { this.contractList = JSON.parse(storedContracts); - } else { - // 如果localStorage中没有,从接口获取 - this.loadContractList(); } + // else { + // 如果localStorage中没有,从接口获取 + this.loadContractList(); + // } } catch (error) { console.error('Failed to load contracts from localStorage:', error); this.loadContractList(); } }, - + // 保存合同列表到localStorage saveToLocalStorage() { try { @@ -177,7 +171,7 @@ export default { console.error('Failed to save contracts to localStorage:', error); } }, - + // 加载合同列表 async loadContractList(keyword) { if (this.mode == "all") { @@ -200,7 +194,7 @@ export default { // 合并合同列表,保留手动添加的合同 this.contractList = [...apiContracts, ...existingManualContracts]; // 去重,避免重复合同 - this.contractList = this.contractList.filter((item, index, self) => + this.contractList = this.contractList.filter((item, index, self) => index === self.findIndex(t => t.orderId === item.orderId) ); // 保存到localStorage @@ -213,7 +207,7 @@ export default { // 加载所有合同供选择 await this.loadAllContracts(); }, - + // 加载所有合同 async loadAllContracts() { try { @@ -224,7 +218,7 @@ export default { }); // 合并现有合同(包括手动添加的) const existingContracts = this.contractList; - this.allContracts = [...res.rows || [], ...existingContracts].filter((item, index, self) => + this.allContracts = [...res.rows || [], ...existingContracts].filter((item, index, self) => index === self.findIndex(t => t.orderId === item.orderId) ); } catch (error) { @@ -232,17 +226,17 @@ export default { this.allContracts = []; } }, - + // 搜索合同 handleSearch() { this.loadAllContracts(); }, - + // 检查合同是否在列表中 isContractInList(orderId) { return this.contractList.some(item => item.orderId === orderId); }, - + // 添加合同 addContract(contract) { if (!this.isContractInList(contract.orderId)) { @@ -253,13 +247,13 @@ export default { this.saveToLocalStorage(); } }, - + // 移除合同 removeContract(orderId) { this.contractList = this.contractList.filter(item => item.orderId !== orderId); this.saveToLocalStorage(); }, - + // 刷新合同列表 handleRefresh() { this.loadContractList(); diff --git a/klp-ui/src/views/aps/planSheet/PlanSheetList.vue b/klp-ui/src/views/aps/planSheet/PlanSheetList.vue index f06e70dc..24a10763 100644 --- a/klp-ui/src/views/aps/planSheet/PlanSheetList.vue +++ b/klp-ui/src/views/aps/planSheet/PlanSheetList.vue @@ -5,24 +5,28 @@
-
-
-
{{ planSheet.planCode }}
-
- {{ planSheet.lineName }} - {{ parseTime(planSheet.planDate, '{y}-{m}-{d}') }} +
+ +
+
+
{{ planSheet.planCode }}
+
+ {{ planSheet.lineName }} + {{ parseTime(planSheet.planDate, '{y}-{m}-{d}') }} +
+
+ +
+
暂无排产单
+
请点击齿轮图标选择排产单
-
-
暂无排产单
-
请点击齿轮图标选择排产单
-
+
@@ -37,16 +41,20 @@ - + - + - + - 新增 + 新增 搜索 重置 @@ -64,9 +72,12 @@ @@ -120,6 +131,11 @@ export default { default: false } }, + computed: { + totalPage() { + return Math.ceil(this.total / this.queryParams.pageSize) + } + }, data() { return { // 按钮loading @@ -229,6 +245,21 @@ export default { this.planSheetDialogVisible = false; this.handleRowClick(planSheet); }, + // 上一页 + prevPage() { + if (this.queryParams.pageNum > 1) { + this.queryParams.pageNum--; + this.getList(); + } + }, + // 下一页 + nextPage() { + if (this.queryParams.pageNum < this.totalPage) { + this.queryParams.pageNum++; + this.getList(); + } + + }, // 打开排产单选择对话框 openPlanSheetDialog() { this.getList(); @@ -419,10 +450,52 @@ export default { border-bottom: 1px solid #e4e7ed; } +.tab-nav { + display: flex; + align-items: flex-end; + gap: 4px; +} + +.nav-btn { + display: flex; + align-items: center; + justify-content: center; + width: 32px; + height: 52px; + border: 1px solid #e4e7ed; + border-bottom: none; + border-radius: 4px 4px 0 0; + background-color: #f9f9f9; + cursor: pointer; + transition: all 0.3s ease; + color: #606266; +} + +.nav-btn:hover { + background-color: #ecf5ff; + border-color: #c6e2ff; + color: #409eff; +} + +.nav-btn:disabled { + cursor: not-allowed; + opacity: 0.5; +} + .tab-header { display: flex; flex-wrap: wrap; gap: 4px; + flex: 1; + overflow: hidden; +} + +.tab-pagination { + text-align: right; + font-size: 12px; + color: #909399; + margin-top: 4px; + margin-right: 8px; } .tab-item { diff --git a/klp-ui/src/views/aps/planSheet/index.vue b/klp-ui/src/views/aps/planSheet/index.vue index f24bff12..9c824045 100644 --- a/klp-ui/src/views/aps/planSheet/index.vue +++ b/klp-ui/src/views/aps/planSheet/index.vue @@ -10,6 +10,10 @@
新增明细 批量新增 + 批量删除 + 批量转单 刷新
@@ -35,12 +39,16 @@
- + + + - + @@ -153,7 +161,8 @@ @@ -209,7 +218,10 @@ @@ -289,72 +301,194 @@ - - -
- -
-
选择合同
- - - - - - - - - - - - 搜索 - 重置 - - - - - - - - - - - - - -
- -
-
- - -
-
选择明细(多选)
- - - - - - - - - - - - - - - + + +
+
选择目标排产单
+ + + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + +
+
+ +
+ + + +
+ + +
+
选择合同
+ + + + + + + + + + + + 搜索 + 重置 + + + + + + + + + + + + + +
+ +
+
+ +
+
选择明细(多选)
+ + + + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 搜索 + 重置 + + +
+
选择明细(多选)
+ + + + + + + + + + + + + + + + + +
+ +
+
+
+
+ +
@@ -362,7 +496,7 @@