From 8196f90ec19a5f4cb881e6e39ba7d255abd31fad Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期六, 08 十月 2022 15:02:46 +0800
Subject: [PATCH] nothing

---
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_POOrderBillList.html |  104 ++++++++++++++++++++++++++++++++++++++++++----------
 1 files changed, 84 insertions(+), 20 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 83d8f45..644f500 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
@@ -47,13 +47,19 @@
                                     </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>
+                                    <label class="layui-form-label">鐗╂枡鍚嶇О</label>
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input" name="HName" id="HName">
                                     </div>
@@ -106,7 +112,6 @@
                                     <label class="layui-form-label">閲囪喘缁勭粐</label>
                                     <div class="layui-input-block">
                                         <select id="HPURCHASEORGID" name="HPURCHASEORGID" lay-filter="">
-                                            <option value="">瀹夌憺</option>
                                         </select>
                                     </div>
                                 </div>
@@ -141,8 +146,8 @@
                             <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-report" id="btn_report"><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-barcode"><i class="layui-icon layui-icon-file"></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>
@@ -237,20 +242,26 @@
                     //{ checkbox: true, fixed: true }
                     { type: 'checkbox', fixed: 'left' }
                     //{ type: 'radio', 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: '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: 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: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 180, sort: true }
-                    , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 180, sort: true }
-                    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 180, sort: true }
+                    , { field: 'F_xbkf_Combo', title: '鑷畾涔夋爣璇�', width: 120 }
+                    , { field: 'FSHDD', title: '閫佽揣鍦扮偣', width: 120 }
+                    , { field: 'FStockInQty', title: '绱鍏ュ簱鏁伴噺', width: 120 }
+                    , { field: '鍖呰鏍囪瘑', title: '鍖呰鏍囪瘑', width: 120 }
+                    , { field: 'FMRBQTY', 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 }
                     , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 80, sort: true }
                     , { field: '鏁伴噺', title: '璁㈣揣鏁伴噺', sort: true }
                     , { field: '浜よ揣鍦扮偣', title: '浜よ揣鍦扮偣', sort: true }
@@ -271,7 +282,7 @@
                 //, skin: 'row' //琛ㄦ牸椋庢牸
                 // , even: true
                 , page: true //鏄惁鏄剧ず鍒嗛〉
-                , limits: [10, 20, 50, 100]
+                , limits: [10, 20, 50, 100,500,1000,5000,10000]
                 , limit: 50 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
                 //, height: 500
                 , done: function (res, curr, count) {
@@ -395,9 +406,57 @@
                         var checkStatus = table.checkStatus('mainTable')
                             , data = checkStatus.data;
                         ajaxLabelData = data;
+                        //鏍规嵁閫変腑鐨勯噰璐鍗曪紝閲嶆柊浠庨噾铦朵簯鍚屾閲囪喘璁㈠崟鍏宠仈鏁伴噺杩囨潵銆傝�冭檻閲囪喘璁㈠崟鍒犻櫎鍜屽叧闂姸鎬侊紝鍚屾鐘舵��
+                        var ids = "";
+                        var entryids = "";
+                        $.each(data, function (obj) {
+                            ids += data[obj].hmainid + ",";
+                            entryids += data[obj].hsubid + ",";
+                        })
+                        ids = ids.substring(0, ids.length - 1);
+                        entryids = entryids.substring(0, entryids.length - 1);
+                        var hasPrivileage = true;
+                        $.ajax({
+                            url: GetWEBURL() + 'TestSaverPOInStock',
+                            type: 'get',
+                            async: false,
+                            traditional: true,   //閲嶇偣
+                            data: {
+                                "ids": ids,
+                                "entryids": entryids //閲嶇偣
+                            },
+                            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++) {
+                            if (data[i]["鏈叧鑱旀暟閲�"] == 0) {
+                                layer.msg("鍗曟嵁鍙�:" + data[i]["鍗曟嵁鍙�"] + "宸插叏閮ㄧ敓鎴愰�佽揣鍗曪紒", { icon: 5 });
+                                return;
+                            }
                             if (data[i]["鐘舵��"] == "宸茬‘璁�") {
                                 rows += data[i].hmainid.toString() + ',' + data[i].hsubid.toString() + ';';
                             }
@@ -425,7 +484,7 @@
                             })
                         }
                         break;
-                        btn - barcode
+
                     case 'btn-barcode':
                         var checkStatus = table.checkStatus('mainTable')
                             , data = checkStatus.data;
@@ -546,7 +605,10 @@
                 };
             });
 
-
+            //娓叉煋閲囪喘缁勭粐
+            var Organization = '<option value=' + sessionStorage["OrganizationID"] + ' style="color:red;">' + sessionStorage["Organization"] + '</option>';
+            $("#HPURCHASEORGID").append(Organization);
+            form.render('select');
 
             ///鍔犺浇鏄剧ず鏁版嵁
             function RoadHBillNo(sqlWhere) {
@@ -582,6 +644,8 @@
                     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() != "")
@@ -590,8 +654,8 @@
                     sqlWhere += " and 瑙勬牸鍨嬪彿 like ^^%" + $("#HModel").val() + "%^^";
                 if ($("#HClStatus").val() != "")
                     sqlWhere += " and 鍏抽棴鐘舵�� like ^^%" + $("#HClStatus").val() + "%^^";
-                if ($("#HPURCHASEORGID").val() != "")
-                    sqlWhere += " and 閲囪喘缁勭粐 like ^^%" + $("#HPURCHASEORGID").val() + "%^^";
+                //if ($("#HPURCHASEORGID").val() != "")
+                //    sqlWhere += " and 閲囪喘缁勭粐 like ^^%" + $("#HPURCHASEORGID").val() + "%^^";
                 if ($("#HDate1").val() != "") {
                     sqlWhere += " and 鏃ユ湡 >= ^^" + $("#HDate1").val() + "^^";
                 }

--
Gitblit v1.9.1