<!DOCTYPE HTML>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>盘点单管理</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/common.css" />
</head>

<body>
    <header class="aui-bar aui-bar-nav" id="header">
        <a class="aui-pull-left aui-btn  event-back">
            <span class="aui-iconfont aui-icon-left"></span>
        </a>
        <div class="aui-title">盘点单管理</div>
    </header>
    <div class="container" id="list">
        <section class="aui-content-padded ">
            <ul class="aui-list aui-collapse aui-border">
                <div class="aui-collapse-item">
                    <li class="aui-list-item aui-collapse-header" tapmode>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-title">待审核(<span id="cnt1"></span>)</div>
                            <div class="aui-list-item-right">
                                <i class="aui-iconfont aui-icon-down aui-collapse-arrow"></i>
                            </div>
                        </div>
                    </li>
                    <div class="aui-collapse-content aui-padded-5 aui-border-b" id="con1">
                        <script id="DotTemplate1" type="text/x-dot-template">
                            {{~it.data.waittingData:val:ind}}
                            <div class="aui-card-list aui-padded-b-15 open-win" style="margin-bottom:0rem;" win="pandian_detail" param='{"id":"{{= val.id}}"}'>
                                <div class="aui-card-list-header aui-card-list-user">
                                    <div class="aui-card-list-user-name">
                                        <div class="aui-font-size-16">
                                            <b>{{= val.order_number}}</b> &nbsp;
                                            <span style="color:#ccc;"></span>&nbsp;
                                        </div>
                                        <small class="changestatus" data-id="{{= val.id}}" data-status="1">待审核</small>
                                    </div>
                                </div>
                                <div class="aui-card-list-content aui-border-t" style="margin-left: 1rem;">
                                    <ul class="aui-list aui-list-noborder">
                                        <div class="aui-card-list-user-avatar dotcon" style="{{ if(val.markself!=1){ }} display:none; {{ } }}">
                                            <div class="dotflag"></div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">创建人:{{= val.creatername}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">创建时间:{{= val.create_time}}</div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">审核人:{{= val.auditname}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">审核时间:{{= val.audittime}}</div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">种类:{{= val.typeCount}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">已盘点数:{{= val.checkedCount}}</div>
                                        </div>
                                    </ul>
                                </div>
                            </div>
                            {{~}}
                        </script>
                    </div>

                </div>
            </ul>
        </section>

        <section class="aui-content-padded ">
            <ul class="aui-list aui-collapse aui-border">
                <div class="aui-collapse-item">
                    <li class="aui-list-item aui-collapse-header" tapmode>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-title">待盘点(<span id="cnt2"></span>)</div>
                            <div class="aui-list-item-right">
                                <i class="aui-iconfont aui-icon-down aui-collapse-arrow"></i>
                            </div>
                        </div>
                    </li>
                    <div class="aui-collapse-content aui-padded-5 aui-border-b" id="con2">
                        <script id="DotTemplate2" type="text/x-dot-template">
                            {{~it.data.checkedData:val:ind}}
                            <div class="aui-card-list aui-padded-b-15 open-win" style="margin-bottom:0rem;" win="pandian_detail" param='{"id":"{{= val.id}}"}'>
                                <div class="aui-card-list-header aui-card-list-user">
                                    <div class="aui-card-list-user-name">
                                        <div class="aui-font-size-16">
                                            <b>{{= val.order_number}}</b> &nbsp;
                                            <span style="color:#ccc;"></span>&nbsp;
                                        </div>
                                        <small class="changestatus" data-id="{{= val.id}}" data-status="2">待盘点</small>
                                    </div>
                                </div>
                                <div class="aui-card-list-content aui-border-t" style="margin-left: 1rem;">
                                    <ul class="aui-list aui-list-noborder">
                                        <div class="aui-card-list-user-avatar dotcon" style="{{ if(val.markself!=1){ }} display:none; {{ } }}">
                                            <div class="dotflag"></div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">创建人:{{= val.creatername}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">创建时间:{{= val.create_time}}</div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">审核人:{{= val.auditname}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">审核时间:{{= val.audittime}}</div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">种类:{{= val.typeCount}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">已盘点数:{{= val.checkedCount}}</div>
                                        </div>
                                    </ul>
                                </div>
                            </div>
                            {{~}}
                        </script>
                    </div>

                </div>
            </ul>
        </section>

        <section class="aui-content-padded ">
            <ul class="aui-list aui-collapse aui-border">
                <div class="aui-collapse-item">
                    <li class="aui-list-item aui-collapse-header" tapmode>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-title">盘点中(<span id="cnt4"></span>)</div>
                            <div class="aui-list-item-right">
                                <i class="aui-iconfont aui-icon-down aui-collapse-arrow"></i>
                            </div>
                        </div>
                    </li>
                    <div class="aui-collapse-content aui-padded-5 aui-border-b" id="con4">
                        <script id="DotTemplate4" type="text/x-dot-template">
                            {{~it.data.checkingData:val:ind}}
                            <div class="aui-card-list aui-padded-b-15 open-win" style="margin-bottom:0rem;" win="pandian_detail" param='{"id":"{{= val.id}}"}'>
                                <div class="aui-card-list-header aui-card-list-user">
                                    <div class="aui-card-list-user-name">
                                        <div class="aui-font-size-16">
                                            <b>{{= val.order_number}}</b> &nbsp;
                                            <span style="color:#ccc;"></span>&nbsp;
                                        </div>
                                        <small class="changestatus" data-id="{{= val.id}}" data-status="2">盘点中</small>
                                    </div>
                                </div>
                                <div class="aui-card-list-content aui-border-t" style="margin-left: 1rem;">
                                    <ul class="aui-list aui-list-noborder">
                                        <div class="aui-card-list-user-avatar dotcon" style="{{ if(val.markself!=1){ }} display:none; {{ } }}">
                                            <div class="dotflag"></div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">创建人:{{= val.creatername}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">创建时间:{{= val.create_time}}</div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">审核人:{{= val.auditname}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">审核时间:{{= val.audittime}}</div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">种类:{{= val.typeCount}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">已盘点数:{{= val.checkedCount}}</div>
                                        </div>
                                    </ul>
                                </div>
                            </div>
                            {{~}}
                        </script>
                    </div>
                </div>
            </ul>
        </section>

        <section class="aui-content-padded ">
            <ul class="aui-list aui-collapse aui-border">
                <div class="aui-collapse-item">
                    <li class="aui-list-item aui-collapse-header" tapmode>
                        <div class="aui-list-item-inner">
                            <div class="aui-list-item-title">盘点完成(<span id="cnt3"></span>)</div>
                            <div class="aui-list-item-right">
                                <i class="aui-iconfont aui-icon-down aui-collapse-arrow"></i>
                            </div>
                        </div>
                    </li>
                    <div class="aui-collapse-content aui-padded-5 aui-border-b" id="con3">
                        <script id="DotTemplate3" type="text/x-dot-template">
                            {{~it.data.finishData:val:ind}}
                            <div class="aui-card-list aui-padded-b-15 open-win" style="margin-bottom:0rem;" win="pandian_detail" param='{"id":"{{= val.id}}"}'>
                                <div class="aui-card-list-header aui-card-list-user">
                                    <div class="aui-card-list-user-name">
                                        <div class="aui-font-size-16">
                                            <b>{{= val.order_number}}</b> &nbsp;
                                            <span style="color:#ccc;"></span>&nbsp;
                                        </div>
                                        <small class="changestatus" data-id="{{= val.id}}" data-status="3">盘点完成</small>
                                    </div>
                                </div>
                                <div class="aui-card-list-content aui-border-t" style="margin-left: 1rem;">
                                    <ul class="aui-list aui-list-noborder">
                                        <div class="aui-card-list-user-avatar dotcon" style="{{ if(val.markself!=1){ }} display:none; {{ } }}">
                                            <div class="dotflag"></div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">创建人:{{= val.creatername}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">创建时间:{{= val.create_time}}</div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">审核人:{{= val.auditname}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">审核时间:{{= val.audittime}}</div>
                                        </div>
                                        <div class="aui-list-item aui-padded-l-0 aui-padded-r-15" style="min-height: 1.2rem;">
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">种类:{{= val.typeCount}}</div>
                                            <div class="aui-list-item-title aui-font-size-14 goods-title">已盘点数:{{= val.checkedCount}}</div>
                                        </div>
                                    </ul>
                                </div>
                            </div>
                            {{~}}
                        </script>
                    </div>

                </div>
            </ul>
        </section>


    </div>






