feat(wms/coil): 在钢卷录入页面新增排产计划展示功能
1. 在钢卷录入页面新增排产计划卡片,根据当前操作类型动态显示对应产线的计划 2. 新增产线名称映射表,支持酸轧线、镀锌线、脱脂线、拉矫线、双机架线、镀铬线和分条线 3. 调用APS模块的排产计划和计划明细接口获取数据,并在表格中展示订单号、合同号、客户、成品信息等详细列 4. 优化原料信息组件显示列数,提升页面信息展示密度
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="typing-coil-container">
|
<div class="typing-coil-container">
|
||||||
<div>
|
<div>
|
||||||
<CoilInfoRender title="原料信息" :coilInfo="currentInfo" border>
|
<CoilInfoRender title="原料信息" :coilInfo="currentInfo" border :column="7">
|
||||||
<template slot="extra">
|
<template slot="extra">
|
||||||
<el-button type="text" size="mini" @click="copyFromCurrent" icon="el-icon-document-copy">
|
<el-button type="text" size="mini" @click="copyFromCurrent" icon="el-icon-document-copy">
|
||||||
复制源卷信息
|
复制源卷信息
|
||||||
@@ -10,6 +10,35 @@
|
|||||||
</CoilInfoRender>
|
</CoilInfoRender>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- 排产计划 -->
|
||||||
|
<el-card class="plan-card" v-if="planDetailList.length > 0" style="margin-bottom: 20px;">
|
||||||
|
<div slot="header" class="card-header">
|
||||||
|
<span><i class="el-icon-s-order"></i> {{ currentLineName }}排产计划</span>
|
||||||
|
</div>
|
||||||
|
<div style="overflow-x: auto;">
|
||||||
|
<el-table :data="planDetailList" size="small" max-height="300" stripe border>
|
||||||
|
<el-table-column label="订单号" prop="orderCode" width="160" />
|
||||||
|
<el-table-column label="合同号" prop="contractCode" width="160" />
|
||||||
|
<el-table-column label="客户" prop="customerName" width="100" />
|
||||||
|
<el-table-column label="业务员" prop="salesman" width="80" />
|
||||||
|
<el-table-column label="成品名称" prop="productName" width="120" />
|
||||||
|
<el-table-column label="成品材质" prop="productMaterial" width="100" />
|
||||||
|
<el-table-column label="成品镀层" prop="coatingG" width="90" />
|
||||||
|
<el-table-column label="成品宽度" prop="productWidth" width="90" />
|
||||||
|
<el-table-column label="轧制厚度" prop="rollingThick" width="90" />
|
||||||
|
<el-table-column label="标签厚度" prop="markCoatThick" width="90" />
|
||||||
|
<el-table-column label="吨钢长度区间" prop="tonSteelLengthRange" width="120" />
|
||||||
|
<el-table-column label="数量" prop="planQty" width="70" />
|
||||||
|
<el-table-column label="重量" prop="planWeight" width="90" />
|
||||||
|
<el-table-column label="表面处理" prop="surfaceTreatment" width="100" />
|
||||||
|
<el-table-column label="切边要求" prop="widthReq" width="90" />
|
||||||
|
<el-table-column label="包装要求" prop="productPackaging" width="90" />
|
||||||
|
<el-table-column label="宽度要求" prop="productEdgeReq" width="90" />
|
||||||
|
<el-table-column label="用途" prop="usageReq" width="100" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
<el-alert v-if="acidPrefill.visible" :title="acidPrefill.title" :type="acidPrefill.type" :closable="false" show-icon
|
<el-alert v-if="acidPrefill.visible" :title="acidPrefill.title" :type="acidPrefill.type" :closable="false" show-icon
|
||||||
style="margin-bottom: 20px;" />
|
style="margin-bottom: 20px;" />
|
||||||
|
|
||||||
@@ -313,6 +342,8 @@
|
|||||||
import { getMaterialCoil, updateMaterialCoil, getFirstHeatCoilMaterial } from '@/api/wms/coil';
|
import { getMaterialCoil, updateMaterialCoil, getFirstHeatCoilMaterial } from '@/api/wms/coil';
|
||||||
import { matchBestSpecVersion } from '@/api/wms/processSpecVersion';
|
import { matchBestSpecVersion } from '@/api/wms/processSpecVersion';
|
||||||
import { completeAction, getPendingAction } from '@/api/wms/pendingAction';
|
import { completeAction, getPendingAction } from '@/api/wms/pendingAction';
|
||||||
|
import { listPlanSheet } from '@/api/aps/planSheet';
|
||||||
|
import { listPlanDetail } from '@/api/aps/planDetail';
|
||||||
import { saveCoilCache, getCoilCacheByCoilId, delCoilCache } from '@/api/wms/coilCache';
|
import { saveCoilCache, getCoilCacheByCoilId, delCoilCache } from '@/api/wms/coilCache';
|
||||||
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
|
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
|
||||||
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
|
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
|
||||||
@@ -327,6 +358,17 @@ import L2MatchPanel from './panels/L2MatchPanel.vue'
|
|||||||
import DrMatchPanel from './panels/DrMatchPanel.vue';
|
import DrMatchPanel from './panels/DrMatchPanel.vue';
|
||||||
|
|
||||||
|
|
||||||
|
// actionType -> 产线名称映射
|
||||||
|
const actionTypeToLineName = {
|
||||||
|
11: '酸轧线', 120: '酸轧线', 200: '酸轧线', 201: '酸轧线', 520: '酸轧线',
|
||||||
|
202: '镀锌线', 501: '镀锌线', 521: '镀锌线',
|
||||||
|
203: '脱脂线', 502: '脱脂线', 522: '脱脂线',
|
||||||
|
204: '拉矫线', 503: '拉矫线', 523: '拉矫线',
|
||||||
|
205: '双机架线', 504: '双机架线', 524: '双机架线',
|
||||||
|
206: '镀铬线', 505: '镀铬线', 525: '镀铬线',
|
||||||
|
506: '分条线',
|
||||||
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TypingCoil',
|
name: 'TypingCoil',
|
||||||
components: {
|
components: {
|
||||||
@@ -460,6 +502,10 @@ export default {
|
|||||||
currentCache: null,
|
currentCache: null,
|
||||||
parsedCacheData: null,
|
parsedCacheData: null,
|
||||||
itemSelectorQueryParams: {},
|
itemSelectorQueryParams: {},
|
||||||
|
// 排产计划
|
||||||
|
planDetailList: [],
|
||||||
|
currentPlanSheet: null,
|
||||||
|
currentLineName: '',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -534,6 +580,9 @@ export default {
|
|||||||
console.error('查询暂存失败', error);
|
console.error('查询暂存失败', error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 加载排产计划
|
||||||
|
await this.loadPlanDetails();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 双机架计划/道次快捷写入 */
|
/** 双机架计划/道次快捷写入 */
|
||||||
@@ -653,6 +702,34 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// 根据当前actionType加载对应产线的排产计划
|
||||||
|
async loadPlanDetails() {
|
||||||
|
const lineName = actionTypeToLineName[this.actionType]
|
||||||
|
if (!lineName) return
|
||||||
|
this.currentLineName = lineName
|
||||||
|
try {
|
||||||
|
const sheetRes = await listPlanSheet({
|
||||||
|
lineName,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 1,
|
||||||
|
})
|
||||||
|
if (sheetRes.rows && sheetRes.rows.length > 0) {
|
||||||
|
const planSheet = sheetRes.rows[0]
|
||||||
|
this.currentPlanSheet = planSheet
|
||||||
|
const detailRes = await listPlanDetail({
|
||||||
|
planSheetId: planSheet.planSheetId,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 50,
|
||||||
|
})
|
||||||
|
if (detailRes.rows) {
|
||||||
|
this.planDetailList = detailRes.rows
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('加载排产计划失败', error)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
// 复制当前信息到更新表单
|
// 复制当前信息到更新表单
|
||||||
copyFromCurrent() {
|
copyFromCurrent() {
|
||||||
// 复制除了指定字段之外的其他字段
|
// 复制除了指定字段之外的其他字段
|
||||||
|
|||||||
Reference in New Issue
Block a user