yusijie
2023-10-13 5aca355a95c22aee2ead9eba5c65cf66df022fc4
WebTM/views/Éú²ú¹ÜÀí/ÒªÁϼƻ®/JIT_NeedMaterPlanBillEdit.html
@@ -273,30 +273,7 @@
            //    }, function () { window.location.href = "../../user/login.html"; });
            //}
            var params = getUrlVars();
            var OperationType = params[params[0]]; //从参数中获取 æ•°æ®ç±»åž‹  æ·»åŠ  ä¿å­˜
            var linterid = params[params[1]]; //从参数中获取 å•据内码
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            //判断是否新增
            if (linterid == null || linterid == -1) {
                OperationType = 1;
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '4609' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
                    }
                });
            }
            else {//如果修改则走下面 new
                RoadBillMain(linterid);
                //RoadBillSub(linterid);
            }
            var HModName = "JIT_NeedMaterPlanBill";
            var option = {
                elem: '#mainTable'
@@ -346,10 +323,36 @@
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo' }
                ]]
            }
            //初始加载表格
            option.data = rowdata;
            DisPlay_HideColumn();
            var params = getUrlVars();
            var OperationType = params[params[0]]; //从参数中获取 æ•°æ®ç±»åž‹  æ·»åŠ  ä¿å­˜
            var linterid = params[params[1]]; //从参数中获取 å•据内码
            var lSourceBillType = params[params[2]];  //从单据获取 æºå•类型
            //判断是否新增
            if (linterid == null || linterid == -1) {
                OperationType = 1;
                $.ajax({
                    url: GetWEBURL() + "/Web/GetMAXNum",
                    type: "GET",
                    data: { "HBillType": '4609' },
                    success: function (d) {
                        //console.log(d.data);
                        $("#HInterID").val(d.data[0].HInterID);
                        $("#HBillNo").val(d.data[0].HBillNo);
                        $("#HDate").val(Format(new Date(), "yyyy-MM-dd"));
                    }
                });
            }
            else {//如果修改则走下面 new
                //$("#HProdORGID").attr("disabled", true);
                RoadBillMain(linterid);
                //RoadBillSub(linterid);
            }
            //#endregion
            //#region è§¦å‘事件:包括form.on(){}格式的所有点击事件、选择事件等
@@ -605,6 +608,7 @@
                $.ajax({
                    type: "get",
                    url: GetWEBURL() + "/Web/GetOrganizations",
                    async:false,
                    success: function (result) {
                        if (result.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data;
@@ -612,6 +616,7 @@
                                Organization += '<option  style="color:blue;" value="' + data[i].ID + '">' + data[i].Name + '</option>';
                            }
                            $("#HProdORGID").append(Organization);
                            $("#HProdORGID").val(sessionStorage["OrganizationID"]);
                            form.render('select');
                        }
                        layer.closeAll("loading");
@@ -833,6 +838,8 @@
                                }
                            })
                        }
                        obj.event = "";
                        return false;
                    }
@@ -871,6 +878,7 @@
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    async: false,
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
@@ -956,6 +964,7 @@
                $.ajax({
                    url: GetWEBURL() + "/Sc_WorkDemandPlanBill/Sc_WorkDemandPlanBillList",
                    type: "GET",
                    async: false,
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                    success: function (d) {
@@ -964,7 +973,7 @@
                            "HBillNo": d.data[0].单据号
                            , "HInterID": d.data[0].hmainid
                            , "HAddress": d.data[0].交货地点
                            , "HProdORGID": d.data[0].主生产组织
                            , "HProdORGID": d.data[0].HProdORGID
                            , "HDeptID": d.data[0].HDeptID
                            , "HDeptIDName": d.data[0].车间名称
                            , "HSettleCurrId": d.data[0].HSettleCurrId