| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221 |
- @using ShwasherSys
- @using ShwasherSys.Authorization.Permissions
- @using ShwasherSys.Models.Layout
- @using ShwasherSys.Views.Shared.New.Modals
- @using ShwasherSys.Views.Shared.New.Table
- @{
- ViewBag.Title = "库存盘点任务统计";
- string activeMenu = PermissionNames.PagesStatisticMgInventoryCheckReportMg; //The menu item will be active for this page.
- ViewBag.ActiveMenu = activeMenu;
- var CheckStateListStr = ViewBag.CheckStateListStr;
- }
- @section css{
- <link href="~/Content/Css/statistic.css" rel="stylesheet" />
- <style>
- #table1 th.td:not(.index) {
- min-width: 120px;
- max-width: 300px;
- }
- </style>
- }
- <div class="box-tool">
- <div class="tool-form">
- <form id="tool-form">
- <div style="float: left">
- <select id="year" name="year" class="form-control" autocomplete="off" style="width: 120px;">
- <option value="">请选择年份</option>
- @for (int i = DateTime.Now.Year; i >= 2019; i--)
- {
- <option value="@(i)">@(i)年</option>
- }
- </select>
- <select id="month" name="month" class="form-control" autocomplete="off" style="width: 180px;">
- <option value="">请选择月份/季度/年度</option>
- <optgroup label="月份">
- @for (int j = 1; j <= 12; j++)
- {
- <option value="@(j)">@(j)月</option>
- }
- </optgroup>
- <optgroup label="季度">
- @for (int j = 1; j <= 4; j++)
- {
- <option value="@(j+12)">第 @(j) 季度</option>
- }
- </optgroup>
- <optgroup label="年度">
- <option value="19">整年度</option>
- <option value="17">上半年</option>
- <option value="18">下半年</option>
- </optgroup>
- </select>
- @*<input id="query-date1" class="form-control iwb-date" type="text" value="" placeholder="请输入查询开始日期..." style="width: 250px;"/>
- <input id="query-date2" class="form-control iwb-date" type="text" value="" placeholder="请输入查询结束日期..." style="width: 250px;"/>*@
- </div>
- <div style="width: 180px; float: left; margin-left: 10px;">
- <select id="HouseType" name="HouseType" class="form-control" autocomplete="off" style="width: 160px;">
- <option value="">请选择成品/半成品</option>
- <option value="1">成品</option>
- <option value="2">半成品</option>
- </select>
-
- </div>
- <div style="width: 180px; float: left; margin-left: 10px;">
- <select id="CheckState" name="CheckState" class="form-control" autocomplete="off" style="width: 150px;">
- <option value="">请选择盘点状态</option>
- @Html.Raw(CheckStateListStr)
- </select>
- </div>
- <div style="width: 250px; float: left;margin-left: 10px;">
- <div class="input-group form-group-sm " style="width: 100%;">
- <input id="employeeId" name="employeeId" class="form-control" type="hidden" autocomplete="off" placeholder="" style="width: 250px;" />
- <input class="form-control" id="query-man" name="query-man" type="text" autocomplete="off" required="" placeholder="请输入盘点的员工..." readonly="">
- <div class="input-group-addon" onclick="ShowQueryModal('query_employee_modal', '.tool-form');">
- <i class="iconfont icon-search"></i>
- </div>
- <div class="input-group-addon" title="清除员工信息" onclick="ClearQueryValue(this);">
- <i class="iconfont icon-close"></i>
- </div>
- </div>
- </div>
- </form>
-
- </div>
- <div class="tool-btn">
- @if (IsGranted(PermissionNames.PagesStatisticMgInventoryCheckReportMgQuery))
- {
- <button class="btn btn-info btn-sm" onclick="Query()">查询</button>
- }
- @* <button class="btn btn-success btn-sm" onclick="Export()">导出</button>*@
- </div>
- </div>
- <div class="box-data">
- <div class="box-body">
- <table id="table1" >
- <thead>
- <tr class="title">
- <td class="td" colspan="20">上海上垫垫圈有限公司库存盘点任务表</td>
- </tr>
-
- <tr>
- <th class="td index">序号</th>
- <th class="td">盘点编号</th>
- <th class="td">仓库</th>
- <th class="td">库区</th>
- <th class="td">货架</th>
- <th class="td">层次</th>
- <th class="td">序列</th>
- <th class="td">盘点状态</th>
- <th class="td">盘点计划日期</th>
- <th class="td">盘点人员</th>
- </tr>
- </thead>
- <tbody class="tbody"></tbody>
-
- </table>
-
- </div>
- </div>
- @section modal{
- @Html.Partial("Modals/Query/_Employee", "employeeId,1:query-man")
- }
- @section scripts
- {
- <script type="text/javascript">
- var $table = $('#table1');
- $(function () {
- $('#year').val(@(DateTime.Now.Year)).select2();
- $('#month').val(@(DateTime.Now.Month)).select2();
- Query();
- });
- function Query() {
- var date = $('#year').val();
- if (date) {
- $.iwbAjax4({
- url: window.appUrl + 'InventoryCheck/QueryStaticsInventoryItems' ,
- form:'tool-form',
- success: function (res) {
- var str = ItemFormatter(res);
- $table.find('.tbody').html(str);
- }
- });
- } else {
- abp.message.warn("请选择年份。");
- }
- }
- function ItemFormatter(data) {
- var str = "";
- if (data && data.length > 0) {
- for (var i = 0; i < data.length; i++) {
- var item = data[i];
- str += '<tr>';
- str += '<td class="td">{0}</td>'.format(i+1);
- str += '<td class="td">{0}</td>'.format(item.checkNo || "");
- str += '<td class="td">{0}</td>'.format(item.storeHouseName || "");
- str += '<td class="td">{0}</td>'.format(item.storeAreaCode || "");
- str += '<td class="td">{0}</td>'.format(item.shelfNumber || "");
- str += '<td class="td">{0}</td>'.format(item.shelfLevel || "");
- //str += '<td class="td">{0}</td>'.format(new Date(item.productDate).format('yyyy-MM-dd'));
- str += '<td class="td">{0}</td>'.format(item.sequenceNo || "");
- str += '<td class="td">{0}</td>'.format(CheckStateFormatter(item.checkState) || "");
- str += '<td class="td">{0}</td>'.format(new Date(item.planStartDate).format('yyyy-MM-dd'));
- str += '<td class="td">{0}</td>'.format(item.checkUserName || "");
-
- str += '</tr>';
- }
- } else {
- str += '<tr>';
- str += '<td class="td" colspan="20" style="color:red;padding:10px;">未查询到生产明细</td>';
- str += '</tr>';
- }
- return str;
- }
- function Export() {
- }
- function ClearQueryValue(that) {
- var $that = $(that).closest('.input-group');
- $that.find('input').val("");
- }
- function CheckStateFormatter(v) {
- var name = $("#CheckState option[value='" + v + "']").text();
- if (v === 1) {
- return '<span class="label label-info">' + name + '</span>';
- } else if (v === 2) {
- return '<span class="label label-success">' + name + '</span>';
- } else if (v === 3) {
- return '<span class="label label-warning">' + name + '</span>';
- }
- return '<span class="label label-info">' + name + '</span>';
- }
- </script>
- }
- <section style="display: none">
- <select id="hid-type">
- <option value=""></option>
- </select>
- @*@Html.DropDownList("hid-type", type)*@
- </section>
|