chenhaozhe
2025-05-07 0fdf92335abc659f66fabb7552e01b466aa5bb21
WebTM/views/Éú²ú¹ÜÀí/Èռƻ®»ù´¡×ÊÁÏ/Cg_PODemandPlanConfigBill_Add.html
@@ -14,38 +14,6 @@
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <style>
        .main-btn { /*头部主按钮*/
            padding: 0 2px; /*调整按钮左右空隙大小*/
            height: 30px;
            line-height: 30px;
        }
        .btn-title {
            font-size: 16px;
        }
        /* é˜²æ­¢ä¸‹æ‹‰æ¡†çš„下拉列表被隐藏---必须设置--- */
        .layui-table-cell {
            overflow: visible !important;
        }
        /* ä½¿å¾—下拉框与单元格刚好合适 */
        td .layui-form-select {
            margin-top: -10px;
            margin-left: -15px;
            margin-right: -15px;
        }
        .layui-form-item .layui-inline {
            margin-top: 5px;
            margin-bottom: 5px;
            margin-right: 0px;
        }
        .layui-form-label {
            width: 25%;
        }
    </style>
</head>
<body>
    <div class="layui-fluid" style="padding: 0;">
@@ -102,7 +70,7 @@
    </script>
    <script>
        var HDataEmp = {};
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
@@ -170,6 +138,7 @@
                , toolbar: '#toolbarDemo'
                , limit: 500 //每页默认显示的数量
                , cellMinWidth: 120
                , totalRow: true
                , height: 'full-170'
                , cols: [[ //表头
                    { type: 'checkbox', totalRowText: '合计行' }
@@ -182,14 +151,14 @@
                    , { field: 'HMaterName', title: '物料名称' }
                    , { field: 'HMaterModel', title: '规格型号'}
                    , { field: 'HJITMaterGroup', title: 'JIT物料分类', edit: 'text' }
                    , { field: 'HJITSafeStock', title: 'JIT拉动安全库存量', edit: 'text', width: 200 }
                    , { field: 'HJITMaterDemand', title: 'JIT物料需求供货周期', edit: 'text', width:200}
                    , { field: 'HJITBatchQty', title: 'JIT提货批量', edit: 'text' }
                    , { field: 'HDeliveryPeriod', title: 'JIT提货批量对应周期(天)', edit: 'text', width: 200}
                    , { field: 'HLeadTime', title: 'JIT供货提前期(天)', edit: 'text', width: 200 }
                    , { field: 'HLeadTime_Sec', title: 'JIT到货前置期(天)', edit: 'text', width: 200}
                    , { field: 'HJITSafeStock', title: 'JIT拉动安全库存量', edit: 'text', width: 200, totalRow: true}
                    , { field: 'HJITMaterDemand', title: 'JIT物料需求供货周期', edit: 'text', width: 200, totalRow: true}
                    , { field: 'HJITBatchQty', title: 'JIT提货批量', edit: 'text', totalRow: true}
                    , { field: 'HDeliveryPeriod', title: 'JIT提货批量对应周期(天)', edit: 'text', width: 200, totalRow: true}
                    , { field: 'HLeadTime', title: 'JIT供货提前期(天)', edit: 'text', width: 200, totalRow: true }
                    , { field: 'HLeadTime_Sec', title: 'JIT到货前置期(天)', edit: 'text', width: 200, totalRow: true}
                    , { field: 'HDeliveryMode', title: 'JIT送货方式', edit: 'text' }
                    , { field: 'HDeliveryDaysCtrl', title: 'JIT送货控制天数', edit: 'text', width: 200 }
                    , { field: 'HDeliveryDaysCtrl', title: 'JIT送货控制天数', edit: 'text', width: 200, totalRow: true}
                    , { field: 'HRemark', title: '备注', edit: 'text' }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ]]
@@ -253,11 +222,14 @@
            //退出
            form.on('submit(Cancel)', function () {
                if ((OperationType == 1 ) || OperationType == 3) {
                    Pub_Close(1);
                } else {
                    Pub_Close(2);
                }
                //逻辑删除方法
                layer.confirm("退出前请确保数据已保存,是否继续退出?", { title: "退出确认" }, function (index) {
                    if ((OperationType == 1) || OperationType == 3) {
                        Pub_Close(1);
                    } else {
                        Pub_Close(2);
                    }
                })
            })
            //保存提交
