feat(coil): 添加钢卷删除功能并调整网格布局
- 新增删除钢卷功能按钮及相关API调用 - 将卡片网格布局从6列调整为5列 - 更新异常按钮样式为警告类型
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
查找钢卷并修正
|
||||
<span class="section-desc">绿色边框表示当前钢卷,灰色边框表示历史钢卷</span>
|
||||
</h3>
|
||||
|
||||
|
||||
<el-button size="mini" icon="el-icon-refresh" @click="getMaterialCoil">刷新</el-button>
|
||||
</div>
|
||||
|
||||
@@ -185,7 +185,9 @@
|
||||
<div class="card-footer" v-if="item.dataType != 10">
|
||||
<el-button type="primary" icon="el-icon-check" size="mini" @click="handleCorrectMaterial(item)"
|
||||
:loading="item.picking" class="action-btn">修正</el-button>
|
||||
<el-button type="danger" icon="el-icon-alarm-clock" :plain="item.abnormalCount == 0" size="mini"
|
||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="hanleDeleteMaterial(item)"
|
||||
:loading="item.picking" class="action-btn">删除</el-button>
|
||||
<el-button type="warning" icon="el-icon-alarm-clock" :plain="item.abnormalCount == 0" size="mini"
|
||||
@click="handleAddAbnormal(item)" :loading="item.cancelling" class="action-btn">
|
||||
异常
|
||||
<span v-if="item.abnormalCount > 0">({{ item.abnormalCount }})</span>
|
||||
@@ -335,7 +337,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listMaterialCoil, updateMaterialCoilSimple, checkCoilNo } from '@/api/wms/coil'
|
||||
import { listMaterialCoil, updateMaterialCoilSimple, checkCoilNo, delMaterialCoil } from '@/api/wms/coil'
|
||||
import { listUser } from '@/api/system/user'
|
||||
import { listPendingAction, startProcess, cancelAction, delPendingAction } from '@/api/wms/pendingAction'
|
||||
import { parseTime } from '@/utils/klp'
|
||||
@@ -674,6 +676,21 @@ export default {
|
||||
});
|
||||
})
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
hanleDeleteMaterial(row) {
|
||||
const coilIds = row.coilId;
|
||||
this.$modal.confirm('是否确认删除钢卷物料编号为"' + coilIds + '"的数据项,会同时清理刚钢卷相关的待操作记录且无法恢复!!!是否继续删除?').then(() => {
|
||||
this.loading = true;
|
||||
return delMaterialCoil(coilIds);
|
||||
}).then(() => {
|
||||
this.loading = false;
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {
|
||||
}).finally(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
/** 处理操作 - 跳转到对应页面 */
|
||||
handleProcess(row) {
|
||||
const actionType = parseInt(row.actionType)
|
||||
@@ -868,7 +885,7 @@ export default {
|
||||
// 卡片网格容器
|
||||
.card-grid-container {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(6, 1fr);
|
||||
grid-template-columns: repeat(5, 1fr);
|
||||
gap: 8px;
|
||||
max-height: calc(100vh - 320px);
|
||||
overflow-y: auto;
|
||||
|
||||
Reference in New Issue
Block a user