From b13cf729d43674c47d8ebf344396c8829580d67c Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Thu, 20 Mar 2025 15:01:57 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/controller/api/auth/TicketRepair.php | 44 ++- .../src/controller/api/auth/TicketVerify.php | 46 ++- .../src/controller/api/auth/TicketView.php | 5 +- .../src/controller/Repair.php | 16 + .../src/controller/Ticket.php | 63 +++- .../src/controller/Verify.php | 16 + .../src/controller/View.php | 6 + .../src/view/common/ticket_flow.html | 289 ++++++++++++++++++ .../src/view/repair/detail.html | 167 ++++++++++ .../src/view/ticket/detail.html | 49 +-- .../src/view/ticket/index.html | 37 ++- .../src/view/ticket/repair_ticket_create.html | 19 ++ .../src/view/ticket/verify_ticket_create.html | 19 ++ .../src/view/verify/detail.html | 163 ++++++++++ .../src/view/view/detail.html | 41 +-- 15 files changed, 891 insertions(+), 89 deletions(-) create mode 100644 plugs/think-plugs-ticket/src/view/common/ticket_flow.html create mode 100644 plugs/think-plugs-ticket/src/view/repair/detail.html create mode 100644 plugs/think-plugs-ticket/src/view/ticket/repair_ticket_create.html create mode 100644 plugs/think-plugs-ticket/src/view/ticket/verify_ticket_create.html create mode 100644 plugs/think-plugs-ticket/src/view/verify/detail.html diff --git a/plugs/think-plugs-inspection/src/controller/api/auth/TicketRepair.php b/plugs/think-plugs-inspection/src/controller/api/auth/TicketRepair.php index 3033812..97a470b 100644 --- a/plugs/think-plugs-inspection/src/controller/api/auth/TicketRepair.php +++ b/plugs/think-plugs-inspection/src/controller/api/auth/TicketRepair.php @@ -10,7 +10,12 @@ class TicketRepair extends Auth public function list() { - $query = Model::query()->scope(['notFinish'])->with(['ticket'])->where(['staff_id'=>$this->staff->id]); + $query = Model::query()->with(['ticket'])->where(['staff_id'=>$this->staff->id]); + $query->order('create_at', 'desc'); + $status = $this->request->get('status/i', null); + if (is_numeric($status)) { + $query->where('status', '=', $status); + } $keyword = $this->request->get('keyword', null); if ($keyword) { $query->where('title', 'like', "%{$keyword}%"); @@ -19,4 +24,41 @@ class TicketRepair extends Auth $this->success('获取工单列表', $pageData); } + public function detail() + { + $id = $this->request->get('id', null); + $data = Model::query()->with(['ticket'])->where('staff_id', '=', $this->staff->id)->where(['id'=>$id])->find(); + if (!$data) { + $this->error('工单不存在'); + } + $this->success('获取工单详情', $data); + } + + public function submit() + { + $data = $this->_vali([ + 'ticket_id.require' => '工单ID不能为空', + 'content.require' => '工单内容不能为空', + 'imgs.default' => '', + ]); + $ticket = Model::query()->with(['ticket'])->where('staff_id', '=', $this->staff->id)->where(['id'=>$data['ticket_id']])->find(); + if (!$ticket) { + $this->error('工单不存在'); + } + unset($data['ticket_id']); + if ($ticket->status === 1) { + $this->error('工单已提交'); + } + if ($ticket->status === 2) { + $this->error('工单已关闭'); + } + try { + $data['status'] = 1; + $ticket->finish_at = date('Y-m-d H:i:s'); + $ticket->save($data); + } catch (\Exception $exception) { + $this->error('工单提交失败'); + } + $this->success('工单提交成功'); + } } \ No newline at end of file diff --git a/plugs/think-plugs-inspection/src/controller/api/auth/TicketVerify.php b/plugs/think-plugs-inspection/src/controller/api/auth/TicketVerify.php index 726ad16..3920419 100644 --- a/plugs/think-plugs-inspection/src/controller/api/auth/TicketVerify.php +++ b/plugs/think-plugs-inspection/src/controller/api/auth/TicketVerify.php @@ -10,7 +10,12 @@ class TicketVerify extends Auth public function list() { - $query = Model::query()->scope(['notFinish'])->with(['ticket'])->where(['staff_id'=>$this->staff->id]); + $query = Model::query()->with(['ticket'])->where(['staff_id'=>$this->staff->id]); + $query->order('create_at', 'desc'); + $status = $this->request->get('status/i', null); + if (is_numeric($status)) { + $query->where('status', '=', $status); + } $keyword = $this->request->get('keyword', null); if ($keyword) { $query->where('title', 'like', "%{$keyword}%"); @@ -19,4 +24,43 @@ class TicketVerify extends Auth $this->success('获取工单列表', $pageData); } + public function detail() + { + $id = $this->request->get('id', null); + $data = Model::query()->with(['ticket'])->where('staff_id', '=', $this->staff->id)->where(['id'=>$id])->find(); + if (!$data) { + $this->error('工单不存在'); + } + $this->success('获取工单详情', $data); + } + + public function submit() + { + $data = $this->_vali([ + 'ticket_id.require' => '工单ID不能为空', + 'content.require' => '工单内容不能为空', + 'is_error.in:0,1' => '请选择是否有异常', + 'imgs.default' => '', + 'work_days.default' => '', + ]); + $ticket = Model::query()->with(['ticket'])->where('staff_id', '=', $this->staff->id)->where(['id'=>$data['ticket_id']])->find(); + if (!$ticket) { + $this->error('工单不存在'); + } + unset($data['ticket_id']); + if ($ticket->status === 1) { + $this->error('工单已提交'); + } + if ($ticket->status === 2) { + $this->error('工单已关闭'); + } + try { + $data['status'] = 1; + $ticket->finish_at = date('Y-m-d H:i:s'); + $ticket->save($data); + } catch (\Exception $exception) { + $this->error('工单提交失败'); + } + $this->success('工单提交成功'); + } } \ No newline at end of file diff --git a/plugs/think-plugs-inspection/src/controller/api/auth/TicketView.php b/plugs/think-plugs-inspection/src/controller/api/auth/TicketView.php index ff7cba9..2118502 100644 --- a/plugs/think-plugs-inspection/src/controller/api/auth/TicketView.php +++ b/plugs/think-plugs-inspection/src/controller/api/auth/TicketView.php @@ -12,8 +12,8 @@ class TicketView extends Auth { $query = Model::query()->with(['ticket'])->where(['staff_id'=>$this->staff->id]); $query->order('create_at', 'desc'); - $status = $this->request->get('status', null); - if ($status) { + $status = $this->request->get('status/i', null); + if (is_numeric($status)) { $query->where('status', '=', $status); } $keyword = $this->request->get('keyword', null); @@ -56,6 +56,7 @@ class TicketView extends Auth } try { $data['status'] = 1; + $ticket->finish_at = date('Y-m-d H:i:s'); $ticket->save($data); } catch (\Exception $exception) { $this->error('工单提交失败'); diff --git a/plugs/think-plugs-ticket/src/controller/Repair.php b/plugs/think-plugs-ticket/src/controller/Repair.php index 9e30e02..e221020 100644 --- a/plugs/think-plugs-ticket/src/controller/Repair.php +++ b/plugs/think-plugs-ticket/src/controller/Repair.php @@ -32,6 +32,22 @@ class Repair extends Controller }); } + /** + * 查看工单详情 + * @auth true + * @return void + */ + public function detail() + { + $id = $this->request->param('id'); + $this->vo = TicketRepair::mk()->with(['ticket'])->where(['id' => $id])->findOrEmpty(); + if ($this->vo->isEmpty()) { + $this->error('查看工单不存在!'); + } + $this->ticket = $this->vo->ticket; + $this->fetch(); + } + /** * 添加维修工单 * @auth true diff --git a/plugs/think-plugs-ticket/src/controller/Ticket.php b/plugs/think-plugs-ticket/src/controller/Ticket.php index cba99d2..7199545 100644 --- a/plugs/think-plugs-ticket/src/controller/Ticket.php +++ b/plugs/think-plugs-ticket/src/controller/Ticket.php @@ -81,7 +81,8 @@ class Ticket extends Controller { $this->title = '工单详情'; ['id' => $id] = $this->_vali(['id.require' => '请指定工单ID!']); - $this->vo = TicketTicket::mk()->with(['user', 'type', 'reply'])->append(['imgs_arr', 'type_name', 'last_reply'])->find($id); + $this->vo = TicketTicket::mk()->with(['user', 'type'])->append(['imgs_arr', 'type_name'])->find($id); + $this->ticket = $this->vo; $process = ApprovalProcess::where('type', '=', 'GDSH')->order('id', 'asc')->findOrEmpty(); $instance = ApprovalInstance::query()->with(['steps.approver', 'logs'])->where('process_id', '=', $process->id)->where('oid', '=', $id)->findOrEmpty(); $this->instance = $instance; @@ -433,7 +434,7 @@ class Ticket extends Controller 'status' => 0, ]); } - $ticket->view_pid = $instance->id; + $ticket->repair_pid = $instance->id; $ticket->save(); ApprovalInstance::mk()->commit(); } catch (HttpResponseException $e) { @@ -454,6 +455,34 @@ class Ticket extends Controller } } + public function repair_ticket_create() + { + $data = $this->_vali([ + 'ticket_id.require'=>'请指定工单ID!', + ]); + $ticket = TicketTicket::query()->with(['repair_process'])->append(['imgs_arr', 'type_name'])->where('id', '=', $data['ticket_id'])->findOrEmpty(); + $staffs = InspectionStaff::query()->field('id,name,phone')->select(); + if ($ticket->isEmpty()) { + $this->error('未找到工单信息'); + } + if ($this->request->isPost()) { + $adminInfo = $this->request->session('user'); + $instance_data = $this->_vali([ + 'staff_id.require'=>'请指定维修人员!', + ]); + $view = $ticket->repairs()->save([ + 'staff_id'=>$instance_data['staff_id'], + 'status'=>0, + 'create_by'=>$adminInfo['id'], + ]); + $this->success('创建成功!', $view); + } else { + $this->vo = $ticket; + $this->staffs = $staffs; + $this->fetch(); + } + } + public function verify_process_create() { $data = $this->_vali([ @@ -504,7 +533,7 @@ class Ticket extends Controller 'status' => 0, ]); } - $ticket->view_pid = $instance->id; + $ticket->verify_pid = $instance->id; $ticket->save(); ApprovalInstance::mk()->commit(); } catch (HttpResponseException $e) { @@ -525,6 +554,34 @@ class Ticket extends Controller } } + public function verify_ticket_create() + { + $data = $this->_vali([ + 'ticket_id.require'=>'请指定工单ID!', + ]); + $ticket = TicketTicket::query()->with(['repair_process'])->append(['imgs_arr', 'type_name'])->where('id', '=', $data['ticket_id'])->findOrEmpty(); + $staffs = InspectionStaff::query()->field('id,name,phone')->select(); + if ($ticket->isEmpty()) { + $this->error('未找到工单信息'); + } + if ($this->request->isPost()) { + $adminInfo = $this->request->session('user'); + $instance_data = $this->_vali([ + 'staff_id.require'=>'请指定维修人员!', + ]); + $view = $ticket->verifys()->save([ + 'staff_id'=>$instance_data['staff_id'], + 'status'=>0, + 'create_by'=>$adminInfo['id'], + ]); + $this->success('创建成功!', $view); + } else { + $this->vo = $ticket; + $this->staffs = $staffs; + $this->fetch(); + } + } + public function my() { diff --git a/plugs/think-plugs-ticket/src/controller/Verify.php b/plugs/think-plugs-ticket/src/controller/Verify.php index 0076ed9..617ae9e 100644 --- a/plugs/think-plugs-ticket/src/controller/Verify.php +++ b/plugs/think-plugs-ticket/src/controller/Verify.php @@ -32,6 +32,22 @@ class Verify extends Controller }); } + /** + * 查看工单详情 + * @auth true + * @return void + */ + public function detail() + { + $id = $this->request->param('id'); + $this->vo = TicketVerify::mk()->with(['ticket'])->where(['id' => $id])->findOrEmpty(); + if ($this->vo->isEmpty()) { + $this->error('查看工单不存在!'); + } + $this->ticket = $this->vo->ticket; + $this->fetch(); + } + /** * 添加验收工单 * @auth true diff --git a/plugs/think-plugs-ticket/src/controller/View.php b/plugs/think-plugs-ticket/src/controller/View.php index 7c3847e..4720e36 100644 --- a/plugs/think-plugs-ticket/src/controller/View.php +++ b/plugs/think-plugs-ticket/src/controller/View.php @@ -32,6 +32,11 @@ class View extends Controller }); } + /** + * 查看工单详情 + * @auth true + * @return void + */ public function detail() { $id = $this->request->param('id'); @@ -39,6 +44,7 @@ class View extends Controller if ($this->vo->isEmpty()) { $this->error('查看工单不存在!'); } + $this->ticket = $this->vo->ticket; $this->fetch(); } diff --git a/plugs/think-plugs-ticket/src/view/common/ticket_flow.html b/plugs/think-plugs-ticket/src/view/common/ticket_flow.html new file mode 100644 index 0000000..9780b3f --- /dev/null +++ b/plugs/think-plugs-ticket/src/view/common/ticket_flow.html @@ -0,0 +1,289 @@ +
+ +
+ {if $ticket.view_process} +
+
+
+
审核流程
+
+
+
+ +
+

