分布式调出单:编辑页面 增加 双击选择物料功能,增加 物料编码列 输入字符 弹出下拉框选择功能
2个文件已修改
160 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/JFTM.pubxml.user 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/领料发货/分步式调出单/Fb_StepFoldOutBillEdit.html 158 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -7240,7 +7240,7 @@
      <publishTime>09/14/2023 13:59:10</publishTime>
    </File>
    <File Include="views/领料发货/分步式调出单/Fb_StepFoldOutBillEdit.html">
      <publishTime>11/21/2024 09:11:35</publishTime>
      <publishTime>11/21/2024 10:16:51</publishTime>
    </File>
    <File Include="views/领料发货/分步式调出单/Fb_StepFoldOutBillList.html">
      <publishTime>09/13/2024 15:42:13</publishTime>
WebTM/views/ÁìÁÏ·¢»õ/·Ö²½Ê½µ÷³öµ¥/Fb_StepFoldOutBillEdit.html
@@ -275,6 +275,12 @@
    </script>
    <script>
        //#region æ–‡æœ¬æ¡†è¾“入搜索相关数据-变量
        var childPage = null;                       //获取子窗口对象,用于操作子窗口的变量和方法
        var currRowIndex = 0;                       //用于定位子窗口当前选中的行
        var childData = null;                       //用于获取子窗口返回的数据
        //#endregion
        //#region æŠ˜å æ³¨é‡Š
        //#endregion
        layui.config({
@@ -1024,6 +1030,105 @@
            //行内快捷键筛选
            function set_GridCellCheck(obj) {
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    //#region å­è¡¨æ–‡æœ¬æ¡†è¾“入后检索数据
                    if (event.key != "F7") {
                        var errKeys = ["ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight", "Enter"];
                        if (obj.event == "HMaterID") {                           //定位当前正在输入的文本框的列名
                            if ($.inArray(event.key, errKeys) == -1) {              //如果按下的键位不是 æ–¹å‘键,则刷新弹窗中的数据
                                if (childPage == null) {                            //判断当前子窗口是否已经打开,若未打卡,则打开页面,并获取子窗口的对象
                                    var offset = $(this).offset();                  //获取触发事件的元素的位置,用于定位子窗口打开的位置
                                    var innerHeight = window.innerHeight;
                                    var top = offset.top + 0.05 * innerHeight;
                                    var left = offset.left;
                                    if (top + 0.05 * innerHeight + 0.3 * innerHeight > innerHeight) {
                                        top = top - 0.3 * innerHeight - 0.05 * innerHeight;
                                    }
                                    layer.open({
                                        type: 2                                                                                     //弹窗类型
                                        , skin: 'layui-layer-rim'                                                                   //加上边框
                                        , area: ['25%', '30%']                                                                      //大小
                                        , shadeClose: true                                                                          //点击遮罩时关闭弹窗
                                        , offset: [top, left]
                                        , title: false                                                                              //不显示标题栏
                                        //, title: '项目费用列表'                                                                     //标题
                                        , shift: 2                                                                                  //弹出动画
                                        , closeBtn: 0                                                                               //禁用关闭按钮
                                        , content: ["../../基础资料/通用基础资料/Gy_CommonBaseData.html?OperationType=2", "yes"]
                                        , success: function (layero, index) {
                                            setTimeout(function () {
                                                var value = $(e.currentTarget).val().replace("'", "");                                  //获取文本框最新值
                                                currRowIndex = 0;
                                                var tableView = "h_v_Gy_MaterialList";
                                                var childSWhere = "select top(10) HItemID,物料代码,物料名称,规格型号,HUnitID,计量单位名称 from " + tableView + " where 1=1 and ç»„织名称 = '" + sessionStorage["Organization"] + "' and (物料代码 like '%" + value + "%' or ç‰©æ–™åç§° like '%" + value + "%') order by ç‰©æ–™ä»£ç  desc";
                                                childPage.getData(childSWhere, tableView);
                                            }, 200);
                                        }
                                        , end: function () {
                                            obj.event = "";
                                            childPage = null;
                                            currRowIndex = 0;
                                            if (childData != null) {
                                                obj.update({
                                                    "HMaterID": childData.HItemID
                                                    , "物料代码": childData.物料代码
                                                    , "物料名称": childData.物料名称
                                                    , "规格型号": childData.规格型号
                                                    , "HUnitID": childData.HUnitID
                                                    , "计量单位": childData.计量单位名称
                                                })
                                                childData = null;
                                            }
                                        }
                                    });
                                } else {
                                    setTimeout(function () {
                                        var value = $(e.currentTarget).val().replace("'", "");                                  //获取文本框最新值
                                        currRowIndex = 0;
                                        var tableView = "h_v_Gy_MaterialList";
                                        var childSWhere = "select top(10) HItemID,物料代码,物料名称,规格型号,HUnitID,计量单位名称 from " + tableView + " where 1=1 and ç»„织名称 = '" + sessionStorage["Organization"] + "' and (物料代码 like '%" + value + "%' or ç‰©æ–™åç§° like '%" + value + "%')  order by ç‰©æ–™ä»£ç  desc";
                                        childPage.getData(childSWhere, tableView);
                                    }, 200);
                                }
                            } else {                                                    //如果按下的键位是 æ–¹å‘键,则调整窗口中 é€‰ä¸­è¡Œ çš„位置
                                if (event.key == "ArrowUp") {
                                    currRowIndex--;
                                    childPage.setSelectedRow(currRowIndex);
                                } else if (event.key == "ArrowDown") {
                                    currRowIndex++;
                                    childPage.setSelectedRow(currRowIndex);
                                } else if (event.key == "Enter") {
                                    //手动失焦
                                    var element = document.getElementById("HBillNo");
                                    element.focus();
                                    childPage.getSelectedData(currRowIndex);
                                    if (childData != null) {
                                        obj.update({
                                            "HMaterID": childData.HItemID
                                            , "物料代码": childData.物料代码
                                            , "物料名称": childData.物料名称
                                            , "规格型号": childData.规格型号
                                            , "HUnitID": childData.HUnitID
                                            , "计量单位": childData.计量单位名称
                                        })
                                        childData = null;
                                    }
                                    childPage = null;
                                    currRowIndex = 0;
                                    childData = null;
                                    obj.event = "";
                                }
                            }
                        }
                    }
                    //#endregion
                    if (event.key == "F7") {
                        //物料
                        if (obj.event == "HMaterID") {
@@ -1237,6 +1342,59 @@
                        return false;
                    }
                })
                $(document).off('dblclick', ".layui-table-edit").on('dblclick', '.layui-table-edit', function (e) {
                    //物料
                    if (obj.event == "HMaterID") {
                        layer.open({
                            type: 2
                            , skin: "layui-layer-rim" //加上边框
                            , title: "物料列表"  //标题
                            , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                            , shift: 2 //弹出动画
                            , area: ["90%", "90%"] //窗体大小
                            , maxmin: true //设置最大最小按钮是否显示
                            , content: ['../../基础资料/公用基础资料/Gy_Material.html', 'yes']
                            , btn: ["确定", "取消"]
                            , btn1: function (index, laero) {
                                //按钮一  çš„回调
                                var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
                                var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
                                if (checkStatus.data.length != 1) {
                                    return layer.msg("请选择一条数据");
                                }
                                //更新表格缓存的数据
                                obj.update({
                                    "HMaterID": checkStatus.data[0].HItemID,
                                    "物料代码": checkStatus.data[0].物料代码,
                                    "物料名称": checkStatus.data[0].物料名称,
                                    "规格型号": checkStatus.data[0].规格型号,
                                    "HUnitID": checkStatus.data[0].HUnitID,
                                    "计量单位": checkStatus.data[0].计量单位名称
                                })
                                layer.close(index);//关闭弹窗
                            }
                            , end: function () {
                                if (OptionData != null && OptionData.length == undefined) {
                                    obj.update({
                                        "HMaterID": OptionData.HItemID
                                        , "物料代码": OptionData.物料代码
                                        , "物料名称": OptionData.物料名称
                                        , "规格型号": OptionData.规格型号
                                        , "HUnitID": OptionData.HUnitID
                                        , "计量单位": OptionData.计量单位名称
                                    })
                                    OptionData = [];
                                }
                            }
                        });
                    }
                    obj.event = "";
                    //return false;
                })
            }
            //行内删除