审查视图

public/themes/simpleboot3/portal/order_salesman/get_all.html 55.8 KB
1 2 3
<!DOCTYPE html>
<html lang="en">
王晓刚 authored
4 5 6 7 8 9 10 11 12
<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"/>
王晓刚 authored
13 14 15 16 17 18 19 20 21
    <style>
        .tx_masktwo {
            display: none;
            z-index: 2;
            width: 100%;
            height: 100%;
            position: fixed;
            background-color: rgba(0, 0, 0, 0.5);
        }
22 23

        .take_one {
王晓刚 authored
24 25 26 27 28 29 30 31 32 33 34 35 36 37
            margin-top: 0.3rem;
            width: 1.6rem;
            height: 0.48rem;
            background: linear-gradient(328deg, rgba(255, 78, 0, 1) 0%, rgba(255, 157, 45, 1) 100%);
            box-shadow: 0 0.06rem 0.12rem rgba(255, 128, 0, 0.24);
            opacity: 1;
            border-radius: 0.08rem;
            display: flex;
            justify-content: center;
            align-items: center;
            font-size: 0.26rem;
            font-weight: 400;
            color: rgba(255, 255, 255, 1);
        }
anyv authored
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

        .tx_mask_class {
            display: none;
            z-index: 3;
            width: 100%;
            height: 100%;
            position: fixed;
            background-color: rgba(0, 0, 0, 0.5);
        }

        .tx_maskCon_class {
            width: 100%;
            height: 5.16rem;
            background: #fff;
            position: fixed;
            bottom: 0;
        }

        .three_model_class_name {
            height: 0.36rem;
            margin: 0.08rem;
            font-size: 0.24rem;
            font-weight: 400;
            color: #666666;
            opacity: 1;
            padding: 0.2rem 0;
            line-height: 0;
            border-left: none;
            border-right: none
        }
68 69

        .get_Go {
anyv authored
70 71 72 73 74 75 76 77 78 79 80 81
            height: 0.36rem;
            margin: 0.08rem;
            font-size: 0.24rem;
            font-weight: 400;
            cursor: pointer;
            color: #666666;
            opacity: 1;
            padding: 0.2rem 0;
            line-height: 0;
            border-left: none;
            border-right: none;
        }
82
4  
anyv authored
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97
        .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;
        }
98 99

        .mui-dtpicker-header, .mui-dtpicker-title h5 {
4  
anyv authored
100 101
            background-color: white;
        }
102 103

        .dingdan_lianxi_ren {
1  
anyv authored
104 105 106 107 108 109 110
            font-size: 0.28rem;
            cursor: pointer;
            font-family: PingFang SC;
            font-weight: 400;
            color: rgba(102, 102, 102, 1);
            opacity: 1;
        }
111 112 113 114 115 116

        /*.dingdan_detail {*/
            /*padding-top: 0.22rem;*/
        /*}*/

        .dingdan_detail_hao {
1  
anyv authored
117 118 119 120 121 122
            font-size: 0.28rem;
            cursor: pointer;
            font-family: PingFang SC;
            font-weight: 400;
            color: rgba(102, 102, 102, 1);
            opacity: 1;
123
            margin-top:0.2rem;
1  
anyv authored
124
        }
125 126

        .right_dingdan {
1  
anyv authored
127 128 129
            width: 5.6rem;
            margin-left: 0.2rem;
        }
130 131

        .right_dingdan_top {
1  
anyv authored
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147
            display: flex;
            justify-content: space-between;
            display: -webkit-box; /* Chrome 4+, Safari 3.1, iOS Safari 3.2+ */
            display: -moz-box; /* Firefox 17- */
            display: -webkit-flex; /* Chrome 21+, Safari 6.1+, iOS Safari 7+, Opera 15/16 */
            display: -moz-flex; /* Firefox 18+ */
            display: -ms-flexbox; /* IE 10 */
            display: flex; /* Chrome 29+, Firefox 22+, IE 11+, Opera 12.1/17/18, Android 4.4+ */
            justify-content: space-between;
            -webkit-flex-justify-content: space-between;
            -moz-box-justify-content: space-between;
            -ms-flexbox-justify-content: space-between;
            -webkit-flexalign-align-items: center;
            -moz-box-align-items: center;
            -ms-flexbox-align-items: center;
        }
148 149

        .right_dingdan_center {
1  
anyv authored
150 151
            text-align: right;
        }
152 153

        .right_dingdan_one {
1  
anyv authored
154 155 156 157 158 159
            font-size: 0.26rem;
            cursor: pointer;
            font-weight: 400;
            color: rgba(51, 51, 51, 1);
            opacity: 1;
        }
160 161

        .right_dingdan_two {
1  
anyv authored
162 163 164 165 166 167 168
            font-size: 0.34rem;
            font-weight: 400;
            cursor: pointer;
            line-height: 25px;
            color: rgba(51, 51, 51, 1);
            opacity: 1;
        }
169 170

        .shuju_zongshu {
1  
anyv authored
171 172 173 174 175 176
            padding-left: 0.4rem;
            font-size: 0.28rem;
            font-weight: 600;
            color: #333;
            border-radius: 0.08rem;
        }
王晓刚 authored
177
    </style>
王晓刚 authored
178
</head>
179
4  
anyv authored
180
<body style="cursor:pointer;">
anyv authored
181 182 183 184 185 186 187 188 189 190


<!--学校弹窗-->
<div class="tx_mask_school" onclick="$(this).hide()">
    <div class="tx_maskCon_school" onclick="zZFun(this)">
        <div class="three_model_school">
            <div class="three_model_school_title">
                选择学校
            </div>
            <div class="three_model_school_data there_university" style="display: block;">
4  
anyv authored
191
anyv authored
192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208
            </div>
        </div>
    </div>
</div>
<!--班级弹窗-->
<div class="tx_mask_class" onclick="$(this).hide()">
    <div class="tx_maskCon_class" onclick="zZFun(this)">
        <div class="three_model_school">
            <div class="three_model_school_title">
                选择班级
            </div>
            <div class="three_model_school_data there_university grade" style="display: block;">
            </div>
        </div>
    </div>
</div>
209
王晓刚 authored
210
<!--统一配送-->
2  
anyv authored
211 212
<div class="tx_mask_tongyi" onclick="$(this).hide()">
    <div class="tx_maskCon_tongyi" onclick="zZFun(this)">
王晓刚 authored
213 214
        <div class="three_model_school">
            <div class="three_model_school_data" style="display: block;">
anyv authored
215 216
                <div class="three_modal_kuaidi_name there_unActive" data-id="1">统一配送</div>
                <div class="three_modal_kuaidi_name" data-id="2">快递配送</div>
王晓刚 authored
217
            </div>
王晓刚 authored
218
        </div>
