WebTM/views/ÁìÁÏ·¢»õ/ÏúÊÛ³ö¿â/Kf_SellOutBill.html
@@ -422,6 +422,7 @@
    <script>
        //#region æŠ˜å æ³¨é‡Š
        var HDataTemp = {};
        //#endregion
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
@@ -1188,7 +1189,7 @@
                    , area: ['90%', '90%']//大小
                    , title: '发货人列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html', 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HSecManager', 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -1213,7 +1214,7 @@
                    , area: ['90%', '90%']//大小
                    , title: '仓管列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html', 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -1286,6 +1287,20 @@
                        layer.close(index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                    , btn2: function (index, layero) { }
                    , end: function () {
                        if (HDataTemp != {}) {
                            //根据表头 å‡ºåº“仓库 å¸¦å‡ºå­è¡¨ å‘货仓库
                            for (var i = 0; i < option.data.length; i++) {
                                if (option.data[i].HWHID + "" == "0") {
                                    option.data[i].HWHID = HDataTemp.HItemID;
                                    option.data[i].发货仓库 = HDataTemp.仓库名称;
                                }
                            }
                            table.render(option);
                            HDataTemp = {};
                        }
                    }
                })
            }
            //#endregion
@@ -2009,6 +2024,8 @@
                    if (event.key == "F7") {
                        //物料
                        if (obj.event == "HMaterID") {
                            var HOrgID = $("#HOrgID").val();
                            layer.open({
                                type: 2
                                , skin: "layui-layer-rim" //加上边框
@@ -2017,7 +2034,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ['../../基础资料/公用基础资料/Gy_Material.html', 'yes']
                                , content: ['../../基础资料/公用基础资料/Gy_Material.html?openType=2&HOrgID=' + HOrgID, 'yes']
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -2038,6 +2055,20 @@
                                        , "计量单位": checkStatus.data[0].计量单位名称
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                                , end: function () {
                                    if (HDataTemp != {}) {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "HMaterID": HDataTemp.HItemID
                                            , "物料代码": HDataTemp.物料代码
                                            , "物料名称": HDataTemp.物料名称
                                            , "规格型号": HDataTemp.规格型号
                                            , "HUnitID": HDataTemp.HUnitID
                                            , "计量单位": HDataTemp.计量单位名称
                                        })
                                        HDataTemp = {};
                                    }
                                }
                            })
                        }
@@ -2068,6 +2099,16 @@
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                                , end: function () {
                                    if (HDataTemp != {}) {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "HUnitID": HDataTemp.HItemID
                                            , "计量单位": HDataTemp.计量单位名称
                                        })
                                        HDataTemp = {};
                                    }
                                }
                            })
                        }
                        //发货仓库
@@ -2080,7 +2121,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html', 'yes']
                                , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html?Type=HSubWHID', 'yes']
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -2096,6 +2137,16 @@
                                        , "HWHID": checkStatus.data[0].HItemID
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                                , end: function () {
                                    if (HDataTemp != {}) {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "HWHID": HDataTemp.HItemID
                                            , "发货仓库": HDataTemp.仓库名称
                                        })
                                        HDataTemp = {};
                                    }
                                }
                            })
                        }
@@ -2158,9 +2209,25 @@
            //#region åœ¨æœ«å°¾å¢žåŠ ä¸€è¡Œ
            function btnAddLine(NewRow) {
                if (option.data.length > 0) {
                    NewRow.HisStockGoods = option.data[0]["HisStockGoods"];
                } else {
                    NewRow.HisStockGoods = "false";
                }
                table.cache["mainTable"].push(NewRow);
                option.data = table.cache["mainTable"];
                table.render(option);
                //刷新表格同时根据option中HisStockGoods值设置下拉列表
                setSelectHisStockGoodsByTableRender();
                //根据是否取库存获取定金比例
                //setHEarnestRateByHisStockGoods();
                //设置表头所需金额
                set_HBillMoney($("#HEarnestRate").val() * 1);
                //rows++;
                layer.msg('增加一行按钮!')
            }
@@ -2700,8 +2767,9 @@
        function GetHWHValue(obj)  //返回仓库
        {
            //$("#HWHName").val(obj[0].HName);
            //$("#HWHID").val(obj[0].HItemID);
            $("#HWHName").val(obj[0].仓库名称);
            $("#HWHID").val(obj[0].HItemID);
            HDataTemp = obj[0];
        }
        function GetSellStyleValue(obj)  //返回销售方式
@@ -2712,13 +2780,13 @@
        function GetHKeeperValue(obj)  //返回保管员
        {
            $("#HKeeperName").val(obj[0].HName);
            $("#HKeeperName").val(obj[0].职员名称);
            $("#HKeeperID").val(obj[0].HItemID);
        }
        function GetHWorkerValue(obj)  //返回发货人(操作工)
        function GetHSecManagerValue(obj)  //返回发货人(操作工)
        {
            $("#HSecManagerName").val(obj[0].HName);
            $("#HSecManagerName").val(obj[0].职员名称);
            $("#HSecManagerID").val(obj[0].HItemID);
        }
@@ -2739,6 +2807,21 @@
            $("#HWHID").val(obj[0].HItemID);
        }
        function GetMaterValue(obj)           //物料名称
        {
            HDataTemp = obj[0];
        }
        function GetUnitValue(obj)           //计量单位
        {
            HDataTemp = obj[0];
        }
        function GetHSubWHValue(obj)  //子表发货仓库
        {
            HDataTemp = obj[0];
        }
        //#region æ ¹æ®å®¢æˆ·èŽ·å–å¸åˆ«ã€æ±‡çŽ‡ã€ç»“ç®—æ–¹å¼ã€å®¢æˆ·ä¿¡ç”¨é¢åº¦ã€è”ç³»äººã€è”ç³»ç”µè¯
        function getCustomerByCusID(HCusID) {
            $.ajax({