YL
2021-11-29 4ece667df879a0e8179f641e8365932fe3d7ec65
Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
17个文件已修改
4813 ■■■■■ 已修改文件
WebTM/WebTM.csproj 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/index.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Sb_Add_MouldRepairWorkBillList.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Sc_Add_MouldDotCheckPlanBillList.html 2710 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Sc_Add_MouldMaintainBillList.html 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Sc_Add_MouldMaintainPlanBillList.html 82 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Sc_MouldDotCheckPlanBillList.html 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Sc_MouldMaintainPlanBillList.html 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_Add_EqpMaintenanceBillList.html 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/设备管理/Sb_EquipMaintainBillEdit.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/采购管理/委外订单/WW_EntrustOrderBillList.html 93 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/采购管理/采购订单/Cg_POOrderBillList.html 92 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/委外出库/Kf_EntrustOutBillList.html 818 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/领料出库/Kf_MateOutBackBillList.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/领料出库/Kf_MateOutBillList.html 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/验收入库/外购入库/Kf_POStockInBackBillList.html 934 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj
@@ -821,6 +821,7 @@
    <Content Include="views\采购管理\采购订单\Cg_POOrderBillList.html" />
    <Content Include="views\销售管理\发货通知单\Add_Edit_Xs_SeOutStockBillList.html" />
    <Content Include="views\销售管理\销售订单\Add_Edit_Xs_SeOrderBillList.html" />
    <Content Include="views\领料发货\委外出库\Kf_EntrustOutBillList.html" />
    <Content Include="views\领料发货\收料入库\Kf_ReciveBill_Fast.html" />
    <Content Include="views\领料发货\领料出库\Kf_MateOutBillLEdit.html" />
    <Content Include="views\领料发货\领料出库\Kf_MateOutBackBillList.html" />
@@ -828,8 +829,8 @@
    <Content Include="views\验收入库\其他入库\Kf_OtherInBillList.html" />
    <Content Include="views\模治具管理\模治具管理\Kf_ProductInBillList.html" />
    <Content Include="views\验收入库\外购入库\Add_Edit_Kf_POStockInBillList.html" />
    <Content Include="views\验收入库\外购入库\Kf_POStockInBackBillList.html" />
    <Content Include="views\验收入库\外购入库\Kf_POStockInBillList.html" />
    <Content Include="views\领料发货\委外出库\Kf_EntrustOutBillList.html" />
    <Content Include="views\领料发货\其他出库\Kf_OtherOutBillList.html" />
    <Content Include="views\领料发货\销售出库\Kf_SellOutBillList.html" />
    <Content Include="views\领料发货\领料出库\Kf_MateOutBillList.html" />
@@ -908,7 +909,6 @@
    <Content Include="views\验收入库\其他入库\Kf_OtherInBackBill_FastList.html" />
    <Content Include="views\验收入库\其他入库\Kf_OtherInBill_FastList.html" />
    <Content Include="views\验收入库\外购入库\Kf_POStockInBackBill.html" />
    <Content Include="views\验收入库\外购入库\Kf_POStockInBackBillList.html" />
    <Content Include="views\验收入库\外购入库\Kf_POStockInBill_FastList.html" />
    <Content Include="views\验收入库\外购入库\Kf_POStockInBill_Fast.html" />
    <Content Include="views\验收入库\外购入库\qrscan.js" />
WebTM/WebTM.csproj.user
@@ -2,7 +2,7 @@
<Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <NameOfLastUsedPublishProfile>JFTM</NameOfLastUsedPublishProfile>
    <ProjectView>ShowAllFiles</ProjectView>
    <ProjectView>ProjectFiles</ProjectView>
    <LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
    <UseIISExpress>true</UseIISExpress>
    <Use64BitIISExpress />
WebTM/views/index.html
@@ -196,11 +196,12 @@
                                    <a>验收入库</a>
                                    <dl class="layui-nav-child">
                                        <dd><a lay-href="验收入库/外购入库/Kf_POStockInBillList.html">采购入库单维护</a></dd>
                                        <dd><a lay-href="">采购退料单维护</a></dd>
                                        <dd><a lay-href="验收入库/外购入库/Kf_POStockInBackBillList.html">采购退料单维护</a></dd>
                                        <dd><a lay-href="验收入库/产品入库/Kf_ProductInBillList.html">生产入库单维护</a></dd>
                                        <dd><a lay-href="">生产退库单维护n</a></dd>
                                        <dd><a lay-href="验收入库/其他入库/Kf_OtherInBillList.html">其他入库单维护</a></dd>
                                        <dd><a lay-href="验收入库/委外入库/Kf_EntrustInBillList.html">委外加工入库单维护</a></dd>
                                        <dd><a lay-href="领料发货/委外出库/Kf_EntrustOutBillList.html">委外加工出库单维护</a></dd>
                                        <dd><a lay-href="">分步式调入单维护n</a></dd>
                                    </dl>
                                </dd>
@@ -213,7 +214,6 @@
                                        <dd><a lay-href="领料发货/销售出库/Kf_SellOutBillList.html">销售出库单维护</a></dd>
                                        <dd><a lay-href="">销售退库单维护</a></dd>
                                        <dd><a lay-href="领料发货/其他出库/Kf_OtherOutBillList.html">其他出库单维护</a></dd>
                                        <dd><a lay-href="领料发货/委外出库/Kf_EntrustOutBillList.html">委外加工出库单维护</a></dd>
                                        <dd><a lay-href="">分步式调出单维护n</a></dd>
                                    </dl>
                                </dd>
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sb_Add_MouldRepairWorkBillList.html
@@ -927,9 +927,9 @@
                                , "HExplanation": data.维修要求
                                , "HRemark": data.备注
                                , "HMainSourceBillType": data.HMainSourceBillType
                                , "HMainSourceBillNo": data.HMainSourceBillNo
                                , "HMainSourceInterID": data.HMainSourceInterID
                                , "HMainSourceEntryID": data.HMainSourceEntryID
                                , "HMainSourceBillNo": data.源单单号
                                , "HMainSourceInterID": data.源单主内码
                                , "HMainSourceEntryID": data.源单子类码
                            });
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_Add_MouldDotCheckPlanBillList.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
j<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>新增/编辑器具保养记录表</title>
    <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">
@@ -32,7 +32,7 @@
                        </div>
                        <div class="layui-card-body">
                            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                                <h1 style="text-align:center;"><b>器具保养记录表</b></h1>
                                <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">
