yusijie
2024-04-25 3de6a9eb5d6c00a756831fbab13da264c198ece7
WebTM/views/²Ö´æ¹ÜÀí/·Ö²½Ê½µ÷Èëµ¥/Fb_StepFoldinBillEdit.html
@@ -310,6 +310,8 @@
            var year = date.getFullYear();
            var shijian = year + "-" + month + "-" + day;
            var allVal;
            //双击返回全局变量
            window.OptionData = {};
            //#endregion
@@ -756,15 +758,19 @@
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                              , end: function () {
                                    obj.update({
                                     "HMaterID" :OptionData.HMaterID
                                        ,"物料代码" : OptionData.物料代码
                                       , "物料名称" :OptionData.物料名称
                                        ,"规格型号" : OptionData.规格型号
                                        ,"HUnitID" :OptionData.HUnitID
                                        ,"计量单位" : OptionData.计量单位名称
                                })
                                , end: function () {
                                    if (OptionData.length>0) {
                                        obj.update({
                                            "HMaterID": OptionData.HMaterID
                                            , "物料代码": OptionData.物料代码
                                            , "物料名称": OptionData.物料名称
                                            , "规格型号": OptionData.规格型号
                                            , "HUnitID": OptionData.HUnitID
                                            , "计量单位": OptionData.计量单位名称
                                        })
                                        OptionData = [];
                                    }
                                }
                            })
                        }
@@ -795,11 +801,15 @@
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                             , end: function () {
                                obj.update({
                                    "HUnitID": OptionData.HItemID
                                    , "计量单位": OptionData.计量单位名称
                                })
                                , end: function () {
                                    if (OptionData.length > 0) {
                                        obj.update({
                                            "HUnitID": OptionData.HItemID
                                            , "计量单位": OptionData.计量单位名称
                                        })
                                        OptionData = [];
                                    }
                            }
                            })
                        }
@@ -830,11 +840,15 @@
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                                 , end: function () {
                                obj.update({
                                    "HSecUnitID": OptionData.HItemID
                                    , "辅助计量单位": OptionData.辅助属性名称
                                })
                                , end: function () {
                                    if (OptionData.length > 0) {
                                        obj.update({
                                            "HSecUnitID": OptionData.HItemID
                                            , "辅助计量单位": OptionData.辅助属性名称
                                        })
                                        OptionData = [];
                                    }
                            }
                            })
                        }
@@ -848,7 +862,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html', 'yes']
                                , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html?type=Warehouse', 'yes']
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -865,11 +879,15 @@
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                             , end: function () {
                                obj.update({
                                    "HWHID": OptionData.HItemID
                                    , "调入仓库": OptionData.仓库名称
                                })
                                , end: function () {
                                    if (OptionData.length > 0) {
                                        obj.update({
                                            "HWHID": OptionData.HItemID
                                            , "调入仓库": OptionData.仓库名称
                                        })
                                        OptionData = [];
                                    }
                            }
                            })
                        }
@@ -883,7 +901,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html', 'yes']
                                , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html?type=HWHSub', 'yes']
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -900,11 +918,15 @@
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                             , end: function () {
                                obj.update({
                                    "HSCWHID": OptionData.HItemID
                                    , "调出仓库": OptionData.仓库名称
                                })
                                , end: function () {
                                    if (OptionData.length > 0) {
                                        obj.update({
                                            "HSCWHID": OptionData.HItemID
                                            , "调出仓库": OptionData.仓库名称
                                        })
                                        OptionData = [];
                                    }
                            }
                            })
                        }
