From 134442a32d1a7581d713300dda5e9ff82c1d6b70 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 13 十月 2022 17:01:34 +0800
Subject: [PATCH] 增加生产组织字段并改为动态列(进站单,出站单,委外接收,委外发出);出站汇报单模块在流水号旁边加一个放大镜框

---
 WebTM/views/车间管理/委外工序接收单/Cj_StationEntrustOutBill.html     |   10 
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBill.html            |   55 +++++
 WebTM/views/车间管理/委外工序发出单/Cj_StationEntrustInBill.html      |   10 
 WebTM/views/车间管理/工序进站接收单/Cj_StationInBill.html             |   10 
 WebTM/views/Baseset/基础资料/Gy_GetProcNoList.html             |  120 ++++++++++++
 WebTM/views/车间管理/工序出站汇报单/Cj_StationOutBillList.html        |   81 ++++++-
 WebTM/views/车间管理/工序进站接收单/Cj_StationInBillList.html         |   73 +++++-
 WebTM/WebTM.csproj                                         |    1 
 WebTM/views/车间管理/委外工序发出单/Cj_StationEntrustInBillList.html  |   62 +++++
 WebTM/views/车间管理/委外工序接收单/Cj_StationEntrustOutBillList.html |  149 +++++++++-----
 10 files changed, 477 insertions(+), 94 deletions(-)

diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 9e002a2..8974892 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -100,6 +100,7 @@
     <Content Include="views\Baseset\HBarPlanPrint.html" />
     <Content Include="views\Baseset\鍩虹璧勬枡\Gy_ClassTimePrjGroupEdit.html" />
     <Content Include="views\Baseset\鍩虹璧勬枡\Gy_ClassTimePrjList.html" />
+    <Content Include="views\Baseset\鍩虹璧勬枡\Gy_GetProcNoList.html" />
     <Content Include="views\Baseset\鍩虹璧勬枡\Gy_LineCenter.html" />
     <Content Include="views\Baseset\鍩虹璧勬枡\Gy_MaterList.html" />
     <Content Include="views\Baseset\鍩虹璧勬枡\Gy_MouldList.html" />
