11
pzy
2024-08-29 61f7f70065a4e1c1de2469b87a7209ffa3358cf2
WebTM/views/ÑéÊÕÈë¿â/Í⹺Èë¿â/Add_Edit_Kf_POStockInBillList.html
@@ -458,7 +458,7 @@
                    , data = checkStatus.data;
                //新增行表格数据
                var NewRow = {
                    "HMaterID": 0, "物料代码": "", "物料名称": "", "规格型号": "", "HUnitID": 0, "计量单位": "", "HQtyMust": "", "HQty": "", "HRemark": "",
                    "HMaterID": 0, "物料代码": "", "物料名称": "", "规格型号": "", "HUnitID": 0, "计量单位": "", "HQtyMust": "0", "HQty": "0", "HRemark": "",
                    "HPrice": "0", "HMoney": "0", "HOrderPrice": "0", "HWHID": 0, "收料仓库": "",
                    "HSPID": 0, "仓位名称": "", "HBatchNo": "", "HPOOrderInterID": 0, "HPOOrderEntryID": 0,
                    "HPOOrderBillNo": "", "HSeOrderInterID": 0, "HSeOrderEntryID": 0, "HSeOrderBillNo": "",
@@ -986,7 +986,7 @@
                        , { field: 'HPrice', title: '单价', width: 100, edit: 'text' }
                        , { field: 'HMoney', title: '金额', width: 100, edit: 'text', totalRow: true }
                        , { field: 'HOrderPrice', title: '采购金额', width: 100, edit: 'text', totalRow: true}
                        , { field: 'HWHID ', title: 'HWHID ', width: 100, hide: true }
                        , { field: 'HWHID', title: 'HWHID', width: 100, hide: true }
                        , { field: '收料仓库', title: '收料仓库', width: 100, edit: 'text', event: "HWHID" }//f7
                        , { field: 'HSPID', title: 'HSPID', width: 100, hide: true }
                        , { field: '仓位名称', title: '仓位名称', width: 100, edit: 'text', event: "HSPID" }//f7
@@ -1114,8 +1114,11 @@
                                var HSourceBillData = getPushSource_POOrderBillInit(option.data[i].HSourceInterID, option.data[i].HSourceEntryID);            //获取源单数据
                                if (HSourceBillData != "none") {
                                    if (HSourceBillData == null) {
                                        layer.alert("保存失败!第" + (i + 1) + "行:未查询到源单单据!", { icon: 5 });
                                        return;
                                        if (option.data[i].HSourceInterID!=0) {
                                            layer.alert("保存失败!第" + (i + 1) + "行:未查询到源单单据!", { icon: 5 });
                                            return;
                                        }
                                    } else if (HSourceBillData.状态 != "已审核") {
                                        var err = "保存失败!原因:第" + (i + 1) + "行-源单单据状态为“" + HSourceBillData.状态 + "”,不允许保存!";
                                        layer.alert(err, { icon: 5 });
@@ -1137,8 +1140,10 @@
                                var HSourceBillData = getPushSource_POInStockBillInit(option.data[i].HSourceInterID, option.data[i].HSourceEntryID);            //获取源单数据
                                if (HSourceBillData != "none") {
                                    if (HSourceBillData == null) {
                                        layer.alert("保存失败!第" + (i + 1) + "行:未查询到源单单据!", { icon: 5 });
                                        return;
                                        if (option.data[i].HSourceInterID != 0) {
                                            layer.alert("保存失败!第" + (i + 1) + "行:未查询到源单单据!", { icon: 5 });
                                            return;
                                        }
                                    } else if (HSourceBillData.状态 != "已审核") {
                                        var err = "保存失败!原因:第" + (i + 1) + "行-源单单据状态为“" + HSourceBillData.状态 + "”,不允许保存!";
                                        layer.alert(err, { icon: 5 });
@@ -1337,7 +1342,8 @@
                    });
                    //子表  èµ‹å€¼
                    var rowdata = [];
                   var rowdata = [];
                    for (var i = 0; i < dataArray.length; i++) {
                        rowdata.push(
                            {
@@ -1347,9 +1353,11 @@
                                , "规格型号": dataArray[i].规格型号
                                , "HUnitID": dataArray[i].HUnitID
                                , "计量单位": dataArray[i].计量单位
                                , "HQty": dealDoubleToFixed(dataArray[i].数量, 1)
                                , "HQty": dealDoubleToFixed(dataArray[i].数量, 2)
                                , "HPrice": dealDoubleToFixed(dataArray[i].单价, 3)
                                , "HTaxPrice": dealDoubleToFixed(dataArray[i].含税单价, 3)
                                , "HQtyMust": dealDoubleToFixed(dataArray[i].数量, 2)
                                , "HOrderPrice": dealDoubleToFixed(dataArray[i].数量 * dataArray[i].单价, 2)
                                , 'HDiscountRate': "0"                                                     //
                                , 'HRelTaxPrice': "0"
                                , "HTaxRate": dataArray[i].税率
@@ -1467,6 +1475,7 @@
                            $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
                            //保存后浏览
                            //ReRoadBillMain();
                            $('#print-btn').prop('disabled', false).removeClass('layui-btn-disabled');
                        }
                        else {
                            layer.alert(data.Message, { icon: 5 });
@@ -1484,13 +1493,14 @@
            ////#endregion
            function get_checkEmp() {
                var HOrgID = $("#HOrgID").val();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '业务员列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HEmp', 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HEmp&HOrgID=' + HOrgID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -1506,13 +1516,14 @@
                })
            }
            function get_checkSup() {
                var HOrgName = $('select[name="HOrgID"] option:selected').text();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '供应商列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/采购基础资料/Gy_Supplier.html?Type=HSup', 'yes']
                    , content: ['../../基础资料/采购基础资料/Gy_Supplier.html?Type=HSup&HOrgName=' + HOrgName, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -1529,13 +1540,14 @@
            }
            //工程项目
            function get_btnHProjectID() {
                var HOrgID = $("#HOrgID").val();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '项目列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../项目管理/工程项目/PM_ProjectBillList.html', 'yes']
                    , content: ['../../项目管理/工程项目/PM_ProjectBillList.html?Type=2&HOrgID=' + HOrgID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -1552,13 +1564,14 @@
                })
            }
            function get_checkWH() {
                var HOrgName = $('select[name="HOrgID"] option:selected').text();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '仓库列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html?Type=HWH', 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html?Type=HWH&HOrgName=' + HOrgName, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -1585,13 +1598,14 @@
                })
            }
            function get_checkSecManager() {
                var HOrgID = $("#HOrgID").val();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '验收员列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HSecManager', 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HSecManager&HOrgID=' + HOrgID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -1607,13 +1621,14 @@
                })
            }
            function get_checkKeeper() {
                var HOrgID = $("#HOrgID").val();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '保管员列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HKeeper', 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HKeeper&HOrgID=' + HOrgID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -1629,13 +1644,14 @@
                })
            }
            function get_checkDept() {
                var HOrgName = $('select[name="HOrgID"] option:selected').text();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '部门列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html', 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_DepartmentList.html?Type=2&HOrgName=' + HOrgName, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -1652,13 +1668,14 @@
            }
            function get_checkManager() {
                var HOrgID = $("#HOrgID").val();
                layer.open({
                    type: 2//弹窗类型
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['90%', '90%']//大小
                    , title: '负责人列表'//标题
                    , shift: 2//弹出动画
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HWorker', 'yes']
                    , content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?Type=HWorker&HOrgID=' + HOrgID, 'yes']
                    , btn: ['确定', '取消']
                    , btn1: function (index, layero) {//按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
@@ -1829,6 +1846,7 @@
                        }
                        //计量单位
                        if (obj.event == "HUnitID") {
                            var HOrgName = $('select[name="HOrgID"] option:selected').text();
                            layer.open({
                                type: 2
                                , skin: "layui-layer-rim" //加上边框
@@ -1837,7 +1855,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ['../../基础资料/公用基础资料/Gy_Unit.html', 'yes']
                                , content: ['../../基础资料/公用基础资料/Gy_Unit.html?Type=2&HOrgName=' + HOrgName, 'yes']
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -1864,6 +1882,7 @@
                        }
                        //收料仓库
                        if (obj.event == "HWHID") {
                            var HOrgName = $('select[name="HOrgID"] option:selected').text();
                            layer.open({
                                type: 2
                                , skin: "layui-layer-rim" //加上边框
@@ -1872,7 +1891,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html?type=Warehouse', 'yes']
                                , content: ['../../基础资料/公用基础资料/Gy_Warehouse.html?type=Warehouse&HOrgName=' + HOrgName, 'yes']
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -2378,7 +2397,10 @@
                for (var i = 1; i < option.cols[0].length - 1; i++) {
                    colName += option.cols[0][i]["field"] + ",";
                }
                var colTitleName = "";
                for (var i = 1; i < option.cols[0].length - 1; i++) {
                    colTitleName += option.cols[0][i]["title"] + ",";
                }
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿›è¡Œç¼–码
                layer.open({
                    type: 2
@@ -2388,7 +2410,7 @@
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName, "yes"]
                    , content: ['../../基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName + '&colTitleName = ' + colTitleName, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
@@ -2666,8 +2688,8 @@
             OptionData = data
         }
           //双击返回计量单位
         function GetGyUnit(data) {
             OptionData = data
        function GetUnitValue(data) {
            OptionData = data[0]
         }
           //双击返回收料仓库