Browse Source

2026-02-03

标签变动记录页面增加导出功能
master
fengyuan_yang 3 weeks ago
parent
commit
328eaa62d6
  1. 2
      src/views/modules/schedule/order_schedule_expand.vue
  2. 64
      src/views/modules/warehouse/labelTransactionLog.vue

2
src/views/modules/schedule/order_schedule_expand.vue

@ -1805,7 +1805,7 @@ export default {
const exportParams = {
...this.pageData,
page: 1,
limit: -1 // -1
limit: 999999 // 使-1SQL ServerFETCH
}
excel.exportTable({

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

@ -240,6 +240,7 @@
<script>
import { labelTransactionLogList, labelTransactionLogRetry } from '@/api/warehouse/labelTransactionLog.js'
import { getSiteAndBuByUserName2 } from '@/api/qc/qc.js'
import excel from '@/utils/excel-util.js' //
export default {
data() {
@ -281,7 +282,32 @@ export default {
pageIndex: 1,
pageSize: 20,
totalPage: 0,
userBuList: []
userBuList: [],
//
exportColumnList: [
{ columnProp: 'buNo', columnLabel: 'BU', headerAlign: 'center', align: 'center', columnWidth: 80 },
{ columnProp: 'transactionId', columnLabel: '变动单号', headerAlign: 'center', align: 'left', columnWidth: 150 },
{ columnProp: 'documentType', columnLabel: '变动类型', headerAlign: 'center', align: 'center', columnWidth: 100 },
{ columnProp: 'documentNo', columnLabel: '通知单号', headerAlign: 'center', align: 'left', columnWidth: 150 },
{ columnProp: 'orderNo', columnLabel: '关联单号', headerAlign: 'center', align: 'left', columnWidth: 150 },
{ columnProp: 'orderLineNo', columnLabel: '关联单行号', headerAlign: 'center', align: 'center', columnWidth: 100 },
{ columnProp: 'rollNo', columnLabel: '标签条码', headerAlign: 'center', align: 'left', columnWidth: 180 },
{ columnProp: 'rollQty', columnLabel: '变动数量', headerAlign: 'center', align: 'right', columnWidth: 100 },
{ columnProp: 'batchNo', columnLabel: '合约号码', headerAlign: 'center', align: 'left', columnWidth: 150 },
{ columnProp: 'partNo', columnLabel: '物料编码', headerAlign: 'center', align: 'left', columnWidth: 150 },
{ columnProp: 'partDesc', columnLabel: '物料名称', headerAlign: 'center', align: 'left', columnWidth: 180 },
{ columnProp: 'spec', columnLabel: '规格型号', headerAlign: 'center', align: 'left', columnWidth: 120 },
{ columnProp: 'warehouseId', columnLabel: '仓库编码', headerAlign: 'center', align: 'center', columnWidth: 100 },
{ columnProp: 'warehouseName', columnLabel: '仓库名称', headerAlign: 'center', align: 'left', columnWidth: 120 },
{ columnProp: 'locationId', columnLabel: '库位编码', headerAlign: 'center', align: 'center', columnWidth: 100 },
{ columnProp: 'locationName', columnLabel: '库位名称', headerAlign: 'center', align: 'left', columnWidth: 120 },
{ columnProp: 'syncedFlag', columnLabel: '传输状态', headerAlign: 'center', align: 'center', columnWidth: 90 },
{ columnProp: 'syncedTime', columnLabel: '传输时间', headerAlign: 'center', align: 'center', columnWidth: 160 },
{ columnProp: 'syncedErrorMsg', columnLabel: '传输消息', headerAlign: 'center', align: 'left', columnWidth: 150 },
{ columnProp: 'bomItemNo', columnLabel: 'Bom行号', headerAlign: 'center', align: 'center', columnWidth: 100 },
{ columnProp: 'transactionBy', columnLabel: '操作员', headerAlign: 'center', align: 'center', columnWidth: 100 },
{ columnProp: 'transactionDate', columnLabel: '变动日期', headerAlign: 'center', align: 'center', columnWidth: 160 }
]
}
},
computed: {
@ -411,7 +437,41 @@ export default {
//
exportData() {
this.$message.info('导出功能开发中...')
//
const exportParams = {
buNo: this.searchData.buNo,
documentType: this.activeTab === 'all' ? this.searchData.documentType : this.activeTab,
rollNo: this.searchData.rollNo,
partNo: this.searchData.partNo,
partDesc: this.searchData.partDesc,
spec: this.searchData.spec,
startDate: this.searchData.startDate || '',
endDate: this.searchData.endDate || '',
transactionId: this.searchData.transactionId,
documentNo: this.searchData.documentNo,
orderNo: this.searchData.orderNo,
orderLineNo: this.searchData.orderLineNo,
syncedFlag: this.searchData.syncedFlag,
userName: this.$store.state.user.name,
page: 1,
limit: 999999 // 使-1SQL ServerFETCH
}
//
const tabName = this.activeTab === 'all' ? '全部' : this.activeTab
const fileName = `标签变动记录_${tabName}_${this.dayjs().format('YYYYMMDDHHmmss')}.xlsx`
// 使excel
excel.exportTable({
url: '/warehouse/labelTransactionLog/list', // 使listlimit=999999
columnMapping: this.exportColumnList, // 使
mergeSetting: [], //
params: exportParams, //
fileName: fileName, //
rowFetcher: res => res.data.page.list, //
columnFormatter: [], //
dropColumns: [] //
})
},
//

Loading…
Cancel
Save