提交审核

+
+ {$ticket.view_process.create_name}于{$ticket.view_process.create_time|date='Y-m-d H:i:s'}提交 +
+ 审核说明:{$ticket.view_process.content} +
+
+
+
+ {foreach $ticket.view_process.steps as $index=>$step} + {include file="common/step" /} + {/foreach} +
+
+
+
+
+ {/if} + {if $ticket.views} +
+
+
核验信息
+
+ {foreach $ticket.views as $view} +
+ + + + + + + {if $view.status == 1} + + + + + + + + + + + + + + + + + + + + + + + + + {else} + + + + + {/if} + + + + + +
核验人{$view.staff.name|default=""} ({$view.staff.phone|default=""})
核验时间{$view.finish_at|default=""}
是否存在异常{if $view.is_error == 1}是{else}否{/if}
核验结果描述{$view.content|default=""}
核验图片 +
+ {if count($view.imgs_arr) > 0} + {foreach $view.imgs_arr as $img} + image +   + {/foreach} + {else} + 无图片 + {/if} +
+
预期工作量(天){$view.workdays|default="-"}
完成时间{$view.finish_at|default=""}
核验状态待核验
创建时间{$view.create_at|default=""}
+
+ {/foreach} +
+
+
+ {/if} + {if $ticket.repair_process} +
+
+
+
审核流程
+
+
+
+ +
+

