update 出入库记录,根据作业类型展示列表的字段,并修改导出功能

This commit is contained in:
18110972313 2025-05-10 16:05:59 +08:00
parent b55da84446
commit 59cf4660cf

View File

@ -77,7 +77,7 @@
</el-form>
<div class="page-search-btns">
<el-button type="primary" @click="handleQueryInfo">搜索</el-button>
<el-button type="primary" @click="exportExcel">导出</el-button>
<el-button type="primary" @click="exportTransactionExcel">导出</el-button>
<el-button @click="resetQuery">重置</el-button>
</div>
</el-row>
@ -99,7 +99,8 @@
</el-popover>
</div>
</div>
<el-table border v-loading="loading" :data="list" highlight-current-row row-key="id" show-summary style="width: 100%" :height="tableHeight">
<!-- <el-table border v-loading="loading" :data="list" highlight-current-row row-key="id" show-summary style="width: 100%" :height="tableHeight">-->
<el-table border v-loading="loading" :data="list" highlight-current-row row-key="id" show-summary style="width: 100%; height: 100%">
<el-table-column
type="index"
width="50"
@ -198,18 +199,26 @@ const { ERPFACTORY,loading, list, column, queryParams, page } = toRefs(state)
onMounted(() => {
materialTableConfig.value.column = [
{ header: "作业类型", field: "LASTEVENTNAME", hide: false , width: '150px'},
{ header: "标签", field: "MATERIALPACKINGNAME", hide: false, width: '320px' },
{ header: "批次", field: "CHARGE", hide: false, width: '200px' },
{ header: "料号", field: "MATERIALSPECNAME", hide: false , width: '100px'},
{ header: "品名", field: "DESC_CN", hide: false , width: '100px'},
{ header: "规格", field: "DESCRIPTION", hide: false, width: '200px' },
{ header: "阶段", field: "PHASE", hide: false, width: '100px' },
//
{ header: "入库组织编码", field: "INERPFACTORY", hide: false, width: '100px' },
{ header: "入库组织", field: "INERPFACTORYDESC", hide: false, width: '100px' },
{ header: "入库仓库", field: "INLOCATIONDESC", hide: false, width: '150px' },
{ header: "入库仓库编码", field: "INERPLOCATION", hide: false, width: '150px' },
{ header: "入库仓库", field: "INERPLOCATIONDESC", hide: false, width: '150px' },
{ header: "入库货位编码", field: "INLOCATION", hide: false, width: '150px' },
{ header: "入库货位", field: "INLOCATIONNAME", hide: false, width: '150px' },
//
{ header: "出库组织编码", field: "OUTERPFACTORY", hide: false, width: '100px' },
{ header: "出库组织", field: "OUTERPFACTORYDESC", hide: false, width: '100px' },
{ header: "出库仓库", field: "OUTLOCATIONDESC", hide: false, width: '150px' },
{ header: "出库仓库编码", field: "OUTERPLOCATION", hide: false, width: '150px' },
{ header: "出库仓库", field: "OUTERPLOCATIONDESC", hide: false, width: '150px' },
{ header: "出库货位编码", field: "OUTLOCATION", hide: false, width: '150px' },
{ header: "出库货位", field: "OUTLOCATIONNAME", hide: false, width: '150px' },
//
/* { header: "", field: "TRANSFEROUTERPFACTORYDESC", hide: false, width: '100px' },
@ -225,7 +234,6 @@ onMounted(() => {
{ header: "作业凭证", field: "UNDOID", hide: false, width: '120px' },
{ header: "操作人", field: "LASTEVENTUSER", hide: false, width: '120px' },
{ header: "操作时间", field: "LASTEVENTTIME", hide: false , width: '150px' },
{ header: "测试操作事件", field: "LASTEVENTNAME", hide: false , width: '150px' },
/*
{ header: "组织", field: "ERPFACTORYDESC", hide: false, width: '100px' },
{ header: "仓库", field: "LOCATIONDESC", hide: false, width: '150px' },
@ -505,6 +513,16 @@ function formatDate(param: any) {
const day = String(param.getDate()).padStart(2, '0');
return `${year}${month}${day}`;
}
function exportTransactionExcel() {
if (state.list.length > 0) {
state.loading = false
exportDataToExcel(state.list, '出入库报表')
} else {
state.loading = false
proxy.$ElMessage.warning('当前查询没有数据可以导出');
}
}
</script>
<style scoped lang="scss">