Merge remote-tracking branch 'origin/0.8.X' into 0.8.X

This commit is contained in:
2026-06-10 17:45:05 +08:00
6 changed files with 110 additions and 182 deletions

View File

@@ -77,6 +77,7 @@ export default {
{ label: '理论', key: 'theoreticalThickness' } { label: '理论', key: 'theoreticalThickness' }
] ]
}, },
{ label: '排产厚度[mm]', key: 'scheduleThickness' },
{ label: '实测宽度[mm]', key: 'actualWidth' }, { label: '实测宽度[mm]', key: 'actualWidth' },
{ label: '毛重[t]', key: 'grossWeight' }, { label: '毛重[t]', key: 'grossWeight' },
{ label: '净重[t]', key: 'netWeight' }, { label: '净重[t]', key: 'netWeight' },

View File

@@ -190,10 +190,10 @@
</div> </div>
<div class="form-row"> <div class="form-row">
<el-form-item label="度(m)" prop="length" class="form-item-half"> <el-form-item label="实测宽度(mm)" prop="actualWidth" class="form-item-half">
<el-input-number :controls="false" v-model="targetCoil.length" placeholder="请输入长度" type="number" <el-input-number :controls="false" v-model="targetCoil.actualWidth" placeholder="请输入实测宽度"
:step="0.01" :disabled="readonly"> type="number" :step="0.01" :disabled="readonly">
<template slot="append"></template> <template slot="append">mm</template>
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="实测长度(m)" prop="actualLength" class="form-item-half"> <el-form-item label="实测长度(m)" prop="actualLength" class="form-item-half">
@@ -211,9 +211,9 @@
</div> </div>
<div class="form-row"> <div class="form-row">
<el-form-item label="实测宽度(mm)" prop="actualWidth" class="form-item-half"> <el-form-item label="排产厚度(mm)" prop="scheduleThickness">
<el-input-number :controls="false" v-model="targetCoil.actualWidth" placeholder="请输入实测宽度" <el-input-number :controls="false" v-model="targetCoil.scheduleThickness" placeholder="请输入排产厚度"
type="number" :step="0.01" :disabled="readonly"> type="number" :step="0.001">
<template slot="append">mm</template> <template slot="append">mm</template>
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
@@ -272,13 +272,14 @@
<div style="display: flex; align-items: center; gap: 8px;"> <div style="display: flex; align-items: center; gap: 8px;">
<div class="abnormal-container"> <div class="abnormal-container">
<div v-for="(abnormal, index) in abnormals" :key="index" <div v-for="(abnormal, index) in abnormals" :key="index"
:class="['abnormal-item', { inherited: abnormal._inherited }]" :class="['abnormal-item', { inherited: abnormal._inherited }]" @click="editAbnormal(index)">
@click="editAbnormal(index)">
<div class="abnormal-content"> <div class="abnormal-content">
<div class="abnormal-info"> <div class="abnormal-info">
<div class="abnormal-position">{{ getAbnormalPositionText(abnormal.position) }}</div> <div class="abnormal-position">{{ getAbnormalPositionText(abnormal.position) }}</div>
<div class="abnormal-code">{{ getAbnormalCodeText(abnormal.defectCode) }}</div> <div class="abnormal-code">{{ getAbnormalCodeText(abnormal.defectCode) }}</div>
<div v-if="abnormal._inherited" class="abnormal-inherit-tip">继承 · {{ abnormal.processSource }}</div> <div v-if="abnormal._inherited" class="abnormal-inherit-tip">继承 · {{ abnormal.processSource
}}
</div>
</div> </div>
<el-button type="danger" size="mini" icon="el-icon-close" class="abnormal-delete" <el-button type="danger" size="mini" icon="el-icon-close" class="abnormal-delete"
@click.stop="deleteAbnormal(index)"></el-button> @click.stop="deleteAbnormal(index)"></el-button>
@@ -324,13 +325,11 @@
<el-table :data="parent.abnormalList" border stripe size="small" style="width: 100%"> <el-table :data="parent.abnormalList" border stripe size="small" style="width: 100%">
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<el-checkbox :indeterminate="parent.isIndeterminate" <el-checkbox :indeterminate="parent.isIndeterminate" :value="parent.checkedAll"
:value="parent.checkedAll"
@change="val => handleParentSelectAll(parent, val)" /> @change="val => handleParentSelectAll(parent, val)" />
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row._selected" <el-checkbox v-model="scope.row._selected" @change="() => recalcParentCheckState(parent)" />
@change="() => recalcParentCheckState(parent)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="缺陷描述" prop="remark" show-overflow-tooltip /> <el-table-column label="缺陷描述" prop="remark" show-overflow-tooltip />