diff --git "a/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_GetProcNoList.html" "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_GetProcNoList.html"
new file mode 100644
index 0000000..e751928
--- /dev/null
+++ "b/WebTM/views/Baseset/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_GetProcNoList.html"
@@ -0,0 +1,120 @@
+锘�<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>娴佹按鍙峰垪琛�</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-card">
+            <!--<div class="layui-card-header"></div>-->
+            <div class="layui-card-body" style="padding: 15px;">
+                <form class="layui-form" action="" lay-filter="component-form-group">
+                    <div class="layui-form-item">
+                        <div class="layui-inline">
+                            <label class="layui-form-label">杩囨护鍒�</label>
+                            <div class="layui-input-inline">
+                                <input type="text" name="Value" id="Value" lay-verify="Value" autocomplete="off" placeholder="璇疯緭鍏ユ祦姘村彿" class="layui-input">
+                            </div>
+                            <button type="button" lay-submit="" class="layui-btn" lay-filter="HQuery">蹇�熸煡璇�</button>
+                            <button type="button" lay-submit="" class="layui-btn" lay-filter="FH">杩斿洖</button>
+                        </div>
+                    </div>
+                </form>
+            </div>
+        </div>
+    </div>
+    <table class="layui-hide" id="mainTable"></table>
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js" type="text/javascript"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js" type="text/javascript"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script>
+        layui.use(['table', 'form', 'layer'], function () {
+            var table = layui.table
+            , form = layui.form
+            , layer = layui.layer;
+
+            form.on('submit(HQuery)', function () {//閫夋嫨浠撳簱
+                //var sMainStr = JSON.stringify(table.cache['mainTable']);
+                RoadQuery($('#Value').val());
+            });
+            form.on('submit(FH)', function () {//閫夋嫨浠撳簱
+                //var sMainStr = JSON.stringify(table.cache['mainTable']);
+                var checkStatus = table.checkStatus('mainTable')
+                 , data = checkStatus.data;
+                parent.GetProcNoValue(data);
+                var index = parent.layer.getFrameIndex(window.name);
+                parent.layer.close(index);
+            });
+            RoadQuery($('#Value').val());
+            table.render({
+                elem: '#mainTable'
+                // , url: '/demo/table/user/'
+               , data: []
+              , cellMinWidth: 80 //鍏ㄥ眬瀹氫箟甯歌鍗曞厓鏍肩殑鏈�灏忓搴︼紝layui 2.2.1 鏂板
+              , cols: [[
+                  { type: 'radio' }
+                , { field: 'HItemID', width: 150, title: '娴佺▼ID', hide: true }
+                  , { field: '娴佹按鍙�', width: 150, title: '娴佹按鍙�' }
+                  , { field: '宸ュ簭鍚嶇О', width: 150, title: '宸ュ簭鍚嶇О', sort: true }
+              ]]
+              , page: true
+            });
+
+            // 鑾峰彇椤甸潰浼犺繃鏉ョ殑 HInterID 鍊�
+            function getUrlParam(HInterID) {
+
+                // 鏋勯�犱竴涓惈鏈夌洰鏍囧弬鏁扮殑姝e垯琛ㄨ揪寮忓璞�
+                var reg = new RegExp("(^|&)" + HInterID + "=([^&]*)(&|$)");
+
+                // 鍖归厤鐩爣鍙傛暟
+                r = window.location.search.substr(1).match(reg);
+
+                // 杩斿洖鍙傛暟鍊�
+                if(r!= null)
+                return decodeURI(r[2]);
+
+                // 濡傛灉涓嶅瓨鍦紝杩斿洖null 
+                return null;
+            }
+
+            ///鍔犺浇鏄剧ず鏁版嵁
+            function RoadQuery(HInterID, sWhere) {
+
+                var sWhere = $("#Value").val();
+                
+                var HInterID = getUrlParam('HInterID')
+
+                $.ajax({
+                    type: "get",
+                    url: GetWEBURL() + "/Web/GetProcNoList",
+                    async: true,
+                    data: { "HInterID": HInterID, "sWhere": sWhere },
+                    success: function (result) {
+                        ajaxReturnData = JSON.parse(JSON.stringify(result)).data;
+                        table.reload('mainTable', {
+                            data: ajaxReturnData
+                            , height: 'full-10'
+                            , loading: false
+                            , done: function (index, res) {
+
+                            }
+                        });
+                    },
+                    error: function (result) {
+                        console.log(result);
+                        //layer.msg('鑾峰彇閲囪喘璁㈠崟鍑虹幇寮傚父', { icon: 2, time: 2000 });
+                    }
+                });
+            };
+        });
+    </script>
+
+</body>
+</html>
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBill.html"
index c4b9204..ca6730b 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBill.html"
@@ -81,6 +81,13 @@
                                                 <input type="text" class="layui-input" name="HDate" id="HDate" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">鐢熶骇缁勭粐</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HPRDOrg" id="HPRDOrg" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" name="HPRDOrgID" id="HPRDOrgID">
+                                            </div>
+                                        </div>
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
@@ -590,7 +597,8 @@
                                 "HGroupID": data.HGroupID,
                                 "HGroup": data.鐝粍,
                                 "HDeptID": sessionStorage["HDeptID"],
-                                "HDept": sessionStorage["HDept"]
+                                "HDept": sessionStorage["HDept"],
+                                "HPRDOrg": data.缁勭粐
                             });
                             $("#HBarCode").attr("readonly", "readonly");//鏉″舰鐮佸彧璇�
                             $("#HBarCode").css("background-color", "#efefef4d");
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBillList.html"
index 3b6601a..11b2632 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\345\217\221\345\207\272\345\215\225/Cj_StationEntrustInBillList.html"
@@ -117,6 +117,7 @@
             var sWhere = "";
             var option = [];
             var HModName = "Cj_StationEntrustInBillList";
