yangle
2022-12-19 dfd5eae1fc5e23550aee7782ee82a9b7ac476e75
寿命调整单 日期显示
寿命调整单 单据 新寿命 未保存进去
2个文件已修改
177 ■■■■ 已修改文件
WebTM/views/模治具管理/模治具仓库管理/Sc_Add_MouldLifeChangeBillList.html 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/模治具管理/模治具仓库管理/Sc_MouldLifeChangeBillList.html 159 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_Add_MouldLifeChangeBillList.html
@@ -202,21 +202,21 @@
                    , { 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: 'HMaterName', title: '器具名称', width: 100 }
                    , { field: 'HMaterSpec', title: '规格型号', width: 100 }
                    , { field: 'HPropertyID', title: 'HPropertyID', edit: 'text', width: 100, hide: true }
                    , { field: 'HPropertyCode', title: '辅助属性代码', edit: 'text', event: 'HPropertyCode', width: 100 }
                    , { field: 'HPropertyName', title: '辅助属性', edit: 'text', width: 100 }
                    , { field: 'HPropertyName', title: '辅助属性', 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: 'HSecUnitName', title: '辅助计量单位', width: 100 }
                    , { field: 'HSecUnitRate', 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: 'HUnitName', title: '计量单位', width: 100 }
                    , { field: 'HDesignLife', title: '设计寿命', edit: 'text', width: 100 }
                    , { field: 'HLeaveLife', title: '原剩余寿命', edit: 'text', width: 100 }
                    , { field: 'HNewLife', title: '新剩余寿命', edit: 'text', width: 100 }
                    , { field: 'HNewLeaveLife', title: '新剩余寿命', edit: 'text', width: 100 }
                    , { field: 'HRemark', title: '表体备注', edit: 'text', width: 100 }
                ]]
                , limit: 500 //每页默认显示的数量
@@ -224,7 +224,7 @@
            //判断是否新增
            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": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HNewLife": 0, "HRemark": "" }];
                option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HNewLeaveLife": 0, "HRemark": "" }];
                table.render(option);
            }
            else {
@@ -260,7 +260,7 @@
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;;
                var AddRow = table.cache['mainTable'];
                var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HNewLife": 0, "HRemark": "" };
                var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HPropertyID": 0, "HPropertyCode": "", "HPropertyName": "", "HSecUnitID": 0, "HSecUnitCode": "", "HSecUnitName": "", "HSecUnitRate": 0, "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HNewLeaveLife": 0, "HRemark": "" };
                switch (obj.event) {
                    case 'btn-AddLine':
                        //table.cache["mainTable"].push(AddRow[rows]);
@@ -340,7 +340,7 @@
                                        HMaterName: checkStatus.data[0].HName,
                                        HMaterSpec: checkStatus.data[0].HModel,
                                        HLeaveLife: checkStatus.data[0].HLeaveLife,
                                        HNewLife: checkStatus.data[0].HNewLife,
                                        HNewLeaveLife: checkStatus.data[0].HNewLife,
                                        HDesignLife: checkStatus.data[0].HDesignLife,  //设计寿命
                                    });
WebTM/views/Ä£Öξ߹ÜÀí/Ä£Öξֿ߲â¹ÜÀí/Sc_MouldLifeChangeBillList.html
@@ -128,6 +128,8 @@
    <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>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
@@ -145,78 +147,81 @@
                , util = layui.util
            //查询条件
            var sWhere = "";
            var option = [];
            //var option = {
            //    elem: '#mainTable'
            //    , toolbar: '#toolbarDemo'
            //    , height: 550
            //    , page: true
            //    , cellMinWidth: 90
            //    , limits: [50, 500, 5000, 20000]
            //    , limit: 50
            //    , cols: [[
            //        { 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: 'HEmID', title: 'HEmID', width: 200, hide: true }
            //        , { field: '调整人代码', title: '调整人代码', width: 200 }
            //        , { field: '调整人', title: '调整人', width: 200 }
            //        , { field: 'HMangerID', title: 'HEmID', 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: 115 }
            //        , { field: '摘要', title: '摘要', width: 200 }
            //        , { field: '内部单据号', title: '内部单据号', width: 115 }
            //        , { field: '备注', title: '备注', width: 200 }
            //        , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
            //        , { 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: 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: 'Hunitid', title: 'Hunitid', 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: '制单人', 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, hide: true }
            //        , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
            //        , { field: '源单单号', title: '源单单号', width: 200 }
            //        , { field: '源单类型', title: '源单类型', width: 200 }
            //    ]]
            //};
            var option = {
                elem: '#mainTable'
                , toolbar: '#toolbarDemo'
                , height: 'full-50'
                , page: true
                , cellMinWidth: 90
                , limits: [50, 500, 5000, 20000]
                , limit: 50
                , cols: [[
                    { 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: 'HEmID', title: 'HEmID', width: 200, hide: true }
                    , { field: '调整人代码', title: '调整人代码', width: 200 }
                    , { field: '调整人', title: '调整人', width: 200 }
                    , { field: 'HMangerID', title: 'HEmID', 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: 115 }
                    , { field: '摘要', title: '摘要', width: 200 }
                    , { field: '内部单据号', title: '内部单据号', width: 115 }
                    , { field: '备注', title: '备注', width: 200 }
                    , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
                    , { 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: 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: 'Hunitid', title: 'Hunitid', 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: '制单人', 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, hide: true }
                    , { field: '源单子内码', title: '源单子内码', width: 200, hide: true }
                    , { field: '源单单号', title: '源单单号', width: 200 }
                    , { field: '源单类型', title: '源单类型', width: 200 }
                ]]
            };
            var HModName = "Sc_MouldLifeChangeBillList";
            var col = [];
            var titleData = ["单据ID", "HEmID", "HEmID", "HDeptID", "hsubid", "HMaterID", "HPropertyID", "HSecUnitID", "Hunitid", "源单主内码", "源单类型","hmainid","HEmpID","HMangerID","HUnitID","HBillType"];//不需要显示的字段 å¯æ‰©å±•
            var index = layer.load(0);
            //初始化表格
            DisPlay_HideColumn();
          //初始化时间
            $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
            $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
            //头工具栏事件
            table.on('toolbar(mainTable)', function (obj) {
@@ -320,20 +325,8 @@
                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                url: GetWEBURL() + '/Sc_MouldLifeChangeBill/GetMouldLifeChangeBill',
                type: "GET",
                async: false,
                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
                //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 });
                //}
                success: function (data1) {
                    if (data1.count == 1) {
                        var data = [];
@@ -365,7 +358,7 @@
                            , toolbar: '#toolbarDemo'
                            , cols: [col]
                            , data: data1.data
                            , height: 550
                            , height: 800
                            , page: true
                            , cellMinWidth: 90
                            , limit: 50
@@ -390,11 +383,13 @@
                    layer.alert("接口请求失败!", { icon: 5 });
                }
            });
              //初始化表格
            DisPlay_HideColumn();
            //重置按钮
            form.on('submit(btnReSearch)', function (data) {
                $("#HDate").val("");//开始日期
                $("#HDate1").val("");//结束日期
                $("#HDate").val(Format(new Date(new Date() - 1000 * 60 * 60 * 24 * 30), "yyyy-MM-dd"));
                $("#HDate1").val(Format(new Date(), "yyyy-MM-dd"));
                $("#HBillNo").val("");//单据号
                $("#ColContent").val("");
                $("#ColName").val("0");