From ba5b9f28eb0ba21641c606507d74ef0937cce4e9 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期二, 22 二月 2022 16:19:59 +0800
Subject: [PATCH] 单据页面过滤条件部分隐藏,查询布局优化

---
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html |  147 +++++++++++++++++++++++++++++++++----------------
 1 files changed, 99 insertions(+), 48 deletions(-)

diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html
index cb61616..f208443 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html
@@ -46,25 +46,31 @@
                                         <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                     </div>
                                 </div>
+                                <!--<div class="layui-inline">
+                                    <label class="layui-form-label">鐗╂枡缂栫爜</label>
+                                    <div class="layui-input-block">
+                                        <input type="text" class="layui-input" name="HShortNumber" id="HShortNumber">
+                                    </div>
+                                </div>-->
                                 <div class="layui-inline">
                                     <label class="layui-form-label">鐗╂枡浠g爜</label>
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input" name="HNumber" id="HNumber">
                                     </div>
                                 </div>
-                                <div class="layui-inline">
-                                    <label class="layui-form-label">浜у搧鍚嶇О</label>
+                                <!--<div class="layui-inline">
+                                    <label class="layui-form-label">鐗╂枡鍚嶇О</label>
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input" name="HName" id="HName">
                                     </div>
-                                </div>
-                                <div class="layui-inline">
+                                </div>-->
+                                <!--<div class="layui-inline">
                                     <label class="layui-form-label">瑙勬牸鍨嬪彿</label>
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input" name="HModel" id="HModel">
                                     </div>
-                                </div>
-                                <div class="layui-inline">
+                                </div>-->
+                                <!--<div class="layui-inline">
                                     <label class="layui-form-label">鍏抽棴鐘舵��</label>
                                     <div class="layui-input-block">
                                         <select id="HClStatus" name="HClStatus" lay-filter="">
@@ -73,19 +79,19 @@
                                             <option value="宸插叧闂�">宸插叧闂�</option>
                                         </select>
                                     </div>
-                                </div>
-                                <div class="layui-inline">
+                                </div>-->
+                                <!--<div class="layui-inline">
                                     <label class="layui-form-label">寮�濮嬫棩鏈�</label>
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input" name="HDate1" id="HDate1">
                                     </div>
-                                </div>
-                                <div class="layui-inline">
+                                </div>-->
+                                <!--<div class="layui-inline">
                                     <label class="layui-form-label">缁撴潫鏃ユ湡</label>
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input" name="HDate2" id="HDate2">
                                     </div>
-                                </div>
+                                </div>-->
                                 <div class="layui-inline">
                                     <label class="layui-form-label">浜よ揣鏃堕棿</label>
                                     <div class="layui-input-block">
@@ -102,15 +108,14 @@
                                         </select>
                                     </div>
                                 </div>
-                                <div class="layui-inline">
+                                <!--<div class="layui-inline">
                                     <label class="layui-form-label">閲囪喘缁勭粐</label>
                                     <div class="layui-input-block">
                                         <select id="HPURCHASEORGID" name="HPURCHASEORGID" lay-filter="">
-                                            <option value="">瀹夌憺</option>
                                         </select>
                                     </div>
-                                </div>
-                                <div class="layui-inline">
+                                </div>-->
+                                <!--<div class="layui-inline">
                                     <label class="layui-form-label">鏄惁宸蹭笅鎺ㄩ�佽揣鍗�</label>
                                     <div class="layui-input-block">
                                         <select id="HISGenerate" name="HISGenerate" lay-filter="">
@@ -119,7 +124,7 @@
                                             <option value="鍚�">鍚�</option>
                                         </select>
                                     </div>
-                                </div>
+                                </div>-->
                                 <div class="layui-inline">
                                     <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="f_Query">
                                         <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
@@ -237,18 +242,20 @@
                     //{ checkbox: true, fixed: true }
                     { type: 'checkbox', fixed: 'left' }
                     //{ type: 'radio', fixed: true }
-                    , { field: 'sorderid', title: '搴忓彿', width: 80/*, fixed: true */}
+                    , { field: 'sorderid', title: '搴忓彿', width: 80/*, fixed: true */ }
                     , { field: 'hmainid', title: 'hmainid', sort: true, /*fixed: true,*/ hide: true }
                     , { field: 'hsubid', title: 'hsubid', sort: true, /*fixed: true,*/ hide: true }
