From aa8a50258acf5e1aa640eafa935de995106af3a5 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期三, 09 四月 2025 16:52:38 +0800
Subject: [PATCH] pda报工平台添加质量页面

---
 WebTM/views/生产管理/报工平台_PDA/质量汇报/Sc_QualityReportBill_PDA.html  |  158 +++++++++++++++++++++++++++++++++++++++-------------
 WebTM/views/生产管理/报工平台_PDA/IpadIndex_PDA.html                  |    2 
 WebTM/views/生产管理/报工台工序/不良采集/Sc_QualityReportStepBillList.html |    4 
 3 files changed, 122 insertions(+), 42 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBillList.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBillList.html"
index 403e217..d7e47ce 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBillList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/\344\270\215\350\211\257\351\207\207\351\233\206/Sc_QualityReportStepBillList.html"
@@ -753,10 +753,10 @@
                     sWhere += " and " + ColName2 + " " + com2;
                 }
                 if (HDate) {
-                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HBeginDate + "'";
+                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) >= '" + HDate + "'";
                 }
                 if (HDate1) {
-                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HEndDate + "'";
+                    sWhere += " and CONVERT(varchar(100),鏃ユ湡, 23) <= '" + HDate1 + "'";
                 }
                 if (HBillNo) {
                     sWhere += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html"
index c38cc36..bfca832 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/IpadIndex_PDA.html"
@@ -1038,7 +1038,7 @@
                 , shade: 0.6
                 , maxmin: false
                 , anim: 0
-                , content: ['鐢熶骇绠$悊/璐ㄩ噺姹囨姤鍗�/Sc_QualityReportBill.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes']
+                , content: ['../../鐢熶骇绠$悊/鎶ュ伐骞冲彴_PDA/璐ㄩ噺姹囨姤/Sc_QualityReportBill_PDA.html?OperationType=2&linterid=' + HSourceInterID + '&HSouceBillType=' + HBillType + '&HICMOEntryID=' + HSourceEntryID, 'yes']
                 , resize: false
                 , cancel: function () {
 
diff --git "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/\350\264\250\351\207\217\346\261\207\346\212\245/Sc_QualityReportBill_PDA.html" "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/\350\264\250\351\207\217\346\261\207\346\212\245/Sc_QualityReportBill_PDA.html"
index 3cb7e38..3ae3720 100644
--- "a/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/\350\264\250\351\207\217\346\261\207\346\212\245/Sc_QualityReportBill_PDA.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\271\263\345\217\260_PDA/\350\264\250\351\207\217\346\261\207\346\212\245/Sc_QualityReportBill_PDA.html"
@@ -7,15 +7,15 @@
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
     <!--寮曠敤layui鏍峰紡鏂囦欢-->
-    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
-    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <link rel="stylesheet" href="../../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../../layuiadmin/style/admin.css" media="all">
     <!--寮曠敤layui js鏂囦欢-->
-    <script src="../../../layuiadmin/layui/layui.js"></script>
-    <script src="../../../layuiadmin/Scripts/json2.js"></script>
-    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
-    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
-    <script src="../../../layuiadmin/PubCustom.js"></script>
-    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
+    <script src="../../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../../layuiadmin/PubCustom.js"></script>
+    <script src="../../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
     <!--鑷畾涔夋牱寮�-->
     <style>     
         .layui-form-label {
@@ -78,7 +78,7 @@
                             <div class="layui-tab-content">
                                 <div class="layui-tab-item layui-show">
                                     <div class="layui-form-item" style="padding:0px;margin:0px">
-                                        <div class="layui-row">
+                                        <div class="layui-row" style="display:none">
                                             <div class="layui-col-xs2">
                                                 <label class="layui-form-label" style="width:60px;padding-left:0px;">鏉″舰鐮�</label>
                                             </div>
@@ -93,7 +93,7 @@
                                         </div>
                                     </div>
 
-                                    <div class="layui-form-item" style="padding:0px;margin:0px">
+                                    <div class="layui-form-item" style="padding: 0px; margin: 0px; display: none">
                                         <div class="layui-row">
                                             <div class="layui-col-xs2">
                                                 <label class="layui-form-label"  style="width:60px;padding-left:0px;">娴佹按鍙�</label>
@@ -109,7 +109,7 @@
                                         </div>
                                     </div>
 
-                                    <div class="layui-form-item" style="padding:0px;margin:0px">
+                                    <div class="layui-form-item" style="padding: 0px; margin: 0px; display: none">
                                         <div class="layui-row">
                                             <div class="layui-col-xs2">
                                                 <label class="layui-form-label" style="width:60px;padding-left:0px;">褰撳墠宸ュ簭</label>
@@ -204,7 +204,7 @@
                                     <div class="layui-form-item" style="padding:0px;margin:0px">
                                         <div class="layui-row">
                                             <div class="layui-col-xs2">
-                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">浜у搧鍚嶇О</label>
+                                                <label class="layui-form-label" style="width:60px;padding-left:0px;">瑙勬牸鍨嬪彿</label>
                                             </div>
                                             <div class="layui-col-xs10">
                                                 <input type="text" name="HMaterModel" class="layui-input" id="HMaterModel" placeholder="瑙勬牸鍨嬪彿" style="border-radius: 50px;background-color:#efefef4d;" readonly>
@@ -411,7 +411,7 @@
 
     <script>
         layui.config({
-            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+            base: '../../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
         }).extend({
             index: 'lib/index' //涓诲叆鍙fā鍧�
         }).use(['index', 'form', 'laydate', 'table', 'element', 'upload'], function () {
@@ -457,7 +457,12 @@
             if (typeof (params[params[0]]) == "undefined") {
                 var OperationType = 1;//鎿嶄綔绫诲瀷
                 var closeType = 2;  //鍏抽棴绫诲瀷
-            } 
+            } else {
+                var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
+                var linterid = params[params[1]];//婧愬崟id
+                var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
+                var HBillSubType = decodeURI(params[params[4]] == undefined ? '' : params[params[4]]);//鍗曟嵁瀛愮被鍨�   鐢ㄤ簬鍖哄垎鐢熶骇璁板綍鍗�
+            }
             /*鍥哄畾浠g爜锛屾瘡寮犲崟鎹兘瑕乥egin*/
 
             //娴佽浆鍗℃槸鍚︽壂鎻忔爣璁�
@@ -481,6 +486,7 @@
                 GetDefValByUser();
                 //鍒濆鍖栬〃鏍�
                 set_InitGrid();
+                set_AddNew(linterid);
             }            
        
             //#region 閫氳繃鐧诲綍鐢ㄦ埛鑾峰彇榛樿鍊�
@@ -494,8 +500,8 @@
                         var data = result.data[0];
 
                         form.val("formData", {
-                            "HSourceID": data.HSourceID,
-                            "HSourceName": data.鐢熶骇璧勬簮鍚嶇О,
+                            //"HSourceID": data.HSourceID,
+                            //"HSourceName": data.鐢熶骇璧勬簮鍚嶇О,
                             "HGroupID": data.HGroupID,
                             "HGroupName": data.鐢熶骇鐝粍鍚嶇О,
                             "HEmpID": data.HEmpID,
@@ -512,12 +518,70 @@
             }
             //#endregion
 
-         
-            //鍒濆鍩烘湰淇℃伅璧嬪��      
-            $("#HMaker").val(sessionStorage["HUserName"]);
-            $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));
-            $("#HDate").val(Pub_Format(new Date(), "yyyy-MM-dd"));
+            //#region 鏍规嵁婧愬崟id鑾峰彇婧愬崟淇℃伅
+            function set_AddNew(linterid) {
+                //鍒濆鍩烘湰淇℃伅璧嬪��
+                $("#HDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));      //鍗曟嵁鏃ユ湡
+                $("#HBeginWorkTime").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"))  //寮�濮嬫椂闂�
+                $("#HMakeDate").val(Format(new Date(), "yyyy-MM-dd hh:mm:ss"));  //鍒跺崟鏃ユ湡
+                $("#HMaker").val(sessionStorage["HUserName"]);     //鍒跺崟浜�
+                $("#HSTOCKORGID").val(sessionStorage["OrganizationID"]); //缁勭粐ID
+                $("#HSTOCKORG").val(sessionStorage["Organization"]); //缁勭粐鍚嶇О
 
+                //鍔犳簮鍗曠被鍨嬪尯鍒�(鍙互鍐欎笉鍚岀殑鏂规硶)
+                $('#HProcName').attr("disabled", true);
+                $('#HSourceName').attr("disabled", true);
+                $('#ProductionResources-BT').addClass("layui-btn-disabled").attr("disabled", true);
+                $('#HMainSourceBillNo').attr("disabled", true);
+                $('#HICMOBillNo').attr("disabled", true);
+                $('#HDeptName').attr("disabled", true);
+                $('#HDept-BT').addClass("layui-btn-disabled").attr("disabled", true);
+                var ajaxLoad = layer.load();
+                $.ajax({
+                    url: GetWEBURL() + "/Sc_QualityReportBill/get_ICMOBillStatus_Tmp",
+                    type: "GET",
+                    data: { "HInterID": linterid, "HEntryID": 0, "HBillType": HSouceBillType },
+                    success: function (result) {
+                        var data = result.data[0];
+                        if (result.count == 1) {
+                            $("#HICMOBillNo").val(data.HICMOBillNo);
+                            $("#HICMOInterID").val(data.HICMOInterID);
+                            $("#HMainSourceBillType").val(HSouceBillType);
+                            $("#HMainSourceInterID").val(data.HICMOInterID);
+                            $("#HMainSourceEntryID").val(data.HICMOEntryID);
+                            $("#HMainSourceBillNo").val(data.HICMOBillNo);
+                            $("#HMaterNumber").val(data.HMaterNumber);
+                            $("#HMaterName").val(data.HMaterName);
+                            $("#HMaterID").val(data.HMaterID);
+                            $("#HMaterModel").val(data.HMaterModel);
+                            $("#HICMOEntryID").val(data.HICMOEntryID);
+                            $("#HDeptID").val(data.HDeptID);
+                            $("#HDeptName").val(data.HDeptName);
+                            $("#HSourceID").val(data.HSourceID);
+                            $("#HSourceName").val(data.HSourceName);
+                            $("#HUnitID").val(data.HUnitID);
+                            $("#HUnitName").val(data.HUnitName);
+                            $("#HProcID").val(data.HProcID); //宸ュ簭ID
+                            $("#HProcNo").val(data.HProcName); //宸ュ簭鍚嶇О
+                            
+                            if (HSouceBillType == "3772") {
+                                $("#HQty").val(data.HDatePlanQty);
+                                $("#HProcExchBillNo").val(data.HSourceBillNo);
+                                $("#HProcExchInterID").val(data.HSourceInterID);
+                                $("#HProcExchEntryID").val(data.HSourceEntryID);
+                            }
+
+                        } else {
+                            layer.alert(result.Message, { icon: 5 });
+                        }
+                        layer.close(ajaxLoad);
+                    }, error: function () {
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //#endregion
 
             //鏉″舰鐮佸洖杞︽柟娉�  娴佽浆鍗�
             $('#HBarCode').on('keydown', function (event) {
@@ -542,10 +606,10 @@
                         layer.msg("鏉″舰鐮佷笉鑳戒负绌猴紒")
                         return;
                     }
-                    if (!HProcName) {
-                        layer.msg("宸ュ簭涓嶈兘涓虹┖锛�")
-                        return;
-                    }
+                    //if (!HProcName) {
+                    //    layer.msg("宸ュ簭涓嶈兘涓虹┖锛�")
+                    //    return;
+                    //}
                     if (!HSourceName) {
                         layer.msg("鐢熶骇璧勬簮涓嶈兘涓虹┖锛�")
                         return;
@@ -792,9 +856,29 @@
            
             //鎻愪氦
             form.on('submit(Saver)', function (data) {//鎻愪氦
-                if ($("#HProcNo").val() == "") {
-                    layer.msg("娴佹按鍙锋病鏈夐�夋嫨锛佽杈撳叆娴佹按鍙峰悗鍥炶溅锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
-                    return;
+                if ($("#HSourceID").val() == '' || $("#HSourceID").val() == null || $("#HSourceID").val() == 0) {
+                    layer.msg("鐢熶骇璧勬簮涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return Result = false;
+                }
+                if ($("#HMainSourceInterID").val() == '' || $("#HMainSourceInterID").val() == null || $("#HMainSourceInterID").val() == 0) {
+                    layer.msg("婧愬崟鍗曞彿涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return Result = false;
+                }
+                if ($("#HEmpID").val() == '' || $("#HEmpID").val() == null || $("#HEmpID").val() == '0') {
+                    layer.msg("鎿嶄綔鍛樹笉鑳戒负绌猴紒", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return Result = false;
+                }
+                if ($("#HGroupID").val() == '' || $("#HGroupID").val() == null || $("#HGroupID").val() == '0') {
+                    layer.msg("鐝粍涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return Result = false;
+                }
+                if ($("#HDeptID").val() == '' || $("#HDeptID").val() == null || $("#HDeptID").val() == '0') {
+                    layer.msg("杞﹂棿涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return Result = false;
+                }
+                if ($("#HICMOInterID").val() == '' || $("#HICMOInterID").val() == null || $("#HICMOInterID").val() == '0') {
+                    layer.msg("鐢熶骇璁㈠崟涓嶈兘涓虹┖锛�", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return Result = false;
                 }
                 //鑾峰彇瀛愯〃鏁版嵁
                 var num = [];
@@ -896,7 +980,7 @@
                     , area: ['90%', '90%']//澶у皬
                     , title: '閮ㄩ棬鍒楄〃'//鏍囬
                     , shift: 2//寮瑰嚭鍔ㄧ敾
-                    , content: ['../../Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
+                    , content: ['../../../Baseset/鍩虹璧勬枡/Gy_DepartmentList.html', 'yes']
                     , btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                         var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
@@ -925,7 +1009,7 @@
                         , shade: 0.6 //閬僵閫忔槑搴�
                         //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                         , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                        , content: [`../../Baseset/鍩虹璧勬枡/Gy_GetProcNoList.html?HInterID=${value}`, 'yes']
+                        , content: [`../../../Baseset/鍩虹璧勬枡/Gy_GetProcNoList.html?HInterID=${value}`, 'yes']
                         , resize: false
                         , cancel: function (index, layero) {
                         }
@@ -951,7 +1035,7 @@
                     , shade: 0.6 //閬僵閫忔槑搴�
                     , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                     , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                    , content: ['../../Baseset/鍩虹璧勬枡/Gy_GetProductionTeamList.html', 'yes']
+                    , content: ['../../../Baseset/鍩虹璧勬枡/Gy_GetProductionTeamList.html', 'yes']
                     , resize: false
                     , cancel: function (index, layero) {
                     }
@@ -967,7 +1051,7 @@
                     , shade: 0.6 //閬僵閫忔槑搴�
                     , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                     , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                    , content: ['../../Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HWorker', 'yes']
+                    , content: ['../../../Baseset/鍩虹璧勬枡/Gy_EmployeeList.html?Type=HWorker', 'yes']
                     , btn: ['纭畾', '鍙栨秷']
                     , btn1: function (index, layero) {//鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                         var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
@@ -994,7 +1078,7 @@
                     , shade: 0.6 //閬僵閫忔槑搴�
                     //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
                     , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                    , content: ['../../Baseset/鍩虹璧勬枡/Gy_GetProductionResourcesList.html', 'yes']
+                    , content: ['../../../Baseset/鍩虹璧勬枡/Gy_GetProductionResourcesList.html', 'yes']
                     , resize: false
                     , cancel: function (index, layero) {
                     }
@@ -1003,16 +1087,12 @@
            
             // 鏂板鎸夐挳
             form.on('submit(Add)', function () {//鎻愪氦
-                layer.confirm('鏂板鍚庨〉闈㈡暟鎹皢娑堝け锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
-                    location.replace('Sc_QualityReportBill_PDA.html');
-                });
+                Pub_Close2(1);
             })           
             
             //閫�鍑�--鍏ㄥ睆鐗�
             form.on('submit(Cancel)', function () {
-                layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) {
-                    parent.location.href = "../../../views/index_Mobile.html";
-                });
+                Pub_Close2(1);
             })
 
 

--
Gitblit v1.9.1