From a03addb5fbf4da382275f3c9dff8dbc916c4e021 Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 17 九月 2025 09:52:01 +0800
Subject: [PATCH] 其他出库、其他入库:子表件数可以输入为0 乔一客户物料即时库存报表:把米数和件数的合计加上去 (按生产订单)客户订单:过滤条件改为模糊查询

---
 WebTM/views/生产管理/异常反馈单/OA_ErrMsgBackHandleBillMain.html |  132 ++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 116 insertions(+), 16 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/OA_ErrMsgBackHandleBillMain.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/OA_ErrMsgBackHandleBillMain.html"
index 72515a5..bab962d 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/OA_ErrMsgBackHandleBillMain.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\345\274\202\345\270\270\345\217\215\351\246\210\345\215\225/OA_ErrMsgBackHandleBillMain.html"
@@ -93,7 +93,7 @@
                         </div>
                         <div class="layui-card-body">
                             <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
-                                <h1 style="text-align:center;"><b>寮傚父鍙嶉绛惧埌鍗�</b></h1>
+                                <h1 style="text-align:center;"><b>寮傚父鍙嶉澶勭悊鍗�</b></h1>
                                 <div class="layui-tab-content">
                                     <div class="layui-tab layui-tab-card">
                                         <ul class="layui-tab-title">
@@ -279,9 +279,9 @@
                                                             </div>
                                                         </div>
                                                         <div class="layui-inline">
-                                                            <label class="layui-form-label">鎺ユ敹鏃堕棿:</label>
+                                                            <label class="layui-form-label">澶勭悊瀹屾垚鏃堕棿:</label>
                                                             <div class="layui-input-inline">
-                                                                <input class="layui-input" type="datetime" name="HSignDate" lay-verify="HSignDate" id="HSignDate" autocomplete="off">
+                                                                <input class="layui-input" type="datetime" name="HHandleDate" lay-verify="HHandleDate" id="HHandleDate" autocomplete="off">
                                                             </div>
                                                         </div>
 
@@ -319,6 +319,16 @@
                                                                         <option value="鏃犳硶澶勭悊">鏃犳硶澶勭悊</option>
                                                                     </select>
                                                                 </div>
+                                                            </div>
+                                                        </div>
+                                                        <div class="layui-inline">
+                                                            <label class="layui-form-label">澶勭悊鍘熷洜:</label>
+                                                            <div class="layui-input-inline">
+                                                                <input type="text" name="HBadReasonName" id="HBadReasonName" class="layui-input" value="" style="float:left;width:150px;" disabled>
+                                                                <input type="hidden" name="HBadReasonID" id="HBadReasonID" class="layui-input" value="0" style="float:left;width:150px;">
+                                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="HBadReasonList" id="HBadReasonList" style="width:40px;">
+                                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
+                                                                </button>
                                                             </div>
                                                         </div>
                                                     </div>
@@ -552,13 +562,22 @@
                                     var LoadData = data.data;
                                     $("#HDeptID").val(LoadData[0].HDeptID); //閮ㄩ棬ID
                                     $("#HDeptName").val(LoadData[0].鍙戦�侀儴闂�); //鍙戦�侀儴闂�
+                                    $("#HReceiveID").val(LoadData[0].HRecDeptID); //閮ㄩ棬ID
+                                    $("#HReceiveName").val(LoadData[0].鎺ユ敹閮ㄩ棬); //鎺ユ敹閮ㄩ棬
+                                    $("#HErrMsgBackTypeID").val(LoadData[0].HErrMsgBackTypeID); //寮傚父绫诲瀷鍚嶇ОID
+                                    $("#HErrMsgBackTypeName").val(LoadData[0].寮傚父绫诲瀷鍚嶇О); //寮傚父绫诲瀷鍚嶇О
                                     $("#HSendMan").val(LoadData[0].鍙戦�佷汉); //鍙戦�佷汉