-                    , { field: '鐘舵��', title: '鐘舵��', sort: true/*, fixed: true */}
-                    , { field: '鍙嶉鐘舵��', title: '鍙嶉鐘舵��', width: 100/*, fixed: true */}
-                    , { field: '浼樺厛绾�', title: '浼樺厛绾�', width: 100/*, fixed: true */}
-                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 180, sort: true/*, fixed: 'left' */}
-                    , { field: '鏃ユ湡', title: '鏃ユ湡', width: 180, sort: true/*, fixed: 'left' */}
+                    , { field: '鐘舵��', title: '鐘舵��', sort: true/*, fixed: true */ }
+                    //, { field: '鍙嶉鐘舵��', title: '鍙嶉鐘舵��', width: 100/*, fixed: true */}
+                    //, { field: '浼樺厛绾�', title: '浼樺厛绾�', width: 100/*, fixed: true */}
+                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 150, sort: true/*, fixed: 'left' */ }
+                    , { field: '鏃ユ湡', title: '鏃ユ湡', width: 120, sort: true/*, fixed: 'left' */ }
                     , { field: 'HSupID', title: 'HSupID', width: 180, hide: true }
-                    , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 180, sort: true/*, fixed: 'left' */}
+                    , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 180, sort: true/*, fixed: 'left' */ }
                     , { field: '璁″垝璺熻釜鍗曞彿', title: '璁″垝璺熻釜鍗曞彿', sort: true, hide: true }
-                    , { field: '鐗╂枡缂栫爜', title: '鐗╂枡缂栫爜', width: 120, sort: true }
+                    , { field: 'F_xbkf_Combo', title: '鑷畾涔夋爣璇�', width: 120 }
+                    , { field: 'FSHDD', title: '閫佽揣鍦扮偣', width: 120 }
+                    //, { field: '鐗╂枡缂栫爜', title: '鐗╂枡缂栫爜', width: 120, sort: true }
                     , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 120, sort: true }
                     , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 120, sort: true }
                     , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 120, sort: true }
@@ -396,6 +403,45 @@
                         var checkStatus = table.checkStatus('mainTable')
                             , data = checkStatus.data;
                         ajaxLabelData = data;
+                        //鏍规嵁閫変腑鐨勯噰璐鍗曪紝閲嶆柊浠庨噾铦朵簯鍚屾閲囪喘璁㈠崟鍏宠仈鏁伴噺杩囨潵銆傝�冭檻閲囪喘璁㈠崟鍒犻櫎鍜屽叧闂姸鎬侊紝鍚屾鐘舵��
+                        var ids = [];
+                        $.each(data, function (obj) {
+                            ids.push(data[obj].hmainid);
+                        })
+                        var hasPrivileage = true;
+                        $.ajax({
+                            url: GetWEBURL() + 'TestSaverPOInStock',
+                            type: 'Post',
+                            async: false,
+                            traditional: true,   // 閲嶇偣
+                            data: {
+                                "": ids      // 閲嶇偣
+                            },
+                            success: function (data) {
+                                if (data.code == "0") {
+                                    layer.alert(data.Message, { icon: 5 });
+                                    hasPrivileage = false;
+                                    table.reload('mainTable', {
+                                        data: ajaxReturnData
+                                        , height: 'full-10'
+                                        , page: {
+                                            curr: _cur_page //蹇呴』浠庣 1 椤靛紑濮�
+                                        }
+                                        , loading: false
+                                        , done: function (index, res) {
+
+                                        }
+                                    });
+                                    return hasPrivileage;
+                                }
+                            },
+                            error: function (e) {
+                                layer.alert(e.Message, { icon: 5 });
+                            }
+                        });
+                        if (!hasPrivileage) {
+                            return;
+                        }
                         var rows = '';
                         var HEntry = '';
                         for (var i = 0; i < data.length; i++) {
@@ -430,7 +476,7 @@
                             })
                         }
                         break;
-                        btn - barcode
+
                     case 'btn-barcode':
                         var checkStatus = table.checkStatus('mainTable')
                             , data = checkStatus.data;
