Merge branch 'master' of http://49.232.154.205:10100/liujingchao/klp-mono
This commit is contained in:
@@ -29,6 +29,14 @@ export function listPlan(query) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getL3PickupRecommend(limit = 10) {
|
||||||
|
return l2Request({
|
||||||
|
url: '/api/pdi/l3PickupRecommend',
|
||||||
|
method: 'get',
|
||||||
|
params: { limit }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
// 查询计划详细
|
// 查询计划详细
|
||||||
export function getPlan(coilId) {
|
export function getPlan(coilId) {
|
||||||
return l2Request({
|
return l2Request({
|
||||||
|
|||||||
@@ -18,6 +18,12 @@
|
|||||||
<el-input v-model="formData.entryMatId"></el-input>
|
<el-input v-model="formData.entryMatId"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<!-- 入场钢卷号 -->
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
||||||
|
<el-input v-model="formData.enterCoilNo"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<!-- 分切数 -->
|
<!-- 分切数 -->
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="分切数" prop="subId">
|
<el-form-item label="分切数" prop="subId">
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
<el-table :data="tableData" style="width: 100%" border stripe @row-click="handleRowClick" highlight-current-row>
|
<el-table :data="tableData" style="width: 100%" border stripe @row-click="handleRowClick" highlight-current-row>
|
||||||
<el-table-column prop="exitMatId" label="成品卷号"></el-table-column>
|
<el-table-column prop="exitMatId" label="成品卷号"></el-table-column>
|
||||||
<el-table-column prop="entryMatId" label="来料卷号"></el-table-column>
|
<el-table-column prop="entryMatId" label="来料卷号"></el-table-column>
|
||||||
|
<el-table-column prop="enterCoilNo" label="入场钢卷号"></el-table-column>
|
||||||
<el-table-column prop="planNo" label="计划单号"></el-table-column>
|
<el-table-column prop="planNo" label="计划单号"></el-table-column>
|
||||||
|
|
||||||
<el-table-column prop="status" label="状态"></el-table-column>
|
<el-table-column prop="status" label="状态"></el-table-column>
|
||||||
@@ -252,6 +253,7 @@ export default {
|
|||||||
this.dialogTitle = '新增实绩';
|
this.dialogTitle = '新增实绩';
|
||||||
// 初始化空表单数据(传递给子组件)
|
// 初始化空表单数据(传递给子组件)
|
||||||
this.formData = {
|
this.formData = {
|
||||||
|
enterCoilNo: '',
|
||||||
subId: 0,
|
subId: 0,
|
||||||
startPosition: 0,
|
startPosition: 0,
|
||||||
endPosition: 0,
|
endPosition: 0,
|
||||||
|
|||||||
113
apps/l2/src/views/l2/plan/components/L3PickupRecommendPanel.vue
Normal file
113
apps/l2/src/views/l2/plan/components/L3PickupRecommendPanel.vue
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
<template>
|
||||||
|
<div class="l3-pickup-recommend-panel">
|
||||||
|
<div class="section-header">
|
||||||
|
<div>
|
||||||
|
<div class="section-title">三级领料推荐</div>
|
||||||
|
<div class="section-subtitle">来自L3待处理领料队列(actionType=501, actionStatus=0)</div>
|
||||||
|
</div>
|
||||||
|
<el-button type="text" size="mini" @click="fetchList">刷新</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section-body" v-loading="loading">
|
||||||
|
<div v-if="recommendations.length" class="card-list">
|
||||||
|
<div
|
||||||
|
v-for="item in recommendations"
|
||||||
|
:key="item.actionId"
|
||||||
|
class="recommend-card"
|
||||||
|
@click="apply(item)"
|
||||||
|
>
|
||||||
|
<div class="card-title">{{ item.coilId || '-' }}</div>
|
||||||
|
<div class="card-meta">
|
||||||
|
<span>入场钢卷号:{{ item.enterCoilNo || '-' }}</span>
|
||||||
|
<span>优先级:{{ item.priority ?? '-' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="card-meta">
|
||||||
|
<span>来源coilId:{{ item.sourceCoilId || '-' }}</span>
|
||||||
|
<span>扫码时间:{{ formatDate(item.scanTime) }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="card-footer">
|
||||||
|
<span>点击应用到左侧表单</span>
|
||||||
|
<i class="el-icon-top-right" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<el-empty v-else description="暂无三级领料推荐" :image-size="90" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
|
import { getL3PickupRecommend } from '@/api/l2/plan'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'L3PickupRecommendPanel',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false,
|
||||||
|
recommendations: []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted() {
|
||||||
|
this.fetchList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async fetchList() {
|
||||||
|
this.loading = true
|
||||||
|
try {
|
||||||
|
const res = await getL3PickupRecommend(10)
|
||||||
|
this.recommendations = Array.isArray(res.data) ? res.data : []
|
||||||
|
} catch (e) {
|
||||||
|
console.error('fetch l3 pickup recommend error:', e)
|
||||||
|
this.$message?.error('获取三级领料推荐失败')
|
||||||
|
this.recommendations = []
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
apply(item) {
|
||||||
|
this.$emit('apply-recommendation', {
|
||||||
|
coilid: item.coilId || '',
|
||||||
|
enterCoilNo: item.enterCoilNo || ''
|
||||||
|
})
|
||||||
|
},
|
||||||
|
formatDate(v) {
|
||||||
|
if (!v) return '-'
|
||||||
|
return parseTime(v, '{y}-{m}-{d} {h}:{i}:{s}')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.l3-pickup-recommend-panel {
|
||||||
|
background: #f9fafc;
|
||||||
|
border: 1px solid #e4e7ed;
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
.section-header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: flex-start;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
.section-title { font-weight: 600; color: #303133; }
|
||||||
|
.section-subtitle { font-size: 12px; color: #909399; }
|
||||||
|
.section-body { max-height: 220px; overflow-y: auto; }
|
||||||
|
.card-list { display: grid; gap: 8px; }
|
||||||
|
.recommend-card {
|
||||||
|
border: 1px solid #dcdfe6;
|
||||||
|
border-radius: 6px;
|
||||||
|
background: #fff;
|
||||||
|
padding: 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.recommend-card:hover {
|
||||||
|
border-color: #409eff;
|
||||||
|
box-shadow: 0 6px 18px rgba(64, 158, 255, 0.15);
|
||||||
|
}
|
||||||
|
.card-title { font-weight: 600; color: #303133; margin-bottom: 6px; }
|
||||||
|
.card-meta { display: flex; justify-content: space-between; font-size: 12px; color: #606266; margin-bottom: 2px; }
|
||||||
|
.card-footer { display: flex; justify-content: space-between; font-size: 12px; color: #909399; margin-top: 4px; }
|
||||||
|
</style>
|
||||||
@@ -234,6 +234,7 @@
|
|||||||
append-to-body>
|
append-to-body>
|
||||||
<div class="plan-dialog-body">
|
<div class="plan-dialog-body">
|
||||||
<div class="plan-dialog-left">
|
<div class="plan-dialog-left">
|
||||||
|
<l3-pickup-recommend-panel @apply-recommendation="handleApplyL3PickupRecommendation" />
|
||||||
<el-form :model="form" ref="form" label-width="90px" :rules="rules" size="mini" class="plan-base-form">
|
<el-form :model="form" ref="form" label-width="90px" :rules="rules" size="mini" class="plan-base-form">
|
||||||
<el-row :gutter="16">
|
<el-row :gutter="16">
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
@@ -246,6 +247,11 @@
|
|||||||
<el-input v-model="form.coilid" placeholder="请输入钢卷号" maxLength="32"></el-input>
|
<el-input v-model="form.coilid" placeholder="请输入钢卷号" maxLength="32"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="12">
|
||||||
|
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
||||||
|
<el-input v-model="form.enterCoilNo" placeholder="请输入入场钢卷号" maxLength="255"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-form-item label="钢种" prop="steelGrade">
|
<el-form-item label="钢种" prop="steelGrade">
|
||||||
<el-select v-model="form.steelGrade" placeholder="请选择钢种">
|
<el-select v-model="form.steelGrade" placeholder="请选择钢种">
|
||||||
@@ -366,6 +372,7 @@ import SetupForm from './components/setupForm.vue'
|
|||||||
import SetupPane from './components/setupPane.vue'
|
import SetupPane from './components/setupPane.vue'
|
||||||
import PlanRecommendPanel from './components/PlanRecommendPanel.vue'
|
import PlanRecommendPanel from './components/PlanRecommendPanel.vue'
|
||||||
import ProcessRecommendPanel from './components/ProcessRecommendPanel.vue'
|
import ProcessRecommendPanel from './components/ProcessRecommendPanel.vue'
|
||||||
|
import L3PickupRecommendPanel from './components/L3PickupRecommendPanel.vue'
|
||||||
|
|
||||||
// 标准日期格式化方法(优化时间处理逻辑,适配接口日期格式)
|
// 标准日期格式化方法(优化时间处理逻辑,适配接口日期格式)
|
||||||
function parseTime(time, format = "{yyyy}-{mm}-{dd} {hh}:{ii}:{ss}") {
|
function parseTime(time, format = "{yyyy}-{mm}-{dd} {hh}:{ii}:{ss}") {
|
||||||
@@ -409,7 +416,8 @@ export default {
|
|||||||
SetupForm,
|
SetupForm,
|
||||||
SetupPane,
|
SetupPane,
|
||||||
PlanRecommendPanel,
|
PlanRecommendPanel,
|
||||||
ProcessRecommendPanel
|
ProcessRecommendPanel,
|
||||||
|
L3PickupRecommendPanel
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -442,6 +450,7 @@ export default {
|
|||||||
id: null, // 主键ID(组件内部用,提交时后端自动处理)
|
id: null, // 主键ID(组件内部用,提交时后端自动处理)
|
||||||
seqid: null, // 顺序号(number,接口要求)
|
seqid: null, // 顺序号(number,接口要求)
|
||||||
coilid: "", // 钢卷号(string,必填)
|
coilid: "", // 钢卷号(string,必填)
|
||||||
|
enterCoilNo: "", // 入场钢卷号(string)
|
||||||
unitCode: "", // 机组号(string,接口要求)
|
unitCode: "", // 机组号(string,接口要求)
|
||||||
dummyCoilFlag: 0, // 虚卷标识(number,默认0:非虚卷)
|
dummyCoilFlag: 0, // 虚卷标识(number,默认0:非虚卷)
|
||||||
planid: "", // 计划ID(string,接口要求)
|
planid: "", // 计划ID(string,接口要求)
|
||||||
@@ -635,6 +644,15 @@ export default {
|
|||||||
this.form.yieldPoint = payload.yieldPoint
|
this.form.yieldPoint = payload.yieldPoint
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
handleApplyL3PickupRecommendation(payload) {
|
||||||
|
if (!payload) return
|
||||||
|
if (payload.coilid !== undefined) {
|
||||||
|
this.form.coilid = payload.coilid || ''
|
||||||
|
}
|
||||||
|
if (payload.enterCoilNo !== undefined) {
|
||||||
|
this.form.enterCoilNo = payload.enterCoilNo || ''
|
||||||
|
}
|
||||||
|
},
|
||||||
handleProcessRecommendation(payload) {
|
handleProcessRecommendation(payload) {
|
||||||
this.processRecommendation = payload
|
this.processRecommendation = payload
|
||||||
},
|
},
|
||||||
@@ -806,6 +824,7 @@ export default {
|
|||||||
status: "NEW", // 新增计划默认状态为 新建
|
status: "NEW", // 新增计划默认状态为 新建
|
||||||
planid: "",
|
planid: "",
|
||||||
planType: "",
|
planType: "",
|
||||||
|
enterCoilNo: "",
|
||||||
originCoilid: "",
|
originCoilid: "",
|
||||||
yieldPoint: null,
|
yieldPoint: null,
|
||||||
zincCoatingThickness: null,
|
zincCoatingThickness: null,
|
||||||
|
|||||||
Reference in New Issue
Block a user