新增采购订单、委外订单、收料通知单、退料通知单、销售订单、发货通知单、退货通知单等单据列表模块-合并
3个文件已添加
1个文件已删除
5个文件已修改
1368 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/LAYUI.pubxml.user 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Baseset/基础资料/Gy_BadReasonList.html 103 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Baseset/基础资料/Gy_ProcList.html 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Baseset/基础资料/Sc_ProcessPlanViewList.html 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/index.html 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产工序管理/增加不良评审单/QC_Add_NoPassProdCheckBill.html 768 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产工序管理/增加不良评审单/QC_NoPassProdCheckBill.html 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/生产工序管理/增加不良评审单/QC_NoPassProdCheckBillList.html 322 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/LAYUI.pubxml.user
@@ -18,10 +18,10 @@
      <publishTime>04/13/2021 10:12:43</publishTime>
    </File>
    <File Include="bin/WebTM.dll">
      <publishTime>04/16/2021 08:22:21</publishTime>
      <publishTime>04/15/2021 19:44:58</publishTime>
    </File>
    <File Include="bin/WebTM.pdb">
      <publishTime>04/16/2021 08:22:21</publishTime>
      <publishTime>04/15/2021 19:44:58</publishTime>
    </File>
    <File Include="layuiadmin/config.js">
      <publishTime>04/13/2021 10:12:41</publishTime>
@@ -704,6 +704,9 @@
    <File Include="views/Baseset/SRM_OpenTmpList.html">
      <publishTime>04/13/2021 10:12:43</publishTime>
    </File>
    <File Include="views/Baseset/基础资料/Gy_BadReasonList.html">
      <publishTime>04/14/2021 19:28:58</publishTime>
    </File>
    <File Include="views/Baseset/基础资料/Gy_CustomerList.html">
      <publishTime>04/13/2021 10:12:43</publishTime>
    </File>
@@ -723,7 +726,7 @@
      <publishTime>04/13/2021 10:12:43</publishTime>
    </File>
    <File Include="views/Baseset/基础资料/Gy_ProcList.html">
      <publishTime>04/13/2021 10:12:43</publishTime>
      <publishTime>04/15/2021 19:57:06</publishTime>
    </File>
    <File Include="views/Baseset/基础资料/Gy_StockPlaceList.html">
      <publishTime>04/13/2021 10:12:43</publishTime>
@@ -739,6 +742,9 @@
    </File>
    <File Include="views/Baseset/基础资料/Gy_WorkCenterList.html">
      <publishTime>04/13/2021 10:12:43</publishTime>
    </File>
    <File Include="views/Baseset/基础资料/Sc_ProcessPlanViewList.html">
      <publishTime>04/15/2021 17:57:24</publishTime>
    </File>
    <File Include="views/component/anim/index.html">
      <publishTime>04/13/2021 10:12:43</publishTime>
@@ -948,7 +954,7 @@
      <publishTime>04/13/2021 10:12:44</publishTime>
    </File>
    <File Include="views/index.html">
      <publishTime>04/15/2021 16:41:20</publishTime>
      <publishTime>04/13/2021 15:45:25</publishTime>
    </File>
    <File Include="views/senior/echarts/bar.html">
      <publishTime>04/13/2021 10:12:44</publishTime>
@@ -1172,11 +1178,14 @@
    <File Include="views/模治具管理/模治具管理/Sc_MouldRepairCheckBillList.html">
      <publishTime>04/13/2021 10:12:44</publishTime>
    </File>
    <File Include="views/生产工序管理/增加不良评审单/QC_Add_NoPassProdCheckBill.html">
      <publishTime>04/15/2021 21:27:39</publishTime>
    </File>
    <File Include="views/生产工序管理/增加不良评审单/QC_NoPassProdCheckBill.html">
      <publishTime>04/13/2021 10:12:44</publishTime>
    </File>
    <File Include="views/生产工序管理/增加不良评审单/QC_NoPassProdCheckBillList.html">
      <publishTime>04/13/2021 10:12:44</publishTime>
      <publishTime>04/13/2021 15:29:46</publishTime>
    </File>
    <File Include="views/生产工序管理/委外工单/WW_EntrustWorkOrderBillMainList.html">
      <publishTime>04/13/2021 10:12:44</publishTime>
@@ -1191,7 +1200,7 @@
      <publishTime>04/13/2021 10:12:44</publishTime>
    </File>
    <File Include="views/生产工序管理/工序派工单/Sc_Add_ProcessSendWork.html">
      <publishTime>04/13/2021 10:12:44</publishTime>
      <publishTime>04/13/2021 17:38:51</publishTime>
    </File>
    <File Include="views/生产管理/生产任务单/Sc_ICMOBillList.html">
      <publishTime>04/13/2021 10:12:45</publishTime>
@@ -1416,7 +1425,7 @@
      <publishTime>04/13/2021 10:12:45</publishTime>
    </File>
    <File Include="Web.config">
      <publishTime>04/13/2021 16:16:58</publishTime>
      <publishTime>04/15/2021 19:47:05</publishTime>
    </File>
  </ItemGroup>
