From a021584ffc2960bd279ac4558ab1b061335b8fbd Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期一, 21 二月 2022 15:44:50 +0800
Subject: [PATCH] 条码档案

---
 WebTM/views/模治具管理/模治具管理/Gy_BarCodeBillList.html                 |  291 +++++++++++++++++++++++++---------------
 WebTM/views/基础资料/公用基础资料/xmlLBM_HGy_BarCodeBill.aspx.cs          |   17 ++
 WebTM/views/基础资料/公用基础资料/HBarPlanPrint.html                      |    3 
 WebTM/views/基础资料/公用基础资料/xmlLBM_HGy_BarCodeBill.aspx             |   28 ++++
 WebTM/WebTM.csproj                                              |    8 +
 WebTM/views/基础资料/公用基础资料/xmlLBM_HGy_BarCodeBill.aspx.designer.cs |   26 +++
 6 files changed, 262 insertions(+), 111 deletions(-)

diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index ab1c507..29eef8c 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -593,6 +593,7 @@
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_EquipTypeBill.aspx" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Gy_Material.aspx" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\Gy_DepartmentList.html" />
+    <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_HGy_BarCodeBill.aspx" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_ICStockBill.aspx" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_MouldDotCheckBill.aspx" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_MouldDotCheckPlanBill.aspx" />
@@ -1046,6 +1047,13 @@
     <Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_Gy_Department_Edit.aspx.designer.cs">
       <DependentUpon>xmlLBM_Gy_Department_Edit.aspx</DependentUpon>
     </Compile>
+    <Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_HGy_BarCodeBill.aspx.cs">
+      <DependentUpon>xmlLBM_HGy_BarCodeBill.aspx</DependentUpon>
+      <SubType>ASPXCodeBehind</SubType>
+    </Compile>
+    <Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_HGy_BarCodeBill.aspx.designer.cs">
+      <DependentUpon>xmlLBM_HGy_BarCodeBill.aspx</DependentUpon>
+    </Compile>
     <Compile Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_ICStockBill.aspx.cs">
       <DependentUpon>xmlLBM_ICStockBill.aspx</DependentUpon>
       <SubType>ASPXCodeBehind</SubType>
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/HBarPlanPrint.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/HBarPlanPrint.html"
index b48b294..7cb3600 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/HBarPlanPrint.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/HBarPlanPrint.html"
@@ -147,6 +147,9 @@
             case "ICStockBill"://閿�鍞��璐у崟鎵撳嵃
                 CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_ICStockBill.aspx?linterid=" + value, true, "");
                 break;
