From 25ae1f533d42bc6fb8ec648c43b91c0bab73e5de Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期五, 21 三月 2025 12:07:42 +0800
Subject: [PATCH] 生产领料单(非染厂):打印功能、编辑页面打印、审核

---
 WebTM/App_Data/MssqlReportData.cs                                                 |    2 
 WebTM/views/基础资料/公用基础资料/xmlLBM_Kf_ProductReceiveMaterialBillList.aspx.cs          |   17 +++++
 WebTM/views/基础资料/公用基础资料/xmlLBM_Kf_ProductReceiveMaterialBillList.aspx.designer.cs |   26 ++++++++
 WebTM/views/基础资料/公用基础资料/xmlLBM_Kf_ProductReceiveMaterialBillList.aspx             |   28 +++++++++
 WebTM/views/基础资料/公用基础资料/HBarPlanPrint.html                                        |    5 +
 WebTM/views/领料发货/生产领料/Kf_ProductReceiveMaterialBillEdit.html                      |   52 +++++++----------
 6 files changed, 97 insertions(+), 33 deletions(-)

diff --git a/WebTM/App_Data/MssqlReportData.cs b/WebTM/App_Data/MssqlReportData.cs
index 2ef2a4b..149ea07 100644
--- a/WebTM/App_Data/MssqlReportData.cs
+++ b/WebTM/App_Data/MssqlReportData.cs
@@ -23,7 +23,7 @@
     //public const string SqlConnStr = "Data Source=10.11.18.195;Initial Catalog=HX_LMESsys_test;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";  //鏂帿灏�
     //public const string SqlConnStr = "Data Source=30.10.7.6;Initial Catalog=HX_LMESsys_test;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";  //鏂帿灏�
     //public const string SqlConnStr = "Data Source=192.168.0.245;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//甯呭▉
-    //public const string SqlConnStr = "Data Source=192.168.1.250;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//涔斾竴
+    //public const string SqlConnStr = "Data Source=10.10.1.1;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//涔斾竴
     //public const string SqlConnStr = "Data Source=192.168.1.251;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//涔斾竴娴嬭瘯
     //public const string SqlConnStr = "Data Source=192.168.16.53;Initial Catalog=HX_LMESsys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//榫欏北姹介厤
     //public const string SqlConnStr = @"Data Source=192.168.0.193\SWE2014;Initial Catalog=HX_LimsSys;Persist Security Info=True;User ID=HX_USER;Password=lc@841022;";//涓镐簳鍦板潃
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 5b1c5ca..dde200b 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"
@@ -323,7 +323,10 @@
                 break;
             case "Xs_OutDoorBillList"://鍑洪棬纭鍗曞崟
                 CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_Xs_OutDoorBillList.aspx?linterid=" + value, true, "");
-                break; 
+                break;
+            case "Kf_ProductReceiveMaterialBillList": //鐢熶骇棰嗘枡鍗�
+                CreateDisplayViewerEx("100%", "100%", "../../grf/" + OpenTmp + ".grf", "xmlLBM_Kf_ProductReceiveMaterialBillList.aspx?linterid=" + value, true, "");
+                break;
         }
     </script>
 </body>
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_Kf_ProductReceiveMaterialBillList.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_Kf_ProductReceiveMaterialBillList.aspx"
new file mode 100644
index 0000000..3906d0d
--- /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_Kf_ProductReceiveMaterialBillList.aspx"
@@ -0,0 +1,28 @@
+锘�<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="xmlLBM_Kf_ProductReceiveMaterialBillList.aspx.cs" Inherits="WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡.xmlLBM_Kf_ProductReceiveMaterialBillList" %>
+
+<!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_Kf_ProductReceiveMaterialBillList_Edit where hmainid=" + Request.Params["linterid"] + " order by hsubid asc");
+    }
+</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_Kf_ProductReceiveMaterialBillList.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_Kf_ProductReceiveMaterialBillList.aspx.cs"
new file mode 100644
index 0000000..c188d71
--- /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_Kf_ProductReceiveMaterialBillList.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_Kf_ProductReceiveMaterialBillList : 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_Kf_ProductReceiveMaterialBillList.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_Kf_ProductReceiveMaterialBillList.aspx.designer.cs"
new file mode 100644
index 0000000..9cb52a3
--- /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_Kf_ProductReceiveMaterialBillList.aspx.designer.cs"
@@ -0,0 +1,26 @@
+锘�//------------------------------------------------------------------------------
+// <鑷姩鐢熸垚>
+//     姝や唬鐮佺敱宸ュ叿鐢熸垚銆�
+//
+//     瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉
+//     閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆�
+// </鑷姩鐢熸垚>
+//------------------------------------------------------------------------------
+
+namespace WebTM.views.鍩虹璧勬枡.鍏敤鍩虹璧勬枡
+{
+
+
+    public partial class xmlLBM_Kf_ProductReceiveMaterialBillList
+    {
+
+        /// <summary>
+        /// form1 鎺т欢銆�
+        /// </summary>
+        /// <remarks>
+        /// 鑷姩鐢熸垚鐨勫瓧娈点��
+        /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲��
+        /// </remarks>
+        protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+    }
+}
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_ProductReceiveMaterialBillEdit.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_ProductReceiveMaterialBillEdit.html"
index 7c14c87..bf97a4a 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_ProductReceiveMaterialBillEdit.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\347\224\237\344\272\247\351\242\206\346\226\231/Kf_ProductReceiveMaterialBillEdit.html"
@@ -46,8 +46,8 @@
                     <div class="layui-card-header">
                         <div class="layui-btn-group">
                             <button type="button" id="set_SaveBill" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button>
