get_one.html 14.5 KB
<!DOCTYPE html>
<html lang="en">

<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" name="viewport"/>
    <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
    <title>学考无忧-订单确认-选择地址信息</title>
    <link rel="stylesheet" href="__TMPL__/public/assets/css/mui.min.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/mui.picker.min.css">
    <link rel="stylesheet" href="__TMPL__/public/assets/css/reset.css"/>
    <link rel="stylesheet" href="__TMPL__/public/assets/css/log.css"/>
    <style type="text/css">
        .mui-poppicker-header,
        .mui-picker {
            background-color: white;
        }

        .mui-btn-blue,
        .mui-btn-primary,
        input[type=submit] {
            background-color: #FF7700;
            border: 0;
        }

        .mui-pciker-list li.highlight {
            color: #FF7700;
        }

        .log_four_input_one_left {
            width: 2.14rem;
        }

        .log_four_input_one_center {
            margin-left: 0;
        }

        .log_four_input_one_right {
            margin-left: auto;
        }
    </style>
</head>

<body style="background-color: #F7F7F7;">
<div class="log_top_co" style="background-color: white;">
    <!-- 顶部 -->
    <div class=" order_top log_top_co">
        <a href="">
            <img src="__TMPL__/public/assets/images/left.png" alt=""/>
        </a>
        <p>订单确认</p>
    </div>
</div>
<div class="tx_maskone">
    <div class="tx_maskCon">
        <div class="tx_maskConImg">
            <img src="__TMPL__/public/assets/images/91.png" alt=""/>
        </div>
        <div class="tx_maskCon2">
            <div class="log_three_model">
                <div class="log_three_model_one time">
                    <div class="log_three_model_left">配送时间</div>
                    <div class="log_psong">
                        <input type="text" id="start_time" value="" placeholder="请输入开始配送时间"/>
                    </div>
                </div>
                <div class="log_three_model_one time">
                    <div class="log_three_model_left">配送时间</div>
                    <div class="log_psong">
                        <input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/>
                    </div>
                </div>
                <div class="log_three_model_one logistic">
                    <div class="log_three_model_left">选择快递</div>
                    <div class="log_psong log_psong_select">
                        <div class="log_ps_title">请选择快递公司</div>
                        <div class="log_ps_img">
                            <img src="__TMPL__/public/assets/images/29.png"/>
                            <input type="hidden" id="logistic_name" placeholder="请选择快递公司"/>
                        </div>
                    </div>
                </div>
                <div class="log_three_model_one logistic" style="padding-bottom: 0;">
                    <div class="log_three_model_left" style="margin-top: -0.3rem;">快递单号</div>
                    <div class="log_three_model_right">
                        <input type="text" id="logistic_code" placeholder="请输入快递单号"/>
                    </div>
                </div>
            </div>
            <!-- 确定 -->
            <div class="tx_maskOk confirm" data-is_courier="" data-id="" data-indent-id="">确定</div>
        </div>
    </div>
</div>
<!--选择快递-->
<div class="tx_mask_kuaidi">
    <div class="tx_maskCon_school">
        <div class="three_model_school">
            <div class="three_model_school_title">
                选择快递
            </div>
            <div>
                <div class="three_model_school_data" style="display: block;">
                    <div class="three_model_school_name" data-name="SF">顺丰快递</div>
                    <div class="three_model_school_name" data-name="YTO">圆通快递</div>
                    <div class="three_model_school_name" data-name="ZTO">中通快递</div>
                    <div class="three_model_school_name there_unActive" data-name="STO">申通快递</div>
                    <div class="three_model_school_name" data-name="YD">韵达快递</div>
                    <div class="three_model_school_name" data-name="HHTT">天天快递</div>
                    <div class="three_model_school_name" data-name="HTKY">百世快递</div>
                    <div class="three_model_school_name" data-name="YZPY">邮政快递包裹</div>
                    <div class="three_model_school_name" data-name="EMS">EMS</div>
                    <div class="three_model_school_name" data-name="DBL">德邦快递</div>
                    <div class="three_model_school_name" data-name="ZJS">宅急送</div>
                    <div class="three_model_school_name" data-name="TNT">TNT快递</div>
                </div>
            </div>
        </div>
    </div>