王晓刚 authored
219 220 221 222 223 224 225 226 227 228 229
    </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;">
anyv authored
230 231 232 233 234 235 236 237 238 239 240 241
                    <div class="get_Go" data-name="SF">顺丰快递</div>
                    <div class="get_Go" data-name="YTO">圆通快递</div>
                    <div class="get_Go" data-name="ZTO">中通快递</div>
                    <div class="get_Go there_unActive" data-name="STO">申通快递</div>
                    <div class="get_Go" data-name="YD">韵达快递</div>
                    <div class="get_Go" data-name="HHTT">天天快递</div>
                    <div class="get_Go" data-name="HTKY">百世快递</div>
                    <div class="get_Go" data-name="YZPY">邮政快递包裹</div>
                    <div class="get_Go" data-name="EMS">EMS</div>
                    <div class="get_Go" data-name="DBL">德邦快递</div>
                    <div class="get_Go" data-name="ZJS">宅急送</div>
                    <div class="get_Go" data-name="TNT">TNT快递</div>
王晓刚 authored
242 243 244 245 246
                </div>
            </div>
        </div>
    </div>
</div>
王晓刚 authored
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
<div class="tx_masktwo" style="display: none;">
    <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_time2" 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_time2" value="" placeholder="请输入结束配送时间"/>
                    </div>
                </div>
            </div>
            <!-- 确定 -->
            <div class="tx_maskOk confirm2" data-is_courier="" data-id="" data-indent-id="">确定</div>
        </div>
    </div>
</div>
2  
anyv authored
272 273
<div class="tx_maskone" onclick="$(this).hide()">
    <div class="tx_maskCon" onclick="zZFun(this)">
王晓刚 authored
274 275 276 277 278
        <div class="tx_maskConImg">
            <img src="__TMPL__/public/assets/images/91.png" alt=""/>
        </div>
        <div class="tx_maskCon2">
            <div class="log_three_model">
王晓刚 authored
279
                <div class="log_three_model_one time">
王晓刚 authored
280 281
                    <div class="log_three_model_left">配送时间</div>
                    <div class="log_psong">
王晓刚 authored
282
                        <input type="text" id="start_time" value="" placeholder="请输入开始配送时间"/>
王晓刚 authored
283 284
                    </div>
                </div>
王晓刚 authored
285
                <div class="log_three_model_one time">
王晓刚 authored
286 287
                    <div class="log_three_model_left">配送时间</div>
                    <div class="log_psong">
王晓刚 authored
288 289 290
                        <input type="text" id="end_time" value="" placeholder="请输入结束配送时间"/>
                    </div>
                </div>
291
                <div class="log_three_model_one logistic">
王晓刚 authored
292 293
                    <div class="log_three_model_left">选择快递</div>
                    <div class="log_psong log_psong_select">
anyv authored
294
                        <div class="log_ps_title2 get_Gofo">请选择快递公司</div>
王晓刚 authored
295
                        <div class="log_ps_img">
王晓刚 authored
296
                            <img src="__TMPL__/public/assets/images/29.png"/>
297
                            <input type="hidden" id="logistic_name" placeholder="请选择快递公司"/>
王晓刚 authored
298 299 300 301 302 303 304
                        </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="请输入快递单号"/>
王晓刚 authored
305 306 307 308
                    </div>
                </div>
            </div>
            <!-- 确定 -->
王晓刚 authored
309
            <div class="tx_maskOk confirm" data-is_courier="" data-id="" data-indent-id="">确定</div>
王晓刚 authored
310 311 312 313 314 315
        </div>
    </div>
</div>
<div class="log_top_co">
    <!-- 顶部 -->
    <div class=" order_top log_top_co">
anyv authored
316
        <a href="javascript:history.back(-1)">
王晓刚 authored
317 318 319 320 321 322 323
            <img src="__TMPL__/public/assets/images/left.png" alt=""/>
        </a>
        <p>订单管理</p>
    </div>
</div>
<!-- tab切换 -->
<div class="log_three_tab log_three_tab_top">
4  
anyv authored
324 325 326
    <div class="log_three_tab_one log_three_tab_two word_color aaa" data-state="2" style="cursor: pointer">未发货</div>
    <div class="log_three_tab_one" data-state="5" style="cursor: pointer">已发货</div>
    <div class="log_three_tab_one" data-state="3" style="cursor: pointer">已完成</div>
王晓刚 authored
327 328 329
</div>
<!-- 下拉框  -->
<div class="log_three_select">
330 331 332 333 334 335 336 337
    <!-- <div class="log_three_select_one log_three_select_school" style="cursor: pointer">
         <div class="log_three_select_title log_three_select_school2">
             请选择学校/班级
         </div>
         <div class="log_three_select_img">
             <img src="__TMPL__/public/assets/images/75.png" alt=""/>
         </div>
     </div>-->
anyv authored
338 339 340 341 342 343 344


    <div class="log_three_select_one log_three_select_school">
        <div class="log_three_select_title log_three_select_school2">
            请选择学校
        </div>
        <!--<div class="log_three_select_img">-->
345
        <!--<img src="__TMPL__/public/assets/images/75.png" alt="" />-->
anyv authored
346 347 348 349 350 351 352
        <!--</div>-->
    </div>
    <div class="log_three_select_one log_three_select_school">
        <div class="log_three_select_title log_three_select_class2">
            请选择班级
        </div>
        <!--<div class="log_three_select_img">-->
353
        <!--<img src="__TMPL__/public/assets/images/75.png" alt="" />-->
anyv authored
354
        <!--</div>-->
王晓刚 authored
355
    </div>
anyv authored
356 357

4  
anyv authored
358
    <div class="log_three_select_one log_three_select_peisong log_three_select_tongyi" style="cursor: pointer">
王晓刚 authored
359
        <div class="log_three_select_title log_three_select_contant">
360
            统一配送
王晓刚 authored
361
        </div>
anyv authored
362
        <!--<div class="log_three_select_img">-->
363
        <!--<img src="__TMPL__/public/assets/images/75.png" alt=""/>-->
anyv authored
364
        <!--</div>-->
王晓刚 authored
365 366 367 368 369 370
    </div>
    <div class="log_three_select_one log_three_select_btn search">
        搜索
    </div>
    <input type="hidden" id="school" value=""/>
    <input type="hidden" id="grade" value=""/>
371
    <input type="hidden" id="is_courier" value="1"/>
王晓刚 authored
372
</div>
373
<div class="shuju_zongshu">搜索结果为<span class="count">{:count($data)}</span></div>
王晓刚 authored
374 375 376 377 378 379
<!-- 列表内容 -->
<div>
    <!--未发货-->
    <div class="log_three_list_contant" style="display: block;">
        <foreach name="$data" item="vo">
            <if condition="$vo.state eq 2">
