1
沈泽
2021-09-22 00b1243f67bb20f3e986950e9d9a577ed53fafe7
1
5个文件已修改
967 ■■■■■ 已修改文件
WebTM/layuiadmin/Scripts/webConfig.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具仓库管理/Sc_Add_MouldProdBackBillList.html 107 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具仓库管理/Sc_Add_MouldProdOutBillList.html 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldProdBackBillList.html 95 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具管理/Sc_MouldOtherInBillList.html 729 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js
@@ -6,7 +6,7 @@
    //var WEBURL = "http://localhost:8080/API/";   //颜晓军本地配置
    //var WEBURL = "http://localhost:8082/lubao";   //颜晓军本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //杨露本地配置
    var WEBURL = "http://localhost:8082/LuBaoAPI/";    //章紫柔本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";    //章紫柔本地配置
    //var WEBURL = "http://10.1.4.155/API/";   //江丰客户NEW
    //var WEBURL = "http://47.96.97.237/API/";   //智云服务器
    //var WEBURL = "http://183.129.128.86:9090/API/";   //凯贝奈特客户服务器
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_Add_MouldProdBackBillList.html
@@ -62,15 +62,15 @@
                                                </div>
                                            </div>
                                            <!--<div class="layui-inline">
                                                <label class="layui-form-label">仓库</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" readonly name="HWhName" id="HWhName" class="layui-input" value="" style="float:left;width:150px;">
                                                    <input type="hidden" name="HWhID" id="HWhID" class="layui-input" value="" style="float:left;width:150px;">
                                                    <button type="button" lay-submit="" class="layui-btn" lay-filter="HWhList" id="HWhList" style="width:40px;">
                                                        <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                    </button>
                                                </div>
                                            </div>-->
        <label class="layui-form-label">仓库</label>
        <div class="layui-input-inline">
            <input type="text" readonly name="HWhName" id="HWhName" class="layui-input" value="" style="float:left;width:150px;">
            <input type="hidden" name="HWhID" id="HWhID" class="layui-input" value="" style="float:left;width:150px;">
            <button type="button" lay-submit="" class="layui-btn" lay-filter="HWhList" id="HWhList" style="width:40px;">
                <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
            </button>
        </div>
    </div>-->
                                            <div class="layui-inline">
                                                <label class="layui-form-label">仓库</label>
                                                <div class="layui-input-inline">
@@ -81,8 +81,6 @@
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">验收员</label>
                                                <div class="layui-input-inline">
@@ -103,6 +101,10 @@
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">部门</label>
                                                <div class="layui-input-inline">
@@ -122,15 +124,14 @@
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">选单号</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="XDH" id="XDH" class="layui-input" value="0" style="float:left;width:150px;">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">摘要</label>
                                                <div class="layui-input-inline">
