From 527ae2316190aad5885bf8f4d2ec2704746e2ac2 Mon Sep 17 00:00:00 2001
From: yxj <yxj@hz-kingdee.com>
Date: 星期三, 27 八月 2025 09:15:33 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI

---
 WebTM/views/质量管理/PNL检验信息/QC_CheckNote_PNL_TempEdit.html |   91 +++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 90 insertions(+), 1 deletions(-)

diff --git "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/PNL\346\243\200\351\252\214\344\277\241\346\201\257/QC_CheckNote_PNL_TempEdit.html" "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/PNL\346\243\200\351\252\214\344\277\241\346\201\257/QC_CheckNote_PNL_TempEdit.html"
index 1d75e7d..514c6e7 100644
--- "a/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/PNL\346\243\200\351\252\214\344\277\241\346\201\257/QC_CheckNote_PNL_TempEdit.html"
+++ "b/WebTM/views/\350\264\250\351\207\217\347\256\241\347\220\206/PNL\346\243\200\351\252\214\344\277\241\346\201\257/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) { // 纭繚鍏冪礌鏈塶ame灞炴��
+                        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 });

--
Gitblit v1.9.1