diff --git a/klp-ui/src/components/TimeInput.vue b/klp-ui/src/components/TimeInput.vue
index a96da4ea..3e325741 100644
--- a/klp-ui/src/components/TimeInput.vue
+++ b/klp-ui/src/components/TimeInput.vue
@@ -2,9 +2,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -210,13 +176,13 @@
@@ -505,14 +461,13 @@ import { listCoilAbnormal } from '@/api/wms/coilAbnormal'
import { completeAction, getPendingAction, updatePendingAction } from '@/api/wms/pendingAction'
import { saveCoilCache, getCoilCacheByCoilId, delCoilCache } from '@/api/wms/coilCache'
import { getGalvanize1TypingPrefill } from '@/api/pocket/acidTyping'
-import { listPlanSheet } from '@/api/aps/planSheet'
-import { listPlanDetail } from '@/api/aps/planDetail'
import ProductSelect from '@/components/KLPService/ProductSelect'
import RawMaterialSelect from '@/components/KLPService/RawMaterialSelect'
import WarehouseSelect from '@/components/KLPService/WarehouseSelect'
import ActualWarehouseSelect from '@/components/KLPService/ActualWarehouseSelect'
import TimeInput from '@/components/TimeInput'
import AbnormalForm from '../components/AbnormalForm'
+import PlanSheetViewer from '../components/PlanSheetViewer.vue'
import { generateCoilNoPrefix } from '@/utils/coil/coilNo'
import ProductInfo from '@/components/KLPService/Renderer/ProductInfo'
import RawMaterialInfo from '@/components/KLPService/Renderer/RawMaterialInfo'
@@ -530,7 +485,8 @@ export default {
AbnormalForm,
ProductInfo,
RawMaterialInfo,
- ContractSelect
+ ContractSelect,
+ PlanSheetViewer,
},
props: {
actionId: {
@@ -644,11 +600,6 @@ export default {
parsedCacheData: null,
// 最早的热轧卷板材质
firstHeatMaterial: '',
- // 排产单相关
- planSheetList: [],
- planSheetDetailMap: {},
- planSheetLoading: false,
- activePlanSheetId: null,
// 异常继承
inheritDialogVisible: false,
inheritLoading: false,
@@ -668,7 +619,7 @@ export default {
200: '酸轧线',
520: '酸轧线',
- 206: '镀锌线',
+ 202: '镀锌线',
501: '镀锌线',
521: '镀锌线',
@@ -697,10 +648,13 @@ export default {
const day = String(d.getDate()).padStart(2, '0')
return `${y}-${m}-${day}`
},
- activePlanSheetDetails() {
- return this.planSheetDetailMap[this.activePlanSheetId] || []
+ todayDateStr() {
+ const d = new Date()
+ const y = d.getFullYear()
+ const m = String(d.getMonth() + 1).padStart(2, '0')
+ const day = String(d.getDate()).padStart(2, '0')
+ return `${y}-${m}-${day}`
},
- // 是否是镀铬操作
isGrindAction() {
return this.actionType == 505 || this.actionType == 525 || this.actionType == 206
},
@@ -746,56 +700,10 @@ export default {
// 获取镀锌线二级系统数据
this.getZincList()
}
- if (this.planSheetLineName) {
- this.fetchPlanSheets()
- }
}
}
},
methods: {
- // 查询最近排产单及明细
- async fetchPlanSheets() {
- if (!this.planSheetLineName) return
- this.planSheetLoading = true
- try {
- const res = await listPlanSheet({
- lineName: this.planSheetLineName,
- pageSize: 3,
- pageNum: 1
- })
- this.planSheetList = res.rows || []
- this.planSheetDetailMap = {}
- if (this.planSheetList.length > 0) {
- this.activePlanSheetId = this.planSheetList[0].planSheetId
- for (const sheet of this.planSheetList) {
- this.fetchPlanSheetDetail(sheet.planSheetId)
- }
- }
- } catch (e) {
- console.error('查询排产单失败', e)
- } finally {
- this.planSheetLoading = false
- }
- },
- async fetchPlanSheetDetail(planSheetId) {
- try {
- const res = await listPlanDetail({
- planSheetId,
- pageSize: 100,
- pageNum: 1
- })
- const details = res.rows || []
- details.sort((a, b) => {
- const na = parseInt(a.bizSeqNo) || 0
- const nb = parseInt(b.bizSeqNo) || 0
- return na - nb
- })
- this.$set(this.planSheetDetailMap, planSheetId, details)
- } catch (e) {
- console.error('查询排产单明细失败', e)
- }
- },
-
// 查询待分条的钢卷信息
async getCoilInfo() {
try {
diff --git a/klp-ui/src/views/wms/coil/split.vue b/klp-ui/src/views/wms/coil/split.vue
index 8207adef..e36d9eb8 100644
--- a/klp-ui/src/views/wms/coil/split.vue
+++ b/klp-ui/src/views/wms/coil/split.vue
@@ -14,42 +14,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -211,13 +177,13 @@
-
吨
-
吨
@@ -404,14 +370,13 @@ import { getMaterialCoil, splitMaterialCoil, getFirstHeatCoilMaterial } from '@/
import { listCoilAbnormal } from '@/api/wms/coilAbnormal';
import { listWarehouse } from '@/api/wms/warehouse';
import { completeAction, getPendingAction } from '@/api/wms/pendingAction';
-import { listPlanSheet } from '@/api/aps/planSheet'
-import { listPlanDetail } from '@/api/aps/planDetail'
import ActualWarehouseSelect from "@/components/KLPService/ActualWarehouseSelect";
import RawMaterialSelect from "@/components/KLPService/RawMaterialSelect";
import ProductSelect from "@/components/KLPService/ProductSelect";
import WarehouseSelect from "@/components/KLPService/WarehouseSelect";
import TimeInput from "@/components/TimeInput";
import AbnormalForm from './components/AbnormalForm';
+import PlanSheetViewer from './components/PlanSheetViewer.vue';
import { generateCoilNoPrefix } from "@/utils/coil/coilNo";
import ContractSelect from "@/components/KLPService/ContractSelect";
import { addCoilContractRel } from "@/api/wms/coilContractRel";
@@ -425,7 +390,8 @@ export default {
WarehouseSelect,
TimeInput,
AbnormalForm,
- ContractSelect
+ ContractSelect,
+ PlanSheetViewer,
},
dicts: ['coil_quality_status', 'coil_abnormal_position', 'coil_abnormal_code', 'coil_abnormal_degree', 'coil_business_purpose'],
data() {
@@ -508,12 +474,6 @@ export default {
},
// 最早热轧卷板材质
firstHeatMaterial: null,
- // 排产单相关
- actionTypeCode: '',
- planSheetList: [],
- planSheetDetailMap: {},
- planSheetLoading: false,
- activePlanSheetId: null,
// 异常继承
inheritDialogVisible: false,
inheritLoading: false,
@@ -530,9 +490,6 @@ export default {
const d = new Date()
return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, '0')}-${String(d.getDate()).padStart(2, '0')}`
},
- activePlanSheetDetails() {
- return this.planSheetDetailMap[this.activePlanSheetId] || []
- },
selectedInheritCount() {
let count = 0
for (const parent of this.parentCoils) {
@@ -554,12 +511,6 @@ export default {
const coilId = this.$route.query.coilId;
const actionId = this.$route.query.actionId;
const readonly = this.$route.query.readonly;
- const actionTypeCode = this.$route.query.actionTypeCode;
-
- if (actionTypeCode) {
- this.actionTypeCode = actionTypeCode;
- }
- this.fetchPlanSheets();
// 获取待操作详情
getPendingAction(actionId).then(res => {
@@ -1012,33 +963,6 @@ export default {
return item ? item.label : code;
},
- // 查询最近排产单(酸轧线)
- async fetchPlanSheets() {
- this.planSheetLoading = true
- try {
- const res = await listPlanSheet({
- lineName: '酸轧线',
- pageSize: 3, pageNum: 1,
- })
- this.planSheetList = res.rows || []
- this.planSheetDetailMap = {}
- if (this.planSheetList.length > 0) {
- this.activePlanSheetId = this.planSheetList[0].planSheetId
- for (const sheet of this.planSheetList) {
- this.fetchPlanSheetDetail(sheet.planSheetId)
- }
- }
- } catch (e) { console.error('查询排产单失败', e) }
- finally { this.planSheetLoading = false }
- },
- async fetchPlanSheetDetail(planSheetId) {
- try {
- const res = await listPlanDetail({ planSheetId, pageSize: 100, pageNum: 1 })
- const details = (res.rows || []).sort((a, b) => (parseInt(a.bizSeqNo) || 0) - (parseInt(b.bizSeqNo) || 0))
- this.$set(this.planSheetDetailMap, planSheetId, details)
- } catch (e) { console.error('查询排产单明细失败', e) }
- },
-
// 异常继承
handleInheritAbnormal(subCoilIndex) {
const parentId = this.motherCoil.coilId
diff --git a/klp-ui/src/views/wms/coil/typing.vue b/klp-ui/src/views/wms/coil/typing.vue
index 875917e7..8c1ae2cc 100644
--- a/klp-ui/src/views/wms/coil/typing.vue
+++ b/klp-ui/src/views/wms/coil/typing.vue
@@ -10,42 +10,11 @@
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
产线名称映射
@@ -455,6 +423,7 @@ export default {
ContractSelect,
L2MatchPanel,
DrMatchPanel,
+ PlanSheetViewer,
},
dicts: ['coil_quality_status', 'coil_abnormal_position', 'coil_abnormal_code', 'coil_abnormal_degree', 'coil_business_purpose'],
data() {
@@ -576,11 +545,7 @@ export default {
currentCache: null,
parsedCacheData: null,
itemSelectorQueryParams: {},
- // 排产计划
- planSheetList: [],
- planSheetDetailMap: {},
- activePlanSheetId: null,
- currentLineName: '',
+
// 异常继承
inheritDialogVisible: false,
inheritLoading: false,
@@ -592,8 +557,8 @@ export default {
l2HotCoilId() {
return (this.currentInfo && this.currentInfo.enterCoilNo) || ''
},
- activePlanSheetDetails() {
- return this.planSheetDetailMap[this.activePlanSheetId] || []
+ currentLineName() {
+ return actionTypeToLineName[this.actionType] || ''
},
/** 是否双机架工序(actionType 504=正常 / 524=修复) */
isDrAction() {
@@ -677,8 +642,6 @@ export default {
}
}
- // 加载排产计划
- await this.loadPlanDetails();
},
methods: {
/** 双机架计划/道次快捷写入 */
@@ -802,43 +765,6 @@ export default {
}
},
- // 根据当前actionType加载对应产线的最近3个排产计划
- async loadPlanDetails() {
- const lineName = actionTypeToLineName[this.actionType]
- if (!lineName) return
- this.currentLineName = lineName
- try {
- const sheetRes = await listPlanSheet({
- lineName,
- pageNum: 1,
- pageSize: 3,
- })
- this.planSheetList = sheetRes.rows || []
- this.planSheetDetailMap = {}
- if (this.planSheetList.length > 0) {
- this.activePlanSheetId = this.planSheetList[0].planSheetId
- for (const sheet of this.planSheetList) {
- this.fetchPlanSheetDetail(sheet.planSheetId)
- }
- }
- } catch (error) {
- console.error('加载排产计划失败', error)
- }
- },
- async fetchPlanSheetDetail(planSheetId) {
- try {
- const detailRes = await listPlanDetail({
- planSheetId,
- pageNum: 1,
- pageSize: 50,
- })
- if (detailRes.rows) {
- const details = detailRes.rows.sort((a, b) => (parseInt(a.bizSeqNo) || 0) - (parseInt(b.bizSeqNo) || 0))
- this.$set(this.planSheetDetailMap, planSheetId, details)
- }
- } catch (e) { console.error('查询排产单明细失败', e) }
- },
-
// 复制当前信息到更新表单
copyFromCurrent() {
// 复制除了指定字段之外的其他字段