@@ -140,21 +140,14 @@
    <script src="../../../layuiadmin/PubCustom.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 = get_UrlVars();
        if (typeof (params[params[0]]) == "undefined") {
            var OperationType = 1;//操作类型
        } else {
            var OperationType = params[params[0]];//操作类型
            var linterid = params[params[1]];//源单id
            var HSouceBillType = params[params[2]];//源单类型
        }
        var params = getUrlVars();
        var hID = params[params[0]];//编辑查看
        layui.config({
@@ -170,2265 +163,64 @@
                , laydate = layui.laydate
                , element = layui.element;
            //常规用法
            laydate.render({
                elem: '#HDate'
            });
            laydate.render({
                elem: '#HBeginDate'
            });
            laydate.render({
                elem: '#HEndDate'
            });
            //判断是否登录 æœªç™»å½•则跳到登录页
            //if (sessionStorage.login != "login") {
            //    layer.confirm("登录失效,请重新登录!", {
            //        icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
            //    }, function () { window.location.href = "../../user/login.html"; });
            //}
            var tableReload = table.reload;
            var option = {
                elem: '#mainTable'
                , toolbar: '#toolbarDemo'
                , height: 500
                //,url: '/demo/table/user/' //数据接口
                , page: true //开启分页
                , cols: [[ //表头
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HDotCheckItem', title: '点检项目', edit: 'text' }
                    , { field: 'HDotCheckPart', title: '点检部位', edit: 'text' }
                    , { field: 'HClaim', title: '具体要求', edit: 'text' }
                    , { field: 'HManagerID', title: '负责人代码', edit: 'text' }
                    , { field: 'HRemark', title: '备注', edit: 'text' }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150 }
                ]]
                , limit: 500 //每页默认显示的数量
            };
            //判断是否新增
            if (hID == null || hID == 0) {
                //初始加载表格{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
                option.data = [{ "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HRemark": "" }];
                table.render(option);
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //初始化表单插件
            set_InitFrom();
            //初始化表格
            set_InitGrid();
            //判断操作类型
            if (OperationType == 1) {//无源单
                set_AddFNew();
            }
            else if (OperationType == 3) {//编辑
                set_EditFromGrid();
            }
            else {
                $("#HInterID").val(hID);//修改时主表ID
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + 'Sc_MouldDotCheckPlanBill/Sc_MouldDotCheckPlanBillListProjectDetai',
                    type: "GET",
                    data: { "sqlWhere": "and HInterID=" + hID },
                    success: function (result) {
                        //console.log('gouba' + result);
                        if (result.count == 1) {
                            option.data = result.data;
                            table.render(option);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(index0);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
                layer.alert("未知操作类型!", { icon: 5 });
            }
            //#endregion
            //头工具栏事件
            var rowid = 0;
            var rows = 0;
            //#region å¤´å·¥å…·æ äº‹ä»¶
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;;
                var AddRow = table.cache['mainTable'];
                var NewRow = { "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": "0", "HRemark": "" };
                    , data = checkStatus.data;
                var NewRow = { "HDotCheckItemID": 0, "HDotCheckCode": "", "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" };
                switch (obj.event) {
                    case 'btn-AddLine':
                        //table.cache["mainTable"].push(AddRow[rows]);
                        table.cache["mainTable"].push(NewRow);
                        option.data = table.cache["mainTable"];
                        table.render(option);
                        rows++;
                        layer.msg('增加一行按钮!')
                    //增加一行
                    case 'btn-AddLine': set_AddLine(NewRow);
                        break;
                    case 'btn-CopyLine':
                        var copydata = JSON.stringify(data);
                        if (data.length <= 0) {
                            layer.alert("请选择需要复制的一行!");
                        }
                        else if (data.length > 1) {
                            layer.alert("只能选择复制一行!");
                        }
                        else {
                            var copydata2 = copydata.substring(1, copydata.length);//去除首行字符'['
                            var copyrow = copydata2.substring(0, copydata2.length - 1);//去除末尾字符']'
                            table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
                            option.data = table.cache["mainTable"];//将数据绑定到data上
                            table.render(option);//将数据渲染到表格上
                            //layer.alert(copyrow);
                        }
                    //复制一行
                    case 'btn-CopyLine': set_CopyLine(data);
                        break;
                }
            });
            //行内事件
            table.on('tool(mainTable)', function (obj) {
                var data = obj.data;
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                        console.log("索引为:" + rowIndex);
                        if (rowIndex === '0') {
                            layer.msg('首行无法删除!!!');
                        } else {
                            var oldData = table.cache["mainTable"];
                            oldData.splice(obj.tr.data('index'), 1);
                            table.reload('mainTable', { data: oldData });
                            layer.close(index);
                        }
                    });
                }
                if (obj.event === 'ReasonNameEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "1":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "2":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "3":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "4":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "5":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "6":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "7":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "8":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "9":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "10":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "11":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "12":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "13":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "14":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "15":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "16":
                            //弹出框选择不良原因
                            layer.open({
                                type: 2
                                , area: ['80%', '80%']
                                , title: '不良原因列表'
                                , shade: 0.6 //遮罩透明度
                                , maxmin: true //允许全屏最小化
                                , anim: 0 //0-6的动画形式,-1不开启
                                , content: ['../../../views/Baseset/基础资料/Gy_BadReasonList.html', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HWasterReasonName: HReasonName
                                        , HBadReasonID: ReasonID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HWasterReasonName);
                            console.log("行号:" + rowIndex);
                            break;
                    }
                }
                else if (obj.event === 'EmpNameEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "1":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "2":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "3":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "4":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "5":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "6":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "7":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "8":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "9":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "10":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "11":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "12":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "13":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "14":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "15":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "16":
                            //弹出框选择责任人
                            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
                                , end: function () {
                                    _obj.update({
                                        HEmpName: EmpName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HEmpName);
                            console.log("行号:" + rowIndex);
                            break;
                    }
                }
                else if (obj.event === 'SQProcNameEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "1":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "2":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "3":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "4":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "5":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "6":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "7":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "8":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "9":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "10":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "11":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "12":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "13":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "14":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "15":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "16":
                            //弹出框选择申请工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HSQProcName: SQProcName
                                        , HProcID: ProcID
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HSQProcName);
                            console.log("行号:" + rowIndex);
                            break;
                    }
                }
                else if (obj.event === 'ZRProcNameEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "1":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "2":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "3":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "4":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "5":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "6":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "7":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "8":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "9":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "10":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "11":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "12":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "13":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "14":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "15":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "16":
                            //弹出框选择责任工序
                            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
                                , end: function () {
                                    _obj.update({
                                        HZRProcName: ZRProcName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HZRProcName);
                            console.log("行号:" + rowIndex);
                            break;
                    }
                }
                else if (obj.event === 'BadQtyEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            break;
                        case "1":
                            break;
                        case "2":
                            break;
                        case "3":
                            break;
                        case "4":
                            break;
                        case "5":
                            break;
                        case "6":
                            break;
                        case "7":
                            break;
                        case "8":
                            break;
                        case "9":
                            break;
                        case "10":
                            break;
                        case "11":
                            break;
                        case "12":
                            break;
                        case "13":
                            break;
                        case "14":
                            break;
                        case "15":
                            break;
                        case "16":
                            //$(obj.tr).find(".layui-table-edit").keyup(function () {
                            //    var $input = $(this), val = $input.val();
                            //    if (!val) val = "1";
                            //    $input.val(val.replace(/[^\d]/g, ''));
                            //});
                            break;
                    }
                }
                else if (obj.event === 'RemarkEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            break;
                        case "1":
                            break;
                        case "2":
                            break;
                        case "3":
                            break;
                        case "4":
                            break;
                        case "5":
                            break;
                        case "6":
                            break;
                        case "7":
                            break;
                        case "8":
                            break;
                        case "9":
                            break;
                        case "10":
                            break;
                        case "11":
                            break;
                        case "12":
                            break;
                        case "13":
                            break;
                        case "14":
                            break;
                        case "15":
                            break;
                        case "16":
                            break;
                    }
                }
                else if (obj.event === 'PSProcNameEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "1":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "2":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "3":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "4":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "5":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "6":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "7":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "8":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "9":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "10":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "11":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "12":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "13":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "14":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "15":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                        case "16":
                            //弹出框选择不良确认人
                            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=HWorker', 'yes']
                                , resize: false
                                , end: function () {
                                    _obj.update({
                                        HPSProcName: QRName
                                    });
                                }
                            })
                            console.log("字段赋值" + data.HPSProcName);
                            console.log("行号:" + rowIndex);
                            break;
                    }
                }
                else if (obj.event === 'CloseManEvent') {
                    var _obj = obj;
                    switch (rowIndex) {
                        case "0":
                            break;
                        case "1":
                            break;
                        case "2":
                            break;
                        case "3":
                            break;
                        case "4":
                            break;
                        case "5":
                            break;
                        case "6":
                            break;
                        case "7":
                            break;
                        case "8":
                            break;
                        case "9":
                            break;
                        case "10":
                            break;
                        case "11":
                            break;
                        case "12":
                            break;
                        case "13":
                            break;
                        case "14":
                            break;
                        case "15":
                            break;
                        case "16":
                            break;
                    }
                }
                set_GirdDelete(obj);//删除事件
                set_GridCellCheck(obj); //行内快捷键筛选(F7)
            });
            function RoadBillMain(hID)//加载表头
            {
                alert(hID);
                //查询检验方案单是否存在
                $.ajax({
                    url: GetWEBURL() + "Sc_MouldDotCheckPlanBill/Sc_MouldDotCheckPlanBillListCheckDetai",
                    type: "GET",
                    data: {
                        "HID": hID
                    },
                    success: function (result) {
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data.h_v_Sc_MouldDotCheckPlanBillList[0];
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HBillNo": data.单据号
                                , "HDate": data.日期
                                , "HInnerBillNo": data.内部单据号
                                , "HBeginDate": data.保养开始日期
                                , "HEndDate": data.保养结束日期
                                , "HExplanation": data.摘要
                                , "HRemark": data.备注
                                , "HMouldID": data.HMouldID
                                , "HCycleUnit": data.周期单位
                                , "HCheckCycle": data.保养周期
                                , "HBeginDate": data.计划开始日期
                                , "HEndDate": data.计划结束日期
                            });
                        } else {
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }, error: function () {
                        layer.alert("发生错误!", { icon: 5 });
                    }
                });
            }
            var date = new Date();
            var day = date.getDate();
            var month = date.getMonth() + 1;
            var year = date.getFullYear();
            var shijian = year + "-" + month + "-" + day;
            //判断是否新增
            if (hID == null || hID == 0) {
                //获取最大单据号 new
                $("#HInterID").val("0");
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3807' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(shijian);
                        $("#HBeginDate").val(shijian);
                        $("#HEndDate").val(shijian);
                        $("#HInterID").val(0);
                    }
                });
            }
            else {//如果修改则走下面 new
                RoadBillMain(hID);
                /* RoadBillSub(linterid);*/
            }
            //选择产品弹窗
            form.on('submit(HMateria-BT)', function () {//产品
                layer.open({
                    type: 2
                    , area: ['80%', '80%']
                    , title: '物料'
                    , shade: 0.6 //遮罩透明度
                    //, maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../Baseset/基础资料/Gy_MaterialList.html', 'yes']
                    , resize: false
                    , cancel: function (index, layero) {
                    }
                })
            });
            //选择工序
            form.on('submit(HProc-BT)', function () {//选择工序
                layer.open({
                    type: 2
                    , area: ['80%', '80%']
                    , title: '工序列表'
                    , shade: 0.6 //遮罩透明度
                    //, maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../Baseset/基础资料/Gy_ProcList.html', 'yes']
                    , resize: false
                    , cancel: function (index, layero) {
                    }
                })
            });
            //选择部门
            form.on('submit(HDepart-BT)', function () {//选择部门
                layer.open({
                    type: 2
                    , area: ['80%', '80%']
                    , title: '部门列表'
                    , shade: 0.6 //遮罩透明度
                    //, maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../Baseset/基础资料/Gy_DepartmentList.html', 'yes']
                    , resize: false
                    , cancel: function (index, layero) {
                    }
                })
            });
            //选择单位
            form.on('submit(HUnitID-BT)', function () {//选择单位
                layer.open({
                    type: 2
                    , area: ['666px', '666px']
                    , title: '单位列表'
                    , shade: 0.6 //遮罩透明度
                    , maxmin: true //允许全屏最小化
                    , anim: 0 //0-6的动画形式,-1不开启
                    , content: ['../../../views/Baseset/基础资料/Gy_UnitList.html', 'yes']
                    , resize: false
                    , cancel: function () {
                        //$(".layui-btn").removeClass("layui-btn-disabled");
                    }
                })
            });
            //退出
            form.on('submit(Exit)', function (data) {//
                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                parent.layer.close(index); //再执行关闭
                if (linterid == undefined) {
                    //关闭页签
                    Pub_Close(2);
                }
                else {
                    //关闭页签
                    Pub_Close(1);
                }
            });
            //预览Printing
            form.on("submit(view)", function (data) {
                window.open("../../基础资料/公用基础资料/HBarPlanPrint.html?linterid=" + linterid + "&Type=HMouldDotCheckPlanBill&OpenTmp=器具点检计划条码");
            //选择责任人
            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");
                    }
                })
            });
            //打印Printing
            form.on("submit(print)", function (data) {
                window.open("../../基础资料/公用基础资料/HBarPlanPrint.html?linterid=" + linterid + "&Type=HMouldDotCheckPlanBill&OpenTmp=器具点检计划条码");
            //选择责任工序
            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(Cancel)', function () {
                //sessionStorage["SourceFlag"] = false;
                parent.location.href = "../../../views/index.html"
                //window.close();//关闭当前页
            })
            //新增
            form.on('submit(set_AddNew)', function (data) {
                $("#component-form-group")[0].reset();
                layui.form.render();
                //获取最大单据号 new
                $("#HInterID").val("0");
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3807' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(shijian);
                        $("#HBeginDate").val(shijian);
                        $("#HEndDate").val(shijian);
                        $("#HInterID").val(0);
                    }
                });
            });
            //保存
            form.on('submit(Saver)', function (data) {
@@ -2468,32 +260,317 @@
                }
            });
            //预览Printing
            form.on("submit(view)", function (data) {
                window.open("../../基础资料/公用基础资料/HBarPlanPrint.html?linterid=" + linterid + "&Type=HMouldDotCheckPlanBill&OpenTmp=器具点检计划条码");
            });
            //打印Printing
            form.on("submit(print)", function (data) {
                window.open("../../基础资料/公用基础资料/HBarPlanPrint.html?linterid=" + linterid + "&Type=HMouldDotCheckPlanBill&OpenTmp=器具点检计划条码");
            //#endregion
            });
            //退出
            form.on('submit(Exit)', function (data) {//
                if (linterid == undefined) {
                    //关闭页签
                    Pub_Close(2);
            //#region å½“前页面所有方法
            //初始化表单插件
            function set_InitFrom() {
                //初始化表单插件
                laydate.render({
                    elem: '#HDate',
                });
                laydate.render({
                    elem: '#HBeginDate'
                });
                laydate.render({
                    elem: '#HEndDate'
                });
            }
            //初始化表格
            function set_InitGrid() {
                //表头
                columns = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HDotCheckItemID', title: '点检项目ID', edit: 'text', hide: true }
                    , { field: 'HDotCheckItem', title: '点检项目', edit: 'text', event: "HDotCheckCode" }
                    , { field: 'HDotCheckPart', title: '点检部位', edit: 'text', event: "" }
                    , { field: 'HClaim', title: '具体要求', edit: 'text' }
                    , { field: 'HManagerID', title: '负责人代码', edit: 'text', hide: true }
                    , { field: 'HManagerCode', title: '负责人代码', edit: 'text', event: 'HManagerCode' }
                    , { field: 'HManagerName', title: '负责人名称', edit: 'text' }
                    , { field: 'HRemark', title: '备注', event: "", edit: 'text' }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 150 }
                ];
                option = {
                    id: 'mainTable'
                    , elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , page: true
                    , cellMinWidth: 120
                    , height: 500
                    , cols: [columns]
                    , done: function (res, curr, count) {
                    }
                };
            }
            //无源单新增
            function set_AddFNew() {
                //获取最大单据号
                get_MAXNum();
                option.data = [{ "HDotCheckItemID": 0,  "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" }];
                table.render(option);
            }
            //获取最大单据号及默认值赋值
            function get_MAXNum() {
                //获取最大单据号 new
                $("#HInterID").val("0");
                $("#HBillNo").val("");
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '3807'},
                    success: function (d) {
                        var myDate = new Date();
                        var aa = myDate.toLocaleDateString()
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                        $("#HBeginDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                        $("#HEndDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
                        $("#HInterID").val(0);
                    }
                });
            }
            //编辑
            function set_EditFromGrid() {
                set_EditForm(linterid);  //编辑获取表头
                set_EditGrid(linterid);  //编辑获取表体
                option.data = [{ "HDotCheckItemID": 0,  "HDotCheckItem": "", "HDotCheckPart": "", "HClaim": "", "HManagerID": 0, "HManagerCode": "", "HManagerName": "", "HRemark": "" }];
                table.render(option);
            }
            //编辑加载表头
            function set_EditForm(linterid) {
                $.ajax({
                    url: GetWEBURL() + "Sc_MouldDotCheckPlanBill/Sc_MouldDotCheckPlanBillListCheckDetai",
                    type: "GET",
                    data: {
                        "HID": linterid
                    },
                    success: function (result) {
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data.h_v_Sc_MouldDotCheckPlanBillList[0];
                            form.val("component-form-group", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                                "HBillNo": data.单据号
                                , "HDate": data.日期
                                , "HInnerBillNo": data.内部单据号
                                , "HBeginDate": data.保养开始日期
                                , "HEndDate": data.保养结束日期
                                , "HExplanation": data.摘要
                                , "HRemark": data.备注
                                , "HMouldID": data.HMouldID
                                , "HCycleUnit": data.周期单位
                                , "HCheckCycle": data.保养周期
                                , "HBeginDate": data.计划开始日期
                                , "HEndDate": data.计划结束日期
                            });
                        } else {
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }, error: function () {
                        layer.alert("发生错误!", { icon: 5 });
                    }
                });
            }
            // ç¼–辑获取表体
            function set_EditGrid(linterid) {
                $("#HInterID").val(linterid);//修改时主表ID
                //编辑加载数据
                $.ajax({
                    url: GetWEBURL() + 'Sc_MouldDotCheckPlanBill/Sc_MouldDotCheckPlanBillListProjectDetai',
                    type: "GET",
                    data: { "sqlWhere": "and HInterID=" + linterid },
                    success: function (result) {
                        //console.log('gouba' + result);
                        if (result.count == 1) {
                            option.data = result.data;
                            table.render(option);
                        } else {
                            layer.alert(result.code + result.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(index0);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            // ç¼–辑获取表头时时间格式矫正方式
            function formatDate(date) {
                var d = new Date(date),
                    month = '' + (d.getMonth() + 1),
                    day = '' + d.getDate(),
                    year = d.getFullYear();
                if (month.length < 2) month = '0' + month;
                if (day.length < 2) day = '0' + day;
                return [year, month, day].join('-');
            }
            //增加一行
            function set_AddLine(NewRow) {
                var tableBak = table.cache["mainTable"]; //获取之前编辑过的表格数据
                buttonArr = [];//清空数组
                for (var i = 0; i < tableBak.length; i++) {
                    buttonArr.push(tableBak[i]);  //将之前的数据存储
                }
                buttonArr.push(NewRow);  //在尾部加一行
                table.reload("mainTable", {
                    data: buttonArr    //将数据重新载入表格
                })
            }
            //复制一行
            function set_CopyLine(data) {
                var copydata = JSON.stringify(data);
                if (data.length <= 0) {
                    layer.alert("请选择需要复制的一行!");
                }
                else if (data.length > 1) {
                    layer.alert("只能选择复制一行!");
                }
                else {
                    //关闭页签
                    Pub_Close(1);
                    var copydata2 = copydata.substring(1, copydata.length);//去除首行字符'['
                    var copyrow = copydata2.substring(0, copydata2.length - 1);//去除末尾字符']'
                    table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
                    option.data = table.cache["mainTable"];//将数据绑定到data上
                    table.render(option);//将数据渲染到表格上
                    //layer.alert(copyrow);
                }
            });
            }
            //行内删除事件
            function set_GirdDelete(obj) {
                var data = obj.data;
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                        console.log("索引为:" + rowIndex);
                        if (rowIndex === '0') {
                            layer.msg('首行无法删除!!!');
                        } else {
                            //obj.del();
                            //layer.close(index);
                            var oldData = table.cache["mainTable"];
                            oldData.splice(obj.tr.data('index'), 1);
                            table.reload('mainTable', { data: oldData });
                            layer.close(index);
                        }
                    });
                }
            }
            // è¡¨æ ¼è¡Œå†…事件快捷键筛选
            function set_GridCellCheck(obj) {
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    if (event.key == "F7") {
                        if (obj.event === 'HDotCheckCode')  //点检项目代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '物料列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../PublicPage/CheckItemInformation.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HDotCheckItemID: checkStatus.data[0].HItemID,
                                        HDotCheckCode: checkStatus.data[0].HNumber,
                                        HDotCheckItem: checkStatus.data[0].HName
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        if (obj.event === 'HManagerCode')  //负责人代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '物料列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../PublicPage/UserInformation.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HManagerID: checkStatus.data[0].HItemID,
                                        HManagerCode: checkStatus.data[0].HNumber,
                                        HManagerName: checkStatus.data[0].HName
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        obj.event = "";
                        return false;
                    }
                })
            }
            //数据验证
            function AllowLoadData(sSubStr) {
                var Result = true;
                if ($("#HEquipID").val() == '' || $("#HEquipName").val() == '') {
                    layer.msg("请选择设备", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    return Result = false;
                }
                if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
                    sSubStr = JSON.parse(sSubStr);
                    for (var i = 0; i < sSubStr.length; i++) {
                        if (sSubStr[i].HDotCheckItemID == "") {
                            layer.msg("明细记录第" + (i + 1) + "行,点检项目代码信息为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            return Result = false;
                        }
                        if (sSubStr[i].HManagerID == "") {
                            layer.msg("明细记录第" + (i + 1) + "行,负责人代码信息为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                            return Result = false;
                        }
                    }
                }
                return Result;
            }
            //错误信息
            function f_alert(sMsg) {
                layer.alert(sMsg, { icon: 5 });
            }
            //#endregion
            //监听提交
            form.verify({
@@ -2508,95 +585,6 @@
        });
        //定义全局变量
        var HReasonName, ReasonID, EmpName, SQProcName,
            ProcID, ZRProcName, QRName
            ;
        function GetHReasonValue(obj)  //返回不良原因
        {
            HReasonName = obj[0].HName;
            ReasonID = obj[0].HItemID;
        }
        //返回物料
        function GetHMaterNameValue(obj) {  //返回物料
            $("#HMater").val(obj[0].HName);
            $("#HMaterID").val(obj[0].HItemID);
            $("#HMaterNumber").val(obj[0].HNumber);
        }
        //返回工序
        function GetHProcValue(obj) {  //返回工序
            $("#HProcName").val(obj[0].工序);
            $("#HProcID").val(obj[0].HItemID);
            $("#HProcNumber").val(obj[0].工序代码);
        }
        function GetHDeptNameValue(obj) {  //返回部门
            $("#HDepName").val(obj[0].HName);
            $("#HDeptID").val(obj[0].HItemID);
            $("#HDeptNumber").val(obj[0].HNumber);
        }
        //返回单位
        function GetHUnitNameValue(obj) {
            $("#HUName").val(obj[0].HName);
            $("#HUnitID").val(obj[0].HItemID);
            $("#HUnitNumber").val(obj[0].HNumber);
        }
        function GetHKeeperValue(obj) {  //返回责任人
            EmpName = obj[0].HName;
            // $("#HEmpName").val(obj[0].HName);
            //$("#HItemID").val(obj[0].HItemID);
        }
        //function GetHProcValue(obj) {  //返回申请工序
        //    SQProcName = obj[0].工序;
        //    ProcID = obj[0].HItemID;
        //    //$("#HSQProcName").val(obj[0].工序);
        //    //$("#HProcID").val(obj[0].HItemID);
        //}
        function GetHZRValue(obj) {   //返回责任工序
            ZRProcName = obj[0].工序;
            //$("#HZRProcName").val(obj[0].工序);
            //$("#HItemID").val(obj[0].HItemID);
        }
        //HWorker
        function GetHWorkerValue(obj) {  //返回不良确认人
            QRName = obj[0].HName;
            //$("#HQRName").val(obj[0].HName);
            //$("#HItemID").val(obj[0].HItemID);
        }
        function AllowLoadData(sSubStr) {  //非空验证
            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" || sSubStr == "") {
                layer.msg("没有物料明细记录", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return Result = false;
            }
            if (typeof (sSubStr) != "undefined" && typeof (sSubStr) != "") {
                sSubStr = JSON.parse(sSubStr);
                for (var i = 0; i < sSubStr.length; i++) {
                    if (sSubStr[i].HMaterID == "") {
                        layer.msg("明细记录第" + (i + 1) + "行,器具信息为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return Result = false;
                    }
                    if (sSubStr[i].HWHID == "") {
                        layer.msg("明细记录第" + (i + 1) + "行,发料仓库为空!", { icon: 5, btn: ['确认'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        return Result = false;
                    }
                }
            }
            else {
                return true;
            }
        }</script>
    </script>
</body>
</html>
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_Add_MouldMaintainBillList.html
@@ -284,10 +284,18 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['', 'yes'],
                    content: ['../模治具管理/Sc_MouldMaintainPlanBillList.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#HPlanInterName").val(checkStatus.data[0].单据号);
                        $("#HPlanInterID").val(checkStatus.data[0].hmainid);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_Add_MouldMaintainPlanBillList.html
@@ -197,7 +197,7 @@
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;;
                var AddRow = table.cache['mainTable'];
                var NewRow = { "HMaterID": 0, "HUnitID": "0 ", "HQty": "0   ", "HQtyMust": "0", "HRemark": "  " };
                var NewRow = { "HMaterID": 0, "HMaterNumber": "", "HUnitID": "0 ","HUnitNumber":"", "HQty": "0   ", "HQtyMust": "0", "HRemark": "  " };
                switch (obj.event) {
                    //新增一行
                    case 'btn-AddLine': btnAddLine(NewRow);
@@ -218,9 +218,75 @@
            function set_GridCellCheck(obj) {
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    if (event.key == "F7") {
                        if (obj.event === 'HMaintainItemNumber')  //配件代码
                        if (obj.event === 'HMaterNumber')  //配件代码
                        {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '配件列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../PublicPage/PartInformation.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HMaterID: checkStatus.data[0].HItemID,
                                        HMaterNumber: checkStatus.data[0].HNumber
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        //单位代码
                        if (obj.event === 'HUnitNumber') {
                            //页面层-自定义
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '单位列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['90%', '90%'],
                                maxmin: true,
                                content: ['../../PublicPage/UnitInformation.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HUnitID: checkStatus.data[0].HItemID,
                                        HUnitNumber: checkStatus.data[0].HNumber
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                                , btn2: function (index, layero) {
                                    //按钮【按钮二】的回调
                                    //return false å¼€å¯è¯¥ä»£ç å¯ç¦æ­¢ç‚¹å‡»è¯¥æŒ‰é’®å…³é—­
                                },
                                end: function () {
                                }
                            });
                        }
                        obj.event = "";
                        return false;
@@ -324,8 +390,10 @@
                columns = [
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" }
                    , { field: 'HMaterID', title: '配件代码', edit: 'text', event: "" }
                    , { field: 'HUnitID', title: '单位代码', edit: 'text', event: "" }
                    , { field: 'HMaterID', title: '配件ID', edit: 'text', hide: true }
                    , { field: 'HMaterNumber', title: '配件代码', edit: 'text', event: "HMaterNumber", }
                    , { field: 'HUnitID', title: '单位ID', edit: 'text', event: "", hide: true}
                    , { field: 'HUnitNumber', title: '单位代码', edit: 'text', event: "HUnitNumber" }
                    , { field: 'HQty', title: '实际用量', edit: 'text' }
                    , { field: 'HQtyMust', title: '单位用量', edit: 'text' }
                    , { field: 'HRemark', title: '备注', edit: 'text' }
@@ -350,7 +418,7 @@
            function set_AddFNew() {
                //获取最大单据号
                get_MAXNum();
                option.data = [{ "HMaterID": 0, "HUnitID": "0 ", "HQty": "0   ", "HQtyMust": "0", "HRemark": "  " }];
                option.data = [{ "HMaterID": 0, "HMaterNumber": "", "HUnitID": "0 ", "HUnitNumber": "", "HQty": "0   ", "HQtyMust": "0", "HRemark": "  " }];
                table.render(option);
            }
@@ -358,7 +426,7 @@
            function set_EditFromGrid() {
                set_EditForm(linterid);  //编辑获取表头
                set_EditGrid(linterid);  //编辑获取表体
                option.data = [{ "HMaterID": 0, "HUnitID": "0 ", "HQty": "0   ", "HQtyMust": "0", "HRemark": "  " }];
                option.data = [{ "HMaterID": 0, "HMaterNumber": "", "HUnitID": "0 ", "HUnitNumber": "", "HQty": "0   ", "HQtyMust": "0", "HRemark": "  " }];
                table.render(option);
            }
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_MouldDotCheckPlanBillList.html
@@ -200,7 +200,7 @@
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: '单据ID', hide: true }
                        , { field: '日期', title: '日期', width: 160 }
                        , { field: '日期', title: '日期', width: 160, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '单据号', title: '单据号', width: 160 }
                        , { field: '单据类型', title: '单据类型', width: 160, hide: true }
                        , { field: 'HMouldID', title: 'HMouldID', width: 200, hide: true }
@@ -208,8 +208,8 @@
                        , { field: '产品模具', title: '产品器具', width: 200, hide: true }
                        , { field: '周期单位', title: '周期单位', width: 200 }
                        , { field: '保养周期', title: '保养周期', width: 200 }
                        , { field: '计划开始日期', title: '计划开始日期', width: 200 }
                        , { field: '计划结束日期', title: '计划结束日期', width: 200 }
                        , { field: '计划开始日期', title: '计划开始日期', width: 200, templet: "<div>{{d.计划开始日期 ==null ?'':layui.util.toDateString(d.计划开始日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '计划结束日期', title: '计划结束日期', width: 200, templet: "<div>{{d.计划结束日期 ==null ?'':layui.util.toDateString(d.计划结束日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '摘要', title: '摘要', width: 200 }
                        , { field: '内部单据号', title: '内部单据号', width: 200 }
                        , { field: '备注', title: '备注', width: 200 }
@@ -225,15 +225,15 @@
                        , { field: '关闭类型', title: '关闭类型', width: 200, hide: true }
                        , { field: '表体备注', title: '表体备注', width: 200, hide: true }
                        , { field: '制单人', title: '制单人', width: 115, hide: true }
                        , { field: '制单日期', title: '制单日期', width: 200 }
                        , { field: '制单日期', title: '制单日期', width: 200, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '审核人', title: '审核人', width: 200 }
                        , { field: '审核日期', title: '审核日期', width: 200, hide: true }
                        , { field: '审核日期', title: '审核日期', width: 200, hide: true, templet: "<div>{{d.审核日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '修改人', title: '修改人', width: 200, hide: true }
                        , { field: '修改日期', title: '修改日期', width: 115, hide: true }
                        , { field: '修改日期', title: '修改日期', width: 115, hide: true, templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '关闭人', title: '关闭人', width: 200 }
                        , { field: '关闭日期', title: '关闭日期', width: 200 }
                        , { field: '关闭日期', title: '关闭日期', width: 200, templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '作废人', title: '作废人', width: 200, hide: true }
                        , { field: '作废日期', title: '作废日期', width: 115, hide: true }
                        , { field: '作废日期', title: '作废日期', width: 115, hide: true, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                        , { field: '源单单号', title: '源单单号', width: 200 }
@@ -275,7 +275,7 @@
                    shift: 2,
                    area: ['100%', '100%'],
                    maxmin: true,
                    content: '../模治具管理/Sc_Add_MouldDotCheckPlanBillList.html',
                    content: '../模治具管理/Sc_Add_MouldDotCheckPlanBillList.html?OperationType=1&linterid=&HSouceBillType=',
                    end: function () {
                        //刷新页面,
                        location.reload();
@@ -290,7 +290,7 @@
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    var linterid = data[0].hmainid.toString();
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
@@ -299,7 +299,7 @@
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../模治具管理/Sc_Add_MouldDotCheckPlanBillList.html?hID=' + hID
                        , content: '../模治具管理/Sc_Add_MouldDotCheckPlanBillList.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
                        , resize: false,
                        end: function () {
                            //刷新页面,
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_MouldMaintainPlanBillList.html
@@ -213,13 +213,13 @@
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: '单据ID', hide: true }
                        , { field: '日期', title: '日期', width: 160 }
                        , { field: '日期', title: '日期', width: 160, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '单据号', title: '单据号', width: 160 }
                        , { field: '单据类型', title: '单据类型', width: 160, hide: true }
                        , { field: '周期单位', title: '周期单位', width: 200 }
                        , { field: '保养周期', title: '保养周期', width: 200 }
                        , { field: '计划开始日期', title: '计划开始日期', width: 200 }
                        , { field: '计划结束日期', title: '计划结束日期', width: 200 }
                        , { field: '计划开始日期', title: '计划开始日期', width: 200, templet: "<div>{{d.计划开始日期 ==null ?'':layui.util.toDateString(d.计划开始日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '计划结束日期', title: '计划结束日期', width: 200, templet: "<div>{{d.计划结束日期 ==null ?'':layui.util.toDateString(d.计划结束日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '摘要', title: '摘要', width: 200 }
                        , { field: '内部单据号', title: '内部单据号', width: 200 }
                        , { field: '备注', title: '备注', width: 200 }
@@ -237,15 +237,15 @@
                        , { field: '关闭类型', title: '关闭类型', width: 200 }
                        , { field: '表体备注', title: '表体备注', width: 200, hide: true }
                        , { field: '制单人', title: '制单人', width: 115, hide: true }
                        , { field: '制单日期', title: '制单日期', width: 200 }
                        , { field: '制单日期', title: '制单日期', width: 200, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期 'yyyy-MM-dd')}}</div>"}
                        , { field: '审核人', title: '审核人', width: 200 }
                        , { field: '审核日期', title: '审核日期', width: 200, hide: true }
                        , { field: '审核日期', title: '审核日期', width: 200, hide: true, templet: "<div>{{d.审核日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '修改人', title: '修改人', width: 200, hide: true }
                        , { field: '修改日期', title: '修改日期', width: 115, hide: true }
                        , { field: '修改日期', title: '修改日期', width: 115, hide: true, templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '关闭人', title: '关闭人', width: 200 }
                        , { field: '关闭日期', title: '关闭日期', width: 200 }
                        , { field: '关闭日期', title: '关闭日期', width: 200, templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '作废人', title: '作废人', width: 200, hide: true }
                        , { field: '作废日期', title: '作废日期', width: 115, hide: true }
                        , { field: '作废日期', title: '作废日期', width: 115, hide: true, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd')}}</div>"}
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                        , { field: '源单单号', title: '源单单号', width: 200 }
WebTM/views/É豸¹ÜÀí/Sb_Add_EqpMaintenanceBillList.html
@@ -17,7 +17,7 @@
<body>
    <div id="layout1" class="layui-fluid">
        <div class="layui-row layui-col-space15">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <form id="form0" class="layui-form" lay-filter="component-form-group" action="">
@@ -564,7 +564,7 @@
                                    });
                                }
                                else {
                                    f_alert(data.Message);
                                    layui.alert("保存失败")
                                    console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
                                }
                                layer.closeAll("loading");
WebTM/views/É豸¹ÜÀí/Sb_EquipMaintainBillEdit.html
@@ -817,7 +817,7 @@
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '单位列表',
                                title: '配件列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['90%', '90%'],
WebTM/views/²É¹º¹ÜÀí/ίÍâ¶©µ¥/WW_EntrustOrderBillList.html
@@ -34,7 +34,7 @@
                                    <label class="layui-form-label">业务状态</label>
                                    <div class="layui-input-block">
                                        <select name="HStatus" lay-filter="HStatus" style="width:190px;">
                                            <option value="-1" selected="selected">全部</option>
                                            <option value="-1" selected>全部</option>
                                            <option value="1">未分配</option>
                                            <option value="2">已分配</option>
                                            <option value="3">已发布</option>
@@ -58,17 +58,52 @@
                                </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">
                                        <div class="layui-inline">
                                            <span>其他条件></span>
                                        </div>
                                    </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">
                                            <input type="text" class="layui-input" name="HBillno" id="HBillno" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">业务员</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HEmpName" id="HEmpName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">协同状态</label>
                                        <div class="layui-input-block">
                                            <select name="HXTStatus" lay-filter="HXTStatus" style="width:190px;">
                                                <option value="" selected>全部</option>
                                                <option value="未确认">未确认</option>
                                                <option value="已确认">已确认</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">反馈状态</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HXTFKStatus" id="HXTFKStatus" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料代码</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="width:190px;">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
@@ -315,13 +350,17 @@
            //加载网格
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                if (sWhere == "")
                {
                    var HBeginDate = $("#HBeginDate").val();//开始日期
                    var HEndDate = $("#HEndDate").val();//结束日期
                    if (HBeginDate) {
                        sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                    }
                    if (HEndDate) {
                        sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                    }
                    sWhere +=  " and ä¸šåŠ¡çŠ¶æ€ = '未分配' and ä¾›åº”商协同状态 ='未确认' ";
                }
                $.ajax({
                    url: GetWEBURL() + '/WW_EntrustOrderBill/list',
@@ -898,8 +937,6 @@
                    }
                });
            }
            //快速过滤
@@ -908,7 +945,12 @@
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                var HBillNo = $("#HBillNo").val(); //单据号
                var HSupID = $("#HSupID").val();       //供应商信息
                var HEmpID = $("#HEmpID").val();
                var HMaterNumber = $("#HMaterNumber").val();
                var HMaterName = $("#HMaterName").val();
                var HXTStatus = $("select[name='HXTStatus']").val();
                var HXTFKStatus = $("#HXTFKStatus").val();
                if (HStatus) {
                    switch (HStatus) {
                        case '-1':   //全部
@@ -935,8 +977,22 @@
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HSupID) {
                    sWhere += " and HSupID = '" + HSupID + "'";
                if (HMaterNumber) {
                    sWhere += " and ç‰©æ–™ä»£ç  like '%" + HMaterNumber + "%'";
                }
                if (HMaterName) {
                    sWhere += " and ç‰©æ–™åç§° like '%" + HMaterName + "%'";
                }
                if (HEmpID) {
                    sWhere += " and ä¸šåŠ¡å‘˜ like '%" + HEmpID + "%'";
                }
                if (HXTStatus) {
                    sWhere += " and ä¾›åº”商协同状态 like '%" + HXTStatus + "%'";
                }
                if (HXTFKStatus) {
                    sWhere += " and åé¦ˆçŠ¶æ€ like '%" + HXTFKStatus + "%'";
                }
                var index = layer.load(0);
                get_Display(sWhere);
@@ -949,8 +1005,9 @@
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HBillNo").val("");
                $("#HSupName").val("");
                $("#HSupID").val("");
                $("#HEmpID").val("");
                $("#HMaterNumber").val("");
                $("#HMaterName").val("");
                sWhere = "";
                get_Display(sWhere);
            }
WebTM/views/²É¹º¹ÜÀí/²É¹º¶©µ¥/Cg_POOrderBillList.html
@@ -59,24 +59,43 @@
                                <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="HBillNo" id="HBillNo" style="width:190px;">
                                            <input type="text" class="layui-input" name="HBillno" id="HBillno" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">供应商信息</label>
                                        <div class="layui-input-inline">
                                            <input type="text" name="HSupName" id="HSupName" readonly class="layui-input" value="" style="float:left;width:150px;">
                                            <input type="hidden" name="HSupID" id="HSupID" class="layui-input" value="" style="float:left;width:150px;">
                                            <button type="button" lay-submit="" class="layui-btn" lay-filter="Department" style="width:40px;">
                                                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                            </button>
                                        <label class="layui-form-label">业务员</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HEmpName" id="HEmpName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">协同状态</label>
                                        <div class="layui-input-block">
                                            <select name="HXTStatus" lay-filter="HXTStatus" style="width:190px;">
                                                <option value="" selected>全部</option>
                                                <option value="未确认">未确认</option>
                                                <option value="已确认">已确认</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">反馈状态</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HXTFKStatus" id="HXTFKStatus" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料代码</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HMaterNumber" id="HMaterNumber" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" name="HMaterName" id="HMaterName" style="width:190px;">
                                        </div>
                                    </div>
                                </div>
@@ -324,13 +343,16 @@
            //加载网格
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                if (sWhere == "") {
                    var HBeginDate = $("#HBeginDate").val();//开始日期
                    var HEndDate = $("#HEndDate").val();//结束日期
                    if (HBeginDate) {
                        sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                    }
                    if (HEndDate) {
                        sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                    }
                    sWhere += " and ä¸šåŠ¡çŠ¶æ€ = '未分配' and ä¾›åº”商协同状态 ='未确认' ";
                }
                $.ajax({
                    url: GetWEBURL() + '/Cg_POOrderBill/list',
@@ -917,7 +939,12 @@
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                var HBillNo = $("#HBillNo").val(); //单据号
                var HSupID = $("#HSupID").val();       //供应商信息
                var HEmpID = $("#HEmpID").val();
                var HMaterNumber = $("#HMaterNumber").val();
                var HMaterName = $("#HMaterName").val();
                var HXTStatus = $("select[name='HXTStatus']").val();
                var HXTFKStatus = $("#HXTFKStatus").val();
                if (HStatus) {
                    switch (HStatus) {
                        case '-1':   //全部
@@ -944,8 +971,22 @@
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HSupID) {
                    sWhere += " and HSupID = '" + HSupID + "'";
                if (HMaterNumber) {
                    sWhere += " and ç‰©æ–™ä»£ç  like '%" + HMaterNumber + "%'";
                }
                if (HMaterName) {
                    sWhere += " and ç‰©æ–™åç§° like '%" + HMaterName + "%'";
                }
                if (HEmpID) {
                    sWhere += " and ä¸šåŠ¡å‘˜ like '%" + HEmpID + "%'";
                }
                if (HXTStatus) {
                    sWhere += " and ä¾›åº”商协同状态 like '%" + HXTStatus + "%'";
                }
                if (HXTFKStatus) {
                    sWhere += " and åé¦ˆçŠ¶æ€ like '%" + HXTFKStatus + "%'";
                }
                var index = layer.load(0);
                get_Display(sWhere);
@@ -958,8 +999,9 @@
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HBillNo").val("");
                $("#HSupName").val("");
                $("#HSupID").val("");
                $("#HEmpID").val("");
                $("#HMaterNumber").val("");
                $("#HMaterName").val("");
                sWhere = "";
                get_Display(sWhere);
            }
WebTM/views/ÁìÁÏ·¢»õ/ίÍâ³ö¿â/Kf_EntrustOutBillList.html
@@ -1,14 +1,19 @@
<!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 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>
    <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 src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
@@ -28,62 +33,93 @@
                                        <span>更多</span>
                                    </div>
                                </div>
                                <!--<div class="layui-inline">
                                    <label class="layui-form-label">单据类型</label>
                                    <div class="layui-input-block">
                                        <select name="HBillType" id="HBillType">
                                            <option value="">所有</option>
                                            <option value="ZHXJ">下架找货单</option>
                                            <option value="ZHSJ">上架归还单</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">单据号</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                        <input type="text" class="layui-input" id="HBillNo" style="width:190px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">制单人</label>
                                    <label class="layui-form-label">开始日期</label>
                                    <div class="layui-input-block">
                                        <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy">
                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
                                    </div>
                                </div>-->
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                    </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">
                                <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>
                                        <label class="layui-form-label">部门名称</label>
                                        <div class="layui-input-block">
                                            <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
                                            <input type="text" class="layui-input" id="HDepartName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">结束时间</label>
                                        <label class="layui-form-label">物料代码</label>
                                        <div class="layui-input-block">
                                            <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
                                            <input type="text" class="layui-input" id="HMaterNumber" style="width:190px;">
                                        </div>
                                    </div>
                                </div>-->
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HMaterName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">规格型号</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HMaterModel" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">源单单号</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HSourceBillNo" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">调入仓库</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HStockIn" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">调出仓库</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HStocOut" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">制单人</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HMakerMan" style="width:190px;">
                                        </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-Add"><i class="layui-icon layui-icon-file-b"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>删除</button>
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>预览</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>打印</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit"><i class="layui-icon layui-icon-repeat"></i>审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit"><i class="layui-icon layui-icon-refresh"></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-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>确认</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>驳回</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>详情</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>生成送货单</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>退出</button>
                            </div>
@@ -93,10 +129,6 @@
            </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/' //静态资源所在路径
@@ -113,189 +145,585 @@
                , laydate = layui.laydate
                , util = layui.util
            //查询条件
            var sWhere = "";
            var sWhere = " where 1 = 1 ";
            var option = [];
            var Name = "MouldProdInHouseCellWidth";
            var option = {
                elem: '#mainTable'
                //, toolbar: '#toolbarDemo'
                , height: 'full-50'
                , page: true
                , cellMinWidth: 90
                , cols: [[
                    { field: 'hmainid', title: '单据ID', hide: true }
                    , { field: '日期', title: '日期', width: 160 }
            //#region è¿›å…¥é¡µé¢æ—¢åŠ è½½
            //初始化表格
            set_InitGrid();
            //加载数据到网格
            get_Display(sWhere);
            //#endregion
            //#region ç‚¹å‡»äº‹ä»¶åŒ…括on form事件等
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //新增按钮
                    case 'btn-Add': set_AddNew();
                        break;
                    //编辑按钮
                    case 'btn-Edit': set_ShowBill();
                        break;
                    //删除按钮
                    case 'btn-Delete': set_DeleteBill();
                        break;
                    //浏览
                    case 'btn-view': get_ViewReport();
                        break;
                    //打印
                    case 'btn-print': get_PrintReport();
                        break;
                    //刷新
                    case 'get_Refresh': set_Refresh();
                        break;
                    //退出
                    case 'get_Exit': Pub_Close(2);
                        break;
                    //分配
                    case 'btn-fp': set_Distribut();
                        break;
                    //发布
                    case 'btn-fb': set_Release();
                        break;
                    //优先级
                    case 'btn-yxj': set_Yxj();
                        break;
                    case 'btn-back': set_Back();
                        break;
                };
            });
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery(table, option);
            });
            //初始化表格
            function set_InitGrid() {
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                var columns = [
                    { type: 'checkbox', fixed: 'left', totalRowText: '合计' }
                    , { field: 'hmainid', title: '单据ID', hide: true }
                    , { field: '日期', title: '日期', width: 120, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '单据号', title: '单据号', width: 160 }
                    , { field: 'hsupid', title: 'hsupid', width: 160, hide: true }
                    , { field: '加工单位代码', title: '加工单位代码', width: 200 }
                    , { field: '加工单位', title: '加工单位', width: 200 }
                    , { field: 'HEmpID', title: 'HEmpID', width: 200, hide: true }
                    , { field: '业务员代码', title: '业务员代码', width: 200 }
                    , { field: '业务员', title: '业务员', width: 200 }
                    , { field: 'hmanagerid', title: 'hmanagerid', width: 200, width: 200, hide: true  }
                    , { field: '加工单位代码', title: '加工单位代码', width: 150 }
                    , { field: '加工单位', title: '加工单位', width: 150 }
                    , { field: 'HEmpID', title: 'HEmpID', width: 150, hide: true }
                    , { field: '业务员代码', title: '业务员代码', width: 150 }
                    , { field: '业务员', title: '业务员', width: 150 }
                    , { field: 'hmanagerid', title: 'hmanagerid', width: 150, hide: true }
                    , { field: '主管代码', title: '主管代码', width: 160 }
                    , { field: '主管', title: '主管', width: 160}
                    , { field: '主管', title: '主管', width: 160 }
                    , { field: 'hsecmanagerid', title: 'hsecmanagerid', width: 160, hide: true }
                    , { field: '验收员代码', title: '验收员代码', width: 200 }
                    , { field: '验收员', title: '验收员', width: 200 }
                    , { field: 'hkeeperid', title: 'hkeeperid', width: 200, hide: true }
                    , { field: '保管员代码', title: '保管员代码', width: 200 }
                    , { field: '保管员', title: '保管员', width: 200 }
                    , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
                    , { field: '部门代码', title: '部门代码', width: 200 }
                    , { field: '验收员代码', title: '验收员代码', width: 150 }
                    , { field: '验收员', title: '验收员', width: 150 }
                    , { field: 'hkeeperid', title: 'hkeeperid', width: 150, hide: true }
                    , { field: '保管员代码', title: '保管员代码', width: 150 }
                    , { field: '保管员', title: '保管员', width: 150 }
                    , { field: 'HDeptID', title: 'HDeptID', width: 150, hide: true }
                    , { field: '部门代码', title: '部门代码', width: 150 }
                    , { field: '部门', title: '部门', width: 115 }
                    , { field: '摘要', title: '摘要', width: 115 }
                    , { field: '表头备注', title: '表头备注', width: 200 }
                    , { field: '内部单据号', title: '内部单据号', width: 200 }
                    , { field: '表头备注', title: '表头备注', width: 150 }
                    , { field: '内部单据号', title: '内部单据号', width: 150 }
                    , { field: '红蓝单标记', title: '红蓝单标记', width: 115 }
                    , { field: '制单人', title: '制单人', width: 200 }
                    , { field: '制单日期', title: '制单日期', width: 200 }
                    , { field: '审核人', title: '审核人', width: 200 }
                    , { field: '审核日期', title: '审核日期', width: 200 }
                    , { field: '修改人', title: '修改人', width: 115 }
                    , { field: '修改日期', title: '修改日期', width: 200  }
                    , { field: '关闭人', title: '关闭人', width: 200 }
                    , { field: '关闭日期', title: '关闭日期', width: 200 }
                    , { field: '作废人', title: '作废人', width: 115 }
                    , { field: '作废日期', title: '作废日期', width: 200 }
                    , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                    , { field: 'hmaterid', title: 'hmaterid', width: 200, hide: true }
                    , { field: '物料代码', title: '物料代码', width: 200 }
                    , { field: '物料名称', title: '物料名称', width: 200 }
                    , { field: '规格型号', title: '规格型号', width: 200 }
                    , { field: '附加属性', title: '附加属性', width: 115 }
                    , { field: '颜色', title: '颜色', width: 200 }
                    , { field: 'hunitid', title: 'hunitid', width: 200, hide: true }
                    , { field: '计量单位代码', title: '计量单位代码', width: 200 }
                    , { field: '计量单位', title: '计量单位', width: 115 }
                    , { field: '应发数量', title: '应发数量', width: 115 }
                    , { field: '实发数量', title: '实发数量', width: 200 }
                    , { field: '单价', title: '单价', width: 200 }
                    , { field: '金额', title: '金额', width: 200 }
                    , { field: 'hwhid', title: 'hwhid', width: 115, hide: true }
                    , { field: '发货仓库代码', title: '发货仓库代码', width: 115 }
                    , { field: '发货仓库', title: '发货仓库', width: 115 }
                    , { field: '行关闭人', title: '行关闭人', width: 200 }
                    , { field: '关闭类型', title: '关闭类型', width: 200 }
                    , { field: '表体备注', title: '表体备注', width: 200 }
                    , { field: '源单主内码', title: '源单主内码', width: 115 }
                    , { field: '源单子内码', title: '源单子内码', width: 115 }
                    , { field: '源单单号', title: '源单单号', width: 115 }
                    , { field: '源单类型', title: '源单类型', width: 200, hide: true }
                    , { field: '采购订单主内码', title: '采购订单主内码', width: 200, hide: true }
                    , { field: '采购订单子内码', title: '采购订单子内码', width: 200 }
                    , { field: '采购订单号', title: '采购订单号', width: 115 }
                    , { field: '销售订单主内码', title: '销售订单主内码', width: 200, hide: true }
                    , { field: '销售订单子内码', title: '销售订单子内码', width: 200, hide: true }
                    , { field: '销售订单号', title: '销售订单号', width: 115 }
                    , { field: '关联数量', title: '关联数量', width: 200 }
                    , { field: 'HBillType', title: 'HBillType', width: 200, hide: true }
                ]]
            };
                    , { field: 'hsubid', title: 'hsubid', width: 115, hide: true }
                    , { field: 'hmaterid', title: 'hmaterid', width: 150, hide: true }
                    , { field: '物料代码', title: '物料代码', width: 150 }
                    , { field: '物料名称', title: '物料名称', width: 150 }
                    , { field: '规格型号', title: '规格型号', width: 150 }
                    , { field: '附加属性', title: '附加属性', width: 150 }
                    , { field: '颜色', title: '颜色', width: 150 }
                    , { field: 'hunitid', title: 'hunitid', width: 150, hide: true }
                    , { field: '计量单位代码', title: '计量单位代码', width: 150 }
                    , { field: '计量单位', title: '计量单位', width: 150 }
                    , { field: '应发数量', title: '应发数量', width: 150 }
                    , { field: '实发数量', title: '实发数量', width: 150 }
                    , { field: '单价', title: '单价', width: 150 }
                    , { field: '金额', title: '金额', width: 150 }
                    , { field: 'hwhid', title: 'hwhid', width: 150, hide: true }
                    , { field: '发货仓库代码', title: '发货仓库代码', width: 150 }
                    , { field: '发货仓库', title: '发货仓库', width: 150 }
                    , { field: '行关闭人', title: '行关闭人', width: 150 }
                    , { field: '关闭类型', title: '关闭类型', width: 150 }
                    , { field: '表体备注', title: '表体备注', width: 150 }
                    , { field: '源单主内码', title: '源单主内码', width: 150, hide: true }
                    , { field: '源单子内码', title: '源单子内码', width: 150 }
                    , { field: '源单单号', title: '源单单号', width: 150 }
                    , { field: '源单类型', title: '源单类型', width: 150 }
                    , { field: '采购订单主ID', title: '采购订单主ID', width: 150, hide: true }
                    , { field: '采购订单子ID', title: '采购订单子ID', width: 150, hide: true }
                    , { field: '采购订单号', title: '采购订单号', width: 150 }
                    , { field: '销售订单主ID', title: '销售订单主ID', width: 150, hide: true }
                    , { field: '销售订单子ID', title: '销售订单子ID', width: 150, hide: true }
                    , { field: '销售订单号', title: '销售订单号', width: 150 }
                    , { field: '关联数量', title: '关联数量', width: 150 }
                    , { field: 'HBillType', title: 'HBillType', width: 150, hide: true }
                    , { field: '制单人', title: '制单人', width: 150 }
                    , { field: '制单日期', title: '制单日期', width: 120, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '审核人', title: '审核人', width: 100 }
                    , { field: '审核日期', title: '审核日期', width: 120, templet: "<div>{{d.审核日期 ==null ?'':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '修改人', title: '修改人', width: 100 }
                    , { field: '修改日期', title: '修改日期', width: 120, templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '关闭人', title: '关闭人', width: 100 }
                    , { field: '关闭日期', title: '关闭日期', width: 120, templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '作废人', title: '作废人', width: 100 }
                    , { field: '作废日期', title: '作废日期', width: 120, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd')}}</div>" }
            var index = layer.load(0);
            //进入页面显示的缓存列表
            $.ajax({
                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                url: GetWEBURL() + '/Kf_EntrustOutBill/GetEntrustOutBill',
                type: "GET",
                data: { "sWhere": sWhere},
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
                        table.render(option);
                        layer.close(index);
                    } else {
                        layer.close(index);
                        layer.alert(data1.code + data1.Message, { icon: 5 });
                ];
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , page: true
                    , cellMinWidth: 120
                    , totalRow: true
                    , limit: 10
                    , height: 'full-50'
                    , cols: [columns]
                    , limits: [50, 500, 1000, 5000]
                    , done: function (res, curr, count) {
                    }
                }, error: function () {
                    layer.close(index);
                    layer.alert("接口请求失败!", { icon: 5 });
                };
            }
            //加载网格
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                }
            });
            //重置按钮
            //form.on('submit(btnReSearch)', function (data) {
            //    $("#HBillType").val("");//单据类型
            //    $("#HBillNo").val("");//单据号
            //    $("#HSourceBillNo").val("");//源单号
            //    $("#HCreateBy").val("");//制单人
            //    $("#BenginHCreateDate").val("");//开始制单时间
            //    $("#EndHCreateDate").val("");//结束制单时间
            //    $("#btnSearch").click();
            //});
            //查询按钮
            form.on('submit(btnSearch)', function (data) {//选择仓位
                //var HBillType = $("#HBillType").val();//单据类型
                //var HBillNo = $("#HBillNo").val();//单据号
                //var HCreateBy = $("#HCreateBy").val();//制单人
                //var BenginHCreateDate = $("#BenginHCreateDate").val();//开始制单时间
                //var EndHCreateDate = $("#EndHCreateDate").val();//结束制单时间
                //if (HBillNo) {
                //    sWhere += " and HBillNo like '%" + HBillNo + "%'";
                //}
                //if (HCreateBy) {
                //    sWhere += " and HCreateBy like '%" + HCreateBy + "%'";
                //}
                //if (BenginHCreateDate) {
                //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'";
                //}
                //if (EndHCreateDate) {
                //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'";
                //}
                var index = layer.load(0);
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                }
                $.ajax({
                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                    url: GetWEBURL1() + '/Kf_EntrustOutBill/GetEntrustOutBill',
                    url: GetWEBURL() + '/Kf_EntrustOutBackBill/GetEntrustOutBackBillList',
                    type: "GET",
                    data: { "sWhere": sWhere},
                    data: { "sWhere": sWhere },
                    success: function (data1) {
                        if (data1.count == 1) {
                            DataList = data1.data;
                            option.data = data1.data;
                            table.render(option);
                            layer.close(index);
                            layer.alert("查询成功", { icon: 1 });
                            layer.close(wait);
                        } else {
                            layer.close(index);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                            layer.close(wait);
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(index);
                        layer.alert("接口失效!", { icon: 5 });
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //新增
            function set_AddNew() {
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '新增生产退料单',
                    closeBtn: 1,
                    shift: 2,
                    area: ['100%', '100%'],
                    maxmin: true,
                    content: '../领料出库/Kf_MateOutBackBillLEdit.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1',
                    end: function () {
                        //刷新页面,
                        get_FastQuery(table, option);
                    },
                    success: function (layero, index) {
                    }
                });
            }
            //编辑单据
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].hmainid.toString();
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '编辑生产退料单'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../领料出库/Kf_MateOutBackBillLEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                        , resize: false,
                        end: function () {
                            get_FastQuery(table, option);
                        }
                        , cancel: function () {
                            //$(".layui-btn").removeClass("layui-btn-disabled");
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //删除
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑删除方法
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        var wait = layer.load();
                        $.ajax({
                            type: "GET",
                            url: GetWEBURL() + "/Kf_MateOutBackBill/set_DeleteBill", //方法所在页面和方法名
                            data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
                            success: function (result) {
                                if (result.count == 1) {
                                    layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                        // å¾—到frame索引
                                        var index = layer.getFrameIndex(window.name);
                                        //关闭当前frame
                                        layer.close(index);
                                        //修改为功后刷新界面
                                        window.location.reload();
                                    });
                                } else {
                                    layer.alert(result.code + result.Message, { icon: 5 });
                                }
                                layer.close(wait);
                            }, error: function () {
                                layer.close(wait);
                                layer.alert("接口请求失败!", { icon: 5 });
                            }
                        });
                    })
                }
                else {
                    layer.msg('请选择一行数据删除!');
                }
            }
            //预览
            function get_ViewReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdInBill', 'yes']
                        , resize: false
                    })
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //打印
            function get_PrintReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdInBill', 'yes']
                        , resize: false
                    })
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //审核
            function set_CheckBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    var wait = layer.load();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_MouldProdInBill/set_CheckBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    get_FastQuery(table, option);
                                });
                            } else {
                                layer.alert(result.Message, { icon: 5 });
                            }
                            layer.close(wait);
                        }, error: function () {
                            layer.close(wait);
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //反审核
            function set_AbandonCheck() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    var wait = layer.load();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_MouldProdInBill/set_AbandonCheck", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    get_FastQuery(table, option);
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                            layer.close(wait);
                        }, error: function () {
                            layer.close(wait);
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据反审核!');
                }
            }
            //获取列宽
            function getColumnsWidth() {
                var result = [];
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                //获取列宽
                $.ajax({
                    url: GetWEBURL() + '/Cg_POOrderBill/list',
                    async: false,
                    type: "Get",
                    dataType: "json",
                    data: { "colNum": colNum, "Name": Name },
                    success: function (data1) {
                        if (data1.code == 1) {
                            result = data1.data;
                        }
                        else if (data1.code == -1) {
                        }
                        else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                return result;
            }
            //保存列宽
            function set_SaveGridColWidth() {
                var arr = [];
                // åˆ—æ•°
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                for (var i = 0; i <= colNum; i++) {
                    var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
                    var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width();
                    if (colName != "" && colName != null) {
                        arr.push(colWidth == -1 ? 200 : colWidth);
                    }
                }
                arr.unshift(40); //首位追加
                $.ajax({
                    url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
                    async: false,
                    type: "POST",
                    dataType: "json",
                    data: { "myMap": JSON.stringify(arr), "Name": Name },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.alert(data1.Message, { icon: 1 });
                        } else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                //设置赋值列宽
                var colWidth = getColumnsWidth();
                if (colWidth == "" || colWidth == []) {
                }
                else {
                    $.each(columns, function (x, m) {
                        m["width"] = colWidth[x];
                    });
                }
                get_FastQuery(table, option);
            }
            //默认列宽
            function set_DefaultGridColWidth() {
                var arr = [];
                // åˆ—æ•°
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                for (var i = 0; i <= colNum; i++) {
                    var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
                    if (colName != "" && colName != null) {
                        arr.push(200);   //默认宽度200
                    }
                }
                arr.unshift(40); //首位追加
                $.ajax({
                    url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
                    async: false,
                    type: "POST",
                    dataType: "json",
                    data: { "myMap": JSON.stringify(arr), "Name": Name },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.alert(data1.Message, { icon: 1 });
                        } else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                //设置赋值列宽
                var colWidth = getColumnsWidth();
                if (colWidth == "" || colWidth == []) {
                }
                else {
                    $.each(columns, function (x, m) {
                        m["width"] = colWidth[x];
                    });
                }
                get_FastQuery(table, option);
            }
            //快速过滤
            function get_FastQuery(table, option) {
                var HStatus = $("select[name='HStatus']").val();//状态
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                var HBillNo = $("#HBillNo").val(); //单据号
                var HDepartName = $("#HDepartName").val();
                var HMaterNumber = $("#HMaterNumber").val();
                var HMaterName = $("#HMaterName").val();
                var HMaterModel = $("#HMaterModel").val();
                var HSourceBillNo = $("#HSourceBillNo").val();
                var HStockIn = $("#HStockIn").val();
                var HStocOut = $("#HStocOut").val();
                var HMakerMan = $("#HMakerMan").val();
                //if (HStatus) {
                //    switch (HStatus) {
                //        case '-1':   //全部
                //            sWhere += "";
                //            break;
                //        case '1':    //未分配
                //            sWhere += " and ä¸šåŠ¡çŠ¶æ€='未分配'";
                //            break;
                //        case '2':    //已审核
                //            sWhere += " and ä¸šåŠ¡çŠ¶æ€='已分配'";
                //            break;
                //        case '3':    //已关闭
                //            sWhere += " and ä¸šåŠ¡çŠ¶æ€='已发布'";
                //        default:
                //    }
                //}
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                }
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HDepartName) {
                    sWhere += " and éƒ¨é—¨ like '%" + HDepartName + "%'";
                }
                if (HMaterNumber) {
                    sWhere += " and ç‰©æ–™ä»£ç  like '%" + HMaterNumber + "%'";
                }
                if (HMaterName) {
                    sWhere += " and ç‰©æ–™åç§° like '%" + HMaterName + "%'";
                }
                if (HMaterModel) {
                    sWhere += " and è§„格型号 like '%" + HMaterModel + "%'";
                }
                if (HSourceBillNo) {
                    sWhere += " and æºå•单号 like '%" + HSourceBillNo + "%'";
                }
                if (HStockIn) {
                    //sWhere += " and éƒ¨é—¨ like '%" + HStockIn + "%'";
                }
                if (HStocOut) {
                    //sWhere += " and éƒ¨é—¨ like '%" + HStocOut + "%'";
                }
                if (HMakerMan) {
                    sWhere += " and åˆ¶å•人 like '%" + HMakerMan + "%'";
                }
                var index = layer.load(0);
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";
                //$("#HBillType").val("");//单据类型
                //$("#HBillNo").val("");//单据号
                //$("#HSourceBillNo").val("");//源单号
                //$("#HCreateBy").val("");//制单人
                //$("#BenginHCreateDate").val("");//开始制单时间
                //$("#EndHCreateDate").val("");//结束制单时间
            });
            //监听行双击事件
            table.on('rowDouble(mainTable)', function (obj) {
                layer.alert("双击事件", { icon: 1 });
            });
            //laydate.render({
            //    elem: '#HDate'
            //    , type: 'datetime'
            //    , trigger: 'click'
            //    , format:'yyyy-MM-dd HH:mm'
            //});
            //以上是layui模块
                sWhere = " where 1 = 1 ";
            }
            //重置过滤条件
            function set_ClearQuery() {
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HBillNo").val("");
                $("#HDepartName").val("");
                $("#HMaterNumber").val("");
                $("#HMaterName").val("");
                $("#HMaterModel").val("");
                $("#HSourceBillNo").val("");
                $("#HStockIn").val("");
                $("#HStocOut").val("");
                $("#HMakerMan").val("");
                sWhere = " where 1 = 1 ";
                get_Display(sWhere);
            }
            //刷新
            function set_Refresh() {
                $("#btnSearch").click();
            }
        });
    </script>
