feat(配卷): 添加配卷记录功能

- 在配卷页面添加记录按钮,点击可查看配卷操作记录
- 新增配卷记录组件,展示钢卷操作历史
- 实现记录弹窗功能,支持分页查询
This commit is contained in:
砂糖
2025-12-18 13:59:02 +08:00
parent 5438706fbd
commit 09d0dc0991
2 changed files with 132 additions and 3 deletions

View File

@@ -0,0 +1,110 @@
<template>
<div>
<!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="钢卷ID" prop="coilId">
<el-input
v-model="queryParams.coilId"
placeholder="请输入钢卷ID"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form> -->
<el-table v-loading="loading" :data="deliveryPlanCoilOperateList">
<el-table-column label="钢卷号" align="center" prop="coilDetail.currentCoilNo"></el-table-column>
<el-table-column label="操作类型" align="center" prop="operateType" />
<el-table-column label="操作人" align="center" prop="createBy" />
<el-table-column label="操作时间" align="center" prop="createTime" />
<!-- <el-table-column label="操作备注" align="center" prop="remark" /> -->
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
</div>
</template>
<script>
import { listDeliveryPlanCoilOperate } from "@/api/wms/deliveryPlanCoilOperate";
export default {
name: "DeliveryPlanCoilOperate",
props: {
planId: {
type: String,
default: undefined
}
},
data() {
return {
// 按钮loading
buttonLoading: false,
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 发货计划钢卷操作记录表格数据
deliveryPlanCoilOperateList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
planId: undefined,
coilId: undefined,
operateType: undefined,
},
// 表单参数
form: {},
// 表单校验
rules: {
}
};
},
watch: {
planId: {
handler(newVal, oldVal) {
if (newVal !== oldVal) {
this.queryParams.planId = newVal;
this.getList();
}
},
// immediate: true
}
},
methods: {
/** 查询发货计划钢卷操作记录列表 */
getList() {
if (!this.planId) {
return
}
this.loading = true;
listDeliveryPlanCoilOperate(this.queryParams).then(response => {
this.deliveryPlanCoilOperateList = response.rows;
this.total = response.total;
this.loading = false;
});
},
}
};
</script>

View File

@@ -74,13 +74,21 @@
<div>
<el-descriptions title="配卷">
<template slot="title">
<div style="display: flex; align-items: center; gap: 4px;">
<span>配卷</span>
<el-button type="primary" size="mini" @click="handleRecord">
<svg-icon icon-class="time"></svg-icon>记录
</el-button>
</div>
</template>
</el-descriptions>
<coil-selector ref="coilSelector" placeholder="请选择钢卷添加至计划" @change="handleCoilChange"
:filters="coilFilters" :coil-column="coilColumn" dialog-width="1200px" :sales-restricted="true"></coil-selector>
<coil-selector ref="coilSelector" placeholder="请选择钢卷添加至计划" @change="handleCoilChange" :filters="coilFilters"
:coil-column="coilColumn" dialog-width="1200px" :sales-restricted="true"></coil-selector>
<div v-if="selectedCoilList.length > 0 && currentPlan.planId">
<el-table :data="selectedCoilList" border highlight-current-row style="width: 100%" max-height="400px">
<!-- <el-table-column type="index" width="50" align="center" label="序号" /> -->
<!-- { label: '质量状态', prop: 'qualityStatus' },
<!-- { label: '质量状态', prop: 'qualityStatus' },
{ label: '打包状态', prop: 'packingStatus' },
// 对应edgeType
{ label: '切边要求', prop: 'edgeRequirement' },
@@ -141,6 +149,10 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<el-dialog title="配卷记录" :visible.sync="recordOpen" width="800px" append-to-body>
<plan-record v-if="currentPlan.planId" :plan-id="currentPlan.planId" />
</el-dialog>
</div>
</template>
@@ -150,15 +162,18 @@ import { listCoilOperation } from "@/api/wms/coil";
import { addDeliveryPlanCoilOperate } from "@/api/wms/deliveryPlanCoilOperate";
import coilSelector from "@/components/CoilSelector";
import PlanOrder from "../components/planOrder.vue";
import PlanRecord from "../components/planRecord.vue";
export default {
name: "DeliveryPlan",
components: {
coilSelector,
PlanOrder,
PlanRecord,
},
data() {
return {
recordOpen: false,
// 按钮loading
buttonLoading: false,
// 遮罩层
@@ -333,6 +348,10 @@ export default {
this.rightLoading = false;
});
},
// 打开配卷记录弹窗
handleRecord() {
this.recordOpen = true;
},
handleCardClick(row) {
// 防抖处理,防止频繁点击
if (this.debounceTimer) {