</body>

<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/md5.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/swipe.js"></script>
<script type="text/javascript" src="../script/SHA1.js"></script>
<script type="text/javascript" src="../script/doT.min.js"></script>
<script type="text/javascript" src="../script/remotedb.js"></script>
<script type="text/javascript" src="../script/list.js"></script>
<script type="text/javascript" src="../script/aui-tab.js"></script>
<script type="text/javascript" src="../script/aui-toast.js"></script>
<script type="text/javascript" src="../script/zepto.min.js"></script>
<script type="text/javascript" src="../script/jquery.min.js"></script>
<script type="text/javascript" src="../script/CryptoJS/core.js"></script>
<script type="text/javascript" src="../script/CryptoJS/cipher-core.js"></script>
<script type="text/javascript" src="../script/CryptoJS/mode-ecb.js"></script>
<script type="text/javascript" src="../script/CryptoJS/aes.js"></script>
<script type="text/javascript" src="../script/lang.js"></script>
<script type="text/javascript" src="../script/aui-collapse.js"></script>

<script type="text/javascript">
    var host;
    apiready = function() {
        fnReady();
        api.parseTapmode();
        ajaxsetup();
        // getHost();
        host = $api.getStorage('host');
        getRepairList();

    };
    // var host='http://61.177.28.246:8100';
    // ajaxsetup();
    // autologin();
    // getRepairList();
    function getRepairList() {

        $.ajax({
            url: host + '/wms/App/GetTotalInfo',
            //  data:JSON.stringify({
            //     "machineCode":qrcode
            // }),
            type: 'POST',
            success: function(result) {
                console.log(JSON.stringify(result));
                if (result.ret == 1) {
                    api.hideProgress();
                    var Template1 = doT.template($("#DotTemplate1").text());
                    $("#con1").html(Template1(result));
                    $('#cnt1').html(result.data.waittingCount);


                    var Template2 = doT.template($("#DotTemplate2").text());
                    $("#con2").html(Template2(result));
                    $('#cnt2').html(result.data.checkedCount);

                    var Template3 = doT.template($("#DotTemplate3").text());
                    $("#con3").html(Template3(result));
                    $('#cnt3').html(result.data.finishCount);

                    var Template4 = doT.template($("#DotTemplate4").text());
                    $("#con4").html(Template4(result));
                    $('#cnt4').html(result.data.checkingCount);

                    var collapse = new auiCollapse({
                        autoHide: false //是否自动隐藏已经展开的容器
                    });
                    lis_changestatus();
                    fnReadyOpenWin();
                } else {
                    customToast(lang[result.msg], 2000);
                }
            },
            error: function(ret) {
                console.log(JSON.stringify(ret));
            }
        })
    }


    function lis_changestatus() {
        $(".changestatus").click(function() {

            var _this = $(this);
            var id = _this.attr('data-id');
            var status = _this.attr('data-status');

            $.ajax({
                url: host + "url",
                data: JSON.stringify({
                    "id": id
                }),
                type: 'POST',
                success: function(result) {
                    customToast("", 2000);
                }
            })

            $(".maincontent").hide();


        });
    }



    var collapse = new auiCollapse({
        autoHide: false //是否自动隐藏已经展开的容器
    });


    var maskText = function(text) {
        var test = lang[text];
        return test;

    };

    function reloadMe() {
        location.reload();
        window.location.reload();
    }
</script>

</html>