</body>
</html>
WebTM/views/ÁìÁÏ·¢»õ/ÁìÁϳö¿â/Kf_MateOutBackBillList.html
@@ -145,7 +145,7 @@
                , laydate = layui.laydate
                , util = layui.util
            //查询条件
            var sWhere = "";
            var sWhere = " where 1 = 1 ";
            var option = [];
            var Name = "MouldProdInHouseCellWidth";
@@ -675,7 +675,7 @@
                var index = layer.load(0);
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";
                sWhere = " where 1 = 1 ";
            }
            //重置过滤条件
            function set_ClearQuery() {
@@ -690,7 +690,7 @@
                $("#HStockIn").val("");
                $("#HStocOut").val("");
                $("#HMakerMan").val("");
                sWhere = "";
                sWhere = " where 1 = 1 ";
                get_Display(sWhere);
            }
            //刷新
WebTM/views/ÁìÁÏ·¢»õ/ÁìÁϳö¿â/Kf_MateOutBillList.html
@@ -145,7 +145,7 @@
                , laydate = layui.laydate
                , util = layui.util
            //查询条件
            var sWhere = "";
            var sWhere = " where 1 = 1 ";
            var option = [];
            var Name = "MouldProdInHouseCellWidth";
@@ -675,7 +675,7 @@
                var index = layer.load(0);
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";
                sWhere = " where 1 = 1 ";
            }
            //重置过滤条件
            function set_ClearQuery() {
@@ -690,7 +690,7 @@
                $("#HStockIn").val("");
                $("#HStocOut").val("");
                $("#HMakerMan").val("");
                sWhere = "";
                sWhere = " where 1 = 1 ";
                get_Display(sWhere);
            }
            //刷新
