扫码
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <%@page import="com.tp.base.model.Xo"%> 3 <%@page import="org.apache.commons.lang.StringUtils"%> 4 <%@page import="com.wechat.base.utils.WeChatUtils"%> 5 <%@ page language="java" import="java.util.*" pageEncoding="GBK" %> 6 <% 7 WebUtils utils = new WebUtils(); 8 String comIdGoToCart = (String)request.getAttribute("WeChat_ComId"); 9 String urlGoToCart = (String)request.getAttribute("WeChat_Url")+"?"+(String)request.getAttribute("WeChat_QueryString"); 10 HashMap wxconfig = WeChatUtils.getJSConfig(request, comIdGoToCart, urlGoToCart); 11 request.setAttribute("wxconfig", wxconfig); 12 %> 13 <html> 14 <%@ include file="/wechattaglibs.jsp" %> 15 <body> 16 17 <div data-role="page" data-quicklinks="true" id ="${popid}" > 18 19 20 <!-- content start --> 21 <div data-role="content" class="myui-content" id="content-${popid}" > 22 <div id="alterinfo" > 23 <form method="post" id="sendInfo" action="${apppath}/wechat/returnorder/send/${WeChat_ComId}.do?primaryKey=${xo.coNum}&timeId=${timeId}"><%-- --%> 24 <div class="weui_cell"> 25 <div class="weui_cell_hd">单号:</div> 26 <div class="weui_cell_bd weui_cell_primary"> 27 <p>${xo.coNum}</p> 28 </div> 29 </div> 30 <div class="weui_cell" style=" 100%"> 31 <div class="weui_cell_hd" style=" 40%">支付及配送方式:</div> 32 <div class="weui_cell_bd weui_cell_primary" style=" 60%"> 33 <%-- <input class="weui_input" readonly="readonly" value='' /> --%> 34 <p>${tptag:readyNameBySql(xo.isPrm,"queryenum.MALL_PAYMODE","","") }</p> 35 </div> 36 </div> 37 <div class="weui_cell"> 38 <div class="weui_cell_hd">商品金额:</div> 39 <div class="weui_cell_bd weui_cell_primary"> 40 <!-- <input class="weui_input" value='' readonly="readonly"/> --> 41 <p>${RealAmount}</p> 42 </div> 43 </div> 44 45 <div class="weui_cell"> 46 <div class="weui_cell_hd">买家承担费用</div> 47 <div class="weui_cell_bd weui_cell_primary"> 48 <%-- <input class="weui_input" value='' readonly="readonly"/> --%> 49 <p>${buyfeeAmt}</p> 50 </div> 51 </div> 52 53 <div class="weui_cell"> 54 <div class="weui_cell_hd">卖家承担费用:</div> 55 <div class="weui_cell_bd weui_cell_primary"> 56 <%-- <input class="weui_input" value='' readonly="readonly"/> --%> 57 <p>${sellfeeAmt}</p> 58 </div> 59 </div> 60 61 <div class="weui_cell"> 62 <div class="weui_cell_hd">应退金额:</div> 63 <div class="weui_cell_bd weui_cell_primary"> 64 <!-- <input class="weui_input" value='' readonly="readonly"/> --> 65 <p>${RealAmount-buyfeeAmt+sellfeeAmt}</p> 66 </div> 67 </div> 68 <!-- <div class="weui_cell"> 69 <div class="weui_cell_hd">收货人:</div> 70 <div class="weui_cell_bd weui_cell_primary"> 71 <input class="weui_input" name='orderName' placeholder="请输入收货人" id="orderName" /> 72 </div> 73 </div> 74 <div class="weui_cell"> 75 <div class="weui_cell_hd">收货地址:</div> 76 <div class="weui_cell_bd weui_cell_primary"> 77 <input class="weui_input" name='addr' placeholder="请输入收货地址" id="addr" /> 78 </div> 79 </div> 80 <div class="weui_cell"> 81 <div class="weui_cell_hd">电话:</div> 82 <div class="weui_cell_bd weui_cell_primary"> 83 <input class="weui_input" name='orderTel' placeholder="请输入联系电话" id="orderTel" /> 84 </div> 85 </div> --> 86 87 88 <div class="weui_cell"> 89 <div class="weui_cell_hd">物流公司:</div> 90 <div class="weui_cell_bd weui_cell_primary " data-theme="b"> 91 <select name="wuliu"> 92 <option value="顺丰"> 93 顺丰 94 </option> 95 <option value="申通"> 96 申通 97 </option> 98 </select> 99 100 101 </div> 102 </div> 103 104 <div class="weui_cell"> 105 <div class="weui_cell_hd" >发货单号:</div> 106 <div class="weui_cell_bd weui_cell_primary"> 107 <input class="weui_input" name='deliveryNum' placeholder="请输入发货单号" id="sendcode" /> 108 </div> 109 <span class="weui_btn weui_btn_mini weui_btn_primary" id="weScan" style="margin-left: 10px">扫码</span> 110 </div> 111 112 113 <input class="weui_btn weui_btn_primary" id="gotoSend" type="button" value="确认发货" /> 114 115 </form> 116 </div> 117 118 119 <div class="weui_dialog_confirm" id="dialog1" style="display: none;"> 120 <div class="weui_mask"></div> 121 <div class="weui_dialog"> 122 <div class="weui_dialog_hd"><strong class="weui_dialog_title" style="font-weight: bold;color: #000;font-size: 18px;">确认发货?</strong></div> 123 <div class="weui_dialog_bd" style="">订单编号:${xo.coNum}</div> 124 <div class="weui_dialog_ft"> 125 <a href="javascript:;" class="weui_btn_dialog default cancel" style="font-weight: bold;color: #0033B1;font-size: 18px;">否</a> 126 <a href="javascript:;" class="weui_btn_dialog primary ok" style="font-weight: bold;color: #0033B1;font-size: 18px;">是</a> 127 </div> 128 </div> 129 </div> 130 131 132 </div> 133 134 135 136 137 <!-- content end --> 138 <script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> 139 <script type="text/javascript"> 140 $(function(){ 141 //$('#shippingId').tpselect({'url':'${apppath}','blankHead':false,'headStr':'--请选择--',autoload:true}); 142 /* $("#gotoSend").on('click',function(){ 143 $("#dialog1").show(); 144 $(".ok").click(function(){ 145 $("#sendInfo").submit(); 146 }); 147 $(".cancel").click(function(){ 148 $("#dialog1").hide(); 149 }); 150 var isRefresh = ${isRefresh}; 151 if(isRefresh){ 152 window.location.reload(); 153 } 154 }); */ 155 //获取微信权限 156 wx.config({ 157 debug: false, 158 appId: '${wxconfig.appID}', 159 timestamp: '${wxconfig.timestamp}', 160 nonceStr: '${wxconfig.nonce}', 161 signature: '${wxconfig.signature}', 162 jsApiList: [ 163 'scanQRCode' 164 ] 165 }); 166 167 //微信扫一扫接口 168 $("#sendInfo #weScan").click(function(){ 169 170 wx.scanQRCode({ 171 needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果, 172 scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码,默认二者都有 173 success: function (res) { 174 var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果 175 if(result!=null && result!=""){ 176 $("#${popid} #sendcode").prop("value",sendCode); 177 }else{ 178 alert("扫描无效,请重新输入!"); 179 return false; 180 } 181 } 182 }); 183 184 185 }); 186 187 188 189 190 $("#${popid} .weui_cell_hd").css("width","38%"); 191 $("#${popid} .weui_cell_hd").css("text-align","right"); 192 $("#${popid} .weui_cell_primary p").css("text-align","left"); 193 console.log('${WeChat_ComId}'); 194 $('#${popid} #alterinfo #shippingId').tpselect({'url':'${apppath}','blankHead':false,'headStr':'--请选择--', 195 autoload:true, 196 afterloadFn:function(obj){ 197 198 $(obj).selectmenu('refresh', true); 199 } 200 }); 201 202 $("#${popid} #gotoSend").click(function(){ 203 var sendcode = $("#${popid} #sendcode").val(); 204 var orderName = $("#${popid} #orderName").val(); 205 var addr = $("#${popid} #addr").val(); 206 var orderTel = $("#${popid} #orderTel").val(); 207 208 if(""==orderName){ 209 alert("收货人必填!"); 210 return false; 211 } 212 if(""==addr){ 213 alert("收货地址必填!"); 214 return false; 215 } 216 if(""==orderTel){ 217 alert("联系电话必填!"); 218 return false; 219 } 220 if(""==sendcode){ 221 alert("发货单号必填!"); 222 return false; 223 } 224 if(confirm("确认发货?")){ 225 alert("发货成功!"); 226 $("#${popid} #sendInfo").submit(); 227 }else{ 228 return false; 229 } 230 231 232 }); 233 }); 234 </script> 235 <%@ include file="/wechatfooter.jsp" %> 236 </div> 237 <!-- /page --> 238 239 </body> 240 </html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><%@page import="com.tp.base.model.Xo"%><%@page import="org.apache.commons.lang.StringUtils"%><%@page import="com.wechat.base.utils.WeChatUtils"%><%@ page language="java" import="java.util.*" pageEncoding="GBK" %><% WebUtils utils = new WebUtils();String comIdGoToCart = (String)request.getAttribute("WeChat_ComId");String urlGoToCart = (String)request.getAttribute("WeChat_Url")+"?"+(String)request.getAttribute("WeChat_QueryString");HashMap wxconfig = WeChatUtils.getJSConfig(request, comIdGoToCart, urlGoToCart);request.setAttribute("wxconfig", wxconfig); %><html><%@ include file="/wechattaglibs.jsp" %> <body>
<div data-role="page" data-quicklinks="true" id ="${popid}" > <!-- content start --> <div data-role="content" class="myui-content" id="content-${popid}" ><div id="alterinfo" ><form method="post" id="sendInfo" action="${apppath}/wechat/returnorder/send/${WeChat_ComId}.do?primaryKey=${xo.coNum}&timeId=${timeId}"><%-- --%><div class="weui_cell"> <div class="weui_cell_hd">单号:</div> <div class="weui_cell_bd weui_cell_primary"> <p>${xo.coNum}</p> </div> </div> <div class="weui_cell" style=" 100%"> <div class="weui_cell_hd" style=" 40%">支付及配送方式:</div> <div class="weui_cell_bd weui_cell_primary" style=" 60%"> <%-- <input class="weui_input" readonly="readonly" value='' /> --%> <p>${tptag:readyNameBySql(xo.isPrm,"queryenum.MALL_PAYMODE","","") }</p> </div> </div> <div class="weui_cell"> <div class="weui_cell_hd">商品金额:</div> <div class="weui_cell_bd weui_cell_primary"> <!-- <input class="weui_input" value='' readonly="readonly"/> --> <p>${RealAmount}</p> </div> </div> <div class="weui_cell"> <div class="weui_cell_hd">买家承担费用</div> <div class="weui_cell_bd weui_cell_primary"> <%-- <input class="weui_input" value='' readonly="readonly"/> --%> <p>${buyfeeAmt}</p> </div> </div> <div class="weui_cell"> <div class="weui_cell_hd">卖家承担费用:</div> <div class="weui_cell_bd weui_cell_primary"> <%-- <input class="weui_input" value='' readonly="readonly"/> --%> <p>${sellfeeAmt}</p> </div> </div> <div class="weui_cell"> <div class="weui_cell_hd">应退金额:</div> <div class="weui_cell_bd weui_cell_primary"> <!-- <input class="weui_input" value='' readonly="readonly"/> --> <p>${RealAmount-buyfeeAmt+sellfeeAmt}</p> </div> </div><!-- <div class="weui_cell"> <div class="weui_cell_hd">收货人:</div> <div class="weui_cell_bd weui_cell_primary"> <input class="weui_input" name='orderName' placeholder="请输入收货人" id="orderName" /> </div> </div> <div class="weui_cell"> <div class="weui_cell_hd">收货地址:</div> <div class="weui_cell_bd weui_cell_primary"> <input class="weui_input" name='addr' placeholder="请输入收货地址" id="addr" /> </div> </div> <div class="weui_cell"> <div class="weui_cell_hd">电话:</div> <div class="weui_cell_bd weui_cell_primary"> <input class="weui_input" name='orderTel' placeholder="请输入联系电话" id="orderTel" /> </div> </div> --> <div class="weui_cell"> <div class="weui_cell_hd">物流公司:</div> <div class="weui_cell_bd weui_cell_primary " data-theme="b"> <select name="wuliu"> <option value="顺丰"> 顺丰 </option> <option value="申通"> 申通 </option> </select> </div> </div> <div class="weui_cell"> <div class="weui_cell_hd" >发货单号:</div> <div class="weui_cell_bd weui_cell_primary"> <input class="weui_input" name='deliveryNum' placeholder="请输入发货单号" id="sendcode" /> </div> <span class="weui_btn weui_btn_mini weui_btn_primary" id="weScan" style="margin-left: 10px">扫码</span> </div> <input class="weui_btn weui_btn_primary" id="gotoSend" type="button" value="确认发货" /></form></div><div class="weui_dialog_confirm" id="dialog1" style="display: none;"> <div class="weui_mask"></div> <div class="weui_dialog"> <div class="weui_dialog_hd"><strong class="weui_dialog_title" style="font-weight: bold;color: #000;font-size: 18px;">确认发货?</strong></div> <div class="weui_dialog_bd" style="">订单编号:${xo.coNum}</div> <div class="weui_dialog_ft"> <a href="javascript:;" class="weui_btn_dialog default cancel" style="font-weight: bold;color: #0033B1;font-size: 18px;">否</a> <a href="javascript:;" class="weui_btn_dialog primary ok" style="font-weight: bold;color: #0033B1;font-size: 18px;">是</a> </div> </div> </div> </div> <!-- content end --><script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script> <script type="text/javascript">$(function(){//$('#shippingId').tpselect({'url':'${apppath}','blankHead':false,'headStr':'--请选择--',autoload:true});/* $("#gotoSend").on('click',function(){$("#dialog1").show();$(".ok").click(function(){$("#sendInfo").submit();});$(".cancel").click(function(){$("#dialog1").hide();});var isRefresh = ${isRefresh};if(isRefresh){window.location.reload();}}); *///获取微信权限wx.config({ debug: false,appId: '${wxconfig.appID}',timestamp: '${wxconfig.timestamp}',nonceStr: '${wxconfig.nonce}',signature: '${wxconfig.signature}',jsApiList: [ 'scanQRCode' ] });//微信扫一扫接口$("#sendInfo #weScan").click(function(){wx.scanQRCode({ needResult: 1, // 默认为0,扫描结果由微信处理,1则直接返回扫描结果, scanType: ["qrCode","barCode"], // 可以指定扫二维码还是一维码,默认二者都有 success: function (res) { var result = res.resultStr; // 当needResult 为 1 时,扫码返回的结果 if(result!=null && result!=""){$("#${popid} #sendcode").prop("value",sendCode);}else{alert("扫描无效,请重新输入!");return false;} }});});$("#${popid} .weui_cell_hd").css("width","38%");$("#${popid} .weui_cell_hd").css("text-align","right");$("#${popid} .weui_cell_primary p").css("text-align","left");console.log('${WeChat_ComId}');$('#${popid} #alterinfo #shippingId').tpselect({'url':'${apppath}','blankHead':false,'headStr':'--请选择--', autoload:true, afterloadFn:function(obj){ $(obj).selectmenu('refresh', true); } });$("#${popid} #gotoSend").click(function(){var sendcode = $("#${popid} #sendcode").val();var orderName = $("#${popid} #orderName").val();var addr = $("#${popid} #addr").val();var orderTel = $("#${popid} #orderTel").val();if(""==orderName){alert("收货人必填!");return false;}if(""==addr){alert("收货地址必填!");return false;}if(""==orderTel){alert("联系电话必填!");return false;}if(""==sendcode){alert("发货单号必填!");return false;}if(confirm("确认发货?")){alert("发货成功!");$("#${popid} #sendInfo").submit();}else{return false;}});});</script><%@ include file="/wechatfooter.jsp" %> </div><!-- /page -->
</body></html>