@@ -551,7 +597,10 @@
                 };
             });
 
-
+            //娓叉煋閲囪喘缁勭粐
+            var Organization = '<option value=' + sessionStorage["OrganizationID"] + ' style="color:red;">' + sessionStorage["Organization"] + '</option>';
+            $("#HPURCHASEORGID").append(Organization);
+            form.render('select');
 
             ///鍔犺浇鏄剧ず鏁版嵁
             function RoadHBillNo(sqlWhere) {
@@ -587,30 +636,32 @@
                     sqlWhere += " and 鐘舵�� like ^^%" + $("#HStatus").val() + "%^^";
                 if ($("#HBillNo").val() != "")
                     sqlWhere += " and 鍗曟嵁鍙� like ^^%" + $("#HBillNo").val() + "%^^";
+                //if ($("#HShortNumber").val() != "")
+                //    sqlWhere += " and 鐗╂枡缂栫爜 like ^^%" + $("#HShortNumber").val() + "%^^";
                 if ($("#HNumber").val() != "")
                     sqlWhere += " and 鐗╂枡浠g爜 like ^^%" + $("#HNumber").val() + "%^^";
-                if ($("#HName").val() != "")
-                    sqlWhere += " and 鐗╂枡鍚嶇О like ^^%" + $("#HName").val() + "%^^";
-                if ($("#HModel").val() != "")
-                    sqlWhere += " and 瑙勬牸鍨嬪彿 like ^^%" + $("#HModel").val() + "%^^";
-                if ($("#HClStatus").val() != "")
-                    sqlWhere += " and 鍏抽棴鐘舵�� like ^^%" + $("#HClStatus").val() + "%^^";
-                if ($("#HPURCHASEORGID").val() != "")
-                    sqlWhere += " and 閲囪喘缁勭粐 like ^^%" + $("#HPURCHASEORGID").val() + "%^^";
-                if ($("#HDate1").val() != "") {
-                    sqlWhere += " and 鏃ユ湡 >= ^^" + $("#HDate1").val() + "^^";
-                }
-                if ($("#HDate2").val() != "") {
-                    sqlWhere += " and 鏃ユ湡 <= ^^" + $("#HDate2").val() + "^^";
-                }
-                if ($("#HISGenerate").val() != "") {
-                    if ($("#HISGenerate").val() == "鏄�") {
-                        sqlWhere += " and 鏈叧鑱旀暟閲� <= 0";
-                    }
-                    else if ($("#HISGenerate").val() == "鍚�") {
-                        sqlWhere += " and 鏈叧鑱旀暟閲� > 0";
-                    }
-                }
+                //if ($("#HName").val() != "")
+                //    sqlWhere += " and 鐗╂枡鍚嶇О like ^^%" + $("#HName").val() + "%^^";
+                //if ($("#HModel").val() != "")
+                //    sqlWhere += " and 瑙勬牸鍨嬪彿 like ^^%" + $("#HModel").val() + "%^^";
+                //if ($("#HClStatus").val() != "")
+                //    sqlWhere += " and 鍏抽棴鐘舵�� like ^^%" + $("#HClStatus").val() + "%^^";
+                //if ($("#HPURCHASEORGID").val() != "")
+                //    sqlWhere += " and 閲囪喘缁勭粐 like ^^%" + $("#HPURCHASEORGID").val() + "%^^";
+                //if ($("#HDate1").val() != "") {
+                //    sqlWhere += " and 鏃ユ湡 >= ^^" + $("#HDate1").val() + "^^";
+                //}
+                //if ($("#HDate2").val() != "") {
+                //    sqlWhere += " and 鏃ユ湡 <= ^^" + $("#HDate2").val() + "^^";
+                //}
+                //if ($("#HISGenerate").val() != "") {
+                //    if ($("#HISGenerate").val() == "鏄�") {
+                //        sqlWhere += " and 鏈叧鑱旀暟閲� <= 0";
+                //    }
+                //    else if ($("#HISGenerate").val() == "鍚�") {
+                //        sqlWhere += " and 鏈叧鑱旀暟閲� > 0";
+                //    }
+                //}
 
 
                 var Time = $("#Time").val();

--
Gitblit v1.9.1