| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="utf-8">
- <title>申请换货</title>
- <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
- <meta name="apple-mobile-web-app-capable" content="yes">
- <meta name="apple-mobile-web-app-status-bar-style" content="black">
- <link rel="stylesheet" href="//css.iamberry.com/wateroPF/css/mui.min.css">
- <link rel="stylesheet" href="//css.iamberry.com/wateroPF/css/iconfont.css" />
- <link rel="stylesheet" href="//css.iamberry.com/wateroPF/css/icons-extra.css"/>
- <link rel="stylesheet" href="//css.iamberry.com/wateroPF/css/style.css" />
- <style type="text/css">
- .cart_fixed{position: fixed;right: 30px;bottom:135px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .5;}
- .cart_fixed .mui-badge{position: absolute;right:-7px;top:-5px;font-size: 12px;}
- .return{position: fixed;right: 30px;bottom: 80px;background: rgba(0,0,0,.2);padding: 12px;border-radius: 50%;text-align: center;opacity: .9;color: #333;display: none;}
- .my-btn-hand{display:block;width: 100%;height: 55px;background-color: #1cc9f4;color: #fff;border: 0;border-radius: 0;}
- .my-btn-hand.active{background-color: #c5c5c5;}
- .cl-blue{color: #1cc9f4;}
- .iconfont{font-size: 20px;}
- .mui-content-madded{background: #fff;padding: 10px;}
- .lease-ul{font-size: 12px;color: #999;}
- .lease-ul li{padding: 5px 0;}
- .lease-left{display: inline-block;width: 25%;}
- .ul_radio{width: 73%;display: inline-block;}
- .ul_radio li{width:100%;height: 55px;margin: 0 1%;border-radius: 5px; display: inline-block;position: relative;font-family:"iconfont" !important;font-style:normal;-webkit-font-smoothing: antialiased;}
- .radio-cell .active:after{position: absolute;right: 0;bottom: 0;content: "\e66f";color: #f1436c;line-height: 1;font-size: 20px;}
- .lease-r-center{position: absolute;left: 70px;top: 20px;}
- .lease-color{padding: 10px 0;float: left;}
- .lease-select-box{padding: 12px 0;position: relative;}
- .lease-select{position: absolute;left: 0;top: 10px;}
- .mui-input-row{font-size: 13px;}
- .mui-input-row input{font-size: 13px;}
- .mui-input-group:before{display: none;}
- #xieyi-dalog{text-decoration:underline}
- .ul_noline{padding-bottom: 60px;}
- .ul_noline:before{display: none;}
- .ul_noline li:after{display: none;}
- .address_ul{color: #999;font-size: 12px;}
- .address_ul li{white-space:nowrap;overflow: hidden;text-overflow: ellipsis;}
- .my-select {border:0!important;color: #999;background-color: #f5f5f5;margin-bottom: 0;padding: 3px 14px;text-align: center;-webkit-appearance: menulist;height: 40px;}
- .my-view1:after,.my-view1 li:after{display: none;}
- .ul_noline:after{display: none;}
- </style>
- <script>
- // 屏蔽分享
- window.hiddenAllWechatMenu = true;
- </script>
- </head>
- <body style="background-color: #fff;">
- <div class="loading-bg">
- <div class="mui-loading">
- <div class="mui-spinner">
- </div>
- 加载中...
- </div>
- </div>
- <div class="mui-content">
- <div style="padding: 0 10px;background: #fff;">
- <ul class="mui-table-view">
- <li class="mui-table-view-cell" style="padding: 11px 0;">
- <span class="iconfont icon-lease7 cl-blue"></span> 订单编号:<span id="order_num"></span>
- </li>
- </ul>
- <ul class="lease-ul">
- <!--<li>产品名称:美国watero净饮水一体机</li>
- <li>产品颜色:黑色x1</li>-->
- </ul>
- <ul class="mui-table-view my-view1">
- <li class="mui-table-view-cell" style="padding: 11px 0;">
- <span class="mui-h5">寄回快递单号:</span><input type="text" style="width:50% !important" id="ipt_kuaidi"/><span id="kuaidi_name"></span>
- </li>
- </ul>
-
- <ul class="mui-table-view ul_noline">
- <li class="mui-table-view-cell" style="padding: 11px 0 0 0;">
- <span class="iconfont icon-lease2 cl-blue"></span> 选择换货邮寄地址
- </li>
- <li class="mui-table-view-cell" style="padding: 11px 10px;">
- <a class="mui-navigate-right" id="open-wechat-addres-a">
- <!--选择收货地址-->
- <ul class="address_ul">
- <!--<li>收 货 人:林林</li>
- <li>手 机 号:15999999999</li>
- <li>详细地址:广东省深圳市福田区莲花街道特区报业大厦12B</li>-->
- </ul>
- </a>
- </li>
- <li>
- <span class="mui-h5">换货备注</span>
- </li>
- <li style="ppadding:10px 0 5px 0;">
- <input type="text" placeholder="请输入您的换货备注" style="font-size: 12px;background: #f0f0f0;border: 0;text-align: center;" id="ipt_beizhu"/>
- </li>
- <li class="mui-text-center" style="padding:10px 15px 15px 15px;">
- <a href="/wateroPF/view/lease_xieyi.html" style="text-decoration: underline;color: #999;" id="btn_shouhou">售后说明</a>
- </li>
- </ul>
- </div>
- <div class="buy-footer">
- <button type="button" class="mui-btn my-btn-hand active" data-loading-icon="mui-spinner mui-spinner-custom" data-loading-text="申请中" id="btn_submit">申请换货</button>
- </div>
- </div>
- <script src="//s.iamberry.com/wateroPF/js/mui.min.js"></script>
- <script src="//s.iamberry.com/wateroPF/js/jquery-2.1.1.min.js"></script>
- <script src="//s.iamberry.com/wateroPF/js/shop/main.js"></script>
- <script src="//s.iamberry.com/wateroPF/js/shop/wechat-utils-1.0.js"></script>
- <script>
- var address='',nickname='',ads_tel='';
- var parm=getParam("orderId"),item1=getParam("itemId");
- mui.ready(function() {
- mui.ajax(base_path + '/rent_order/to_apply_exchange', {
- data: {
- orderId: parm,
- itemId:item1
- },
- type: 'post',
- timeout: 15000,
- success: function(dt) {
- /*console.log(dt)*/
- if(dt.isRedirect) {
- location.href = dt.redirectURL;
- }else{
- if(dt.status) {
- address=dt.data.rentAddressInfo;
- nickname=dt.data.rentAddressName;
- ads_tel=dt.data.rentAddressTel;
- $("#order_num").text(dt.data.rentOrderId);
- $(".address_ul").html('<li>收 货 人:' + dt.data.rentAddressName + '</li><li>手 机 号:' + dt.data.rentAddressTel + '</li><li>详细地址:' + dt.data.rentAddressInfo + '</li>');
- var str='';
- mui(dt.data.list).each(function(index) {
- if(this.itemProductType==1){
- str+='<li>产品名称:'+this.itemProductName+'</li><li>产品颜色:'+this.itemProductColorName+'x1</li>'
- }else{
- str+='<li>赠品名称:'+this.itemProductName+'</li><li>赠品颜色:'+this.itemProductColorName+'x1</li>'
- }
- });
- $(".lease-ul").html(str);
- }
- }
- },
- error: function(xhr, type, errorThrown) {
- console.log(xhr)
- }
- })
- document.querySelector('.loading-bg').style.display = 'none';
- });
- //申请换货
- var isPay=true,check=false;
- mui('body').on('tap', '#btn_submit', function() {
- console.log(check)
- var th=this;
- if(check){
- if(isPay) {
- isPay = false; // 锁定请求按钮
- mui(this).button('loading');
- var param = {
- "orderId": parm,
- "itemId": item1,
- "exchangeAddressName": nickname,
- "exchangeAddressTel": ads_tel,
- "exchangeAddressInfo":address,
- "exchangePostFirm":"申通快递",
- "exchangePostNum":$("#ipt_kuaidi").val(),
- "exchangeRemark":$("#ipt_beizhu").val()
- }
- $.ajax({
- type: 'post',
- url: base_path+'/rent_order/apply_exchange?dates=' + new Date().getTime(),
- data: param,
- dataType: 'json',
- timeout: 15000,
- success: function(dt) {
- //console.log(dt);
- if(dt.isRedirect) {
- location.href = dt.redirectURL;
- }else{
- if(dt.status) {
- mui.alert(dt.message,'',function(){
- location.href='/wateroPF/view/rent/lease_order_details.html?rentStatus=-1';
- });
- } else {
- mui(th).button('reset');
- isPay = true;
- mui.alert(dt.message);
- }
- }
- },
- error: function(xhr, type, errorThrown) {
- //异常处理;
- console.log(xhr);
- isPay = true;
- layer.closeAll();
- mui.alert("请检查网络或刷新页面重试!");
- mui(th).button('reset');
- }
- });
- }else{
- mui.alert("正在申请换货中~~请稍后!");
- return;
- }
- }
- });
- // 获取微信共享地址
- mui('body').on('tap', '#open-wechat-addres-a', function() {
- editAddrV1(
- function(res) {
- // 用户成功拉出地址
- address = res.provinceName + "-" + res.cityName + "-" + res.countryName + "-" + res.detailInfo;
- nickname=res.userName;
- ads_tel= res.telNumber;
- wechatAddr.status = true;
- wechatAddr.detailInfo = address;
- wechatAddr.postalCode = res.postalCode;
- wechatAddr.userName = res.userName;
- wechatAddr.userTel = res.telNumber;
- wechatAddr.nationalCode = res.nationalCode;
- $("#open-wechat-addres-a").empty().append('<ul class="address_ul"><li>收 件 人:'+ wechatAddr.userName +'</li><li>手 机 号:' + wechatAddr.userTel + '</li><li>详细地址:'+ wechatAddr.detailInfo+'</li></ul>');
- },
- function() {
- if($('#open-wechat-addres-a').html() != null && $('#open-wechat-addres-a').html() != '') {
- wechatAddr.status = true;
- } else {
- wechatAddr.status = false;
- // 用户取消拉出地址
- $('#open-wechat-addres-a').html('收货地址<span class="mui-h5">请选择收货地址</span>');
- mui.alert("您没有选择收货地址!");
- }
- }
- );
- });
- mui.os.ios ? listener_ipt() : keyup_fn();
- function keyup_fn() {
- $('body').on('keyup', '#ipt_kuaidi', function(e) {
- //传参数并加载数据
- var str = $.trim($(this).val());
- console.log(str!='' && typeof(str) != "undefined");
- if(str!='' && typeof(str) != "undefined"){
- check=true;
- $("#btn_submit").removeClass("active").removeAttr("disabled");
- }else{
- check=false;
- $("#btn_submit").addClass("active").prop("disabled","disabled");
- }
- });
- }
- function listener_ipt() {
- document.getElementById('ipt_kuaidi').onblur = function() {
- //传参数并加载数据
- var str = $.trim($("#ipt_kuaidi").val());
- console.log(str!='' && typeof(str) != "undefined");
- var btn_submit=$("#btn_submit");
- if(str!='' && typeof(str) != "undefined"){
- check=true;
- $("#btn_submit").removeClass("active").removeAttr("disabled");
- }else{
- check=false;
- $("#btn_submit").addClass("active").prop("disabled","disabled");
- }
- }
- }
- mui('body').on('tap', '#btn_shouhou', function() {
- location.href="/wateroPF/view/lease_xieyi.html"
- });
- </script>
- </body>
- </html>
|