zgq
2021-07-07 aa8d8f14e56996e419e82359d4b852a98f6c06cd
Merge branch 'master' of http://101.37.171.70:10101/r/MESWMS-LayUI
2个文件已修改
250 ■■■■ 已修改文件
WebTM/layuiadmin/Scripts/webConfig.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldScrapInBillList.html 248 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js
@@ -6,7 +6,7 @@
     //var WEBURL = "http://101.37.171.70/API/";   //公司服务器
    //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://10.1.4.154/API/";   //江丰客户
    //var WEBURL = "http://10.1.4.155/API/";   //江丰客户NEW
    var WEBURL = "http://47.96.97.237/API/";   //智云服务器
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_MouldScrapInBillList.html
@@ -89,8 +89,8 @@
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Audit"><i class="layui-icon layui-icon-radio"></i>审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-DeAudit"><i class="layui-icon layui-icon-circle"></i>反审核</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Print"><i class="layui-icon layui-icon-circle"></i>预览</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Cell"><i class="layui-icon layui-icon-ok"></i>保存列宽</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-RefreshCell"><i class="layui-icon layui-icon-refresh"></i>默认列宽</button>
                            </div>
                        </script>
@@ -104,7 +104,9 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script>
        var DataList;
        var Name = "MouldScrapInHouseCellWidth";
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
@@ -121,81 +123,96 @@
                , util = layui.util
            //查询条件
            var sWhere = "";
            var columns = [
                { type: 'checkbox', fixed: 'left' }
                , { field: 'hmainid', title: '单据ID', width: 200, hide: true }
                , { field: '日期', title: '日期', width: 200, totalRowText: '合计', templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                , { field: '单据号', title: '单据号', width: 200 }
                , { field: '单据类型', title: '单据类型', width: 200 }
                , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true }
                , { field: '负责人代码', title: '负责人代码', width: 200 }
                , { field: '负责人名称', title: '负责人名称', width: 200 }
                , { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
                , { field: '仓库代码', title: '仓库代码', width: 200 }
                , { field: '仓库名称', title: '仓库名称', width: 200 }
                , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, 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: 200 }
                , { field: '摘要', title: '摘要', width: 200 }
                , { field: '内部单据号', title: '内部单据号', width: 200 }
                , { 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: 'HPropertyID', title: 'HPropertyID', width: 200, hide: true }
                , { field: '辅助属性代码', title: '辅助属性代码', width: 200 }
                , { field: '辅助属性名称', title: '辅助属性名称', width: 200 }
                , { field: 'HSecUnitID', title: 'HSecUnitID', width: 200, hide: true }
                , { field: '辅助计量单位代码', title: '辅助计量单位代码', width: 200 }
                , { field: '辅助计量单位名称', title: '辅助计量单位名称', width: 200 }
                , { field: '换算率', title: '换算率', width: 200 }
                , { field: '批次', title: '批次', width: 200 }
                , { field: '实收数量', title: '实收数量', width: 200, totalRow: true }
                , { field: '单价', title: '单价', width: 200 }
                , { field: '金额', title: '金额', width: 200 }
                , { field: '设计寿命', title: '设计寿命', width: 200 }
                , { field: '使用寿命', title: '使用寿命', width: 200 }
                , { field: '剩余寿命', title: '剩余寿命', width: 200 }
                , { field: 'HWHID1', title: 'HWHID1', width: 200, hide: true }
                , { field: '收料仓库代码', title: '收料仓库代码', width: 200 }
                , { field: '收料仓库名称', title: '收料仓库名称', width: 200 }
                , { field: 'HSPID', title: 'HSPID', 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 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 }
                , { 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 }
                , { field: '行关闭人', title: '行关闭人', width: 200 }
                , { field: '关闭类型', title: '关闭类型', width: 200 }
                , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                , { field: '源单单号', title: '源单单号', width: 200 }
                , { field: '源单类型', title: '源单类型', width: 200 }
            ];
            var newColumns = [];
            var colWidth = getColumnsWidth();
            if (colWidth == "" || colWidth == []) {
            }
            else
            {
                $.each(columns, function (x, m) {
                    m["width"] = colWidth[x];
                });
            }
            var option = {
                elem: '#mainTable'
                , toolbar: '#toolbarDemo'
                , page: true
                , cellMinWidth: 90
                , cellMinWidth: 120
                , totalRow: true
                ,limit: 10
                , cols: [[
                    { type: 'checkbox', fixed: 'left' }
                    , { field: 'hmainid', title: '单据ID', hide: true }
                    , { field: '日期', title: '日期', width: 160, totalRowText: '合计', templet: "<div>{{d.日期 ==null ?'':layui.util.toDateString(d.日期, 'yyyy-MM-dd')}}</div>" }
                    , { field: '单据号', title: '单据号', width: 160 }
                    , { field: '单据类型', title: '单据类型', width: 160 }
                    , { field: 'HManagerID', title: 'HManagerID', width: 200, hide: true }
                    , { field: '负责人代码', title: '负责人代码', width: 200 }
                    , { field: '负责人名称', title: '负责人名称', width: 200 }
                    , { field: 'HWHID', title: 'HWHID', width: 200, hide: true }
                    , { field: '仓库代码', title: '仓库代码', width: 200 }
                    , { field: '仓库名称', title: '仓库名称', width: 200 }
                    , { field: 'HSecManagerID', title: 'HSecManagerID', width: 200, 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: 115 }
                    , { 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: 'HPropertyID', title: 'HPropertyID', width: 200, hide: true }
                    , { field: '辅助属性代码', title: '辅助属性代码', width: 200 }
                    , { field: '辅助属性名称', title: '辅助属性名称', width: 200 }
                    , { field: 'HSecUnitID', title: 'HSecUnitID', width: 200, hide: true }
                    , { field: '辅助计量单位代码', title: '辅助计量单位代码', width: 200 }
                    , { field: '辅助计量单位名称', title: '辅助计量单位名称', width: 200 }
                    , { field: '换算率', title: '换算率', width: 200 }
                    , { field: '批次', title: '批次', width: 200 }
                    , { field: '实收数量', title: '实收数量', width: 200, totalRow: true }
                    , { field: '单价', title: '单价', width: 200 }
                    , { field: '金额', title: '金额', width: 200 }
                    , { field: '设计寿命', title: '设计寿命', width: 200 }
                    , { field: '使用寿命', title: '使用寿命', width: 200 }
                    , { field: '剩余寿命', title: '剩余寿命', width: 200 }
                    , { field: 'HWHID1', title: 'HWHID1', width: 200, hide: true }
                    , { field: '收料仓库代码', title: '收料仓库代码', width: 200 }
                    , { field: '收料仓库名称', title: '收料仓库名称', width: 200 }
                    , { field: 'HSPID', title: 'HSPID', 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 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 }
                    , { 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 }
                    , { field: '行关闭人', title: '行关闭人', width: 200 }
                    , { field: '关闭类型', title: '关闭类型', width: 200 }
                    , { field: '源单主内码', title: '源单主内码', width: 200, hide: true }
                    , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                    , { field: '源单单号', title: '源单单号', width: 200 }
                    , { field: '源单类型', title: '源单类型', width: 200 }
                ]]
                , limit: 10
                , cols: [columns]
                , done: function (res, curr, count) {
                   
                    //然后把值写上去td[data-field="itemNo" å®šä¹‰åœ¨å“ªä¸ªåˆ—后显示
@@ -217,6 +234,8 @@
                            
                    //    }))
                    //})
                }
            };
            var index = layer.load(0);
@@ -393,6 +412,66 @@
                            layer.msg('请选择一行数据反审核!');
                        }
                        break;
                    case 'btn-Cell': //保存列宽
                        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: true,
                            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 });
                            }
                        });
                        break;
                    case 'btn-RefreshCell':   //默认列宽
                        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: true,
                            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 });
                            }
                        });
                        break;
                };
            });
@@ -516,7 +595,34 @@
            //以上是layui模块
        });
        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;
        }
    </script>