@@ -225,45 +226,34 @@
                , page: true //开启分页
                , cols: [[ //表头
                    { type: 'checkbox', fixed: 'left' }
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe" ,width: 100}
                    , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true}
                    , { templet: '#xuhao', title: '序号', sort: true, fixed: 'left', event: "qwe", width: 100 }
                    , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true }
                    , { field: 'HMaterCode', title: '模具代码', edit: 'text', event: 'HMaterCode', width: 100 }
                    , { field: 'HMaterName', title: '模具名称', edit: 'text', width: 100}
                    , { field: 'HMaterSpec', title: '规格型号', edit: 'text', width: 100}
                    , { field: 'HSecUnitID', title: 'HSecUnitID', edit: 'text', width: 100, hide: true}
                    , { field: 'HSecUnitCode', title: '辅助计量单位代码', edit: 'text', event: 'HSecUnitCode', width: 100 }
                    , { field: 'HSecUnitName', title: '辅助计量单位名称', edit: 'text', width: 100}
                    , { field: 'HUnitID', title: 'HUnitID', edit: 'text', width: 100, hide: true}
                    , { field: 'HUnitCode', title: '计量单位代码', edit: 'text', event: 'HUnitCode', width: 100 }
                    , { field: 'HUnitName', title: '计量单位名称', edit: 'text', width: 100}
                    , { field: 'HBatchNo', title: '批次', edit: 'text', width: 100}
                    , { field: 'HDesignLife', title: '设计寿命', edit: 'text', width: 100}
                    , { field: 'HLeaveLife', title: '剩余寿命', edit: 'text', width: 100}
                    , { field: 'HMaterName', title: '模具名称', edit: 'text', width: 100 }
                    , { field: 'HMaterSpec', title: '规格型号', edit: 'text', width: 100 }
                    , { field: 'HBatchNo', title: '批次', edit: 'text', width: 100 }
                    , { field: 'HDesignLife', title: '设计寿命', edit: 'text', width: 100 }
                    , { field: 'HLeaveLife', title: '剩余寿命', edit: 'text', width: 100 }
                    , { field: 'HUseLife', title: '累积使用寿命', edit: 'text', width: 100 }
                    , { field: 'HQtyMust', title: '应收数量', edit: 'text', width: 100 }
                    , { field: 'HQty', title: '实收数量', edit: 'text', width: 100}
                    , { field: 'HPrice', title: '单价', edit: 'text', width: 100}
                    , { field: 'HMoney', title: '金额', edit: 'text', width: 100}
                    , { field: 'hwhid', title: 'hwhid', edit: 'text', width: 100, hide: true}
                    , { field: 'HWHCode', title: '收料仓库代码', edit: 'text', event: 'HWHCode', width: 100 }
                    , { field: 'HWHName', title: '收料仓库名称', edit: 'text', width: 100 }
                    , { field: 'HSPID', title: 'HSPID', edit: 'text', width: 100, hide: true}
                    , { field: 'HQtyMust', title: '应发数量', edit: 'text', width: 100 }
                    , { field: 'HQty', title: '实发数量', edit: 'text', width: 100 }
                    , { field: 'HPrice', title: '单价', edit: 'text', width: 100 }
                    , { field: 'HMoney', title: '金额', edit: 'text', width: 100 }
                    , { field: 'HWHID', title: 'HWHID', edit: 'text', width: 100, hide: true }
                    , { field: 'HWHCode', title: '发料仓库代码', edit: 'text', event: 'HWHCode', width: 100 }
                    , { field: 'HWHName', title: '发料仓库', edit: 'text', width: 100 }
                    , { field: 'HSPID', title: 'HSPID', edit: 'text', width: 100, hide: true }
                    , { field: 'HSPCode', title: '仓位代码', edit: 'text', event: 'HSPCode', width: 100 }
                    , { field: 'HSPName', title: '仓位名称', edit: 'text', width: 100 }
                    , { field: 'HNewModel', title: '模具新规格', edit: 'text', width: 100 }
                    , { field: 'HWallThickness', title: '壁厚', edit: 'text', width: 100 }
                    , { field: 'HHardness', title: '硬度', edit: 'text', width: 100 }
                    , { field: 'HLastProdModel', title: '最后生产产品', edit: 'text', width: 100 }
                    , { field: 'HDiameter', title: '直径', edit: 'text', width: 100 }
                    , { field: 'HBackFlag', title: '退库类型', edit: 'text', width: 100 }
                    , { field: 'HRemark', title: '表体备注', edit: 'text', width: 100}
                    , { field: 'HSPName', title: '仓位', edit: 'text', width: 100 }
                    , { field: 'HRemark', title: '表体备注', edit: 'text', width: 100 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ]]
                , limit: 500 //每页默认显示的数量
            };
            //判断是否新增
            if (hID == null || hID == 0) {
                //初始加载表格{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
                option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "hwhid": 0, "HWHCode": "", "HWHName": "", "HSPID": 0,"HSPCode":"", "HSPName": "", "HNewModel": "", "HWallThickness": "", "HHardness": "", "HLastProdModel": "", "HDiameter": "","HBackFlag":"", "HRemark": "" }];
                option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HRemark": "" }];
                table.render(option);
            }
            else {
@@ -299,7 +289,7 @@
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;;
                var AddRow = table.cache['mainTable'];
                var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "hwhid": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HNewModel": "", "HWallThickness": "", "HHardness": "", "HLastProdModel": "", "HDiameter": "", "HBackFlag": "", "HRemark": "" };
                var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HRemark": "" };
                switch (obj.event) {
                    case 'btn-AddLine':
                        //table.cache["mainTable"].push(AddRow[rows]);
@@ -307,7 +297,7 @@
                        option.data = table.cache["mainTable"];
                        table.render(option);
                        rows++;
                        layer.msg('增加一行按钮!')
                        //layer.msg('增加一行按钮!')
                        break;
                    case 'btn-CopyLine':
                        var copydata = JSON.stringify(data);
@@ -488,13 +478,13 @@
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../PublicPage/WareHouseInformation.html', 'yes'],
                                content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
@@ -654,9 +644,9 @@
                                , "hwhid": data.hwhid                    //仓库ID
                                , "HWHName": data.仓库名称               //仓库名称
                                , "HSecManagerID": data.hsecmanagerid    //验收员ID
                                , "HSecManagerName": data.验收员         //验收员名称
                                , "HSecManagerName": data.领料人         //验收员名称
                                , "HKeeperID": data.hkeeperid            //保管员ID
                                , "HKeeperName": data.保管员            //保管员名称
                                , "HKeeperName": data.发料人            //保管员名称
                                , "HDeptID": data.HDeptID                 //部门ID
                                , "HDeptName": data.部门                //部门名称
                                , "HSourceBillType":""                   //源单类型
@@ -1014,16 +1004,21 @@
            //    layer.msg("请先扫源单!", { icon: 5 });
            //    return false;
            //}
            if ($("#HDeptName").val() == '') {
                layer.msg("部门没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            if ($("#hwhid").val() == '') {
                layer.msg("请选择仓库", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HSecManager").val() == '') {
                layer.msg("验收人没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            if ($("#HSecManagerID").val() == '') {
                layer.msg("请选择验收员", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HKeeper").val() == '') {
                layer.msg("保管人没有选择", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
            if ($("#HKeeperID").val() == '') {
                layer.msg("请选择保管员", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            if ($("#HDeptID").val() == '') {
                layer.msg("请选择部门", { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                return false;
            }
            //if ($("#HWHNAME").val() == '') {
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_Add_MouldProdOutBillList.html
@@ -71,8 +71,6 @@
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">验收员</label>
                                                <div class="layui-input-inline">
@@ -93,6 +91,10 @@
                                                    </button>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">部门</label>
                                                <div class="layui-input-inline">
@@ -112,15 +114,14 @@
                                                    </select>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">选单号</label>
                                                <div class="layui-input-inline">
                                                    <input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;width:150px;">
                                                </div>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">摘要</label>
                                                <div class="layui-input-inline">
@@ -234,7 +235,8 @@
                    , { field: 'HSPID', title: 'HSPID', edit: 'text', width: 100, hide: true}
                    , { field: 'HSPCode', title: '仓位代码', edit: 'text', event: 'HSPCode', width: 100 }
                    , { field: 'HSPName', title: '仓位', edit: 'text', width: 100 }
                    , { field: 'HRemark', title: '表体备注', edit: 'text', width: 100}
                    , { field: 'HRemark', title: '表体备注', edit: 'text', width: 100 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ]]
                , limit: 500 //每页默认显示的数量
            };
@@ -285,7 +287,7 @@
                        option.data = table.cache["mainTable"];
                        table.render(option);
                        rows++;
                        layer.msg('增加一行按钮!')
                        //layer.msg('增加一行按钮!')
                        break;
                    case 'btn-CopyLine':
                        var copydata = JSON.stringify(data);
@@ -311,16 +313,14 @@
                var data = obj.data;
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                    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 });
                            obj.del();
                            option.data = table.cache["mainTable"];//将数据绑定到data上
                            table.reload(option);
                            layer.close(index);
                        }
                    });
@@ -386,13 +386,13 @@
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../PublicPage/WareHouseInformation.html', 'yes'],
                                content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HWHID', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
@@ -610,13 +610,13 @@
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/WareHouseInformation.html', 'yes'],
                    content: ['../../../views/Baseset/基础资料/Gy_WarehouseList.html?Type=HWHID', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_MouldProdBackBillList.html
@@ -142,61 +142,66 @@
                    , page: true
                    , cellMinWidth: 90
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                         { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: '单据ID', hide: true }
                        , { field: '日期', title: '日期', width: 160, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '单据号', title: '单据号', width: 160 }
                        //, { field: '单据类型', title: '单据类型', width: 160 }
                        , { field: 'HDeptID', title: '部门代码', width: 200, hide: false }
                        //, { field: '部门代码', title: '部门代码', width: 115 }
                        , { field: '部门', title: '部门', width: 200 }
                        , { field: 'HSecManagerID', title: '验收员代码', width: 200, hide: false }
                        //, { field: '验收员代码', title: '验收员代码', width: 200 }
                        , { field: '验收员', title: '验收员', width: 200 }
                        , { field: 'HKeeperID', title: '保管员代码', width: 200, hide: false }
                        //, { field: '保管员代码', title: '保管员代码', width: 200 }
                        , { field: '保管员', title: '保管员', width: 200 }
                        , { field: '摘要', title: '摘要', width: 200 }
                        , { field: '表头备注', title: '表头备注', width: 200 }
                        , { field: '日期', title: '日期', width: 125, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '单据号', title: '单据号', width: 195 }
                        , { field: '单据类型', title: '单据类型', width: 110 }
                        , { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
                        , { field: '仓库代码', title: '仓库代码', width: 125 }
                        , { field: '仓库', title: '仓库', width: 125 }
                        , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true }
                        , { field: '领料人代码', title: '领料人代码', width: 180 }
                        , { field: '领料人', title: '领料人', width: 125 }
                        , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true }
                        , { field: '发料人代码', title: '发料人代码', width: 180 }
                        , { field: '发料人', title: '发料人', width: 125 }
                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
                        , { field: '部门代码', title: '部门代码', width: 115 }
                        , { field: '部门', title: '部门', width: 125 }
                        , { field: '摘要', title: '摘要', width: 125 }
                        , { field: '表头备注', title: '表头备注', width: 125 }
                        //, { field: '内部单据号', title: '内部单据号', width: 115 }
                        , { field: 'HWHID', title: '仓库代码', width: 200, hide: false }
                        //, { field: '仓库代码', title: '仓库代码', width: 200 }
                        , { field: '仓库名称', title: '仓库名称', width: 200 }
                        , { field: 'HSPID', title: '仓位代码', width: 200, hide: false }
                        //, { field: '仓位代码', title: '仓位代码', width: 200 }
                        , { field: '仓位名称', title: '仓位名称', width: 200 }
                        , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                        , { field: 'HMaterID', title: '模具代码', width: 200, hide: false }
                        //, { field: '模具代码', title: '模具代码', width: 200 }
                        , { field: '模具名称', title: '模具名称', width: 200 }
                        , { field: '条码编号', title: '条码编号', width: 200 }
                        //, { field: '模具品类', title: '模具品类', width: 200 }
                        , { field: '设计寿命', title: '设计寿命', width: 200 }
                        , { field: '累计使用寿命', title: '累计使用寿命', width: 200 }
                        , { field: '本次使用寿命', title: '本次使用寿命', width: 200 }
                        , { field: '剩余寿命', title: '剩余寿命', width: 200 }
                        , { field: '最后生产产品', title: '最后生产产品', width: 200 }
                        , { field: '退库类型', title: '退库类型', width: 200 }
                        , { field: '模具新规格', title: '模具新规格', width: 200 }
                        , { field: '表体备注', title: '表体备注', width: 200 }
                        , { field: '红蓝单标记', title: '红蓝单标记', width: 200 }
                        , { field: '制单人', title: '制单人', width: 200 }
                        , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true }
                        , { field: '模具代码', title: '模具代码', width: 125 }
                        , { field: '模具名称', title: '模具名称', width: 125 }
                        , { field: '规格型号', title: '规格型号', width: 125 }
                        , { field: 'Hunitid', title: 'Hunitid', width: 200, hide: true }
                        //, { field: '计量单位代码', title: '计量单位代码', width: 125 }
                        //, { field: '计量单位', title: '计量单位', width: 125 }
                        , { field: 'HWHSonID', title: 'HWHSonID', width: 200, hide: true }
                        //, { field: '发料仓库代码', title: '发料仓库代码', width: 125 }
                        //, { field: '发料仓库', title: '发料仓库', width: 125 }
                        , { field: 'HSPID', title: 'HSPID', width: 200, hide: true }
                        , { field: '仓位代码', title: '仓位代码', width: 125 }
                        , { field: '仓位', title: '仓位', width: 125 }
                        , { field: '应发数量', title: '应发数量', width: 125 }
                        , { field: '实发数量', title: '实发数量', width: 125 }
                        , { field: '单价', title: '单价', width: 125 }
                        , { field: '金额', title: '金额', width: 125 }
                        , { field: '设计寿命', title: '设计寿命', width: 125 }
                        , { field: '累积使用寿命', title: '累积使用寿命', width: 125 }
                        , { field: '剩余寿命', title: '剩余寿命', width: 125 }
                        , { field: '关联数量', title: '关联数量', width: 125 }
                        , { field: '表体备注', title: '表体备注', width: 125 }
                        , { field: '红蓝单标记', title: '红蓝单标记', width: 125 }
                        , { 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: 200 }
                        , { 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: 200 }
                        , { 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: 200 }
                        , { 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: 200 }
                        , { 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: 200 }
                        , { field: '关闭类型', title: '关闭类型', width: 200 }
                        , { field: '行关闭人', title: '行关闭人', width: 125 }
                        , { field: '关闭类型', title: '关闭类型', width: 125 }
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                        , { field: '源单单号', title: '源单单号', width: 200 }
                        , { field: '源单类型', title: '源单类型', width: 200 }
                        , { field: '关联数量', title: '关联数量', width: 200 }
                        , { field: '源单单号', title: '源单单号', width: 125, hide: true  }
                        , { field: '源单类型', title: '源单类型', width: 125, hide: true }
                    ]]
                };
            }
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξ߹ÜÀí/Sc_MouldOtherInBillList.html
@@ -2,12 +2,13 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; 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, 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/layui/layui.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
@@ -15,10 +16,10 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <style >
        .layui-form-select .layui-input {
            padding-right: 15px;
            cursor: pointer;
    <style type="text/css">
        input.layui-input.layui-unselect {
            padding-right: 0;
        }
    </style>
</head>
@@ -30,20 +31,15 @@
                    <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-colla-title layui-inline">
                                    <div class="layui-inline">
                                        <span>更多</span>
                                    </div>
                                </div>
                                </div>-->
                                <div class="layui-inline">
                                    <label class="layui-form-label">状态</label>
                                    <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="0">未审核</option>
                                            <option value="1">已审核</option>
                                            <option value="2">已关闭</option>
                                        </select>
                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                    </div>
                                </div>
                                <div class="layui-inline">
@@ -62,19 +58,14 @@
                                    <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-colla-content">
                                    <div class="layui-inline">
                                        <div class="layui-inline">
                                            <span>其他条件></span>
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label" style="width: 85px;">单据号</label>
                                        <div class="layui-input-block" style="margin-left: 120px;">
                                            <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                        </div>
                                    </div>
                                </div>
                                </div>-->
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
@@ -92,7 +83,10 @@
            </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/' //静态资源所在路径
@@ -110,37 +104,17 @@
                , util = layui.util
            //查询条件
            var sWhere = "";
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            var option = [];
            //初始化界面
            set_ClearBill();
            //#endregion
            //#region è§¦å‘事件:包括form.on(){}格式的所有点击事件、选择事件等
            //#region å¤´å·¥å…·æ äº‹ä»¶
            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 'get_Refresh': get_Refresh();
                        break;
                    //退出按钮
                    case 'get_Exit': Pub_Close(2);
                        break;
                };
            //#region é‡ç½®æŒ‰é’®
            form.on('submit(btnReSearch)', function (data) {
                //清空过滤条件
                set_ClearQuery();
            });
            //#endregion
