duhe
2025-09-17 19e6c5000df386eac36ea3c2e310d3e98ca2cc71
WebTM/views/ÖÊÁ¿¹ÜÀí/PNL¼ìÑéÐÅÏ¢/QC_CheckNote_PNL_TempEdit.html
@@ -261,7 +261,8 @@
            }
            else if (OperationType == 3) {//编辑
                roadBillMain();
            } else if (OperationType == 4) {//直方图新增
            }
            else if (OperationType == 4) {//直方图新增
                set_AddFNew();
                $("#HBarCode").val(HBarCode_PNL);
                $("#HSetNo").val(HSetNo);
@@ -270,12 +271,14 @@
                document.getElementById("HBarCode").setAttribute("disabled", "disabled");
                document.getElementById("HSetNo").setAttribute("disabled", "disabled");
                document.getElementById("HPCSNo").setAttribute("disabled", "disabled");
            } else if (OperationType == 5) {//直方图编辑
            }
            else if (OperationType == 5) {//直方图编辑
                roadBillMain();
                document.getElementById("HBarCode").setAttribute("disabled", "disabled");
                document.getElementById("HSetNo").setAttribute("disabled", "disabled");
                document.getElementById("HPCSNo").setAttribute("disabled", "disabled");
            } else if (OperationType == 6) {//直方图-avi æ–°å¢ž
            }
            else if (OperationType == 6) {//直方图-avi æ–°å¢ž
                set_AddFNew();
                $("#HBarCode").val(HBarCode_PNL);
                $("#HSetNo").val(HSetNo);
@@ -339,6 +342,11 @@
                    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"
                    if (!judgeRepeatDataByPNLAndPCS()) {
                        layer.msg("该PCS已经存在不良记录,禁止重复标记!!", { icon: 5 });
                        return;
                    }
                }
                $.ajax(
                    {
@@ -586,6 +594,37 @@
            }
            //#region åˆ¤æ–­è¯¥PNL下的该PCS是否已经存在不良记录。若存在,则不允许继续生成。
            function judgeRepeatDataByPNLAndPCS() {
                var flag = true;
                var HBarCode_Temp = $("#HBarCode").val();
                var HPCSNo_Temp = $("#HPCSNo").val();
                var sql = "select HBarCode from QC_CheckNote_PNL_Temp where HBarCode = '" + HBarCode_Temp + "' and HPCSNo = '" + HPCSNo_Temp + "' ";
                sql += " union select HBarCode from QC_CheckNote_PNL_His where HBarCode = '" + HBarCode_Temp + "' and HPCSNo = '" + HPCSNo_Temp + "' ";
                var ModRightNameCheck = "";
                $.ajax({
                    url: GetWEBURL() + '/CommonModel/searchMethod',
                    async: false,
                    type: "GET",
                    data: { "sql": sql, "user": sessionStorage["HUserName"], "ModRightNameCheck": ModRightNameCheck },
                    success: function (data1) {
                        if (data1.count == 1) {
                            if (data1.data.length > 0) {
                                flag = false;
                            }
                        } else {
                            flag = false;
                        }
                    }, error: function (e) {
                        flag = false;
                    }
                });
                return flag;
            }
            //#endregion
        });
        //#endregion