-                                    $("#HReceiveMan").val(LoadData[0].鎺ユ敹浜�); //鎺ユ敹浜�
+                                    $("#HReceiveMan").val(LoadData[0].鎸囨淳澶勭悊浜�); //鎺ユ敹浜�
                                     $("#HCopyMan").val(LoadData[0].鎶勯��); //鎶勯��
                                     $("#HLevel").find("option[value='" + LoadData[0]["绱ф�ョ▼搴�"] + "']").attr("selected", true); //绱ф�ョ▼搴�
                                     $("#HContext").val(LoadData[0].涓婚); //涓婚
                                     $("#HDescription").val(LoadData[0].璇︾粏鍐呭); //璇︾粏鍐呭
                                     $("#HMaterName").val(LoadData[0].鐗╂枡鍚嶇О); //浜у搧鍚嶇О
+                                    $("#HMaterModel").val(LoadData[0].瑙勬牸鍨嬪彿); //瑙勬牸鍨嬪彿
+                                    $("#HEquipID").val(LoadData[0].璁惧id); //璁惧id
+                                    $("#HEquipName").val(LoadData[0].璁惧鍚嶇О); //浜у搧鍚嶇О
+                                    $("#HMouldID").val(LoadData[0].妯″叿id); //妯″叿id
+                                    $("#HMouldName").val(LoadData[0].妯″叿鍚嶇О); //妯″叿鍚嶇О
                                     $("#HBillTypeName").val(HSouceBillType); //鍗曟嵁绫诲瀷
                                     $("#HPlanBillNo").val(LoadData[0].鍗曟嵁鍙�); //鍗曟嵁鍙�
 
@@ -570,19 +589,32 @@
                                     $("#HErrMsgBackBillNo").val(LoadData[0].鍗曟嵁鍙�); //寮傚父鍙嶉鍗曞彿
                                     $("#HErrMsgBackInterID").val(LoadData[0].HInterID); //寮傚父鍙嶉鍗曚富鍐呯爜
                                     $("#HErrMsgBackEntryID").val(LoadData[0].HEntryID); //寮傚父鍙嶉鍗曞瓙鍐呯爜
