Merge remote-tracking branch 'origin/0.8.X' into 0.8.X
This commit is contained in:
@@ -225,4 +225,17 @@ export function getDuplicateGroups() {
|
||||
url: '/wms/materialCoil/duplicateGroups',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 还原钢卷,将一个钢卷从历史记录中还原为当前数据
|
||||
*/
|
||||
export function restoreMaterialCoil(coilId) {
|
||||
if (!coilId) {
|
||||
return Promise.reject(new Error('coilId is required'))
|
||||
}
|
||||
return request({
|
||||
url: '/wms/materialCoil/rollback/' + coilId,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
@@ -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 => {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="trace-result-container">
|
||||
<!-- 二维码信息 -->
|
||||
<el-card shadow="hover" class="mb20" v-if="traceResult && traceResult.qrcode">
|
||||
<!-- <el-card shadow="hover" class="mb20" v-if="traceResult && traceResult.qrcode">
|
||||
<div slot="header" class="card-header">
|
||||
<span class="title-dot"></span>
|
||||
<span class="title-text">二维码信息</span>
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-col :span="18" class="info-value">{{ traceResult.all_qrcodes.length }} 个</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-card> -->
|
||||
|
||||
<!-- 操作步骤 -->
|
||||
<el-card shadow="hover" class="mb20" v-if="traceResult && traceResult.steps && traceResult.steps.length > 0">
|
||||
@@ -95,10 +95,10 @@
|
||||
</el-tag>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row class="detail-row" v-if="step.qrcode_serial">
|
||||
<!-- <el-row class="detail-row" v-if="step.qrcode_serial">
|
||||
<el-col :span="8" class="detail-label">二维码序列:</el-col>
|
||||
<el-col :span="16" class="detail-value">{{ step.qrcode_serial }}</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
<el-row class="detail-row" v-if="step.operator">
|
||||
<el-col :span="8" class="detail-label">操作者:</el-col>
|
||||
<el-col :span="16" class="detail-value">{{ step.operator }}</el-col>
|
||||
@@ -110,7 +110,7 @@
|
||||
</el-card>
|
||||
|
||||
<!-- 钢卷分支图 -->
|
||||
<el-card shadow="hover" class="mb20" v-if="traceResult && traceResult.records && traceResult.records.length > 0">
|
||||
<!-- <el-card shadow="hover" class="mb20" v-if="traceResult && traceResult.records && traceResult.records.length > 0">
|
||||
<div slot="header" class="card-header">
|
||||
<span class="title-dot"></span>
|
||||
<span class="title-text">钢卷分支图</span>
|
||||
@@ -144,7 +144,6 @@
|
||||
<p class="coil-detail" v-if="coil.warehouse && coil.warehouse.warehouseName">
|
||||
库区:{{ coil.warehouse.warehouseName }}
|
||||
</p>
|
||||
<!-- 显示母卷/子卷关系 -->
|
||||
<p class="coil-detail" v-if="coil.parentCoilNos && coil.hasMergeSplit === 1">
|
||||
<el-tag type="warning" size="mini">来自母卷:{{ coil.parentCoilNos }}</el-tag>
|
||||
</p>
|
||||
@@ -161,7 +160,7 @@
|
||||
</el-row>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-card> -->
|
||||
|
||||
<!-- 无记录提示 -->
|
||||
<div class="empty-tip" v-if="!traceResult || (traceResult && !traceResult.records && !traceResult.steps)">
|
||||
@@ -255,6 +254,10 @@ export default {
|
||||
|
||||
return groups;
|
||||
},
|
||||
|
||||
// formatTime(step) {
|
||||
// const timestamp = step.upda
|
||||
// }
|
||||
// 获取分组标签类型
|
||||
getGroupTypeTag(color) {
|
||||
switch(color) {
|
||||
|
||||
Reference in New Issue
Block a user