From 9ee2abf3f34b3e6c0d35df6cdde0c4d4e1a5d246 Mon Sep 17 00:00:00 2001
From: 王 垚 <1402714037@qq.com>
Date: 星期五, 31 十二月 2021 20:16:08 +0800
Subject: [PATCH] 问题处理

---
 WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBillList.html |  145 ++++++++++++++++++++++++++++++++----------------
 1 files changed, 97 insertions(+), 48 deletions(-)

diff --git a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBillList.html b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBillList.html
index c51b5fc..937ac05 100644
--- a/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBillList.html
+++ b/WebSRM/layuiAdmin.std-v1.2.1/src/views/SRM/SRM_BarCodeBillList.html
@@ -54,13 +54,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>
@@ -115,6 +121,7 @@
                             <button type="button" class="layui-btn layui-btn-sm" lay-event="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-print"><i class="layui-icon layui-icon-print"></i>鏉$爜鎵撳嵃</button>
+                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></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>
@@ -182,12 +189,12 @@
             index: 'lib/index' //涓诲叆鍙fā鍧�
         }).use(['index', 'form', 'laydate', 'code', 'table', 'element', 'layer'], function () {
             var $ = layui.$
-            , admin = layui.admin
-            , layer = layui.layer
-            , laydate = layui.laydate
-            , table = layui.table
-            , form = layui.form
-            , element = layui.element;
+                , admin = layui.admin
+                , layer = layui.layer
+                , laydate = layui.laydate
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element;
             //甯歌鐢ㄦ硶
             laydate.render({
                 elem: '#HDate1'
@@ -208,36 +215,37 @@
                 , toolbar: '#toolbarDemo' //寮�鍚ご閮ㄥ伐鍏锋爮锛屽苟涓哄叾缁戝畾宸︿晶妯℃澘
                 , defaultToolbar: ['filter', 'exports', 'print']
                 // , where: { msg: "", NowPage: 1, OnePage: 10 }
-              , cellMinWidth: 100
-              , cols: [[
-                { checkbox: true/*, fixed: true*/ }               
-                , { field: 'sorderid', title: '搴忓彿', width: 80/*, fixed: true*/ }
-                , { field: 'HItemID', title: '涓婚敭', width: 100, hide: true }
-                , { field: '鐘舵��', title: '鐘舵��', width: 100, sort: true/*, fixed: true*/ }
-                , { field: '鏉$爜缂栧彿', title: '鏉$爜缂栧彿', width: 180, sort: true/*, fixed: true*/ }
-                , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 180, sort: true/*, fixed: true*/ }
-                , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 180, sort: true }
-                , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 180, sort: true }
-                , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 80, sort: true }
-                , { field: '鏁伴噺', title: '鏁伴噺', width: 100, sort: true }
-                , { field: '鎵规', title: '鎵规', width: 100 }
-                , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 180 }
-                , { field: '鏃ユ湡', title: '鐢熸垚鏃ユ湡', width: 150, sort: true }
-                , { field: '婧愬崟涓籌D', title: '婧愬崟涓籌D', width: 100, hide: true }
-                , { field: '婧愬崟瀛怚D', title: '婧愬崟瀛怚D', width: 100, hide: true }
-                , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 180 }
-                , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 100 }
-              ]]
+                , cellMinWidth: 100
+                , cols: [[
+                    { checkbox: true/*, fixed: true*/ }
+                    , { field: 'sorderid', title: '搴忓彿', width: 80/*, fixed: true*/ }
+                    , { field: 'HItemID', title: '涓婚敭', width: 100, hide: true }
+                    , { field: '鐘舵��', title: '鐘舵��', width: 100, sort: true/*, fixed: true*/ }
+                    , { field: '鏉$爜缂栧彿', title: '鏉$爜缂栧彿', width: 180, sort: true/*, fixed: true*/ }
+                    , { field: '鐗╂枡缂栫爜', title: '鐗╂枡缂栫爜', width: 120, sort: true/*, fixed: true*/ }
+                    , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 120, sort: true/*, fixed: true*/ }
+                    , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 120, sort: true }
+                    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 120, sort: true }
+                    , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 80, sort: true }
+                    , { field: '鏁伴噺', title: '鏁伴噺', width: 100, sort: true }
+                    , { field: '鎵规', title: '鎵规', width: 100 }
+                    , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 180 }
+                    , { field: '鏃ユ湡', title: '鐢熸垚鏃ユ湡', width: 150, sort: true }
+                    , { field: '婧愬崟涓籌D', title: '婧愬崟涓籌D', width: 100, hide: true }
+                    , { field: '婧愬崟瀛怚D', title: '婧愬崟瀛怚D', width: 100, hide: true }
+                    , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 180 }
+                    , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 100 }
+                ]]
                 //, skin: 'row' //琛ㄦ牸椋庢牸
                 // , even: true
-            , page: true //鏄惁鏄剧ず鍒嗛〉
-            , limits: [10, 20, 50, 100]
-            , limit: 50 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
+                , page: true //鏄惁鏄剧ず鍒嗛〉
+                , limits: [10, 20, 50, 100]
+                , limit: 50 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
                 //, height: 500
