feat(调拨): 添加调拨记录查看功能并优化显示
- 在卷材信息页面添加调拨记录弹窗,展示批量调拨和技术部改判记录 - 为卷材选择器添加数据类型和状态过滤条件 - 调整仓库表格的flex布局比例 - 在卷材操作面板添加查看调拨记录按钮
This commit is contained in:
@@ -712,6 +712,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="时间"></el-table-column>
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -893,17 +894,19 @@ export default {
|
||||
before: '逻辑库:' + (item.warehouseNameBefore || '-'),
|
||||
after: '逻辑库:' + (item.warehouseNameAfter || '-'),
|
||||
createTime: item.createTime || '-',
|
||||
remark: item.remark || '-',
|
||||
...item
|
||||
});
|
||||
});
|
||||
// 添加技术部改判记录
|
||||
this.coilQualityRejudgeList.forEach(item => {
|
||||
list.push({
|
||||
...item,
|
||||
type: '技术部改判',
|
||||
before: '质量状态:' + (item.beforeQuality || '-'),
|
||||
after: '质量状态:' + (item.afterQuality || '-'),
|
||||
createTime: item.createTime || '-',
|
||||
...item
|
||||
remark: item.rejudgeReason,
|
||||
});
|
||||
});
|
||||
// 按时间排序
|
||||
@@ -2114,7 +2117,7 @@ export default {
|
||||
}
|
||||
|
||||
.table-wrapper.warehouse-table {
|
||||
flex: 3;
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.table-wrapper.transfer-table {
|
||||
|
||||
@@ -353,6 +353,10 @@
|
||||
@click="handleReplaceLabel(scope.row)">
|
||||
重贴标签
|
||||
</el-button>
|
||||
<el-button size="mini" v-if="hasTransferType" type="text" icon="el-icon-document"
|
||||
@click="handleViewTransferRecord(scope.row)">
|
||||
查看记录
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</KLPTable>
|
||||
@@ -611,6 +615,29 @@
|
||||
<el-button :loading="buttonLoading" type="primary" @click="submitJudgeForm">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 调拨记录弹窗 -->
|
||||
<el-dialog title="调拨记录" :visible.sync="transferRecordVisible" width="900px" append-to-body>
|
||||
<div class="table-wrapper transfer-table" v-loading="loading">
|
||||
<div class="table-container">
|
||||
<el-table :data="transferRecordList" size="small" border stripe style="width: 100%">
|
||||
<el-table-column prop="type" label="类型" min-width="100"></el-table-column>
|
||||
<el-table-column label="变更前">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.before }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="变更后">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.after }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createTime" label="时间"></el-table-column>
|
||||
<el-table-column prop="remark" label="备注" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -630,6 +657,8 @@ import {
|
||||
} from "@/api/wms/coil";
|
||||
import { listBoundCoil } from "@/api/wms/deliveryWaybillDetail";
|
||||
import { addPendingAction } from "@/api/wms/pendingAction";
|
||||
import { listTransferOrderItem } from "@/api/wms/transferOrderItem";
|
||||
import { listCoilQualityRejudge } from "@/api/wms/coilQualityRejudge";
|
||||
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
|
||||
import QRCode from "@/components/QRCode";
|
||||
import * as XLSX from 'xlsx'
|
||||
@@ -992,6 +1021,9 @@ export default {
|
||||
itemManufacturer: undefined,
|
||||
notifyReLabel: false
|
||||
},
|
||||
// 调拨记录弹窗
|
||||
transferRecordVisible: false,
|
||||
transferRecordList: [],
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -1096,6 +1128,62 @@ export default {
|
||||
this.getList();
|
||||
})
|
||||
},
|
||||
// 查看调拨记录
|
||||
async handleViewTransferRecord(row) {
|
||||
this.transferRecordVisible = true;
|
||||
this.transferRecordList = [];
|
||||
try {
|
||||
// 获取批量调拨记录
|
||||
this.loading = true;
|
||||
const transferOrderRes = await listTransferOrderItem({
|
||||
coilId: row.coilId,
|
||||
pageNum: 1,
|
||||
pageSize: 100
|
||||
});
|
||||
// 获取技术部改判记录
|
||||
const rejudgeRes = await listCoilQualityRejudge({
|
||||
coilId: row.coilId,
|
||||
pageNum: 1,
|
||||
pageSize: 100
|
||||
});
|
||||
// 合并记录
|
||||
const list = [];
|
||||
// 添加批量调拨记录
|
||||
(transferOrderRes.rows || []).forEach(item => {
|
||||
list.push({
|
||||
type: '批量调拨',
|
||||
before: '逻辑库:' + (item.warehouseNameBefore || '-'),
|
||||
after: '逻辑库:' + (item.warehouseNameAfter || '-'),
|
||||
createTime: item.createTime || '-',
|
||||
remark: item.remark || '-',
|
||||
...item
|
||||
});
|
||||
});
|
||||
// 添加技术部改判记录
|
||||
(rejudgeRes.rows || []).forEach(item => {
|
||||
list.push({
|
||||
...item,
|
||||
type: '技术部改判',
|
||||
before: '质量状态:' + (item.beforeQuality || '-'),
|
||||
after: '质量状态:' + (item.afterQuality || '-'),
|
||||
createTime: item.createTime || '-',
|
||||
remark: item.rejudgeReason,
|
||||
});
|
||||
});
|
||||
// 按时间排序
|
||||
list.sort((a, b) => {
|
||||
const timeA = new Date(a.createTime || 0).getTime();
|
||||
const timeB = new Date(b.createTime || 0).getTime();
|
||||
return timeB - timeA;
|
||||
});
|
||||
this.transferRecordList = list;
|
||||
} catch (error) {
|
||||
console.error('获取调拨记录失败:', error);
|
||||
this.$message.error('获取调拨记录失败');
|
||||
} finally {
|
||||
this.loading = false;
|
||||
}
|
||||
},
|
||||
// 格式化毫秒值为xx天xx小时xx分钟
|
||||
formatDuration(milliseconds) {
|
||||
if (!milliseconds || milliseconds < 0) return '';
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
<el-button icon="el-icon-download" type="warning" plain @click="handleExportDetail">导出</el-button>
|
||||
<el-button style="margin-right: 10px;" icon="el-icon-refresh" type="success" plain @click="handleRefreshDetailList">刷新</el-button>
|
||||
<!-- <el-button :loading="buttonLoading" style="margin-right: 10px;" icon="el-icon-check" type="primary" plain @click="handleConfirmAll" v-if="currentOrderStatus == '2'">执行全部</el-button> -->
|
||||
<coil-selector v-loading="buttonLoading" ref="coilSelector" multiple @confirm="handleCoilChange" v-if="canAddCoils"></coil-selector>
|
||||
<coil-selector v-loading="buttonLoading" ref="coilSelector" :filters="{ dataType: 1, status: 0 }" multiple @confirm="handleCoilChange" v-if="canAddCoils"></coil-selector>
|
||||
</div>
|
||||
<transfer-item-table ref="transferItemTable" :data="transferOrderItems" @refreshData="getDetailList" :orderStatus="currentOrderStatus" :canEdit="canAddCoils" />
|
||||
</el-dialog>
|
||||
|
||||
Reference in New Issue
Block a user