380
                <php>$arr1[] = $vo;</php>
381
                <div class="log_three_list order_{$vo.id}">
王晓刚 authored
382 383
                    <div class="log_three_list_top">
                        <div class="log_three_list_top_left">
384 385
                            <if condition="$vo.is_courier eq 1">
                                <div class="log_three_list_top_lo">
王晓刚 authored
386 387
                                    <img src="__TMPL__/public/assets/images/fangkuang.png"
                                         data-indent-id="{$vo['id']}" alt=""/>
388 389
                                </div>
                            </if>
王晓刚 authored
390 391 392 393 394
                            <div class="log_three_list_top_lt">
                                <div class="log_three_zhongbiao">
                                    <img src="__TMPL__/public/assets/images/52.png" alt=""/>
                                </div>
                                <div class="log_three_shijian">
王晓刚 authored
395
                                    {$vo['pay_time']}
王晓刚 authored
396 397 398 399 400 401 402 403 404 405 406 407 408
                                </div>
                            </div>
                        </div>
                        <div class="log_three_list_top_right">
                            <if condition="$vo.state eq 2">
                                待发货
                                <elseif condition="$vo.state eq 5"/>
                                已发货
                                <elseif condition="$vo.state eq 3"/>
                                已完成
                            </if>
                        </div>
                    </div>
王晓刚 authored
409
                    <a href="{:url('get_one',array('id'=>$vo['id']))}">
410 411 412
                        <div class="dingdan_detail_top">
                            <div class="dingdan_detail_hao">订单号:{$vo.order_number}</div>
                        </div>
王晓刚 authored
413
                        <foreach name="$vo.indent_goods" item="i_g">
1  
anyv authored
414 415 416
                            <div class="dingdan_detail">
                                <div class="log_three_list_center" style="display: flex;justify-content: flex-start;">
                                    <div class="log_three_list_center_left" style="width: 1.44rem;height:1.44rem">
417 418
                                        <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt=""
                                             style="width: 100%;height: 100%;"/>
王晓刚 authored
419
                                    </div>
1  
anyv authored
420
                                    <!--<div class="log_three_list_center_right" style="margin-left: 0.16rem;width: 5.6rem">-->
421 422 423 424 425 426 427
                                    <!--<div class="log_three_center_one">-->
                                    <!--{$i_g.book_name}-->
                                    <!--</div>-->
                                    <!--<div class="right_dingdan_money">-->
                                    <!--<div class="log_three_center_three"><span>¥</span>{$i_g.price}</div>-->
                                    <!--<div class="log_three_center_two">×{$i_g.number}</div>-->
                                    <!--</div>-->
1  
anyv authored
428 429 430 431 432 433
                                    <!--</div>-->
                                    <div class="right_dingdan">
                                        <div class="right_dingdan_top">
                                            <div class="right_dingdan_one">{$i_g.book_name}</div>
                                            <div class="right_dingdan_two">¥{$i_g.price}</div>
                                        </div>
434 435 436
                                        <div class="right_dingdan_center">
                                            <div class="right_dindan_three right_dingdan_one">x{$i_g.number}</div>
                                        </div>
4  
anyv authored
437
438 439 440 441 442 443 444
                                        <div class="right_dingdan_four right_dingdan_one">地址:{$vo.school} {$vo.grade}
                                            {$vo.class}
                                        </div>
                                        <div class="right_dingdan_four right_dingdan_one" style="margin-top: -0.05rem;">
                                            {$vo.name}电话:{$vo.phone}
                                        </div>
                                    </div>
王晓刚 authored
445 446
                                </div>
                            </div>
王晓刚 authored
447 448
                        </foreach>
                    </a>
王晓刚 authored
449 450 451
                    <!-- 立即发货 -->
                    <div class="log_three_bottom_btn">
                        <if condition="$vo.state eq 2">
王晓刚 authored
452 453
                            <div class="log_three_bottom send" data-indent-id="{$vo.id}"
                                 data-is_courier="{$vo.is_courier}">
王晓刚 authored
454 455 456 457
                                立即发货
                            </div>
                            <elseif condition="$vo.state eq 5"/>
                            <if condition="$vo.is_courier eq 2">
王晓刚 authored
458
                                <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}">
王晓刚 authored
459 460 461 462
                                    <div class="log_three_bottom" data-indent-id="{$vo.id}">
                                        查看物流
                                    </div>
                                </a>
463 464 465
                                <div class="log_three_bottom" data-indent-id="{$vo.id}">
                                    完成
                                </div>
王晓刚 authored
466 467
                            </if>
                            <elseif condition="$vo.state eq 3"/>
王晓刚 authored
468
                            <!--<div class="log_three_bottom" data-indent-id="{$vo.id}">-->
469
                            <!--已完成啦-->
王晓刚 authored
470
                            <!--</div>-->
王晓刚 authored
471 472 473 474 475
                        </if>
                    </div>
                </div>
            </if>
        </foreach>
476 477 478
        <empty name="$arr1">
            <div style="text-align: center;width: 100%;height:100%;margin:0 auto;">暂无数据</div>
        </empty>
王晓刚 authored
479
    </div>
1  
anyv authored
480
王晓刚 authored
481 482 483 484
    <!--已发货-->
    <div class="log_three_list_contant">
        <foreach name="$data" item="vo">
            <if condition="$vo.state eq 5">
485
                <php>$arr2[] = $vo;</php>
486
                <div class="log_three_list order_{$vo.id}">
王晓刚 authored
487 488
                    <div class="log_three_list_top">
                        <div class="log_three_list_top_left">
489 490
                            <if condition="$vo.is_courier eq 1">
                                <div class="log_three_list_top_lo">
王晓刚 authored
491 492
                                    <img src="__TMPL__/public/assets/images/fangkuang.png"
                                         data-indent-id="{$vo['id']}" alt=""/>
493 494
                                </div>
                            </if>
王晓刚 authored
495 496 497 498 499
                            <div class="log_three_list_top_lt">
                                <div class="log_three_zhongbiao">
                                    <img src="__TMPL__/public/assets/images/52.png" alt=""/>
                                </div>
                                <div class="log_three_shijian">
500
                                    {$vo['pay_time']}
王晓刚 authored
501 502 503 504 505 506 507 508 509 510 511 512 513
                                </div>
                            </div>
                        </div>
                        <div class="log_three_list_top_right">
                            <if condition="$vo.state eq 2">
                                代发货
                                <elseif condition="$vo.state eq 5"/>
                                已发货
                                <elseif condition="$vo.state eq 3"/>
                                已完成
                            </if>
                        </div>
                    </div>
王晓刚 authored
514 515
                    <a href="{:url('get_one',array('id'=>$vo['id']))}">
                        <foreach name="$vo.indent_goods" item="i_g">