@@ -954,7 +976,29 @@
                        if (checkStatus.data.length == 0) {
                            return layer.msg("请至少选择一条数据!");
                        }
                        layer.alert("你已选择" + checkStatus.data.length + "条数据");
                        //layer.alert("你已选择" + checkStatus.data.length + "条数据");
                        //未审核 å·²å…³é—­çš„单子不允许下推
                        for (var i = 0; i < checkStatus.data.length; i++) {
                            var temp = getPushSource_ICStockInBillInit(checkStatus.data[i].hmainid, checkStatus.data[i].hsubid);
                            if (temp != "none") {
                                if (temp.状态 != "已审核") {
                                    layer.msg("下推失败!单据号【" + temp.单据号 + "】单据状态不为已审核状态!");
                                    layer.close(index);//关闭弹窗
                                    return;
                                }
                                if (temp.行状态 != "") {
                                    layer.msg("下推失败!单据号【" + temp.单据号 + "】下选中的记录中存在已关闭状态的记录!");
                                    layer.close(index);//关闭弹窗
                                    return;
                                }
                            } else {
                                return;
                            }
                        }
                        //获取分步式调入单通知单代码
                        var ProcessNumber = [];
                        for (var i = 0; i < checkStatus.data.length; i++) {
@@ -988,7 +1032,7 @@
                                , "HSecManagerName": data.验收
                                , "HKeeperID": data.HKeeperID
                                , "HKeeperName": data.保管员
                                , "HSourceBillType": data.源单类型
                                //, "HSourceBillType": data.单据类型
                            });
@@ -999,7 +1043,7 @@
                                    "HUnitID": checkStatus.data[j].HUnitID, "计量单位": checkStatus.data[j].计量单位, "HQtyMust": checkStatus.data[j].应收数量,
                                    "HQty": checkStatus.data[j].实收数量, "HPrice": checkStatus.data[j].单价, "HBatchNo": checkStatus.data[j].批次, "HRemark": checkStatus.data[j].表体备注,
                                    "HMoney": checkStatus.data[j].金额, "HOrderPrice": checkStatus.data[j].采购金额, "HWHID": checkStatus.data[j].HWHID, "调入仓库": checkStatus.data[j].调入仓库, "HSCWHID": checkStatus.data[j].HSCWHID, "调出仓库": checkStatus.data[j].调出仓库,
                                    "HSourceBillNo": checkStatus.data[j].单据号, "HSourceBillType": checkStatus.data[j].HBillType, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid,
                                    "HSourceBillNo": checkStatus.data[j].单据号, "HSourceBillType": checkStatus.data[j].单据类型, "HSourceInterID": checkStatus.data[j].hmainid, "HSourceEntryID": checkStatus.data[j].hsubid,
                                })
                                j++;
                            }
@@ -1252,7 +1296,7 @@
                $.ajax({
                    type: "get",
                    async: false,
                    data: { "HName": HName },
                    data: { "HName": HName, "Num": 2 },       //0蓝单 1红单 2不分红蓝单
                    url: GetWEBURL() + "/Web/GetHSourceBillType",
                    success: function (result) {
                        var HSourceBillTypes = "";
@@ -1266,6 +1310,33 @@
                        }
                    }
                })
            }
            //#endregion
            //#region æ ¹æ®ä¸»å†…码与子内码获取源单采购入库单数据
            function getPushSource_ICStockInBillInit(HSourceInterID, HSourceEntryID) {
                var res = "none";
                $.ajax({
                    url: GetWEBURL() + "/Kf_StepFoldInBill/loadKf_ICStockBillMain_Push",
                    async: false,
                    type: "GET",
                    data: {
                        "HInterID": HSourceInterID
                        , "HSubID": HSourceEntryID
                    },
                    success: function (result) {
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            res = result.data[0];
                        } else {
                            res = result.data;
                            //layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }, error: function () {
                        res = "none";
                        layer.alert("发生错误!", { icon: 5 });
                    }
                });
                return res;
            }
            //#endregion
@@ -1332,10 +1403,14 @@
             OptionData = data
         }
           //双击返回收料仓库
         function GetGyWarehouse(data) {
             OptionData = data
         }
        //双击返回调入仓库
        function GetGyWarehouse(data) {
            OptionData = data[0]
        }
        //双击返回调出仓库
        function GetHWHSubValue(data) {
            OptionData = data[0]
        }
    </script>
</body>
</html>