feat(配卷): 添加配卷记录功能
- 在配卷页面添加记录按钮,点击可查看配卷操作记录 - 新增配卷记录组件,展示钢卷操作历史 - 实现记录弹窗功能,支持分页查询
This commit is contained in:
110
klp-ui/src/views/wms/delivery/components/planRecord.vue
Normal file
110
klp-ui/src/views/wms/delivery/components/planRecord.vue
Normal 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>
|
||||||
@@ -74,9 +74,17 @@
|
|||||||
|
|
||||||
<div>
|
<div>
|
||||||
<el-descriptions title="配卷">
|
<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>
|
</el-descriptions>
|
||||||
<coil-selector ref="coilSelector" placeholder="请选择钢卷添加至计划" @change="handleCoilChange"
|
<coil-selector ref="coilSelector" placeholder="请选择钢卷添加至计划" @change="handleCoilChange" :filters="coilFilters"
|
||||||
:filters="coilFilters" :coil-column="coilColumn" dialog-width="1200px" :sales-restricted="true"></coil-selector>
|
:coil-column="coilColumn" dialog-width="1200px" :sales-restricted="true"></coil-selector>
|
||||||
<div v-if="selectedCoilList.length > 0 && currentPlan.planId">
|
<div v-if="selectedCoilList.length > 0 && currentPlan.planId">
|
||||||
<el-table :data="selectedCoilList" border highlight-current-row style="width: 100%" max-height="400px">
|
<el-table :data="selectedCoilList" border highlight-current-row style="width: 100%" max-height="400px">
|
||||||
<!-- <el-table-column type="index" width="50" align="center" label="序号" /> -->
|
<!-- <el-table-column type="index" width="50" align="center" label="序号" /> -->
|
||||||
@@ -141,6 +149,10 @@
|
|||||||
<el-button @click="cancel">取 消</el-button>
|
<el-button @click="cancel">取 消</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</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>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -150,15 +162,18 @@ import { listCoilOperation } from "@/api/wms/coil";
|
|||||||
import { addDeliveryPlanCoilOperate } from "@/api/wms/deliveryPlanCoilOperate";
|
import { addDeliveryPlanCoilOperate } from "@/api/wms/deliveryPlanCoilOperate";
|
||||||
import coilSelector from "@/components/CoilSelector";
|
import coilSelector from "@/components/CoilSelector";
|
||||||
import PlanOrder from "../components/planOrder.vue";
|
import PlanOrder from "../components/planOrder.vue";
|
||||||
|
import PlanRecord from "../components/planRecord.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DeliveryPlan",
|
name: "DeliveryPlan",
|
||||||
components: {
|
components: {
|
||||||
coilSelector,
|
coilSelector,
|
||||||
PlanOrder,
|
PlanOrder,
|
||||||
|
PlanRecord,
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
recordOpen: false,
|
||||||
// 按钮loading
|
// 按钮loading
|
||||||
buttonLoading: false,
|
buttonLoading: false,
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
@@ -333,6 +348,10 @@ export default {
|
|||||||
this.rightLoading = false;
|
this.rightLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 打开配卷记录弹窗
|
||||||
|
handleRecord() {
|
||||||
|
this.recordOpen = true;
|
||||||
|
},
|
||||||
handleCardClick(row) {
|
handleCardClick(row) {
|
||||||
// 防抖处理,防止频繁点击
|
// 防抖处理,防止频繁点击
|
||||||
if (this.debounceTimer) {
|
if (this.debounceTimer) {
|
||||||
|
|||||||
Reference in New Issue
Block a user