5  
anyv authored
516
                            <div class="log_three_list_center" style="display: flex;justify-content: flex-start;">
517 518 519
                                <div class="log_three_list_center_left" style="width: 1.44rem;height:1.44rem">
                                    <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt=""
                                         style="width: 100%;height: 100%;"/>
王晓刚 authored
520
                                </div>
5  
anyv authored
521
                                <div class="log_three_list_center_right" style="margin-left: 0.16rem;">
王晓刚 authored
522 523 524 525
                                    <div class="log_three_center_one">
                                        {$i_g.book_name}
                                    </div>
                                    <div class="log_three_center_two">×{$i_g.number}</div>
526
                                    <div class="log_three_center_three"><span></span>{$i_g.price}</div>
王晓刚 authored
527 528
                                </div>
                            </div>
王晓刚 authored
529 530
                        </foreach>
                    </a>
王晓刚 authored
531 532 533 534 535 536 537 538
                    <!-- 立即发货 -->
                    <div class="log_three_bottom_btn">
                        <if condition="$vo.state eq 2">
                            <div class="log_three_bottom" data-indent-id="{$vo.id}" data-is_courier="{$vo.is_courier}">
                                立即发货
                            </div>
                            <elseif condition="$vo.state eq 5"/>
                            <if condition="$vo.is_courier eq 2">
王晓刚 authored
539 540 541 542 543
                                <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}">
                                    <div class="log_three_bottom" data-indent-id="{$vo.id}">
                                        查看物流
                                    </div>
                                </a>
544
                                <else/>
王晓刚 authored
545 546 547
                                <div class="take_one" data-indent-id="{$vo.id}">
                                    完成
                                </div>
王晓刚 authored
548 549
                            </if>
                            <elseif condition="$vo.state eq 3"/>
王晓刚 authored
550
                            <!--<div class="log_three_bottom" data-indent-id="{$vo.id}">-->
551
                            <!--已完成啦-->
王晓刚 authored
552
                            <!--</div>-->
王晓刚 authored
553 554 555 556 557
                        </if>
                    </div>
                </div>
            </if>
        </foreach>
558 559 560
        <empty name="$arr2">
            <div style="text-align: center;width: 100%;height:100%;margin:0 auto;">暂无数据</div>
        </empty>
王晓刚 authored
561 562 563 564 565
    </div>
    <!--已完成-->
    <div class="log_three_list_contant">
        <foreach name="$data" item="vo">
            <if condition="$vo.state eq 3">
566
                <php>$arr3 = $vo;</php>
567
                <div class="log_three_list order_{$vo.id}">
王晓刚 authored
568 569
                    <div class="log_three_list_top">
                        <div class="log_three_list_top_left">
570 571
                            <if condition="$vo.is_courier eq 1">
                                <div class="log_three_list_top_lo">
王晓刚 authored
572 573
                                    <img src="__TMPL__/public/assets/images/fangkuang.png"
                                         data-indent-id="{$vo['id']}" alt=""/>
574 575
                                </div>
                            </if>
王晓刚 authored
576 577 578 579 580
                            <div class="log_three_list_top_lt">
                                <div class="log_three_zhongbiao">
                                    <img src="__TMPL__/public/assets/images/52.png" alt=""/>
                                </div>
                                <div class="log_three_shijian">
581
                                    {$vo['pay_time']}
王晓刚 authored
582 583 584 585 586 587 588 589 590 591 592 593 594
                                </div>
                            </div>
                        </div>
                        <div class="log_three_list_top_right">
                            <if condition="$vo.state eq 2">
                                代发货
                                <elseif condition="$vo.state eq 5"/>
                                已发货
                                <elseif condition="$vo.state eq 3"/>
                                已完成
                            </if>
                        </div>
                    </div>
王晓刚 authored
595 596
                    <a href="{:url('get_one',array('id'=>$vo['id']))}">
                        <foreach name="$vo.indent_goods" item="i_g">
5  
anyv authored
597 598
                            <div class="log_three_list_center" style="display: flex;justify-content: flex-start;">
                                <div class="log_three_list_center_left" style="width: 1.44rem;height:1.44rem">
599 600
                                    <img src="{:cmf_get_image_url($i_g.thumbnail)}" alt=""
                                         style="width: 100%;height: 100%;"/>
王晓刚 authored
601
                                </div>
5  
anyv authored
602
                                <div class="log_three_list_center_right" style="margin-left: 0.16rem;">
王晓刚 authored
603 604 605 606
                                    <div class="log_three_center_one">
                                        {$i_g.book_name}
                                    </div>
                                    <div class="log_three_center_two">×{$i_g.number}</div>
607
                                    <div class="log_three_center_three"><span></span>{$i_g.price}</div>
王晓刚 authored
608 609
                                </div>
                            </div>
王晓刚 authored
610 611
                        </foreach>
                    </a>
王晓刚 authored
612 613 614 615 616 617 618 619
                    <!-- 立即发货 -->
                    <div class="log_three_bottom_btn">
                        <if condition="$vo.state eq 2">
                            <div class="log_three_bottom" data-indent-id="{$vo.id}" data-is_courier="{$vo.is_courier}">
                                立即发货
                            </div>
                            <elseif condition="$vo.state eq 5"/>
                            <if condition="$vo.is_courier eq 2">
王晓刚 authored
620 621 622 623 624
                                <a href="{:url('logistics/index',array('indent_id'=>$vo['id']))}">
                                    <div class="log_three_bottom" data-indent-id="{$vo.id}">
                                        查看物流
                                    </div>
                                </a>
王晓刚 authored
625 626 627
                                <div class="log_three_bottom" data-indent-id="{$vo.id}">
                                    已完成
                                </div>
王晓刚 authored
628 629
                            </if>
                            <elseif condition="$vo.state eq 3"/>
王晓刚 authored
630
                            <!--<div class="log_three_bottom" data-indent-id="{$vo.id}">-->
631
                            <!--已完成啦-->
王晓刚 authored
632
                            <!--</div>-->
王晓刚 authored
633 634 635 636 637
                        </if>
                    </div>
                </div>
            </if>
        </foreach>
638 639 640
        <empty name="$arr3">
            <div style="text-align: center;width: 100%;height:100%;margin:0 auto;">暂无数据</div>
        </empty>
王晓刚 authored
641 642 643
    </div>
</div>
<!-- 底部按钮 -->
644 645 646
<div style="position: fixed;bottom:0;width: 100%;">
    <div class="log_three_list_fixed">
        <div class="log_three_fixed_left">
4  
anyv authored
647
            <div class="log_three_fixed_left_one" style="cursor: pointer">
648 649 650 651 652
                <img src="__TMPL__/public/assets/images/fangkuang.png" alt=""/>
            </div>
            <div class="log_three_fixed_left_two">
                全选
            </div>
