1完成酸轧轧辊调整
2完成双机架工艺规格串联 3完成双机架计划串联 4完成双机架wip快捷录入检索 5完成双机架实绩串联
This commit is contained in:
243
klp-ui/src/views/wms/coil/do/dr-normal.vue
Normal file
243
klp-ui/src/views/wms/coil/do/dr-normal.vue
Normal file
@@ -0,0 +1,243 @@
|
||||
<template>
|
||||
<div class="app-container acid-op-page">
|
||||
<el-row :gutter="16">
|
||||
|
||||
<!-- 左侧:操作表单 + 历史记录 -->
|
||||
<el-col :span="15">
|
||||
|
||||
<div class="op-card">
|
||||
<div class="op-header">
|
||||
<span class="op-title">双机架工序录入</span>
|
||||
<el-tag size="mini" type="info" style="margin-left:8px">actionType = 504</el-tag>
|
||||
</div>
|
||||
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" size="small">
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
||||
<el-input v-model="form.enterCoilNo" placeholder="回车自动查询"
|
||||
clearable @keyup.enter.native="onEnterCoilInput" @blur="onEnterCoilInput" @clear="clearCoilInfo" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出口钢卷号" prop="currentCoilNo">
|
||||
<el-input v-model="form.currentCoilNo" placeholder="请输入出口钢卷号" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left" style="margin:8px 0 12px">出口实绩</el-divider>
|
||||
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出口厚度(mm)" prop="exitThickness">
|
||||
<el-input-number v-model="form.exitThickness" :precision="3" :min="0"
|
||||
:controls="false" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出口宽度(mm)" prop="exitWidth">
|
||||
<el-input-number v-model="form.exitWidth" :precision="1" :min="0"
|
||||
:controls="false" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出口长度(m)">
|
||||
<el-input-number v-model="form.exitLength" :precision="1" :min="0"
|
||||
:controls="false" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入口重量(t)">
|
||||
<el-input-number v-model="form.entryWeight" :precision="3" :min="0"
|
||||
:controls="false" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="出口重量(t)">
|
||||
<el-input-number v-model="form.exitWeight" :precision="3" :min="0"
|
||||
:controls="false" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="工艺编码">
|
||||
<el-input v-model="form.processCode" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="班组">
|
||||
<el-select v-model="form.team" placeholder="请选择" style="width:100%" clearable>
|
||||
<el-option label="甲班" value="甲" />
|
||||
<el-option label="乙班" value="乙" />
|
||||
<el-option label="丙班" value="丙" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="16">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div style="text-align:right;padding-top:4px">
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
<el-button type="primary" :loading="submitting" @click="submitForm">
|
||||
新增录入(同步创建计划)
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<!-- 历史 -->
|
||||
<div class="op-card" style="margin-top:12px">
|
||||
<div class="op-header">
|
||||
<span class="op-title">最近录入记录</span>
|
||||
<el-button size="mini" icon="el-icon-refresh" style="margin-left:auto" @click="loadHistory">刷新</el-button>
|
||||
</div>
|
||||
<el-table v-loading="historyLoading" :data="historyList" size="mini" border style="width:100%">
|
||||
<el-table-column prop="enterCoilNo" label="入场钢卷号" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="currentCoilNo" label="出口钢卷号" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="exitThickness" label="出口厚(mm)" width="90" align="right" />
|
||||
<el-table-column prop="exitWidth" label="出口宽(mm)" width="90" align="right" />
|
||||
<el-table-column prop="exitLength" label="长度(m)" width="80" align="right" />
|
||||
<el-table-column prop="entryWeight" label="入口重(t)" width="80" align="right" />
|
||||
<el-table-column prop="team" label="班组" width="60" align="center" />
|
||||
<el-table-column prop="createTime" label="录入时间" width="150" />
|
||||
</el-table>
|
||||
<pagination v-show="historyTotal > 0" :total="historyTotal"
|
||||
:page.sync="historyQuery.pageNum" :limit.sync="historyQuery.pageSize"
|
||||
@pagination="loadHistory" style="margin-top:6px" />
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<!-- 右侧:WMS 钢卷信息 -->
|
||||
<el-col :span="9">
|
||||
<div class="op-card">
|
||||
<div class="op-header"><span class="op-title">WMS 钢卷信息</span></div>
|
||||
<template v-if="coilInfo">
|
||||
<el-descriptions :column="1" size="mini" border style="margin-top:8px">
|
||||
<el-descriptions-item label="入场钢卷号">{{ coilInfo.enterCoilNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="当前钢卷号">{{ coilInfo.currentCoilNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="实际厚度">{{ coilInfo.actualThickness }} mm</el-descriptions-item>
|
||||
<el-descriptions-item label="实际宽度">{{ coilInfo.actualWidth }} mm</el-descriptions-item>
|
||||
<el-descriptions-item label="净重">{{ coilInfo.netWeight }} t</el-descriptions-item>
|
||||
<el-descriptions-item label="长度">{{ coilInfo.length }} m</el-descriptions-item>
|
||||
<el-descriptions-item label="质量状态">{{ coilInfo.qualityStatus }}</el-descriptions-item>
|
||||
<el-descriptions-item label="物料类型">{{ coilInfo.materialType }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-button size="mini" type="primary" style="margin-top:8px" @click="applyCoilFill">
|
||||
写入表单
|
||||
</el-button>
|
||||
</template>
|
||||
<div v-else style="text-align:center;color:#aaa;padding:40px 0">
|
||||
输入入场钢卷号后自动查询
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addCoilWarehouseOperationLog, listCoilWarehouseOperationLog } from '@/api/wms/coilWarehouseOperationLog'
|
||||
import { queryCoilByNo, addDrPlan } from '@/api/wms/drMill'
|
||||
|
||||
export default {
|
||||
name: 'DrNormal',
|
||||
data() {
|
||||
return {
|
||||
form: this.defaultForm(),
|
||||
rules: {
|
||||
enterCoilNo: [{ required: true, message: '入场钢卷号不能为空', trigger: 'blur' }],
|
||||
},
|
||||
submitting: false,
|
||||
coilInfo: null,
|
||||
historyLoading: false,
|
||||
historyList: [],
|
||||
historyTotal: 0,
|
||||
historyQuery: { pageNum: 1, pageSize: 10, actionType: 504 },
|
||||
}
|
||||
},
|
||||
created() { this.loadHistory() },
|
||||
methods: {
|
||||
defaultForm() {
|
||||
return {
|
||||
enterCoilNo: '', currentCoilNo: '',
|
||||
exitThickness: undefined, exitWidth: undefined, exitLength: undefined,
|
||||
entryWeight: undefined, exitWeight: undefined,
|
||||
processCode: '', team: undefined, remark: '',
|
||||
actionType: 504,
|
||||
}
|
||||
},
|
||||
onEnterCoilInput() {
|
||||
const v = (this.form.enterCoilNo || '').trim()
|
||||
if (!v) return
|
||||
queryCoilByNo(v).then(res => {
|
||||
this.coilInfo = res.data || null
|
||||
}).catch(() => { this.coilInfo = null })
|
||||
},
|
||||
clearCoilInfo() { this.coilInfo = null },
|
||||
applyCoilFill() {
|
||||
if (!this.coilInfo) return
|
||||
if (this.coilInfo.actualThickness) this.form.exitThickness = parseFloat(this.coilInfo.actualThickness)
|
||||
if (this.coilInfo.actualWidth) this.form.exitWidth = parseFloat(this.coilInfo.actualWidth)
|
||||
if (this.coilInfo.netWeight) this.form.entryWeight = parseFloat(this.coilInfo.netWeight)
|
||||
if (this.coilInfo.length) this.form.exitLength = parseFloat(this.coilInfo.length)
|
||||
this.$message.success('钢卷数据已写入表单')
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (!valid) return
|
||||
this.submitting = true
|
||||
addCoilWarehouseOperationLog({ ...this.form }).then(() => {
|
||||
// 同步创建双机架生产计划
|
||||
return addDrPlan({
|
||||
inMatNo: this.form.enterCoilNo,
|
||||
enterCoilNo: this.form.enterCoilNo,
|
||||
currentCoilNo: this.form.currentCoilNo,
|
||||
inMatThick: this.coilInfo ? this.coilInfo.actualThickness : undefined,
|
||||
inMatWidth: this.coilInfo ? this.coilInfo.actualWidth : undefined,
|
||||
inMatWeight: this.coilInfo ? this.coilInfo.netWeight : undefined,
|
||||
inMatLength: this.coilInfo ? this.coilInfo.length : undefined,
|
||||
outThick: this.form.exitThickness,
|
||||
remark: this.form.remark,
|
||||
})
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess('录入成功,已同步创建双机架计划')
|
||||
this.resetForm()
|
||||
this.loadHistory()
|
||||
}).catch(err => {
|
||||
this.$modal.msgError('操作失败: ' + (err.message || ''))
|
||||
}).finally(() => { this.submitting = false })
|
||||
})
|
||||
},
|
||||
resetForm() {
|
||||
this.form = this.defaultForm()
|
||||
this.coilInfo = null
|
||||
this.$nextTick(() => this.$refs.form && this.$refs.form.clearValidate())
|
||||
},
|
||||
loadHistory() {
|
||||
this.historyLoading = true
|
||||
listCoilWarehouseOperationLog(this.historyQuery).then(res => {
|
||||
this.historyList = res.rows || []
|
||||
this.historyTotal = res.total || 0
|
||||
}).finally(() => { this.historyLoading = false })
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.acid-op-page { background: #f5f7fa; }
|
||||
.op-card { background: #fff; border: 1px solid #e4e7ed; border-radius: 4px; padding: 16px; }
|
||||
.op-header { display: flex; align-items: center; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #409eff; }
|
||||
.op-title { font-size: 15px; font-weight: 600; color: #303133; }
|
||||
</style>
|
||||
231
klp-ui/src/views/wms/coil/do/dr-repair.vue
Normal file
231
klp-ui/src/views/wms/coil/do/dr-repair.vue
Normal file
@@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<div class="app-container acid-op-page">
|
||||
<el-row :gutter="16">
|
||||
|
||||
<el-col :span="15">
|
||||
<div class="op-card">
|
||||
<div class="op-header">
|
||||
<span class="op-title">双机架修复录入</span>
|
||||
<el-tag size="mini" type="warning" style="margin-left:8px">actionType = 524</el-tag>
|
||||
</div>
|
||||
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" size="small">
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
||||
<el-input v-model="form.enterCoilNo" placeholder="回车自动查询"
|
||||
clearable @keyup.enter.native="onEnterCoilInput" @blur="onEnterCoilInput" @clear="clearCoilInfo" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="出口钢卷号">
|
||||
<el-input v-model="form.currentCoilNo" placeholder="请输入出口钢卷号" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider content-position="left" style="margin:8px 0 12px">修复参数</el-divider>
|
||||
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="修复后厚度(mm)">
|
||||
<el-input-number v-model="form.exitThickness" :precision="3" :min="0"
|
||||
:controls="false" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="修复后宽度(mm)">
|
||||
<el-input-number v-model="form.exitWidth" :precision="1" :min="0"
|
||||
:controls="false" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="修复后长度(m)">
|
||||
<el-input-number v-model="form.exitLength" :precision="1" :min="0"
|
||||
:controls="false" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="8">
|
||||
<el-form-item label="入口重量(t)">
|
||||
<el-input-number v-model="form.entryWeight" :precision="3" :min="0"
|
||||
:controls="false" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="修复后重量(t)">
|
||||
<el-input-number v-model="form.exitWeight" :precision="3" :min="0"
|
||||
:controls="false" style="width:100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="班组">
|
||||
<el-select v-model="form.team" placeholder="请选择" style="width:100%" clearable>
|
||||
<el-option label="甲班" value="甲" />
|
||||
<el-option label="乙班" value="乙" />
|
||||
<el-option label="丙班" value="丙" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="24">
|
||||
<el-form-item label="备注">
|
||||
<el-input v-model="form.remark" clearable />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<div style="text-align:right;padding-top:4px">
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
<el-button type="warning" :loading="submitting" @click="submitForm">
|
||||
新增修复录入(同步创建计划)
|
||||
</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="op-card" style="margin-top:12px">
|
||||
<div class="op-header">
|
||||
<span class="op-title">最近修复记录</span>
|
||||
<el-button size="mini" icon="el-icon-refresh" style="margin-left:auto" @click="loadHistory">刷新</el-button>
|
||||
</div>
|
||||
<el-table v-loading="historyLoading" :data="historyList" size="mini" border style="width:100%">
|
||||
<el-table-column prop="enterCoilNo" label="入场钢卷号" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="currentCoilNo" label="出口钢卷号" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="exitThickness" label="修复后厚(mm)" width="95" align="right" />
|
||||
<el-table-column prop="exitWidth" label="修复后宽(mm)" width="95" align="right" />
|
||||
<el-table-column prop="exitLength" label="长度(m)" width="80" align="right" />
|
||||
<el-table-column prop="team" label="班组" width="60" align="center" />
|
||||
<el-table-column prop="createTime" label="录入时间" width="150" />
|
||||
</el-table>
|
||||
<pagination v-show="historyTotal > 0" :total="historyTotal"
|
||||
:page.sync="historyQuery.pageNum" :limit.sync="historyQuery.pageSize"
|
||||
@pagination="loadHistory" style="margin-top:6px" />
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="9">
|
||||
<div class="op-card">
|
||||
<div class="op-header"><span class="op-title">WMS 钢卷信息</span></div>
|
||||
<template v-if="coilInfo">
|
||||
<el-descriptions :column="1" size="mini" border style="margin-top:8px">
|
||||
<el-descriptions-item label="入场钢卷号">{{ coilInfo.enterCoilNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="当前钢卷号">{{ coilInfo.currentCoilNo }}</el-descriptions-item>
|
||||
<el-descriptions-item label="实际厚度">{{ coilInfo.actualThickness }} mm</el-descriptions-item>
|
||||
<el-descriptions-item label="实际宽度">{{ coilInfo.actualWidth }} mm</el-descriptions-item>
|
||||
<el-descriptions-item label="净重">{{ coilInfo.netWeight }} t</el-descriptions-item>
|
||||
<el-descriptions-item label="长度">{{ coilInfo.length }} m</el-descriptions-item>
|
||||
<el-descriptions-item label="质量状态">{{ coilInfo.qualityStatus }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-button size="mini" type="primary" style="margin-top:8px" @click="applyCoilFill">
|
||||
写入表单
|
||||
</el-button>
|
||||
</template>
|
||||
<div v-else style="text-align:center;color:#aaa;padding:40px 0">
|
||||
输入入场钢卷号后自动查询
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { addCoilWarehouseOperationLog, listCoilWarehouseOperationLog } from '@/api/wms/coilWarehouseOperationLog'
|
||||
import { queryCoilByNo, addDrPlan } from '@/api/wms/drMill'
|
||||
|
||||
export default {
|
||||
name: 'DrRepair',
|
||||
data() {
|
||||
return {
|
||||
form: this.defaultForm(),
|
||||
rules: {
|
||||
enterCoilNo: [{ required: true, message: '入场钢卷号不能为空', trigger: 'blur' }],
|
||||
},
|
||||
submitting: false,
|
||||
coilInfo: null,
|
||||
historyLoading: false,
|
||||
historyList: [],
|
||||
historyTotal: 0,
|
||||
historyQuery: { pageNum: 1, pageSize: 10, actionType: 524 },
|
||||
}
|
||||
},
|
||||
created() { this.loadHistory() },
|
||||
methods: {
|
||||
defaultForm() {
|
||||
return {
|
||||
enterCoilNo: '', currentCoilNo: '',
|
||||
exitThickness: undefined, exitWidth: undefined, exitLength: undefined,
|
||||
entryWeight: undefined, exitWeight: undefined,
|
||||
team: undefined, remark: '',
|
||||
actionType: 524,
|
||||
}
|
||||
},
|
||||
onEnterCoilInput() {
|
||||
const v = (this.form.enterCoilNo || '').trim()
|
||||
if (!v) return
|
||||
queryCoilByNo(v).then(res => {
|
||||
this.coilInfo = res.data || null
|
||||
}).catch(() => { this.coilInfo = null })
|
||||
},
|
||||
clearCoilInfo() { this.coilInfo = null },
|
||||
applyCoilFill() {
|
||||
if (!this.coilInfo) return
|
||||
if (this.coilInfo.actualThickness) this.form.exitThickness = parseFloat(this.coilInfo.actualThickness)
|
||||
if (this.coilInfo.actualWidth) this.form.exitWidth = parseFloat(this.coilInfo.actualWidth)
|
||||
if (this.coilInfo.netWeight) this.form.entryWeight = parseFloat(this.coilInfo.netWeight)
|
||||
if (this.coilInfo.length) this.form.exitLength = parseFloat(this.coilInfo.length)
|
||||
this.$message.success('钢卷数据已写入表单')
|
||||
},
|
||||
submitForm() {
|
||||
this.$refs.form.validate(valid => {
|
||||
if (!valid) return
|
||||
this.submitting = true
|
||||
addCoilWarehouseOperationLog({ ...this.form }).then(() => {
|
||||
return addDrPlan({
|
||||
inMatNo: this.form.enterCoilNo,
|
||||
enterCoilNo: this.form.enterCoilNo,
|
||||
currentCoilNo: this.form.currentCoilNo,
|
||||
inMatThick: this.coilInfo ? this.coilInfo.actualThickness : undefined,
|
||||
inMatWidth: this.coilInfo ? this.coilInfo.actualWidth : undefined,
|
||||
inMatWeight: this.coilInfo ? this.coilInfo.netWeight : undefined,
|
||||
inMatLength: this.coilInfo ? this.coilInfo.length : undefined,
|
||||
outThick: this.form.exitThickness,
|
||||
remark: `[修复] ${this.form.remark || ''}`,
|
||||
})
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess('修复录入成功,已同步创建双机架计划')
|
||||
this.resetForm()
|
||||
this.loadHistory()
|
||||
}).catch(err => {
|
||||
this.$modal.msgError('操作失败: ' + (err.message || ''))
|
||||
}).finally(() => { this.submitting = false })
|
||||
})
|
||||
},
|
||||
resetForm() {
|
||||
this.form = this.defaultForm()
|
||||
this.coilInfo = null
|
||||
this.$nextTick(() => this.$refs.form && this.$refs.form.clearValidate())
|
||||
},
|
||||
loadHistory() {
|
||||
this.historyLoading = true
|
||||
listCoilWarehouseOperationLog(this.historyQuery).then(res => {
|
||||
this.historyList = res.rows || []
|
||||
this.historyTotal = res.total || 0
|
||||
}).finally(() => { this.historyLoading = false })
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.acid-op-page { background: #f5f7fa; }
|
||||
.op-card { background: #fff; border: 1px solid #e4e7ed; border-radius: 4px; padding: 16px; }
|
||||
.op-header { display: flex; align-items: center; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid #e6a23c; }
|
||||
.op-title { font-size: 15px; font-weight: 600; color: #303133; }
|
||||
</style>
|
||||
213
klp-ui/src/views/wms/coil/panels/DrMatchPanel.vue
Normal file
213
klp-ui/src/views/wms/coil/panels/DrMatchPanel.vue
Normal file
@@ -0,0 +1,213 @@
|
||||
<template>
|
||||
<div class="dr-panel">
|
||||
|
||||
<!-- 计划概览 -->
|
||||
<div class="panel-block">
|
||||
<div class="pb-header">
|
||||
<span class="pb-title">双机架计划</span>
|
||||
<el-tag v-if="plan" size="mini" type="success" style="margin-left:6px">已找到</el-tag>
|
||||
<el-tag v-else-if="loading" size="mini" type="info" style="margin-left:6px">查询中</el-tag>
|
||||
<el-tag v-else size="mini" type="warning" style="margin-left:6px">未找到</el-tag>
|
||||
</div>
|
||||
|
||||
<template v-if="plan">
|
||||
<div class="plan-grid">
|
||||
<div class="pg-item">
|
||||
<span class="pg-label">计划号</span>
|
||||
<span class="pg-value plan-no">{{ plan.planNo }}</span>
|
||||
</div>
|
||||
<div class="pg-item">
|
||||
<span class="pg-label">合金牌号</span>
|
||||
<span class="pg-value">{{ plan.alloyNo || '—' }}</span>
|
||||
</div>
|
||||
<div class="pg-item">
|
||||
<span class="pg-label">采料厚度</span>
|
||||
<span class="pg-value">{{ plan.inMatThick != null ? plan.inMatThick + ' mm' : '—' }}</span>
|
||||
</div>
|
||||
<div class="pg-item">
|
||||
<span class="pg-label">成品厚度</span>
|
||||
<span class="pg-value accent">{{ plan.outThick != null ? plan.outThick + ' mm' : '—' }}</span>
|
||||
</div>
|
||||
<div class="pg-item">
|
||||
<span class="pg-label">采料宽度</span>
|
||||
<span class="pg-value">{{ plan.inMatWidth != null ? plan.inMatWidth + ' mm' : '—' }}</span>
|
||||
</div>
|
||||
<div class="pg-item">
|
||||
<span class="pg-label">采料重量</span>
|
||||
<span class="pg-value">{{ plan.inMatWeight != null ? plan.inMatWeight + ' t' : '—' }}</span>
|
||||
</div>
|
||||
<div class="pg-item">
|
||||
<span class="pg-label">采料长度</span>
|
||||
<span class="pg-value">{{ plan.inMatLength != null ? plan.inMatLength + ' m' : '—' }}</span>
|
||||
</div>
|
||||
<div class="pg-item">
|
||||
<span class="pg-label">绑定方案</span>
|
||||
<span class="pg-value">{{ plan.recipeNo || '未绑定' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 写入整条计划数据 -->
|
||||
<el-button type="primary" size="small" style="width:100%;margin-top:10px"
|
||||
icon="el-icon-download" @click="fillFromPlan">
|
||||
写入计划数据(重量/宽度/长度/厚度)
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<div v-else-if="loading" class="pb-empty"><i class="el-icon-loading" /></div>
|
||||
<div v-else class="pb-empty">未找到关联的双机架计划</div>
|
||||
</div>
|
||||
|
||||
<!-- 道次列表 -->
|
||||
<div class="panel-block" style="margin-top:12px" v-if="plan && passList.length > 0">
|
||||
<div class="pb-header">
|
||||
<span class="pb-title">道次明细</span>
|
||||
<span class="pb-sub">共 {{ passList.length }} 道次 · 点击行快捷写入成品厚度</span>
|
||||
</div>
|
||||
|
||||
<el-table :data="passList" size="mini" border style="width:100%" max-height="300"
|
||||
highlight-current-row @row-click="fillFromPass">
|
||||
<el-table-column label="道次" prop="passNo" width="44" align="center" />
|
||||
<el-table-column label="入口厚(mm)" prop="inThick" width="78" align="right">
|
||||
<template slot-scope="{ row }">{{ row.inThick != null ? row.inThick : '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="出口厚(mm)" width="78" align="right">
|
||||
<template slot-scope="{ row }">
|
||||
<span class="pass-out-thick">{{ row.outThick != null ? row.outThick : '—' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="轧制力(kN)" prop="rollForce" min-width="72" align="right">
|
||||
<template slot-scope="{ row }">{{ row.rollForce != null ? row.rollForce : '—' }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="" width="46" fixed="right" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button type="text" size="mini" @click.stop="fillFromPass(row)">写入</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<div class="pass-hint">↑ 通常选最后一道次的出口厚度作为成品实测厚度</div>
|
||||
</div>
|
||||
|
||||
<!-- 无道次提示 -->
|
||||
<div class="panel-block" style="margin-top:12px"
|
||||
v-else-if="plan && plan.recipeId && passList.length === 0">
|
||||
<div class="pb-empty">该方案暂无道次数据</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getDrPlanByActionId } from '@/api/wms/drMill'
|
||||
|
||||
export default {
|
||||
name: 'DrMatchPanel',
|
||||
props: {
|
||||
actionId: { type: [String, Number], default: null }
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
plan: null,
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
passList() {
|
||||
return (this.plan && this.plan.passList) || []
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
actionId(val) {
|
||||
if (val) this.loadPlan(val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if (this.actionId) this.loadPlan(this.actionId)
|
||||
},
|
||||
methods: {
|
||||
loadPlan(actionId) {
|
||||
this.plan = null
|
||||
this.loading = true
|
||||
getDrPlanByActionId(actionId)
|
||||
.then(res => { this.plan = res.data || null })
|
||||
.catch(() => {})
|
||||
.finally(() => { this.loading = false })
|
||||
},
|
||||
|
||||
/** 写入计划整体数据:重量/宽度/长度/成品厚度 */
|
||||
fillFromPlan() {
|
||||
const p = this.plan
|
||||
this.$emit('fill', {
|
||||
outThick: p.outThick,
|
||||
inMatWidth: p.inMatWidth,
|
||||
inMatWeight: p.inMatWeight,
|
||||
inMatLength: p.inMatLength,
|
||||
})
|
||||
this.$message.success('已写入计划数据')
|
||||
},
|
||||
|
||||
/** 写入某道次的出口厚度作为成品厚度 */
|
||||
fillFromPass(pass) {
|
||||
this.$emit('fill', {
|
||||
outThick: pass.outThick,
|
||||
inMatWidth: this.plan && this.plan.inMatWidth,
|
||||
inMatWeight: this.plan && this.plan.inMatWeight,
|
||||
inMatLength: this.plan && this.plan.inMatLength,
|
||||
})
|
||||
this.$message.success(`已写入第 ${pass.passNo} 道次厚度`)
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dr-panel { font-size: 13px; }
|
||||
|
||||
.panel-block {
|
||||
background: #fff;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 4px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.pb-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
}
|
||||
.pb-title { font-weight: 600; color: #303133; font-size: 13px; }
|
||||
.pb-sub { font-size: 11px; color: #909399; margin-left: 8px; }
|
||||
|
||||
.plan-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 6px 12px;
|
||||
}
|
||||
.pg-item { display: flex; flex-direction: column; }
|
||||
.pg-label { font-size: 11px; color: #909399; }
|
||||
.pg-value { font-size: 13px; color: #303133; font-weight: 500; }
|
||||
.pg-value.accent { color: #409eff; }
|
||||
.plan-no { font-family: 'Courier New', monospace; font-size: 12px; color: #606266; }
|
||||
|
||||
.pb-empty {
|
||||
text-align: center;
|
||||
color: #c0c4cc;
|
||||
padding: 20px 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.pass-out-thick {
|
||||
font-family: 'Courier New', monospace;
|
||||
font-weight: 600;
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.pass-hint {
|
||||
font-size: 11px;
|
||||
color: #909399;
|
||||
margin-top: 6px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
@@ -7,7 +7,7 @@
|
||||
<span>钢卷信息更新</span>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
|
||||
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
@@ -26,9 +26,10 @@
|
||||
|
||||
<!-- 主内容区 - 左右布局 -->
|
||||
<div class="content-wrapper">
|
||||
<!-- 左侧:L2 匹配面板 -->
|
||||
<!-- 左侧:快捷写入面板(DR操作用双机架计划面板,其他用L2匹配) -->
|
||||
<div>
|
||||
<l2-match-panel :hot-coil-id="l2HotCoilId" @fill="applyL2Fill" />
|
||||
<dr-match-panel v-if="isDrAction" :action-id="actionId" @fill="applyDrFill" />
|
||||
<l2-match-panel v-else :hot-coil-id="l2HotCoilId" @fill="applyL2Fill" />
|
||||
</div>
|
||||
<!-- 右侧:更新表单 -->
|
||||
<div>
|
||||
@@ -326,7 +327,8 @@ import AbnormalForm from './components/AbnormalForm';
|
||||
import { generateCoilNoPrefix } from "@/utils/coil/coilNo";
|
||||
import { addCoilContractRel } from "@/api/wms/coilContractRel";
|
||||
import ContractSelect from "@/components/KLPService/ContractSelect";
|
||||
import L2MatchPanel from './panels/L2MatchPanel.vue';
|
||||
import L2MatchPanel from './panels/L2MatchPanel.vue'
|
||||
import DrMatchPanel from './panels/DrMatchPanel.vue';
|
||||
|
||||
|
||||
export default {
|
||||
@@ -340,6 +342,7 @@ export default {
|
||||
AbnormalForm,
|
||||
ContractSelect,
|
||||
L2MatchPanel,
|
||||
DrMatchPanel,
|
||||
},
|
||||
dicts: ['coil_quality_status', 'coil_abnormal_position', 'coil_abnormal_code', 'coil_abnormal_degree', 'coil_business_purpose'],
|
||||
data() {
|
||||
@@ -429,6 +432,7 @@ export default {
|
||||
],
|
||||
},
|
||||
actionId: null,
|
||||
actionType: null, // 待操作类型,504/524 = 双机架
|
||||
acidPrefill: {
|
||||
visible: false,
|
||||
type: 'info',
|
||||
@@ -462,6 +466,10 @@ export default {
|
||||
l2HotCoilId() {
|
||||
return (this.currentInfo && this.currentInfo.enterCoilNo) || ''
|
||||
},
|
||||
/** 是否双机架工序(actionType 504=正常 / 524=修复) */
|
||||
isDrAction() {
|
||||
return this.actionType === 504 || this.actionType === 524
|
||||
},
|
||||
// 动态显示标签
|
||||
getItemLabel() {
|
||||
if (this.updateForm.materialType === '成品') {
|
||||
@@ -490,6 +498,11 @@ export default {
|
||||
// 填写生产开始时间
|
||||
this.$set(this.updateForm, 'productionStartTime', pendingActionRes.data.createTime)
|
||||
|
||||
// 记录操作类型(用于判断是否双机架工序)
|
||||
if (pendingActionRes.data && pendingActionRes.data.actionType != null) {
|
||||
this.actionType = pendingActionRes.data.actionType
|
||||
}
|
||||
|
||||
if (coilId) {
|
||||
await this.loadCoilInfo(coilId);
|
||||
}
|
||||
@@ -523,6 +536,20 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 双机架计划/道次快捷写入 */
|
||||
applyDrFill(data) {
|
||||
if (data.outThick != null) this.$set(this.updateForm, 'actualThickness', parseFloat(data.outThick))
|
||||
if (data.inMatWidth != null) this.$set(this.updateForm, 'actualWidth', parseFloat(data.inMatWidth))
|
||||
if (data.inMatWeight != null) {
|
||||
this.$set(this.updateForm, 'netWeight', parseFloat(data.inMatWeight))
|
||||
this.$set(this.updateForm, 'grossWeight', parseFloat(data.inMatWeight))
|
||||
}
|
||||
if (data.inMatLength != null) {
|
||||
this.$set(this.updateForm, 'actualLength', parseFloat(data.inMatLength))
|
||||
this.$set(this.updateForm, 'length', parseFloat(data.inMatLength))
|
||||
}
|
||||
},
|
||||
|
||||
applyL2Fill(data) {
|
||||
if (data.entry_weight != null) {
|
||||
const w = parseFloat(data.entry_weight)
|
||||
|
||||
Reference in New Issue
Block a user