+            case "HGy_BarCodeBill"://鏉$爜鎵撳嵃
+                CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_HGy_BarCodeBill.aspx?linterid=" + value, true, "");
+                break;
            
         }
     </script>
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_HGy_BarCodeBill.aspx" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_HGy_BarCodeBill.aspx"
new file mode 100644
index 0000000..6e65c25
--- /dev/null
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_HGy_BarCodeBill.aspx"
@@ -0,0 +1,28 @@
+锘�<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="xmlLBM_HGy_BarCodeBill.aspx.cs" Inherits="WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡.xmlLBM_HGy_BarCodeBill" %>
+
+<!DOCTYPE html>
+
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head runat="server">
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <title></title>
+    <script runat="server"> 
+    protected void Page_Load(object sender, EventArgs e)
+    {
+        //鈽呯壒鍒彁绀衡槄锛�
+        //涓嶅悓鐨勬暟鎹簱搴旇閫夌敤涓嶅悓鐨勬姤琛╔ML鏁版嵁鐢熸垚绫伙紝SQL Server鏁版嵁搴撶敤SqlXMLReportData锛孫racle鏁版嵁搴撶敤OracleXMLReportData
+        //OledbXMLReportData閫傚悎浜嶢ccess绛夋湰鍦版暟鎹簱锛屼负浜嗘紨绀烘柟渚匡紝杩欓噷浠嶨rid++Report鐨凙ccess渚嬪瓙鏁版嵁搴撲腑鑾峰彇鎶ヨ〃鏁版嵁
+
+        //OledbXMLReportData.GenOneRecordset(this, "select * from Customers order by CustomerID");
+        //SqlXMLReportData.GenOneRecordset(this, "select * from h_v_Kf_POStockInBillList_K3 where hmainid=1781");
+        SqlXMLReportData.GenOneRecordset(this, "select * from h_v_IF_BarCodeBillList where hmainid=" + Request.Params["linterid"]+ "order by hmainid desc");
+    }
+</script>
+</head>
+<body>
+    <form id="form1" runat="server">
+        <div>
+        </div>
+    </form>
+</body>
+</html>
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_HGy_BarCodeBill.aspx.cs" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_HGy_BarCodeBill.aspx.cs"
new file mode 100644
index 0000000..9ec5263
--- /dev/null
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_HGy_BarCodeBill.aspx.cs"
@@ -0,0 +1,17 @@
+锘縰sing System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+
+namespace WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡
+{
+    public partial class xmlLBM_HGy_BarCodeBill : System.Web.UI.Page
+    {
+        protected void Page_Load(object sender, EventArgs e)
+        {
+
+        }
+    }
+}
\ No newline at end of file
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_HGy_BarCodeBill.aspx.designer.cs" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_HGy_BarCodeBill.aspx.designer.cs"
new file mode 100644
index 0000000..c788b79
--- /dev/null
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\205\254\347\224\250\345\237\272\347\241\200\350\265\204\346\226\231/xmlLBM_HGy_BarCodeBill.aspx.designer.cs"
@@ -0,0 +1,26 @@
+锘�//------------------------------------------------------------------------------
+// <鑷姩鐢熸垚>
+//     姝や唬鐮佺敱宸ュ叿鐢熸垚銆�
+//
+//     瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉
+//     閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆�
+// </鑷姩鐢熸垚>
+//------------------------------------------------------------------------------
+
+namespace WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡
+{
+
+
+    public partial class xmlLBM_HGy_BarCodeBill
+    {
+
+        /// <summary>
+        /// form1 鎺т欢銆�
+        /// </summary>
+        /// <remarks>
+        /// 鑷姩鐢熸垚鐨勫瓧娈点��
+        /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲��
+        /// </remarks>
+        protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+    }
+}
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
index 772c2eb..dfa129d 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_BarCodeBillList.html"
@@ -28,11 +28,6 @@
                     <form class="layui-form" action="" lay-filter="component-form-group">
                         <div class="layui-collapse">
                             <div class="layui-colla-item">
-                                <div class="layui-colla-title layui-inline">
-                                    <div class="layui-inline">
-                                        <span>鏇村</span>
-                                    </div>
-                                </div>
                                 <div class="layui-inline">
                                     <label class="layui-form-label">鏉$爜缂栧彿</label>
                                     <div class="layui-input-block">
@@ -48,6 +43,7 @@
                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                     <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                 </button>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
                             </div>
                         </div>
                         <table class="" id="mainTable" lay-filter="mainTable"></table>
@@ -55,10 +51,9 @@
                             <div class="layui-btn-container">
                                 <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
                                 <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-view"><i class="layui-icon layui-icon-tips"></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>
@@ -89,134 +84,208 @@
                 , util = layui.util
             //鏌ヨ鏉′欢
             var sWhere = "";
+            var option = [];
+            set_ClearBill();
 