+            var titleData = ["HInterID","hsubid","hmainid", "HSupID", "HMaterID", "HProcID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
             //鍒濆鍖栬〃鏍�
             set_InitGrid();
             DisPlay_HideColumn();
@@ -256,26 +257,69 @@
             //鍔犺浇缃戞牸
             function get_Display(sWhere) {
                 //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+                var ajaxLoad = layer.load();    
                 var wait = layer.load();
                 $.ajax({
                     url: GetWEBURL() + '/Cj_StationEntrustInBill/list',
                     type: "GET",
                     data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
                     success: function (data1) {
-                        if (data1.count == 0) {
-                            option.data = [];
-                            layer.alert(data1.Message, { icon: 5 });
+                        if (data1.count == 1) {
+                            var data = [];
+                            var col = [];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left' });
+                            for (var i = 0; i < data.length; i++) {
+                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                                if ($.inArray(data[i].name, titleData) > -1) {
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
+
+                            //鍔ㄦ�佹樉绀哄垪鍚�
+                            option = {
+                                elem: '#mainTable'
+                                , toolbar: '#toolbarDemo'
+                                , cols: [col]
+                                , data: data1.data
+                                , height: 550
+                                , page: true
+                                , cellMinWidth: 90
+                                , limit: 50
+                                , limits: [50, 500, 5000, 20000]
+                            }
+                            table.render(option);
+
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
                         } else {
-                            option.data = data1.data;
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
                         }
-                        table.render(option);
-                        btnIs();
-                        layer.close(wait);
                     }, error: function () {
-                        layer.close(wait);
+                        layer.close(ajaxLoad);
                         layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
                 });
+                layer.close(wait);
+
             }
 
 
@@ -526,7 +570,7 @@
 
 
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["hmainid", "HSupID", "HMaterID", "HProcID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            /*var titleData = ["hmainid", "HSupID", "HMaterID", "HProcID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
 
                             dataCol = data1.data[0].HGridString.split(',');
 
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBill.html"
index 78facb5..a44fc39 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBill.html"
@@ -81,6 +81,13 @@
                                                 <input type="text" class="layui-input" name="HDate" id="HDate" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">鐢熶骇缁勭粐</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HPRDOrg" id="HPRDOrg" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" name="HPRDOrgID" id="HPRDOrgID">
+                                            </div>
+                                        </div>
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
@@ -679,7 +686,8 @@
                                 "HGroupID": data.HGroupID,
                                 "HGroup": data.鐝粍,
                                 "HDeptID": sessionStorage["HDeptID"],
-                                "HDept": sessionStorage["HDept"]
+                                "HDept": sessionStorage["HDept"],
+                                "HPRDOrg": data.缁勭粐
                             });
                             if ($("#eventType").val() === "Add") {
                                 form.val("formData", {
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBillList.html"
index 552a0c3..592cc3f 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\247\224\345\244\226\345\267\245\345\272\217\346\216\245\346\224\266\345\215\225/Cj_StationEntrustOutBillList.html"
@@ -118,9 +118,10 @@
             var sWhere = "";
             var option = [];
             var HModName = "Cj_StationEntrustOutBillList";
+            var titleData = ["HInterID","hmainid", "HSupID", "HMaterID", "HProcID", "HDeptID", "Hsubid","HProcExchInterID","HProcExchEntryID","HSourceID","HICMOEntryID","HICMOInterID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
             //鍒濆鍖栬〃鏍�
             set_InitGrid();
-            DisPlay_HideColumn();
+            //DisPlay_HideColumn();
             //閲嶇疆鎸夐挳
             form.on('submit(btnReSearch)', function (data) {
                 set_ClearQuery();
@@ -165,46 +166,46 @@
                     , cellMinWidth: 90
                     , limit: 50
                     , limits: [50, 500, 5000, 20000]
-                    , cols: [[
-                        { type: 'checkbox', fixed: 'left' }
-                        , { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
-                        , { field: '鏃ユ湡', title: '鏃ユ湡' }
-                        , { field: '璁㈠崟璺熻釜鍙�', title: '璁㈠崟璺熻釜鍙�' }
-                        , { field: '閫佽揣鍗曞彿', title: '閫佽揣鍗曞彿' }
-                        , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�' }
-                        , { field: '鐢熶骇璁㈠崟鍙�', title: '鐢熶骇璁㈠崟鍙�' }
-                        , { field: '娴佽浆鍗″彿', title: '娴佽浆鍗″彿' }
-                        , { field: 'HSupID', title: 'HSupID', hide: true }
-                        , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�' }
-                        , { field: '渚涘簲鍟�', title: '渚涘簲鍟�' }
-                        , { field: 'HMaterID', title: 'HMaterID', hide: true }
-                        , { field: '浜у搧浠g爜', title: '浜у搧浠g爜' }
-                        , { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О' }
-                        , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
-                        , { field: '涓嶈壇鏁伴噺', title: '涓嶈壇鏁伴噺' }
-                        , { field: '鎶ュ簾鏁伴噺', title: '鎶ュ簾鏁伴噺' }
-                        , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅' }
-                        , { field: '娴佹按鍙�', title: '娴佹按鍙�', sort: true }
-                        , { field: 'HProcID', title: 'HProcID', hide: true }
-                        , { field: '宸ュ簭浠g爜', title: '宸ュ簭浠g爜' }
-                        , { field: '宸ュ簭', title: '宸ュ簭', sort: true }
-                        , { 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: 'HDeptID', title: 'HDeptID', hide: true }
-                        , { field: '閮ㄩ棬', title: '閮ㄩ棬' }
-                        , { field: 'Hsubid', title: 'Hsubid', hide: true }
-                        , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷' }
-                    ]]
+                    //, cols: [[
+                    //    { type: 'checkbox', fixed: 'left' }
+                    //    , { field: 'hmainid', title: 'hmainid', sort: true, hide: true }
+                    //    , { field: '鏃ユ湡', title: '鏃ユ湡' }
+                    //    , { field: '璁㈠崟璺熻釜鍙�', title: '璁㈠崟璺熻釜鍙�' }
+                    //    , { field: '閫佽揣鍗曞彿', title: '閫佽揣鍗曞彿' }
+                    //    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�' }
+                    //    , { field: '鐢熶骇璁㈠崟鍙�', title: '鐢熶骇璁㈠崟鍙�' }
+                    //    , { field: '娴佽浆鍗″彿', title: '娴佽浆鍗″彿' }
+                    //    , { field: 'HSupID', title: 'HSupID', hide: true }
+                    //    , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�' }
+                    //    , { field: '渚涘簲鍟�', title: '渚涘簲鍟�' }
+                    //    , { field: 'HMaterID', title: 'HMaterID', hide: true }
+                    //    , { field: '浜у搧浠g爜', title: '浜у搧浠g爜' }
+                    //    , { field: '浜у搧鍚嶇О', title: '浜у搧鍚嶇О' }
+                    //    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿' }
+                    //    , { field: '涓嶈壇鏁伴噺', title: '涓嶈壇鏁伴噺' }
+                    //    , { field: '鎶ュ簾鏁伴噺', title: '鎶ュ簾鏁伴噺' }
+                    //    , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅' }
+                    //    , { field: '娴佹按鍙�', title: '娴佹按鍙�', sort: true }
+                    //    , { field: 'HProcID', title: 'HProcID', hide: true }
+                    //    , { field: '宸ュ簭浠g爜', title: '宸ュ簭浠g爜' }
+                    //    , { field: '宸ュ簭', title: '宸ュ簭', sort: true }
+                    //    , { 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: 'HDeptID', title: 'HDeptID', hide: true }
+                    //    , { field: '閮ㄩ棬', title: '閮ㄩ棬' }
+                    //    , { field: 'Hsubid', title: 'Hsubid', hide: true }
+                    //    , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷' }
+                    //]]
                     , text: {
                         none: '鏃犳暟鎹紒'
                     }
@@ -262,26 +263,69 @@
             //鍔犺浇缃戞牸
             function get_Display(sWhere) {
                 //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+                var ajaxLoad = layer.load();    
                 var wait = layer.load();
                 $.ajax({
                     url: GetWEBURL() + '/Cj_StationEntrustOutBill/list',
                     type: "GET",
                     data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
                     success: function (data1) {
-                        if (data1.count == 0) {
-                            option.data = [];
-                            layer.alert(data1.Message, { icon: 5 });
+                        if (data1.count == 1) {
+                            var data = [];
+                            var col = [];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left' });
+                            for (var i = 0; i < data.length; i++) {
+                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                                if ($.inArray(data[i].name, titleData) > -1) {
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
+
+                            //鍔ㄦ�佹樉绀哄垪鍚�
+                            option = {
+                                elem: '#mainTable'
+                                , toolbar: '#toolbarDemo'
+                                , cols: [col]
+                                , data: data1.data
+                                , height: 550
+                                , page: true
+                                , cellMinWidth: 90
+                                , limit: 50
+                                , limits: [50, 500, 5000, 20000]
+                            }
+                            table.render(option);
+
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
                         } else {
-                            option.data = data1.data;
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
                         }
-                        table.render(option);
-                        btnIs();
-                        layer.close(wait);
                     }, error: function () {
-                        layer.close(wait);
+                        layer.close(ajaxLoad);
                         layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
+
                 });
+                layer.close(wait);
             }
 
             //鍔熻兘鎸夐挳鏄惁绂佺敤鏂规硶锛屾瘡娆″姞杞借〃鏍奸兘瑕佽皟鐢�
@@ -548,12 +592,14 @@
 
 
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["hmainid", "HSupID", "HMaterID", "HProcID", "HDeptID", "Hsubid"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            /*var titleData = ["hmainid", "HSupID", "HMaterID", "HProcID", "HDeptID", "Hsubid"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
 
                             dataCol = data1.data[0].HGridString.split(',');
 
                             for (var i = 0; i < option.cols[0].length - 2; i++) {
-                                var dataCols = dataCol[i].split('|');
+                                if (dataCol[i]) {
+                                    var dataCols = dataCol[i].split('|');
+                                }
                                 //闅愯棌鍒�
                                 if (dataCols[1] == 1) {
                                     option.cols[0][i + 1]["hide"] = true;
@@ -619,7 +665,6 @@
                     }
                 })
             }
-
             //浠ヤ笂鏄痩ayui妯″潡
         });
 
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
index 6d56eba..03e2bf2 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBill.html"
@@ -83,6 +83,13 @@
                                                 <input type="text" class="layui-input" name="HDate" id="HDate" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">鐢熶骇缁勭粐</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HPRDOrg" id="HPRDOrg" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" name="HPRDOrgID" id="HPRDOrgID">
+                                            </div>
+                                        </div>
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
@@ -158,7 +165,11 @@
                                         <div class="layui-col-xs4 layui-inline">
                                             <label class="layui-form-label"><span style="color:red;">*</span>娴佹按鍙�</label>
                                             <div class="layui-input-inline">
-                                                <input type="text" class="layui-input" name="HProcNo" placeholder="璇烽敭鍏ュ悗鍥炶溅" id="HProcNo">
+                                                <input type="text" class="layui-input" name="HProcNo" placeholder="璇烽敭鍏ュ悗鍥炶溅" id="HProcNo" style="float: left; width: 150px; background-color: #efefef4d; display: inline-block;">
+                                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="SerialNum-BT" id="SerialNum-BT" style="width: 40px; padding: 0 10px;">
+                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                                </button>
+                                                <input type="hidden" value="0" name="HSourceID" id="HSourceID">
                                             </div>
                                         </div>
                                         <!--<div class="layui-col-xs4 layui-inline">
@@ -802,12 +813,12 @@
                                 "HProcExchBillNo": data.鍗曟嵁鍙�,
                                 "HProcExchHinteID": data.hmainid,
                                 "HICMOQty": data.浠诲姟鍗曟暟閲�,
-                                "HOrderProcNO": data.璁㈠崟璺熻釜鍙�
+                                "HOrderProcNO": data.璁㈠崟璺熻釜鍙�,
+                                "HPRDOrg": data.缁勭粐
                             });
                             $("#HBarCode").attr("readonly", "readonly");//鏉″舰鐮佸彧璇�
                             $("#HBarCode").css("background-color", "#efefef4d");
                             HProcExchBillNoFlag = true;
-
 
                             var HProcExchHinteID = $('#HProcExchHinteID').val();
                             //$.ajax({
@@ -1152,6 +1163,40 @@
                 location.replace('Cj_StationOutBill.html?OperationType=4&linterid=' + $("#HInterID").val() + '&HSouceBillType=');
             }
             //#endregion
+
+            //閫夋嫨娴佹按鍙峰脊绐�
+            form.on('submit(SerialNum-BT)', function () {//鐢熶骇璧勬簮
+                var value = $("#HProcExchHinteID").val();
+                // 鍒ゆ柇鏄惁宸茬粡杈撳叆娴佹按鍙凤紝鏄垯寮瑰嚭妯℃�佹锛屽惁鍒欑粰鍑烘彁绀�
+                if (value) {
+                    layer.open({
+                        type: 2
+                        , area: ['80%', '80%']
+                        , title: '娴佹按鍙�'
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        //, maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: [`../../Baseset/鍩虹璧勬枡/Gy_GetProcNoList.html?HInterID=${value}`, 'yes']
+                        , resize: false
+                        , cancel: function (index, layero) {
+                        }
+                        //, 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('璇烽�夋嫨鏁版嵁');
+                        //    }
+                        //    $("#HProcNo").val(checkStatus.data[0].娴佹按鍙�);
+                        //    layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                        //}
+                    })
+                } else {
+                    layer.alert('璇锋偍纭杈撳叆娴佽浆鍗″彿鍚庨噸璇昢_^',{ icon: 7 });
+                    //alert('璇峰厛杈撳叆娴佽浆鍗″彿!')
+                }
+            });
 
             //閫夋嫨鐢熶骇鐝粍寮圭獥
             form.on('submit(ProductionTeam-BT)', function () {//閫夋嫨鐢熶骇鐝粍
@@ -1665,6 +1710,10 @@
             window.open(url)
         }
 
+        //杩斿洖娴佹按鍙�
+        function GetProcNoValue(obj) {
+            $("#HProcNo").val(obj[0].娴佹按鍙�);
+        }
         //杩斿洖鐢熶骇鐝粍
         function GetProductionTeamValue(obj) {
             $("#HGroupName").val(obj[0].鐝粍);
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
index 53ddc8c..4072d8b 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\345\207\272\347\253\231\346\261\207\346\212\245\345\215\225/Cj_StationOutBillList.html"
@@ -162,6 +162,7 @@
             var option = [];
 
             var HModName = "JIT_LiftMaterPlaBillnList";
+            var titleData = ["HMaterID", "HUnitID", "HSourceID","hmainid","HProcExchInterID","HProcID","HunitID","HEmpID","HGroupID","HProcExchEntryID","HSubID","HICMOInterID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
             //鍒濆鍖栬〃鏍�
             set_InitGrid();
 
@@ -356,7 +357,7 @@
 
 
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["HMaterID", "HUnitID", "HSourceID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            /*var titleData = ["HMaterID", "HUnitID", "HSourceID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
 
                             dataCol = data1.data[0].HGridString.split(',');
 
@@ -667,29 +668,85 @@
             //鍔犺浇缃戞牸
             function get_Display(sWhere) {
                 //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+                var ajaxLoad = layer.load();    
                 var wait = layer.load();
                 $.ajax({
                     url: GetWEBURL() + '/Cj_StationOutBill/get_Display',
                     type: "GET",
                     data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
+                    //success: function (data1) {
+                    //    if (data1.count == 0) {
+                    //        option.data = [];
+                    //        layer.alert(data1.Message, { icon: 5 });
+                    //    } else {
+                    //        option.data = data1.data;
+                    //    }
+                    //    table.render(option);
+                    //    btnIs();
+                    //    if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
+                    //        ColFilter();
+                    //    }
+                    //    layer.close(wait);
+                    //}, error: function () {
+                    //    layer.close(wait);
+                    //    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    //}
                     success: function (data1) {
-                        if (data1.count == 0) {
-                            option.data = [];
-                            layer.alert(data1.Message, { icon: 5 });
+                        if (data1.count == 1) {
+                            var data = [];
+                            var col = [];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left' });
+                            for (var i = 0; i < data.length; i++) {
+                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                                if ($.inArray(data[i].name, titleData) > -1) {
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
+
+                            //鍔ㄦ�佹樉绀哄垪鍚�
+                            option = {
+                                elem: '#mainTable'
+                                , toolbar: '#toolbarDemo'
+                                , cols: [col]
+                                , data: data1.data
+                                , height: 550
+                                , page: true
+                                , cellMinWidth: 90
+                                , limit: 50
+                                , limits: [50, 500, 5000, 20000]
+                            }
+                            table.render(option);
+
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
                         } else {
-                            option.data = data1.data;
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
                         }
-                        table.render(option);
-                        btnIs();
-                        if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
-                            ColFilter();
-                        }
-                        layer.close(wait);
                     }, error: function () {
-                        layer.close(wait);
+                        layer.close(ajaxLoad);
                         layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
                 });
+                layer.close(wait);
             }
 
             //鍒犻櫎鍗曟嵁
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html"
index e5e0ee2..6c2cd9d 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBill.html"
@@ -80,6 +80,13 @@
                                                 <input type="text" class="layui-input" name="HDate" id="HDate" style="background-color:#efefef4d;" readonly>
                                             </div>
                                         </div>
+                                        <div class="layui-col-xs4 layui-inline">
+                                            <label class="layui-form-label">鐢熶骇缁勭粐</label>
+                                            <div class="layui-input-inline">
+                                                <input type="text" class="layui-input" name="HPRDOrg" id="HPRDOrg" style="background-color:#efefef4d;" readonly>
+                                                <input type="hidden" name="HPRDOrgID" id="HPRDOrgID">
+                                            </div>
+                                        </div>
                                     </div>
                                     <div class="layui-row">
                                         <div class="layui-col-xs4 layui-inline">
@@ -842,7 +849,8 @@
                                 "HProcExchHinteID": data.hmainid,
                                 "HICMOQty": data.浠诲姟鍗曟暟閲�,
                                 "lngBillKey": data.hmainid,
-                                "HOrderProcNO": data.璁㈠崟璺熻釜鍙�
+                                "HOrderProcNO": data.璁㈠崟璺熻釜鍙�,
+                                "HPRDOrg": data.缁勭粐
                             });
                             $("#HBarCode").attr("readonly", "readonly");//鏉″舰鐮佸彧璇�
                             $("#HBarCode").css("background-color", "#efefef4d");
diff --git "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html" "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html"
index d947943..10287ff 100644
--- "a/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html"
+++ "b/WebTM/views/\350\275\246\351\227\264\347\256\241\347\220\206/\345\267\245\345\272\217\350\277\233\347\253\231\346\216\245\346\224\266\345\215\225/Cj_StationInBillList.html"
@@ -156,9 +156,10 @@
             var sWhere = "";
             var option = [];
             var HModName = "Cj_StationInBillList";
+            var titleData = ["hmainid", "HProcID", "HMaterID", "HEmpID", "HSourceID", "HGroupID","HInterID","HProcExchInterID","HProcExchEntryID","HICMOInterID","HICMOEntryID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
             //鍒濆鍖栬〃鏍�
             set_InitGrid();
-            DisPlay_HideColumn();
+            //DisPlay_HideColumn();
 
             //閲嶇疆鎸夐挳
             form.on('submit(btnReSearch)', function (data) {
@@ -364,29 +365,68 @@
             //鍔犺浇缃戞牸
             function get_Display(sWhere) {
                 //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+                var ajaxLoad = layer.load();    
                 var wait = layer.load();
                 $.ajax({
                     url: GetWEBURL() + '/Cj_StationInBill/get_Display',
                     type: "GET",
                     data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
-                    success: function (result) {
-                        if (result.count == 0) {
-                            option.data = [];
-                            layer.alert(result.Message, { icon: 5 });
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            var data = [];
+                            var col = [];
+                            //缁欑┖鐨勬暟缁勮祴鍊�
+                            for (var key in data1.list) {
+                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
+                            }
+                            //鍦ㄥ垪琛ㄥ乏杈规坊鍔犲嬀閫夋
+                            col.push({ type: 'checkbox', fixed: 'left' });
+                            for (var i = 0; i < data.length; i++) {
+                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
+                                if ($.inArray(data[i].name, titleData) > -1) {
+                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //闅愯棌id鍒�
+                                }
+                                else {
+                                    switch (data[i].Type) {
+                                        //int
+                                        case 'DateTime':
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width: 200 });
+                                            break;
+                                        default:
+                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 200 });
+                                    }
+                                }
+                            }
+
+                            //鍔ㄦ�佹樉绀哄垪鍚�
+                            option = {
+                                elem: '#mainTable'
+                                , toolbar: '#toolbarDemo'
+                                , cols: [col]
+                                , data: data1.data
+                                , height: 550
+                                , page: true
+                                , cellMinWidth: 90
+                                , limit: 50
+                                , limits: [50, 500, 5000, 20000]
+                            }
+                            table.render(option);
+
+                            //鍒锋柊琛ㄦ牸鏁版嵁
+                            DisPlay_HideColumn();
+
+                            layer.close(ajaxLoad);
+                            //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
                         } else {
-                            option.data = result.data;
+                            layer.close(ajaxLoad);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
                         }
-                        table.render(option);
-                        btnIs();
-                        if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
-                            ColFilter();
-                        }
-                        layer.close(wait);
                     }, error: function () {
-                        layer.close(wait);
+                        layer.close(ajaxLoad);
                         layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
                 });
+                layer.close(wait);
             }
 
             //蹇�熻繃婊�
@@ -469,6 +509,7 @@
                 $("#ColName").val("0");
                 $("#Comparator").val("0");
                 form.render('select');
+                sWhere = "";
             }
 
             //缂栬緫鍗曟嵁
@@ -689,12 +730,14 @@
 
 
                             var dataCol = [];//鏁版嵁搴撴煡璇㈠嚭鐨勫垪鏁版嵁
-                            var titleData = ["hmainid", "HProcID", "HMaterID", "HEmpID", "HSourceID", "HGroupID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�
+                            /*var titleData = ["hmainid", "HProcID", "HMaterID", "HEmpID", "HSourceID", "HGroupID"];//涓嶉渶瑕佹樉绀虹殑瀛楁 鍙墿灞�*/
 
                             dataCol = data1.data[0].HGridString.split(',');
 
                             for (var i = 0; i < option.cols[0].length - 2; i++) {
-                                var dataCols = dataCol[i].split('|');
+                                if (dataCol[i]) {
+                                    var dataCols = dataCol[i].split('|');
+                                }
                                 //闅愯棌鍒�
                                 if (dataCols[1] == 1) {
                                     option.cols[0][i + 1]["hide"] = true;

--
Gitblit v1.9.1