+
+                                    $("#HHandleEmpID").val(LoadData[0].HHandleEmpID); //绛惧埌浜篒D
+                                    $("#HHandleEmpName").val(LoadData[0].鎸囨淳澶勭悊浜�); //绛惧埌浜�
+
                                 } else if (num==2) {
                                     var LoadData = data.data;
                                     $("#HDeptID").val(LoadData[0].HDeptID); //閮ㄩ棬ID
                                     $("#HDeptName").val(LoadData[0].鍙戦�侀儴闂�); //鍙戦�侀儴闂�
+                                    $("#HReceiveID").val(LoadData[0].HReceiveID); //閮ㄩ棬ID
+                                    $("#HReceiveName").val(LoadData[0].鎺ユ敹閮ㄩ棬); //鎺ユ敹閮ㄩ棬
+                                    $("#HErrMsgBackTypeID").val(LoadData[0].HErrMsgBackTypeID); //寮傚父绫诲瀷ID
+                                    $("#HErrMsgBackTypeName").val(LoadData[0].鎺ユ敹閮ㄩ棬); //寮傚父绫诲瀷
                                     $("#HSendMan").val(LoadData[0].鍙戦�佷汉); //鍙戦�佷汉
                                     $("#HReceiveMan").val(LoadData[0].鎺ユ敹浜�); //鎺ユ敹浜�
-                                    $("#HCopyMan").val(LoadData[0].鎶勯��); //鎶勯��
+                                    $("#HCopyMan").val(LoadData[0].鎶勯�佷汉); //鎶勯��
                                     $("#HLevel").find("option[value='" + LoadData[0]["绱ф�ョ▼搴�"] + "']").attr("selected", true); //绱ф�ョ▼搴�
                                     $("#HContext").val(LoadData[0].涓婚); //涓婚
                                     $("#HDescription").val(LoadData[0].璇︾粏鍐呭); //璇︾粏鍐呭
-                                    $("#HMaterName").val(LoadData[0].鐗╂枡鍚嶇О); //浜у搧鍚嶇О
+                                    $("#HMaterName").val(LoadData[0].浜у搧鍚嶇О); //浜у搧鍚嶇О
+                                    $("#HMaterModel").val(LoadData[0].瑙勬牸鍨嬪彿); //瑙勬牸鍨嬪彿  
                                     $("#HBillTypeName").val(HSouceBillType); //鍗曟嵁绫诲瀷
                                     $("#HPlanBillNo").val(LoadData[0].鍗曟嵁鍙�); //鍗曟嵁鍙�
+                                    $("#HEquipID").val(LoadData[0].HEquipID); //璁惧ID
+                                    $("#HEquipName").val(LoadData[0].璁惧鍚嶇О); //璁惧鍚嶇О
+                                    $("#HMouldID").val(LoadData[0].HMouldID); //妯℃不鍏峰悕绉癐d
+                                    $("#HMouldName").val(LoadData[0].妯℃不鍏峰悕绉�); //妯℃不鍏峰悕绉�
 
                                     $("#HMainSourceBillNo").val(LoadData[0].鍗曟嵁鍙�); //婧愬崟鍗曞彿锛堟殏鏃跺彇鍊艰鍗曠紪鍙凤級
                                     $("#HMainSourceInterID").val(LoadData[0].hmainid); //婧愬崟涓诲唴鐮�(鍙栧�糎InterID)
@@ -611,7 +643,7 @@
                 refSav = "Update";
                 form.render('select');
                 $.ajax({
-                    url: GetWEBURL() + "Sc_MESTransFerWorkBill/Edit_OA_ErrMsgBackSignBill",
+                    url: GetWEBURL() + "Sc_MESTransFerWorkBill/Edit_OA_ErrMsgBackHandleBill",
                     type: "GET",
                     data: {
                         "HID": linterid
@@ -651,6 +683,8 @@
                                 , "HHandleEmpName": data[0]["澶勭悊浜�"]
                                 , "HHandleNote": data[0]["澶勭悊鍐呭"]
                                 , "HHandleDate": data[0]["澶勭悊瀹屾垚鏃堕棿"]
+                                , "HBadReasonID": data[0]["HBadReasonID"]
+                                , "HBadReasonName": data[0]["澶勭悊鍘熷洜"]
                              
 
                                 , "HMainSourceInterID": data[0]["婧愬崟ID"]                 //婧愬崟ID
@@ -745,6 +779,7 @@
                 var refSav = "";
                 if (OperationType == 1 || OperationType == 2 || OperationType == 4) {
                     refSav = "Add";
+                    data.field.HMaker = $("#HHandleEmpName").val();
                 }
                 if (OperationType == 3) {
                     refSav = "Update";
@@ -766,15 +801,20 @@
                 }
                 $.ajax({
                     type: "POST",
-                    url: GetWEBURL() + "/Sc_MESTransFerWorkBill/SaveOA_ErrMsgBackSignBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    url: GetWEBURL() + "/Sc_MESTransFerWorkBill/SaveOA_ErrMsgBackHandleBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
                     async: false,
                     data: { "msg": sMainSub },
                     dataType: "json",
                     success: function (data) {
                         if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            layer.msg(data.Message, { icon: 1 });
                             $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);
-                           
-                            layer.msg("鎻愪氦鎴愬姛");
+                            if (data.Verify == "Y") //鑷姩瀹℃牳
+                            {
+                                $("#HInterID").val(data.HInterID);//鑾峰彇鎻愪氦鎴愬姛杩斿洖鐨勫崟鎹富ID
+                                set_CheckBill(0); //瀹℃牳
+                            }
+                            layer.close(index);
                         }
                         else {
                             layer.alert(data.Message, { icon: 5 })
@@ -812,7 +852,7 @@
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes'],
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html?openType=2&HOrgName=' + sessionStorage["Organization"], 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -852,7 +892,7 @@
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html', 'yes'],
+                    content: ['../../鍩虹璧勬枡/鍏敤鍩虹璧勬枡/Gy_DepartmentList.html?openType=2&HOrgName=' + sessionStorage["Organization"], 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -1028,7 +1068,7 @@
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                    content: ['../../璐ㄩ噺绠$悊/鍩虹寤烘ā/Gy_ErrMsgBackType.html', 'yes'],
+                    content: ['../../璐ㄩ噺绠$悊/鍩虹寤烘ā/Gy_ErrMsgBackType.html?openType=2', 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -1066,7 +1106,7 @@
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                    content: ['../../璁惧绠$悊/璁惧妗f/Gy_EquipFileMainList.html', 'yes'],
+                    content: ['../../璁惧绠$悊/璁惧妗f/Gy_EquipFileMainList.html?openType=2', 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -1104,7 +1144,7 @@
                     shift: 2,
                     area: ['80%', '80%'],
                     maxmin: true,
-                  content: ['../../妯℃不鍏风鐞�/妯℃不鍏风鐞�/Gy_MouldFileList.html', 'yes'],
+                  content: ['../../妯℃不鍏风鐞�/妯℃不鍏风鐞�/Gy_MouldFileList.html?openType=2', 'yes'],
                     btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {
 
@@ -1131,6 +1171,45 @@
                 });
             });
 
+            //澶勭悊鍘熷洜
+            form.on('submit(HBadReasonList)', function () {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '澶勭悊鍘熷洜',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['80%', '80%'],
+                    maxmin: true,
+                    content: ['../../鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_DisposeWayList.html?openType=2', 'yes'],
+                    btn: ['纭畾', '鍙栨秷']
+                    , btn1: function (index, layero) {
+
+                        //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                        var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                        if (checkStatus.data.length === 0) {
+                            return layer.msg('璇烽�夋嫨鏁版嵁');
+                        }
+                        $("#HBadReasonName").val(checkStatus.data[0].澶勭悊鏂规鍚嶇О);
+                        $("#HBadReasonID").val(checkStatus.data[0].HItemID);
+                        layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                    , btn2: function (index, layero) {
+                        //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                        //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                    },
+                    end: function () {
+
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            });
+
+
             //澶勭悊浜�
             form.on('submit(HHandleEmpList)', function () {
                 //椤甸潰灞�-鑷畾涔�
@@ -1153,7 +1232,7 @@
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
                         $("#HHandleEmpName").val(checkStatus.data[0].鑱屽憳鍚嶇О);
-                        $("#HHandleEmpD").val(checkStatus.data[0].HItemID);
+                        $("#HHandleEmpID").val(checkStatus.data[0].HItemID);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
                     , btn2: function (index, layero) {
@@ -1169,7 +1248,28 @@
                 });
             });
 
+            function set_CheckBill(num) {
+                $.ajax({
+                    type: "GET",
+                    url: GetWEBURL() + "/Sc_MESTransFerWorkBill/AuditOA_ErrMsgBackHandleBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "HInterID": $("#HInterID").val(), "IsAudit": num, "CurUserName": sessionStorage["HUserName"] },
+                    success: function (result) {
+                        if (result.count == 1) {
+                            layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                // 寰楀埌frame绱㈠紩
+                                var index = layer.getFrameIndex(window.name);
+                                //鍏抽棴褰撳墠frame
+                                layer.close(index);                               
+                            });
 
+                        } else {
+                            layer.alert(result.code + result.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
            
 
             //浠ヤ笂涓簂ayui妯″潡

--
Gitblit v1.9.1