-                            <!--<button type="button" id="set_CheckBill" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_CheckBill">瀹℃牳</button>-->
-                            <!--<button type="button" id="btn-print" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn-print">鎵撳嵃</button>-->
+                            <button type="button" id="set_CheckBill" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_CheckBill">瀹℃牳</button>
+                            <button type="button" id="btn-print" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="btn-print">鎵撳嵃</button>
                             <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
                         </div>
                     </div>
@@ -1643,43 +1643,33 @@
 
             //#region 鎵撳嵃
             function get_PrintReport() {
-                //#region 鍒ゆ柇婧愬崟鐘舵��
-                var HSourceBillData = "";
-                var HSourceBillData = getSourceBillStatus_SellOutBill();            //鑾峰彇婧愬崟鏁版嵁
-                if (HSourceBillData != "none") {
-                    if (HSourceBillData.length == 0) {
-                        layer.alert("鎵撳嵃澶辫触!鏈煡璇㈠埌鍗曟嵁淇℃伅!", { icon: 5 });
-                        return;
-                    } else if (HSourceBillData[0]["鐘舵��"] != "宸插鏍�") {
-                        layer.alert("鎵撳嵃澶辫触!鍗曟嵁鐘舵�佹湭涓�'宸插鏍�'鐘舵��!", { icon: 5 });
-                        return;
-                    }
-                } else {
-                    return;
-                }
-                //#endregion
                 var InterID = $("#HInterID").val();
+                var sWhere = " and 鐘舵�� = '宸插鏍�' and hmainid = " + InterID;
                 $.ajax({
                     type: "GET",
-                    url: GetWEBURL() + "/Kf_SellOutBill/CheckSellOutBill_IsExist", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                    data: { "HInterID": InterID },
+                    url: GetWEBURL() + "/Kf_ProductReceiveMaterialBill/list", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"] },
                     success: function (result) {
                         if (result.count == 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=' + InterID + '&MyMsg=' + InterID + '&Type=Kf_SellOutBillList', 'yes']
-                                , resize: false
-                            })
+                            if (result.data.length > 0) {
+                                layer.open({
+                                    type: 2
+                                    , area: ['50%', '50%']
+                                    , title: '鎵撳嵃妯$増閫夋嫨'
+                                    , shade: 0.6 //閬僵閫忔槑搴�
+                                    , maxmin: false //鍏佽鍏ㄥ睆鏈�灏忓寲
+                                    , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                                    , content: ['../../BaseSet/SRM_OpenTmpList.html?linterid=' + InterID + '&MyMsg=' + InterID + '&Type=Kf_ProductReceiveMaterialBillList', 'yes']
+                                    , resize: false
+                                })
+                            } else {
+                                layer.alert(result.code + "鎵撳嵃澶辫触锛屾湭鏌ヨ鍒扮姸鎬佷负銆愬凡瀹℃牳銆戠殑鍗曟嵁锛�", { icon: 5 });
+                            }
                         } else {
                             layer.alert(result.code + result.Message, { icon: 5 });
                         }
-                    }, error: function () {
-                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }, error: function (e) {
+                        layer.alert("鍗曟嵁淇℃伅鏌ヨ澶辫触锛氭帴鍙h姹傚け璐�!", { icon: 5 });
                     }
                 });
             }

--
Gitblit v1.9.1