diff --git a/src/views/modules/warehouse/labelTransactionLog.vue b/src/views/modules/warehouse/labelTransactionLog.vue index 2c91971..2929fb6 100644 --- a/src/views/modules/warehouse/labelTransactionLog.vue +++ b/src/views/modules/warehouse/labelTransactionLog.vue @@ -52,34 +52,32 @@ - + - + - + - + - + - - - + @@ -87,6 +85,8 @@ + + @@ -102,11 +102,23 @@ - + + + + + + + + + import { labelTransactionLogList, labelTransactionLogRetry } from '@/api/warehouse/labelTransactionLog.js' import { getSiteAndBuByUserName2 } from '@/api/qc/qc.js' +import { getWarehouseList } from '@/api/wms/wms.js' import excel from '@/utils/excel-util.js' // 导入导出工具类 export default { @@ -266,7 +279,8 @@ export default { orderNo: '', orderLineNo: '', batchNo: '', - syncedFlag: '' + syncedFlag: '', + warehouseIdList: [] // 仓库筛选条件,支持多选 }, // 变动类型列表(不包含"变动明细") documentTypeList: [ @@ -289,6 +303,7 @@ export default { pageSize: 20, totalPage: 0, userBuList: [], + warehouseList: [], // 仓库列表 // 导出列配置 exportColumnList: [ { columnProp: 'buNo', columnLabel: 'BU', headerAlign: 'center', align: 'center', columnWidth: 80 }, @@ -324,6 +339,7 @@ export default { }, mounted() { this.initBuList() + this.initWarehouseList() // 初始化仓库列表 this.initDefaultDate() this.getDataList() this.handleResize(); @@ -359,6 +375,20 @@ export default { }) }, + // 初始化仓库列表 + initWarehouseList() { + const params = { + userName: this.$store.state.user.name + } + getWarehouseList(params).then(({ data }) => { + if (data.code === 0) { + this.warehouseList = data.rows || [] + } + }).catch(error => { + console.error('获取仓库列表失败:', error) + }) + }, + // 初始化默认日期为今天 initDefaultDate() { const today = this.formatDate(new Date()) @@ -404,6 +434,7 @@ export default { orderLineNo: this.searchData.orderLineNo, batchNo: this.searchData.batchNo, syncedFlag: this.searchData.syncedFlag, + warehouseIdList: this.searchData.warehouseIdList, // 仓库筛选条件 page: this.pageIndex, limit: this.pageSize } @@ -441,7 +472,8 @@ export default { orderNo: '', orderLineNo: '', batchNo: '', - syncedFlag: '' + syncedFlag: '', + warehouseIdList: [] // 重置仓库筛选 } this.initDefaultDate() this.activeTab = 'all' @@ -467,6 +499,7 @@ export default { orderLineNo: this.searchData.orderLineNo, batchNo: this.searchData.batchNo, syncedFlag: this.searchData.syncedFlag, + warehouseIdList: this.searchData.warehouseIdList, // 仓库筛选条件 userName: this.$store.state.user.name, page: 1, limit: 999999 // 使用大数字代替-1,SQL Server的FETCH子句不支持负数