提交审核

+
+ {$ticket.repair_process.create_name}于{$ticket.repair_process.create_time|date='Y-m-d H:i:s'}提交 +
+ 审核说明:{$ticket.repair_process.content} +
+
+
+
+ {foreach $ticket.repair_process.steps as $index=>$step} + {include file="common/step" /} + {/foreach} +
+
+
+
+
+ {/if} + {if $ticket.repairs} +
+
+
核验信息
+
+ {foreach $ticket.repairs as $repair} +
+ + + + + + + {if $repair.status == 1} + + + + + + + + + + + + + {else} + + + + + {/if} + + + + + +
维修人{$repair.staff.name|default=""} ({$repair.staff.phone|default=""})
核验提交时间{$repair.finish_at|default=""}
核验结果描述{$repair.content|default=""}
核验图片 +
+ {if count($repair.imgs_arr) > 0} + {foreach $repair.imgs_arr as $img} + image +   + {/foreach} + {else} + 无图片 + {/if} +
+
核验状态待核验
创建时间{$repair.create_at|default=""}
+
+ {/foreach} +
+
+
+ {/if} + {if $ticket.verify_process} +
+
+
+
审核流程
+
+
+
+ +
+

提交审核

+
+ {$ticket.verify_process.create_name}于{$ticket.verify_process.create_time|date='Y-m-d H:i:s'}提交 +
+ 审核说明:{$ticket.verify_process.content} +
+
+
+
+ {foreach $ticket.verify_process.steps as $index=>$step} + {include file="common/step" /} + {/foreach} +
+
+
+
+
+ {/if} + {if $ticket.verifys} +
+
+
验收信息
+
+ {foreach $ticket.verifys as $verify} +
+ + + + + + + {if $verify.status == 1} + + + + + + + + + + + + + + + + + {else} + + + + + {/if} + + + + + +
验收人{$verify.staff.name|default=""} ({$verify.staff.phone|default=""})
验收时间{$verify.finish_at|default=""}
验收结果描述{$verify.content|default=""}
验收图片 +
+ {if count($verify.imgs_arr) > 0} + {foreach $verify.imgs_arr as $img} + image +   + {/foreach} + {else} + 无图片 + {/if} +
+
完成时间{$verify.finish_at|default=""}
验收状态待验收
创建时间{$verify.create_at|default=""}
+
+ {/foreach} +
+
+
+ {/if} +
+
\ No newline at end of file diff --git a/plugs/think-plugs-ticket/src/view/repair/detail.html b/plugs/think-plugs-ticket/src/view/repair/detail.html new file mode 100644 index 0000000..b18f31f --- /dev/null +++ b/plugs/think-plugs-ticket/src/view/repair/detail.html @@ -0,0 +1,167 @@ +
+ +
+
+
+
工单内容
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {if $vo.ticket.lat && $vo.ticket.lng} + + + + + {/if} + +
工单编号{$vo.ticket.id|default=""}
工单标题{$vo.ticket.title|default=""}
工单类型{$vo.ticket.type_name|default=""}
工单地址{$vo.ticket.ticket_region|default=""} {$vo.ticket.ticket_address|default=""}
工单内容{$vo.ticket.content|default=""}
反馈人信息{$vo.ticket.contact_name|default="未填写名称"} {$vo.ticket.contact_phone|default="未填写联系方式"}
工单图片 +
+ {if count($vo.ticket.imgs_arr) > 0} + {foreach $vo.ticket.imgs_arr as $img} + image +   + {/foreach} + {else} + 无图片 + {/if} +
+
位置 +
+
+
+ {if $vo.ticket.lat && $vo.ticket.lng} + + + {/if} +
+
+
+
+
+
核验信息
+
+
+ + + + + + + {if $vo.status == 1} + + + + + + + + + + + + + + + + + {else} + + + + + {/if} + + + + + +
核验人{$vo.staff.name|default=""} ({$vo.staff.phone|default=""})
核验时间{$vo.finish_at|default=""}
是否存在异常{if $vo.is_error == 1}是{else}否{/if}
核验结果描述{$vo.content|default=""}
核验图片 +
+ {if count($vo.imgs_arr) > 0} + {foreach $vo.imgs_arr as $img} + image +   + {/foreach} + {else} + 无图片 + {/if} +
+
核验状态待核验
创建时间{$vo.create_at|default=""}
+
+
+
+
+
+ {include file="common/ticket_flow" /} +
+
+
\ No newline at end of file diff --git a/plugs/think-plugs-ticket/src/view/ticket/detail.html b/plugs/think-plugs-ticket/src/view/ticket/detail.html index 1814971..7f267b8 100644 --- a/plugs/think-plugs-ticket/src/view/ticket/detail.html +++ b/plugs/think-plugs-ticket/src/view/ticket/detail.html @@ -1,7 +1,7 @@
@@ -106,52 +106,7 @@
-
-
现场核实情况
- {if $vo.verify} -
- {foreach $vo.verify as $verify} - - - - - - - - - - - - - - - - - - - - - - - -
提交时间{$verify.create_at|default=""}
核实人{$verify.staff.name|default=""}【联系方式:{$verify.staff.phone|default=""}】
核实结果{$verify.content|default=""}
图片 -
- {foreach $verify.imgs_arr as $img} - image -   - {/foreach} -
-
预估工作量{$verify.work_days|default=""}
- {/foreach} -
- {else /} -
-
- 暂无核实记录 -
-
- {/if} -
+ {include file="common/ticket_flow" /}
diff --git a/plugs/think-plugs-ticket/src/view/ticket/index.html b/plugs/think-plugs-ticket/src/view/ticket/index.html index 7d613ce..751b66f 100644 --- a/plugs/think-plugs-ticket/src/view/ticket/index.html +++ b/plugs/think-plugs-ticket/src/view/ticket/index.html @@ -69,7 +69,16 @@ {field: 'view', title:'核验情况', width: 100, minWidth:100, templet:function(item){ if (item.views && item.views.length > 0) { // 已有核验工单 - return `查看工单`; + const view = item.views[item.views.length - 1]; + if (view.status == 1) { + if (view.is_error == 1) { + return `存在异常`; + } else { + return `不存在异常`; + } + } else { + return `查看工单`; + } } else if (item.view_pid) { // 已有核验流程 if (item.view_process.status === 0) { @@ -77,7 +86,7 @@ } else if (item.view_process.status === 1) { return `创建核验工单`; } else if (item.view_process.status === 2) { - return `已驳回`; + return `已驳回`; } else if (item.view_process.status === -1) { return `已取消` } @@ -98,7 +107,12 @@ } if (item.repairs && item.repairs.length > 0) { // 已有维修工单 - return `查看工单`; + const repair = item.repairs[item.repairs.length - 1]; + if (repair.status == 1) { + return `维修完毕`; + } else { + return `查看工单`; + } } else if (item.repair_pid) { // 已有维修流程 if (item.repair_process.status === 0) { @@ -106,7 +120,7 @@ } else if (item.repair_process.status === 1) { return `创建维修工单`; } else if (item.repair_process.status === 2) { - return `已驳回`; + return `已驳回`; } else if (item.repair_process.status === -1) { return `已取消` } @@ -129,14 +143,25 @@ // 还没有维修流程 return `请先维修` } - if (item.verify_pid) { + if (item.repairs[item.repairs.length - 1].status !== 1) { + return `请先完成维修` + } + if (item.verifys && item.verifys.length > 0) { + // 已有验收工单 + const verify = item.verifys[item.verifys.length - 1]; + if (verify.status == 1) { + return `验收完毕`; + } else { + return `查看工单`; + } + } else if (item.verify_pid) { // 已有验收流程 if (item.verify_process.status === 0) { return `正在审核` } else if (item.verify_process.status === 1) { return `创建验收工单`; } else if (item.verify_process.status === 2) { - return `已驳回`; + return `已驳回`; } else if (item.verify_process.status === -1) { return `已取消` } diff --git a/plugs/think-plugs-ticket/src/view/ticket/repair_ticket_create.html b/plugs/think-plugs-ticket/src/view/ticket/repair_ticket_create.html new file mode 100644 index 0000000..88312b9 --- /dev/null +++ b/plugs/think-plugs-ticket/src/view/ticket/repair_ticket_create.html @@ -0,0 +1,19 @@ +
+ + +
+ +
+ +
+
+
+ + +
+
diff --git a/plugs/think-plugs-ticket/src/view/ticket/verify_ticket_create.html b/plugs/think-plugs-ticket/src/view/ticket/verify_ticket_create.html new file mode 100644 index 0000000..76d7f52 --- /dev/null +++ b/plugs/think-plugs-ticket/src/view/ticket/verify_ticket_create.html @@ -0,0 +1,19 @@ +
+ + +
+ +
+ +
+
+
+ + +
+
diff --git a/plugs/think-plugs-ticket/src/view/verify/detail.html b/plugs/think-plugs-ticket/src/view/verify/detail.html new file mode 100644 index 0000000..49a9ccf --- /dev/null +++ b/plugs/think-plugs-ticket/src/view/verify/detail.html @@ -0,0 +1,163 @@ +
+
    +
  • 原始工单信息
  • +
  • 验收信息
  • +
  • 工单全流程信息
  • +
+
+
+
+
工单内容
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {if $vo.ticket.lat && $vo.ticket.lng} + + + + + {/if} + +
工单编号{$vo.ticket.id|default=""}
工单标题{$vo.ticket.title|default=""}
工单类型{$vo.ticket.type_name|default=""}
工单地址{$vo.ticket.ticket_region|default=""} {$vo.ticket.ticket_address|default=""}
工单内容{$vo.ticket.content|default=""}
反馈人信息{$vo.ticket.contact_name|default="未填写名称"} {$vo.ticket.contact_phone|default="未填写联系方式"}
工单图片 +
+ {if count($vo.ticket.imgs_arr) > 0} + {foreach $vo.ticket.imgs_arr as $img} + image +   + {/foreach} + {else} + 无图片 + {/if} +
+
位置 +
+
+
+ {if $vo.ticket.lat && $vo.ticket.lng} + + + {/if} +
+
+
+
+
+
验收信息
+
+
+ + + + + + + {if $vo.status == 1} + + + + + + + + + + + + + {else} + + + + + {/if} + + + + + +
验收人{$vo.staff.name|default=""} ({$vo.staff.phone|default=""})
验收时间{$vo.finish_at|default=""}
验收结果描述{$vo.content|default=""}
验收图片 +
+ {if count($vo.imgs_arr) > 0} + {foreach $vo.imgs_arr as $img} + image +   + {/foreach} + {else} + 无图片 + {/if} +
+
核验状态待核验
创建时间{$vo.create_at|default=""}
+
+
+
+
+
+ {include file="common/ticket_flow" /} +
+
+
\ No newline at end of file diff --git a/plugs/think-plugs-ticket/src/view/view/detail.html b/plugs/think-plugs-ticket/src/view/view/detail.html index a3c62df..9ae3992 100644 --- a/plugs/think-plugs-ticket/src/view/view/detail.html +++ b/plugs/think-plugs-ticket/src/view/view/detail.html @@ -2,9 +2,7 @@
@@ -121,18 +119,22 @@ {if $vo.status == 1} 核验时间 - {$vo.ticket.finish_at|default=""} + {$vo.finish_at|default=""} - 核验结果 - {$vo.ticket.content|default=""} + 是否存在异常 + {if $vo.is_error == 1}是{else}否{/if} + + + 核验结果描述 + {$vo.content|default=""} 核验图片
- {if count($vo.ticket.imgs_arr) > 0} - {foreach $vo.ticket.imgs_arr as $img} + {if count($vo.imgs_arr) > 0} + {foreach $vo.imgs_arr as $img} image   {/foreach} @@ -144,7 +146,7 @@ 预期工作量(天) - {$vo.workdays|default=""} + {$vo.workdays|default="-"} {else} @@ -162,27 +164,8 @@
- {if $vo.ticket.view_process}
-
-
-
审核流程
-
-
-
- -
-

提交审核

-
-
- {foreach $vo.ticket.view_process.steps as $index=>$step} - {include file="common/step" /} - {/foreach} -
-
-
-
+ {include file="common/ticket_flow" /}
- {/if}
\ No newline at end of file