王晓刚 authored
653
        </div>
654 655
        <div class="log_three_fixed_right unify_all">
            统一发货
王晓刚 authored
656 657 658 659 660 661 662 663 664
        </div>
    </div>
</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>
4  
anyv authored
665 666 667 668
    var schoolpicker = new mui.PopPicker();
    var classpicker = new mui.PopPicker();
    var class_arr = '';
    zujian();
669 670 671

    function zujian(data_class_arr) {
        (function ($, doc) {
4  
anyv authored
672 673
            $.init();
            school_arr = {$school};
674 675
            console.log(data_class_arr, 'dfdfds');
            $.ready(function () {
4  
anyv authored
676 677 678 679 680
                schoolpicker.setData(school_arr);
                classpicker.setData(data_class_arr);
            });
        })(mui, document);
    }
681
4  
anyv authored
682
    var school_name;
683 684
    $(".log_three_select_school2").click(function () {
        schoolpicker.show(function (e) {
4  
anyv authored
685 686
            school_name = e[0].value;
            school_names = e[0].text;
6  
anyv authored
687
            $('#school').val(school_names);
4  
anyv authored
688 689
            $(".log_three_select_school2").text(e[0].text);
            $('.log_three_select_school2').css('color', '#333333');
690 691
            $.post("{:url('Personalcenter/get_grade_class')}", {id: school_name}, function (data) {
                if (data) {
4  
anyv authored
692 693 694 695 696 697 698 699
                    data = JSON.parse(data);
                    zujian(data);
                }

            });
        });

    })
700 701 702 703
    $(".log_three_select_class2").click(function () {
        if (school_name != undefined) {
            classpicker.show(function (e) {
                class_name = e[0].text;
6  
anyv authored
704
                $('#grade').val(class_name);
4  
anyv authored
705 706 707 708 709 710
                $(".log_three_select_class2").text(e[0].text);
                $('.log_three_select_class2').css('color', '#333333');
            });
        } else {
            alert("请先选择学校")
        }
anyv authored
711 712 713
    })
</script>
<script>
2  
anyv authored
714 715 716
    function zZFun(e) {
        window.event ? (window.event.cancelBubble = true) : e.stopPropagation();
    }
717
王晓刚 authored
718
    // 选择学校
719 720 721 722
    //    $(".three_model_school_left").click(function () {
    //        var indexs = $(this).index();
    //        $(".three_model_school_data").eq(indexs).css("display", "block").siblings().css("display", "none");
    //    });
723
王晓刚 authored
724 725 726 727
    $(".log_three_tab_one").click(function () {
        var tabIndex = $(this).index();
        $(this).addClass("log_three_tab_two").addClass("word_color").addClass('aaa').siblings().removeClass("log_three_tab_two").removeClass("word_color").removeClass("aaa");
        $('.log_three_list_contant').eq(tabIndex).css('display', 'block').siblings().css('display', 'none');
王晓刚 authored
728
        search();
729
        $('.log_three_fixed_left_one img').attr('src', "__TMPL__/public/assets/images/fangkuang.png")
王晓刚 authored
730 731 732 733
    });
    $(".three_model_school_tab>div").click(function () {
        $(this).addClass("three_model_school_hover").addClass("word_color").addClass('aaa').siblings().removeClass("three_model_school_hover").removeClass("word_color").removeClass("aaa");
    });
734
王晓刚 authored
735
    $("body").on('click', '.log_three_list_top_lo', function () {
王晓刚 authored
736 737 738 739 740
        if ($(this).find("img").attr("src") == "__TMPL__/public/assets/images/fangkuang.png") {
            $(this).find("img").attr("src", "__TMPL__/public/assets/images/xuanzhong (1).png");
        } else {
            $(this).find("img").attr("src", "__TMPL__/public/assets/images/fangkuang.png");
        }
741 742
        //判断订单是否全选了
        check();
王晓刚 authored
743
    });