WebTM/views/ÑéÊÕÈë¿â/Í⹺Èë¿â/Kf_POStockInBackBillList.html
@@ -1,262 +1,718 @@
<!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 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">
</head>
<body>
    <div class="layui-fluid">
        <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-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs3">
                                <label class="layui-form-label" style="width:60px;padding-left:0px;">条码</label>
                            </div>
                            <div class="layui-col-xs7">
                                <input type="text" name="HBarCode" id="HBarCode" lay-verify="HBarCode" autocomplete="off"  class="layui-input">
                            </div>
                         </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-row">
                            <div class="layui-col-xs3">
                                <label class="layui-form-label" style="width:60px;padding-left:0px;">数量</label>
                            </div>
                            <div class="layui-col-xs7">
                                <input type="text" name="HQty" id="HQty" lay-verify="HQty" autocomplete="off" class="layui-input">
                            </div>
                            </div>
                    </div>-->
                    <div class="layui-tab" lay-filter="tab-POStockInBillList">
                        <ul class="layui-tab-title" lay-filter="tab-all">
                            <li lay-id="1">单据列表</li>
                            <li lay-id="2">源单生单</li>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item  layui-show">
                                <div class="layui-row">
                                    <div class="layui-col-xs12">
                                        <table class="layui-hide" id="dj-table" lay-filter="dj-table"></table>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-row">
                                    <div class="layui-col-xs12">
                                        <table class="layui-hide" id="yd-table" lay-filter="yd-table"></table>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item" style="margin-bottom: 20px;">
                            <div class="layui-row">
                                <div class="layui-col-xs2">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdModify">编辑</button>
                                </div>
                                <div class="layui-col-xs2">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdDelete">删除</button>
                                </div>
                                <div class="layui-col-xs2">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdRefresh">刷新</button>
                                </div>
                                <div class="layui-col-xs2">
                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="cmdCancel">退出</button>
                                </div>
                                <div class="layui-col-xs2">
                                    <!--<button type="button" lay-submit="" class="layui-btn" lay-filter="cmdAdd">新增</button>-->
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </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 src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
        }
    </style>