View File

@@ -7,25 +7,14 @@
<div class="coil-info-card"> <div class="coil-info-card">
<el-row :gutter="20" flex justify="end"> <el-row :gutter="20" flex justify="end">
<!-- 新增分条按钮 --> <!-- 新增分条按钮 -->
<el-button <el-button v-if="actionStatus != 2" type="primary" icon="el-icon-plus" :loading="buttonLoading"
v-if="actionStatus != 2" @click="addSplitForm">
type="primary"
icon="el-icon-plus"
:loading="buttonLoading"
@click="addSplitForm"
>
新增分条 新增分条
</el-button> </el-button>
<!-- 完成分条按钮 --> <!-- 完成分条按钮 -->
<el-button <el-button v-if="actionStatus != 2" type="success" icon="el-icon-check" :disabled="splitList.length === 0"
v-if="actionStatus != 2" :loading="buttonLoading" @click="completeSplit">
type="success"
icon="el-icon-check"
:disabled="splitList.length === 0"
:loading="buttonLoading"
@click="completeSplit"
>
完成整体分条 完成整体分条
</el-button> </el-button>
@@ -36,12 +25,8 @@
<el-descriptions :column="2" border title="待分条钢卷信息"> <el-descriptions :column="2" border title="待分条钢卷信息">
<template slot="extra"> <template slot="extra">
<el-button <el-button v-if="showSplitForm" type="info" icon="el-icon-document-copy"
v-if="showSplitForm" @click="copyFromSourceCoil">复制源卷信息</el-button>
type="info"
icon="el-icon-document-copy"
@click="copyFromSourceCoil"
>复制源卷信息</el-button>
</template> </template>
<el-descriptions-item label="入场钢卷号">{{ coilInfo.enterCoilNo || '-' }}</el-descriptions-item> <el-descriptions-item label="入场钢卷号">{{ coilInfo.enterCoilNo || '-' }}</el-descriptions-item>
<el-descriptions-item label="当前钢卷号">{{ coilInfo.currentCoilNo || '-' }}</el-descriptions-item> <el-descriptions-item label="当前钢卷号">{{ coilInfo.currentCoilNo || '-' }}</el-descriptions-item>
@@ -63,14 +48,8 @@
<!-- 已分条钢卷列表 --> <!-- 已分条钢卷列表 -->
<el-descriptions :column="1" border title="已分出的钢卷列表" /> <el-descriptions :column="1" border title="已分出的钢卷列表" />
<el-table <el-table v-loading="splitListLoading" :data="splitList" highlight-current-row border stripe
v-loading="splitListLoading" @row-click="handleSplitItemClick">
:data="splitList"
highlight-current-row
border
stripe
@row-click="handleSplitItemClick"
>
<el-table-column prop="enterCoilNo" label="入场钢卷号" /> <el-table-column prop="enterCoilNo" label="入场钢卷号" />
<el-table-column prop="currentCoilNo" label="当前钢卷号" /> <el-table-column prop="currentCoilNo" label="当前钢卷号" />
@@ -122,7 +101,8 @@
<el-col :span="12"> <el-col :span="12">
<div v-if="showSplitForm" class="split-form-card"> <div v-if="showSplitForm" class="split-form-card">
<el-card title="分条钢卷信息录入" shadow="hover"> <el-card title="分条钢卷信息录入" shadow="hover">
<el-alert v-if="!isExemptFromValidation" type="warning" :closable="false" show-icon style="margin-bottom:12px"> <el-alert v-if="!isExemptFromValidation" type="warning" :closable="false" show-icon
style="margin-bottom:12px">
<template slot="title"> <template slot="title">
子卷的<b>净重</b><b>实测厚度</b>均不能超过父卷完成分条时所有子卷净重总和不能超过父卷净重 子卷的<b>净重</b><b>实测厚度</b>均不能超过父卷完成分条时所有子卷净重总和不能超过父卷净重
</template> </template>
@@ -139,12 +119,8 @@
<current-coil-no :current-coil-no="splitForm.currentCoilNo" /> <current-coil-no :current-coil-no="splitForm.currentCoilNo" />
</el-form-item> </el-form-item>
<el-form-item label="所在库位" prop="warehouseId"> <el-form-item label="所在库位" prop="warehouseId">
<warehouse-select <warehouse-select v-model="splitForm.warehouseId" placeholder="请选择仓库/库区/库位" style="width: 100%;"
v-model="splitForm.warehouseId" clearable />
placeholder="请选择仓库/库区/库位"
style="width: 100%;"
clearable
/>
</el-form-item> </el-form-item>
<el-form-item label="班组" prop="team"> <el-form-item label="班组" prop="team">
<el-select v-model="splitForm.team" placeholder="请选择班组" style="width: 100%"> <el-select v-model="splitForm.team" placeholder="请选择班组" style="width: 100%">
@@ -159,30 +135,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item :label="getItemLabel" prop="itemId"> <el-form-item :label="getItemLabel" prop="itemId">
<product-select <product-select v-if="splitForm.itemType === 'product'" v-model="splitForm.itemId" placeholder="请选择成品"
v-if="splitForm.itemType === 'product'" style="width: 100%;" clearable />
v-model="splitForm.itemId" <raw-material-select v-else-if="splitForm.itemType === 'raw_material'" v-model="splitForm.itemId"
placeholder="请选择成品" placeholder="请选择原料" style="width: 100%;" clearable />
style="width: 100%;"
clearable
/>
<raw-material-select
v-else-if="splitForm.itemType === 'raw_material'"
v-model="splitForm.itemId"
placeholder="请选择原料"
style="width: 100%;"
clearable
/>
<div v-else>请先选择材料类型</div> <div v-else>请先选择材料类型</div>
</el-form-item> </el-form-item>
<el-form-item label="质量状态" prop="qualityStatus"> <el-form-item label="质量状态" prop="qualityStatus">
<el-select v-model="splitForm.qualityStatus" placeholder="请选择质量状态" style="width: 100%"> <el-select v-model="splitForm.qualityStatus" placeholder="请选择质量状态" style="width: 100%">
<el-option <el-option v-for="item in dict.type.coil_quality_status" :key="item.value" :label="item.label"
v-for="item in dict.type.coil_quality_status" :value="item.value" />
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="切边要求" prop="trimmingRequirement"> <el-form-item label="切边要求" prop="trimmingRequirement">
@@ -208,44 +170,26 @@
<el-form-item label="净重" prop="netWeight"> <el-form-item label="净重" prop="netWeight">
<el-input v-model="splitForm.netWeight" placeholder="请输入净重" type="number" /> <el-input v-model="splitForm.netWeight" placeholder="请输入净重" type="number" />
</el-form-item> </el-form-item>
<el-form-item label="长度" prop="length"> <el-form-item label="排产厚度(mm)" prop="scheduleThickness">
<el-input v-model="splitForm.length" placeholder="请输入长度" type="number" /> <el-input-number v-model="splitForm.scheduleThickness" :controls="false" placeholder="请输入排产厚度"
type="number" :step="0.01" />
</el-form-item> </el-form-item>
<el-form-item label="实测长度(m)" prop="actualLength"> <el-form-item label="实测长度(m)" prop="actualLength">
<el-input-number <el-input-number v-model="splitForm.actualLength" :controls="false" placeholder="请输入实测长度" type="number"
v-model="splitForm.actualLength" :step="0.01" />
:controls="false"
placeholder="请输入实测长度"
type="number"
:step="0.01"
/>
</el-form-item> </el-form-item>
<el-form-item label="实测厚度(mm)" prop="actualThickness"> <el-form-item label="实测厚度(mm)" prop="actualThickness">
<el-input-number <el-input-number v-model="splitForm.actualThickness" :controls="false" placeholder="请输入实测厚度"
v-model="splitForm.actualThickness" type="number" :step="0.01" />
:controls="false"
placeholder="请输入实测厚度"
type="number"
:step="0.01"
/>
</el-form-item> </el-form-item>
<el-form-item label="实测宽度(mm)" prop="actualWidth"> <el-form-item label="实测宽度(mm)" prop="actualWidth">
<el-input-number <el-input-number v-model="splitForm.actualWidth" :controls="false" placeholder="请输入实测宽度" type="number"
v-model="splitForm.actualWidth" :step="0.01" />
:controls="false"
placeholder="请输入实测宽度"
type="number"
:step="0.01"
/>
</el-form-item> </el-form-item>
<el-form-item label="业务目的" prop="businessPurpose"> <el-form-item label="业务目的" prop="businessPurpose">
<el-select v-model="splitForm.businessPurpose" placeholder="业务目的" filterable> <el-select v-model="splitForm.businessPurpose" placeholder="业务目的" filterable>
<el-option <el-option v-for="item in dict.type.coil_business_purpose" :key="item.value" :value="item.value"
v-for="item in dict.type.coil_business_purpose" :label="item.label" />
:key="item.value"
:value="item.value"
:label="item.label"
/>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="调制度" prop="temperGrade"> <el-form-item label="调制度" prop="temperGrade">
@@ -255,21 +199,15 @@
<MemoInput v-model="splitForm.coatingType" storage-key="coatingType" placeholder="请输入镀层种类" /> <MemoInput v-model="splitForm.coatingType" storage-key="coatingType" placeholder="请输入镀层种类" />
</el-form-item> </el-form-item>
<el-form-item label="钢卷表面处理" prop="coilSurfaceTreatment"> <el-form-item label="钢卷表面处理" prop="coilSurfaceTreatment">
<MemoInput <MemoInput v-model="splitForm.coilSurfaceTreatment" storage-key="surfaceTreatmentDesc"
v-model="splitForm.coilSurfaceTreatment" placeholder="请输入钢卷表面处理" />
storage-key="surfaceTreatmentDesc"
placeholder="请输入钢卷表面处理"
/>
</el-form-item> </el-form-item>
<el-form-item label="生产开始时间" prop="productionStartTime"> <el-form-item label="生产开始时间" prop="productionStartTime">
<TimeInput v-model="splitForm.productionStartTime" @input="calculateProductionDuration" /> <TimeInput v-model="splitForm.productionStartTime" @input="calculateProductionDuration" />
</el-form-item> </el-form-item>
<el-form-item label="生产结束时间" prop="productionEndTime"> <el-form-item label="生产结束时间" prop="productionEndTime">
<TimeInput <TimeInput v-model="splitForm.productionEndTime" :show-now-button="true"
v-model="splitForm.productionEndTime" @input="calculateProductionDuration" />
:show-now-button="true"
@input="calculateProductionDuration"
/>
</el-form-item> </el-form-item>
<el-form-item label="生产耗时" prop="productionDuration"> <el-form-item label="生产耗时" prop="productionDuration">
<el-input v-model="splitForm.formattedDuration" placeholder="自动计算" disabled /> <el-input v-model="splitForm.formattedDuration" placeholder="自动计算" disabled />
@@ -285,25 +223,17 @@
<el-form-item label="异常信息"> <el-form-item label="异常信息">
<div style="display: flex; align-items: center; gap: 8px;"> <div style="display: flex; align-items: center; gap: 8px;">
<div class="abnormal-container"> <div class="abnormal-container">
<div <div v-for="(abnormal, index) in abnormals" :key="index"
v-for="(abnormal, index) in abnormals" :class="['abnormal-item', { inherited: abnormal._inherited }]" @click="editAbnormal(index)">
:key="index"
:class="['abnormal-item', { inherited: abnormal._inherited }]"
@click="editAbnormal(index)"
>
<div class="abnormal-content"> <div class="abnormal-content">
<div class="abnormal-info"> <div class="abnormal-info">
<div class="abnormal-position">{{ getAbnormalPositionText(abnormal.position) }}</div> <div class="abnormal-position">{{ getAbnormalPositionText(abnormal.position) }}</div>
<div class="abnormal-code">{{ getAbnormalCodeText(abnormal.defectCode) }}</div> <div class="abnormal-code">{{ getAbnormalCodeText(abnormal.defectCode) }}</div>
<div v-if="abnormal._inherited" class="abnormal-inherit-tip">继承 · {{ abnormal.processSource }}</div> <div v-if="abnormal._inherited" class="abnormal-inherit-tip">继承 · {{ abnormal.processSource }}
</div>
</div> </div>
<el-button <el-button type="danger" size="mini" icon="el-icon-close" class="abnormal-delete"
type="danger" @click.stop="deleteAbnormal(index)" />
size="mini"
icon="el-icon-close"
class="abnormal-delete"
@click.stop="deleteAbnormal(index)"
/>
</div> </div>
</div> </div>
<div class="abnormal-add" @click="addAbnormal"> <div class="abnormal-add" @click="addAbnormal">
@@ -341,12 +271,8 @@
</el-row> </el-row>
<!-- 异常表单弹窗 --> <!-- 异常表单弹窗 -->
<el-dialog <el-dialog :title="currentAbnormalIndex === -1 ? '新增异常' : '编辑异常'" :visible.sync="abnormalDialogVisible"
:title="currentAbnormalIndex === -1 ? '新增异常' : '编辑异常'" width="600px" append-to-body>
:visible.sync="abnormalDialogVisible"
width="600px"
append-to-body
>
<abnormal-form ref="abnormalForm" v-model="abnormalForm" :show-coil-selector="false" /> <abnormal-form ref="abnormalForm" v-model="abnormalForm" :show-coil-selector="false" />
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="abnormalDialogVisible = false"> </el-button> <el-button @click="abnormalDialogVisible = false"> </el-button>
@@ -378,15 +304,10 @@
<el-descriptions-item label="备注">{{ parsedCacheData && parsedCacheData.splitForm && <el-descriptions-item label="备注">{{ parsedCacheData && parsedCacheData.splitForm &&
parsedCacheData.splitForm.remark || '-' }}</el-descriptions-item> parsedCacheData.splitForm.remark || '-' }}</el-descriptions-item>
</el-descriptions> </el-descriptions>
<el-divider <el-divider v-if="parsedCacheData && parsedCacheData.abnormals && parsedCacheData.abnormals.length > 0"
v-if="parsedCacheData && parsedCacheData.abnormals && parsedCacheData.abnormals.length > 0" content-position="left">暂存的异常信息 ({{ parsedCacheData.abnormals.length }})</el-divider>
content-position="left" <div v-if="parsedCacheData && parsedCacheData.abnormals && parsedCacheData.abnormals.length > 0"
>暂存的异常信息 ({{ parsedCacheData.abnormals.length }})</el-divider> class="abnormal-container" style="margin-bottom: 20px;">
<div
v-if="parsedCacheData && parsedCacheData.abnormals && parsedCacheData.abnormals.length > 0"
class="abnormal-container"
style="margin-bottom: 20px;"
>
<div v-for="(abnormal, index) in parsedCacheData.abnormals" :key="index" class="abnormal-item"> <div v-for="(abnormal, index) in parsedCacheData.abnormals" :key="index" class="abnormal-item">
<div class="abnormal-content"> <div class="abnormal-content">
<div class="abnormal-info"> <div class="abnormal-info">
@@ -409,7 +330,8 @@
:close-on-click-modal="false"> :close-on-click-modal="false">
<div v-loading="inheritLoading"> <div v-loading="inheritLoading">
<template v-if="parentCoils.length > 0"> <template v-if="parentCoils.length > 0">
<el-alert title="以下为当前钢卷的异常记录,请选择要继承的异常" type="info" :closable="false" show-icon style="margin-bottom: 16px;" /> <el-alert title="以下为当前钢卷的异常记录,请选择要继承的异常" type="info" :closable="false" show-icon
style="margin-bottom: 16px;" />
<div v-for="(parent, pIdx) in parentCoils" :key="parent.coilId" class="parent-coil-section"> <div v-for="(parent, pIdx) in parentCoils" :key="parent.coilId" class="parent-coil-section">
<div class="parent-header"> <div class="parent-header">
<span class="parent-title">当前钢卷 #{{ pIdx + 1 }}{{ parent.currentCoilNo || parent.coilId }}</span> <span class="parent-title">当前钢卷 #{{ pIdx + 1 }}{{ parent.currentCoilNo || parent.coilId }}</span>
@@ -417,13 +339,11 @@
<el-table :data="parent.abnormalList" border stripe size="small" style="width: 100%"> <el-table :data="parent.abnormalList" border stripe size="small" style="width: 100%">
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<el-checkbox :indeterminate="parent.isIndeterminate" <el-checkbox :indeterminate="parent.isIndeterminate" :value="parent.checkedAll"
:value="parent.checkedAll"
@change="val => handleParentSelectAll(parent, val)" /> @change="val => handleParentSelectAll(parent, val)" />
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row._selected" <el-checkbox v-model="scope.row._selected" @change="() => recalcParentCheckState(parent)" />
@change="() => recalcParentCheckState(parent)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="缺陷描述" prop="remark" show-overflow-tooltip /> <el-table-column label="缺陷描述" prop="remark" show-overflow-tooltip />
@@ -742,7 +662,7 @@ export default {
}, },
async handleDeleteSplit(row) { async handleDeleteSplit(row) {
this.$modal.confirm('确认删除该分卷吗?').then(async() => { this.$modal.confirm('确认删除该分卷吗?').then(async () => {
try { try {
await delMaterialCoil(row.coilId) await delMaterialCoil(row.coilId)
this.$message.success('删除成功') this.$message.success('删除成功')
@@ -999,7 +919,7 @@ export default {
confirmButtonText: '确认', confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(async() => { }).then(async () => {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text: '正在记录分条操作...', text: '正在记录分条操作...',
@@ -1233,7 +1153,7 @@ export default {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(async() => { }).then(async () => {
try { try {
await delCoilCache(this.currentCache.cacheId) await delCoilCache(this.currentCache.cacheId)
this.$message.success('删除缓存成功') this.$message.success('删除缓存成功')

View File

@@ -191,18 +191,18 @@
</div> </div>
<div class="form-row"> <div class="form-row">
<el-form-item label="长度(m)" class="form-item-half">
<el-input-number :controls="false" v-model="item.length" placeholder="请输入长度" :step="0.01"
:disabled="readonly">
<template slot="append"></template>
</el-input-number>
</el-form-item>
<el-form-item label="实测长度(m)" prop="actualLength" class="form-item-half"> <el-form-item label="实测长度(m)" prop="actualLength" class="form-item-half">
<el-input-number :controls="false" v-model="item.actualLength" placeholder="实测长度" :step="0.01" <el-input-number :controls="false" v-model="item.actualLength" placeholder="实测长度" :step="0.01"
:disabled="readonly"> :disabled="readonly">
<template slot="append">m</template> <template slot="append">m</template>
</el-input-number> </el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="排产厚度(mm)" prop="scheduleThickness">
<el-input-number :controls="false" v-model="item.scheduleThickness" placeholder="请输入排产厚度"
type="number" :step="0.001">
<template slot="append">mm</template>
</el-input-number>
</el-form-item>
</div> </div>
<div class="form-row"> <div class="form-row">
@@ -281,7 +281,8 @@
<div class="abnormal-info"> <div class="abnormal-info">
<div class="abnormal-position">{{ getAbnormalPositionText(abnormal.position) }}</div> <div class="abnormal-position">{{ getAbnormalPositionText(abnormal.position) }}</div>
<div class="abnormal-code">{{ getAbnormalCodeText(abnormal.defectCode) }}</div> <div class="abnormal-code">{{ getAbnormalCodeText(abnormal.defectCode) }}</div>
<div v-if="abnormal._inherited" class="abnormal-inherit-tip">继承 · {{ abnormal.processSource }}</div> <div v-if="abnormal._inherited" class="abnormal-inherit-tip">继承 · {{ abnormal.processSource
}}</div>
</div> </div>
<el-button type="danger" size="mini" icon="el-icon-close" class="abnormal-delete" <el-button type="danger" size="mini" icon="el-icon-close" class="abnormal-delete"
@click.stop="deleteAbnormal(index, abnormalIndex)"></el-button> @click.stop="deleteAbnormal(index, abnormalIndex)"></el-button>
@@ -327,13 +328,11 @@
<el-table :data="parent.abnormalList" border stripe size="small" style="width: 100%"> <el-table :data="parent.abnormalList" border stripe size="small" style="width: 100%">
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<el-checkbox :indeterminate="parent.isIndeterminate" <el-checkbox :indeterminate="parent.isIndeterminate" :value="parent.checkedAll"
:value="parent.checkedAll"
@change="val => handleParentSelectAll(parent, val)" /> @change="val => handleParentSelectAll(parent, val)" />
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row._selected" <el-checkbox v-model="scope.row._selected" @change="() => recalcParentCheckState(parent)" />
@change="() => recalcParentCheckState(parent)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="缺陷描述" prop="remark" show-overflow-tooltip /> <el-table-column label="缺陷描述" prop="remark" show-overflow-tooltip />

View File

@@ -29,20 +29,21 @@
</div> </div>
<!-- 右侧更新表单 --> <!-- 右侧更新表单 -->
<div> <div>
<el-card class="form-card"> <el-card class="form-card">
<div slot="header" class="card-header"> <div slot="header" class="card-header">
<span><i class="el-icon-edit-outline"></i> {{ '更新信息' }}</span> <span><i class="el-icon-edit-outline"></i> {{ '更新信息' }}</span>
<div> <div>
<el-button size="small" @click="saveTemp" :loading="loading">暂存内容</el-button> <el-button size="small" @click="saveTemp" :loading="loading">暂存内容</el-button>
<el-button type="primary" size="small" @click="handleSave" :loading="loading">保存更新</el-button> <el-button type="primary" size="small" @click="handleSave" :loading="loading">保存更新</el-button>
</div>
</div> </div>
</div>
<el-alert v-if="!isExemptFromValidation" type="warning" :closable="false" show-icon style="margin-bottom:12px"> <el-alert v-if="!isExemptFromValidation" type="warning" :closable="false" show-icon
<template slot="title"> style="margin-bottom:12px">
更新后的<b>净重</b><b>实测厚度</b>均不能超过源卷的对应值 <template slot="title">
</template> 更新后的<b>净重</b><b>实测厚度</b>均不能超过源卷的对应值
</el-alert> </template>
</el-alert>
<div v-if="matchedSpec" style="margin-bottom:10px"> <div v-if="matchedSpec" style="margin-bottom:10px">
<el-tag type="success" size="small"> <el-tag type="success" size="small">
@@ -226,6 +227,13 @@
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="排产厚度(mm)" prop="scheduleThickness">
<el-input-number :controls="false" v-model="updateForm.scheduleThickness" placeholder="请输入排产厚度"
type="number" :step="0.001">
<template slot="append">mm</template>
</el-input-number>
</el-form-item>
<el-form-item label="生产开始时间" prop="productionStartTime"> <el-form-item label="生产开始时间" prop="productionStartTime">
<TimeInput v-model="updateForm.productionStartTime" @input="calculateProductionDuration" /> <TimeInput v-model="updateForm.productionStartTime" @input="calculateProductionDuration" />
</el-form-item> </el-form-item>
@@ -252,13 +260,13 @@
<div style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px;"> <div style="display: flex; align-items: center; gap: 8px; margin-bottom: 8px;">
<div class="abnormal-container" style="margin-top: 0;"> <div class="abnormal-container" style="margin-top: 0;">
<div v-for="(abnormal, index) in abnormals" :key="index" <div v-for="(abnormal, index) in abnormals" :key="index"
:class="['abnormal-item', { inherited: abnormal._inherited }]" :class="['abnormal-item', { inherited: abnormal._inherited }]" @click="editAbnormal(index)">
@click="editAbnormal(index)">
<div class="abnormal-content"> <div class="abnormal-content">
<div class="abnormal-info"> <div class="abnormal-info">
<div class="abnormal-position">{{ getAbnormalPositionText(abnormal.position) }}</div> <div class="abnormal-position">{{ getAbnormalPositionText(abnormal.position) }}</div>
<div class="abnormal-code">{{ getAbnormalCodeText(abnormal.defectCode) }}</div> <div class="abnormal-code">{{ getAbnormalCodeText(abnormal.defectCode) }}</div>
<div v-if="abnormal._inherited" class="abnormal-inherit-tip">继承 · {{ abnormal.processSource }}</div> <div v-if="abnormal._inherited" class="abnormal-inherit-tip">继承 · {{ abnormal.processSource }}
</div>
</div> </div>
<el-button type="danger" size="mini" icon="el-icon-close" class="abnormal-delete" <el-button type="danger" size="mini" icon="el-icon-close" class="abnormal-delete"
@click.stop="deleteAbnormal(index)"></el-button> @click.stop="deleteAbnormal(index)"></el-button>
@@ -268,8 +276,8 @@
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</div> </div>
</div> </div>
<el-button type="text" size="mini" icon="el-icon-download" <el-button type="text" size="mini" icon="el-icon-download" style="color: #409eff; white-space: nowrap;"
style="color: #409eff; white-space: nowrap;" @click="handleInheritAbnormal"> @click="handleInheritAbnormal">
继承异常 继承异常
</el-button> </el-button>
</div> </div>
@@ -334,7 +342,8 @@
:close-on-click-modal="false"> :close-on-click-modal="false">
<div v-loading="inheritLoading"> <div v-loading="inheritLoading">
<template v-if="parentCoils.length > 0"> <template v-if="parentCoils.length > 0">
<el-alert title="以下为当前钢卷的异常记录,请选择要继承的异常" type="info" :closable="false" show-icon style="margin-bottom: 16px;" /> <el-alert title="以下为当前钢卷的异常记录,请选择要继承的异常" type="info" :closable="false" show-icon
style="margin-bottom: 16px;" />
<div v-for="(parent, pIdx) in parentCoils" :key="parent.coilId" class="parent-coil-section"> <div v-for="(parent, pIdx) in parentCoils" :key="parent.coilId" class="parent-coil-section">
<div class="parent-header"> <div class="parent-header">
<span class="parent-title">当前钢卷 #{{ pIdx + 1 }}{{ parent.currentCoilNo || parent.coilId }}</span> <span class="parent-title">当前钢卷 #{{ pIdx + 1 }}{{ parent.currentCoilNo || parent.coilId }}</span>
@@ -342,13 +351,11 @@
<el-table :data="parent.abnormalList" border stripe size="small" style="width: 100%"> <el-table :data="parent.abnormalList" border stripe size="small" style="width: 100%">
<el-table-column width="50"> <el-table-column width="50">
<template slot="header"> <template slot="header">
<el-checkbox :indeterminate="parent.isIndeterminate" <el-checkbox :indeterminate="parent.isIndeterminate" :value="parent.checkedAll"
:value="parent.checkedAll"
@change="val => handleParentSelectAll(parent, val)" /> @change="val => handleParentSelectAll(parent, val)" />
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-checkbox v-model="scope.row._selected" <el-checkbox v-model="scope.row._selected" @change="() => recalcParentCheckState(parent)" />
@change="() => recalcParentCheckState(parent)" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="缺陷描述" prop="remark" show-overflow-tooltip /> <el-table-column label="缺陷描述" prop="remark" show-overflow-tooltip />
@@ -475,6 +482,7 @@ export default {
formattedDuration: '', formattedDuration: '',
specId: null, specId: null,
versionId: null, versionId: null,
scheduleThickness: undefined,
}, },
matchedSpec: null, matchedSpec: null,
rules: { rules: {
@@ -677,14 +685,14 @@ export default {
if (data.exit_width != null) this.$set(this.updateForm, 'actualWidth', parseFloat(data.exit_width)) if (data.exit_width != null) this.$set(this.updateForm, 'actualWidth', parseFloat(data.exit_width))
console.log(data) console.log(data)
if (data.start_date) { if (data.start_date) {
this.$set(this.updateForm, 'productionStartTime', this.formatDateTime(data.start_date)) this.$set(this.updateForm, 'productionStartTime', this.formatDateTime(data.start_date))
} }
if (data.end_date) { if (data.end_date) {
this.$set(this.updateForm, 'productionEndTime', this.formatDateTime(data.end_date)) this.$set(this.updateForm, 'productionEndTime', this.formatDateTime(data.end_date))
} }
if (data.start_date || data.end_date) this.calculateProductionDuration() if (data.start_date || data.end_date) this.calculateProductionDuration()
const query = { const query = {

View File

@@ -161,6 +161,7 @@ export default {
{ label: '厚度', value: 'computedThickness' }, { label: '厚度', value: 'computedThickness' },
{ label: '实测厚度', value: 'actualThickness' }, { label: '实测厚度', value: 'actualThickness' },
{ label: '理论厚度', value: 'theoreticalThickness' }, { label: '理论厚度', value: 'theoreticalThickness' },
{ label: '排产厚度', value: 'scheduleThickness' },
{ label: '厚度差值', value: 'thicknessDiff' }, { label: '厚度差值', value: 'thicknessDiff' },
{ label: '宽度', value: 'computedWidth' }, { label: '宽度', value: 'computedWidth' },