From 1d32d97bdbd90c9162c67ca38402eef113f6254d Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期四, 17 十一月 2022 22:40:27 +0800
Subject: [PATCH] 修改了检验单 外购入库解析条码功能

---
 WebTM/views/生产工序管理/工序汇报单/Sc_ProcessReportList.html |  143 +++++++++++++++++++++++++++++------------------
 1 files changed, 88 insertions(+), 55 deletions(-)

diff --git "a/WebTM/views/\347\224\237\344\272\247\345\267\245\345\272\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\261\207\346\212\245\345\215\225/Sc_ProcessReportList.html" "b/WebTM/views/\347\224\237\344\272\247\345\267\245\345\272\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\261\207\346\212\245\345\215\225/Sc_ProcessReportList.html"
index ee3a812..d32c7bd 100644
--- "a/WebTM/views/\347\224\237\344\272\247\345\267\245\345\272\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\261\207\346\212\245\345\215\225/Sc_ProcessReportList.html"
+++ "b/WebTM/views/\347\224\237\344\272\247\345\267\245\345\272\217\347\256\241\347\220\206/\345\267\245\345\272\217\346\261\207\346\212\245\345\215\225/Sc_ProcessReportList.html"
@@ -65,14 +65,13 @@
                         <table class="" id="mainTable" lay-filter="mainTable"></table>
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
-                                <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
-
                             </div>
                         </script>
                     </form>
@@ -80,6 +79,11 @@
             </div>
         </div>
     </div>
