feat(repair): add quick status filters, mandatory validations, FIFO sorting, and hide actions on finished orders
This commit is contained in:
@ -29,9 +29,19 @@
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
||||
<!-- 操作按钮区 -->
|
||||
<!-- 操作按钮区 + 快捷状态过滤 -->
|
||||
<div class="action-bar">
|
||||
<el-button v-if="userStore.hasPermission('inbound_repair:add')" type="primary" :icon="Plus" @click="handleCreate">新增维修</el-button>
|
||||
<el-radio-group v-model="searchForm.repair_status" @change="handleSearch" class="status-filter-group">
|
||||
<el-radio-button value="未出库">未出库</el-radio-button>
|
||||
<el-radio-button value="全部">全部</el-radio-button>
|
||||
<el-radio-button value="待检测">待检测</el-radio-button>
|
||||
<el-radio-button value="维修中">维修中</el-radio-button>
|
||||
<el-radio-button value="等待配件">等待配件</el-radio-button>
|
||||
<el-radio-button value="已修复">已修复</el-radio-button>
|
||||
<el-radio-button value="报废转出">报废转出</el-radio-button>
|
||||
<el-radio-button value="已出库">已出库</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
@ -57,7 +67,7 @@
|
||||
<el-button v-if="userStore.hasPermission('inbound_repair:edit')" type="primary" link size="small" @click="handleEdit(row)">
|
||||
编辑
|
||||
</el-button>
|
||||
<el-button v-if="userStore.hasPermission('inbound_repair:edit')" type="success" link size="small" @click="handleUpdateStatus(row)">
|
||||
<el-button v-if="userStore.hasPermission('inbound_repair:edit') && row.repair_status !== '已出库'" type="success" link size="small" @click="handleUpdateStatus(row)">
|
||||
更新状态
|
||||
</el-button>
|
||||
<el-button v-if="userStore.hasPermission('inbound_repair:delete')" type="danger" link size="small" @click="handleDelete(row)">
|
||||
@ -232,7 +242,7 @@ const searchForm = reactive({
|
||||
repair_no: '',
|
||||
serial_number: '',
|
||||
material_name: '',
|
||||
repair_status: ''
|
||||
repair_status: '未出库'
|
||||
})
|
||||
|
||||
// 表格数据
|
||||
@ -534,6 +544,13 @@ onMounted(() => {
|
||||
|
||||
.action-bar {
|
||||
margin-bottom: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.status-filter-group {
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.pagination-container {
|
||||
|
||||
Reference in New Issue
Block a user