</div>
<!-- 地址信息 -->
<div class="log_four_input">
    <div class="log_four_input_title" style="margin-bottom: 0.2rem;">
        地址信息
    </div>
    <if condition="$data.is_courier eq 2">
        <div class="log_four_input_one">
            <div class="log_four_input_one_left">
                姓名
            </div>
            <div class="log_four_input_one_center">
                <div id="city_text">{$data.indent_address.name}</div>
            </div>
            <div class="log_four_input_one_right">
                <img src="__TMPL__/public/assets/images/29.png" alt=""/>
            </div>
        </div>
        <div class="log_four_input_one">
            <div class="log_four_input_one_left">
                电话
            </div>
            <div class="log_four_input_one_center">
                <div id="city_text">{$data.indent_address.phone}</div>
            </div>
            <div class="log_four_input_one_right">
                <img src="__TMPL__/public/assets/images/29.png" alt=""/>
            </div>
        </div>
        <div class="log_four_input_one">
            <div class="log_four_input_one_left">
                地址
            </div>
            <div class="log_four_input_one_center">
                <div id="city_text">{$data.indent_address.region}</div>
            </div>
            <div class="log_four_input_one_right">
                <img src="__TMPL__/public/assets/images/29.png" alt=""/>
            </div>
        </div>
        <div class="log_four_input_one">
            <div class="log_four_input_one_left">
                详细地址
            </div>
            <div class="log_four_input_one_center">
                <div id="city_text">{$data.indent_address.detailed}</div>
            </div>
            <div class="log_four_input_one_right">
                <img src="__TMPL__/public/assets/images/29.png" alt=""/>
            </div>
        </div>
        <else />
        <div class="log_four_input_one">
            <div class="log_four_input_one_left">
                地区
            </div>
            <div class="log_four_input_one_center">
                <div id="city_text">{$data.region}</div>
            </div>
            <div class="log_four_input_one_right">
                <img src="__TMPL__/public/assets/images/29.png" alt=""/>
            </div>
        </div>
        <div class="log_four_input_one">
            <div class="log_four_input_one_left">
                学校
            </div>
            <div class="log_four_input_one_center">
                <div id="city_text">{$data.school}</div>
            </div>
            <div class="log_four_input_one_right">
                <img src="__TMPL__/public/assets/images/29.png" alt=""/>
            </div>
        </div>
        <div class="log_four_input_one">
            <div class="log_four_input_one_left">
                班级
            </div>
            <div class="log_four_input_one_center">
                <div id="city_text">{$data.grade}-{$data.class}</div>
            </div>
            <div class="log_four_input_one_right">
                <img src="__TMPL__/public/assets/images/29.png" alt=""/>
            </div>
        </div>
        <div class="log_four_input_one">
            <div class="log_four_input_one_left">
                姓名
            </div>
            <div class="log_four_input_one_center">
                <div id="city_text">{$data.name}</div>
            </div>
            <div class="log_four_input_one_right">
                <img src="__TMPL__/public/assets/images/29.png" alt=""/>
            </div>
        </div>
        <div class="log_four_input_one">
            <div class="log_four_input_one_left">
                手机号
            </div>
            <div class="log_four_input_one_center">
                <div id="city_text">{$data.phone}</div>
            </div>
        </div>
    </if>


</div>
<!-- 订单信息 -->
<div class="log_four_order">

    <div class="log_four_order_details">
        <div class="log_four_input_title" style="padding-bottom: 0.34rem;">
            订单信息
        </div>
        <div class="log_four_order_details_one">
            <foreach name="$data.indent_goods" item="i_g">
                <div class="log_four_order_one">
                    <div class="log_four_order_left">
                        <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt=""/>
                    </div>
                    <div class="log_four_order_center">
                        <div class="log_four_order_center_one txt-cut" style="-webkit-line-clamp: 1">
                            {$i_g.book_name}
                        </div>
                        <div class="log_four_order_center_two">
                            ×{$i_g.number}
                        </div>
                    </div>
                    <div class="log_four_order_right">
                        <span></span>{$i_g.price}
                    </div>
                </div>
            </foreach>
        </div>
    </div>