-            var option = {
-                elem: '#mainTable'
-                , toolbar: '#toolbarDemo'
-                , height: 'full-50'
-                , page: true
-                , cellMinWidth: 90
-                , limits: [50, 500, 5000, 20000]
-                , limit: 50
-                , cols: [[
-                    { field: 'hmainid', title: '鍗曟嵁ID', hide: true }
-                    , { field: '鏉$爜绫诲瀷', title: '鏉$爜绫诲瀷', width: 160 }
-                    , { field: '鏉$爜缂栧彿', title: '鏉$爜缂栧彿', width: 160 }
-                    , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true }
-                    , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 200 }
-                    , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 200 }
-                    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 200 }
-                    , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 200 }
-                    , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 200 }
-                    , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
-                    , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200 }
-                    , { field: '杈呭姪灞炴�т唬鐮�', title: '杈呭姪灞炴�т唬鐮�', width: 160 }
-                    , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 160 }
-                    , { field: '鎵瑰彿', title: '鎵瑰彿', width: 160 }
-                    , { field: '鏁伴噺', title: '鏁伴噺', width: 200 }
-                    , { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�', width: 200 }
-                    , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
-                    , { field: 'HSupID', title: 'HSupID', width: 200, hide: true }
-                    , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 200 }
-                    , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 200 }
-                    , { field: '杩涙枡鏃ユ湡', title: '杩涙枡鏃ユ湡', width: 200 }
-                    , { field: '杩涙枡鏃ユ湡鍛�', title: '杩涙枡鏃ユ湡鍛�', width: 115 }
-                    , { field: '瀹㈡埛鍨嬪彿', title: '瀹㈡埛鍨嬪彿', width: 115 }
-                    , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200 }
-                    , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
-                    , { field: '杞﹂棿', title: '杞﹂棿', width: 115 }
-                    , { field: '璁″垝瀹屽伐鏃ユ湡', title: '璁″垝瀹屽伐鏃ユ湡', width: 200 }
-                    , { field: '鎷栧彿', title: '鎷栧彿', width: 200 }
-                    , { field: '鎬绘墭鏁�', title: '鎬绘墭鏁�', width: 200 }
-                    , { field: '澶囨敞', title: '澶囨敞', width: 200 }
-                    , { field: '鍒朵綔浜�', title: '鍒朵綔浜�', width: 115 }
-                    , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200 }
-                    , { field: '鎵撳嵃娆℃暟', title: '鎵撳嵃娆℃暟', width: 200 }
-                    , { field: '浣滃簾鏍囪', title: '浣滃簾鏍囪', width: 200 }
-                    , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 115 }
-                    , { field: '鐢熶骇鍏ュ簱鏃ユ湡', title: '鐢熶骇鍏ュ簱鏃ユ湡', width: 200 }
-                    , { field: '閿�鍞嚭搴撴棩鏈�', title: '閿�鍞嚭搴撴棩鏈�', width: 200 }
-                ]]
-            };
-
-            var index = layer.load(0);
-            //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
-            $.ajax({
-                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
-                url: GetWEBURL() + '/Gy_BarCodeBillList/GetBarCodeBillList',
-                type: "GET",
-                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
-                success: function (data1) {
-                    if (data1.count == 1) {
-                        option.data = data1.data;
-                        table.render(option);
-                        layer.close(index);
-                    } else {
-                        layer.close(index);
-                        layer.alert(data1.code + data1.Message, { icon: 5 });
-                    }
-                }, error: function () {
-                    layer.close(index);
-                    layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
-                }
-            });
-
-            //閲嶇疆鎸夐挳
+            //#region 閲嶇疆鎸夐挳
             form.on('submit(btnReSearch)', function (data) {
-                $("#HBarCode").val("");//鍗曟嵁绫诲瀷
-                $("#HMaterName").val("");//鍗曟嵁鍙�
-                $("#btnSearch").click();
+                $("#HBarCode").val("");
+                $("#HMaterName").val("");
+                sWhere = "";
+                get_Display(sWhere);
             });
+            //#endregion
 
-            //鏌ヨ鎸夐挳
-            form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
-                var HBarCode = $("#HBarCode").val();
-                var HMaterName = $("#HMaterName").val();
+            //#region 鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                var HBarCode = $("#HBarCode").val();//寮�濮嬫棩鏈�
+                var HMaterName = $("#HMaterName").val();//缁撴潫鏃ユ湡
                 if (HBarCode) {
-                    sWhere += " and 鏉$爜缂栧彿 like '%" + HBarCode + "%'";
+                    sWhere += " and 鏉$爜缂栧彿 like '" + HBarCode + "'";
                 }
                 if (HMaterName) {
-                    sWhere += " and 鐗╂枡鍚嶇О like '%" + HMaterName + "%'";
+                    sWhere += " and 鐗╂枡鍚嶇О like'" + HMaterName + "'";
                 }
