feat(钢卷管理): 添加钢卷还原功能并优化界面

- 在coil.js中新增restoreMaterialCoil接口用于还原钢卷
- 在correct.vue中添加还原按钮及相关处理逻辑
- 优化CoilTraceResult.vue界面,移除部分不必要的信息展示
- 调整部分文字描述使其更简洁
This commit is contained in:
砂糖
2026-01-20 11:29:22 +08:00
parent ebb631e3cc
commit c5bff55a35
3 changed files with 44 additions and 10 deletions

View File

@@ -156,7 +156,7 @@
</div>
</div>
<div class="card-body">
<div class="card-body" style="position: relative;">
<div class="info-list">
<div class="info-item">
<span class="info-label">入场</span>
@@ -180,6 +180,8 @@
<span class="info-value">{{ item.netWeight || '—' }}t</span>
</div>
</div>
<el-button v-if="item.dataType == 1 && item.status == 0" style="position: absolute; bottom: 10px; right: 10px;" type="success" icon="el-icon-refresh" size="mini" @click="handleRestoreMaterial(item)"
:loading="item.cancelling" class="action-btn">回滚</el-button>
</div>
<div class="card-footer" v-if="item.dataType != 10">
@@ -337,7 +339,7 @@
</template>
<script>
import { listMaterialCoil, updateMaterialCoilSimple, checkCoilNo, delMaterialCoil } from '@/api/wms/coil'
import { listMaterialCoil, updateMaterialCoilSimple, checkCoilNo, delMaterialCoil, restoreMaterialCoil } from '@/api/wms/coil'
import { listUser } from '@/api/system/user'
import { listPendingAction, startProcess, cancelAction, delPendingAction } from '@/api/wms/pendingAction'
import { parseTime } from '@/utils/klp'
@@ -599,7 +601,7 @@ export default {
return '当前钢卷'
}
if (row.dataType == 10) {
return '未入库的钢卷'
return '未入库'
}
return '未知'
},
@@ -636,6 +638,22 @@ export default {
},
// ========== 物料列表相关方法 ==========
/** 查询物料列表 */
handleRestoreMaterial(row) {
this.$modal.confirm('是否要将改钢卷还原到上次加工的状态(会删除该钢卷并将上一步的历史钢卷)').then(_ => {
const loading = this.$loading({
lock: true,
text: '处理中...',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
restoreMaterialCoil(row.coilId).then(_ => {
this.$modal.msgSuccess("还原成功");
this.getMaterialCoil();
}).finally(() => {
loading.close()
})
})
},
getMaterialCoil() {
this.materialLoading = true
listMaterialCoil(this.materialQueryParams).then(response => {