get_one.html 16.0 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411
<!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="javascript:history.back(-1)">
            <img src="__TMPL__/public/assets/images/left.png" alt=""/>
        </a>
        <p>订单确认</p>
    </div>
</div>
<div class="tx_maskone" onclick="$(this).hide()">
    <div class="tx_maskCon" onclick="zZFun(this)">
        <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 tongyi_start_time" style="color: #CCCCCC;">
                        请选择配送到达时间
                    </div>
                    <input type="hidden" id="start_time" value="" placeholder="请输入开配送时间"/>
                </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>
    function zZFun(e) {
        window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
    }

    //选择快递方式
    $(".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);
        });
        $('.confirm').click(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)
                        window.location.href = "{:url('get_all')}";
                    }
                    alert(res.msg)
                }
            })
        })
    })
</script>
<script>
    var dtpicker = new mui.DtPicker({
        type: "datetime", //设置日历初始视图模式
        beginDate: new Date(), //设置开始日期
        labels: ['年', '月', '日', '时', '分', '秒'], //设置默认标签区域提示语
    })
    //统一配送选择时间
    $(".tongyi_start_time").click(function () {
        dtpicker.show(function (e) {
            console.log(e);
            $('.tongyi_start_time').text(e.text);
            $('#start_time').val(e.text);
            $('.tongyi_start_time').css('color', '#333333');
        });
    })

    function zZFun(e) {
        window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
    }
</script>
</body>

</html>