+    <script type="text/html" id="barDemo">
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="detail">鏌ョ湅</a>
+        <a class="layui-btn layui-btn-xs" lay-event="edit">缂栬緫</a>
+        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">鍒犻櫎</a>
+    </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>
@@ -103,77 +107,105 @@
 
             var option = {
                 elem: '#mainTable'
-                //, toolbar: '#toolbarDemo'
-                ,height: 'full-50' 
+                , toolbar: '#toolbarDemo'
                 , page: true
-                ,cellMinWidth: 90
+                , cellMinWidth: 90
+                , limit: 50
+                , limits: [50, 500, 5000, 20000]
                 , cols: [[
                     //{ field: 'hmainid', title: 'hmainid', sort: true, width: 165 }
-                     { type: 'checkbox' }
-                    ,{ field: 'HDate', title: '鏃ユ湡', sort: true, width: 120 }
-                    , { field: 'HBillNo', title: '鍗曟嵁鍙�', sort: true, width: 170 }
-                    //, { field: 'HBillStatus ', title: '鍗曟嵁鐘舵��', width: 105 }
-                    , { field: 'HICMOBillNo', title: '浠诲姟鍗曞彿' }
-                    , { field: '鐢熶骇杞﹂棿浠g爜', title: '鐢熶骇杞﹂棿浠g爜', width: 115 }
+                    { type: 'checkbox', fixed: 'left' }
+                     ,{fixed: 'left', title:'鎿嶄綔', toolbar: '#barDemo', width:200}
+                    , { field: 'hmainid ', title: 'hmainid', width: 105, sort: true, fixed: true, hide: true }
+                    ,{ field: '鏃ユ湡', title: '鏃ユ湡', sort: true, width: 120 }
+                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', sort: true, width: 170 }
                     , { field: 'HDeptID', title: '閮ㄩ棬ID', width: 115 }
-                    , { field: 'HDeptNumber', title: '閮ㄩ棬浠g爜' }
-                    , { field: 'HGroupID', title: '鐝粍ID', width: 160 }
-                    , { field: 'HGroupNumber', title: '鐝粍浠g爜', width: 160 }
-                    , { field: 'HMaterID ', title: '鐝粍浠g爜', width: 215 }
+                    , { field: '閮ㄩ棬', title: '閮ㄩ棬' }
+                    , { field: 'HMaterID', title: 'HMaterID' }
+                    , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 160 }
+                    , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 160 }
+                    , { field: '瑙勬牸鍨嬪彿 ', title: '瑙勬牸鍨嬪彿', width: 215 }
                     ////, { field: 'hunitid', title: 'hunitid' }
-                    , { field: 'HMaterID ', title: '浜у搧ID ', width: 115 }
-                    , { field: 'HMaterNumber', title: '浜у搧浠g爜' }
+                    , { field: 'HUnitID ', title: 'HUnitID ', width: 115 }
+                    , { field: '鍗曚綅浠g爜', title: '鍗曚綅浠g爜' }
                     ////, { field: 'hempid', title: 'hempid' }
-                    , { field: 'HUnitID', title: '鍗曚綅ID', width: 100 }
-                    , { field: 'HUnitNumber', title: '鍗曚綅浠g爜' }
-                    , { field: 'HPlanQty', title: '璁″垝鏁伴噺' }
-                    , { field: 'HInStockQty', title: '鍏ュ簱鏁伴噺' }
-                    , { field: 'HSumTimes', title: '鎬诲伐浣滄椂闂�' }
+                    , { field: '鍗曚綅鍚嶇О', title: '鍗曚綅鍚嶇О', width: 100 }
+                    , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞' }
+                    , { field: 'hsubid', title: 'hsubid' }
+                    , { field: 'HEmpID', title: 'HEmpID' }
+                    , { field: '鑱屽憳', title: '鑱屽憳' }
                     ////, { field: 'HCenterID', title: 'HCenterID' }
-                    , { field: 'HExplanation', title: '鎽樿' }
-                    , { field: 'HRemark ', title: '澶囨敞' }
+                    , { field: '宸ュ簭', title: '宸ュ簭' }
+                    , { field: '鍗曚环 ', title: '鍗曚环' }
                     ////, { field: 'hbomid', title: 'hbomid' }
-                    , { field: 'HInnerBillNo', title: '鍐呴儴鍗曟嵁鍙�' }
+                    , { field: '鏁伴噺', title: '鏁伴噺' }
                     ////, { field: 'HRoutingInterID', title: 'HRoutingInterID' }
-                    , { field: 'HBacker', title: '閫�鍥炰汉' }
-                    , { field: 'HBackDate', title: '閫�鍥炴棩鏈�' }
-                    , { field: 'HChecker', title: '瀹℃牳浜�' }
-                    , { field: 'HCheckDate', title: '瀹℃牳鏃ユ湡' }
-                    , { field: 'HMaker', title: '鍒跺崟浜�' }
-                    , { field: 'HMakeDate', title: '鍒跺崟鏃ユ湡' }
-                    , { field: 'HUpDater', title: '淇敼浜�' }
-                    , { field: 'HUpDateDate', title: '淇敼鏃ユ湡' }
-                    , { field: 'HCloseMan', title: '鍏抽棴浜�' }
-                    , { field: 'HCloseDate', title: '鍏抽棴鏃ユ湡' }
-                    , { field: 'HCloseType', title: '鍏抽棴绫诲瀷' }
+                    , { field: '涓嶈壇鏁伴噺', title: '涓嶈壇鏁伴噺' }
+                    , { field: '鎶ュ簾鏁�', title: '鎶ュ簾鏁�' }
+                    , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞' }
+                    , { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
+                    , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡' }
+                    , { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
+                    , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡' }
+                    , { field: '淇敼浜�', title: '淇敼浜�' }
+                    , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡' }
+                    , { field: '鍏抽棴浜�', title: '鍏抽棴浜�' }
+                    , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡' }
                     ////, { field: 'hsubid', title: 'hsubid' }
-                    , { field: 'HDeleteMan', title: '浣滃簾浜�' }
-                    , { field: 'HDeleteDate', title: '浣滃簾鏃ユ湡' }
-                    //, { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�' }
-                    //, { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
-                    //, { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡' }
-                    //, { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
-                    //, { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡' }
-                    //, { field: '淇敼浜�', title: '淇敼浜�' }
-                    //, { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡' }
-                    //, { field: '鍏抽棴浜�', title: '鍏抽棴浜�' }
-                    //, { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡' }
-                    //, { field: '浣滃簾浜�', title: '浣滃簾浜�' }
-                    //, { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡' }
-                    //, { field: '琛屽叧闂汉', title: '琛屽叧闂汉' }
+                    , { field: '浣滃簾浜�', title: '浣滃簾浜�' }
+                    , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡' }
+                    , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�' }
+                    , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�' }
+                    , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿' }
+                    , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷' }
+                    , { field: '琛屽叧闂汉', title: '琛屽叧闂汉' }
+                    , { field: 'HBillType', title: 'HBillType' }
+                    , { field: 'HBillSubType', title: 'HBillSubType' }
+                    , { field: 'HICMOInterID', title: 'HICMOInterID' }
+                    , { field: '浠诲姟鍗曞彿', title: '浠诲姟鍗曞彿' }
+                    , { field: 'HSourceID', title: 'HSourceID' }
+                    , { field: '鐢熶骇璧勬簮浠g爜', title: '鐢熶骇璧勬簮浠g爜' }
+                    , { field: '鐢熶骇璧勬簮', title: '鐢熶骇璧勬簮' }
                     //, { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷' }
                     //, { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷' }
                     //, { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�' }
                 ]]
             };
