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 @@
-
盘点清单
+
+
{{ (inventoryPage - 1) * inventoryPageSize + scope.$index + 1 }}
-
+
未盘
正常
盘亏
-
-
-
-
-
-
-
+
+
+ 盘盈
+
+
+
+
+ {{ scope.row.assetMark }}
+
+ {{
+ (scope.row.assetInfo && scope.row.assetInfo.mark)
+ ? scope.row.assetInfo.mark
+ : (scope.row.superfluous && scope.row.superfluous.mark) || '-'
+ }}
+
+
+
+
+
+ {{ scope.row.assetName }}
+
+ {{ scope.row.assetInfo ? scope.row.assetInfo.name : '' }}
+
+
+
+
+
+ {{ scope.row.taskRemark }}
+
+ {{ scope.row.assetInfo ? scope.row.assetInfo.capitalStatus : '' }}
+
+
+
+
+
+ {{ scope.row.capitalStatus }}
+
+ {{ scope.row.assetInfo ? scope.row.assetInfo.capitalStatus : '' }}
+
+
+
+
+
+ {{ scope.row.capitaltypename }}
+
+ {{ scope.row.assetInfo ? scope.row.assetInfo.capitaltypename : '' }}
+
+
+
+
+
+ {{ scope.row.departmentname }}
+
+ {{ scope.row.assetInfo ? scope.row.assetInfo.departmentname : '' }}
+
+
+
+
+
+ {{ scope.row.resourcename }}
+
+ {{ scope.row.assetInfo ? scope.row.assetInfo.resourcename : '' }}
+
+
+
-
-
+
+
+ {{ scope.row.glrname }}
+
+ {{ scope.row.assetInfo ? scope.row.assetInfo.glrname : '' }}
+
+
+
+
+
+ {{ scope.row.cfd }}
+
+ {{ scope.row.assetInfo ? scope.row.assetInfo.cfd : '' }}
+
+
+
+
+
+
+ -
+
+
+
+ {{ scope.row.superfluous.taskTime | parseTime }}
+
+
+
+ -
+
+
// 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;
+ }
+ }
+}
+