正在显示
10 个修改的文件
包含
120 行增加
和
14 行删除
| @@ -50,5 +50,7 @@ | @@ -50,5 +50,7 @@ | ||
| 50 | <path value="$PROJECT_DIR$/vendor/karsonzhang/fastadmin-addons" /> | 50 | <path value="$PROJECT_DIR$/vendor/karsonzhang/fastadmin-addons" /> |
| 51 | </include_path> | 51 | </include_path> |
| 52 | </component> | 52 | </component> |
| 53 | - <component name="PhpProjectSharedConfiguration" php_language_level="7.2" /> | 53 | + <component name="PhpProjectSharedConfiguration" php_language_level="8.0"> |
| 54 | + <option name="suggestChangeDefaultLanguageLevel" value="false" /> | ||
| 55 | + </component> | ||
| 54 | </project> | 56 | </project> |
| @@ -61,7 +61,8 @@ class Dashboard extends Backend | @@ -61,7 +61,8 @@ class Dashboard extends Backend | ||
| 61 | 'todayusersignup' => User::whereTime('jointime', 'today')->count(), | 61 | 'todayusersignup' => User::whereTime('jointime', 'today')->count(), |
| 62 | 'todayuserlogin' => User::whereTime('logintime', 'today')->count(), | 62 | 'todayuserlogin' => User::whereTime('logintime', 'today')->count(), |
| 63 | 'sevendau' => User::whereTime('jointime|logintime|prevtime', '-7 days')->count(), | 63 | 'sevendau' => User::whereTime('jointime|logintime|prevtime', '-7 days')->count(), |
| 64 | - 'thirtydau' => User::whereTime('jointime|logintime|prevtime', '-30 days')->count(), | 64 | + //'thirtydau' => User::whereTime('jointime|logintime|prevtime', '-30 days')->count(), |
| 65 | + 'newadditionorder' => \app\admin\model\Order::where("is_check",0)->count(), | ||
| 65 | 'threednu' => User::whereTime('jointime', '-3 days')->count(), | 66 | 'threednu' => User::whereTime('jointime', '-3 days')->count(), |
| 66 | 'sevendnu' => User::whereTime('jointime', '-7 days')->count(), | 67 | 'sevendnu' => User::whereTime('jointime', '-7 days')->count(), |
| 67 | 'dbtablenums' => count($dbTableList), | 68 | 'dbtablenums' => count($dbTableList), |
| @@ -59,6 +59,7 @@ class Order extends Backend | @@ -59,6 +59,7 @@ class Order extends Backend | ||
| 59 | ->where($where) | 59 | ->where($where) |
| 60 | ->order($sort, $order) | 60 | ->order($sort, $order) |
| 61 | ->paginate($limit); | 61 | ->paginate($limit); |
| 62 | + $res=$this->model->where("id",">",0)->update(["is_check"=>1]); | ||
| 62 | 63 | ||
| 63 | foreach ($list as $row) { | 64 | foreach ($list as $row) { |
| 64 | $row->visible(['id', 'order_no', 'type','intended_driver_id', 'pay_type', 'price', 'is_pay', 'user_name', 'driver_name', 'pay_time', 'refund_time', 'create_time']); | 65 | $row->visible(['id', 'order_no', 'type','intended_driver_id', 'pay_type', 'price', 'is_pay', 'user_name', 'driver_name', 'pay_time', 'refund_time', 'create_time']); |
| @@ -194,5 +195,43 @@ class Order extends Backend | @@ -194,5 +195,43 @@ class Order extends Backend | ||
| 194 | $this->success(); | 195 | $this->success(); |
| 195 | } | 196 | } |
| 196 | 197 | ||
| 198 | + public function orderinfo($ids){ | ||
| 199 | + $row = Db::name("order")->field("id,order_no,pay_type,price,route_id,is_pay,phone,type")->find(['id' => $ids]); | ||
| 200 | + if($row['is_pay']==1){ | ||
| 201 | + $row['is_pay']="已支付"; | ||
| 202 | + }elseif($row['is_pay']==2){ | ||
| 203 | + $row['is_pay']="未支付"; | ||
| 204 | + }elseif($row['is_pay']==3){ | ||
| 205 | + $row['is_pay']="已退款"; | ||
| 206 | + }elseif($row['is_pay']==4){ | ||
| 207 | + $row['is_pay']="已取消"; | ||
| 208 | + } | ||
| 209 | + if($row['type']==1){ | ||
| 210 | + $row['type']="计票"; | ||
| 211 | + }elseif($row['type']==2){ | ||
| 212 | + $row['type']="城际"; | ||
| 213 | + }elseif($row['type']==3){ | ||
| 214 | + $row['type']="包车"; | ||
| 215 | + } | ||
| 216 | + if($row['pay_type']=="wxpay"){ | ||
| 217 | + $row['pay_type']="微信"; | ||
| 218 | + }elseif($row['pay_type']=="offlinepay"){ | ||
| 219 | + $row['pay_type']="线下"; | ||
| 220 | + } | ||
| 221 | + $route=Db::name("route")->find($row['route_id']); | ||
| 222 | + $row['route_name']=$route['name']; | ||
| 223 | + unset($row['route_id']); | ||
| 224 | + | ||
| 225 | + if (!$row) { | ||
| 226 | + $this->error(__('No Results were found')); | ||
| 227 | + } | ||
| 228 | + $this->view->assign("row", $row); | ||
| 229 | + return $this->view->fetch(); | ||
| 230 | + } | ||
| 231 | + public function chackorder(){ | ||
| 232 | + print_r(123);return; | ||
| 233 | + $newadditionorder= \app\admin\model\Order::where("is_check",0)->count(); | ||
| 234 | + return $newadditionorder; | ||
| 235 | + } | ||
| 197 | 236 | ||
| 198 | } | 237 | } |
| @@ -18,6 +18,7 @@ return [ | @@ -18,6 +18,7 @@ return [ | ||
| 18 | 'Seven dnu' => '七日新增', | 18 | 'Seven dnu' => '七日新增', |
| 19 | 'Seven dau' => '七日活跃', | 19 | 'Seven dau' => '七日活跃', |
| 20 | 'Thirty dau' => '月活跃', | 20 | 'Thirty dau' => '月活跃', |
| 21 | + 'New additionorder' => '新增订单', | ||
| 21 | 'Custom zone' => '这里是你的自定义数据', | 22 | 'Custom zone' => '这里是你的自定义数据', |
| 22 | 'Register user' => '注册用户数', | 23 | 'Register user' => '注册用户数', |
| 23 | 'Real time' => '实时', | 24 | 'Real time' => '实时', |
| @@ -21,6 +21,8 @@ return [ | @@ -21,6 +21,8 @@ return [ | ||
| 21 | 'User_name' => '乘车人姓名', | 21 | 'User_name' => '乘车人姓名', |
| 22 | 'Driver_id' => '运行路线', | 22 | 'Driver_id' => '运行路线', |
| 23 | 'Driver_name' => '运行路线名称', | 23 | 'Driver_name' => '运行路线名称', |
| 24 | + 'phone' => '联系电话', | ||
| 25 | + 'route_name' => '线路名称', | ||
| 24 | 'Pay_time' => '支付时间', | 26 | 'Pay_time' => '支付时间', |
| 25 | 'Refund_time' => '退款时间', | 27 | 'Refund_time' => '退款时间', |
| 26 | 'Create_time' => '创建时间', | 28 | 'Create_time' => '创建时间', |
| @@ -233,8 +233,8 @@ | @@ -233,8 +233,8 @@ | ||
| 233 | <div class="col-xs-6 stat-col"> | 233 | <div class="col-xs-6 stat-col"> |
| 234 | <div class="stat-icon"><i class="fa fa-user-circle-o"></i></div> | 234 | <div class="stat-icon"><i class="fa fa-user-circle-o"></i></div> |
| 235 | <div class="stat"> | 235 | <div class="stat"> |
| 236 | - <div class="value"> {$thirtydau}</div> | ||
| 237 | - <div class="name"> {:__('Thirty dau')}</div> | 236 | + <div class="value" id="newadditionorder" name="newadditionorder"> {$newadditionorder}</div> |
| 237 | + <div class="name"> {:__('New additionorder')}</div> | ||
| 238 | </div> | 238 | </div> |
| 239 | <div class="progress"> | 239 | <div class="progress"> |
| 240 | <div class="progress-bar progress-bar-success" style="width: 20%"></div> | 240 | <div class="progress-bar progress-bar-success" style="width: 20%"></div> |
| @@ -252,3 +252,20 @@ | @@ -252,3 +252,20 @@ | ||
| 252 | </div> | 252 | </div> |
| 253 | </div> | 253 | </div> |
| 254 | </div> | 254 | </div> |
| 255 | +<script> | ||
| 256 | + | ||
| 257 | + setInterval(() => { | ||
| 258 | + console.log("=============") | ||
| 259 | + $.ajax({ // 定义ajax发送请求 | ||
| 260 | + url: 'order/chackorder', // 请求发送的地址 有三种填写方式,与form标签的action一致 | ||
| 261 | + method: 'post', // 请求发送的方式 | ||
| 262 | + success: function (data) { // 异步等待,当后端响应成功会回调执行匿名函数,并将数据传递给data参数 | ||
| 263 | + var divValue = document.getElementById("newadditionorder").innerHTML; | ||
| 264 | + console.log(divValue) | ||
| 265 | + document.getElementById("newadditionorder").innerHTML = data; | ||
| 266 | + }// 使用ajax交互,那么后端返回的数据会被data接收,不在直接影响整个浏览器页面 | ||
| 267 | + | ||
| 268 | + }) | ||
| 269 | + }, 5000); // 1000毫秒为间隔 | ||
| 270 | + | ||
| 271 | +</script> |
application/admin/view/order/orderinfo.html
0 → 100644
| 1 | +<style> | ||
| 2 | + .table-adminlog tr td { | ||
| 3 | + word-break: break-all; | ||
| 4 | + } | ||
| 5 | +</style> | ||
| 6 | +<table class="table table-striped table-adminlog"> | ||
| 7 | + <thead> | ||
| 8 | + <tr> | ||
| 9 | + <th width="100">{:__('Title')}</th> | ||
| 10 | + <th>{:__('Content')}</th> | ||
| 11 | + </tr> | ||
| 12 | + </thead> | ||
| 13 | + <tbody> | ||
| 14 | + {volist name="row" id="vo" } | ||
| 15 | + <tr> | ||
| 16 | + <td>{:__($key)}</td> | ||
| 17 | + <td>{if $key=='createtime'}{$vo|datetime}{else/}{$vo|htmlentities}{/if}</td> | ||
| 18 | + </tr> | ||
| 19 | + {/volist} | ||
| 20 | + </tbody> | ||
| 21 | +</table> | ||
| 22 | +<div class="hide layer-footer"> | ||
| 23 | + <label class="control-label col-xs-12 col-sm-2"></label> | ||
| 24 | + <div class="col-xs-12 col-sm-8"> | ||
| 25 | + <button type="reset" class="btn btn-primary btn-embossed btn-close" onclick="Layer.closeAll();">{:__('Close')}</button> | ||
| 26 | + </div> | ||
| 27 | +</div> |
| @@ -93,6 +93,9 @@ class Car extends Base | @@ -93,6 +93,9 @@ class Car extends Base | ||
| 93 | { | 93 | { |
| 94 | $number = $this->request->param("number");//乘车人数 | 94 | $number = $this->request->param("number");//乘车人数 |
| 95 | $phone = $this->request->param("phone");//联系手机号码 | 95 | $phone = $this->request->param("phone");//联系手机号码 |
| 96 | + $starting_point = $this->request->param("starting_point");//出发位置 | ||
| 97 | + $end_point = $this->request->param("end_point");//到达位置 | ||
| 98 | + $passengers = $this->request->param("passengers");//乘车人 | ||
| 96 | $user_name = $this->request->param("user_name");//联系人 | 99 | $user_name = $this->request->param("user_name");//联系人 |
| 97 | $position = $this->request->param("position");//上车地址 | 100 | $position = $this->request->param("position");//上车地址 |
| 98 | $specificaddress_id = $this->request->param("specificaddress_id");//上车地址 | 101 | $specificaddress_id = $this->request->param("specificaddress_id");//上车地址 |
| @@ -154,6 +157,9 @@ class Car extends Base | @@ -154,6 +157,9 @@ class Car extends Base | ||
| 154 | $data = [ | 157 | $data = [ |
| 155 | "order_no" => getOrderSn(), | 158 | "order_no" => getOrderSn(), |
| 156 | "price" => $price, | 159 | "price" => $price, |
| 160 | + "starting_point" => $starting_point,//未支付 | ||
| 161 | + "end_point" => $end_point,//未支付 | ||
| 162 | + "passengers" => $passengers,//未支付 | ||
| 157 | "is_pay" => "2",//未支付 | 163 | "is_pay" => "2",//未支付 |
| 158 | "car_id" => $car_id, | 164 | "car_id" => $car_id, |
| 159 | "order_review_id" => $order_review_id, | 165 | "order_review_id" => $order_review_id, |
| @@ -1134,6 +1140,9 @@ class Car extends Base | @@ -1134,6 +1140,9 @@ class Car extends Base | ||
| 1134 | $route_id = $this->request->param("route_id");//线路 | 1140 | $route_id = $this->request->param("route_id");//线路 |
| 1135 | $position = $this->request->param("position");//上车地址 | 1141 | $position = $this->request->param("position");//上车地址 |
| 1136 | $lat = $this->request->param("lat");//经度 | 1142 | $lat = $this->request->param("lat");//经度 |
| 1143 | + $starting_point = $this->request->param("starting_point");//出发位置 | ||
| 1144 | + $end_point = $this->request->param("end_point");//到达位置 | ||
| 1145 | + $passengers = $this->request->param("passengers");//乘车人 | ||
| 1137 | $specificaddress_id = $this->request->param("specificaddress_id");//区域id | 1146 | $specificaddress_id = $this->request->param("specificaddress_id");//区域id |
| 1138 | $lng = $this->request->param("lng");//维度 | 1147 | $lng = $this->request->param("lng");//维度 |
| 1139 | $number = $this->request->param("number");//乘车人数 | 1148 | $number = $this->request->param("number");//乘车人数 |
| @@ -1181,6 +1190,9 @@ class Car extends Base | @@ -1181,6 +1190,9 @@ class Car extends Base | ||
| 1181 | "order_no" => getOrderSn(), | 1190 | "order_no" => getOrderSn(), |
| 1182 | "price" => $price, | 1191 | "price" => $price, |
| 1183 | "position" => $position, | 1192 | "position" => $position, |
| 1193 | + "starting_point" => $starting_point, | ||
| 1194 | + "end_point" => $end_point, | ||
| 1195 | + "passengers" => $passengers, | ||
| 1184 | "driver_id" => $driver['id'], | 1196 | "driver_id" => $driver['id'], |
| 1185 | "is_qrcode" => $is_qrcode, | 1197 | "is_qrcode" => $is_qrcode, |
| 1186 | "order_review_id" => $order_review_id, | 1198 | "order_review_id" => $order_review_id, |
| @@ -1202,6 +1214,9 @@ class Car extends Base | @@ -1202,6 +1214,9 @@ class Car extends Base | ||
| 1202 | "order_no" => getOrderSn(), | 1214 | "order_no" => getOrderSn(), |
| 1203 | "price" => $price, | 1215 | "price" => $price, |
| 1204 | "position" => $position, | 1216 | "position" => $position, |
| 1217 | + "starting_point" => $starting_point, | ||
| 1218 | + "end_point" => $end_point, | ||
| 1219 | + "passengers" => $passengers, | ||
| 1205 | "is_qrcode" => $is_qrcode, | 1220 | "is_qrcode" => $is_qrcode, |
| 1206 | "specificaddress_id" => $specificaddress_id, | 1221 | "specificaddress_id" => $specificaddress_id, |
| 1207 | "reservation_time" => $reservation_time, | 1222 | "reservation_time" => $reservation_time, |
| @@ -50,4 +50,6 @@ return array ( | @@ -50,4 +50,6 @@ return array ( | ||
| 50 | 'notice' => '<p><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><br></p>', | 50 | 'notice' => '<p><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><span style="background-color: rgb(249, 249, 249);">通知公告</span><br></p>', |
| 51 | 'driver_authentication' => '<p>司机认证司机认证司机认证司机认证司机认证司机认证<br></p>', | 51 | 'driver_authentication' => '<p>司机认证司机认证司机认证司机认证司机认证司机认证<br></p>', |
| 52 | 'aboutwe' => '<p><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><br></p>', | 52 | 'aboutwe' => '<p><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><span style="background-color: rgb(249, 249, 249);">关于我们</span><br></p>', |
| 53 | + 'ordering_notice' => '<p class="MsoNormal"><span style="font-family: 微软雅黑; color: rgb(0, 0, 0); letter-spacing: 0pt; font-size: 10.5pt;">暴力恐怖犯罪线索举报办法:</span><span style="font-family: 微软雅黑; color: rgb(0, 0, 0); letter-spacing: 0pt; font-size: 10.5pt;"><br></span><span style="font-family: 微软雅黑; color: rgb(0, 0, 0); letter-spacing: 0pt; font-size: 10.5pt;">1、拨打“110”或公安机关公开的其他报警电话;</span><span style="font-family: 微软雅黑; color: rgb(0, 0, 0); letter-spacing: 0pt; font-size: 10.5pt;"><br></span><span style="font-family: 微软雅黑; color: rgb(0, 0, 0); letter-spacing: 0pt; font-size: 10.5pt;">2、手机用户发送短信至“12110”举报;</span><span style="font-family: 微软雅黑; color: rgb(0, 0, 0); letter-spacing: 0pt; font-size: 10.5pt;"><br></span><span style="font-family: 微软雅黑; color: rgb(0, 0, 0); letter-spacing: 0pt; font-size: 10.5pt;">3、通过信件向公安机关举报;</span><span style="font-family: 微软雅黑; color: rgb(0, 0, 0); letter-spacing: 0pt; font-size: 10.5pt;"><br></span><span style="font-family: 微软雅黑; color: rgb(0, 0, 0); letter-spacing: 0pt; font-size: 10.5pt;">4、到公安机关或向执勤民警当面举报;</span><span style="font-family: 微软雅黑; color: rgb(0, 0, 0); letter-spacing: 0pt; font-size: 10.5pt;"><br></span><span style="font-family: 微软雅黑; color: rgb(0, 0, 0); letter-spacing: 0pt; font-size: 10.5pt;">5、通过其他有效方式举报。</span><span style="mso-spacerun:\'yes\';font-family:宋体;font-size:14.0000pt; | ||
| 54 | +mso-font-kerning:1.0000pt;"><o:p></o:p></span></p>', | ||
| 53 | ); | 55 | ); |
| @@ -115,16 +115,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function | @@ -115,16 +115,16 @@ define(['jquery', 'bootstrap', 'backend', 'table', 'form', 'template'], function | ||
| 115 | url: 'order/refund?id={id}', | 115 | url: 'order/refund?id={id}', |
| 116 | 116 | ||
| 117 | }, | 117 | }, |
| 118 | - // { | ||
| 119 | - // name: 'selectiondriver', | ||
| 120 | - // title: __('选择司机'), | ||
| 121 | - // classname: 'btn btn-xs btn-primary btn-dialog', | ||
| 122 | - // icon: 'fa fa-list', | ||
| 123 | - // url: 'order/selectiondriver?id={id}', | ||
| 124 | - // callback: function (data) { | ||
| 125 | - // Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"}); | ||
| 126 | - // } | ||
| 127 | - // }, | 118 | + { |
| 119 | + name: 'orderinfo', | ||
| 120 | + title: __('订单详情'), | ||
| 121 | + classname: 'btn btn-xs btn-primary btn-dialog', | ||
| 122 | + icon: 'fa fa-list', | ||
| 123 | + url: 'order/orderinfo?id={id}', | ||
| 124 | + callback: function (data) { | ||
| 125 | + Layer.alert("接收到回传数据:" + JSON.stringify(data), {title: "回传数据"}); | ||
| 126 | + } | ||
| 127 | + }, | ||
| 128 | // { | 128 | // { |
| 129 | // name: 'selectiondriver', | 129 | // name: 'selectiondriver', |
| 130 | // text:"选择司机", | 130 | // text:"选择司机", |
-
请 注册 或 登录 后发表评论