<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>备件申请-待出库</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="decorator" content="base" />
    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/static/css/reset.css" />
    <link rel="stylesheet" type="text/css" href="${ctxPlugin}/lib/font/iconfont.css" />
    <style>
        .iconfont-icon{
            height:35px;
            line-height:35px;
            padding-bottom:0!important;
            overflow: hidden;
            border-bottom: 1px solid #ddd;
        }
        /*.iconfont-icon>div{*/
            /*border-bottom: 1px solid #ddd;*/
        /*}*/
        .iconfont-icon div{
            height:100%;
            line-height:35px;
            margin-bottom:0;
        }
        .iconfont-icon:hover{
            background:#009688;
            color: #fff!important;
        }
        .iconfont-icon:hover div>div{
            color: #fff!important;
        }
    </style>
</head>
<body>

<div class="layui-card mb-0">
    <ul class="layui-timeline layui-card-body pd-0" id="tanchucheng">
        <li class="iconfont-icon  pl-30" onclick="updateorderFlag('0')">
            <i class="icon iconfont f-l"  style="color: #8D8D8D">&#xe6b0;</i>
            <div class="layui-timeline-content layui-text f-l">
                <div class="layui-timeline-title">不标记</div>
            </div>
        </li>
        <c:forEach items="${typeList}" var="flag">
            <li  class="iconfont-icon pl-30" onclick="updateorderFlag('${flag.columns.id}')">
                <i class="icon iconfont f-l" style="color: ${flag.columns.type}">&#xe6b0;</i>
                <div class="layui-timeline-content layui-text f-l">
                    <div class="layui-timeline-title">${flag.columns.name}</div>
                </div>
            </li>
        </c:forEach>
        <input type="hidden" id="orderId" value="${orderId}">
    </ul>
</div>


<script src="${ctxPlugin}/lib/layuiAdmin/dist/layuiadmin/layui/layui.js"></script>
<script>
    layui.use(['table','layer','laypage','laydate','element','form'], function(){
        $ = layui.$;
        table = layui.table;
        layer = layui.layer;
        laypage = layui.laypage;
        laydate = layui.laydate;
        form = layui.form;
       var element = layui.element;



    });

    function updateorderFlag(flagId){
       var orderId=  $("#orderId").val()
        $.ajax({
            type:"POST",
            url:"${ctx}/order/flagOrder",
            data:{
                orderId:orderId,
                flag:flagId
            },
            success:function(result){
                if(result.code ==200){
                    layer.msg('操作成功！', {icon:1,time:300},function(){
                        window.parent.location.reload();
                    });
                }
            }
        });

    }



    function isBlank(val) {
        if (val == null || val == '' || val == undefined) {
            return true;
        }
        return false;
    }
</script>
</body>
</html>