</Project>
WebTM/WebTM.csproj
@@ -299,6 +299,7 @@
    <Content Include="views\app\workorder\listform.html" />
    <Content Include="views\app\说明.txt" />
    <Content Include="views\Baseset\SRM_OpenTmpList.html" />
    <Content Include="views\Baseset\基础资料\Gy_BadReasonList.html" />
    <Content Include="views\Baseset\基础资料\Gy_ProcList.html" />
    <Content Include="views\Baseset\基础资料\Gy_CustomerList.html" />
    <Content Include="views\Baseset\基础资料\Gy_DepartmentList.html" />
@@ -311,6 +312,7 @@
    <Content Include="views\Baseset\基础资料\Gy_StockPlaceList.html" />
    <Content Include="views\Baseset\基础资料\Gy_SupplierList.html" />
    <Content Include="views\Baseset\基础资料\Gy_WarehouseList.html" />
    <Content Include="views\Baseset\基础资料\Sc_ProcessPlanViewList.html" />
    <Content Include="views\component\anim\index.html" />
    <Content Include="views\component\auxiliar\index.html" />
    <Content Include="views\component\badge\index.html" />
@@ -454,7 +456,7 @@
    <Content Include="views\模治具管理\模治具管理\Sc_CheckToolsMaintainBillList.html" />
    <Content Include="views\模治具管理\模治具管理\Sc_CheckToolsDotCheckPlanBillList.html" />
    <Content Include="views\模治具管理\模治具管理\Sc_CheckToolsRepairWorkBillList.html" />
    <Content Include="views\生产工序管理\增加不良评审单\QC_NoPassProdCheckBill.html" />
    <Content Include="views\生产工序管理\增加不良评审单\QC_Add_NoPassProdCheckBill.html" />
    <Content Include="views\生产工序管理\增加不良评审单\QC_NoPassProdCheckBillList.html" />
    <Content Include="views\生产工序管理\委外工单\WW_EntrustWorkOrderBillMainList.html" />
    <Content Include="views\生产工序管理\委外工序汇报单\Sc_StationOutBillMainList.html" />
WebTM/views/Baseset/»ù´¡×ÊÁÏ/Gy_BadReasonList.html
New file
@@ -0,0 +1,103 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; 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">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-card">
            <!--<div class="layui-card-header"></div>-->
            <div class="layui-card-body" style="padding: 15px;">
                <form class="layui-form" action="" lay-filter="component-form-group">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">过滤列</label>
                            <div class="layui-input-inline">
                                <input type="text" name="Value" id="Value" lay-verify="Value" autocomplete="off" placeholder="请输入过滤列" class="layui-input">
                            </div>
                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HQuery">快速查询</button>
                            <button type="button" lay-submit="" class="layui-btn" lay-filter="FH">返回</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <table class="layui-hide" id="ck-table"></table>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
        layui.use(['table', 'form', 'layer'], function () {
            var table = layui.table
            , form = layui.form
            , layer = layui.layer;
            form.on('submit(HQuery)', function () {//选择单位
                //var sMainStr = JSON.stringify(table.cache['ck-table']);
                RoadQuery($('#Value').val());
            });
            form.on('submit(FH)', function () {//选择单位
                //var sMainStr = JSON.stringify(table.cache['ck-table']);
                var checkStatus = table.checkStatus('ck-table')
                 , data = checkStatus.data;
                parent.GetHReasonValue(data);
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            });
            RoadQuery($('#Value').val());
            table.render({
                elem: '#ck-table'
                // , url: '/demo/table/user/'
               , data: []
              , cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 æ–°å¢ž
              , cols: [[
                  { type: 'radio' }
                , { field: 'HItemID', width: 150, title: '不良原因ID', hide: true }
                , { field: 'HNumber', width: 150, title: '不良原因代码' }
                , { field: 'HName', width: 150, title: '不良原因名称', sort: true }
              ]]
              , page: true
            });
            ///加载显示数据
            function RoadQuery(Where) {
                var Value = Where;
                if (Value == null) {
                    Value = '';
                }
                $.ajax({
                    type: "get",
                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetDepartmentList_Json",
                    url: GetWEBURL() + "/Web/GetBadReasonList_Json",
                    async: true,
                    data: { "BadReason": Value },
                    //data: { "Value": Value },
                    success: function (result) {
                        ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
                        table.reload('ck-table', {
                            data: ajaxReturnData
                            , height: 'full-10'
                            , loading: false
                            , done: function (index, res) {
                            }
                        });
                    },
                    error: function (result) {
                        console.log(result);
                        //layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 });
                    }
                });
            };
        });
    </script>
