B70340 3 роки тому
джерело
коміт
428e0669c1
47 змінених файлів з 37648 додано та 1095 видалено
  1. BIN
      .vs/YD-ERP-SYS/v16/.suo
  2. 3
    0
      YD-ERP-SYS/Module/SQL_業務系統管理.vb
  3. 2
    2
      YD-ERP-SYS/Module/SQL_跨介面共用.vb
  4. 1
    1
      YD-ERP-SYS/Module/全域變數.vb
  5. 20347
    0
      YD-ERP-SYS/bin/Debug/PInvoke.Windows.Core.xml
  6. BIN
      YD-ERP-SYS/bin/Debug/YD-ERP-SYS - 2021061501.exe
  7. 0
    0
      YD-ERP-SYS/bin/Debug/YD-ERP-SYS - 2021072601.exe
  8. BIN
      YD-ERP-SYS/bin/Debug/YD-ERP-SYS.exe
  9. BIN
      YD-ERP-SYS/bin/Debug/YD-ERP-SYS.pdb
  10. BIN
      YD-ERP-SYS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  11. BIN
      YD-ERP-SYS/obj/Debug/YD-ERP-SYS.exe
  12. BIN
      YD-ERP-SYS/obj/Debug/YD-ERP-SYS.pdb
  13. 1
    1
      YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbproj.CoreCompileInputs.cache
  14. 12
    8
      YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbproj.FileListAbsolute.txt
  15. BIN
      YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbproj.GenerateResource.cache
  16. BIN
      YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbprojAssemblyReference.cache
  17. 1044
    0
      YD-ERP-SYS/倉儲系統管理/盤盈盤損審核_倉儲調整.Designer.vb
  18. 126
    0
      YD-ERP-SYS/倉儲系統管理/盤盈盤損審核_倉儲調整.resx
  19. 457
    0
      YD-ERP-SYS/倉儲系統管理/盤盈盤損審核_倉儲調整.vb
  20. 1508
    0
      YD-ERP-SYS/採購系統管理/一般性申請採購單.Designer.vb
  21. 132
    0
      YD-ERP-SYS/採購系統管理/一般性申請採購單.resx
  22. 697
    0
      YD-ERP-SYS/採購系統管理/一般性申請採購單.vb
  23. 22
    14
      YD-ERP-SYS/採購系統管理/一般申請_採購單.vb
  24. 938
    0
      YD-ERP-SYS/採購系統管理/依銷售申請採購單.Designer.vb
  25. 132
    0
      YD-ERP-SYS/採購系統管理/依銷售申請採購單.resx
  26. 556
    0
      YD-ERP-SYS/採購系統管理/依銷售申請採購單.vb
  27. 1047
    0
      YD-ERP-SYS/採購系統管理/採購應負帳款.Designer.vb
  28. 120
    0
      YD-ERP-SYS/採購系統管理/採購應負帳款.resx
  29. 955
    0
      YD-ERP-SYS/採購系統管理/採購應負帳款.vb
  30. 543
    477
      YD-ERP-SYS/業務系統管理/銷售單審核.vb
  31. 84
    58
      YD-ERP-SYS/業務系統管理/銷售單申請.Designer.vb
  32. 896
    534
      YD-ERP-SYS/業務系統管理/銷售單申請.vb
  33. 1945
    0
      YD-ERP-SYS/財務系統管理/營運報表.Designer.vb
  34. 120
    0
      YD-ERP-SYS/財務系統管理/營運報表.resx
  35. 1075
    0
      YD-ERP-SYS/財務系統管理/營運報表.vb
  36. 640
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單 - 對帳表.Designer.vb
  37. 126
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單 - 對帳表.resx
  38. 452
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單 - 對帳表.vb
  39. 800
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單一覽表.Designer.vb
  40. 126
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單一覽表.resx
  41. 461
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單一覽表.vb
  42. 577
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單審核.Designer.vb
  43. 126
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單審核.resx
  44. 297
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單審核.vb
  45. 783
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單申請.Designer.vb
  46. 135
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單申請.resx
  47. 362
    0
      YD-ERP-SYS/財務系統管理/營運成本收支單申請.vb

BIN
.vs/YD-ERP-SYS/v16/.suo Переглянути файл


+ 3
- 0
YD-ERP-SYS/Module/SQL_業務系統管理.vb Переглянути файл

@@ -58,6 +58,9 @@
58 58
                 FROM   銷售控制表 " & SQL2 & " ORDER BY 單號 DESC"
59 59
         CmdSet_For_DGV()
60 60
     End Sub
61
+    Friend Sub SQL料號查詢簡稱()
62
+        ConnOpen() : SQL1 = "SELECT  簡稱  FROM 供應商資料表 WHERE (編號 LIKE N'" & PA30 & "')" : CmdSet_For_dr()
63
+    End Sub
61 64
     '---------------------銷售單審核-----------------------------------------------------------------------------------------------------------------
62 65
     Friend Sub SQL_銷售控制表_審核()
63 66
         If 銷售單審核.已審核資料_ch.Checked = True Then

+ 2
- 2
YD-ERP-SYS/Module/SQL_跨介面共用.vb Переглянути файл

@@ -242,7 +242,7 @@
242 242
         SQL1 = "SELECT      銷售明細表.資料流水號, 銷售明細表.資料流水號 AS 項次, 銷售明細表.料號, 物料資料庫.品名, 倉儲分區控制表.倉名, 
243 243
                             物料訂製狀態.訂製, 倉儲狀態.狀態, 銷售明細表.備註, 銷售明細表.數量, 銷售明細表.成本, 銷售明細表.售價 AS 單價, 
244 244
                             銷售明細表.含稅, 銷售明細表.售價 AS 金額, 銷售明細表.狀態 AS 倉儲情況, 銷售明細表.資料流水號 AS 倉儲流水號, 
245
-                            銷售明細表.倉儲狀態, 銷售明細表.訂製狀態, 銷售明細表.物料狀態
245
+                            銷售明細表.倉儲狀態, 銷售明細表.訂製狀態,銷售明細表.物料狀態
246 246
                 FROM        銷售明細表 INNER JOIN
247 247
                             倉儲狀態 ON 銷售明細表.物料狀態 = 倉儲狀態.編碼 INNER JOIN
248 248
                             倉儲分區控制表 ON 銷售明細表.倉儲狀態 = 倉儲分區控制表.倉名編號 LEFT OUTER JOIN
@@ -259,7 +259,7 @@
259 259
     End Sub
260 260
     Friend Sub SQL_銷售備註表()
261 261
         ConnOpen()
262
-        SQL1 = "SELECT 資料流水號, 資料流水號 AS 項次, 備註, 收入, 支出 FROM 銷售備註表 WHERE (單號 LIKE '" & PA2 & "') ORDER BY 資料流水號"
262
+        SQL1 = "SELECT 資料流水號, 資料流水號 AS 項次, 備註, 收入,支出 FROM 銷售備註表 WHERE (單號 LIKE '" & PA2 & "') ORDER BY 資料流水號"
263 263
         CmdSet_For_DGV()
264 264
     End Sub
265 265
     Friend Sub SQL_銷售衍生費用()

+ 1
- 1
YD-ERP-SYS/Module/全域變數.vb Переглянути файл

@@ -3,7 +3,7 @@
3 3
     Public g_conn_type, gUserName, 登入人職稱, 登入人級別, 登入人組別, 登入人IP, 版本號, Target, Target1, Target2, FTP帳號, FTP密碼, FTP物理位置, 業務號碼, AA(99) As String
4 4
     Public BB(99), CC(99), 登入判斷 As Boolean
5 5
     '----系統版本-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
6
-    Public 版本 As String = "2021122101"
6
+    Public 版本 As String = "2022011701"
7 7
     '----系統用全域變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
8 8
     Public 列印用SQL, 列印用SQL2, 公司編號, 公司電話, 公司統編, 公司地址, 關鍵字編號, 進度條後墜 As String
9 9
     '----系統閒置-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

+ 20347
- 0
YD-ERP-SYS/bin/Debug/PInvoke.Windows.Core.xml
Різницю між файлами не показано, бо вона завелика
Переглянути файл


BIN
YD-ERP-SYS/bin/Debug/YD-ERP-SYS - 2021061501.exe Переглянути файл


+ 0
- 0
YD-ERP-SYS/bin/Debug/YD-ERP-SYS - 2021072601.exe Переглянути файл


BIN
YD-ERP-SYS/bin/Debug/YD-ERP-SYS.exe Переглянути файл


BIN
YD-ERP-SYS/bin/Debug/YD-ERP-SYS.pdb Переглянути файл


BIN
YD-ERP-SYS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache Переглянути файл


BIN
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.exe Переглянути файл


BIN
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.pdb Переглянути файл


+ 1
- 1
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbproj.CoreCompileInputs.cache Переглянути файл

@@ -1 +1 @@
1
-dc937bf29d1a895513a99985f75be88c433744c0
1
+281927094792df26f73e0c80a4672f1e2ea02d0a

+ 12
- 8
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbproj.FileListAbsolute.txt Переглянути файл

@@ -396,13 +396,9 @@ D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.倉儲控制表.resour
396 396
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.單據狀態查詢.resources
397 397
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.盤盈盤損控制表.resources
398 398
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.盤盈盤損申請.resources
399
-D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.盤盈盤損審核_倉儲調整.resources
400
-D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.一般性申請採購單.resources
401
-D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.依銷售申請採購單.resources
402 399
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.應收帳款未收.resources
403 400
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.應收帳款已收.resources
404 401
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.採購單審核.resources
405
-D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.採購應負帳款.resources
406 402
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.採購對帳單.resources
407 403
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.採購訂製大圖.resources
408 404
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.客戶資料表.resources
@@ -417,11 +413,7 @@ D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.匯入EXCEL.resources
417 413
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.匯出EXCEL.resources
418 414
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.匯率管理.resources
419 415
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.會計科目管理.resources
420
-D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.營運報表.resources
421 416
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.營運成本收支單_對帳表.resources
422
-D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.營運成本收支單一覽表.resources
423
-D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.營運成本收支單審核.resources
424
-D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.營運成本收支單申請.resources
425 417
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.薪資轉帳表.resources
426 418
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.FTP資料夾管理.resources
427 419
 D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.LoginForm1.resources
@@ -572,3 +564,15 @@ D:\工巧明\YD\YD-ERP-SYS\YD-ERP-SYS\obj\Debug\YD-ERP-SYS.exe
572 564
 D:\工巧明\YD\YD-ERP-SYS\YD-ERP-SYS\obj\Debug\YD-ERP-SYS.xml
573 565
 D:\工巧明\YD\YD-ERP-SYS\YD-ERP-SYS\obj\Debug\YD-ERP-SYS.pdb
574 566
 D:\工巧明\YD\YD-ERP-SYS\YD-ERP-SYS\obj\Debug\YD-ERP-SYS.vbprojAssemblyReference.cache
567
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.盤盈盤損審核.resources
568
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.一般申請_採購單.resources
569
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.銷售申請_採購單.resources
570
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.採購應付帳款.resources
571
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.業務獎金計算基礎.resources
572
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.業績單據完單設定.resources
573
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.業績獎金彙總表.resources
574
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.業績運費明細表.resources
575
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.財務_決算表.resources
576
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.財務_收支單一覽表.resources
577
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.財務_收支單審核.resources
578
+D:\yd-erp-sys-team-austin\YD-ERP-SYS\obj\Debug\YD_ERP_SYS.財務_收支單申請.resources

BIN
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbproj.GenerateResource.cache Переглянути файл


BIN
YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbprojAssemblyReference.cache Переглянути файл


+ 1044
- 0
YD-ERP-SYS/倉儲系統管理/盤盈盤損審核_倉儲調整.Designer.vb
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 126
- 0
YD-ERP-SYS/倉儲系統管理/盤盈盤損審核_倉儲調整.resx Переглянути файл

@@ -0,0 +1,126 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+  <!-- 
4
+    Microsoft ResX Schema 
5
+    
6
+    Version 2.0
7
+    
8
+    The primary goals of this format is to allow a simple XML format 
9
+    that is mostly human readable. The generation and parsing of the 
10
+    various data types are done through the TypeConverter classes 
11
+    associated with the data types.
12
+    
13
+    Example:
14
+    
15
+    ... ado.net/XML headers & schema ...
16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+    <resheader name="version">2.0</resheader>
18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+    </data>
25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+        <comment>This is a comment</comment>
28
+    </data>
29
+                
30
+    There are any number of "resheader" rows that contain simple 
31
+    name/value pairs.
32
+    
33
+    Each data row contains a name, and value. The row also contains a 
34
+    type or mimetype. Type corresponds to a .NET class that support 
35
+    text/value conversion through the TypeConverter architecture. 
36
+    Classes that don't support this are serialized and stored with the 
37
+    mimetype set.
38
+    
39
+    The mimetype is used for serialized objects, and tells the 
40
+    ResXResourceReader how to depersist the object. This is currently not 
41
+    extensible. For a given mimetype the value must be set accordingly:
42
+    
43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
+    that the ResXResourceWriter will generate, however the reader can 
45
+    read any of the formats listed below.
46
+    
47
+    mimetype: application/x-microsoft.net.object.binary.base64
48
+    value   : The object must be serialized with 
49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+            : and then encoded with base64 encoding.
51
+    
52
+    mimetype: application/x-microsoft.net.object.soap.base64
53
+    value   : The object must be serialized with 
54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+            : and then encoded with base64 encoding.
56
+
57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
58
+    value   : The object must be serialized into a byte array 
59
+            : using a System.ComponentModel.TypeConverter
60
+            : and then encoded with base64 encoding.
61
+    -->
62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+    <xsd:element name="root" msdata:IsDataSet="true">
65
+      <xsd:complexType>
66
+        <xsd:choice maxOccurs="unbounded">
67
+          <xsd:element name="metadata">
68
+            <xsd:complexType>
69
+              <xsd:sequence>
70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+              </xsd:sequence>
72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
73
+              <xsd:attribute name="type" type="xsd:string" />
74
+              <xsd:attribute name="mimetype" type="xsd:string" />
75
+              <xsd:attribute ref="xml:space" />
76
+            </xsd:complexType>
77
+          </xsd:element>
78
+          <xsd:element name="assembly">
79
+            <xsd:complexType>
80
+              <xsd:attribute name="alias" type="xsd:string" />
81
+              <xsd:attribute name="name" type="xsd:string" />
82
+            </xsd:complexType>
83
+          </xsd:element>
84
+          <xsd:element name="data">
85
+            <xsd:complexType>
86
+              <xsd:sequence>
87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+              </xsd:sequence>
90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+              <xsd:attribute ref="xml:space" />
94
+            </xsd:complexType>
95
+          </xsd:element>
96
+          <xsd:element name="resheader">
97
+            <xsd:complexType>
98
+              <xsd:sequence>
99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+              </xsd:sequence>
101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
102
+            </xsd:complexType>
103
+          </xsd:element>
104
+        </xsd:choice>
105
+      </xsd:complexType>
106
+    </xsd:element>
107
+  </xsd:schema>
108
+  <resheader name="resmimetype">
109
+    <value>text/microsoft-resx</value>
110
+  </resheader>
111
+  <resheader name="version">
112
+    <value>2.0</value>
113
+  </resheader>
114
+  <resheader name="reader">
115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+  </resheader>
117
+  <resheader name="writer">
118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+  </resheader>
120
+  <metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121
+    <value>24, 10</value>
122
+  </metadata>
123
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
124
+    <value>38</value>
125
+  </metadata>
126
+</root>

+ 457
- 0
YD-ERP-SYS/倉儲系統管理/盤盈盤損審核_倉儲調整.vb Переглянути файл

@@ -0,0 +1,457 @@
1
+Option Strict Off
2
+Public Class 盤盈盤損審核_倉儲調整
3
+    ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet : ReadOnly ds2 As New DataSet : ReadOnly ds3 As New DataSet
4
+    Dim 首次開啟 As Boolean = False : Dim NUM1 As Integer : Dim EDR As Integer = 0 : Dim ESTR As String
5
+    Private Sub Set_清單()
6
+        物料清單_dgv.DataSource = Nothing : ds.Clear()
7
+        物料清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
8
+        物料清單_dgv.ColumnHeadersHeight = 40
9
+        物料清單_dgv.AllowUserToAddRows = False
10
+        物料清單_dgv.RowTemplate.Height = 35
11
+        調庫單據_dgv.RowTemplate.Height = 35
12
+        調庫明細_dgv.RowTemplate.Height = 35
13
+        區域庫存_dgv.RowTemplate.Height = 35
14
+
15
+        PA1 = "" : PA2 = "" : PA2 = 供應商編碼_cb.Text : PA1 = 查詢_tb.Text
16
+        SQL_盤盈盤損申請_物料清單()
17
+        da.Fill(ds) : 物料清單_dgv.DataSource = ds.Tables(0) : conn.Close()
18
+
19
+        物料清單_dgv.Columns(0).FillWeight = 80 : 物料清單_dgv.Columns(1).FillWeight = 80 : 物料清單_dgv.Columns(2).FillWeight = 100
20
+        物料清單_dgv.Columns(3).FillWeight = 200 : 物料清單_dgv.Columns(4).FillWeight = 80 : 物料清單_dgv.Columns(5).FillWeight = 80 : 物料清單_dgv.Columns(6).FillWeight = 50
21
+        物料清單_dgv.Columns(7).FillWeight = 50 : 物料清單_dgv.Columns(8).FillWeight = 50 : 物料清單_dgv.Columns(9).FillWeight = 50 : 物料清單_dgv.Columns(10).Visible = False
22
+        物料清單_dgv.Columns(11).Visible = False : 物料清單_dgv.Columns(12).Visible = False : 物料清單_dgv.Columns(13).Visible = False
23
+
24
+        物料清單_dgv.Columns(1).ReadOnly = True : 物料清單_dgv.Columns(2).ReadOnly = True : 物料清單_dgv.Columns(3).ReadOnly = True : 物料清單_dgv.Columns(4).ReadOnly = True
25
+        物料清單_dgv.Columns(5).ReadOnly = True : 物料清單_dgv.Columns(6).ReadOnly = True : 物料清單_dgv.Columns(7).ReadOnly = True : 物料清單_dgv.Columns(8).ReadOnly = True
26
+        物料清單_dgv.Columns(9).ReadOnly = True : 物料清單_dgv.Columns(0).ReadOnly = True
27
+
28
+        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0" : 物料清單_dgv.Columns("未入庫").DefaultCellStyle.Format = "#,##0"
29
+        物料清單_dgv.Columns("未出庫").DefaultCellStyle.Format = "#,##0"
30
+        物料清單_dgv.Columns("庫存").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
31
+        物料清單_dgv.Columns("庫存").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
32
+        物料清單_dgv.Columns("未入庫").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
33
+        物料清單_dgv.Columns("未入庫").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
34
+        物料清單_dgv.Columns("未出庫").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
35
+        物料清單_dgv.Columns("未出庫").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
36
+
37
+        資料筆數_tb.Text = 物料清單_dgv.Rows.Count
38
+        For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
39
+            資料數 = 物料清單_dgv.Rows.Count : MyModule1.進度條()
40
+            If 物料清單_dgv("倉名", i).Value.ToString = "" Then
41
+                If 物料清單_dgv("倉名1", i).Value.ToString <> "" Then
42
+                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名1", i).Value.ToString
43
+                ElseIf 物料清單_dgv("倉名2", i).Value.ToString <> "" Then
44
+                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名2", i).Value.ToString
45
+                ElseIf 物料清單_dgv("倉名3", i).Value.ToString <> "" Then
46
+                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名3", i).Value.ToString
47
+                End If
48
+            End If
49
+            If 物料清單_dgv("庫存", i).Value.ToString = "" Then : 物料清單_dgv("庫存", i).Value = 0 : End If
50
+            If 物料清單_dgv("未入庫", i).Value.ToString = "" Then : 物料清單_dgv("未入庫", i).Value = 0 : End If
51
+            If 物料清單_dgv("未出庫", i).Value.ToString = "" Then : 物料清單_dgv("未出庫", i).Value = 0 : End If
52
+
53
+            If Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) = 0 Then
54
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
55
+            ElseIf Val(物料清單_dgv("庫存", i).Value) = 0 And (Val(物料清單_dgv("未入庫", i).Value) <> 0 Or Val(物料清單_dgv("未出庫", i).Value) <> 0) Then
56
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
57
+            ElseIf Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) <> 0 Then
58
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
59
+            End If
60
+        Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
61
+    End Sub
62
+    Private Sub Set_清單2()
63
+        調庫單據_dgv.DataSource = Nothing : ds2.Clear()
64
+        調庫單據_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
65
+        調庫單據_dgv.ColumnHeadersHeight = 25
66
+        調庫單據_dgv.AllowUserToAddRows = False
67
+        調庫單據_dgv.RowTemplate.Height = 25
68
+
69
+        SQL_盤盈盤損申請_單據()
70
+        da.Fill(ds2) : 調庫單據_dgv.DataSource = ds2.Tables(0) : conn.Close()
71
+
72
+        調庫單據_dgv.Columns(0).FillWeight = 200 : 調庫單據_dgv.Columns(1).Visible = False : 調庫單據_dgv.Columns(2).Visible = False
73
+        調庫單據_dgv.Columns(0).ReadOnly = True : 調庫單據_dgv.Columns(1).ReadOnly = True : 調庫單據_dgv.Columns(2).ReadOnly = True
74
+    End Sub
75
+    Private Sub Set_清單1()
76
+        調庫明細_dgv.DataSource = Nothing : ds1.Clear()
77
+        調庫明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
78
+        調庫明細_dgv.ColumnHeadersHeight = 40
79
+        調庫明細_dgv.AllowUserToAddRows = False
80
+        調庫明細_dgv.RowTemplate.Height = 35
81
+
82
+        PA20 = 調庫單號_tb.Text
83
+        SQL_盤盈盤損申請_明細()
84
+        da.Fill(ds1) : 調庫明細_dgv.DataSource = ds1.Tables(0) : conn.Close()
85
+
86
+        調庫明細_dgv.Columns(0).Visible = False : 調庫明細_dgv.Columns(1).FillWeight = 100 : 調庫明細_dgv.Columns(2).FillWeight = 100 : 調庫明細_dgv.Columns(3).FillWeight = 75
87
+        調庫明細_dgv.Columns(4).FillWeight = 200 : 調庫明細_dgv.Columns(5).FillWeight = 100 : 調庫明細_dgv.Columns(6).FillWeight = 100 : 調庫明細_dgv.Columns(7).FillWeight = 50
88
+        調庫明細_dgv.Columns(8).FillWeight = 50 : 調庫明細_dgv.Columns(9).FillWeight = 75 : 調庫明細_dgv.Columns(10).FillWeight = 100 : 調庫明細_dgv.Columns(11).FillWeight = 35
89
+
90
+        調庫明細_dgv.Columns("盤盈").DefaultCellStyle.Format = "#,##0" : 調庫明細_dgv.Columns("盤損").DefaultCellStyle.Format = "#,##0"
91
+        調庫明細_dgv.Columns("盤盈").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
92
+        調庫明細_dgv.Columns("盤盈").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
93
+        調庫明細_dgv.Columns("盤損").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
94
+        調庫明細_dgv.Columns("盤損").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
95
+
96
+        調庫明細_dgv.Columns(1).ReadOnly = True : 調庫明細_dgv.Columns(2).ReadOnly = True : 調庫明細_dgv.Columns(3).ReadOnly = True : 調庫明細_dgv.Columns(4).ReadOnly = True
97
+        調庫明細_dgv.Columns(5).ReadOnly = True : 調庫明細_dgv.Columns(6).ReadOnly = True : 調庫明細_dgv.Columns(9).ReadOnly = True : 調庫明細_dgv.Columns(11).ReadOnly = True
98
+
99
+        調庫明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter : 資料筆數1_tb.Text = 調庫明細_dgv.Rows.Count
100
+    End Sub
101
+    Private Sub Set_清單3()
102
+        區域庫存_dgv.DataSource = Nothing : ds3.Clear()
103
+        區域庫存_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
104
+        區域庫存_dgv.ColumnHeadersHeight = 25
105
+        區域庫存_dgv.AllowUserToAddRows = False
106
+        區域庫存_dgv.RowTemplate.Height = 25
107
+
108
+        PA20 = 料號_tb.Text : SQL_倉名_物料分配查詢()
109
+        da.Fill(ds3) : 區域庫存_dgv.DataSource = ds3.Tables(0) : conn.Close()
110
+
111
+        區域庫存_dgv.Columns(0).FillWeight = 200 : 區域庫存_dgv.Columns(1).FillWeight = 80
112
+        區域庫存_dgv.Columns(0).ReadOnly = True : 區域庫存_dgv.Columns(1).ReadOnly = True
113
+
114
+        區域庫存_dgv.Columns("可用").DefaultCellStyle.Format = "#,##0"
115
+        區域庫存_dgv.Columns("可用").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
116
+        區域庫存_dgv.Columns("可用").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
117
+    End Sub
118
+    Private Sub 供應商_下拉表單資料載入()
119
+        BL1 = False : PA3 = "" : PA4 = ""
120
+        If 地區_cb.Text = "" Then : PA3 = ""
121
+        ElseIf 地區_cb.Text = "北部" Then : PA3 = "2"
122
+        ElseIf 地區_cb.Text = "南部" Then : PA3 = "3"
123
+        ElseIf 地區_cb.Text = "材料" Then : PA3 = "9"
124
+        ElseIf 地區_cb.Text = "調貨" Then : PA3 = "Y"
125
+        End If
126
+        SQL_盤盈盤損申請_供應商_下拉清單() : 供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear()
127
+        While (dr.Read()) : 供應商_cb.Items.Add(dr("簡稱")) : 供應商編碼_cb.Items.Add(dr("編號")) : End While : conn.Close()
128
+    End Sub
129
+    Private Sub 倉儲狀態_cb_下拉表單資料載入()
130
+        SQL_倉儲狀態_下拉清單() : 倉儲狀態_cb.Items.Clear() : 儲態編號_cb.Items.Clear()
131
+        While (dr.Read()) : 倉儲狀態_cb.Items.Add(dr("狀態")) : 儲態編號_cb.Items.Add(dr("編碼")) : End While : conn.Close()
132
+    End Sub
133
+    Private Sub 訂製狀態_cb_下拉表單資料載入()
134
+        SQL_訂製狀態_下拉清單() : 訂製狀態_cb.Items.Clear() : 訂製編碼_cb.Items.Clear()
135
+        While (dr.Read()) : 訂製狀態_cb.Items.Add(dr("訂製")) : 訂製編碼_cb.Items.Add(dr("編碼")) : End While : conn.Close()
136
+    End Sub
137
+    Private Sub 指定倉庫_cb_下拉表單資料載入()
138
+        If 需要全部庫存區域清單_ch.Checked = True Then
139
+            SQL_倉名_下拉清單()
140
+        Else
141
+            If 料號_tb.Text = "" Then
142
+                SQL_倉名_下拉清單()
143
+            Else
144
+                PA20 = 料號_tb.Text : SQL_倉名_下拉清單_有條件()
145
+            End If
146
+        End If
147
+        指定倉庫_cb.Items.Clear()
148
+        While (dr.Read()) : 指定倉庫_cb.Items.Add(dr("倉名")) : End While : conn.Close()
149
+        If 指定倉庫_cb.Items.Count = 0 Then
150
+            SQL_倉名_下拉清單()
151
+            While (dr.Read()) : 指定倉庫_cb.Items.Add(dr("倉名")) : End While : conn.Close()
152
+        End If
153
+    End Sub
154
+    Private Sub 盤盈盤損確認_倉儲調整_Load(sender As Object, e As EventArgs) Handles MyBase.Load
155
+        Me.MdiParent = YD_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
156
+        料號_tb.Enabled = False : 供應商編碼_tb.Visible = False '--------------------控件隱藏、操作許可設定與其他基本顯示設定
157
+        指定倉庫_cb_下拉表單資料載入() : 訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
158
+        首次開啟 = False : Set_清單() : Set_清單2() : 首次開啟 = True '--------------------資料讀取
159
+    End Sub
160
+    Private Sub 區域庫存_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 區域庫存_dgv.CellClick
161
+        If e.RowIndex = -1 Then : Else
162
+            指定倉庫_cb.Text = 區域庫存_dgv.Rows(e.RowIndex).Cells("倉名").Value
163
+        End If
164
+    End Sub
165
+    Private Sub 調庫單據_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 調庫單據_dgv.CellClick
166
+        If e.RowIndex = -1 Then : Else
167
+            調庫單號_tb.Text = 調庫單據_dgv.Rows(e.RowIndex).Cells("執行單號").Value : 申請人_tb.Text = 調庫單據_dgv.Rows(e.RowIndex).Cells("申請人").Value
168
+            申請日期_dtp.Value = 調庫單據_dgv.Rows(e.RowIndex).Cells("申請日期").Value
169
+            Set_清單1()
170
+        End If
171
+    End Sub
172
+    Private Sub 調庫明細_dgv_CellEndEdit(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 調庫明細_dgv.CellEndEdit
173
+        If (Val(調庫明細_dgv.Rows(e.RowIndex).Cells("盤盈").Value) = 0 And Val(調庫明細_dgv.Rows(e.RowIndex).Cells("盤損").Value) = 0) Or
174
+             (Val(調庫明細_dgv.Rows(e.RowIndex).Cells("盤盈").Value) <> 0 And Val(調庫明細_dgv.Rows(e.RowIndex).Cells("盤損").Value) <> 0) Then
175
+            MsgBox("盤營與盤損不能同時為零或同時有數量")
176
+            Set_清單1()
177
+            Exit Sub
178
+        End If
179
+    End Sub
180
+    Private Sub 調庫明細_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 調庫明細_dgv.CellClick
181
+        If e.RowIndex = -1 Then : Else
182
+            項次_tb.Text = 調庫明細_dgv(0, e.RowIndex).Value.ToString
183
+            物料圖1_pb.Image = Nothing : PA1 = 調庫明細_dgv.Rows(e.RowIndex).Cells("料號").Value : SQL_物料檔案_是否有圖()
184
+            If dr.Read() Then
185
+                If dr("是否有圖") = True Then
186
+                    PA = 調庫明細_dgv.Rows(e.RowIndex).Cells("料號").Value : SQL_物料圖庫_圖片顯示() '--------------------圖片顯示
187
+                    While dr.Read() = True
188
+                        Dim unused As Byte() = New Byte(-1) {}
189
+                        Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
190
+                        Dim oStream As New MemoryStream(bytes)
191
+                        物料圖1_pb.Image = Bitmap.FromStream(oStream)
192
+                    End While
193
+                    conn.Close()
194
+                    物料圖1_pb.SizeMode = 4
195
+                Else
196
+                    物料圖1_pb.Image = Nothing
197
+                End If
198
+            End If : conn.Close()
199
+        End If
200
+    End Sub
201
+    Private Sub 物料清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 物料清單_dgv.CellClick
202
+        If 首次開啟 = True Then
203
+            If e.RowIndex = -1 Then : Else
204
+                料號_tb.Text = 物料清單_dgv("料號", e.RowIndex).Value.ToString : 供應商編碼_tb.Text = 物料清單_dgv("供應商", e.RowIndex).Value.ToString
205
+                品名_tb.Text = 物料清單_dgv("品名", e.RowIndex).Value.ToString : 最大庫存量_tb.Text = 物料清單_dgv("最低庫存量", e.RowIndex).Value.ToString
206
+                庫存量_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString)
207
+                可申請_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString) - Val(物料清單_dgv("未出庫", e.RowIndex).Value.ToString)
208
+
209
+                物料圖_pb.Image = Nothing : PA1 = 料號_tb.Text : SQL_物料檔案_是否有圖()
210
+                If dr.Read() Then
211
+                    If dr("是否有圖") = True Then
212
+                        PA = 料號_tb.Text : SQL_物料圖庫_圖片顯示() '--------------------圖片顯示
213
+                        While dr.Read() = True
214
+                            Dim unused As Byte() = New Byte(-1) {}
215
+                            Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
216
+                            Dim oStream As New MemoryStream(bytes)
217
+                            物料圖_pb.Image = Bitmap.FromStream(oStream)
218
+                        End While
219
+                        conn.Close()
220
+                        物料圖_pb.SizeMode = 4
221
+                    Else
222
+                        物料圖_pb.Image = Nothing
223
+                    End If
224
+                End If : conn.Close()
225
+
226
+                指定倉庫_cb_下拉表單資料載入() : 指定倉庫_cb.Text = 物料清單_dgv("倉名", e.RowIndex).Value.ToString : Set_清單3()
227
+                If 物料清單_dgv("狀態", e.RowIndex).Value.ToString = "" Then
228
+                    訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
229
+                Else
230
+                    倉儲狀態_cb.Text = 物料清單_dgv("狀態", e.RowIndex).Value.ToString : 訂製狀態_cb.Text = 物料清單_dgv("訂製", e.RowIndex).Value.ToString
231
+                End If
232
+            End If
233
+        End If
234
+    End Sub
235
+    Private Sub 物料清單_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 物料清單_dgv.RowPostPaint
236
+        Dim linePen As New Pen(Color.Blue, 2)
237
+        If e.RowIndex = 物料清單_dgv.Rows.Count - 1 Then : Exit Sub : Else
238
+            If 物料清單_dgv("供應商", e.RowIndex).Value.ToString <> 物料清單_dgv("供應商", e.RowIndex + 1).Value.ToString Then
239
+                Dim startX As Integer = IIf(物料清單_dgv.RowHeadersVisible, 物料清單_dgv.RowHeadersWidth, 0) : Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
240
+                Dim endX As Integer = startX + 物料清單_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 物料清單_dgv.HorizontalScrollingOffset
241
+                e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
242
+            End If
243
+        End If
244
+        For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
245
+            If Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) = 0 Then
246
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
247
+            ElseIf Val(物料清單_dgv("庫存", i).Value) = 0 And (Val(物料清單_dgv("未入庫", i).Value) <> 0 Or Val(物料清單_dgv("未出庫", i).Value) <> 0) Then
248
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
249
+            ElseIf Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) <> 0 Then
250
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
251
+            End If
252
+        Next
253
+    End Sub
254
+    Private Sub 地區_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 地區_cb.SelectedIndexChanged
255
+        If 地區_cb.Text = "" And 查詢_tb.Text = "" Then
256
+            供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear() : Set_清單()
257
+        ElseIf 地區_cb.Text = "" Then
258
+            查詢_tb.Text = "" : 供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear()
259
+        ElseIf 地區_cb.Text <> "" Then
260
+            查詢_tb.Text = "" : 供應商_下拉表單資料載入()
261
+        End If
262
+    End Sub
263
+    Private Sub 供應商_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 供應商_cb.SelectedIndexChanged
264
+        If 地區_cb.Text <> "" Then
265
+            查詢_tb.Text = "" : 供應商編碼_cb.SelectedIndex = 供應商_cb.SelectedIndex
266
+        End If
267
+    End Sub
268
+    Private Sub 供應商編碼_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 供應商編碼_cb.SelectedIndexChanged
269
+        If 地區_cb.Text <> "" Then
270
+            查詢_tb.Text = "" : 供應商_cb.SelectedIndex = 供應商編碼_cb.SelectedIndex : 供應商編碼_tb.Text = 供應商編碼_cb.Text : Set_清單()
271
+        End If
272
+    End Sub
273
+    Private Sub 清空_bt_Click(sender As Object, e As EventArgs) Handles 清空_bt.Click
274
+        查詢_tb.Text = "" : 地區_cb.Text = ""
275
+    End Sub
276
+    Private Sub 查詢_tb_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles 查詢_tb.KeyPress
277
+        If e.KeyChar = Chr(13) Then
278
+            供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear()
279
+            PA = 查詢_tb.Text : Set_清單() : 地區_cb.Text = ""
280
+        End If
281
+    End Sub
282
+    Private Sub 指定倉庫_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 指定倉庫_cb.SelectedIndexChanged
283
+        PA6 = 指定倉庫_cb.Text : SQL_指定倉儲_資料讀取()
284
+        If dr.Read() Then : 倉庫級別_tb.Text = dr("倉級") : 倉庫編號_tb.Text = dr("倉名編號") : End If : conn.Close()
285
+    End Sub
286
+    Private Sub 倉儲狀態_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 倉儲狀態_cb.SelectedIndexChanged
287
+        儲態編號_cb.SelectedIndex = 倉儲狀態_cb.SelectedIndex
288
+    End Sub
289
+    Private Sub 儲態編號_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 儲態編號_cb.SelectedIndexChanged
290
+        倉儲狀態_cb.SelectedIndex = 儲態編號_cb.SelectedIndex
291
+    End Sub
292
+    Private Sub 訂製狀態_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 訂製狀態_cb.SelectedIndexChanged
293
+        訂製編碼_cb.SelectedIndex = 訂製狀態_cb.SelectedIndex
294
+    End Sub
295
+    Private Sub 訂製編碼_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 訂製編碼_cb.SelectedIndexChanged
296
+        訂製狀態_cb.SelectedIndex = 訂製編碼_cb.SelectedIndex
297
+    End Sub
298
+    Private Sub 盤損數_nud_ValueChanged(sender As Object, e As EventArgs) Handles 盤損數_nud.ValueChanged
299
+        If 盤損數_nud.Value > 0 Then
300
+            盤盈數_nud.Value = 0
301
+            If 盤損數_nud.Value > Val(庫存量_tb.Text) Then
302
+                MsgBox("盤損數量不可能大於目前的庫存量!!")
303
+                盤損數_nud.Value = 0
304
+            End If
305
+        End If
306
+    End Sub
307
+    Private Sub 盤盈數_nud_ValueChanged(sender As Object, e As EventArgs) Handles 盤盈數_nud.ValueChanged
308
+        If 盤盈數_nud.Value > 0 Then
309
+            盤損數_nud.Value = 0
310
+        End If
311
+    End Sub
312
+    Private Sub 選定內容加入庫存調整申請單_bt_Click(sender As Object, e As EventArgs) Handles 選定內容加入庫存調整申請單_bt.Click
313
+        If 調庫單號_tb.Text = "" Then
314
+            MsgBox("請先選擇未審核的庫存調整單!!")
315
+        Else
316
+            If 料號_tb.Text = "" Then
317
+                MsgBox("請選擇物料,調整庫存需要指定物料!!")
318
+            Else
319
+                If 儲態編號_cb.Text = "" Then
320
+                    MsgBox("倉儲狀態是一定要選擇的!!")
321
+                Else
322
+                    If 訂製狀態_cb.Text = "" Then
323
+                        MsgBox("物品的訂製狀態也是一定要選擇的!!")
324
+                    Else
325
+                        If 盤損數_nud.Value > Val(庫存量_tb.Text) Then
326
+                            MsgBox("盤損數量不可能小於庫存數量!!")
327
+                            盤損數_nud.Value = 0
328
+                        Else
329
+                            If 盤損數_nud.Value = 0 And 盤盈數_nud.Value = 0 Then
330
+                                MsgBox("盤盈盤損最少選一種,兩者都為零是不容許的!!")
331
+                            Else
332
+                                PA1 = 調庫單號_tb.Text : PA2 = 料號_tb.Text : PA3 = 倉庫編號_tb.Text
333
+                                SQL_倉儲明細表_確認單據是否申請()
334
+                                If dr.Read() Then
335
+                                    conn.Close() : MsgBox("該料號已經在本單據中申請過了,如要修改,請直接到單據中尋找並修改。")
336
+                                Else
337
+                                    SQL_倉儲明細表_最後一筆資料()
338
+                                    If dr.Read() Then : EDR = Double.Parse(Strings.Right(dr("資料流水號").ToString, 9)) : Else : EDR = 0 : End If
339
+                                    conn.Close() : EDR += 1
340
+                                    If EDR < 10 Then : ESTR = "WH" & "00000000" & EDR
341
+                                    ElseIf EDR > 9 And EDR < 100 Then : ESTR = "WH" & "0000000" & EDR
342
+                                    ElseIf EDR > 99 And EDR < 1000 Then : ESTR = "WH" & "000000" & EDR
343
+                                    ElseIf EDR > 999 And EDR < 10000 Then : ESTR = "WH" & "00000" & EDR
344
+                                    ElseIf EDR > 9999 And EDR < 100000 Then : ESTR = "WH" & "0000" & EDR
345
+                                    ElseIf EDR > 99999 And EDR < 100000 Then : ESTR = "WH" & "000" & EDR
346
+                                    ElseIf EDR > 999999 And EDR < 1000000 Then : ESTR = "WH" & "00" & EDR
347
+                                    ElseIf EDR > 9999999 And EDR < 10000000 Then : ESTR = "WH" & "0" & EDR
348
+                                    ElseIf EDR > 99999999 Then : ESTR = "WH" & EDR : End If
349
+
350
+                                    PA3 = ESTR : PA4 = 調庫單號_tb.Text : PA5 = 倉庫級別_tb.Text : PA6 = 倉庫編號_tb.Text : NU1 = 盤盈數_nud.Value : NU2 = 盤損數_nud.Value
351
+                                    PA7 = 儲態編號_cb.Text : PA8 = 訂製編碼_cb.Text
352
+                                    If 盤盈數_nud.Value = 0 And 盤損數_nud.Value > 0 Then
353
+                                        SQL_盤盈盤損申請_倉儲明細表_盤損出庫新增()
354
+                                    ElseIf 盤盈數_nud.Value > 0 And 盤損數_nud.Value = 0 Then
355
+                                        SQL_盤盈盤損申請_倉儲明細表_盤盈入庫新增()
356
+                                    End If : conn.Close()
357
+                                    Set_清單1() : Set_清單2() : Set_清單()
358
+                                End If
359
+                            End If
360
+                        End If
361
+                    End If
362
+                End If
363
+            End If
364
+        End If
365
+    End Sub
366
+    Private Sub 存檔_bt_Click(sender As Object, e As EventArgs) Handles 存檔_bt.Click
367
+        If 調庫單號_tb.Text = "" Or 料號_tb.Text = "" Then
368
+            MsgBox("沒有選擇庫存調整單據!!")
369
+        Else
370
+            For i As Integer = 0 To 調庫明細_dgv.Rows.Count - 1
371
+                資料數 = 調庫明細_dgv.Rows.Count : MyModule1.進度條()
372
+                PA10 = 調庫明細_dgv.Rows(i).Cells("備註").Value : PA11 = 調庫明細_dgv.Rows(i).Cells("資料流水號").Value
373
+                NU1 = 調庫明細_dgv.Rows(i).Cells("盤盈").Value : NU2 = 調庫明細_dgv.Rows(i).Cells("盤損").Value
374
+                SQL_倉儲明細表_出入庫及修改() : conn.Close()
375
+            Next
376
+            MsgBox("存檔完成!!") : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
377
+            Set_清單1() : Set_清單2()
378
+        End If
379
+    End Sub
380
+    Private Sub 刪除請購單上點選資料_bt_Click(sender As Object, e As EventArgs) Handles 刪除單據上點選的資料_bt.Click
381
+        If 調庫單號_tb.Text = "" Then
382
+            MsgBox("沒有選擇庫存調整單據!!")
383
+        Else
384
+            If 項次_tb.Text = "" Then
385
+                MsgBox("沒有選擇要刪除的明細!!")
386
+            Else
387
+                Dim aa1 As MsgBoxResult = MsgBox("你確定要刪除這筆資料?", MsgBoxStyle.OkCancel)
388
+                If aa1 = MsgBoxResult.Ok Then
389
+                    PA1 = 項次_tb.Text : SQL_倉儲明細表_刪除二() : conn.Close()
390
+                    Set_清單1()
391
+                End If
392
+            End If
393
+        End If
394
+    End Sub
395
+    Private Sub 刪除_bt_Click(sender As Object, e As EventArgs) Handles 刪除_bt.Click
396
+        Dim aa1 As MsgBoxResult = MsgBox("你確定要刪除這張庫存調整單?", MsgBoxStyle.OkCancel)
397
+        If aa1 = MsgBoxResult.Ok Then
398
+            PA1 = 調庫單號_tb.Text : SQL_倉儲明細表_刪除() : SQL_倉儲明細執行單號_刪除() : conn.Close()
399
+            調庫單號_tb.Text = "" : 申請人_tb.Text = "" : 項次_tb.Text = ""
400
+            調庫明細_dgv.DataSource = Nothing : ds1.Clear()
401
+            Set_清單2()
402
+        End If
403
+    End Sub
404
+    Private Sub Set_日期格式轉換()
405
+        DTP = Format(Today(), "yyyy/MM/dd") : DTP1 = Format(Today(), "yyyyMMdd")
406
+    End Sub
407
+    Private Sub 審核通過_bt_Click(sender As Object, e As EventArgs) Handles 審核通過_bt.Click
408
+        If 調庫單號_tb.Text = "" Then
409
+            MsgBox("沒有選擇庫存調整單據!!")
410
+        Else
411
+            Set_日期格式轉換() : PA10 = gUserName : PA9 = gUserName : PA11 = 調庫單號_tb.Text : DTP2 = DTP
412
+            SQL_倉儲明細表_盤盈盤損審核() : Set_清單2() : Set_清單1() : conn.Close()
413
+            MsgBox("單據 " & 調庫單號_tb.Text & " 審核完成!!") : 申請人_tb.Text = "" : 申請日期_dtp.Value = Today() : 調庫單號_tb.Text = ""
414
+        End If
415
+    End Sub
416
+    Private Sub 單據作廢_bt_Click(sender As Object, e As EventArgs) Handles 單據作廢_bt.Click
417
+        If 調庫單號_tb.Text = "" Then
418
+            MsgBox("沒有選擇庫存調整單據!!")
419
+        Else
420
+            Set_日期格式轉換() : PA10 = "作廢 - " & gUserName : PA9 = "" : PA11 = 調庫單號_tb.Text : DTP2 = ""
421
+            SQL_倉儲明細表_盤盈盤損審核() : Set_清單2() : Set_清單1() : conn.Close()
422
+            MsgBox("單據 " & 調庫單號_tb.Text & " 已作廢!!") : 申請人_tb.Text = "" : 申請日期_dtp.Value = Today() : 調庫單號_tb.Text = ""
423
+        End If
424
+    End Sub
425
+    Private Sub 需要全部庫存區域清單_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 需要全部庫存區域清單_ch.CheckedChanged
426
+        指定倉庫_cb_下拉表單資料載入()
427
+    End Sub
428
+    '-----------------------------滑鼠右鍵--------------------------------------------------------------------------------------------------------------------------------------
429
+    Private Sub 重新整理_tsm_Click(sender As Object, e As EventArgs) Handles 重新整理_tsm.Click
430
+        清空_bt.PerformClick() : Set_清單2() : Set_清單1()
431
+    End Sub
432
+    Private Sub 選定內容加入庫存調整申請單_tsm_Click(sender As Object, e As EventArgs) Handles 選定內容加入庫存調整申請單_tsm.Click
433
+        選定內容加入庫存調整申請單_bt.PerformClick()
434
+    End Sub
435
+    Private Sub 存檔_tsm_Click(sender As Object, e As EventArgs) Handles 存檔_tsm.Click
436
+        存檔_bt.PerformClick()
437
+    End Sub
438
+    Private Sub 刪除庫存調整單據上點選的資料_tsm_Click(sender As Object, e As EventArgs) Handles 刪除庫存調整單據上點選的資料_tsm.Click
439
+        刪除單據上點選的資料_bt.PerformClick()
440
+    End Sub
441
+    Private Sub 刪除庫存調整單據_tsm_Click(sender As Object, e As EventArgs) Handles 刪除庫存調整單據_tsm.Click
442
+        刪除_bt.PerformClick()
443
+    End Sub
444
+    Private Sub 審核通過_tsm_Click(sender As Object, e As EventArgs) Handles 審核通過_tsm.Click
445
+        審核通過_bt.PerformClick()
446
+    End Sub
447
+    Private Sub 單據作廢_tsm_Click(sender As Object, e As EventArgs) Handles 單據作廢_tsm.Click
448
+        單據作廢_tsm.PerformClick()
449
+    End Sub
450
+
451
+    Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
452
+        物料清單_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
453
+        調庫單據_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
454
+        調庫明細_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
455
+        區域庫存_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
456
+    End Sub
457
+End Class

+ 1508
- 0
YD-ERP-SYS/採購系統管理/一般性申請採購單.Designer.vb
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 132
- 0
YD-ERP-SYS/採購系統管理/一般性申請採購單.resx Переглянути файл

@@ -0,0 +1,132 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+  <!-- 
4
+    Microsoft ResX Schema 
5
+    
6
+    Version 2.0
7
+    
8
+    The primary goals of this format is to allow a simple XML format 
9
+    that is mostly human readable. The generation and parsing of the 
10
+    various data types are done through the TypeConverter classes 
11
+    associated with the data types.
12
+    
13
+    Example:
14
+    
15
+    ... ado.net/XML headers & schema ...
16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+    <resheader name="version">2.0</resheader>
18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+    </data>
25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+        <comment>This is a comment</comment>
28
+    </data>
29
+                
30
+    There are any number of "resheader" rows that contain simple 
31
+    name/value pairs.
32
+    
33
+    Each data row contains a name, and value. The row also contains a 
34
+    type or mimetype. Type corresponds to a .NET class that support 
35
+    text/value conversion through the TypeConverter architecture. 
36
+    Classes that don't support this are serialized and stored with the 
37
+    mimetype set.
38
+    
39
+    The mimetype is used for serialized objects, and tells the 
40
+    ResXResourceReader how to depersist the object. This is currently not 
41
+    extensible. For a given mimetype the value must be set accordingly:
42
+    
43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
+    that the ResXResourceWriter will generate, however the reader can 
45
+    read any of the formats listed below.
46
+    
47
+    mimetype: application/x-microsoft.net.object.binary.base64
48
+    value   : The object must be serialized with 
49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+            : and then encoded with base64 encoding.
51
+    
52
+    mimetype: application/x-microsoft.net.object.soap.base64
53
+    value   : The object must be serialized with 
54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+            : and then encoded with base64 encoding.
56
+
57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
58
+    value   : The object must be serialized into a byte array 
59
+            : using a System.ComponentModel.TypeConverter
60
+            : and then encoded with base64 encoding.
61
+    -->
62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+    <xsd:element name="root" msdata:IsDataSet="true">
65
+      <xsd:complexType>
66
+        <xsd:choice maxOccurs="unbounded">
67
+          <xsd:element name="metadata">
68
+            <xsd:complexType>
69
+              <xsd:sequence>
70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+              </xsd:sequence>
72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
73
+              <xsd:attribute name="type" type="xsd:string" />
74
+              <xsd:attribute name="mimetype" type="xsd:string" />
75
+              <xsd:attribute ref="xml:space" />
76
+            </xsd:complexType>
77
+          </xsd:element>
78
+          <xsd:element name="assembly">
79
+            <xsd:complexType>
80
+              <xsd:attribute name="alias" type="xsd:string" />
81
+              <xsd:attribute name="name" type="xsd:string" />
82
+            </xsd:complexType>
83
+          </xsd:element>
84
+          <xsd:element name="data">
85
+            <xsd:complexType>
86
+              <xsd:sequence>
87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+              </xsd:sequence>
90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+              <xsd:attribute ref="xml:space" />
94
+            </xsd:complexType>
95
+          </xsd:element>
96
+          <xsd:element name="resheader">
97
+            <xsd:complexType>
98
+              <xsd:sequence>
99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+              </xsd:sequence>
101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
102
+            </xsd:complexType>
103
+          </xsd:element>
104
+        </xsd:choice>
105
+      </xsd:complexType>
106
+    </xsd:element>
107
+  </xsd:schema>
108
+  <resheader name="resmimetype">
109
+    <value>text/microsoft-resx</value>
110
+  </resheader>
111
+  <resheader name="version">
112
+    <value>2.0</value>
113
+  </resheader>
114
+  <resheader name="reader">
115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+  </resheader>
117
+  <resheader name="writer">
118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+  </resheader>
120
+  <metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121
+    <value>16, 6</value>
122
+  </metadata>
123
+  <metadata name="FolderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124
+    <value>198, 8</value>
125
+  </metadata>
126
+  <metadata name="SaveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
127
+    <value>378, 8</value>
128
+  </metadata>
129
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
130
+    <value>30</value>
131
+  </metadata>
132
+</root>

+ 697
- 0
YD-ERP-SYS/採購系統管理/一般性申請採購單.vb Переглянути файл

@@ -0,0 +1,697 @@
1
+Option Strict Off
2
+Public Class 一般性申請採購單
3
+    ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet : ReadOnly ds2 As New DataSet : ReadOnly ds3 As New DataSet
4
+    Dim 首次開啟 As Boolean = False : Dim NUM1 As Integer : Dim EDR As Integer = 0 : Dim ESTR As String : Dim 關鍵字 As Boolean
5
+    Private Sub Set_清單()
6
+        物料清單_dgv.DataSource = Nothing : ds.Clear()
7
+        物料清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
8
+        物料清單_dgv.ColumnHeadersHeight = 40
9
+        物料清單_dgv.AllowUserToAddRows = False
10
+        物料清單_dgv.RowTemplate.Height = 35
11
+
12
+        PA1 = "" : PA2 = "" : PA2 = 供應商編碼_cb.Text : PA1 = 查詢_tb.Text
13
+        SQL_盤盈盤損申請_物料清單()
14
+        da.Fill(ds) : 物料清單_dgv.DataSource = ds.Tables(0) : conn.Close()
15
+
16
+        物料清單_dgv.Columns(0).FillWeight = 80 : 物料清單_dgv.Columns(1).FillWeight = 80 : 物料清單_dgv.Columns(2).FillWeight = 100
17
+        物料清單_dgv.Columns(3).FillWeight = 200 : 物料清單_dgv.Columns(4).FillWeight = 80 : 物料清單_dgv.Columns(5).FillWeight = 80 : 物料清單_dgv.Columns(6).FillWeight = 50
18
+        物料清單_dgv.Columns(7).FillWeight = 50 : 物料清單_dgv.Columns(8).FillWeight = 50 : 物料清單_dgv.Columns(9).FillWeight = 50 : 物料清單_dgv.Columns(10).Visible = False
19
+        物料清單_dgv.Columns(11).Visible = False : 物料清單_dgv.Columns(12).Visible = False : 物料清單_dgv.Columns(13).Visible = False
20
+
21
+        物料清單_dgv.Columns(1).ReadOnly = True : 物料清單_dgv.Columns(2).ReadOnly = True : 物料清單_dgv.Columns(3).ReadOnly = True : 物料清單_dgv.Columns(4).ReadOnly = True
22
+        物料清單_dgv.Columns(5).ReadOnly = True : 物料清單_dgv.Columns(6).ReadOnly = True : 物料清單_dgv.Columns(7).ReadOnly = True : 物料清單_dgv.Columns(8).ReadOnly = True
23
+        物料清單_dgv.Columns(9).ReadOnly = True : 物料清單_dgv.Columns(0).ReadOnly = True
24
+
25
+        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0" : 物料清單_dgv.Columns("未入庫").DefaultCellStyle.Format = "#,##0"
26
+        物料清單_dgv.Columns("未出庫").DefaultCellStyle.Format = "#,##0"
27
+        物料清單_dgv.Columns("庫存").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
28
+        物料清單_dgv.Columns("庫存").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
29
+        物料清單_dgv.Columns("未入庫").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
30
+        物料清單_dgv.Columns("未入庫").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
31
+        物料清單_dgv.Columns("未出庫").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
32
+        物料清單_dgv.Columns("未出庫").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
33
+
34
+        資料筆數_tb.Text = 物料清單_dgv.Rows.Count
35
+        For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
36
+            資料數 = 物料清單_dgv.Rows.Count : MyModule1.進度條()
37
+            If 物料清單_dgv("倉名", i).Value.ToString = "" Then
38
+                If 物料清單_dgv("倉名1", i).Value.ToString <> "" Then
39
+                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名1", i).Value.ToString
40
+                ElseIf 物料清單_dgv("倉名2", i).Value.ToString <> "" Then
41
+                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名2", i).Value.ToString
42
+                ElseIf 物料清單_dgv("倉名3", i).Value.ToString <> "" Then
43
+                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名3", i).Value.ToString
44
+                End If
45
+            End If
46
+            If 物料清單_dgv("庫存", i).Value.ToString = "" Then : 物料清單_dgv("庫存", i).Value = 0 : End If
47
+            If 物料清單_dgv("未入庫", i).Value.ToString = "" Then : 物料清單_dgv("未入庫", i).Value = 0 : End If
48
+            If 物料清單_dgv("未出庫", i).Value.ToString = "" Then : 物料清單_dgv("未出庫", i).Value = 0 : End If
49
+
50
+            If Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) = 0 Then
51
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
52
+            ElseIf Val(物料清單_dgv("庫存", i).Value) = 0 And (Val(物料清單_dgv("未入庫", i).Value) <> 0 Or Val(物料清單_dgv("未出庫", i).Value) <> 0) Then
53
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
54
+            ElseIf Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) <> 0 Then
55
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
56
+            End If
57
+        Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
58
+    End Sub
59
+    Private Sub Set_清單1()
60
+        採購清單_dgv.DataSource = Nothing : ds1.Clear()
61
+        採購清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
62
+        採購清單_dgv.ColumnHeadersHeight = 40
63
+        採購清單_dgv.AllowUserToAddRows = False
64
+        If 小間距_ch.Checked = False And 中間距_ch.Checked = False And 大間距_ch.Checked = True Then
65
+            採購清單_dgv.RowTemplate.Height = 95
66
+        ElseIf 小間距_ch.Checked = False And 中間距_ch.Checked = True And 大間距_ch.Checked = False Then
67
+            採購清單_dgv.RowTemplate.Height = 60
68
+        ElseIf 小間距_ch.Checked = True And 中間距_ch.Checked = False And 大間距_ch.Checked = False Then
69
+            採購清單_dgv.RowTemplate.Height = 25
70
+        End If
71
+
72
+        If 關鍵字 = True Then : Else : PA = 供應商編碼1_cb.Text : End If
73
+        PA20 = 業務1_cb.Text
74
+        SQL_採購控制表_未出庫()
75
+        da.Fill(ds1) : 採購清單_dgv.DataSource = ds1.Tables(0) : conn.Close()
76
+        Set_採購清單_dgv_下拉式清單1() : Set_採購清單_dgv_下拉式清單2() : Set_採購清單_dgv_下拉式清單3()
77
+
78
+        採購清單_dgv.Columns(0).Visible = False : 採購清單_dgv.Columns(1).FillWeight = 70 : 採購清單_dgv.Columns(2).Visible = False : 採購清單_dgv.Columns(3).FillWeight = 80
79
+        採購清單_dgv.Columns(4).FillWeight = 65 : 採購清單_dgv.Columns(5).FillWeight = 190 : 採購清單_dgv.Columns(6).Visible = False : 採購清單_dgv.Columns(7).Visible = False
80
+        採購清單_dgv.Columns(8).FillWeight = 70 : 採購清單_dgv.Columns(9).Visible = False : 採購清單_dgv.Columns(10).Visible = False : 採購清單_dgv.Columns(11).FillWeight = 160
81
+        採購清單_dgv.Columns(12).Visible = False : 採購清單_dgv.Columns(13).Visible = False : 採購清單_dgv.Columns(14).FillWeight = 70 : 採購清單_dgv.Columns(15).FillWeight = 125
82
+        採購清單_dgv.Columns(16).FillWeight = 45 : 採購清單_dgv.Columns(17).FillWeight = 45 : 採購清單_dgv.Columns(18).FillWeight = 60 : 採購清單_dgv.Columns(19).FillWeight = 60
83
+        採購清單_dgv.Columns(20).FillWeight = 60 : 採購清單_dgv.Columns(21).FillWeight = 70 : 採購清單_dgv.Columns(22).FillWeight = 70 : 採購清單_dgv.Columns(23).FillWeight = 70
84
+        採購清單_dgv.Columns(24).Visible = False : 採購清單_dgv.Columns(25).Visible = False : 採購清單_dgv.Columns(26).FillWeight = 45
85
+
86
+        採購清單_dgv.Columns("數量").DefaultCellStyle.Format = "#,##0" : 採購清單_dgv.Columns("成本").DefaultCellStyle.Format = "#,##0" : 採購清單_dgv.Columns("金額").DefaultCellStyle.Format = "#,##0"
87
+        採購清單_dgv.Columns("數量").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
88
+        採購清單_dgv.Columns("數量").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
89
+        採購清單_dgv.Columns("成本").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
90
+        採購清單_dgv.Columns("成本").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
91
+        採購清單_dgv.Columns("金額").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
92
+        採購清單_dgv.Columns("金額").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
93
+
94
+        採購清單_dgv.Columns(3).ReadOnly = True : 採購清單_dgv.Columns(4).ReadOnly = True : 採購清單_dgv.Columns(5).ReadOnly = True : 採購清單_dgv.Columns(20).ReadOnly = True
95
+        採購清單_dgv.Columns(21).ReadOnly = True : 採購清單_dgv.Columns(16).ReadOnly = True : 採購清單_dgv.Columns(19).ReadOnly = True
96
+
97
+        採購清單_dgv.EditMode = DataGridViewEditMode.EditOnEnter : 資料筆數1_tb.Text = 採購清單_dgv.Rows.Count
98
+        關鍵字 = False
99
+        Set_合記計算()
100
+    End Sub
101
+    Private Sub Set_採購清單_dgv_下拉式清單1()
102
+        Dim Col As New DataGridViewComboBoxColumn With {
103
+            .FillWeight = 130,
104
+            .DataPropertyName = "倉名"
105
+        }
106
+        SQL_倉名_下拉清單()
107
+        Col.Items.Clear()
108
+        While (dr.Read()) : Col.Items.Add(dr("倉名")) : End While : conn.Close()
109
+        Col.HeaderText = "倉名" : Col.Name = "倉名"
110
+        採購清單_dgv.Columns.Insert(8, Col)
111
+    End Sub
112
+    Private Sub Set_採購清單_dgv_下拉式清單2()
113
+        Dim Col As New DataGridViewComboBoxColumn With {
114
+            .FillWeight = 130,
115
+            .DataPropertyName = "訂製"
116
+        }
117
+        SQL_訂製狀態_下拉清單()
118
+        Col.Items.Clear()
119
+        While (dr.Read()) : Col.Items.Add(dr("訂製")) : End While : conn.Close()
120
+        Col.HeaderText = "訂製" : Col.Name = "訂製"
121
+        採購清單_dgv.Columns.Insert(11, Col)
122
+    End Sub
123
+    Private Sub Set_採購清單_dgv_下拉式清單3()
124
+        Dim Col As New DataGridViewComboBoxColumn With {
125
+            .FillWeight = 130,
126
+            .DataPropertyName = "狀態"
127
+        }
128
+        SQL_倉儲狀態_下拉清單()
129
+        Col.Items.Clear()
130
+        While (dr.Read()) : Col.Items.Add(dr("狀態")) : End While : conn.Close()
131
+        Col.HeaderText = "狀態" : Col.Name = "狀態"
132
+        採購清單_dgv.Columns.Insert(14, Col)
133
+    End Sub
134
+    Private Sub Set_清單3()
135
+        區域庫存_dgv.DataSource = Nothing : ds3.Clear()
136
+        區域庫存_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
137
+        區域庫存_dgv.ColumnHeadersHeight = 25
138
+        區域庫存_dgv.AllowUserToAddRows = False
139
+        區域庫存_dgv.RowTemplate.Height = 25
140
+
141
+        PA20 = 料號_tb.Text : SQL_倉名_物料分配查詢()
142
+        da.Fill(ds3) : 區域庫存_dgv.DataSource = ds3.Tables(0) : conn.Close()
143
+
144
+        區域庫存_dgv.Columns(0).FillWeight = 200 : 區域庫存_dgv.Columns(1).FillWeight = 80
145
+        區域庫存_dgv.Columns(0).ReadOnly = True : 區域庫存_dgv.Columns(1).ReadOnly = True
146
+
147
+        區域庫存_dgv.Columns("可用").DefaultCellStyle.Format = "#,##0"
148
+        區域庫存_dgv.Columns("可用").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
149
+        區域庫存_dgv.Columns("可用").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
150
+    End Sub
151
+    Private Sub Set_清單5()
152
+        訂製圖檔_dgv.DataSource = Nothing : ds2.Clear()
153
+        訂製圖檔_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
154
+        訂製圖檔_dgv.ColumnHeadersHeight = 25
155
+        訂製圖檔_dgv.AllowUserToAddRows = False
156
+        訂製圖檔_dgv.RowTemplate.Height = 25
157
+
158
+        SQL_採購控制表_訂製圖檔清單()
159
+        da.Fill(ds2) : 訂製圖檔_dgv.DataSource = ds2.Tables(0) : conn.Close()
160
+
161
+        訂製圖檔_dgv.Columns(0).Visible = False : 訂製圖檔_dgv.Columns(1).Visible = False : 訂製圖檔_dgv.Columns(2).FillWeight = 100
162
+    End Sub
163
+    Private Sub 供應商_下拉表單資料載入()
164
+        BL1 = False : PA3 = "" : PA4 = ""
165
+        If 地區_cb.Text = "" Then : PA3 = ""
166
+        ElseIf 地區_cb.Text = "北部" Then : PA3 = "2"
167
+        ElseIf 地區_cb.Text = "南部" Then : PA3 = "3"
168
+        ElseIf 地區_cb.Text = "材料" Then : PA3 = "9"
169
+        ElseIf 地區_cb.Text = "調貨" Then : PA3 = "Y"
170
+        End If
171
+        SQL_盤盈盤損申請_供應商_下拉清單() : 供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear()
172
+        While (dr.Read()) : 供應商_cb.Items.Add(dr("簡稱")) : 供應商編碼_cb.Items.Add(dr("編號")) : End While : conn.Close()
173
+    End Sub
174
+    Private Sub 供應商1_下拉表單資料載入()
175
+        BL1 = False : PA3 = "" : PA4 = ""
176
+        If 地區1_cb.Text = "" Then : PA3 = ""
177
+        ElseIf 地區1_cb.Text = "北部" Then : PA3 = "2"
178
+        ElseIf 地區1_cb.Text = "南部" Then : PA3 = "3"
179
+        ElseIf 地區1_cb.Text = "材料" Then : PA3 = "9"
180
+        ElseIf 地區1_cb.Text = "調貨" Then : PA3 = "Y"
181
+        End If
182
+        SQL_盤盈盤損申請_供應商_下拉清單() : 供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear()
183
+        While (dr.Read()) : 供應商1_cb.Items.Add(dr("簡稱")) : 供應商編碼1_cb.Items.Add(dr("編號")) : End While : conn.Close()
184
+    End Sub
185
+    Private Sub Set_合記計算()
186
+        採購金額_tb.Text = "0" : 採購金額1_tb.Text = "0"
187
+        For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1
188
+            採購清單_dgv("金額", i).Value = 採購清單_dgv("數量", i).Value * 採購清單_dgv("成本", i).Value
189
+            採購金額_tb.Text = Val(採購金額_tb.Text) + 採購清單_dgv("金額", i).Value
190
+
191
+            If 供應商_tb.Text = 採購清單_dgv("供應商", i).Value.ToString Then
192
+                採購金額1_tb.Text = Val(採購金額1_tb.Text) + 採購清單_dgv("金額", i).Value
193
+            End If
194
+        Next
195
+        採購金額_tb.Text = Format(Val(採購金額_tb.Text), "#,##0") : 採購金額1_tb.Text = Format(Val(採購金額1_tb.Text), "#,##0")
196
+    End Sub
197
+    Private Sub 倉儲狀態_cb_下拉表單資料載入()
198
+        SQL_倉儲狀態_下拉清單() : 倉儲狀態_cb.Items.Clear() : 儲態編號_cb.Items.Clear()
199
+        While (dr.Read()) : 倉儲狀態_cb.Items.Add(dr("狀態")) : 儲態編號_cb.Items.Add(dr("編碼")) : End While : conn.Close()
200
+    End Sub
201
+    Private Sub 訂製狀態_cb_下拉表單資料載入()
202
+        SQL_訂製狀態_下拉清單() : 訂製狀態_cb.Items.Clear() : 訂製編碼_cb.Items.Clear()
203
+        While (dr.Read()) : 訂製狀態_cb.Items.Add(dr("訂製")) : 訂製編碼_cb.Items.Add(dr("編碼")) : End While : conn.Close()
204
+    End Sub
205
+    Private Sub 指定倉庫_cb_下拉表單資料載入()
206
+        If 需要全部庫存區域清單_ch.Checked = True Then
207
+            SQL_倉名_下拉清單()
208
+        Else
209
+            If 料號_tb.Text = "" Then
210
+                SQL_倉名_下拉清單()
211
+            Else
212
+                PA20 = 料號_tb.Text : SQL_倉名_下拉清單_有條件()
213
+            End If
214
+        End If
215
+        指定倉庫_cb.Items.Clear()
216
+        While (dr.Read()) : 指定倉庫_cb.Items.Add(dr("倉名")) : End While : conn.Close()
217
+        If 指定倉庫_cb.Items.Count = 0 Then
218
+            SQL_倉名_下拉清單()
219
+            While (dr.Read()) : 指定倉庫_cb.Items.Add(dr("倉名")) : End While : conn.Close()
220
+        End If
221
+    End Sub
222
+    Private Sub 一般性申請採購單_Load(sender As Object, e As EventArgs) Handles MyBase.Load
223
+        Me.MdiParent = YD_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
224
+        料號_tb.Enabled = False : 小間距_ch.Checked = True '--------------------控件隱藏、操作許可設定與其他基本顯示設定
225
+        指定倉庫_cb_下拉表單資料載入() : 訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
226
+        首次開啟 = False : Set_清單() : Set_清單1() : 首次開啟 = True '--------------------資料讀取
227
+
228
+        Target1 = Target & AA(1) & "/" : FTP資料夾_wb.Url = New Uri(Target1) '--------------------指定伺服器ftp資料夾位置
229
+    End Sub
230
+    Private Sub 區域庫存_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 區域庫存_dgv.CellClick
231
+        If e.RowIndex = -1 Then : Else
232
+            指定倉庫_cb.Text = 區域庫存_dgv.Rows(e.RowIndex).Cells("倉名").Value
233
+        End If
234
+    End Sub
235
+    Private Sub 一般性申請採購單_SizeChanged(sender As Object, e As EventArgs) Handles MyBase.SizeChanged
236
+        If Me.Size.Width > 1600 Then
237
+            物料圖1_pb.Visible = True : 物料圖1_pb.Size = New Size(280, 140)
238
+        Else
239
+            物料圖1_pb.Visible = False
240
+        End If
241
+    End Sub
242
+    Private Sub 採購清單_dgv_CellEndEdit(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 採購清單_dgv.CellEndEdit
243
+        Set_合記計算()
244
+
245
+        PA20 = 採購清單_dgv(8, e.RowIndex).Value : SQL_銷售明細_改倉名()
246
+        If dr.Read() Then : 採購清單_dgv("倉儲狀態", e.RowIndex).Value = dr("倉名編號") : End If
247
+        PA19 = 採購清單_dgv(11, e.RowIndex).Value : SQL_銷售明細_改物料訂製狀態()
248
+        If dr.Read() Then : 採購清單_dgv("訂製狀態", e.RowIndex).Value = dr("編碼") : End If
249
+        PA18 = 採購清單_dgv(14, e.RowIndex).Value : SQL_銷售明細_倉儲狀態()
250
+        If dr.Read() Then : 採購清單_dgv("物料狀態", e.RowIndex).Value = dr("編碼") : End If : conn.Close()
251
+
252
+        Dim EU(1) As String
253
+        EU(0) = 採購清單_dgv("採購日期", e.RowIndex).Value.ToString
254
+        If EU(0) = "" Then : Else
255
+            日期1_dtp.Text = EU(0) : 採購清單_dgv.Rows(e.RowIndex).Cells("採購日期").Value = Format(日期1_dtp.Value, "yyyy/MM/dd")
256
+        End If
257
+        EU(1) = 採購清單_dgv("預計進廠日", e.RowIndex).Value.ToString
258
+        If EU(1) = "" Then : Else
259
+            日期2_dtp.Text = EU(1) : 採購清單_dgv.Rows(e.RowIndex).Cells("預計進廠日").Value = Format(日期2_dtp.Value, "yyyy/MM/dd")
260
+        End If
261
+    End Sub
262
+    Private Sub 採購清單_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 採購清單_dgv.RowPostPaint
263
+        For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1
264
+            If 採購清單_dgv.Rows(i).Cells("已審核").Value = True Then
265
+                採購清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
266
+            Else
267
+                採購清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightYellow
268
+            End If
269
+        Next
270
+        Dim linePen As New Pen(Color.Blue, 2)
271
+        If e.RowIndex = 採購清單_dgv.Rows.Count - 1 Then : Exit Sub : Else
272
+            If 採購清單_dgv("供應商", e.RowIndex).Value.ToString <> 採購清單_dgv("供應商", e.RowIndex + 1).Value.ToString Then
273
+                Dim startX As Integer = IIf(採購清單_dgv.RowHeadersVisible, 採購清單_dgv.RowHeadersWidth, 0) : Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
274
+                Dim endX As Integer = startX + 採購清單_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 採購清單_dgv.HorizontalScrollingOffset
275
+                e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
276
+            End If
277
+        End If
278
+    End Sub
279
+    Private Sub 採購清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 採購清單_dgv.CellClick
280
+        If e.RowIndex = -1 Then : Else
281
+            項次_tb.Text = 採購清單_dgv(0, e.RowIndex).Value.ToString : 申請人_tb.Text = 採購清單_dgv("申請人", e.RowIndex).Value.ToString
282
+            版次_tb.Text = 採購清單_dgv("訂製圖號", e.RowIndex).Value.ToString : 單號1_tb.Text = 採購清單_dgv("銷售單號", e.RowIndex).Value.ToString
283
+            料號_tb.Text = 採購清單_dgv("料號", e.RowIndex).Value.ToString : 供應商_tb.Text = 採購清單_dgv("供應商", e.RowIndex).Value.ToString
284
+
285
+            Set_合記計算()
286
+
287
+            PA15 = 採購清單_dgv(0, e.RowIndex).Value.ToString : Set_清單5()
288
+
289
+            物料圖1_pb.Image = Nothing : PA1 = 採購清單_dgv.Rows(e.RowIndex).Cells("料號").Value : SQL_物料檔案_是否有圖()
290
+            If dr.Read() Then
291
+                If dr("是否有圖") = True Then
292
+                    PA = 採購清單_dgv.Rows(e.RowIndex).Cells("料號").Value : SQL_物料圖庫_圖片顯示() '--------------------圖片顯示
293
+                    While dr.Read() = True
294
+                        Dim unused As Byte() = New Byte(-1) {}
295
+                        Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
296
+                        Dim oStream As New MemoryStream(bytes)
297
+                        物料圖1_pb.Image = Bitmap.FromStream(oStream)
298
+                    End While
299
+                    conn.Close()
300
+                    物料圖1_pb.SizeMode = 4
301
+                Else
302
+                    物料圖1_pb.Image = Nothing
303
+                End If
304
+            End If : conn.Close()
305
+        End If
306
+    End Sub
307
+    Private Sub 訂製圖檔_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 訂製圖檔_dgv.CellClick
308
+        If e.RowIndex = -1 Then : Else
309
+            版次_tb.Text = 訂製圖檔_dgv.Rows(e.RowIndex).Cells("版次").Value
310
+
311
+            '----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
312
+            物料圖2_pb.Image = Nothing : PA15 = 項次_tb.Text : PA16 = 版次_tb.Text : SQL_採購控制表_訂製圖片()
313
+            While dr.Read() = True
314
+                Dim unused As Byte() = New Byte(-1) {}
315
+                Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
316
+                Dim oStream As New MemoryStream(bytes)
317
+                物料圖2_pb.Image = Bitmap.FromStream(oStream)
318
+            End While
319
+            conn.Close()
320
+            物料圖2_pb.SizeMode = 4
321
+        End If
322
+    End Sub
323
+    Private Sub 物料清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 物料清單_dgv.CellClick
324
+        If 首次開啟 = True Then
325
+            If e.RowIndex = -1 Then : Else
326
+                料號_tb.Text = 物料清單_dgv("料號", e.RowIndex).Value.ToString : 供應商編碼_tb.Text = Strings.Left(物料清單_dgv("料號", e.RowIndex).Value.ToString, 4)
327
+                品名_tb.Text = 物料清單_dgv("品名", e.RowIndex).Value.ToString : 最大庫存量_tb.Text = 物料清單_dgv("最低庫存量", e.RowIndex).Value.ToString
328
+                庫存量_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString)
329
+                可申請_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString) - Val(物料清單_dgv("未出庫", e.RowIndex).Value.ToString)
330
+
331
+                物料圖_pb.Image = Nothing : PA1 = 料號_tb.Text : SQL_物料檔案_是否有圖()
332
+                If dr.Read() Then
333
+                    If dr("是否有圖") = True Then
334
+                        PA = 料號_tb.Text : SQL_物料圖庫_圖片顯示() '--------------------圖片顯示
335
+                        While dr.Read() = True
336
+                            Dim unused As Byte() = New Byte(-1) {}
337
+                            Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
338
+                            Dim oStream As New MemoryStream(bytes)
339
+                            物料圖_pb.Image = Bitmap.FromStream(oStream)
340
+                        End While
341
+                        conn.Close()
342
+                        物料圖_pb.SizeMode = 4
343
+                    Else
344
+                        物料圖_pb.Image = Nothing
345
+                    End If
346
+                End If : conn.Close()
347
+
348
+                指定倉庫_cb_下拉表單資料載入() : 指定倉庫_cb.Text = 物料清單_dgv("倉名", e.RowIndex).Value.ToString : Set_清單3()
349
+                If 物料清單_dgv("狀態", e.RowIndex).Value.ToString = "" Then
350
+                    訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
351
+                Else
352
+                    倉儲狀態_cb.Text = 物料清單_dgv("狀態", e.RowIndex).Value.ToString : 訂製狀態_cb.Text = 物料清單_dgv("訂製", e.RowIndex).Value.ToString
353
+                End If
354
+
355
+                採購單價_nud.Value = 0
356
+                If 物料清單_dgv("狀態", e.RowIndex).Value.ToString = "" Then
357
+                    訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
358
+                Else
359
+                    倉儲狀態_cb.Text = 物料清單_dgv("狀態", e.RowIndex).Value.ToString : 訂製狀態_cb.Text = 物料清單_dgv("訂製", e.RowIndex).Value.ToString
360
+                    If 訂製編碼_cb.Text = "MA0001" Then
361
+                        PA12 = 料號_tb.Text
362
+                        SQL_銷售明細表_成本讀取()
363
+                        If dr.Read() Then : 採購單價_nud.Value = dr("成本")
364
+                        Else : 採購單價_nud.Value = 0
365
+                        End If : conn.Close()
366
+                    Else
367
+                        採購單價_nud.Value = 0
368
+                    End If
369
+                End If
370
+            End If
371
+        End If
372
+    End Sub
373
+    Private Sub 物料清單_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 物料清單_dgv.RowPostPaint
374
+        Dim linePen As New Pen(Color.Blue, 2)
375
+        If e.RowIndex = 物料清單_dgv.Rows.Count - 1 Then : Exit Sub : Else
376
+            If 物料清單_dgv("供應商", e.RowIndex).Value.ToString <> 物料清單_dgv("供應商", e.RowIndex + 1).Value.ToString Then
377
+                Dim startX As Integer = IIf(物料清單_dgv.RowHeadersVisible, 物料清單_dgv.RowHeadersWidth, 0) : Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
378
+                Dim endX As Integer = startX + 物料清單_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 物料清單_dgv.HorizontalScrollingOffset
379
+                e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
380
+            End If
381
+        End If
382
+        For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
383
+            If Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) = 0 Then
384
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
385
+            ElseIf Val(物料清單_dgv("庫存", i).Value) = 0 And (Val(物料清單_dgv("未入庫", i).Value) <> 0 Or Val(物料清單_dgv("未出庫", i).Value) <> 0) Then
386
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
387
+            ElseIf Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) <> 0 Then
388
+                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
389
+            End If
390
+        Next
391
+    End Sub
392
+    Private Sub 檔案名稱_tb_DragEnter(sender As Object, e As DragEventArgs) Handles 檔案名稱_tb.DragEnter
393
+        If e.Data.GetDataPresent(DataFormats.FileDrop) Then
394
+            Dim files As String()
395
+            Try
396
+                files = CType(e.Data.GetData(DataFormats.FileDrop), String())
397
+                檔案名稱_tb.Text = files(files.Length - 1)
398
+            Catch ex As Exception
399
+                MessageBox.Show(ex.Message)
400
+                Return
401
+            End Try
402
+        End If
403
+        Dim STR2 As Integer = 0
404
+        檔名讀取_tb.Text = 檔案名稱_tb.Text
405
+        If 檔案名稱_tb.Text = "" Then
406
+        Else
407
+            For i As Integer = 0 To 9999
408
+                Dim STR1 As Integer = Strings.Len(檔名讀取_tb.Text)
409
+                If Strings.Right((檔名讀取_tb.Text), 1) <> "\" Then
410
+                    STR1 -= 1 : STR2 += 1
411
+                    If STR1 = 0 Then
412
+                        檔名讀取_tb.Text = ""
413
+                        檔案名稱_tb.Text = ""
414
+                        i = 9999
415
+                    Else
416
+                        檔名讀取_tb.Text = Strings.Left((檔名讀取_tb.Text), STR1)
417
+                    End If
418
+                Else
419
+                    檔名讀取_tb.Text = Strings.Right((檔案名稱_tb.Text), STR2)
420
+                    檔案名稱_tb.Text = 檔名讀取_tb.Text
421
+                    i = 9999
422
+                End If
423
+            Next
424
+        End If
425
+    End Sub
426
+    Private Sub 檔案名稱_tb_DragDrop(ByVal sender As Object, ByVal e As DragEventArgs) Handles 檔案名稱_tb.DragDrop
427
+        Dim files As Array = e.Data.GetData(DataFormats.FileDrop)
428
+        For Each file As String In files
429
+            檔案名稱_tb.AppendText(file + Environment.NewLine)
430
+        Next
431
+    End Sub
432
+    Private Sub 業務1_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 業務1_cb.SelectedIndexChanged
433
+        Set_清單1()
434
+    End Sub
435
+    Private Sub 地區_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 地區_cb.SelectedIndexChanged
436
+        If 地區_cb.Text = "" And 查詢_tb.Text = "" Then
437
+            供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear() : Set_清單()
438
+        ElseIf 地區_cb.Text = "" Then
439
+            查詢_tb.Text = "" : 供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear()
440
+        ElseIf 地區_cb.Text <> "" Then
441
+            查詢_tb.Text = "" : 供應商_下拉表單資料載入()
442
+        End If
443
+    End Sub
444
+    Private Sub 地區1_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 地區1_cb.SelectedIndexChanged
445
+        If 地區1_cb.Text = "" And 查詢1_tb.Text = "" Then
446
+            供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear() : Set_清單1()
447
+        ElseIf 地區1_cb.Text = "" Then
448
+            查詢1_tb.Text = "" : 供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear()
449
+        ElseIf 地區1_cb.Text <> "" Then
450
+            查詢1_tb.Text = "" : 供應商1_下拉表單資料載入()
451
+        End If
452
+    End Sub
453
+    Private Sub 供應商_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 供應商_cb.SelectedIndexChanged
454
+        If 地區_cb.Text <> "" Then
455
+            查詢_tb.Text = "" : 供應商編碼_cb.SelectedIndex = 供應商_cb.SelectedIndex
456
+        End If
457
+    End Sub
458
+    Private Sub 供應商1_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 供應商1_cb.SelectedIndexChanged
459
+        If 地區1_cb.Text <> "" Then
460
+            查詢1_tb.Text = "" : 供應商編碼1_cb.SelectedIndex = 供應商1_cb.SelectedIndex
461
+        End If
462
+    End Sub
463
+    Private Sub 供應商編碼_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 供應商編碼_cb.SelectedIndexChanged
464
+        If 地區_cb.Text <> "" Then
465
+            查詢_tb.Text = "" : 供應商_cb.SelectedIndex = 供應商編碼_cb.SelectedIndex : 供應商編碼_tb.Text = 供應商編碼_cb.Text : Set_清單()
466
+        End If
467
+    End Sub
468
+    Private Sub 供應商編碼1_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 供應商編碼1_cb.SelectedIndexChanged
469
+        If 地區1_cb.Text <> "" Then
470
+            查詢1_tb.Text = "" : 供應商1_cb.SelectedIndex = 供應商編碼1_cb.SelectedIndex : 供應商編碼1_tb.Text = 供應商編碼1_cb.Text : Set_清單1()
471
+        End If
472
+    End Sub
473
+    Private Sub 查詢_tb_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles 查詢_tb.KeyPress
474
+        If e.KeyChar = Chr(13) Then
475
+            供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear()
476
+            PA = 查詢_tb.Text : Set_清單() : 地區_cb.Text = ""
477
+        End If
478
+    End Sub
479
+    Private Sub 查詢1_tb_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles 查詢1_tb.KeyPress
480
+        If e.KeyChar = Chr(13) Then
481
+            供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear()
482
+            關鍵字 = True : PA = 查詢1_tb.Text : Set_清單() : 地區1_cb.Text = ""
483
+        End If
484
+    End Sub
485
+    Private Sub 清空_bt_Click(sender As Object, e As EventArgs) Handles 清空_bt.Click
486
+        查詢_tb.Text = "" : 地區_cb.Text = ""
487
+    End Sub
488
+    Private Sub 清空1_bt_Click(sender As Object, e As EventArgs) Handles 清空1_bt.Click
489
+        業務1_cb.Text = "" : 查詢1_tb.Text = "" : 地區1_cb.Text = ""
490
+    End Sub
491
+    Private Sub 指定倉庫_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 指定倉庫_cb.SelectedIndexChanged
492
+        PA6 = 指定倉庫_cb.Text : SQL_指定倉儲_資料讀取()
493
+        If dr.Read() Then : 倉庫級別_tb.Text = dr("倉級") : 倉庫編號_tb.Text = dr("倉名編號") : End If : conn.Close()
494
+    End Sub
495
+    Private Sub 倉儲狀態_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 倉儲狀態_cb.SelectedIndexChanged
496
+        儲態編號_cb.SelectedIndex = 倉儲狀態_cb.SelectedIndex
497
+    End Sub
498
+    Private Sub 儲態編號_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 儲態編號_cb.SelectedIndexChanged
499
+        倉儲狀態_cb.SelectedIndex = 儲態編號_cb.SelectedIndex
500
+    End Sub
501
+    Private Sub 訂製狀態_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 訂製狀態_cb.SelectedIndexChanged
502
+        訂製編碼_cb.SelectedIndex = 訂製狀態_cb.SelectedIndex
503
+        If 訂製編碼_cb.Text = "MA0001" Then
504
+            PA12 = 料號_tb.Text
505
+            SQL_銷售明細表_成本讀取()
506
+            If dr.Read() Then : 採購單價_nud.Value = dr("成本")
507
+            Else : 採購單價_nud.Value = 0
508
+            End If : conn.Close()
509
+        Else
510
+            採購單價_nud.Value = 0
511
+        End If
512
+    End Sub
513
+    Private Sub 訂製編碼_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 訂製編碼_cb.SelectedIndexChanged
514
+        訂製狀態_cb.SelectedIndex = 訂製編碼_cb.SelectedIndex
515
+    End Sub
516
+    Private Sub Set_日期格式轉換()
517
+        DTP = Format(Today(), "yyyy/MM/dd") : DTP1 = Format(Today(), "yyyyMMdd")
518
+    End Sub
519
+    Private Sub 選定內容加入庫存調整申請單_bt_Click(sender As Object, e As EventArgs) Handles 選定內容加入庫存調整申請單_bt.Click
520
+        If 料號_tb.Text = "" Then
521
+            MsgBox("請選擇物料,調整庫存需要指定物料!!")
522
+        Else
523
+            If 儲態編號_cb.Text = "" Then
524
+                MsgBox("倉儲狀態是一定要選擇的!!")
525
+            Else
526
+                If 指定倉庫_cb.Text = "" Then
527
+                    MsgBox("指定倉庫是一定要選擇的!!")
528
+                Else
529
+                    If 訂製狀態_cb.Text = "" Then
530
+                        MsgBox("物品的訂製狀態也是一定要選擇的!!")
531
+                    Else
532
+                        SQL_採購控制表_最後一筆資料()
533
+                        If dr.Read() Then : EDR = Double.Parse(Strings.Right(dr("資料流水號").ToString, 9)) : Else : EDR = 0 : End If
534
+                        conn.Close() : EDR += 1
535
+                        If EDR < 10 Then : ESTR = "PU" & "00000000" & EDR
536
+                        ElseIf EDR > 9 And EDR < 100 Then : ESTR = "PU" & "0000000" & EDR
537
+                        ElseIf EDR > 99 And EDR < 1000 Then : ESTR = "PU" & "000000" & EDR
538
+                        ElseIf EDR > 999 And EDR < 10000 Then : ESTR = "PU" & "00000" & EDR
539
+                        ElseIf EDR > 9999 And EDR < 100000 Then : ESTR = "PU" & "0000" & EDR
540
+                        ElseIf EDR > 99999 And EDR < 100000 Then : ESTR = "PU" & "000" & EDR
541
+                        ElseIf EDR > 999999 And EDR < 1000000 Then : ESTR = "PU" & "00" & EDR
542
+                        ElseIf EDR > 9999999 And EDR < 10000000 Then : ESTR = "PU" & "0" & EDR
543
+                        ElseIf EDR > 99999999 Then : ESTR = "PU" & EDR : End If
544
+
545
+                        PA1 = ESTR : PA2 = "" : PA3 = 供應商編碼_tb.Text : PA4 = 料號_tb.Text : PA5 = 儲態編號_cb.Text : PA6 = 訂製編碼_cb.Text : PA7 = 倉庫編號_tb.Text : PA8 = ""
546
+                        NU1 = 採購數量_nud.Value : NU2 = 採購單價_nud.Value : NU3 = NU1 * NU2 : PA9 = gUserName : PA10 = Format(Today(), "yyyy/MM/dd") : PA11 = "" : PA12 = ""
547
+                        BL1 = False
548
+                        SQL_採購控制表_新增() : Set_清單1()
549
+                    End If
550
+                End If
551
+            End If
552
+        End If
553
+    End Sub
554
+    Private Sub 窄間距_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 小間距_ch.Click
555
+        小間距_ch.Checked = True : 中間距_ch.Checked = False : 大間距_ch.Checked = False
556
+        存檔1() : Set_清單1()
557
+    End Sub
558
+    Private Sub 中間距_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 中間距_ch.Click
559
+        小間距_ch.Checked = False : 中間距_ch.Checked = True : 大間距_ch.Checked = False
560
+        存檔1() : Set_清單1()
561
+    End Sub
562
+    Private Sub 大間距_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 大間距_ch.Click
563
+        小間距_ch.Checked = False : 中間距_ch.Checked = False : 大間距_ch.Checked = True
564
+        存檔1() : Set_清單1()
565
+    End Sub
566
+    Private Sub 存檔1()
567
+        For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1
568
+            資料數 = 採購清單_dgv.Rows.Count : MyModule1.進度條()
569
+            If gUserName <> 採購清單_dgv("申請人", i).Value And Val(登入人級別) >= 3 Then
570
+            Else
571
+                PA = 採購清單_dgv("資料流水號", i).Value : PA1 = 採購清單_dgv("物料狀態", i).Value : PA2 = 採購清單_dgv("訂製狀態", i).Value : PA3 = 採購清單_dgv("倉儲狀態", i).Value
572
+                PA4 = 採購清單_dgv("備註", i).Value.ToString : PA5 = 採購清單_dgv("採購日期", i).Value.ToString : PA6 = 採購清單_dgv("預計進廠日", i).Value.ToString
573
+                NU1 = 採購清單_dgv("數量", i).Value : NU2 = 採購清單_dgv("成本", i).Value : NU3 = NU1 * NU2
574
+                SQL_採購控制表_存檔()
575
+            End If
576
+        Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
577
+    End Sub
578
+    Private Sub 存檔_bt_Click(sender As Object, e As EventArgs) Handles 存檔_bt.Click
579
+        存檔1() : MsgBox("修改完成。")
580
+    End Sub
581
+    Private Sub 刪除單據上點選的資料_bt_Click(sender As Object, e As EventArgs) Handles 刪除單據上點選的資料_bt.Click
582
+        If gUserName <> 申請人_tb.Text And Val(登入人級別) >= 3 Then
583
+            MsgBox("不能修改其他申請人的資料")
584
+        Else
585
+            PA = 項次_tb.Text : SQL_採購控制表_刪除()
586
+        End If
587
+        Set_清單1() : MsgBox("已刪除選中的資料")
588
+    End Sub
589
+    Private Sub 讀取資料夾路徑_bt_Click(sender As Object, e As EventArgs) Handles 讀取資料夾路徑_bt.Click
590
+        If FolderBrowserDialog1.ShowDialog = DialogResult.OK Then : 本機資料夾_wb.Navigate(FolderBrowserDialog1.SelectedPath) : End If
591
+    End Sub
592
+    Private Sub 圖檔入系統_bt_Click(sender As Object, e As EventArgs) Handles 圖檔入系統_bt.Click
593
+        If 項次_tb.Text = "" Then : MsgBox("請先選擇要指定訂製圖檔的採購資料!!")
594
+        Else
595
+            If 檔案名稱_tb.Text <> "" Then
596
+                Dim 驗證 As String : Dim 取變數 As String
597
+                取變數 = Strings.StrReverse(檔案名稱_tb.Text)
598
+                For i As Integer = 1 To 10
599
+                    If i = 1 Then
600
+                        驗證 = Strings.Left(取變數, i)
601
+                    Else
602
+                        If Strings.Mid(取變數, i, 1) = "." Then
603
+                            驗證 = Strings.StrReverse(驗證) : Exit For
604
+                        Else
605
+                            驗證 = 驗證 & Strings.Mid(取變數, i, 1)
606
+                        End If
607
+                    End If
608
+                Next
609
+
610
+                If 驗證 = "PNG" Or 驗證 = "png" Or 驗證 = "GIF" Or 驗證 = "gif" Or 驗證 = "BMP" Or 驗證 = "bmp" Or 驗證 = "JPG" Or 驗證 = "jpg" Or 驗證 = "JPEG" Or 驗證 = "jpeg" Then
611
+                    Dim 進版 As Integer
612
+                    If 版次_tb.Text = "" Then
613
+                        版次_tb.Text = "V01"
614
+                    Else
615
+                        進版 = Strings.Right(版次_tb.Text, 2) : 進版 += 1
616
+                        If 進版 < 10 Then : 版次_tb.Text = "V" & "0" & 進版
617
+                        Else : 版次_tb.Text = "V" & EDR : End If
618
+                    End If
619
+
620
+                    PA1 = 項次_tb.Text : PA2 = 單號1_tb.Text : PA3 = 版次_tb.Text : PA4 = 檔案名稱_tb.Text
621
+                    SQL_採購控制表_圖片新增() : SQL_採購控制表_修改() : conn.Close()
622
+                    '---FTP方式刪除檔案----------------------------------------------------------------------------------------------------------------------------------------------------------------------
623
+                    Dim frq As FtpWebRequest, frp As FtpWebResponse, fcr As NetworkCredential
624
+                    frq = CType(WebRequest.Create(New Uri(Target1 & 檔案名稱_tb.Text)), FtpWebRequest)
625
+                    fcr = New NetworkCredential(FTP帳號, FTP密碼)
626
+                    frq.Credentials = fcr
627
+                    frq.Method = WebRequestMethods.Ftp.DeleteFile
628
+                    frq.UseBinary = True
629
+                    frp = CType(frq.GetResponse, FtpWebResponse)
630
+                    frp.Close()
631
+                    FTP資料夾_wb.Refresh()
632
+                    '----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
633
+                    物料圖2_pb.Image = Nothing : PA15 = 項次_tb.Text : PA16 = 版次_tb.Text : SQL_採購控制表_訂製圖片()
634
+                    While dr.Read() = True
635
+                        Dim unused As Byte() = New Byte(-1) {}
636
+                        Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
637
+                        Dim oStream As New MemoryStream(bytes)
638
+                        物料圖2_pb.Image = Bitmap.FromStream(oStream)
639
+                    End While
640
+                    conn.Close()
641
+                    物料圖2_pb.SizeMode = 4
642
+                    '----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
643
+                    存檔1() : Set_清單5() : Set_清單1() : 檔案名稱_tb.Text = ""
644
+                Else
645
+                    MsgBox("上傳文件並非常用圖片格式,文件已自動刪除,請專換成常用圖片檔案再行操作。")
646
+                    '---FTP方式刪除檔案----------------------------------------------------------------------------------------------------------------------------------------------------------------------
647
+                    Dim frq As FtpWebRequest, frp As FtpWebResponse, fcr As NetworkCredential
648
+                    frq = CType(WebRequest.Create(New Uri(Target1 & 檔案名稱_tb.Text)), FtpWebRequest)
649
+                    fcr = New NetworkCredential(FTP帳號, FTP密碼)
650
+                    frq.Credentials = fcr
651
+                    frq.Method = WebRequestMethods.Ftp.DeleteFile
652
+                    frq.UseBinary = True
653
+                    frp = CType(frq.GetResponse, FtpWebResponse)
654
+                    frp.Close()
655
+                    FTP資料夾_wb.Refresh()
656
+                    檔案名稱_tb.Text = ""
657
+                End If
658
+            End If
659
+        End If
660
+    End Sub
661
+    Private Sub 下載圖檔_bt_Click(sender As Object, e As EventArgs) Handles 下載圖檔_bt.Click
662
+        If 物料圖1_pb.Image Is Nothing Then : MsgBox("所選擇的資料沒有圖片檔案,無法下載。")
663
+        Else
664
+            With SaveFileDialog1 : .Filter = "所有文件(*.jpg)|*.jpg" : End With
665
+            SaveFileDialog1.FileName = 單號1_tb.Text & "-" & 料號_tb.Text & "-" & 版次_tb.Text & ".jpg"
666
+            Dim result As DialogResult = SaveFileDialog1.ShowDialog()
667
+            下載檔名_tb.Text = SaveFileDialog1.FileName
668
+            If result = System.Windows.Forms.DialogResult.Cancel Then
669
+                Exit Sub
670
+            End If
671
+
672
+            PA15 = 項次_tb.Text : PA16 = 版次_tb.Text
673
+            ds3.Clear() : SQL_採購控制表_訂製圖片下載() : da.Fill(ds3)
674
+            If ds3.Tables(0).Rows.Count > 0 Then
675
+                Dim imgData() As Byte
676
+                imgData = ds3.Tables(0).Rows(0).Item("圖片")
677
+                Dim fs As FileStream
678
+                fs = File.Create(下載檔名_tb.Text, imgData.Length - 1)
679
+                fs.Write(imgData, 0, imgData.Length - 1)
680
+                fs.Close()
681
+            End If : conn.Close() : MsgBox("下載完成")
682
+        End If
683
+    End Sub
684
+    Private Sub 大圖預覽_bt_Click(sender As Object, e As EventArgs) Handles 大圖預覽_bt.Click
685
+        If 項次_tb.Text = "" Or 版次_tb.Text = "" Then
686
+            MsgBox("沒有訂製圖或是沒有決哲訂製圖")
687
+        Else
688
+            採購訂製大圖.ShowDialog()
689
+        End If
690
+    End Sub
691
+
692
+    Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
693
+        採購清單_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
694
+        物料清單_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
695
+        區域庫存_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
696
+    End Sub
697
+End Class

+ 22
- 14
YD-ERP-SYS/採購系統管理/一般申請_採購單.vb Переглянути файл

@@ -444,22 +444,30 @@ Public Class 一般申請_採購單
444 444
         Set_清單1()
445 445
     End Sub
446 446
     Private Sub 地區_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 地區_cb.SelectedIndexChanged
447
-        If 地區_cb.Text = "" And 查詢_tb.Text = "" Then
448
-            供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear() : Set_清單()
449
-        ElseIf 地區_cb.Text = "" Then
450
-            查詢_tb.Text = "" : 供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear()
451
-        ElseIf 地區_cb.Text <> "" Then
452
-            查詢_tb.Text = "" : 供應商_下拉表單資料載入()
453
-        End If
447
+        Try
448
+            If 地區_cb.Text = "" And 查詢_tb.Text = "" Then
449
+                供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear() : Set_清單()
450
+            ElseIf 地區_cb.Text = "" Then
451
+                查詢_tb.Text = "" : 供應商_cb.Items.Clear() : 供應商編碼_cb.Items.Clear()
452
+            ElseIf 地區_cb.Text <> "" Then
453
+                查詢_tb.Text = "" : 供應商_下拉表單資料載入()
454
+            End If
455
+        Catch ex As Exception
456
+            MsgBox("麻煩截圖,回傳給工程師。描述操作流程")
457
+        End Try
454 458
     End Sub
455 459
     Private Sub 地區1_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 地區1_cb.SelectedIndexChanged
456
-        If 地區1_cb.Text = "" And 查詢1_tb.Text = "" Then
457
-            供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear() : Set_清單1()
458
-        ElseIf 地區1_cb.Text = "" Then
459
-            查詢1_tb.Text = "" : 供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear()
460
-        ElseIf 地區1_cb.Text <> "" Then
461
-            查詢1_tb.Text = "" : 供應商1_下拉表單資料載入()
462
-        End If
460
+        Try
461
+            If 地區1_cb.Text = "" And 查詢1_tb.Text = "" Then
462
+                供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear() : Set_清單1()
463
+            ElseIf 地區1_cb.Text = "" Then
464
+                查詢1_tb.Text = "" : 供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear()
465
+            ElseIf 地區1_cb.Text <> "" Then
466
+                查詢1_tb.Text = "" : 供應商1_下拉表單資料載入()
467
+            End If
468
+        Catch ex As Exception
469
+            MsgBox("麻煩截圖,回傳給工程師。描述操作流程")
470
+        End Try
463 471
     End Sub
464 472
     Private Sub 供應商_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 供應商_cb.SelectedIndexChanged
465 473
         If 地區_cb.Text <> "" Then

+ 938
- 0
YD-ERP-SYS/採購系統管理/依銷售申請採購單.Designer.vb Переглянути файл

@@ -0,0 +1,938 @@
1
+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
2
+Partial Class 依銷售申請採購單
3
+    Inherits System.Windows.Forms.Form
4
+
5
+    'Form 覆寫 Dispose 以清除元件清單。
6
+    <System.Diagnostics.DebuggerNonUserCode()> _
7
+    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8
+        Try
9
+            If disposing AndAlso components IsNot Nothing Then
10
+                components.Dispose()
11
+            End If
12
+        Finally
13
+            MyBase.Dispose(disposing)
14
+        End Try
15
+    End Sub
16
+
17
+    '為 Windows Form 設計工具的必要項
18
+    Private components As System.ComponentModel.IContainer
19
+
20
+    '注意: 以下為 Windows Form 設計工具所需的程序
21
+    '可以使用 Windows Form 設計工具進行修改。
22
+    '請勿使用程式碼編輯器進行修改。
23
+    <System.Diagnostics.DebuggerStepThrough()> _
24
+    Private Sub InitializeComponent()
25
+        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(依銷售申請採購單))
29
+        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
+        Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
+        Me.銷售單據_dgv = New System.Windows.Forms.DataGridView()
34
+        Me.業務_cb = New System.Windows.Forms.ComboBox()
35
+        Me.採購金額_tb = New System.Windows.Forms.TextBox()
36
+        Me.Label16 = New System.Windows.Forms.Label()
37
+        Me.小間距_ch = New System.Windows.Forms.CheckBox()
38
+        Me.清空1_bt = New System.Windows.Forms.Button()
39
+        Me.供應商編碼1_tb = New System.Windows.Forms.TextBox()
40
+        Me.查詢1_tb = New System.Windows.Forms.TextBox()
41
+        Me.地區1_cb = New System.Windows.Forms.ComboBox()
42
+        Me.Label14 = New System.Windows.Forms.Label()
43
+        Me.供應商1_cb = New System.Windows.Forms.ComboBox()
44
+        Me.Label13 = New System.Windows.Forms.Label()
45
+        Me.供應商編碼1_cb = New System.Windows.Forms.ComboBox()
46
+        Me.Label1 = New System.Windows.Forms.Label()
47
+        Me.存檔_bt = New System.Windows.Forms.Button()
48
+        Me.刪除單據上點選的資料_bt = New System.Windows.Forms.Button()
49
+        Me.Label9 = New System.Windows.Forms.Label()
50
+        Me.資料筆數1_tb = New System.Windows.Forms.TextBox()
51
+        Me.Label10 = New System.Windows.Forms.Label()
52
+        Me.項次_tb = New System.Windows.Forms.TextBox()
53
+        Me.選擇_lb = New System.Windows.Forms.Label()
54
+        Me.採購清單_dgv = New System.Windows.Forms.DataGridView()
55
+        Me.Label15 = New System.Windows.Forms.Label()
56
+        Me.Label17 = New System.Windows.Forms.Label()
57
+        Me.Label2 = New System.Windows.Forms.Label()
58
+        Me.銷售單顯示_ch = New System.Windows.Forms.CheckBox()
59
+        Me.銷售明細_dgv = New System.Windows.Forms.DataGridView()
60
+        Me.單號_tb = New System.Windows.Forms.TextBox()
61
+        Me.窄間距1_ch = New System.Windows.Forms.CheckBox()
62
+        Me.轉採購_bt = New System.Windows.Forms.Button()
63
+        Me.Label3 = New System.Windows.Forms.Label()
64
+        Me.業務1_cb = New System.Windows.Forms.ComboBox()
65
+        Me.日期2_dtp = New System.Windows.Forms.DateTimePicker()
66
+        Me.日期1_dtp = New System.Windows.Forms.DateTimePicker()
67
+        Me.申請人_tb = New System.Windows.Forms.TextBox()
68
+        Me.Label19 = New System.Windows.Forms.Label()
69
+        Me.大間距_ch = New System.Windows.Forms.CheckBox()
70
+        Me.中間距_ch = New System.Windows.Forms.CheckBox()
71
+        Me.檔名讀取_tb = New System.Windows.Forms.TextBox()
72
+        Me.檔案名稱_tb = New System.Windows.Forms.TextBox()
73
+        Me.Label12 = New System.Windows.Forms.Label()
74
+        Me.Label4 = New System.Windows.Forms.Label()
75
+        Me.讀取資料夾路徑_bt = New System.Windows.Forms.Button()
76
+        Me.本機資料夾_wb = New System.Windows.Forms.WebBrowser()
77
+        Me.FTP資料夾_wb = New System.Windows.Forms.WebBrowser()
78
+        Me.Label11 = New System.Windows.Forms.Label()
79
+        Me.Label5 = New System.Windows.Forms.Label()
80
+        Me.FolderBrowserDialog1 = New System.Windows.Forms.FolderBrowserDialog()
81
+        Me.下載圖檔_bt = New System.Windows.Forms.Button()
82
+        Me.圖檔入系統_bt = New System.Windows.Forms.Button()
83
+        Me.訂製圖檔_dgv = New System.Windows.Forms.DataGridView()
84
+        Me.版次_tb = New System.Windows.Forms.TextBox()
85
+        Me.大圖預覽_bt = New System.Windows.Forms.Button()
86
+        Me.單號1_tb = New System.Windows.Forms.TextBox()
87
+        Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
88
+        Me.料號_tb = New System.Windows.Forms.TextBox()
89
+        Me.下載檔名_tb = New System.Windows.Forms.TextBox()
90
+        Me.物料圖1_pb = New System.Windows.Forms.PictureBox()
91
+        Me.採購金額1_tb = New System.Windows.Forms.TextBox()
92
+        Me.Label6 = New System.Windows.Forms.Label()
93
+        Me.供應商_tb = New System.Windows.Forms.TextBox()
94
+        Me.Label7 = New System.Windows.Forms.Label()
95
+        Me.採購日期_tb = New System.Windows.Forms.TextBox()
96
+        Me.交貨日期_tb = New System.Windows.Forms.TextBox()
97
+        Me.字體大小調整_lb = New System.Windows.Forms.Label()
98
+        Me.字體_NUD = New System.Windows.Forms.NumericUpDown()
99
+        CType(Me.銷售單據_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
100
+        CType(Me.採購清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
101
+        CType(Me.銷售明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
102
+        CType(Me.訂製圖檔_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
103
+        CType(Me.物料圖1_pb, System.ComponentModel.ISupportInitialize).BeginInit()
104
+        CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).BeginInit()
105
+        Me.SuspendLayout()
106
+        '
107
+        '銷售單據_dgv
108
+        '
109
+        DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
110
+        Me.銷售單據_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
111
+        Me.銷售單據_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
112
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
113
+        Me.銷售單據_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
114
+        Me.銷售單據_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
115
+        Me.銷售單據_dgv.Location = New System.Drawing.Point(5, 123)
116
+        Me.銷售單據_dgv.Name = "銷售單據_dgv"
117
+        Me.銷售單據_dgv.RowHeadersWidth = 5
118
+        DataGridViewCellStyle9.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
119
+        DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
120
+        Me.銷售單據_dgv.RowsDefaultCellStyle = DataGridViewCellStyle9
121
+        Me.銷售單據_dgv.RowTemplate.Height = 24
122
+        Me.銷售單據_dgv.Size = New System.Drawing.Size(81, 552)
123
+        Me.銷售單據_dgv.TabIndex = 1159
124
+        '
125
+        '業務_cb
126
+        '
127
+        Me.業務_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
128
+        Me.業務_cb.FormattingEnabled = True
129
+        Me.業務_cb.Items.AddRange(New Object() {"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "B", "Y"})
130
+        Me.業務_cb.Location = New System.Drawing.Point(5, 21)
131
+        Me.業務_cb.Name = "業務_cb"
132
+        Me.業務_cb.Size = New System.Drawing.Size(81, 24)
133
+        Me.業務_cb.TabIndex = 1256
134
+        '
135
+        '採購金額_tb
136
+        '
137
+        Me.採購金額_tb.ForeColor = System.Drawing.Color.Blue
138
+        Me.採購金額_tb.Location = New System.Drawing.Point(362, 62)
139
+        Me.採購金額_tb.Name = "採購金額_tb"
140
+        Me.採購金額_tb.Size = New System.Drawing.Size(130, 23)
141
+        Me.採購金額_tb.TabIndex = 1305
142
+        Me.採購金額_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
143
+        '
144
+        'Label16
145
+        '
146
+        Me.Label16.AutoSize = True
147
+        Me.Label16.ForeColor = System.Drawing.Color.Blue
148
+        Me.Label16.Location = New System.Drawing.Point(306, 65)
149
+        Me.Label16.Name = "Label16"
150
+        Me.Label16.Size = New System.Drawing.Size(56, 16)
151
+        Me.Label16.TabIndex = 1304
152
+        Me.Label16.Text = "採購金額"
153
+        '
154
+        '小間距_ch
155
+        '
156
+        Me.小間距_ch.AutoSize = True
157
+        Me.小間距_ch.Location = New System.Drawing.Point(92, 64)
158
+        Me.小間距_ch.Name = "小間距_ch"
159
+        Me.小間距_ch.Size = New System.Drawing.Size(63, 20)
160
+        Me.小間距_ch.TabIndex = 1303
161
+        Me.小間距_ch.Text = "小間距"
162
+        Me.小間距_ch.UseVisualStyleBackColor = True
163
+        '
164
+        '清空1_bt
165
+        '
166
+        Me.清空1_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
167
+        Me.清空1_bt.ImeMode = System.Windows.Forms.ImeMode.NoControl
168
+        Me.清空1_bt.Location = New System.Drawing.Point(445, 2)
169
+        Me.清空1_bt.Name = "清空1_bt"
170
+        Me.清空1_bt.Size = New System.Drawing.Size(90, 52)
171
+        Me.清空1_bt.TabIndex = 1301
172
+        Me.清空1_bt.Text = "清除查詢條件"
173
+        Me.清空1_bt.UseVisualStyleBackColor = True
174
+        '
175
+        '供應商編碼1_tb
176
+        '
177
+        Me.供應商編碼1_tb.Location = New System.Drawing.Point(827, 239)
178
+        Me.供應商編碼1_tb.Name = "供應商編碼1_tb"
179
+        Me.供應商編碼1_tb.Size = New System.Drawing.Size(122, 23)
180
+        Me.供應商編碼1_tb.TabIndex = 1300
181
+        Me.供應商編碼1_tb.Visible = False
182
+        '
183
+        '查詢1_tb
184
+        '
185
+        Me.查詢1_tb.Location = New System.Drawing.Point(263, 3)
186
+        Me.查詢1_tb.Name = "查詢1_tb"
187
+        Me.查詢1_tb.Size = New System.Drawing.Size(134, 23)
188
+        Me.查詢1_tb.TabIndex = 1298
189
+        '
190
+        '地區1_cb
191
+        '
192
+        Me.地區1_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
193
+        Me.地區1_cb.FormattingEnabled = True
194
+        Me.地區1_cb.Items.AddRange(New Object() {"", "北部", "南部", "材料", "調貨"})
195
+        Me.地區1_cb.Location = New System.Drawing.Point(144, 2)
196
+        Me.地區1_cb.Name = "地區1_cb"
197
+        Me.地區1_cb.Size = New System.Drawing.Size(76, 24)
198
+        Me.地區1_cb.TabIndex = 1297
199
+        '
200
+        'Label14
201
+        '
202
+        Me.Label14.AutoSize = True
203
+        Me.Label14.ForeColor = System.Drawing.Color.Red
204
+        Me.Label14.Location = New System.Drawing.Point(89, 7)
205
+        Me.Label14.Name = "Label14"
206
+        Me.Label14.Size = New System.Drawing.Size(32, 16)
207
+        Me.Label14.TabIndex = 1296
208
+        Me.Label14.Text = "地區"
209
+        '
210
+        '供應商1_cb
211
+        '
212
+        Me.供應商1_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
213
+        Me.供應商1_cb.FormattingEnabled = True
214
+        Me.供應商1_cb.Location = New System.Drawing.Point(263, 29)
215
+        Me.供應商1_cb.Name = "供應商1_cb"
216
+        Me.供應商1_cb.Size = New System.Drawing.Size(134, 24)
217
+        Me.供應商1_cb.TabIndex = 1295
218
+        '
219
+        'Label13
220
+        '
221
+        Me.Label13.AutoSize = True
222
+        Me.Label13.ForeColor = System.Drawing.Color.Red
223
+        Me.Label13.Location = New System.Drawing.Point(222, 33)
224
+        Me.Label13.Name = "Label13"
225
+        Me.Label13.Size = New System.Drawing.Size(44, 16)
226
+        Me.Label13.TabIndex = 1294
227
+        Me.Label13.Text = "供應商"
228
+        '
229
+        '供應商編碼1_cb
230
+        '
231
+        Me.供應商編碼1_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
232
+        Me.供應商編碼1_cb.FormattingEnabled = True
233
+        Me.供應商編碼1_cb.Location = New System.Drawing.Point(144, 29)
234
+        Me.供應商編碼1_cb.Name = "供應商編碼1_cb"
235
+        Me.供應商編碼1_cb.Size = New System.Drawing.Size(76, 24)
236
+        Me.供應商編碼1_cb.TabIndex = 1293
237
+        '
238
+        'Label1
239
+        '
240
+        Me.Label1.AutoSize = True
241
+        Me.Label1.ForeColor = System.Drawing.Color.Red
242
+        Me.Label1.Location = New System.Drawing.Point(89, 33)
243
+        Me.Label1.Name = "Label1"
244
+        Me.Label1.Size = New System.Drawing.Size(56, 16)
245
+        Me.Label1.TabIndex = 1292
246
+        Me.Label1.Text = "廠商編碼"
247
+        '
248
+        '存檔_bt
249
+        '
250
+        Me.存檔_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
251
+        Me.存檔_bt.ForeColor = System.Drawing.Color.Green
252
+        Me.存檔_bt.Location = New System.Drawing.Point(557, 2)
253
+        Me.存檔_bt.Name = "存檔_bt"
254
+        Me.存檔_bt.Size = New System.Drawing.Size(90, 52)
255
+        Me.存檔_bt.TabIndex = 1285
256
+        Me.存檔_bt.Text = "存檔"
257
+        Me.存檔_bt.UseVisualStyleBackColor = True
258
+        '
259
+        '刪除單據上點選的資料_bt
260
+        '
261
+        Me.刪除單據上點選的資料_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
262
+        Me.刪除單據上點選的資料_bt.ForeColor = System.Drawing.Color.Red
263
+        Me.刪除單據上點選的資料_bt.Location = New System.Drawing.Point(857, 3)
264
+        Me.刪除單據上點選的資料_bt.Name = "刪除單據上點選的資料_bt"
265
+        Me.刪除單據上點選的資料_bt.Size = New System.Drawing.Size(102, 50)
266
+        Me.刪除單據上點選的資料_bt.TabIndex = 1286
267
+        Me.刪除單據上點選的資料_bt.Text = "刪除採購單據上點選的資料"
268
+        Me.刪除單據上點選的資料_bt.UseVisualStyleBackColor = True
269
+        '
270
+        'Label9
271
+        '
272
+        Me.Label9.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
273
+        Me.Label9.AutoSize = True
274
+        Me.Label9.ImeMode = System.Windows.Forms.ImeMode.NoControl
275
+        Me.Label9.Location = New System.Drawing.Point(1075, 65)
276
+        Me.Label9.Name = "Label9"
277
+        Me.Label9.Size = New System.Drawing.Size(44, 16)
278
+        Me.Label9.TabIndex = 1289
279
+        Me.Label9.Text = "筆資料"
280
+        '
281
+        '資料筆數1_tb
282
+        '
283
+        Me.資料筆數1_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
284
+        Me.資料筆數1_tb.Location = New System.Drawing.Point(1033, 62)
285
+        Me.資料筆數1_tb.Name = "資料筆數1_tb"
286
+        Me.資料筆數1_tb.Size = New System.Drawing.Size(39, 23)
287
+        Me.資料筆數1_tb.TabIndex = 1288
288
+        Me.資料筆數1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
289
+        '
290
+        'Label10
291
+        '
292
+        Me.Label10.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
293
+        Me.Label10.AutoSize = True
294
+        Me.Label10.ImeMode = System.Windows.Forms.ImeMode.NoControl
295
+        Me.Label10.Location = New System.Drawing.Point(1011, 65)
296
+        Me.Label10.Name = "Label10"
297
+        Me.Label10.Size = New System.Drawing.Size(20, 16)
298
+        Me.Label10.TabIndex = 1287
299
+        Me.Label10.Text = "共"
300
+        '
301
+        '項次_tb
302
+        '
303
+        Me.項次_tb.Enabled = False
304
+        Me.項次_tb.Location = New System.Drawing.Point(721, 3)
305
+        Me.項次_tb.Name = "項次_tb"
306
+        Me.項次_tb.Size = New System.Drawing.Size(130, 23)
307
+        Me.項次_tb.TabIndex = 1284
308
+        '
309
+        '選擇_lb
310
+        '
311
+        Me.選擇_lb.AutoSize = True
312
+        Me.選擇_lb.Location = New System.Drawing.Point(653, 6)
313
+        Me.選擇_lb.Name = "選擇_lb"
314
+        Me.選擇_lb.Size = New System.Drawing.Size(68, 16)
315
+        Me.選擇_lb.TabIndex = 1283
316
+        Me.選擇_lb.Text = "資料流水號"
317
+        '
318
+        '採購清單_dgv
319
+        '
320
+        Me.採購清單_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
321
+            Or System.Windows.Forms.AnchorStyles.Left) _
322
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
323
+        Me.採購清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
324
+        Me.採購清單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
325
+        Me.採購清單_dgv.Location = New System.Drawing.Point(89, 90)
326
+        Me.採購清單_dgv.Name = "採購清單_dgv"
327
+        Me.採購清單_dgv.RowHeadersWidth = 5
328
+        DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
329
+        DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
330
+        Me.採購清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle10
331
+        Me.採購清單_dgv.RowTemplate.Height = 24
332
+        Me.採購清單_dgv.Size = New System.Drawing.Size(1030, 585)
333
+        Me.採購清單_dgv.TabIndex = 1235
334
+        '
335
+        'Label15
336
+        '
337
+        Me.Label15.AutoSize = True
338
+        Me.Label15.ImeMode = System.Windows.Forms.ImeMode.NoControl
339
+        Me.Label15.Location = New System.Drawing.Point(222, 6)
340
+        Me.Label15.Name = "Label15"
341
+        Me.Label15.Size = New System.Drawing.Size(44, 16)
342
+        Me.Label15.TabIndex = 1299
343
+        Me.Label15.Text = "關鍵字"
344
+        '
345
+        'Label17
346
+        '
347
+        Me.Label17.AutoSize = True
348
+        Me.Label17.Location = New System.Drawing.Point(87, 49)
349
+        Me.Label17.Name = "Label17"
350
+        Me.Label17.Size = New System.Drawing.Size(1513, 16)
351
+        Me.Label17.TabIndex = 1302
352
+        Me.Label17.Text = resources.GetString("Label17.Text")
353
+        '
354
+        'Label2
355
+        '
356
+        Me.Label2.AutoSize = True
357
+        Me.Label2.Location = New System.Drawing.Point(2, 3)
358
+        Me.Label2.Name = "Label2"
359
+        Me.Label2.Size = New System.Drawing.Size(80, 16)
360
+        Me.Label2.TabIndex = 1306
361
+        Me.Label2.Text = "未轉換銷售單"
362
+        '
363
+        '銷售單顯示_ch
364
+        '
365
+        Me.銷售單顯示_ch.AutoSize = True
366
+        Me.銷售單顯示_ch.Location = New System.Drawing.Point(5, 68)
367
+        Me.銷售單顯示_ch.Name = "銷售單顯示_ch"
368
+        Me.銷售單顯示_ch.Size = New System.Drawing.Size(87, 20)
369
+        Me.銷售單顯示_ch.TabIndex = 1307
370
+        Me.銷售單顯示_ch.Text = "銷售單顯示"
371
+        Me.銷售單顯示_ch.UseVisualStyleBackColor = True
372
+        '
373
+        '銷售明細_dgv
374
+        '
375
+        DataGridViewCellStyle11.BackColor = System.Drawing.Color.White
376
+        Me.銷售明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
377
+        Me.銷售明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
378
+            Or System.Windows.Forms.AnchorStyles.Left) _
379
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
380
+        Me.銷售明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
381
+        Me.銷售明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
382
+        Me.銷售明細_dgv.Location = New System.Drawing.Point(88, 2)
383
+        Me.銷售明細_dgv.Name = "銷售明細_dgv"
384
+        Me.銷售明細_dgv.RowHeadersWidth = 5
385
+        DataGridViewCellStyle12.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
386
+        DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
387
+        Me.銷售明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle12
388
+        Me.銷售明細_dgv.RowTemplate.Height = 24
389
+        Me.銷售明細_dgv.Size = New System.Drawing.Size(1031, 673)
390
+        Me.銷售明細_dgv.TabIndex = 1308
391
+        '
392
+        '單號_tb
393
+        '
394
+        Me.單號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
395
+        Me.單號_tb.Enabled = False
396
+        Me.單號_tb.Location = New System.Drawing.Point(987, 123)
397
+        Me.單號_tb.Name = "單號_tb"
398
+        Me.單號_tb.Size = New System.Drawing.Size(122, 23)
399
+        Me.單號_tb.TabIndex = 1309
400
+        Me.單號_tb.Visible = False
401
+        '
402
+        '窄間距1_ch
403
+        '
404
+        Me.窄間距1_ch.AutoSize = True
405
+        Me.窄間距1_ch.Location = New System.Drawing.Point(5, 48)
406
+        Me.窄間距1_ch.Name = "窄間距1_ch"
407
+        Me.窄間距1_ch.Size = New System.Drawing.Size(63, 20)
408
+        Me.窄間距1_ch.TabIndex = 1310
409
+        Me.窄間距1_ch.Text = "窄間距"
410
+        Me.窄間距1_ch.UseVisualStyleBackColor = True
411
+        '
412
+        '轉採購_bt
413
+        '
414
+        Me.轉採購_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
415
+        Me.轉採購_bt.ForeColor = System.Drawing.Color.Green
416
+        Me.轉採購_bt.Location = New System.Drawing.Point(5, 90)
417
+        Me.轉採購_bt.Name = "轉採購_bt"
418
+        Me.轉採購_bt.Size = New System.Drawing.Size(81, 31)
419
+        Me.轉採購_bt.TabIndex = 1311
420
+        Me.轉採購_bt.Text = "轉採購"
421
+        Me.轉採購_bt.UseVisualStyleBackColor = True
422
+        '
423
+        'Label3
424
+        '
425
+        Me.Label3.AutoSize = True
426
+        Me.Label3.Location = New System.Drawing.Point(403, 7)
427
+        Me.Label3.Name = "Label3"
428
+        Me.Label3.Size = New System.Drawing.Size(32, 16)
429
+        Me.Label3.TabIndex = 1313
430
+        Me.Label3.Text = "業務"
431
+        '
432
+        '業務1_cb
433
+        '
434
+        Me.業務1_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
435
+        Me.業務1_cb.FormattingEnabled = True
436
+        Me.業務1_cb.Items.AddRange(New Object() {"", "1", "2", "3", "4", "5", "6", "7", "8", "9", "B", "Y"})
437
+        Me.業務1_cb.Location = New System.Drawing.Point(400, 29)
438
+        Me.業務1_cb.Name = "業務1_cb"
439
+        Me.業務1_cb.Size = New System.Drawing.Size(42, 24)
440
+        Me.業務1_cb.TabIndex = 1312
441
+        '
442
+        '日期2_dtp
443
+        '
444
+        Me.日期2_dtp.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
445
+        Me.日期2_dtp.Enabled = False
446
+        Me.日期2_dtp.Location = New System.Drawing.Point(987, 181)
447
+        Me.日期2_dtp.Name = "日期2_dtp"
448
+        Me.日期2_dtp.Size = New System.Drawing.Size(122, 23)
449
+        Me.日期2_dtp.TabIndex = 1315
450
+        Me.日期2_dtp.Visible = False
451
+        '
452
+        '日期1_dtp
453
+        '
454
+        Me.日期1_dtp.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
455
+        Me.日期1_dtp.Enabled = False
456
+        Me.日期1_dtp.Location = New System.Drawing.Point(987, 152)
457
+        Me.日期1_dtp.Name = "日期1_dtp"
458
+        Me.日期1_dtp.Size = New System.Drawing.Size(122, 23)
459
+        Me.日期1_dtp.TabIndex = 1314
460
+        Me.日期1_dtp.Visible = False
461
+        '
462
+        '申請人_tb
463
+        '
464
+        Me.申請人_tb.Enabled = False
465
+        Me.申請人_tb.Location = New System.Drawing.Point(721, 29)
466
+        Me.申請人_tb.Name = "申請人_tb"
467
+        Me.申請人_tb.Size = New System.Drawing.Size(130, 23)
468
+        Me.申請人_tb.TabIndex = 1323
469
+        '
470
+        'Label19
471
+        '
472
+        Me.Label19.AutoSize = True
473
+        Me.Label19.Location = New System.Drawing.Point(671, 32)
474
+        Me.Label19.Name = "Label19"
475
+        Me.Label19.Size = New System.Drawing.Size(44, 16)
476
+        Me.Label19.TabIndex = 1322
477
+        Me.Label19.Text = "申請人"
478
+        '
479
+        '大間距_ch
480
+        '
481
+        Me.大間距_ch.AutoSize = True
482
+        Me.大間距_ch.Location = New System.Drawing.Point(230, 64)
483
+        Me.大間距_ch.Name = "大間距_ch"
484
+        Me.大間距_ch.Size = New System.Drawing.Size(63, 20)
485
+        Me.大間距_ch.TabIndex = 1328
486
+        Me.大間距_ch.Text = "大間距"
487
+        Me.大間距_ch.UseVisualStyleBackColor = True
488
+        '
489
+        '中間距_ch
490
+        '
491
+        Me.中間距_ch.AutoSize = True
492
+        Me.中間距_ch.Location = New System.Drawing.Point(161, 64)
493
+        Me.中間距_ch.Name = "中間距_ch"
494
+        Me.中間距_ch.Size = New System.Drawing.Size(63, 20)
495
+        Me.中間距_ch.TabIndex = 1327
496
+        Me.中間距_ch.Text = "中間距"
497
+        Me.中間距_ch.UseVisualStyleBackColor = True
498
+        '
499
+        '檔名讀取_tb
500
+        '
501
+        Me.檔名讀取_tb.AllowDrop = True
502
+        Me.檔名讀取_tb.ForeColor = System.Drawing.Color.Black
503
+        Me.檔名讀取_tb.Location = New System.Drawing.Point(827, 210)
504
+        Me.檔名讀取_tb.Multiline = True
505
+        Me.檔名讀取_tb.Name = "檔名讀取_tb"
506
+        Me.檔名讀取_tb.Size = New System.Drawing.Size(122, 23)
507
+        Me.檔名讀取_tb.TabIndex = 1337
508
+        Me.檔名讀取_tb.Visible = False
509
+        '
510
+        '檔案名稱_tb
511
+        '
512
+        Me.檔案名稱_tb.AllowDrop = True
513
+        Me.檔案名稱_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
514
+        Me.檔案名稱_tb.ForeColor = System.Drawing.Color.Black
515
+        Me.檔案名稱_tb.Location = New System.Drawing.Point(1267, 480)
516
+        Me.檔案名稱_tb.Name = "檔案名稱_tb"
517
+        Me.檔案名稱_tb.Size = New System.Drawing.Size(231, 23)
518
+        Me.檔案名稱_tb.TabIndex = 1335
519
+        '
520
+        'Label12
521
+        '
522
+        Me.Label12.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
523
+        Me.Label12.AutoSize = True
524
+        Me.Label12.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
525
+        Me.Label12.Location = New System.Drawing.Point(1215, 506)
526
+        Me.Label12.Name = "Label12"
527
+        Me.Label12.Size = New System.Drawing.Size(108, 17)
528
+        Me.Label12.TabIndex = 1333
529
+        Me.Label12.Text = "伺服器FTP文件夾"
530
+        '
531
+        'Label4
532
+        '
533
+        Me.Label4.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
534
+        Me.Label4.AutoSize = True
535
+        Me.Label4.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
536
+        Me.Label4.Location = New System.Drawing.Point(1217, 298)
537
+        Me.Label4.Name = "Label4"
538
+        Me.Label4.Size = New System.Drawing.Size(56, 16)
539
+        Me.Label4.TabIndex = 1332
540
+        Me.Label4.Text = "我的電腦"
541
+        '
542
+        '讀取資料夾路徑_bt
543
+        '
544
+        Me.讀取資料夾路徑_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
545
+        Me.讀取資料夾路徑_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
546
+        Me.讀取資料夾路徑_bt.ForeColor = System.Drawing.Color.Blue
547
+        Me.讀取資料夾路徑_bt.Location = New System.Drawing.Point(1122, 269)
548
+        Me.讀取資料夾路徑_bt.Name = "讀取資料夾路徑_bt"
549
+        Me.讀取資料夾路徑_bt.Size = New System.Drawing.Size(89, 24)
550
+        Me.讀取資料夾路徑_bt.TabIndex = 1331
551
+        Me.讀取資料夾路徑_bt.Text = "讀取料夾路徑"
552
+        Me.讀取資料夾路徑_bt.UseVisualStyleBackColor = True
553
+        '
554
+        '本機資料夾_wb
555
+        '
556
+        Me.本機資料夾_wb.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
557
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
558
+        Me.本機資料夾_wb.Location = New System.Drawing.Point(1216, 354)
559
+        Me.本機資料夾_wb.MinimumSize = New System.Drawing.Size(20, 20)
560
+        Me.本機資料夾_wb.Name = "本機資料夾_wb"
561
+        Me.本機資料夾_wb.Size = New System.Drawing.Size(287, 122)
562
+        Me.本機資料夾_wb.TabIndex = 1330
563
+        Me.本機資料夾_wb.Url = New System.Uri("", System.UriKind.Relative)
564
+        '
565
+        'FTP資料夾_wb
566
+        '
567
+        Me.FTP資料夾_wb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
568
+        Me.FTP資料夾_wb.Location = New System.Drawing.Point(1216, 523)
569
+        Me.FTP資料夾_wb.MinimumSize = New System.Drawing.Size(20, 20)
570
+        Me.FTP資料夾_wb.Name = "FTP資料夾_wb"
571
+        Me.FTP資料夾_wb.Size = New System.Drawing.Size(282, 152)
572
+        Me.FTP資料夾_wb.TabIndex = 1329
573
+        Me.FTP資料夾_wb.Url = New System.Uri("", System.UriKind.Relative)
574
+        '
575
+        'Label11
576
+        '
577
+        Me.Label11.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
578
+        Me.Label11.AutoSize = True
579
+        Me.Label11.ForeColor = System.Drawing.Color.Red
580
+        Me.Label11.Location = New System.Drawing.Point(1224, 319)
581
+        Me.Label11.Name = "Label11"
582
+        Me.Label11.Size = New System.Drawing.Size(244, 32)
583
+        Me.Label11.TabIndex = 1334
584
+        Me.Label11.Text = "如檔案無法拖曳至伺服器FTP文件夾,請修改" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "檔案名稱不要帶有中文字或是符號"
585
+        '
586
+        'Label5
587
+        '
588
+        Me.Label5.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
589
+        Me.Label5.AutoSize = True
590
+        Me.Label5.Location = New System.Drawing.Point(1213, 483)
591
+        Me.Label5.Name = "Label5"
592
+        Me.Label5.Size = New System.Drawing.Size(56, 16)
593
+        Me.Label5.TabIndex = 1336
594
+        Me.Label5.Text = "檔案名稱"
595
+        '
596
+        '下載圖檔_bt
597
+        '
598
+        Me.下載圖檔_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
599
+        Me.下載圖檔_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
600
+        Me.下載圖檔_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
601
+        Me.下載圖檔_bt.Location = New System.Drawing.Point(1386, 269)
602
+        Me.下載圖檔_bt.Name = "下載圖檔_bt"
603
+        Me.下載圖檔_bt.Size = New System.Drawing.Size(94, 24)
604
+        Me.下載圖檔_bt.TabIndex = 1339
605
+        Me.下載圖檔_bt.Text = "下載圖片"
606
+        Me.下載圖檔_bt.UseVisualStyleBackColor = True
607
+        '
608
+        '圖檔入系統_bt
609
+        '
610
+        Me.圖檔入系統_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
611
+        Me.圖檔入系統_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
612
+        Me.圖檔入系統_bt.ForeColor = System.Drawing.Color.Green
613
+        Me.圖檔入系統_bt.Location = New System.Drawing.Point(1212, 269)
614
+        Me.圖檔入系統_bt.Name = "圖檔入系統_bt"
615
+        Me.圖檔入系統_bt.Size = New System.Drawing.Size(173, 24)
616
+        Me.圖檔入系統_bt.TabIndex = 1338
617
+        Me.圖檔入系統_bt.Text = "圖檔入系統 或 圖片修改存檔"
618
+        Me.圖檔入系統_bt.UseVisualStyleBackColor = True
619
+        '
620
+        '訂製圖檔_dgv
621
+        '
622
+        DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
623
+        Me.訂製圖檔_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13
624
+        Me.訂製圖檔_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
625
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
626
+        Me.訂製圖檔_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
627
+        Me.訂製圖檔_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
628
+        Me.訂製圖檔_dgv.Location = New System.Drawing.Point(1121, 321)
629
+        Me.訂製圖檔_dgv.Name = "訂製圖檔_dgv"
630
+        Me.訂製圖檔_dgv.RowHeadersWidth = 5
631
+        DataGridViewCellStyle14.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
632
+        DataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
633
+        Me.訂製圖檔_dgv.RowsDefaultCellStyle = DataGridViewCellStyle14
634
+        Me.訂製圖檔_dgv.RowTemplate.Height = 24
635
+        Me.訂製圖檔_dgv.Size = New System.Drawing.Size(90, 354)
636
+        Me.訂製圖檔_dgv.TabIndex = 1340
637
+        '
638
+        '版次_tb
639
+        '
640
+        Me.版次_tb.Location = New System.Drawing.Point(827, 268)
641
+        Me.版次_tb.Name = "版次_tb"
642
+        Me.版次_tb.Size = New System.Drawing.Size(122, 23)
643
+        Me.版次_tb.TabIndex = 1341
644
+        Me.版次_tb.Visible = False
645
+        '
646
+        '大圖預覽_bt
647
+        '
648
+        Me.大圖預覽_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
649
+        Me.大圖預覽_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
650
+        Me.大圖預覽_bt.ForeColor = System.Drawing.Color.Blue
651
+        Me.大圖預覽_bt.Location = New System.Drawing.Point(1122, 295)
652
+        Me.大圖預覽_bt.Name = "大圖預覽_bt"
653
+        Me.大圖預覽_bt.Size = New System.Drawing.Size(89, 24)
654
+        Me.大圖預覽_bt.TabIndex = 1342
655
+        Me.大圖預覽_bt.Text = "大圖預覽"
656
+        Me.大圖預覽_bt.UseVisualStyleBackColor = True
657
+        '
658
+        '單號1_tb
659
+        '
660
+        Me.單號1_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
661
+        Me.單號1_tb.Enabled = False
662
+        Me.單號1_tb.Location = New System.Drawing.Point(987, 296)
663
+        Me.單號1_tb.Name = "單號1_tb"
664
+        Me.單號1_tb.Size = New System.Drawing.Size(122, 23)
665
+        Me.單號1_tb.TabIndex = 1343
666
+        Me.單號1_tb.Visible = False
667
+        '
668
+        'SaveFileDialog1
669
+        '
670
+        Me.SaveFileDialog1.DefaultExt = "jpg"
671
+        Me.SaveFileDialog1.SupportMultiDottedExtensions = True
672
+        Me.SaveFileDialog1.Title = "指定檔案名稱與選擇檔案路徑"
673
+        '
674
+        '料號_tb
675
+        '
676
+        Me.料號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
677
+        Me.料號_tb.Enabled = False
678
+        Me.料號_tb.Location = New System.Drawing.Point(987, 325)
679
+        Me.料號_tb.Name = "料號_tb"
680
+        Me.料號_tb.Size = New System.Drawing.Size(122, 23)
681
+        Me.料號_tb.TabIndex = 1344
682
+        Me.料號_tb.Visible = False
683
+        '
684
+        '下載檔名_tb
685
+        '
686
+        Me.下載檔名_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
687
+        Me.下載檔名_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
688
+        Me.下載檔名_tb.Location = New System.Drawing.Point(827, 354)
689
+        Me.下載檔名_tb.Name = "下載檔名_tb"
690
+        Me.下載檔名_tb.Size = New System.Drawing.Size(122, 23)
691
+        Me.下載檔名_tb.TabIndex = 1345
692
+        Me.下載檔名_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
693
+        Me.下載檔名_tb.Visible = False
694
+        '
695
+        '物料圖1_pb
696
+        '
697
+        Me.物料圖1_pb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
698
+        Me.物料圖1_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
699
+        Me.物料圖1_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
700
+        Me.物料圖1_pb.Location = New System.Drawing.Point(1125, 4)
701
+        Me.物料圖1_pb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
702
+        Me.物料圖1_pb.Name = "物料圖1_pb"
703
+        Me.物料圖1_pb.Size = New System.Drawing.Size(373, 262)
704
+        Me.物料圖1_pb.TabIndex = 1290
705
+        Me.物料圖1_pb.TabStop = False
706
+        '
707
+        '採購金額1_tb
708
+        '
709
+        Me.採購金額1_tb.ForeColor = System.Drawing.Color.Green
710
+        Me.採購金額1_tb.Location = New System.Drawing.Point(703, 62)
711
+        Me.採購金額1_tb.Name = "採購金額1_tb"
712
+        Me.採購金額1_tb.Size = New System.Drawing.Size(117, 23)
713
+        Me.採購金額1_tb.TabIndex = 1458
714
+        Me.採購金額1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
715
+        '
716
+        'Label6
717
+        '
718
+        Me.Label6.AutoSize = True
719
+        Me.Label6.ForeColor = System.Drawing.Color.Green
720
+        Me.Label6.Location = New System.Drawing.Point(636, 65)
721
+        Me.Label6.Name = "Label6"
722
+        Me.Label6.Size = New System.Drawing.Size(56, 16)
723
+        Me.Label6.TabIndex = 1457
724
+        Me.Label6.Text = "採購金額"
725
+        '
726
+        '供應商_tb
727
+        '
728
+        Me.供應商_tb.ForeColor = System.Drawing.Color.Green
729
+        Me.供應商_tb.Location = New System.Drawing.Point(542, 62)
730
+        Me.供應商_tb.Name = "供應商_tb"
731
+        Me.供應商_tb.Size = New System.Drawing.Size(88, 23)
732
+        Me.供應商_tb.TabIndex = 1456
733
+        Me.供應商_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
734
+        '
735
+        'Label7
736
+        '
737
+        Me.Label7.AutoSize = True
738
+        Me.Label7.ForeColor = System.Drawing.Color.Green
739
+        Me.Label7.Location = New System.Drawing.Point(498, 65)
740
+        Me.Label7.Name = "Label7"
741
+        Me.Label7.Size = New System.Drawing.Size(44, 16)
742
+        Me.Label7.TabIndex = 1455
743
+        Me.Label7.Text = "供應商"
744
+        '
745
+        '採購日期_tb
746
+        '
747
+        Me.採購日期_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
748
+        Me.採購日期_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
749
+        Me.採購日期_tb.Location = New System.Drawing.Point(827, 383)
750
+        Me.採購日期_tb.Name = "採購日期_tb"
751
+        Me.採購日期_tb.Size = New System.Drawing.Size(122, 23)
752
+        Me.採購日期_tb.TabIndex = 1459
753
+        Me.採購日期_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
754
+        Me.採購日期_tb.Visible = False
755
+        '
756
+        '交貨日期_tb
757
+        '
758
+        Me.交貨日期_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
759
+        Me.交貨日期_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
760
+        Me.交貨日期_tb.Location = New System.Drawing.Point(827, 412)
761
+        Me.交貨日期_tb.Name = "交貨日期_tb"
762
+        Me.交貨日期_tb.Size = New System.Drawing.Size(122, 23)
763
+        Me.交貨日期_tb.TabIndex = 1460
764
+        Me.交貨日期_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
765
+        Me.交貨日期_tb.Visible = False
766
+        '
767
+        '字體大小調整_lb
768
+        '
769
+        Me.字體大小調整_lb.AutoSize = True
770
+        Me.字體大小調整_lb.Font = New System.Drawing.Font("微軟正黑體", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
771
+        Me.字體大小調整_lb.ForeColor = System.Drawing.Color.DarkRed
772
+        Me.字體大小調整_lb.ImeMode = System.Windows.Forms.ImeMode.NoControl
773
+        Me.字體大小調整_lb.Location = New System.Drawing.Point(979, 32)
774
+        Me.字體大小調整_lb.Name = "字體大小調整_lb"
775
+        Me.字體大小調整_lb.Size = New System.Drawing.Size(69, 19)
776
+        Me.字體大小調整_lb.TabIndex = 1462
777
+        Me.字體大小調整_lb.Text = "字體調整"
778
+        '
779
+        '字體_NUD
780
+        '
781
+        Me.字體_NUD.Location = New System.Drawing.Point(1050, 31)
782
+        Me.字體_NUD.Maximum = New Decimal(New Integer() {14, 0, 0, 0})
783
+        Me.字體_NUD.Minimum = New Decimal(New Integer() {9, 0, 0, 0})
784
+        Me.字體_NUD.Name = "字體_NUD"
785
+        Me.字體_NUD.Size = New System.Drawing.Size(65, 23)
786
+        Me.字體_NUD.TabIndex = 1461
787
+        Me.字體_NUD.Value = New Decimal(New Integer() {9, 0, 0, 0})
788
+        '
789
+        '依銷售申請採購單
790
+        '
791
+        Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
792
+        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
793
+        Me.ClientSize = New System.Drawing.Size(1504, 681)
794
+        Me.Controls.Add(Me.字體大小調整_lb)
795
+        Me.Controls.Add(Me.字體_NUD)
796
+        Me.Controls.Add(Me.交貨日期_tb)
797
+        Me.Controls.Add(Me.採購日期_tb)
798
+        Me.Controls.Add(Me.採購金額1_tb)
799
+        Me.Controls.Add(Me.Label6)
800
+        Me.Controls.Add(Me.供應商_tb)
801
+        Me.Controls.Add(Me.Label7)
802
+        Me.Controls.Add(Me.下載檔名_tb)
803
+        Me.Controls.Add(Me.料號_tb)
804
+        Me.Controls.Add(Me.單號1_tb)
805
+        Me.Controls.Add(Me.大圖預覽_bt)
806
+        Me.Controls.Add(Me.版次_tb)
807
+        Me.Controls.Add(Me.訂製圖檔_dgv)
808
+        Me.Controls.Add(Me.下載圖檔_bt)
809
+        Me.Controls.Add(Me.圖檔入系統_bt)
810
+        Me.Controls.Add(Me.檔名讀取_tb)
811
+        Me.Controls.Add(Me.檔案名稱_tb)
812
+        Me.Controls.Add(Me.Label12)
813
+        Me.Controls.Add(Me.Label4)
814
+        Me.Controls.Add(Me.讀取資料夾路徑_bt)
815
+        Me.Controls.Add(Me.本機資料夾_wb)
816
+        Me.Controls.Add(Me.FTP資料夾_wb)
817
+        Me.Controls.Add(Me.Label11)
818
+        Me.Controls.Add(Me.Label5)
819
+        Me.Controls.Add(Me.大間距_ch)
820
+        Me.Controls.Add(Me.中間距_ch)
821
+        Me.Controls.Add(Me.申請人_tb)
822
+        Me.Controls.Add(Me.Label19)
823
+        Me.Controls.Add(Me.日期2_dtp)
824
+        Me.Controls.Add(Me.日期1_dtp)
825
+        Me.Controls.Add(Me.Label3)
826
+        Me.Controls.Add(Me.業務1_cb)
827
+        Me.Controls.Add(Me.轉採購_bt)
828
+        Me.Controls.Add(Me.窄間距1_ch)
829
+        Me.Controls.Add(Me.單號_tb)
830
+        Me.Controls.Add(Me.Label2)
831
+        Me.Controls.Add(Me.採購金額_tb)
832
+        Me.Controls.Add(Me.Label16)
833
+        Me.Controls.Add(Me.小間距_ch)
834
+        Me.Controls.Add(Me.物料圖1_pb)
835
+        Me.Controls.Add(Me.清空1_bt)
836
+        Me.Controls.Add(Me.供應商編碼1_tb)
837
+        Me.Controls.Add(Me.查詢1_tb)
838
+        Me.Controls.Add(Me.地區1_cb)
839
+        Me.Controls.Add(Me.Label14)
840
+        Me.Controls.Add(Me.供應商1_cb)
841
+        Me.Controls.Add(Me.Label13)
842
+        Me.Controls.Add(Me.供應商編碼1_cb)
843
+        Me.Controls.Add(Me.Label1)
844
+        Me.Controls.Add(Me.存檔_bt)
845
+        Me.Controls.Add(Me.刪除單據上點選的資料_bt)
846
+        Me.Controls.Add(Me.Label9)
847
+        Me.Controls.Add(Me.資料筆數1_tb)
848
+        Me.Controls.Add(Me.Label10)
849
+        Me.Controls.Add(Me.項次_tb)
850
+        Me.Controls.Add(Me.選擇_lb)
851
+        Me.Controls.Add(Me.Label15)
852
+        Me.Controls.Add(Me.Label17)
853
+        Me.Controls.Add(Me.業務_cb)
854
+        Me.Controls.Add(Me.銷售單據_dgv)
855
+        Me.Controls.Add(Me.銷售單顯示_ch)
856
+        Me.Controls.Add(Me.採購清單_dgv)
857
+        Me.Controls.Add(Me.銷售明細_dgv)
858
+        Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
859
+        Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
860
+        Me.Name = "依銷售申請採購單"
861
+        Me.Text = "依銷售申請採購單"
862
+        CType(Me.銷售單據_dgv, System.ComponentModel.ISupportInitialize).EndInit()
863
+        CType(Me.採購清單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
864
+        CType(Me.銷售明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
865
+        CType(Me.訂製圖檔_dgv, System.ComponentModel.ISupportInitialize).EndInit()
866
+        CType(Me.物料圖1_pb, System.ComponentModel.ISupportInitialize).EndInit()
867
+        CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).EndInit()
868
+        Me.ResumeLayout(False)
869
+        Me.PerformLayout()
870
+
871
+    End Sub
872
+    Friend WithEvents 銷售單據_dgv As DataGridView
873
+    Friend WithEvents 業務_cb As ComboBox
874
+    Friend WithEvents 採購金額_tb As TextBox
875
+    Friend WithEvents Label16 As Label
876
+    Friend WithEvents 小間距_ch As CheckBox
877
+    Friend WithEvents 物料圖1_pb As PictureBox
878
+    Friend WithEvents 清空1_bt As Button
879
+    Friend WithEvents 供應商編碼1_tb As TextBox
880
+    Friend WithEvents 查詢1_tb As TextBox
881
+    Friend WithEvents 地區1_cb As ComboBox
882
+    Friend WithEvents Label14 As Label
883
+    Friend WithEvents 供應商1_cb As ComboBox
884
+    Friend WithEvents Label13 As Label
885
+    Friend WithEvents 供應商編碼1_cb As ComboBox
886
+    Friend WithEvents Label1 As Label
887
+    Friend WithEvents 存檔_bt As Button
888
+    Friend WithEvents 刪除單據上點選的資料_bt As Button
889
+    Friend WithEvents Label9 As Label
890
+    Friend WithEvents 資料筆數1_tb As TextBox
891
+    Friend WithEvents Label10 As Label
892
+    Friend WithEvents 項次_tb As TextBox
893
+    Friend WithEvents 選擇_lb As Label
894
+    Friend WithEvents 採購清單_dgv As DataGridView
895
+    Friend WithEvents Label15 As Label
896
+    Friend WithEvents Label17 As Label
897
+    Friend WithEvents Label2 As Label
898
+    Friend WithEvents 銷售單顯示_ch As CheckBox
899
+    Friend WithEvents 銷售明細_dgv As DataGridView
900
+    Friend WithEvents 單號_tb As TextBox
901
+    Friend WithEvents 窄間距1_ch As CheckBox
902
+    Friend WithEvents 轉採購_bt As Button
903
+    Friend WithEvents Label3 As Label
904
+    Friend WithEvents 業務1_cb As ComboBox
905
+    Friend WithEvents 日期2_dtp As DateTimePicker
906
+    Friend WithEvents 日期1_dtp As DateTimePicker
907
+    Friend WithEvents 申請人_tb As TextBox
908
+    Friend WithEvents Label19 As Label
909
+    Friend WithEvents 大間距_ch As CheckBox
910
+    Friend WithEvents 中間距_ch As CheckBox
911
+    Friend WithEvents 檔名讀取_tb As TextBox
912
+    Friend WithEvents 檔案名稱_tb As TextBox
913
+    Friend WithEvents Label12 As Label
914
+    Friend WithEvents Label4 As Label
915
+    Friend WithEvents 讀取資料夾路徑_bt As Button
916
+    Friend WithEvents 本機資料夾_wb As WebBrowser
917
+    Friend WithEvents FTP資料夾_wb As WebBrowser
918
+    Friend WithEvents Label11 As Label
919
+    Friend WithEvents Label5 As Label
920
+    Friend WithEvents FolderBrowserDialog1 As FolderBrowserDialog
921
+    Friend WithEvents 下載圖檔_bt As Button
922
+    Friend WithEvents 圖檔入系統_bt As Button
923
+    Friend WithEvents 訂製圖檔_dgv As DataGridView
924
+    Friend WithEvents 版次_tb As TextBox
925
+    Friend WithEvents 大圖預覽_bt As Button
926
+    Friend WithEvents 單號1_tb As TextBox
927
+    Friend WithEvents SaveFileDialog1 As SaveFileDialog
928
+    Friend WithEvents 料號_tb As TextBox
929
+    Friend WithEvents 下載檔名_tb As TextBox
930
+    Friend WithEvents 採購金額1_tb As TextBox
931
+    Friend WithEvents Label6 As Label
932
+    Friend WithEvents 供應商_tb As TextBox
933
+    Friend WithEvents Label7 As Label
934
+    Friend WithEvents 採購日期_tb As TextBox
935
+    Friend WithEvents 交貨日期_tb As TextBox
936
+    Friend WithEvents 字體大小調整_lb As Label
937
+    Friend WithEvents 字體_NUD As NumericUpDown
938
+End Class

+ 132
- 0
YD-ERP-SYS/採購系統管理/依銷售申請採購單.resx Переглянути файл

@@ -0,0 +1,132 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+  <!-- 
4
+    Microsoft ResX Schema 
5
+    
6
+    Version 2.0
7
+    
8
+    The primary goals of this format is to allow a simple XML format 
9
+    that is mostly human readable. The generation and parsing of the 
10
+    various data types are done through the TypeConverter classes 
11
+    associated with the data types.
12
+    
13
+    Example:
14
+    
15
+    ... ado.net/XML headers & schema ...
16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+    <resheader name="version">2.0</resheader>
18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+    </data>
25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+        <comment>This is a comment</comment>
28
+    </data>
29
+                
30
+    There are any number of "resheader" rows that contain simple 
31
+    name/value pairs.
32
+    
33
+    Each data row contains a name, and value. The row also contains a 
34
+    type or mimetype. Type corresponds to a .NET class that support 
35
+    text/value conversion through the TypeConverter architecture. 
36
+    Classes that don't support this are serialized and stored with the 
37
+    mimetype set.
38
+    
39
+    The mimetype is used for serialized objects, and tells the 
40
+    ResXResourceReader how to depersist the object. This is currently not 
41
+    extensible. For a given mimetype the value must be set accordingly:
42
+    
43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
+    that the ResXResourceWriter will generate, however the reader can 
45
+    read any of the formats listed below.
46
+    
47
+    mimetype: application/x-microsoft.net.object.binary.base64
48
+    value   : The object must be serialized with 
49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+            : and then encoded with base64 encoding.
51
+    
52
+    mimetype: application/x-microsoft.net.object.soap.base64
53
+    value   : The object must be serialized with 
54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+            : and then encoded with base64 encoding.
56
+
57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
58
+    value   : The object must be serialized into a byte array 
59
+            : using a System.ComponentModel.TypeConverter
60
+            : and then encoded with base64 encoding.
61
+    -->
62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+    <xsd:element name="root" msdata:IsDataSet="true">
65
+      <xsd:complexType>
66
+        <xsd:choice maxOccurs="unbounded">
67
+          <xsd:element name="metadata">
68
+            <xsd:complexType>
69
+              <xsd:sequence>
70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+              </xsd:sequence>
72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
73
+              <xsd:attribute name="type" type="xsd:string" />
74
+              <xsd:attribute name="mimetype" type="xsd:string" />
75
+              <xsd:attribute ref="xml:space" />
76
+            </xsd:complexType>
77
+          </xsd:element>
78
+          <xsd:element name="assembly">
79
+            <xsd:complexType>
80
+              <xsd:attribute name="alias" type="xsd:string" />
81
+              <xsd:attribute name="name" type="xsd:string" />
82
+            </xsd:complexType>
83
+          </xsd:element>
84
+          <xsd:element name="data">
85
+            <xsd:complexType>
86
+              <xsd:sequence>
87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+              </xsd:sequence>
90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+              <xsd:attribute ref="xml:space" />
94
+            </xsd:complexType>
95
+          </xsd:element>
96
+          <xsd:element name="resheader">
97
+            <xsd:complexType>
98
+              <xsd:sequence>
99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+              </xsd:sequence>
101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
102
+            </xsd:complexType>
103
+          </xsd:element>
104
+        </xsd:choice>
105
+      </xsd:complexType>
106
+    </xsd:element>
107
+  </xsd:schema>
108
+  <resheader name="resmimetype">
109
+    <value>text/microsoft-resx</value>
110
+  </resheader>
111
+  <resheader name="version">
112
+    <value>2.0</value>
113
+  </resheader>
114
+  <resheader name="reader">
115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+  </resheader>
117
+  <resheader name="writer">
118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+  </resheader>
120
+  <data name="Label17.Text" xml:space="preserve">
121
+    <value>-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</value>
122
+  </data>
123
+  <metadata name="FolderBrowserDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124
+    <value>18, 8</value>
125
+  </metadata>
126
+  <metadata name="SaveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
127
+    <value>182, 10</value>
128
+  </metadata>
129
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
130
+    <value>36</value>
131
+  </metadata>
132
+</root>

+ 556
- 0
YD-ERP-SYS/採購系統管理/依銷售申請採購單.vb Переглянути файл

@@ -0,0 +1,556 @@
1
+Option Strict Off
2
+Public Class 依銷售申請採購單
3
+    ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet : ReadOnly ds2 As New DataSet : ReadOnly ds3 As New DataSet : ReadOnly ds4 As New DataSet
4
+    Dim EDR As Integer = 0 : Dim ESTR As String : Dim 關鍵字 As Boolean
5
+    Private Sub Set_清單()
6
+        銷售單據_dgv.DataSource = Nothing : ds.Clear()
7
+        銷售單據_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
8
+        銷售單據_dgv.ColumnHeadersHeight = 25
9
+        銷售單據_dgv.AllowUserToAddRows = False
10
+        銷售單據_dgv.RowTemplate.Height = 25
11
+
12
+
13
+
14
+        PA19 = 業務_cb.Text
15
+        SQL_銷售控制表_轉採購()
16
+        da.Fill(ds) : 銷售單據_dgv.DataSource = ds.Tables(0) : conn.Close()
17
+
18
+        銷售單據_dgv.Columns(0).Visible = False : 銷售單據_dgv.Columns(1).FillWeight = 100 : 銷售單據_dgv.Columns(2).Visible = False : 銷售單據_dgv.Columns(3).Visible = False
19
+        銷售單據_dgv.Columns(4).Visible = False : 銷售單據_dgv.Columns(5).Visible = False : 銷售單據_dgv.Columns(6).Visible = False : 銷售單據_dgv.Columns(7).Visible = False
20
+        銷售單據_dgv.Columns(8).Visible = False : 銷售單據_dgv.Columns(9).Visible = False : 銷售單據_dgv.Columns(10).Visible = False
21
+    End Sub
22
+    Private Sub Set_清單1()
23
+        採購清單_dgv.DataSource = Nothing : ds1.Clear()
24
+        採購清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
25
+        採購清單_dgv.ColumnHeadersHeight = 40
26
+        採購清單_dgv.AllowUserToAddRows = False
27
+        If 小間距_ch.Checked = False And 中間距_ch.Checked = False And 大間距_ch.Checked = True Then
28
+            採購清單_dgv.RowTemplate.Height = 95
29
+        ElseIf 小間距_ch.Checked = False And 中間距_ch.Checked = True And 大間距_ch.Checked = False Then
30
+            採購清單_dgv.RowTemplate.Height = 60
31
+        ElseIf 小間距_ch.Checked = True And 中間距_ch.Checked = False And 大間距_ch.Checked = False Then
32
+            採購清單_dgv.RowTemplate.Height = 25
33
+        End If
34
+
35
+        If 關鍵字 = True Then : Else : PA = 供應商編碼1_cb.Text : End If
36
+        PA20 = 業務1_cb.Text
37
+        SQL_採購控制表_未出庫()
38
+        da.Fill(ds1) : 採購清單_dgv.DataSource = ds1.Tables(0) : conn.Close()
39
+        Set_採購清單_dgv_下拉式清單1() : Set_採購清單_dgv_下拉式清單2() : Set_採購清單_dgv_下拉式清單3()
40
+
41
+        採購清單_dgv.Columns(0).Visible = False : 採購清單_dgv.Columns(1).FillWeight = 80 : 採購清單_dgv.Columns(2).Visible = False : 採購清單_dgv.Columns(3).FillWeight = 80
42
+        採購清單_dgv.Columns(4).FillWeight = 80 : 採購清單_dgv.Columns(5).FillWeight = 200 : 採購清單_dgv.Columns(6).Visible = False : 採購清單_dgv.Columns(7).Visible = False
43
+        採購清單_dgv.Columns(8).FillWeight = 100 : 採購清單_dgv.Columns(9).Visible = False : 採購清單_dgv.Columns(10).Visible = False : 採購清單_dgv.Columns(11).FillWeight = 160
44
+        採購清單_dgv.Columns(12).Visible = False : 採購清單_dgv.Columns(13).Visible = False : 採購清單_dgv.Columns(14).FillWeight = 95 : 採購清單_dgv.Columns(15).FillWeight = 145
45
+        採購清單_dgv.Columns(16).FillWeight = 45 : 採購清單_dgv.Columns(17).FillWeight = 45 : 採購清單_dgv.Columns(18).FillWeight = 80 : 採購清單_dgv.Columns(19).FillWeight = 80
46
+        採購清單_dgv.Columns(20).FillWeight = 70 : 採購清單_dgv.Columns(21).FillWeight = 80 : 採購清單_dgv.Columns(22).FillWeight = 80 : 採購清單_dgv.Columns(23).FillWeight = 80
47
+        採購清單_dgv.Columns(24).Visible = False : 採購清單_dgv.Columns(25).Visible = False : 採購清單_dgv.Columns(26).FillWeight = 45
48
+
49
+        採購清單_dgv.Columns("數量").DefaultCellStyle.Format = "#,##0" : 採購清單_dgv.Columns("成本").DefaultCellStyle.Format = "#,##0" : 採購清單_dgv.Columns("金額").DefaultCellStyle.Format = "#,##0"
50
+        採購清單_dgv.Columns("數量").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
51
+        採購清單_dgv.Columns("數量").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
52
+        採購清單_dgv.Columns("成本").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
53
+        採購清單_dgv.Columns("成本").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
54
+        採購清單_dgv.Columns("金額").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
55
+        採購清單_dgv.Columns("金額").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
56
+
57
+        採購清單_dgv.Columns(3).ReadOnly = True : 採購清單_dgv.Columns(4).ReadOnly = True : 採購清單_dgv.Columns(5).ReadOnly = True : 採購清單_dgv.Columns(20).ReadOnly = True
58
+        採購清單_dgv.Columns(21).ReadOnly = True : 採購清單_dgv.Columns(16).ReadOnly = True : 採購清單_dgv.Columns(19).ReadOnly = True
59
+
60
+        採購清單_dgv.EditMode = DataGridViewEditMode.EditOnEnter : 資料筆數1_tb.Text = 採購清單_dgv.Rows.Count
61
+        關鍵字 = False
62
+        Set_合記計算()
63
+    End Sub
64
+    Private Sub Set_採購清單_dgv_下拉式清單1()
65
+        Dim Col As New DataGridViewComboBoxColumn With {
66
+            .FillWeight = 130,
67
+            .DataPropertyName = "倉名"
68
+        }
69
+        SQL_倉名_下拉清單()
70
+        Col.Items.Clear()
71
+        While (dr.Read()) : Col.Items.Add(dr("倉名")) : End While : conn.Close()
72
+        Col.HeaderText = "倉名" : Col.Name = "倉名"
73
+        採購清單_dgv.Columns.Insert(8, Col)
74
+    End Sub
75
+    Private Sub Set_採購清單_dgv_下拉式清單2()
76
+        Dim Col As New DataGridViewComboBoxColumn With {
77
+            .FillWeight = 130,
78
+            .DataPropertyName = "訂製"
79
+        }
80
+        SQL_訂製狀態_下拉清單()
81
+        Col.Items.Clear()
82
+        While (dr.Read()) : Col.Items.Add(dr("訂製")) : End While : conn.Close()
83
+        Col.HeaderText = "訂製" : Col.Name = "訂製"
84
+        採購清單_dgv.Columns.Insert(11, Col)
85
+    End Sub
86
+    Private Sub Set_採購清單_dgv_下拉式清單3()
87
+        Dim Col As New DataGridViewComboBoxColumn With {
88
+            .FillWeight = 130,
89
+            .DataPropertyName = "狀態"
90
+        }
91
+        SQL_倉儲狀態_下拉清單()
92
+        Col.Items.Clear()
93
+        While (dr.Read()) : Col.Items.Add(dr("狀態")) : End While : conn.Close()
94
+        Col.HeaderText = "狀態" : Col.Name = "狀態"
95
+        採購清單_dgv.Columns.Insert(14, Col)
96
+    End Sub
97
+    Private Sub Set_合記計算()
98
+        採購金額_tb.Text = "0" : 採購金額1_tb.Text = "0"
99
+        For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1
100
+            採購清單_dgv("金額", i).Value = 採購清單_dgv("數量", i).Value * 採購清單_dgv("成本", i).Value
101
+            採購金額_tb.Text = Val(採購金額_tb.Text) + 採購清單_dgv("金額", i).Value
102
+
103
+            If 供應商_tb.Text = 採購清單_dgv("供應商", i).Value.ToString Then
104
+                採購金額1_tb.Text = Val(採購金額1_tb.Text) + 採購清單_dgv("金額", i).Value
105
+            End If
106
+        Next
107
+        採購金額_tb.Text = Format(Val(採購金額_tb.Text), "#,##0") : 採購金額1_tb.Text = Format(Val(採購金額1_tb.Text), "#,##0")
108
+    End Sub
109
+    Private Sub Set_清單4()
110
+        If 銷售明細_dgv.Columns.Count.ToString > 18 Then
111
+            銷售明細_dgv.Columns.Remove("選擇")
112
+        End If
113
+
114
+        銷售明細_dgv.DataSource = Nothing : ds4.Clear()
115
+        銷售明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
116
+        銷售明細_dgv.ColumnHeadersHeight = 40
117
+        銷售明細_dgv.AllowUserToAddRows = False
118
+        If 窄間距1_ch.Checked = False Then
119
+            銷售明細_dgv.RowTemplate.Height = 95
120
+        Else
121
+            銷售明細_dgv.RowTemplate.Height = 25
122
+        End If
123
+
124
+        PA2 = "" : PA2 = 單號_tb.Text
125
+        SQL_銷售明細表_轉採購()
126
+        da.Fill(ds4) : 銷售明細_dgv.DataSource = ds4.Tables(0) : conn.Close()
127
+        Set_銷售明細_dgv_下拉式清單()
128
+
129
+        銷售明細_dgv.Columns(0).Visible = False : 銷售明細_dgv.Columns(1).FillWeight = 40 : 銷售明細_dgv.Columns(2).FillWeight = 110 : 銷售明細_dgv.Columns(3).FillWeight = 200
130
+        銷售明細_dgv.Columns(4).FillWeight = 120 : 銷售明細_dgv.Columns(5).FillWeight = 120 : 銷售明細_dgv.Columns(6).FillWeight = 120 : 銷售明細_dgv.Columns(7).FillWeight = 190
131
+        銷售明細_dgv.Columns(8).FillWeight = 80 : 銷售明細_dgv.Columns(9).FillWeight = 80 : 銷售明細_dgv.Columns(10).Visible = False : 銷售明細_dgv.Columns(11).Visible = False
132
+        銷售明細_dgv.Columns(12).FillWeight = 80 : 銷售明細_dgv.Columns(13).FillWeight = 80 : 銷售明細_dgv.Columns(14).Visible = False : 銷售明細_dgv.Columns(15).Visible = False
133
+        銷售明細_dgv.Columns(16).Visible = False : 銷售明細_dgv.Columns(17).Visible = False : 銷售明細_dgv.Columns(18).FillWeight = 50
134
+
135
+        銷售明細_dgv.Columns(1).ReadOnly = True : 銷售明細_dgv.Columns(2).ReadOnly = True : 銷售明細_dgv.Columns(3).ReadOnly = True : 銷售明細_dgv.Columns(4).ReadOnly = True
136
+        銷售明細_dgv.Columns(5).ReadOnly = True : 銷售明細_dgv.Columns(6).ReadOnly = True : 銷售明細_dgv.Columns(8).ReadOnly = True : 銷售明細_dgv.Columns(12).ReadOnly = True
137
+        銷售明細_dgv.Columns(13).ReadOnly = True
138
+
139
+        銷售明細_dgv.Columns("數量").DefaultCellStyle.Format = "#,##0" : 銷售明細_dgv.Columns("成本").DefaultCellStyle.Format = "#,##0"
140
+        銷售明細_dgv.Columns("單價").DefaultCellStyle.Format = "#,##0.0" : 銷售明細_dgv.Columns("金額").DefaultCellStyle.Format = "#,##0"
141
+        銷售明細_dgv.Columns("數量").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
142
+        銷售明細_dgv.Columns("數量").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
143
+        銷售明細_dgv.Columns("成本").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
144
+        銷售明細_dgv.Columns("成本").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
145
+        銷售明細_dgv.Columns("單價").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
146
+        銷售明細_dgv.Columns("單價").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
147
+        銷售明細_dgv.Columns("金額").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
148
+        銷售明細_dgv.Columns("金額").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
149
+        銷售明細_dgv.Columns("項次").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
150
+        銷售明細_dgv.Columns("項次").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
151
+        銷售明細_dgv.Columns("倉儲情況").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
152
+        銷售明細_dgv.Columns("倉儲情況").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
153
+        銷售明細_dgv.Columns("料號").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
154
+        銷售明細_dgv.Columns("料號").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
155
+
156
+        For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
157
+            銷售明細_dgv("金額", i).Value = 銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value : 銷售明細_dgv("項次", i).Value = i + 1
158
+
159
+            If 銷售明細_dgv("倉名", i).Value.ToString = "工廠品" Then
160
+                銷售明細_dgv("選擇", i).Value = True
161
+            Else
162
+                銷售明細_dgv("選擇", i).Value = False
163
+            End If
164
+
165
+            If 銷售明細_dgv("選擇", i).Value = True Then
166
+                銷售明細_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
167
+            Else
168
+                銷售明細_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
169
+            End If
170
+        Next
171
+        銷售明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter
172
+    End Sub
173
+    Private Sub Set_銷售明細_dgv_下拉式清單()
174
+        Dim Col As New DataGridViewCheckBoxColumn With {
175
+            .FillWeight = 130,
176
+            .DataPropertyName = "選擇"
177
+        }
178
+        Col.HeaderText = "選擇" : Col.Name = "選擇"
179
+        銷售明細_dgv.Columns.Insert(18, Col)
180
+    End Sub
181
+    Private Sub Set_清單5()
182
+        訂製圖檔_dgv.DataSource = Nothing : ds2.Clear()
183
+        訂製圖檔_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
184
+        訂製圖檔_dgv.ColumnHeadersHeight = 25
185
+        訂製圖檔_dgv.AllowUserToAddRows = False
186
+        訂製圖檔_dgv.RowTemplate.Height = 25
187
+
188
+        SQL_採購控制表_訂製圖檔清單()
189
+        da.Fill(ds2) : 訂製圖檔_dgv.DataSource = ds2.Tables(0) : conn.Close()
190
+
191
+        訂製圖檔_dgv.Columns(0).Visible = False : 訂製圖檔_dgv.Columns(1).Visible = False : 訂製圖檔_dgv.Columns(2).FillWeight = 100
192
+    End Sub
193
+    Private Sub 供應商1_下拉表單資料載入()
194
+        BL1 = False : PA3 = "" : PA4 = ""
195
+        If 地區1_cb.Text = "" Then : PA3 = ""
196
+        ElseIf 地區1_cb.Text = "北部" Then : PA3 = "2"
197
+        ElseIf 地區1_cb.Text = "南部" Then : PA3 = "3"
198
+        ElseIf 地區1_cb.Text = "材料" Then : PA3 = "9"
199
+        ElseIf 地區1_cb.Text = "調貨" Then : PA3 = "Y"
200
+        End If
201
+        SQL_盤盈盤損申請_供應商_下拉清單() : 供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear()
202
+        While (dr.Read()) : 供應商1_cb.Items.Add(dr("簡稱")) : 供應商編碼1_cb.Items.Add(dr("編號")) : End While : conn.Close()
203
+    End Sub
204
+    Private Sub 依銷售申請採購單_Load(sender As Object, e As EventArgs) Handles MyBase.Load
205
+        Me.MdiParent = YD_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
206
+        小間距_ch.Checked = True : 銷售明細_dgv.Visible = False : 銷售明細_dgv.BringToFront()
207
+        業務_cb.Text = 業務號碼 : 業務1_cb.Text = 業務號碼 '--------------------控件隱藏、操作許可設定與其他基本顯示設定
208
+
209
+        Set_清單() : Set_清單1()
210
+        Target1 = Target & AA(1) & "/" : FTP資料夾_wb.Url = New Uri(Target1) '--------------------指定伺服器ftp資料夾位置
211
+    End Sub
212
+    Private Sub 採購清單_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 採購清單_dgv.RowPostPaint
213
+        For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1
214
+            If 採購清單_dgv.Rows(i).Cells("已審核").Value = True Then
215
+                採購清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
216
+            Else
217
+                採購清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightYellow
218
+            End If
219
+        Next
220
+        Dim linePen As New Pen(Color.Blue, 2)
221
+        If e.RowIndex = 採購清單_dgv.Rows.Count - 1 Then : Exit Sub : Else
222
+            If 採購清單_dgv("供應商", e.RowIndex).Value.ToString <> 採購清單_dgv("供應商", e.RowIndex + 1).Value.ToString Then
223
+                Dim startX As Integer = IIf(採購清單_dgv.RowHeadersVisible, 採購清單_dgv.RowHeadersWidth, 0) : Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
224
+                Dim endX As Integer = startX + 採購清單_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 採購清單_dgv.HorizontalScrollingOffset
225
+                e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
226
+            End If
227
+        End If
228
+    End Sub
229
+    Private Sub 採購清單_dgv_CellEndEdit(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 採購清單_dgv.CellEndEdit
230
+        Set_合記計算()
231
+
232
+        PA20 = 採購清單_dgv(8, e.RowIndex).Value : SQL_銷售明細_改倉名()
233
+        If dr.Read() Then : 採購清單_dgv("倉儲狀態", e.RowIndex).Value = dr("倉名編號") : End If
234
+        PA19 = 採購清單_dgv(11, e.RowIndex).Value : SQL_銷售明細_改物料訂製狀態()
235
+        If dr.Read() Then : 採購清單_dgv("訂製狀態", e.RowIndex).Value = dr("編碼") : End If
236
+        PA18 = 採購清單_dgv(14, e.RowIndex).Value : SQL_銷售明細_倉儲狀態()
237
+        If dr.Read() Then : 採購清單_dgv("物料狀態", e.RowIndex).Value = dr("編碼") : End If : conn.Close()
238
+
239
+        Dim EU(1) As String
240
+        EU(0) = 採購清單_dgv("採購日期", e.RowIndex).Value.ToString
241
+        If EU(0) = "" Then : Else
242
+            日期1_dtp.Text = EU(0) : 採購清單_dgv.Rows(e.RowIndex).Cells("採購日期").Value = Format(日期1_dtp.Value, "yyyy/MM/dd")
243
+        End If
244
+        EU(1) = 採購清單_dgv("預計進廠日", e.RowIndex).Value.ToString
245
+        If EU(1) = "" Then : Else
246
+            日期2_dtp.Text = EU(1) : 採購清單_dgv.Rows(e.RowIndex).Cells("預計進廠日").Value = Format(日期2_dtp.Value, "yyyy/MM/dd")
247
+        End If
248
+    End Sub
249
+    Private Sub 採購清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 採購清單_dgv.CellClick
250
+        If e.RowIndex = -1 Then : Else
251
+            項次_tb.Text = 採購清單_dgv(0, e.RowIndex).Value.ToString : 申請人_tb.Text = 採購清單_dgv("申請人", e.RowIndex).Value.ToString
252
+            版次_tb.Text = 採購清單_dgv("訂製圖號", e.RowIndex).Value.ToString : 單號1_tb.Text = 採購清單_dgv("銷售單號", e.RowIndex).Value.ToString
253
+            料號_tb.Text = 採購清單_dgv("料號", e.RowIndex).Value.ToString : 供應商_tb.Text = 採購清單_dgv("供應商", e.RowIndex).Value.ToString
254
+
255
+            Set_合記計算()
256
+
257
+            PA15 = 採購清單_dgv(0, e.RowIndex).Value.ToString : Set_清單5()
258
+
259
+            物料圖1_pb.Image = Nothing : PA1 = 採購清單_dgv.Rows(e.RowIndex).Cells("料號").Value : SQL_物料檔案_是否有圖()
260
+            If dr.Read() Then
261
+                If dr("是否有圖") = True Then
262
+                    PA = 採購清單_dgv.Rows(e.RowIndex).Cells("料號").Value : SQL_物料圖庫_圖片顯示() '--------------------圖片顯示
263
+                    While dr.Read() = True
264
+                        Dim unused As Byte() = New Byte(-1) {}
265
+                        Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
266
+                        Dim oStream As New MemoryStream(bytes)
267
+                        物料圖1_pb.Image = Bitmap.FromStream(oStream)
268
+                    End While
269
+                    conn.Close()
270
+                    物料圖1_pb.SizeMode = 4
271
+                Else
272
+                    物料圖1_pb.Image = Nothing
273
+                End If
274
+            End If : conn.Close()
275
+        End If
276
+    End Sub
277
+    Private Sub 訂製圖檔_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 訂製圖檔_dgv.CellClick
278
+        If e.RowIndex = -1 Then : Else
279
+            版次_tb.Text = 訂製圖檔_dgv.Rows(e.RowIndex).Cells("版次").Value
280
+
281
+            '----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
282
+            物料圖1_pb.Image = Nothing : PA15 = 項次_tb.Text : PA16 = 版次_tb.Text : SQL_採購控制表_訂製圖片()
283
+            While dr.Read() = True
284
+                Dim unused As Byte() = New Byte(-1) {}
285
+                Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
286
+                Dim oStream As New MemoryStream(bytes)
287
+                物料圖1_pb.Image = Bitmap.FromStream(oStream)
288
+            End While
289
+            conn.Close()
290
+            物料圖1_pb.SizeMode = 4
291
+        End If
292
+    End Sub
293
+    Private Sub 銷售單據_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 銷售單據_dgv.CellClick
294
+        If e.RowIndex = -1 Then : Else
295
+            單號_tb.Text = 銷售單據_dgv.Rows(e.RowIndex).Cells("單號").Value
296
+            採購日期_tb.Text = 銷售單據_dgv.Rows(e.RowIndex).Cells("審核日期").Value.ToString
297
+            交貨日期_tb.Text = 銷售單據_dgv.Rows(e.RowIndex).Cells("交貨日期").Value.ToString
298
+            業務_cb.Text = Strings.Left(銷售單據_dgv.Rows(e.RowIndex).Cells("單號").Value, 1)
299
+            Set_清單4()
300
+            銷售單顯示_ch.Checked = True
301
+        End If
302
+    End Sub
303
+    Private Sub 地區1_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 地區1_cb.SelectedIndexChanged
304
+        If 地區1_cb.Text = "" And 查詢1_tb.Text = "" Then
305
+            供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear() : Set_清單1()
306
+        ElseIf 地區1_cb.Text = "" Then
307
+            查詢1_tb.Text = "" : 供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear()
308
+        ElseIf 地區1_cb.Text <> "" Then
309
+            查詢1_tb.Text = "" : 供應商1_下拉表單資料載入()
310
+        End If
311
+    End Sub
312
+    Private Sub 供應商1_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 供應商1_cb.SelectedIndexChanged
313
+        If 地區1_cb.Text <> "" Then
314
+            查詢1_tb.Text = "" : 供應商編碼1_cb.SelectedIndex = 供應商1_cb.SelectedIndex
315
+        End If
316
+    End Sub
317
+    Private Sub 供應商編碼1_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 供應商編碼1_cb.SelectedIndexChanged
318
+        If 地區1_cb.Text <> "" Then
319
+            查詢1_tb.Text = "" : 供應商1_cb.SelectedIndex = 供應商編碼1_cb.SelectedIndex : 供應商編碼1_tb.Text = 供應商編碼1_cb.Text : Set_清單1()
320
+        End If
321
+    End Sub
322
+    Private Sub 查詢1_tb_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles 查詢1_tb.KeyPress
323
+        If e.KeyChar = Chr(13) Then
324
+            供應商1_cb.Items.Clear() : 供應商編碼1_cb.Items.Clear()
325
+            關鍵字 = True : PA = 查詢1_tb.Text : Set_清單1() : 地區1_cb.Text = ""
326
+        End If
327
+    End Sub
328
+    Private Sub 清空1_bt_Click(sender As Object, e As EventArgs) Handles 清空1_bt.Click
329
+        業務1_cb.Text = "" : 查詢1_tb.Text = "" : 地區1_cb.Text = ""
330
+    End Sub
331
+    Private Sub 窄間距_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 小間距_ch.Click
332
+        小間距_ch.Checked = True : 中間距_ch.Checked = False : 大間距_ch.Checked = False
333
+        存檔1() : Set_清單1()
334
+    End Sub
335
+    Private Sub 中間距_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 中間距_ch.Click
336
+        小間距_ch.Checked = False : 中間距_ch.Checked = True : 大間距_ch.Checked = False
337
+        存檔1() : Set_清單1()
338
+    End Sub
339
+    Private Sub 大間距_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 大間距_ch.Click
340
+        小間距_ch.Checked = False : 中間距_ch.Checked = False : 大間距_ch.Checked = True
341
+        存檔1() : Set_清單1()
342
+    End Sub
343
+    Private Sub 銷售單顯示_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 銷售單顯示_ch.CheckedChanged
344
+        If 銷售單顯示_ch.Checked = True Then : 銷售明細_dgv.Visible = True
345
+        Else : 銷售明細_dgv.Visible = False : End If
346
+    End Sub
347
+    Private Sub 業務1_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 業務1_cb.SelectedIndexChanged
348
+        Set_清單1()
349
+    End Sub
350
+    Private Sub 業務_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 業務_cb.SelectedIndexChanged
351
+        Set_清單()
352
+    End Sub
353
+    Private Sub 窄間距1_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 窄間距1_ch.CheckedChanged
354
+        If 窄間距1_ch.Checked = False Then : 銷售明細_dgv.RowTemplate.Height = 95
355
+        Else : 銷售明細_dgv.RowTemplate.Height = 25 : End If : Set_清單4()
356
+    End Sub
357
+    Private Sub 檔案名稱_tb_DragEnter(sender As Object, e As DragEventArgs) Handles 檔案名稱_tb.DragEnter
358
+        If e.Data.GetDataPresent(DataFormats.FileDrop) Then
359
+            Dim files As String()
360
+            Try
361
+                files = CType(e.Data.GetData(DataFormats.FileDrop), String())
362
+                檔案名稱_tb.Text = files(files.Length - 1)
363
+            Catch ex As Exception
364
+                MessageBox.Show(ex.Message)
365
+                Return
366
+            End Try
367
+        End If
368
+        Dim STR2 As Integer = 0
369
+        檔名讀取_tb.Text = 檔案名稱_tb.Text
370
+        If 檔案名稱_tb.Text = "" Then
371
+        Else
372
+            For i As Integer = 0 To 9999
373
+                Dim STR1 As Integer = Strings.Len(檔名讀取_tb.Text)
374
+                If Strings.Right((檔名讀取_tb.Text), 1) <> "\" Then
375
+                    STR1 -= 1 : STR2 += 1
376
+                    If STR1 = 0 Then
377
+                        檔名讀取_tb.Text = ""
378
+                        檔案名稱_tb.Text = ""
379
+                        i = 9999
380
+                    Else
381
+                        檔名讀取_tb.Text = Strings.Left((檔名讀取_tb.Text), STR1)
382
+                    End If
383
+                Else
384
+                    檔名讀取_tb.Text = Strings.Right((檔案名稱_tb.Text), STR2)
385
+                    檔案名稱_tb.Text = 檔名讀取_tb.Text
386
+                    i = 9999
387
+                End If
388
+            Next
389
+        End If
390
+    End Sub
391
+    Private Sub 檔案名稱_tb_DragDrop(ByVal sender As Object, ByVal e As DragEventArgs) Handles 檔案名稱_tb.DragDrop
392
+        Dim files As Array = e.Data.GetData(DataFormats.FileDrop)
393
+        For Each file As String In files
394
+            檔案名稱_tb.AppendText(file + Environment.NewLine)
395
+        Next
396
+    End Sub
397
+    Private Sub 轉採購_bt_Click(sender As Object, e As EventArgs) Handles 轉採購_bt.Click
398
+        PA = 單號_tb.Text : SQL_銷售控制表_轉採購修改()
399
+        For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
400
+            If 銷售明細_dgv("選擇", i).Value = True Then
401
+                SQL_採購控制表_最後一筆資料()
402
+                If dr.Read() Then : EDR = Double.Parse(Strings.Right(dr("資料流水號").ToString, 9)) : Else : EDR = 0 : End If
403
+                conn.Close() : EDR += 1
404
+                If EDR < 10 Then : ESTR = "PU" & "00000000" & EDR
405
+                ElseIf EDR > 9 And EDR < 100 Then : ESTR = "PU" & "0000000" & EDR
406
+                ElseIf EDR > 99 And EDR < 1000 Then : ESTR = "PU" & "000000" & EDR
407
+                ElseIf EDR > 999 And EDR < 10000 Then : ESTR = "PU" & "00000" & EDR
408
+                ElseIf EDR > 9999 And EDR < 100000 Then : ESTR = "PU" & "0000" & EDR
409
+                ElseIf EDR > 99999 And EDR < 100000 Then : ESTR = "PU" & "000" & EDR
410
+                ElseIf EDR > 999999 And EDR < 1000000 Then : ESTR = "PU" & "00" & EDR
411
+                ElseIf EDR > 9999999 And EDR < 10000000 Then : ESTR = "PU" & "0" & EDR
412
+                ElseIf EDR > 99999999 Then : ESTR = "PU" & EDR : End If
413
+
414
+                PA1 = ESTR : PA2 = 單號_tb.Text : PA3 = Strings.Left(銷售明細_dgv.Rows(i).Cells("料號").Value, 4) : PA4 = 銷售明細_dgv.Rows(i).Cells("料號").Value
415
+                PA5 = 銷售明細_dgv.Rows(i).Cells("物料狀態").Value : PA6 = 銷售明細_dgv.Rows(i).Cells("訂製狀態").Value : PA7 = 銷售明細_dgv.Rows(i).Cells("倉儲狀態").Value
416
+                PA8 = 銷售明細_dgv.Rows(i).Cells("備註").Value : NU1 = 銷售明細_dgv.Rows(i).Cells("數量").Value : NU2 = 銷售明細_dgv.Rows(i).Cells("成本").Value
417
+                NU3 = NU1 * NU2 : PA9 = gUserName : PA10 = Format(Today(), "yyyy/MM/dd") : PA11 = 採購日期_tb.Text : PA12 = 交貨日期_tb.Text : BL1 = True
418
+                PA13 = 銷售明細_dgv.Rows(i).Cells("資料流水號").Value
419
+                SQL_採購控制表_新增()
420
+            End If
421
+        Next
422
+        銷售單顯示_ch.Checked = False : Set_清單() : Set_清單1() : MsgBox("轉採購單成功")
423
+    End Sub
424
+    Private Sub 刪除單據上點選的資料_bt_Click(sender As Object, e As EventArgs) Handles 刪除單據上點選的資料_bt.Click
425
+        If gUserName <> 申請人_tb.Text And Val(登入人級別) >= 3 Then
426
+            MsgBox("不能修改其他申請人的資料")
427
+        Else
428
+            PA = 項次_tb.Text : SQL_採購控制表_刪除()
429
+        End If
430
+        Set_清單1() : MsgBox("已刪除選中的資料")
431
+    End Sub
432
+    Private Sub 讀取資料夾路徑_bt_Click(sender As Object, e As EventArgs) Handles 讀取資料夾路徑_bt.Click
433
+        If FolderBrowserDialog1.ShowDialog = DialogResult.OK Then : 本機資料夾_wb.Navigate(FolderBrowserDialog1.SelectedPath) : End If
434
+    End Sub
435
+    Private Sub 圖檔入系統_bt_Click(sender As Object, e As EventArgs) Handles 圖檔入系統_bt.Click
436
+        If 項次_tb.Text = "" Then : MsgBox("請先選擇要指定訂製圖檔的採購資料!!")
437
+        Else
438
+            If 檔案名稱_tb.Text <> "" Then
439
+                Dim 驗證 As String : Dim 取變數 As String
440
+                取變數 = Strings.StrReverse(檔案名稱_tb.Text)
441
+                For i As Integer = 1 To 10
442
+                    If i = 1 Then
443
+                        驗證 = Strings.Left(取變數, i)
444
+                    Else
445
+                        If Strings.Mid(取變數, i, 1) = "." Then
446
+                            驗證 = Strings.StrReverse(驗證) : Exit For
447
+                        Else
448
+                            驗證 = 驗證 & Strings.Mid(取變數, i, 1)
449
+                        End If
450
+                    End If
451
+                Next
452
+
453
+                If 驗證 = "PNG" Or 驗證 = "png" Or 驗證 = "GIF" Or 驗證 = "gif" Or 驗證 = "BMP" Or 驗證 = "bmp" Or 驗證 = "JPG" Or 驗證 = "jpg" Or 驗證 = "JPEG" Or 驗證 = "jpeg" Then
454
+                    Dim 進版 As Integer
455
+                    If 版次_tb.Text = "" Then
456
+                        版次_tb.Text = "V01"
457
+                    Else
458
+                        進版 = Strings.Right(版次_tb.Text, 2) : 進版 += 1
459
+                        If 進版 < 10 Then : 版次_tb.Text = "V" & "0" & 進版
460
+                        Else : 版次_tb.Text = "V" & EDR : End If
461
+                    End If
462
+
463
+                    PA1 = 項次_tb.Text : PA2 = 單號1_tb.Text : PA3 = 版次_tb.Text : PA4 = 檔案名稱_tb.Text
464
+                    SQL_採購控制表_圖片新增() : SQL_採購控制表_修改() : conn.Close()
465
+                    '---FTP方式刪除檔案----------------------------------------------------------------------------------------------------------------------------------------------------------------------
466
+                    Dim frq As FtpWebRequest, frp As FtpWebResponse, fcr As NetworkCredential
467
+                    frq = CType(WebRequest.Create(New Uri(Target1 & 檔案名稱_tb.Text)), FtpWebRequest)
468
+                    fcr = New NetworkCredential(FTP帳號, FTP密碼)
469
+                    frq.Credentials = fcr
470
+                    frq.Method = WebRequestMethods.Ftp.DeleteFile
471
+                    frq.UseBinary = True
472
+                    frp = CType(frq.GetResponse, FtpWebResponse)
473
+                    frp.Close()
474
+                    FTP資料夾_wb.Refresh()
475
+                    '----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
476
+                    物料圖1_pb.Image = Nothing : PA15 = 項次_tb.Text : PA16 = 版次_tb.Text : SQL_採購控制表_訂製圖片()
477
+                    While dr.Read() = True
478
+                        Dim unused As Byte() = New Byte(-1) {}
479
+                        Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
480
+                        Dim oStream As New MemoryStream(bytes)
481
+                        物料圖1_pb.Image = Bitmap.FromStream(oStream)
482
+                    End While
483
+                    conn.Close()
484
+                    物料圖1_pb.SizeMode = 4
485
+                    '----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
486
+                    存檔1() : Set_清單5() : Set_清單1() : 檔案名稱_tb.Text = ""
487
+                Else
488
+                    MsgBox("上傳文件並非常用圖片格式,文件已自動刪除,請專換成常用圖片檔案再行操作。")
489
+                    '---FTP方式刪除檔案----------------------------------------------------------------------------------------------------------------------------------------------------------------------
490
+                    Dim frq As FtpWebRequest, frp As FtpWebResponse, fcr As NetworkCredential
491
+                    frq = CType(WebRequest.Create(New Uri(Target1 & 檔案名稱_tb.Text)), FtpWebRequest)
492
+                    fcr = New NetworkCredential(FTP帳號, FTP密碼)
493
+                    frq.Credentials = fcr
494
+                    frq.Method = WebRequestMethods.Ftp.DeleteFile
495
+                    frq.UseBinary = True
496
+                    frp = CType(frq.GetResponse, FtpWebResponse)
497
+                    frp.Close()
498
+                    FTP資料夾_wb.Refresh()
499
+                    檔案名稱_tb.Text = ""
500
+                End If
501
+            End If
502
+        End If
503
+    End Sub
504
+    Private Sub 下載圖檔_bt_Click(sender As Object, e As EventArgs) Handles 下載圖檔_bt.Click
505
+        If 物料圖1_pb.Image Is Nothing Then : MsgBox("所選擇的資料沒有圖片檔案,無法下載。")
506
+        Else
507
+            With SaveFileDialog1 : .Filter = "所有文件(*.jpg)|*.jpg" : End With
508
+            SaveFileDialog1.FileName = 單號1_tb.Text & "-" & 料號_tb.Text & "-" & 版次_tb.Text & ".jpg"
509
+            Dim result As DialogResult = SaveFileDialog1.ShowDialog()
510
+            下載檔名_tb.Text = SaveFileDialog1.FileName
511
+            If result = System.Windows.Forms.DialogResult.Cancel Then
512
+                Exit Sub
513
+            End If
514
+
515
+            PA15 = 項次_tb.Text : PA16 = 版次_tb.Text
516
+            ds3.Clear() : SQL_採購控制表_訂製圖片下載() : da.Fill(ds3)
517
+            If ds3.Tables(0).Rows.Count > 0 Then
518
+                Dim imgData() As Byte
519
+                imgData = ds3.Tables(0).Rows(0).Item("圖片")
520
+                Dim fs As FileStream
521
+                fs = File.Create(下載檔名_tb.Text, imgData.Length - 1)
522
+                fs.Write(imgData, 0, imgData.Length - 1)
523
+                fs.Close()
524
+            End If : conn.Close() : MsgBox("下載完成")
525
+        End If
526
+    End Sub
527
+    Private Sub 大圖預覽_bt_Click(sender As Object, e As EventArgs) Handles 大圖預覽_bt.Click
528
+        If 項次_tb.Text = "" Or 版次_tb.Text = "" Then
529
+            MsgBox("沒有訂製圖或是沒有決哲訂製圖")
530
+        Else
531
+            採購訂製大圖.ShowDialog()
532
+        End If
533
+    End Sub
534
+    Private Sub 存檔1()
535
+        For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1
536
+            資料數 = 採購清單_dgv.Rows.Count : MyModule1.進度條()
537
+            If gUserName <> 採購清單_dgv("申請人", i).Value And Val(登入人級別) >= 3 Then
538
+            Else
539
+                PA = 採購清單_dgv("資料流水號", i).Value : PA1 = 採購清單_dgv("物料狀態", i).Value : PA2 = 採購清單_dgv("訂製狀態", i).Value : PA3 = 採購清單_dgv("倉儲狀態", i).Value
540
+                PA4 = 採購清單_dgv("備註", i).Value.ToString : PA5 = 採購清單_dgv("採購日期", i).Value.ToString : PA6 = 採購清單_dgv("預計進廠日", i).Value.ToString
541
+                NU1 = 採購清單_dgv("數量", i).Value : NU2 = 採購清單_dgv("成本", i).Value : NU3 = NU1 * NU2
542
+                SQL_採購控制表_存檔()
543
+            End If
544
+        Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
545
+    End Sub
546
+    Private Sub 存檔_bt_Click(sender As Object, e As EventArgs) Handles 存檔_bt.Click
547
+        存檔1() : MsgBox("修改完成。")
548
+    End Sub
549
+
550
+    Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
551
+        銷售明細_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
552
+        採購清單_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
553
+        銷售單據_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
554
+        訂製圖檔_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
555
+    End Sub
556
+End Class

+ 1047
- 0
YD-ERP-SYS/採購系統管理/採購應負帳款.Designer.vb
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 120
- 0
YD-ERP-SYS/採購系統管理/採購應負帳款.resx Переглянути файл

@@ -0,0 +1,120 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+  <!-- 
4
+    Microsoft ResX Schema 
5
+    
6
+    Version 2.0
7
+    
8
+    The primary goals of this format is to allow a simple XML format 
9
+    that is mostly human readable. The generation and parsing of the 
10
+    various data types are done through the TypeConverter classes 
11
+    associated with the data types.
12
+    
13
+    Example:
14
+    
15
+    ... ado.net/XML headers & schema ...
16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+    <resheader name="version">2.0</resheader>
18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+    </data>
25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+        <comment>This is a comment</comment>
28
+    </data>
29
+                
30
+    There are any number of "resheader" rows that contain simple 
31
+    name/value pairs.
32
+    
33
+    Each data row contains a name, and value. The row also contains a 
34
+    type or mimetype. Type corresponds to a .NET class that support 
35
+    text/value conversion through the TypeConverter architecture. 
36
+    Classes that don't support this are serialized and stored with the 
37
+    mimetype set.
38
+    
39
+    The mimetype is used for serialized objects, and tells the 
40
+    ResXResourceReader how to depersist the object. This is currently not 
41
+    extensible. For a given mimetype the value must be set accordingly:
42
+    
43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
+    that the ResXResourceWriter will generate, however the reader can 
45
+    read any of the formats listed below.
46
+    
47
+    mimetype: application/x-microsoft.net.object.binary.base64
48
+    value   : The object must be serialized with 
49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+            : and then encoded with base64 encoding.
51
+    
52
+    mimetype: application/x-microsoft.net.object.soap.base64
53
+    value   : The object must be serialized with 
54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+            : and then encoded with base64 encoding.
56
+
57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
58
+    value   : The object must be serialized into a byte array 
59
+            : using a System.ComponentModel.TypeConverter
60
+            : and then encoded with base64 encoding.
61
+    -->
62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+    <xsd:element name="root" msdata:IsDataSet="true">
65
+      <xsd:complexType>
66
+        <xsd:choice maxOccurs="unbounded">
67
+          <xsd:element name="metadata">
68
+            <xsd:complexType>
69
+              <xsd:sequence>
70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+              </xsd:sequence>
72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
73
+              <xsd:attribute name="type" type="xsd:string" />
74
+              <xsd:attribute name="mimetype" type="xsd:string" />
75
+              <xsd:attribute ref="xml:space" />
76
+            </xsd:complexType>
77
+          </xsd:element>
78
+          <xsd:element name="assembly">
79
+            <xsd:complexType>
80
+              <xsd:attribute name="alias" type="xsd:string" />
81
+              <xsd:attribute name="name" type="xsd:string" />
82
+            </xsd:complexType>
83
+          </xsd:element>
84
+          <xsd:element name="data">
85
+            <xsd:complexType>
86
+              <xsd:sequence>
87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+              </xsd:sequence>
90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+              <xsd:attribute ref="xml:space" />
94
+            </xsd:complexType>
95
+          </xsd:element>
96
+          <xsd:element name="resheader">
97
+            <xsd:complexType>
98
+              <xsd:sequence>
99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+              </xsd:sequence>
101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
102
+            </xsd:complexType>
103
+          </xsd:element>
104
+        </xsd:choice>
105
+      </xsd:complexType>
106
+    </xsd:element>
107
+  </xsd:schema>
108
+  <resheader name="resmimetype">
109
+    <value>text/microsoft-resx</value>
110
+  </resheader>
111
+  <resheader name="version">
112
+    <value>2.0</value>
113
+  </resheader>
114
+  <resheader name="reader">
115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+  </resheader>
117
+  <resheader name="writer">
118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+  </resheader>
120
+</root>

+ 955
- 0
YD-ERP-SYS/採購系統管理/採購應負帳款.vb Переглянути файл

@@ -0,0 +1,955 @@
1
+Option Strict Off
2
+Imports Microsoft.Office.Interop.Excel.XlUnderlineStyle
3
+Imports Microsoft.Office.Interop.Excel.Constants
4
+Imports Microsoft.Office.Interop.Excel.XlBordersIndex
5
+Imports Microsoft.Office.Interop.Excel.XlLineStyle
6
+Imports Microsoft.Office.Interop.Excel.XlBorderWeight
7
+Imports Microsoft.Office.Interop.Excel.XlThemeFont
8
+Imports Microsoft.Office.Interop.Excel.XlThemeColor
9
+Imports Microsoft.Office.Interop.Excel.XlWindowState
10
+Imports System.Data.SqlClient
11
+Public Class 採購應負帳款
12
+    ReadOnly ds, ds1, da2 As New DataSet
13
+    Dim xlApp As Microsoft.Office.Interop.Excel.Application
14
+    Dim xlBook As Microsoft.Office.Interop.Excel.Workbook
15
+    Dim xlSheet As Microsoft.Office.Interop.Excel.Worksheet
16
+    Dim N2 As Integer : Dim 新流水1 As String : Dim 新項次 As String : Dim 新支付單號 As String
17
+    Dim N1 As Integer : Dim NUM1 As Integer : Dim 匯率1 As Double : Dim 狀態 As String
18
+    Dim 首次 As Boolean
19
+    Private Sub Set_清單1()
20
+        供應商_dgv.DataSource = Nothing : ds1.Clear()
21
+        供應商_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
22
+        供應商_dgv.ColumnHeadersHeight = 40
23
+        供應商_dgv.AllowUserToAddRows = False
24
+        供應商_dgv.RowTemplate.Height = 30
25
+
26
+        合計_dgv.RowTemplate.Height = 30
27
+
28
+        SQL_採購對帳單_總表()
29
+        da.Fill(ds1) : 供應商_dgv.DataSource = ds1.Tables(0) : conn.Close()
30
+
31
+        供應商_dgv.Columns(0).FillWeight = 50 : 供應商_dgv.Columns(1).FillWeight = 120 : 供應商_dgv.Columns(2).FillWeight = 70 : 供應商_dgv.Columns(3).Visible = False
32
+        供應商_dgv.Columns(4).FillWeight = 50 : 供應商_dgv.Columns(5).FillWeight = 80 : 供應商_dgv.Columns(6).Visible = False : 供應商_dgv.Columns(7).FillWeight = 50
33
+        供應商_dgv.Columns(8).FillWeight = 80 : 供應商_dgv.Columns(9).FillWeight = 80 : 供應商_dgv.Columns(10).FillWeight = 80 : 供應商_dgv.Columns(11).Visible = False
34
+        供應商_dgv.Columns(12).FillWeight = 80 : 供應商_dgv.Columns(13).FillWeight = 50 : 供應商_dgv.Columns(14).FillWeight = 50 : 供應商_dgv.Columns(15).FillWeight = 100
35
+        供應商_dgv.Columns(16).FillWeight = 100 : 供應商_dgv.Columns(17).FillWeight = 150 : 供應商_dgv.Columns(18).FillWeight = 70
36
+
37
+        供應商_dgv.Columns(0).ReadOnly = True : 供應商_dgv.Columns(1).ReadOnly = True : 供應商_dgv.Columns(2).ReadOnly = True : 供應商_dgv.Columns(5).ReadOnly = True
38
+        供應商_dgv.Columns(8).ReadOnly = True : 供應商_dgv.Columns(10).ReadOnly = True : 供應商_dgv.Columns(14).ReadOnly = True : 供應商_dgv.Columns(15).ReadOnly = True
39
+        供應商_dgv.Columns(16).ReadOnly = True
40
+
41
+        資料筆數1_tb.Text = 供應商_dgv.Rows.Count : 供應商_dgv.EditMode = DataGridViewEditMode.EditOnEnter
42
+        供應商_dgv.Columns(4).DefaultCellStyle.BackColor = Color.MistyRose
43
+        供應商_dgv.Columns(7).DefaultCellStyle.BackColor = Color.MistyRose
44
+        供應商_dgv.Columns(9).DefaultCellStyle.BackColor = Color.MistyRose
45
+        供應商_dgv.Columns(12).DefaultCellStyle.BackColor = Color.MistyRose
46
+        供應商_dgv.Columns(13).DefaultCellStyle.BackColor = Color.MistyRose
47
+
48
+        稅金_tb.Text = "0" : 廣告費_tb.Text = "0" : 其他扣款_tb.Text = "0" : 實付金額_tb.Text = "0" : 公司實付_tb.Text = "0" : 個人實付_tb.Text = "0"
49
+
50
+        For i As Integer = 0 To 供應商_dgv.Rows.Count - 1
51
+            If 供應商_dgv("稅金%", i).Value.ToString = "" Then : 供應商_dgv("稅金%", i).Value = 供應商_dgv("稅金1", i).Value.ToString : End If
52
+            供應商_dgv("稅金", i).Value = 供應商_dgv("當月貨款", i).Value / 100 * 供應商_dgv("稅金%", i).Value
53
+            If 供應商_dgv("廣告%", i).Value.ToString = "" Then : 供應商_dgv("廣告%", i).Value = 供應商_dgv("廣告1", i).Value.ToString : End If
54
+            供應商_dgv("廣告", i).Value = 供應商_dgv("當月貨款", i).Value / 100 * 供應商_dgv("廣告%", i).Value
55
+            If 供應商_dgv("其他扣款", i).Value.ToString = "" Then : 供應商_dgv("其他扣款", i).Value = "0" : End If
56
+            供應商_dgv("實付金額", i).Value = 供應商_dgv("當月貨款", i).Value - 供應商_dgv("稅金", i).Value - 供應商_dgv("廣告", i).Value - 供應商_dgv("其他扣款", i).Value
57
+            If 供應商_dgv("公司%", i).Value.ToString = "" Then : 供應商_dgv("公司%", i).Value = "0" : End If
58
+            If 供應商_dgv("個人%", i).Value.ToString = "" Then : 供應商_dgv("個人%", i).Value = "0" : End If
59
+            供應商_dgv("個人%", i).Value = 100 - 供應商_dgv("公司%", i).Value
60
+            供應商_dgv("公司", i).Value = 供應商_dgv("實付金額", i).Value / 100 * 供應商_dgv("公司%", i).Value
61
+            供應商_dgv("個人", i).Value = 供應商_dgv("實付金額", i).Value / 100 * 供應商_dgv("個人%", i).Value
62
+
63
+            稅金_tb.Text = Val(稅金_tb.Text) + 供應商_dgv("稅金", i).Value
64
+            廣告費_tb.Text = Val(廣告費_tb.Text) + 供應商_dgv("廣告", i).Value
65
+            其他扣款_tb.Text = Val(其他扣款_tb.Text) + 供應商_dgv("其他扣款", i).Value
66
+            實付金額_tb.Text = Val(實付金額_tb.Text) + 供應商_dgv("實付金額", i).Value
67
+            公司實付_tb.Text = Val(公司實付_tb.Text) + 供應商_dgv("公司", i).Value
68
+            個人實付_tb.Text = Val(個人實付_tb.Text) + 供應商_dgv("個人", i).Value
69
+
70
+            If 供應商_dgv("票期", i).Value.ToString = "" Then
71
+                If Strings.Mid(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 6, 2) = "12" Then
72
+                    If 供應商_dgv("票期1", i).Value.ToString = "30" Then
73
+                        供應商_dgv("票期1", i).Value = "28"
74
+                    End If
75
+                End If
76
+                DTP1.Value = 結束日期_dtp.Value : DTP1.Value = DTP1.Value.AddMonths(2)
77
+                If 供應商_dgv("票期1", i).Value < 10 Then
78
+                    PA16 = "0" & 供應商_dgv("票期1", i).Value.ToString
79
+                Else
80
+                    PA16 = 供應商_dgv("票期1", i).Value.ToString
81
+                End If
82
+                供應商_dgv("票期", i).Value = Strings.Left(Strings.Format(DTP1.Value, "yyyy/MM/dd"), 7) & "/" & PA16
83
+            End If
84
+        Next
85
+
86
+        供應商_dgv.Columns("公司").DefaultCellStyle.Format = "#,##0"
87
+        供應商_dgv.Columns("公司").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
88
+        供應商_dgv.Columns("公司").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
89
+        供應商_dgv.Columns("個人").DefaultCellStyle.Format = "#,##0"
90
+        供應商_dgv.Columns("個人").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
91
+        供應商_dgv.Columns("個人").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
92
+        供應商_dgv.Columns("公司%").DefaultCellStyle.Format = "#,##0.00"
93
+        供應商_dgv.Columns("公司%").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
94
+        供應商_dgv.Columns("公司%").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
95
+        供應商_dgv.Columns("個人%").DefaultCellStyle.Format = "#,##0.00"
96
+        供應商_dgv.Columns("個人%").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
97
+        供應商_dgv.Columns("個人%").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
98
+        供應商_dgv.Columns("實付金額").DefaultCellStyle.Format = "#,##0"
99
+        供應商_dgv.Columns("實付金額").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
100
+        供應商_dgv.Columns("實付金額").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
101
+        供應商_dgv.Columns("其他扣款").DefaultCellStyle.Format = "#,##0"
102
+        供應商_dgv.Columns("其他扣款").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
103
+        供應商_dgv.Columns("其他扣款").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
104
+        供應商_dgv.Columns("廣告").DefaultCellStyle.Format = "#,##0"
105
+        供應商_dgv.Columns("廣告").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
106
+        供應商_dgv.Columns("廣告").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
107
+        供應商_dgv.Columns("廣告%").DefaultCellStyle.Format = "#,##0.00"
108
+        供應商_dgv.Columns("廣告%").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
109
+        供應商_dgv.Columns("廣告%").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
110
+        供應商_dgv.Columns("稅金").DefaultCellStyle.Format = "#,##0"
111
+        供應商_dgv.Columns("稅金").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
112
+        供應商_dgv.Columns("稅金").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
113
+        供應商_dgv.Columns("稅金%").DefaultCellStyle.Format = "#,##0.00"
114
+        供應商_dgv.Columns("稅金%").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
115
+        供應商_dgv.Columns("稅金%").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
116
+        供應商_dgv.Columns("當月貨款").DefaultCellStyle.Format = "#,##0"
117
+        供應商_dgv.Columns("當月貨款").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
118
+        供應商_dgv.Columns("當月貨款").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
119
+        供應商_dgv.Columns("供應商").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
120
+        供應商_dgv.Columns("供應商").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
121
+        供應商_dgv.Columns("編號").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
122
+        供應商_dgv.Columns("編號").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
123
+        供應商_dgv.Columns("票期").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
124
+        供應商_dgv.Columns("票期").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
125
+        If 首次 = True Then : Else : Set_清單3() : End If
126
+    End Sub
127
+    Private Sub Set_清單2()
128
+        採購清單_dgv.DataSource = Nothing : ds.Clear()
129
+        採購清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
130
+        採購清單_dgv.ColumnHeadersHeight = 40
131
+        採購清單_dgv.AllowUserToAddRows = False
132
+
133
+        If 小間距_ch.Checked = False And 中間距_ch.Checked = False And 大間距_ch.Checked = True Then
134
+            採購清單_dgv.RowTemplate.Height = 95
135
+        ElseIf 小間距_ch.Checked = False And 中間距_ch.Checked = True And 大間距_ch.Checked = False Then
136
+            採購清單_dgv.RowTemplate.Height = 60
137
+        ElseIf 小間距_ch.Checked = True And 中間距_ch.Checked = False And 大間距_ch.Checked = False Then
138
+            採購清單_dgv.RowTemplate.Height = 25
139
+        End If
140
+
141
+        SQL_採購對帳單_明細()
142
+        da.Fill(ds) : 採購清單_dgv.DataSource = ds.Tables(0) : conn.Close()
143
+
144
+        採購清單_dgv.Columns(0).Visible = False : 採購清單_dgv.Columns(1).FillWeight = 80 : 採購清單_dgv.Columns(2).Visible = False : 採購清單_dgv.Columns(3).FillWeight = 80
145
+        採購清單_dgv.Columns(4).FillWeight = 80 : 採購清單_dgv.Columns(5).FillWeight = 200 : 採購清單_dgv.Columns(6).Visible = False : 採購清單_dgv.Columns(7).FillWeight = 100
146
+        採購清單_dgv.Columns(8).Visible = False : 採購清單_dgv.Columns(9).FillWeight = 160 : 採購清單_dgv.Columns(10).Visible = False : 採購清單_dgv.Columns(11).FillWeight = 95
147
+        採購清單_dgv.Columns(12).FillWeight = 145 : 採購清單_dgv.Columns(13).Visible = False : 採購清單_dgv.Columns(14).FillWeight = 45 : 採購清單_dgv.Columns(15).FillWeight = 95
148
+        採購清單_dgv.Columns(16).FillWeight = 80 : 採購清單_dgv.Columns(17).Visible = False : 採購清單_dgv.Columns(18).FillWeight = 70 : 採購清單_dgv.Columns(19).FillWeight = 70
149
+        採購清單_dgv.Columns(20).FillWeight = 70 : 採購清單_dgv.Columns(21).FillWeight = 70 : 採購清單_dgv.Columns(22).FillWeight = 70 : 採購清單_dgv.Columns(23).FillWeight = 45
150
+        採購清單_dgv.Columns(24).FillWeight = 45
151
+
152
+        採購清單_dgv.Columns("數量").DefaultCellStyle.Format = "#,##0" : 採購清單_dgv.Columns("成本").DefaultCellStyle.Format = "#,##0"
153
+        採購清單_dgv.Columns("金額").DefaultCellStyle.Format = "#,##0"
154
+        採購清單_dgv.Columns("數量").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
155
+        採購清單_dgv.Columns("數量").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
156
+        採購清單_dgv.Columns("成本").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
157
+        採購清單_dgv.Columns("成本").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
158
+        採購清單_dgv.Columns("金額").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
159
+        採購清單_dgv.Columns("金額").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
160
+
161
+        採購清單_dgv.Columns(1).ReadOnly = True : 採購清單_dgv.Columns(3).ReadOnly = True : 採購清單_dgv.Columns(4).ReadOnly = True : 採購清單_dgv.Columns(5).ReadOnly = True
162
+        採購清單_dgv.Columns(7).ReadOnly = True : 採購清單_dgv.Columns(9).ReadOnly = True : 採購清單_dgv.Columns(11).ReadOnly = True : 採購清單_dgv.Columns(12).ReadOnly = True
163
+        採購清單_dgv.Columns(13).ReadOnly = True : 採購清單_dgv.Columns(14).ReadOnly = True : 採購清單_dgv.Columns(15).ReadOnly = True : 採購清單_dgv.Columns(16).ReadOnly = True
164
+        採購清單_dgv.Columns(17).ReadOnly = True : 採購清單_dgv.Columns(18).ReadOnly = True : 採購清單_dgv.Columns(19).ReadOnly = True : 採購清單_dgv.Columns(20).ReadOnly = True
165
+        採購清單_dgv.Columns(21).ReadOnly = True : 採購清單_dgv.Columns(22).ReadOnly = True : 採購清單_dgv.Columns(23).ReadOnly = True
166
+
167
+        採購清單_dgv.EditMode = DataGridViewEditMode.EditOnEnter
168
+        資料筆數_tb.Text = 採購清單_dgv.Rows.Count
169
+        Set_合記計算()
170
+    End Sub
171
+    Private Sub Set_清單3()
172
+        合計_dgv.DataSource = Nothing : da2.Clear()
173
+        合計_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
174
+        合計_dgv.ColumnHeadersHeight = 25
175
+        合計_dgv.AllowUserToAddRows = False
176
+
177
+        SQL_採購對帳單_合計()
178
+        da.Fill(da2) : 合計_dgv.DataSource = da2.Tables(0) : conn.Close()
179
+
180
+        For i As Integer = 0 To 合計_dgv.Rows.Count - 1
181
+            合計_dgv("個人", i).Value = "0" : 合計_dgv("公司", i).Value = "0"
182
+        Next
183
+        For i As Integer = 0 To 合計_dgv.Rows.Count - 1
184
+            For ii As Integer = 0 To 供應商_dgv.Rows.Count - 1
185
+                If 供應商_dgv("票期", ii).Value.ToString = 合計_dgv("票期", i).Value.ToString Then
186
+                    合計_dgv("公司", i).Value = Val(合計_dgv("公司", i).Value.ToString) + Val(供應商_dgv("公司", ii).Value)
187
+                    合計_dgv("個人", i).Value = Val(合計_dgv("個人", i).Value.ToString) + Val(供應商_dgv("個人", ii).Value)
188
+                End If
189
+            Next
190
+        Next
191
+        合計_dgv.Columns("公司").DefaultCellStyle.Format = "#,##0"
192
+        合計_dgv.Columns("公司").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
193
+        合計_dgv.Columns("公司").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
194
+        合計_dgv.Columns("個人").DefaultCellStyle.Format = "#,##0"
195
+        合計_dgv.Columns("個人").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
196
+        合計_dgv.Columns("個人").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
197
+    End Sub
198
+    Private Sub Set_合記計算()
199
+        當月貨款_tb.Text = "0" : 採購金額1_tb.Text = "0"
200
+        For i As Integer = 0 To 採購清單_dgv.Rows.Count - 1
201
+            採購清單_dgv("金額", i).Value = 採購清單_dgv("數量", i).Value * 採購清單_dgv("成本", i).Value
202
+            當月貨款_tb.Text = Val(當月貨款_tb.Text) + 採購清單_dgv("金額", i).Value
203
+            If 供應商_tb.Text = 採購清單_dgv("供應商", i).Value.ToString Then
204
+                採購金額1_tb.Text = Val(採購金額1_tb.Text) + 採購清單_dgv("金額", i).Value
205
+            End If
206
+        Next
207
+        當月貨款_tb.Text = Strings.Format(Val(當月貨款_tb.Text), "#,##0")
208
+        採購金額1_tb.Text = Strings.Format(Val(採購金額1_tb.Text), "#,##0") : 稅金_tb.Text = Strings.Format(Val(稅金_tb.Text), "#,##0")
209
+        廣告費_tb.Text = Strings.Format(Val(廣告費_tb.Text), "#,##0") : 其他扣款_tb.Text = Strings.Format(Val(其他扣款_tb.Text), "#,##0") : 實付金額_tb.Text = Strings.Format(Val(實付金額_tb.Text), "#,##0")
210
+        公司實付_tb.Text = Strings.Format(Val(公司實付_tb.Text), "#,##0") : 個人實付_tb.Text = Strings.Format(Val(個人實付_tb.Text), "#,##0")
211
+    End Sub
212
+    Private Sub 日期格式()
213
+        If 會計月_ch.Checked = True Then
214
+            '-------------日期一----------------------------------------------------------------------------------------
215
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 開始日期_dtp.Value = DTP
216
+            開始日期_dtp.Value = 開始日期_dtp.Value.AddMonths(-1)
217
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "26" : 開始日期_dtp.Value = DTP
218
+            '-------------日期二----------------------------------------------------------------------------------------
219
+            DTP = Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 8) & "25" : 結束日期_dtp.Value = DTP
220
+        Else
221
+            '-------------日期一----------------------------------------------------------------------------------------
222
+            開始日期_dtp.Value = 開始日期_dtp.Value.AddMonths(1)
223
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 開始日期_dtp.Value = DTP
224
+            '-------------日期二----------------------------------------------------------------------------------------
225
+            DTP = Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 結束日期_dtp.Value = DTP
226
+            結束日期_dtp.Value = 結束日期_dtp.Value.AddMonths(1) : 結束日期_dtp.Value = 結束日期_dtp.Value.AddDays(-1)
227
+        End If
228
+    End Sub
229
+    Private Sub ComboBox1下拉表單資料載入()
230
+        conn.Close()
231
+        SQL_採購應付帳款_查詢公帳控制表會計科目() : ComboBox1.Items.Clear() : ComboBox6.Items.Clear()
232
+        While (dr.Read()) : ComboBox1.Items.Add(dr("會計科目")) : ComboBox6.Items.Add(dr("編號")) : End While : conn.Close()
233
+        If ComboBox1.Items.Count <> 0 Then : ComboBox1.SelectedIndex = 0 : End If
234
+    End Sub
235
+    Private Sub ComboBox2下拉表單資料載入()
236
+        conn.Close()
237
+        SQL_採購應付帳款_查詢最後一筆公帳控制表會計科目() : ComboBox5.Items.Clear() : ComboBox2.Items.Clear() : ComboBox5.Text = "" : ComboBox2.Text = ""
238
+        While (dr.Read()) : ComboBox5.Items.Add(dr("第一階")) : ComboBox2.Items.Add(dr("編號")) : End While : conn.Close()
239
+    End Sub
240
+    Private Sub ComboBox3下拉表單資料載入()
241
+        conn.Close()
242
+        SQL_採購應付帳款_查詢最左邊公帳控制表會計科目() : ComboBox3.Items.Clear() : ComboBox4.Items.Clear() : ComboBox3.Text = "" : ComboBox4.Text = ""
243
+        While (dr.Read()) : ComboBox3.Items.Add(dr("第二階")) : ComboBox4.Items.Add(dr("編號")) : End While : conn.Close()
244
+    End Sub
245
+    Private Sub 採購對帳單_Load(sender As Object, e As EventArgs) Handles MyBase.Load
246
+        Me.MdiParent = YD_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
247
+        小間距_ch.Checked = True : 供應商_dgv.Visible = False : 供應商_dgv.Visible = True : 應負帳款退回_bt.Visible = False
248
+        提示_lb.Text = "目前呈現表單為應付帳款,若要退回採購明細資料請點選下方採購明細"
249
+        首次 = True : 日期格式() : 首次 = False : Set_清單3()
250
+        ComboBox3.Items.Clear() : ComboBox4.Items.Clear() : ComboBox3.Text = "" : ComboBox4.Text = ""
251
+        ComboBox5.Items.Clear() : ComboBox2.Items.Clear() : ComboBox5.Text = "" : ComboBox2.Text = ""
252
+        ComboBox6.Visible = False
253
+        ComboBox2下拉表單資料載入() : 幣別_cb.SelectedIndex = 0
254
+        ComboBox5.SelectedIndex = 0 : ComboBox3.SelectedIndex = 1 : ComboBox1.SelectedIndex = 5 : ComboBox2.SelectedIndex = 0 : ComboBox4.SelectedIndex = 1
255
+    End Sub
256
+    Private Sub 供應商_dgv_CellEndEdit(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 供應商_dgv.CellEndEdit
257
+        For i As Integer = 0 To 供應商_dgv.Rows.Count - 1
258
+            If 供應商_dgv("稅金%", i).Value.ToString = "" Then : 供應商_dgv("稅金%", i).Value = 供應商_dgv("稅金1", i).Value.ToString : End If
259
+            供應商_dgv("稅金", i).Value = 供應商_dgv("當月貨款", i).Value / 100 * 供應商_dgv("稅金%", i).Value
260
+            If 供應商_dgv("廣告%", i).Value.ToString = "" Then : 供應商_dgv("廣告%", i).Value = 供應商_dgv("廣告1", i).Value.ToString : End If
261
+            供應商_dgv("廣告", i).Value = 供應商_dgv("當月貨款", i).Value / 100 * 供應商_dgv("廣告%", i).Value
262
+            If 供應商_dgv("其他扣款", i).Value.ToString = "" Then : 供應商_dgv("其他扣款", i).Value = "0" : End If
263
+            供應商_dgv("實付金額", i).Value = 供應商_dgv("當月貨款", i).Value - 供應商_dgv("稅金", i).Value - 供應商_dgv("廣告", i).Value - 供應商_dgv("其他扣款", i).Value
264
+            If 供應商_dgv("公司%", i).Value.ToString = "" Then : 供應商_dgv("公司%", i).Value = "0" : End If
265
+            If 供應商_dgv("個人%", i).Value.ToString = "" Then : 供應商_dgv("個人%", i).Value = "0" : End If
266
+            供應商_dgv("個人%", i).Value = 100 - 供應商_dgv("公司%", i).Value
267
+            供應商_dgv("公司", i).Value = 供應商_dgv("實付金額", i).Value / 100 * 供應商_dgv("公司%", i).Value
268
+            供應商_dgv("個人", i).Value = 供應商_dgv("實付金額", i).Value / 100 * 供應商_dgv("個人%", i).Value
269
+
270
+            If 供應商_dgv("票期", i).Value.ToString = "" Then
271
+                If Strings.Mid(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 6, 2) = "12" Then
272
+                    If 供應商_dgv("票期1", i).Value.ToString = "30" Then
273
+                        供應商_dgv("票期1", i).Value = "28"
274
+                    End If
275
+                End If
276
+                DTP1.Value = 結束日期_dtp.Value : DTP1.Value = DTP1.Value.AddMonths(2)
277
+                供應商_dgv("票期", i).Value = Strings.Left(Strings.Format(DTP1.Value, "yyyy/MM/dd"), 7) & "/" & 供應商_dgv("票期1", i).Value.ToString
278
+            End If
279
+        Next
280
+
281
+        Dim EU As String
282
+        EU = 供應商_dgv("票期", e.RowIndex).Value.ToString
283
+        If EU = "" Then : Else
284
+            If IsDate(EU) Then
285
+                DTP2.Text = EU : 供應商_dgv.Rows(e.RowIndex).Cells("票期").Value = Strings.Format(DTP2.Value, "yyyy/MM/dd")
286
+            Else
287
+                供應商_dgv.Rows(e.RowIndex).Cells("票期").Value = ""
288
+            End If
289
+        End If
290
+        For i As Integer = 0 To 合計_dgv.Rows.Count - 1
291
+            合計_dgv("個人", i).Value = "0" : 合計_dgv("公司", i).Value = "0"
292
+        Next
293
+        For i As Integer = 0 To 合計_dgv.Rows.Count - 1
294
+            For ii As Integer = 0 To 供應商_dgv.Rows.Count - 1
295
+                If 供應商_dgv("票期", ii).Value.ToString = 合計_dgv("票期", i).Value.ToString Then
296
+                    合計_dgv("公司", i).Value = Val(合計_dgv("公司", i).Value.ToString) + Val(供應商_dgv("公司", ii).Value)
297
+                    合計_dgv("個人", i).Value = Val(合計_dgv("個人", i).Value.ToString) + Val(供應商_dgv("個人", ii).Value)
298
+                End If
299
+            Next
300
+        Next
301
+    End Sub
302
+    Private Sub 採購清單_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 採購清單_dgv.RowPostPaint
303
+        Dim linePen As New Pen(Color.Blue, 2)
304
+        If e.RowIndex = 採購清單_dgv.Rows.Count - 1 Then : Exit Sub : Else
305
+            If 採購清單_dgv("供應商", e.RowIndex).Value.ToString <> 採購清單_dgv("供應商", e.RowIndex + 1).Value.ToString Then
306
+                Dim startX As Integer = IIf(採購清單_dgv.RowHeadersVisible, 採購清單_dgv.RowHeadersWidth, 0) : Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
307
+                Dim endX As Integer = startX + 採購清單_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 採購清單_dgv.HorizontalScrollingOffset
308
+                e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
309
+            End If
310
+        End If
311
+    End Sub
312
+    Private Sub 採購清單_dgv_CellEndEdit(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 採購清單_dgv.CellEndEdit
313
+        PA20 = 採購清單_dgv(8, e.RowIndex).Value : SQL_銷售明細_改倉名()
314
+        If dr.Read() Then : 採購清單_dgv("倉儲狀態", e.RowIndex).Value = dr("倉名編號") : End If
315
+        PA19 = 採購清單_dgv(11, e.RowIndex).Value : SQL_銷售明細_改物料訂製狀態()
316
+        If dr.Read() Then : 採購清單_dgv("訂製狀態", e.RowIndex).Value = dr("編碼") : End If
317
+        PA18 = 採購清單_dgv(14, e.RowIndex).Value : SQL_銷售明細_倉儲狀態()
318
+        If dr.Read() Then : 採購清單_dgv("物料狀態", e.RowIndex).Value = dr("編碼") : End If : conn.Close()
319
+
320
+        Dim EU(1) As String
321
+        EU(0) = 採購清單_dgv("採購日期", e.RowIndex).Value.ToString
322
+        If EU(0) = "" Then : Else
323
+            日期1_dtp.Text = EU(0) : 採購清單_dgv.Rows(e.RowIndex).Cells("採購日期").Value = Strings.Format(日期1_dtp.Value, "yyyy/MM/dd")
324
+        End If
325
+        EU(1) = 採購清單_dgv("預計進廠日", e.RowIndex).Value.ToString
326
+        If EU(1) = "" Then : Else
327
+            日期2_dtp.Text = EU(1) : 採購清單_dgv.Rows(e.RowIndex).Cells("預計進廠日").Value = Strings.Format(日期2_dtp.Value, "yyyy/MM/dd")
328
+        End If
329
+    End Sub
330
+    Private Sub 採購清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 採購清單_dgv.CellClick
331
+        If e.RowIndex = -1 Then : Else
332
+            供應商_tb.Text = 採購清單_dgv("供應商", e.RowIndex).Value.ToString
333
+            資料流水號_tb.Text = 採購清單_dgv.Rows(e.RowIndex).Cells("資料流水號").Value.ToString
334
+            PA15 = 採購清單_dgv(0, e.RowIndex).Value.ToString
335
+            採購金額1_tb.Text = 採購清單_dgv.Rows(e.RowIndex).Cells("金額").Value
336
+            採購金額1_tb.Text = Strings.Format(Val(採購金額1_tb.Text), "#,##0")
337
+            物料圖1_pb.Image = Nothing : PA1 = 採購清單_dgv.Rows(e.RowIndex).Cells("料號").Value : SQL_物料檔案_是否有圖()
338
+            If dr.Read() Then
339
+                If dr("是否有圖") = True Then
340
+                    PA = 採購清單_dgv.Rows(e.RowIndex).Cells("料號").Value : SQL_物料圖庫_圖片顯示() '--------------------圖片顯示
341
+                    While dr.Read() = True
342
+                        Dim unused As Byte() = New Byte(-1) {}
343
+                        Dim bytes As Byte() = DirectCast(dr.Item("圖片"), Byte())
344
+                        Dim oStream As New MemoryStream(bytes)
345
+                        物料圖1_pb.Image = Bitmap.FromStream(oStream)
346
+                    End While
347
+                    conn.Close()
348
+                    物料圖1_pb.SizeMode = 4
349
+                Else
350
+                    物料圖1_pb.Image = Nothing
351
+                End If
352
+            End If : conn.Close()
353
+        End If
354
+
355
+    End Sub
356
+    Private Sub 上個月_bt_Click(sender As Object, e As EventArgs) Handles 上個月_bt.Click
357
+        If 會計月_ch.Checked = True Then
358
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
359
+            開始日期_dtp.Value = 中間日期_dtp.Value
360
+            結束日期_dtp.Value = 中間日期_dtp.Value
361
+        Else
362
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
363
+            開始日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
364
+            結束日期_dtp.Value = 中間日期_dtp.Value
365
+        End If
366
+        日期格式()
367
+    End Sub
368
+    Private Sub 下個月_bt_Click(sender As Object, e As EventArgs) Handles 下個月_bt.Click
369
+        If 會計月_ch.Checked = True Then
370
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(1)
371
+            開始日期_dtp.Value = 中間日期_dtp.Value
372
+            結束日期_dtp.Value = 中間日期_dtp.Value
373
+        Else
374
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(1)
375
+            開始日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
376
+            結束日期_dtp.Value = 中間日期_dtp.Value
377
+        End If
378
+        日期格式()
379
+    End Sub
380
+    Private Sub 開始日期_dtp_ValueChanged(sender As Object, e As EventArgs) Handles 開始日期_dtp.ValueChanged
381
+        Set_清單1() : Set_清單2()
382
+    End Sub
383
+    Private Sub 結束日期_dtp_ValueChanged(sender As Object, e As EventArgs) Handles 結束日期_dtp.ValueChanged
384
+        Set_清單1() : Set_清單2()
385
+    End Sub
386
+    Private Sub 會計月_CheckedChanged(sender As Object, e As EventArgs) Handles 會計月_ch.Click
387
+        會計月_ch.Checked = True : 一般月_ch.Checked = False : 日期格式()
388
+    End Sub
389
+    Private Sub 一般月_CheckedChanged(sender As Object, e As EventArgs) Handles 一般月_ch.Click
390
+        會計月_ch.Checked = False : 一般月_ch.Checked = True : 日期格式()
391
+    End Sub
392
+    Private Sub 窄間距_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 小間距_ch.Click
393
+        小間距_ch.Checked = True : 中間距_ch.Checked = False : 大間距_ch.Checked = False
394
+        Set_清單2()
395
+    End Sub
396
+    Private Sub 中間距_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 中間距_ch.Click
397
+        小間距_ch.Checked = False : 中間距_ch.Checked = True : 大間距_ch.Checked = False
398
+        Set_清單2()
399
+    End Sub
400
+    Private Sub 大間距_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 大間距_ch.Click
401
+        小間距_ch.Checked = False : 中間距_ch.Checked = False : 大間距_ch.Checked = True
402
+        Set_清單2()
403
+    End Sub
404
+    Private Sub 採購明細_bt_Click(sender As Object, e As EventArgs) Handles 採購明細_bt.Click
405
+        採購明細_bt.Enabled = False : 應負帳款_bt.Enabled = True : 採購清單_dgv.Visible = True : 供應商_dgv.Visible = False
406
+        應負帳款退回_bt.Visible = True : 提示_lb.Text = "要將採購明細資料退回時,請點選採購明細中要退回的資料後點選左邊的應負帳款退回"
407
+        刪除_bt.Enabled = False : ComboBox5.Enabled = False : ComboBox2.Enabled = False : ComboBox3.Enabled = False : ComboBox4.Enabled = False
408
+        ComboBox1.Enabled = False : 幣別_cb.Enabled = False
409
+    End Sub
410
+    Private Sub 應負帳款_bt_Click(sender As Object, e As EventArgs) Handles 應負帳款_bt.Click
411
+        採購明細_bt.Enabled = True : 應負帳款_bt.Enabled = False : 採購清單_dgv.Visible = False : 供應商_dgv.Visible = True
412
+        應負帳款退回_bt.Visible = False : 提示_lb.Text = "目前呈現表單為應付帳款,若要退回採購明細資料請點選下方採購明細"
413
+        刪除_bt.Enabled = True : ComboBox5.Enabled = True : ComboBox2.Enabled = True : ComboBox3.Enabled = True : ComboBox4.Enabled = True
414
+        ComboBox1.Enabled = True : 幣別_cb.Enabled = True
415
+    End Sub
416
+    Private Sub 重新讀取_bt_Click(sender As Object, e As EventArgs) Handles 重新讀取_bt.Click
417
+        Set_清單1() : Set_清單2()
418
+    End Sub
419
+    Private Shared Function NewMethod(xlBook As Microsoft.Office.Interop.Excel.Workbook) As Microsoft.Office.Interop.Excel.Worksheet
420
+        Return CType(xlBook.Worksheets.Add, Microsoft.Office.Interop.Excel.Worksheet)
421
+    End Function
422
+    Private Sub 匯出Excel_bt_Click(sender As Object, e As EventArgs) Handles 匯出Excel_bt.Click
423
+        xlApp = CType(CreateObject("Excel.Application"), Microsoft.Office.Interop.Excel.Application)
424
+        xlApp.Visible = True
425
+        xlApp.DisplayAlerts = True
426
+        xlApp.Application.WindowState = xlMaximized
427
+        xlBook = xlApp.Workbooks.Add
428
+        xlSheet = NewMethod(xlBook)
429
+        xlBook.Activate()
430
+        xlSheet.Activate()
431
+
432
+        xlSheet.Cells(1, 1) = "雅邸家具有限公司-採購應付帳款 - " & Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 7)
433
+        xlSheet.Cells(2, 1) = "編號 "
434
+        xlSheet.Cells(2, 2) = "供應商"
435
+        xlSheet.Cells(2, 3) = "當月貨款"
436
+        xlSheet.Cells(2, 4) = "稅金"
437
+        xlSheet.Cells(2, 5) = "廣告"
438
+        xlSheet.Cells(2, 6) = "其他扣款"
439
+        xlSheet.Cells(2, 7) = "實付金額"
440
+        xlSheet.Cells(2, 8) = "票期"
441
+        xlSheet.Cells(2, 9) = "公司"
442
+        xlSheet.Cells(2, 10) = "個人"
443
+        xlSheet.Cells(2, 11) = "支票_公司"
444
+        xlSheet.Cells(2, 12) = "支票_私人"
445
+
446
+        For i As Integer = 0 To 供應商_dgv.Rows.Count - 1
447
+            xlSheet.Cells(i + 3, 1) = 供應商_dgv.Rows(i).Cells("編號").Value
448
+            xlSheet.Cells(i + 3, 2) = 供應商_dgv.Rows(i).Cells("供應商").Value
449
+            xlSheet.Cells(i + 3, 3) = 供應商_dgv.Rows(i).Cells("當月貨款").Value
450
+            xlSheet.Cells(i + 3, 4) = 供應商_dgv.Rows(i).Cells("稅金").Value
451
+            xlSheet.Cells(i + 3, 5) = 供應商_dgv.Rows(i).Cells("廣告").Value
452
+            xlSheet.Cells(i + 3, 6) = 供應商_dgv.Rows(i).Cells("其他扣款").Value
453
+            xlSheet.Cells(i + 3, 7) = 供應商_dgv.Rows(i).Cells("實付金額").Value
454
+            xlSheet.Cells(i + 3, 8) = 供應商_dgv.Rows(i).Cells("票期").Value
455
+            xlSheet.Cells(i + 3, 9) = 供應商_dgv.Rows(i).Cells("公司").Value
456
+            xlSheet.Cells(i + 3, 10) = 供應商_dgv.Rows(i).Cells("個人").Value
457
+            xlSheet.Cells(i + 3, 11) = 供應商_dgv.Rows(i).Cells("支票_公司").Value
458
+            xlSheet.Cells(i + 3, 12) = 供應商_dgv.Rows(i).Cells("支票_私人").Value
459
+            N2 = i + 3
460
+        Next i
461
+
462
+        xlSheet.Cells(N2 + 1, 1) = "合計"
463
+        xlSheet.Cells(N2 + 1, 3) = "=SUM(C3:C" & N2 & ")"
464
+        xlSheet.Cells(N2 + 1, 4) = "=SUM(D3:D" & N2 & ")"
465
+        xlSheet.Cells(N2 + 1, 5) = "=SUM(E3:E" & N2 & ")"
466
+        xlSheet.Cells(N2 + 1, 6) = "=SUM(F3:F" & N2 & ")"
467
+        xlSheet.Cells(N2 + 1, 7) = "=SUM(G3:G" & N2 & ")"
468
+        xlSheet.Cells(N2 + 1, 9) = "=SUM(I3:I" & N2 & ")"
469
+        xlSheet.Cells(N2 + 1, 10) = "=SUM(J3:J" & N2 & ")"
470
+        BB(xlApp, xlSheet)
471
+
472
+        xlSheet.Cells(N2 + 4, 8) = "票期"
473
+        xlSheet.Cells(N2 + 4, 9) = "公司"
474
+        xlSheet.Cells(N2 + 4, 10) = "個人"
475
+
476
+        For i As Integer = 0 To 合計_dgv.Rows.Count - 1
477
+            xlSheet.Cells(i + N2 + 5, 8) = 合計_dgv.Rows(i).Cells("票期").Value
478
+            xlSheet.Cells(i + N2 + 5, 9) = 合計_dgv.Rows(i).Cells("公司").Value
479
+            xlSheet.Cells(i + N2 + 5, 10) = 合計_dgv.Rows(i).Cells("個人").Value
480
+            N1 = i + N2 + 5
481
+        Next i
482
+        CC(xlApp, xlSheet)
483
+
484
+        xlSheet.PageSetup.PrintArea = ""
485
+        xlApp.Cells.Select()
486
+        xlApp.Application.WindowState = xlMinimized
487
+        MsgBox("列印完成!!!")
488
+    End Sub
489
+    Private Sub BB(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
490
+        xlSheet.Cells.Select()
491
+
492
+        With myExcel.Selection.Font
493
+            .Name = "微軟正黑體" : .Size = 11 : .Strikethrough = False : .Superscript = False : .Subscript = False
494
+            .OutlineFont = False : .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1
495
+            .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
496
+        End With
497
+
498
+        xlSheet.Rows("1:1").Select
499
+        myExcel.Selection.RowHeight = 35
500
+        xlSheet.Rows("2:2").Select
501
+        myExcel.Selection.RowHeight = 30
502
+        xlSheet.Rows("1:1").Select
503
+
504
+        With myExcel.Selection.Font
505
+            .Name = "微軟正黑體" : .Size = 22 : .Strikethrough = False : .Superscript = False : .Subscript = False
506
+            .OutlineFont = False : .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0
507
+            .ThemeFont = xlThemeFontNone
508
+        End With
509
+
510
+        xlSheet.Rows("2:2").Select
511
+        With myExcel.Selection
512
+            .HorizontalAlignment = xlCenter : .VerticalAlignment = xlBottom : .WrapText = False : .Orientation = 0 : .AddIndent = False
513
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
514
+        End With
515
+
516
+        With myExcel.Selection
517
+            .HorizontalAlignment = xlCenter : .VerticalAlignment = xlTop : .WrapText = False : .Orientation = 0 : .AddIndent = False
518
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
519
+        End With
520
+
521
+        xlSheet.Columns("A:A").Select
522
+        xlSheet.Range("A2").Activate()
523
+        myExcel.Selection.ColumnWidth = 7
524
+        xlSheet.Range("A3:A8").Select()
525
+
526
+        With myExcel.Selection
527
+            .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = True : .Orientation = 0 : .AddIndent = False
528
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
529
+        End With
530
+
531
+        With myExcel.Selection
532
+            .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
533
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
534
+        End With
535
+
536
+        With myExcel.Selection
537
+            .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
538
+            .ReadingOrder = xlContext : .MergeCells = False
539
+        End With
540
+
541
+        xlSheet.Range("P47").Select()
542
+        xlSheet.Columns("B:B").Select : xlSheet.Range("B2").Activate() : myExcel.Selection.ColumnWidth = 20
543
+        xlSheet.Columns("C:C").Select : xlSheet.Range("C2").Activate() : myExcel.Selection.ColumnWidth = 10
544
+        xlSheet.Columns("D:D").Select : xlSheet.Range("D2").Activate() : myExcel.Selection.ColumnWidth = 8
545
+        xlSheet.Columns("E:E").Select : xlSheet.Range("E2").Activate() : myExcel.Selection.ColumnWidth = 8
546
+        xlSheet.Columns("F:F").Select : xlSheet.Range("F2").Activate() : myExcel.Selection.ColumnWidth = 9
547
+        xlSheet.Columns("G:G").Select : xlSheet.Range("G2").Activate() : myExcel.Selection.ColumnWidth = 9
548
+        xlSheet.Columns("H:H").Select : xlSheet.Range("H2").Activate() : myExcel.Selection.ColumnWidth = 12
549
+        xlSheet.Columns("I:I").Select : xlSheet.Range("I2").Activate() : myExcel.Selection.ColumnWidth = 8
550
+        xlSheet.Columns("J:J").Select : xlSheet.Range("J2").Activate() : myExcel.Selection.ColumnWidth = 10
551
+        xlSheet.Columns("K:K").Select : xlSheet.Range("K2").Activate() : myExcel.Selection.ColumnWidth = 20
552
+        xlSheet.Columns("L:L").Select : xlSheet.Range("L2").Activate() : myExcel.Selection.ColumnWidth = 14
553
+
554
+        With myExcel.Selection : .HorizontalAlignment = xlGeneral : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
555
+            .ShrinkToFit = False : .ReadingOrder = xlContext
556
+        End With
557
+
558
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
559
+            .ShrinkToFit = False : .ReadingOrder = xlContext
560
+        End With
561
+
562
+        xlSheet.Rows("3:3").Select
563
+        myExcel.ActiveWindow.FreezePanes = False
564
+        myExcel.ActiveWindow.FreezePanes = True
565
+        xlSheet.Range("A1:L3").Select()
566
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone
567
+        myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
568
+
569
+        With myExcel.Selection.Borders(xlEdgeLeft)
570
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
571
+        End With
572
+
573
+        With myExcel.Selection.Borders(xlEdgeTop)
574
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
575
+        End With
576
+
577
+        With myExcel.Selection.Borders(xlEdgeBottom)
578
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
579
+        End With
580
+
581
+        With myExcel.Selection.Borders(xlEdgeRight)
582
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
583
+        End With
584
+
585
+        With myExcel.Selection.Borders(xlInsideVertical)
586
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
587
+        End With
588
+
589
+        With myExcel.Selection.Borders(xlInsideHorizontal)
590
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
591
+        End With
592
+
593
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
594
+
595
+        With myExcel.Selection.Borders(xlEdgeLeft)
596
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
597
+        End With
598
+
599
+        With myExcel.Selection.Borders(xlEdgeTop)
600
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
601
+        End With
602
+
603
+        With myExcel.Selection.Borders(xlEdgeBottom)
604
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
605
+        End With
606
+
607
+        With myExcel.Selection.Borders(xlEdgeRight)
608
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
609
+        End With
610
+
611
+        With myExcel.Selection.Borders(xlInsideVertical)
612
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
613
+        End With
614
+
615
+        With myExcel.Selection.Borders(xlInsideHorizontal)
616
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
617
+        End With
618
+
619
+        xlSheet.Range("A3:L" & N2).Select()
620
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
621
+
622
+        With myExcel.Selection.Borders(xlEdgeLeft)
623
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
624
+        End With
625
+
626
+        With myExcel.Selection.Borders(xlEdgeTop)
627
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
628
+        End With
629
+
630
+        With myExcel.Selection.Borders(xlEdgeBottom)
631
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
632
+        End With
633
+
634
+        With myExcel.Selection.Borders(xlEdgeRight)
635
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
636
+        End With
637
+
638
+        With myExcel.Selection.Borders(xlInsideVertical)
639
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
640
+        End With
641
+
642
+        With myExcel.Selection.Borders(xlInsideHorizontal)
643
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
644
+        End With
645
+
646
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
647
+
648
+        With myExcel.Selection.Borders(xlEdgeLeft)
649
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
650
+        End With
651
+
652
+        With myExcel.Selection.Borders(xlEdgeTop)
653
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
654
+        End With
655
+
656
+        With myExcel.Selection.Borders(xlEdgeBottom)
657
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
658
+        End With
659
+
660
+        With myExcel.Selection.Borders(xlEdgeRight)
661
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
662
+        End With
663
+        With myExcel.Selection.Borders(xlInsideVertical)
664
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
665
+        End With
666
+        With myExcel.Selection.Borders(xlInsideHorizontal)
667
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
668
+        End With
669
+
670
+        myExcel.ActiveWindow.DisplayGridlines = False : xlSheet.Range("C3:G9").Select()
671
+
672
+        With myExcel.Selection
673
+            .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
674
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
675
+        End With
676
+
677
+        xlSheet.Columns("K:K").Select() : xlSheet.Range("K2").Activate() : myExcel.Selection.ColumnWidth = 35 : xlSheet.Rows("2:2").Select
678
+        xlSheet.Range("A1:L1").Select() : myExcel.Selection.Font.Bold = True : xlSheet.Rows("2:2").Select
679
+
680
+        With myExcel.Selection.Font
681
+            .Name = "微軟正黑體" : .Size = 12 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
682
+            .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
683
+        End With
684
+
685
+        xlSheet.Range("I3:J9").Select()
686
+
687
+        With myExcel.Selection
688
+            .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
689
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
690
+        End With
691
+
692
+        xlSheet.Columns("K:K").Select : xlSheet.Range("K2").Activate()
693
+        myExcel.Selection.ColumnWidth = 30 : xlSheet.Rows("2:2").Select
694
+
695
+        With myExcel.Selection
696
+            .HorizontalAlignment = xlGeneral : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
697
+            .ShrinkToFit = False : .ReadingOrder = xlContext
698
+        End With
699
+        With myExcel.Selection
700
+            .HorizontalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
701
+            .ShrinkToFit = False : .ReadingOrder = xlContext
702
+        End With
703
+
704
+        xlSheet.Rows("2:2").Select
705
+        xlSheet.Columns("A:A").Select
706
+        xlSheet.Range("A2").Activate()
707
+
708
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
709
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext
710
+        End With
711
+
712
+        xlSheet.Range("P6,C:G,I:J").Select() : xlSheet.Range("I2").Activate()
713
+        myExcel.Selection.Style = "Comma" : myExcel.Selection.Style = "Comma"
714
+        myExcel.Selection.NumberFormatLocal = "_-* #,##0.0_-;-* #,##0.0_-;_-* ""-""??_-;_-@_-"
715
+        myExcel.Selection.NumberFormatLocal = "_-* #,##0_-;-* #,##0_-;_-* ""-""??_-;_-@_-"
716
+        xlSheet.Range("A1:L1").Select()
717
+
718
+        With myExcel.Selection
719
+            .HorizontalAlignment = xlCenter : .VerticalAlignment = xlBottom : .WrapText = False : .Orientation = 0 : .AddIndent = False
720
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
721
+            myExcel.Selection.Merge : xlSheet.Columns("B:B").Select
722
+            .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext
723
+        End With
724
+
725
+        With myExcel.Selection
726
+            .HorizontalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
727
+            .ShrinkToFit = False : .ReadingOrder = xlContext
728
+        End With
729
+    End Sub
730
+    Private Sub CC(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
731
+        xlSheet.Range("H" & N2 + 4 & ":J" & N1).Select()
732
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone
733
+        myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
734
+
735
+        With myExcel.Selection.Borders(xlEdgeLeft)
736
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
737
+        End With
738
+        With myExcel.Selection.Borders(xlEdgeTop)
739
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
740
+        End With
741
+        With myExcel.Selection.Borders(xlEdgeBottom)
742
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
743
+        End With
744
+        With myExcel.Selection.Borders(xlEdgeRight)
745
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
746
+        End With
747
+        With myExcel.Selection.Borders(xlInsideVertical)
748
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
749
+        End With
750
+        With myExcel.Selection.Borders(xlInsideHorizontal)
751
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
752
+        End With
753
+
754
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
755
+
756
+        With myExcel.Selection.Borders(xlEdgeLeft)
757
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
758
+        End With
759
+        With myExcel.Selection.Borders(xlEdgeTop)
760
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
761
+        End With
762
+        With myExcel.Selection.Borders(xlEdgeBottom)
763
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
764
+        End With
765
+        With myExcel.Selection.Borders(xlEdgeRight)
766
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
767
+        End With
768
+        With myExcel.Selection.Borders(xlInsideVertical)
769
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
770
+        End With
771
+        With myExcel.Selection.Borders(xlInsideHorizontal)
772
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
773
+        End With
774
+    End Sub
775
+
776
+    Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
777
+        供應商_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
778
+        合計_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
779
+        採購清單_dgv.RowsDefaultCellStyle.Font = New Font("微軟正黑體", 字體_NUD.Value)
780
+    End Sub
781
+
782
+    Private Sub 應負帳款退回_bt_Click(sender As Object, e As EventArgs) Handles 應負帳款退回_bt.Click
783
+        If 資料流水號_tb.Text <> "" Then
784
+            PA = 資料流水號_tb.Text : PA2 = "0" : PA1 = ""
785
+            SQL_採購控制表_過帳()
786
+        Else
787
+            MsgBox("沒有選擇資料!!!")
788
+        End If
789
+        Set_清單2() : 資料流水號_tb.Text = ""
790
+    End Sub
791
+
792
+    Private Sub ComboBox5_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox5.TextChanged
793
+        ComboBox2.SelectedIndex = ComboBox5.SelectedIndex : ComboBox3下拉表單資料載入() : ComboBox1下拉表單資料載入()
794
+    End Sub
795
+
796
+    Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.TextChanged
797
+        ComboBox5.SelectedIndex = ComboBox2.SelectedIndex : ComboBox3下拉表單資料載入() : ComboBox1下拉表單資料載入()
798
+    End Sub
799
+
800
+    Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox3.TextChanged
801
+        ComboBox4.SelectedIndex = ComboBox3.SelectedIndex : ComboBox1下拉表單資料載入()
802
+    End Sub
803
+
804
+    Private Sub ComboBox4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox4.TextChanged
805
+        ComboBox3.SelectedIndex = ComboBox4.SelectedIndex : ComboBox1下拉表單資料載入()
806
+    End Sub
807
+
808
+    Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
809
+        ComboBox6.SelectedIndex = ComboBox1.SelectedIndex
810
+    End Sub
811
+
812
+    Private Sub ComboBox6_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox6.SelectedIndexChanged
813
+        ComboBox1.SelectedIndex = ComboBox6.SelectedIndex
814
+    End Sub
815
+
816
+    Private Sub 開啟供應商資料表_bt_Click(sender As Object, e As EventArgs) Handles 開啟供應商資料表_bt.Click
817
+        PA = "" : 供應商資料表.Show() : 供應商資料表.BringToFront()
818
+    End Sub
819
+
820
+    Private Sub 存檔_bt_Click(sender As Object, e As EventArgs) Handles 存檔_bt.Click
821
+        PA = Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 7)
822
+        SQL_採購對帳單_判斷是否有資料()
823
+        If dr.Read() Then : SQL_採購對帳單_刪除當天() : conn.Close() : End If : conn.Close()
824
+        For i As Integer = 0 To 供應商_dgv.Rows.Count - 1
825
+            PA1 = 供應商_dgv.Rows(i).Cells("編號").Value : PA2 = 供應商_dgv.Rows(i).Cells("稅金%").Value
826
+            PA3 = 供應商_dgv.Rows(i).Cells("廣告%").Value : PA4 = 供應商_dgv.Rows(i).Cells("其他扣款").Value
827
+            PA5 = 供應商_dgv.Rows(i).Cells("票期").Value : PA6 = 供應商_dgv.Rows(i).Cells("公司%").Value
828
+            PA7 = 供應商_dgv.Rows(i).Cells("個人%").Value
829
+            SQL_採購對帳單_存檔()
830
+        Next : MsgBox("存檔完成!!") : conn.Close()
831
+    End Sub
832
+    Private Sub 開單_bt_Click(sender As Object, e As EventArgs) Handles 開單_bt.Click
833
+        Dim aa As Integer = 0 : Dim bb As Integer = 0 : Dim cc As Integer = 0
834
+        PA10 = 0 : PA11 = 0
835
+        For i As Integer = 0 To 供應商_dgv.Rows.Count - 1
836
+            PA10 = Val(PA10) + Val(供應商_dgv.Rows(i).Cells("公司").Value.ToString)
837
+            PA11 = Val(PA11) + Val(供應商_dgv.Rows(i).Cells("個人").Value.ToString)
838
+        Next
839
+
840
+        If ComboBox6.Text = "" Or 幣別_cb.Text = "" Then
841
+            MsgBox("沒有選擇會計科目或幣別。")
842
+        Else
843
+            If 供應商_dgv.Rows.Count = 0 Then
844
+                MsgBox("沒有任何一筆資料,無法開單")
845
+            Else
846
+                If Val(PA10) + Val(PA11) = 0 Then
847
+                    MsgBox("總金額為0,無法開單")
848
+                Else
849
+                    '-----寫入公帳控制表-------------------------------------
850
+                    開立零用金支付單()
851
+                    '-----寫入公帳流水帳-------------------------------------
852
+                    For i As Integer = 0 To 供應商_dgv.Rows.Count - 1
853
+                        資料數 = 供應商_dgv.Rows.Count : MyModule1.進度條()
854
+                        If Val(供應商_dgv.Rows(i).Cells("公司").Value.ToString) = 0 Then
855
+                        Else
856
+                            PA1 = 供應商_dgv.Rows(i).Cells("供應商").Value : PA2 = 供應商_dgv.Rows(i).Cells("公司").Value : PA3 = 供應商_dgv.Rows(i).Cells("票期").Value
857
+                            Set_日期格式轉換()
858
+                            Set_流水號() : PA = 營運成本收支單號_tb.Text
859
+                            SQL_營運成本收支單申請_查詢最後一筆公帳支付單號()
860
+                            If dr.Read() Then : 新項次 = dr("項次") : Else : 新項次 = "00" : End If : conn.Close()
861
+                            NUM1 = Double.Parse(新項次) + 1
862
+                            If NUM1 < 10 Then : 新項次 = "0" & NUM1
863
+                            ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = NUM1
864
+                            End If
865
+                            If 幣別_cb.Text = "台幣現金" Then
866
+                                匯率1 = 1
867
+                            End If
868
+                            PA16 = 匯率1
869
+                            PA15 = 新項次
870
+                            SQL_採購應負帳款_新增公帳流水帳資料()
871
+                            aa += 1
872
+                            conn.Close()
873
+                        End If
874
+
875
+                        If Val(供應商_dgv.Rows(i).Cells("個人").Value.ToString) = 0 Then
876
+                        Else
877
+                            PA1 = 供應商_dgv.Rows(i).Cells("供應商").Value : PA2 = 供應商_dgv.Rows(i).Cells("個人").Value : PA3 = 供應商_dgv.Rows(i).Cells("票期").Value
878
+                            Set_日期格式轉換()
879
+                            Set_流水號() : PA = 營運成本收支單號_tb.Text
880
+                            SQL_營運成本收支單申請_查詢最後一筆公帳支付單號()
881
+                            If dr.Read() Then : 新項次 = dr("項次") : Else : 新項次 = "00" : End If : conn.Close()
882
+                            NUM1 = Double.Parse(新項次) + 1
883
+                            If NUM1 < 10 Then : 新項次 = "0" & NUM1
884
+                            ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = NUM1
885
+                            End If
886
+                            If 幣別_cb.Text = "台幣現金" Then
887
+                                匯率1 = 1
888
+                            End If
889
+                            PA16 = 匯率1
890
+                            PA15 = 新項次
891
+                            SQL_採購應負帳款_新增公帳流水帳資料1()
892
+                            bb += 1
893
+                            conn.Close()
894
+                        End If
895
+                    Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
896
+                    cc = aa + bb
897
+                    MsgBox("單據轉完成,申請" & cc & "筆。公司" & aa & "筆、個人" & bb & "筆。")
898
+                End If
899
+            End If
900
+        End If
901
+    End Sub
902
+    Private Sub Set_日期格式轉換()
903
+        DTP3 = Strings.Format(開始日期_dtp.Value, "yyyyMMdd") : DTP4 = Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd") : DTP = Strings.Format(日期_dtp.Value, "yyyy/MM/dd")
904
+    End Sub
905
+
906
+    Private Sub 刪除_bt_Click(sender As Object, e As EventArgs) Handles 刪除_bt.Click
907
+        SQL採購應負帳款_查詢明細()
908
+        If dr.Read() Then : 新支付單號 = dr("支付單號") : Else : 新支付單號 = "" : End If : conn.Close()
909
+        營運成本收支單號_tb.Text = 新支付單號
910
+        SQL採購應負帳款_查詢審核狀態()
911
+        If dr.Read() Then : 狀態 = Strings.Left(dr("審核人"), 2) : Else : 狀態 = "" : End If : conn.Close()
912
+        If (狀態 = "" Or 狀態 = "作廢") Then
913
+            SQL採購轉財務_刪除控制表() : SQL採購轉財務_刪除流水帳() : conn.Close()
914
+            開單_bt.PerformClick()
915
+        Else
916
+            MsgBox("這張單據已經被審核過")
917
+        End If
918
+    End Sub
919
+
920
+    Private Sub 開立零用金支付單()
921
+        Dim NUM1 As Integer
922
+        Set_日期格式轉換()
923
+        For i As Integer = 1 To 999
924
+            NUM1 = 0 + i
925
+            If NUM1 < 10 Then : 營運成本收支單號_tb.Text = "OE-" & DTP3 & "-00" & NUM1
926
+            ElseIf NUM1 > 9 And NUM1 < 100 Then : 營運成本收支單號_tb.Text = "OE-" & DTP3 & "-0" & NUM1
927
+            ElseIf NUM1 > 99 Then : 營運成本收支單號_tb.Text = "OE-" & DTP3 & "-" & NUM1
928
+            End If
929
+            conn.Close()
930
+            PA = 營運成本收支單號_tb.Text
931
+            SQL_營運成本收支單申請_查詢第一筆公帳支付單號()
932
+            If dr.Read() Then : Else : i = 999 : conn.Close() : End If : conn.Close()
933
+        Next
934
+        申請人_tb.Text = gUserName
935
+        SQL_營運成本收支單申請_新增一筆公帳控制表() : conn.Close()
936
+    End Sub
937
+    Private Sub Set_流水號()
938
+        conn.Close() : dr.Close()
939
+        Dim NUM1 As Integer
940
+        For NUM1 = 0 To 99
941
+            Dim d As String : Dim f As String : Dim g As Integer = 1
942
+            If Month(Now) < 10 Then : d = "0" & CStr(Month(Now))
943
+            Else : d = CStr(Month(Now))
944
+            End If
945
+            If Now.Day() < 10 Then : f = "0" & CStr(Now.Day())
946
+            Else : f = CStr(Now.Day())
947
+            End If
948
+            If NUM1 < 10 Then : 新流水1 = "B" & Microsoft.VisualBasic.Right(CStr(Year(Now)), 2) & d & f & "0" & NUM1
949
+            Else : 新流水1 = "B" & Microsoft.VisualBasic.Right(CStr(Year(Now)), 2) & d & f & NUM1
950
+            End If : PA19 = 新流水1
951
+            SQL_營運成本收支單申請_查詢收支單公帳流水號()
952
+            If dr.Read() Then : conn.Close() : Else : conn.Close() : NUM1 = 99 : End If
953
+        Next
954
+    End Sub
955
+End Class

+ 543
- 477
YD-ERP-SYS/業務系統管理/銷售單審核.vb
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 84
- 58
YD-ERP-SYS/業務系統管理/銷售單申請.Designer.vb Переглянути файл

@@ -22,22 +22,22 @@ Partial Class 銷售單申請
22 22
     '請勿使用程式碼編輯器進行修改。
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private Sub InitializeComponent()
25
-        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
-        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
-        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
-        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
-        Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
-        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
-        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
-        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
-        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
-        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35
-        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
-        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
-        Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
38
-        Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
39
-        Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
40
-        Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
25
+        Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle19 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle20 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle21 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle22 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Dim DataGridViewCellStyle23 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
+        Dim DataGridViewCellStyle24 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
+        Dim DataGridViewCellStyle25 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
+        Dim DataGridViewCellStyle26 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35
+        Dim DataGridViewCellStyle27 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
+        Dim DataGridViewCellStyle28 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
+        Dim DataGridViewCellStyle29 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
38
+        Dim DataGridViewCellStyle30 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
39
+        Dim DataGridViewCellStyle31 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
40
+        Dim DataGridViewCellStyle32 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
41 41
         Me.銷售單據_dgv = New System.Windows.Forms.DataGridView()
42 42
         Me.未審核_lb = New System.Windows.Forms.Label()
43 43
         Me.開立庫存調整單_bt = New System.Windows.Forms.Button()
@@ -201,7 +201,9 @@ Partial Class 銷售單申請
201 201
         Me.運費資料流水號_tb = New System.Windows.Forms.TextBox()
202 202
         Me.隱藏_bt = New System.Windows.Forms.Button()
203 203
         Me.Panel3 = New System.Windows.Forms.Panel()
204
+        Me.列印_bt = New System.Windows.Forms.Button()
204 205
         Me.顯示_bt = New System.Windows.Forms.Button()
206
+        Me.轉換_tb = New System.Windows.Forms.TextBox()
205 207
         CType(Me.銷售單據_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
206 208
         CType(Me.銷售明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
207 209
         CType(Me.區域庫存_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -223,16 +225,16 @@ Partial Class 銷售單申請
223 225
         '
224 226
         '銷售單據_dgv
225 227
         '
226
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
227
-        Me.銷售單據_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
228
+        DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
229
+        Me.銷售單據_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17
228 230
         Me.銷售單據_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
229 231
         Me.銷售單據_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
230 232
         Me.銷售單據_dgv.Location = New System.Drawing.Point(2, 27)
231 233
         Me.銷售單據_dgv.Name = "銷售單據_dgv"
232 234
         Me.銷售單據_dgv.RowHeadersWidth = 5
233
-        DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
234
-        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
235
-        Me.銷售單據_dgv.RowsDefaultCellStyle = DataGridViewCellStyle2
235
+        DataGridViewCellStyle18.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
236
+        DataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
237
+        Me.銷售單據_dgv.RowsDefaultCellStyle = DataGridViewCellStyle18
236 238
         Me.銷售單據_dgv.RowTemplate.Height = 24
237 239
         Me.銷售單據_dgv.Size = New System.Drawing.Size(146, 141)
238 240
         Me.銷售單據_dgv.TabIndex = 1154
@@ -471,8 +473,8 @@ Partial Class 銷售單申請
471 473
         '
472 474
         '銷售明細_dgv
473 475
         '
474
-        DataGridViewCellStyle3.BackColor = System.Drawing.Color.White
475
-        Me.銷售明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
476
+        DataGridViewCellStyle19.BackColor = System.Drawing.Color.White
477
+        Me.銷售明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle19
476 478
         Me.銷售明細_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
477 479
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
478 480
         Me.銷售明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -480,9 +482,9 @@ Partial Class 銷售單申請
480 482
         Me.銷售明細_dgv.Location = New System.Drawing.Point(3, 29)
481 483
         Me.銷售明細_dgv.Name = "銷售明細_dgv"
482 484
         Me.銷售明細_dgv.RowHeadersWidth = 5
483
-        DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
484
-        DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
485
-        Me.銷售明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
485
+        DataGridViewCellStyle20.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
486
+        DataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
487
+        Me.銷售明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle20
486 488
         Me.銷售明細_dgv.RowTemplate.Height = 24
487 489
         Me.銷售明細_dgv.Size = New System.Drawing.Size(895, 360)
488 490
         Me.銷售明細_dgv.TabIndex = 1199
@@ -525,24 +527,24 @@ Partial Class 銷售單申請
525 527
         Me.存檔_bt.ForeColor = System.Drawing.Color.Green
526 528
         Me.存檔_bt.Location = New System.Drawing.Point(499, 130)
527 529
         Me.存檔_bt.Name = "存檔_bt"
528
-        Me.存檔_bt.Size = New System.Drawing.Size(221, 40)
530
+        Me.存檔_bt.Size = New System.Drawing.Size(111, 40)
529 531
         Me.存檔_bt.TabIndex = 1202
530 532
         Me.存檔_bt.Text = "存檔"
531 533
         Me.存檔_bt.UseVisualStyleBackColor = True
532 534
         '
533 535
         '區域庫存_dgv
534 536
         '
535
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
536
-        Me.區域庫存_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
537
+        DataGridViewCellStyle21.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
538
+        Me.區域庫存_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle21
537 539
         Me.區域庫存_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
538 540
         Me.區域庫存_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
539 541
         Me.區域庫存_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
540 542
         Me.區域庫存_dgv.Location = New System.Drawing.Point(202, 151)
541 543
         Me.區域庫存_dgv.Name = "區域庫存_dgv"
542 544
         Me.區域庫存_dgv.RowHeadersWidth = 5
543
-        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
544
-        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
545
-        Me.區域庫存_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
545
+        DataGridViewCellStyle22.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
546
+        DataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
547
+        Me.區域庫存_dgv.RowsDefaultCellStyle = DataGridViewCellStyle22
546 548
         Me.區域庫存_dgv.RowTemplate.Height = 24
547 549
         Me.區域庫存_dgv.Size = New System.Drawing.Size(191, 85)
548 550
         Me.區域庫存_dgv.TabIndex = 1245
@@ -898,8 +900,8 @@ Partial Class 銷售單申請
898 900
         '
899 901
         '物料清單_dgv
900 902
         '
901
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
902
-        Me.物料清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
903
+        DataGridViewCellStyle23.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
904
+        Me.物料清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle23
903 905
         Me.物料清單_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
904 906
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
905 907
         Me.物料清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -907,9 +909,9 @@ Partial Class 銷售單申請
907 909
         Me.物料清單_dgv.Location = New System.Drawing.Point(2, 79)
908 910
         Me.物料清單_dgv.Name = "物料清單_dgv"
909 911
         Me.物料清單_dgv.RowHeadersWidth = 5
910
-        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
911
-        DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
912
-        Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle8
912
+        DataGridViewCellStyle24.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
913
+        DataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
914
+        Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle24
913 915
         Me.物料清單_dgv.RowTemplate.Height = 24
914 916
         Me.物料清單_dgv.Size = New System.Drawing.Size(518, 326)
915 917
         Me.物料清單_dgv.TabIndex = 1205
@@ -999,6 +1001,7 @@ Partial Class 銷售單申請
999 1001
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1000 1002
         Me.Panel1.AutoScroll = True
1001 1003
         Me.Panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
1004
+        Me.Panel1.Controls.Add(Me.轉換_tb)
1002 1005
         Me.Panel1.Controls.Add(Me.Reset1_bt)
1003 1006
         Me.Panel1.Controls.Add(Me.刪除衍生運費_bt)
1004 1007
         Me.Panel1.Controls.Add(Me.新增衍生運費_bt)
@@ -1646,17 +1649,17 @@ Partial Class 銷售單申請
1646 1649
         '
1647 1650
         '客戶資料_dgv
1648 1651
         '
1649
-        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1650
-        Me.客戶資料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
1652
+        DataGridViewCellStyle25.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1653
+        Me.客戶資料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle25
1651 1654
         Me.客戶資料_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1652 1655
         Me.客戶資料_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1653 1656
         Me.客戶資料_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1654
-        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 14874)
1657
+        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 15422)
1655 1658
         Me.客戶資料_dgv.Name = "客戶資料_dgv"
1656 1659
         Me.客戶資料_dgv.RowHeadersWidth = 5
1657
-        DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1658
-        DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1659
-        Me.客戶資料_dgv.RowsDefaultCellStyle = DataGridViewCellStyle10
1660
+        DataGridViewCellStyle26.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1661
+        DataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1662
+        Me.客戶資料_dgv.RowsDefaultCellStyle = DataGridViewCellStyle26
1660 1663
         Me.客戶資料_dgv.RowTemplate.Height = 24
1661 1664
         Me.客戶資料_dgv.Size = New System.Drawing.Size(191, 92)
1662 1665
         Me.客戶資料_dgv.TabIndex = 1254
@@ -1664,8 +1667,8 @@ Partial Class 銷售單申請
1664 1667
         '
1665 1668
         '收款事項_dgv
1666 1669
         '
1667
-        DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1668
-        Me.收款事項_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
1670
+        DataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1671
+        Me.收款事項_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle27
1669 1672
         Me.收款事項_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1670 1673
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1671 1674
         Me.收款事項_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -1673,9 +1676,9 @@ Partial Class 銷售單申請
1673 1676
         Me.收款事項_dgv.Location = New System.Drawing.Point(3, 669)
1674 1677
         Me.收款事項_dgv.Name = "收款事項_dgv"
1675 1678
         Me.收款事項_dgv.RowHeadersWidth = 5
1676
-        DataGridViewCellStyle12.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1677
-        DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1678
-        Me.收款事項_dgv.RowsDefaultCellStyle = DataGridViewCellStyle12
1679
+        DataGridViewCellStyle28.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1680
+        DataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1681
+        Me.收款事項_dgv.RowsDefaultCellStyle = DataGridViewCellStyle28
1679 1682
         Me.收款事項_dgv.RowTemplate.Height = 24
1680 1683
         Me.收款事項_dgv.Size = New System.Drawing.Size(725, 102)
1681 1684
         Me.收款事項_dgv.TabIndex = 1282
@@ -1732,8 +1735,8 @@ Partial Class 銷售單申請
1732 1735
         '
1733 1736
         '銷售衍生運費_dgv
1734 1737
         '
1735
-        DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1736
-        Me.銷售衍生運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13
1738
+        DataGridViewCellStyle29.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1739
+        Me.銷售衍生運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle29
1737 1740
         Me.銷售衍生運費_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1738 1741
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1739 1742
         Me.銷售衍生運費_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -1741,17 +1744,17 @@ Partial Class 銷售單申請
1741 1744
         Me.銷售衍生運費_dgv.Location = New System.Drawing.Point(3, 542)
1742 1745
         Me.銷售衍生運費_dgv.Name = "銷售衍生運費_dgv"
1743 1746
         Me.銷售衍生運費_dgv.RowHeadersWidth = 5
1744
-        DataGridViewCellStyle14.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1745
-        DataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1746
-        Me.銷售衍生運費_dgv.RowsDefaultCellStyle = DataGridViewCellStyle14
1747
+        DataGridViewCellStyle30.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1748
+        DataGridViewCellStyle30.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1749
+        Me.銷售衍生運費_dgv.RowsDefaultCellStyle = DataGridViewCellStyle30
1747 1750
         Me.銷售衍生運費_dgv.RowTemplate.Height = 24
1748 1751
         Me.銷售衍生運費_dgv.Size = New System.Drawing.Size(725, 102)
1749 1752
         Me.銷售衍生運費_dgv.TabIndex = 1334
1750 1753
         '
1751 1754
         '銷售備註_dgv
1752 1755
         '
1753
-        DataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1754
-        Me.銷售備註_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle15
1756
+        DataGridViewCellStyle31.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1757
+        Me.銷售備註_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle31
1755 1758
         Me.銷售備註_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1756 1759
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1757 1760
         Me.銷售備註_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -1759,9 +1762,9 @@ Partial Class 銷售單申請
1759 1762
         Me.銷售備註_dgv.Location = New System.Drawing.Point(3, 414)
1760 1763
         Me.銷售備註_dgv.Name = "銷售備註_dgv"
1761 1764
         Me.銷售備註_dgv.RowHeadersWidth = 5
1762
-        DataGridViewCellStyle16.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1763
-        DataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1764
-        Me.銷售備註_dgv.RowsDefaultCellStyle = DataGridViewCellStyle16
1765
+        DataGridViewCellStyle32.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1766
+        DataGridViewCellStyle32.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1767
+        Me.銷售備註_dgv.RowsDefaultCellStyle = DataGridViewCellStyle32
1765 1768
         Me.銷售備註_dgv.RowTemplate.Height = 24
1766 1769
         Me.銷售備註_dgv.Size = New System.Drawing.Size(725, 102)
1767 1770
         Me.銷售備註_dgv.TabIndex = 1250
@@ -2086,6 +2089,7 @@ Partial Class 銷售單申請
2086 2089
             Or System.Windows.Forms.AnchorStyles.Left) _
2087 2090
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
2088 2091
         Me.Panel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
2092
+        Me.Panel3.Controls.Add(Me.列印_bt)
2089 2093
         Me.Panel3.Controls.Add(Me.顯示_bt)
2090 2094
         Me.Panel3.Controls.Add(Me.字體大小調整_lb)
2091 2095
         Me.Panel3.Controls.Add(Me.未審核_lb)
@@ -2130,6 +2134,17 @@ Partial Class 銷售單申請
2130 2134
         Me.Panel3.Size = New System.Drawing.Size(934, 685)
2131 2135
         Me.Panel3.TabIndex = 1339
2132 2136
         '
2137
+        '列印_bt
2138
+        '
2139
+        Me.列印_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
2140
+        Me.列印_bt.ForeColor = System.Drawing.Color.Green
2141
+        Me.列印_bt.Location = New System.Drawing.Point(610, 130)
2142
+        Me.列印_bt.Name = "列印_bt"
2143
+        Me.列印_bt.Size = New System.Drawing.Size(111, 40)
2144
+        Me.列印_bt.TabIndex = 1364
2145
+        Me.列印_bt.Text = "列印"
2146
+        Me.列印_bt.UseVisualStyleBackColor = True
2147
+        '
2133 2148
         '顯示_bt
2134 2149
         '
2135 2150
         Me.顯示_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
@@ -2141,6 +2156,15 @@ Partial Class 銷售單申請
2141 2156
         Me.顯示_bt.Text = "顯示物料控件"
2142 2157
         Me.顯示_bt.UseVisualStyleBackColor = True
2143 2158
         '
2159
+        '轉換_tb
2160
+        '
2161
+        Me.轉換_tb.Location = New System.Drawing.Point(305, 303)
2162
+        Me.轉換_tb.Name = "轉換_tb"
2163
+        Me.轉換_tb.Size = New System.Drawing.Size(120, 23)
2164
+        Me.轉換_tb.TabIndex = 1369
2165
+        Me.轉換_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
2166
+        Me.轉換_tb.Visible = False
2167
+        '
2144 2168
         '銷售單申請
2145 2169
         '
2146 2170
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
@@ -2341,4 +2365,6 @@ Partial Class 銷售單申請
2341 2365
     Friend WithEvents 字體_NUD As NumericUpDown
2342 2366
     Friend WithEvents Reset1_bt As Button
2343 2367
     Friend WithEvents Label51 As Label
2368
+    Friend WithEvents 列印_bt As Button
2369
+    Friend WithEvents 轉換_tb As TextBox
2344 2370
 End Class

+ 896
- 534
YD-ERP-SYS/業務系統管理/銷售單申請.vb
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 1945
- 0
YD-ERP-SYS/財務系統管理/營運報表.Designer.vb
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 120
- 0
YD-ERP-SYS/財務系統管理/營運報表.resx Переглянути файл

@@ -0,0 +1,120 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+  <!-- 
4
+    Microsoft ResX Schema 
5
+    
6
+    Version 2.0
7
+    
8
+    The primary goals of this format is to allow a simple XML format 
9
+    that is mostly human readable. The generation and parsing of the 
10
+    various data types are done through the TypeConverter classes 
11
+    associated with the data types.
12
+    
13
+    Example:
14
+    
15
+    ... ado.net/XML headers & schema ...
16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+    <resheader name="version">2.0</resheader>
18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+    </data>
25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+        <comment>This is a comment</comment>
28
+    </data>
29
+                
30
+    There are any number of "resheader" rows that contain simple 
31
+    name/value pairs.
32
+    
33
+    Each data row contains a name, and value. The row also contains a 
34
+    type or mimetype. Type corresponds to a .NET class that support 
35
+    text/value conversion through the TypeConverter architecture. 
36
+    Classes that don't support this are serialized and stored with the 
37
+    mimetype set.
38
+    
39
+    The mimetype is used for serialized objects, and tells the 
40
+    ResXResourceReader how to depersist the object. This is currently not 
41
+    extensible. For a given mimetype the value must be set accordingly:
42
+    
43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
+    that the ResXResourceWriter will generate, however the reader can 
45
+    read any of the formats listed below.
46
+    
47
+    mimetype: application/x-microsoft.net.object.binary.base64
48
+    value   : The object must be serialized with 
49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+            : and then encoded with base64 encoding.
51
+    
52
+    mimetype: application/x-microsoft.net.object.soap.base64
53
+    value   : The object must be serialized with 
54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+            : and then encoded with base64 encoding.
56
+
57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
58
+    value   : The object must be serialized into a byte array 
59
+            : using a System.ComponentModel.TypeConverter
60
+            : and then encoded with base64 encoding.
61
+    -->
62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+    <xsd:element name="root" msdata:IsDataSet="true">
65
+      <xsd:complexType>
66
+        <xsd:choice maxOccurs="unbounded">
67
+          <xsd:element name="metadata">
68
+            <xsd:complexType>
69
+              <xsd:sequence>
70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+              </xsd:sequence>
72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
73
+              <xsd:attribute name="type" type="xsd:string" />
74
+              <xsd:attribute name="mimetype" type="xsd:string" />
75
+              <xsd:attribute ref="xml:space" />
76
+            </xsd:complexType>
77
+          </xsd:element>
78
+          <xsd:element name="assembly">
79
+            <xsd:complexType>
80
+              <xsd:attribute name="alias" type="xsd:string" />
81
+              <xsd:attribute name="name" type="xsd:string" />
82
+            </xsd:complexType>
83
+          </xsd:element>
84
+          <xsd:element name="data">
85
+            <xsd:complexType>
86
+              <xsd:sequence>
87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+              </xsd:sequence>
90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+              <xsd:attribute ref="xml:space" />
94
+            </xsd:complexType>
95
+          </xsd:element>
96
+          <xsd:element name="resheader">
97
+            <xsd:complexType>
98
+              <xsd:sequence>
99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+              </xsd:sequence>
101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
102
+            </xsd:complexType>
103
+          </xsd:element>
104
+        </xsd:choice>
105
+      </xsd:complexType>
106
+    </xsd:element>
107
+  </xsd:schema>
108
+  <resheader name="resmimetype">
109
+    <value>text/microsoft-resx</value>
110
+  </resheader>
111
+  <resheader name="version">
112
+    <value>2.0</value>
113
+  </resheader>
114
+  <resheader name="reader">
115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+  </resheader>
117
+  <resheader name="writer">
118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+  </resheader>
120
+</root>

+ 1075
- 0
YD-ERP-SYS/財務系統管理/營運報表.vb
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 640
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單 - 對帳表.Designer.vb Переглянути файл

@@ -0,0 +1,640 @@
1
+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
2
+Partial Class 營運成本收支單_對帳表
3
+    Inherits System.Windows.Forms.Form
4
+
5
+    'Form 覆寫 Dispose 以清除元件清單。
6
+    <System.Diagnostics.DebuggerNonUserCode()> _
7
+    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8
+        Try
9
+            If disposing AndAlso components IsNot Nothing Then
10
+                components.Dispose()
11
+            End If
12
+        Finally
13
+            MyBase.Dispose(disposing)
14
+        End Try
15
+    End Sub
16
+
17
+    '為 Windows Form 設計工具的必要項
18
+    Private components As System.ComponentModel.IContainer
19
+
20
+    '注意: 以下為 Windows Form 設計工具所需的程序
21
+    '可以使用 Windows Form 設計工具進行修改。
22
+    '請勿使用程式碼編輯器進行修改。
23
+    <System.Diagnostics.DebuggerStepThrough()> _
24
+    Private Sub InitializeComponent()
25
+        Me.components = New System.ComponentModel.Container()
26
+        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Me.未兌現支票1_tb = New System.Windows.Forms.TextBox()
28
+        Me.Label13 = New System.Windows.Forms.Label()
29
+        Me.未兌現支票_tb = New System.Windows.Forms.TextBox()
30
+        Me.Label14 = New System.Windows.Forms.Label()
31
+        Me.已兌現支票1_tb = New System.Windows.Forms.TextBox()
32
+        Me.Label11 = New System.Windows.Forms.Label()
33
+        Me.已兌現支票_tb = New System.Windows.Forms.TextBox()
34
+        Me.Label12 = New System.Windows.Forms.Label()
35
+        Me.零用金1_tb = New System.Windows.Forms.TextBox()
36
+        Me.Label1 = New System.Windows.Forms.Label()
37
+        Me.零用金_tb = New System.Windows.Forms.TextBox()
38
+        Me.Label3 = New System.Windows.Forms.Label()
39
+        Me.只顯示支票資料_cb = New System.Windows.Forms.CheckBox()
40
+        Me.隱藏作帳點交資訊_cb = New System.Windows.Forms.CheckBox()
41
+        Me.隱藏申請審核資訊_cb = New System.Windows.Forms.CheckBox()
42
+        Me.損益1_tb = New System.Windows.Forms.TextBox()
43
+        Me.Label7 = New System.Windows.Forms.Label()
44
+        Me.支出1_tb = New System.Windows.Forms.TextBox()
45
+        Me.Label8 = New System.Windows.Forms.Label()
46
+        Me.現金1_tb = New System.Windows.Forms.TextBox()
47
+        Me.Label10 = New System.Windows.Forms.Label()
48
+        Me.損益_tb = New System.Windows.Forms.TextBox()
49
+        Me.Label6 = New System.Windows.Forms.Label()
50
+        Me.支出_tb = New System.Windows.Forms.TextBox()
51
+        Me.Label5 = New System.Windows.Forms.Label()
52
+        Me.Label4 = New System.Windows.Forms.Label()
53
+        Me.收支單號_tb = New System.Windows.Forms.TextBox()
54
+        Me.現金_tb = New System.Windows.Forms.TextBox()
55
+        Me.Label9 = New System.Windows.Forms.Label()
56
+        Me.查詢日期1_cb = New System.Windows.Forms.ComboBox()
57
+        Me.查詢日期_cb = New System.Windows.Forms.ComboBox()
58
+        Me.Label2 = New System.Windows.Forms.Label()
59
+        Me.明細_dgv = New System.Windows.Forms.DataGridView()
60
+        Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
61
+        Me.重新整理ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
62
+        Me.ToolStripSeparator2 = New System.Windows.Forms.ToolStripSeparator()
63
+        Me.關鍵字查詢_bt = New System.Windows.Forms.Button()
64
+        Me.對帳記錄存檔_bt = New System.Windows.Forms.Button()
65
+        Me.清除查詢資料_bt = New System.Windows.Forms.Button()
66
+        Me.匯出EXCEL_bt = New System.Windows.Forms.Button()
67
+        Me.BBBToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
68
+        Me.字體大小調整_lb = New System.Windows.Forms.Label()
69
+        Me.字體_NUD = New System.Windows.Forms.NumericUpDown()
70
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
71
+        Me.ContextMenuStrip1.SuspendLayout()
72
+        CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).BeginInit()
73
+        Me.SuspendLayout()
74
+        '
75
+        '未兌現支票1_tb
76
+        '
77
+        Me.未兌現支票1_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
78
+        Me.未兌現支票1_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
79
+        Me.未兌現支票1_tb.Location = New System.Drawing.Point(285, 56)
80
+        Me.未兌現支票1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
81
+        Me.未兌現支票1_tb.Name = "未兌現支票1_tb"
82
+        Me.未兌現支票1_tb.Size = New System.Drawing.Size(90, 23)
83
+        Me.未兌現支票1_tb.TabIndex = 1072
84
+        Me.未兌現支票1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
85
+        '
86
+        'Label13
87
+        '
88
+        Me.Label13.AutoSize = True
89
+        Me.Label13.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
90
+        Me.Label13.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
91
+        Me.Label13.Location = New System.Drawing.Point(215, 59)
92
+        Me.Label13.Name = "Label13"
93
+        Me.Label13.Size = New System.Drawing.Size(68, 16)
94
+        Me.Label13.TabIndex = 1071
95
+        Me.Label13.Text = "未兌現支票"
96
+        '
97
+        '未兌現支票_tb
98
+        '
99
+        Me.未兌現支票_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
100
+        Me.未兌現支票_tb.ForeColor = System.Drawing.Color.Green
101
+        Me.未兌現支票_tb.Location = New System.Drawing.Point(285, 30)
102
+        Me.未兌現支票_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
103
+        Me.未兌現支票_tb.Name = "未兌現支票_tb"
104
+        Me.未兌現支票_tb.Size = New System.Drawing.Size(90, 23)
105
+        Me.未兌現支票_tb.TabIndex = 1070
106
+        Me.未兌現支票_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
107
+        '
108
+        'Label14
109
+        '
110
+        Me.Label14.AutoSize = True
111
+        Me.Label14.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
112
+        Me.Label14.ForeColor = System.Drawing.Color.Green
113
+        Me.Label14.Location = New System.Drawing.Point(215, 35)
114
+        Me.Label14.Name = "Label14"
115
+        Me.Label14.Size = New System.Drawing.Size(68, 16)
116
+        Me.Label14.TabIndex = 1069
117
+        Me.Label14.Text = "未兌現支票"
118
+        '
119
+        '已兌現支票1_tb
120
+        '
121
+        Me.已兌現支票1_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
122
+        Me.已兌現支票1_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
123
+        Me.已兌現支票1_tb.Location = New System.Drawing.Point(447, 56)
124
+        Me.已兌現支票1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
125
+        Me.已兌現支票1_tb.Name = "已兌現支票1_tb"
126
+        Me.已兌現支票1_tb.Size = New System.Drawing.Size(90, 23)
127
+        Me.已兌現支票1_tb.TabIndex = 1068
128
+        Me.已兌現支票1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
129
+        '
130
+        'Label11
131
+        '
132
+        Me.Label11.AutoSize = True
133
+        Me.Label11.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
134
+        Me.Label11.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
135
+        Me.Label11.Location = New System.Drawing.Point(377, 60)
136
+        Me.Label11.Name = "Label11"
137
+        Me.Label11.Size = New System.Drawing.Size(68, 16)
138
+        Me.Label11.TabIndex = 1067
139
+        Me.Label11.Text = "已兌現支票"
140
+        '
141
+        '已兌現支票_tb
142
+        '
143
+        Me.已兌現支票_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
144
+        Me.已兌現支票_tb.ForeColor = System.Drawing.Color.Green
145
+        Me.已兌現支票_tb.Location = New System.Drawing.Point(447, 29)
146
+        Me.已兌現支票_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
147
+        Me.已兌現支票_tb.Name = "已兌現支票_tb"
148
+        Me.已兌現支票_tb.Size = New System.Drawing.Size(90, 23)
149
+        Me.已兌現支票_tb.TabIndex = 1066
150
+        Me.已兌現支票_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
151
+        '
152
+        'Label12
153
+        '
154
+        Me.Label12.AutoSize = True
155
+        Me.Label12.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
156
+        Me.Label12.ForeColor = System.Drawing.Color.Green
157
+        Me.Label12.Location = New System.Drawing.Point(377, 34)
158
+        Me.Label12.Name = "Label12"
159
+        Me.Label12.Size = New System.Drawing.Size(68, 16)
160
+        Me.Label12.TabIndex = 1065
161
+        Me.Label12.Text = "已兌現支票"
162
+        '
163
+        '零用金1_tb
164
+        '
165
+        Me.零用金1_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
166
+        Me.零用金1_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
167
+        Me.零用金1_tb.Location = New System.Drawing.Point(585, 56)
168
+        Me.零用金1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
169
+        Me.零用金1_tb.Name = "零用金1_tb"
170
+        Me.零用金1_tb.Size = New System.Drawing.Size(90, 23)
171
+        Me.零用金1_tb.TabIndex = 1064
172
+        Me.零用金1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
173
+        '
174
+        'Label1
175
+        '
176
+        Me.Label1.AutoSize = True
177
+        Me.Label1.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
178
+        Me.Label1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
179
+        Me.Label1.Location = New System.Drawing.Point(539, 59)
180
+        Me.Label1.Name = "Label1"
181
+        Me.Label1.Size = New System.Drawing.Size(44, 16)
182
+        Me.Label1.TabIndex = 1063
183
+        Me.Label1.Text = "零用金"
184
+        '
185
+        '零用金_tb
186
+        '
187
+        Me.零用金_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
188
+        Me.零用金_tb.ForeColor = System.Drawing.Color.Green
189
+        Me.零用金_tb.Location = New System.Drawing.Point(585, 29)
190
+        Me.零用金_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
191
+        Me.零用金_tb.Name = "零用金_tb"
192
+        Me.零用金_tb.Size = New System.Drawing.Size(90, 23)
193
+        Me.零用金_tb.TabIndex = 1062
194
+        Me.零用金_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
195
+        '
196
+        'Label3
197
+        '
198
+        Me.Label3.AutoSize = True
199
+        Me.Label3.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
200
+        Me.Label3.ForeColor = System.Drawing.Color.Green
201
+        Me.Label3.Location = New System.Drawing.Point(539, 34)
202
+        Me.Label3.Name = "Label3"
203
+        Me.Label3.Size = New System.Drawing.Size(44, 16)
204
+        Me.Label3.TabIndex = 1061
205
+        Me.Label3.Text = "零用金"
206
+        '
207
+        '只顯示支票資料_cb
208
+        '
209
+        Me.只顯示支票資料_cb.AutoSize = True
210
+        Me.只顯示支票資料_cb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
211
+        Me.只顯示支票資料_cb.Location = New System.Drawing.Point(504, 5)
212
+        Me.只顯示支票資料_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
213
+        Me.只顯示支票資料_cb.Name = "只顯示支票資料_cb"
214
+        Me.只顯示支票資料_cb.Size = New System.Drawing.Size(111, 20)
215
+        Me.只顯示支票資料_cb.TabIndex = 1060
216
+        Me.只顯示支票資料_cb.Text = "只顯示支票資料"
217
+        Me.只顯示支票資料_cb.UseVisualStyleBackColor = True
218
+        '
219
+        '隱藏作帳點交資訊_cb
220
+        '
221
+        Me.隱藏作帳點交資訊_cb.AutoSize = True
222
+        Me.隱藏作帳點交資訊_cb.Checked = True
223
+        Me.隱藏作帳點交資訊_cb.CheckState = System.Windows.Forms.CheckState.Checked
224
+        Me.隱藏作帳點交資訊_cb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
225
+        Me.隱藏作帳點交資訊_cb.Location = New System.Drawing.Point(363, 6)
226
+        Me.隱藏作帳點交資訊_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
227
+        Me.隱藏作帳點交資訊_cb.Name = "隱藏作帳點交資訊_cb"
228
+        Me.隱藏作帳點交資訊_cb.Size = New System.Drawing.Size(135, 20)
229
+        Me.隱藏作帳點交資訊_cb.TabIndex = 1059
230
+        Me.隱藏作帳點交資訊_cb.Text = "隱藏作帳、點交資訊"
231
+        Me.隱藏作帳點交資訊_cb.UseVisualStyleBackColor = True
232
+        '
233
+        '隱藏申請審核資訊_cb
234
+        '
235
+        Me.隱藏申請審核資訊_cb.AutoSize = True
236
+        Me.隱藏申請審核資訊_cb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
237
+        Me.隱藏申請審核資訊_cb.Location = New System.Drawing.Point(222, 6)
238
+        Me.隱藏申請審核資訊_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
239
+        Me.隱藏申請審核資訊_cb.Name = "隱藏申請審核資訊_cb"
240
+        Me.隱藏申請審核資訊_cb.Size = New System.Drawing.Size(135, 20)
241
+        Me.隱藏申請審核資訊_cb.TabIndex = 1058
242
+        Me.隱藏申請審核資訊_cb.Text = "隱藏申請、審核資訊"
243
+        Me.隱藏申請審核資訊_cb.UseVisualStyleBackColor = True
244
+        '
245
+        '損益1_tb
246
+        '
247
+        Me.損益1_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
248
+        Me.損益1_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
249
+        Me.損益1_tb.Location = New System.Drawing.Point(964, 56)
250
+        Me.損益1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
251
+        Me.損益1_tb.Name = "損益1_tb"
252
+        Me.損益1_tb.Size = New System.Drawing.Size(90, 23)
253
+        Me.損益1_tb.TabIndex = 1057
254
+        Me.損益1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
255
+        '
256
+        'Label7
257
+        '
258
+        Me.Label7.AutoSize = True
259
+        Me.Label7.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
260
+        Me.Label7.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
261
+        Me.Label7.Location = New System.Drawing.Point(930, 59)
262
+        Me.Label7.Name = "Label7"
263
+        Me.Label7.Size = New System.Drawing.Size(32, 16)
264
+        Me.Label7.TabIndex = 1056
265
+        Me.Label7.Text = "損益"
266
+        '
267
+        '支出1_tb
268
+        '
269
+        Me.支出1_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
270
+        Me.支出1_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
271
+        Me.支出1_tb.Location = New System.Drawing.Point(838, 56)
272
+        Me.支出1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
273
+        Me.支出1_tb.Name = "支出1_tb"
274
+        Me.支出1_tb.Size = New System.Drawing.Size(90, 23)
275
+        Me.支出1_tb.TabIndex = 1055
276
+        Me.支出1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
277
+        '
278
+        'Label8
279
+        '
280
+        Me.Label8.AutoSize = True
281
+        Me.Label8.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
282
+        Me.Label8.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
283
+        Me.Label8.Location = New System.Drawing.Point(804, 60)
284
+        Me.Label8.Name = "Label8"
285
+        Me.Label8.Size = New System.Drawing.Size(32, 16)
286
+        Me.Label8.TabIndex = 1054
287
+        Me.Label8.Text = "支出"
288
+        '
289
+        '現金1_tb
290
+        '
291
+        Me.現金1_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
292
+        Me.現金1_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
293
+        Me.現金1_tb.Location = New System.Drawing.Point(712, 56)
294
+        Me.現金1_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
295
+        Me.現金1_tb.Name = "現金1_tb"
296
+        Me.現金1_tb.Size = New System.Drawing.Size(90, 23)
297
+        Me.現金1_tb.TabIndex = 1053
298
+        Me.現金1_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
299
+        '
300
+        'Label10
301
+        '
302
+        Me.Label10.AutoSize = True
303
+        Me.Label10.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
304
+        Me.Label10.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
305
+        Me.Label10.Location = New System.Drawing.Point(677, 60)
306
+        Me.Label10.Name = "Label10"
307
+        Me.Label10.Size = New System.Drawing.Size(32, 16)
308
+        Me.Label10.TabIndex = 1052
309
+        Me.Label10.Text = "現金"
310
+        '
311
+        '損益_tb
312
+        '
313
+        Me.損益_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
314
+        Me.損益_tb.ForeColor = System.Drawing.Color.Green
315
+        Me.損益_tb.Location = New System.Drawing.Point(964, 29)
316
+        Me.損益_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
317
+        Me.損益_tb.Name = "損益_tb"
318
+        Me.損益_tb.Size = New System.Drawing.Size(90, 23)
319
+        Me.損益_tb.TabIndex = 1051
320
+        Me.損益_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
321
+        '
322
+        'Label6
323
+        '
324
+        Me.Label6.AutoSize = True
325
+        Me.Label6.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
326
+        Me.Label6.ForeColor = System.Drawing.Color.Green
327
+        Me.Label6.Location = New System.Drawing.Point(930, 34)
328
+        Me.Label6.Name = "Label6"
329
+        Me.Label6.Size = New System.Drawing.Size(32, 16)
330
+        Me.Label6.TabIndex = 1050
331
+        Me.Label6.Text = "損益"
332
+        '
333
+        '支出_tb
334
+        '
335
+        Me.支出_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
336
+        Me.支出_tb.ForeColor = System.Drawing.Color.Green
337
+        Me.支出_tb.Location = New System.Drawing.Point(838, 29)
338
+        Me.支出_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
339
+        Me.支出_tb.Name = "支出_tb"
340
+        Me.支出_tb.Size = New System.Drawing.Size(90, 23)
341
+        Me.支出_tb.TabIndex = 1049
342
+        Me.支出_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
343
+        '
344
+        'Label5
345
+        '
346
+        Me.Label5.AutoSize = True
347
+        Me.Label5.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
348
+        Me.Label5.ForeColor = System.Drawing.Color.Green
349
+        Me.Label5.Location = New System.Drawing.Point(804, 34)
350
+        Me.Label5.Name = "Label5"
351
+        Me.Label5.Size = New System.Drawing.Size(32, 16)
352
+        Me.Label5.TabIndex = 1048
353
+        Me.Label5.Text = "支出"
354
+        '
355
+        'Label4
356
+        '
357
+        Me.Label4.AutoSize = True
358
+        Me.Label4.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
359
+        Me.Label4.ForeColor = System.Drawing.Color.Green
360
+        Me.Label4.Location = New System.Drawing.Point(2, 35)
361
+        Me.Label4.Name = "Label4"
362
+        Me.Label4.Size = New System.Drawing.Size(32, 16)
363
+        Me.Label4.TabIndex = 1047
364
+        Me.Label4.Text = "單號"
365
+        '
366
+        '收支單號_tb
367
+        '
368
+        Me.收支單號_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
369
+        Me.收支單號_tb.ForeColor = System.Drawing.Color.Green
370
+        Me.收支單號_tb.Location = New System.Drawing.Point(36, 31)
371
+        Me.收支單號_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
372
+        Me.收支單號_tb.Name = "收支單號_tb"
373
+        Me.收支單號_tb.Size = New System.Drawing.Size(172, 23)
374
+        Me.收支單號_tb.TabIndex = 1046
375
+        Me.收支單號_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
376
+        '
377
+        '現金_tb
378
+        '
379
+        Me.現金_tb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
380
+        Me.現金_tb.ForeColor = System.Drawing.Color.Green
381
+        Me.現金_tb.Location = New System.Drawing.Point(712, 29)
382
+        Me.現金_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
383
+        Me.現金_tb.Name = "現金_tb"
384
+        Me.現金_tb.Size = New System.Drawing.Size(90, 23)
385
+        Me.現金_tb.TabIndex = 1045
386
+        Me.現金_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
387
+        '
388
+        'Label9
389
+        '
390
+        Me.Label9.AutoSize = True
391
+        Me.Label9.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
392
+        Me.Label9.ForeColor = System.Drawing.Color.Green
393
+        Me.Label9.Location = New System.Drawing.Point(677, 34)
394
+        Me.Label9.Name = "Label9"
395
+        Me.Label9.Size = New System.Drawing.Size(32, 16)
396
+        Me.Label9.TabIndex = 1044
397
+        Me.Label9.Text = "現金"
398
+        '
399
+        '查詢日期1_cb
400
+        '
401
+        Me.查詢日期1_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
402
+        Me.查詢日期1_cb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
403
+        Me.查詢日期1_cb.FormattingEnabled = True
404
+        Me.查詢日期1_cb.Items.AddRange(New Object() {"01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"})
405
+        Me.查詢日期1_cb.Location = New System.Drawing.Point(153, 3)
406
+        Me.查詢日期1_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
407
+        Me.查詢日期1_cb.Name = "查詢日期1_cb"
408
+        Me.查詢日期1_cb.Size = New System.Drawing.Size(63, 24)
409
+        Me.查詢日期1_cb.TabIndex = 1043
410
+        '
411
+        '查詢日期_cb
412
+        '
413
+        Me.查詢日期_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
414
+        Me.查詢日期_cb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
415
+        Me.查詢日期_cb.FormattingEnabled = True
416
+        Me.查詢日期_cb.Items.AddRange(New Object() {"2019"})
417
+        Me.查詢日期_cb.Location = New System.Drawing.Point(64, 3)
418
+        Me.查詢日期_cb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
419
+        Me.查詢日期_cb.Name = "查詢日期_cb"
420
+        Me.查詢日期_cb.Size = New System.Drawing.Size(81, 24)
421
+        Me.查詢日期_cb.TabIndex = 1042
422
+        '
423
+        'Label2
424
+        '
425
+        Me.Label2.AutoSize = True
426
+        Me.Label2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
427
+        Me.Label2.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
428
+        Me.Label2.Location = New System.Drawing.Point(2, 7)
429
+        Me.Label2.Name = "Label2"
430
+        Me.Label2.Size = New System.Drawing.Size(56, 16)
431
+        Me.Label2.TabIndex = 1041
432
+        Me.Label2.Text = "查詢日期"
433
+        '
434
+        '明細_dgv
435
+        '
436
+        Me.明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
437
+            Or System.Windows.Forms.AnchorStyles.Left) _
438
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
439
+        Me.明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
440
+        Me.明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
441
+        Me.明細_dgv.Location = New System.Drawing.Point(6, 82)
442
+        Me.明細_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
443
+        Me.明細_dgv.Name = "明細_dgv"
444
+        Me.明細_dgv.RowHeadersWidth = 5
445
+        DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
446
+        Me.明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle1
447
+        Me.明細_dgv.RowTemplate.Height = 24
448
+        Me.明細_dgv.Size = New System.Drawing.Size(1050, 524)
449
+        Me.明細_dgv.TabIndex = 1073
450
+        '
451
+        'ContextMenuStrip1
452
+        '
453
+        Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.重新整理ToolStripMenuItem, Me.ToolStripSeparator2})
454
+        Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
455
+        Me.ContextMenuStrip1.Size = New System.Drawing.Size(123, 32)
456
+        '
457
+        '重新整理ToolStripMenuItem
458
+        '
459
+        Me.重新整理ToolStripMenuItem.Name = "重新整理ToolStripMenuItem"
460
+        Me.重新整理ToolStripMenuItem.Size = New System.Drawing.Size(122, 22)
461
+        Me.重新整理ToolStripMenuItem.Text = "重新整理"
462
+        '
463
+        'ToolStripSeparator2
464
+        '
465
+        Me.ToolStripSeparator2.Name = "ToolStripSeparator2"
466
+        Me.ToolStripSeparator2.Size = New System.Drawing.Size(119, 6)
467
+        '
468
+        '關鍵字查詢_bt
469
+        '
470
+        Me.關鍵字查詢_bt.Location = New System.Drawing.Point(663, 2)
471
+        Me.關鍵字查詢_bt.Name = "關鍵字查詢_bt"
472
+        Me.關鍵字查詢_bt.Size = New System.Drawing.Size(90, 26)
473
+        Me.關鍵字查詢_bt.TabIndex = 1076
474
+        Me.關鍵字查詢_bt.Text = "關鍵字查詢"
475
+        Me.關鍵字查詢_bt.UseVisualStyleBackColor = True
476
+        '
477
+        '對帳記錄存檔_bt
478
+        '
479
+        Me.對帳記錄存檔_bt.ForeColor = System.Drawing.Color.Green
480
+        Me.對帳記錄存檔_bt.Location = New System.Drawing.Point(6, 56)
481
+        Me.對帳記錄存檔_bt.Name = "對帳記錄存檔_bt"
482
+        Me.對帳記錄存檔_bt.Size = New System.Drawing.Size(202, 23)
483
+        Me.對帳記錄存檔_bt.TabIndex = 1077
484
+        Me.對帳記錄存檔_bt.Text = "對帳記錄存檔"
485
+        Me.對帳記錄存檔_bt.UseVisualStyleBackColor = True
486
+        '
487
+        '清除查詢資料_bt
488
+        '
489
+        Me.清除查詢資料_bt.Location = New System.Drawing.Point(754, 2)
490
+        Me.清除查詢資料_bt.Name = "清除查詢資料_bt"
491
+        Me.清除查詢資料_bt.Size = New System.Drawing.Size(90, 26)
492
+        Me.清除查詢資料_bt.TabIndex = 1078
493
+        Me.清除查詢資料_bt.Text = "清除查詢資料"
494
+        Me.清除查詢資料_bt.UseVisualStyleBackColor = True
495
+        '
496
+        '匯出EXCEL_bt
497
+        '
498
+        Me.匯出EXCEL_bt.AutoSize = True
499
+        Me.匯出EXCEL_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
500
+        Me.匯出EXCEL_bt.ForeColor = System.Drawing.Color.DarkRed
501
+        Me.匯出EXCEL_bt.Location = New System.Drawing.Point(845, 2)
502
+        Me.匯出EXCEL_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
503
+        Me.匯出EXCEL_bt.Name = "匯出EXCEL_bt"
504
+        Me.匯出EXCEL_bt.Size = New System.Drawing.Size(90, 26)
505
+        Me.匯出EXCEL_bt.TabIndex = 1435
506
+        Me.匯出EXCEL_bt.Text = "匯出EXCEL"
507
+        Me.匯出EXCEL_bt.UseVisualStyleBackColor = True
508
+        '
509
+        'BBBToolStripMenuItem
510
+        '
511
+        Me.BBBToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
512
+        Me.BBBToolStripMenuItem.Name = "BBBToolStripMenuItem"
513
+        Me.BBBToolStripMenuItem.Size = New System.Drawing.Size(180, 22)
514
+        Me.BBBToolStripMenuItem.Text = "列印成EXCEL"
515
+        '
516
+        '字體大小調整_lb
517
+        '
518
+        Me.字體大小調整_lb.AutoSize = True
519
+        Me.字體大小調整_lb.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
520
+        Me.字體大小調整_lb.ForeColor = System.Drawing.Color.Red
521
+        Me.字體大小調整_lb.ImeMode = System.Windows.Forms.ImeMode.NoControl
522
+        Me.字體大小調整_lb.Location = New System.Drawing.Point(941, 6)
523
+        Me.字體大小調整_lb.Name = "字體大小調整_lb"
524
+        Me.字體大小調整_lb.Size = New System.Drawing.Size(60, 17)
525
+        Me.字體大小調整_lb.TabIndex = 1495
526
+        Me.字體大小調整_lb.Text = "字體調整"
527
+        '
528
+        '字體_NUD
529
+        '
530
+        Me.字體_NUD.DecimalPlaces = 1
531
+        Me.字體_NUD.Increment = New Decimal(New Integer() {1, 0, 0, 65536})
532
+        Me.字體_NUD.Location = New System.Drawing.Point(1001, 4)
533
+        Me.字體_NUD.Maximum = New Decimal(New Integer() {18, 0, 0, 0})
534
+        Me.字體_NUD.Minimum = New Decimal(New Integer() {6, 0, 0, 0})
535
+        Me.字體_NUD.Name = "字體_NUD"
536
+        Me.字體_NUD.Size = New System.Drawing.Size(52, 23)
537
+        Me.字體_NUD.TabIndex = 1494
538
+        Me.字體_NUD.Value = New Decimal(New Integer() {9, 0, 0, 0})
539
+        '
540
+        '營運成本收支單_對帳表
541
+        '
542
+        Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
543
+        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
544
+        Me.ClientSize = New System.Drawing.Size(1061, 611)
545
+        Me.ContextMenuStrip = Me.ContextMenuStrip1
546
+        Me.Controls.Add(Me.字體大小調整_lb)
547
+        Me.Controls.Add(Me.字體_NUD)
548
+        Me.Controls.Add(Me.匯出EXCEL_bt)
549
+        Me.Controls.Add(Me.清除查詢資料_bt)
550
+        Me.Controls.Add(Me.對帳記錄存檔_bt)
551
+        Me.Controls.Add(Me.關鍵字查詢_bt)
552
+        Me.Controls.Add(Me.未兌現支票1_tb)
553
+        Me.Controls.Add(Me.Label13)
554
+        Me.Controls.Add(Me.未兌現支票_tb)
555
+        Me.Controls.Add(Me.Label14)
556
+        Me.Controls.Add(Me.已兌現支票1_tb)
557
+        Me.Controls.Add(Me.Label11)
558
+        Me.Controls.Add(Me.已兌現支票_tb)
559
+        Me.Controls.Add(Me.Label12)
560
+        Me.Controls.Add(Me.零用金1_tb)
561
+        Me.Controls.Add(Me.Label1)
562
+        Me.Controls.Add(Me.零用金_tb)
563
+        Me.Controls.Add(Me.Label3)
564
+        Me.Controls.Add(Me.只顯示支票資料_cb)
565
+        Me.Controls.Add(Me.隱藏作帳點交資訊_cb)
566
+        Me.Controls.Add(Me.隱藏申請審核資訊_cb)
567
+        Me.Controls.Add(Me.損益1_tb)
568
+        Me.Controls.Add(Me.Label7)
569
+        Me.Controls.Add(Me.支出1_tb)
570
+        Me.Controls.Add(Me.Label8)
571
+        Me.Controls.Add(Me.現金1_tb)
572
+        Me.Controls.Add(Me.Label10)
573
+        Me.Controls.Add(Me.損益_tb)
574
+        Me.Controls.Add(Me.Label6)
575
+        Me.Controls.Add(Me.支出_tb)
576
+        Me.Controls.Add(Me.Label5)
577
+        Me.Controls.Add(Me.Label4)
578
+        Me.Controls.Add(Me.收支單號_tb)
579
+        Me.Controls.Add(Me.現金_tb)
580
+        Me.Controls.Add(Me.Label9)
581
+        Me.Controls.Add(Me.查詢日期1_cb)
582
+        Me.Controls.Add(Me.查詢日期_cb)
583
+        Me.Controls.Add(Me.Label2)
584
+        Me.Controls.Add(Me.明細_dgv)
585
+        Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
586
+        Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
587
+        Me.Name = "營運成本收支單_對帳表"
588
+        Me.Text = "營運成本收支單___對帳表"
589
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
590
+        Me.ContextMenuStrip1.ResumeLayout(False)
591
+        CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).EndInit()
592
+        Me.ResumeLayout(False)
593
+        Me.PerformLayout()
594
+
595
+    End Sub
596
+
597
+    Friend WithEvents 未兌現支票1_tb As TextBox
598
+    Friend WithEvents Label13 As Label
599
+    Friend WithEvents 未兌現支票_tb As TextBox
600
+    Friend WithEvents Label14 As Label
601
+    Friend WithEvents 已兌現支票1_tb As TextBox
602
+    Friend WithEvents Label11 As Label
603
+    Friend WithEvents 已兌現支票_tb As TextBox
604
+    Friend WithEvents Label12 As Label
605
+    Friend WithEvents 零用金1_tb As TextBox
606
+    Friend WithEvents Label1 As Label
607
+    Friend WithEvents 零用金_tb As TextBox
608
+    Friend WithEvents Label3 As Label
609
+    Friend WithEvents 只顯示支票資料_cb As CheckBox
610
+    Friend WithEvents 隱藏作帳點交資訊_cb As CheckBox
611
+    Friend WithEvents 隱藏申請審核資訊_cb As CheckBox
612
+    Friend WithEvents 損益1_tb As TextBox
613
+    Friend WithEvents Label7 As Label
614
+    Friend WithEvents 支出1_tb As TextBox
615
+    Friend WithEvents Label8 As Label
616
+    Friend WithEvents 現金1_tb As TextBox
617
+    Friend WithEvents Label10 As Label
618
+    Friend WithEvents 損益_tb As TextBox
619
+    Friend WithEvents Label6 As Label
620
+    Friend WithEvents 支出_tb As TextBox
621
+    Friend WithEvents Label5 As Label
622
+    Friend WithEvents Label4 As Label
623
+    Friend WithEvents 收支單號_tb As TextBox
624
+    Friend WithEvents 現金_tb As TextBox
625
+    Friend WithEvents Label9 As Label
626
+    Friend WithEvents 查詢日期1_cb As ComboBox
627
+    Friend WithEvents 查詢日期_cb As ComboBox
628
+    Friend WithEvents Label2 As Label
629
+    Friend WithEvents 明細_dgv As DataGridView
630
+    Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
631
+    Friend WithEvents 重新整理ToolStripMenuItem As ToolStripMenuItem
632
+    Friend WithEvents ToolStripSeparator2 As ToolStripSeparator
633
+    Friend WithEvents 關鍵字查詢_bt As Button
634
+    Friend WithEvents 對帳記錄存檔_bt As Button
635
+    Friend WithEvents 清除查詢資料_bt As Button
636
+    Friend WithEvents 匯出EXCEL_bt As Button
637
+    Friend WithEvents BBBToolStripMenuItem As ToolStripMenuItem
638
+    Friend WithEvents 字體大小調整_lb As Label
639
+    Friend WithEvents 字體_NUD As NumericUpDown
640
+End Class

+ 126
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單 - 對帳表.resx Переглянути файл

@@ -0,0 +1,126 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+  <!-- 
4
+    Microsoft ResX Schema 
5
+    
6
+    Version 2.0
7
+    
8
+    The primary goals of this format is to allow a simple XML format 
9
+    that is mostly human readable. The generation and parsing of the 
10
+    various data types are done through the TypeConverter classes 
11
+    associated with the data types.
12
+    
13
+    Example:
14
+    
15
+    ... ado.net/XML headers & schema ...
16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+    <resheader name="version">2.0</resheader>
18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+    </data>
25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+        <comment>This is a comment</comment>
28
+    </data>
29
+                
30
+    There are any number of "resheader" rows that contain simple 
31
+    name/value pairs.
32
+    
33
+    Each data row contains a name, and value. The row also contains a 
34
+    type or mimetype. Type corresponds to a .NET class that support 
35
+    text/value conversion through the TypeConverter architecture. 
36
+    Classes that don't support this are serialized and stored with the 
37
+    mimetype set.
38
+    
39
+    The mimetype is used for serialized objects, and tells the 
40
+    ResXResourceReader how to depersist the object. This is currently not 
41
+    extensible. For a given mimetype the value must be set accordingly:
42
+    
43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
+    that the ResXResourceWriter will generate, however the reader can 
45
+    read any of the formats listed below.
46
+    
47
+    mimetype: application/x-microsoft.net.object.binary.base64
48
+    value   : The object must be serialized with 
49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+            : and then encoded with base64 encoding.
51
+    
52
+    mimetype: application/x-microsoft.net.object.soap.base64
53
+    value   : The object must be serialized with 
54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+            : and then encoded with base64 encoding.
56
+
57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
58
+    value   : The object must be serialized into a byte array 
59
+            : using a System.ComponentModel.TypeConverter
60
+            : and then encoded with base64 encoding.
61
+    -->
62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+    <xsd:element name="root" msdata:IsDataSet="true">
65
+      <xsd:complexType>
66
+        <xsd:choice maxOccurs="unbounded">
67
+          <xsd:element name="metadata">
68
+            <xsd:complexType>
69
+              <xsd:sequence>
70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+              </xsd:sequence>
72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
73
+              <xsd:attribute name="type" type="xsd:string" />
74
+              <xsd:attribute name="mimetype" type="xsd:string" />
75
+              <xsd:attribute ref="xml:space" />
76
+            </xsd:complexType>
77
+          </xsd:element>
78
+          <xsd:element name="assembly">
79
+            <xsd:complexType>
80
+              <xsd:attribute name="alias" type="xsd:string" />
81
+              <xsd:attribute name="name" type="xsd:string" />
82
+            </xsd:complexType>
83
+          </xsd:element>
84
+          <xsd:element name="data">
85
+            <xsd:complexType>
86
+              <xsd:sequence>
87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+              </xsd:sequence>
90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+              <xsd:attribute ref="xml:space" />
94
+            </xsd:complexType>
95
+          </xsd:element>
96
+          <xsd:element name="resheader">
97
+            <xsd:complexType>
98
+              <xsd:sequence>
99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+              </xsd:sequence>
101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
102
+            </xsd:complexType>
103
+          </xsd:element>
104
+        </xsd:choice>
105
+      </xsd:complexType>
106
+    </xsd:element>
107
+  </xsd:schema>
108
+  <resheader name="resmimetype">
109
+    <value>text/microsoft-resx</value>
110
+  </resheader>
111
+  <resheader name="version">
112
+    <value>2.0</value>
113
+  </resheader>
114
+  <resheader name="reader">
115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+  </resheader>
117
+  <resheader name="writer">
118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+  </resheader>
120
+  <metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121
+    <value>17, 17</value>
122
+  </metadata>
123
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
124
+    <value>55</value>
125
+  </metadata>
126
+</root>

+ 452
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單 - 對帳表.vb Переглянути файл

@@ -0,0 +1,452 @@
1
+Option Strict Off
2
+Imports Microsoft.Office.Interop.Excel.XlUnderlineStyle
3
+Imports Microsoft.Office.Interop.Excel.Constants
4
+Imports Microsoft.Office.Interop.Excel.XlBordersIndex
5
+Imports Microsoft.Office.Interop.Excel.XlLineStyle
6
+Imports Microsoft.Office.Interop.Excel.XlBorderWeight
7
+Imports Microsoft.Office.Interop.Excel.XlThemeFont
8
+Imports Microsoft.Office.Interop.Excel.XlThemeColor
9
+Imports Microsoft.Office.Interop.Excel.XlWindowState
10
+Imports System.Data.SqlClient
11
+Public Class 營運成本收支單_對帳表
12
+    ReadOnly conn1 As New SqlConnection
13
+    ReadOnly cmd As New SqlCommand : ReadOnly cmd1 As New SqlCommand
14
+    ReadOnly ds As New DataSet
15
+    Dim N2 As Integer
16
+    Dim xlApp As Microsoft.Office.Interop.Excel.Application
17
+    Dim xlBook As Microsoft.Office.Interop.Excel.Workbook
18
+    Dim xlSheet As Microsoft.Office.Interop.Excel.Worksheet
19
+    Dim 位置1 As String
20
+    Private Sub Set_清單1()
21
+        明細_dgv.DataSource = Nothing : ds.Clear()
22
+        明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
23
+        明細_dgv.ColumnHeadersHeight = 25
24
+        明細_dgv.AllowUserToAddRows = False
25
+        明細_dgv.RowTemplate.Height = 30
26
+        SQL_營運成本收支單對帳表_查詢最後一筆清單()
27
+        da.Fill(ds) : 明細_dgv.DataSource = ds.Tables(0) : conn.Close() : Set_grid()
28
+    End Sub
29
+    Private Sub Set_grid()
30
+        明細_dgv.Columns(0).FillWeight = 120 : 明細_dgv.Columns(1).FillWeight = 60 : 明細_dgv.Columns(2).FillWeight = 80 : 明細_dgv.Columns(3).FillWeight = 60
31
+        明細_dgv.Columns(4).FillWeight = 80 : 明細_dgv.Columns(5).FillWeight = 50 : 明細_dgv.Columns(6).FillWeight = 150 : 明細_dgv.Columns(7).FillWeight = 300
32
+        明細_dgv.Columns(8).FillWeight = 70 : 明細_dgv.Columns(9).FillWeight = 70 : 明細_dgv.Columns(10).FillWeight = 70 : 明細_dgv.Columns(11).FillWeight = 70
33
+        明細_dgv.Columns(12).FillWeight = 70 : 明細_dgv.Columns(13).FillWeight = 50 : 明細_dgv.Columns(14).FillWeight = 70 : 明細_dgv.Columns(15).FillWeight = 50
34
+        明細_dgv.Columns(16).FillWeight = 70 : 明細_dgv.Columns(17).Visible = False : 明細_dgv.Columns(18).Visible = False : 明細_dgv.Columns(19).Visible = False
35
+        明細_dgv.Columns(20).Visible = False : 明細_dgv.Columns(21).FillWeight = 50 : 明細_dgv.Columns(22).FillWeight = 50
36
+
37
+        If 隱藏申請審核資訊_cb.Checked = False Then
38
+            明細_dgv.Columns(1).Visible = True : 明細_dgv.Columns(2).Visible = True : 明細_dgv.Columns(3).Visible = True : 明細_dgv.Columns(4).Visible = True
39
+        Else
40
+            明細_dgv.Columns(1).Visible = False : 明細_dgv.Columns(2).Visible = False : 明細_dgv.Columns(3).Visible = False : 明細_dgv.Columns(4).Visible = False
41
+        End If
42
+
43
+        If 隱藏作帳點交資訊_cb.Checked = False Then
44
+            明細_dgv.Columns(13).Visible = True : 明細_dgv.Columns(14).Visible = True : 明細_dgv.Columns(15).Visible = True : 明細_dgv.Columns(16).Visible = True
45
+        Else
46
+            明細_dgv.Columns(13).Visible = False : 明細_dgv.Columns(14).Visible = False : 明細_dgv.Columns(15).Visible = False : 明細_dgv.Columns(16).Visible = False
47
+        End If
48
+
49
+        明細_dgv.Columns(8).DefaultCellStyle.Format = "#,##0" : 明細_dgv.Columns(9).DefaultCellStyle.Format = "#,##0" : 明細_dgv.Columns(10).DefaultCellStyle.Format = "#,##0"
50
+        明細_dgv.Columns(11).DefaultCellStyle.Format = "#,##0"
51
+        明細_dgv.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
52
+        明細_dgv.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
53
+        明細_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
54
+        明細_dgv.Columns(11).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(11).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
55
+        明細_dgv.Columns(21).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 明細_dgv.Columns(21).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
56
+        明細_dgv.Columns(22).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 明細_dgv.Columns(22).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
57
+
58
+        支出1_tb.Text = "0" : 現金1_tb.Text = "0" : 損益1_tb.Text = "0" : 零用金1_tb.Text = "0" : 已兌現支票1_tb.Text = "0" : 未兌現支票1_tb.Text = "0"
59
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
60
+            現金1_tb.Text = Val(現金1_tb.Text) + 明細_dgv.Rows(i).Cells("現金").Value * 明細_dgv.Rows(i).Cells("匯率").Value
61
+            支出1_tb.Text = Val(支出1_tb.Text) + 明細_dgv.Rows(i).Cells("支出").Value * 明細_dgv.Rows(i).Cells("匯率").Value
62
+            零用金1_tb.Text = Val(零用金1_tb.Text) + 明細_dgv.Rows(i).Cells("零用金").Value * 明細_dgv.Rows(i).Cells("匯率").Value
63
+            If 明細_dgv(9, i).Value <> 0 And 明細_dgv(18, i).Value = True Then
64
+                已兌現支票1_tb.Text = Val(已兌現支票1_tb.Text) + 明細_dgv.Rows(i).Cells("支票").Value * 明細_dgv.Rows(i).Cells("匯率").Value
65
+            ElseIf 明細_dgv(9, i).Value <> 0 And 明細_dgv(18, i).Value = False Then
66
+                未兌現支票1_tb.Text = Val(未兌現支票1_tb.Text) + 明細_dgv.Rows(i).Cells("支票").Value * 明細_dgv.Rows(i).Cells("匯率").Value
67
+            End If
68
+            If 明細_dgv("幣別", i).Value = "台幣現金" Then : 明細_dgv("幣別", i).Value = "台幣" : Else : 明細_dgv("幣別", i).Value = "人民幣" : End If
69
+        Next i
70
+        損益1_tb.Text = Val(已兌現支票1_tb.Text) + Val(零用金1_tb.Text) + Val(現金1_tb.Text) - Val(支出1_tb.Text)
71
+        If Val(損益1_tb.Text) > 0 Then : 損益1_tb.ForeColor = Color.Blue : Else : 損益1_tb.ForeColor = Color.Red : End If
72
+
73
+        支出1_tb.Text = Strings.Format(Val(支出1_tb.Text), "#,##0")
74
+        損益1_tb.Text = Strings.Format(Val(損益1_tb.Text), "#,##0")
75
+        現金1_tb.Text = Strings.Format(Val(現金1_tb.Text), "#,##0")
76
+        零用金1_tb.Text = Strings.Format(Val(零用金1_tb.Text), "#,##0")
77
+        已兌現支票1_tb.Text = Strings.Format(Val(已兌現支票1_tb.Text), "#,##0")
78
+        未兌現支票1_tb.Text = Strings.Format(Val(未兌現支票1_tb.Text), "#,##0")
79
+    End Sub
80
+    Private Sub ComboBox1下拉表單資料載入()
81
+        conn.Close()
82
+        SQL_營運成本收支單對帳表_查詢最後一筆年份清單() : 查詢日期_cb.Items.Clear()
83
+        While (dr.Read()) : 查詢日期_cb.Items.Add(dr("年份")) : End While
84
+        conn.Close()
85
+    End Sub
86
+    Private Sub 營運成本收支單_對帳表_Load(sender As Object, e As EventArgs) Handles MyBase.Load
87
+        Me.MdiParent = YD_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
88
+        現金_tb.Text = "0" : 支出_tb.Text = "0" : 損益_tb.Text = "0" : 零用金_tb.Text = "0" : 已兌現支票_tb.Text = "0" : 未兌現支票_tb.Text = "0"
89
+        現金1_tb.Text = "0" : 支出1_tb.Text = "0" : 損益1_tb.Text = "0" : 零用金1_tb.Text = "0" : 已兌現支票1_tb.Text = "0" : 未兌現支票1_tb.Text = "0"
90
+        SQL_營運成本收支單對帳表_修改會計() : conn.Close()
91
+        SQL_營運成本收支單對帳表_修改出納() : conn.Close()
92
+        SQL_營運成本收支單對帳表_修改現金() : conn.Close()
93
+        SQL_營運成本收支單對帳表_修改備用金() : conn.Close()
94
+        SQL_營運成本收支單對帳表_修改公帳() : conn.Close()
95
+        SQL_營運成本收支單對帳表_修改支票() : conn.Close()
96
+        SQL_營運成本收支單對帳表_修改日期() : conn.Close()
97
+        SQL_營運成本收支單對帳表_修改出納日期() : conn.Close()
98
+
99
+        ComboBox1下拉表單資料載入()
100
+        查詢日期_cb.Text = Year(Today) : 查詢日期1_cb.SelectedIndex = Month(Today) - 1
101
+        PA20 = "" : PA19 = "" : PA18 = "" : PA17 = 查詢日期_cb.Text : PA16 = 查詢日期1_cb.Text
102
+        PA20 = "AND (公帳控制表.審核日期 LIKE '" & PA17 & "/" & PA16 & "%') "
103
+        If YD_ERP_SYS.Size.Width > 1440 And YD_ERP_SYS.Size.Height > 900 Then
104
+            字體_NUD.Value = 9 : 隱藏申請審核資訊_cb.Checked = False
105
+        ElseIf YD_ERP_SYS.Size.Width <= 1440 And YD_ERP_SYS.Size.Height <= 900 Then
106
+            字體_NUD.Value = 7.6 : 隱藏申請審核資訊_cb.Checked = True
107
+        End If
108
+    End Sub
109
+    Private Sub 營運成本收支單_對帳表_SizeChanged(sender As Object, e As EventArgs) Handles MyBase.SizeChanged
110
+        If YD_ERP_SYS.Size.Width > 1440 And YD_ERP_SYS.Size.Height > 900 Then
111
+            字體_NUD.Value = 9 : 隱藏申請審核資訊_cb.Checked = False
112
+        ElseIf YD_ERP_SYS.Size.Width <= 1440 And YD_ERP_SYS.Size.Height <= 900 Then
113
+            字體_NUD.Value = 7.6 : 隱藏申請審核資訊_cb.Checked = True
114
+        End If
115
+    End Sub
116
+    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles 清除查詢資料_bt.Click
117
+        ComboBox1下拉表單資料載入()
118
+        查詢日期1_cb.Items.Clear()
119
+        查詢日期1_cb.Items.Add("01") : 查詢日期1_cb.Items.Add("02") : 查詢日期1_cb.Items.Add("03") : 查詢日期1_cb.Items.Add("04") : 查詢日期1_cb.Items.Add("05") : 查詢日期1_cb.Items.Add("06")
120
+        查詢日期1_cb.Items.Add("07") : 查詢日期1_cb.Items.Add("08") : 查詢日期1_cb.Items.Add("09") : 查詢日期1_cb.Items.Add("10") : 查詢日期1_cb.Items.Add("11") : 查詢日期1_cb.Items.Add("12")
121
+        PA17 = "" : PA16 = "" : PA20 = ""
122
+        明細_dgv.DataSource = Nothing : ds.Clear()
123
+    End Sub
124
+    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles 對帳記錄存檔_bt.Click
125
+
126
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
127
+            PA15 = 明細_dgv.Rows(i).Cells("現金點交").Value
128
+            PA14 = 明細_dgv.Rows(i).Cells("零用金點交").Value
129
+            PA13 = 明細_dgv.Rows(i).Cells("支出點交").Value
130
+            PA12 = 明細_dgv.Rows(i).Cells("支票兌現").Value
131
+            PA11 = 明細_dgv.Rows(i).Cells("收支單號").Value
132
+            PA10 = 明細_dgv.Rows(i).Cells("項次").Value
133
+            資料數 = 明細_dgv.Rows.Count : MyModule1.進度條()
134
+            SQL_營運成本收支單對帳表_修改對帳記錄存檔() : conn1.Close()
135
+        Next
136
+        MsgBox("存檔完成。") : Set_清單1() : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
137
+    End Sub
138
+    Private Sub 總金額計算()
139
+        Dim FFGG As Integer = 0 : Dim GGHH As Integer = 0 : Dim HHJJ As Integer = 0 : Dim JJKK As Integer = 0 : Dim KKLL As Integer = 0
140
+        現金_tb.Text = "0" : 支出_tb.Text = "0" : 損益_tb.Text = "0" : 零用金_tb.Text = "0" : 已兌現支票_tb.Text = "0" : 未兌現支票_tb.Text = "0"
141
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
142
+            If 明細_dgv.Rows(i).Cells("收支單號").Value = 收支單號_tb.Text Then
143
+                FFGG = Val(FFGG) + 明細_dgv.Rows(i).Cells("現金").Value * 明細_dgv.Rows(i).Cells("匯率").Value
144
+                GGHH = Val(GGHH) + 明細_dgv.Rows(i).Cells("支出").Value * 明細_dgv.Rows(i).Cells("匯率").Value
145
+                HHJJ = Val(HHJJ) + 明細_dgv.Rows(i).Cells("零用金").Value * 明細_dgv.Rows(i).Cells("匯率").Value
146
+                If 明細_dgv(9, i).Value <> 0 And 明細_dgv(18, i).Value = True Then
147
+                    JJKK = Val(JJKK) + 明細_dgv.Rows(i).Cells("支票").Value * 明細_dgv.Rows(i).Cells("匯率").Value
148
+                ElseIf 明細_dgv(9, i).Value <> 0 And 明細_dgv(18, i).Value = False Then
149
+                    KKLL = Val(KKLL) + 明細_dgv.Rows(i).Cells("支票").Value * 明細_dgv.Rows(i).Cells("匯率").Value
150
+                End If
151
+            End If
152
+        Next i
153
+        現金_tb.Text = FFGG : 支出_tb.Text = GGHH : 零用金_tb.Text = HHJJ : 已兌現支票_tb.Text = JJKK : 未兌現支票_tb.Text = KKLL
154
+        損益_tb.Text = JJKK + HHJJ + FFGG - GGHH
155
+        If Val(損益_tb.Text) > 0 Then : 損益_tb.ForeColor = Color.Blue : Else : 損益_tb.ForeColor = Color.Red : End If
156
+        現金_tb.Text = Strings.Format(Val(現金_tb.Text), "#,##0") : 支出_tb.Text = Strings.Format(Val(支出_tb.Text), "#,##0") : 損益_tb.Text = Strings.Format(Val(損益_tb.Text), "#,##0")
157
+        零用金_tb.Text = Strings.Format(Val(零用金_tb.Text), "#,##0") : 已兌現支票_tb.Text = Strings.Format(Val(已兌現支票_tb.Text), "#,##0") : 未兌現支票_tb.Text = Strings.Format(Val(未兌現支票_tb.Text), "#,##0")
158
+    End Sub
159
+    Private Sub DataGridView1_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 明細_dgv.CellClick
160
+        If e.RowIndex = -1 Then : Else
161
+            收支單號_tb.Text = 明細_dgv.Rows(e.RowIndex).Cells("收支單號").Value
162
+            總金額計算()
163
+        End If
164
+    End Sub
165
+    Private Sub DataGridView1_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 明細_dgv.RowPostPaint
166
+        Dim linePen As New Pen(Color.Blue, 2)
167
+        If e.RowIndex = 明細_dgv.Rows.Count - 1 Then
168
+            Exit Sub
169
+        Else
170
+            If 明細_dgv(0, e.RowIndex).Value.ToString <> 明細_dgv(0, e.RowIndex + 1).Value.ToString Then
171
+                Dim startX As Integer = IIf(明細_dgv.RowHeadersVisible, 明細_dgv.RowHeadersWidth, 0)
172
+                Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
173
+                Dim endX As Integer = startX + 明細_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 明細_dgv.HorizontalScrollingOffset
174
+                e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
175
+                Exit Sub
176
+            End If
177
+        End If
178
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
179
+            If 明細_dgv(9, i).Value <> 0 And 明細_dgv(18, i).Value = True Then
180
+                明細_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
181
+            ElseIf 明細_dgv(9, i).Value <> 0 And 明細_dgv(18, i).Value = False Then
182
+                明細_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
183
+            End If
184
+        Next
185
+    End Sub
186
+    Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 查詢日期_cb.SelectedIndexChanged
187
+        PA17 = 查詢日期_cb.Text
188
+        If PA17 = "" Or PA16 = "" Then
189
+        Else
190
+            PA20 = "AND (公帳控制表.審核日期 LIKE '" & PA17 & "/" & PA16 & "%') "
191
+            Set_清單1()
192
+        End If
193
+    End Sub
194
+    Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 查詢日期1_cb.SelectedIndexChanged
195
+        PA16 = 查詢日期1_cb.Text
196
+        If PA17 = "" Or PA16 = "" Then
197
+        Else
198
+            PA20 = "AND (公帳控制表.審核日期 LIKE '" & PA17 & "/" & PA16 & "%') "
199
+            Set_清單1()
200
+        End If
201
+    End Sub
202
+    Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles 只顯示支票資料_cb.Click
203
+        If 只顯示支票資料_cb.Checked = False Then
204
+            PA19 = ""
205
+            Set_清單1()
206
+        Else
207
+            PA19 = " AND (公帳流水帳.支票數 <> 0) "
208
+            Set_清單1()
209
+        End If
210
+    End Sub
211
+    Private Sub CheckBox4_CheckedChanged(sender As Object, e As EventArgs) Handles 隱藏申請審核資訊_cb.Click
212
+        Set_grid()
213
+    End Sub
214
+    Private Sub CheckBox5_CheckedChanged(sender As Object, e As EventArgs) Handles 隱藏作帳點交資訊_cb.Click
215
+        Set_grid()
216
+    End Sub
217
+    '-----------------------------滑鼠右鍵--------------------------------------------------------------------------------------------------------------------------------------
218
+    Private Sub BBBToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles BBBToolStripMenuItem.Click
219
+        MsgBox("待開發。")
220
+        '列印_零用金支付明細.ShowDialog()
221
+    End Sub
222
+    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles 關鍵字查詢_bt.Click
223
+        PA = InputBox("請輸入要查詢的關鍵字。")
224
+        PA18 = " AND (公帳控制表.支付單號 LIKE N'%" & PA & "%' OR 公帳控制表.申請人 LIKE N'%" & PA & "%' OR 公帳控制表.審核人 LIKE N'%" & PA &
225
+                 "%' OR 公帳流水帳.明細 LIKE N'%" & PA & "%' OR 公帳控制表.備註 LIKE N'%" & PA & "%' OR 公帳流水帳.備註 LIKE N'%" & PA & "%')" : Set_清單1()
226
+        PA18 = "" : PA = ""
227
+    End Sub
228
+
229
+    '-----------------------------EXCEL--------------------------------------------------------------------------------------------------------------------------------------
230
+    Private Shared Function NewMethod(xlBook As Microsoft.Office.Interop.Excel.Workbook) As Microsoft.Office.Interop.Excel.Worksheet
231
+        Return CType(xlBook.Worksheets.Add, Microsoft.Office.Interop.Excel.Worksheet)
232
+    End Function
233
+    Private Sub 匯出EXCEL_bt_Click(sender As Object, e As EventArgs) Handles 匯出EXCEL_bt.Click
234
+        xlApp = CType(CreateObject("Excel.Application"), Microsoft.Office.Interop.Excel.Application)
235
+        xlApp.Visible = True
236
+        xlApp.DisplayAlerts = True
237
+        xlApp.Application.WindowState = xlMaximized
238
+        xlBook = xlApp.Workbooks.Add
239
+        xlSheet = NewMethod(xlBook)
240
+        xlBook.Activate()
241
+        xlSheet.Activate()
242
+
243
+        xlSheet.Cells(1, 1) = "雅邸家具有限公司-營運費用收支明細表"
244
+        xlSheet.Cells(2, 1) = "收支單號 "
245
+        xlSheet.Cells(2, 2) = "申請人"
246
+        xlSheet.Cells(2, 3) = "申請日期 "
247
+        xlSheet.Cells(2, 4) = "審核人"
248
+        xlSheet.Cells(2, 5) = "審核日期"
249
+        xlSheet.Cells(2, 6) = "項次"
250
+        xlSheet.Cells(2, 7) = "會計科目 "
251
+        xlSheet.Cells(2, 8) = "用途與內容"
252
+        xlSheet.Cells(2, 9) = "零用金"
253
+        xlSheet.Cells(2, 10) = "支票"
254
+        xlSheet.Cells(2, 11) = "現金"
255
+        xlSheet.Cells(2, 12) = "支出"
256
+
257
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
258
+            xlSheet.Cells(i + 3, 1) = 明細_dgv.Rows(i).Cells("收支單號").Value
259
+            xlSheet.Cells(i + 3, 2) = 明細_dgv.Rows(i).Cells("申請人").Value
260
+            xlSheet.Cells(i + 3, 3) = 明細_dgv.Rows(i).Cells("申請日期").Value
261
+            xlSheet.Cells(i + 3, 4) = 明細_dgv.Rows(i).Cells("審核人").Value
262
+            xlSheet.Cells(i + 3, 5) = 明細_dgv.Rows(i).Cells("審核日期").Value
263
+            xlSheet.Cells(i + 3, 6) = 明細_dgv.Rows(i).Cells("項次").Value
264
+            xlSheet.Cells(i + 3, 7) = 明細_dgv.Rows(i).Cells("會計科目").Value
265
+            xlSheet.Cells(i + 3, 8) = 明細_dgv.Rows(i).Cells("用途與內容").Value
266
+            xlSheet.Cells(i + 3, 9) = 明細_dgv.Rows(i).Cells("零用金").Value
267
+            xlSheet.Cells(i + 3, 10) = 明細_dgv.Rows(i).Cells("支票").Value
268
+            xlSheet.Cells(i + 3, 11) = 明細_dgv.Rows(i).Cells("現金").Value
269
+            xlSheet.Cells(i + 3, 12) = 明細_dgv.Rows(i).Cells("支出").Value
270
+            N2 = i + 3
271
+        Next i
272
+
273
+        xlSheet.Cells(N2 + 1, 8) = "合計"
274
+        xlSheet.Cells(N2 + 1, 9) = "=SUM(I3:I" & N2 & ")"
275
+        xlSheet.Cells(N2 + 1, 10) = "=SUM(J3:J" & N2 & ")"
276
+        xlSheet.Cells(N2 + 1, 11) = "=SUM(K3:K" & N2 & ")"
277
+        xlSheet.Cells(N2 + 1, 12) = "=SUM(L3:L" & N2 & ")"
278
+
279
+        '--------------------------------------彙總-----------------------------
280
+        xlSheet.Cells(N2 + 2, 8) = "彙總"
281
+        xlSheet.Cells(N2 + 2, 9) = "=I" & N2 + 1 & "+J" & N2 + 1 & "+K" & N2 + 1 & "-L" & N2 + 1 & ""
282
+
283
+        BB(xlApp, xlSheet)
284
+        xlSheet.PageSetup.PrintArea = ""
285
+        xlApp.Cells.Select()
286
+        xlApp.Application.WindowState = xlMinimized
287
+        MsgBox("列印完成!!!")
288
+        'Me.Close()
289
+    End Sub
290
+    Private Sub BB(ByVal myExcel As Microsoft.Office.Interop.Excel.Application, ByVal xlSheet As Microsoft.Office.Interop.Excel.Worksheet)
291
+        xlSheet.Cells.Select()
292
+        With myExcel.Selection.Font
293
+            .Name = "微軟正黑體" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
294
+            .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
295
+        End With
296
+
297
+        xlSheet.Columns("A:A").Select : myExcel.Selection.ColumnWidth = 15
298
+        xlSheet.Columns("B:B").Select : myExcel.Selection.ColumnWidth = 9
299
+        xlSheet.Columns("C:C").Select : myExcel.Selection.ColumnWidth = 9
300
+        xlSheet.Columns("D:D").Select : myExcel.Selection.ColumnWidth = 9
301
+        xlSheet.Columns("E:E").Select : myExcel.Selection.ColumnWidth = 9
302
+        xlSheet.Columns("F:F").Select : myExcel.Selection.ColumnWidth = 5
303
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
304
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
305
+        End With
306
+
307
+        xlSheet.Columns("G:G").Select : myExcel.Selection.ColumnWidth = 20
308
+        xlSheet.Columns("H:H").Select : myExcel.Selection.ColumnWidth = 35
309
+        With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
310
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
311
+        End With
312
+
313
+        xlSheet.Columns("I:L").Select : myExcel.Selection.ColumnWidth = 9 : myExcel.Selection.Style = "Comma"
314
+        myExcel.Selection.NumberFormatLocal = "_-* #,##0.0_-;-* #,##0.0_-;_-* ""-""??_-;_-@_-"
315
+        myExcel.Selection.NumberFormatLocal = "_-* #,##0_-;-* #,##0_-;_-* ""-""??_-;_-@_-"
316
+        xlSheet.Rows("1:1").Select : myExcel.Selection.RowHeight = 35
317
+        xlSheet.Rows("2:2").Select : myExcel.Selection.RowHeight = 30
318
+        With myExcel.Selection : .VerticalAlignment = xlTop : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0 : .ShrinkToFit = False
319
+            .ReadingOrder = xlContext : .MergeCells = False
320
+        End With
321
+
322
+        myExcel.Selection.AutoFilter
323
+        xlSheet.Rows("1:1").Select
324
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False
325
+            .IndentLevel = 0 : .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
326
+        End With
327
+
328
+        xlSheet.Range("A1:L1").Select()
329
+        With myExcel.Selection
330
+            .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
331
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
332
+        End With
333
+        myExcel.Selection.Merge
334
+        xlSheet.Rows("3:3").Select : myExcel.ActiveWindow.FreezePanes = True : xlSheet.Range("A1:L2").Select()
335
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
336
+
337
+        With myExcel.Selection.Borders(xlEdgeLeft)
338
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
339
+        End With
340
+
341
+        With myExcel.Selection.Borders(xlEdgeTop)
342
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
343
+        End With
344
+
345
+        With myExcel.Selection.Borders(xlEdgeBottom)
346
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
347
+        End With
348
+
349
+        With myExcel.Selection.Borders(xlEdgeRight)
350
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
351
+        End With
352
+
353
+        With myExcel.Selection.Borders(xlInsideVertical)
354
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
355
+        End With
356
+        With myExcel.Selection.Borders(xlInsideHorizontal)
357
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
358
+        End With
359
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
360
+
361
+        With myExcel.Selection.Borders(xlEdgeLeft)
362
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
363
+        End With
364
+
365
+        With myExcel.Selection.Borders(xlEdgeTop)
366
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
367
+        End With
368
+
369
+        With myExcel.Selection.Borders(xlEdgeBottom)
370
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
371
+        End With
372
+        With myExcel.Selection.Borders(xlEdgeRight)
373
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
374
+        End With
375
+        With myExcel.Selection.Borders(xlInsideVertical)
376
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
377
+        End With
378
+        With myExcel.Selection.Borders(xlInsideHorizontal)
379
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
380
+        End With
381
+        xlSheet.Range("A3:L" & N2).Select()
382
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
383
+
384
+        With myExcel.Selection.Borders(xlEdgeLeft)
385
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
386
+        End With
387
+        With myExcel.Selection.Borders(xlEdgeTop)
388
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
389
+        End With
390
+        With myExcel.Selection.Borders(xlEdgeBottom)
391
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
392
+        End With
393
+        With myExcel.Selection.Borders(xlEdgeRight)
394
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
395
+        End With
396
+        With myExcel.Selection.Borders(xlInsideVertical)
397
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
398
+        End With
399
+        With myExcel.Selection.Borders(xlInsideHorizontal)
400
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
401
+        End With
402
+        myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone
403
+        myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
404
+        With myExcel.Selection.Borders(xlEdgeLeft)
405
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
406
+        End With
407
+        With myExcel.Selection.Borders(xlEdgeTop)
408
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
409
+        End With
410
+        With myExcel.Selection.Borders(xlEdgeBottom)
411
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
412
+        End With
413
+        With myExcel.Selection.Borders(xlEdgeRight)
414
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlMedium
415
+        End With
416
+        With myExcel.Selection.Borders(xlInsideVertical)
417
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
418
+        End With
419
+        With myExcel.Selection.Borders(xlInsideHorizontal)
420
+            .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin
421
+        End With
422
+        xlSheet.Range("L2").Select() : myExcel.Selection.ClearContents
423
+        xlSheet.Range("L2").Select() : myExcel.Selection.ClearContents
424
+
425
+        xlSheet.Range("A2:L2").Select()
426
+        With myExcel.Selection
427
+            .HorizontalAlignment = xlCenter : .VerticalAlignment = xlTop : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
428
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
429
+        End With
430
+        With myExcel.Selection.Font
431
+            .Name = "微軟正黑體"
432
+            .Size = 14 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False : .Shadow = False : .Underline = xlUnderlineStyleNone
433
+            .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
434
+        End With
435
+        With myExcel.Selection.Font
436
+            .Name = "微軟正黑體" : .Size = 12 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False : .Shadow = False
437
+            .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
438
+        End With
439
+        With myExcel.Selection.Interior
440
+            .Pattern = xlSolid : .PatternColorIndex = xlAutomatic : .ThemeColor = xlThemeColorAccent6 : .TintAndShade = 0 : .PatternTintAndShade = 0
441
+        End With
442
+        xlSheet.Range("A1:L1").Select() : myExcel.Selection.Font.Size = 11
443
+        With myExcel.Selection.Font
444
+            .Name = "微軟正黑體" : .Size = 22 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False
445
+            .Shadow = False : .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
446
+        End With
447
+    End Sub
448
+
449
+    Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
450
+        明細_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
451
+    End Sub
452
+End Class

+ 800
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單一覽表.Designer.vb Переглянути файл

@@ -0,0 +1,800 @@
1
+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
2
+Partial Class 營運成本收支單一覽表
3
+    Inherits System.Windows.Forms.Form
4
+
5
+    'Form 覆寫 Dispose 以清除元件清單。
6
+    <System.Diagnostics.DebuggerNonUserCode()>
7
+    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8
+        Try
9
+            If disposing AndAlso components IsNot Nothing Then
10
+                components.Dispose()
11
+            End If
12
+        Finally
13
+            MyBase.Dispose(disposing)
14
+        End Try
15
+    End Sub
16
+
17
+    '為 Windows Form 設計工具的必要項
18
+    Private components As System.ComponentModel.IContainer
19
+
20
+    '注意: 以下為 Windows Form 設計工具所需的程序
21
+    '可以使用 Windows Form 設計工具進行修改。
22
+    '請勿使用程式碼編輯器進行修改。
23
+    <System.Diagnostics.DebuggerStepThrough()>
24
+    Private Sub InitializeComponent()
25
+        Me.components = New System.ComponentModel.Container()
26
+        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Me.會計月_ch = New System.Windows.Forms.CheckBox()
32
+        Me.下個月_bt = New System.Windows.Forms.Button()
33
+        Me.上個月_bt = New System.Windows.Forms.Button()
34
+        Me.中間日期_dtp = New System.Windows.Forms.DateTimePicker()
35
+        Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
36
+        Me.重新讀取ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
37
+        Me.一般月_ch = New System.Windows.Forms.CheckBox()
38
+        Me.Label2 = New System.Windows.Forms.Label()
39
+        Me.人民幣零用金_tb = New System.Windows.Forms.TextBox()
40
+        Me.人民幣零用金_ = New System.Windows.Forms.Label()
41
+        Me.人民幣支票_tb = New System.Windows.Forms.TextBox()
42
+        Me.人民幣現金餘額_tb = New System.Windows.Forms.TextBox()
43
+        Me.Label13 = New System.Windows.Forms.Label()
44
+        Me.人民幣支出_tb = New System.Windows.Forms.TextBox()
45
+        Me.Label16 = New System.Windows.Forms.Label()
46
+        Me.人民幣現金_tb = New System.Windows.Forms.TextBox()
47
+        Me.Label17 = New System.Windows.Forms.Label()
48
+        Me.圖片編碼_tb = New System.Windows.Forms.TextBox()
49
+        Me.驗證碼_tb = New System.Windows.Forms.TextBox()
50
+        Me.Label20 = New System.Windows.Forms.Label()
51
+        Me.Label19 = New System.Windows.Forms.Label()
52
+        Me.簽名圖_pb = New System.Windows.Forms.PictureBox()
53
+        Me.彙總_rb = New System.Windows.Forms.RadioButton()
54
+        Me.明細_rb = New System.Windows.Forms.RadioButton()
55
+        Me.Label14 = New System.Windows.Forms.Label()
56
+        Me.台幣零用金_tb = New System.Windows.Forms.TextBox()
57
+        Me.Label15 = New System.Windows.Forms.Label()
58
+        Me.台幣支票_tb = New System.Windows.Forms.TextBox()
59
+        Me.台幣現金餘額_tb = New System.Windows.Forms.TextBox()
60
+        Me.Label9 = New System.Windows.Forms.Label()
61
+        Me.台幣支出_tb = New System.Windows.Forms.TextBox()
62
+        Me.Label11 = New System.Windows.Forms.Label()
63
+        Me.當月_bt = New System.Windows.Forms.Button()
64
+        Me.當日_bt = New System.Windows.Forms.Button()
65
+        Me.Label4 = New System.Windows.Forms.Label()
66
+        Me.結束日期_dtp = New System.Windows.Forms.DateTimePicker()
67
+        Me.開始日期_dtp = New System.Windows.Forms.DateTimePicker()
68
+        Me.台幣現金_tb = New System.Windows.Forms.TextBox()
69
+        Me.Label10 = New System.Windows.Forms.Label()
70
+        Me.支付單列印成EXCEL = New System.Windows.Forms.Button()
71
+        Me.Label8 = New System.Windows.Forms.Label()
72
+        Me.Label7 = New System.Windows.Forms.Label()
73
+        Me.審核日期_dtp = New System.Windows.Forms.DateTimePicker()
74
+        Me.申請日期_dtp = New System.Windows.Forms.DateTimePicker()
75
+        Me.Label5 = New System.Windows.Forms.Label()
76
+        Me.審核人_tb = New System.Windows.Forms.TextBox()
77
+        Me.申請人_tb = New System.Windows.Forms.TextBox()
78
+        Me.收支單號_tb = New System.Windows.Forms.TextBox()
79
+        Me.Label6 = New System.Windows.Forms.Label()
80
+        Me.單據彙總_dgv = New System.Windows.Forms.DataGridView()
81
+        Me.Label1 = New System.Windows.Forms.Label()
82
+        Me.Label3 = New System.Windows.Forms.Label()
83
+        Me.明細_dgv = New System.Windows.Forms.DataGridView()
84
+        Me.財務彙總_dgv = New System.Windows.Forms.DataGridView()
85
+        Me.字體大小調整_lb = New System.Windows.Forms.Label()
86
+        Me.字體_NUD = New System.Windows.Forms.NumericUpDown()
87
+        Me.ContextMenuStrip1.SuspendLayout()
88
+        CType(Me.簽名圖_pb, System.ComponentModel.ISupportInitialize).BeginInit()
89
+        CType(Me.單據彙總_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
90
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
91
+        CType(Me.財務彙總_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
92
+        CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).BeginInit()
93
+        Me.SuspendLayout()
94
+        '
95
+        '會計月_ch
96
+        '
97
+        Me.會計月_ch.AutoSize = True
98
+        Me.會計月_ch.Checked = True
99
+        Me.會計月_ch.CheckState = System.Windows.Forms.CheckState.Checked
100
+        Me.會計月_ch.Location = New System.Drawing.Point(43, 58)
101
+        Me.會計月_ch.Name = "會計月_ch"
102
+        Me.會計月_ch.Size = New System.Drawing.Size(63, 20)
103
+        Me.會計月_ch.TabIndex = 1222
104
+        Me.會計月_ch.Text = "會計月"
105
+        Me.會計月_ch.UseVisualStyleBackColor = True
106
+        '
107
+        '下個月_bt
108
+        '
109
+        Me.下個月_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
110
+        Me.下個月_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
111
+        Me.下個月_bt.Location = New System.Drawing.Point(274, 56)
112
+        Me.下個月_bt.Name = "下個月_bt"
113
+        Me.下個月_bt.Size = New System.Drawing.Size(57, 23)
114
+        Me.下個月_bt.TabIndex = 1221
115
+        Me.下個月_bt.Text = "下個月"
116
+        Me.下個月_bt.UseVisualStyleBackColor = True
117
+        '
118
+        '上個月_bt
119
+        '
120
+        Me.上個月_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
121
+        Me.上個月_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
122
+        Me.上個月_bt.Location = New System.Drawing.Point(216, 56)
123
+        Me.上個月_bt.Name = "上個月_bt"
124
+        Me.上個月_bt.Size = New System.Drawing.Size(57, 23)
125
+        Me.上個月_bt.TabIndex = 1220
126
+        Me.上個月_bt.Text = "上個月"
127
+        Me.上個月_bt.UseVisualStyleBackColor = True
128
+        '
129
+        '中間日期_dtp
130
+        '
131
+        Me.中間日期_dtp.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
132
+        Me.中間日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
133
+        Me.中間日期_dtp.Location = New System.Drawing.Point(39, 100)
134
+        Me.中間日期_dtp.Name = "中間日期_dtp"
135
+        Me.中間日期_dtp.Size = New System.Drawing.Size(43, 23)
136
+        Me.中間日期_dtp.TabIndex = 1219
137
+        Me.中間日期_dtp.Visible = False
138
+        '
139
+        'ContextMenuStrip1
140
+        '
141
+        Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.重新讀取ToolStripMenuItem})
142
+        Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
143
+        Me.ContextMenuStrip1.Size = New System.Drawing.Size(123, 26)
144
+        '
145
+        '重新讀取ToolStripMenuItem
146
+        '
147
+        Me.重新讀取ToolStripMenuItem.Name = "重新讀取ToolStripMenuItem"
148
+        Me.重新讀取ToolStripMenuItem.Size = New System.Drawing.Size(122, 22)
149
+        Me.重新讀取ToolStripMenuItem.Text = "重新讀取"
150
+        '
151
+        '一般月_ch
152
+        '
153
+        Me.一般月_ch.AutoSize = True
154
+        Me.一般月_ch.Location = New System.Drawing.Point(135, 58)
155
+        Me.一般月_ch.Name = "一般月_ch"
156
+        Me.一般月_ch.Size = New System.Drawing.Size(63, 20)
157
+        Me.一般月_ch.TabIndex = 1223
158
+        Me.一般月_ch.Text = "一般月"
159
+        Me.一般月_ch.UseVisualStyleBackColor = True
160
+        '
161
+        'Label2
162
+        '
163
+        Me.Label2.AutoSize = True
164
+        Me.Label2.ForeColor = System.Drawing.Color.Red
165
+        Me.Label2.Location = New System.Drawing.Point(525, 59)
166
+        Me.Label2.Name = "Label2"
167
+        Me.Label2.Size = New System.Drawing.Size(32, 16)
168
+        Me.Label2.TabIndex = 1217
169
+        Me.Label2.Text = "支票"
170
+        '
171
+        '人民幣零用金_tb
172
+        '
173
+        Me.人民幣零用金_tb.ForeColor = System.Drawing.Color.Red
174
+        Me.人民幣零用金_tb.Location = New System.Drawing.Point(420, 56)
175
+        Me.人民幣零用金_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
176
+        Me.人民幣零用金_tb.Name = "人民幣零用金_tb"
177
+        Me.人民幣零用金_tb.Size = New System.Drawing.Size(99, 23)
178
+        Me.人民幣零用金_tb.TabIndex = 1216
179
+        Me.人民幣零用金_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
180
+        '
181
+        '人民幣零用金_
182
+        '
183
+        Me.人民幣零用金_.AutoSize = True
184
+        Me.人民幣零用金_.ForeColor = System.Drawing.Color.Red
185
+        Me.人民幣零用金_.Location = New System.Drawing.Point(333, 60)
186
+        Me.人民幣零用金_.Name = "人民幣零用金_"
187
+        Me.人民幣零用金_.Size = New System.Drawing.Size(85, 16)
188
+        Me.人民幣零用金_.TabIndex = 1215
189
+        Me.人民幣零用金_.Text = "人民幣-零用金"
190
+        '
191
+        '人民幣支票_tb
192
+        '
193
+        Me.人民幣支票_tb.ForeColor = System.Drawing.Color.Red
194
+        Me.人民幣支票_tb.Location = New System.Drawing.Point(559, 56)
195
+        Me.人民幣支票_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
196
+        Me.人民幣支票_tb.Name = "人民幣支票_tb"
197
+        Me.人民幣支票_tb.Size = New System.Drawing.Size(99, 23)
198
+        Me.人民幣支票_tb.TabIndex = 1218
199
+        Me.人民幣支票_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
200
+        '
201
+        '人民幣現金餘額_tb
202
+        '
203
+        Me.人民幣現金餘額_tb.ForeColor = System.Drawing.Color.Red
204
+        Me.人民幣現金餘額_tb.Location = New System.Drawing.Point(1000, 56)
205
+        Me.人民幣現金餘額_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
206
+        Me.人民幣現金餘額_tb.Name = "人民幣現金餘額_tb"
207
+        Me.人民幣現金餘額_tb.Size = New System.Drawing.Size(113, 23)
208
+        Me.人民幣現金餘額_tb.TabIndex = 1214
209
+        Me.人民幣現金餘額_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
210
+        '
211
+        'Label13
212
+        '
213
+        Me.Label13.AutoSize = True
214
+        Me.Label13.ForeColor = System.Drawing.Color.Red
215
+        Me.Label13.Location = New System.Drawing.Point(942, 60)
216
+        Me.Label13.Name = "Label13"
217
+        Me.Label13.Size = New System.Drawing.Size(56, 16)
218
+        Me.Label13.TabIndex = 1213
219
+        Me.Label13.Text = "現金餘額"
220
+        '
221
+        '人民幣支出_tb
222
+        '
223
+        Me.人民幣支出_tb.ForeColor = System.Drawing.Color.Red
224
+        Me.人民幣支出_tb.Location = New System.Drawing.Point(837, 56)
225
+        Me.人民幣支出_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
226
+        Me.人民幣支出_tb.Name = "人民幣支出_tb"
227
+        Me.人民幣支出_tb.Size = New System.Drawing.Size(99, 23)
228
+        Me.人民幣支出_tb.TabIndex = 1212
229
+        Me.人民幣支出_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
230
+        '
231
+        'Label16
232
+        '
233
+        Me.Label16.AutoSize = True
234
+        Me.Label16.ForeColor = System.Drawing.Color.Red
235
+        Me.Label16.Location = New System.Drawing.Point(803, 59)
236
+        Me.Label16.Name = "Label16"
237
+        Me.Label16.Size = New System.Drawing.Size(32, 16)
238
+        Me.Label16.TabIndex = 1211
239
+        Me.Label16.Text = "支出"
240
+        '
241
+        '人民幣現金_tb
242
+        '
243
+        Me.人民幣現金_tb.ForeColor = System.Drawing.Color.Red
244
+        Me.人民幣現金_tb.Location = New System.Drawing.Point(698, 56)
245
+        Me.人民幣現金_tb.Name = "人民幣現金_tb"
246
+        Me.人民幣現金_tb.Size = New System.Drawing.Size(99, 23)
247
+        Me.人民幣現金_tb.TabIndex = 1210
248
+        Me.人民幣現金_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
249
+        '
250
+        'Label17
251
+        '
252
+        Me.Label17.AutoSize = True
253
+        Me.Label17.ForeColor = System.Drawing.Color.Red
254
+        Me.Label17.Location = New System.Drawing.Point(664, 59)
255
+        Me.Label17.Name = "Label17"
256
+        Me.Label17.Size = New System.Drawing.Size(32, 16)
257
+        Me.Label17.TabIndex = 1209
258
+        Me.Label17.Text = "現金"
259
+        '
260
+        '圖片編碼_tb
261
+        '
262
+        Me.圖片編碼_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
263
+        Me.圖片編碼_tb.ForeColor = System.Drawing.Color.Blue
264
+        Me.圖片編碼_tb.Location = New System.Drawing.Point(203, 596)
265
+        Me.圖片編碼_tb.Name = "圖片編碼_tb"
266
+        Me.圖片編碼_tb.Size = New System.Drawing.Size(128, 23)
267
+        Me.圖片編碼_tb.TabIndex = 1208
268
+        Me.圖片編碼_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
269
+        '
270
+        '驗證碼_tb
271
+        '
272
+        Me.驗證碼_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
273
+        Me.驗證碼_tb.ForeColor = System.Drawing.Color.Blue
274
+        Me.驗證碼_tb.Location = New System.Drawing.Point(204, 572)
275
+        Me.驗證碼_tb.Name = "驗證碼_tb"
276
+        Me.驗證碼_tb.Size = New System.Drawing.Size(127, 23)
277
+        Me.驗證碼_tb.TabIndex = 1207
278
+        Me.驗證碼_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
279
+        '
280
+        'Label20
281
+        '
282
+        Me.Label20.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
283
+        Me.Label20.AutoSize = True
284
+        Me.Label20.ForeColor = System.Drawing.Color.Blue
285
+        Me.Label20.Location = New System.Drawing.Point(147, 599)
286
+        Me.Label20.Name = "Label20"
287
+        Me.Label20.Size = New System.Drawing.Size(56, 16)
288
+        Me.Label20.TabIndex = 1206
289
+        Me.Label20.Text = "圖片編碼"
290
+        '
291
+        'Label19
292
+        '
293
+        Me.Label19.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
294
+        Me.Label19.AutoSize = True
295
+        Me.Label19.ForeColor = System.Drawing.Color.Blue
296
+        Me.Label19.Location = New System.Drawing.Point(147, 575)
297
+        Me.Label19.Name = "Label19"
298
+        Me.Label19.Size = New System.Drawing.Size(44, 16)
299
+        Me.Label19.TabIndex = 1205
300
+        Me.Label19.Text = "驗證碼"
301
+        '
302
+        '簽名圖_pb
303
+        '
304
+        Me.簽名圖_pb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
305
+        Me.簽名圖_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
306
+        Me.簽名圖_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
307
+        Me.簽名圖_pb.Location = New System.Drawing.Point(15, 572)
308
+        Me.簽名圖_pb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
309
+        Me.簽名圖_pb.Name = "簽名圖_pb"
310
+        Me.簽名圖_pb.Size = New System.Drawing.Size(129, 47)
311
+        Me.簽名圖_pb.TabIndex = 1204
312
+        Me.簽名圖_pb.TabStop = False
313
+        '
314
+        '彙總_rb
315
+        '
316
+        Me.彙總_rb.AutoSize = True
317
+        Me.彙總_rb.Location = New System.Drawing.Point(278, 7)
318
+        Me.彙總_rb.Name = "彙總_rb"
319
+        Me.彙總_rb.Size = New System.Drawing.Size(50, 20)
320
+        Me.彙總_rb.TabIndex = 1203
321
+        Me.彙總_rb.TabStop = True
322
+        Me.彙總_rb.Text = "彙總"
323
+        Me.彙總_rb.UseVisualStyleBackColor = True
324
+        '
325
+        '明細_rb
326
+        '
327
+        Me.明細_rb.AutoSize = True
328
+        Me.明細_rb.Location = New System.Drawing.Point(222, 7)
329
+        Me.明細_rb.Name = "明細_rb"
330
+        Me.明細_rb.Size = New System.Drawing.Size(50, 20)
331
+        Me.明細_rb.TabIndex = 1202
332
+        Me.明細_rb.TabStop = True
333
+        Me.明細_rb.Text = "明細"
334
+        Me.明細_rb.UseVisualStyleBackColor = True
335
+        '
336
+        'Label14
337
+        '
338
+        Me.Label14.AutoSize = True
339
+        Me.Label14.ForeColor = System.Drawing.Color.Green
340
+        Me.Label14.Location = New System.Drawing.Point(525, 33)
341
+        Me.Label14.Name = "Label14"
342
+        Me.Label14.Size = New System.Drawing.Size(32, 16)
343
+        Me.Label14.TabIndex = 1200
344
+        Me.Label14.Text = "支票"
345
+        '
346
+        '台幣零用金_tb
347
+        '
348
+        Me.台幣零用金_tb.ForeColor = System.Drawing.Color.Green
349
+        Me.台幣零用金_tb.Location = New System.Drawing.Point(420, 30)
350
+        Me.台幣零用金_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
351
+        Me.台幣零用金_tb.Name = "台幣零用金_tb"
352
+        Me.台幣零用金_tb.Size = New System.Drawing.Size(99, 23)
353
+        Me.台幣零用金_tb.TabIndex = 1199
354
+        Me.台幣零用金_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
355
+        '
356
+        'Label15
357
+        '
358
+        Me.Label15.AutoSize = True
359
+        Me.Label15.ForeColor = System.Drawing.Color.Green
360
+        Me.Label15.Location = New System.Drawing.Point(339, 34)
361
+        Me.Label15.Name = "Label15"
362
+        Me.Label15.Size = New System.Drawing.Size(79, 16)
363
+        Me.Label15.TabIndex = 1198
364
+        Me.Label15.Text = "台幣 - 零用金"
365
+        '
366
+        '台幣支票_tb
367
+        '
368
+        Me.台幣支票_tb.ForeColor = System.Drawing.Color.Green
369
+        Me.台幣支票_tb.Location = New System.Drawing.Point(559, 30)
370
+        Me.台幣支票_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
371
+        Me.台幣支票_tb.Name = "台幣支票_tb"
372
+        Me.台幣支票_tb.Size = New System.Drawing.Size(99, 23)
373
+        Me.台幣支票_tb.TabIndex = 1201
374
+        Me.台幣支票_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
375
+        '
376
+        '台幣現金餘額_tb
377
+        '
378
+        Me.台幣現金餘額_tb.ForeColor = System.Drawing.Color.Green
379
+        Me.台幣現金餘額_tb.Location = New System.Drawing.Point(1000, 30)
380
+        Me.台幣現金餘額_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
381
+        Me.台幣現金餘額_tb.Name = "台幣現金餘額_tb"
382
+        Me.台幣現金餘額_tb.Size = New System.Drawing.Size(113, 23)
383
+        Me.台幣現金餘額_tb.TabIndex = 1197
384
+        Me.台幣現金餘額_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
385
+        '
386
+        'Label9
387
+        '
388
+        Me.Label9.AutoSize = True
389
+        Me.Label9.ForeColor = System.Drawing.Color.Green
390
+        Me.Label9.Location = New System.Drawing.Point(942, 34)
391
+        Me.Label9.Name = "Label9"
392
+        Me.Label9.Size = New System.Drawing.Size(56, 16)
393
+        Me.Label9.TabIndex = 1196
394
+        Me.Label9.Text = "現金餘額"
395
+        '
396
+        '台幣支出_tb
397
+        '
398
+        Me.台幣支出_tb.ForeColor = System.Drawing.Color.Green
399
+        Me.台幣支出_tb.Location = New System.Drawing.Point(837, 30)
400
+        Me.台幣支出_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
401
+        Me.台幣支出_tb.Name = "台幣支出_tb"
402
+        Me.台幣支出_tb.Size = New System.Drawing.Size(99, 23)
403
+        Me.台幣支出_tb.TabIndex = 1195
404
+        Me.台幣支出_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
405
+        '
406
+        'Label11
407
+        '
408
+        Me.Label11.AutoSize = True
409
+        Me.Label11.ForeColor = System.Drawing.Color.Green
410
+        Me.Label11.Location = New System.Drawing.Point(803, 33)
411
+        Me.Label11.Name = "Label11"
412
+        Me.Label11.Size = New System.Drawing.Size(32, 16)
413
+        Me.Label11.TabIndex = 1194
414
+        Me.Label11.Text = "支出"
415
+        '
416
+        '當月_bt
417
+        '
418
+        Me.當月_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
419
+        Me.當月_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
420
+        Me.當月_bt.Location = New System.Drawing.Point(286, 29)
421
+        Me.當月_bt.Name = "當月_bt"
422
+        Me.當月_bt.Size = New System.Drawing.Size(45, 25)
423
+        Me.當月_bt.TabIndex = 1193
424
+        Me.當月_bt.Text = "當月"
425
+        Me.當月_bt.UseVisualStyleBackColor = True
426
+        '
427
+        '當日_bt
428
+        '
429
+        Me.當日_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
430
+        Me.當日_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
431
+        Me.當日_bt.Location = New System.Drawing.Point(232, 29)
432
+        Me.當日_bt.Name = "當日_bt"
433
+        Me.當日_bt.Size = New System.Drawing.Size(45, 25)
434
+        Me.當日_bt.TabIndex = 1192
435
+        Me.當日_bt.Text = "當日"
436
+        Me.當日_bt.UseVisualStyleBackColor = True
437
+        '
438
+        'Label4
439
+        '
440
+        Me.Label4.AutoSize = True
441
+        Me.Label4.Location = New System.Drawing.Point(112, 34)
442
+        Me.Label4.Name = "Label4"
443
+        Me.Label4.Size = New System.Drawing.Size(20, 16)
444
+        Me.Label4.TabIndex = 1191
445
+        Me.Label4.Text = "到"
446
+        '
447
+        '結束日期_dtp
448
+        '
449
+        Me.結束日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
450
+        Me.結束日期_dtp.Location = New System.Drawing.Point(135, 30)
451
+        Me.結束日期_dtp.Name = "結束日期_dtp"
452
+        Me.結束日期_dtp.Size = New System.Drawing.Size(91, 23)
453
+        Me.結束日期_dtp.TabIndex = 1190
454
+        '
455
+        '開始日期_dtp
456
+        '
457
+        Me.開始日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
458
+        Me.開始日期_dtp.Location = New System.Drawing.Point(15, 30)
459
+        Me.開始日期_dtp.Name = "開始日期_dtp"
460
+        Me.開始日期_dtp.Size = New System.Drawing.Size(91, 23)
461
+        Me.開始日期_dtp.TabIndex = 1189
462
+        '
463
+        '台幣現金_tb
464
+        '
465
+        Me.台幣現金_tb.ForeColor = System.Drawing.Color.Green
466
+        Me.台幣現金_tb.Location = New System.Drawing.Point(698, 30)
467
+        Me.台幣現金_tb.Name = "台幣現金_tb"
468
+        Me.台幣現金_tb.Size = New System.Drawing.Size(99, 23)
469
+        Me.台幣現金_tb.TabIndex = 1188
470
+        Me.台幣現金_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
471
+        '
472
+        'Label10
473
+        '
474
+        Me.Label10.AutoSize = True
475
+        Me.Label10.ForeColor = System.Drawing.Color.Green
476
+        Me.Label10.Location = New System.Drawing.Point(664, 33)
477
+        Me.Label10.Name = "Label10"
478
+        Me.Label10.Size = New System.Drawing.Size(32, 16)
479
+        Me.Label10.TabIndex = 1187
480
+        Me.Label10.Text = "現金"
481
+        '
482
+        '支付單列印成EXCEL
483
+        '
484
+        Me.支付單列印成EXCEL.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
485
+        Me.支付單列印成EXCEL.ForeColor = System.Drawing.Color.Blue
486
+        Me.支付單列印成EXCEL.Location = New System.Drawing.Point(1119, 3)
487
+        Me.支付單列印成EXCEL.Name = "支付單列印成EXCEL"
488
+        Me.支付單列印成EXCEL.Size = New System.Drawing.Size(130, 45)
489
+        Me.支付單列印成EXCEL.TabIndex = 1186
490
+        Me.支付單列印成EXCEL.Text = "支付單列印成EXCEL" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10)
491
+        Me.支付單列印成EXCEL.UseVisualStyleBackColor = True
492
+        '
493
+        'Label8
494
+        '
495
+        Me.Label8.AutoSize = True
496
+        Me.Label8.ForeColor = System.Drawing.Color.Blue
497
+        Me.Label8.Location = New System.Drawing.Point(980, 7)
498
+        Me.Label8.Name = "Label8"
499
+        Me.Label8.Size = New System.Drawing.Size(32, 16)
500
+        Me.Label8.TabIndex = 1185
501
+        Me.Label8.Text = "日期"
502
+        '
503
+        'Label7
504
+        '
505
+        Me.Label7.AutoSize = True
506
+        Me.Label7.ForeColor = System.Drawing.Color.Blue
507
+        Me.Label7.Location = New System.Drawing.Point(715, 7)
508
+        Me.Label7.Name = "Label7"
509
+        Me.Label7.Size = New System.Drawing.Size(32, 16)
510
+        Me.Label7.TabIndex = 1184
511
+        Me.Label7.Text = "日期"
512
+        '
513
+        '審核日期_dtp
514
+        '
515
+        Me.審核日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
516
+        Me.審核日期_dtp.Location = New System.Drawing.Point(1014, 4)
517
+        Me.審核日期_dtp.Name = "審核日期_dtp"
518
+        Me.審核日期_dtp.Size = New System.Drawing.Size(99, 23)
519
+        Me.審核日期_dtp.TabIndex = 1183
520
+        '
521
+        '申請日期_dtp
522
+        '
523
+        Me.申請日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
524
+        Me.申請日期_dtp.Location = New System.Drawing.Point(750, 4)
525
+        Me.申請日期_dtp.Name = "申請日期_dtp"
526
+        Me.申請日期_dtp.Size = New System.Drawing.Size(99, 23)
527
+        Me.申請日期_dtp.TabIndex = 1182
528
+        '
529
+        'Label5
530
+        '
531
+        Me.Label5.AutoSize = True
532
+        Me.Label5.ForeColor = System.Drawing.Color.Blue
533
+        Me.Label5.Location = New System.Drawing.Point(859, 7)
534
+        Me.Label5.Name = "Label5"
535
+        Me.Label5.Size = New System.Drawing.Size(44, 16)
536
+        Me.Label5.TabIndex = 1181
537
+        Me.Label5.Text = "審核人"
538
+        '
539
+        '審核人_tb
540
+        '
541
+        Me.審核人_tb.ForeColor = System.Drawing.Color.Blue
542
+        Me.審核人_tb.Location = New System.Drawing.Point(904, 4)
543
+        Me.審核人_tb.Name = "審核人_tb"
544
+        Me.審核人_tb.Size = New System.Drawing.Size(74, 23)
545
+        Me.審核人_tb.TabIndex = 1180
546
+        '
547
+        '申請人_tb
548
+        '
549
+        Me.申請人_tb.ForeColor = System.Drawing.Color.Blue
550
+        Me.申請人_tb.Location = New System.Drawing.Point(639, 4)
551
+        Me.申請人_tb.Name = "申請人_tb"
552
+        Me.申請人_tb.Size = New System.Drawing.Size(74, 23)
553
+        Me.申請人_tb.TabIndex = 1177
554
+        '
555
+        '收支單號_tb
556
+        '
557
+        Me.收支單號_tb.ForeColor = System.Drawing.Color.Blue
558
+        Me.收支單號_tb.Location = New System.Drawing.Point(438, 4)
559
+        Me.收支單號_tb.Name = "收支單號_tb"
560
+        Me.收支單號_tb.Size = New System.Drawing.Size(150, 23)
561
+        Me.收支單號_tb.TabIndex = 1175
562
+        '
563
+        'Label6
564
+        '
565
+        Me.Label6.AutoSize = True
566
+        Me.Label6.Location = New System.Drawing.Point(12, 9)
567
+        Me.Label6.Name = "Label6"
568
+        Me.Label6.Size = New System.Drawing.Size(140, 16)
569
+        Me.Label6.TabIndex = 1174
570
+        Me.Label6.Text = "已核准的營運成本收支單"
571
+        '
572
+        '單據彙總_dgv
573
+        '
574
+        DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
575
+        Me.單據彙總_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
576
+        Me.單據彙總_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
577
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
578
+        Me.單據彙總_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
579
+        Me.單據彙總_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
580
+        Me.單據彙總_dgv.Location = New System.Drawing.Point(16, 82)
581
+        Me.單據彙總_dgv.Name = "單據彙總_dgv"
582
+        Me.單據彙總_dgv.RowHeadersWidth = 5
583
+        Me.單據彙總_dgv.RowTemplate.Height = 24
584
+        Me.單據彙總_dgv.Size = New System.Drawing.Size(315, 483)
585
+        Me.單據彙總_dgv.TabIndex = 1173
586
+        '
587
+        'Label1
588
+        '
589
+        Me.Label1.AutoSize = True
590
+        Me.Label1.ForeColor = System.Drawing.Color.Blue
591
+        Me.Label1.Location = New System.Drawing.Point(334, 7)
592
+        Me.Label1.Name = "Label1"
593
+        Me.Label1.Size = New System.Drawing.Size(104, 16)
594
+        Me.Label1.TabIndex = 1176
595
+        Me.Label1.Text = "營運成本收支單號"
596
+        '
597
+        'Label3
598
+        '
599
+        Me.Label3.AutoSize = True
600
+        Me.Label3.ForeColor = System.Drawing.Color.Blue
601
+        Me.Label3.Location = New System.Drawing.Point(594, 7)
602
+        Me.Label3.Name = "Label3"
603
+        Me.Label3.Size = New System.Drawing.Size(44, 16)
604
+        Me.Label3.TabIndex = 1178
605
+        Me.Label3.Text = "申請人"
606
+        '
607
+        '明細_dgv
608
+        '
609
+        DataGridViewCellStyle12.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
610
+        Me.明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle12
611
+        Me.明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
612
+            Or System.Windows.Forms.AnchorStyles.Left) _
613
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
614
+        Me.明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
615
+        Me.明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
616
+        Me.明細_dgv.Location = New System.Drawing.Point(342, 82)
617
+        Me.明細_dgv.Name = "明細_dgv"
618
+        Me.明細_dgv.RowHeadersWidth = 5
619
+        DataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
620
+        Me.明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle13
621
+        Me.明細_dgv.RowTemplate.Height = 24
622
+        Me.明細_dgv.Size = New System.Drawing.Size(1045, 537)
623
+        Me.明細_dgv.TabIndex = 1179
624
+        '
625
+        '財務彙總_dgv
626
+        '
627
+        DataGridViewCellStyle14.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
628
+        Me.財務彙總_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle14
629
+        Me.財務彙總_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
630
+            Or System.Windows.Forms.AnchorStyles.Left) _
631
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
632
+        Me.財務彙總_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
633
+        Me.財務彙總_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
634
+        Me.財務彙總_dgv.Location = New System.Drawing.Point(342, 82)
635
+        Me.財務彙總_dgv.Name = "財務彙總_dgv"
636
+        Me.財務彙總_dgv.RowHeadersWidth = 5
637
+        DataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
638
+        Me.財務彙總_dgv.RowsDefaultCellStyle = DataGridViewCellStyle15
639
+        Me.財務彙總_dgv.RowTemplate.Height = 24
640
+        Me.財務彙總_dgv.Size = New System.Drawing.Size(1045, 537)
641
+        Me.財務彙總_dgv.TabIndex = 1224
642
+        '
643
+        '字體大小調整_lb
644
+        '
645
+        Me.字體大小調整_lb.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
646
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
647
+        Me.字體大小調整_lb.AutoSize = True
648
+        Me.字體大小調整_lb.Font = New System.Drawing.Font("微軟正黑體", 11.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
649
+        Me.字體大小調整_lb.ForeColor = System.Drawing.Color.Brown
650
+        Me.字體大小調整_lb.ImeMode = System.Windows.Forms.ImeMode.NoControl
651
+        Me.字體大小調整_lb.Location = New System.Drawing.Point(1123, 55)
652
+        Me.字體大小調整_lb.Name = "字體大小調整_lb"
653
+        Me.字體大小調整_lb.Size = New System.Drawing.Size(69, 19)
654
+        Me.字體大小調整_lb.TabIndex = 1495
655
+        Me.字體大小調整_lb.Text = "字體調整"
656
+        '
657
+        '字體_NUD
658
+        '
659
+        Me.字體_NUD.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
660
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
661
+        Me.字體_NUD.Location = New System.Drawing.Point(1192, 54)
662
+        Me.字體_NUD.Maximum = New Decimal(New Integer() {18, 0, 0, 0})
663
+        Me.字體_NUD.Minimum = New Decimal(New Integer() {9, 0, 0, 0})
664
+        Me.字體_NUD.Name = "字體_NUD"
665
+        Me.字體_NUD.Size = New System.Drawing.Size(52, 23)
666
+        Me.字體_NUD.TabIndex = 1494
667
+        Me.字體_NUD.Value = New Decimal(New Integer() {9, 0, 0, 0})
668
+        '
669
+        '營運成本收支單一覽表
670
+        '
671
+        Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
672
+        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
673
+        Me.ClientSize = New System.Drawing.Size(1399, 631)
674
+        Me.Controls.Add(Me.字體大小調整_lb)
675
+        Me.Controls.Add(Me.字體_NUD)
676
+        Me.Controls.Add(Me.會計月_ch)
677
+        Me.Controls.Add(Me.下個月_bt)
678
+        Me.Controls.Add(Me.上個月_bt)
679
+        Me.Controls.Add(Me.中間日期_dtp)
680
+        Me.Controls.Add(Me.一般月_ch)
681
+        Me.Controls.Add(Me.Label2)
682
+        Me.Controls.Add(Me.人民幣零用金_tb)
683
+        Me.Controls.Add(Me.人民幣零用金_)
684
+        Me.Controls.Add(Me.人民幣支票_tb)
685
+        Me.Controls.Add(Me.人民幣現金餘額_tb)
686
+        Me.Controls.Add(Me.Label13)
687
+        Me.Controls.Add(Me.人民幣支出_tb)
688
+        Me.Controls.Add(Me.Label16)
689
+        Me.Controls.Add(Me.人民幣現金_tb)
690
+        Me.Controls.Add(Me.Label17)
691
+        Me.Controls.Add(Me.圖片編碼_tb)
692
+        Me.Controls.Add(Me.驗證碼_tb)
693
+        Me.Controls.Add(Me.Label20)
694
+        Me.Controls.Add(Me.Label19)
695
+        Me.Controls.Add(Me.簽名圖_pb)
696
+        Me.Controls.Add(Me.彙總_rb)
697
+        Me.Controls.Add(Me.明細_rb)
698
+        Me.Controls.Add(Me.Label14)
699
+        Me.Controls.Add(Me.台幣零用金_tb)
700
+        Me.Controls.Add(Me.Label15)
701
+        Me.Controls.Add(Me.台幣支票_tb)
702
+        Me.Controls.Add(Me.台幣現金餘額_tb)
703
+        Me.Controls.Add(Me.Label9)
704
+        Me.Controls.Add(Me.台幣支出_tb)
705
+        Me.Controls.Add(Me.Label11)
706
+        Me.Controls.Add(Me.當月_bt)
707
+        Me.Controls.Add(Me.當日_bt)
708
+        Me.Controls.Add(Me.Label4)
709
+        Me.Controls.Add(Me.結束日期_dtp)
710
+        Me.Controls.Add(Me.開始日期_dtp)
711
+        Me.Controls.Add(Me.台幣現金_tb)
712
+        Me.Controls.Add(Me.Label10)
713
+        Me.Controls.Add(Me.支付單列印成EXCEL)
714
+        Me.Controls.Add(Me.Label8)
715
+        Me.Controls.Add(Me.Label7)
716
+        Me.Controls.Add(Me.審核日期_dtp)
717
+        Me.Controls.Add(Me.申請日期_dtp)
718
+        Me.Controls.Add(Me.Label5)
719
+        Me.Controls.Add(Me.審核人_tb)
720
+        Me.Controls.Add(Me.申請人_tb)
721
+        Me.Controls.Add(Me.收支單號_tb)
722
+        Me.Controls.Add(Me.Label6)
723
+        Me.Controls.Add(Me.Label1)
724
+        Me.Controls.Add(Me.Label3)
725
+        Me.Controls.Add(Me.單據彙總_dgv)
726
+        Me.Controls.Add(Me.明細_dgv)
727
+        Me.Controls.Add(Me.財務彙總_dgv)
728
+        Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
729
+        Me.ForeColor = System.Drawing.Color.CornflowerBlue
730
+        Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
731
+        Me.Name = "營運成本收支單一覽表"
732
+        Me.Text = "營運成本收支單一覽表"
733
+        Me.ContextMenuStrip1.ResumeLayout(False)
734
+        CType(Me.簽名圖_pb, System.ComponentModel.ISupportInitialize).EndInit()
735
+        CType(Me.單據彙總_dgv, System.ComponentModel.ISupportInitialize).EndInit()
736
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
737
+        CType(Me.財務彙總_dgv, System.ComponentModel.ISupportInitialize).EndInit()
738
+        CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).EndInit()
739
+        Me.ResumeLayout(False)
740
+        Me.PerformLayout()
741
+
742
+    End Sub
743
+
744
+    Friend WithEvents 會計月_ch As CheckBox
745
+    Friend WithEvents 下個月_bt As Button
746
+    Friend WithEvents 上個月_bt As Button
747
+    Friend WithEvents 中間日期_dtp As DateTimePicker
748
+    Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
749
+    Friend WithEvents 重新讀取ToolStripMenuItem As ToolStripMenuItem
750
+    Friend WithEvents 一般月_ch As CheckBox
751
+    Friend WithEvents Label2 As Label
752
+    Friend WithEvents 人民幣零用金_tb As TextBox
753
+    Friend WithEvents 人民幣零用金_ As Label
754
+    Friend WithEvents 人民幣支票_tb As TextBox
755
+    Friend WithEvents 人民幣現金餘額_tb As TextBox
756
+    Friend WithEvents Label13 As Label
757
+    Friend WithEvents 人民幣支出_tb As TextBox
758
+    Friend WithEvents Label16 As Label
759
+    Friend WithEvents 人民幣現金_tb As TextBox
760
+    Friend WithEvents Label17 As Label
761
+    Friend WithEvents 圖片編碼_tb As TextBox
762
+    Friend WithEvents 驗證碼_tb As TextBox
763
+    Friend WithEvents Label20 As Label
764
+    Friend WithEvents Label19 As Label
765
+    Friend WithEvents 簽名圖_pb As PictureBox
766
+    Friend WithEvents 彙總_rb As RadioButton
767
+    Friend WithEvents 明細_rb As RadioButton
768
+    Friend WithEvents Label14 As Label
769
+    Friend WithEvents 台幣零用金_tb As TextBox
770
+    Friend WithEvents Label15 As Label
771
+    Friend WithEvents 台幣支票_tb As TextBox
772
+    Friend WithEvents 台幣現金餘額_tb As TextBox
773
+    Friend WithEvents Label9 As Label
774
+    Friend WithEvents 台幣支出_tb As TextBox
775
+    Friend WithEvents Label11 As Label
776
+    Friend WithEvents 當月_bt As Button
777
+    Friend WithEvents 當日_bt As Button
778
+    Friend WithEvents Label4 As Label
779
+    Friend WithEvents 結束日期_dtp As DateTimePicker
780
+    Friend WithEvents 開始日期_dtp As DateTimePicker
781
+    Friend WithEvents 台幣現金_tb As TextBox
782
+    Friend WithEvents Label10 As Label
783
+    Friend WithEvents 支付單列印成EXCEL As Button
784
+    Friend WithEvents Label8 As Label
785
+    Friend WithEvents Label7 As Label
786
+    Friend WithEvents 審核日期_dtp As DateTimePicker
787
+    Friend WithEvents 申請日期_dtp As DateTimePicker
788
+    Friend WithEvents Label5 As Label
789
+    Friend WithEvents 審核人_tb As TextBox
790
+    Friend WithEvents 申請人_tb As TextBox
791
+    Friend WithEvents 收支單號_tb As TextBox
792
+    Friend WithEvents Label6 As Label
793
+    Friend WithEvents 單據彙總_dgv As DataGridView
794
+    Friend WithEvents Label1 As Label
795
+    Friend WithEvents Label3 As Label
796
+    Friend WithEvents 明細_dgv As DataGridView
797
+    Friend WithEvents 財務彙總_dgv As DataGridView
798
+    Friend WithEvents 字體大小調整_lb As Label
799
+    Friend WithEvents 字體_NUD As NumericUpDown
800
+End Class

+ 126
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單一覽表.resx Переглянути файл

@@ -0,0 +1,126 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+  <!-- 
4
+    Microsoft ResX Schema 
5
+    
6
+    Version 2.0
7
+    
8
+    The primary goals of this format is to allow a simple XML format 
9
+    that is mostly human readable. The generation and parsing of the 
10
+    various data types are done through the TypeConverter classes 
11
+    associated with the data types.
12
+    
13
+    Example:
14
+    
15
+    ... ado.net/XML headers & schema ...
16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+    <resheader name="version">2.0</resheader>
18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+    </data>
25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+        <comment>This is a comment</comment>
28
+    </data>
29
+                
30
+    There are any number of "resheader" rows that contain simple 
31
+    name/value pairs.
32
+    
33
+    Each data row contains a name, and value. The row also contains a 
34
+    type or mimetype. Type corresponds to a .NET class that support 
35
+    text/value conversion through the TypeConverter architecture. 
36
+    Classes that don't support this are serialized and stored with the 
37
+    mimetype set.
38
+    
39
+    The mimetype is used for serialized objects, and tells the 
40
+    ResXResourceReader how to depersist the object. This is currently not 
41
+    extensible. For a given mimetype the value must be set accordingly:
42
+    
43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
+    that the ResXResourceWriter will generate, however the reader can 
45
+    read any of the formats listed below.
46
+    
47
+    mimetype: application/x-microsoft.net.object.binary.base64
48
+    value   : The object must be serialized with 
49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+            : and then encoded with base64 encoding.
51
+    
52
+    mimetype: application/x-microsoft.net.object.soap.base64
53
+    value   : The object must be serialized with 
54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+            : and then encoded with base64 encoding.
56
+
57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
58
+    value   : The object must be serialized into a byte array 
59
+            : using a System.ComponentModel.TypeConverter
60
+            : and then encoded with base64 encoding.
61
+    -->
62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+    <xsd:element name="root" msdata:IsDataSet="true">
65
+      <xsd:complexType>
66
+        <xsd:choice maxOccurs="unbounded">
67
+          <xsd:element name="metadata">
68
+            <xsd:complexType>
69
+              <xsd:sequence>
70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+              </xsd:sequence>
72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
73
+              <xsd:attribute name="type" type="xsd:string" />
74
+              <xsd:attribute name="mimetype" type="xsd:string" />
75
+              <xsd:attribute ref="xml:space" />
76
+            </xsd:complexType>
77
+          </xsd:element>
78
+          <xsd:element name="assembly">
79
+            <xsd:complexType>
80
+              <xsd:attribute name="alias" type="xsd:string" />
81
+              <xsd:attribute name="name" type="xsd:string" />
82
+            </xsd:complexType>
83
+          </xsd:element>
84
+          <xsd:element name="data">
85
+            <xsd:complexType>
86
+              <xsd:sequence>
87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+              </xsd:sequence>
90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+              <xsd:attribute ref="xml:space" />
94
+            </xsd:complexType>
95
+          </xsd:element>
96
+          <xsd:element name="resheader">
97
+            <xsd:complexType>
98
+              <xsd:sequence>
99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+              </xsd:sequence>
101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
102
+            </xsd:complexType>
103
+          </xsd:element>
104
+        </xsd:choice>
105
+      </xsd:complexType>
106
+    </xsd:element>
107
+  </xsd:schema>
108
+  <resheader name="resmimetype">
109
+    <value>text/microsoft-resx</value>
110
+  </resheader>
111
+  <resheader name="version">
112
+    <value>2.0</value>
113
+  </resheader>
114
+  <resheader name="reader">
115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+  </resheader>
117
+  <resheader name="writer">
118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+  </resheader>
120
+  <metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121
+    <value>17, 17</value>
122
+  </metadata>
123
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
124
+    <value>36</value>
125
+  </metadata>
126
+</root>

+ 461
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單一覽表.vb Переглянути файл

@@ -0,0 +1,461 @@
1
+Option Strict Off
2
+Imports Microsoft.Office.Interop.Excel.XlUnderlineStyle
3
+Imports Microsoft.Office.Interop.Excel.Constants
4
+Imports Microsoft.Office.Interop.Excel.XlBordersIndex
5
+Imports Microsoft.Office.Interop.Excel.XlLineStyle
6
+Imports Microsoft.Office.Interop.Excel.XlBorderWeight
7
+Imports Microsoft.Office.Interop.Excel.XlThemeFont
8
+Imports Microsoft.Office.Interop.Excel.XlThemeColor
9
+Imports Microsoft.Office.Interop.Excel.XlWindowState
10
+Imports Microsoft.Office.Interop.Excel
11
+Public Class 營運成本收支單一覽表
12
+    ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet : ReadOnly ds2 As New DataSet
13
+    Dim DTP As String : Dim N1 As Integer : Dim N2 As Integer
14
+    Dim xlApp As Application
15
+    Dim xlBook As Workbook
16
+    Dim xlSheet As Worksheet
17
+    Private Sub Set_清單1()
18
+        單據彙總_dgv.DataSource = Nothing : ds1.Clear()
19
+        單據彙總_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
20
+        單據彙總_dgv.ColumnHeadersHeight = 25
21
+        單據彙總_dgv.AllowUserToAddRows = False
22
+        SQL_營運成本收支單一覽表_查詢清單() : da.Fill(ds1) : 單據彙總_dgv.DataSource = ds1.Tables(0) : conn.Close()
23
+
24
+        單據彙總_dgv.RowTemplate.Height = 30
25
+        財務彙總_dgv.RowTemplate.Height = 30
26
+        明細_dgv.RowTemplate.Height = 30
27
+
28
+        單據彙總_dgv.Columns(0).FillWeight = 160 : 單據彙總_dgv.Columns(1).Visible = False : 單據彙總_dgv.Columns(2).FillWeight = 100 : 單據彙總_dgv.Columns(3).Visible = False
29
+        單據彙總_dgv.Columns(4).FillWeight = 100 : 單據彙總_dgv.Columns(5).Visible = False : 單據彙總_dgv.Columns(6).Visible = False
30
+    End Sub
31
+    Private Sub Set_清單2()
32
+        財務彙總_dgv.DataSource = Nothing : ds2.Clear()
33
+        財務彙總_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
34
+        財務彙總_dgv.ColumnHeadersHeight = 25
35
+        財務彙總_dgv.AllowUserToAddRows = False
36
+        SQL_營運成本收支單一覽表_查詢清單2() : da.Fill(ds2) : 財務彙總_dgv.DataSource = ds2.Tables(0) : conn.Close()
37
+
38
+        財務彙總_dgv.Columns(0).FillWeight = 100 : 財務彙總_dgv.Columns(1).FillWeight = 140 : 財務彙總_dgv.Columns(2).FillWeight = 140 : 財務彙總_dgv.Columns(3).FillWeight = 140
39
+        財務彙總_dgv.Columns(4).FillWeight = 100 : 財務彙總_dgv.Columns(5).FillWeight = 100 : 財務彙總_dgv.Columns(6).FillWeight = 100 : 財務彙總_dgv.Columns(7).FillWeight = 100
40
+        財務彙總_dgv.Columns(8).FillWeight = 100 : 財務彙總_dgv.Columns(9).FillWeight = 100
41
+        財務彙總_dgv.Columns(6).DefaultCellStyle.Format = "#,##0.00" : 財務彙總_dgv.Columns(7).DefaultCellStyle.Format = "#,##0.00" : 財務彙總_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00"
42
+        財務彙總_dgv.Columns(5).DefaultCellStyle.Format = "#,##0.00"
43
+        財務彙總_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 財務彙總_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
44
+        財務彙總_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 財務彙總_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
45
+        財務彙總_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 財務彙總_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
46
+        財務彙總_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 財務彙總_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
47
+        財務彙總_dgv.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 財務彙總_dgv.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
48
+        財務彙總_dgv.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 財務彙總_dgv.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
49
+
50
+        財務彙總_dgv.Columns(0).ReadOnly = True : 財務彙總_dgv.Columns(1).ReadOnly = True : 財務彙總_dgv.Columns(2).ReadOnly = True : 財務彙總_dgv.Columns(3).ReadOnly = True
51
+        財務彙總_dgv.Columns(4).ReadOnly = True : 財務彙總_dgv.Columns(5).ReadOnly = True : 財務彙總_dgv.Columns(6).ReadOnly = True : 財務彙總_dgv.Columns(7).ReadOnly = True
52
+    End Sub
53
+    Private Sub Set_費用清單()
54
+        明細_dgv.DataSource = Nothing : ds.Clear()
55
+        明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
56
+        明細_dgv.ColumnHeadersHeight = 25
57
+        明細_dgv.AllowUserToAddRows = False
58
+        明細_dgv.RowTemplate.Height = 35
59
+        SQL_營運成本收支單一覽表_查詢費用清單() : da.Fill(ds) : 明細_dgv.DataSource = ds.Tables(0) : conn.Close()
60
+
61
+        明細_dgv.Columns(0).Visible = False : 明細_dgv.Columns(1).FillWeight = 80 : 明細_dgv.Columns(2).FillWeight = 300 : 明細_dgv.Columns(3).FillWeight = 500
62
+        明細_dgv.Columns(4).FillWeight = 140 : 明細_dgv.Columns(5).FillWeight = 140 : 明細_dgv.Columns(6).FillWeight = 140 : 明細_dgv.Columns(7).FillWeight = 140
63
+        明細_dgv.Columns(8).FillWeight = 140 : 明細_dgv.Columns(9).FillWeight = 140 : 明細_dgv.Columns(10).FillWeight = 140 : 明細_dgv.Columns(11).Visible = False
64
+        明細_dgv.Columns(12).Visible = False
65
+
66
+        明細_dgv.Columns(1).ReadOnly = True : 明細_dgv.Columns(2).ReadOnly = True : 明細_dgv.Columns(9).ReadOnly = True : 明細_dgv.Columns(10).ReadOnly = True
67
+
68
+        明細_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00" : 明細_dgv.Columns(5).DefaultCellStyle.Format = "#,##0.00" : 明細_dgv.Columns(6).DefaultCellStyle.Format = "#,##0.00"
69
+        明細_dgv.Columns(7).DefaultCellStyle.Format = "#,##0.00"
70
+        明細_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
71
+        明細_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
72
+        明細_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
73
+        明細_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
74
+        明細_dgv.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 明細_dgv.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
75
+        明細_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 明細_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
76
+        明細_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 明細_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
77
+        明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter
78
+
79
+        台幣現金_tb.Text = "0.00" : 台幣支出_tb.Text = "0.00" : 台幣現金餘額_tb.Text = "0.00" : 台幣零用金_tb.Text = "0.00" : 台幣支票_tb.Text = "0.00"
80
+        人民幣零用金_tb.Text = "0.00" : 人民幣支票_tb.Text = "0.00" : 人民幣現金_tb.Text = "0.00" : 人民幣支出_tb.Text = "0.00" : 人民幣現金餘額_tb.Text = "0.00"
81
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
82
+            If 明細_dgv.Rows(i).Cells("幣別").Value = "台幣現金" Then
83
+                台幣現金_tb.Text = Val(台幣現金_tb.Text) + 明細_dgv.Rows(i).Cells("現金").Value
84
+                台幣支出_tb.Text = Val(台幣支出_tb.Text) + 明細_dgv.Rows(i).Cells("支出").Value
85
+                台幣零用金_tb.Text = Val(台幣零用金_tb.Text) + 明細_dgv.Rows(i).Cells("零用金").Value
86
+                台幣支票_tb.Text = Val(台幣支票_tb.Text) + 明細_dgv.Rows(i).Cells("支票").Value
87
+            End If
88
+            If 明細_dgv.Rows(i).Cells("幣別").Value = "人民幣現金" Then
89
+                人民幣現金_tb.Text = Val(人民幣現金_tb.Text) + 明細_dgv.Rows(i).Cells("現金").Value
90
+                人民幣支出_tb.Text = Val(人民幣支出_tb.Text) + 明細_dgv.Rows(i).Cells("支出").Value
91
+
92
+                人民幣零用金_tb.Text = Val(人民幣零用金_tb.Text) + 明細_dgv.Rows(i).Cells("零用金").Value
93
+                人民幣支票_tb.Text = Val(人民幣支票_tb.Text) + 明細_dgv.Rows(i).Cells("支票").Value
94
+            End If
95
+        Next i
96
+        台幣現金餘額_tb.Text = Val(台幣零用金_tb.Text) + Val(台幣現金_tb.Text) - Val(台幣支出_tb.Text) : 人民幣現金餘額_tb.Text = Val(人民幣零用金_tb.Text) + Val(人民幣現金_tb.Text) - Val(人民幣支出_tb.Text)
97
+        If Val(台幣現金餘額_tb.Text) > 0 Then : 台幣現金餘額_tb.ForeColor = Color.Blue : Else : 台幣現金餘額_tb.ForeColor = Color.Red : End If
98
+        If Val(人民幣現金餘額_tb.Text) > 0 Then : 人民幣現金餘額_tb.ForeColor = Color.Blue : Else : 台幣現金餘額_tb.ForeColor = Color.Red : End If
99
+        台幣現金_tb.Text = Strings.Format(Val(台幣現金_tb.Text), "#,##0.00") : 台幣支出_tb.Text = Strings.Format(Val(台幣支出_tb.Text), "#,##0.00") : 台幣現金餘額_tb.Text = Strings.Format(Val(台幣現金餘額_tb.Text), "#,##0.00")
100
+        台幣零用金_tb.Text = Strings.Format(Val(台幣零用金_tb.Text), "#,##0.00") : 台幣支票_tb.Text = Strings.Format(Val(台幣支票_tb.Text), "#,##0.00")
101
+        人民幣零用金_tb.Text = Strings.Format(Val(人民幣零用金_tb.Text), "#,##0.00") : 人民幣支票_tb.Text = Strings.Format(Val(人民幣支票_tb.Text), "#,##0.00") : 人民幣現金_tb.Text = Strings.Format(Val(人民幣現金_tb.Text), "#,##0.00")
102
+        人民幣支出_tb.Text = Strings.Format(Val(人民幣支出_tb.Text), "#,##0.00") : 人民幣現金餘額_tb.Text = Strings.Format(Val(人民幣現金餘額_tb.Text), "#,##0.00")
103
+    End Sub
104
+    Private Sub 日期格式()
105
+        If 會計月_ch.Checked = True Then
106
+            '-------------日期一----------------------------------------------------------------------------------------
107
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 開始日期_dtp.Value = DTP
108
+            開始日期_dtp.Value = 開始日期_dtp.Value.AddMonths(-1)
109
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "26" : 開始日期_dtp.Value = DTP
110
+            '-------------日期二----------------------------------------------------------------------------------------
111
+            DTP = Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 8) & "25" : 結束日期_dtp.Value = DTP
112
+        Else
113
+            '-------------日期一----------------------------------------------------------------------------------------
114
+            DTP = Strings.Left(Strings.Format(開始日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 開始日期_dtp.Value = DTP
115
+            '-------------日期二----------------------------------------------------------------------------------------
116
+            DTP = Strings.Left(Strings.Format(結束日期_dtp.Value, "yyyy/MM/dd"), 8) & "01" : 結束日期_dtp.Value = DTP
117
+            結束日期_dtp.Value = 結束日期_dtp.Value.AddMonths(1) : 結束日期_dtp.Value = 結束日期_dtp.Value.AddDays(-1)
118
+        End If
119
+    End Sub
120
+    Private Sub 營運成本收支單一覽表_Load(sender As Object, e As EventArgs) Handles MyBase.Load
121
+        Me.MdiParent = YD_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
122
+        DTP = Strings.Left(Strings.Format(Today(), "yyyy/MM/dd"), 8) & "01"
123
+        開始日期_dtp.Value = DTP : 結束日期_dtp.Value = Today()
124
+        日期格式() : 財務彙總_dgv.Visible = False : 明細_rb.Checked = True
125
+    End Sub
126
+    Private Sub 單據彙總_dgv_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles 單據彙總_dgv.CellClick
127
+        If e.RowIndex = -1 Then : Else
128
+            收支單號_tb.Text = 單據彙總_dgv(0, e.RowIndex).Value.ToString : 驗證碼_tb.Text = 單據彙總_dgv(6, e.RowIndex).Value.ToString
129
+            申請人_tb.Text = 單據彙總_dgv(1, e.RowIndex).Value.ToString : 申請日期_dtp.Value = 單據彙總_dgv(2, e.RowIndex).Value.ToString
130
+            審核人_tb.Text = 單據彙總_dgv(3, e.RowIndex).Value.ToString : 審核日期_dtp.Value = 單據彙總_dgv(4, e.RowIndex).Value.ToString
131
+            圖片編碼_tb.Text = 單據彙總_dgv(5, e.RowIndex).Value.ToString
132
+            Set_費用清單()
133
+        End If
134
+    End Sub
135
+    Private Sub 財務彙總_dgv_RowPostPaint(ByVal sender As Object, ByVal e As DataGridViewRowPostPaintEventArgs) Handles 財務彙總_dgv.RowPostPaint
136
+        Dim linePen As New Pen(Color.Blue, 2) : Dim linePen1 As New Pen(Color.Red, 2) : Dim linePen2 As New Pen(Color.Green, 2)
137
+        If e.RowIndex = 財務彙總_dgv.Rows.Count - 1 Then
138
+            Exit Sub
139
+        Else
140
+            If 財務彙總_dgv(0, e.RowIndex).Value.ToString <> 財務彙總_dgv(0, e.RowIndex + 1).Value.ToString Then
141
+                Dim startX As Integer = IIf(財務彙總_dgv.RowHeadersVisible, 財務彙總_dgv.RowHeadersWidth, 0)
142
+                Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
143
+                Dim endX As Integer = startX + 財務彙總_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 財務彙總_dgv.HorizontalScrollingOffset
144
+                e.Graphics.DrawLine(linePen, startX, startY, endX, startY)
145
+                Exit Sub
146
+            End If
147
+            If 財務彙總_dgv(8, e.RowIndex).Value.ToString <> 財務彙總_dgv(8, e.RowIndex + 1).Value.ToString Then
148
+                Dim startX As Integer = IIf(財務彙總_dgv.RowHeadersVisible, 財務彙總_dgv.RowHeadersWidth, 0)
149
+                Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
150
+                Dim endX As Integer = startX + 財務彙總_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 財務彙總_dgv.HorizontalScrollingOffset
151
+                e.Graphics.DrawLine(linePen2, startX, startY, endX, startY)
152
+                Exit Sub
153
+            End If
154
+            If 財務彙總_dgv(1, e.RowIndex).Value.ToString <> 財務彙總_dgv(1, e.RowIndex + 1).Value.ToString Then
155
+                Dim startX As Integer = IIf(財務彙總_dgv.RowHeadersVisible, 財務彙總_dgv.RowHeadersWidth, 0)
156
+                Dim startY As Integer = e.RowBounds.Top + e.RowBounds.Height - 1
157
+                Dim endX As Integer = startX + 財務彙總_dgv.Columns.GetColumnsWidth(DataGridViewElementStates.Visible) - 財務彙總_dgv.HorizontalScrollingOffset
158
+                e.Graphics.DrawLine(linePen1, startX, startY, endX, startY)
159
+                Exit Sub
160
+            End If
161
+        End If
162
+    End Sub
163
+    Private Sub Button3_Click(sender As Object, e As EventArgs) Handles 當日_bt.Click
164
+        DTP = Strings.Format(Today(), "yyyy/MM/dd")
165
+        開始日期_dtp.Value = DTP : 結束日期_dtp.Value = DTP
166
+    End Sub
167
+    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles 當月_bt.Click
168
+        DTP = Strings.Left(Strings.Format(Today(), "yyyy/MM/dd"), 8) & "01"
169
+        開始日期_dtp.Value = DTP : 結束日期_dtp.Value = Today()
170
+    End Sub
171
+    Private Sub 彙總計算()
172
+        If 明細_rb.Checked = False And 彙總_rb.Checked = True Then
173
+            台幣現金_tb.Text = "0.00" : 台幣支出_tb.Text = "0.00" : 台幣現金餘額_tb.Text = "0.00" : 台幣零用金_tb.Text = "0.00" : 台幣支票_tb.Text = "0.00"
174
+            人民幣零用金_tb.Text = "0.00" : 人民幣支票_tb.Text = "0.00" : 人民幣現金_tb.Text = "0.00" : 人民幣支出_tb.Text = "0.00" : 人民幣現金餘額_tb.Text = "0.00"
175
+            For i As Integer = 0 To 財務彙總_dgv.Rows.Count - 1
176
+                If 財務彙總_dgv.Rows(i).Cells("幣別").Value = "台幣現金" Then
177
+                    台幣現金_tb.Text = Val(台幣現金_tb.Text) + 財務彙總_dgv.Rows(i).Cells("現金").Value
178
+                    台幣支出_tb.Text = Val(台幣支出_tb.Text) + 財務彙總_dgv.Rows(i).Cells("支出").Value
179
+                    台幣零用金_tb.Text = Val(台幣零用金_tb.Text) + 財務彙總_dgv.Rows(i).Cells("零用金").Value
180
+                    台幣支票_tb.Text = Val(台幣支票_tb.Text) + 財務彙總_dgv.Rows(i).Cells("支票").Value
181
+                End If
182
+                If 財務彙總_dgv.Rows(i).Cells("幣別").Value = "人民幣現金" Then
183
+                    If 財務彙總_dgv.Rows(i).Cells("主項").Value <> "上月結存" Then
184
+                        人民幣現金_tb.Text = Val(人民幣現金_tb.Text) + 財務彙總_dgv.Rows(i).Cells("現金").Value
185
+                        人民幣支出_tb.Text = Val(人民幣支出_tb.Text) + 財務彙總_dgv.Rows(i).Cells("支出").Value
186
+                        人民幣零用金_tb.Text = Val(人民幣零用金_tb.Text) + 財務彙總_dgv.Rows(i).Cells("零用金").Value
187
+                        人民幣支票_tb.Text = Val(人民幣支票_tb.Text) + 財務彙總_dgv.Rows(i).Cells("支票").Value
188
+                    End If
189
+                End If
190
+            Next i
191
+            台幣現金餘額_tb.Text = Val(台幣零用金_tb.Text) + Val(台幣現金_tb.Text) - Val(台幣支出_tb.Text) : 人民幣現金餘額_tb.Text = Val(人民幣零用金_tb.Text) + Val(人民幣現金_tb.Text) - Val(人民幣支出_tb.Text)
192
+            If Val(台幣現金餘額_tb.Text) > 0 Then : 台幣現金餘額_tb.ForeColor = Color.Blue : Else : 台幣現金餘額_tb.ForeColor = Color.Red : End If
193
+            If Val(人民幣現金餘額_tb.Text) > 0 Then : 人民幣現金餘額_tb.ForeColor = Color.Blue : Else : 台幣現金餘額_tb.ForeColor = Color.Red : End If
194
+            台幣現金_tb.Text = Strings.Format(Val(台幣現金_tb.Text), "#,##0.00") : 台幣支出_tb.Text = Strings.Format(Val(台幣支出_tb.Text), "#,##0.00") : 台幣現金餘額_tb.Text = Strings.Format(Val(台幣現金餘額_tb.Text), "#,##0.00")
195
+            台幣零用金_tb.Text = Strings.Format(Val(台幣零用金_tb.Text), "#,##0.00") : 台幣支票_tb.Text = Strings.Format(Val(台幣支票_tb.Text), "#,##0.00")
196
+            人民幣零用金_tb.Text = Strings.Format(Val(人民幣零用金_tb.Text), "#,##0.00") : 人民幣支票_tb.Text = Strings.Format(Val(人民幣支票_tb.Text), "#,##0.00") : 人民幣現金_tb.Text = Strings.Format(Val(人民幣現金_tb.Text), "#,##0.00")
197
+            人民幣支出_tb.Text = Strings.Format(Val(人民幣支出_tb.Text), "#,##0.00") : 人民幣現金餘額_tb.Text = Strings.Format(Val(人民幣現金餘額_tb.Text), "#,##0.00")
198
+        End If
199
+    End Sub
200
+    Private Sub 上個月_bt_Click(sender As Object, e As EventArgs) Handles 上個月_bt.Click
201
+        If 會計月_ch.Checked = True Then
202
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
203
+            開始日期_dtp.Value = 中間日期_dtp.Value
204
+            結束日期_dtp.Value = 中間日期_dtp.Value
205
+        Else
206
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(-1)
207
+            開始日期_dtp.Value = 中間日期_dtp.Value
208
+            結束日期_dtp.Value = 中間日期_dtp.Value
209
+        End If
210
+        日期格式()
211
+    End Sub
212
+    Private Sub 下個月_bt_Click(sender As Object, e As EventArgs) Handles 下個月_bt.Click
213
+        If 會計月_ch.Checked = True Then
214
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(1)
215
+            開始日期_dtp.Value = 中間日期_dtp.Value
216
+            結束日期_dtp.Value = 中間日期_dtp.Value
217
+        Else
218
+            中間日期_dtp.Value = 中間日期_dtp.Value.AddMonths(1)
219
+            開始日期_dtp.Value = 中間日期_dtp.Value
220
+            結束日期_dtp.Value = 中間日期_dtp.Value
221
+        End If
222
+        日期格式()
223
+    End Sub
224
+    Private Sub DateTimePicker4_ValueChanged(sender As Object, e As EventArgs) Handles 開始日期_dtp.ValueChanged
225
+        Set_清單1() : Set_清單2() : 彙總計算()
226
+    End Sub
227
+    Private Sub DateTimePicker3_ValueChanged(sender As Object, e As EventArgs) Handles 結束日期_dtp.ValueChanged
228
+        Set_清單1() : Set_清單2() : 彙總計算()
229
+    End Sub
230
+    Private Sub 會計月_CheckedChanged(sender As Object, e As EventArgs) Handles 會計月_ch.Click
231
+        會計月_ch.Checked = True : 一般月_ch.Checked = False : 日期格式()
232
+    End Sub
233
+    Private Sub 一般月_CheckedChanged(sender As Object, e As EventArgs) Handles 一般月_ch.Click
234
+        會計月_ch.Checked = False : 一般月_ch.Checked = True : 日期格式()
235
+    End Sub
236
+    Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles 明細_rb.Click
237
+        明細_dgv.Visible = True : 財務彙總_dgv.Visible = False : 明細_rb.Checked = True : 彙總_rb.Checked = False
238
+        台幣現金_tb.Text = "0.00" : 台幣支出_tb.Text = "0.00" : 台幣現金餘額_tb.Text = "0.00" : 台幣零用金_tb.Text = "0.00" : 台幣支票_tb.Text = "0.00" : 單據彙總_dgv.Enabled = True
239
+    End Sub
240
+    Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles 彙總_rb.Click
241
+        明細_dgv.Visible = False : 財務彙總_dgv.Visible = True : 明細_rb.Checked = False : 彙總_rb.Checked = True
242
+        收支單號_tb.Text = "" : 申請人_tb.Text = "" : 審核人_tb.Text = "" : 明細_dgv.DataSource = Nothing : ds.Clear() : 單據彙總_dgv.Enabled = False
243
+        彙總計算()
244
+    End Sub
245
+    Private Sub TextBox14_TextChanged(sender As Object, e As EventArgs) Handles 圖片編碼_tb.TextChanged
246
+        SQL_營運成本收支單一覽表_查詢簽名檔圖片()
247
+        While dr.Read() = True
248
+            Dim unused As Byte() = New Byte(-1) {}
249
+            Dim bytes As Byte() = DirectCast(dr.Item("簽名檔圖片"), Byte())
250
+            Dim oStream As New MemoryStream(bytes)
251
+            簽名圖_pb.Image = Bitmap.FromStream(oStream)
252
+        End While
253
+        conn.Close()
254
+        簽名圖_pb.SizeMode = 4
255
+    End Sub
256
+    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles 支付單列印成EXCEL.Click
257
+        xlApp = CType(CreateObject("Excel.Application"), Application)
258
+        xlBook = xlApp.Workbooks.Add
259
+        xlApp.DisplayAlerts = True
260
+        xlBook.Activate()
261
+        xlSheet = NewMethod(xlBook)
262
+        xlSheet.Activate()
263
+        xlApp.Visible = True
264
+        xlApp.Application.WindowState = xlMaximized
265
+
266
+        xlSheet.Cells(1, 1) = "年度" : xlSheet.Cells(1, 2) = Year(Today) - 1911
267
+        If 明細_rb.Checked = True And 彙總_rb.Checked = False Then
268
+            xlSheet.Cells(1, 3) = "雅邸家居-營運費用收支明細表"
269
+            xlSheet.Cells(2, 1) = "收款日期" : xlSheet.Cells(2, 2) = "會計科目" : xlSheet.Cells(2, 3) = "客戶或用途"
270
+            xlSheet.Cells(2, 4) = "零用金" : xlSheet.Cells(2, 5) = "支票" : xlSheet.Cells(2, 6) = "現金" : xlSheet.Cells(2, 7) = "支出" : xlSheet.Cells(2, 8) = "現金餘額" : xlSheet.Cells(2, 9) = "票期"
271
+
272
+            For i As Integer = 0 To 明細_dgv.Rows.Count - 1
273
+                xlSheet.Cells(i + 3, 1) = 申請日期_dtp.Value : xlSheet.Cells(i + 3, 2) = 明細_dgv.Rows(i).Cells("會計科目").Value
274
+                xlSheet.Cells(i + 3, 3) = 明細_dgv.Rows(i).Cells("用途").Value : xlSheet.Cells(i + 3, 4) = 明細_dgv.Rows(i).Cells("零用金").Value
275
+                xlSheet.Cells(i + 3, 5) = 明細_dgv.Rows(i).Cells("支票").Value : xlSheet.Cells(i + 3, 6) = 明細_dgv.Rows(i).Cells("現金").Value
276
+                xlSheet.Cells(i + 3, 7) = 明細_dgv.Rows(i).Cells("支出").Value : xlSheet.Cells(i + 3, 9) = 明細_dgv.Rows(i).Cells("票期").Value
277
+                If i = 0 Then
278
+                    xlSheet.Cells(i + 3, 8) = "=D3+F3-G3"
279
+                Else
280
+                    xlSheet.Cells(i + 3, 8) = "=H" & i + 2 & "+D" & i + 3 & "+F" & i + 3 & "-G" & i + 3 & ""
281
+                End If
282
+                With xlApp.Selection
283
+                    .Font.Bold = True
284
+                End With
285
+                N1 = i + 3 : N2 = i + 3
286
+            Next i
287
+            xlSheet.Cells(N1 + 1, 3) = "以下空白" : xlSheet.Cells(N1 + 3, 1) = "簽核(點交)" : xlSheet.Cells(N1 + 3, 7) = "製表 : " & 申請人_tb.Text & " - " & 申請日期_dtp.Value
288
+            xlSheet.Cells(N1 + 2, 4) = "=SUM(D3:D" & N1 + 1 & ")" : xlSheet.Cells(N1 + 2, 5) = "=SUM(E3:E" & N1 + 1 & ")" : xlSheet.Cells(N1 + 2, 6) = "=SUM(F3:F" & N1 + 1 & ")"
289
+            xlSheet.Cells(N1 + 2, 7) = "=SUM(G3:G" & N1 + 1 & ")" : xlSheet.Cells(N1 + 2, 8) = "=H" & N1 : xlSheet.Cells(N1 + 2, 1) = "合計"
290
+
291
+            AA(xlApp, xlSheet) : BB(xlApp, xlSheet)
292
+        ElseIf 明細_rb.Checked = False And 彙總_rb.Checked = True Then
293
+            xlSheet.Cells(1, 3) = "雅邸家居-營運費用收支彙總簡表"
294
+            xlSheet.Cells(2, 1) = "日期" : xlSheet.Cells(2, 2) = "主項" : xlSheet.Cells(2, 3) = "子項" : xlSheet.Cells(2, 4) = "子細項" : xlSheet.Cells(2, 5) = "零用金"
295
+            xlSheet.Cells(2, 6) = "支票" : xlSheet.Cells(2, 7) = "現金" : xlSheet.Cells(2, 8) = "支出" : xlSheet.Cells(2, 9) = "現金餘額"
296
+
297
+            For i As Integer = 0 To 財務彙總_dgv.Rows.Count - 1
298
+                xlSheet.Cells(i + 3, 1) = 財務彙總_dgv.Rows(i).Cells("日期").Value
299
+                xlSheet.Cells(i + 3, 2) = 財務彙總_dgv.Rows(i).Cells("主項").Value
300
+                xlSheet.Cells(i + 3, 3) = 財務彙總_dgv.Rows(i).Cells("子項").Value
301
+                xlSheet.Cells(i + 3, 4) = 財務彙總_dgv.Rows(i).Cells("子細項").Value
302
+                xlSheet.Cells(i + 3, 5) = 財務彙總_dgv.Rows(i).Cells("零用金").Value
303
+                xlSheet.Cells(i + 3, 6) = 財務彙總_dgv.Rows(i).Cells("支票").Value
304
+                xlSheet.Cells(i + 3, 7) = 財務彙總_dgv.Rows(i).Cells("現金").Value
305
+                xlSheet.Cells(i + 3, 8) = 財務彙總_dgv.Rows(i).Cells("支出").Value
306
+                If i = 0 Then
307
+                    xlSheet.Cells(i + 3, 9) = "=E3+G3-H3"
308
+                Else
309
+                    xlSheet.Cells(i + 3, 9) = "=I" & i + 2 & "+E" & i + 3 & "+G" & i + 3 & "-H" & i + 3 & ""
310
+                End If
311
+                With xlApp.Selection
312
+                    .Font.Bold = True
313
+                End With
314
+                N1 = i + 3 : N2 = i + 3
315
+            Next i
316
+            xlSheet.Cells(N1 + 1, 2) = "以下空白" : xlSheet.Cells(N1 + 3, 1) = "簽核" : xlSheet.Cells(N1 + 3, 5) = "製表 : " & gUserName & " - " & Today()
317
+            xlSheet.Cells(N1 + 2, 5) = "=SUM(E3:E" & N1 + 1 & ")" : xlSheet.Cells(N1 + 2, 6) = "=SUM(F3:F" & N1 + 1 & ")" : xlSheet.Cells(N1 + 2, 7) = "=SUM(G3:G" & N1 + 1 & ")"
318
+            xlSheet.Cells(N1 + 2, 8) = "=SUM(H3:H" & N1 + 1 & ")" : xlSheet.Cells(N1 + 2, 9) = "=I" & N1 : xlSheet.Cells(N1 + 2, 1) = "合計"
319
+
320
+            CC(xlApp, xlSheet)
321
+        End If
322
+
323
+        xlSheet.PageSetup.PrintArea = ""
324
+        xlApp.Cells.Select()
325
+        xlSheet.Range("B1").Select()
326
+        xlApp.Application.WindowState = xlMinimized
327
+        xlSheet.Cells.Select()
328
+        xlApp.ActiveSheet.Protect(DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="0911274990")
329
+        xlApp.ActiveSheet.EnableSelection = 1
330
+        MsgBox("列印完成。")
331
+    End Sub
332
+    Private Shared Function NewMethod(xlBook As Workbook) As Worksheet
333
+        Return CType(xlBook.Worksheets.Add, Worksheet)
334
+    End Function
335
+    Private Sub AA(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
336
+        xlSheet.Cells.Select()
337
+        With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False : .Shadow = False
338
+            .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
339
+        End With
340
+
341
+        xlSheet.Columns("A:A").Select : myExcel.Selection.NumberFormatLocal = "m/d;@"
342
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
343
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
344
+        End With
345
+
346
+        xlSheet.Range("B1").Select()
347
+        With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
348
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
349
+        End With
350
+
351
+        xlSheet.Columns("B:B").Select : myExcel.Selection.ColumnWidth = 25
352
+        xlSheet.Columns("C:C").Select : myExcel.Selection.ColumnWidth = 30
353
+        xlSheet.Columns("D:H").Select : myExcel.Selection.ColumnWidth = 10 : myExcel.Selection.NumberFormatLocal = "#,##0;[紅色]-#,##0"
354
+        xlSheet.Columns("I:I").Select : myExcel.Selection.ColumnWidth = 10 : myExcel.Selection.NumberFormatLocal = "[$-zh-TW]e/m/d;@"
355
+        xlSheet.Rows("2:2").Select : myExcel.Selection.RowHeight = 25
356
+
357
+        xlSheet.Range("A2:I2").Select()
358
+        With myExcel.Selection : .HorizontalAlignment = xlGeneral : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
359
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
360
+        End With
361
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
362
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
363
+        End With
364
+
365
+        xlSheet.Range("A2:I" & N1 + 2).Select() : myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
366
+        With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
367
+        With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
368
+        With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
369
+        With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
370
+        With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
371
+        With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
372
+        myExcel.ActiveWindow.DisplayGridlines = False
373
+
374
+        xlSheet.Rows("3:" & N1 + 2).Select : myExcel.Selection.RowHeight = 20
375
+        xlSheet.Rows(N1 + 3 & ":" & N1 + 3).Select : myExcel.Selection.RowHeight = 40
376
+
377
+        xlSheet.Columns("I:I").Select
378
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
379
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
380
+        End With
381
+
382
+        xlSheet.Range("A" & N1 + 2 & ":C" & N1 + 2).Select() : myExcel.Selection.Merge
383
+        With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
384
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True
385
+        End With
386
+
387
+        xlSheet.Rows("1:1").Select : myExcel.Selection.RowHeight = 25
388
+        With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 14 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False : .Shadow = False
389
+            .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
390
+        End With
391
+    End Sub
392
+    Private Sub BB(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
393
+        Clipboard.SetDataObject(簽名圖_pb.Image)
394
+        xlSheet.Range("B" & N2 + 3).Select()
395
+        myExcel.ActiveSheet.Pictures.Paste.Select
396
+        myExcel.Selection.ShapeRange.Height = 43
397
+        myExcel.Selection.ShapeRange.IncrementTop(3)
398
+    End Sub
399
+    Private Sub CC(ByVal myExcel As Application, ByVal xlSheet As Worksheet)
400
+        xlSheet.Cells.Select()
401
+        With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 10 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False : .Shadow = False
402
+            .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
403
+        End With
404
+
405
+        xlSheet.Columns("A:A").Select : myExcel.Selection.ColumnWidth = 8
406
+        xlSheet.Columns("B:C").Select : myExcel.Selection.ColumnWidth = 15
407
+        xlSheet.Columns("D:D").Select : myExcel.Selection.ColumnWidth = 20
408
+        xlSheet.Columns("E:I").Select : myExcel.Selection.ColumnWidth = 10 : myExcel.Selection.NumberFormatLocal = "#,##0.00;[紅色]-#,##0.00"
409
+        xlSheet.Rows("1:1").Select : myExcel.Selection.RowHeight = 25
410
+        xlSheet.Rows("2:2").Select : myExcel.Selection.RowHeight = 25
411
+        xlSheet.Rows("3:" & N1 + 2).Select : myExcel.Selection.RowHeight = 20
412
+        xlSheet.Rows(N1 + 3 & ":" & N1 + 3).Select : myExcel.Selection.RowHeight = 40
413
+
414
+        xlSheet.Rows("2:2").Select
415
+        With myExcel.Selection : .HorizontalAlignment = xlCenter : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
416
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
417
+        End With
418
+
419
+        xlSheet.Range("A1").Select()
420
+        With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
421
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
422
+        End With
423
+
424
+        xlSheet.Range("B1").Select()
425
+        With myExcel.Selection : .HorizontalAlignment = xlLeft : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
426
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = False
427
+        End With
428
+
429
+        xlSheet.Rows("1:1").Select
430
+        With myExcel.Selection.Font : .Name = "微軟正黑體" : .Size = 16 : .Strikethrough = False : .Superscript = False : .Subscript = False : .OutlineFont = False : .Shadow = False
431
+            .Underline = xlUnderlineStyleNone : .ThemeColor = xlThemeColorLight1 : .TintAndShade = 0 : .ThemeFont = xlThemeFontNone
432
+        End With
433
+
434
+        xlSheet.Range("A2:I" & N1 + 2).Select() : myExcel.Selection.Borders(xlDiagonalDown).LineStyle = xlNone : myExcel.Selection.Borders(xlDiagonalUp).LineStyle = xlNone
435
+        With myExcel.Selection.Borders(xlEdgeLeft) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
436
+        With myExcel.Selection.Borders(xlEdgeTop) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
437
+        With myExcel.Selection.Borders(xlEdgeBottom) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
438
+        With myExcel.Selection.Borders(xlEdgeRight) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
439
+        With myExcel.Selection.Borders(xlInsideVertical) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
440
+        With myExcel.Selection.Borders(xlInsideHorizontal) : .LineStyle = xlContinuous : .ColorIndex = 0 : .TintAndShade = 0 : .Weight = xlThin : End With
441
+
442
+        xlSheet.Range("A" & N1 + 2 & ":D" & N1 + 2).Select() : myExcel.Selection.Merge
443
+        With myExcel.Selection : .HorizontalAlignment = xlRight : .VerticalAlignment = xlCenter : .WrapText = False : .Orientation = 0 : .AddIndent = False : .IndentLevel = 0
444
+            .ShrinkToFit = False : .ReadingOrder = xlContext : .MergeCells = True
445
+        End With
446
+
447
+        xlSheet.Columns("E:I").Select : myExcel.Selection.NumberFormatLocal = "#,##0.00;[紅色]-#,##0.00"
448
+        myExcel.ActiveWindow.DisplayGridlines = False
449
+    End Sub
450
+
451
+    '----------------------滑鼠右鍵--------------------------------------------------------------------------------------------------------------------------------------------------------------------
452
+    Private Sub 重新讀取ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 重新讀取ToolStripMenuItem.Click
453
+        Set_清單1() : Set_清單2() : 彙總計算()
454
+    End Sub
455
+
456
+    Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
457
+        單據彙總_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
458
+        財務彙總_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
459
+        明細_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
460
+    End Sub
461
+End Class

+ 577
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單審核.Designer.vb Переглянути файл

@@ -0,0 +1,577 @@
1
+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
2
+Partial Class 營運成本收支單審核
3
+    Inherits System.Windows.Forms.Form
4
+
5
+    'Form 覆寫 Dispose 以清除元件清單。
6
+    <System.Diagnostics.DebuggerNonUserCode()> _
7
+    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8
+        Try
9
+            If disposing AndAlso components IsNot Nothing Then
10
+                components.Dispose()
11
+            End If
12
+        Finally
13
+            MyBase.Dispose(disposing)
14
+        End Try
15
+    End Sub
16
+
17
+    '為 Windows Form 設計工具的必要項
18
+    Private components As System.ComponentModel.IContainer
19
+
20
+    '注意: 以下為 Windows Form 設計工具所需的程序
21
+    '可以使用 Windows Form 設計工具進行修改。
22
+    '請勿使用程式碼編輯器進行修改。
23
+    <System.Diagnostics.DebuggerStepThrough()> _
24
+    Private Sub InitializeComponent()
25
+        Me.components = New System.ComponentModel.Container()
26
+        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Me.圖片編碼_tb = New System.Windows.Forms.TextBox()
30
+        Me.驗證碼_tb = New System.Windows.Forms.TextBox()
31
+        Me.Label20 = New System.Windows.Forms.Label()
32
+        Me.Label19 = New System.Windows.Forms.Label()
33
+        Me.簽名清單_dgv = New System.Windows.Forms.DataGridView()
34
+        Me.Label11 = New System.Windows.Forms.Label()
35
+        Me.零用金_tb = New System.Windows.Forms.TextBox()
36
+        Me.Label10 = New System.Windows.Forms.Label()
37
+        Me.現金餘額_tb = New System.Windows.Forms.TextBox()
38
+        Me.Label9 = New System.Windows.Forms.Label()
39
+        Me.支出_tb = New System.Windows.Forms.TextBox()
40
+        Me.Label6 = New System.Windows.Forms.Label()
41
+        Me.非當天日期_ch = New System.Windows.Forms.CheckBox()
42
+        Me.Label2 = New System.Windows.Forms.Label()
43
+        Me.審核日期_dtp = New System.Windows.Forms.DateTimePicker()
44
+        Me.支票_tb = New System.Windows.Forms.TextBox()
45
+        Me.單據作廢ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
46
+        Me.現金_tb = New System.Windows.Forms.TextBox()
47
+        Me.Label8 = New System.Windows.Forms.Label()
48
+        Me.Label3 = New System.Windows.Forms.Label()
49
+        Me.申請人_tb = New System.Windows.Forms.TextBox()
50
+        Me.營運成本收支單號_tb = New System.Windows.Forms.TextBox()
51
+        Me.Label1 = New System.Windows.Forms.Label()
52
+        Me.單據作廢_bt = New System.Windows.Forms.Button()
53
+        Me.審核通過_bt = New System.Windows.Forms.Button()
54
+        Me.作廢的營運成本收支單_rb = New System.Windows.Forms.RadioButton()
55
+        Me.未核准的營運成本收支單_rb = New System.Windows.Forms.RadioButton()
56
+        Me.彙總_dgv = New System.Windows.Forms.DataGridView()
57
+        Me.重新讀取ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
58
+        Me.ToolStripSeparator6 = New System.Windows.Forms.ToolStripSeparator()
59
+        Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
60
+        Me.審核通過ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
61
+        Me.字體大小調整_lb = New System.Windows.Forms.Label()
62
+        Me.字體_NUD = New System.Windows.Forms.NumericUpDown()
63
+        Me.明細_dgv = New System.Windows.Forms.DataGridView()
64
+        Me.備註_tb = New System.Windows.Forms.TextBox()
65
+        Me.Label4 = New System.Windows.Forms.Label()
66
+        Me.批量審核_bt = New System.Windows.Forms.Button()
67
+        Me.簽名圖_pb = New System.Windows.Forms.PictureBox()
68
+        CType(Me.簽名清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
69
+        CType(Me.彙總_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
70
+        Me.ContextMenuStrip1.SuspendLayout()
71
+        CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).BeginInit()
72
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
73
+        CType(Me.簽名圖_pb, System.ComponentModel.ISupportInitialize).BeginInit()
74
+        Me.SuspendLayout()
75
+        '
76
+        '圖片編碼_tb
77
+        '
78
+        Me.圖片編碼_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
79
+        Me.圖片編碼_tb.ForeColor = System.Drawing.Color.Blue
80
+        Me.圖片編碼_tb.Location = New System.Drawing.Point(255, 503)
81
+        Me.圖片編碼_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
82
+        Me.圖片編碼_tb.Name = "圖片編碼_tb"
83
+        Me.圖片編碼_tb.Size = New System.Drawing.Size(115, 23)
84
+        Me.圖片編碼_tb.TabIndex = 993
85
+        Me.圖片編碼_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
86
+        '
87
+        '驗證碼_tb
88
+        '
89
+        Me.驗證碼_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
90
+        Me.驗證碼_tb.ForeColor = System.Drawing.Color.Blue
91
+        Me.驗證碼_tb.Location = New System.Drawing.Point(51, 503)
92
+        Me.驗證碼_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
93
+        Me.驗證碼_tb.Name = "驗證碼_tb"
94
+        Me.驗證碼_tb.Size = New System.Drawing.Size(139, 23)
95
+        Me.驗證碼_tb.TabIndex = 992
96
+        Me.驗證碼_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
97
+        '
98
+        'Label20
99
+        '
100
+        Me.Label20.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
101
+        Me.Label20.AutoSize = True
102
+        Me.Label20.ForeColor = System.Drawing.Color.Blue
103
+        Me.Label20.Location = New System.Drawing.Point(192, 507)
104
+        Me.Label20.Name = "Label20"
105
+        Me.Label20.Size = New System.Drawing.Size(56, 16)
106
+        Me.Label20.TabIndex = 991
107
+        Me.Label20.Text = "圖片編碼"
108
+        '
109
+        'Label19
110
+        '
111
+        Me.Label19.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
112
+        Me.Label19.AutoSize = True
113
+        Me.Label19.ForeColor = System.Drawing.Color.Blue
114
+        Me.Label19.Location = New System.Drawing.Point(2, 507)
115
+        Me.Label19.Name = "Label19"
116
+        Me.Label19.Size = New System.Drawing.Size(44, 16)
117
+        Me.Label19.TabIndex = 990
118
+        Me.Label19.Text = "驗證碼"
119
+        '
120
+        '簽名清單_dgv
121
+        '
122
+        Me.簽名清單_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
123
+        Me.簽名清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
124
+        Me.簽名清單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
125
+        Me.簽名清單_dgv.Location = New System.Drawing.Point(5, 528)
126
+        Me.簽名清單_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
127
+        Me.簽名清單_dgv.Name = "簽名清單_dgv"
128
+        Me.簽名清單_dgv.RowHeadersWidth = 5
129
+        Me.簽名清單_dgv.RowTemplate.Height = 24
130
+        Me.簽名清單_dgv.Size = New System.Drawing.Size(185, 70)
131
+        Me.簽名清單_dgv.TabIndex = 988
132
+        '
133
+        'Label11
134
+        '
135
+        Me.Label11.AutoSize = True
136
+        Me.Label11.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
137
+        Me.Label11.Location = New System.Drawing.Point(566, 32)
138
+        Me.Label11.Name = "Label11"
139
+        Me.Label11.Size = New System.Drawing.Size(44, 16)
140
+        Me.Label11.TabIndex = 986
141
+        Me.Label11.Text = "支    票"
142
+        '
143
+        '零用金_tb
144
+        '
145
+        Me.零用金_tb.Location = New System.Drawing.Point(432, 28)
146
+        Me.零用金_tb.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5)
147
+        Me.零用金_tb.Name = "零用金_tb"
148
+        Me.零用金_tb.Size = New System.Drawing.Size(131, 23)
149
+        Me.零用金_tb.TabIndex = 985
150
+        Me.零用金_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
151
+        '
152
+        'Label10
153
+        '
154
+        Me.Label10.AutoSize = True
155
+        Me.Label10.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
156
+        Me.Label10.Location = New System.Drawing.Point(378, 32)
157
+        Me.Label10.Name = "Label10"
158
+        Me.Label10.Size = New System.Drawing.Size(44, 16)
159
+        Me.Label10.TabIndex = 984
160
+        Me.Label10.Text = "零用金"
161
+        '
162
+        '現金餘額_tb
163
+        '
164
+        Me.現金餘額_tb.Location = New System.Drawing.Point(913, 53)
165
+        Me.現金餘額_tb.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5)
166
+        Me.現金餘額_tb.Name = "現金餘額_tb"
167
+        Me.現金餘額_tb.Size = New System.Drawing.Size(111, 23)
168
+        Me.現金餘額_tb.TabIndex = 983
169
+        Me.現金餘額_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
170
+        '
171
+        'Label9
172
+        '
173
+        Me.Label9.AutoSize = True
174
+        Me.Label9.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
175
+        Me.Label9.Location = New System.Drawing.Point(879, 56)
176
+        Me.Label9.Name = "Label9"
177
+        Me.Label9.Size = New System.Drawing.Size(32, 16)
178
+        Me.Label9.TabIndex = 982
179
+        Me.Label9.Text = "總和"
180
+        '
181
+        '支出_tb
182
+        '
183
+        Me.支出_tb.Location = New System.Drawing.Point(913, 28)
184
+        Me.支出_tb.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5)
185
+        Me.支出_tb.Name = "支出_tb"
186
+        Me.支出_tb.Size = New System.Drawing.Size(111, 23)
187
+        Me.支出_tb.TabIndex = 981
188
+        Me.支出_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
189
+        '
190
+        'Label6
191
+        '
192
+        Me.Label6.AutoSize = True
193
+        Me.Label6.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
194
+        Me.Label6.Location = New System.Drawing.Point(879, 31)
195
+        Me.Label6.Name = "Label6"
196
+        Me.Label6.Size = New System.Drawing.Size(32, 16)
197
+        Me.Label6.TabIndex = 980
198
+        Me.Label6.Text = "支出"
199
+        '
200
+        '非當天日期_ch
201
+        '
202
+        Me.非當天日期_ch.AutoSize = True
203
+        Me.非當天日期_ch.Checked = True
204
+        Me.非當天日期_ch.CheckState = System.Windows.Forms.CheckState.Checked
205
+        Me.非當天日期_ch.Location = New System.Drawing.Point(838, 5)
206
+        Me.非當天日期_ch.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
207
+        Me.非當天日期_ch.Name = "非當天日期_ch"
208
+        Me.非當天日期_ch.Size = New System.Drawing.Size(39, 20)
209
+        Me.非當天日期_ch.TabIndex = 979
210
+        Me.非當天日期_ch.Text = "補"
211
+        Me.非當天日期_ch.UseVisualStyleBackColor = True
212
+        '
213
+        'Label2
214
+        '
215
+        Me.Label2.AutoSize = True
216
+        Me.Label2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
217
+        Me.Label2.ForeColor = System.Drawing.Color.Blue
218
+        Me.Label2.Location = New System.Drawing.Point(717, 6)
219
+        Me.Label2.Name = "Label2"
220
+        Me.Label2.Size = New System.Drawing.Size(32, 16)
221
+        Me.Label2.TabIndex = 978
222
+        Me.Label2.Text = "日期"
223
+        '
224
+        '審核日期_dtp
225
+        '
226
+        Me.審核日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
227
+        Me.審核日期_dtp.Location = New System.Drawing.Point(748, 3)
228
+        Me.審核日期_dtp.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
229
+        Me.審核日期_dtp.Name = "審核日期_dtp"
230
+        Me.審核日期_dtp.Size = New System.Drawing.Size(88, 23)
231
+        Me.審核日期_dtp.TabIndex = 977
232
+        '
233
+        '支票_tb
234
+        '
235
+        Me.支票_tb.Location = New System.Drawing.Point(609, 28)
236
+        Me.支票_tb.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5)
237
+        Me.支票_tb.Name = "支票_tb"
238
+        Me.支票_tb.Size = New System.Drawing.Size(107, 23)
239
+        Me.支票_tb.TabIndex = 987
240
+        Me.支票_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
241
+        '
242
+        '單據作廢ToolStripMenuItem
243
+        '
244
+        Me.單據作廢ToolStripMenuItem.ForeColor = System.Drawing.Color.Red
245
+        Me.單據作廢ToolStripMenuItem.Name = "單據作廢ToolStripMenuItem"
246
+        Me.單據作廢ToolStripMenuItem.Size = New System.Drawing.Size(122, 22)
247
+        Me.單據作廢ToolStripMenuItem.Text = "單據作廢"
248
+        '
249
+        '現金_tb
250
+        '
251
+        Me.現金_tb.Location = New System.Drawing.Point(748, 28)
252
+        Me.現金_tb.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5)
253
+        Me.現金_tb.Name = "現金_tb"
254
+        Me.現金_tb.Size = New System.Drawing.Size(129, 23)
255
+        Me.現金_tb.TabIndex = 976
256
+        Me.現金_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
257
+        '
258
+        'Label8
259
+        '
260
+        Me.Label8.AutoSize = True
261
+        Me.Label8.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
262
+        Me.Label8.Location = New System.Drawing.Point(718, 32)
263
+        Me.Label8.Name = "Label8"
264
+        Me.Label8.Size = New System.Drawing.Size(32, 16)
265
+        Me.Label8.TabIndex = 975
266
+        Me.Label8.Text = "現金"
267
+        '
268
+        'Label3
269
+        '
270
+        Me.Label3.AutoSize = True
271
+        Me.Label3.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
272
+        Me.Label3.Location = New System.Drawing.Point(565, 6)
273
+        Me.Label3.Name = "Label3"
274
+        Me.Label3.Size = New System.Drawing.Size(44, 16)
275
+        Me.Label3.TabIndex = 974
276
+        Me.Label3.Text = "申請人"
277
+        '
278
+        '申請人_tb
279
+        '
280
+        Me.申請人_tb.Location = New System.Drawing.Point(609, 3)
281
+        Me.申請人_tb.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5)
282
+        Me.申請人_tb.Name = "申請人_tb"
283
+        Me.申請人_tb.Size = New System.Drawing.Size(107, 23)
284
+        Me.申請人_tb.TabIndex = 973
285
+        '
286
+        '營運成本收支單號_tb
287
+        '
288
+        Me.營運成本收支單號_tb.Location = New System.Drawing.Point(433, 3)
289
+        Me.營運成本收支單號_tb.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5)
290
+        Me.營運成本收支單號_tb.Name = "營運成本收支單號_tb"
291
+        Me.營運成本收支單號_tb.Size = New System.Drawing.Size(130, 23)
292
+        Me.營運成本收支單號_tb.TabIndex = 971
293
+        '
294
+        'Label1
295
+        '
296
+        Me.Label1.AutoSize = True
297
+        Me.Label1.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
298
+        Me.Label1.Location = New System.Drawing.Point(377, 7)
299
+        Me.Label1.Name = "Label1"
300
+        Me.Label1.Size = New System.Drawing.Size(56, 16)
301
+        Me.Label1.TabIndex = 972
302
+        Me.Label1.Text = "財務單號"
303
+        '
304
+        '單據作廢_bt
305
+        '
306
+        Me.單據作廢_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
307
+        Me.單據作廢_bt.ForeColor = System.Drawing.Color.Red
308
+        Me.單據作廢_bt.Location = New System.Drawing.Point(1191, 3)
309
+        Me.單據作廢_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
310
+        Me.單據作廢_bt.Name = "單據作廢_bt"
311
+        Me.單據作廢_bt.Size = New System.Drawing.Size(80, 73)
312
+        Me.單據作廢_bt.TabIndex = 970
313
+        Me.單據作廢_bt.Text = "單據作廢"
314
+        Me.單據作廢_bt.UseVisualStyleBackColor = True
315
+        '
316
+        '審核通過_bt
317
+        '
318
+        Me.審核通過_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
319
+        Me.審核通過_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
320
+        Me.審核通過_bt.Location = New System.Drawing.Point(1110, 3)
321
+        Me.審核通過_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
322
+        Me.審核通過_bt.Name = "審核通過_bt"
323
+        Me.審核通過_bt.Size = New System.Drawing.Size(80, 73)
324
+        Me.審核通過_bt.TabIndex = 969
325
+        Me.審核通過_bt.Text = "審核通過"
326
+        Me.審核通過_bt.UseVisualStyleBackColor = True
327
+        '
328
+        '作廢的營運成本收支單_rb
329
+        '
330
+        Me.作廢的營運成本收支單_rb.AutoSize = True
331
+        Me.作廢的營運成本收支單_rb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
332
+        Me.作廢的營運成本收支單_rb.Location = New System.Drawing.Point(167, 2)
333
+        Me.作廢的營運成本收支單_rb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
334
+        Me.作廢的營運成本收支單_rb.Name = "作廢的營運成本收支單_rb"
335
+        Me.作廢的營運成本收支單_rb.Size = New System.Drawing.Size(146, 20)
336
+        Me.作廢的營運成本收支單_rb.TabIndex = 967
337
+        Me.作廢的營運成本收支單_rb.TabStop = True
338
+        Me.作廢的營運成本收支單_rb.Text = "作廢的營運成本收支單"
339
+        Me.作廢的營運成本收支單_rb.UseVisualStyleBackColor = True
340
+        '
341
+        '未核准的營運成本收支單_rb
342
+        '
343
+        Me.未核准的營運成本收支單_rb.AutoSize = True
344
+        Me.未核准的營運成本收支單_rb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
345
+        Me.未核准的營運成本收支單_rb.Location = New System.Drawing.Point(3, 2)
346
+        Me.未核准的營運成本收支單_rb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
347
+        Me.未核准的營運成本收支單_rb.Name = "未核准的營運成本收支單_rb"
348
+        Me.未核准的營運成本收支單_rb.Size = New System.Drawing.Size(158, 20)
349
+        Me.未核准的營運成本收支單_rb.TabIndex = 966
350
+        Me.未核准的營運成本收支單_rb.TabStop = True
351
+        Me.未核准的營運成本收支單_rb.Text = "未核准的營運成本收支單"
352
+        Me.未核准的營運成本收支單_rb.UseVisualStyleBackColor = True
353
+        '
354
+        '彙總_dgv
355
+        '
356
+        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
357
+        Me.彙總_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
358
+        Me.彙總_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
359
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
360
+        Me.彙總_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
361
+        Me.彙總_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
362
+        Me.彙總_dgv.Location = New System.Drawing.Point(5, 22)
363
+        Me.彙總_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
364
+        Me.彙總_dgv.Name = "彙總_dgv"
365
+        Me.彙總_dgv.RowHeadersWidth = 5
366
+        Me.彙總_dgv.RowTemplate.Height = 24
367
+        Me.彙總_dgv.Size = New System.Drawing.Size(367, 479)
368
+        Me.彙總_dgv.TabIndex = 965
369
+        '
370
+        '重新讀取ToolStripMenuItem
371
+        '
372
+        Me.重新讀取ToolStripMenuItem.Name = "重新讀取ToolStripMenuItem"
373
+        Me.重新讀取ToolStripMenuItem.Size = New System.Drawing.Size(122, 22)
374
+        Me.重新讀取ToolStripMenuItem.Text = "重新讀取"
375
+        '
376
+        'ToolStripSeparator6
377
+        '
378
+        Me.ToolStripSeparator6.Name = "ToolStripSeparator6"
379
+        Me.ToolStripSeparator6.Size = New System.Drawing.Size(119, 6)
380
+        '
381
+        'ContextMenuStrip1
382
+        '
383
+        Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.重新讀取ToolStripMenuItem, Me.ToolStripSeparator6, Me.審核通過ToolStripMenuItem, Me.單據作廢ToolStripMenuItem})
384
+        Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
385
+        Me.ContextMenuStrip1.Size = New System.Drawing.Size(123, 76)
386
+        '
387
+        '審核通過ToolStripMenuItem
388
+        '
389
+        Me.審核通過ToolStripMenuItem.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
390
+        Me.審核通過ToolStripMenuItem.Name = "審核通過ToolStripMenuItem"
391
+        Me.審核通過ToolStripMenuItem.Size = New System.Drawing.Size(122, 22)
392
+        Me.審核通過ToolStripMenuItem.Text = "審核通過"
393
+        '
394
+        '字體大小調整_lb
395
+        '
396
+        Me.字體大小調整_lb.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
397
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
398
+        Me.字體大小調整_lb.AutoSize = True
399
+        Me.字體大小調整_lb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
400
+        Me.字體大小調整_lb.ForeColor = System.Drawing.Color.Brown
401
+        Me.字體大小調整_lb.ImeMode = System.Windows.Forms.ImeMode.NoControl
402
+        Me.字體大小調整_lb.Location = New System.Drawing.Point(916, 7)
403
+        Me.字體大小調整_lb.Name = "字體大小調整_lb"
404
+        Me.字體大小調整_lb.Size = New System.Drawing.Size(56, 16)
405
+        Me.字體大小調整_lb.TabIndex = 1499
406
+        Me.字體大小調整_lb.Text = "字體調整"
407
+        '
408
+        '字體_NUD
409
+        '
410
+        Me.字體_NUD.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
411
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
412
+        Me.字體_NUD.DecimalPlaces = 1
413
+        Me.字體_NUD.Increment = New Decimal(New Integer() {1, 0, 0, 65536})
414
+        Me.字體_NUD.Location = New System.Drawing.Point(972, 4)
415
+        Me.字體_NUD.Maximum = New Decimal(New Integer() {18, 0, 0, 0})
416
+        Me.字體_NUD.Minimum = New Decimal(New Integer() {6, 0, 0, 0})
417
+        Me.字體_NUD.Name = "字體_NUD"
418
+        Me.字體_NUD.Size = New System.Drawing.Size(52, 23)
419
+        Me.字體_NUD.TabIndex = 1498
420
+        Me.字體_NUD.Value = New Decimal(New Integer() {9, 0, 0, 0})
421
+        '
422
+        '明細_dgv
423
+        '
424
+        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
425
+        Me.明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
426
+        Me.明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
427
+            Or System.Windows.Forms.AnchorStyles.Left) _
428
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
429
+        Me.明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
430
+        Me.明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
431
+        Me.明細_dgv.Location = New System.Drawing.Point(381, 76)
432
+        Me.明細_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
433
+        Me.明細_dgv.Name = "明細_dgv"
434
+        Me.明細_dgv.RowHeadersWidth = 5
435
+        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
436
+        Me.明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
437
+        Me.明細_dgv.RowTemplate.Height = 24
438
+        Me.明細_dgv.Size = New System.Drawing.Size(896, 520)
439
+        Me.明細_dgv.TabIndex = 968
440
+        '
441
+        '備註_tb
442
+        '
443
+        Me.備註_tb.Location = New System.Drawing.Point(432, 53)
444
+        Me.備註_tb.Multiline = True
445
+        Me.備註_tb.Name = "備註_tb"
446
+        Me.備註_tb.Size = New System.Drawing.Size(445, 22)
447
+        Me.備註_tb.TabIndex = 1500
448
+        '
449
+        'Label4
450
+        '
451
+        Me.Label4.AutoSize = True
452
+        Me.Label4.Location = New System.Drawing.Point(377, 56)
453
+        Me.Label4.Name = "Label4"
454
+        Me.Label4.Size = New System.Drawing.Size(56, 16)
455
+        Me.Label4.TabIndex = 1501
456
+        Me.Label4.Text = "作廢原因"
457
+        '
458
+        '批量審核_bt
459
+        '
460
+        Me.批量審核_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
461
+        Me.批量審核_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
462
+        Me.批量審核_bt.Location = New System.Drawing.Point(1028, 3)
463
+        Me.批量審核_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
464
+        Me.批量審核_bt.Name = "批量審核_bt"
465
+        Me.批量審核_bt.Size = New System.Drawing.Size(80, 73)
466
+        Me.批量審核_bt.TabIndex = 1502
467
+        Me.批量審核_bt.Text = "批量審核"
468
+        Me.批量審核_bt.UseVisualStyleBackColor = True
469
+        '
470
+        '簽名圖_pb
471
+        '
472
+        Me.簽名圖_pb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
473
+        Me.簽名圖_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
474
+        Me.簽名圖_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
475
+        Me.簽名圖_pb.Location = New System.Drawing.Point(196, 528)
476
+        Me.簽名圖_pb.Margin = New System.Windows.Forms.Padding(3, 5, 3, 5)
477
+        Me.簽名圖_pb.Name = "簽名圖_pb"
478
+        Me.簽名圖_pb.Size = New System.Drawing.Size(176, 70)
479
+        Me.簽名圖_pb.TabIndex = 989
480
+        Me.簽名圖_pb.TabStop = False
481
+        '
482
+        '營運成本收支單審核
483
+        '
484
+        Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
485
+        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
486
+        Me.ClientSize = New System.Drawing.Size(1276, 603)
487
+        Me.ContextMenuStrip = Me.ContextMenuStrip1
488
+        Me.Controls.Add(Me.批量審核_bt)
489
+        Me.Controls.Add(Me.備註_tb)
490
+        Me.Controls.Add(Me.字體大小調整_lb)
491
+        Me.Controls.Add(Me.字體_NUD)
492
+        Me.Controls.Add(Me.圖片編碼_tb)
493
+        Me.Controls.Add(Me.驗證碼_tb)
494
+        Me.Controls.Add(Me.Label20)
495
+        Me.Controls.Add(Me.Label19)
496
+        Me.Controls.Add(Me.簽名清單_dgv)
497
+        Me.Controls.Add(Me.零用金_tb)
498
+        Me.Controls.Add(Me.Label10)
499
+        Me.Controls.Add(Me.現金餘額_tb)
500
+        Me.Controls.Add(Me.Label9)
501
+        Me.Controls.Add(Me.支出_tb)
502
+        Me.Controls.Add(Me.Label6)
503
+        Me.Controls.Add(Me.非當天日期_ch)
504
+        Me.Controls.Add(Me.審核日期_dtp)
505
+        Me.Controls.Add(Me.支票_tb)
506
+        Me.Controls.Add(Me.簽名圖_pb)
507
+        Me.Controls.Add(Me.現金_tb)
508
+        Me.Controls.Add(Me.Label8)
509
+        Me.Controls.Add(Me.Label3)
510
+        Me.Controls.Add(Me.申請人_tb)
511
+        Me.Controls.Add(Me.營運成本收支單號_tb)
512
+        Me.Controls.Add(Me.Label1)
513
+        Me.Controls.Add(Me.單據作廢_bt)
514
+        Me.Controls.Add(Me.審核通過_bt)
515
+        Me.Controls.Add(Me.作廢的營運成本收支單_rb)
516
+        Me.Controls.Add(Me.未核准的營運成本收支單_rb)
517
+        Me.Controls.Add(Me.Label4)
518
+        Me.Controls.Add(Me.Label2)
519
+        Me.Controls.Add(Me.Label11)
520
+        Me.Controls.Add(Me.明細_dgv)
521
+        Me.Controls.Add(Me.彙總_dgv)
522
+        Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
523
+        Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
524
+        Me.Name = "營運成本收支單審核"
525
+        Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
526
+        Me.Text = "營運成本收支單審核"
527
+        CType(Me.簽名清單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
528
+        CType(Me.彙總_dgv, System.ComponentModel.ISupportInitialize).EndInit()
529
+        Me.ContextMenuStrip1.ResumeLayout(False)
530
+        CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).EndInit()
531
+        CType(Me.明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
532
+        CType(Me.簽名圖_pb, System.ComponentModel.ISupportInitialize).EndInit()
533
+        Me.ResumeLayout(False)
534
+        Me.PerformLayout()
535
+
536
+    End Sub
537
+
538
+    Friend WithEvents 圖片編碼_tb As TextBox
539
+    Friend WithEvents 驗證碼_tb As TextBox
540
+    Friend WithEvents Label20 As Label
541
+    Friend WithEvents Label19 As Label
542
+    Friend WithEvents 簽名清單_dgv As DataGridView
543
+    Friend WithEvents Label11 As Label
544
+    Friend WithEvents 零用金_tb As TextBox
545
+    Friend WithEvents Label10 As Label
546
+    Friend WithEvents 現金餘額_tb As TextBox
547
+    Friend WithEvents Label9 As Label
548
+    Friend WithEvents 支出_tb As TextBox
549
+    Friend WithEvents Label6 As Label
550
+    Friend WithEvents 非當天日期_ch As CheckBox
551
+    Friend WithEvents Label2 As Label
552
+    Friend WithEvents 審核日期_dtp As DateTimePicker
553
+    Friend WithEvents 支票_tb As TextBox
554
+    Friend WithEvents 單據作廢ToolStripMenuItem As ToolStripMenuItem
555
+    Friend WithEvents 簽名圖_pb As PictureBox
556
+    Friend WithEvents 現金_tb As TextBox
557
+    Friend WithEvents Label8 As Label
558
+    Friend WithEvents Label3 As Label
559
+    Friend WithEvents 申請人_tb As TextBox
560
+    Friend WithEvents 營運成本收支單號_tb As TextBox
561
+    Friend WithEvents Label1 As Label
562
+    Friend WithEvents 單據作廢_bt As Button
563
+    Friend WithEvents 審核通過_bt As Button
564
+    Friend WithEvents 作廢的營運成本收支單_rb As RadioButton
565
+    Friend WithEvents 未核准的營運成本收支單_rb As RadioButton
566
+    Friend WithEvents 彙總_dgv As DataGridView
567
+    Friend WithEvents 重新讀取ToolStripMenuItem As ToolStripMenuItem
568
+    Friend WithEvents ToolStripSeparator6 As ToolStripSeparator
569
+    Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
570
+    Friend WithEvents 審核通過ToolStripMenuItem As ToolStripMenuItem
571
+    Friend WithEvents 字體大小調整_lb As Label
572
+    Friend WithEvents 字體_NUD As NumericUpDown
573
+    Friend WithEvents 明細_dgv As DataGridView
574
+    Friend WithEvents 備註_tb As TextBox
575
+    Friend WithEvents Label4 As Label
576
+    Friend WithEvents 批量審核_bt As Button
577
+End Class

+ 126
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單審核.resx Переглянути файл

@@ -0,0 +1,126 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+  <!-- 
4
+    Microsoft ResX Schema 
5
+    
6
+    Version 2.0
7
+    
8
+    The primary goals of this format is to allow a simple XML format 
9
+    that is mostly human readable. The generation and parsing of the 
10
+    various data types are done through the TypeConverter classes 
11
+    associated with the data types.
12
+    
13
+    Example:
14
+    
15
+    ... ado.net/XML headers & schema ...
16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+    <resheader name="version">2.0</resheader>
18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+    </data>
25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+        <comment>This is a comment</comment>
28
+    </data>
29
+                
30
+    There are any number of "resheader" rows that contain simple 
31
+    name/value pairs.
32
+    
33
+    Each data row contains a name, and value. The row also contains a 
34
+    type or mimetype. Type corresponds to a .NET class that support 
35
+    text/value conversion through the TypeConverter architecture. 
36
+    Classes that don't support this are serialized and stored with the 
37
+    mimetype set.
38
+    
39
+    The mimetype is used for serialized objects, and tells the 
40
+    ResXResourceReader how to depersist the object. This is currently not 
41
+    extensible. For a given mimetype the value must be set accordingly:
42
+    
43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
+    that the ResXResourceWriter will generate, however the reader can 
45
+    read any of the formats listed below.
46
+    
47
+    mimetype: application/x-microsoft.net.object.binary.base64
48
+    value   : The object must be serialized with 
49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+            : and then encoded with base64 encoding.
51
+    
52
+    mimetype: application/x-microsoft.net.object.soap.base64
53
+    value   : The object must be serialized with 
54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+            : and then encoded with base64 encoding.
56
+
57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
58
+    value   : The object must be serialized into a byte array 
59
+            : using a System.ComponentModel.TypeConverter
60
+            : and then encoded with base64 encoding.
61
+    -->
62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+    <xsd:element name="root" msdata:IsDataSet="true">
65
+      <xsd:complexType>
66
+        <xsd:choice maxOccurs="unbounded">
67
+          <xsd:element name="metadata">
68
+            <xsd:complexType>
69
+              <xsd:sequence>
70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+              </xsd:sequence>
72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
73
+              <xsd:attribute name="type" type="xsd:string" />
74
+              <xsd:attribute name="mimetype" type="xsd:string" />
75
+              <xsd:attribute ref="xml:space" />
76
+            </xsd:complexType>
77
+          </xsd:element>
78
+          <xsd:element name="assembly">
79
+            <xsd:complexType>
80
+              <xsd:attribute name="alias" type="xsd:string" />
81
+              <xsd:attribute name="name" type="xsd:string" />
82
+            </xsd:complexType>
83
+          </xsd:element>
84
+          <xsd:element name="data">
85
+            <xsd:complexType>
86
+              <xsd:sequence>
87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+              </xsd:sequence>
90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+              <xsd:attribute ref="xml:space" />
94
+            </xsd:complexType>
95
+          </xsd:element>
96
+          <xsd:element name="resheader">
97
+            <xsd:complexType>
98
+              <xsd:sequence>
99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+              </xsd:sequence>
101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
102
+            </xsd:complexType>
103
+          </xsd:element>
104
+        </xsd:choice>
105
+      </xsd:complexType>
106
+    </xsd:element>
107
+  </xsd:schema>
108
+  <resheader name="resmimetype">
109
+    <value>text/microsoft-resx</value>
110
+  </resheader>
111
+  <resheader name="version">
112
+    <value>2.0</value>
113
+  </resheader>
114
+  <resheader name="reader">
115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+  </resheader>
117
+  <resheader name="writer">
118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+  </resheader>
120
+  <metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121
+    <value>17, 5</value>
122
+  </metadata>
123
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
124
+    <value>47</value>
125
+  </metadata>
126
+</root>

+ 297
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單審核.vb Переглянути файл

@@ -0,0 +1,297 @@
1
+Option Strict Off
2
+Public Class 營運成本收支單審核
3
+    ReadOnly ds, ds1, ds2 As New DataSet
4
+    'Dim dr As SqlDataReader
5
+    Private ReadOnly QQW(11) As String
6
+    Dim WWEE As String : Private II As Integer
7
+    Private Sub Set_清單1()
8
+        彙總_dgv.DataSource = Nothing : ds1.Clear()
9
+        彙總_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
10
+        彙總_dgv.ColumnHeadersHeight = 25
11
+        彙總_dgv.AllowUserToAddRows = False
12
+        彙總_dgv.RowTemplate.Height = 30
13
+
14
+        If 未核准的營運成本收支單_rb.Checked = True And 作廢的營運成本收支單_rb.Checked = False Then
15
+            SQL_營運成本收支單審核_審核人1()
16
+        ElseIf 未核准的營運成本收支單_rb.Checked = False And 作廢的營運成本收支單_rb.Checked = True Then
17
+            SQL_營運成本收支單審核_審核人2()
18
+        End If
19
+        SQL_營運成本收支單審核_查詢收支單審核()
20
+        da.Fill(ds1) : 彙總_dgv.DataSource = ds1.Tables(0) : conn.Close()
21
+        彙總_dgv.Columns(0).FillWeight = 160 : 彙總_dgv.Columns(1).FillWeight = 100 : 彙總_dgv.Columns(2).FillWeight = 100 : 彙總_dgv.Columns(3).Visible = False
22
+        彙總_dgv.Columns(4).Visible = False
23
+    End Sub
24
+    Private Sub Set_費用清單()
25
+        明細_dgv.DataSource = Nothing : ds.Clear()
26
+        明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
27
+        明細_dgv.ColumnHeadersHeight = 25
28
+        明細_dgv.AllowUserToAddRows = False
29
+        明細_dgv.RowTemplate.Height = 35
30
+        SQL_營運成本收支單審核_查詢費用清單() : da.SelectCommand = cmd : da.Fill(ds) : 明細_dgv.DataSource = ds.Tables(0) : conn.Close()
31
+
32
+        明細_dgv.Columns(0).Visible = False : 明細_dgv.Columns(1).FillWeight = 80 : 明細_dgv.Columns(2).FillWeight = 300 : 明細_dgv.Columns(3).FillWeight = 500
33
+        明細_dgv.Columns(4).FillWeight = 140 : 明細_dgv.Columns(5).FillWeight = 140 : 明細_dgv.Columns(6).FillWeight = 140 : 明細_dgv.Columns(7).FillWeight = 140
34
+        明細_dgv.Columns(8).FillWeight = 140 : 明細_dgv.Columns(9).FillWeight = 140 : 明細_dgv.Columns(10).FillWeight = 140 : 明細_dgv.Columns(11).Visible = False
35
+        明細_dgv.Columns(12).Visible = False
36
+
37
+        明細_dgv.Columns(1).ReadOnly = True : 明細_dgv.Columns(2).ReadOnly = True : 明細_dgv.Columns(9).ReadOnly = True : 明細_dgv.Columns(10).ReadOnly = True
38
+
39
+        明細_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00" : 明細_dgv.Columns(5).DefaultCellStyle.Format = "#,##0.00" : 明細_dgv.Columns(6).DefaultCellStyle.Format = "#,##0.00"
40
+        明細_dgv.Columns(7).DefaultCellStyle.Format = "#,##0.00" : 明細_dgv.Columns(8).DefaultCellStyle.Format = "#,##0.00"
41
+        明細_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
42
+        明細_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
43
+        明細_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
44
+        明細_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight : 明細_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
45
+        明細_dgv.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 明細_dgv.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
46
+        明細_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 明細_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
47
+        明細_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter : 明細_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
48
+        明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter
49
+
50
+        現金_tb.Text = "0" : 支出_tb.Text = "0" : 現金餘額_tb.Text = "0" : 零用金_tb.Text = "0" : 支票_tb.Text = "0"
51
+        For i As Integer = 0 To 明細_dgv.Rows.Count - 1
52
+            現金_tb.Text = Val(現金_tb.Text) + 明細_dgv.Rows(i).Cells("現金").Value : 支出_tb.Text = Val(支出_tb.Text) + 明細_dgv.Rows(i).Cells("支出").Value
53
+            零用金_tb.Text = Val(零用金_tb.Text) + 明細_dgv.Rows(i).Cells("零用金").Value : 支票_tb.Text = Val(支票_tb.Text) + 明細_dgv.Rows(i).Cells("支票").Value
54
+        Next i
55
+        現金餘額_tb.Text = Val(零用金_tb.Text) + Val(現金_tb.Text) - Val(支出_tb.Text)
56
+        If Val(現金餘額_tb.Text) > 0 Then : 現金餘額_tb.ForeColor = Color.Blue : Else : 現金餘額_tb.ForeColor = Color.Red : End If
57
+        現金_tb.Text = Format(Val(現金_tb.Text), "#,##0.00") : 支出_tb.Text = Format(Val(支出_tb.Text), "#,##0.00") : 現金餘額_tb.Text = Format(Val(現金餘額_tb.Text), "#,##0.00")
58
+        零用金_tb.Text = Format(Val(零用金_tb.Text), "#,##0.00") : 支票_tb.Text = Format(Val(支票_tb.Text), "#,##0.00")
59
+    End Sub
60
+    Private Sub Set_清單()
61
+        簽名清單_dgv.DataSource = Nothing : ds2.Clear()
62
+        簽名清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
63
+        簽名清單_dgv.ColumnHeadersHeight = 25
64
+        簽名清單_dgv.AllowUserToAddRows = False
65
+        簽名清單_dgv.RowTemplate.Height = 23
66
+        SQL_營運成本收支單審核_查詢圖片流水號() : da.Fill(ds2) : 簽名清單_dgv.DataSource = ds2.Tables(0) : conn.Close()
67
+
68
+        簽名清單_dgv.Columns(0).FillWeight = 173 : 簽名清單_dgv.Columns(1).Visible = False
69
+        If 簽名清單_dgv.Rows.Count = 0 Then : Else
70
+            圖片編碼_tb.Text = 簽名清單_dgv(0, 0).Value.ToString
71
+            SQL_營運成本收支單審核_查詢簽名檔圖片()
72
+            While dr.Read() = True
73
+                Dim unused As Byte() = New Byte(-1) {}
74
+                Dim bytes As Byte() = DirectCast(dr.Item("簽名檔圖片"), Byte())
75
+                Dim oStream As New MemoryStream(bytes)
76
+                簽名圖_pb.Image = Bitmap.FromStream(oStream)
77
+            End While
78
+            conn.Close()
79
+            簽名圖_pb.SizeMode = 4
80
+            For QAZ = 0 To 999
81
+                QQW(0) = Strings.Right(簽名清單_dgv(0, 0).Value.ToString, 2) : QQW(1) = Strings.Right(Year(Today), 2) : QQW(2) = Strings.Left(Year(Today), 2) : QQW(3) = Month(Today) + 9
82
+                QQW(4) = Strings.Right(QQW(0), 1) : QQW(5) = Strings.Left(QQW(0), 1) : QQW(6) = Strings.Right(QQW(1), 1) : QQW(7) = Strings.Left(QQW(1), 1) : QQW(8) = Strings.Right(QQW(2), 1)
83
+                QQW(9) = Strings.Left(QQW(2), 1) : QQW(10) = Strings.Right(QQW(3), 1) : QQW(11) = Strings.Left(QQW(3), 1)
84
+                For RT = 4 To 11
85
+                    Delay(3)
86
+                    Dim ran = New Random(DateTime.Now.Millisecond) : Dim NUM1 As Integer = ran.Next(1, 4096)
87
+                    For I = 0 To 4096 : If NUM1 > 9 Then : NUM1 -= 9 : ElseIf NUM1 < 9 Then : I = 4096 : End If : Next
88
+                    If NUM1 = 1 Then : II = RT : 轉換() : ElseIf NUM1 = 2 Then : II = RT : 轉換() : ElseIf NUM1 = 3 Then : ElseIf NUM1 = 4 Then : II = RT : 轉換() : ElseIf NUM1 = 5 Then
89
+                    ElseIf NUM1 = 6 Then : II = RT : 轉換() : ElseIf NUM1 = 7 Then : ElseIf NUM1 = 8 Then : II = RT : 轉換() : ElseIf NUM1 = 9 Then : II = RT : 轉換() : End If
90
+                Next
91
+
92
+                Dim ran1 = New Random(DateTime.Now.Millisecond) : Dim NUM2 As Integer = ran1.Next(1, 4096)
93
+                For I = 0 To 4096 : If NUM2 > 99 Then : NUM2 -= 49 : ElseIf NUM2 < 99 Then : I = 4096 : End If : Next
94
+
95
+                驗證碼_tb.Text = QQW(11) & "2" & QQW(9) & "7" & QQW(7) & "0" & QQW(5) & QQW(4) & "1" & QQW(6) & "3" & QQW(8) & "9" & QQW(10) & NUM2
96
+
97
+                SQL_營運成本收支單審核_查詢簽名編碼()
98
+                If dr.Read() = True Then : Else : QAZ = 999 : End If : conn.Close()
99
+            Next
100
+        End If
101
+    End Sub
102
+    Private Sub 轉換()
103
+        If QQW(II) = "1" Then : QQW(II) = "A" : ElseIf QQW(II) = "2" Then : QQW(II) = "B" : ElseIf QQW(II) = "3" Then : QQW(II) = "C" : ElseIf QQW(II) = "4" Then : QQW(II) = "D"
104
+        ElseIf QQW(II) = "5" Then : QQW(II) = "E" : ElseIf QQW(II) = "6" Then : QQW(II) = "F" : ElseIf QQW(II) = "7" Then : QQW(II) = "G" : ElseIf QQW(II) = "8" Then : QQW(II) = "H"
105
+        ElseIf QQW(II) = "9" Then : QQW(II) = "I" : ElseIf QQW(II) = "0" Then : QQW(II) = "J"
106
+        End If
107
+    End Sub
108
+    Public Sub Delay(ByRef Interval As Double)  'Interval单位为毫秒
109
+        Dim time As DateTime = DateTime.Now : Dim Span As Double = Interval * 1234 : While ((DateTime.Now.Ticks - time.Ticks) < Span) : Application.DoEvents() : End While
110
+    End Sub
111
+    Private Sub 營運成本收支單審核_Load(sender As Object, e As EventArgs) Handles MyBase.Load
112
+        Me.MdiParent = YD_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
113
+        未核准的營運成本收支單_rb.Checked = True
114
+        Set_清單1() : Set_清單()
115
+
116
+        If CC(49) = False Then : 批量審核_bt.Enabled = False : End If
117
+        If YD_ERP_SYS.Size.Width > 1440 And YD_ERP_SYS.Size.Height > 900 Then
118
+            字體_NUD.Value = 9
119
+        ElseIf YD_ERP_SYS.Size.Width <= 1440 And YD_ERP_SYS.Size.Height <= 900 Then
120
+            字體_NUD.Value = 7.6
121
+        End If
122
+    End Sub
123
+    Private Sub 營運成本收支單審核_SizeChanged(sender As Object, e As EventArgs) Handles MyBase.SizeChanged
124
+        If YD_ERP_SYS.Size.Width > 1440 And YD_ERP_SYS.Size.Height > 900 Then
125
+            字體_NUD.Value = 9
126
+        ElseIf YD_ERP_SYS.Size.Width <= 1440 And YD_ERP_SYS.Size.Height <= 900 Then
127
+            字體_NUD.Value = 8
128
+        End If
129
+    End Sub
130
+    Private Sub DataGridView2_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles 彙總_dgv.CellClick
131
+        If e.RowIndex = -1 Then : Else
132
+            營運成本收支單號_tb.Text = 彙總_dgv(0, e.RowIndex).Value.ToString : 審核日期_dtp.Value = 彙總_dgv(1, e.RowIndex).Value.ToString : Set_費用清單()
133
+            申請人_tb.Text = 彙總_dgv(3, e.RowIndex).Value.ToString : 備註_tb.Text = 彙總_dgv(4, e.RowIndex).Value.ToString
134
+        End If
135
+    End Sub
136
+    Private Sub DataGridView3_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 簽名清單_dgv.CellClick
137
+        If e.RowIndex = -1 Then : Else
138
+            圖片編碼_tb.Text = 簽名清單_dgv(0, e.RowIndex).Value.ToString
139
+            SQL_營運成本收支單審核_查詢簽名檔圖片()
140
+            While dr.Read() = True
141
+                Dim unused As Byte() = New Byte(-1) {}
142
+                Dim bytes As Byte() = DirectCast(dr.Item("簽名檔圖片"), Byte())
143
+                Dim oStream As New MemoryStream(bytes)
144
+                簽名圖_pb.Image = Bitmap.FromStream(oStream)
145
+            End While
146
+            conn.Close()
147
+            簽名圖_pb.SizeMode = 4
148
+            For QAZ = 0 To 999
149
+                QQW(0) = Strings.Right(簽名清單_dgv(0, e.RowIndex).Value.ToString, 2) : QQW(1) = Strings.Right(Year(Today), 2) : QQW(2) = Strings.Left(Year(Today), 2) : QQW(3) = Month(Today) + 9
150
+                QQW(4) = Strings.Right(QQW(0), 1) : QQW(5) = Strings.Left(QQW(0), 1) : QQW(6) = Strings.Right(QQW(1), 1) : QQW(7) = Strings.Left(QQW(1), 1) : QQW(8) = Strings.Right(QQW(2), 1)
151
+                QQW(9) = Strings.Left(QQW(2), 1) : QQW(10) = Strings.Right(QQW(3), 1) : QQW(11) = Strings.Left(QQW(3), 1)
152
+                For RT = 4 To 11
153
+                    Delay(3)
154
+                    Dim ran = New Random(DateTime.Now.Millisecond) : Dim NUM1 As Integer = ran.Next(1, 4096)
155
+                    For I = 0 To 4096 : If NUM1 > 9 Then : NUM1 -= 9 : ElseIf NUM1 < 9 Then : I = 4096 : End If : Next
156
+                    If NUM1 = 1 Then : II = RT : 轉換() : ElseIf NUM1 = 2 Then : II = RT : 轉換() : ElseIf NUM1 = 3 Then : ElseIf NUM1 = 4 Then : II = RT : 轉換() : ElseIf NUM1 = 5 Then
157
+                    ElseIf NUM1 = 6 Then : II = RT : 轉換() : ElseIf NUM1 = 7 Then : ElseIf NUM1 = 8 Then : II = RT : 轉換() : ElseIf NUM1 = 9 Then : II = RT : 轉換() : End If
158
+                Next
159
+
160
+                Dim ran1 = New Random(DateTime.Now.Millisecond) : Dim NUM2 As Integer = ran1.Next(1, 4096)
161
+                For I = 0 To 4096 : If NUM2 > 99 Then : NUM2 -= 49 : ElseIf NUM2 < 99 Then : I = 4096 : End If : Next
162
+
163
+                驗證碼_tb.Text = QQW(11) & "2" & QQW(9) & "7" & QQW(7) & "0" & QQW(5) & QQW(4) & "1" & QQW(6) & "3" & QQW(8) & "9" & QQW(10) & NUM2
164
+
165
+                SQL_營運成本收支單審核_查詢簽名編碼()
166
+                If dr.Read() Then : Else : QAZ = 999 : End If : conn.Close()
167
+            Next
168
+        End If
169
+    End Sub
170
+    Private Sub Set_切換格式()
171
+        明細_dgv.DataSource = Nothing : ds.Clear() : 營運成本收支單號_tb.Text = "" : 申請人_tb.Text = "" : 現金_tb.Text = "" : 支出_tb.Text = "" : 現金餘額_tb.Text = ""
172
+        零用金_tb.Text = "" : 支票_tb.Text = "" : Set_清單1()
173
+    End Sub
174
+    Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles 未核准的營運成本收支單_rb.Click
175
+        未核准的營運成本收支單_rb.Checked = True : 作廢的營運成本收支單_rb.Checked = False
176
+        明細_dgv.DataSource = Nothing : ds.Clear() : 營運成本收支單號_tb.Text = "" : 申請人_tb.Text = "" : 現金_tb.Text = "" : 支出_tb.Text = "" : 現金餘額_tb.Text = ""
177
+        審核通過_bt.Enabled = True : 單據作廢_bt.Enabled = True : 審核通過ToolStripMenuItem.Enabled = True : 單據作廢ToolStripMenuItem.Enabled = True : Set_切換格式()
178
+    End Sub
179
+    Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles 作廢的營運成本收支單_rb.Click
180
+        未核准的營運成本收支單_rb.Checked = False : 作廢的營運成本收支單_rb.Checked = True
181
+        明細_dgv.DataSource = Nothing : ds.Clear() : 營運成本收支單號_tb.Text = "" : 申請人_tb.Text = "" : 現金_tb.Text = "" : 支出_tb.Text = "" : 現金餘額_tb.Text = ""
182
+        審核通過_bt.Enabled = False : 單據作廢_bt.Enabled = False : 審核通過ToolStripMenuItem.Enabled = False : 單據作廢ToolStripMenuItem.Enabled = False : Set_切換格式()
183
+    End Sub
184
+    Private Sub Set_日期格式轉換()
185
+        DTP = Format(Today(), "yyyy/MM/dd")
186
+    End Sub
187
+    Private Sub 審核通過_bt_Click(sender As Object, e As EventArgs) Handles 審核通過_bt.Click
188
+        If 營運成本收支單號_tb.Text = "" Then
189
+            MsgBox("請選擇需要審核的單據。")
190
+        Else
191
+            If 非當天日期_ch.Checked = False Then
192
+                Set_日期格式轉換()
193
+            Else
194
+                DTP = Format(審核日期_dtp.Value, "yyyy/MM/dd")
195
+            End If
196
+            conn.Close()
197
+
198
+            If gUserName = "呂苡瑄" Then : PA = gUserName
199
+            Else : PA = "呂宜嫺" : End If
200
+
201
+            SQL_營運成本收支單審核_修改公帳控制表()
202
+            SQL_營運成本收支單審核_修改公帳流水帳() : conn.Close()
203
+            For i As Integer = 0 To 明細_dgv.Rows.Count - 1
204
+                PA1 = 明細_dgv.Rows(i).Cells("項次").Value
205
+                If 明細_dgv.Rows(i).Cells("零用金").Value <> 0 Then
206
+                    SQL_營運成本收支單審核_修改公帳流水帳備用金() : conn.Close()
207
+                ElseIf 明細_dgv.Rows(i).Cells("現金").Value <> 0 Then
208
+                    SQL_營運成本收支單審核_修改公帳流水帳現金() : conn.Close()
209
+                ElseIf 明細_dgv.Rows(i).Cells("支出").Value <> 0 Then
210
+                    SQL_營運成本收支單審核_修改公帳流水帳支出() : conn.Close()
211
+                End If
212
+            Next
213
+            MsgBox("審核完畢。")
214
+            營運成本收支單號_tb.Text = "" : 申請人_tb.Text = ""
215
+            明細_dgv.DataSource = Nothing : ds.Clear()
216
+            Set_清單1() : Set_清單()
217
+        End If
218
+    End Sub
219
+    Private Sub 單據作廢_bt_Click(sender As Object, e As EventArgs) Handles 單據作廢_bt.Click
220
+        If 營運成本收支單號_tb.Text = "" Then
221
+            MsgBox("請選擇需要審核的單據。")
222
+        Else
223
+            PA = InputBox("請輸入作廢原因。")
224
+            If PA = "" Then
225
+                MsgBox("請輸入作廢原因,不可空白。")
226
+            Else
227
+                If 非當天日期_ch.Checked = False Then
228
+                    Set_日期格式轉換()
229
+                Else
230
+                    DTP = Format(審核日期_dtp.Value, "yyyy/MM/dd")
231
+                End If
232
+                conn.Close()
233
+                SQL_營運成本收支單審核_審核人3() : conn.Close()
234
+                MsgBox("審核完畢。")
235
+                PA = ""
236
+                營運成本收支單號_tb.Text = "" : 申請人_tb.Text = ""
237
+                明細_dgv.DataSource = Nothing : ds.Clear()
238
+                Set_清單1()
239
+            End If
240
+        End If
241
+    End Sub
242
+    Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
243
+        彙總_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
244
+        明細_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
245
+        簽名清單_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
246
+    End Sub
247
+    Private Sub 批量審核_bt_Click_1(sender As Object, e As EventArgs) Handles 批量審核_bt.Click
248
+        Dim NN1 As Integer = 0 : 資料數 = 彙總_dgv.Rows.Count
249
+        For I As Integer = 0 To 彙總_dgv.Rows.Count - 1
250
+            MyModule1.進度條()
251
+            NN1 += 1
252
+            營運成本收支單號_tb.Text = 彙總_dgv(0, I).Value.ToString : 審核日期_dtp.Value = 彙總_dgv(1, I).Value.ToString : Set_費用清單()
253
+            申請人_tb.Text = 彙總_dgv(3, I).Value.ToString : 備註_tb.Text = 彙總_dgv(4, I).Value.ToString
254
+
255
+            If 營運成本收支單號_tb.Text = "" Then
256
+                MsgBox("請選擇需要審核的單據。")
257
+            Else
258
+                If 非當天日期_ch.Checked = False Then
259
+                    Set_日期格式轉換()
260
+                Else
261
+                    DTP = Format(審核日期_dtp.Value, "yyyy/MM/dd")
262
+                End If
263
+                conn.Close()
264
+
265
+                If gUserName = "呂苡瑄" Then : PA = gUserName
266
+                Else : PA = "呂宜嫺" : End If
267
+
268
+                SQL_營運成本收支單審核_修改公帳控制表()
269
+                SQL_營運成本收支單審核_修改公帳流水帳() : conn.Close()
270
+                For ii As Integer = 0 To 明細_dgv.Rows.Count - 1
271
+                    PA1 = 明細_dgv.Rows(ii).Cells("項次").Value
272
+                    If 明細_dgv.Rows(ii).Cells("零用金").Value <> 0 Then
273
+                        SQL_營運成本收支單審核_修改公帳流水帳備用金() : conn.Close()
274
+                    ElseIf 明細_dgv.Rows(ii).Cells("現金").Value <> 0 Then
275
+                        SQL_營運成本收支單審核_修改公帳流水帳現金() : conn.Close()
276
+                    ElseIf 明細_dgv.Rows(ii).Cells("支出").Value <> 0 Then
277
+                        SQL_營運成本收支單審核_修改公帳流水帳支出() : conn.Close()
278
+                    End If
279
+                Next
280
+                營運成本收支單號_tb.Text = "" : 申請人_tb.Text = ""
281
+                明細_dgv.DataSource = Nothing : ds.Clear()
282
+                Set_清單()
283
+            End If
284
+        Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
285
+        Set_清單1() : MsgBox("審核完畢,共自動審核了 [ " & NN1 & " ] 筆財務收支單。")
286
+    End Sub
287
+    '----------------------滑鼠右鍵--------------------------------------------------------------------------------------------------------------------------------------------------------------------
288
+    Private Sub 重新讀取ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 重新讀取ToolStripMenuItem.Click
289
+        Set_清單1()
290
+    End Sub
291
+    Private Sub 審核通過ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 審核通過ToolStripMenuItem.Click
292
+        Me.審核通過_bt.PerformClick()
293
+    End Sub
294
+    Private Sub 單據作廢ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 單據作廢ToolStripMenuItem.Click
295
+        Me.單據作廢_bt.PerformClick()
296
+    End Sub
297
+End Class

+ 783
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單申請.Designer.vb Переглянути файл

@@ -0,0 +1,783 @@
1
+<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
2
+Partial Class 營運成本收支單申請
3
+    Inherits System.Windows.Forms.Form
4
+
5
+    'Form 覆寫 Dispose 以清除元件清單。
6
+    <System.Diagnostics.DebuggerNonUserCode()> _
7
+    Protected Overrides Sub Dispose(ByVal disposing As Boolean)
8
+        Try
9
+            If disposing AndAlso components IsNot Nothing Then
10
+                components.Dispose()
11
+            End If
12
+        Finally
13
+            MyBase.Dispose(disposing)
14
+        End Try
15
+    End Sub
16
+
17
+    '為 Windows Form 設計工具的必要項
18
+    Private components As System.ComponentModel.IContainer
19
+
20
+    '注意: 以下為 Windows Form 設計工具所需的程序
21
+    '可以使用 Windows Form 設計工具進行修改。
22
+    '請勿使用程式碼編輯器進行修改。
23
+    <System.Diagnostics.DebuggerStepThrough()> _
24
+    Private Sub InitializeComponent()
25
+        Me.components = New System.ComponentModel.Container()
26
+        Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
30
+        Me.美金匯率_tb = New System.Windows.Forms.TextBox()
31
+        Me.人民幣匯率_tb = New System.Windows.Forms.TextBox()
32
+        Me.幣別_cb = New System.Windows.Forms.ComboBox()
33
+        Me.ComboBox6 = New System.Windows.Forms.ComboBox()
34
+        Me.ComboBox4 = New System.Windows.Forms.ComboBox()
35
+        Me.ComboBox3 = New System.Windows.Forms.ComboBox()
36
+        Me.ComboBox2 = New System.Windows.Forms.ComboBox()
37
+        Me.ComboBox5 = New System.Windows.Forms.ComboBox()
38
+        Me.複製歷史單據重新開立_bt = New System.Windows.Forms.Button()
39
+        Me.日期_dtp = New System.Windows.Forms.DateTimePicker()
40
+        Me.已核准的營運成本收支單_rb = New System.Windows.Forms.RadioButton()
41
+        Me.支票_tb = New System.Windows.Forms.TextBox()
42
+        Me.Label11 = New System.Windows.Forms.Label()
43
+        Me.零用金_tb = New System.Windows.Forms.TextBox()
44
+        Me.Label10 = New System.Windows.Forms.Label()
45
+        Me.現金餘額_tb = New System.Windows.Forms.TextBox()
46
+        Me.Label9 = New System.Windows.Forms.Label()
47
+        Me.支出_tb = New System.Windows.Forms.TextBox()
48
+        Me.Label5 = New System.Windows.Forms.Label()
49
+        Me.補單_cb = New System.Windows.Forms.CheckBox()
50
+        Me.Label4 = New System.Windows.Forms.Label()
51
+        Me.申請日期_dtp = New System.Windows.Forms.DateTimePicker()
52
+        Me.ComboBox1 = New System.Windows.Forms.ComboBox()
53
+        Me.現金_tb = New System.Windows.Forms.TextBox()
54
+        Me.Label8 = New System.Windows.Forms.Label()
55
+        Me.資料尚未存檔_lb = New System.Windows.Forms.Label()
56
+        Me.選擇項次_tb = New System.Windows.Forms.TextBox()
57
+        Me.Label28 = New System.Windows.Forms.Label()
58
+        Me.Label27 = New System.Windows.Forms.Label()
59
+        Me.Label3 = New System.Windows.Forms.Label()
60
+        Me.申請人_tb = New System.Windows.Forms.TextBox()
61
+        Me.營運成本收支單號_tb = New System.Windows.Forms.TextBox()
62
+        Me.Label1 = New System.Windows.Forms.Label()
63
+        Me.作廢的營運成本收支單_rb = New System.Windows.Forms.RadioButton()
64
+        Me.未核准的營運成本收支單_rb = New System.Windows.Forms.RadioButton()
65
+        Me.Label2 = New System.Windows.Forms.Label()
66
+        Me.營運收支單_dgv = New System.Windows.Forms.DataGridView()
67
+        Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components)
68
+        Me.重新讀取ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
69
+        Me.明細表_dgv = New System.Windows.Forms.DataGridView()
70
+        Me.申請_bt = New System.Windows.Forms.Button()
71
+        Me.開立營運成本收支單_bt = New System.Windows.Forms.Button()
72
+        Me.刪除選中的營運成本收支單_bt = New System.Windows.Forms.Button()
73
+        Me.刪除選中的一筆資料_bt = New System.Windows.Forms.Button()
74
+        Me.收支單中新增一筆空白資料_bt = New System.Windows.Forms.Button()
75
+        Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
76
+        Me.BackgroundWorker2 = New System.ComponentModel.BackgroundWorker()
77
+        Me.Label7 = New System.Windows.Forms.Label()
78
+        Me.Label12 = New System.Windows.Forms.Label()
79
+        Me.字體大小調整_lb = New System.Windows.Forms.Label()
80
+        Me.字體_NUD = New System.Windows.Forms.NumericUpDown()
81
+        Me.關鍵字查詢會計科目_tb = New System.Windows.Forms.TextBox()
82
+        Me.Label6 = New System.Windows.Forms.Label()
83
+        Me.Label13 = New System.Windows.Forms.Label()
84
+        Me.Label14 = New System.Windows.Forms.Label()
85
+        Me.Label15 = New System.Windows.Forms.Label()
86
+        Me.Label16 = New System.Windows.Forms.Label()
87
+        CType(Me.營運收支單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
88
+        Me.ContextMenuStrip1.SuspendLayout()
89
+        CType(Me.明細表_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
90
+        CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).BeginInit()
91
+        Me.SuspendLayout()
92
+        '
93
+        'Timer1
94
+        '
95
+        Me.Timer1.Interval = 500
96
+        '
97
+        '美金匯率_tb
98
+        '
99
+        Me.美金匯率_tb.Location = New System.Drawing.Point(699, 373)
100
+        Me.美金匯率_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
101
+        Me.美金匯率_tb.Name = "美金匯率_tb"
102
+        Me.美金匯率_tb.Size = New System.Drawing.Size(175, 23)
103
+        Me.美金匯率_tb.TabIndex = 941
104
+        Me.美金匯率_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
105
+        Me.美金匯率_tb.Visible = False
106
+        '
107
+        '人民幣匯率_tb
108
+        '
109
+        Me.人民幣匯率_tb.Location = New System.Drawing.Point(699, 342)
110
+        Me.人民幣匯率_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
111
+        Me.人民幣匯率_tb.Name = "人民幣匯率_tb"
112
+        Me.人民幣匯率_tb.Size = New System.Drawing.Size(175, 23)
113
+        Me.人民幣匯率_tb.TabIndex = 940
114
+        Me.人民幣匯率_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
115
+        Me.人民幣匯率_tb.Visible = False
116
+        '
117
+        '幣別_cb
118
+        '
119
+        Me.幣別_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
120
+        Me.幣別_cb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
121
+        Me.幣別_cb.FormattingEnabled = True
122
+        Me.幣別_cb.Items.AddRange(New Object() {"台幣現金", "人民幣現金", "美金"})
123
+        Me.幣別_cb.Location = New System.Drawing.Point(964, 79)
124
+        Me.幣別_cb.Name = "幣別_cb"
125
+        Me.幣別_cb.Size = New System.Drawing.Size(119, 24)
126
+        Me.幣別_cb.TabIndex = 939
127
+        '
128
+        'ComboBox6
129
+        '
130
+        Me.ComboBox6.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
131
+        Me.ComboBox6.FormattingEnabled = True
132
+        Me.ComboBox6.Location = New System.Drawing.Point(699, 310)
133
+        Me.ComboBox6.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
134
+        Me.ComboBox6.Name = "ComboBox6"
135
+        Me.ComboBox6.Size = New System.Drawing.Size(175, 24)
136
+        Me.ComboBox6.TabIndex = 937
137
+        '
138
+        'ComboBox4
139
+        '
140
+        Me.ComboBox4.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
141
+        Me.ComboBox4.FormattingEnabled = True
142
+        Me.ComboBox4.Location = New System.Drawing.Point(692, 79)
143
+        Me.ComboBox4.Name = "ComboBox4"
144
+        Me.ComboBox4.Size = New System.Drawing.Size(78, 24)
145
+        Me.ComboBox4.TabIndex = 935
146
+        '
147
+        'ComboBox3
148
+        '
149
+        Me.ComboBox3.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
150
+        Me.ComboBox3.FormattingEnabled = True
151
+        Me.ComboBox3.Location = New System.Drawing.Point(568, 79)
152
+        Me.ComboBox3.Name = "ComboBox3"
153
+        Me.ComboBox3.Size = New System.Drawing.Size(121, 24)
154
+        Me.ComboBox3.TabIndex = 934
155
+        '
156
+        'ComboBox2
157
+        '
158
+        Me.ComboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
159
+        Me.ComboBox2.FormattingEnabled = True
160
+        Me.ComboBox2.Location = New System.Drawing.Point(504, 79)
161
+        Me.ComboBox2.Name = "ComboBox2"
162
+        Me.ComboBox2.Size = New System.Drawing.Size(61, 24)
163
+        Me.ComboBox2.TabIndex = 933
164
+        '
165
+        'ComboBox5
166
+        '
167
+        Me.ComboBox5.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
168
+        Me.ComboBox5.FormattingEnabled = True
169
+        Me.ComboBox5.Location = New System.Drawing.Point(380, 79)
170
+        Me.ComboBox5.Name = "ComboBox5"
171
+        Me.ComboBox5.Size = New System.Drawing.Size(121, 24)
172
+        Me.ComboBox5.TabIndex = 932
173
+        '
174
+        '複製歷史單據重新開立_bt
175
+        '
176
+        Me.複製歷史單據重新開立_bt.ForeColor = System.Drawing.Color.Green
177
+        Me.複製歷史單據重新開立_bt.Location = New System.Drawing.Point(1014, 22)
178
+        Me.複製歷史單據重新開立_bt.Name = "複製歷史單據重新開立_bt"
179
+        Me.複製歷史單據重新開立_bt.Size = New System.Drawing.Size(115, 25)
180
+        Me.複製歷史單據重新開立_bt.TabIndex = 931
181
+        Me.複製歷史單據重新開立_bt.Text = "複製歷史單據"
182
+        Me.複製歷史單據重新開立_bt.UseVisualStyleBackColor = True
183
+        '
184
+        '日期_dtp
185
+        '
186
+        Me.日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
187
+        Me.日期_dtp.Location = New System.Drawing.Point(697, 403)
188
+        Me.日期_dtp.Name = "日期_dtp"
189
+        Me.日期_dtp.Size = New System.Drawing.Size(177, 23)
190
+        Me.日期_dtp.TabIndex = 930
191
+        '
192
+        '已核准的營運成本收支單_rb
193
+        '
194
+        Me.已核准的營運成本收支單_rb.AutoSize = True
195
+        Me.已核准的營運成本收支單_rb.Location = New System.Drawing.Point(9, 26)
196
+        Me.已核准的營運成本收支單_rb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
197
+        Me.已核准的營運成本收支單_rb.Name = "已核准的營運成本收支單_rb"
198
+        Me.已核准的營運成本收支單_rb.Size = New System.Drawing.Size(158, 20)
199
+        Me.已核准的營運成本收支單_rb.TabIndex = 929
200
+        Me.已核准的營運成本收支單_rb.TabStop = True
201
+        Me.已核准的營運成本收支單_rb.Text = "已核准的營運成本收支單"
202
+        Me.已核准的營運成本收支單_rb.UseVisualStyleBackColor = True
203
+        '
204
+        '支票_tb
205
+        '
206
+        Me.支票_tb.Location = New System.Drawing.Point(622, 110)
207
+        Me.支票_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
208
+        Me.支票_tb.Name = "支票_tb"
209
+        Me.支票_tb.Size = New System.Drawing.Size(90, 23)
210
+        Me.支票_tb.TabIndex = 928
211
+        Me.支票_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
212
+        '
213
+        'Label11
214
+        '
215
+        Me.Label11.AutoSize = True
216
+        Me.Label11.Location = New System.Drawing.Point(590, 113)
217
+        Me.Label11.Name = "Label11"
218
+        Me.Label11.Size = New System.Drawing.Size(32, 16)
219
+        Me.Label11.TabIndex = 927
220
+        Me.Label11.Text = "支票"
221
+        '
222
+        '零用金_tb
223
+        '
224
+        Me.零用金_tb.Location = New System.Drawing.Point(498, 110)
225
+        Me.零用金_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
226
+        Me.零用金_tb.Name = "零用金_tb"
227
+        Me.零用金_tb.Size = New System.Drawing.Size(90, 23)
228
+        Me.零用金_tb.TabIndex = 926
229
+        Me.零用金_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
230
+        '
231
+        'Label10
232
+        '
233
+        Me.Label10.AutoSize = True
234
+        Me.Label10.Location = New System.Drawing.Point(455, 113)
235
+        Me.Label10.Name = "Label10"
236
+        Me.Label10.Size = New System.Drawing.Size(44, 16)
237
+        Me.Label10.TabIndex = 925
238
+        Me.Label10.Text = "零用金"
239
+        '
240
+        '現金餘額_tb
241
+        '
242
+        Me.現金餘額_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
243
+        Me.現金餘額_tb.Location = New System.Drawing.Point(993, 110)
244
+        Me.現金餘額_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
245
+        Me.現金餘額_tb.Name = "現金餘額_tb"
246
+        Me.現金餘額_tb.Size = New System.Drawing.Size(90, 23)
247
+        Me.現金餘額_tb.TabIndex = 924
248
+        Me.現金餘額_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
249
+        '
250
+        'Label9
251
+        '
252
+        Me.Label9.AutoSize = True
253
+        Me.Label9.Location = New System.Drawing.Point(961, 113)
254
+        Me.Label9.Name = "Label9"
255
+        Me.Label9.Size = New System.Drawing.Size(32, 16)
256
+        Me.Label9.TabIndex = 923
257
+        Me.Label9.Text = "合計"
258
+        '
259
+        '支出_tb
260
+        '
261
+        Me.支出_tb.Location = New System.Drawing.Point(869, 110)
262
+        Me.支出_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
263
+        Me.支出_tb.Name = "支出_tb"
264
+        Me.支出_tb.Size = New System.Drawing.Size(90, 23)
265
+        Me.支出_tb.TabIndex = 922
266
+        Me.支出_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
267
+        '
268
+        'Label5
269
+        '
270
+        Me.Label5.AutoSize = True
271
+        Me.Label5.Location = New System.Drawing.Point(838, 113)
272
+        Me.Label5.Name = "Label5"
273
+        Me.Label5.Size = New System.Drawing.Size(32, 16)
274
+        Me.Label5.TabIndex = 921
275
+        Me.Label5.Text = "支出"
276
+        '
277
+        '補單_cb
278
+        '
279
+        Me.補單_cb.AutoSize = True
280
+        Me.補單_cb.Checked = True
281
+        Me.補單_cb.CheckState = System.Windows.Forms.CheckState.Checked
282
+        Me.補單_cb.Location = New System.Drawing.Point(739, 26)
283
+        Me.補單_cb.Name = "補單_cb"
284
+        Me.補單_cb.Size = New System.Drawing.Size(39, 20)
285
+        Me.補單_cb.TabIndex = 920
286
+        Me.補單_cb.Text = "補"
287
+        Me.補單_cb.UseVisualStyleBackColor = True
288
+        '
289
+        'Label4
290
+        '
291
+        Me.Label4.AutoSize = True
292
+        Me.Label4.ForeColor = System.Drawing.Color.Blue
293
+        Me.Label4.Location = New System.Drawing.Point(613, 26)
294
+        Me.Label4.Name = "Label4"
295
+        Me.Label4.Size = New System.Drawing.Size(32, 16)
296
+        Me.Label4.TabIndex = 919
297
+        Me.Label4.Text = "日期"
298
+        '
299
+        '申請日期_dtp
300
+        '
301
+        Me.申請日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
302
+        Me.申請日期_dtp.Location = New System.Drawing.Point(644, 23)
303
+        Me.申請日期_dtp.Name = "申請日期_dtp"
304
+        Me.申請日期_dtp.Size = New System.Drawing.Size(90, 23)
305
+        Me.申請日期_dtp.TabIndex = 918
306
+        '
307
+        'ComboBox1
308
+        '
309
+        Me.ComboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
310
+        Me.ComboBox1.FormattingEnabled = True
311
+        Me.ComboBox1.Location = New System.Drawing.Point(773, 79)
312
+        Me.ComboBox1.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
313
+        Me.ComboBox1.Name = "ComboBox1"
314
+        Me.ComboBox1.Size = New System.Drawing.Size(188, 24)
315
+        Me.ComboBox1.TabIndex = 915
316
+        '
317
+        '現金_tb
318
+        '
319
+        Me.現金_tb.Location = New System.Drawing.Point(746, 110)
320
+        Me.現金_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
321
+        Me.現金_tb.Name = "現金_tb"
322
+        Me.現金_tb.Size = New System.Drawing.Size(90, 23)
323
+        Me.現金_tb.TabIndex = 914
324
+        Me.現金_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
325
+        '
326
+        'Label8
327
+        '
328
+        Me.Label8.AutoSize = True
329
+        Me.Label8.Location = New System.Drawing.Point(714, 113)
330
+        Me.Label8.Name = "Label8"
331
+        Me.Label8.Size = New System.Drawing.Size(32, 16)
332
+        Me.Label8.TabIndex = 913
333
+        Me.Label8.Text = "現金"
334
+        '
335
+        '資料尚未存檔_lb
336
+        '
337
+        Me.資料尚未存檔_lb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
338
+        Me.資料尚未存檔_lb.ForeColor = System.Drawing.Color.Red
339
+        Me.資料尚未存檔_lb.Location = New System.Drawing.Point(1136, 2)
340
+        Me.資料尚未存檔_lb.Name = "資料尚未存檔_lb"
341
+        Me.資料尚未存檔_lb.Size = New System.Drawing.Size(113, 20)
342
+        Me.資料尚未存檔_lb.TabIndex = 912
343
+        Me.資料尚未存檔_lb.Text = "資  料  尚  未  存  檔"
344
+        Me.資料尚未存檔_lb.Visible = False
345
+        '
346
+        '選擇項次_tb
347
+        '
348
+        Me.選擇項次_tb.Location = New System.Drawing.Point(353, 110)
349
+        Me.選擇項次_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
350
+        Me.選擇項次_tb.Name = "選擇項次_tb"
351
+        Me.選擇項次_tb.Size = New System.Drawing.Size(34, 23)
352
+        Me.選擇項次_tb.TabIndex = 911
353
+        Me.選擇項次_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
354
+        '
355
+        'Label28
356
+        '
357
+        Me.Label28.AutoSize = True
358
+        Me.Label28.Location = New System.Drawing.Point(387, 114)
359
+        Me.Label28.Name = "Label28"
360
+        Me.Label28.Size = New System.Drawing.Size(44, 16)
361
+        Me.Label28.TabIndex = 910
362
+        Me.Label28.Text = "項次。"
363
+        '
364
+        'Label27
365
+        '
366
+        Me.Label27.AutoSize = True
367
+        Me.Label27.Location = New System.Drawing.Point(322, 114)
368
+        Me.Label27.Name = "Label27"
369
+        Me.Label27.Size = New System.Drawing.Size(32, 16)
370
+        Me.Label27.TabIndex = 909
371
+        Me.Label27.Text = "選擇"
372
+        '
373
+        'Label3
374
+        '
375
+        Me.Label3.AutoSize = True
376
+        Me.Label3.Location = New System.Drawing.Point(501, 26)
377
+        Me.Label3.Name = "Label3"
378
+        Me.Label3.Size = New System.Drawing.Size(44, 16)
379
+        Me.Label3.TabIndex = 907
380
+        Me.Label3.Text = "申請人"
381
+        '
382
+        '申請人_tb
383
+        '
384
+        Me.申請人_tb.Location = New System.Drawing.Point(545, 23)
385
+        Me.申請人_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
386
+        Me.申請人_tb.Name = "申請人_tb"
387
+        Me.申請人_tb.Size = New System.Drawing.Size(65, 23)
388
+        Me.申請人_tb.TabIndex = 906
389
+        Me.申請人_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
390
+        '
391
+        '營運成本收支單號_tb
392
+        '
393
+        Me.營運成本收支單號_tb.Location = New System.Drawing.Point(378, 23)
394
+        Me.營運成本收支單號_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
395
+        Me.營運成本收支單號_tb.Name = "營運成本收支單號_tb"
396
+        Me.營運成本收支單號_tb.Size = New System.Drawing.Size(122, 23)
397
+        Me.營運成本收支單號_tb.TabIndex = 904
398
+        Me.營運成本收支單號_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
399
+        '
400
+        'Label1
401
+        '
402
+        Me.Label1.AutoSize = True
403
+        Me.Label1.Location = New System.Drawing.Point(321, 27)
404
+        Me.Label1.Name = "Label1"
405
+        Me.Label1.Size = New System.Drawing.Size(56, 16)
406
+        Me.Label1.TabIndex = 905
407
+        Me.Label1.Text = "收支單號"
408
+        '
409
+        '作廢的營運成本收支單_rb
410
+        '
411
+        Me.作廢的營運成本收支單_rb.AutoSize = True
412
+        Me.作廢的營運成本收支單_rb.Location = New System.Drawing.Point(173, 3)
413
+        Me.作廢的營運成本收支單_rb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
414
+        Me.作廢的營運成本收支單_rb.Name = "作廢的營運成本收支單_rb"
415
+        Me.作廢的營運成本收支單_rb.Size = New System.Drawing.Size(146, 20)
416
+        Me.作廢的營運成本收支單_rb.TabIndex = 903
417
+        Me.作廢的營運成本收支單_rb.TabStop = True
418
+        Me.作廢的營運成本收支單_rb.Text = "作廢的營運成本收支單"
419
+        Me.作廢的營運成本收支單_rb.UseVisualStyleBackColor = True
420
+        '
421
+        '未核准的營運成本收支單_rb
422
+        '
423
+        Me.未核准的營運成本收支單_rb.AutoSize = True
424
+        Me.未核准的營運成本收支單_rb.ImageAlign = System.Drawing.ContentAlignment.BottomRight
425
+        Me.未核准的營運成本收支單_rb.Location = New System.Drawing.Point(9, 3)
426
+        Me.未核准的營運成本收支單_rb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
427
+        Me.未核准的營運成本收支單_rb.Name = "未核准的營運成本收支單_rb"
428
+        Me.未核准的營運成本收支單_rb.Size = New System.Drawing.Size(158, 20)
429
+        Me.未核准的營運成本收支單_rb.TabIndex = 902
430
+        Me.未核准的營運成本收支單_rb.TabStop = True
431
+        Me.未核准的營運成本收支單_rb.Text = "未核准的營運成本收支單"
432
+        Me.未核准的營運成本收支單_rb.UseVisualStyleBackColor = True
433
+        '
434
+        'Label2
435
+        '
436
+        Me.Label2.AutoSize = True
437
+        Me.Label2.Location = New System.Drawing.Point(322, 83)
438
+        Me.Label2.Name = "Label2"
439
+        Me.Label2.Size = New System.Drawing.Size(56, 16)
440
+        Me.Label2.TabIndex = 917
441
+        Me.Label2.Text = "會計科目"
442
+        '
443
+        '營運收支單_dgv
444
+        '
445
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
446
+        Me.營運收支單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
447
+        Me.營運收支單_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
448
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
449
+        Me.營運收支單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
450
+        Me.營運收支單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
451
+        Me.營運收支單_dgv.Location = New System.Drawing.Point(4, 48)
452
+        Me.營運收支單_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
453
+        Me.營運收支單_dgv.Name = "營運收支單_dgv"
454
+        Me.營運收支單_dgv.RowHeadersWidth = 5
455
+        Me.營運收支單_dgv.RowTemplate.Height = 24
456
+        Me.營運收支單_dgv.Size = New System.Drawing.Size(315, 559)
457
+        Me.營運收支單_dgv.TabIndex = 901
458
+        '
459
+        'ContextMenuStrip1
460
+        '
461
+        Me.ContextMenuStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.重新讀取ToolStripMenuItem})
462
+        Me.ContextMenuStrip1.Name = "ContextMenuStrip1"
463
+        Me.ContextMenuStrip1.Size = New System.Drawing.Size(123, 26)
464
+        '
465
+        '重新讀取ToolStripMenuItem
466
+        '
467
+        Me.重新讀取ToolStripMenuItem.Name = "重新讀取ToolStripMenuItem"
468
+        Me.重新讀取ToolStripMenuItem.Size = New System.Drawing.Size(122, 22)
469
+        Me.重新讀取ToolStripMenuItem.Text = "重新讀取"
470
+        '
471
+        '明細表_dgv
472
+        '
473
+        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
474
+        Me.明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
475
+        Me.明細表_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
476
+            Or System.Windows.Forms.AnchorStyles.Left) _
477
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
478
+        Me.明細表_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
479
+        Me.明細表_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
480
+        Me.明細表_dgv.Location = New System.Drawing.Point(322, 136)
481
+        Me.明細表_dgv.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
482
+        Me.明細表_dgv.Name = "明細表_dgv"
483
+        Me.明細表_dgv.RowHeadersWidth = 5
484
+        DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
485
+        Me.明細表_dgv.RowsDefaultCellStyle = DataGridViewCellStyle3
486
+        Me.明細表_dgv.RowTemplate.Height = 24
487
+        Me.明細表_dgv.Size = New System.Drawing.Size(927, 471)
488
+        Me.明細表_dgv.TabIndex = 908
489
+        '
490
+        '申請_bt
491
+        '
492
+        Me.申請_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
493
+        Me.申請_bt.Location = New System.Drawing.Point(1089, 109)
494
+        Me.申請_bt.Name = "申請_bt"
495
+        Me.申請_bt.Size = New System.Drawing.Size(160, 25)
496
+        Me.申請_bt.TabIndex = 942
497
+        Me.申請_bt.Text = "申請完成"
498
+        Me.申請_bt.UseVisualStyleBackColor = True
499
+        '
500
+        '開立營運成本收支單_bt
501
+        '
502
+        Me.開立營運成本收支單_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
503
+        Me.開立營運成本收支單_bt.Location = New System.Drawing.Point(896, 22)
504
+        Me.開立營運成本收支單_bt.Name = "開立營運成本收支單_bt"
505
+        Me.開立營運成本收支單_bt.Size = New System.Drawing.Size(115, 25)
506
+        Me.開立營運成本收支單_bt.TabIndex = 943
507
+        Me.開立營運成本收支單_bt.Text = "開立財務收支單"
508
+        Me.開立營運成本收支單_bt.UseVisualStyleBackColor = True
509
+        '
510
+        '刪除選中的營運成本收支單_bt
511
+        '
512
+        Me.刪除選中的營運成本收支單_bt.ForeColor = System.Drawing.Color.Red
513
+        Me.刪除選中的營運成本收支單_bt.Location = New System.Drawing.Point(1132, 22)
514
+        Me.刪除選中的營運成本收支單_bt.Name = "刪除選中的營運成本收支單_bt"
515
+        Me.刪除選中的營運成本收支單_bt.Size = New System.Drawing.Size(115, 25)
516
+        Me.刪除選中的營運成本收支單_bt.TabIndex = 944
517
+        Me.刪除選中的營運成本收支單_bt.Text = "刪除選中的財務單"
518
+        Me.刪除選中的營運成本收支單_bt.UseVisualStyleBackColor = True
519
+        '
520
+        '刪除選中的一筆資料_bt
521
+        '
522
+        Me.刪除選中的一筆資料_bt.ForeColor = System.Drawing.Color.Red
523
+        Me.刪除選中的一筆資料_bt.Location = New System.Drawing.Point(1089, 78)
524
+        Me.刪除選中的一筆資料_bt.Name = "刪除選中的一筆資料_bt"
525
+        Me.刪除選中的一筆資料_bt.Size = New System.Drawing.Size(160, 25)
526
+        Me.刪除選中的一筆資料_bt.TabIndex = 946
527
+        Me.刪除選中的一筆資料_bt.Text = "刪除選中的一筆資料"
528
+        Me.刪除選中的一筆資料_bt.UseVisualStyleBackColor = True
529
+        '
530
+        '收支單中新增一筆空白資料_bt
531
+        '
532
+        Me.收支單中新增一筆空白資料_bt.ForeColor = System.Drawing.Color.Green
533
+        Me.收支單中新增一筆空白資料_bt.Location = New System.Drawing.Point(1089, 53)
534
+        Me.收支單中新增一筆空白資料_bt.Name = "收支單中新增一筆空白資料_bt"
535
+        Me.收支單中新增一筆空白資料_bt.Size = New System.Drawing.Size(160, 25)
536
+        Me.收支單中新增一筆空白資料_bt.TabIndex = 945
537
+        Me.收支單中新增一筆空白資料_bt.Text = "收支單中新增一筆空白資料"
538
+        Me.收支單中新增一筆空白資料_bt.UseVisualStyleBackColor = True
539
+        '
540
+        'Label7
541
+        '
542
+        Me.Label7.AutoSize = True
543
+        Me.Label7.Location = New System.Drawing.Point(321, 37)
544
+        Me.Label7.Name = "Label7"
545
+        Me.Label7.Size = New System.Drawing.Size(873, 16)
546
+        Me.Label7.TabIndex = 948
547
+        Me.Label7.Text = "_________________________________________________________________________________" &
548
+    "________________________________________________________________________________" &
549
+    "____________"
550
+        '
551
+        'Label12
552
+        '
553
+        Me.Label12.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
554
+        Me.Label12.AutoSize = True
555
+        Me.Label12.Location = New System.Drawing.Point(378, 37)
556
+        Me.Label12.Name = "Label12"
557
+        Me.Label12.Size = New System.Drawing.Size(873, 16)
558
+        Me.Label12.TabIndex = 949
559
+        Me.Label12.Text = "_________________________________________________________________________________" &
560
+    "________________________________________________________________________________" &
561
+    "____________"
562
+        '
563
+        '字體大小調整_lb
564
+        '
565
+        Me.字體大小調整_lb.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
566
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
567
+        Me.字體大小調整_lb.AutoSize = True
568
+        Me.字體大小調整_lb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
569
+        Me.字體大小調整_lb.ForeColor = System.Drawing.Color.Brown
570
+        Me.字體大小調整_lb.ImeMode = System.Windows.Forms.ImeMode.NoControl
571
+        Me.字體大小調整_lb.Location = New System.Drawing.Point(209, 25)
572
+        Me.字體大小調整_lb.Name = "字體大小調整_lb"
573
+        Me.字體大小調整_lb.Size = New System.Drawing.Size(56, 16)
574
+        Me.字體大小調整_lb.TabIndex = 1497
575
+        Me.字體大小調整_lb.Text = "字體調整"
576
+        '
577
+        '字體_NUD
578
+        '
579
+        Me.字體_NUD.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
580
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
581
+        Me.字體_NUD.DecimalPlaces = 1
582
+        Me.字體_NUD.Increment = New Decimal(New Integer() {1, 0, 0, 65536})
583
+        Me.字體_NUD.Location = New System.Drawing.Point(267, 22)
584
+        Me.字體_NUD.Maximum = New Decimal(New Integer() {18, 0, 0, 0})
585
+        Me.字體_NUD.Minimum = New Decimal(New Integer() {6, 0, 0, 0})
586
+        Me.字體_NUD.Name = "字體_NUD"
587
+        Me.字體_NUD.Size = New System.Drawing.Size(52, 23)
588
+        Me.字體_NUD.TabIndex = 1496
589
+        Me.字體_NUD.Value = New Decimal(New Integer() {9, 0, 0, 0})
590
+        '
591
+        '關鍵字查詢會計科目_tb
592
+        '
593
+        Me.關鍵字查詢會計科目_tb.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
594
+        Me.關鍵字查詢會計科目_tb.Location = New System.Drawing.Point(969, 54)
595
+        Me.關鍵字查詢會計科目_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
596
+        Me.關鍵字查詢會計科目_tb.Name = "關鍵字查詢會計科目_tb"
597
+        Me.關鍵字查詢會計科目_tb.Size = New System.Drawing.Size(115, 23)
598
+        Me.關鍵字查詢會計科目_tb.TabIndex = 936
599
+        Me.關鍵字查詢會計科目_tb.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
600
+        '
601
+        'Label6
602
+        '
603
+        Me.Label6.AutoSize = True
604
+        Me.Label6.Location = New System.Drawing.Point(851, 58)
605
+        Me.Label6.Name = "Label6"
606
+        Me.Label6.Size = New System.Drawing.Size(121, 16)
607
+        Me.Label6.TabIndex = 947
608
+        Me.Label6.Text = "關鍵字查詢-會計科目"
609
+        '
610
+        'Label13
611
+        '
612
+        Me.Label13.AutoSize = True
613
+        Me.Label13.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
614
+        Me.Label13.Location = New System.Drawing.Point(325, 56)
615
+        Me.Label13.Name = "Label13"
616
+        Me.Label13.Size = New System.Drawing.Size(219, 16)
617
+        Me.Label13.TabIndex = 1498
618
+        Me.Label13.Text = "2、選擇會計科目後再新增一筆空白資料"
619
+        '
620
+        'Label14
621
+        '
622
+        Me.Label14.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
623
+        Me.Label14.AutoSize = True
624
+        Me.Label14.Location = New System.Drawing.Point(379, 93)
625
+        Me.Label14.Name = "Label14"
626
+        Me.Label14.Size = New System.Drawing.Size(873, 16)
627
+        Me.Label14.TabIndex = 1500
628
+        Me.Label14.Text = "_________________________________________________________________________________" &
629
+    "________________________________________________________________________________" &
630
+    "____________"
631
+        '
632
+        'Label15
633
+        '
634
+        Me.Label15.AutoSize = True
635
+        Me.Label15.Location = New System.Drawing.Point(317, 93)
636
+        Me.Label15.Name = "Label15"
637
+        Me.Label15.Size = New System.Drawing.Size(873, 16)
638
+        Me.Label15.TabIndex = 1499
639
+        Me.Label15.Text = "_________________________________________________________________________________" &
640
+    "________________________________________________________________________________" &
641
+    "____________"
642
+        '
643
+        'Label16
644
+        '
645
+        Me.Label16.AutoSize = True
646
+        Me.Label16.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
647
+        Me.Label16.Location = New System.Drawing.Point(325, 6)
648
+        Me.Label16.Name = "Label16"
649
+        Me.Label16.Size = New System.Drawing.Size(219, 16)
650
+        Me.Label16.TabIndex = 1501
651
+        Me.Label16.Text = "1、先開立財務收支單,在選會計科目。"
652
+        '
653
+        '營運成本收支單申請
654
+        '
655
+        Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
656
+        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
657
+        Me.ClientSize = New System.Drawing.Size(1254, 611)
658
+        Me.ContextMenuStrip = Me.ContextMenuStrip1
659
+        Me.Controls.Add(Me.Label16)
660
+        Me.Controls.Add(Me.Label13)
661
+        Me.Controls.Add(Me.字體大小調整_lb)
662
+        Me.Controls.Add(Me.字體_NUD)
663
+        Me.Controls.Add(Me.刪除選中的一筆資料_bt)
664
+        Me.Controls.Add(Me.收支單中新增一筆空白資料_bt)
665
+        Me.Controls.Add(Me.刪除選中的營運成本收支單_bt)
666
+        Me.Controls.Add(Me.開立營運成本收支單_bt)
667
+        Me.Controls.Add(Me.申請_bt)
668
+        Me.Controls.Add(Me.美金匯率_tb)
669
+        Me.Controls.Add(Me.人民幣匯率_tb)
670
+        Me.Controls.Add(Me.幣別_cb)
671
+        Me.Controls.Add(Me.ComboBox6)
672
+        Me.Controls.Add(Me.關鍵字查詢會計科目_tb)
673
+        Me.Controls.Add(Me.ComboBox4)
674
+        Me.Controls.Add(Me.ComboBox3)
675
+        Me.Controls.Add(Me.ComboBox2)
676
+        Me.Controls.Add(Me.ComboBox5)
677
+        Me.Controls.Add(Me.複製歷史單據重新開立_bt)
678
+        Me.Controls.Add(Me.日期_dtp)
679
+        Me.Controls.Add(Me.已核准的營運成本收支單_rb)
680
+        Me.Controls.Add(Me.支票_tb)
681
+        Me.Controls.Add(Me.Label11)
682
+        Me.Controls.Add(Me.零用金_tb)
683
+        Me.Controls.Add(Me.Label10)
684
+        Me.Controls.Add(Me.現金餘額_tb)
685
+        Me.Controls.Add(Me.Label9)
686
+        Me.Controls.Add(Me.支出_tb)
687
+        Me.Controls.Add(Me.Label5)
688
+        Me.Controls.Add(Me.補單_cb)
689
+        Me.Controls.Add(Me.申請日期_dtp)
690
+        Me.Controls.Add(Me.ComboBox1)
691
+        Me.Controls.Add(Me.現金_tb)
692
+        Me.Controls.Add(Me.Label8)
693
+        Me.Controls.Add(Me.選擇項次_tb)
694
+        Me.Controls.Add(Me.Label28)
695
+        Me.Controls.Add(Me.Label27)
696
+        Me.Controls.Add(Me.Label3)
697
+        Me.Controls.Add(Me.申請人_tb)
698
+        Me.Controls.Add(Me.營運成本收支單號_tb)
699
+        Me.Controls.Add(Me.Label1)
700
+        Me.Controls.Add(Me.作廢的營運成本收支單_rb)
701
+        Me.Controls.Add(Me.未核准的營運成本收支單_rb)
702
+        Me.Controls.Add(Me.Label2)
703
+        Me.Controls.Add(Me.營運收支單_dgv)
704
+        Me.Controls.Add(Me.明細表_dgv)
705
+        Me.Controls.Add(Me.Label14)
706
+        Me.Controls.Add(Me.資料尚未存檔_lb)
707
+        Me.Controls.Add(Me.Label4)
708
+        Me.Controls.Add(Me.Label12)
709
+        Me.Controls.Add(Me.Label7)
710
+        Me.Controls.Add(Me.Label15)
711
+        Me.Controls.Add(Me.Label6)
712
+        Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
713
+        Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
714
+        Me.Name = "營運成本收支單申請"
715
+        Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
716
+        Me.Text = "營運成本收支單申請"
717
+        CType(Me.營運收支單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
718
+        Me.ContextMenuStrip1.ResumeLayout(False)
719
+        CType(Me.明細表_dgv, System.ComponentModel.ISupportInitialize).EndInit()
720
+        CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).EndInit()
721
+        Me.ResumeLayout(False)
722
+        Me.PerformLayout()
723
+
724
+    End Sub
725
+    Friend WithEvents Timer1 As Timer
726
+    Friend WithEvents 美金匯率_tb As TextBox
727
+    Friend WithEvents 人民幣匯率_tb As TextBox
728
+    Friend WithEvents 幣別_cb As ComboBox
729
+    Friend WithEvents ComboBox6 As ComboBox
730
+    Friend WithEvents ComboBox4 As ComboBox
731
+    Friend WithEvents ComboBox3 As ComboBox
732
+    Friend WithEvents ComboBox2 As ComboBox
733
+    Friend WithEvents ComboBox5 As ComboBox
734
+    Friend WithEvents 複製歷史單據重新開立_bt As Button
735
+    Friend WithEvents 日期_dtp As DateTimePicker
736
+    Friend WithEvents 已核准的營運成本收支單_rb As RadioButton
737
+    Friend WithEvents 支票_tb As TextBox
738
+    Friend WithEvents Label11 As Label
739
+    Friend WithEvents 零用金_tb As TextBox
740
+    Friend WithEvents Label10 As Label
741
+    Friend WithEvents 現金餘額_tb As TextBox
742
+    Friend WithEvents Label9 As Label
743
+    Friend WithEvents 支出_tb As TextBox
744
+    Friend WithEvents Label5 As Label
745
+    Friend WithEvents 補單_cb As CheckBox
746
+    Friend WithEvents Label4 As Label
747
+    Friend WithEvents 申請日期_dtp As DateTimePicker
748
+    Friend WithEvents ComboBox1 As ComboBox
749
+    Friend WithEvents 現金_tb As TextBox
750
+    Friend WithEvents Label8 As Label
751
+    Friend WithEvents 資料尚未存檔_lb As Label
752
+    Friend WithEvents 選擇項次_tb As TextBox
753
+    Friend WithEvents Label28 As Label
754
+    Friend WithEvents Label27 As Label
755
+    Friend WithEvents Label3 As Label
756
+    Friend WithEvents 申請人_tb As TextBox
757
+    Friend WithEvents 營運成本收支單號_tb As TextBox
758
+    Friend WithEvents Label1 As Label
759
+    Friend WithEvents 作廢的營運成本收支單_rb As RadioButton
760
+    Friend WithEvents 未核准的營運成本收支單_rb As RadioButton
761
+    Friend WithEvents Label2 As Label
762
+    Friend WithEvents 營運收支單_dgv As DataGridView
763
+    Friend WithEvents ContextMenuStrip1 As ContextMenuStrip
764
+    Friend WithEvents 重新讀取ToolStripMenuItem As ToolStripMenuItem
765
+    Friend WithEvents 明細表_dgv As DataGridView
766
+    Friend WithEvents 申請_bt As Button
767
+    Friend WithEvents 開立營運成本收支單_bt As Button
768
+    Friend WithEvents 刪除選中的營運成本收支單_bt As Button
769
+    Friend WithEvents 刪除選中的一筆資料_bt As Button
770
+    Friend WithEvents 收支單中新增一筆空白資料_bt As Button
771
+    Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
772
+    Friend WithEvents BackgroundWorker2 As System.ComponentModel.BackgroundWorker
773
+    Friend WithEvents Label7 As Label
774
+    Friend WithEvents Label12 As Label
775
+    Friend WithEvents 字體大小調整_lb As Label
776
+    Friend WithEvents 字體_NUD As NumericUpDown
777
+    Friend WithEvents 關鍵字查詢會計科目_tb As TextBox
778
+    Friend WithEvents Label6 As Label
779
+    Friend WithEvents Label13 As Label
780
+    Friend WithEvents Label14 As Label
781
+    Friend WithEvents Label15 As Label
782
+    Friend WithEvents Label16 As Label
783
+End Class

+ 135
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單申請.resx Переглянути файл

@@ -0,0 +1,135 @@
1
+<?xml version="1.0" encoding="utf-8"?>
2
+<root>
3
+  <!-- 
4
+    Microsoft ResX Schema 
5
+    
6
+    Version 2.0
7
+    
8
+    The primary goals of this format is to allow a simple XML format 
9
+    that is mostly human readable. The generation and parsing of the 
10
+    various data types are done through the TypeConverter classes 
11
+    associated with the data types.
12
+    
13
+    Example:
14
+    
15
+    ... ado.net/XML headers & schema ...
16
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
17
+    <resheader name="version">2.0</resheader>
18
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
19
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
20
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
21
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
22
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
23
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
24
+    </data>
25
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
26
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
27
+        <comment>This is a comment</comment>
28
+    </data>
29
+                
30
+    There are any number of "resheader" rows that contain simple 
31
+    name/value pairs.
32
+    
33
+    Each data row contains a name, and value. The row also contains a 
34
+    type or mimetype. Type corresponds to a .NET class that support 
35
+    text/value conversion through the TypeConverter architecture. 
36
+    Classes that don't support this are serialized and stored with the 
37
+    mimetype set.
38
+    
39
+    The mimetype is used for serialized objects, and tells the 
40
+    ResXResourceReader how to depersist the object. This is currently not 
41
+    extensible. For a given mimetype the value must be set accordingly:
42
+    
43
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
44
+    that the ResXResourceWriter will generate, however the reader can 
45
+    read any of the formats listed below.
46
+    
47
+    mimetype: application/x-microsoft.net.object.binary.base64
48
+    value   : The object must be serialized with 
49
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
50
+            : and then encoded with base64 encoding.
51
+    
52
+    mimetype: application/x-microsoft.net.object.soap.base64
53
+    value   : The object must be serialized with 
54
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
55
+            : and then encoded with base64 encoding.
56
+
57
+    mimetype: application/x-microsoft.net.object.bytearray.base64
58
+    value   : The object must be serialized into a byte array 
59
+            : using a System.ComponentModel.TypeConverter
60
+            : and then encoded with base64 encoding.
61
+    -->
62
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
63
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
64
+    <xsd:element name="root" msdata:IsDataSet="true">
65
+      <xsd:complexType>
66
+        <xsd:choice maxOccurs="unbounded">
67
+          <xsd:element name="metadata">
68
+            <xsd:complexType>
69
+              <xsd:sequence>
70
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
71
+              </xsd:sequence>
72
+              <xsd:attribute name="name" use="required" type="xsd:string" />
73
+              <xsd:attribute name="type" type="xsd:string" />
74
+              <xsd:attribute name="mimetype" type="xsd:string" />
75
+              <xsd:attribute ref="xml:space" />
76
+            </xsd:complexType>
77
+          </xsd:element>
78
+          <xsd:element name="assembly">
79
+            <xsd:complexType>
80
+              <xsd:attribute name="alias" type="xsd:string" />
81
+              <xsd:attribute name="name" type="xsd:string" />
82
+            </xsd:complexType>
83
+          </xsd:element>
84
+          <xsd:element name="data">
85
+            <xsd:complexType>
86
+              <xsd:sequence>
87
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
88
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
89
+              </xsd:sequence>
90
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
91
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
92
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
93
+              <xsd:attribute ref="xml:space" />
94
+            </xsd:complexType>
95
+          </xsd:element>
96
+          <xsd:element name="resheader">
97
+            <xsd:complexType>
98
+              <xsd:sequence>
99
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
100
+              </xsd:sequence>
101
+              <xsd:attribute name="name" type="xsd:string" use="required" />
102
+            </xsd:complexType>
103
+          </xsd:element>
104
+        </xsd:choice>
105
+      </xsd:complexType>
106
+    </xsd:element>
107
+  </xsd:schema>
108
+  <resheader name="resmimetype">
109
+    <value>text/microsoft-resx</value>
110
+  </resheader>
111
+  <resheader name="version">
112
+    <value>2.0</value>
113
+  </resheader>
114
+  <resheader name="reader">
115
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
116
+  </resheader>
117
+  <resheader name="writer">
118
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119
+  </resheader>
120
+  <metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121
+    <value>271, 8</value>
122
+  </metadata>
123
+  <metadata name="ContextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124
+    <value>363, 8</value>
125
+  </metadata>
126
+  <metadata name="BackgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
127
+    <value>528, 8</value>
128
+  </metadata>
129
+  <metadata name="BackgroundWorker2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
130
+    <value>700, 8</value>
131
+  </metadata>
132
+  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
133
+    <value>28</value>
134
+  </metadata>
135
+</root>

+ 362
- 0
YD-ERP-SYS/財務系統管理/營運成本收支單申請.vb Переглянути файл

@@ -0,0 +1,362 @@
1
+Option Strict Off
2
+Imports System.Data.SqlClient
3
+Public Class 營運成本收支單申請
4
+    ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet
5
+    Dim 新項次 As String : Dim 新流水1 As String : Dim 新流水2 As String
6
+    Dim NUM1 As Integer : Dim 匯率1 As Double
7
+    Private Sub Set_清單1()
8
+        營運收支單_dgv.DataSource = Nothing : ds1.Clear()
9
+        營運收支單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
10
+        營運收支單_dgv.ColumnHeadersHeight = 25
11
+        營運收支單_dgv.AllowUserToAddRows = False
12
+
13
+        明細表_dgv.RowTemplate.Height = 30
14
+        營運收支單_dgv.RowTemplate.Height = 30
15
+
16
+        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
17
+        If 未核准的營運成本收支單_rb.Checked = True And 作廢的營運成本收支單_rb.Checked = False And 已核准的營運成本收支單_rb.Checked = False Then
18
+            SQL_營運成本收支單申請_審核人1()
19
+        ElseIf 未核准的營運成本收支單_rb.Checked = False And 作廢的營運成本收支單_rb.Checked = True And 已核准的營運成本收支單_rb.Checked = False Then
20
+            SQL_營運成本收支單申請_審核人2()
21
+        ElseIf 未核准的營運成本收支單_rb.Checked = False And 作廢的營運成本收支單_rb.Checked = False And 已核准的營運成本收支單_rb.Checked = True Then
22
+            SQL_營運成本收支單申請_審核人3()
23
+        End If
24
+        SQL_營運成本收支單申請_查詢公帳控制表()
25
+        da.Fill(ds1) : 營運收支單_dgv.DataSource = ds1.Tables(0) : conn.Close()
26
+        營運收支單_dgv.Columns(0).FillWeight = 160 : 營運收支單_dgv.Columns(1).FillWeight = 100 : 營運收支單_dgv.Columns(2).FillWeight = 100 : 營運收支單_dgv.Columns(3).Visible = False
27
+    End Sub
28
+    Private Sub Set_費用清單()
29
+        明細表_dgv.DataSource = Nothing : ds.Clear()
30
+        明細表_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
31
+        明細表_dgv.ColumnHeadersHeight = 25
32
+        明細表_dgv.AllowUserToAddRows = False
33
+        明細表_dgv.RowTemplate.Height = 35
34
+        SQL_營運成本收支單申請_查詢費用清單() : da.Fill(ds) : 明細表_dgv.DataSource = ds.Tables(0) : conn.Close()
35
+
36
+        明細表_dgv.Columns(0).Visible = False : 明細表_dgv.Columns(1).FillWeight = 80 : 明細表_dgv.Columns(2).FillWeight = 300 : 明細表_dgv.Columns(3).FillWeight = 500
37
+        明細表_dgv.Columns(4).FillWeight = 140 : 明細表_dgv.Columns(5).FillWeight = 140 : 明細表_dgv.Columns(6).FillWeight = 140 : 明細表_dgv.Columns(7).FillWeight = 140
38
+        明細表_dgv.Columns(8).FillWeight = 140 : 明細表_dgv.Columns(9).FillWeight = 140 : 明細表_dgv.Columns(10).FillWeight = 140 : 明細表_dgv.Columns(11).Visible = False
39
+        明細表_dgv.Columns(12).Visible = False
40
+
41
+        明細表_dgv.Columns(1).ReadOnly = True : 明細表_dgv.Columns(2).ReadOnly = True : 明細表_dgv.Columns(9).ReadOnly = True : 明細表_dgv.Columns(10).ReadOnly = True
42
+
43
+        明細表_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.00" : 明細表_dgv.Columns(5).DefaultCellStyle.Format = "#,##0.00"
44
+        明細表_dgv.Columns(6).DefaultCellStyle.Format = "#,##0.00"
45
+        明細表_dgv.Columns(7).DefaultCellStyle.Format = "#,##0" : 明細表_dgv.Columns(8).DefaultCellStyle.Format = "#,##0.00"
46
+        明細表_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
47
+        明細表_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
48
+        明細表_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
49
+        明細表_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
50
+        明細表_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
51
+        明細表_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
52
+        明細表_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleRight
53
+        明細表_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleRight
54
+        明細表_dgv.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
55
+        明細表_dgv.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
56
+        明細表_dgv.Columns(10).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
57
+        明細表_dgv.Columns(10).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
58
+        明細表_dgv.Columns(1).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
59
+        明細表_dgv.Columns(1).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
60
+        明細表_dgv.EditMode = DataGridViewEditMode.EditOnEnter
61
+
62
+        現金_tb.Text = "0.00" : 支出_tb.Text = "0.00" : 現金餘額_tb.Text = "0.00" : 零用金_tb.Text = "0" : 支票_tb.Text = "0.00"
63
+        For i As Integer = 0 To 明細表_dgv.Rows.Count - 1
64
+            現金_tb.Text = Val(現金_tb.Text) + Val(明細表_dgv.Rows(i).Cells("現金").Value) : 支出_tb.Text = Val(支出_tb.Text) + Val(明細表_dgv.Rows(i).Cells("支出").Value)
65
+            零用金_tb.Text = Val(零用金_tb.Text) + 明細表_dgv.Rows(i).Cells("零用金").Value : 支票_tb.Text = Val(支票_tb.Text) + 明細表_dgv.Rows(i).Cells("支票").Value
66
+        Next i
67
+        現金餘額_tb.Text = Val(零用金_tb.Text) + Val(現金_tb.Text) - Val(支出_tb.Text)
68
+        If Val(現金餘額_tb.Text) > 0 Then : 現金餘額_tb.ForeColor = Color.Blue : Else : 現金餘額_tb.ForeColor = Color.Red : End If
69
+        現金_tb.Text = Format(Val(現金_tb.Text), "#,##0.00") : 支出_tb.Text = Format(Val(支出_tb.Text), "#,##0.00") : 現金餘額_tb.Text = Format(Val(現金餘額_tb.Text), "#,##0.00")
70
+        零用金_tb.Text = Format(Val(零用金_tb.Text), "#,##0.00") : 支票_tb.Text = Format(Val(支票_tb.Text), "#,##0.00")
71
+    End Sub
72
+    Private Sub ComboBox1下拉表單資料載入()
73
+        conn.Close()
74
+        SQL_營運成本收支單申請_查詢公帳控制表會計科目() : ComboBox1.Items.Clear() : ComboBox6.Items.Clear()
75
+        While (dr.Read()) : ComboBox1.Items.Add(dr("會計科目")) : ComboBox6.Items.Add(dr("編號")) : End While : conn.Close()
76
+        If ComboBox1.Items.Count <> 0 Then : ComboBox1.SelectedIndex = 0 : End If
77
+    End Sub
78
+    Private Sub ComboBox2下拉表單資料載入()
79
+        conn.Close()
80
+        SQL_營運成本收支單申請_查詢最後一筆公帳控制表會計科目() : ComboBox5.Items.Clear() : ComboBox2.Items.Clear() : ComboBox5.Text = "" : ComboBox2.Text = ""
81
+        While (dr.Read()) : ComboBox5.Items.Add(dr("第一階")) : ComboBox2.Items.Add(dr("編號")) : End While : conn.Close()
82
+    End Sub
83
+    Private Sub ComboBox3下拉表單資料載入()
84
+        conn.Close()
85
+        SQL_營運成本收支單申請_查詢最左邊公帳控制表會計科目() : ComboBox3.Items.Clear() : ComboBox4.Items.Clear() : ComboBox3.Text = "" : ComboBox4.Text = ""
86
+        While (dr.Read()) : ComboBox3.Items.Add(dr("第二階")) : ComboBox4.Items.Add(dr("編號")) : End While : conn.Close()
87
+    End Sub
88
+    Private Sub 匯率()
89
+        PA1 = Strings.Left(Format(申請日期_dtp.Value, "yyyyMMdd"), 4)
90
+        PA2 = Strings.Mid(Format(申請日期_dtp.Value, "yyyyMMdd"), 5, 2)
91
+        SQL_營運成本收支單申請_查詢匯率()
92
+        If dr.Read() Then
93
+            人民幣匯率_tb.Text = dr("中心匯率").ToString : 美金匯率_tb.Text = dr("美金匯率").ToString : conn.Close() : dr.Close()
94
+        Else
95
+            conn.Close() : dr.Close() : 匯率管理.Close() : 匯率管理.Show() : 匯率管理.BringToFront()
96
+        End If
97
+    End Sub
98
+    Private Sub Set_切換格式()
99
+        明細表_dgv.DataSource = Nothing : ds.Clear() : 營運成本收支單號_tb.Text = "" : 申請人_tb.Text = ""
100
+        選擇項次_tb.Text = "" : 現金_tb.Text = "" : 支出_tb.Text = "" : 現金餘額_tb.Text = ""
101
+        零用金_tb.Text = "" : 支票_tb.Text = "" : ComboBox1下拉表單資料載入() : Set_清單1()
102
+    End Sub
103
+    Private Sub 營運成本收支單申請_Load(sender As Object, e As EventArgs) Handles MyBase.Load
104
+        Me.MdiParent = YD_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
105
+        未核准的營運成本收支單_rb.Checked = True : 日期_dtp.Visible = False : 複製歷史單據重新開立_bt.Enabled = False : ComboBox6.Visible = False
106
+        營運收支單_dgv.Visible = True : Set_清單1() : ComboBox2下拉表單資料載入() : 幣別_cb.SelectedIndex = 0
107
+        匯率()
108
+        If YD_ERP_SYS.Size.Width > 1440 And YD_ERP_SYS.Size.Height > 900 Then
109
+            字體_NUD.Value = 9
110
+        ElseIf YD_ERP_SYS.Size.Width <= 1440 And YD_ERP_SYS.Size.Height <= 900 Then
111
+            字體_NUD.Value = 7.6
112
+        End If
113
+    End Sub
114
+    Private Sub 營運成本收支單申請_SizeChanged(sender As Object, e As EventArgs) Handles MyBase.SizeChanged
115
+        If YD_ERP_SYS.Size.Width > 1440 And YD_ERP_SYS.Size.Height > 900 Then
116
+            字體_NUD.Value = 9
117
+        ElseIf YD_ERP_SYS.Size.Width <= 1440 And YD_ERP_SYS.Size.Height <= 900 Then
118
+            字體_NUD.Value = 8
119
+        End If
120
+    End Sub
121
+    Private Sub ComboBox5_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox5.TextChanged
122
+        ComboBox2.SelectedIndex = ComboBox5.SelectedIndex : 關鍵字查詢會計科目_tb.Text = "" : ComboBox3下拉表單資料載入() : ComboBox1下拉表單資料載入()
123
+    End Sub
124
+    Private Sub ComboBox2_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox2.TextChanged
125
+        ComboBox5.SelectedIndex = ComboBox2.SelectedIndex : ComboBox3下拉表單資料載入() : ComboBox1下拉表單資料載入()
126
+    End Sub
127
+    Private Sub ComboBox3_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox3.TextChanged
128
+        ComboBox4.SelectedIndex = ComboBox3.SelectedIndex : ComboBox1下拉表單資料載入()
129
+    End Sub
130
+    Private Sub ComboBox4_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox4.TextChanged
131
+        ComboBox3.SelectedIndex = ComboBox4.SelectedIndex : ComboBox1下拉表單資料載入()
132
+    End Sub
133
+    Private Sub ComboBox1_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox1.SelectedIndexChanged
134
+        ComboBox6.SelectedIndex = ComboBox1.SelectedIndex
135
+    End Sub
136
+    Private Sub ComboBox6_SelectedIndexChanged(sender As Object, e As EventArgs) Handles ComboBox6.SelectedIndexChanged
137
+        ComboBox1.SelectedIndex = ComboBox6.SelectedIndex
138
+    End Sub
139
+    Private Sub 關鍵字查詢會計科目_tb_TextChanged(sender As Object, e As EventArgs) Handles 關鍵字查詢會計科目_tb.TextChanged
140
+        conn.Close()
141
+        SQL_營運成本收支單申請_營運成本會計科目查詢() : conn.Close()
142
+        If ComboBox1.Items.Count <> 0 Then : ComboBox1.SelectedIndex = 0 : End If
143
+    End Sub
144
+    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
145
+        If 資料尚未存檔_lb.Visible = True Then : 資料尚未存檔_lb.Visible = False : Else : 資料尚未存檔_lb.Visible = True : End If
146
+    End Sub
147
+    Private Sub 單一筆收支單_dgv_CellContentCl(sender As Object, e As DataGridViewCellEventArgs) Handles 明細表_dgv.CellEndEdit
148
+        現金_tb.Text = "0" : 支出_tb.Text = "0" : 現金餘額_tb.Text = "0" : 零用金_tb.Text = "0" : 支票_tb.Text = "0"
149
+        For i As Integer = 0 To 明細表_dgv.Rows.Count - 1
150
+            現金_tb.Text = Val(現金_tb.Text) + 明細表_dgv.Rows(i).Cells("現金").Value : 支出_tb.Text = Val(支出_tb.Text) + 明細表_dgv.Rows(i).Cells("支出").Value
151
+            零用金_tb.Text = Val(零用金_tb.Text) + 明細表_dgv.Rows(i).Cells("零用金").Value : 支票_tb.Text = Val(支票_tb.Text) + 明細表_dgv.Rows(i).Cells("支票").Value
152
+        Next i
153
+        現金餘額_tb.Text = Val(零用金_tb.Text) + Val(現金_tb.Text) - Val(支出_tb.Text)
154
+        If Val(現金餘額_tb.Text) > 0 Then : 現金餘額_tb.ForeColor = Color.Blue : Else : 現金餘額_tb.ForeColor = Color.Red : End If
155
+        現金_tb.Text = Format(Val(現金_tb.Text), "#,##0") : 支出_tb.Text = Format(Val(支出_tb.Text), "#,##0") : 現金餘額_tb.Text = Format(Val(現金餘額_tb.Text), "#,##0")
156
+        零用金_tb.Text = Format(Val(零用金_tb.Text), "#,##0") : 支票_tb.Text = Format(Val(支票_tb.Text), "#,##0")
157
+        Dim EU As String
158
+        EU = 明細表_dgv("票期", e.RowIndex).Value.ToString
159
+        If EU = "" Then
160
+        Else
161
+            日期_dtp.Text = EU
162
+            明細表_dgv.Rows(e.RowIndex).Cells("票期").Value = Format(日期_dtp.Value, "yyyy/MM/dd")
163
+        End If
164
+
165
+    End Sub
166
+    Private Sub 營運收支單_dgv_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles 營運收支單_dgv.CellClick
167
+        If e.RowIndex = -1 Then : Else
168
+            營運成本收支單號_tb.Text = 營運收支單_dgv(0, e.RowIndex).Value.ToString : 申請日期_dtp.Value = 營運收支單_dgv(1, e.RowIndex).Value.ToString : Set_費用清單()
169
+            申請人_tb.Text = 營運收支單_dgv(3, e.RowIndex).Value.ToString
170
+            Dim NUM1 As Integer = 0
171
+            For i As Integer = 0 To 明細表_dgv.Rows.Count - 1
172
+                PA17 = 明細表_dgv.Rows(i).Cells("項次").Value
173
+                NUM1 += 1 : If NUM1 < 10 Then : 新項次 = "00" & NUM1 : ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = "0" & NUM1 : ElseIf NUM1 > 99 Then : 新項次 = NUM1 : End If
174
+                明細表_dgv.Rows(i).Cells("項次").Value = 新項次
175
+            Next
176
+        End If
177
+    End Sub
178
+    Private Sub 單一筆收支單_dgv_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles 明細表_dgv.CellClick
179
+        If e.RowIndex = -1 Then : Else
180
+            選擇項次_tb.Text = 明細表_dgv(1, e.RowIndex).Value.ToString
181
+        End If
182
+    End Sub
183
+
184
+    Private Sub RadioButton1_CheckedChanged(sender As Object, e As EventArgs) Handles 未核准的營運成本收支單_rb.Click
185
+        未核准的營運成本收支單_rb.Checked = True : 作廢的營運成本收支單_rb.Checked = False : 已核准的營運成本收支單_rb.Checked = False
186
+        申請_bt.Enabled = True : 複製歷史單據重新開立_bt.Enabled = False
187
+        開立營運成本收支單_bt.Enabled = True : 收支單中新增一筆空白資料_bt.Enabled = True
188
+        刪除選中的一筆資料_bt.Enabled = True : 刪除選中的營運成本收支單_bt.Enabled = True : Set_切換格式()
189
+    End Sub
190
+    Private Sub RadioButton2_CheckedChanged(sender As Object, e As EventArgs) Handles 作廢的營運成本收支單_rb.Click
191
+        未核准的營運成本收支單_rb.Checked = False : 作廢的營運成本收支單_rb.Checked = True : 已核准的營運成本收支單_rb.Checked = False
192
+        申請_bt.Enabled = False : 複製歷史單據重新開立_bt.Enabled = False
193
+        開立營運成本收支單_bt.Enabled = False : 收支單中新增一筆空白資料_bt.Enabled = False
194
+        刪除選中的一筆資料_bt.Enabled = False : 刪除選中的營運成本收支單_bt.Enabled = False : Set_切換格式()
195
+    End Sub
196
+    Private Sub RadioButton3_CheckedChanged(sender As Object, e As EventArgs) Handles 已核准的營運成本收支單_rb.Click
197
+        If CC(28) = False Then
198
+            未核准的營運成本收支單_rb.Checked = False : 作廢的營運成本收支單_rb.Checked = False : 已核准的營運成本收支單_rb.Checked = True
199
+            申請_bt.Enabled = False : 複製歷史單據重新開立_bt.Enabled = True
200
+            開立營運成本收支單_bt.Enabled = False : 收支單中新增一筆空白資料_bt.Enabled = False
201
+            刪除選中的一筆資料_bt.Enabled = False : 刪除選中的營運成本收支單_bt.Enabled = False : Set_切換格式()
202
+        Else
203
+            未核准的營運成本收支單_rb.Checked = False : 作廢的營運成本收支單_rb.Checked = False : 已核准的營運成本收支單_rb.Checked = True
204
+            申請_bt.Enabled = True : 複製歷史單據重新開立_bt.Enabled = True
205
+            開立營運成本收支單_bt.Enabled = True : 收支單中新增一筆空白資料_bt.Enabled = True
206
+            刪除選中的一筆資料_bt.Enabled = True : 刪除選中的營運成本收支單_bt.Enabled = True : Set_切換格式()
207
+        End If
208
+    End Sub
209
+    Private Sub 存檔()
210
+        For i As Integer = 0 To 明細表_dgv.Rows.Count - 1
211
+            資料數 = 明細表_dgv.Rows.Count : MyModule1.進度條()
212
+            PA1 = 明細表_dgv.Rows(i).Cells("用途").Value : PA2 = 明細表_dgv.Rows(i).Cells("支出").Value : PA3 = 明細表_dgv.Rows(i).Cells("票期").Value
213
+            PA4 = 明細表_dgv.Rows(i).Cells("類別").Value : PA5 = 明細表_dgv.Rows(i).Cells("現金").Value : PA6 = 明細表_dgv.Rows(i).Cells("零用金").Value
214
+            PA7 = 明細表_dgv.Rows(i).Cells("支票").Value : PA8 = 明細表_dgv.Rows(i).Cells("匯率").Value : PA9 = 明細表_dgv.Rows(i).Cells("項次").Value
215
+            BL1 = 明細表_dgv.Rows(i).Cells("含稅").Value : PA10 = 明細表_dgv.Rows(i).Cells("流水號").Value
216
+            SQL_會計科目管理_修改收支單申請表() : conn.Close()
217
+        Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
218
+    End Sub
219
+
220
+    Private Sub Set_流水號()
221
+        conn.Close() : dr.Close()
222
+        Dim NUM1 As Integer
223
+        For NUM1 = 0 To 99
224
+            Dim d As String : Dim f As String : Dim g As Integer = 1
225
+            If Month(Now) < 10 Then : d = "0" & CStr(Month(Now))
226
+            Else : d = CStr(Month(Now))
227
+            End If
228
+            If Now.Day() < 10 Then : f = "0" & CStr(Now.Day())
229
+            Else : f = CStr(Now.Day())
230
+            End If
231
+            If NUM1 < 10 Then : 新流水1 = "B" & Microsoft.VisualBasic.Right(CStr(Year(Now)), 2) & d & f & "0" & NUM1
232
+            Else : 新流水1 = "B" & Microsoft.VisualBasic.Right(CStr(Year(Now)), 2) & d & f & NUM1
233
+            End If : PA19 = 新流水1
234
+            SQL_營運成本收支單申請_查詢收支單公帳流水號()
235
+            If dr.Read() Then : conn.Close() : Else : conn.Close() : NUM1 = 99 : End If
236
+        Next
237
+    End Sub
238
+
239
+    Private Sub 複製歷史單據重新開立_bt_Click(sender As Object, e As EventArgs) Handles 複製歷史單據重新開立_bt.Click
240
+        開立零用金支付單()
241
+        開立營運成本收支單_bt.Enabled = False : 未核准的營運成本收支單_rb.Enabled = False : 作廢的營運成本收支單_rb.Enabled = False : 已核准的營運成本收支單_rb.Enabled = False
242
+        營運收支單_dgv.Enabled = False : 未核准的營運成本收支單_rb.Checked = True : 作廢的營運成本收支單_rb.Checked = False : 已核准的營運成本收支單_rb.Checked = False : 申請_bt.Enabled = True
243
+        複製歷史單據重新開立_bt.Enabled = False : 開立營運成本收支單_bt.Enabled = True : 收支單中新增一筆空白資料_bt.Enabled = True
244
+        刪除選中的一筆資料_bt.Enabled = True : 刪除選中的營運成本收支單_bt.Enabled = True
245
+        Set_清單1()
246
+        For i As Integer = 0 To 明細表_dgv.Rows.Count - 1
247
+            Set_流水號()
248
+            SQL_會計科目管理_開立零用金支付單()
249
+        Next
250
+        Set_費用清單() : MsgBox("複製單據開立完成。")
251
+    End Sub
252
+    Private Sub 申請日期_dtp_ValueChanged(sender As Object, e As EventArgs) Handles 申請日期_dtp.ValueChanged
253
+        匯率()
254
+    End Sub
255
+    Private Sub 申請_bt_Click(sender As Object, e As EventArgs) Handles 申請_bt.Click
256
+        Timer1.Enabled = False : 資料尚未存檔_lb.Visible = False
257
+        開立營運成本收支單_bt.Enabled = True : 未核准的營運成本收支單_rb.Enabled = True : 作廢的營運成本收支單_rb.Enabled = True
258
+        營運收支單_dgv.Enabled = True : 已核准的營運成本收支單_rb.Enabled = True
259
+        存檔() : Set_清單1()
260
+        MsgBox("申請完成,請通知主管審核。")
261
+        明細表_dgv.DataSource = Nothing : ds.Clear()
262
+    End Sub
263
+
264
+    Private Sub 收支單中新增一筆空白資料_bt_Click(sender As Object, e As EventArgs) Handles 收支單中新增一筆空白資料_bt.Click
265
+        If ComboBox6.Text = "" Or 幣別_cb.Text = "" Then
266
+            MsgBox("沒有選擇會計科目或幣別。")
267
+        Else
268
+            If 營運成本收支單號_tb.Text = "" Then
269
+                開立零用金支付單()
270
+            End If
271
+            Set_日期格式轉換() : Set_流水號()
272
+            存檔() : PA = 營運成本收支單號_tb.Text
273
+            SQL_營運成本收支單申請_查詢最後一筆公帳支付單號() : PA = ""
274
+            If dr.Read() Then : 新項次 = dr("項次") : Else : 新項次 = "00" : End If : conn.Close()
275
+            NUM1 = Double.Parse(新項次) + 1
276
+            If NUM1 < 10 Then : 新項次 = "00" & NUM1 : ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = "0" & NUM1 : ElseIf NUM1 > 99 Then : 新項次 = NUM1 : End If
277
+            If 幣別_cb.Text = "台幣現金" Then
278
+                匯率1 = 1
279
+            ElseIf 幣別_cb.Text = "人民幣現金" Then
280
+                匯率1 = 人民幣匯率_tb.Text
281
+            ElseIf 幣別_cb.Text = "美金" Then
282
+                匯率1 = 美金匯率_tb.Text
283
+            End If
284
+            PA16 = 匯率1
285
+            PA15 = 新項次
286
+            SQL_營運成本收支單申請_新增公帳流水帳資料() : conn.Close()
287
+            Set_費用清單()
288
+        End If
289
+    End Sub
290
+    Private Sub 刪除選中的一筆資料_bt_Click(sender As Object, e As EventArgs) Handles 刪除選中的一筆資料_bt.Click
291
+        If 選擇項次_tb.Text = "" Then
292
+            MsgBox("未選擇需要刪除的資料。")
293
+        Else
294
+            存檔()
295
+            SQL_營運成本收支單申請_刪除公帳流水帳支付單號() : conn.Close()
296
+            Set_費用清單()
297
+            Dim NUM1 As Integer = 0
298
+            For i As Integer = 0 To 明細表_dgv.Rows.Count - 1
299
+                PA17 = 明細表_dgv.Rows(i).Cells("項次").Value
300
+                NUM1 += 1 : If NUM1 < 10 Then : 新項次 = "00" & NUM1 : ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = "0" & NUM1 : ElseIf NUM1 > 99 Then : 新項次 = NUM1 : End If
301
+                PA18 = 新項次
302
+                SQL_營運成本收支單申請_修改公帳流水帳支付單號() : conn.Close()
303
+            Next
304
+            Set_費用清單()
305
+        End If
306
+    End Sub
307
+    Private Sub 字體_NUD_ValueChanged(sender As Object, e As EventArgs) Handles 字體_NUD.ValueChanged
308
+        明細表_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
309
+        營運收支單_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
310
+    End Sub
311
+    Private Sub Set_日期格式轉換()
312
+        If 補單_cb.Checked = False Then
313
+            DTP4 = Format(Today(), "yyyy/MM/dd") : DTP1 = Format(Today(), "yyyyMMdd")
314
+        Else
315
+            DTP1 = Format(申請日期_dtp.Value, "yyyyMMdd") : DTP4 = Format(申請日期_dtp.Value, "yyyy/MM/dd")
316
+        End If
317
+    End Sub
318
+    Private Sub 開立零用金支付單()
319
+        Dim NUM1 As Integer : Timer1.Enabled = True
320
+        Set_日期格式轉換()
321
+        For i As Integer = 1 To 999
322
+            NUM1 = 0 + i
323
+            If NUM1 < 10 Then : 營運成本收支單號_tb.Text = "OE-" & DTP1 & "-00" & NUM1
324
+            ElseIf NUM1 > 9 And NUM1 < 100 Then : 營運成本收支單號_tb.Text = "OE-" & DTP1 & "-0" & NUM1
325
+            ElseIf NUM1 > 99 Then : 營運成本收支單號_tb.Text = "OE-" & DTP1 & "-" & NUM1
326
+            End If
327
+            conn.Close()
328
+            PA = 營運成本收支單號_tb.Text
329
+            SQL_營運成本收支單申請_查詢第一筆公帳支付單號()
330
+            If dr.Read() Then : Else : i = 999 : conn.Close() : End If : conn.Close()
331
+        Next
332
+        PA = 營運成本收支單號_tb.Text
333
+        SQL_營運成本收支單申請_新增一筆公帳控制表() : conn.Close()
334
+        申請人_tb.Text = gUserName
335
+        Set_清單1() : PA = ""
336
+    End Sub
337
+    Private Sub 開立營運成本收支單_bt_Click(sender As Object, e As EventArgs) Handles 開立營運成本收支單_bt.Click
338
+        開立零用金支付單()
339
+        開立營運成本收支單_bt.Enabled = False : 未核准的營運成本收支單_rb.Enabled = False
340
+        作廢的營運成本收支單_rb.Enabled = False : 已核准的營運成本收支單_rb.Enabled = False
341
+        營運收支單_dgv.Enabled = False
342
+        明細表_dgv.DataSource = Nothing : ds.Clear() : conn.Close()
343
+        現金_tb.Text = "" : 現金餘額_tb.Text = ""
344
+        Set_清單1()
345
+    End Sub
346
+    Private Sub 刪除選中的營運成本收支單_bt_Click(sender As Object, e As EventArgs) Handles 刪除選中的營運成本收支單_bt.Click
347
+        Dim aa As MsgBoxResult
348
+        aa = MsgBox("確定要刪除該筆資料?", MsgBoxStyle.OkCancel)
349
+        If aa = MsgBoxResult.Ok Then
350
+            SQL_營運成本收支單申請_刪除公帳控制表() : conn.Close()
351
+            SQL_營運成本收支單申請_刪除公帳流水帳() : conn.Close()
352
+            營運成本收支單號_tb.Text = "" : 申請人_tb.Text = "" : 選擇項次_tb.Text = ""
353
+            明細表_dgv.DataSource = Nothing : ds.Clear()
354
+            Set_清單1()
355
+        End If
356
+    End Sub
357
+
358
+    '----------------------滑鼠右鍵--------------------------------------------------------------------------------------------------------------------------------------------------------------------
359
+    Private Sub 重新讀取ToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles 重新讀取ToolStripMenuItem.Click
360
+        Set_清單1()
361
+    End Sub
362
+End Class

Завантаження…
Відмінити
Зберегти