yusijie
2024-04-25 3de6a9eb5d6c00a756831fbab13da264c198ece7
WebTM/views/²Ö´æ¹ÜÀí/·Ö²½Ê½µ÷Èëµ¥/Fb_StepFoldinBillEdit.html
@@ -758,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 = [];
                                    }
                                }
                            })
                        }
@@ -797,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 = [];
                                    }
                            }
                            })
                        }
@@ -832,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 = [];
                                    }
                            }
                            })
                        }
@@ -867,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 = [];
                                    }
                            }
                            })
                        }
@@ -902,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 = [];
                                    }
                            }
                            })
                        }
@@ -956,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++) {
@@ -990,7 +1032,7 @@
                                , "HSecManagerName": data.验收
                                , "HKeeperID": data.HKeeperID
                                , "HKeeperName": data.保管员
                                , "HSourceBillType": data.单据类型
                                //, "HSourceBillType": data.单据类型
                            });
@@ -1254,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 = "";
@@ -1271,6 +1313,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
            //#endregion