yxj
2025-08-27 527ae2316190aad5885bf8f4d2ec2704746e2ac2
WebTM/views/ÖÊÁ¿¹ÜÀí/PNL¼ìÑéÐÅÏ¢/QC_CheckNote_PNL_TempEdit.html
@@ -101,6 +101,7 @@
                                                                <option value="炬森VRS内层" selected="selected">炬森VRS内层</option>
                                                                <option value="炬森VRS外层">炬森VRS外层</option>
                                                                <option value="AVI">AVI</option>
                                                                <option value="MRB">MRB</option>
                                                                <option value="电测">电测</option>
                                                            </select>
                                                        </div>
@@ -214,6 +215,7 @@
            var HBarCode_PNL = params[params[3]]; //PNL条码编号
            var HSetNo = params[params[4]]; //set号
            var HPCSNo = params[params[5]]; //PCS号
            var HBadReason_Params = decodeURIComponent(params[params[6]]) ; //不良原因
        }
        layui.config({
@@ -286,6 +288,36 @@
                document.getElementById("HCheckProc").setAttribute("disabled", "disabled");
                form.render('select');
            }
            else if (OperationType == 7) {//直方图-avi å³å‡»æ–°å¢ž
                set_AddFNew();
                $("#HBarCode").val(HBarCode_PNL);
                $("#HSetNo").val(HSetNo);
                $("#HPCSNo").val(HPCSNo);
                $("#HCheckProc").val("AVI");
                $("#HBadReason").val(HBadReason_Params);
                document.getElementById("HBarCode").setAttribute("disabled", "disabled");
                document.getElementById("HSetNo").setAttribute("disabled", "disabled");
                document.getElementById("HPCSNo").setAttribute("disabled", "disabled");
                document.getElementById("HCheckProc").setAttribute("disabled", "disabled");
                form.render('select');
                saver();
            }
            else if (OperationType == 8) {//直方图-avi å³å‡»æ–°å¢ž
                set_AddFNew();
                $("#HBarCode").val(HBarCode_PNL);
                $("#HSetNo").val(HSetNo);
                $("#HPCSNo").val(HPCSNo);
                $("#HCheckProc").val("MRB");
                $("#HBadReason").val(HBadReason_Params);
                document.getElementById("HBarCode").setAttribute("disabled", "disabled");
                document.getElementById("HSetNo").setAttribute("disabled", "disabled");
                document.getElementById("HPCSNo").setAttribute("disabled", "disabled");
                document.getElementById("HCheckProc").setAttribute("disabled", "disabled");
                form.render('select');
                saver();
            }
            else {
                layer.alert("未知操作类型!", { icon: 5 });
            }
@@ -305,7 +337,7 @@
                let url = GetWEBURL()
                if (OperationType == 3 || OperationType == 5) {
                    url += "/QC_CheckNote_PNL_TempController/EditBill"
                } else if (OperationType == 1 || OperationType == 2 || OperationType == 4 || OperationType == 6) {
                } else if (OperationType == 1 || OperationType == 2 || OperationType == 4 || OperationType == 6 || OperationType == 7 || OperationType == 8) {
                    url += "/QC_CheckNote_PNL_TempController/AddBill"
                }
                $.ajax(
@@ -491,6 +523,63 @@
                });
            }
            //#region ä¿å­˜æ–¹æ³•
            function saver() {
                //获取表单数据
                var data = {};
                var form = document.getElementById('form');
                for (var i = 0; i < form.elements.length; i++) {
                    var element = form.elements[i];
                    if (element.id) { // ç¡®ä¿å…ƒç´ æœ‰name属性
                        data[element.id] = element.value;
                    }
                }
                data['HPageIndex'] = $("#HPageIndex option:selected").data('value');
                var sMainStr = JSON.stringify(data) + ';' + sessionStorage["HUserName"]
                let url = GetWEBURL()
                if (OperationType == 3 || OperationType == 5) {
                    url += "/QC_CheckNote_PNL_TempController/EditBill"
                } else if (OperationType == 1 || OperationType == 2 || OperationType == 4 || OperationType == 6 || OperationType == 7 || OperationType == 8) {
                    url += "/QC_CheckNote_PNL_TempController/AddBill"
                }
                $.ajax({
                    type: "POST",
                    url: url, //方法所在页面和方法名
                    async: false,
                    data: { "oMain": sMainStr },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            layer.msg(data.Message, { icon: 1 });
                            $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
                        }
                        else {
                            f_alert(data.Message);
                            console.log("Reason" + sMainStr);
                        }
                        layer.closeAll("loading");
                    },
                    error: function (err) {
                        f_alert("错误:" + err);
                        console.log("Reason" + sMainStr);
                    }
                });
                if (OperationType == 7 || OperationType == 8) {
                    if (linterid == undefined) {
                        //关闭页签
                        Pub_Close(2);
                    }
                    else {
                        //关闭页签
                        Pub_Close(1);
                    }
                }
            }
            //#endregion
            //
            function f_alert(sMsg) {
                layer.alert(sMsg, { icon: 5 });