@@ -295,6 +267,7 @@
                                Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
                            }
                            $("#HPRDORGID").append(Organization);
                            $("#HPRDORGID").val(sessionStorage["OrganizationID"]);
                            form.render('select');
                        }
                        layer.closeAll("loading");
@@ -348,7 +321,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ["../../Baseset/基础资料/Gy_SupplierList.html", "yes"]
                                , content: ['../../基础资料/采购基础资料/Gy_Supplier.html?Type=HSup', "yes"]
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -361,15 +334,27 @@
                                    //更新表格缓存的数据
                                    obj.update({
                                        "HSupplierID": checkStatus.data[0].HItemID
                                        , "HSupplierNumber": checkStatus.data[0].HNumber
                                        , "HSupplierName": checkStatus.data[0].HName
                                        , "HSupplierNumber": checkStatus.data[0].供应商代码
                                        , "HSupplierName": checkStatus.data[0].供应商名称
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                                , end: function () {
                                    if (typeof (HDataEmp.HItemID) != "undefined") {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "HSupplierID": HDataEmp.HItemID
                                            , "HSupplierNumber": HDataEmp.供应商代码
                                            , "HSupplierName": HDataEmp.供应商名称
                                        })
                                        HDataEmp = {};
                                    }
                                }
                            })
                        }
                        //物料
                        if (obj.event == "HMaterID") {
                            var HOrgID = $("#HPRDORGID").val();
                            //打开物料  å°çª—体
                            layer.open({
                                type: 2
@@ -379,7 +364,7 @@
                                , shift: 2 //弹出动画
                                , area: ["90%", "90%"] //窗体大小
                                , maxmin: true //设置最大最小按钮是否显示
                                , content: ["../../Baseset/基础资料/Gy_MaterialList.html", "yes"]
                                , content: ['../../基础资料/公用基础资料/Gy_Material.html?openType=2&HOrgID=' + HOrgID, 'yes']
                                , btn: ["确定", "取消"]
                                , btn1: function (index, laero) {
                                    //按钮一  çš„回调
@@ -393,11 +378,23 @@
                                    //更新表格缓存的数据
                                    obj.update({
                                        "HMaterID": checkStatus.data[0].HItemID
                                        , "HMaterNumber": checkStatus.data[0].HNumber
                                        , "HMaterName": checkStatus.data[0].HName
                                        , "HMaterModel": checkStatus.data[0].HModel
                                        , "HMaterNumber": checkStatus.data[0].物料代码
                                        , "HMaterName": checkStatus.data[0].物料名称
                                        , "HMaterModel": checkStatus.data[0].规格型号
                                    })
                                    layer.close(index);//关闭弹窗
                                }
                                , end: function () {
                                    if (typeof (HDataEmp.HItemID) != "undefined") {
                                        //更新表格缓存的数据
                                        obj.update({
                                            "HMaterID": HDataEmp.HItemID
                                            , "HMaterNumber": HDataEmp.物料代码
                                            , "HMaterName": HDataEmp.物料名称
                                            , "HMaterModel": HDataEmp.规格型号
                                        })
                                        HDataEmp = {};
                                    }
                                }
                            })
                        }
@@ -422,7 +419,7 @@
                        form.val("formData", { //formTest å³ class="layui-form" æ‰€åœ¨å…ƒç´ å±žæ€§ lay-filter="" å¯¹åº”的值
                            "HBillNo": d.data[0].单据号
                            , "HInterID": d.data[0].hmainid
                            , "HPRDORGID": d.data[0].组织
                            , "HPRDORGID": d.data[0].HOrgID
                        });
                        var rowdata = [];
@@ -484,7 +481,14 @@
        });
        function GetHSupNameValue(obj) {
            HDataEmp = obj[0];
        }       //供应商
        function GetGyMaterial(obj)           //物料名称
        {
            HDataEmp = obj;
        }
    </script>
</body>
</html>