From c829808c0824aa89aa4c493467fabaeb3da637ae Mon Sep 17 00:00:00 2001 From: xuhuajiao <13476289682@163.com> Date: Thu, 7 May 2026 14:46:34 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=98=E7=9B=88=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/asset/index.js | 10 ++ src/views/assetManage/stocktaking/index.vue | 189 ++++++++++++++++++-- 2 files changed, 184 insertions(+), 15 deletions(-) diff --git a/src/api/asset/index.js b/src/api/asset/index.js index 285366b..87ff3fd 100644 --- a/src/api/asset/index.js +++ b/src/api/asset/index.js @@ -35,6 +35,15 @@ export function FetchStockTakeDetailsByTaskId(params) { }) } +// 获取盘盈列表 +export function FetchStockTakeSuperfluousByTaskId(params) { + return request({ + url: 'api/stocktake/getStockTakeSuperfluousByTaskId', + method: 'get', + params + }) +} + // 结算盘点单 export function FetchStockSettle(ids) { return request({ @@ -66,6 +75,7 @@ export default { add, FetchAssetInfoDetailsByMark, FetchStockTakeDetailsByTaskId, + FetchStockTakeSuperfluousByTaskId, FetchStockSettle, FetchDeleteStockTake, FetchDeleteAssetInfoPhotoById diff --git a/src/views/assetManage/stocktaking/index.vue b/src/views/assetManage/stocktaking/index.vue index 6f5b800..b92582c 100644 --- a/src/views/assetManage/stocktaking/index.vue +++ b/src/views/assetManage/stocktaking/index.vue @@ -259,31 +259,124 @@
-

盘点清单

+ + - + - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + +
// import { getAssetDeptTree } from '@/api/system/dept' -import crudAsset, { FetchInitAssetInfo, FetchStockTakeDetailsByTaskId, FetchStockSettle, FetchDeleteStockTake, add } from '@/api/asset/index' +import crudAsset, { FetchInitAssetInfo, FetchStockTakeDetailsByTaskId, FetchStockTakeSuperfluousByTaskId, FetchStockSettle, FetchDeleteStockTake, add } from '@/api/asset/index' import { FetchWarehouseTree } from '@/api/assetDevice/index' import CRUD, { presenter, header, form, crud } from '@crud/crud' import crudOperation from '@crud/CRUD.operation' @@ -390,7 +483,8 @@ export default { billNo: '', warehouseId: '', status: '' - } + }, + tabIndex: 0 } }, computed: { @@ -639,6 +733,7 @@ export default { }, // 处理双击行事件 handleRowDblClick(row) { + this.tabIndex = 0 this.selectedTask = [] this.selectedTask.push(row) this.detailDialogVisible = true @@ -647,6 +742,14 @@ export default { // 获取盘点清单数据 this.fetchInventoryList() }, + changeActiveTab(index) { + this.tabIndex = index + if (this.tabIndex === 1) { + this.getStockTakeSuperfluousByTaskId() + } else { + this.fetchInventoryList() + } + }, // 获取盘点清单数据 fetchInventoryList() { if (!this.selectedTask) return @@ -668,16 +771,46 @@ export default { this.inventoryLoading = false }) }, + + // 获取盘盈列表数据 + getStockTakeSuperfluousByTaskId() { + if (!this.selectedTask) return + + this.inventoryLoading = true + const params = { + 'taskId': this.selectedTask[0].id, + 'pageNo': this.inventoryPage, + 'pageSize': this.inventoryPageSize + } + FetchStockTakeSuperfluousByTaskId(params).then(res => { + console.log('dd', res.data.records) + this.inventoryList = res.data.records + this.inventoryTotal = res.data.total + this.inventoryLoading = false + }).catch(err => { + console.log(err) + this.$message({ message: '获取数据失败', type: 'error', offset: 8 }) + this.inventoryLoading = false + }) + }, // 处理盘点清单分页大小变化 handleInventorySizeChange(size) { this.inventoryPage = 1 this.inventoryPageSize = size - this.fetchInventoryList() + if (this.tabIndex === 1) { + this.getStockTakeSuperfluousByTaskId() + } else { + this.fetchInventoryList() + } }, // 处理盘点清单当前页码变化 handleInventoryCurrentChange(current) { this.inventoryPage = current - this.fetchInventoryList() + if (this.tabIndex === 1) { + this.getStockTakeSuperfluousByTaskId() + } else { + this.fetchInventoryList() + } }, // 直接触发新增接口 addStockTakeBill() { @@ -742,6 +875,11 @@ export default { border-color: #fcab9d !important; color: #ed4a41!important; } + &.other-tag{ + color: #FF8329 !important; + background-color: #FFF3E5 !important; + border-color: #FEBD98 !important; + } } .task-detail { @@ -776,4 +914,25 @@ export default { .el-table .el-button{ padding: 7px 10px !important; } + +.tab-nav{ + display: flex; + justify-content: flex-start; + margin: 25px 0 18px 0; + font-size: 16px; + font-weight: bold; + color: #333; + // padding: 0 0 0 20px; + border-bottom: 1px solid #EDEFF3; + li{ + margin-right: 30px; + cursor: default; + &.active-tab-nav{ + padding-bottom: 10px; + color: #0348F3; + border-bottom: 3px solid #0348F3; + } + } +} +