Index.cshtml 7.13 KB
@{
    ViewData["Title"] = "工单进度追踪清单";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@section header
    {
    <link href="~/css/printQcCode/qcCode.css" rel="stylesheet" asp-append-version="true" />
    <style type="text/css">
        .layui-layer-content {
            overflow-y: hidden !important;
        }
    </style>
}
<div id="listForm" class="layui-tab-item layui-show">
    <form class="layui-form layui-form-pane" action="" lay-filter="listForm">
        <div class="layui-form-item" id="panelSearch" hidden>
            <fieldset class="layui-elem-field">
                <div class="layui-field-box" id="qform">
                    <div class="layui-form-item layui-col-sm12">
                        <div class="layui-inline toolList">
                            <a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-radius" data-type="btnQuery"><i class="layui-icon">&#xe615;</i>查询</a>
                            <a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-warm" data-type="btnReset"><i class="layui-icon">&#xe66c;</i>重置</a>
                            <a href="javascript:;" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-danger" data-type="btnClose"><i class="layui-icon">&#xe6a7;</i>关闭</a>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-sm3">
                            <label class="layui-form-label">产品编号</label>
                            <div class="layui-input-inline">
                                <input name="productHeaderCode" type="text" autocomplete="off" lay-verify="required" maxlength="100" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-col-sm3">
                            <label class="layui-form-label">生产计划号</label>
                            <div class="layui-input-inline">
                                <input name="planCode" type="text" autocomplete="off" lay-verify="required" maxlength="100" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-col-sm3">
                            <label class="layui-form-label">工单编号</label>
                            <div class="layui-input-inline">
                                <input name="workOrderCode" type="text" autocomplete="off" lay-verify="required" maxlength="100" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-col-sm3">
                            <label class="layui-form-label">开始时间</label>
                            <div class="layui-input-inline">
                                <input name="actualStartTime" type="text" autocomplete="off" lay-verify="required" maxlength="100" class="layui-input layui-date">
                            </div>
                        </div>
                        <div class="layui-col-sm3">
                            <label class="layui-form-label">结束时间</label>
                            <div class="layui-input-inline">
                                <input name="actualEndTime" type="text" autocomplete="off" lay-verify="required" maxlength="100" class="layui-input layui-date">
                            </div>
                        </div>
                    </div>
                </div>
            </fieldset>
        </div>
    </form>

    <div class="layui-col-xs12">
        <div class="layui-tab layui-tab-brief" lay-filter="tableTabBody">
            <ul class="layui-tab-title">
                <li class="layui-this" lay-id="1">工单进度
                <li lay-id="2">详情</li>
            </ul>
            <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                    <table id="mainList" lay-filter="mainList"></table>
                </div>
                <div class="layui-tab-item">
                    <div id="WorkOrderProgressInfo">
                        <ul class="layui-timeline" style="padding-left:120px;">
                            <li class="layui-timeline-item" v-for="item in oprTimeLineList" :key="item.id">
                                <i class="layui-icon layui-timeline-axis">&#xe63f;</i>
                                <div class="layui-timeline-content layui-text">
                                    <h3 class="layui-timeline-title">{{item.oprSequenceName}}、{{item.oprSequenceCode}}</h3>
                                    <p>
                                        序号:{{item.serialNumber}}<br>
                                        线体:{{item.lineCode}}<br>
                                        工位:{{item.stationCode}}<br>
                                        设备:{{item.equipmentCode}}({{item.equipmentName}})<br>
                                        操作工:{{item.updateBy}}({{item.userName}})<br>
                                        计划时间:{{item.planStartTime}}~{{item.planEndTime}}<br>
                                        实际时间:{{item.actualStartTime}}~{{item.actualEndTime}}<br>
                                        生产状态:{{GetStateValue(item.state)}}<br>
                                        报工状态:{{GetWorkReportStateValue(item.workReportStatus)}}<br>
                                    </p>
                                </div>
                            </li>
                            <li class="layui-timeline-item">
                                <i class="layui-icon layui-timeline-axis"></i>
                                <div class="layui-timeline-content layui-text">
                                    <div class="layui-timeline-title">{{ (CurrentState?"生产已完成":"生产未开始或进行中") }}</div>
                                </div>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>

    </div>
</div>

<script type="text/html" id="toolbarTable">
    <div class="layui-btn-container">
        <a href="javascript:;" class="layui-btn layui-btn-sm" lay-event="btnSelect"><i class="layui-icon">&#xe628;</i>检索</a>
        <a href="javascript:;" class="layui-btn layui-btn-sm" lay-event="btnRefresh"><i class="layui-icon">&#xe9aa;</i>刷新</a>
        {{ loadMenus("WorkOrderProgress", 1) }}
    </div>
</script>

<script type="text/html" id="workOrderProgress">
    {{# if(d.workOrderProgress==100){ }}
    <span style="color:green">{{d.workOrderProgress}}%</span>
    {{# }else{ }}
    <span style="color:red">{{d.workOrderProgress}}%</span>
    {{# } }}
</script>

<script type="text/html" id="sendWorkOrderProgress">
    {{# if(d.sendWorkOrderProgress==100){ }}
    <span style="color:green">{{d.sendWorkOrderProgress}}%</span>
    {{# }else{ }}
    <span style="color:red">{{d.sendWorkOrderProgress}}%</span>
    {{# } }}
</script>
@section Scripts {
    <script type="text/javascript" src="/productjs/wo/WorkOrderProgress.js" asp-append-version="true"></script>
}