@@ -150,12 +124,7 @@
            });
            //#endregion
            //#region é‡ç½®æŒ‰é’®
            form.on('submit(btnReSearch)', function (data) {
                //清空过滤条件
                set_ClearQuery();
            });
            //#endregion
            //#region åˆå§‹åŒ–界面
            function set_ClearBill() {
                //初始化表格
                set_InitGrid();
@@ -163,179 +132,226 @@
                get_Display(sWhere);
            }
            //#endregion
            //#region åˆ·æ–°
            function get_Refresh() {
                sWhere = "";
                get_Display(sWhere);
            }
             //#endregion
            //#region åˆå§‹åŒ–表格方法
            $("#HBeginDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
            $("#HEndDate").val(Format(new Date(), "yyyy-MM-dd"));
            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"));
                 columns = [
                     { type: 'checkbox', fixed: 'left' }
                    , { field: 'hmainid', title: '单据ID', hide: true }
                    , { field: '日期', title: '日期', width: 180 }
                     , { field: '单据号', title: '单据号', width: 180 }
                     , { field: 'HDeptID', title: '部门代码', width: 160, hide: false }
                    //, { field: '部门代码', title: '部门代码', width: 200 }
                    //, { field: '部门', title: '部门', width: 200 }
                     , { field: 'hsecmanagerid', title: '验收员代码', width: 200, hide: false }
                    //, { field: '验收员代码', title: '验收员代码', width: 200 }
                    //, { field: '验收员', title: '验收员', width: 200 }
                     , { field: 'hkeeperid', title: '保管员代码', width: 200, hide: false }
                    //, { field: '保管员代码', title: '保管员代码', width: 200 }
                    //, { field: '保管员', title: '保管员', width: 200 }
                     , { field: 'hwhid', title: '仓库代码', width: 200, hide: false }
                    //, { field: '仓库代码', title: '仓库代码', width: 200 }
                    //, { field: '仓库', title: '仓库', width: 200 }
                    , { field: '摘要', title: '摘要', width: 115, hide: true }
                    , { field: '表头备注', title: '表头备注', width: 200 }
                    , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                     , { field: 'hmaterid', title: '模具代码', width: 200, hide: false }
                    //, { field: '模具代码', title: '模具代码', width: 115 }
                    //, { field: '模具名称', title: '模具名称', width: 200 }
                    , { field: '条码编号', title: '条码编号', width: 200 }
                    //, { field: '模具品类', title: '模具品类', width: 200 }
                    //, { field: '收料仓库代码', title: '收料仓库代码', width: 200 }
                    //, { field: '收料仓库', title: '收料仓库', width: 200 }
                     , { field: 'HSPID', title: '仓位代码', width: 200, hide: false }
                    //, { field: '仓位代码', title: '仓位代码', width: 200 }
                    //, { field: '仓位', title: '仓位', width: 200 }
                    , { field: '设计寿命', title: '设计寿命', width: 200 }
                    , { field: '累计使用寿命', title: '累计使用寿命', width: 200 }
                    , { field: '本次使用寿命', title: '本次使用寿命', width: 200 }
                    , { field: '剩余寿命', title: '剩余寿命', width: 200 }
                    //, { field: '最后生产产品', title: '最后生产产品', width: 200 }
                    //, { field: '退库类型', title: '退库类型', width: 200 }
                    , { field: '模具新规格', title: '模具新规格', width: 200 }
                    , { field: '表体备注', title: '表体备注', width: 200 }
                    , { field: '关联数量', title: '关联数量', width: 200 }
                    , { field: 'HBillType', title: 'HBillType', width: 200, hide: true }
                    , { field: '红蓝单标记', title: '红蓝单标记', width: 200 }
                    , { field: '制单人', title: '制单人', width: 200 }
                     , { field: '制单日期', title: '制单日期', width: 180, templet: "<div>{{d.制单日期 ==null ?'':layui.util.toDateString(d.制单日期, 'yyyy-MM-dd HH:mm:ss')}}</div>"  }
                    , { field: '审核人', title: '审核人', width: 200 }
                     , { field: '审核日期', title: '审核日期', width: 200, templet: "<div>{{d.审核日期 ==null ? '':layui.util.toDateString(d.审核日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '修改人', title: '修改人', width: 200 }
                     , { field: '修改日期', title: '修改日期', width: 180, templet: "<div>{{d.修改日期 ==null ?'':layui.util.toDateString(d.修改日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '关闭人', title: '关闭人', width: 200 }
                     , { field: '关闭日期', title: '关闭日期', width: 200, templet: "<div>{{d.关闭日期 ==null ?'':layui.util.toDateString(d.关闭日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '作废人', title: '作废人', width: 200 }
                     , { field: '作废日期', title: '作废日期', width: 200, templet: "<div>{{d.作废日期 ==null ?'':layui.util.toDateString(d.作废日期, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
                    , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                    , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                    , { field: '源单单号', title: '源单单号', width: 200 }
                    , { field: '源单类型', title: '源单类型', width: 200 }
                ];
                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) {
                    }
                    , page: true
                    , cellMinWidth: 90
                    , cols: [[
                        { type: 'checkbox', fixed: 'left' }
                        , { field: 'hmainid', title: '单据ID', hide: true }
                        , { field: '日期', title: '日期', width: 125, templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                        , { field: '单据号', title: '单据号', width: 195 }
                        , { field: '单据类型', title: '单据类型', width: 110 }
                        , { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
                        , { field: '仓库代码', title: '仓库代码', width: 125 }
                        , { field: '仓库', title: '仓库', width: 125 }
                        , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, hide: true }
                        , { field: '领料人代码', title: '领料人代码', width: 180 }
                        , { field: '领料人', title: '领料人', width: 125 }
                        , { field: 'HKeeperID', title: 'HKeeperID', width: 200, hide: true }
                        , { field: '发料人代码', title: '发料人代码', width: 180 }
                        , { field: '发料人', title: '发料人', width: 125 }
                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
                        , { field: '部门代码', title: '部门代码', width: 115 }
                        , { field: '部门', title: '部门', width: 125 }
                        , { field: '摘要', title: '摘要', width: 125 }
                        , { field: '表头备注', title: '表头备注', width: 125 }
                        , { field: '内部单据号', title: '内部单据号', width: 115 }
                        , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                        , { field: 'HMaterID', title: 'HMaterID', width: 200, hide: true }
                        , { field: '模具代码', title: '模具代码', width: 125 }
                        , { field: '模具名称', title: '模具名称', width: 125 }
                        , { field: '规格型号', title: '规格型号', width: 125 }
                        , { field: 'Hunitid', title: 'Hunitid', width: 200, hide: true }
                        , { field: '计量单位代码', title: '计量单位代码', width: 125 }
                        , { field: '计量单位', title: '计量单位', width: 125 }
                        , { field: 'HWHSonID', title: 'HWHSonID', width: 200, hide: true }
                        , { field: '发料仓库代码', title: '发料仓库代码', width: 125 }
                        , { field: '发料仓库', title: '发料仓库', width: 125 }
                        , { field: 'HSPID', title: 'HSPID', width: 200, hide: true }
                        , { field: '仓位代码', title: '仓位代码', width: 125 }
                        , { field: '仓位', title: '仓位', width: 125 }
                        , { field: '应发数量', title: '应发数量', width: 125 }
                        , { field: '实发数量', title: '实发数量', width: 125 }
                        , { field: '单价', title: '单价', width: 125 }
                        , { field: '金额', title: '金额', width: 125 }
                        , { field: '设计寿命', title: '设计寿命', width: 125 }
                        , { field: '累积使用寿命', title: '累积使用寿命', width: 125 }
                        , { field: '剩余寿命', title: '剩余寿命', width: 125 }
                        , { field: '关联数量', title: '关联数量', width: 125 }
                        , { field: '表体备注', title: '表体备注', width: 125 }
                        , { field: '红蓝单标记', title: '红蓝单标记', width: 125 }
                        , { 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>" }
                        , { field: '行关闭人', title: '行关闭人', width: 125 }
                        , { field: '关闭类型', title: '关闭类型', width: 125 }
                        , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                        , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                        , { field: '源单单号', title: '源单单号', width: 125 }
                        , { field: '源单类型', title: '源单类型', width: 125 }
                    ]]
                };
                ////设置列宽
                //var colWidth = getColumnsWidth();
                //if (colWidth == "" || colWidth == []) {
                //}
                //else {
                //    $.each(columns, function (x, m) {
                //        m["width"] = colWidth[x];
                //    });
                //}
            }
            ////#region èŽ·å–åˆ—å®½
            //function getColumnsWidth() {
            //    var result = [];
            //    var colNum = $(".layui-table-header").find("tr").eq(0).find("th").length;
            //    //获取列宽
            //    $.ajax({
            //        url: GetWEBURL() + '/tb_CellWidth/GetMouldScrapInHouseCellWidthList',
            //        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;
            //}
            ////#endregion
            //#region åŠ è½½ç½‘æ ¼
            function get_Display(sWhere) {
                //加载网格
                var index = layer.load(0);//遮罩
            //进入页面显示的缓存列表
            $.ajax({
                url: GetWEBURL() + '/Sc_MouldOtherInBill/GetMouldOtherInBillList',
                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 });
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Sc_MouldOtherInBill/GetMouldOtherInBillList',
                    type: "GET",
                    data: { "sWhere": sWhere },
                    success: function (data1) {
                        if (data1.count == 1) {
                            option.data = data1.data;
                            table.render(option);
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                }, error: function () {
                    layer.close(index);
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            });
                });
            }
            //#endregion
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus(obj.config.id);
                switch (obj.event) {
                    case 'btn-Add':
                        //页面层-自定义
                        layer.open({
                            type: 2,
                            skin: 'layui-layer-rim', //加上边框
                            title: '新增模具领用单',
                            closeBtn: 1,
                            shift: 2,
                            area: ['100%', '100%'],
                            maxmin: true,
                            content: '../模治具管理/Sc_MouldOtherInBill.html',
                            end: function () {
                                //刷新页面,
                                location.reload();
                            },
                            success: function (layero, index) {
                            }
                        });
                        break;
                    case 'btn-Edit':
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        if (checkStatus.data.length === 1) {
                            var hID = 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: '../模治具管理/Sc_MouldOtherInBill.html?hID=' + hID
                                , resize: false,
                                end: function () {
                                    //刷新页面,
                                    location.reload();
                                }
                                , cancel: function () {
                                    //$(".layui-btn").removeClass("layui-btn-disabled");
                                }
                            })
                        } else {
                            layer.msg('请选择一行数据编辑!');
                        }
                        break;
                    case 'btn-Delete':
                        var checkStatus = table.checkStatus('mainTable')
                            , data = checkStatus.data;
                        if (checkStatus.data.length === 1) {
                            var HItemID = data[0].HItemID.toString();
                            //逻辑删除方法
                            layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                                $.ajax({
                                    type: "GET",
                                    url: GetWEBURL() + "Sc_ICMOReportBill/DeltetICMOReportBill", //方法所在页面和方法名
                                    data: { "HItemID": HItemID },
                                    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 });
                                        }
                                    }, error: function () {
                                        layer.alert("接口请求失败!", { icon: 5 });
                                    }
                                });
                            })
                        }
                        else {
                            layer.msg('请选择一行数据删除!');
                        }
                        break;
                    //刷新
                    case 'get_Refresh': get_Refresh();
                        break;
                    //退出按钮
                    case 'get_Exit': Pub_Close(2);
                        break;
                };
            });
            ////进入页面显示的缓存列表
            //$.ajax({
            //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
            //    url: GetWEBURL() + '/Sc_MouldProdOutBill/GetMouldProdOutBill',
            //    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 });
            //        }
            //    }, error: function () {
            //        layer.close(index);
            //        layer.alert("接口请求失败!", { icon: 5 });
            //    }
            //});
            //#region å¿«é€Ÿè¿‡æ»¤
            function get_FastQuery(table, option) {
                var Status = $("select[name='Status']").val();//状态
                var HDate = $("#HBeginDate").val();//开始日期
                var HDate1 = $("#HEndDate").val();//结束日期
                var HBillNo = $("#HBillNo").val(); //单据号
                if (Status) {
                    switch (Status) {
                        case '-1':   //全部
                            sWhere += "";
                            break;
                        case '0':    //未审核
                            sWhere += " and å®¡æ ¸äºº=''";
                            break;
                        case '1':    //已审核
                            sWhere += " and å®¡æ ¸äºº<>''";
                            break;
                        case '2':    //已关闭
                            sWhere += " and å…³é—­äºº<>''";
                        default:
                    }
                }
                var HBillNo = $("#HBillNo").val();//单据号
                if (HDate) {
                    sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + HDate + "'";
                }
@@ -345,286 +361,49 @@
                if (HBillNo) {
                    sWhere += " and å•据号 like '%" + HBillNo + "%'";
                }
                var index = layer.load(0);
                get_Display(sWhere);
                //调用接口后清空sWhere缓存
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#endregion
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶
            function set_ClearQuery() {
                $("#HDate").val("");//开始日期
                $("#HDate1").val("");//结束日期
                $("#HBillNo").val("");//单据号
                sWhere = "";
            }
            //#endregion
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶
            function set_ClearQuery() {
                $('#Status').find("option[value='-1']").attr("selected", true);
                $("#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("");
            }
            //#endregion
            //#region æ–°å¢ž
            function set_AddNew() {
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    area: ['100%', '100%'],
                    title: '模具其他入库单-新增',
                    shift: 0,
                    content:'../模治具管理/Sc_MouldOtherInBill.html',
                    end: function () {
                        //刷新页面,
                        location.reload();
                    }
                });
            //#region åˆ·æ–°
            function get_Refresh() {
                set_ClearQuery();
                get_Display(sWhere);
            }
            //#endregion
            //修改按钮
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var hID = data[0].hmainid.toString();
                    layer.open({
                        type: 2
                        , area: ['100%', '100%']
                        , title: '模具其他入库单'
                        , shade: 0.6 //遮罩透明度
                        , maxmin: false //允许全屏最小化
                        , anim: 0 //0-6的动画形式,-1不开启
                        , content: ['Sc_MouldOtherInBill.html?HInterID=' + data[0].hinterid + '&HType=Modify', 'yes']
                        , resize: false,
                        end: function () {
                            //刷新页面
                            location.reload();
                        }
                        , cancel: function () {
                        }
                    })
                }
                else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            ////监听行双击事件
            //table.on('rowDouble(mainTable)', function (obj) {
            //    layer.alert("双击事件", { icon: 1 });
            //});
            //删除
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                var ModRightNameDelete = 'Sc_MouldOtherInBill_Delete'
                var data = obj.data //获得当前行数据
                    , layEvent = obj.event; //获得 lay-event å¯¹åº”的值
                layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "Sc_ICMOReportBill/DeltetICMOReportBill", //方法所在页面和方法名
                        data: { "HItemID": checkStatus.data[0].HItemID, "User": sessionStorage["HUserName"], "ModRightNameDelete": ModRightNameDelete },
                        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 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                })
            }
            //#endregion
            //laydate.render({
            //    elem: '#HDate'
            //    , type: 'datetime'
            //    , trigger: 'click'
            //    , format:'yyyy-MM-dd HH:mm'
            //});
            //#region å®¡æ ¸
            function set_CheckBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_ICMOReportBill/AuditProcessReportList", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": 0, "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);
                                    //修改为功后刷新界面
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据审核!');
                }
            }
            //#endregion
            //#region åå®¡æ ¸
            function set_AbandonCheck() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    //逻辑审核方法
                    $.ajax({
                        type: "GET",
                        url: GetWEBURL() + "/Sc_ICMOReportBill/AuditProcessReportList", //方法所在页面和方法名
                        data: { "HInterID": InterID, "IsAudit": 1, "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);
                                    //修改为功后刷新界面
                                    $("#btnSearch").trigger('click');
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                        }
                    });
                }
                else {
                    layer.msg('请选择一行数据反审核!');
                }
            }
            //#endregion
            //#region é¢„览
            function get_PrintReport() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var InterID = data[0].hmainid.toString();
                    layer.alert("我是打印按钮!单据主ID是:" + InterID);
                    //window.open("../生产工序管理/工序汇报单/HBarPlanPrint.html?linterid=" + linterid + "&Type=HDepartMent" + "&OpenTmp=b");
                    window.open("../../基础资料/公用基础资料/HBarPlanPrint.html?linterid=" + InterID + "&Type=HDepartMent" + "&OpenTmp=b");
                }
                else {
                    layer.msg('请选择一行数据打印!');
                }
            }
            //#endregion
            //#region ä¿å­˜åˆ—宽
            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];
                    });
                }
                location.reload();
            }
            //#endregion
            //#region é»˜è®¤åˆ—宽
            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) {
                        } 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);
                location.reload();
            }
            //#endregion
            //以上是layui模块
        });
    </script>
</body>
</html>