-                var index = layer.load(0);
+                get_Display(sWhere);
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            });
+            //#endregion
+
+            //#region 鍒濆鍖栫晫闈�
+            function set_ClearBill() {
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鏌ヨ
+                get_Display(sWhere);
+            }
+            function set_InitGrid() {
+                 option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , height: 'full-50'
+                    , page: true
+                    , cellMinWidth: 90
+                    , limits: [50, 500, 5000, 20000]
+                    , limit: 50
+                     , cols: [[
+                         { type: 'checkbox', fixed: 'left' }
+                        ,{ field: 'hmainid', title: '鍗曟嵁ID', hide: true }
+                        , { field: '鏉$爜绫诲瀷', title: '鏉$爜绫诲瀷', width: 160 }
+                        , { field: '鏉$爜缂栧彿', title: '鏉$爜缂栧彿', width: 160 }
+                        , { field: 'HMaterID', title: 'HMaterID', width: 160, hide: true }
+                        , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 200 }
+                        , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 200 }
+                        , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 200 }
+                        , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 200 }
+                        , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅', width: 200 }
+                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
+                        , { field: 'HAuxPropID', title: 'HAuxPropID', width: 200 }
+                        , { field: '杈呭姪灞炴�т唬鐮�', title: '杈呭姪灞炴�т唬鐮�', width: 160 }
+                        , { field: '杈呭姪灞炴��', title: '杈呭姪灞炴��', width: 160 }
+                        , { field: '鎵瑰彿', title: '鎵瑰彿', width: 160 }
+                        , { field: '鏁伴噺', title: '鏁伴噺', width: 200 }
+                        , { field: '璁″垝璺熻釜鍙�', title: '璁″垝璺熻釜鍙�', width: 200 }
+                        , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
+                        , { field: 'HSupID', title: 'HSupID', width: 200, hide: true }
+                        , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�', width: 200 }
+                        , { field: '渚涘簲鍟�', title: '渚涘簲鍟�', width: 200 }
+                        , { field: '杩涙枡鏃ユ湡', title: '杩涙枡鏃ユ湡', width: 200 }
+                        , { field: '杩涙枡鏃ユ湡鍛�', title: '杩涙枡鏃ユ湡鍛�', width: 115 }
+                        , { field: '瀹㈡埛鍨嬪彿', title: '瀹㈡埛鍨嬪彿', width: 115 }
+                        , { field: '寰�鏉ュ崟浣�', title: '寰�鏉ュ崟浣�', width: 200 }
+                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
+                        , { field: '杞﹂棿', title: '杞﹂棿', width: 115 }
+                        , { field: '璁″垝瀹屽伐鏃ユ湡', title: '璁″垝瀹屽伐鏃ユ湡', width: 200 }
+                        , { field: '鎷栧彿', title: '鎷栧彿', width: 200 }
+                        , { field: '鎬绘墭鏁�', title: '鎬绘墭鏁�', width: 200 }
+                        , { field: '澶囨敞', title: '澶囨敞', width: 200 }
+                        , { field: '鍒朵綔浜�', title: '鍒朵綔浜�', width: 115 }
+                        , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200 }
+                        , { field: '鎵撳嵃娆℃暟', title: '鎵撳嵃娆℃暟', width: 200 }
+                        , { field: '浣滃簾鏍囪', title: '浣滃簾鏍囪', width: 200 }
+                        , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 115 }
+                        , { field: '鐢熶骇鍏ュ簱鏃ユ湡', title: '鐢熶骇鍏ュ簱鏃ユ湡', width: 200 }
+                        , { field: '閿�鍞嚭搴撴棩鏈�', title: '閿�鍞嚭搴撴棩鏈�', width: 200 }
+                    ]]
+                };
+
+            }
+
+            //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+            function get_Display(sWhere) {
+                //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
                 $.ajax({
                     //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
-                    url: GetWEBURL1() + '/Gy_BarCodeBillList/GetBarCodeBillList',
+                    url: GetWEBURL() + '/Gy_BarCodeBillList/GetBarCodeBillList',
                     type: "GET",
-                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                     success: function (data1) {
                         if (data1.count == 1) {
                             option.data = data1.data;
                             table.render(option);
                             layer.close(index);
-                            layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
                         } else {
                             layer.close(index);
                             layer.alert(data1.code + data1.Message, { icon: 5 });
                         }
                     }, error: function () {
                         layer.close(index);
-                        layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
                 });
-                sWhere = "";
-                $("#HBarCode").val("");//鍗曟嵁绫诲瀷
-                $("#HMaterName").val("");//鍗曟嵁鍙�
+            }
+            
+            //澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                var checkStatus = table.checkStatus(obj.config.id);
+                switch (obj.event) {
+                    case 'btn-Delete':
+                        var checkStatus = table.checkStatus('mainTable')
+                            , data = checkStatus.data;
+                        if (checkStatus.data.length === 1) {
+                            var InterID = data[0].hmainid.toString();
+                            //閫昏緫鍒犻櫎鏂规硶
+                            layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+                                $.ajax({
+                                    type: "GET",
+                                    url: GetWEBURL() + "Gy_MaterialController/DeltetBarCodeBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                                    data: { "HInterID": InterID, "user": 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 });
+                                    }
+                                });
+                            })
+                        }
+                        else {
+                            layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+                        }
+                        break;
+                    case 'btn-view':
+                        var checkStatus = table.checkStatus('mainTable')
+                            , data = checkStatus.data;
+                        if (checkStatus.data.length === 1) {
+                            layer.open({
+                                type: 2
+                                , area: ['50%', '50%']
+                                , title: '鎵撳嵃妯$増閫夋嫨'
+                                , shade: 0.6 //閬僵閫忔槑搴�
+                                , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                                , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdBackBill', 'yes']
+                                , resize: false
+                            })
+                        }
+                        else {
+                            layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
+                        }
+                        break;
+                    case 'btn-print':
+                        var checkStatus = table.checkStatus('mainTable')
+                            , data = checkStatus.data;
+                        if (checkStatus.data.length === 1) {
+                            layer.open({
+                                type: 2
+                                , area: ['50%', '50%']
+                                , title: '鎵撳嵃妯$増閫夋嫨'
+                                , shade: 0.6 //閬僵閫忔槑搴�
+                                , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                                , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + data[0].hmainid.toString() + '&MyMsg=' + data[0].hmainid.toString() + '&Type=HMouldProdBackBill', 'yes']
+                                , resize: false
+                            })
+                        }
+                        else {
+                            layer.msg('璇烽�夋嫨涓�琛屾暟鎹墦鍗帮紒');
+                        }
+                        break;
+                    //鍒锋柊
+                    case 'btn-reload':
+                        $("#HBarCode").val("");
+                        $("#HMaterName").val("");
+                        sWhere = "";
+                        get_Display(sWhere);
+                        break;
+                    //閫�鍑烘寜閽�
+                    case 'btn-exit': Pub_Close(2);
+                        break;
+                };
             });
 
-            //鐩戝惉琛屽弻鍑讳簨浠�
-            table.on('rowDouble(mainTable)', function (obj) {
-                layer.alert("鍙屽嚮浜嬩欢", { icon: 1 });
-            });
-
-
-            //laydate.render({
-            //    elem: '#HDate'
-            //    , type: 'datetime'
-            //    , trigger: 'click'
-            //    , format:'yyyy-MM-dd HH:mm'
-            //});
-
+            
 
             //浠ヤ笂鏄痩ayui妯″潡
         });

--
Gitblit v1.9.1