From 4ce148a6fc8dfca355ff676264c0d78a5ebf89df Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期四, 31 七月 2025 14:08:27 +0800 Subject: [PATCH] 推广活动 --- /dev/null | 57 ------------------- ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TPromotionOrderCarController.java | 30 ++++++++++ ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tPromotionOrder.html | 75 ++++++++++++++++++++++++ 3 files changed, 103 insertions(+), 59 deletions(-) diff --git a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TPromotionOrderCarController.java b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TPromotionOrderCarController.java index 16d30dc..67e223b 100644 --- a/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TPromotionOrderCarController.java +++ b/ManagementQYTTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/controller/specialTrain/TPromotionOrderCarController.java @@ -53,6 +53,12 @@ */ @RequestMapping("") public String index(Model model) { + List<Map<String, Object>> list=new ArrayList<>(); + list = tOrderPrivateCarService.promotionInfoExport(null, null, null, null, null, null, null, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId()); + BigDecimal reduce = list.stream().map(e -> new BigDecimal(e.get("promotionMoney").toString())).reduce(BigDecimal.ZERO, BigDecimal::add); + model.addAttribute("money",reduce); + model.addAttribute("size",list.size()); + return PREFIX + "tPromotionOrder.html"; } @@ -118,6 +124,7 @@ shellList.add("订单金额"); shellList.add("司机推广收益"); shellList.add("收益时间"); + dataList.add(shellList); for (Map<String,Object> object : list){ // 详细数据列【封装】 @@ -174,6 +181,29 @@ } } + @PostMapping("/list1") + @ResponseBody + public Object list1(String insertTime, + String orderNum, + String userName, + String name, + String driverName) { + String beginTime = null; + String endTime = null; + if (SinataUtil.isNotEmpty(insertTime)) { + String[] timeArray = insertTime.split(" - "); + beginTime = timeArray[0]; + endTime = timeArray[1]; + } + List<Map<String, Object>> list=new ArrayList<>(); + list = tOrderPrivateCarService.promotionInfoExport(null, beginTime, endTime, orderNum, userName, name, driverName, shiroExtUtil.getUser().getRoleType(), shiroExtUtil.getUser().getObjectId()); + HashMap<String, Object> map = new HashMap<>(); + BigDecimal reduce = list.stream().map(e -> new BigDecimal(e.get("promotionMoney").toString())).reduce(BigDecimal.ZERO, BigDecimal::add); + map.put("money", reduce); + map.put("size", list.size()); + return map; + } + } diff --git a/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tAbnormalOrder_orderDetail.html b/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tAbnormalOrder_orderDetail.html deleted file mode 100644 index 7bbec11..0000000 --- a/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tAbnormalOrder_orderDetail.html +++ /dev/null @@ -1,512 +0,0 @@ -@layout("/common/_container.html"){ -<!DOCTYPE html> - -<html lang="zh-CN"> - -<head> - <meta charset="UTF-8"> - <title>处理异常订单</title> - <style> - body { - background: #888; - margin: 0; - padding: 0; - } - - .container { - background: #fff; - margin: 20px auto; - padding: 20px 30px; - border-radius: 10px; - max-width: 98vw; - min-width: 1200px; - } - - .title { - font-size: 20px; - font-weight: bold; - margin-bottom: 20px; - } - - .order-table { - width: 100%; - border-collapse: collapse; - margin-bottom: 30px; - } - - .order-table th, - .order-table td { - border: 1px solid #e0e0e0; - padding: 8px 6px; - text-align: center; - font-size: 13px; - } - - .order-table th { - background: #f8f8f8; - font-weight: 600; - } - - .section-title { - font-size: 16px; - font-weight: bold; - margin: 30px 0 10px 0; - } - - .desc-row { - margin-bottom: 10px; - } - - .desc-label { - font-weight: bold; - margin-right: 10px; - } - - .img-list { - display: flex; - gap: 20px; - margin: 10px 0 20px 0; - } - - .img-list img { - width: 120px; - height: 80px; - object-fit: cover; - border-radius: 6px; - border: 1px solid #ccc; - } - - .order-link { - color: #1976d2; - text-decoration: underline; - cursor: pointer; - } - - input[type="radio"] { - accent-color: #1976d2; - width: 18px; - height: 18px; - vertical-align: middle; - margin-right: 4px; -} - -.radio-group label { - margin-right: 18px; - font-size: 15px; - cursor: pointer; -} -#duty-selector { - display: flex; - margin-bottom: 18px; - border: 1px solid #ccc; - border-radius: 4px; - overflow: hidden; - width: fit-content; -} - - - -.duty-btn { - flex: 1 1 0; - padding: 12px 32px; - border: none; - background: #fff; - color: #222; - font-size: 16px; - cursor: pointer; - outline: none; - border-right: 1px solid #ccc; - transition: background 0.2s, color 0.2s; - height: 62px; - line-height: 24px; -} - -.duty-btn:last-child { - border-right: none; -} - -.duty-btn.active { - background: #1976d2; - color: #fff; - font-weight: bold; -} - .action-btn { - min-width: 140px; - height: 48px; - background: #1976d2; - color: #fff; - border: none; - border-radius: 5px; - font-size: 16px; - font-weight: bold; - margin-right: 18px; - cursor: pointer; - transition: background 0.2s, box-shadow 0.2s; - box-shadow: 0 2px 6px rgba(25, 118, 210, 0.08); - } - .action-btn:last-child { - margin-right: 0; - } - .action-btn:hover { - background: #1565c0; - } - #action-btns { - margin-top: 32px; - display: flex; - align-items: center; - } - </style> -</head> - -<body> - <input type="hidden" id="orderNum" name ="orderNum" value="${item.orderNum}"/> - <input type="hidden" id="state" name ="state" value="${item.abnormalStatus}"/> - <input type="hidden" id="show" name ="show" value="${show}"/> - <input type="hidden" id="type" name ="type" value="${type}"/> - <input type="hidden" id="orderId" name ="orderId" value="${item.id}"/> - <input type="hidden" id="payMoney" name ="payMoney" value="${item.payMoney}"/> - <div class="ibox float-e-margins"> - <div class="title">处理异常订单</div> - <div class="section-title">订单信息</div> - <table class="order-table"> - <thead> - <tr> - <th>下单时间</th> - <th>订单编号</th> - <th>订单来源</th> - <th>乘车时间</th> - <th>下单用户昵称</th> - <th>下单用户手机</th> - <th>乘车用户姓名</th> - <th>乘车用户手机</th> - <th>起点</th> - <th>终点</th> - <th>选择车型</th> - <th>接单司机</th> - <th>接单车辆</th> - <th>订单金额</th> - <th>状态</th> - <th>操作</th> - </tr> - </thead> - <tbody> - <tr> - <td>${item.insertTimeStr}</td> - <td>${item.orderNum}</td> - <td>${item.orderSource}</td> - <td>${item.travelTimeStr}</td> - <td>${item.userName}</td> - <td>${item.userPhone}</td> - <td>${item.passengers}</td> - <td>${item.passengersPhone}</td> - <td>${item.boardingAddress}</td> - <td>${item.getoffAddress}</td> - <td>${item.serverCarModel}</td> - <td>${item.driver}</td> - <td>${item.car}</td> - <td>${item.orderMoney}</td> - <!-- 1=待接单,2=待出发,3=待到达预约地点,4=待乘客上车,5=服务中,6=完成服务,7=待支付,8=待评价,9=已完成,10=已取消,11=改派中,12=取消待支付--> - <td> - @if(item.state==1) { - 待接单 - @}else if(item.state==2){ - 待出发 - @}else if(item.state==3){ - 待到达预约地点 - @}else if(item.state==4){ - 待乘客上车 - @}else if(item.state==5){ - 服务中 - @}else if(item.state==6){ - 完成服务 - @}else if(item.state==7){ - 待支付 - @}else if(item.state==8){ - 待评价 - @}else if(item.state==9){ - 已完成 - @}else if(item.state==10){ - 已取消 - @}else if(item.state==11){ - 改派中 - @}else if(item.state==12){ - 取消待支付 - @}else{ - 未知 - @} - </td> - <td><a class="order-link" onclick="viewOrderInfo()">查看订单详情</a></td> - </tr> - </tbody> - </table> - - <div class="section-title">乘客反馈情况</div> - <div class="desc-row"> - <span class="desc-label"> ${item.abnormalIntro}</span> - - </div> - <div class="img-list"> - <!-- 逗号拼接的图片 --> - @for(item in abnormalImg) { - <img src="${item}" alt="图片" /> - @} - </div> - <!-- 你可以根据实际图片地址替换上面src --> - <div class="section-title" id="s1">处理状态: - @if(item.abnormalStatus==1){ - 未处理 <button id="saveBtn1" class="action-btn" onclick="saveBtn1()">立即处理</button> - @}else{ - 已处理 - @} - </div> - <!-- 其他内容可根据实际需求继续补充 --> - <div id="s2"> - <div class="section-title">选择责任方</div> - <div id="duty-selector"> - <button type="button" class="duty-btn active" data-type="platformAll">平台全责</button> - <button type="button" class="duty-btn" data-type="driverAll">司机全责</button> - <button type="button" class="duty-btn" data-type="passengerAll">乘客全责</button> - <button type="button" class="duty-btn" data-type="platformPart">平台部分责任</button> - <button type="button" class="duty-btn" data-type="driverPart">司机部分责任</button> - </div> - - <div id="duty-content" style="margin-top:20px;"> - <!-- 内容区域,JS填充 --> - </div> - - <!-- 处理备注区域 --> - <div class="section-title" style="margin-top:32px;">处理备注</div> - <textarea name="handleRemark" rows="4" style="width:90%;max-width:900px;min-width:300px;padding:10px;font-size:15px;border:1px solid #ccc;border-radius:4px;resize:vertical;"></textarea> - - <div id="action-btns"> - <button id="saveBtn" class="action-btn" onclick="save()" style="display:none;">确认处理</button> - <button id="closeBtn" class="action-btn" style="display:none;">关闭</button> - </div> - </div> - </div> -</body> - -<script> - const dutyContent = document.getElementById('duty-content'); - const btns = document.querySelectorAll('.duty-btn'); - const responsibilityType = '${item.responsibilityType}'; - const orderNum = '${item.orderNum}'; - const isReadonly = responsibilityType && responsibilityType !== 'null' && responsibilityType !== ''; - const typeMap = {1:'platformAll',2:'driverAll',3:'passengerAll',4:'platformPart',5:'driverPart'}; - const reverseTypeMap = {'platformAll':1,'driverAll':2,'passengerAll':3,'platformPart':4,'driverPart':5}; - - function renderContent(type, readonly) { - let html = ''; - if (type === 'platformAll') { - html = ` - <div> - <div class="radio-group">超时是否启用备用金支付: - <label><input type="radio" name="ybj" checked disabled>是</label> - <label><input type="radio" name="ybj" disabled>否</label> - </div> - <div class="radio-group">超时是否生成追偿支付单: - <label><input type="radio" name="zcpay" disabled>是</label> - <label><input type="radio" name="zcpay" checked disabled>否</label> - </div> - </div> - `; - } else if (type === 'driverAll') { - html = ` - <div style="margin-top:10px;">修改订单金额为: 0</div> - `; - } else if (type === 'passengerAll') { - html = ` - <div>超时是否启用备用金支付: - <label><input type="radio" name="ybj" checked disabled>是</label> - <label><input type="radio" name="ybj" disabled>否</label> - </div> - <div>超时是否生成追偿支付单: - <label><input type="radio" name="zcpay" checked disabled>是</label> - <label><input type="radio" name="zcpay" disabled>否</label> - </div> - `; - } else if (type === 'platformPart' || type === 'driverPart') { - html = ` - <div>超时是否启用备用金支付: - <label><input type="radio" name="ybj" checked disabled>是</label> - <label><input type="radio" name="ybj" disabled>否</label> - </div> - <div>超时是否生成追偿支付单: - <label><input type="radio" name="zcpay" checked disabled>是</label> - <label><input type="radio" name="zcpay" disabled>否</label> - </div> - <div style="margin-top:10px;"> - 修改订单金额为:<input type="number" id="money" name="money" style="width:100px;" value="${money}"> 元(需小于等于原订单金额) - </div> - `; - } - dutyContent.innerHTML = html; - } - - function setReadonlyMode() { - btns.forEach(btn => { - btn.classList.remove('active'); - btn.disabled = true; - if (btn.dataset.type === typeMap[responsibilityType]) { - btn.classList.add('active'); - }else { - btn.style.display = 'none'; - } - }); - renderContent(typeMap[responsibilityType], true); - document.querySelector('textarea[name=handleRemark]').disabled = true; - document.getElementById('saveBtn').style.display = 'none'; - document.getElementById('closeBtn').style.display = ''; - } - - function setEditMode() { - btns.forEach(btn => btn.disabled = false); - btns.forEach(btn => btn.classList.remove('active')); - btns[0].classList.add('active'); - renderContent('platformAll', false); - document.querySelector('textarea[name=handleRemark]').disabled = false; - document.getElementById('saveBtn').style.display = ''; - document.getElementById('closeBtn').style.display = 'none'; - } - - function saveBtn1() { - $("#s1").hide(); - $("#s2").show(); - } - window.onload = function() { - if (isReadonly) { - setReadonlyMode(); - } else { - setEditMode(); - } - }; - - btns.forEach(btn => { - btn.onclick = function () { - if (isReadonly) return; - btns.forEach(b => b.classList.remove('active')); - btn.classList.add('active'); - renderContent(btn.dataset.type, false); - } - }); - - function save() { - - let selectedBtn = document.querySelector('.duty-btn.active'); - let responsibilityTypeVal = reverseTypeMap[selectedBtn.dataset.type]; - let remark = document.querySelector('textarea[name=handleRemark]').value; - // 取money - let money = $("#money").val(); - let payMoney = $("#payMoney").val(); - let type = document.querySelector('input[name=type]').value; - let orderNum = document.querySelector('input[name=orderNum]').value; - console.log(responsibilityTypeVal,money,payMoney) - if(responsibilityTypeVal>3 && money>payMoney){ - Feng.error("需小于等于原订单金额!"); - return; - } - - //提交信息 - var ajax = new $ax(Feng.ctxPath + "/abnormal/save", function(data){ - Feng.success("操作成功!"); - // 尝试关闭当前窗口或弹窗 - if(window.parent && window.parent !== window && window.parent.layer) { - // layer弹窗 - var index = window.parent.layer.getFrameIndex(window.name); - window.parent.layer.close(index); - } else if(window.opener) { - window.close(); - } else if(window.top && window.top.closeDialog) { - window.top.closeDialog(); - } else { - window.close(); - } - },function(data){ - Feng.error("操作失败!"); - }); - ajax.set("responsibilityTypeVal",responsibilityTypeVal); - ajax.set("remark",remark); - ajax.set("money",money); - ajax.set("type",type); - ajax.set("orderNum",orderNum); - ajax.start(); - - }; - - document.getElementById('closeBtn').onclick = function() { - // 尝试关闭当前窗口或弹窗 - if(window.parent && window.parent !== window && window.parent.layer) { - // layer弹窗 - var index = window.parent.layer.getFrameIndex(window.name); - window.parent.layer.close(index); - } else if(window.opener) { - window.close(); - } else if(window.top && window.top.closeDialog) { - window.top.closeDialog(); - } else { - window.close(); - } - }; - - -// 进来就加载 - $(function() { - var state = $("#state").val(); - var show = $("#show").val(); - if(state==1 && show==0){ - $("#s2").hide(); - } - if(show==1){ - $("#s2").show(); - $("#s1").hide(); - } - - - }) - - - - function viewOrderInfo(){ - var type = $("#type").val(); - var orderId = $("#orderId").val(); - if(type==1){ - var index = layer.open({ - type: 2, - title: '快车订单详情', - area: ['100%', '100%'], //宽高 - fix: false, //不固定 - maxmin: true, - content: Feng.ctxPath + '/tOrderPrivateCar/tOrderPrivateCar_orderDetail/' +orderId - }); - this.layerIndex = index; - } - if(type==2){ - var index = layer.open({ - type: 2, - title: '跨城出行订单详情', - area: ['100%', '100%'], //宽高 - fix: false, //不固定 - maxmin: true, - content: Feng.ctxPath + '/tOrderCrossCity/tOrderCrossCity_detail/' + orderId - }); - this.layerIndex = index; - } - if(type==3){ - var index = layer.open({ - type: 2, - title: '出租车订单详情', - area: ['100%', '100%'], //宽高 - fix: false, //不固定 - maxmin: true, - content: Feng.ctxPath + '/tOrderTaxi/tOrderTaxi_update/' + orderId - }); - this.layerIndex = index; - } - - } - -</script> - -</html> - -@} \ No newline at end of file diff --git a/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tOrderPrivateCar_add.html b/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tOrderPrivateCar_add.html deleted file mode 100644 index e4d7b56..0000000 --- a/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tOrderPrivateCar_add.html +++ /dev/null @@ -1,487 +0,0 @@ -@layout("/common/_container.html"){ -<div class="ibox float-e-margins"> - <div class="ibox-content"> - <div class="form-horizontal"> - <input type="hidden" id="html" value="2"> - <input type="hidden" id="type" value="2"> - - <div class="row"> - <div class="form-group"> - <label class="control-label col-sm-2">起点:</label> - <div class="col-sm-3"> - <input class="form-control" id="startAddress" autocomplete="off" onclick="TOrderPrivateCarInfoDlg.startAddress()"> - <input type="hidden" id="startLon"> - <input type="hidden" id="startLat"> - </div> - </div> - <div class="form-group" id="startAddressModel" hidden> - <label class="control-label col-sm-2"></label> - <div class="col-sm-6" style="margin-left: 15px;height: 500px" id="startAddressBody"> - - </div> - </div> - <div class="form-group"> - <label class="control-label col-sm-2">终点:</label> - <div class="col-sm-3"> - <input class="form-control" id="endAddress" autocomplete="off" onclick="TOrderPrivateCarInfoDlg.endAddress()"> - <input type="hidden" id="endLon"> - <input type="hidden" id="endLat"> - </div> - </div> - <div class="form-group" id="endAddressModel" hidden> - <label class="control-label col-sm-2"></label> - <div class="col-sm-6" style="margin-left: 15px;height: 500px" id="endAddressBody"> - - </div> - </div> - <div class="form-group"> - <label class="control-label col-sm-2">用车时间:</label> - <div class="col-sm-3"> - <input class="form-control" autocomplete="off" id="travelTime"> - </div> - </div> - <div class="form-group"> - <label class="control-label col-sm-2">乘车人姓名:</label> - <div class="col-sm-3"> - <input class="form-control" id="passengers"> - </div> - </div> - <div class="form-group"> - <label class="control-label col-sm-2">乘车人手机号:</label> - <div class="col-sm-3"> - <input class="form-control" id="passengersPhone"> - </div> - </div> - - - <div class="form-group"> - <label class="control-label col-sm-2">车型:</label> - <div class="col-sm-3"> - <select class="form-control " id="serverCarModelId"> - @for(carModel in carModelList){ - <option value="${carModel.id}">${carModel.name}</option> - @} - </select> - </div> - </div> - </div> - - <div class="row btn-group-m-t"> - <div class="col-sm-10"> - <#button btnCss="info" name="保存" id="ensure" icon="fa-check" - clickFun="TOrderPrivateCarInfoDlg.addSubmit()"/> - </div> - </div> - </div> - - </div> -</div> - -<script src="${ctxPath}/static/modular/system/tOrderPrivateCar/tOrderPrivateCar_info.js"></script> -<script type="text/javascript"> - window._AMapSecurityConfig = { - securityJsCode: '44c5ee9ad584605d91ca69bfac32c761', - } -</script> -<script type="text/javascript" - src="https://webapi.amap.com/maps?v=1.4.10&key=d3bde6afb050067e1a765a8d1d1f4c54&plugin=AMap.Autocomplete,AMap.PlaceSearch"></script> -<script type="text/javascript" src="https://cache.amap.com/lbs/static/addToolbar.js"></script> - -<script> - laydate.render({ - elem: '#travelTime' - , type: 'datetime' - ,trigger: 'click' //采用click弹出 - , min: new Date().toString() - }); -</script> - -<script type="text/javascript"> - //起点地图加载 - var marker, map = new AMap.Map("startAddressBody", { - resizeEnable: true, - zoom: 15, - zooms: [3, 20] - }); //定位标注当前位置 - map.plugin('AMap.Geolocation', function () { - geolocation = new AMap.Geolocation({ - enableHighAccuracy: true, //是否使用高精度定位,默认:true - timeout: 10000, //超过10秒后停止定位,默认:无穷大 - maximumAge: 0, //定位结果缓存0毫秒,默认:0 - convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true - showButton: true, //显示定位按钮,默认:true - showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true - showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true - panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true - buttonPosition: 'LB', //定位按钮的停靠位置 LB左下角、 RB右下角 - buttonOffset: new AMap.Pixel(10, 20), //定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20) - zoomToAccuracy: true, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false - }); - map.addControl(geolocation); - geolocation.getCurrentPosition(); - AMap.event.addListener(geolocation, 'complete', onComplete); - //返回定位信息 - AMap.event.addListener(geolocation, 'error', onError); - //返回定位出错信息 - }); //解析定位结果 - var city; - - - map.on('click', function (e) { - if (marker != null) { - marker.setMap(null); - } - //添加标记点 - $("#startLon").val(e.lnglat.getLng()); - $("#startLat").val(e.lnglat.getLat()); - marker = new AMap.Marker({ - map: map, - position: new AMap.LngLat(e.lnglat.getLng(), e.lnglat.getLat()), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9] - }); - regeoCode(e.lnglat.getLng(),e.lnglat.getLat()); - }); - - - var infoWindow = new AMap.InfoWindow({ - autoMove: true, - offset: { - x: 0, - y: -30 - } - }); //回调函数 - - - //根据经纬度获取详细地址 - function regeoCode(lon,lat) { - - var lnglat = []; - lnglat.push(lon); - lnglat.push(lat); - map.add(marker); - marker.setPosition(lnglat); - - AMap.service('AMap.Geocoder', function() { - geocoder = new AMap.Geocoder({}); - geocoder.getAddress(lnglat, function (status, result) { - if (status === 'complete' && result.regeocode) { - var address = result.regeocode.formattedAddress; - $("#startAddress").val(address); - } else { - Feng.error('根据经纬度查询地址失败【' + result + '】') - return - } - var data={ - "name":result.regeocode.addressComponent.neighborhood, - "location":{ - "lat":lat, - "lng":lon - }, - "address":address, - "tel":"", - "type":result.regeocode.addressComponent.neighborhoodType - }; - infoWindow.setContent(createContent(data)); - infoWindow.open(map, marker.getPosition()); - }); - }) - } - - - - function onComplete(data) { - var str = []; - city = data.addressComponent.citycode; - str.push('定位结果:' + data.position); - str.push('定位类别:' + data.location_type); - if (data.accuracy) { - str.push('精度:' + data.accuracy + ' 米'); - } - //如为IP精确定位结果则没有精度信息 - str.push('是否经过偏移:' + (data.isConverted ? '是' : '否')); - var lnglatXY = [data.position.getLng(), data.position.getLat()]; - //地图上所标点的坐标 - AMap.service('AMap.Geocoder', function () { - //回调函数 - geocoder = new AMap.Geocoder({}); - geocoder.getAddress(lnglatXY, function (status, result) { - if (status === 'complete' && result.info === 'OK') { - //获得了有效的地址信息: //即,result.regeocode.formattedAddress -// console.log(result.regeocode.formattedAddress); - var address = result.regeocode.formattedAddress; - str.push('详细地址:' + address); - // todo 不弹出信息框 - // alert(str.join(' | ')); - } else { - // alert(str.join(' | ')); //获取地址失败 - } - }); - }) - } //解析定位错误信息 - function onError(data) { - alert('定位失败,原因:' + data.message); - } - - //输入搜索点信息 - var autoOptions = { - city: city, //在规定城市搜索、默认全国 - input: "startAddress" - }; - - var auto = new AMap.Autocomplete(autoOptions); - var placeSearch = new AMap.PlaceSearch({ - pageSize: 5, // 单页显示结果条数 - pageIndex: 1, // 页码 - children: 0, //不展示子节点数据 - city: city, // 兴趣点城市 - citylimit: true, //是否强制限制在设置的城市内搜索 - panel: "panel", // 结果列表将在此容器中进行展示。 - autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围 - extensions: 'base', //返回基本地址信息 */ - map: map // 展现结果的地图实例 - }); //构造地点查询类 - - AMap.event.addListener(auto, "select", select); //注册监听,当选中某条记录时会触发 - function select(e) { - placeSearch.setCity(e.poi.adcode); - placeSearch.search(e.poi.name); //关键字查询查询 //设置搜索位置定点标注 - if (e.poi && e.poi.location) { - map.setZoom(15); - map.setCenter(e.poi.location); - var id = e.poi.id; //详情查询 - placeSearch.getDetails(id, function (status, result) { - if (status === 'complete' && result.info === 'OK') { - placeSearch_CallBack(result); - } - }); - } - } - - function placeSearch_CallBack(data) { - if (marker != null) { - marker.setMap(null); - } - var poiArr = data.poiList.pois; //添加marker - marker = new AMap.Marker({ - map: map, - position: poiArr[0].location - }); - - map.add(marker); - marker.setPosition(marker.getPosition()); - - infoWindow.setContent(createContent(poiArr[0])); - infoWindow.open(map, marker.getPosition()); - } - - function createContent(poi) { - console.log(poi); - //信息窗体内容 - $("#startAddress").val(poi.address); - $("#startLon").val(poi.location.lng); - $("#startLat").val(poi.location.lat); - $("#areaCode").val(poi.adcode); - - var s = []; - s.push("<b>名称:" + poi.name + "</b>"); - s.push("地址:" + poi.address); - s.push("电话:" + poi.tel); - s.push("类型:" + poi.type); - return s.join("<br>"); - } -</script> - -<script> - //终点地图加载 - var marker1, mapp = new AMap.Map("endAddressBody", { - resizeEnable: true, - zoom: 15, - zooms: [3, 20] - }); //定位标注当前位置 - mapp.plugin('AMap.Geolocation', function () { - geolocation = new AMap.Geolocation({ - enableHighAccuracy: true, //是否使用高精度定位,默认:true - timeout: 10000, //超过10秒后停止定位,默认:无穷大 - maximumAge: 0, //定位结果缓存0毫秒,默认:0 - convert: true, //自动偏移坐标,偏移后的坐标为高德坐标,默认:true - showButton: true, //显示定位按钮,默认:true - showMarker: true, //定位成功后在定位到的位置显示点标记,默认:true - showCircle: true, //定位成功后用圆圈表示定位精度范围,默认:true - panToLocation: true, //定位成功后将定位到的位置作为地图中心点,默认:true - buttonPosition: 'LB', //定位按钮的停靠位置 LB左下角、 RB右下角 - buttonOffset: new AMap.Pixel(10, 20), //定位按钮与设置的停靠位置的偏移量,默认:Pixel(10, 20) - zoomToAccuracy: true, //定位成功后调整地图视野范围使定位位置及精度范围视野内可见,默认:false - }); - mapp.addControl(geolocation); - geolocation.getCurrentPosition(); - AMap.event.addListener(geolocation, 'complete', onComplete); - //返回定位信息 - AMap.event.addListener(geolocation, 'error', onError); - //返回定位出错信息 - }); //解析定位结果 - var cityy; - - mapp.on('click', function (e) { - if (marker1 != null) { - marker1.setMap(null); - } - //添加标记点 - $("#startLon").val(e.lnglat.getLng()); - $("#startLat").val(e.lnglat.getLat()); - marker1 = new AMap.Marker({ - map: mapp, - position: new AMap.LngLat(e.lnglat.getLng(), e.lnglat.getLat()), // 经纬度对象,也可以是经纬度构成的一维数组[116.39, 39.9] - }); - regeoCode1(e.lnglat.getLng(),e.lnglat.getLat()); - }); - - - var infoWindow = new AMap.InfoWindow({ - autoMove: true, - offset: { - x: 0, - y: -30 - } - }); //回调函数 - - - //根据经纬度获取详细地址 - function regeoCode1(lon,lat) { - - var lnglat = []; - lnglat.push(lon); - lnglat.push(lat); - mapp.add(marker1); - marker1.setPosition(lnglat); - - AMap.service('AMap.Geocoder', function() { - geocoder = new AMap.Geocoder({}); - geocoder.getAddress(lnglat, function (status, result) { - if (status === 'complete' && result.regeocode) { - var address = result.regeocode.formattedAddress; - $("#endAddress").val(address); - } else { - Feng.error('根据经纬度查询地址失败【' + result + '】') - return - } - var data={ - "name":result.regeocode.addressComponent.neighborhood, - "location":{ - "lat":lat, - "lng":lon - }, - "address":address, - "tel":"", - "type":result.regeocode.addressComponent.neighborhoodType - }; - - infoWindow.setContent(createContentt(data)); - infoWindow.open(mapp, marker1.getPosition()); - }); - }) - } - - - - - - function onComplete(data) { - var str = []; - cityy = data.addressComponent.citycode; - str.push('定位结果:' + data.position); - str.push('定位类别:' + data.location_type); - if (data.accuracy) { - str.push('精度:' + data.accuracy + ' 米'); - } - //如为IP精确定位结果则没有精度信息 - str.push('是否经过偏移:' + (data.isConverted ? '是' : '否')); - var lnglatXY = [data.position.getLng(), data.position.getLat()]; - //地图上所标点的坐标 - AMap.service('AMap.Geocoder', function () { - //回调函数 - geocoder = new AMap.Geocoder({}); - geocoder.getAddress(lnglatXY, function (status, result) { - if (status === 'complete' && result.info === 'OK') { - //获得了有效的地址信息: //即,result.regeocode.formattedAddress - // console.log(result.regeocode.formattedAddress); - var address = result.regeocode.formattedAddress; - str.push('详细地址:' + address); -// todo 不弹出信息框 -// alert(str.join(' | ')); - } else { -// alert(str.join(' | ')); //获取地址失败 - } - }); - }) - } //解析定位错误信息 - function onError(data) { - alert('定位失败,原因:' + data.message); - } - - //输入搜索点信息 - var autoOptionss = { - city: cityy, //在规定城市搜索、默认全国 - input: "endAddress" - }; - var autoo = new AMap.Autocomplete(autoOptionss); - var placeSearchh = new AMap.PlaceSearch({ - pageSize: 5, // 单页显示结果条数 - pageIndex: 1, // 页码 - children: 0, //不展示子节点数据 - city: city, // 兴趣点城市 - citylimit: true, //是否强制限制在设置的城市内搜索 - panel: "panel", // 结果列表将在此容器中进行展示。 - autoFitView: true, // 是否自动调整地图视野使绘制的 Marker点都处于视口的可见范围 - extensions: 'base', //返回基本地址信息 */ - map: mapp // 展现结果的地图实例 - }); //构造地点查询类 - AMap.event.addListener(autoo, "select", selectt); //注册监听,当选中某条记录时会触发 - - function selectt(e) { - placeSearchh.setCity(e.poi.adcode); - placeSearchh.search(e.poi.name); //关键字查询查询 //设置搜索位置定点标注 - if (e.poi && e.poi.location) { - mapp.setZoom(15); - mapp.setCenter(e.poi.location); - var id = e.poi.id; //详情查询 - placeSearchh.getDetails(id, function (status, result) { - if (status === 'complete' && result.info === 'OK') { - placeSearch_CallBackk(result); - } - }); - } - } - - function placeSearch_CallBackk(data) { - if (marker1 != null) { - marker1.setMap(null); - } - var poiArr = data.poiList.pois; //添加marker - marker1 = new AMap.Marker({ - map: mapp, - position: poiArr[0].location - }); - - mapp.add(marker1); - marker1.setPosition(marker1.getPosition()); - - infoWindow.setContent(createContentt(poiArr[0])); - infoWindow.open(mapp, marker1.getPosition()); - } - - function createContentt(poi) { - console.log(poi); - //信息窗体内容 - $("#endAddress").val(poi.address); - $("#endLon").val(poi.location.lng); - $("#endLat").val(poi.location.lat); - $("#areaCode").val(poi.adcode); - - var ss = []; - ss.push("<b>名称:" + poi.name + "</b>"); - ss.push("地址:" + poi.address); - ss.push("电话:" + poi.tel); - ss.push("类型:" + poi.type); - return ss.join("<br>"); - } -</script> -@} diff --git a/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tOrderPrivateCar_trajectory.html b/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tOrderPrivateCar_trajectory.html deleted file mode 100644 index a2465eb..0000000 --- a/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tOrderPrivateCar_trajectory.html +++ /dev/null @@ -1,57 +0,0 @@ -@layout("/common/_container.html"){ -<style type="text/css"> - html, body, #container { - height: 100%; - width: 100%; - } - - .input-card .btn{ - margin-right: 1.2rem; - width: 9rem; - } - - .input-card .btn:last-child{ - margin-right: 0; - } -</style> -<div class="ibox float-e-margins"> - <div class="ibox-content"> - <div class="form-horizontal"> - <input type="hidden" id="id" name="id" value="${tOrderPrivateCarId}"> - <div class="row" style="margin-top: 30px;"> - <div class="col-sm-4"> - <h2 class="h3Class" style="font-weight: 700;">线路轨迹</h2> - </div> - </div> - <div class="row" style="margin-top: 30px;"> - <div class="col-sm-10"> - <div class="form-horizontal" id="container" style="margin-left: 50px;width: 100%; height: 500px;"></div> - <div class="input-card" style="margin-left: 50px;"> - <h4>轨迹回放控制</h4> - <div class="input-item"> - <input type="button" class="btn" value="开始动画" id="start" onclick="startAnimation()"/> - <input type="button" class="btn" value="暂停动画" id="pause" onclick="pauseAnimation()"/> - <input type="button" class="btn" value="继续动画" id="resume" onclick="resumeAnimation()"/> - <input type="button" class="btn" value="停止动画" id="stop" onclick="stopAnimation()"/> - </div> - <div class="input-item"> - - </div> - </div> - </div> - </div> - - </div> - - </div> -</div> -<script src="https://a.amap.com/jsapi_demos/static/demo-center/js/demoutils.js"></script> -<script type="text/javascript"> - window._AMapSecurityConfig = { - securityJsCode: '44c5ee9ad584605d91ca69bfac32c761', - } -</script> -<script src="https://webapi.amap.com/maps?v=1.4.8&key=d3bde6afb050067e1a765a8d1d1f4c54"></script> -<script src="https://cache.amap.com/lbs/static/addToolbar.js"></script> -<script src="${ctxPath}/static/modular/system/tOrderPrivateCar/tOrderPrivateCar_info.js"></script> -@} diff --git a/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tPromotionOrder.html b/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tPromotionOrder.html index a0479ba..8027935 100644 --- a/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tPromotionOrder.html +++ b/ManagementQYTTravel/guns-admin/src/main/webapp/WEB-INF/view/system/tPromotionOrderCar/tPromotionOrder.html @@ -26,10 +26,42 @@ </div> <div class="col-sm-3"> - <#button name="搜索" icon="fa-search" clickFun="TAbnormalOrder.search()"/> - <#button name="重置" icon="fa-trash" clickFun="TAbnormalOrder.resetSearch()" space="true"/> + <#button name="搜索" icon="fa-search" clickFun="search()"/> + <#button name="重置" icon="fa-trash" clickFun="resetSearch()" space="true"/> </div> </div> + + <div class="form-group"> + <div class="row"> + <div class="col-sm-6"> + <div class="stat-card" style=" border: none; padding: 20px; border-radius: 10px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);"> + <div class="stat-content"> + <div class="stat-number" style="font-size: 28px; font-weight: bold; margin-bottom: 5px;" id="money"> + ${money} + </div> + <div class="stat-label" style="font-size: 14px; opacity: 0.9;"> + 合计推广收益金额 + </div> + </div> + <div style="clear: both;"></div> + </div> + </div> + <div class="col-sm-6"> + <div class="stat-card" style=" border: none; padding: 20px; border-radius: 10px; margin-bottom: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.1);"> + <div class="stat-content"> + <div class="stat-number" style="font-size: 28px; font-weight: bold; margin-bottom: 5px;" id="size"> + ${size} + </div> + <div class="stat-label" style="font-size: 14px; opacity: 0.9;"> + 合计推广收益笔数 + </div> + </div> + <div style="clear: both;"></div> + </div> + </div> + </div> + </div> + <div class="hidden-xs" id="TOrderPrivateCarTableToolbar" role="group"> <#button name="导出Excel" icon="" clickFun="TAbnormalOrder.exportExcel()" space="true"/> </div> @@ -46,5 +78,44 @@ elem: '#insertTime' ,range: true }); + + function search() { + + let insertTime = $('#insertTime').val(); + let name = $('#name').val(); + let driverName = $('#driverName').val(); + let userName = $('#userName').val(); + let orderNum = $('#orderNum').val(); + + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/promotionInfo/list1", function(data){ + console.log(data) + $("#money").text(data.money) + $("#size").text(data.size) + },function(data){ + }); + ajax.set("insertTime",insertTime); + ajax.set("name",name); + ajax.set("driverName",driverName); + ajax.set("userName",userName); + ajax.set("orderNum",orderNum); + ajax.start(); + TAbnormalOrder.search() + } + + + function resetSearch() { + + //提交信息 + var ajax = new $ax(Feng.ctxPath + "/promotionInfo/list1", function(data){ + console.log(data) + $("#money").text(data.money) + $("#size").text(data.size) + },function(data){ + }); + ajax.start(); + TAbnormalOrder.resetSearch() + } </script> @} -- Gitblit v1.7.1