feat(wms/coil/stock, wms/post/aps): 添加快捷筛选和表格内状态编辑功能
1. 为卷材库存页面添加快捷品质筛选按钮,支持全选、AB/CD/O/CDO模式快速筛选 2. 为排产页面添加表格内快捷修改排产状态功能,支持行内编辑并加载状态提示 3. 新增排产状态4"已排产"的枚举值和对应样式 4. 禁用排产编辑弹窗的工序类型选择框,优化表单交互
This commit is contained in:
@@ -23,6 +23,11 @@
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getList">查询</el-button>
|
||||
<el-button @click="resetQuery">重置</el-button>
|
||||
<el-button size="small" plain @click="quickQualityAll">全选模式</el-button>
|
||||
<el-button size="small" plain @click="quickQualityAB">AB模式</el-button>
|
||||
<el-button size="small" plain @click="quickQualityCD">CD模式</el-button>
|
||||
<el-button size="small" plain @click="quickQualityO">O模式</el-button>
|
||||
<el-button size="small" plain @click="quickQualityCDO">CDO模式</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
@@ -627,6 +632,28 @@ export default {
|
||||
this.queryParams = { warehouseIds: Object.keys(this.warehouseMap), qualityStatusCsv: 'A+,A,A-,B+,B,B-' };
|
||||
this.getList();
|
||||
},
|
||||
|
||||
// 快捷品质筛选
|
||||
quickQualityAll() {
|
||||
this.queryParams.qualityStatusCsv = '';
|
||||
this.getList();
|
||||
},
|
||||
quickQualityAB() {
|
||||
this.queryParams.qualityStatusCsv = 'A+,A,A-,B+,B,B-';
|
||||
this.getList();
|
||||
},
|
||||
quickQualityCD() {
|
||||
this.queryParams.qualityStatusCsv = 'C+,C,C-,D+,D,D-';
|
||||
this.getList();
|
||||
},
|
||||
quickQualityO() {
|
||||
this.queryParams.qualityStatusCsv = 'O';
|
||||
this.getList();
|
||||
},
|
||||
quickQualityCDO() {
|
||||
this.queryParams.qualityStatusCsv = 'C+,C,C-,D+,D,D-,O';
|
||||
this.getList();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -296,9 +296,17 @@
|
||||
<el-table-column label="排产单号" prop="scheduleNo" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="生产日期" prop="prodDate" width="110" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="工序步骤" prop="stepName" width="120" align="center" show-overflow-tooltip />
|
||||
<el-table-column label="排产状态" prop="scheduleStatus" width="90" align="center">
|
||||
<el-table-column label="排产状态" width="115" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span class="aps-status-tag" :class="'status-' + (scope.row.scheduleStatus || 1)">{{ statusMap[scope.row.scheduleStatus] || '未知' }}</span>
|
||||
<el-select
|
||||
v-model="scope.row.scheduleStatus"
|
||||
size="mini"
|
||||
:loading="scope.row._statusLoading"
|
||||
@change="val => handleInlineStatusChange(scope.row, val)"
|
||||
@click.stop.native
|
||||
>
|
||||
<el-option v-for="(label, val) in statusMap" :key="val" :label="label" :value="Number(val)" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="规格" prop="spec" min-width="120" show-overflow-tooltip />
|
||||
@@ -404,7 +412,7 @@
|
||||
<el-row :gutter="16">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="工序类型">
|
||||
<el-select v-model="editForm.actionId" placeholder="请选择工序类型" clearable filterable style="width:100%">
|
||||
<el-select v-model="editForm.actionId" placeholder="请选择工序类型" clearable filterable disabled style="width:100%">
|
||||
<el-option v-for="p in processOptions" :key="p.actionId" :label="p.name" :value="p.actionId" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@@ -660,7 +668,7 @@ export default {
|
||||
// 待审核
|
||||
pendingScheduleList: [],
|
||||
summaryText: '',
|
||||
statusMap: { 1: '待审核', 2: '已接收', 3: '已驳回' },
|
||||
statusMap: { 1: '待审核', 2: '已接收', 3: '已驳回', 4: '已排产' },
|
||||
processOptions: PROCESSES,
|
||||
|
||||
// 已接收
|
||||
@@ -943,12 +951,21 @@ export default {
|
||||
})
|
||||
},
|
||||
|
||||
// 表格内快捷修改排产状态
|
||||
handleInlineStatusChange(row, val) {
|
||||
this.$set(row, '_statusLoading', true)
|
||||
updateScheduleItem({ scheduleId: row.scheduleId, scheduleStatus: val }).then(() => {
|
||||
this.$modal.msgSuccess('状态已更新')
|
||||
}).catch(() => {
|
||||
this.$modal.msgError('状态更新失败')
|
||||
this.queryScheduled()
|
||||
}).finally(() => {
|
||||
this.$set(row, '_statusLoading', false)
|
||||
})
|
||||
},
|
||||
|
||||
handleEditScheduled(row) {
|
||||
this.editForm = { ...this.getEmptyEditForm(), ...row }
|
||||
// 确保 actionId 为数字类型以匹配下拉选项
|
||||
if (this.editForm.actionId != null && typeof this.editForm.actionId !== 'number') {
|
||||
this.editForm.actionId = Number(this.editForm.actionId)
|
||||
}
|
||||
// 确保 scheduleStatus 为数字类型以匹配下拉选项
|
||||
if (this.editForm.scheduleStatus != null && typeof this.editForm.scheduleStatus !== 'number') {
|
||||
this.editForm.scheduleStatus = Number(this.editForm.scheduleStatus)
|
||||
@@ -1229,6 +1246,7 @@ export default {
|
||||
&.status-1 { background: #fff3e0; color: #e67e22; }
|
||||
&.status-2 { background: #e8f5e9; color: #388e3c; }
|
||||
&.status-3 { background: #fdecea; color: #e74c3c; }
|
||||
&.status-4 { background: #e3f2fd; color: #1976d2; }
|
||||
}
|
||||
|
||||
// 产需单信息表
|
||||
|
||||
Reference in New Issue
Block a user