+               //鐩戝惉宸ュ叿鏉�
+            table.on('tool(mainTable)', function (obj) {
+                var data = obj.data;
+                if (obj.event === 'detail') {
+                    layer.msg('ID锛�' + data.hmainid + ' 鐨勬煡鐪嬫搷浣�');			//椤甸潰灞�
+                    layer.open({
+                        type: 2 //Page灞傜被鍨�
+                        , area: ['100%', '100%']
+                        , title: '鏌ョ湅姹囨姤鍗�'
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: ['../宸ュ簭姹囨姤鍗�/Sc_Add_ProcessReportList.html?HInterID=' + data.hmainid, 'yes']
+                        , resize: false
+                        , cancel: function () {
+                            //$(".layui-btn").removeClass("layui-btn-disabled");
+                        }
 
+                    });
+                } else if (obj.event === 'del') {
+                    layer.confirm('鐪熺殑鍒犻櫎琛屼箞', function (index) {
+                        obj.del();
+                        layer.close(index);
+                    });
+                } else if (obj.event === 'edit') {
+                    layer.alert('缂栬緫琛岋細<br>' + JSON.stringify(data))
+                }
+            });
             //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
             var index0 = layer.load(0, { shade: false });
             $.ajax({
                 //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                 url: GetWEBURL() + '/Sc_ProcessMangement/MES_Sc_ProcessReportList_Json',
                 type: "GET",
-                data: { "sWhere": sWhere },
+                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
                 success: function (data1) {
                     if (data1.count == 1) {
                         option.data = data1.data;
@@ -197,6 +229,7 @@
                 $("#WorkCenter").val("");//鍗曟嵁鍙�
                 $("#btnSearch").click();
             });
+         
 
             //鏌ヨ鎸夐挳
             form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
@@ -205,22 +238,22 @@
                 var HOrderProcNO = $("#HOrderProcNO").val();//璁㈠崟璺熻釜鍙�
                 var WorkCenter = $("#WorkCenter").val();//鍗曟嵁鍙�
                 if (HDate) {
-                    sWhere += " and HDate >= '" + HDate + "'";
+                    sWhere += " and 鏃ユ湡 >= '" + HDate + "'";
                 }
                 if (HDate1) {
-                    sWhere += " and HDate <= '" + HDate1 + "'";
+                    sWhere += " and 鏃ユ湡 <= '" + HDate1 + "'";
                 }
                 if (HOrderProcNO) {
                     sWhere += " and 璁㈠崟璺熻釜鍙� like '%" + HOrderProcNO + "%'";
                 }
                 if (WorkCenter) {
-                    sWhere += " and HBillNo like '%" + WorkCenter + "%'";
+                    sWhere += " and 鍗曟嵁鍙� like '%" + WorkCenter + "%'";
                 }
                 var index = layer.load(0, { shade: false });
                 $.ajax({
                     url: GetWEBURL() + '/Sc_ProcessMangement/MES_Sc_ProcessReportList_Json',
                     type: "GET",
-                    data: { "sWhere": sWhere },
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                     success: function (data1) {
                         if (data1.count == 1) {
                             option.data = data1.data;

--
Gitblit v1.9.1