更新生产查询功能

This commit is contained in:
2026-08-31 19:17:33 +08:00
parent e6322020d6
commit 02a429af66
4 changed files with 11 additions and 19 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
<?php return array ( <?php return array (
'version' => '1.0.0', 'version' => '1.0.0',
'installed_at' => '2026-08-30 15:44:35', 'installed_at' => '2026-08-31 17:20:32',
); );
@@ -22,7 +22,6 @@
<el-empty v-if="timelineLoaded && !timelineLoading && !timeline.items.length" description="该订单暂无相关记录" :image-size="90" /> <el-empty v-if="timelineLoaded && !timelineLoading && !timeline.items.length" description="该订单暂无相关记录" :image-size="90" />
<div v-else-if="timeline.items.length" class="timeline-list"> <div v-else-if="timeline.items.length" class="timeline-list">
<el-table :data="timeline.items" stripe class="timeline-table" empty-text="暂无时间线记录"> <el-table :data="timeline.items" stripe class="timeline-table" empty-text="暂无时间线记录">
<el-table-column prop="event_date" label="发生时间" width="170" />
<el-table-column label="记录类型" width="112"> <el-table-column label="记录类型" width="112">
<template #default="scope"><el-tag :type="tagType(scope.row.record_type)" effect="light" round>{{ scope.row.record_type_name }}</el-tag></template> <template #default="scope"><el-tag :type="tagType(scope.row.record_type)" effect="light" round>{{ scope.row.record_type_name }}</el-tag></template>
</el-table-column> </el-table-column>
@@ -40,8 +39,7 @@
<el-table-column label="工序节点" min-width="160" show-overflow-tooltip> <el-table-column label="工序节点" min-width="160" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<div class="timeline-node-cell"> <div class="timeline-node-cell">
<strong>{{ scope.row.process_name || '未指定工序' }}</strong> {{ [scope.row.process_name, scope.row.step_name].filter(Boolean).join(' / ') || '—' }}
<small v-if="scope.row.step_name">工位:{{ scope.row.step_name }}</small>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@@ -74,6 +72,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="event_date" label="时间" width="170" />
<el-table-column prop="remark" label="备注" min-width="180" show-overflow-tooltip /> <el-table-column prop="remark" label="备注" min-width="180" show-overflow-tooltip />
</el-table> </el-table>
</div> </div>
@@ -95,13 +94,13 @@
<el-form-item><el-button type="primary" :loading="recordLoading" @click="loadRecords">查询</el-button></el-form-item> <el-form-item><el-button type="primary" :loading="recordLoading" @click="loadRecords">查询</el-button></el-form-item>
</el-form> </el-form>
<el-table v-loading="recordLoading" :data="recordPage.items" stripe class="record-table" empty-text="暂无查询记录" @row-dblclick="showRecordDetail"> <el-table v-loading="recordLoading" :data="recordPage.items" stripe class="record-table" empty-text="暂无查询记录" @row-dblclick="showRecordDetail">
<el-table-column prop="event_date" label="发生时间" width="170" />
<el-table-column prop="record_type_name" label="记录类型" width="112"><template #default="scope"><el-tag :type="tagType(scope.row.record_type)" effect="light" round>{{ scope.row.record_type_name }}</el-tag></template></el-table-column> <el-table-column prop="record_type_name" label="记录类型" width="112"><template #default="scope"><el-tag :type="tagType(scope.row.record_type)" effect="light" round>{{ scope.row.record_type_name }}</el-tag></template></el-table-column>
<el-table-column prop="order_no" label="订单号" min-width="160" show-overflow-tooltip /> <el-table-column prop="order_no" label="订单号" min-width="160" show-overflow-tooltip />
<el-table-column prop="product_code" label="产品编码" min-width="145" show-overflow-tooltip /> <el-table-column prop="product_code" label="产品编码" min-width="145" show-overflow-tooltip />
<el-table-column label="工序节点" min-width="160" show-overflow-tooltip><template #default="scope">{{ [scope.row.process_name, scope.row.step_name].filter(Boolean).join(' / ') || '—' }}</template></el-table-column> <el-table-column label="工序节点" min-width="160" show-overflow-tooltip><template #default="scope">{{ [scope.row.process_name, scope.row.step_name].filter(Boolean).join(' / ') || '—' }}</template></el-table-column>
<el-table-column label="状态 / 结果" min-width="145" show-overflow-tooltip><template #default="scope">{{ [scope.row.status_name, scope.row.result_name].filter(Boolean).join(' · ') || '—' }}</template></el-table-column> <el-table-column label="状态 / 结果" min-width="145" show-overflow-tooltip><template #default="scope">{{ [scope.row.status_name, scope.row.result_name].filter(Boolean).join(' · ') || '—' }}</template></el-table-column>
<el-table-column label="操作人" min-width="125" show-overflow-tooltip><template #default="scope">{{ scope.row.operator || scope.row.user_code || '未记录' }}</template></el-table-column> <el-table-column label="操作人" min-width="125" show-overflow-tooltip><template #default="scope">{{ scope.row.operator || scope.row.user_code || '未记录' }}</template></el-table-column>
<el-table-column prop="event_date" label="时间" width="170" />
<el-table-column prop="remark" label="备注" min-width="190" show-overflow-tooltip /> <el-table-column prop="remark" label="备注" min-width="190" show-overflow-tooltip />
</el-table> </el-table>
<div class="pagination-row"><span>共 {{ recordPage.total }} 条</span><el-pagination v-model:current-page="recordPage.page" v-model:page-size="recordPage.limit" layout="prev, pager, next, sizes" :page-sizes="[20, 50, 100]" :total="recordPage.total" @current-change="loadRecords" @size-change="loadRecords" /></div> <div class="pagination-row"><span>共 {{ recordPage.total }} 条</span><el-pagination v-model:current-page="recordPage.page" v-model:page-size="recordPage.limit" layout="prev, pager, next, sizes" :page-sizes="[20, 50, 100]" :total="recordPage.total" @current-change="loadRecords" @size-change="loadRecords" /></div>
+4 -10
View File
@@ -9,20 +9,14 @@ export interface ProduceQueryRecord {
order_no?: string order_no?: string
product_code?: string product_code?: string
process_name?: string process_name?: string
step_name?: string
status_name?: string
result_name?: string
operator?: string
user_code?: string
quantity?: number | null
event_at?: number
event_date?: string | null
remark?: string
// 异常提报和维修记录详情
exception_reason?: string exception_reason?: string
exception_content?: string exception_content?: string
material_category?: string material_category?: string
fault_description?: string fault_description?: string
quantity?: number | null
event_at?: number
event_date?: string | null
remark?: string
} }
export interface ProduceQueryPage { export interface ProduceQueryPage {
@@ -22,7 +22,6 @@
<el-empty v-if="timelineLoaded && !timelineLoading && !timeline.items.length" description="该订单暂无相关记录" :image-size="90" /> <el-empty v-if="timelineLoaded && !timelineLoading && !timeline.items.length" description="该订单暂无相关记录" :image-size="90" />
<div v-else-if="timeline.items.length" class="timeline-list"> <div v-else-if="timeline.items.length" class="timeline-list">
<el-table :data="timeline.items" stripe class="timeline-table" empty-text="暂无时间线记录"> <el-table :data="timeline.items" stripe class="timeline-table" empty-text="暂无时间线记录">
<el-table-column prop="event_date" label="发生时间" width="170" />
<el-table-column label="记录类型" width="112"> <el-table-column label="记录类型" width="112">
<template #default="scope"><el-tag :type="tagType(scope.row.record_type)" effect="light" round>{{ scope.row.record_type_name }}</el-tag></template> <template #default="scope"><el-tag :type="tagType(scope.row.record_type)" effect="light" round>{{ scope.row.record_type_name }}</el-tag></template>
</el-table-column> </el-table-column>
@@ -40,8 +39,7 @@
<el-table-column label="工序节点" min-width="160" show-overflow-tooltip> <el-table-column label="工序节点" min-width="160" show-overflow-tooltip>
<template #default="scope"> <template #default="scope">
<div class="timeline-node-cell"> <div class="timeline-node-cell">
<strong>{{ scope.row.process_name || '未指定工序' }}</strong> {{ [scope.row.process_name, scope.row.step_name].filter(Boolean).join(' / ') || '—' }}
<small v-if="scope.row.step_name">工位:{{ scope.row.step_name }}</small>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
@@ -74,6 +72,7 @@
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="event_date" label="时间" width="170" />
<el-table-column prop="remark" label="备注" min-width="180" show-overflow-tooltip /> <el-table-column prop="remark" label="备注" min-width="180" show-overflow-tooltip />
</el-table> </el-table>
</div> </div>
@@ -95,13 +94,13 @@
<el-form-item><el-button type="primary" :loading="recordLoading" @click="loadRecords">查询</el-button></el-form-item> <el-form-item><el-button type="primary" :loading="recordLoading" @click="loadRecords">查询</el-button></el-form-item>
</el-form> </el-form>
<el-table v-loading="recordLoading" :data="recordPage.items" stripe class="record-table" empty-text="暂无查询记录" @row-dblclick="showRecordDetail"> <el-table v-loading="recordLoading" :data="recordPage.items" stripe class="record-table" empty-text="暂无查询记录" @row-dblclick="showRecordDetail">
<el-table-column prop="event_date" label="发生时间" width="170" />
<el-table-column prop="record_type_name" label="记录类型" width="112"><template #default="scope"><el-tag :type="tagType(scope.row.record_type)" effect="light" round>{{ scope.row.record_type_name }}</el-tag></template></el-table-column> <el-table-column prop="record_type_name" label="记录类型" width="112"><template #default="scope"><el-tag :type="tagType(scope.row.record_type)" effect="light" round>{{ scope.row.record_type_name }}</el-tag></template></el-table-column>
<el-table-column prop="order_no" label="订单号" min-width="160" show-overflow-tooltip /> <el-table-column prop="order_no" label="订单号" min-width="160" show-overflow-tooltip />
<el-table-column prop="product_code" label="产品编码" min-width="145" show-overflow-tooltip /> <el-table-column prop="product_code" label="产品编码" min-width="145" show-overflow-tooltip />
<el-table-column label="工序节点" min-width="160" show-overflow-tooltip><template #default="scope">{{ [scope.row.process_name, scope.row.step_name].filter(Boolean).join(' / ') || '—' }}</template></el-table-column> <el-table-column label="工序节点" min-width="160" show-overflow-tooltip><template #default="scope">{{ [scope.row.process_name, scope.row.step_name].filter(Boolean).join(' / ') || '—' }}</template></el-table-column>
<el-table-column label="状态 / 结果" min-width="145" show-overflow-tooltip><template #default="scope">{{ [scope.row.status_name, scope.row.result_name].filter(Boolean).join(' · ') || '—' }}</template></el-table-column> <el-table-column label="状态 / 结果" min-width="145" show-overflow-tooltip><template #default="scope">{{ [scope.row.status_name, scope.row.result_name].filter(Boolean).join(' · ') || '—' }}</template></el-table-column>
<el-table-column label="操作人" min-width="125" show-overflow-tooltip><template #default="scope">{{ scope.row.operator || scope.row.user_code || '未记录' }}</template></el-table-column> <el-table-column label="操作人" min-width="125" show-overflow-tooltip><template #default="scope">{{ scope.row.operator || scope.row.user_code || '未记录' }}</template></el-table-column>
<el-table-column prop="event_date" label="时间" width="170" />
<el-table-column prop="remark" label="备注" min-width="190" show-overflow-tooltip /> <el-table-column prop="remark" label="备注" min-width="190" show-overflow-tooltip />
</el-table> </el-table>
<div class="pagination-row"><span>共 {{ recordPage.total }} 条</span><el-pagination v-model:current-page="recordPage.page" v-model:page-size="recordPage.limit" layout="prev, pager, next, sizes" :page-sizes="[20, 50, 100]" :total="recordPage.total" @current-change="loadRecords" @size-change="loadRecords" /></div> <div class="pagination-row"><span>共 {{ recordPage.total }} 条</span><el-pagination v-model:current-page="recordPage.page" v-model:page-size="recordPage.limit" layout="prev, pager, next, sizes" :page-sizes="[20, 50, 100]" :total="recordPage.total" @current-change="loadRecords" @size-change="loadRecords" /></div>