工单提交
This commit is contained in:
@@ -14,6 +14,7 @@ interface ArchivedWorkOrder {
|
||||
id: string;
|
||||
workOrderNumber: string;
|
||||
workOrderType: string;
|
||||
equipmentType: string;
|
||||
merchantName: string;
|
||||
equipmentName: string;
|
||||
workerName: string;
|
||||
@@ -76,7 +77,7 @@ export default function WorkOrderArchivePage() {
|
||||
const fetchArchivedOrders = async (pageNum = 1, pageSize = 10) => {
|
||||
setLoading(true);
|
||||
try {
|
||||
const response = await apiGet(`/client/work/list?queryStaus=7&pageNum=${pageNum}&pageSize=${pageSize}`);
|
||||
const response = await apiGet(`/back/workOrderArchive/list?pageNum=${pageNum}&pageSize=${pageSize}`);
|
||||
if (response.code === 200) {
|
||||
setArchivedOrders(response.data || []);
|
||||
setPagination({
|
||||
@@ -259,11 +260,10 @@ export default function WorkOrderArchivePage() {
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead>工单编号</TableHead>
|
||||
<TableHead>工单标题</TableHead>
|
||||
<TableHead>工单类型</TableHead>
|
||||
<TableHead>商户</TableHead>
|
||||
<TableHead>设备</TableHead>
|
||||
<TableHead>维修工人</TableHead>
|
||||
<TableHead>优先级</TableHead>
|
||||
<TableHead>完成时间</TableHead>
|
||||
<TableHead>归档时间</TableHead>
|
||||
<TableHead>操作</TableHead>
|
||||
@@ -272,13 +272,13 @@ export default function WorkOrderArchivePage() {
|
||||
<TableBody>
|
||||
{loading ? (
|
||||
<TableRow>
|
||||
<TableCell colSpan={9} className="text-center py-8">
|
||||
<TableCell colSpan={8} className="text-center py-8">
|
||||
<div className="text-gray-500">加载中...</div>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : filteredOrders.length === 0 ? (
|
||||
<TableRow>
|
||||
<TableCell colSpan={9} className="text-center py-8">
|
||||
<TableCell colSpan={8} className="text-center py-8">
|
||||
<div className="text-gray-500">暂无数据</div>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
@@ -290,9 +290,6 @@ export default function WorkOrderArchivePage() {
|
||||
<TableCell>{order.merchantName}</TableCell>
|
||||
<TableCell>{order.equipmentName}</TableCell>
|
||||
<TableCell>{order.workerName}</TableCell>
|
||||
<TableCell>
|
||||
<Badge className={getPriorityColor(order.priority)}>{getPriorityText(order.priority)}</Badge>
|
||||
</TableCell>
|
||||
<TableCell>{order.updatedAt}</TableCell>
|
||||
<TableCell>{order.updatedAt}</TableCell>
|
||||
<TableCell>
|
||||
@@ -301,10 +298,12 @@ export default function WorkOrderArchivePage() {
|
||||
<Eye className="h-4 w-4 mr-1" />
|
||||
查看详情
|
||||
</Button>
|
||||
{(order.workOrderType === "厨房自动灭火设备" || order.workOrderType === "设备安装" || order.workOrderType === "设备检测") && (
|
||||
<Button variant="outline" size="sm" onClick={() => handleDownloadReport(order.workOrderNumber)}>
|
||||
<FileDown className="h-4 w-4 mr-1" />
|
||||
下载报告
|
||||
</Button>
|
||||
)}
|
||||
</div>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
|
||||
Reference in New Issue
Block a user