</body>
</html>
WebTM/views/Baseset/»ù´¡×ÊÁÏ/Gy_ProcList.html
@@ -35,6 +35,19 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
            function getUrlVars() {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
            for (var i = 0; i < hashes.length; i++) {
                hash = hashes[i].split('=');
                vars.push(hash[0]);
                vars[hash[0]] = hash[1];
            }
            return vars;
        }
        var params = getUrlVars();
        var Type = params[params[0]];
        layui.use(['table', 'form', 'layer'], function () {
            var table = layui.table
            , form = layui.form
@@ -47,8 +60,17 @@
            form.on('submit(FH)', function () {
                //var sMainStr = JSON.stringify(table.cache['ck-table']);
                var checkStatus = table.checkStatus('ck-table')
                 , data = checkStatus.data;
                parent.GetHProcValue(data);
                    , data = checkStatus.data;
                 switch (Type) {
                    case "HZR":  //返回保管
                        parent.GetHZRValue(data);
                         break;
                     default:
                         parent.GetHProcValue(data);
                         break;
                }
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            });
WebTM/views/Baseset/»ù´¡×ÊÁÏ/Sc_ProcessPlanViewList.html
New file
@@ -0,0 +1,111 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; 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">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-card">
            <!--<div class="layui-card-header"></div>-->
            <div class="layui-card-body" style="padding: 15px;">
                <form class="layui-form" action="" lay-filter="component-form-group">
                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label class="layui-form-label">过滤列</label>
                            <div class="layui-input-inline">
                                <input type="text" name="Value" id="Value" lay-verify="Value" autocomplete="off" placeholder="请输入过滤列" class="layui-input">
                            </div>
                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HQuery">快速查询</button>
                            <button type="button" lay-submit="" class="layui-btn" lay-filter="FH">返回</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <table class="layui-hide" id="ck-table"></table>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
        layui.use(['table', 'form', 'layer'], function () {
            var table = layui.table
            , form = layui.form
            , layer = layui.layer;
            form.on('submit(HQuery)', function () {//选择单位
                //var sMainStr = JSON.stringify(table.cache['ck-table']);
                RoadQuery($('#Value').val());
            });
            form.on('submit(FH)', function () {//选择单位
                //var sMainStr = JSON.stringify(table.cache['ck-table']);
                var checkStatus = table.checkStatus('ck-table')
                 , data = checkStatus.data;
                parent.GetHPlanValue(data);
                var index = parent.layer.getFrameIndex(window.name);
                parent.layer.close(index);
            });
            RoadQuery($('#Value').val());
            table.render({
                elem: '#ck-table'
                // , url: '/demo/table/user/'
               , data: []
              , cellMinWidth: 80 //全局定义常规单元格的最小宽度,layui 2.2.1 æ–°å¢ž
              , cols: [[
                  { type: 'radio' }
                  , { field: 'hmainid', width: 150, title: 'hmainid', hide: true, sort: true }
                  , { field: 'hsubid', width: 150, title: 'hsubid', hide: true }
                  , { field: '单据号', width: 150, title: '单据号' }
                  , { field: 'HMaterID', width: 150, title: 'HMaterID', hide: true }
                  , { field: '物料代码', width: 150, title: '物料代码' }
                  , { field: '物料名称', width: 150, title: '物料名称' }
                  , { field: 'HCenterID', width: 150, title: 'HCenterID', hide: true }
                  , { field: '工作中心', width: 150, title: '工作中心' }
                  , { field: '规格型号', width: 150, title: '规格型号' }
                  , { field: '计划数量', width: 150, title: '计划数量' }
              ]]
              , page: true
            });
            ///加载显示数据
            function RoadQuery(Where) {
                var Value = Where;
                if (Value == null) {
                    Value = '';
                }
                $.ajax({
                    type: "get",
                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetDepartmentList_Json",
                    url: GetWEBURL() + "/Web/GetPlanList_Json",
                    async: true,
                    data: { "Billno": Value },
                    //data: { "Value": Value },
                    success: function (result) {
                        ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
                        table.reload('ck-table', {
                            data: ajaxReturnData
                            , height: 'full-10'
                            , loading: false
                            , done: function (index, res) {
                            }
                        });
                    },
                    error: function (result) {
                        console.log(result);
                        //layer.msg('获取采购订单出现异常', { icon: 2, time: 2000 });
                    }
                });
            };
        });
    </script>
</body>
</html>
WebTM/views/index.html
@@ -147,6 +147,7 @@
                          <a>增加不良评审单</a>
                          <dl class="layui-nav-child">
                              <dd><a lay-href="生产工序管理/增加不良评审单/QC_NoPassProdCheckBillList.html">不良评审单列表</a></dd>
                              <dd><a href="生产工序管理/增加不良评审单/QC_Add_NoPassProdCheckBill.html" target="main_self_frame">新增不良评审单</a></dd>
                          </dl>
                      </dd>
WebTM/views/Éú²ú¹¤Ðò¹ÜÀí/Ôö¼Ó²»Á¼ÆÀÉóµ¥/QC_Add_NoPassProdCheckBill.html
New file
@@ -0,0 +1,768 @@
<!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">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
</head>
<body>
    <div id="layout1" class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <form id="form0" class="layui-form" action="">
                        <div class="layui-card-header">
                            <div class="layui-btn-group">
                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">保存</button>
                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Cancel">退出</button>
                            </div>
                        </div>
                        <div class="layui-card-body">
                            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                                <!--<ul class="layui-tab-title">
                                    <li class="layui-this">基本信息</li>-->
                                    <!--<li>其他信息</li>-->
                                <!--</ul>-->
                                <h1 style="text-align:center;"><b>不良评审单</b></h1>
                                <div class="layui-tab-content">
                                    <div class="layui-tab-item layui-show">
                                        <div class="layui-form-item">
                                            <div class="layui-row">
                                                <div class="layui-col-xs2">
                                                    <label class="layui-form-label">单 æ® å·ï¼š</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HBillNo" lay-verify="HBillNo" id="HBillNo" readonly="readonly" autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs2">
                                                    <label class="layui-form-label">单据日期:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HDate" id="HDate" readonly="readonly" autocomplete="off" disabled>
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs2">
                                                    <label class="layui-form-label">订单跟踪号:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="" id=""  autocomplete="off" disabled>
                                                        <input id="" name="" type="hidden" />
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs2">
                                                    <label class="layui-form-label">产品:</label>
                                                    <div class="layui-input-inline">
                                                         <input type="text" name="HMater" id="HMater" lay-verify="HMater" readonly="readonly"  autocomplete="off" class="layui-input">
                                                         <input id="HMaterID" name="HMaterID" type="hidden" />
                                                    </div>
                                                </div>
                                                  <div class="layui-col-xs2">
                                                    <label class="layui-form-label">产品代码:</label>
                                                    <div class="layui-input-inline">
                                                         <input type="text" name="HMaterNumber" id="HMaterNumber" lay-verify="HMaterNumber" readonly="readonly"  autocomplete="off" class="layui-input">
                                                    </div>
                                                </div>
                                            </div>
                                            <!--<button class="layui-btn" data-type="reload">选择</button>-->
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-row">
                                                <div class="layui-col-xs2">
                                                    <label class="layui-form-label">工序计划单号:</label>
                                                    <div class="layui-input-inline">
                                                        <input type="text" name="HMainSourceBillNo" id="HMainSourceBillNo" lay-verify="" autocomplete="off" class="layui-input">
                                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HPlanID-BT">
                                                           <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                              </button>
                                                   <input id="HMainSourceInterID" name="HMainSourceInterID" type="hidden" />
                                                    <input id="HMainSourceEntryID" name="HMainSourceEntryID" type="hidden" />
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs2">
                                                    <label class="layui-form-label"> å·¥ä½œä¸­å¿ƒï¼š</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HWorkCenterName" lay-verify="" id="HWorkCenterName" readonly="readonly" autocomplete="off">
                                                        <input id="HCenterID" name="HCenterID" type="hidden" />
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs2">
                                                    <label class="layui-form-label"> è®¡åˆ’数量:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HPlanQty" id="HPlanQty" readonly="readonly" autocomplete="off">
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs2">
                                                    <label class="layui-form-label"> è§„格型号:</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HModel" lay-verify="" id="HModel" readonly="readonly"  autocomplete="off">
                                                              <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="HMateriaID-BT">
                                                           <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                              </button>-->
                                                    </div>
                                                </div>
                                                <div class="layui-col-xs2">
                                                    <label class="layui-form-label"> ä¸è‰¯æ•°é‡ï¼š</label>
                                                    <div class="layui-input-inline">
                                                        <input class="layui-input" name="HBadQty"  id="HBadQty"  autocomplete="off">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-row">
                                                <div class="layui-colorpicker-xs">
                                                    <label class="layui-form-label"> è¯„审意见:</label>
                                                    <div class="layui-input-block">
                                                        <input class="layui-input" name="HNote" id="HNote" autocomplete="off">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                        </div>
                                    </div>
                        </div>
                     <table>
                         <tr>
                         </tr>
                     </table>
                        <table class="layui-table" id="mainTable" lay-filter="mainTable">
                            <thead>
                                <tr>
                                     <th>序号</th>
                                    <th>不良原因</th>
                                    <th>责任人</th>
                                    <th>申请工序</th>
                                    <th>责任工序</th>
                                    <th>不良数量</th>
                                    <th>备注</th>
                                    <th>不良确认人</th>
                                    <th>判定结果</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>1</td>
                                    <td><input type="text" id="HWasterReasonName" name="HWasterReasonName" style="width:200px;height:20px;"  />
                                     <button type="button" lay-submit="" class="layui-btn" lay-filter="HBadReasonID-BT">
                                                           <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                              </button>
                                      <input id="HBadReasonID" name="HBadReasonID" type="hidden" />
                                    </td>
                                    <td><input type="text" id="HEmpName" name="HEmpName" style="width:200px;height:20px;" />
                                          <button type="button" lay-submit="" class="layui-btn" lay-filter="HEmployeeID-BT">
                                                           <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                              </button>
                                      <input id="HItemID" name="HItemID" type="hidden" />
                                    </td>
                                    <td><input type="text" id="HSQProcName" name="HSQProcName" style="width:200px;height:20px;" />
                                      <button type="button" lay-submit="" class="layui-btn" lay-filter="HSQProcID-BT">
                                                           <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                              </button>
                                      <input id="HProcID" name="HProcID" type="hidden" />
                                    </td>
                                    <td><input type="text" id="HZRProcName" name="HZRProcName" style="width:200px;height:20px;" />
                                        <button type="button" lay-submit="" class="layui-btn" lay-filter="HZRProcID-BT">
                                                           <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                                              </button>
                                      <input id="HItemID" name="HItemID" type="hidden" />
                                    </td>
                                    <td><input type="text" id="HBadQty" name="HBadQty" style="width:200px;height:20px;" /></td>
                                    <td><input type="text" id="HRemark" name="HRemark" style="width:200px;height:20px;" /></td>
                                    <td><input type="text" id="HPSProcName" name="HPSProcName" style="width:200px;height:20px;" /></td>
                                    <td><input type="text" id="HQCResultID" name="HQCResultID" style="width:200px;height:20px;" /></td>
                                </tr>
                                  <tr>
                                    <td>2</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>3</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>4</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>5</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>6</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>7</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>8</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>9</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>10</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>11</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>12</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>13</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>14</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                                <tr>
                                    <td>15</td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td ><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id="" style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                    <td><input type="text" id=""  style="width:200px;height:20px;"/></td>
                                </tr>
                            </tbody>
                        </table>
                    </form>
                </div>
                        </div>
        </div>
    </div>
     <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
       <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
            var $ = layui.$
            , admin = layui.admin
            , layer = layui.layer
            , table = layui.table
            , form = layui.form
            , element = layui.element;
            //清空界面  new
            //表头初始化赋值(根据登录用户获取 é»˜è®¤ä»“库、部门、验收、保管、金蝶用户) new
            $("#HWHID").val(sessionStorage["HWHID"]);
            $("#HWHNAME").val(sessionStorage["HWHName"]);
            $("#HStockPlaceID").val(sessionStorage["HSPID"]);
            $("#HStockPlaceName").val(sessionStorage["HSPName"]);
            //$("#HSupID").val(sessionStorage["HSupID"]);
            //$("#HSupName").val(sessionStorage["HSupName"]);
            $("#HDeptID").val(sessionStorage["HDeptID"]);
            $("#HDeptName").val(sessionStorage["HDept"]);
            $("#HSecManagerID").val(sessionStorage["HSecManagerID"]);
            $("#HSecManager").val(sessionStorage["HSecManager"]);
            $("#HKeeperID").val(sessionStorage["HKeeperID"]);
            $("#HKeeper").val(sessionStorage["HKeeper"]);
            $("#HMaker").val(sessionStorage["HUserName"]);
            $("#HMaker").hide();
            $("#HMakerID").hide();
            $("#HBillerID").val(sessionStorage["HBillerID"]);
            $("#HBillerID").hide();
            var HSourceFlag = sessionStorage["SourceFlag"];
            //默认带入的仓库,如果启用仓位则仓位有效,如果没有启用则仓位灰度 new
            $("#HBarCode").focus();
            //获取参数
            function getUrlVars() {
                var vars = [], hash;
                var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
                for (var i = 0; i < hashes.length; i++) {
                    hash = hashes[i].split('=');
                    vars.push(hash[0]);
                    vars[hash[0]] = hash[1];
                }
                return vars;
            }
            //判断是否登录 æœªç™»å½•则跳到登录页
            if (sessionStorage.login != "login") {
                layer.confirm("登录失效,请重新登录!", {
                    icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
                }, function () { window.location.href = "../../user/login.html"; });
            }
            var params = getUrlVars();
            var linterid = params[params[0]]; //从参数中获取 å•据内码
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            function  RoadBillMain(linterid)//加载表头
            {
                $.ajax({
                    url: GetWEBURL() + "/Web/GetPonderationBill",
                    type: "GET",
                    data: { "HInterID": linterid },
                    success: function (d) {
                        // console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HSourceBillNo").val(d.data[0].HSourceBillNo);
                    }
                })
            }
        var date = new Date();
        var day = date.getDate();
        var month = date.getMonth() + 1;
        var year = date.getFullYear();
        var shijian = year + "-" + month + "-" + day;
            //判断是否新增
            if (linterid == null || linterid == 0) {
                //获取最大单据号 new
                $("#HInterID").val("");
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '7509' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                         $("#HDate").val(shijian);
                    }
                });
            }
            else {//如果修改则走下面 new
                RoadBillMain(linterid);
                RoadBillSub(linterid);
            }
        //选择不良原因
        form.on('submit(HBadReasonID-BT)', function () {//选择仓库
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '不良原因列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
        //选择工序计划单
        form.on('submit(HPlanID-BT)', function () {//选择工序计划单
            layer.open({
                type: 2
                , area: ['80%', '80%']
                , title: '工序计划单列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Sc_ProcessPlanViewList.html', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
        //选择责任人
        form.on('submit(HEmployeeID-BT)', function () {//选择责任人
            layer.open({
                type: 2
                , area: ['80%', '80%']
                , title: '职员列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
        //选择申请工序
        form.on('submit(HSQProcID-BT)', function (data) {//选择申请工序
            var sMainStr = JSON.stringify(data.field);
            layer.open({
                type: 2
                , area: ['80%', '80%']
                , title: '申请工序列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
        //选择责任工序
        form.on('submit(HZRProcID-BT)', function () {//选择责任工序
            layer.open({
                type: 2
                , area: ['80%', '80%']
                , title: '责任工序列表'
                , shade: 0.6 //遮罩透明度
                , maxmin: true //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../../views/Baseset/基础资料/Gy_ProcList.html?Type=HZR', 'yes']
                , resize: false
                , cancel: function () {
                    //$(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
        //编辑
        form.on('submit(cmdModify)', function () {//编辑
            var sSubStr = table.cache['wl-table'];
            //if (AllowLoadData(sSubStr) != false) {//非空验证
                layer.open({
                    type: 2
                    , area: ['100%', '100%']
                    , title: '明细列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/公共页面/Kf_BarCodeEditDlg.html?table=' + JSON.stringify(sSubStr), 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
           // }
        });
        form.on('submit(Cancel)', function () {
            //sessionStorage["SourceFlag"] = false;
            parent.location.href = "../../../views/index.html"
            //window.close();//关闭当前页
        })
      form.on('submit(Saver)', function (data) {//保存
                  //debugger;
                var sMainStr = JSON.stringify(data.field);
                var sSubStr = JSON.stringify(table.cache['mainTable']);
                var sMainSub = sMainStr + ';' + sSubStr;
                $.ajax(
                {
                    type: "POST",
                    url: GetWEBURL()+"SaveBadReasonList", //方法所在页面和方法名
                    async: true,
                    data: {"msg": sMainSub},
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.msg(data.Message, { icon: 1 });
                        }
                        else {
                            f_alert(data.Message);
                            console.log("Reason" + sMainStr + "sub:::" + sSubStr);
                        }
                        layer.closeAll("loading");
                    },
                        error: function (err) {
                            f_alert("错误:" + err);
                            console.log("Reason"+sMainStr);
                    }
                });
              });
                function f_alert(sMsg) {
                layer.alert(sMsg, { icon: 5 });
            }
        //监听提交
        form.verify({
            numberOrEmpty: function (value, item) {
                // if (value != '') {
                if (!/^\d+$/.test(value)) {
                    return '不能为空或数字或者0';
                }
                //}
            }
        });
        //刷新明细页签
        table.render({
            elem: '#mx-table'
            // , url: 'http://61.130.49.162:9090/WMSAPI///Web/GetHBarCodeShowBillSub'
            //, toolbar: '#toolbarDemo'
            // , where: { sMsg: linterid, sMsg2: lentryid }
         , cols: [[
           , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
         ]]
         , page: true
         , height: 500
         , done: function () {
         }
        });
    });
    function GetHReasonValue(obj)  //返回不良原因
    {
        $("#HWasterReasonName").val(obj[0].HName);
        //sessionStorage["HWHID"] = obj[0].HItemID;
        $("#HBadReasonID").val(obj[0].HItemID);
    }
    function GetHPlanValue(obj) {  //返回工序计划单
        $("#HMainSourceInterID").val(obj[0].hmainid);
        $("#HMainSourceEntryID").val(obj[0].hsubid);
        $("#HMainSourceBillNo").val(obj[0].单据号);
        $("#HMaterID").val(obj[0].HMaterID);
        $("#HMaterNumber").val(obj[0].物料代码);
        $("#HMater").val(obj[0].物料名称);
        $("#HCenterID").val(obj[0].HCenterID);
        $("#HWorkCenterName").val(obj[0].工作中心);
        $("#HModel").val(obj[0].规格型号);
        $("#HPlanQty").val(obj[0].计划数量);
    }
    function GetHKeeperValue(obj) {  //返回职员
        $("#HEmpName").val(obj[0].HName);
        //$("#HItemID").val(obj[0].HItemID);
    }
    function GetHProcValue(obj) {  //返回申请工序
        $("#HSQProcName").val(obj[0].工序);
        $("#HProcID").val(obj[0].HItemID);
    }
    function GetHZRValue(obj) {   //返回责任工序
        $("#HZRProcName").val(obj[0].工序);
        //$("#HItemID").val(obj[0].HItemID);
    }
    function AllowLoadData(sSubStr) {  //非空验证
        //if ($("#HSourceBillNo").val() == '') {
        //    layer.msg("请先扫源单!", { icon: 5 });
        //    return false;
        //}
        if($("#HDeptName").val()=='')
        {
            layer.msg("部门没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            return false;
        }
        if ($("#HSecManager").val() == '') {
            layer.msg("验收人没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            return false;
        }
        if ($("#HKeeper").val() == '') {
            layer.msg("保管人没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            return false;
        }
        //if ($("#HWHNAME").val() == '') {
        //    layer.msg("仓库没有选择!", { icon: 5 });
        //    return false;
        //}
        if ($("#HBillNo").val() == '') {
            layer.msg("错误的单据号", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            return false;
        }
        if ($("#HInterID").val() == '') {
            layer.msg("错误的内码", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            return false;
        }
        if (typeof (sSubStr) == "undefined")
        {
            layer.msg("没有物料明细记录", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            return false;
        }
        if (!typeof (sSubStr) == "undefined") {
            //for (var i = 0; i <= sSubStr.length - 1; i++) {  //判断扫码数量不能大于应收数量
            //    if (parseFloat(sSubStr[i].HQtyMust) > 0) {
            //        if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust))
            //        {
            //            layer.msg("数量不能大于应收数量", { icon: 5, btn: ['确定'], time: 100000, offset: 't' });
            //            return false;
            //        }
            //    }
            //}
            for (var i = 0; i <= sSubStr.length - 1; i++) {   //判断扫码数量不能为0
                if (parseFloat(sSubStr[i].HQty) > 0) {
                    s = 1;
                }
            }
            if (s == 0) {
                layer.msg("产品入库记录未扫码", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
        }
        else
        {
            return true;
        }
    }
    </script>
    </body>
</html>
WebTM/views/Éú²ú¹¤Ðò¹ÜÀí/Ôö¼Ó²»Á¼ÆÀÉóµ¥/QC_NoPassProdCheckBill.html
File was deleted
WebTM/views/Éú²ú¹¤Ðò¹ÜÀí/Ôö¼Ó²»Á¼ÆÀÉóµ¥/QC_NoPassProdCheckBillList.html
@@ -1,10 +1,322 @@
<!DOCTYPE html>
<html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="utf-8" />
    <title></title>
<meta http-equiv="Content-Type" content="text/html; 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, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/layui/layui.js"></script>
</head>
<body>
      <h1>哇咔咔!!!!</h1>
    <div class="layui-fluid">
        <div class="layui-col-md12">
            <div class="layui-card" style="padding: 1px">
                <div class="layui-card-body" style="padding: 1px;">
                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <div class="layui-colla-title layui-inline">
                                    <div class="layui-inline">
                                        <span>更多</span>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HDate">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HDate1">
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">订单跟踪号</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HOrderProcNO" id="HOrderProcNO">
                                    </div>
                                </div>-->
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <!--<div class="layui-colla-content">
                                    <div class="layui-inline">
                                        <div class="layui-inline">
                                            <span>其他条件></span>
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">单据号</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="WorkCenter" id="WorkCenter">
                                        </div>
                                    </div>
                                </div>-->
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>预览</button>-->
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>刷新</button>-->
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-form"></i>添加</button>
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon">&#xe608;</i>添加</button>-->
                            </div>
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script type="text/html" id="barDemo">
  <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage','laydate'], function () {
            var $ = layui.$
            , admin = layui.admin
            , layer = layui.layer
            , table = layui.table
            , form = layui.form
            , element = layui.element
            , laypage = layui.laypage
            , laydate = layui.laydate
            //var sWhere = " äº§å“ä»£ç  = 'BX0002'";
            var sWhere = "";
            var option = {
                elem: '#mainTable'
                , toolbar: '#toolbarDemo'
                ,height: 'full-50'
                , page: true
                ,cellMinWidth: 90
                , cols: [[
                    //{ type: 'checkbox' }
                      { field: 'hmainid', title: 'hmainid', sort: true, fixed: true, hide: true }
                    , { field: '日期', title: '日期', sort: true, width: 120 }
                    , { field: '单据号', title: '单据号', sort: true, width: 170 }
                    , { field: '表头备注', title: '表头备注' }
                    , { field: '生产资源名称 ', title: '生产资源名称 ', width: 115 }
                    , { field: '生产资源代码', title: '生产资源代码' }
                    , { field: '物料内码', title: '物料内码', width: 100 }
                    , { field: '物料名称', title: '物料名称' }
                    , { field: '检验员代码', title: '检验员代码' }
                    , { field: '检验员名称', title: '检验员名称' }
                    , { field: '单位代码', title: '单位代码' }
                    , { field: '单位名称', title: '单位名称' }
                    , { field: '不良原因代码 ', title: '不良原因代码' }
                    , { field: '不良原因', title: '不良原因' }
                    , { field: '制单人', title: '制单人' }
                    , { field: '制单日期', title: '制单日期' }
                    , { field: '审核人', title: '审核人' }
                    , { field: '审核日期', title: '审核日期' }
                    , { field: '修改人', title: '修改人' }
                    , { field: '修改日期', title: '修改日期' }
                    , { field: '关闭人', title: '关闭人' }
                    , { field: '关闭日期', title: '关闭日期' }
                    , { field: '作废人', title: '作废人' }
                    , { field: '作废日期', title: '作废日期' }
                    , { field: '单据类型', title: '单据类型' }
                    , { field: 'hsubid', title: 'hsubid', fixed: true, hide: true }
                     //,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:150}
                ]]
            };
//监听行工具事件
  //table.on('tool(mainTable)', function(obj){
  //  var data = obj.data;
  //  //console.log(obj)
  //  if(obj.event == 'del'){
  //    layer.confirm('真的删除行么', function(index){
  //      obj.del();
  //      layer.close(index);
  //    });
  //  } else if(obj.event == 'edit'){
  //    layer.prompt({
  //      formType: 2
  //      ,value: data.HDate
  //    }, function(value, index){
  //      obj.update({
  //        HDate: value
  //      });
  //      layer.close(index);
  //      });
  //      //layer.alert('我是编辑上');
  //  }
  //});
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
                switch (obj.event) {
                    case 'btn-Pushdown':
    //                    var checkStatus = table.checkStatus('mainTable')
    //                    , data = checkStatus.data;
    //                    ajaxLabelData = data;
    //                    var rows = '';
    //                    var HEntry = '';
    //                      for (var i = 0; i < data.length; i++) {
    //                            rows += data[i].hmainid.toString() + ',' ;
    //                    }
    //                    if (checkStatus.data.length < 1)
    //                    {
    //                        layer.msg('请选择一行数据下推');
    //                    } else
    //                    {
                ////页面层
                //layer.open({
                //               type: 2 //Page层类型
                //               ,area: ['100%', '100%']
                //               ,title: '新增派工单'
                //               ,shade: 0.6 //遮罩透明度
                //               ,maxmin: false //允许全屏最小化
    //                , anim: 0 //0-6的动画形式,-1不开启
    //                , content: ['../工序派工单/Sc_Add_ProcessSendWork.html?HInterID=' + data[0].hmainid.toString() + '&lentryid=' + rows.toString().substring(0, rows.length - 1), '&PlanBeginDate=' + data[0].计划开工日期.toString(), '&PlanEndDate=' + data[0].计划完工日期.toString(), 'yes']
    //                           , resize: false
    //                         , cancel: function () {
    //                            //$(".layui-btn").removeClass("layui-btn-disabled");
    //                        }
                //           });
    //                    }
                          layer.msg('哇咔咔!!!!!!');
                        break;
                    case 'btn-Add':
                         layer.open({
                               type: 2 //Page层类型
                               ,area: ['100%', '100%']
                               ,title: '新增派工单'
                               ,shade: 0.6 //遮罩透明度
                               ,maxmin: false //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../增加不良评审单/QC_Add_NoPassProdCheckBill.html' , 'yes']
                               , resize: false
                             , cancel: function () {
                                //$(".layui-btn").removeClass("layui-btn-disabled");
                            }
                           });
                        break;
                    case '':
                        layer.msg('');
                        break;
                };
            });
            //进入页面显示的缓存列表
            var index0 = layer.load(0, { shade: false });
            $.ajax({
                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                url: GetWEBURL() + '/Sc_ProcessMangement/MES_QC_NoPassProdCheckBill_Json',
                type: "GET",
                data: { "sWhere": sWhere },
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
                        table.render(option);
                        layer.close(index0);
                    } else {
                        layer.close(index0);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                    }
                }, error: function () {
                    layer.close(index0);
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            });
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                $("#HDate").val("");//开始日期
                $("#HDate1").val("");//结束日期
                //$("#HOrderProcNO").val("");//订单跟踪号
                //$("#WorkCenter").val("");//单据号
                $("#btnSearch").click();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {//选择仓位
                var HDate = $("#HDate").val();//开始日期
                var HDate1 = $("#HDate1").val();//结束日期
                //var HOrderProcNO = $("#HOrderProcNO").val();//订单跟踪号
                //var WorkCenter = $("#WorkCenter").val();//单据号
                if (HDate) {
                    sWhere += " and æ—¥æœŸ >= '" + HDate + "'";
                }
                if (HDate1) {
                    sWhere += " and æ—¥æœŸ <= '" + HDate1 + "'";
                }
                //if (HOrderProcNO) {
                //    sWhere += " and è®¢å•跟踪号 like '%" + HOrderProcNO + "%'";
                //}
                //if (WorkCenter) {
                //    sWhere += " and HBillNo like '%" + WorkCenter + "%'";
                //}
                var index = layer.load(0, { shade: false });
                $.ajax({
                    url: GetWEBURL() + '/Sc_ProcessMangement/MES_QC_NoPassProdCheckBill_Json',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            layer.close(index);
                            layer.alert("查询成功", { icon: 1 });
                        } else {
                            layer.close(index);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(index);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                sWhere = "";//调用接口后清空sWhere缓存
            });
            //laydate.render({
            //    elem: '#HDate'
            //    , type: 'datetime'
            //    , trigger: 'click'
            //    , format:'yyyy-MM-dd HH:mm'
            //});
            //以上是layui模块
        });
    </script>
</body>
</html>
</html>