</head>
<body>
    <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="text" class="layui-input" id="HBillNo" style="width:190px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">开始日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HBeginDate" style="width:190px;">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label">结束日期</label>
                                    <div class="layui-input-block">
                                        <input type="date" class="layui-input" id="HEndDate" style="width:190px;">
                                    </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">
                                        <label class="layui-form-label">部门名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HDepartName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料代码</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HMaterNumber" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">物料名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HMaterName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">规格型号</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HMaterModel" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">源单单号</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HSourceBillNo" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">供应商名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HSupplyName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">采购订单号</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HPurNo" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">仓库名称</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HStockName" style="width:190px;">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">制单人</label>
                                        <div class="layui-input-block">
                                            <input type="text" class="layui-input" id="HMakerMan" style="width:190px;">
                                        </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-Add"><i class="layui-icon layui-icon-file-b"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>删除</button>
                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></i>预览</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-print"><i class="layui-icon layui-icon-print"></i>打印</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-audit"><i class="layui-icon layui-icon-repeat"></i>审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Faudit"><i class="layui-icon layui-icon-refresh"></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-exit"><i class="layui-icon layui-icon-return"></i>退出</button>
                            </div>
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <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
        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
                , util = layui.util
            //查询条件
            var sWhere = " where 1 = 1 ";
            var option = [];
            var Name = "MouldProdInHouseCellWidth";
        //动态加载源单类型列表 new
            //#region è¿›å…¥é¡µé¢æ—¢åŠ è½½
            //初始化表格
            set_InitGrid();
            //加载数据到网格
            get_Display(sWhere);
            //#endregion
            //#region ç‚¹å‡»äº‹ä»¶åŒ…括on form事件等
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //新增按钮
                    case 'btn-Add': set_AddNew();
                        break;
                    //编辑按钮
                    case 'btn-Edit': set_ShowBill();
                        break;
                    //删除按钮
                    case 'btn-Delete': set_DeleteBill();
                        break;
                    //浏览
                    case 'btn-view': get_ViewReport();
                        break;
                    //打印
                    case 'btn-print': get_PrintReport();
                        break;
                    //刷新
                    case 'get_Refresh': set_Refresh();
                        break;
        //加载源单类型
        //读取单据列表
        //
        form.on('submit(Cancel)', function () {
            parent.location.href = "../../../views/index.html"
            //window.close();//关闭当前页
        })
        form.on('submit(cmdModify)', function () {
            var checkStatus = table.checkStatus('dj-table')
                     , data = checkStatus.data;
            //ajaxLabelData = data;
            //layer.alert(rows);
            layer.open({
                type: 2
                , area: ['100%', '100%']
                , title: '外购入库单红字'
                , shade: 0.6 //遮罩透明度
                , maxmin: false //允许全屏最小化
                , anim: 0 //0-6的动画形式,-1不开启
                , content: ['../../验收入库/外购入库/Kf_POStockInBackBill.html?linterid=' + data[0].HInterID, 'yes']
                , resize: false
                , cancel: function () {
                    $(".layui-btn").removeClass("layui-btn-disabled");
                }
            })
        });
        form.on('submit(cmdRefresh)', function () {//
            var sBillType = '1239'
            table.render({
                elem: '#dj-table'
                    ,url: GetWEBURL() + '/Web/DisBillEntryList_Mate_Webs_Json'
                    ,toolbar: '#toolbarDemo'
                    , where: { HBillType: sBillType,sWhere:''}
                    , cols: [[
                          { type: 'radio' }
                        , { field: 'HInterID', title: '单据内码', width: 80 }
                        , { field: 'HBillNo', title: '单据号', width: 80 }
                        , { field: 'HMaker', title: '制单人', width: 100 }
                        , { field: 'HMakeDate', title: '制单日期', width: 100 }
                        , { field: 'HQty', title: '数量', width: 100 }
                        , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                        , { field: 'HRedBlueFlag', title: '红蓝字', width: 100 }
                        , { field: 'HSourceBillType', title: '源单类型', width: 100 }
                    ]]
                      , height: 500
                      , done: function () {
                          layer.closeAll("loading");
                      }
                    //退出
                    case 'get_Exit': Pub_Close(2);
                        break;
                    //分配
                    case 'btn-fp': set_Distribut();
                        break;
                    //发布
                    case 'btn-fb': set_Release();
                        break;
                    //优先级
                    case 'btn-yxj': set_Yxj();
                        break;
                    case 'btn-back': set_Back();
                        break;
                };
            });
        });
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //查询按钮
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery(table, option);
            });
            //初始化表格
            function set_InitGrid() {
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                var columns = [
                    { type: 'checkbox', fixed: 'left', totalRowText: '合计' }
                    , { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
                    , { field: '日期', title: '日期', templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '单据号', title: '单据号', width: 160 }
                    , { field: 'hsupid', title: 'hsupid', width: 160, hide: true }
                    , { field: '供应商', title: '供应商', width: 200 }
                    , { field: 'hsecmanagerid', title: 'hsecmanagerid', width: 200, hide: true }
                    , { field: '验收员', title: '验收员', width: 200 }
                    , { field: 'hkeeperid', title: 'hkeeperid', width: 200, hide: true }
                    , { field: '保管员', title: '保管员', width: 200 }
                    , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
                    , { field: '部门', title: '部门', width: 160 }
                    , { field: '表头备注', title: '表头备注', width: 160 }
                    , { field: 'hsubid', title: 'hsubid', width: 160, hide: true }
                    , { field: 'hmaterid', title: 'hmaterid', width: 200, hide: true }
                    , { field: '物料代码', title: '物料代码', width: 200 }
                    , { field: '物料名称', title: '物料名称', width: 200 }
                    , { field: '规格型号', title: '规格型号', width: 200 }
                    , { field: 'hunitid', title: 'hunitid', width: 200, hide: true }
                    , { field: '计量单位代码', title: '计量单位代码', width: 200 }
                    , { field: '计量单位', title: '计量单位', width: 200 }
                    , { field: '数量', title: '数量', width: 115 }
                    , { field: '单价', title: '单价', width: 115 }
                    , { field: '金额', title: '金额', width: 200 }
                    , { field: 'hwhid', title: 'hwhid', width: 200, hide: true }
                    , { field: '收料仓库代码', title: '收料仓库代码', width: 115 }
                    , { field: '收料仓库', title: '收料仓库', width: 200 }
                    , { field: '表体备注', title: '表体备注', width: 200 }
                    , { field: '源单单号', title: '源单单号', width: 200 }
                    , { field: '采购订单号', title: '采购订单号', width: 200 }
                    , { field: '销售订单号', title: '销售订单号', width: 115 }
                    , { field: '制单人', title: '制单人', width: 125 }
                    , { field: '制单日期', title: '制单日期', width: 200, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '审核人', title: '审核人', width: 125 }
                    , { field: '审核日期', title: '审核日期', width: 200, templet: "<div>{{d.审核日期 ==null ? '':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '修改人', title: '修改人', width: 125 }
                    , { field: '修改日期', title: '修改日期', width: 200, templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '关闭人', title: '关闭人', width: 125 }
                    , { field: '关闭日期', title: '关闭日期', width: 200, templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '作废人', title: '作废人', width: 125 }
                    , { field: '作废日期', title: '作废日期', width: 200, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                ];
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , page: true
                    , cellMinWidth: 120
                    , totalRow: true
                    , limit: 10
                    , height: 'full-50'
                    , cols: [columns]
                    , limits: [50, 500, 1000, 5000]
                    , done: function (res, curr, count) {
                    }
                };
            }
            //加载网格
            function get_Display(sWhere) {
                var wait = layer.load();//遮罩
                //var HBeginDate = $("#HBeginDate").val();//开始日期
                //var HEndDate = $("#HEndDate").val();//结束日期
                //if (HBeginDate) {
                //    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                //}
                //if (HEndDate) {
                //    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                //}
                $.ajax({
                    url: GetWEBURL() + '/Kf_POStockInBackBill/Get_POStockInBackBillList',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    success: function (data1) {
                        if (data1.count == 1) {
                            DataList = data1.data;
                            option.data = data1.data;
                            table.render(option);
                            layer.close(wait);
                        } else {
                            layer.close(wait);
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(wait);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //新增
            function set_AddNew() {
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '新增生产退料单',
                    closeBtn: 1,
                    shift: 2,
                    area: ['100%', '100%'],
                    maxmin: true,
                    content: '../领料出库/Kf_POStockInBackBillEdit.html?OperationType=1&linterid=&HSouceBillType=0&closeType=1',
                    end: function () {
                        //刷新页面,
                        get_FastQuery(table, option);
                    },
                    success: function (layero, index) {
        form.on('submit(cmdDelete)', function () {//删除
            var checkStatus = table.checkStatus('dj-table')
            , data = checkStatus.data;
            // console.log(data);
           // var sInterID = $('#HInterID').val()
            var sInterID = data[0].HInterID
            //var sMaterID = data[0].HMaterID
            //var sBillType = $('#HBillType').val()
            //var sAuxPropID = data[0].HAuxPropID
            ////var sMTONo = data[0].HMTONo
            //var sMTONo = 0
            //var sSourceInterID = data[0].HSourceInterID
            //var sSourceEntryID = data[0].HSourceEntryID
            $.ajax(
               {
                   type: "Get",
                   url: GetWEBURL() + "/Web/Delete_Json",
                   async: true,
                   data: { "sHInterID": sInterID },
                   dataType: "json",
                   success: function (data) {
                       if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                           //layer.msg(data.Message, { icon: 1 });
                           table.render({
                               elem: '#dj-table'
                               //, url: 'http://61.130.49.162:9090/WMSAPI///POStockInBill/DisBillEntryList_Mate_Webs_Json'
                               //, url: GetWEBURL() + '/POStockInBill/DisBillEntryList_Mate_Webs_Json'
                               , url: GetWEBURL() + '/POStockInBillList/DisBillEntryList_Mate_Webs_Json'
                               , cellMinWidth: 80
                               , toolbar: '#toolbarDemo'
                               , where: { HBillType: '1239', sWhere: '' }
                               , cols: [[
                                   { type: 'radio' }
                                , { field: 'HInterID', title: '单据内码', width: 80 }
                                , { field: 'HBillNo', title: '单据号', width: 80 }
                                , { field: 'HMaker', title: '制单人', width: 100 }
                                , { field: 'HMakeDate', title: '制单日期', width: 100 }
                                , { field: 'HQty', title: '数量', width: 100 }
                                , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                                , { field: 'HRedBlueFlag', title: '红蓝字', width: 100 }
                                , { field: 'HSourceBillType', title: '源单类型', width: 100 }
                               ]]
                         , height: 500
                           })
                       }
                       else {
                           layer.msg(data.Message, { icon: 2 });
                       }
                   },
                   error: function (err) {
                       layer.msg('错误' + err, {
                           icon: 5,
                           time: 20000
                       }, function () {
                           //do something
                       });
                   }
               });
                    }
                });
            }
            //编辑单据
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].hmainid.toString();
                    //if (AllowLoadData(sSubStr) != false) {//非空验证
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '编辑生产退料单'
                        , closeBtn: 1
                        , shade: 0.6 //遮罩透明度
                        , maxmin: true //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: '../领料出库/Kf_POStockInBackBillEdit.html?OperationType=3&linterid=' + linterid + '&HSouceBillType=0&closeType=1'
                        , resize: false,
                        end: function () {
                            get_FastQuery(table, option);
                        }
                        , cancel: function () {
                            //$(".layui-btn").removeClass("layui-btn-disabled");
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //删除
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑删除方法
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        var wait = layer.load();
                        $.ajax({
                            type: "GET",
                            url: GetWEBURL() + "/Kf_POStockInBackBill/set_DeleteBill", //方法所在页面和方法名
                            data: { "HInterID": InterID, "user": sessionStorage["HUserName"] },
                            success: function (result) {
                                if (result.count == 1) {
                                    layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                        // å¾—到frame索引
                                        var index = layer.getFrameIndex(window.name);
                                        //关闭当前frame
                                        layer.close(index);
                                        //修改为功后刷新界面
                                        window.location.reload();
                                    });
                                } else {
                                    layer.alert(result.code + result.Message, { icon: 5 });
                                }
                                layer.close(wait);
                            }, error: function () {
                                layer.close(wait);
                                layer.alert("接口请求失败!", { icon: 5 });
                            }
                        });
                    })
                }
                else {
                    layer.msg('请选择一行数据删除!');
                }
            }
            //预览
            function get_ViewReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdInBill', 'yes']
                        , resize: false
                    })
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //打印
            function get_PrintReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    layer.open({
                        type: 2
                        , area: ['50%', '50%']
                        , title: '打印模版选择'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdInBill', 'yes']
                        , resize: false
                    })
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //审核
            function set_CheckBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    var wait = layer.load();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_MouldProdInBill/set_CheckBill", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    get_FastQuery(table, option);
                                });
                            } else {
                                layer.alert(result.Message, { icon: 5 });
                            }
                            layer.close(wait);
                        }, error: function () {
                            layer.close(wait);
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //反审核
            function set_AbandonCheck() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    var wait = layer.load();
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_MouldProdInBill/set_AbandonCheck", //方法所在页面和方法名
                        data: { "HInterID": InterID, "CurUserName": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
                                    // å¾—到frame索引
                                    var index = layer.getFrameIndex(window.name);
                                    //关闭当前frame
                                    layer.close(index);
                                    //修改为功后刷新界面
                                    get_FastQuery(table, option);
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                            layer.close(wait);
                        }, error: function () {
                            layer.close(wait);
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据反审核!');
                }
            }
            //获取列宽
            function getColumnsWidth() {
                var result = [];
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                //获取列宽
                $.ajax({
                    url: GetWEBURL() + '/Cg_POOrderBill/list',
                    async: false,
                    type: "Get",
                    dataType: "json",
                    data: { "colNum": colNum, "Name": Name },
                    success: function (data1) {
                        if (data1.code == 1) {
                            result = data1.data;
                        }
                        else if (data1.code == -1) {
                        }
                        else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                return result;
            }
            //保存列宽
            function set_SaveGridColWidth() {
                var arr = [];
                // åˆ—æ•°
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                for (var i = 0; i <= colNum; i++) {
                    var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
                    var colWidth = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).width();
                    if (colName != "" && colName != null) {
                        arr.push(colWidth == -1 ? 200 : colWidth);
                    }
                }
                arr.unshift(40); //首位追加
                $.ajax({
                    url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
                    async: false,
                    type: "POST",
                    dataType: "json",
                    data: { "myMap": JSON.stringify(arr), "Name": Name },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.alert(data1.Message, { icon: 1 });
                        } else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                //设置赋值列宽
                var colWidth = getColumnsWidth();
                if (colWidth == "" || colWidth == []) {
                }
                else {
                    $.each(columns, function (x, m) {
                        m["width"] = colWidth[x];
                    });
                }
                get_FastQuery(table, option);
            }
            //默认列宽
            function set_DefaultGridColWidth() {
                var arr = [];
                // åˆ—æ•°
                var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
                for (var i = 0; i <= colNum; i++) {
                    var colName = $(".layui-table-header").find("tr").eq(0).find("th").eq(i).text();
                    if (colName != "" && colName != null) {
                        arr.push(200);   //默认宽度200
                    }
                }
                arr.unshift(40); //首位追加
                $.ajax({
                    url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidth',
                    async: false,
                    type: "POST",
                    dataType: "json",
                    data: { "myMap": JSON.stringify(arr), "Name": Name },
                    success: function (data1) {
                        if (data1.count == 1) {
                            layer.alert(data1.Message, { icon: 1 });
                        } else {
                            layer.alert(data1.Message, { icon: 5 });
                        }
                    }, error: function (e) {
                        layer.alert(e.Message, { icon: 5 });
                    }
                });
                //设置赋值列宽
                var colWidth = getColumnsWidth();
                if (colWidth == "" || colWidth == []) {
                }
                else {
                    $.each(columns, function (x, m) {
                        m["width"] = colWidth[x];
                    });
                }
                get_FastQuery(table, option);
            }
            //快速过滤
            function get_FastQuery(table, option) {
                var HStatus = $("select[name='HStatus']").val();//状态
                var HBeginDate = $("#HBeginDate").val();//开始日期
                var HEndDate = $("#HEndDate").val();//结束日期
                var HBillNo = $("#HBillNo").val(); //单据号
                var HDepartName = $("#HDepartName").val();
                var HMaterNumber = $("#HMaterNumber").val();
                var HMaterName = $("#HMaterName").val();
                var HMaterModel = $("#HMaterModel").val();
                var HSourceBillNo = $("#HSourceBillNo").val();
                var HMakerMan = $("#HMakerMan").val();
                var HSupplyName = $("#HSupplyName").val();
                var HPurNo = $("#HPurNo").val();
                var HStockName = $("#HStockName").val();
                //if (HStatus) {
                //    switch (HStatus) {
                //        case '-1':   //全部
                //            sWhere += "";
                //            break;
                //        case '1':    //未分配
                //            sWhere += " and ä¸šåŠ¡çŠ¶æ€='未分配'";
                //            break;
                //        case '2':    //已审核
                //            sWhere += " and ä¸šåŠ¡çŠ¶æ€='已分配'";
                //            break;
                //        case '3':    //已关闭
                //            sWhere += " and ä¸šåŠ¡çŠ¶æ€='已发布'";
                //        default:
                //    }
                //}
                if (HBeginDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HBeginDate + "'";
                }
                if (HEndDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) <= '" + HEndDate + "'";
                }
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                if (HDepartName) {
                    sWhere += " and éƒ¨é—¨ like '%" + HDepartName + "%'";
                }
                if (HMaterNumber) {
                    sWhere += " and ç‰©æ–™ä»£ç  like '%" + HMaterNumber + "%'";
                }
                if (HMaterName) {
                    sWhere += " and ç‰©æ–™åç§° like '%" + HMaterName + "%'";
                }
                if (HMaterModel) {
                    sWhere += " and è§„格型号 like '%" + HMaterModel + "%'";
                }
                if (HSourceBillNo) {
                    sWhere += " and æºå•单号 like '%" + HSourceBillNo + "%'";
                }
                if (HStockIn) {
                    //sWhere += " and éƒ¨é—¨ like '%" + HStockIn + "%'";
                }
                if (HStocOut) {
                    //sWhere += " and éƒ¨é—¨ like '%" + HStocOut + "%'";
                }
                if (HMakerMan) {
                    sWhere += " and åˆ¶å•人 like '%" + HMakerMan + "%'";
                }
                if (HSupplyName) {
                    sWhere += " and ä¾›åº”商 like '%" + HSupplyName + "%'";
                }
                if (HPurNo) {
                    sWhere += " and é‡‡è´­è®¢å•号 like '%" + HPurNo + "%'";
                }
                if (HStockName) {
                    sWhere += " and æ”¶æ–™ä»“库 like '%" + HStockName + "%'";
                }
                var index = layer.load(0);
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = " where 1 = 1 ";
            }
            //重置过滤条件
            function set_ClearQuery() {
                $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HBillNo").val("");
                $("#HDepartName").val("");
                $("#HMaterNumber").val("");
                $("#HMaterName").val("");
                $("#HMaterModel").val("");
                $("#HSourceBillNo").val("");
                $("#HStockIn").val("");
                $("#HStocOut").val("");
                $("#HMakerMan").val("");
                sWhere = " where 1 =1 ";
                get_Display(sWhere);
            }
            //刷新
            function set_Refresh() {
                $("#btnSearch").click();
            }
        });
        var sBillType = '1239'
                table.render({
                    elem: '#dj-table'
                    ,url: GetWEBURL() + '/Web/DisBillEntryList_Mate_Webs_Json'
                    ,toolbar: '#toolbarDemo'
                    , where: { HBillType: sBillType,sWhere:''}
                    , cols: [[
                          { type: 'radio' }
                        , { field: 'HInterID', title: '单据内码', width: 80 }
                        , { field: 'HBillNo', title: '单据号', width: 80 }
                        , { field: 'HMaker', title: '制单人', width: 100 }
                        , { field: 'HMakeDate', title: '制单日期', width: 100 }
                        , { field: 'HQty', title: '数量', width: 100 }
                        , { field: 'HSourceBillNo', title: '源单单号', width: 100 }
                        , { field: 'HRedBlueFlag', title: '红蓝字', width: 100 }
                        , { field: 'HSourceBillType', title: '源单类型', width: 100 }
                        ]]
                      , height: 500
                      , done: function () {
                          layer.closeAll("loading");
                      }
    })
        //刷新明细页签
        table.render({
            elem: '#mx-table'
            // , url: 'http://localhost:8083/POStockInBill/GetHBarCodeShowBillSub'
            //, toolbar: '#toolbarDemo'
            // , where: { sMsg: linterid, sMsg2: lentryid }
         , cols: [[
           , { field: 'HMaterID', title: '物料ID', width: 100, hide: true }
         ]]
         , page: true
         , height: 500
         , done: function () {
         }
        });
    });
    //清空表头
    </script>
</body>
</html>