From a7e4ce07abc64d0cb70167b0530651d3e901ef33 Mon Sep 17 00:00:00 2001 From: xman <1946321327@qq.com> Date: Wed, 5 Mar 2025 20:53:32 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=9E=E8=AE=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/admin/controller/Order.php | 2 +- .../admin/controller/orders/Auditorder.php | 75 +++++++ .../admin/lang/zh-cn/orders/auditorder.php | 66 ++++++ .../admin/view/orders/auditorder/add.html | 197 ++++++++++++++++++ .../admin/view/orders/auditorder/edit.html | 197 ++++++++++++++++++ .../admin/view/orders/auditorder/index.html | 35 ++++ public/assets/js/backend/orders/auditorder.js | 97 +++++++++ 7 files changed, 668 insertions(+), 1 deletion(-) create mode 100644 application/admin/controller/orders/Auditorder.php create mode 100644 application/admin/lang/zh-cn/orders/auditorder.php create mode 100644 application/admin/view/orders/auditorder/add.html create mode 100644 application/admin/view/orders/auditorder/edit.html create mode 100644 application/admin/view/orders/auditorder/index.html create mode 100644 public/assets/js/backend/orders/auditorder.js diff --git a/application/admin/controller/Order.php b/application/admin/controller/Order.php index 1b91078..e398a4e 100644 --- a/application/admin/controller/Order.php +++ b/application/admin/controller/Order.php @@ -26,7 +26,7 @@ class Order extends Backend parent::_initialize(); $this->model = new \app\admin\model\Order; $this->view->assign("statusList", $this->model->getStatusList()); - $this->view->assign("collectList", $this->model->getCollectList()); + //$this->view->assign("collectList", $this->model->getCollectList()); $this->view->assign("dispatchTypeList", $this->model->getDispatchTypeList()); } diff --git a/application/admin/controller/orders/Auditorder.php b/application/admin/controller/orders/Auditorder.php new file mode 100644 index 0000000..8c2412f --- /dev/null +++ b/application/admin/controller/orders/Auditorder.php @@ -0,0 +1,75 @@ +model = new \app\admin\model\Order(); + $this->view->assign("statusList", $this->model->getStatusList()); + } + + + + /** + * 默认生成的控制器所继承的父类中有index/add/edit/del/multi五个基础方法、destroy/restore/recyclebin三个回收站方法 + * 因此在当前控制器中可不用编写增删改查的代码,除非需要自己控制这部分逻辑 + * 需要将application/admin/library/traits/Backend.php中对应的方法复制到当前控制器,然后进行修改 + */ + + + /** + * 查看 + */ + public function index() + { + //当前是否为关联查询 + $this->relationSearch = true; + //设置过滤方法 + $this->request->filter(['strip_tags', 'trim']); + if ($this->request->isAjax()) { + //如果发送的来源是Selectpage,则转发到Selectpage + if ($this->request->request('keyField')) { + return $this->selectpage(); + } + list($where, $sort, $order, $offset, $limit) = $this->buildparams(); + + + $list = $this->model + ->scope('tab',Order::TAB_AUDIT) + ->alias('order') + ->with(['admin']) + ->where($where) + ->order($sort, $order) + ->paginate($limit); + + foreach ($list as $row) { + + + } + + $result = array("total" => $list->total(), "rows" => $list->items()); + + return json($result); + } + return $this->view->fetch(); + } + +} diff --git a/application/admin/lang/zh-cn/orders/auditorder.php b/application/admin/lang/zh-cn/orders/auditorder.php new file mode 100644 index 0000000..4440ebd --- /dev/null +++ b/application/admin/lang/zh-cn/orders/auditorder.php @@ -0,0 +1,66 @@ + 'ID', + 'User_id' => '用户ID', + 'Order_no' => '订单号', + 'Customer' => '客户姓名', + 'Tel' => '客户电话', + 'Status' => '订单状态', + 'Status 10' => '未派单', + 'Set status to 10' => '设为未派单', + 'Status 20' => '已派单', + 'Set status to 20' => '设为已派单', + 'Status 30' => '进行中', + 'Set status to 30' => '设为进行中', + 'Status 40' => '待验收', + 'Set status to 40' => '设为待验收', + 'Status 41' => '审核驳回', + 'Set status to 41' => '设为审核驳回', + 'Status 50' => '待财务审核', + 'Set status to 50' => '设为待财务审核', + 'Status 60' => '已完成', + 'Set status to 60' => '设为已完成', + 'Status -10' => '取消', + 'Set status to -10' => '设为取消', + 'Area_id' => '地域', + 'Address' => '详细地址', + 'Lng' => '经度', + 'Lat' => '纬度', + 'Work_tel_id' => '工作机', + 'Source_shop' => '来源店铺', + 'Source' => '订单来源', + 'Source_uid' => '来源UID', + 'Item_id' => '服务ID', + 'Item_title' => '服务名称', + 'Detail' => '订单详情', + 'Remark' => '订单备注', + 'Images' => '图片', + 'Plan_time' => '客户预约时间', + 'Admin_id' => '录单员ID', + 'Total' => '总收款', + 'Cost' => '师傅成本', + 'Performance' => '预计利润', + 'Cancel_reason_id' => '取消原因', + 'Cancel_detail' => '取消详情', + 'Audit_remark' => '审核备注', + 'Audit_admin_id' => '审核员', + 'Create_time' => '录单时间', + 'Update_time' => '更新时间', + 'Delete_time' => '删除时间', + 'Admin.id' => 'ID', + 'Admin.username' => '用户名', + 'Admin.nickname' => '昵称', + 'Admin.password' => '密码', + 'Admin.salt' => '密码盐', + 'Admin.avatar' => '头像', + 'Admin.email' => '电子邮箱', + 'Admin.mobile' => '手机号码', + 'Admin.loginfailure' => '失败次数', + 'Admin.logintime' => '登录时间', + 'Admin.loginip' => '登录IP', + 'Admin.createtime' => '创建时间', + 'Admin.updatetime' => '更新时间', + 'Admin.token' => 'Session标识', + 'Admin.status' => '状态' +]; diff --git a/application/admin/view/orders/auditorder/add.html b/application/admin/view/orders/auditorder/add.html new file mode 100644 index 0000000..9e1e82c --- /dev/null +++ b/application/admin/view/orders/auditorder/add.html @@ -0,0 +1,197 @@ +
+ +
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+ {foreach name="statusList" item="vo"} + + {/foreach} +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+
+ +
+ + +
+ +
+
    +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    + +
    diff --git a/application/admin/view/orders/auditorder/edit.html b/application/admin/view/orders/auditorder/edit.html new file mode 100644 index 0000000..639365a --- /dev/null +++ b/application/admin/view/orders/auditorder/edit.html @@ -0,0 +1,197 @@ +
    + +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    + {foreach name="statusList" item="vo"} + + {/foreach} +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    + +
    + + +
    + +
    +
      +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      + +
      diff --git a/application/admin/view/orders/auditorder/index.html b/application/admin/view/orders/auditorder/index.html new file mode 100644 index 0000000..aa2f5ec --- /dev/null +++ b/application/admin/view/orders/auditorder/index.html @@ -0,0 +1,35 @@ +
      + +
      +
      +
      +
      +
      + + {:__('Add')} + {:__('Edit')} + {:__('Delete')} + + + + + +
      + +
      +
      +
      + +
      +
      +
      diff --git a/public/assets/js/backend/orders/auditorder.js b/public/assets/js/backend/orders/auditorder.js new file mode 100644 index 0000000..da710cb --- /dev/null +++ b/public/assets/js/backend/orders/auditorder.js @@ -0,0 +1,97 @@ +define(['jquery', 'bootstrap', 'backend', 'table', 'form'], function ($, undefined, Backend, Table, Form) { + + var Controller = { + index: function () { + // 初始化表格参数配置 + Table.api.init({ + extend: { + index_url: 'orders/auditorder/index' + location.search, + add_url: 'orders/auditorder/add', + edit_url: 'orders/auditorder/edit', + del_url: 'orders/auditorder/del', + multi_url: 'orders/auditorder/multi', + import_url: 'orders/auditorder/import', + table: 'order', + } + }); + + var table = $("#table"); + + // 初始化表格 + table.bootstrapTable({ + url: $.fn.bootstrapTable.defaults.extend.index_url, + pk: 'id', + sortName: 'id', + fixedColumns: true, + fixedRightNumber: 1, + columns: [ + [ + {checkbox: true}, + {field: 'id', title: __('Id')}, + {field: 'user_id', title: __('User_id')}, + {field: 'order_no', title: __('Order_no'), operate: 'LIKE'}, + {field: 'customer', title: __('Customer'), operate: 'LIKE'}, + {field: 'tel', title: __('Tel'), operate: 'LIKE'}, + {field: 'status', title: __('Status'), searchList: {"10":__('Status 10'),"20":__('Status 20'),"30":__('Status 30'),"40":__('Status 40'),"41":__('Status 41'),"50":__('Status 50'),"60":__('Status 60'),"-10":__('Status -10')}, formatter: Table.api.formatter.status}, + {field: 'area_id', title: __('Area_id')}, + {field: 'address', title: __('Address'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + {field: 'lng', title: __('Lng'), operate:'BETWEEN'}, + {field: 'lat', title: __('Lat'), operate:'BETWEEN'}, + {field: 'work_tel_id', title: __('Work_tel_id')}, + {field: 'source_shop', title: __('Source_shop'), operate: 'LIKE'}, + {field: 'source', title: __('Source')}, + {field: 'source_uid', title: __('Source_uid'), operate: 'LIKE'}, + {field: 'item_id', title: __('Item_id')}, + {field: 'item_title', title: __('Item_title'), operate: 'LIKE'}, + {field: 'detail', title: __('Detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + {field: 'remark', title: __('Remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + {field: 'images', title: __('Images'), operate: false, events: Table.api.events.image, formatter: Table.api.formatter.images}, + {field: 'plan_time', title: __('Plan_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false}, + {field: 'admin_id', title: __('Admin_id')}, + {field: 'total', title: __('Total'), operate:'BETWEEN'}, + {field: 'cost', title: __('Cost'), operate:'BETWEEN'}, + {field: 'performance', title: __('Performance'), operate:'BETWEEN'}, + {field: 'cancel_reason_id', title: __('Cancel_reason_id')}, + {field: 'cancel_detail', title: __('Cancel_detail'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + {field: 'audit_remark', title: __('Audit_remark'), operate: 'LIKE', table: table, class: 'autocontent', formatter: Table.api.formatter.content}, + {field: 'audit_admin_id', title: __('Audit_admin_id')}, + {field: 'create_time', title: __('Create_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false}, + {field: 'update_time', title: __('Update_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false}, + {field: 'delete_time', title: __('Delete_time'), operate:'RANGE', addclass:'datetimerange', autocomplete:false}, + {field: 'admin.id', title: __('Admin.id')}, + {field: 'admin.username', title: __('Admin.username'), operate: 'LIKE'}, + {field: 'admin.nickname', title: __('Admin.nickname'), operate: 'LIKE'}, + {field: 'admin.password', title: __('Admin.password'), operate: 'LIKE'}, + {field: 'admin.salt', title: __('Admin.salt'), operate: 'LIKE'}, + {field: 'admin.avatar', title: __('Admin.avatar'), operate: 'LIKE', events: Table.api.events.image, formatter: Table.api.formatter.image}, + {field: 'admin.email', title: __('Admin.email'), operate: 'LIKE'}, + {field: 'admin.mobile', title: __('Admin.mobile'), operate: 'LIKE'}, + {field: 'admin.loginfailure', title: __('Admin.loginfailure')}, + {field: 'admin.logintime', title: __('Admin.logintime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'admin.loginip', title: __('Admin.loginip'), operate: 'LIKE'}, + {field: 'admin.createtime', title: __('Admin.createtime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'admin.updatetime', title: __('Admin.updatetime'), operate:'RANGE', addclass:'datetimerange', autocomplete:false, formatter: Table.api.formatter.datetime}, + {field: 'admin.token', title: __('Admin.token'), operate: 'LIKE'}, + {field: 'admin.status', title: __('Admin.status'), operate: 'LIKE', formatter: Table.api.formatter.status}, + {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; +});