diff --git a/app/custom/controller/api/auth/Message.php b/app/custom/controller/api/auth/Message.php
index c582a40..501fba1 100644
--- a/app/custom/controller/api/auth/Message.php
+++ b/app/custom/controller/api/auth/Message.php
@@ -9,7 +9,7 @@ class Message extends Auth
{
public function index()
{
- $pageData = CustomMessage::query()->where('user_id', $this->usid)->paginate();
+ $pageData = CustomMessage::query()->where('user_id', $this->usid)->order('id', 'desc')->paginate();
$this->success('获取消息列表', $pageData);
}
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 c19e88b..74d8ba0 100644
--- a/plugs/think-plugs-inspection/src/controller/api/auth/TicketView.php
+++ b/plugs/think-plugs-inspection/src/controller/api/auth/TicketView.php
@@ -44,7 +44,7 @@ class TicketView extends Auth
'ys_content.default' => '',
'is_error.in:0,1' => '请选择是否有异常',
'imgs.default' => '',
- 'work_days.default' => '',
+ 'work_days.default' => '0',
]);
$ticket = Model::query()->with(['ticket'])->where('staff_id', '=', $this->staff->id)->where(['id'=>$data['ticket_id']])->find();
if (!$ticket) {
@@ -60,6 +60,11 @@ class TicketView extends Auth
try {
$data['status'] = 1;
$ticket->finish_at = date('Y-m-d H:i:s');
+ $ticket->ticket->gc_content = $data['gc_content'];
+ $ticket->ticket->zf_content = $data['zf_content'];
+ $ticket->ticket->ys_content = $data['ys_content'];
+ $ticket->ticket->work_days = $data['work_days'];
+ $ticket->ticket->save();
$ticket->save($data);
} catch (\Exception $exception) {
$this->error('工单提交失败');
diff --git a/plugs/think-plugs-ticket/src/controller/Ticket.php b/plugs/think-plugs-ticket/src/controller/Ticket.php
index 9265976..cf021ce 100644
--- a/plugs/think-plugs-ticket/src/controller/Ticket.php
+++ b/plugs/think-plugs-ticket/src/controller/Ticket.php
@@ -371,6 +371,10 @@ class Ticket extends Controller
if ($staff->isEmpty()) {
$this->error('未找到维修人员信息');
}
+ $ticket->gc_content = '';
+ $ticket->zf_content = '';
+ $ticket->ys_content = '';
+ $ticket->work_days = null;
$view = $ticket->views()->save([
'staff_id'=>$instance_data['staff_id'],
'status'=>0,
@@ -383,6 +387,7 @@ class Ticket extends Controller
'type' => 'TICKET_VIEW',
'oid' => $view->id,
]);
+ $ticket->save();
$this->success('创建成功!', $view);
} else {
$this->vo = $ticket;
diff --git a/plugs/think-plugs-ticket/src/controller/TicketOuter.php b/plugs/think-plugs-ticket/src/controller/TicketOuter.php
index ff07a94..7fcb7f0 100644
--- a/plugs/think-plugs-ticket/src/controller/TicketOuter.php
+++ b/plugs/think-plugs-ticket/src/controller/TicketOuter.php
@@ -200,6 +200,7 @@ class TicketOuter extends Controller
TicketTicket::mk()->rollback();
$this->error("保存失败");
}
+ $this->success("保存成功");
} else {
$this->vo = $ticket;
$this->ticket = $ticket;
diff --git a/plugs/think-plugs-ticket/src/controller/UserShare.php b/plugs/think-plugs-ticket/src/controller/UserShare.php
index 85dee43..02c23ce 100644
--- a/plugs/think-plugs-ticket/src/controller/UserShare.php
+++ b/plugs/think-plugs-ticket/src/controller/UserShare.php
@@ -52,7 +52,7 @@ class UserShare extends Controller
$where = $this->_vali([
'id.require' => '随手拍ID不能为空',
]);
- $this->vo = TicketUserShare::mk()->where($where)->with(['linked_ticket'])->findOrEmpty();
+ $this->vo = TicketUserShare::mk()->where($where)->with(['linked_ticket', 'logs'])->findOrEmpty();
if ($this->vo->isEmpty()) $this->error('用户随手拍不存在!');
if (!$this->vo->linked_ticket_id) {
$this->ticket_list = TicketTicket::mk()->scope(['avail'])->select();
diff --git a/plugs/think-plugs-ticket/src/view/approval_instance/detail.html b/plugs/think-plugs-ticket/src/view/approval_instance/detail.html
index ec8897c..d55426f 100644
--- a/plugs/think-plugs-ticket/src/view/approval_instance/detail.html
+++ b/plugs/think-plugs-ticket/src/view/approval_instance/detail.html
@@ -1,7 +1,7 @@
-
-
-
-
-
-
-
- 工单编号 |
- {$ticket.id|default=""} |
-
-
- 工单标题 |
- {$ticket.title|default=""} |
-
-
- 工单类型 |
- {$ticket.type_name|default=""} |
-
-
- 工单地址 |
- {$ticket.ticket_region|default=""} {$ticket.ticket_address|default=""} |
-
-
- 工单内容 |
- {$ticket.content|default=""} |
-
-
- 反馈人信息 |
- {$ticket.contact_name|default="未填写名称"} {$ticket.contact_phone|default="未填写联系方式"} |
-
-
- 工单图片 |
-
-
- {if count($ticket.imgs_arr) > 0}
- {foreach $ticket.imgs_arr as $img}
- 
-
- {/foreach}
- {else}
- 无图片
- {/if}
-
- |
-
- {if $ticket.lat && $ticket.lng}
-
- 位置 |
-
-
- |
-
- {/if}
-
-
-
- {if $ticket.lat && $ticket.lng}
-
-
- {/if}
-
-
+ {include file="common/ticket_flow" /}
\ No newline at end of file
diff --git a/plugs/think-plugs-ticket/src/view/common/step.html b/plugs/think-plugs-ticket/src/view/common/step.html
index 136d23f..4839860 100644
--- a/plugs/think-plugs-ticket/src/view/common/step.html
+++ b/plugs/think-plugs-ticket/src/view/common/step.html
@@ -25,6 +25,7 @@
审核说明:{$step.content}
{else}
+ {$step.title}
{/if}
diff --git a/plugs/think-plugs-ticket/src/view/common/ticket_flow.html b/plugs/think-plugs-ticket/src/view/common/ticket_flow.html
index f3643e3..17113aa 100644
--- a/plugs/think-plugs-ticket/src/view/common/ticket_flow.html
+++ b/plugs/think-plugs-ticket/src/view/common/ticket_flow.html
@@ -113,15 +113,15 @@
工程内容 |
- {$vo.gc_content|default=""} |
+ {$view.gc_content|default=""} |
做法及质量要求 |
- {$vo.zf_content|default=""} |
+ {$view.zf_content|default=""} |
工程预算 |
- {$vo.ys_content|default=""} |
+ {$view.ys_content|default=""} |
核验图片 |
@@ -140,7 +140,7 @@
预期工作量(天) |
- {$view.workdays|default="-"} |
+ {$view.work_days|default="-"} |
完成时间 |
diff --git a/plugs/think-plugs-ticket/src/view/ticket/index.html b/plugs/think-plugs-ticket/src/view/ticket/index.html
index 2391c6f..3af1104 100644
--- a/plugs/think-plugs-ticket/src/view/ticket/index.html
+++ b/plugs/think-plugs-ticket/src/view/ticket/index.html
@@ -39,7 +39,7 @@
{{# } }}
{{# } else { }}
- 创建核验工单
+ 创建核验工单
{{# } }}
{{# } }}
diff --git a/plugs/think-plugs-ticket/src/view/ticket_outer/comment.html b/plugs/think-plugs-ticket/src/view/ticket_outer/comment.html
new file mode 100644
index 0000000..4a48a08
--- /dev/null
+++ b/plugs/think-plugs-ticket/src/view/ticket_outer/comment.html
@@ -0,0 +1,18 @@
+
+
+{include file="ticket/detail"}
\ No newline at end of file
diff --git a/plugs/think-plugs-ticket/src/view/ticket_outer/detail.html b/plugs/think-plugs-ticket/src/view/ticket_outer/detail.html
index 439f083..1501a2d 100644
--- a/plugs/think-plugs-ticket/src/view/ticket_outer/detail.html
+++ b/plugs/think-plugs-ticket/src/view/ticket_outer/detail.html
@@ -1,8 +1,7 @@
- 基本信息
- - 核实情况
- - 维修情况
+ - 工单全流程信息
+ {if $vo.lat && $vo.lng}
+
+ 位置 |
+
+
+ |
+
+ {/if}
+ {if $vo.lat && $vo.lng}
+
+
+ {/if}
-
-
- {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}
- 
-
- {/foreach}
-
- |
-
-
- 预估工作量 |
- {$verify.work_days|default=""} |
-
-
-
- {/foreach}
-
- {else /}
-
- {/if}
-
-
-
-
-
- {if $vo.repair}
-
- {foreach $vo.repair as $repair}
-
-
-
- 提交时间 |
- {$repair.create_at|default=""} |
-
-
- 维修人 |
- {$repair.staff.name|default=""}【联系方式:{$repair.staff.phone|default=""}】 |
-
-
- 维修结果 |
- {$repair.content|default=""} |
-
-
- 图片 |
-
-
- {foreach $repair.imgs_arr as $img}
- 
-
- {/foreach}
-
- |
-
-
- 预估工作量 |
- {$verify.work_days|default=""} |
-
-
-
- {/foreach}
-
- {else /}
-
- {/if}
-
+ {include file="common/ticket_flow" /}
-
\ No newline at end of file
+
diff --git a/plugs/think-plugs-ticket/src/view/ticket_outer/index.html b/plugs/think-plugs-ticket/src/view/ticket_outer/index.html
index 694032f..5f7d291 100644
--- a/plugs/think-plugs-ticket/src/view/ticket_outer/index.html
+++ b/plugs/think-plugs-ticket/src/view/ticket_outer/index.html
@@ -71,6 +71,9 @@
}
}},
{field: 'view', title:'核验情况', width: 100, minWidth:100, templet:function(item){
+ if (item.source_type !== 1) {
+ return `-`
+ }
if (item.views && item.views.length > 0) {
// 已有核验工单
const view = item.views[item.views.length - 1];
diff --git a/plugs/think-plugs-ticket/src/view/user_share/detail.html b/plugs/think-plugs-ticket/src/view/user_share/detail.html
index bed09c3..a653869 100644
--- a/plugs/think-plugs-ticket/src/view/user_share/detail.html
+++ b/plugs/think-plugs-ticket/src/view/user_share/detail.html
@@ -2,6 +2,7 @@
@@ -274,5 +275,28 @@
{/if}
+
+
+
+
+
+
+
+
+
+ {foreach $vo.logs as $log}
+
+ {$log.content} |
+ {$log.create_at} |
+
+ {/foreach}
+
+
+
+
+
diff --git a/plugs/think-plugs-ticket/src/view/view/detail.html b/plugs/think-plugs-ticket/src/view/view/detail.html
index 1bdf559..142ce00 100644
--- a/plugs/think-plugs-ticket/src/view/view/detail.html
+++ b/plugs/think-plugs-ticket/src/view/view/detail.html
@@ -7,7 +7,10 @@
-
+
@@ -36,6 +39,22 @@
反馈人信息 |
{$vo.ticket.contact_name|default="未填写名称"} {$vo.ticket.contact_phone|default="未填写联系方式"} |
+
+ 工程内容 |
+ {$vo.ticket.gc_content|default="-- 待核验 --"} |
+
+
+ 做法及质量要求 |
+ {$vo.ticket.zf_content|default="-- 待核验 --"} |
+
+
+ 工程预算 |
+ {$vo.ticket.ys_content|default="-- 待核验 --"} |
+
+
+ 预估工作量 |
+ {$vo.ticket.work_days|default="-- 待核验 --"} |
+
工单图片 |
|