</div>
<!-- 支付方式 -->
<div class="log_four_pash">
    <div class="log_four_pash_bottom">
        <div class="log_four_pash_top_one">
            买家留言
        </div>
        <div class="log_four_pash_bottom_two" style="margin-top: 0.06rem">
            <textarea name="" id="" cols="20" rows="3" placeholder="">{$data.leave_word}</textarea>
        </div>
    </div>
</div>
<!-- 底部按钮 -->
<div class="log_seven_btn log_seven_btn9" style="margin-top: 0.36rem;">
    <if condition="$data.state eq 2">
        <div class="log_seven_btn_contant send" data-is_courier="{$data.is_courier}" data-indent-id="{$data.id}" >
            立即发货
        </div>
        <elseif condition="$data.state eq 5"/>
        <a href="{:url('logistics/index',array('indent_id'=>$data['id']))}">
            <div class="log_seven_btn_contant">
                查看物流
            </div>
        </a>
    </if>
</div>
<script src="__TMPL__/public/assets/js/jquery.js"></script>
<script src="__TMPL__/public/assets/js/base.js"></script>
<script src="__TMPL__/public/assets/js/mui.min.js"></script>
<script src="__TMPL__/public/assets/js/mui.picker.min.js"></script>
<script src="__TMPL__/public/assets/js/city.data-3.js"></script>
<script>
//选择快递方式
$(".log_psong_select").click(function () {
    $(".tx_mask_kuaidi").css({
        display: "block"
    });
});
$(".tx_mask_kuaidi .three_model_school_name").click(function () {
    var index = $(this).index();
    $(this).addClass('there_unActive').siblings().removeClass('there_unActive');
    $('.log_ps_title').text($(this).text()).css("color", "#333");
    $(".tx_mask_kuaidi").hide();
    $('#logistic_name').val($(this).attr('data-name'))
});
$(function(){
    $('body').on('click','.send',function(){
        var indent_id = $(this).attr('data-indent-id');
        var is_courier = $(this).attr('data-is_courier');
        console.log(indent_id);
        console.log(is_courier);
        if (is_courier == 1) {
            //统一配送
            $('.time').show();
            $('.logistic').hide();
        } else if (is_courier == 2) {
            //快递
            $('.time').hide();
            $('.logistic').show();
        }
        $('.tx_maskone').show();
        $('.confirm').attr('data-indent-id',indent_id);
        $('.confirm').attr('data-is_courier',is_courier);
    });
    $('body').on('click','.confirm',function(){
        var is_courier = $(this).attr('data-is_courier');
        var indent_id = $(this).attr('data-indent-id');
        var logistic_name = $('#logistic_name').val();
        var logistic_code = $('#logistic_code').val();
        var start_time = $('#start_time').val();
        var end_time = $('#end_time').val();
        if (is_courier == 1) {
            if (start_time == '') {
                alert('请填写配送时间');
                return false;
            } else if (end_time == '') {
                alert('请填写配送时间');
                return false;
            }
        } else if (is_courier == 2) {
            if (logistic_name == '') {
                alert('请填写快递公司');
                return false;
            } else if (logistic_code == '') {
                alert('请填写快递单号');
                return false;
            }
        } else if (is_courier == '') {
            alert('未知错误');
            return false;
        }
        $.ajax({
            url:"{:url('send')}",
            type:"GET",
            data:{'indent_id':indent_id,'is_courier':is_courier,'logistic_name':logistic_name,'logistic_code':logistic_code,'start_time':start_time,'end_time':end_time},
            success:function(res){
                console.log(res);
                if (res.code == 1) {
                    $('.order_' + indent_id).remove();
                    $(".tx_maskone").css({
                        display: "none"
                    });
                    $(".tx_mask").css({
                        display: "none"
                    });
                    $('.send').remove();
                    var html = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/"+indent_id+"\">\n" +
                        "            <div class=\"log_seven_btn_contant\">\n" +
                        "                查看物流\n" +
                        "            </div>\n" +
                        "        </a>";
                    $('.log_seven_btn9').html(html)
                }
                alert(res.msg)
            }
        })
    })
})
</script>
</body>

</html>