-            , done: function (res, curr, count) {
-                _cur_page = curr;
-                layer.closeAll("loading");
-            }
+                , done: function (res, curr, count) {
+                    _cur_page = curr;
+                    layer.closeAll("loading");
+                }
 
             });
             //澶村伐鍏锋爮浜嬩欢
@@ -248,15 +256,15 @@
                         var data = checkStatus.data;
                         layer.alert(JSON.stringify(data));
                         break;
-                        //case 'getCheckLength':
-                        //    var data = checkStatus.data;
-                        //    layer.msg('閫変腑浜嗭細' + data.length + ' 涓�');
-                        //    break;
-                        //case 'isAll':
-                        //    layer.msg(checkStatus.isAll ? '鍏ㄩ��' : '鏈叏閫�');
-                        //    break;
+                    //case 'getCheckLength':
+                    //    var data = checkStatus.data;
+                    //    layer.msg('閫変腑浜嗭細' + data.length + ' 涓�');
+                    //    break;
+                    //case 'isAll':
+                    //    layer.msg(checkStatus.isAll ? '鍏ㄩ��' : '鏈叏閫�');
+                    //    break;
 
-                        //鑷畾涔夊ご宸ュ叿鏍忓彸渚у浘鏍� - 鎻愮ず
+                    //鑷畾涔夊ご宸ュ叿鏍忓彸渚у浘鏍� - 鎻愮ず
                     case 'btn-reload':
                         _cur_page = $(".layui-laypage-em").next().html();
                         RoadHBillNo(sql);
@@ -264,7 +272,7 @@
                         break;
                     case "btn-print":
                         var checkStatus = table.checkStatus('mainTable')
-                        , data = checkStatus.data;
+                            , data = checkStatus.data;
                         var rows = '';
                         var rows2 = '';
                         for (var i = 0; i < data.length; i++) {
@@ -273,11 +281,10 @@
                         }
                         rows = rows.substring(rows.length - 1, 0);
                         rows2 = rows2.substring(rows2.length - 1, 0);
-                        if(rows=="")
-                        {
+                        if (rows == "") {
                             layer.msg("鑷冲皯閫夋嫨涓�琛岃褰曪紒")
                         }
-                        else{
+                        else {
                             layer.open({
                                 type: 2
                                 , area: ['50%', '50%']
@@ -317,6 +324,46 @@
                         //    });
                         //}
                         break;
+                    case 'btn-Delete':
+                        var checkStatus = table.checkStatus('mainTable')
+                            , data = checkStatus.data;
+                        if (checkStatus.data.length == 0) {
+                            layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁锛�');
+                            return;
+                        }
+                        var InterID = "";
+                        for (i = 0; i < data.length; i++) {
+                            InterID += data[i].HItemID.toString() + ",";
+                        }
+                        InterID = InterID.substring(0, InterID.length - 1)
+                        //閫昏緫鍒犻櫎鏂规硶
+                        layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+                            $.ajax({
+                                type: "GET",
+                                url: GetWEBURL() + "/DeltetBarCodeBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                                data: { "HInterID": InterID, "HUserName": sessionStorage["HUserName"] },
+                                success: function (result) {
+                                    if (result.count == 1) {
+                                        layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                            // 寰楀埌frame绱㈠紩
+                                            var index = layer.getFrameIndex(window.name);
+                                            //鍏抽棴褰撳墠frame
+                                            layer.close(index);
+                                            //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                            window.location.reload();
+                                        });
+
+                                    } else {
+                                        layer.alert(result.code + result.Message, { icon: 5 });
+                                    }
+                                }, error: function () {
+                                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                }
+                            });
+                        })
+
+
+                        break;
                     case 'btn-exit':
                         parent.layui.admin.events.closeThisTabs();
                         break;
@@ -327,7 +374,7 @@
                 where = sqlWhere;
                 $.ajax({
                     type: "get",
-                    url: GetWEBURL()+"GetBarCodeShowList",
+                    url: GetWEBURL() + "GetBarCodeShowList",
                     async: true,
                     data: { "HSupNo": sessionStorage["HUserName"], "sqlWhere": sqlWhere },
                     success: function (result) {
@@ -358,6 +405,8 @@
                     sqlWhere += " and 鏉$爜缂栧彿 like ^^%" + $("#HBarCode").val() + "%^^";
                 if ($("#HSourceBillNo").val() != "")
                     sqlWhere += " and 婧愬崟鍗曞彿 like ^^%" + $("#HSourceBillNo").val() + "%^^";
+                if ($("#HShortNumber").val() != "")
+                    sqlWhere += " and 鐗╂枡缂栫爜 like ^^%" + $("#HShortNumber").val() + "%^^";
                 if ($("#HNumber").val() != "")
                     sqlWhere += " and 鐗╂枡浠g爜 like ^^%" + $("#HNumber").val() + "%^^";
                 if ($("#HName").val() != "")
@@ -375,7 +424,7 @@
                     sqlWhere += " and 鏃ユ湡 <= ^^" + $("#HDate2").val() + "^^";
                 }
 
-             
+
                 sql = sqlWhere;
                 //浠庣涓�椤靛紑濮�
                 _cur_page = 1;

--
Gitblit v1.9.1