diff --git a/app/controller/manager/mall/Order.php b/app/controller/manager/mall/Order.php index 5e952b6..45fcf6f 100755 --- a/app/controller/manager/mall/Order.php +++ b/app/controller/manager/mall/Order.php @@ -101,6 +101,7 @@ class Order extends Base $isScore = $searchParams['is_score'] ?? 0; $whereMap = []; + $userWhereMap = []; $order = ['id' => 'desc']; $whereMap[] = ['is_score', '=', $isScore]; @@ -130,9 +131,19 @@ class Order extends Base if (isset($searchParams['phone']) && !empty($searchParams['phone'])) { $whereMap[] = ['phone', 'like', "%".$searchParams['phone']."%"]; } + if (isset($searchParams['nickname']) && !empty($searchParams['nickname'])) { + $userWhereMap[] = ['nickname', 'like', "%".$searchParams['nickname']."%"]; + } - $res = OrderModel::findList($whereMap, [], $page, $size, function ($q) { - return $q->with(['account']); + + $res = OrderModel::findList($whereMap, [], $page, $size, function ($q)use($userWhereMap) { + if (!empty($userWhereMap)) { + return $q->hasWhere('account', function ($query) use ($userWhereMap) { + $query->where($userWhereMap); + }); + } else { + return $q->with(['account']); + } }, $order); $res['list'] = $res['list']->each(function ($item) { diff --git a/public/static/layuimini/js/lay-module/wangEditor/fonts/w-e-icon.woff b/public/static/layuimini/js/lay-module/wangEditor/fonts/w-e-icon.woff index 6dc5b5a..e69de29 100755 Binary files a/public/static/layuimini/js/lay-module/wangEditor/fonts/w-e-icon.woff and b/public/static/layuimini/js/lay-module/wangEditor/fonts/w-e-icon.woff differ diff --git a/public/static/manager/js/mall/order.js b/public/static/manager/js/mall/order.js index 8dd564c..02db3a9 100755 --- a/public/static/manager/js/mall/order.js +++ b/public/static/manager/js/mall/order.js @@ -135,6 +135,11 @@ layui.use(['laytpl', 'table', 'jquery', 'form', 'miniTab', 'xmSelect', 'laydate' // {field: 'paid_at', title: '支付时间', width: 180, hide: true}, {field: 'status_text', title: '订单状态', minWidth: 100}, {field: 'contacts', title: '联系人',minWidth: 150}, + {templet: function (d) { + if(d.account!==undefined){ + return d.account.nickname; + } + }, title: '微信号',minWidth: 150}, {field: 'phone',title: '电话',minWidth: 150}, // {field: 'pick_self_text', title: '配送方式',minWidth: 150}, // {field: 'is_score_text', title: '积分订单', minWidth: 150}, diff --git a/view/manager/mall/order/index.html b/view/manager/mall/order/index.html index 803691f..a1e4e5f 100755 --- a/view/manager/mall/order/index.html +++ b/view/manager/mall/order/index.html @@ -54,6 +54,14 @@ +