diff --git a/application/admin/controller/orders/Dispatchlog.php b/application/admin/controller/orders/Dispatchlog.php
new file mode 100644
index 0000000..1468930
--- /dev/null
+++ b/application/admin/controller/orders/Dispatchlog.php
@@ -0,0 +1,71 @@
+model = new \app\admin\model\orders\Dispatchlog;
+
+ }
+
+
+
+ /**
+ * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法
+ * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑
+ * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改
+ */
+
+
+
+ /**
+ * 查看
+ *
+ * @return string|Json
+ * @throws \think\Exception
+ * @throws DbException
+ */
+ public function index()
+ {
+ //设置过滤方法
+ $this->request->filter(['strip_tags', 'trim']);
+
+ $dispatch_id = $this->request->get('dispatch_id');
+
+ if (false === $this->request->isAjax()) {
+ return $this->view->fetch();
+ }
+ //如果发送的来源是 Selectpage,则转发到 Selectpage
+ if ($this->request->request('keyField')) {
+ return $this->selectpage();
+ }
+ [$where, $sort, $order, $offset, $limit] = $this->buildparams();
+ $list = $this->model
+ ->where($where)
+ ->where('dispatch_id',$dispatch_id)
+ ->order($sort, $order)
+ ->paginate($limit);
+ $result = ['total' => $list->total(), 'rows' => $list->items()];
+ return json($result);
+ }
+
+}
diff --git a/application/admin/lang/zh-cn/orders/dispatchlog.php b/application/admin/lang/zh-cn/orders/dispatchlog.php
new file mode 100644
index 0000000..121f7e3
--- /dev/null
+++ b/application/admin/lang/zh-cn/orders/dispatchlog.php
@@ -0,0 +1,11 @@
+ '派单ID',
+ 'Order_id' => '订单ID',
+ 'Worker_id' => '师傅ID',
+ 'Status' => '状态',
+ 'Status_text' => '状态说明',
+ 'Remark' => '备注',
+ 'Create_time' => '时间'
+];
diff --git a/application/admin/model/orders/Dispatchlog.php b/application/admin/model/orders/Dispatchlog.php
new file mode 100644
index 0000000..08aff17
--- /dev/null
+++ b/application/admin/model/orders/Dispatchlog.php
@@ -0,0 +1,40 @@
+ [],
+ 'edit' => [],
+ ];
+
+}
diff --git a/application/admin/view/orders/dispatchlog/add.html b/application/admin/view/orders/dispatchlog/add.html
new file mode 100644
index 0000000..5c483c3
--- /dev/null
+++ b/application/admin/view/orders/dispatchlog/add.html
@@ -0,0 +1,51 @@
+
diff --git a/application/admin/view/orders/dispatchlog/edit.html b/application/admin/view/orders/dispatchlog/edit.html
new file mode 100644
index 0000000..8bb64e5
--- /dev/null
+++ b/application/admin/view/orders/dispatchlog/edit.html
@@ -0,0 +1,51 @@
+
diff --git a/application/admin/view/orders/dispatchlog/index.html b/application/admin/view/orders/dispatchlog/index.html
new file mode 100644
index 0000000..88e8e0d
--- /dev/null
+++ b/application/admin/view/orders/dispatchlog/index.html
@@ -0,0 +1,29 @@
+
+ {:build_heading()}
+
+
+
diff --git a/application/admin/view/orders/log/index.html b/application/admin/view/orders/log/index.html
index c52f7fa..81528f2 100644
--- a/application/admin/view/orders/log/index.html
+++ b/application/admin/view/orders/log/index.html
@@ -7,14 +7,11 @@
$dispatch,
- 'remark' => '后台取消:',
+ 'remark' => '后台取消,操作人:'.$auth->nickname,
];
Hook::listen('order_dispatch_change', $hookParams);
diff --git a/public/assets/js/backend/orders/dispatch2.js b/public/assets/js/backend/orders/dispatch2.js
index ab9dd92..6d226a9 100644
--- a/public/assets/js/backend/orders/dispatch2.js
+++ b/public/assets/js/backend/orders/dispatch2.js
@@ -105,6 +105,20 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
return false;
}
},*/
+ {
+ name: 'dispatchlog',
+ text:"记录",
+ title:"变更记录",
+ icon: 'fa fa-list',
+ url: function(row){
+ return 'orders/dispatchlog/index?dispatch_id='+row.id;
+ },
+ extend: 'data-toggle="tooltip" data-container="body"',
+ classname: 'btn btn-xs btn-default btn-dialog',
+ visible:function(row){
+ return true;
+ }
+ },
{
name: 'finish',
@@ -125,7 +139,7 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
name: 'addrecord',
text:"跟进",
title:"跟进信息",
- icon: 'fa fa-list',
+ icon: 'fa fa-pencil',
url: 'orders/dispatchrecord/add',
extend: 'data-toggle="tooltip" data-container="body"',
classname: 'btn btn-xs btn-warning btn-dialog',
@@ -246,6 +260,9 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form','layer'], function ($,
addrecord: function () {
Controller.api.bindevent();
},
+ dispatchlog: function () {
+ Controller.api.bindevent();
+ },
api: {
bindevent: function () {
Form.api.bindevent($("form[role=form]"));
diff --git a/public/assets/js/backend/orders/dispatchlog.js b/public/assets/js/backend/orders/dispatchlog.js
new file mode 100644
index 0000000..06aefd9
--- /dev/null
+++ b/public/assets/js/backend/orders/dispatchlog.js
@@ -0,0 +1,59 @@
+define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) {
+
+ var Controller = {
+ index: function () {
+ // 初始化表格参数配置
+ Table.api.init({
+ extend: {
+ index_url: 'orders/dispatchlog/index' + location.search,
+ // add_url: 'orders/dispatchlog/add',
+ // edit_url: 'orders/dispatchlog/edit',
+ // del_url: 'orders/dispatchlog/del',
+ multi_url: 'orders/dispatchlog/multi',
+ import_url: 'orders/dispatchlog/import',
+ table: 'order_dispatch_log',
+ }
+ });
+
+ var table = $("#table");
+
+ // 初始化表格
+ table.bootstrapTable({
+ url: $.fn.bootstrapTable.defaults.extend.index_url,
+ pk: 'id',
+ sortName: 'id',
+ commonSearch:false,
+ search:false,
+ columns: [
+ [
+ // {checkbox: true},
+ {field: 'id', title: __('Id')},
+ // {field: 'dispatch_id', title: __('Dispatch_id')},
+ //{field: 'order_id', title: __('Order_id')},
+ //{field: 'worker_id', title: __('Worker_id')},
+ // {field: 'status', title: __('Status')},
+ {field: 'status_text', title: __('Status_text'), operate: 'LIKE'},
+ {field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content},
+ {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false},
+ // {field: 'operate', title: __('Operate'), table: table, events: Table.api.events.operate, formatter: Table.api.formatter.operate}
+ ]
+ ]
+ });
+
+ // 为表格绑定事件
+ Table.api.bindevent(table);
+ },
+ add: function () {
+ Controller.api.bindevent();
+ },
+ edit: function () {
+ Controller.api.bindevent();
+ },
+ api: {
+ bindevent: function () {
+ Form.api.bindevent($("form[role=form]"));
+ }
+ }
+ };
+ return Controller;
+});