744 745

    function check() {
746 747 748
        var index = $(".log_three_tab_top .log_three_tab_one").index($('.aaa'));
        var length = $(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').length;
        var l = 0;
749
        for (var n = 0; n < length; n++) {
750
            console.log($(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').eq(n).attr('src'));
751
            if ($(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').eq(n).attr('src') == "__TMPL__/public/assets/images/xuanzhong (1).png") {
752 753 754
                l++
            }
        }
755 756 757 758 759
        console.log('@@@@@' + l + '@@@@@' + length);
        if (l == length) {
            $('.log_three_fixed_left_one img').attr('src', "__TMPL__/public/assets/images/xuanzhong (1).png")
        } else {
            $('.log_three_fixed_left_one img').attr('src', "__TMPL__/public/assets/images/fangkuang.png")
760 761
        }
    }
762
王晓刚 authored
763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783
    $(".log_three_fixed_left_one").click(function () {
        if (
            $(this)
                .find("img")
                .attr("src") == "__TMPL__/public/assets/images/fangkuang.png"
        ) {
            $(this)
                .find("img")
                .attr("src", "__TMPL__/public/assets/images/xuanzhong (1).png");
            $(".log_three_list_top_lo")
                .find("img")
                .attr("src", "__TMPL__/public/assets/images/xuanzhong (1).png");
        } else {
            $(this)
                .find("img")
                .attr("src", "__TMPL__/public/assets/images/fangkuang.png");
            $(".log_three_list_top_lo")
                .find("img")
                .attr("src", "__TMPL__/public/assets/images/fangkuang.png");
        }
    });
784
王晓刚 authored
785 786 787 788 789
    $(".log_three_select_peisong").click(function () {
        $(".tx_mask").css({
            display: "block"
        });
    });
王晓刚 authored
790 791

    //统一配送
王晓刚 authored
792
    $(".log_three_select_tongyi").click(function () {
王晓刚 authored
793 794 795 796
        $(".tx_mask_tongyi").css({
            display: "block"
        });
    })
anyv authored
797
    $(".tx_mask_tongyi .three_modal_kuaidi_name").click(function () {
王晓刚 authored
798 799 800 801 802 803 804
        var index = $(this).index();
        $(this).addClass('there_unActive').siblings().removeClass('there_unActive');
        $('.log_three_select_contant').text($(this).text()).css("color", "#333");
        $(".tx_mask_tongyi").hide();
        $("#is_courier").val($(this).attr('data-id'))
    })
    //选择快递方式
王晓刚 authored
805
    $(".log_psong_select").click(function () {
王晓刚 authored
806 807 808 809
        $(".tx_mask_kuaidi").css({
            display: "block"
        });
    });
anyv authored
810
    $(".tx_mask_kuaidi .get_Go").click(function () {
王晓刚 authored
811
        var index = $(this).index();
anyv authored
812
        console.log($(this).text());
813
        $(this).addClass('there_unActive').siblings().removeClass('there_unActive');
anyv authored
814
        $('.get_Gofo').text($(this).text()).css("color", "#333");
王晓刚 authored
815
        $(".tx_mask_kuaidi").hide();
anyv authored
816
//        $('#logistic_name').val($(this).attr('data-name'))
王晓刚 authored
817
    });
王晓刚 authored
818
    var index = $(".log_three_bottom").index();
王晓刚 authored
819
    $("body").on('click', '.log_three_bottom', function () {
王晓刚 authored
820 821 822 823 824 825 826 827 828 829 830
        $(".tx_maskone").css({
            display: "block"
        });
    });
    $('body').on('click', ".there_class div", function () {
        var index2 = $(this).index();
        $(this).addClass("there_unActive").siblings().removeClass("there_unActive");
        if ($xuexiao == undefined) {
            alert('请选择学校')
        } else if ($(this).hasClass("there_unActive")) {
            var banji = $(this).text();
王晓刚 authored
831
            $('.log_three_select_school2').text($xuexiao + ' ' + "-" + ' ' + banji);
王晓刚 authored
832 833 834 835 836 837 838 839 840 841 842 843
            $(".log_three_select_school2").css("color", "#333")
            $(".tx_mask_school").hide();
            $('#school').val($xuexiao);
            $('#grade').val(banji);
        }
    })
    // 关闭弹窗
    $(document).mouseup(function (e) {
        var _con = $('.tx_maskCon_school');
        if (!_con.is(e.target) && _con.has(e.target).length === 0) {
            $('.tx_mask_school').hide()
        }
王晓刚 authored
844
    });
王晓刚 authored
845 846

    function search() {
王晓刚 authored
847 848 849
        var school = $('#school').val();
        var grade = $('#grade').val();
        var state = $('.log_three_tab_top .aaa').attr('data-state');
850
        var is_courier = $('#is_courier').val();
4  
anyv authored
851
王晓刚 authored
852 853 854 855 856 857
        $.ajax({
            'url': "{:url('order_salesman/getOrderSalesman')}",
            'type': "GET",
            'data': {'school': school, 'grade': grade, 'state': state, 'is_courier': is_courier},
            'success': (function (data) {
                var index = $('.log_three_tab_top div').index($('.aaa'));
王晓刚 authored
858 859
                console.log(3333);
                console.log(data);
王晓刚 authored
860 861
                if (data.code == 1) {
                    var result = data.data;
862 863
                    console.log(result);
                    if (result == 0) {
864
                        var html = "<div style=\"text-align: center;width: 100%;height:100%;margin:0 auto;\">暂无数据</div>";
865
                    } else {
866 867
                        var html = '';
                    }
王晓刚 authored
868 869 870 871 872 873 874
                    for (var i = 0; i < result.length; i++) {
                        if (result[i]['state'] == 2) {
                            var state = '待发货';
                            if (result[i]['is_courier'] == 1) {
                                var html_bottom = "<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom send\" data-indent-id=\"" + result[i].id + "\" data-is_courier=\"" + result[i].is_courier + "\">\n" +
                                    "\t\t\t\t\t\t\t\t\t\t立即发货\n" +
                                    "\t\t\t\t\t\t\t\t\t</div></div>";
王晓刚 authored
875
                            } else {
王晓刚 authored
876 877 878
                                var html_bottom = "<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom send\" data-indent-id=\"" + result[i].id + "\" data-is_courier=\"" + result[i].is_courier + "\">\n" +
                                    "\t\t\t\t\t\t\t\t\t\t立即发货\n" +
                                    "\t\t\t\t\t\t\t\t\t</div></div>";
王晓刚 authored
879
                            }
王晓刚 authored
880 881 882 883 884 885 886 887 888
                        } else if (result[i]['state'] == 5) {
                            var state = '已发货';
                            if (result[i]['is_courier'] == 2) {
                                var html_bottom = "<a href=\"{:url('logistics/index','',false,true)}/indent_id/" + result[i].id + "\">\n" +
                                    "\t\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_bottom_btn\"><div class=\"log_three_bottom\" data-indent-id=\"" + result[i].id + "\">\n" +
                                    "\t\t\t\t\t\t\t\t\t\t\t\t查看物流\n" +
                                    "\t\t\t\t\t\t\t\t\t\t\t</div></div>\n" +
                                    "\t\t\t\t\t\t\t\t\t\t</a>";
                            } else {
889
                                var html_bottom = "<div class=\"take_one\" data-indent-id=\"" + result[i].id + "\">\n" +
王晓刚 authored
890 891
                                    "                                    完成\n" +
                                    "                                </div>";
892
                            }
王晓刚 authored
893 894
                        } else {
                            var state = '已完成';
王晓刚 authored
895
                            var html_bottom = "";
王晓刚 authored
896 897 898 899
                        }
                        var indent_goods_data = result[i].indent_goods;
                        var indent_goods_html = '';
                        for (var i3 = 0; i3 < indent_goods_data.length; i3++) {
900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933
                            // indent_goods_html += "<div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n" +
                            //     "                            <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n" +
                            //     "                                <img src=\"" + indent_goods_data[i3].thumbnail + "\" alt=\"\" style=\"width: 100%;height: 100%;\"/>\n" +
                            //     "                            </div>\n" +
                            //     "                            <div class=\"log_three_list_center_right\" style=\"margin-left: 0.16rem;\">\n" +
                            //     "                                <div class=\"log_three_center_one\">\n" +
                            //     "                                    " + indent_goods_data[i3].book_name + "\n" +
                            //     "                                </div>\n" +
                            //     "                                <div class=\"log_three_center_two\">×" + indent_goods_data[i3].number + "</div>\n" +
                            //     "                                <div class=\"log_three_center_three\"><span>¥</span>" + indent_goods_data[i3].price + "</div>\n" +
                            //     "                            </div>\n" +
                            //     "                        </div>";
                            indent_goods_html += "<div class=\"dingdan_detail\">\n" +
                                "                                <div class=\"log_three_list_center\" style=\"display: flex;justify-content: flex-start;\">\n" +
                                "                                    <div class=\"log_three_list_center_left\" style=\"width: 1.44rem;height:1.44rem\">\n" +
                                "                                        <img src=\""+indent_goods_data[i3].thumbnail+"\" alt=\"\"\n" +
                                "                                             style=\"width: 100%;height: 100%;\"/>\n" +
                                "                                    </div>\n" +
                                "                                    <div class=\"right_dingdan\">\n" +
                                "                                        <div class=\"right_dingdan_top\">\n" +
                                "                                            <div class=\"right_dingdan_one\">"+indent_goods_data[i3].book_name+"</div>\n" +
                                "                                            <div class=\"right_dingdan_two\">¥"+indent_goods_data[i3].price+"</div>\n" +
                                "                                        </div>\n" +
                                "                                        <div class=\"right_dingdan_center\">\n" +
                                "                                            <div class=\"right_dindan_three right_dingdan_one\">x"+indent_goods_data[i3].number+"</div>\n" +
                                "                                        </div>\n" +
                                "\n" +
                                "                                        <div class=\"right_dingdan_four right_dingdan_one\">地址:"+result[i].school+" "+result[i].grade+"\n" +
                                "                                            "+result[i].class+"\n" +
                                "                                        </div>\n" +
                                "                                        <div class=\"right_dingdan_four right_dingdan_one\" style=\"margin-top: -0.05rem;\">\n" +
                                "                                            "+result[i].name+"电话:"+result[i].phone+"\n" +
                                "                                        </div>\n" +
                                "                                    </div>\n" +
王晓刚 authored
934
                                "                                </div>\n" +
935
                                "                            </div>";
王晓刚 authored
936 937 938 939 940 941
                        }
                        if (is_courier == 1) {
                            html += "<div class=\"log_three_list order_" + result[i].id + "\">\n" +
                                "\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n" +
                                "\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n" +
                                "\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lo\">\n" +
942
                                "\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/fangkuang.png\" data-indent-id=\"" + result[i].id + "\" alt=\"\" />\n" +
王晓刚 authored
943 944 945 946 947 948 949 950 951 952 953 954 955
                                "\t\t\t\t\t\t\t\t\t</div>\n" +
                                "\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lt\">\n" +
                                "\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_zhongbiao\">\n" +
                                "\t\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/52.png\" alt=\"\" />\n" +
                                "\t\t\t\t\t\t\t\t\t\t</div>\n" +
                                "\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_shijian\">\n" +
                                "\t\t\t\t\t\t\t\t\t\t\t" + result[i].pay_time + "\n" +
                                "\t\t\t\t\t\t\t\t\t\t</div>\n" +
                                "\t\t\t\t\t\t\t\t\t</div>\n" +
                                "\t\t\t\t\t\t\t\t</div>\n" +
                                "\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_right\">\n" +
                                "\t\t\t\t\t\t\t\t\t\t" + state + "\n" +
                                "\t\t\t\t\t\t\t\t</div>\n" +
956 957 958
                                "\t\t\t\t\t\t\t</div><a href=\"{:url('get_one','',false,true)}/id/" + result[i].id + "\"><div class=\"dingdan_detail_top\">\n" +
                                "                            <div class=\"dingdan_detail_hao\">订单号:"+result[i].order_number+"</div>\n" +
                                "                        </div>\n" + indent_goods_html + "</a>" +
王晓刚 authored
959
                                "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>";
王晓刚 authored
960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978
                        } else if (is_courier == 2) {
                            html += "<div class=\"log_three_list order_" + result[i].id + "\">\n" +
                                "\t\t\t\t\t\t\t<div class=\"log_three_list_top\">\n" +
                                "\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_left\">\n" +
                                // "\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lo\">\n" +
                                // "\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/fangkuang.png\" alt=\"\" />\n" +
                                // "\t\t\t\t\t\t\t\t\t</div>\n" +
                                "\t\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_lt\">\n" +
                                "\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_zhongbiao\">\n" +
                                "\t\t\t\t\t\t\t\t\t\t\t<img src=\"__TMPL__/public/assets/images/52.png\" alt=\"\" />\n" +
                                "\t\t\t\t\t\t\t\t\t\t</div>\n" +
                                "\t\t\t\t\t\t\t\t\t\t<div class=\"log_three_shijian\">\n" +
                                "\t\t\t\t\t\t\t\t\t\t\t" + result[i].pay_time + "\n" +
                                "\t\t\t\t\t\t\t\t\t\t</div>\n" +
                                "\t\t\t\t\t\t\t\t\t</div>\n" +
                                "\t\t\t\t\t\t\t\t</div>\n" +
                                "\t\t\t\t\t\t\t\t<div class=\"log_three_list_top_right\">\n" +
                                "\t\t\t\t\t\t\t\t\t\t" + state + "\n" +
                                "\t\t\t\t\t\t\t\t</div>\n" +
979 980 981
                                "\t\t\t\t\t\t\t</div><a href=\"{:url('get_one','',false,true)}/id/" + result[i].id + "\"><div class=\"dingdan_detail_top\">\n" +
                                "                            <div class=\"dingdan_detail_hao\">订单号:"+result[i].order_number+"</div>\n" +
                                "                        </div>\n" + indent_goods_html + "</a>" +
王晓刚 authored
982
                                "\t\t\t\t\t\t<div class=\"log_three_bottom_btn\">" + html_bottom + "</div></div>";
王晓刚 authored
983 984
                        }
                    }
985
                    $('.count').html(i);
王晓刚 authored
986 987 988 989 990 991 992 993
                    $('.log_three_list_contant').eq(index).html(html);
                    update();
                } else {
                    alert('未知错误');
                }
            }),
            'error': (function () {
                alert('与服务器断开连接');
王晓刚 authored
994
            })
王晓刚 authored
995
        })
王晓刚 authored
996 997
        // }
    }
王晓刚 authored
998
王晓刚 authored
999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016
    $(function () {
        $('.school').click(function () {
            var school_id = $(this).attr('data-id');
            $.ajax({
                url: "{:url('order_salesman/getGradeClass')}",
                type: 'GET',
                data: {'school_id': school_id},
                success: (function (data) {
                    if (data.code == 1) {
                        var result = data.data;
                        var html = '';
                        for (var i = 0; i < result.length; i++) {
                            var i2 = Number(result[i].start);
                            var j = Number(result[i].end);
                            for (i2; i2 <= j; i2++) {
                                // if(i == 0){
                                //     html += "<div class=\"three_model_school_name there_unActive\" data-id=\""+result[i].id+"\">"+result[i].grade+"—"+i2+"</div>";
                                // }
anyv authored
1017
                                html += "<div class=\"three_model_class_name\" data-id=\"" + result[i].id + "\">" + result[i].grade + "-" + i2 + "班</div>";
王晓刚 authored
1018 1019 1020 1021 1022 1023 1024 1025 1026 1027
                            }
                        }
                        $('.grade').html(html);
                    } else {
                        alert(data.msg);
                    }
                })
            })
        })
        $('.search').click(function () {
王晓刚 authored
1028
            search();
王晓刚 authored
1029 1030
        });
        //发货
王晓刚 authored
1031
        $("body").on('click', '.send', function () {
王晓刚 authored
1032 1033
            var indent_id = $(this).attr('data-indent-id');
            var is_courier = $(this).attr('data-is_courier');
王晓刚 authored
1034
            if (is_courier == 1) {
王晓刚 authored
1035 1036 1037
                //统一配送
                $('.time').show();
                $('.logistic').hide();
王晓刚 authored
1038
            } else if (is_courier == 2) {
王晓刚 authored
1039 1040 1041
                //快递
                $('.time').hide();
                $('.logistic').show();
王晓刚 authored
1042
            }
王晓刚 authored
1043 1044 1045
            $('.confirm').attr('data-is_courier', is_courier);
            $('.confirm').attr('data-indent-id', indent_id);
            $('.confirm').attr('data-is_courier', is_courier);
王晓刚 authored
1046
        });
王晓刚 authored
1047
        //点击确认
王晓刚 authored
1048
        $("body").on('click', '.confirm', function () {
王晓刚 authored
1049 1050 1051 1052 1053 1054
            var is_courier = $(this).attr('data-is_courier');
            var start_time = $('#start_time').val();
            var end_time = $('#end_time').val();
            var logistic_name = $('#logistic_name').val();
            var logistic_code = $('#logistic_code').val();
            var indent_id = $(this).attr('data-indent-id');
王晓刚 authored
1055 1056 1057
            if (is_courier == 1) {
                if (start_time == '') {
                    alert('请填写配送时间');
1058
                    return false;
王晓刚 authored
1059 1060
                } else if (end_time == '') {
                    alert('请填写配送时间');
1061
                    return false;
王晓刚 authored
1062
                }
王晓刚 authored
1063 1064 1065
            } else if (is_courier == 2) {
                if (logistic_name == '') {
                    alert('请填写快递公司');
1066
                    return false;
王晓刚 authored
1067 1068
                } else if (logistic_code == '') {
                    alert('请填写快递单号');
1069
                    return false;
王晓刚 authored
1070
                }
王晓刚 authored
1071 1072
            } else if (is_courier == '') {
                alert('未知错误');
1073
                return false;
王晓刚 authored
1074 1075
            }
            $.ajax({
王晓刚 authored
1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088
                url: "{:url('order_salesman/send')}",
                type: "GET",
                data: {
                    'start_time': start_time,
                    'end_time': end_time,
                    'logistic_name': logistic_name,
                    'logistic_code': logistic_code,
                    'is_courier': is_courier,
                    'indent_id': indent_id
                },
                success: function (res) {
                    if (res.code == 1) {
                        $('.order_' + indent_id).remove();
1089 1090 1091 1092 1093 1094 1095
                        $(".tx_maskone").css({
                            display: "none"
                        });
                        $(".tx_mask").css({
                            display: "none"
                        });
                    }
王晓刚 authored
1096 1097
                    alert(res.msg)
                },
王晓刚 authored
1098
                error: function (res) {
王晓刚 authored
1099 1100 1101 1102
                    alert('与服务器断开连接')
                }
            })
        });
王晓刚 authored
1103
        $('body').on('click', '.unify_all', function () {
1104
            var index = $(".log_three_tab_top .log_three_tab_one").index($('.aaa'));
1105
            var length = $(".log_three_list_contant").eq(index).find('.log_three_list_top_lo img').length - 1;
王晓刚 authored
1106
            var arr = [];
王晓刚 authored
1107 1108
            for (var i = 0; i <= length; i++) {
                if ($('.log_three_list_top_lo img').eq(i).attr('src') == "__TMPL__/public/assets/images/xuanzhong (1).png") {
王晓刚 authored
1109 1110 1111 1112
                    arr.push($('.log_three_list_top_lo img').eq(i).attr('data-indent-id'));
                }
            }
            $('.confirm2').attr('data-indent-id', arr.join(","));
王晓刚 authored
1113
            var type = $('.unify_all').attr('data-type');
王晓刚 authored
1114
            if (arr.length != 0) {
1115
                if (type == 1) {
王晓刚 authored
1116
                    $.ajax({
1117 1118 1119 1120
                        url: "{:url('take_all')}",
                        type: "GET",
                        data: {'indent_ids': arr.join(",")},
                        success: function (res) {
王晓刚 authored
1121
                            if (res.code == 1) {
1122 1123
                                $(arr).each(function (i, vo) {
                                    $('.order_' + vo).remove();
王晓刚 authored
1124 1125 1126 1127 1128 1129 1130
                                })
                                alert('操作成功')
                            } else {
                                alert(res.msg);
                            }
                        }
                    })
1131
                } else {
王晓刚 authored
1132 1133
                    $('.tx_masktwo').show();
                }
王晓刚 authored
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162
            } else {
                alert('请至少选择一个订单');
            }
        });
        $('.confirm2').click(function () {
            var start_time2 = $('#start_time2').val();
            var end_time2 = $('#end_time2').val();
            var indent_ids = $(this).attr('data-indent-id');
            if (indent_ids == '') {
                alert('请至少选择一个订单');
            } else if (start_time2 == '') {
                alert('请选择配送时间')
            } else if (end_time2 == '') {
                alert('请选择配送时间')
            } else {
                $.ajax({
                    url: "{:url('order_salesman/send_all')}",
                    type: "GET",
                    data: {'start_time2': start_time2, 'end_time2': end_time2, 'indent_ids': indent_ids},
                    success: function (res) {
                        if (res.code == 1) {
                            alert('发货成功')
                        } else {
                            alert(res.msg);
                        }
                    }
                })
            }
        });
1163 1164
        update();
1165
        $('body').on('click', '.take_one', function () {
王晓刚 authored
1166 1167
            var indent_id = $(this).attr('data-indent-id');
            $.ajax({
1168 1169 1170 1171 1172 1173
                url: "{:url('take_one')}",
                type: "GET",
                data: {'indent_id': indent_id},
                success: function (res) {
                    if (res.code == 1) {
                        $('.order_' + indent_id).remove();
王晓刚 authored
1174
                        alert('操作成功')
1175
                    } else {
王晓刚 authored
1176 1177 1178 1179 1180
                        alert(res.msg)
                    }
                }
            })
        })
王晓刚 authored
1181
    })
王晓刚 authored
1182 1183

    function update() {
1184
        var is_courier = $('#is_courier').val();
王晓刚 authored
1185
        var index = $('.log_three_tab_top').children('.aaa').index();
王晓刚 authored
1186
        if (is_courier == 1 && index == 0) {
1187
            $('.log_three_list_fixed').show();
王晓刚 authored
1188
            $('.unify_all').text('统一发货');
1189
            $('.unify_all').attr('data-type', '')
王晓刚 authored
1190
        } else if (is_courier == 2 || (index != 0 && index != 1)) {
1191
            $('.log_three_list_fixed').hide();
1192
        } else if (index == 1) {
王晓刚 authored
1193
            $('.unify_all').text('统一完成');
1194
            $('.unify_all').attr('data-type', 1)
1195 1196
        }
    }
王晓刚 authored
1197 1198
</script>
</body>
1199 1200

</html>