feat(钢卷修正): 添加钢卷类型筛选和强制入库功能
- 在搜索栏新增钢卷类型下拉选择框,支持按不同类型筛选钢卷 - 为未入库钢卷添加强制入库按钮及处理逻辑 - 根据选择的钢卷类型动态调整查询参数
This commit is contained in:
@@ -15,6 +15,16 @@
|
|||||||
|
|
||||||
<!-- 搜索栏 -->
|
<!-- 搜索栏 -->
|
||||||
<el-form :model="materialQueryParams" ref="materialQueryForm" size="small" :inline="true" class="query-form">
|
<el-form :model="materialQueryParams" ref="materialQueryForm" size="small" :inline="true" class="query-form">
|
||||||
|
<el-form-item label="钢卷类型" prop="dataType">
|
||||||
|
<el-select v-model="coilType" placeholder="请选择钢卷类型">
|
||||||
|
<el-option label="全部" value="all" />
|
||||||
|
<el-option label="当前钢卷" value="now" />
|
||||||
|
<el-option label="历史钢卷" value="history" />
|
||||||
|
<el-option label="已发货钢卷" value="trans" />
|
||||||
|
<el-option label="未入库钢卷" value="unIn" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
<el-form-item label="入场钢卷号" prop="enterCoilNo">
|
||||||
<el-input v-model="materialQueryParams.enterCoilNo" placeholder="请输入入场钢卷号" clearable
|
<el-input v-model="materialQueryParams.enterCoilNo" placeholder="请输入入场钢卷号" clearable
|
||||||
@keyup.enter.native="handleMaterialQuery" style="width: 150px;" />
|
@keyup.enter.native="handleMaterialQuery" style="width: 150px;" />
|
||||||
@@ -206,9 +216,13 @@
|
|||||||
style="position: absolute; bottom: 10px; right: 10px;" type="success" icon="el-icon-refresh"
|
style="position: absolute; bottom: 10px; right: 10px;" type="success" icon="el-icon-refresh"
|
||||||
size="mini" @click="handleRestoreMaterial(item)" :loading="item.cancelling"
|
size="mini" @click="handleRestoreMaterial(item)" :loading="item.cancelling"
|
||||||
class="action-btn">回滚</el-button>
|
class="action-btn">回滚</el-button>
|
||||||
|
<el-button v-if="item.dataType == 10 && item.status == 0"
|
||||||
|
style="position: absolute; bottom: 10px; right: 10px;" type="success" icon="el-icon-refresh"
|
||||||
|
size="mini" @click="handleForceInMaterial(item)" :loading="item.cancelling"
|
||||||
|
class="action-btn">强制入库</el-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-footer" v-if="item.dataType != 10">
|
<div class="card-footer">
|
||||||
<el-button type="primary" icon="el-icon-check" size="mini" @click="handleCorrectMaterial(item)"
|
<el-button type="primary" icon="el-icon-check" size="mini" @click="handleCorrectMaterial(item)"
|
||||||
:loading="item.picking" class="action-btn">修正</el-button>
|
:loading="item.picking" class="action-btn">修正</el-button>
|
||||||
<el-button type="danger" icon="el-icon-delete" size="mini" @click="hanleDeleteMaterial(item)"
|
<el-button type="danger" icon="el-icon-delete" size="mini" @click="hanleDeleteMaterial(item)"
|
||||||
@@ -414,6 +428,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
coilType: 'all',
|
||||||
title: '钢卷信息修正',
|
title: '钢卷信息修正',
|
||||||
// 物料列表相关
|
// 物料列表相关
|
||||||
materialLoading: false,
|
materialLoading: false,
|
||||||
@@ -731,9 +746,39 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleForceInMaterial(row) {
|
||||||
|
this.$modal.confirm('是否要强制入库改钢卷?').then(_ => {
|
||||||
|
const loading = this.$loading({
|
||||||
|
lock: true,
|
||||||
|
text: '处理中...',
|
||||||
|
spinner: 'el-icon-loading',
|
||||||
|
background: 'rgba(0, 0, 0, 0.7)'
|
||||||
|
})
|
||||||
|
updateMaterialCoilSimple({
|
||||||
|
...row,
|
||||||
|
dataType: 1,
|
||||||
|
}).then(_ => {
|
||||||
|
this.$modal.msgSuccess("强制入库成功");
|
||||||
|
this.getMaterialCoil();
|
||||||
|
}).finally(() => {
|
||||||
|
loading.close()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
getMaterialCoil() {
|
getMaterialCoil() {
|
||||||
this.materialLoading = true
|
this.materialLoading = true
|
||||||
listMaterialCoil(this.materialQueryParams).then(response => {
|
const payload = { ...this.materialQueryParams }
|
||||||
|
if (this.coilType == 'now') {
|
||||||
|
payload.dataType = 1;
|
||||||
|
payload.status = 0;
|
||||||
|
} else if (this.coilType == 'history') {
|
||||||
|
payload.dataType = 0;
|
||||||
|
} else if (this.coilType == 'trans') {
|
||||||
|
payload.status = 1;
|
||||||
|
} else if (this.coilType == 'unIn') {
|
||||||
|
payload.dataType = 10;
|
||||||
|
}
|
||||||
|
listMaterialCoil(payload).then(response => {
|
||||||
this.materialCoilList = response.rows || []
|
this.materialCoilList = response.rows || []
|
||||||
this.materialTotal = response.total || 0
|
this.materialTotal = response.total || 0
|
||||||
this.materialLoading = false
|
this.materialLoading = false
|
||||||
|
|||||||
@@ -747,11 +747,11 @@ export default {
|
|||||||
}
|
}
|
||||||
delPendingAction(row.actionId).then(response => {
|
delPendingAction(row.actionId).then(response => {
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
delCoilWarehouseOperationLogByCoilId({
|
// delCoilWarehouseOperationLogByCoilId({
|
||||||
coilId: row.coilId,
|
// coilId: row.coilId,
|
||||||
operationType: 1,
|
// operationType: 1,
|
||||||
inOutType: 1
|
// inOutType: 1
|
||||||
})
|
// })
|
||||||
this.getList();
|
this.getList();
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user