Browse Source

2026-02-10

标签变动记录增加仓库条件
master
fengyuan_yang 8 months ago
parent
commit
537b0662c9
  1. 55
      src/views/modules/warehouse/labelTransactionLog.vue

55
src/views/modules/warehouse/labelTransactionLog.vue

@ -52,34 +52,32 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="3">
<el-form-item label="变动单号">
<el-input v-model="searchData.transactionId" clearable placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="标签条码">
<el-input v-model="searchData.rollNo" clearable placeholder="请输入"></el-input>
<el-input v-model="searchData.rollNo" clearable placeholder="请输入" style="width: 120%"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="3">
<el-form-item label="物料编码">
<el-input v-model="searchData.partNo" clearable placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="物料名称">
<el-input v-model="searchData.partDesc" clearable placeholder="请输入"></el-input>
<el-input v-model="searchData.partDesc" clearable placeholder="请输入" style="width: 120%"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="3">
<el-form-item label="规格型号">
<el-input v-model="searchData.spec" clearable placeholder="请输入"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="3">
<el-col :span="2">
<el-form-item label="传输状态">
<el-select v-model="searchData.syncedFlag" placeholder="请选择" clearable style="width: 100%">
<el-option label="已传输" value="Y"></el-option>
@ -87,6 +85,8 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="16">
<el-col :span="3">
<el-form-item label="通知单号">
<el-input v-model="searchData.documentNo" clearable placeholder="请输入"></el-input>
@ -102,11 +102,23 @@
<el-input v-model="searchData.orderLineNo" clearable placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="3">
<el-form-item label="合约号码">
<el-input v-model="searchData.batchNo" clearable placeholder="请输入"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="仓库">
<el-select v-model="searchData.warehouseIdList" multiple collapse-tags clearable placeholder="请选择" style="width: 120%">
<el-option
v-for="item in warehouseList"
:key="item.warehouseId"
:label="item.warehouseName"
:value="item.warehouseId">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="变动日期">
<el-date-picker
@ -245,6 +257,7 @@
<script>
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子句不支持负数

Loading…
Cancel
Save