You've already forked guangan
工单处理
This commit is contained in:
@ -150,7 +150,6 @@ class Ticket extends Controller
|
|||||||
{
|
{
|
||||||
$this->title = "工单分配";
|
$this->title = "工单分配";
|
||||||
if ($this->request->isPost()) {
|
if ($this->request->isPost()) {
|
||||||
$this->_applyFormToken();
|
|
||||||
// 提交
|
// 提交
|
||||||
$data = $this->_vali([
|
$data = $this->_vali([
|
||||||
'id.require' => '请指定工单ID!',
|
'id.require' => '请指定工单ID!',
|
||||||
@ -169,6 +168,14 @@ class Ticket extends Controller
|
|||||||
// 外部
|
// 外部
|
||||||
$ticket->state = 2;
|
$ticket->state = 2;
|
||||||
}
|
}
|
||||||
|
if ($ticket->fz_user_id) {
|
||||||
|
$staff = InspectionStaff::query()->find($ticket->fz_user_id);
|
||||||
|
$staff->messages()->save([
|
||||||
|
'title' => "您有新的工单待处理",
|
||||||
|
'content' => "您有新的工单待处理,请及时处理。",
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
$ticket->status = 1;
|
||||||
$ticket->save();
|
$ticket->save();
|
||||||
$this->success('工单分配成功!');
|
$this->success('工单分配成功!');
|
||||||
} else {
|
} else {
|
||||||
@ -360,7 +367,7 @@ class Ticket extends Controller
|
|||||||
$query->like(['title|content|contact_name|ticket_address|contact_phone#keyword'])
|
$query->like(['title|content|contact_name|ticket_address|contact_phone#keyword'])
|
||||||
->dateBetween(['create_at'])
|
->dateBetween(['create_at'])
|
||||||
->equal(['status', 'type_id']);
|
->equal(['status', 'type_id']);
|
||||||
$query->whereIn("id", ApprovalStep::query()->where(['approver_id' => $this->user_id, 'status' => 0, 'approver_type' => 1, 'instance.status' => 0]))
|
$query->whereIn("id", ApprovalStep::query()->where(['approver_id' => $this->user_id, 'status' => 0, 'approver_type' => 1, 'instance.status' => 0])->field("oid")->select())
|
||||||
->append(['imgs_arr', 'source_type_name', 'status_text', 'type_name', 'last_reply'])->with('approval');
|
->append(['imgs_arr', 'source_type_name', 'status_text', 'type_name', 'last_reply'])->with('approval');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{extend name="table"}
|
{extend name="table"}
|
||||||
|
|
||||||
{block name="button"}
|
{block name="button"}
|
||||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" data-modal='{:url("my")}' data-title="我的工单">我的工单</button>
|
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" data-open='{:url("my")}' data-title="我审核的">我审核的</button>
|
||||||
<!--{if auth("add")}-->
|
<!--{if auth("add")}-->
|
||||||
<button type="button" class="layui-btn layui-btn-sm" data-modal='{:url("add")}' data-title="添加工单">添加工单</button>
|
<button type="button" class="layui-btn layui-btn-sm" data-modal='{:url("add")}' data-title="添加工单">添加工单</button>
|
||||||
<!--{/if}-->
|
<!--{/if}-->
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
{extend name="table"}
|
{extend name="table"}
|
||||||
|
|
||||||
{block name="button"}
|
{block name="button"}
|
||||||
<button type="button" class="layui-btn layui-btn-sm layui-btn-primary" data-modal='{:url("my")}' data-title="我的工单">我的工单</button>
|
|
||||||
<!--{if auth("add")}-->
|
|
||||||
<button type="button" class="layui-btn layui-btn-sm" data-modal='{:url("add")}' data-title="添加工单">添加工单</button>
|
|
||||||
<!--{/if}-->
|
|
||||||
{/block}
|
{/block}
|
||||||
|
|
||||||
{block name="content"}
|
{block name="content"}
|
||||||
|
Reference in New Issue
Block a user