B70340 3 роки тому
джерело
коміт
1cd7e6c2bf
35 змінених файлів з 716 додано та 615 видалено
  1. BIN
      .vs/YD-ERP-SYS/v16/.suo
  2. 7
    0
      YD-ERP-SYS/LoginForm1.Designer.vb
  3. 3
    0
      YD-ERP-SYS/LoginForm1.resx
  4. 8
    1
      YD-ERP-SYS/LoginForm1.vb
  5. 61
    0
      YD-ERP-SYS/Module/DGV進度條.vb
  6. 6
    0
      YD-ERP-SYS/Module/SQL_登入與主程式.vb
  7. 22
    1
      YD-ERP-SYS/Module/SQL_資料庫系統管理.vb
  8. 17
    57
      YD-ERP-SYS/Module/SQL_跨介面共用.vb
  9. 11
    18
      YD-ERP-SYS/Module/全域變數.vb
  10. 31
    7
      YD-ERP-SYS/YD-ERP-SYS.Designer.vb
  11. 24
    10
      YD-ERP-SYS/YD-ERP-SYS.vb
  12. 1
    0
      YD-ERP-SYS/YD-ERP-SYS.vbproj
  13. BIN
      YD-ERP-SYS/bin/Debug/YD-ERP-SYS.exe
  14. BIN
      YD-ERP-SYS/bin/Debug/YD-ERP-SYS.pdb
  15. BIN
      YD-ERP-SYS/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
  16. BIN
      YD-ERP-SYS/obj/Debug/YD-ERP-SYS.exe
  17. BIN
      YD-ERP-SYS/obj/Debug/YD-ERP-SYS.pdb
  18. 1
    1
      YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbproj.CoreCompileInputs.cache
  19. BIN
      YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbproj.GenerateResource.cache
  20. BIN
      YD-ERP-SYS/obj/Debug/YD-ERP-SYS.vbprojAssemblyReference.cache
  21. 6
    0
      YD-ERP-SYS/倉儲系統管理/倉儲入庫.vb
  22. 6
    5
      YD-ERP-SYS/倉儲系統管理/盤盈盤損審核.Designer.vb
  23. 9
    50
      YD-ERP-SYS/倉儲系統管理/盤盈盤損審核.vb
  24. 5
    4
      YD-ERP-SYS/倉儲系統管理/盤盈盤損申請.Designer.vb
  25. 10
    53
      YD-ERP-SYS/倉儲系統管理/盤盈盤損申請.vb
  26. 5
    4
      YD-ERP-SYS/採購系統管理/一般申請_採購單.Designer.vb
  27. 11
    64
      YD-ERP-SYS/採購系統管理/一般申請_採購單.vb
  28. 35
    34
      YD-ERP-SYS/業務系統管理/銷售單審核.Designer.vb
  29. 34
    56
      YD-ERP-SYS/業務系統管理/銷售單審核.vb
  30. 58
    54
      YD-ERP-SYS/業務系統管理/銷售單申請.Designer.vb
  31. 40
    56
      YD-ERP-SYS/業務系統管理/銷售單申請.vb
  32. 80
    77
      YD-ERP-SYS/財務系統管理/財務_收支單一覽表.Designer.vb
  33. 10
    5
      YD-ERP-SYS/財務系統管理/財務_收支單一覽表.vb
  34. 173
    58
      YD-ERP-SYS/資料庫系統管理/系統編碼規則.Designer.vb
  35. 42
    0
      YD-ERP-SYS/資料庫系統管理/系統編碼規則.vb

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


+ 7
- 0
YD-ERP-SYS/LoginForm1.Designer.vb Переглянути файл

@@ -23,6 +23,7 @@ Partial Class LoginForm1
23 23
     '請勿使用程式碼編輯器進行修改。
24 24
     <System.Diagnostics.DebuggerStepThrough()>
25 25
     Private Sub InitializeComponent()
26
+        Me.components = New System.ComponentModel.Container()
26 27
         Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(LoginForm1))
27 28
         Me.使用者帳號_cb = New System.Windows.Forms.ComboBox()
28 29
         Me.Label5 = New System.Windows.Forms.Label()
@@ -47,6 +48,7 @@ Partial Class LoginForm1
47 48
         Me.LogoPictureBox = New System.Windows.Forms.PictureBox()
48 49
         Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
49 50
         Me.UPDATE_bt = New System.Windows.Forms.Button()
51
+        Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
50 52
         CType(Me.FTP清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
51 53
         CType(Me.LogoPictureBox, System.ComponentModel.ISupportInitialize).BeginInit()
52 54
         Me.SuspendLayout()
@@ -274,6 +276,10 @@ Partial Class LoginForm1
274 276
         Me.UPDATE_bt.Text = "UPDATE"
275 277
         Me.UPDATE_bt.UseCompatibleTextRendering = True
276 278
         '
279
+        'Timer1
280
+        '
281
+        Me.Timer1.Interval = 3000
282
+        '
277 283
         'LoginForm1
278 284
         '
279 285
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
@@ -341,4 +347,5 @@ Partial Class LoginForm1
341 347
     Friend WithEvents LogoPictureBox As Windows.Forms.PictureBox
342 348
     Friend WithEvents SaveFileDialog1 As Windows.Forms.SaveFileDialog
343 349
     Friend WithEvents UPDATE_bt As Button
350
+    Friend WithEvents Timer1 As Timer
344 351
 End Class

+ 3
- 0
YD-ERP-SYS/LoginForm1.resx Переглянути файл

@@ -120,6 +120,9 @@
120 120
   <metadata name="SaveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
121 121
     <value>17, 17</value>
122 122
   </metadata>
123
+  <metadata name="Timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
124
+    <value>161, 17</value>
125
+  </metadata>
123 126
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
124 127
   <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
125 128
     <value>

+ 8
- 1
YD-ERP-SYS/LoginForm1.vb Переглянути файл

@@ -39,9 +39,13 @@ Public Class LoginForm1
39 39
         ElseIf screenWidth = 1600 And screenHeight = 900 Then : Me.Location = New Point(567, 311)
40 40
         End If
41 41
         Me.ActiveControl = 使用者帳號_cb
42
+        Timer1.Enabled = True
43
+    End Sub
44
+    Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
42 45
         '-----------------------刪除自動更新項目-----------------------------------------------------------------------------------------------------------------------------------------------
43 46
         Dim Str As String = Application.StartupPath
44 47
         If File.Exists(Str + "\SYS-UPDATE.exe") Then : File.Delete(Str + "\SYS-UPDATE.exe") : End If
48
+        Timer1.Enabled = False
45 49
     End Sub
46 50
     Private Sub LoginForm1_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
47 51
         '-----------------------伺服器登入選擇-----------------------------------------------------------------------------------------------------------------------------------------------
@@ -78,7 +82,7 @@ Public Class LoginForm1
78 82
         If 伺服器區域_ch.Text = "雅邸" Then
79 83
             登入人IP = "180.218.213.39" : 登入() : 確認_bt.Enabled = True : 取消_bt.Enabled = True : 刷卡登入_ch.Checked = True
80 84
         ElseIf 伺服器區域_ch.Text = "設計" Then
81
-            登入人IP = "106.1.50.79" : 登入() : 確認_bt.Enabled = True : 取消_bt.Enabled = True : 刷卡登入_ch.Checked = True
85
+            登入人IP = "106.1.48.106,4567" : 登入() : 確認_bt.Enabled = True : 取消_bt.Enabled = True : 刷卡登入_ch.Checked = True
82 86
         End If
83 87
     End Sub
84 88
     Private Sub 登入()
@@ -224,4 +228,7 @@ Public Class LoginForm1
224 228
         Shell(Str + "\SYS-UPDATE.exe", vbNormalFocus)
225 229
         Me.Close()
226 230
     End Sub
231
+    Private Sub 使用者帳號_cb_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles 使用者帳號_cb.GotFocus
232
+        使用者帳號_cb.ImeMode = 2
233
+    End Sub
227 234
 End Class

+ 61
- 0
YD-ERP-SYS/Module/DGV進度條.vb Переглянути файл

@@ -0,0 +1,61 @@
1
+Imports System.ComponentModel
2
+Module DGV進度條
3
+    Public Class DataGridViewProgressColumn
4
+        Inherits DataGridViewImageColumn
5
+        Public Sub New()
6
+            Me.CellTemplate = New DataGridViewProgressCell
7
+        End Sub
8
+    End Class
9
+    Public Class DataGridViewProgressCell
10
+        Inherits DataGridViewImageCell
11
+        Sub New()
12
+            ValueType = Type.GetType("Integer")
13
+        End Sub
14
+        ' 使進度單元與默認圖像單元一致所需的方法。
15
+        ' 默認圖像單元將圖像作為值,儘管進度單元的值是整數。
16
+        Protected Overrides Function GetFormattedValue(
17
+            ByVal value As Object,
18
+            ByVal rowIndex As Integer,
19
+            ByRef cellStyle As DataGridViewCellStyle,
20
+            ByVal valueTypeConverter As TypeConverter,
21
+            ByVal formattedValueTypeConverter As TypeConverter,
22
+            ByVal context As DataGridViewDataErrorContexts) As Object
23
+            Static emptyImage As Bitmap = New Bitmap(1, 1, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
24
+            GetFormattedValue = emptyImage
25
+        End Function
26
+        Protected Overrides Sub Paint(ByVal g As System.Drawing.Graphics, ByVal clipBounds As System.Drawing.Rectangle,
27
+                                      ByVal cellBounds As System.Drawing.Rectangle,
28
+                                      ByVal rowIndex As Integer, ByVal cellState As System.Windows.Forms.DataGridViewElementStates,
29
+                                      ByVal value As Object, ByVal formattedValue As Object, ByVal errorText As String,
30
+                                      ByVal cellStyle As System.Windows.Forms.DataGridViewCellStyle,
31
+                                      ByVal advancedBorderStyle As System.Windows.Forms.DataGridViewAdvancedBorderStyle,
32
+                                      ByVal paintParts As System.Windows.Forms.DataGridViewPaintParts)
33
+            Dim progressVal As Double = CType(value, Double)
34
+            Dim percentage As Single = CType(progressVal / 分母, Single)
35
+            Dim backBrush As Brush = New SolidBrush(cellStyle.BackColor)
36
+            Dim foreBrush As Brush = New SolidBrush(cellStyle.ForeColor)
37
+            ' 調用基類方法來繪製默認單元格外觀。
38
+            MyBase.Paint(g, clipBounds, cellBounds, rowIndex, cellState,
39
+                value, formattedValue, errorText, cellStyle,
40
+                advancedBorderStyle, paintParts)
41
+            If percentage > 0.0 And percentage < 分段1 Then
42
+                ' 繪製進度條和文字
43
+                g.FillRectangle(New SolidBrush(Color.LightBlue), cellBounds.X + 2, cellBounds.Y + 2, Convert.ToInt32((percentage * cellBounds.Width - 8)), cellBounds.Height - 8)
44
+                g.DrawString(Strings.Format(progressVal, "#,##0.00") & 進度條後墜, cellStyle.Font, foreBrush, cellBounds.X + 6, cellBounds.Y + 2)
45
+            ElseIf percentage > 分段2 And percentage < 分段3 Then
46
+                ' 繪製進度條和文字
47
+                g.FillRectangle(New SolidBrush(Color.LightGreen), cellBounds.X + 2, cellBounds.Y + 2, Convert.ToInt32((percentage * cellBounds.Width - 8)), cellBounds.Height - 8)
48
+                g.DrawString(Strings.Format(progressVal, "#,##0.00") & 進度條後墜, cellStyle.Font, foreBrush, cellBounds.X + 6, cellBounds.Y + 2)
49
+            ElseIf percentage > 分段4 Then
50
+                ' 繪製進度條和文字
51
+                g.FillRectangle(New SolidBrush(Color.LightPink), cellBounds.X + 2, cellBounds.Y + 2, Convert.ToInt32((percentage * cellBounds.Width - 8)), cellBounds.Height - 8)
52
+                g.DrawString(Strings.Format(progressVal, "#,##0.00") & 進度條後墜, cellStyle.Font, foreBrush, cellBounds.X + 6, cellBounds.Y + 2)
53
+            Else
54
+                '繪製文本
55
+                If Not Me.DataGridView.CurrentCell Is Nothing AndAlso Me.DataGridView.CurrentCell.RowIndex = rowIndex Then
56
+                    g.DrawString(Strings.Format(progressVal, "#,##0.00") & 進度條後墜, cellStyle.Font, New SolidBrush(cellStyle.SelectionForeColor), cellBounds.X + 6, cellBounds.Y + 2)
57
+                Else : g.DrawString(Strings.Format(progressVal, "#,##0.00") & 進度條後墜, cellStyle.Font, foreBrush, cellBounds.X + 6, cellBounds.Y + 2) : End If
58
+            End If
59
+        End Sub
60
+    End Class
61
+End Module

+ 6
- 0
YD-ERP-SYS/Module/SQL_登入與主程式.vb Переглянути файл

@@ -20,4 +20,10 @@
20 20
     Friend Sub SQL_物料空白修正()
21 21
         ConnOpen() : SQL1 = "UPDATE 物料資料庫 SET 進度條用空白 = '' WHERE 進度條用空白 IS NULL" : CmdSet_For_dr()
22 22
     End Sub
23
+    Friend Sub SQL_業務單據未補()
24
+        ConnOpen() : SQL1 = "SELECT 單號, 開單日期 FROM 銷售控制表 WHERE (LEFT(單號, 1) LIKE '" & YD_ERP_SYS.業務_cb.Text & "') ORDER BY 單號 DESC" : CmdSet_For_DGV()
25
+    End Sub
26
+    Friend Sub SQL_財務單據未核()
27
+        ConnOpen() : SQL1 = "SELECT 支付單號 FROM 公帳控制表 WHERE (審核人 LIKE '')" : CmdSet_For_DGV()
28
+    End Sub
23 29
 End Module

+ 22
- 1
YD-ERP-SYS/Module/SQL_資料庫系統管理.vb Переглянути файл

@@ -191,7 +191,28 @@
191 191
     Friend Sub SQL_年份清單查詢()
192 192
         ConnOpen() : SQL1 = "SELECT 年份 FROM 年份清單 WHERE 年份 LIKE '" & PA & "'" : CmdSet_For_dr()
193 193
     End Sub
194
-
194
+    Friend Sub SQL_主資料庫狀態()
195
+        ConnOpen()
196
+        SQL1 = "SELECT  DB_NAME(database_id) AS 資料庫, physical_name AS '實體檔案', type_desc AS '檔案類型', 
197
+                        state_desc AS '檔案狀態', size * 8.0 / 1024 AS '檔案大小(MB)'
198
+                FROM    sys.master_files
199
+                WHERE  (DB_NAME(database_id) LIKE 'YD%')
200
+                ORDER BY DB_NAME(database_id)"
201
+        CmdSet_For_DGV()
202
+    End Sub
203
+    Friend Sub SQL_伺服器1清單()
204
+        ConnOpen()
205
+        SQL1 = "SELECT  DB_NAME(database_id) AS 資料庫 FROM sys.master_files WHERE  (DB_NAME(database_id) LIKE 'YD-%') GROUP BY DB_NAME(database_id) ORDER BY DB_NAME(database_id)"
206
+        CmdSet_For_DGV()
207
+    End Sub
208
+    Friend Sub SQL_主資料庫LOG檔案截斷()
209
+        ConnOpen() : SQL1 = "USE [" & PA & "]" : CmdSet_For_dr()
210
+        ConnOpen() : SQL1 = "ALTER DATABASE [" & PA & "]
211
+                             SET RECOVERY SIMPLE;" : CmdSet_For_dr()
212
+        ConnOpen() : SQL1 = "DBCC SHRINKFILE ([" & PA & "_Log], 1);" : CmdSet_For_dr()
213
+        ConnOpen() : SQL1 = "ALTER DATABASE [" & PA & "]
214
+                             SET RECOVERY FULL;" : CmdSet_For_dr()
215
+    End Sub
195 216
     '---------------------個人帳號管理-----------------------------------------------------------------------------------------------------------------
196 217
     Friend Sub SQL_個人帳號管理_使用者資料查詢()
197 218
         ConnOpen() : SQL1 = "SELECT 姓名, 帳號, 密碼 FROM 使用者權限管理表 WHERE (姓名 = '" & gUserName & "')" : CmdSet_For_dr()

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

@@ -81,69 +81,29 @@
81 81
             If PA2 = "" Then
82 82
                 SQL2 = ""
83 83
             Else
84
-                SQL2 = " WHERE (BB.編號 LIKE '" & PA2 & "')"
84
+                SQL2 = " WHERE (供應商資料表.編號 LIKE '" & PA2 & "')"
85 85
             End If
86 86
         Else
87 87
             If PA2 = "" Then
88
-                SQL2 = " WHERE (BB.料號 LIKE N'" & PA & "%' OR BB.品名 LIKE N'%" & PA & "%')"
88
+                SQL2 = " WHERE (物料資料庫.料號 LIKE N'" & PA & "%' OR 物料資料庫.品名 LIKE N'%" & PA & "%')"
89 89
             Else
90
-                SQL2 = " WHERE (BB.編號 LIKE '" & PA2 & "') AND (BB.料號 LIKE N'" & PA & "%' OR BB.品名 LIKE N'%" & PA & "%')"
90
+                SQL2 = " WHERE (供應商資料表.編號 LIKE '" & PA2 & "') AND (物料資料庫.料號 LIKE N'" & PA & "%' OR 物料資料庫.品名 LIKE N'%" & PA & "%')"
91 91
             End If
92 92
         End If
93
-        SQL1 = "SELECT      RR.倉名, BB.料號, BB.供應商, BB.品名, BB.訂製, BB.狀態, RR.庫存, WW.未出庫, QQ.未入庫, BB.圖片, 
94
-                            BB.最低庫存量, 倉儲分區控制表.倉名 AS 倉名1, 倉儲分區控制表_4.倉名 AS 倉名2, 
95
-                            倉儲分區控制表_5.倉名 AS 倉名3
96
-                FROM              倉儲分區控制表 AS 倉儲分區控制表_4 INNER JOIN
97
-                                (SELECT          SUM(倉儲明細表_1.入庫) AS 未入庫, 倉儲明細表_1.料號, 倉儲分區控制表_1.倉名編號, 
98
-                                                              倉儲明細表_1.物料狀態, 倉儲明細表_1.訂製狀態
99
-                                  FROM               倉儲明細表 AS 倉儲明細表_1 LEFT OUTER JOIN
100
-                                                              倉儲分區控制表 AS 倉儲分區控制表_1 ON 
101
-                                                              倉儲明細表_1.倉名編號 = 倉儲分區控制表_1.倉名編號
102
-                                  WHERE           (倉儲明細表_1.倉庫作業 LIKE '') AND (倉儲明細表_1.審核人 NOT LIKE N'作廢%') AND 
103
-                                                              (倉儲明細表_1.入庫 <> 0)
104
-                                  GROUP BY    倉儲明細表_1.料號, 倉儲分區控制表_1.倉名編號, 倉儲明細表_1.物料狀態, 倉儲明細表_1.訂製狀態) 
105
-                            AS QQ ON 倉儲分區控制表_4.倉名編號 = QQ.倉名編號 RIGHT OUTER JOIN
106
-                                (SELECT          SUM(倉儲明細表_3.入庫) - SUM(倉儲明細表_3.出庫) AS 庫存, 倉儲明細表_3.料號, 
107
-                                                              倉儲分區控制表_3.倉名編號, 倉儲明細表_3.物料狀態, 倉儲明細表_3.訂製狀態, 
108
-                                                              倉儲分區控制表_3.倉名
109
-                                  FROM               倉儲明細表 AS 倉儲明細表_3 LEFT OUTER JOIN
110
-                                                              倉儲分區控制表 AS 倉儲分區控制表_3 ON 
111
-                                                              倉儲明細表_3.倉名編號 = 倉儲分區控制表_3.倉名編號
112
-                                  WHERE           (倉儲明細表_3.審核人 NOT LIKE N'作廢%') AND (倉儲明細表_3.倉庫作業 NOT LIKE '')
113
-                                  GROUP BY    倉儲明細表_3.料號, 倉儲分區控制表_3.倉名編號, 倉儲明細表_3.物料狀態, 倉儲明細表_3.訂製狀態, 
114
-                                                              倉儲分區控制表_3.倉名) AS RR RIGHT OUTER JOIN
115
-                                (SELECT          供應商資料表.編號, 物料資料庫.料號, 供應商資料表.簡稱 AS 供應商, 物料資料庫.品名, 
116
-                                                              物料訂製狀態.訂製, 倉儲狀態.狀態, AA.物料狀態, AA.訂製狀態, 物料資料庫.是否有圖 AS 圖片, 
117
-                                                              物料資料庫.最低庫存量, 物料資料庫.進度條用空白, AA.倉名編號
118
-                                  FROM               物料訂製狀態 RIGHT OUTER JOIN
119
-                                                              倉儲狀態 RIGHT OUTER JOIN
120
-                                                                  (SELECT          料號, 物料狀態, 訂製狀態, 倉名編號
121
-                                                                    FROM               倉儲明細表
122
-                                                                    WHERE           (審核人 NOT LIKE '作廢%')
123
-                                                                    GROUP BY    料號, 審核人, 審核日期, 倉庫作業, 作業日期, 物料狀態, 訂製狀態, 倉名編號) AS AA ON
124
-                                                               倉儲狀態.編碼 = AA.物料狀態 ON 物料訂製狀態.編碼 = AA.訂製狀態 RIGHT OUTER JOIN
125
-                                                              供應商資料表 RIGHT OUTER JOIN
126
-                                                              物料資料庫 ON 供應商資料表.編號 = 物料資料庫.供應商編號 ON AA.料號 = 物料資料庫.料號
127
-                                  GROUP BY    供應商資料表.編號, 物料資料庫.料號, 供應商資料表.簡稱, 物料資料庫.品名, 物料訂製狀態.訂製, 
128
-                                                              倉儲狀態.狀態, AA.物料狀態, AA.訂製狀態, 物料資料庫.是否有圖, 物料資料庫.最低庫存量, 
129
-                                                              物料資料庫.進度條用空白, AA.倉名編號) AS BB ON RR.倉名編號 = BB.倉名編號 AND 
130
-                            RR.訂製狀態 = BB.訂製狀態 AND RR.物料狀態 = BB.物料狀態 AND RR.料號 = BB.料號 LEFT OUTER JOIN
131
-                            倉儲分區控制表 AS 倉儲分區控制表_5 INNER JOIN
132
-                                (SELECT          SUM(倉儲明細表_2.出庫) AS 未出庫, 倉儲明細表_2.料號, 倉儲分區控制表_2.倉名編號, 
133
-                                                              倉儲明細表_2.物料狀態, 倉儲明細表_2.訂製狀態
134
-                                  FROM               倉儲明細表 AS 倉儲明細表_2 LEFT OUTER JOIN
135
-                                                              倉儲分區控制表 AS 倉儲分區控制表_2 ON 
136
-                                                              倉儲明細表_2.倉名編號 = 倉儲分區控制表_2.倉名編號
137
-                                  WHERE           (倉儲明細表_2.倉庫作業 LIKE '') AND (倉儲明細表_2.審核人 NOT LIKE N'作廢%') AND 
138
-                                                              (倉儲明細表_2.出庫 <> 0)
139
-                                  GROUP BY    倉儲明細表_2.料號, 倉儲分區控制表_2.倉名編號, 倉儲明細表_2.物料狀態, 倉儲明細表_2.訂製狀態) 
140
-                            AS WW ON 倉儲分區控制表_5.倉名編號 = WW.倉名編號 ON BB.倉名編號 = WW.倉名編號 AND 
141
-                            BB.訂製狀態 = WW.訂製狀態 AND BB.物料狀態 = WW.物料狀態 AND BB.料號 = WW.料號 ON 
142
-                            QQ.倉名編號 = BB.倉名編號 AND QQ.訂製狀態 = BB.訂製狀態 AND QQ.物料狀態 = BB.物料狀態 AND 
143
-                            QQ.料號 = BB.料號 LEFT OUTER JOIN
144
-                            倉儲分區控制表 ON RR.倉名編號 = 倉儲分區控制表.倉名編號
145
-                " & SQL2 & "
146
-                ORDER BY   BB.料號"
93
+        SQL1 = "SELECT     物料資料庫.料號, 供應商資料表.簡稱 AS 供應商, 物料資料庫.品名, BB.庫存, AA.未出庫, 
94
+                           物料資料庫.是否有圖 AS 圖片, 物料資料庫.最低庫存量
95
+                FROM       物料資料庫 INNER JOIN
96
+                           供應商資料表 ON 物料資料庫.供應商編號 = 供應商資料表.編號 LEFT OUTER JOIN
97
+                          (SELECT          料號, SUM(入庫 - 出庫) AS 未出庫
98
+                           FROM               倉儲明細表
99
+                           WHERE           (審核人 NOT LIKE '作廢%') AND (倉庫作業 LIKE '')
100
+                           GROUP BY    料號) AS AA ON 物料資料庫.料號 = AA.料號 LEFT OUTER JOIN
101
+                          (SELECT          料號, SUM(入庫 - 出庫) AS 庫存
102
+                           FROM               倉儲明細表 AS 倉儲明細表_1
103
+                           WHERE           (審核人 NOT LIKE '作廢%')
104
+                           GROUP BY    料號) AS BB ON 物料資料庫.料號 = BB.料號
105
+                           " & SQL2 & "
106
+                ORDER BY   物料資料庫.料號"
147 107
         CmdSet_For_DGV()
148 108
     End Sub
149 109
     Friend Sub SQL_盤盈盤損申請_供應商_下拉清單()

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

@@ -1,30 +1,23 @@
1 1
 Module 全域變數
2 2
     '----系統登入-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3
-    Public g_conn_type As String = "" : Public gUserName As String : Public 登入人職稱 As String : Public 登入人級別 As String : Public 登入人組別 As String : Public 登入人IP As String
4
-    Public 版本號 As String : Public Target As String : Public Target1 As String : Public Target2 As String : Public FTP帳號 As String : Public FTP密碼 As String : Public FTP物理位置 As String
5
-    Public AA(99) As String : Public BB(99) As Boolean : Public CC(99) As Boolean : Public 登入判斷 As Boolean : Public 業務號碼 As String
3
+    Public g_conn_type, gUserName, 登入人職稱, 登入人級別, 登入人組別, 登入人IP, 版本號, Target, Target1, Target2, FTP帳號, FTP密碼, FTP物理位置, 業務號碼, AA(99) As String
4
+    Public BB(99), CC(99), 登入判斷 As Boolean
6 5
     '----系統版本-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
7
-    Public 版本 As String = "2021093001"
6
+    Public 版本 As String = "2021122101"
8 7
     '----系統用全域變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
9
-    Public 列印用SQL As String = "" : Public 列印用SQL2 As String : Public 公司編號 As String : Public 公司電話 As String : Public 公司統編 As String : Public 公司地址 As String
10
-    Public 關鍵字編號 As String
8
+    Public 列印用SQL, 列印用SQL2, 公司編號, 公司電話, 公司統編, 公司地址, 關鍵字編號, 進度條後墜 As String
11 9
     '----系統閒置-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
12
-    Public 判斷重登 As Boolean : Public 內外網 As Boolean : Public 重登確認 As Boolean : Public 主頁開啟 As Boolean
13
-    Public timeExit As Integer = 0 : Public timeExit2 As Integer = 0 : Public timeNow As Integer = 0 : Public timeNow2 As Integer = 0 : Public 密碼時限 As Integer = 30
10
+    Public 判斷重登, 內外網, 重登確認, 主頁開啟 As Boolean
11
+    Public timeExit, timeExit2, timeNow, timeNow2, 分母 As Integer : Public 密碼時限 As Integer = 30
14 12
     '----全域字串變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
15
-    Public PA As String = "" : Public PA1 As String = "" : Public PA2 As String = "" : Public PA3 As String = "" : Public PA4 As String = "" : Public PA5 As String = ""
16
-    Public PA6 As String = "" : Public PA7 As String = "" : Public PA8 As String = "" : Public PA9 As String = "" : Public PA10 As String = "" : Public PA11 As String = ""
17
-    Public PA12 As String = "" : Public PA13 As String = "" : Public PA14 As String = "" : Public PA15 As String = "" : Public PA16 As String = "" : Public PA17 As String = ""
18
-    Public PA18 As String = "" : Public PA19 As String = "" : Public PA20 As String = ""
19
-    Public PA21 As String = "" : Public PA22 As String = "" : Public PA23 As String = "" : Public PA24 As String = "" : Public PA25 As String = "" : Public PA26 As String = ""
20
-    Public PA27 As String = "" : Public PA28 As String = "" : Public PA29 As String = "" : Public PA30 As String = "" : Public PA31 As String = "" : Public PA32 As String = ""
21
-    Public PA33 As String = "" : Public PA34 As String = "" : Public PA35 As String = "" : Public PA36 As String = ""
13
+    Public PA, PA1, PA2, PA3, PA4, PA5, PA6, PA7, PA8, PA9, PA10, PA11, PA12, PA13, PA14, PA15, PA16, PA17, PA18, PA19, PA20, PA21, PA22, PA23, PA24, PA25, PA26 As String
14
+    Public PA27, PA28, PA29, PA30, PA31, PA32, PA33, PA34, PA35, PA36 As String
22 15
     '----全域數字變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
23
-    Public NU1 As Double : Public NU2 As Double : Public NU3 As Double : Public NU4 As Double : Public NU5 As Double
16
+    Public NU1, NU2, NU3, NU4, NU5, 分段1, 分段2, 分段3, 分段4 As Double
24 17
     '----全域布林含數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
25
-    Public BL1 As Boolean : Public BL2 As Boolean : Public BL3 As Boolean : Public BL4 As Boolean : Public BL5 As Boolean : Public BL6 As Boolean
18
+    Public BL1, BL2, BL3, BL4, BL5, BL6 As Boolean
26 19
     '----介面開啟判斷-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
27
-    Public 客戶資料強制對話框模式 As Boolean : Public 入庫選擇1 As Boolean : Public 入庫選擇2 As Boolean
20
+    Public 客戶資料強制對話框模式, 入庫選擇1, 入庫選擇2 As Boolean
28 21
     '----進度條計算式-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
29 22
     Public 平均數 As Integer : Public 最終數 As Integer = 0 : Public 資料數 As Integer = 0
30 23
     Public Class MyModule1

+ 31
- 7
YD-ERP-SYS/YD-ERP-SYS.Designer.vb Переглянути файл

@@ -27,6 +27,8 @@ Partial Class YD_ERP_SYS
27 27
         Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(YD_ERP_SYS))
28 28
         Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29 29
         Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30 32
         Me.業績運費明細表_tsm = New System.Windows.Forms.ToolStripMenuItem()
31 33
         Me.MenuStrip = New System.Windows.Forms.MenuStrip()
32 34
         Me.FileMenu = New System.Windows.Forms.ToolStripMenuItem()
@@ -108,15 +110,17 @@ Partial Class YD_ERP_SYS
108 110
         Me.著作權_tss = New System.Windows.Forms.ToolStripStatusLabel()
109 111
         Me.執行進度_tss = New System.Windows.Forms.ToolStripStatusLabel()
110 112
         Me.ToolStripProgressBar1 = New System.Windows.Forms.ToolStripProgressBar()
113
+        Me.合計_TSSL = New System.Windows.Forms.ToolStripStatusLabel()
111 114
         Me.ToolTip = New System.Windows.Forms.ToolTip(Me.components)
112 115
         Me.使用者_cb = New System.Windows.Forms.ComboBox()
113 116
         Me.業務_cb = New System.Windows.Forms.ComboBox()
114 117
         Me.銷售單據_dgv = New System.Windows.Forms.DataGridView()
115 118
         Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
116
-        Me.合計_TSSL = New System.Windows.Forms.ToolStripStatusLabel()
119
+        Me.財務單據_dgv = New System.Windows.Forms.DataGridView()
117 120
         Me.MenuStrip.SuspendLayout()
118 121
         Me.StatusStrip.SuspendLayout()
119 122
         CType(Me.銷售單據_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
123
+        CType(Me.財務單據_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
120 124
         Me.SuspendLayout()
121 125
         '
122 126
         '業績運費明細表_tsm
@@ -708,6 +712,12 @@ Partial Class YD_ERP_SYS
708 712
         Me.ToolStripProgressBar1.Name = "ToolStripProgressBar1"
709 713
         Me.ToolStripProgressBar1.Size = New System.Drawing.Size(750, 16)
710 714
         '
715
+        '合計_TSSL
716
+        '
717
+        Me.合計_TSSL.Name = "合計_TSSL"
718
+        Me.合計_TSSL.Size = New System.Drawing.Size(47, 17)
719
+        Me.合計_TSSL.Text = "合計 : 0"
720
+        '
711 721
         '使用者_cb
712 722
         '
713 723
         Me.使用者_cb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -743,7 +753,7 @@ Partial Class YD_ERP_SYS
743 753
         DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
744 754
         Me.銷售單據_dgv.RowsDefaultCellStyle = DataGridViewCellStyle2
745 755
         Me.銷售單據_dgv.RowTemplate.Height = 24
746
-        Me.銷售單據_dgv.Size = New System.Drawing.Size(542, 465)
756
+        Me.銷售單據_dgv.Size = New System.Drawing.Size(193, 162)
747 757
         Me.銷售單據_dgv.TabIndex = 1257
748 758
         Me.銷售單據_dgv.Visible = False
749 759
         '
@@ -751,11 +761,22 @@ Partial Class YD_ERP_SYS
751 761
         '
752 762
         Me.Timer1.Interval = 1000
753 763
         '
754
-        '合計_TSSL
755
-        '
756
-        Me.合計_TSSL.Name = "合計_TSSL"
757
-        Me.合計_TSSL.Size = New System.Drawing.Size(47, 17)
758
-        Me.合計_TSSL.Text = "合計 : 0"
764
+        '財務單據_dgv
765
+        '
766
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
767
+        Me.財務單據_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
768
+        Me.財務單據_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
769
+        Me.財務單據_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
770
+        Me.財務單據_dgv.Location = New System.Drawing.Point(440, 90)
771
+        Me.財務單據_dgv.Name = "財務單據_dgv"
772
+        Me.財務單據_dgv.RowHeadersWidth = 5
773
+        DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
774
+        DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
775
+        Me.財務單據_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
776
+        Me.財務單據_dgv.RowTemplate.Height = 24
777
+        Me.財務單據_dgv.Size = New System.Drawing.Size(193, 162)
778
+        Me.財務單據_dgv.TabIndex = 1259
779
+        Me.財務單據_dgv.Visible = False
759 780
         '
760 781
         'YD_ERP_SYS
761 782
         '
@@ -764,6 +785,7 @@ Partial Class YD_ERP_SYS
764 785
         Me.BackgroundImage = Global.YD_ERP_SYS.My.Resources.Resources.底圖1
765 786
         Me.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
766 787
         Me.ClientSize = New System.Drawing.Size(1350, 729)
788
+        Me.Controls.Add(Me.財務單據_dgv)
767 789
         Me.Controls.Add(Me.銷售單據_dgv)
768 790
         Me.Controls.Add(Me.業務_cb)
769 791
         Me.Controls.Add(Me.使用者_cb)
@@ -782,6 +804,7 @@ Partial Class YD_ERP_SYS
782 804
         Me.StatusStrip.ResumeLayout(False)
783 805
         Me.StatusStrip.PerformLayout()
784 806
         CType(Me.銷售單據_dgv, System.ComponentModel.ISupportInitialize).EndInit()
807
+        CType(Me.財務單據_dgv, System.ComponentModel.ISupportInitialize).EndInit()
785 808
         Me.ResumeLayout(False)
786 809
         Me.PerformLayout()
787 810
 
@@ -873,4 +896,5 @@ Partial Class YD_ERP_SYS
873 896
     Friend WithEvents 業績單據完單設定_tsm As ToolStripMenuItem
874 897
     Friend WithEvents 業績運費明細表_tsm As ToolStripMenuItem
875 898
     Friend WithEvents 合計_TSSL As ToolStripStatusLabel
899
+    Friend WithEvents 財務單據_dgv As DataGridView
876 900
 End Class

+ 24
- 10
YD-ERP-SYS/YD-ERP-SYS.vb Переглянути файл

@@ -1,7 +1,7 @@
1 1
 Imports System.Windows.Forms
2 2
 Public Class YD_ERP_SYS
3 3
     ReadOnly ds, ds1, ds2, ds3, ds4, ds5, ds6, ds7 As New DataSet
4
-    Dim 狀態, 狀態1 As String : Dim FFGG As Integer : Dim 首次開啟 As Boolean = True
4
+    Dim 狀態, 狀態1, 狀態2 As String : Dim FFGG As Integer : Dim 首次開啟 As Boolean = True
5 5
     Private Sub ShowNewForm(ByVal sender As Object, ByVal e As EventArgs) Handles NewWindowToolStripMenuItem.Click
6 6
         ' 建立子表單的新執行個體。
7 7
         ' 將它變成這個 MDI 表單的子表單,然後才顯示。
@@ -41,11 +41,19 @@ Public Class YD_ERP_SYS
41 41
         銷售單據_dgv.AllowUserToAddRows = False
42 42
         銷售單據_dgv.RowTemplate.Height = 25
43 43
 
44
-        ConnOpen()
45
-        SQL1 = "SELECT 單號, 開單日期 FROM 銷售控制表 WHERE (LEFT(單號, 1) LIKE '" & 業務_cb.Text & "') ORDER BY 單號 DESC"
46
-        CmdSet_For_DGV()
44
+        SQL_業務單據未補()
47 45
         da.Fill(ds1) : 銷售單據_dgv.DataSource = ds1.Tables(0) : conn.Close()
48 46
     End Sub
47
+    Private Sub Set_清單2()
48
+        財務單據_dgv.DataSource = Nothing : ds1.Clear()
49
+        財務單據_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
50
+        財務單據_dgv.ColumnHeadersHeight = 25
51
+        財務單據_dgv.AllowUserToAddRows = False
52
+        財務單據_dgv.RowTemplate.Height = 25
53
+
54
+        SQL_財務單據未核()
55
+        da.Fill(ds1) : 財務單據_dgv.DataSource = ds1.Tables(0) : conn.Close()
56
+    End Sub
49 57
     Private Sub YD_ERP_SYS_Load(sender As Object, e As EventArgs) Handles MyBase.Load
50 58
         '----------系統登入時抬頭資訊顯示---------------------------------------------------------------------------------------------------------------
51 59
         Me.Text = "YD ERP SYS" & "  --  " & g_conn_type & "  --  " & gUserName & "  --  系統版本  :  " & 版本
@@ -81,19 +89,25 @@ Public Class YD_ERP_SYS
81 89
         Timer1.Enabled = True
82 90
     End Sub
83 91
     Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick
84
-        狀態 = "銷售單據入系統狀態" : Dim 單數 As Integer
92
+        狀態 = "銷售單據入系統狀態" : Dim 單數 As Integer : Set_清單2()
85 93
         For i As Integer = 0 To 業務_cb.Items.Count - 1
86 94
             業務_cb.SelectedIndex = i
87 95
             Set_清單1()
88 96
             If 銷售單據_dgv.Rows.Count > 0 Then
89 97
                 單數 = (Strings.Mid(銷售單據_dgv.Rows(0).Cells("單號").Value, 2, 6) - Strings.Mid(銷售單據_dgv.Rows(銷售單據_dgv.Rows.Count - 1).Cells("單號").Value, 2, 6)) - 銷售單據_dgv.Rows.Count
90
-                狀態1 = 業務_cb.Text & " 號業務單最後入單單號 [ " & 銷售單據_dgv.Rows(0).Cells("單號").Value & " ],開單日期是 [ " & 銷售單據_dgv.Rows(0).Cells("開單日期").Value & " ]。 
91
-   由單號 [" & 銷售單據_dgv.Rows(銷售單據_dgv.Rows.Count - 1).Cells("單號").Value & "]  到系統中最後一單,約有 " & 單數 & " 張單據未補齊。" & vbCrLf &
92
-   "-------------------------------------------------------------------"
93
-                狀態 = 狀態 & vbCrLf &
94
-                           狀態1
98
+                Dim 天數 As Integer = DateDiff(DateInterval.Day, 銷售單據_dgv.Rows(0).Cells("開單日期").Value, Today())
99
+                If 單數 > 100 Or 天數 > 7 Then
100
+                    狀態1 = 業務_cb.Text & " 號業務單最後入單單號 [ " & 銷售單據_dgv.Rows(0).Cells("單號").Value & " ],開單日期是 [ " & 銷售單據_dgv.Rows(0).Cells("開單日期").Value & " ]。 
101
+由單號 [" & 銷售單據_dgv.Rows(銷售單據_dgv.Rows.Count - 1).Cells("單號").Value & "]  到系統中最後一單,約有 " & 單數 & " 張單據未補齊。" & vbCrLf &
102
+"-------------------------------------------------------------------"
103
+                    狀態 = 狀態 & vbCrLf &
104
+                               狀態1
105
+                End If
95 106
             End If
96 107
         Next
108
+        狀態2 = "財務單據簽核狀態"
109
+        狀態 = 狀態 & vbCrLf & vbCrLf & 狀態2 & vbCrLf & "財務單據還有 [" & 財務單據_dgv.Rows.Count & "] 張未簽核!!"
110
+
97 111
         If 首次開啟 = True Then
98 112
             首次開啟 = False
99 113
             Dim aa1 As MsgBoxResult = MsgBox(狀態, MsgBoxStyle.OkCancel)

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

@@ -125,6 +125,7 @@
125 125
   </ItemGroup>
126 126
   <ItemGroup>
127 127
     <Compile Include="ApplicationEvents.vb" />
128
+    <Compile Include="Module\DGV進度條.vb" />
128 129
     <Compile Include="Module\SQL_人事系統管理.vb" />
129 130
     <Compile Include="Module\SQL_倉儲系統管理.vb" />
130 131
     <Compile Include="Module\SQL_採購系統管理.vb" />

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
-53c57df21c94a96acbf03635a64eb5ec9304008f
1
+dc937bf29d1a895513a99985f75be88c433744c0

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


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


+ 6
- 0
YD-ERP-SYS/倉儲系統管理/倉儲入庫.vb Переглянути файл

@@ -93,6 +93,12 @@ Public Class 倉儲入庫
93 93
 
94 94
         採購清單_dgv.EditMode = DataGridViewEditMode.EditOnEnter
95 95
         資料筆數_tb.Text = 採購清單_dgv.Rows.Count
96
+
97
+        For I As Integer = 0 To 採購清單_dgv.Rows.Count - 1
98
+            If Val(採購清單_dgv.Rows(I).Cells("數量").Value) < 0 Then
99
+                採購清單_dgv.Rows(I).Cells("數量").Value = Val(採購清單_dgv.Rows(I).Cells("數量").Value) * -1
100
+            End If
101
+        Next
96 102
     End Sub
97 103
     Private Sub 倉儲入庫_Load(sender As Object, e As EventArgs) Handles MyBase.Load
98 104
         Me.MdiParent = YD_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True

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

@@ -589,10 +589,10 @@ Partial Class 盤盈盤損審核
589 589
         Me.物料圖_pb.BackgroundImage = Global.YD_ERP_SYS.My.Resources.Resources.底圖1
590 590
         Me.物料圖_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
591 591
         Me.物料圖_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
592
-        Me.物料圖_pb.Location = New System.Drawing.Point(6, 318)
592
+        Me.物料圖_pb.Location = New System.Drawing.Point(6, 430)
593 593
         Me.物料圖_pb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
594 594
         Me.物料圖_pb.Name = "物料圖_pb"
595
-        Me.物料圖_pb.Size = New System.Drawing.Size(322, 359)
595
+        Me.物料圖_pb.Size = New System.Drawing.Size(322, 247)
596 596
         Me.物料圖_pb.TabIndex = 1215
597 597
         Me.物料圖_pb.TabStop = False
598 598
         '
@@ -724,14 +724,14 @@ Partial Class 盤盈盤損審核
724 724
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
725 725
         Me.物料清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
726 726
         Me.物料清單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
727
-        Me.物料清單_dgv.Location = New System.Drawing.Point(6, 81)
727
+        Me.物料清單_dgv.Location = New System.Drawing.Point(6, 79)
728 728
         Me.物料清單_dgv.Name = "物料清單_dgv"
729 729
         Me.物料清單_dgv.RowHeadersWidth = 5
730 730
         DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
731 731
         DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
732 732
         Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
733 733
         Me.物料清單_dgv.RowTemplate.Height = 24
734
-        Me.物料清單_dgv.Size = New System.Drawing.Size(518, 235)
734
+        Me.物料清單_dgv.Size = New System.Drawing.Size(518, 348)
735 735
         Me.物料清單_dgv.TabIndex = 1198
736 736
         '
737 737
         '單據作廢_bt
@@ -843,7 +843,7 @@ Partial Class 盤盈盤損審核
843 843
         Me.區域庫存_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
844 844
         Me.區域庫存_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
845 845
         Me.區域庫存_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
846
-        Me.區域庫存_dgv.Location = New System.Drawing.Point(333, 318)
846
+        Me.區域庫存_dgv.Location = New System.Drawing.Point(258, 157)
847 847
         Me.區域庫存_dgv.Name = "區域庫存_dgv"
848 848
         Me.區域庫存_dgv.RowHeadersWidth = 5
849 849
         DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
@@ -852,6 +852,7 @@ Partial Class 盤盈盤損審核
852 852
         Me.區域庫存_dgv.RowTemplate.Height = 24
853 853
         Me.區域庫存_dgv.Size = New System.Drawing.Size(191, 110)
854 854
         Me.區域庫存_dgv.TabIndex = 1264
855
+        Me.區域庫存_dgv.Visible = False
855 856
         '
856 857
         '字體大小調整_lb
857 858
         '

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

@@ -7,56 +7,28 @@ Public Class 盤盈盤損審核
7 7
         物料清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
8 8
         物料清單_dgv.ColumnHeadersHeight = 40
9 9
         物料清單_dgv.AllowUserToAddRows = False
10
-        物料清單_dgv.RowTemplate.Height = 35
11
-        調庫單據_dgv.RowTemplate.Height = 35
12
-        調庫明細_dgv.RowTemplate.Height = 35
13
-        區域庫存_dgv.RowTemplate.Height = 35
10
+        物料清單_dgv.RowTemplate.Height = 25
14 11
 
15 12
         PA1 = "" : PA2 = "" : PA2 = 供應商編碼_cb.Text : PA1 = 查詢_tb.Text
16 13
         SQL_盤盈盤損申請_物料清單()
17 14
         da.Fill(ds) : 物料清單_dgv.DataSource = ds.Tables(0) : conn.Close()
18 15
 
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).Visible = False : 物料清單_dgv.Columns(8).Visible = False : 物料清單_dgv.Columns(9).Visible = False : 物料清單_dgv.Columns(10).Visible = False
22
-        物料清單_dgv.Columns(11).Visible = False : 物料清單_dgv.Columns(12).Visible = False : 物料清單_dgv.Columns(13).Visible = False
16
+        物料清單_dgv.Columns(0).FillWeight = 90 : 物料清單_dgv.Columns(1).FillWeight = 100 : 物料清單_dgv.Columns(2).FillWeight = 250
17
+        物料清單_dgv.Columns(3).FillWeight = 60 : 物料清單_dgv.Columns(4).Visible = False
18
+        物料清單_dgv.Columns(5).FillWeight = 40 : 物料清單_dgv.Columns(6).Visible = False
23 19
 
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
20
+        物料清單_dgv.Columns(0).ReadOnly = True : 物料清單_dgv.Columns(1).ReadOnly = True : 物料清單_dgv.Columns(2).ReadOnly = True
21
+        物料清單_dgv.Columns(3).ReadOnly = True : 物料清單_dgv.Columns(4).ReadOnly = True : 物料清單_dgv.Columns(5).ReadOnly = True
27 22
 
28
-        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0" : 物料清單_dgv.Columns("未入庫").DefaultCellStyle.Format = "#,##0"
29
-        物料清單_dgv.Columns("未出庫").DefaultCellStyle.Format = "#,##0"
23
+        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0"
30 24
         物料清單_dgv.Columns("庫存").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
31 25
         物料清單_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 26
 
37 27
         資料筆數_tb.Text = 物料清單_dgv.Rows.Count
38 28
         For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
39 29
             資料數 = 物料清單_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 30
             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 31
             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 32
         Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
61 33
     End Sub
62 34
     Private Sub Set_清單2()
@@ -240,12 +212,8 @@ Public Class 盤盈盤損審核
240 212
                     End If
241 213
                 End If : conn.Close()
242 214
 
243
-                指定倉庫_cb_下拉表單資料載入() : 指定倉庫_cb.Text = 物料清單_dgv("倉名", e.RowIndex).Value.ToString : Set_清單3()
244
-                If 物料清單_dgv("狀態", e.RowIndex).Value.ToString = "" Then
245
-                    訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
246
-                Else
247
-                    倉儲狀態_cb.Text = 物料清單_dgv("狀態", e.RowIndex).Value.ToString : 訂製狀態_cb.Text = 物料清單_dgv("訂製", e.RowIndex).Value.ToString
248
-                End If
215
+                指定倉庫_cb_下拉表單資料載入()
216
+                訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
249 217
             End If
250 218
         End If
251 219
     End Sub
@@ -258,15 +226,6 @@ Public Class 盤盈盤損審核
258 226
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
259 227
             End If
260 228
         End If
261
-        For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
262
-            If Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) = 0 Then
263
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
264
-            ElseIf Val(物料清單_dgv("庫存", i).Value) = 0 And (Val(物料清單_dgv("未入庫", i).Value) <> 0 Or Val(物料清單_dgv("未出庫", i).Value) <> 0) Then
265
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
266
-            ElseIf Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) <> 0 Then
267
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
268
-            End If
269
-        Next
270 229
     End Sub
271 230
     Private Sub 地區_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 地區_cb.SelectedIndexChanged
272 231
         If 地區_cb.Text = "" And 查詢_tb.Text = "" Then

+ 5
- 4
YD-ERP-SYS/倉儲系統管理/盤盈盤損申請.Designer.vb Переглянути файл

@@ -131,7 +131,7 @@ Partial Class 盤盈盤損申請
131 131
         DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
132 132
         Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle2
133 133
         Me.物料清單_dgv.RowTemplate.Height = 24
134
-        Me.物料清單_dgv.Size = New System.Drawing.Size(518, 235)
134
+        Me.物料清單_dgv.Size = New System.Drawing.Size(518, 348)
135 135
         Me.物料清單_dgv.TabIndex = 1028
136 136
         '
137 137
         '品名_tb
@@ -792,10 +792,10 @@ Partial Class 盤盈盤損申請
792 792
         Me.物料圖_pb.BackgroundImage = Global.YD_ERP_SYS.My.Resources.Resources.底圖1
793 793
         Me.物料圖_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
794 794
         Me.物料圖_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
795
-        Me.物料圖_pb.Location = New System.Drawing.Point(4, 318)
795
+        Me.物料圖_pb.Location = New System.Drawing.Point(4, 430)
796 796
         Me.物料圖_pb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
797 797
         Me.物料圖_pb.Name = "物料圖_pb"
798
-        Me.物料圖_pb.Size = New System.Drawing.Size(322, 358)
798
+        Me.物料圖_pb.Size = New System.Drawing.Size(322, 246)
799 799
         Me.物料圖_pb.TabIndex = 1150
800 800
         Me.物料圖_pb.TabStop = False
801 801
         '
@@ -817,7 +817,7 @@ Partial Class 盤盈盤損申請
817 817
         Me.區域庫存_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
818 818
         Me.區域庫存_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
819 819
         Me.區域庫存_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
820
-        Me.區域庫存_dgv.Location = New System.Drawing.Point(331, 318)
820
+        Me.區域庫存_dgv.Location = New System.Drawing.Point(244, 157)
821 821
         Me.區域庫存_dgv.Name = "區域庫存_dgv"
822 822
         Me.區域庫存_dgv.RowHeadersWidth = 5
823 823
         DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
@@ -826,6 +826,7 @@ Partial Class 盤盈盤損申請
826 826
         Me.區域庫存_dgv.RowTemplate.Height = 24
827 827
         Me.區域庫存_dgv.Size = New System.Drawing.Size(191, 110)
828 828
         Me.區域庫存_dgv.TabIndex = 1200
829
+        Me.區域庫存_dgv.Visible = False
829 830
         '
830 831
         '字體大小調整_lb
831 832
         '

+ 10
- 53
YD-ERP-SYS/倉儲系統管理/盤盈盤損申請.vb Переглянути файл

@@ -7,56 +7,28 @@ Public Class 盤盈盤損申請
7 7
         物料清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
8 8
         物料清單_dgv.ColumnHeadersHeight = 40
9 9
         物料清單_dgv.AllowUserToAddRows = False
10
-        物料清單_dgv.RowTemplate.Height = 35
11
-        調庫單據_dgv.RowTemplate.Height = 30
12
-        調庫明細_dgv.RowTemplate.Height = 30
13
-        區域庫存_dgv.RowTemplate.Height = 30
10
+        物料清單_dgv.RowTemplate.Height = 25
14 11
 
15 12
         PA1 = "" : PA2 = "" : PA2 = 供應商編碼_cb.Text : PA1 = 查詢_tb.Text
16 13
         SQL_盤盈盤損申請_物料清單()
17 14
         da.Fill(ds) : 物料清單_dgv.DataSource = ds.Tables(0) : conn.Close()
18 15
 
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).Visible = False : 物料清單_dgv.Columns(8).Visible = False : 物料清單_dgv.Columns(9).Visible = False : 物料清單_dgv.Columns(10).Visible = False
22
-        物料清單_dgv.Columns(11).Visible = False : 物料清單_dgv.Columns(12).Visible = False : 物料清單_dgv.Columns(13).Visible = False
16
+        物料清單_dgv.Columns(0).FillWeight = 90 : 物料清單_dgv.Columns(1).FillWeight = 100 : 物料清單_dgv.Columns(2).FillWeight = 250
17
+        物料清單_dgv.Columns(3).FillWeight = 60 : 物料清單_dgv.Columns(4).Visible = False
18
+        物料清單_dgv.Columns(5).FillWeight = 40 : 物料清單_dgv.Columns(6).Visible = False
23 19
 
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
20
+        物料清單_dgv.Columns(0).ReadOnly = True : 物料清單_dgv.Columns(1).ReadOnly = True : 物料清單_dgv.Columns(2).ReadOnly = True
21
+        物料清單_dgv.Columns(3).ReadOnly = True : 物料清單_dgv.Columns(4).ReadOnly = True : 物料清單_dgv.Columns(5).ReadOnly = True
27 22
 
28
-        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0" : 物料清單_dgv.Columns("未入庫").DefaultCellStyle.Format = "#,##0"
29
-        物料清單_dgv.Columns("未出庫").DefaultCellStyle.Format = "#,##0"
23
+        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0"
30 24
         物料清單_dgv.Columns("庫存").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
31 25
         物料清單_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 26
 
37 27
         資料筆數_tb.Text = 物料清單_dgv.Rows.Count
38 28
         For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
39 29
             資料數 = 物料清單_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 30
             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 31
             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 32
         Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
61 33
     End Sub
62 34
     Private Sub Set_清單2()
@@ -222,9 +194,7 @@ Public Class 盤盈盤損申請
222 194
                 品名_tb.Text = 物料清單_dgv("品名", e.RowIndex).Value.ToString : 最大庫存量_tb.Text = 物料清單_dgv("最低庫存量", e.RowIndex).Value.ToString
223 195
                 庫存量_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString)
224 196
                 可申請_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString) - Val(物料清單_dgv("未出庫", e.RowIndex).Value.ToString)
225
-                If 盤損數_nud.Value > Val(可申請_tb.Text) Then
226
-                    盤損數_nud.Value = 0
227
-                End If
197
+
228 198
                 物料圖_pb.Image = Nothing : PA1 = 料號_tb.Text : SQL_物料檔案_是否有圖()
229 199
                 If dr.Read() Then
230 200
                     If dr("是否有圖") = True Then
@@ -244,12 +214,8 @@ Public Class 盤盈盤損申請
244 214
                     End If
245 215
                 End If : conn.Close()
246 216
 
247
-                指定倉庫_cb_下拉表單資料載入() : 指定倉庫_cb.Text = 物料清單_dgv("倉名", e.RowIndex).Value.ToString : Set_清單3()
248
-                If 物料清單_dgv("狀態", e.RowIndex).Value.ToString = "" Then
249
-                    訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
250
-                Else
251
-                    倉儲狀態_cb.Text = 物料清單_dgv("狀態", e.RowIndex).Value.ToString : 訂製狀態_cb.Text = 物料清單_dgv("訂製", e.RowIndex).Value.ToString
252
-                End If
217
+                指定倉庫_cb_下拉表單資料載入()
218
+                訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
253 219
             End If
254 220
         End If
255 221
     End Sub
@@ -262,15 +228,6 @@ Public Class 盤盈盤損申請
262 228
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
263 229
             End If
264 230
         End If
265
-        For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
266
-            If Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) = 0 Then
267
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
268
-            ElseIf Val(物料清單_dgv("庫存", i).Value) = 0 And (Val(物料清單_dgv("未入庫", i).Value) <> 0 Or Val(物料清單_dgv("未出庫", i).Value) <> 0) Then
269
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
270
-            ElseIf Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) <> 0 Then
271
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
272
-            End If
273
-        Next
274 231
     End Sub
275 232
     Private Sub 地區_cb_SelectedIndexChanged(sender As Object, e As EventArgs) Handles 地區_cb.SelectedIndexChanged
276 233
         If 地區_cb.Text = "" And 查詢_tb.Text = "" Then

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

@@ -170,7 +170,7 @@ Partial Class 一般申請_採購單
170 170
         Me.區域庫存_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
171 171
         Me.區域庫存_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
172 172
         Me.區域庫存_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
173
-        Me.區域庫存_dgv.Location = New System.Drawing.Point(334, 319)
173
+        Me.區域庫存_dgv.Location = New System.Drawing.Point(44, 241)
174 174
         Me.區域庫存_dgv.Name = "區域庫存_dgv"
175 175
         Me.區域庫存_dgv.RowHeadersWidth = 5
176 176
         DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
@@ -179,6 +179,7 @@ Partial Class 一般申請_採購單
179 179
         Me.區域庫存_dgv.RowTemplate.Height = 24
180 180
         Me.區域庫存_dgv.Size = New System.Drawing.Size(191, 108)
181 181
         Me.區域庫存_dgv.TabIndex = 1265
182
+        Me.區域庫存_dgv.Visible = False
182 183
         '
183 184
         '採購單價_nud
184 185
         '
@@ -671,7 +672,7 @@ Partial Class 一般申請_採購單
671 672
         DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
672 673
         Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle5
673 674
         Me.物料清單_dgv.RowTemplate.Height = 24
674
-        Me.物料清單_dgv.Size = New System.Drawing.Size(518, 235)
675
+        Me.物料清單_dgv.Size = New System.Drawing.Size(518, 346)
675 676
         Me.物料清單_dgv.TabIndex = 1201
676 677
         '
677 678
         '需要全部庫存區域清單_ch
@@ -704,10 +705,10 @@ Partial Class 一般申請_採購單
704 705
         Me.物料圖_pb.BackgroundImage = Global.YD_ERP_SYS.My.Resources.Resources.底圖1
705 706
         Me.物料圖_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
706 707
         Me.物料圖_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
707
-        Me.物料圖_pb.Location = New System.Drawing.Point(7, 319)
708
+        Me.物料圖_pb.Location = New System.Drawing.Point(7, 429)
708 709
         Me.物料圖_pb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
709 710
         Me.物料圖_pb.Name = "物料圖_pb"
710
-        Me.物料圖_pb.Size = New System.Drawing.Size(322, 358)
711
+        Me.物料圖_pb.Size = New System.Drawing.Size(322, 248)
711 712
         Me.物料圖_pb.TabIndex = 1218
712 713
         Me.物料圖_pb.TabStop = False
713 714
         '

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

@@ -7,53 +7,28 @@ Public Class 一般申請_採購單
7 7
         物料清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
8 8
         物料清單_dgv.ColumnHeadersHeight = 40
9 9
         物料清單_dgv.AllowUserToAddRows = False
10
-        物料清單_dgv.RowTemplate.Height = 35
10
+        物料清單_dgv.RowTemplate.Height = 25
11 11
 
12 12
         PA1 = "" : PA2 = "" : PA2 = 供應商編碼_cb.Text : PA1 = 查詢_tb.Text
13 13
         SQL_盤盈盤損申請_物料清單()
14 14
         da.Fill(ds) : 物料清單_dgv.DataSource = ds.Tables(0) : conn.Close()
15 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).Visible = False : 物料清單_dgv.Columns(8).Visible = False : 物料清單_dgv.Columns(9).Visible = False : 物料清單_dgv.Columns(10).Visible = False
19
-        物料清單_dgv.Columns(11).Visible = False : 物料清單_dgv.Columns(12).Visible = False : 物料清單_dgv.Columns(13).Visible = False
16
+        物料清單_dgv.Columns(0).FillWeight = 90 : 物料清單_dgv.Columns(1).FillWeight = 100 : 物料清單_dgv.Columns(2).FillWeight = 250
17
+        物料清單_dgv.Columns(3).FillWeight = 60 : 物料清單_dgv.Columns(4).Visible = False
18
+        物料清單_dgv.Columns(5).FillWeight = 40 : 物料清單_dgv.Columns(6).Visible = False
20 19
 
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
20
+        物料清單_dgv.Columns(0).ReadOnly = True : 物料清單_dgv.Columns(1).ReadOnly = True : 物料清單_dgv.Columns(2).ReadOnly = True
21
+        物料清單_dgv.Columns(3).ReadOnly = True : 物料清單_dgv.Columns(4).ReadOnly = True : 物料清單_dgv.Columns(5).ReadOnly = True
24 22
 
25
-        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0" : 物料清單_dgv.Columns("未入庫").DefaultCellStyle.Format = "#,##0"
26
-        物料清單_dgv.Columns("未出庫").DefaultCellStyle.Format = "#,##0"
23
+        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0"
27 24
         物料清單_dgv.Columns("庫存").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
28 25
         物料清單_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 26
 
34 27
         資料筆數_tb.Text = 物料清單_dgv.Rows.Count
35 28
         For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
36 29
             資料數 = 物料清單_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 30
             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 31
             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 32
         Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
58 33
     End Sub
59 34
     Private Sub Set_清單1()
@@ -385,7 +360,7 @@ Public Class 一般申請_採購單
385 360
     Private Sub 物料清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 物料清單_dgv.CellClick
386 361
         If 首次開啟 = True Then
387 362
             If e.RowIndex = -1 Then : Else
388
-                料號_tb.Text = 物料清單_dgv("料號", e.RowIndex).Value.ToString : 供應商編碼_tb.Text = Strings.Left(物料清單_dgv("料號", e.RowIndex).Value.ToString, 4)
363
+                料號_tb.Text = 物料清單_dgv("料號", e.RowIndex).Value.ToString : 供應商編碼_tb.Text = 物料清單_dgv("供應商", e.RowIndex).Value.ToString
389 364
                 品名_tb.Text = 物料清單_dgv("品名", e.RowIndex).Value.ToString : 最大庫存量_tb.Text = 物料清單_dgv("最低庫存量", e.RowIndex).Value.ToString
390 365
                 庫存量_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString)
391 366
                 可申請_tb.Text = Val(物料清單_dgv("庫存", e.RowIndex).Value.ToString) - Val(物料清單_dgv("未出庫", e.RowIndex).Value.ToString)
@@ -409,28 +384,8 @@ Public Class 一般申請_採購單
409 384
                     End If
410 385
                 End If : conn.Close()
411 386
 
412
-                指定倉庫_cb_下拉表單資料載入() : 指定倉庫_cb.Text = 物料清單_dgv("倉名", e.RowIndex).Value.ToString : Set_清單3()
413
-                If 物料清單_dgv("狀態", e.RowIndex).Value.ToString = "" Then
414
-                    訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
415
-                Else
416
-                    倉儲狀態_cb.Text = 物料清單_dgv("狀態", e.RowIndex).Value.ToString : 訂製狀態_cb.Text = 物料清單_dgv("訂製", e.RowIndex).Value.ToString
417
-                End If
418
-
419
-                採購單價_nud.Value = 0
420
-                If 物料清單_dgv("狀態", e.RowIndex).Value.ToString = "" Then
421
-                    訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
422
-                Else
423
-                    倉儲狀態_cb.Text = 物料清單_dgv("狀態", e.RowIndex).Value.ToString : 訂製狀態_cb.Text = 物料清單_dgv("訂製", e.RowIndex).Value.ToString
424
-                    If 訂製編碼_cb.Text = "MA0001" Then
425
-                        PA12 = 料號_tb.Text
426
-                        SQL_銷售明細表_成本讀取()
427
-                        If dr.Read() Then : 採購單價_nud.Value = dr("成本")
428
-                        Else : 採購單價_nud.Value = 0
429
-                        End If : conn.Close()
430
-                    Else
431
-                        採購單價_nud.Value = 0
432
-                    End If
433
-                End If
387
+                指定倉庫_cb_下拉表單資料載入()
388
+                訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
434 389
             End If
435 390
         End If
436 391
     End Sub
@@ -443,16 +398,8 @@ Public Class 一般申請_採購單
443 398
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
444 399
             End If
445 400
         End If
446
-        For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
447
-            If Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) = 0 Then
448
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
449
-            ElseIf Val(物料清單_dgv("庫存", i).Value) = 0 And (Val(物料清單_dgv("未入庫", i).Value) <> 0 Or Val(物料清單_dgv("未出庫", i).Value) <> 0) Then
450
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
451
-            ElseIf Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) <> 0 Then
452
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
453
-            End If
454
-        Next
455 401
     End Sub
402
+
456 403
     Private Sub 檔案名稱_tb_DragEnter(sender As Object, e As DragEventArgs) Handles 檔案名稱_tb.DragEnter
457 404
         If e.Data.GetDataPresent(DataFormats.FileDrop) Then
458 405
             Dim files As String()

+ 35
- 34
YD-ERP-SYS/業務系統管理/銷售單審核.Designer.vb Переглянути файл

@@ -107,6 +107,7 @@ Partial Class 銷售單審核
107 107
         Me.單據核准_bt = New System.Windows.Forms.Button()
108 108
         Me.單據作廢_bt = New System.Windows.Forms.Button()
109 109
         Me.Panel1 = New System.Windows.Forms.Panel()
110
+        Me.刷卡可刪除_ch = New System.Windows.Forms.CheckBox()
110 111
         Me.Reset1_bt = New System.Windows.Forms.Button()
111 112
         Me.刪除衍生運費_bt = New System.Windows.Forms.Button()
112 113
         Me.新增衍生運費_bt = New System.Windows.Forms.Button()
@@ -201,7 +202,6 @@ Partial Class 銷售單審核
201 202
         Me.運費資料流水號_tb = New System.Windows.Forms.TextBox()
202 203
         Me.Panel3 = New System.Windows.Forms.Panel()
203 204
         Me.顯示_bt = New System.Windows.Forms.Button()
204
-        Me.刷卡可刪除_ch = New System.Windows.Forms.CheckBox()
205 205
         CType(Me.售價_nud, System.ComponentModel.ISupportInitialize).BeginInit()
206 206
         CType(Me.區域庫存_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
207 207
         CType(Me.成本_nud, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -271,7 +271,7 @@ Partial Class 銷售單審核
271 271
         Me.區域庫存_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
272 272
         Me.區域庫存_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
273 273
         Me.區域庫存_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
274
-        Me.區域庫存_dgv.Location = New System.Drawing.Point(326, 317)
274
+        Me.區域庫存_dgv.Location = New System.Drawing.Point(219, 160)
275 275
         Me.區域庫存_dgv.Name = "區域庫存_dgv"
276 276
         Me.區域庫存_dgv.RowHeadersWidth = 5
277 277
         DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
@@ -280,6 +280,7 @@ Partial Class 銷售單審核
280 280
         Me.區域庫存_dgv.RowTemplate.Height = 24
281 281
         Me.區域庫存_dgv.Size = New System.Drawing.Size(191, 90)
282 282
         Me.區域庫存_dgv.TabIndex = 1323
283
+        Me.區域庫存_dgv.Visible = False
283 284
         '
284 285
         '成本_nud
285 286
         '
@@ -632,14 +633,14 @@ Partial Class 銷售單審核
632 633
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
633 634
         Me.物料清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
634 635
         Me.物料清單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
635
-        Me.物料清單_dgv.Location = New System.Drawing.Point(2, 79)
636
+        Me.物料清單_dgv.Location = New System.Drawing.Point(2, 77)
636 637
         Me.物料清單_dgv.Name = "物料清單_dgv"
637 638
         Me.物料清單_dgv.RowHeadersWidth = 5
638 639
         DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
639 640
         DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
640 641
         Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
641 642
         Me.物料清單_dgv.RowTemplate.Height = 24
642
-        Me.物料清單_dgv.Size = New System.Drawing.Size(515, 235)
643
+        Me.物料清單_dgv.Size = New System.Drawing.Size(515, 330)
643 644
         Me.物料清單_dgv.TabIndex = 1283
644 645
         '
645 646
         '需要全部庫存區域清單_ch
@@ -1001,6 +1002,19 @@ Partial Class 銷售單審核
1001 1002
         Me.Panel1.Size = New System.Drawing.Size(922, 495)
1002 1003
         Me.Panel1.TabIndex = 1331
1003 1004
         '
1005
+        '刷卡可刪除_ch
1006
+        '
1007
+        Me.刷卡可刪除_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1008
+        Me.刷卡可刪除_ch.AutoSize = True
1009
+        Me.刷卡可刪除_ch.Location = New System.Drawing.Point(531, 652)
1010
+        Me.刷卡可刪除_ch.Name = "刷卡可刪除_ch"
1011
+        Me.刷卡可刪除_ch.Size = New System.Drawing.Size(87, 20)
1012
+        Me.刷卡可刪除_ch.TabIndex = 1368
1013
+        Me.刷卡可刪除_ch.Text = "刷卡可刪除"
1014
+        Me.刷卡可刪除_ch.TextAlign = System.Drawing.ContentAlignment.BottomRight
1015
+        Me.刷卡可刪除_ch.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
1016
+        Me.刷卡可刪除_ch.UseVisualStyleBackColor = True
1017
+        '
1004 1018
         'Reset1_bt
1005 1019
         '
1006 1020
         Me.Reset1_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -1583,7 +1597,7 @@ Partial Class 銷售單審核
1583 1597
         Me.客戶資料_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1584 1598
         Me.客戶資料_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1585 1599
         Me.客戶資料_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1586
-        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 11396)
1600
+        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 11681)
1587 1601
         Me.客戶資料_dgv.Name = "客戶資料_dgv"
1588 1602
         Me.客戶資料_dgv.RowHeadersWidth = 5
1589 1603
         DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
@@ -1797,7 +1811,7 @@ Partial Class 銷售單審核
1797 1811
         '
1798 1812
         Me.銷售收款流水號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1799 1813
         Me.銷售收款流水號_tb.Enabled = False
1800
-        Me.銷售收款流水號_tb.Location = New System.Drawing.Point(43, 472)
1814
+        Me.銷售收款流水號_tb.Location = New System.Drawing.Point(43, 545)
1801 1815
         Me.銷售收款流水號_tb.Name = "銷售收款流水號_tb"
1802 1816
         Me.銷售收款流水號_tb.Size = New System.Drawing.Size(165, 23)
1803 1817
         Me.銷售收款流水號_tb.TabIndex = 1288
@@ -1807,7 +1821,7 @@ Partial Class 銷售單審核
1807 1821
         '
1808 1822
         Me.Label37.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1809 1823
         Me.Label37.AutoSize = True
1810
-        Me.Label37.Location = New System.Drawing.Point(46, 456)
1824
+        Me.Label37.Location = New System.Drawing.Point(46, 529)
1811 1825
         Me.Label37.Name = "Label37"
1812 1826
         Me.Label37.Size = New System.Drawing.Size(92, 16)
1813 1827
         Me.Label37.TabIndex = 1289
@@ -1818,7 +1832,7 @@ Partial Class 銷售單審核
1818 1832
         '
1819 1833
         Me.銷售備註流水號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1820 1834
         Me.銷售備註流水號_tb.Enabled = False
1821
-        Me.銷售備註流水號_tb.Location = New System.Drawing.Point(43, 433)
1835
+        Me.銷售備註流水號_tb.Location = New System.Drawing.Point(43, 506)
1822 1836
         Me.銷售備註流水號_tb.Name = "銷售備註流水號_tb"
1823 1837
         Me.銷售備註流水號_tb.Size = New System.Drawing.Size(165, 23)
1824 1838
         Me.銷售備註流水號_tb.TabIndex = 1266
@@ -1828,7 +1842,7 @@ Partial Class 銷售單審核
1828 1842
         '
1829 1843
         Me.倉儲資料流水號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1830 1844
         Me.倉儲資料流水號_tb.Enabled = False
1831
-        Me.倉儲資料流水號_tb.Location = New System.Drawing.Point(43, 394)
1845
+        Me.倉儲資料流水號_tb.Location = New System.Drawing.Point(43, 467)
1832 1846
         Me.倉儲資料流水號_tb.Name = "倉儲資料流水號_tb"
1833 1847
         Me.倉儲資料流水號_tb.Size = New System.Drawing.Size(165, 23)
1834 1848
         Me.倉儲資料流水號_tb.TabIndex = 1259
@@ -1837,7 +1851,7 @@ Partial Class 銷售單審核
1837 1851
         'Label24
1838 1852
         '
1839 1853
         Me.Label24.AutoSize = True
1840
-        Me.Label24.Location = New System.Drawing.Point(46, 378)
1854
+        Me.Label24.Location = New System.Drawing.Point(46, 451)
1841 1855
         Me.Label24.Name = "Label24"
1842 1856
         Me.Label24.Size = New System.Drawing.Size(92, 16)
1843 1857
         Me.Label24.TabIndex = 1260
@@ -1847,7 +1861,7 @@ Partial Class 銷售單審核
1847 1861
         '銷售資料流水號_tb
1848 1862
         '
1849 1863
         Me.銷售資料流水號_tb.Enabled = False
1850
-        Me.銷售資料流水號_tb.Location = New System.Drawing.Point(43, 355)
1864
+        Me.銷售資料流水號_tb.Location = New System.Drawing.Point(43, 428)
1851 1865
         Me.銷售資料流水號_tb.Name = "銷售資料流水號_tb"
1852 1866
         Me.銷售資料流水號_tb.Size = New System.Drawing.Size(165, 23)
1853 1867
         Me.銷售資料流水號_tb.TabIndex = 1257
@@ -1857,7 +1871,7 @@ Partial Class 銷售單審核
1857 1871
         '
1858 1872
         Me.Label27.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1859 1873
         Me.Label27.AutoSize = True
1860
-        Me.Label27.Location = New System.Drawing.Point(46, 418)
1874
+        Me.Label27.Location = New System.Drawing.Point(46, 491)
1861 1875
         Me.Label27.Name = "Label27"
1862 1876
         Me.Label27.Size = New System.Drawing.Size(92, 16)
1863 1877
         Me.Label27.TabIndex = 1267
@@ -1867,7 +1881,7 @@ Partial Class 銷售單審核
1867 1881
         'Label23
1868 1882
         '
1869 1883
         Me.Label23.AutoSize = True
1870
-        Me.Label23.Location = New System.Drawing.Point(46, 340)
1884
+        Me.Label23.Location = New System.Drawing.Point(46, 413)
1871 1885
         Me.Label23.Name = "Label23"
1872 1886
         Me.Label23.Size = New System.Drawing.Size(92, 16)
1873 1887
         Me.Label23.TabIndex = 1258
@@ -1880,10 +1894,10 @@ Partial Class 銷售單審核
1880 1894
         Me.物料圖_pb.BackgroundImage = Global.YD_ERP_SYS.My.Resources.Resources.底圖1
1881 1895
         Me.物料圖_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
1882 1896
         Me.物料圖_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
1883
-        Me.物料圖_pb.Location = New System.Drawing.Point(2, 317)
1897
+        Me.物料圖_pb.Location = New System.Drawing.Point(2, 408)
1884 1898
         Me.物料圖_pb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
1885 1899
         Me.物料圖_pb.Name = "物料圖_pb"
1886
-        Me.物料圖_pb.Size = New System.Drawing.Size(318, 354)
1900
+        Me.物料圖_pb.Size = New System.Drawing.Size(318, 263)
1887 1901
         Me.物料圖_pb.TabIndex = 1300
1888 1902
         Me.物料圖_pb.TabStop = False
1889 1903
         '
@@ -1905,7 +1919,7 @@ Partial Class 銷售單審核
1905 1919
         Me.最低售價_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1906 1920
         Me.最低售價_cb.FormattingEnabled = True
1907 1921
         Me.最低售價_cb.Items.AddRange(New Object() {"1", "2", "3", "4", "5", "6", "7", "8", "9", "Y"})
1908
-        Me.最低售價_cb.Location = New System.Drawing.Point(98, 527)
1922
+        Me.最低售價_cb.Location = New System.Drawing.Point(98, 600)
1909 1923
         Me.最低售價_cb.Name = "最低售價_cb"
1910 1924
         Me.最低售價_cb.Size = New System.Drawing.Size(110, 24)
1911 1925
         Me.最低售價_cb.TabIndex = 1303
@@ -1917,7 +1931,7 @@ Partial Class 銷售單審核
1917 1931
         Me.最低運費_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1918 1932
         Me.最低運費_cb.FormattingEnabled = True
1919 1933
         Me.最低運費_cb.Items.AddRange(New Object() {"1", "2", "3", "4", "5", "6", "7", "8", "9", "Y"})
1920
-        Me.最低運費_cb.Location = New System.Drawing.Point(98, 501)
1934
+        Me.最低運費_cb.Location = New System.Drawing.Point(98, 574)
1921 1935
         Me.最低運費_cb.Name = "最低運費_cb"
1922 1936
         Me.最低運費_cb.Size = New System.Drawing.Size(110, 24)
1923 1937
         Me.最低運費_cb.TabIndex = 1302
@@ -1987,7 +2001,6 @@ Partial Class 銷售單審核
1987 2001
         Me.Panel2.Controls.Add(Me.隱藏_bt)
1988 2002
         Me.Panel2.Controls.Add(Me.Label14)
1989 2003
         Me.Panel2.Controls.Add(Me.Label23)
1990
-        Me.Panel2.Controls.Add(Me.物料清單_dgv)
1991 2004
         Me.Panel2.Controls.Add(Me.最低售價_cb)
1992 2005
         Me.Panel2.Controls.Add(Me.Label27)
1993 2006
         Me.Panel2.Controls.Add(Me.地區_cb)
@@ -2009,7 +2022,6 @@ Partial Class 銷售單審核
2009 2022
         Me.Panel2.Controls.Add(Me.成本_nud)
2010 2023
         Me.Panel2.Controls.Add(Me.品名_tb)
2011 2024
         Me.Panel2.Controls.Add(Me.盤損數_lb)
2012
-        Me.Panel2.Controls.Add(Me.供應商編碼_tb)
2013 2025
         Me.Panel2.Controls.Add(Me.可申請_tb)
2014 2026
         Me.Panel2.Controls.Add(Me.指定倉庫_lb)
2015 2027
         Me.Panel2.Controls.Add(Me.最大庫存量_tb)
@@ -2034,6 +2046,8 @@ Partial Class 銷售單審核
2034 2046
         Me.Panel2.Controls.Add(Me.Label18)
2035 2047
         Me.Panel2.Controls.Add(Me.需要全部庫存區域清單_ch)
2036 2048
         Me.Panel2.Controls.Add(Me.物料圖_pb)
2049
+        Me.Panel2.Controls.Add(Me.物料清單_dgv)
2050
+        Me.Panel2.Controls.Add(Me.供應商編碼_tb)
2037 2051
         Me.Panel2.Location = New System.Drawing.Point(2, 2)
2038 2052
         Me.Panel2.Name = "Panel2"
2039 2053
         Me.Panel2.Size = New System.Drawing.Size(523, 676)
@@ -2043,7 +2057,7 @@ Partial Class 銷售單審核
2043 2057
         '
2044 2058
         Me.Label50.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
2045 2059
         Me.Label50.AutoSize = True
2046
-        Me.Label50.Location = New System.Drawing.Point(46, 558)
2060
+        Me.Label50.Location = New System.Drawing.Point(46, 631)
2047 2061
         Me.Label50.Name = "Label50"
2048 2062
         Me.Label50.Size = New System.Drawing.Size(92, 16)
2049 2063
         Me.Label50.TabIndex = 1338
@@ -2054,7 +2068,7 @@ Partial Class 銷售單審核
2054 2068
         '
2055 2069
         Me.運費資料流水號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
2056 2070
         Me.運費資料流水號_tb.Enabled = False
2057
-        Me.運費資料流水號_tb.Location = New System.Drawing.Point(43, 573)
2071
+        Me.運費資料流水號_tb.Location = New System.Drawing.Point(43, 646)
2058 2072
         Me.運費資料流水號_tb.Name = "運費資料流水號_tb"
2059 2073
         Me.運費資料流水號_tb.Size = New System.Drawing.Size(165, 23)
2060 2074
         Me.運費資料流水號_tb.TabIndex = 1337
@@ -2119,19 +2133,6 @@ Partial Class 銷售單審核
2119 2133
         Me.顯示_bt.Text = "顯示物料控件"
2120 2134
         Me.顯示_bt.UseVisualStyleBackColor = True
2121 2135
         '
2122
-        '刷卡可刪除_ch
2123
-        '
2124
-        Me.刷卡可刪除_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
2125
-        Me.刷卡可刪除_ch.AutoSize = True
2126
-        Me.刷卡可刪除_ch.Location = New System.Drawing.Point(531, 652)
2127
-        Me.刷卡可刪除_ch.Name = "刷卡可刪除_ch"
2128
-        Me.刷卡可刪除_ch.Size = New System.Drawing.Size(87, 20)
2129
-        Me.刷卡可刪除_ch.TabIndex = 1368
2130
-        Me.刷卡可刪除_ch.Text = "刷卡可刪除"
2131
-        Me.刷卡可刪除_ch.TextAlign = System.Drawing.ContentAlignment.BottomRight
2132
-        Me.刷卡可刪除_ch.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText
2133
-        Me.刷卡可刪除_ch.UseVisualStyleBackColor = True
2134
-        '
2135 2136
         '銷售單審核
2136 2137
         '
2137 2138
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)

+ 34
- 56
YD-ERP-SYS/業務系統管理/銷售單審核.vb Переглянути файл

@@ -8,53 +8,28 @@ Public Class 銷售單審核
8 8
         物料清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
9 9
         物料清單_dgv.ColumnHeadersHeight = 40
10 10
         物料清單_dgv.AllowUserToAddRows = False
11
-        物料清單_dgv.RowTemplate.Height = 35
11
+        物料清單_dgv.RowTemplate.Height = 25
12 12
 
13 13
         PA1 = "" : PA2 = "" : PA2 = 供應商編碼_cb.Text : PA1 = 查詢_tb.Text
14 14
         SQL_盤盈盤損申請_物料清單()
15 15
         da.Fill(ds) : 物料清單_dgv.DataSource = ds.Tables(0) : conn.Close()
16 16
 
17
-        物料清單_dgv.Columns(0).FillWeight = 80 : 物料清單_dgv.Columns(1).FillWeight = 100 : 物料清單_dgv.Columns(2).FillWeight = 100
18
-        物料清單_dgv.Columns(3).FillWeight = 200 : 物料清單_dgv.Columns(4).FillWeight = 80 : 物料清單_dgv.Columns(5).FillWeight = 80 : 物料清單_dgv.Columns(6).FillWeight = 50
19
-        物料清單_dgv.Columns(7).Visible = False : 物料清單_dgv.Columns(8).Visible = False : 物料清單_dgv.Columns(9).Visible = False : 物料清單_dgv.Columns(10).Visible = False
20
-        物料清單_dgv.Columns(11).Visible = False : 物料清單_dgv.Columns(12).Visible = False : 物料清單_dgv.Columns(13).Visible = False
17
+        物料清單_dgv.Columns(0).FillWeight = 90 : 物料清單_dgv.Columns(1).FillWeight = 100 : 物料清單_dgv.Columns(2).FillWeight = 250
18
+        物料清單_dgv.Columns(3).FillWeight = 60 : 物料清單_dgv.Columns(4).Visible = False
19
+        物料清單_dgv.Columns(5).FillWeight = 40 : 物料清單_dgv.Columns(6).Visible = False
21 20
 
22
-        物料清單_dgv.Columns(1).ReadOnly = True : 物料清單_dgv.Columns(2).ReadOnly = True : 物料清單_dgv.Columns(3).ReadOnly = True : 物料清單_dgv.Columns(4).ReadOnly = True
23
-        物料清單_dgv.Columns(5).ReadOnly = True : 物料清單_dgv.Columns(6).ReadOnly = True : 物料清單_dgv.Columns(7).ReadOnly = True : 物料清單_dgv.Columns(8).ReadOnly = True
24
-        物料清單_dgv.Columns(9).ReadOnly = True : 物料清單_dgv.Columns(0).ReadOnly = True
21
+        物料清單_dgv.Columns(0).ReadOnly = True : 物料清單_dgv.Columns(1).ReadOnly = True : 物料清單_dgv.Columns(2).ReadOnly = True
22
+        物料清單_dgv.Columns(3).ReadOnly = True : 物料清單_dgv.Columns(4).ReadOnly = True : 物料清單_dgv.Columns(5).ReadOnly = True
25 23
 
26
-        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0" : 物料清單_dgv.Columns("未入庫").DefaultCellStyle.Format = "#,##0"
27
-        物料清單_dgv.Columns("未出庫").DefaultCellStyle.Format = "#,##0"
24
+        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0"
28 25
         物料清單_dgv.Columns("庫存").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
29 26
         物料清單_dgv.Columns("庫存").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
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 27
 
35 28
         資料筆數_tb.Text = 物料清單_dgv.Rows.Count
36 29
         For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
37 30
             資料數 = 物料清單_dgv.Rows.Count : MyModule1.進度條()
38
-            If 物料清單_dgv("倉名", i).Value.ToString = "" Then
39
-                If 物料清單_dgv("倉名1", i).Value.ToString <> "" Then
40
-                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名1", i).Value.ToString
41
-                ElseIf 物料清單_dgv("倉名2", i).Value.ToString <> "" Then
42
-                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名2", i).Value.ToString
43
-                ElseIf 物料清單_dgv("倉名3", i).Value.ToString <> "" Then
44
-                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名3", i).Value.ToString
45
-                End If
46
-            End If
47 31
             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 32
             If 物料清單_dgv("未出庫", i).Value.ToString = "" Then : 物料清單_dgv("未出庫", i).Value = 0 : End If
50
-
51
-            If Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) = 0 Then
52
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
53
-            ElseIf Val(物料清單_dgv("庫存", i).Value) = 0 And (Val(物料清單_dgv("未入庫", i).Value) <> 0 Or Val(物料清單_dgv("未出庫", i).Value) <> 0) Then
54
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
55
-            ElseIf Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) <> 0 Then
56
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
57
-            End If
58 33
         Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
59 34
     End Sub
60 35
     Private Sub Set_清單1()
@@ -318,10 +293,14 @@ Public Class 銷售單審核
318 293
             售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
319 294
             If 銷售明細_dgv("無管銷", i).Value = False Then
320 295
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
296
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
297
+                    If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
321 298
                     無管物料 = 無管物料 + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
322 299
                 End If
323 300
             End If
324 301
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
302
+                If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
303
+                If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
325 304
                 物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
326 305
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
327 306
             End If
@@ -577,22 +556,14 @@ Public Class 銷售單審核
577 556
                     End If
578 557
                 End If : conn.Close()
579 558
 
580
-                指定倉庫_cb_下拉表單資料載入() : 指定倉庫_cb.Text = 物料清單_dgv("倉名", e.RowIndex).Value.ToString : Set_清單3()
559
+                指定倉庫_cb_下拉表單資料載入()
581 560
                 成本_nud.Value = 0
582
-                If 物料清單_dgv("狀態", e.RowIndex).Value.ToString = "" Then
583
-                    訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
584
-                Else
585
-                    倉儲狀態_cb.Text = 物料清單_dgv("狀態", e.RowIndex).Value.ToString : 訂製狀態_cb.Text = 物料清單_dgv("訂製", e.RowIndex).Value.ToString
586
-                    If 訂製編碼_cb.Text = "MA0001" Then
587
-                        PA12 = 料號_tb.Text
588
-                        SQL_銷售明細表_成本讀取()
589
-                        If dr.Read() Then : 成本_nud.Value = dr("成本")
590
-                        Else : 成本_nud.Value = 0
591
-                        End If : conn.Close()
592
-                    Else
593
-                        成本_nud.Value = 0
594
-                    End If
595
-                End If
561
+                訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
562
+                PA12 = 料號_tb.Text
563
+                SQL_銷售明細表_成本讀取()
564
+                If dr.Read() Then : 成本_nud.Value = dr("成本")
565
+                Else : 成本_nud.Value = 0
566
+                End If : conn.Close()
596 567
             End If
597 568
         End If
598 569
     End Sub
@@ -605,15 +576,6 @@ Public Class 銷售單審核
605 576
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
606 577
             End If
607 578
         End If
608
-        For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
609
-            If Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) = 0 Then
610
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
611
-            ElseIf Val(物料清單_dgv("庫存", i).Value) = 0 And (Val(物料清單_dgv("未入庫", i).Value) <> 0 Or Val(物料清單_dgv("未出庫", i).Value) <> 0) Then
612
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
613
-            ElseIf Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) <> 0 Then
614
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
615
-            End If
616
-        Next
617 579
     End Sub
618 580
     Private Sub 窄間距_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 小間距_ch.Click
619 581
         小間距_ch.Checked = True : 中間距_ch.Checked = False : 大間距_ch.Checked = False
@@ -708,8 +670,12 @@ Public Class 銷售單審核
708 670
                 ElseIf 含稅_ch.Checked = True Then : 銷售明細_dgv("含稅", i).Value = True
709 671
                 End If
710 672
                 If 銷售明細_dgv("含稅", i).Value = False Then
673
+                    If IsDBNull(銷售明細_dgv("售價", i).Value) = True Then : 銷售明細_dgv("售價", i).Value = "0" : End If
674
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
711 675
                     銷售明細_dgv("售價", i).Value = 銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value
712 676
                 ElseIf 銷售明細_dgv("含稅", i).Value = True Then
677
+                    If IsDBNull(銷售明細_dgv("售價", i).Value) = True Then : 銷售明細_dgv("售價", i).Value = "0" : End If
678
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
713 679
                     銷售明細_dgv("售價", i).Value = 銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05
714 680
                 End If
715 681
             Next
@@ -1244,14 +1210,20 @@ Public Class 銷售單審核
1244 1210
             售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1245 1211
             If 銷售明細_dgv("無管銷", i).Value = False Then
1246 1212
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1213
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1214
+                    If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1247 1215
                     無管物料 = 無管物料 + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1248 1216
                 End If
1249 1217
             End If
1250 1218
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1219
+                If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1220
+                If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1251 1221
                 物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1252 1222
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
1253 1223
             End If
1254 1224
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
1225
+                If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1226
+                If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1255 1227
                 其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1256 1228
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
1257 1229
             End If
@@ -1356,14 +1328,20 @@ Public Class 銷售單審核
1356 1328
             售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1357 1329
             If 銷售明細_dgv("無管銷", i).Value = False Then
1358 1330
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1331
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1332
+                    If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1359 1333
                     無管物料 = 無管物料 + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1360 1334
                 End If
1361 1335
             End If
1362 1336
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1337
+                If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1338
+                If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1363 1339
                 物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1364 1340
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
1365 1341
             End If
1366 1342
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
1343
+                If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1344
+                If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1367 1345
                 其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1368 1346
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
1369 1347
             End If

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

@@ -30,12 +30,12 @@ Partial Class 銷售單申請
30 30
         Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31 31
         Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32 32
         Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
-        Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
-        Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35 33
         Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36 34
         Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37 35
         Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
38 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 39
         Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
40 40
         Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
41 41
         Me.銷售單據_dgv = New System.Windows.Forms.DataGridView()
@@ -118,7 +118,6 @@ Partial Class 銷售單申請
118 118
         Me.新增衍生運費_bt = New System.Windows.Forms.Button()
119 119
         Me.項次4_tb = New System.Windows.Forms.TextBox()
120 120
         Me.Label49 = New System.Windows.Forms.Label()
121
-        Me.銷售衍生運費_dgv = New System.Windows.Forms.DataGridView()
122 121
         Me.刷卡可刪除_ch = New System.Windows.Forms.CheckBox()
123 122
         Me.通知_lb = New System.Windows.Forms.Label()
124 123
         Me.刷卡總和_tb = New System.Windows.Forms.TextBox()
@@ -174,8 +173,9 @@ Partial Class 銷售單申請
174 173
         Me.Label20 = New System.Windows.Forms.Label()
175 174
         Me.Label39 = New System.Windows.Forms.Label()
176 175
         Me.Label40 = New System.Windows.Forms.Label()
177
-        Me.銷售備註_dgv = New System.Windows.Forms.DataGridView()
178 176
         Me.Label51 = New System.Windows.Forms.Label()
177
+        Me.銷售衍生運費_dgv = New System.Windows.Forms.DataGridView()
178
+        Me.銷售備註_dgv = New System.Windows.Forms.DataGridView()
179 179
         Me.字體大小調整_lb = New System.Windows.Forms.Label()
180 180
         Me.字體_NUD = New System.Windows.Forms.NumericUpDown()
181 181
         Me.最低售價_cb = New System.Windows.Forms.ComboBox()
@@ -210,9 +210,9 @@ Partial Class 銷售單申請
210 210
         CType(Me.物料清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
211 211
         CType(Me.售價_nud, System.ComponentModel.ISupportInitialize).BeginInit()
212 212
         Me.Panel1.SuspendLayout()
213
-        CType(Me.銷售衍生運費_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
214 213
         CType(Me.客戶資料_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
215 214
         CType(Me.收款事項_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
215
+        CType(Me.銷售衍生運費_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
216 216
         CType(Me.銷售備註_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
217 217
         CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).BeginInit()
218 218
         CType(Me.物料圖_pb, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -537,7 +537,7 @@ Partial Class 銷售單申請
537 537
         Me.區域庫存_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
538 538
         Me.區域庫存_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
539 539
         Me.區域庫存_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
540
-        Me.區域庫存_dgv.Location = New System.Drawing.Point(329, 319)
540
+        Me.區域庫存_dgv.Location = New System.Drawing.Point(202, 151)
541 541
         Me.區域庫存_dgv.Name = "區域庫存_dgv"
542 542
         Me.區域庫存_dgv.RowHeadersWidth = 5
543 543
         DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
@@ -546,6 +546,7 @@ Partial Class 銷售單申請
546 546
         Me.區域庫存_dgv.RowTemplate.Height = 24
547 547
         Me.區域庫存_dgv.Size = New System.Drawing.Size(191, 85)
548 548
         Me.區域庫存_dgv.TabIndex = 1245
549
+        Me.區域庫存_dgv.Visible = False
549 550
         '
550 551
         '成本_nud
551 552
         '
@@ -612,6 +613,7 @@ Partial Class 銷售單申請
612 613
         Me.訂購數量_nud.ForeColor = System.Drawing.Color.Green
613 614
         Me.訂購數量_nud.Location = New System.Drawing.Point(400, 571)
614 615
         Me.訂購數量_nud.Maximum = New Decimal(New Integer() {10000, 0, 0, 0})
616
+        Me.訂購數量_nud.Minimum = New Decimal(New Integer() {10000, 0, 0, -2147483648})
615 617
         Me.訂購數量_nud.Name = "訂購數量_nud"
616 618
         Me.訂購數量_nud.Size = New System.Drawing.Size(118, 23)
617 619
         Me.訂購數量_nud.TabIndex = 1235
@@ -902,20 +904,22 @@ Partial Class 銷售單申請
902 904
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
903 905
         Me.物料清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
904 906
         Me.物料清單_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
905
-        Me.物料清單_dgv.Location = New System.Drawing.Point(2, 81)
907
+        Me.物料清單_dgv.Location = New System.Drawing.Point(2, 79)
906 908
         Me.物料清單_dgv.Name = "物料清單_dgv"
907 909
         Me.物料清單_dgv.RowHeadersWidth = 5
908 910
         DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
909 911
         DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
910 912
         Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle8
911 913
         Me.物料清單_dgv.RowTemplate.Height = 24
912
-        Me.物料清單_dgv.Size = New System.Drawing.Size(518, 235)
914
+        Me.物料清單_dgv.Size = New System.Drawing.Size(518, 326)
913 915
         Me.物料清單_dgv.TabIndex = 1205
914 916
         '
915 917
         '需要全部庫存區域清單_ch
916 918
         '
917 919
         Me.需要全部庫存區域清單_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
918 920
         Me.需要全部庫存區域清單_ch.AutoSize = True
921
+        Me.需要全部庫存區域清單_ch.Checked = True
922
+        Me.需要全部庫存區域清單_ch.CheckState = System.Windows.Forms.CheckState.Checked
919 923
         Me.需要全部庫存區域清單_ch.Location = New System.Drawing.Point(351, 430)
920 924
         Me.需要全部庫存區域清單_ch.Name = "需要全部庫存區域清單_ch"
921 925
         Me.需要全部庫存區域清單_ch.Size = New System.Drawing.Size(147, 20)
@@ -1121,24 +1125,6 @@ Partial Class 銷售單申請
1121 1125
         Me.Label49.TabIndex = 1336
1122 1126
         Me.Label49.Text = "項次"
1123 1127
         '
1124
-        '銷售衍生運費_dgv
1125
-        '
1126
-        DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
1127
-        Me.銷售衍生運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13
1128
-        Me.銷售衍生運費_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1129
-            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1130
-        Me.銷售衍生運費_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1131
-        Me.銷售衍生運費_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1132
-        Me.銷售衍生運費_dgv.Location = New System.Drawing.Point(3, 542)
1133
-        Me.銷售衍生運費_dgv.Name = "銷售衍生運費_dgv"
1134
-        Me.銷售衍生運費_dgv.RowHeadersWidth = 5
1135
-        DataGridViewCellStyle14.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
1136
-        DataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
1137
-        Me.銷售衍生運費_dgv.RowsDefaultCellStyle = DataGridViewCellStyle14
1138
-        Me.銷售衍生運費_dgv.RowTemplate.Height = 24
1139
-        Me.銷售衍生運費_dgv.Size = New System.Drawing.Size(725, 102)
1140
-        Me.銷售衍生運費_dgv.TabIndex = 1334
1141
-        '
1142 1128
         '刷卡可刪除_ch
1143 1129
         '
1144 1130
         Me.刷卡可刪除_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -1665,7 +1651,7 @@ Partial Class 銷售單申請
1665 1651
         Me.客戶資料_dgv.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1666 1652
         Me.客戶資料_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1667 1653
         Me.客戶資料_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1668
-        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 14326)
1654
+        Me.客戶資料_dgv.Location = New System.Drawing.Point(17, 14874)
1669 1655
         Me.客戶資料_dgv.Name = "客戶資料_dgv"
1670 1656
         Me.客戶資料_dgv.RowHeadersWidth = 5
1671 1657
         DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
@@ -1734,6 +1720,34 @@ Partial Class 銷售單申請
1734 1720
         Me.Label40.TabIndex = 1298
1735 1721
         Me.Label40.Text = "--------------------------------"
1736 1722
         '
1723
+        'Label51
1724
+        '
1725
+        Me.Label51.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1726
+        Me.Label51.AutoSize = True
1727
+        Me.Label51.Location = New System.Drawing.Point(733, 457)
1728
+        Me.Label51.Name = "Label51"
1729
+        Me.Label51.Size = New System.Drawing.Size(168, 16)
1730
+        Me.Label51.TabIndex = 1365
1731
+        Me.Label51.Text = "--------------------------------"
1732
+        '
1733
+        '銷售衍生運費_dgv
1734
+        '
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
1737
+        Me.銷售衍生運費_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1738
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1739
+        Me.銷售衍生運費_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1740
+        Me.銷售衍生運費_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
1741
+        Me.銷售衍生運費_dgv.Location = New System.Drawing.Point(3, 542)
1742
+        Me.銷售衍生運費_dgv.Name = "銷售衍生運費_dgv"
1743
+        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
+        Me.銷售衍生運費_dgv.RowTemplate.Height = 24
1748
+        Me.銷售衍生運費_dgv.Size = New System.Drawing.Size(725, 102)
1749
+        Me.銷售衍生運費_dgv.TabIndex = 1334
1750
+        '
1737 1751
         '銷售備註_dgv
1738 1752
         '
1739 1753
         DataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
@@ -1752,16 +1766,6 @@ Partial Class 銷售單申請
1752 1766
         Me.銷售備註_dgv.Size = New System.Drawing.Size(725, 102)
1753 1767
         Me.銷售備註_dgv.TabIndex = 1250
1754 1768
         '
1755
-        'Label51
1756
-        '
1757
-        Me.Label51.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1758
-        Me.Label51.AutoSize = True
1759
-        Me.Label51.Location = New System.Drawing.Point(733, 457)
1760
-        Me.Label51.Name = "Label51"
1761
-        Me.Label51.Size = New System.Drawing.Size(168, 16)
1762
-        Me.Label51.TabIndex = 1365
1763
-        Me.Label51.Text = "--------------------------------"
1764
-        '
1765 1769
         '字體大小調整_lb
1766 1770
         '
1767 1771
         Me.字體大小調整_lb.AutoSize = True
@@ -1791,7 +1795,7 @@ Partial Class 銷售單申請
1791 1795
         Me.最低售價_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1792 1796
         Me.最低售價_cb.FormattingEnabled = True
1793 1797
         Me.最低售價_cb.Items.AddRange(New Object() {"1", "2", "3", "4", "5", "6", "7", "8", "9", "Y"})
1794
-        Me.最低售價_cb.Location = New System.Drawing.Point(83, 582)
1798
+        Me.最低售價_cb.Location = New System.Drawing.Point(86, 638)
1795 1799
         Me.最低售價_cb.Name = "最低售價_cb"
1796 1800
         Me.最低售價_cb.Size = New System.Drawing.Size(110, 24)
1797 1801
         Me.最低售價_cb.TabIndex = 1294
@@ -1803,7 +1807,7 @@ Partial Class 銷售單申請
1803 1807
         Me.最低運費_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
1804 1808
         Me.最低運費_cb.FormattingEnabled = True
1805 1809
         Me.最低運費_cb.Items.AddRange(New Object() {"1", "2", "3", "4", "5", "6", "7", "8", "9", "Y"})
1806
-        Me.最低運費_cb.Location = New System.Drawing.Point(83, 556)
1810
+        Me.最低運費_cb.Location = New System.Drawing.Point(86, 612)
1807 1811
         Me.最低運費_cb.Name = "最低運費_cb"
1808 1812
         Me.最低運費_cb.Size = New System.Drawing.Size(110, 24)
1809 1813
         Me.最低運費_cb.TabIndex = 1293
@@ -1813,7 +1817,7 @@ Partial Class 銷售單申請
1813 1817
         '
1814 1818
         Me.銷售收款流水號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1815 1819
         Me.銷售收款流水號_tb.Enabled = False
1816
-        Me.銷售收款流水號_tb.Location = New System.Drawing.Point(28, 527)
1820
+        Me.銷售收款流水號_tb.Location = New System.Drawing.Point(31, 583)
1817 1821
         Me.銷售收款流水號_tb.Name = "銷售收款流水號_tb"
1818 1822
         Me.銷售收款流水號_tb.Size = New System.Drawing.Size(165, 23)
1819 1823
         Me.銷售收款流水號_tb.TabIndex = 1288
@@ -1823,7 +1827,7 @@ Partial Class 銷售單申請
1823 1827
         '
1824 1828
         Me.Label37.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1825 1829
         Me.Label37.AutoSize = True
1826
-        Me.Label37.Location = New System.Drawing.Point(31, 511)
1830
+        Me.Label37.Location = New System.Drawing.Point(34, 567)
1827 1831
         Me.Label37.Name = "Label37"
1828 1832
         Me.Label37.Size = New System.Drawing.Size(92, 16)
1829 1833
         Me.Label37.TabIndex = 1289
@@ -1834,7 +1838,7 @@ Partial Class 銷售單申請
1834 1838
         '
1835 1839
         Me.銷售備註流水號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1836 1840
         Me.銷售備註流水號_tb.Enabled = False
1837
-        Me.銷售備註流水號_tb.Location = New System.Drawing.Point(28, 488)
1841
+        Me.銷售備註流水號_tb.Location = New System.Drawing.Point(31, 544)
1838 1842
         Me.銷售備註流水號_tb.Name = "銷售備註流水號_tb"
1839 1843
         Me.銷售備註流水號_tb.Size = New System.Drawing.Size(165, 23)
1840 1844
         Me.銷售備註流水號_tb.TabIndex = 1266
@@ -1844,7 +1848,7 @@ Partial Class 銷售單申請
1844 1848
         '
1845 1849
         Me.倉儲資料流水號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1846 1850
         Me.倉儲資料流水號_tb.Enabled = False
1847
-        Me.倉儲資料流水號_tb.Location = New System.Drawing.Point(28, 449)
1851
+        Me.倉儲資料流水號_tb.Location = New System.Drawing.Point(31, 505)
1848 1852
         Me.倉儲資料流水號_tb.Name = "倉儲資料流水號_tb"
1849 1853
         Me.倉儲資料流水號_tb.Size = New System.Drawing.Size(165, 23)
1850 1854
         Me.倉儲資料流水號_tb.TabIndex = 1259
@@ -1854,7 +1858,7 @@ Partial Class 銷售單申請
1854 1858
         '
1855 1859
         Me.Label24.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1856 1860
         Me.Label24.AutoSize = True
1857
-        Me.Label24.Location = New System.Drawing.Point(31, 433)
1861
+        Me.Label24.Location = New System.Drawing.Point(34, 489)
1858 1862
         Me.Label24.Name = "Label24"
1859 1863
         Me.Label24.Size = New System.Drawing.Size(92, 16)
1860 1864
         Me.Label24.TabIndex = 1260
@@ -1865,7 +1869,7 @@ Partial Class 銷售單申請
1865 1869
         '
1866 1870
         Me.銷售資料流水號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1867 1871
         Me.銷售資料流水號_tb.Enabled = False
1868
-        Me.銷售資料流水號_tb.Location = New System.Drawing.Point(28, 410)
1872
+        Me.銷售資料流水號_tb.Location = New System.Drawing.Point(31, 466)
1869 1873
         Me.銷售資料流水號_tb.Name = "銷售資料流水號_tb"
1870 1874
         Me.銷售資料流水號_tb.Size = New System.Drawing.Size(165, 23)
1871 1875
         Me.銷售資料流水號_tb.TabIndex = 1257
@@ -1875,7 +1879,7 @@ Partial Class 銷售單申請
1875 1879
         '
1876 1880
         Me.Label27.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1877 1881
         Me.Label27.AutoSize = True
1878
-        Me.Label27.Location = New System.Drawing.Point(31, 473)
1882
+        Me.Label27.Location = New System.Drawing.Point(34, 529)
1879 1883
         Me.Label27.Name = "Label27"
1880 1884
         Me.Label27.Size = New System.Drawing.Size(92, 16)
1881 1885
         Me.Label27.TabIndex = 1267
@@ -1886,7 +1890,7 @@ Partial Class 銷售單申請
1886 1890
         '
1887 1891
         Me.Label23.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
1888 1892
         Me.Label23.AutoSize = True
1889
-        Me.Label23.Location = New System.Drawing.Point(31, 395)
1893
+        Me.Label23.Location = New System.Drawing.Point(34, 451)
1890 1894
         Me.Label23.Name = "Label23"
1891 1895
         Me.Label23.Size = New System.Drawing.Size(92, 16)
1892 1896
         Me.Label23.TabIndex = 1258
@@ -1920,10 +1924,10 @@ Partial Class 銷售單申請
1920 1924
         Me.物料圖_pb.BackgroundImage = Global.YD_ERP_SYS.My.Resources.Resources.底圖1
1921 1925
         Me.物料圖_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
1922 1926
         Me.物料圖_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
1923
-        Me.物料圖_pb.Location = New System.Drawing.Point(2, 320)
1927
+        Me.物料圖_pb.Location = New System.Drawing.Point(2, 406)
1924 1928
         Me.物料圖_pb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
1925 1929
         Me.物料圖_pb.Name = "物料圖_pb"
1926
-        Me.物料圖_pb.Size = New System.Drawing.Size(319, 348)
1930
+        Me.物料圖_pb.Size = New System.Drawing.Size(319, 262)
1927 1931
         Me.物料圖_pb.TabIndex = 1222
1928 1932
         Me.物料圖_pb.TabStop = False
1929 1933
         '
@@ -1993,7 +1997,6 @@ Partial Class 銷售單申請
1993 1997
         Me.Panel2.Controls.Add(Me.Label27)
1994 1998
         Me.Panel2.Controls.Add(Me.銷售收款流水號_tb)
1995 1999
         Me.Panel2.Controls.Add(Me.最低售價_cb)
1996
-        Me.Panel2.Controls.Add(Me.物料清單_dgv)
1997 2000
         Me.Panel2.Controls.Add(Me.地區_cb)
1998 2001
         Me.Panel2.Controls.Add(Me.最低運費_cb)
1999 2002
         Me.Panel2.Controls.Add(Me.清空_bt)
@@ -2017,7 +2020,6 @@ Partial Class 銷售單申請
2017 2020
         Me.Panel2.Controls.Add(Me.訂購數量_nud)
2018 2021
         Me.Panel2.Controls.Add(Me.Label24)
2019 2022
         Me.Panel2.Controls.Add(Me.盤盈數_lb)
2020
-        Me.Panel2.Controls.Add(Me.供應商編碼_tb)
2021 2023
         Me.Panel2.Controls.Add(Me.庫存量_lb)
2022 2024
         Me.Panel2.Controls.Add(Me.倉儲資料流水號_tb)
2023 2025
         Me.Panel2.Controls.Add(Me.最大庫存量_lb)
@@ -2039,6 +2041,8 @@ Partial Class 銷售單申請
2039 2041
         Me.Panel2.Controls.Add(Me.Label29)
2040 2042
         Me.Panel2.Controls.Add(Me.需要全部庫存區域清單_ch)
2041 2043
         Me.Panel2.Controls.Add(Me.物料圖_pb)
2044
+        Me.Panel2.Controls.Add(Me.物料清單_dgv)
2045
+        Me.Panel2.Controls.Add(Me.供應商編碼_tb)
2042 2046
         Me.Panel2.Location = New System.Drawing.Point(2, 2)
2043 2047
         Me.Panel2.Name = "Panel2"
2044 2048
         Me.Panel2.Size = New System.Drawing.Size(528, 675)
@@ -2048,7 +2052,7 @@ Partial Class 銷售單申請
2048 2052
         '
2049 2053
         Me.Label50.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
2050 2054
         Me.Label50.AutoSize = True
2051
-        Me.Label50.Location = New System.Drawing.Point(31, 357)
2055
+        Me.Label50.Location = New System.Drawing.Point(34, 413)
2052 2056
         Me.Label50.Name = "Label50"
2053 2057
         Me.Label50.Size = New System.Drawing.Size(92, 16)
2054 2058
         Me.Label50.TabIndex = 1297
@@ -2059,7 +2063,7 @@ Partial Class 銷售單申請
2059 2063
         '
2060 2064
         Me.運費資料流水號_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
2061 2065
         Me.運費資料流水號_tb.Enabled = False
2062
-        Me.運費資料流水號_tb.Location = New System.Drawing.Point(28, 372)
2066
+        Me.運費資料流水號_tb.Location = New System.Drawing.Point(31, 428)
2063 2067
         Me.運費資料流水號_tb.Name = "運費資料流水號_tb"
2064 2068
         Me.運費資料流水號_tb.Size = New System.Drawing.Size(165, 23)
2065 2069
         Me.運費資料流水號_tb.TabIndex = 1296
@@ -2158,9 +2162,9 @@ Partial Class 銷售單申請
2158 2162
         CType(Me.售價_nud, System.ComponentModel.ISupportInitialize).EndInit()
2159 2163
         Me.Panel1.ResumeLayout(False)
2160 2164
         Me.Panel1.PerformLayout()
2161
-        CType(Me.銷售衍生運費_dgv, System.ComponentModel.ISupportInitialize).EndInit()
2162 2165
         CType(Me.客戶資料_dgv, System.ComponentModel.ISupportInitialize).EndInit()
2163 2166
         CType(Me.收款事項_dgv, System.ComponentModel.ISupportInitialize).EndInit()
2167
+        CType(Me.銷售衍生運費_dgv, System.ComponentModel.ISupportInitialize).EndInit()
2164 2168
         CType(Me.銷售備註_dgv, System.ComponentModel.ISupportInitialize).EndInit()
2165 2169
         CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).EndInit()
2166 2170
         CType(Me.物料圖_pb, System.ComponentModel.ISupportInitialize).EndInit()

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

@@ -8,53 +8,28 @@ Public Class 銷售單申請
8 8
         物料清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
9 9
         物料清單_dgv.ColumnHeadersHeight = 40
10 10
         物料清單_dgv.AllowUserToAddRows = False
11
-        物料清單_dgv.RowTemplate.Height = 35
11
+        物料清單_dgv.RowTemplate.Height = 25
12 12
 
13 13
         PA1 = "" : PA2 = "" : PA2 = 供應商編碼_cb.Text : PA1 = 查詢_tb.Text
14 14
         SQL_盤盈盤損申請_物料清單()
15 15
         da.Fill(ds) : 物料清單_dgv.DataSource = ds.Tables(0) : conn.Close()
16 16
 
17
-        物料清單_dgv.Columns(0).FillWeight = 80 : 物料清單_dgv.Columns(1).FillWeight = 90 : 物料清單_dgv.Columns(2).FillWeight = 100
18
-        物料清單_dgv.Columns(3).FillWeight = 200 : 物料清單_dgv.Columns(4).FillWeight = 80 : 物料清單_dgv.Columns(5).FillWeight = 80 : 物料清單_dgv.Columns(6).FillWeight = 50
19
-        物料清單_dgv.Columns(7).Visible = False : 物料清單_dgv.Columns(8).Visible = False : 物料清單_dgv.Columns(9).Visible = False : 物料清單_dgv.Columns(10).Visible = False
20
-        物料清單_dgv.Columns(11).Visible = False : 物料清單_dgv.Columns(12).Visible = False : 物料清單_dgv.Columns(13).Visible = False
17
+        物料清單_dgv.Columns(0).FillWeight = 90 : 物料清單_dgv.Columns(1).FillWeight = 100 : 物料清單_dgv.Columns(2).FillWeight = 250
18
+        物料清單_dgv.Columns(3).FillWeight = 60 : 物料清單_dgv.Columns(4).Visible = False
19
+        物料清單_dgv.Columns(5).FillWeight = 40 : 物料清單_dgv.Columns(6).Visible = False
21 20
 
22
-        物料清單_dgv.Columns(1).ReadOnly = True : 物料清單_dgv.Columns(2).ReadOnly = True : 物料清單_dgv.Columns(3).ReadOnly = True : 物料清單_dgv.Columns(4).ReadOnly = True
23
-        物料清單_dgv.Columns(5).ReadOnly = True : 物料清單_dgv.Columns(6).ReadOnly = True : 物料清單_dgv.Columns(7).ReadOnly = True : 物料清單_dgv.Columns(8).ReadOnly = True
24
-        物料清單_dgv.Columns(9).ReadOnly = True : 物料清單_dgv.Columns(0).ReadOnly = True
21
+        物料清單_dgv.Columns(0).ReadOnly = True : 物料清單_dgv.Columns(1).ReadOnly = True : 物料清單_dgv.Columns(2).ReadOnly = True
22
+        物料清單_dgv.Columns(3).ReadOnly = True : 物料清單_dgv.Columns(4).ReadOnly = True : 物料清單_dgv.Columns(5).ReadOnly = True
25 23
 
26
-        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0" : 物料清單_dgv.Columns("未入庫").DefaultCellStyle.Format = "#,##0"
27
-        物料清單_dgv.Columns("未出庫").DefaultCellStyle.Format = "#,##0"
24
+        物料清單_dgv.Columns("庫存").DefaultCellStyle.Format = "#,##0"
28 25
         物料清單_dgv.Columns("庫存").DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
29 26
         物料清單_dgv.Columns("庫存").HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
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 27
 
35 28
         資料筆數_tb.Text = 物料清單_dgv.Rows.Count
36 29
         For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
37 30
             資料數 = 物料清單_dgv.Rows.Count : MyModule1.進度條()
38
-            If 物料清單_dgv("倉名", i).Value.ToString = "" Then
39
-                If 物料清單_dgv("倉名1", i).Value.ToString <> "" Then
40
-                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名1", i).Value.ToString
41
-                ElseIf 物料清單_dgv("倉名2", i).Value.ToString <> "" Then
42
-                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名2", i).Value.ToString
43
-                ElseIf 物料清單_dgv("倉名3", i).Value.ToString <> "" Then
44
-                    物料清單_dgv("倉名", i).Value = 物料清單_dgv("倉名3", i).Value.ToString
45
-                End If
46
-            End If
47 31
             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 32
             If 物料清單_dgv("未出庫", i).Value.ToString = "" Then : 物料清單_dgv("未出庫", i).Value = 0 : End If
50
-
51
-            If Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) = 0 Then
52
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
53
-            ElseIf Val(物料清單_dgv("庫存", i).Value) = 0 And (Val(物料清單_dgv("未入庫", i).Value) <> 0 Or Val(物料清單_dgv("未出庫", i).Value) <> 0) Then
54
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
55
-            ElseIf Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) <> 0 Then
56
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
57
-            End If
58 33
         Next : YD_ERP_SYS.ToolStripProgressBar1.Value = 0 : 最終數 = 0
59 34
     End Sub
60 35
     Private Sub Set_清單1()
@@ -318,14 +293,20 @@ Public Class 銷售單申請
318 293
             售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
319 294
             If 銷售明細_dgv("無管銷", i).Value = False Then
320 295
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
296
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
297
+                    If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
321 298
                     無管物料 = 無管物料 + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
322 299
                 End If
323 300
             End If
324 301
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
302
+                If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
303
+                If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
325 304
                 物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
326 305
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
327 306
             End If
328 307
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
308
+                If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
309
+                If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
329 310
                 其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
330 311
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
331 312
             End If
@@ -484,8 +465,12 @@ Public Class 銷售單申請
484 465
         If e.RowIndex = -1 Then : Else
485 466
             For i As Integer = 0 To 銷售明細_dgv.Rows.Count - 1
486 467
                 If 銷售明細_dgv("含稅", i).Value = False Then
468
+                    If IsDBNull(銷售明細_dgv("售價", i).Value) = True Then : 銷售明細_dgv("售價", i).Value = "0" : End If
469
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
487 470
                     銷售明細_dgv("單價", i).Value = 銷售明細_dgv("售價", i).Value / 銷售明細_dgv("數量", i).Value
488 471
                 ElseIf 銷售明細_dgv("含稅", i).Value = True Then
472
+                    If IsDBNull(銷售明細_dgv("售價", i).Value) = True Then : 銷售明細_dgv("售價", i).Value = "0" : End If
473
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
489 474
                     銷售明細_dgv("單價", i).Value = (銷售明細_dgv("售價", i).Value / 1.05) / 銷售明細_dgv("數量", i).Value
490 475
                 End If
491 476
 
@@ -581,22 +566,14 @@ Public Class 銷售單申請
581 566
                     End If
582 567
                 End If : conn.Close()
583 568
 
584
-                指定倉庫_cb_下拉表單資料載入() : 指定倉庫_cb.Text = 物料清單_dgv("倉名", e.RowIndex).Value.ToString : Set_清單3()
569
+                指定倉庫_cb_下拉表單資料載入()
585 570
                 成本_nud.Value = 0
586
-                If 物料清單_dgv("狀態", e.RowIndex).Value.ToString = "" Then
587
-                    訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
588
-                Else
589
-                    倉儲狀態_cb.Text = 物料清單_dgv("狀態", e.RowIndex).Value.ToString : 訂製狀態_cb.Text = 物料清單_dgv("訂製", e.RowIndex).Value.ToString
590
-                    If 訂製編碼_cb.Text = "MA0001" Then
591
-                        PA12 = 料號_tb.Text
592
-                        SQL_銷售明細表_成本讀取()
593
-                        If dr.Read() Then : 成本_nud.Value = dr("成本")
594
-                        Else : 成本_nud.Value = 0
595
-                        End If : conn.Close()
596
-                    Else
597
-                        成本_nud.Value = 0
598
-                    End If
599
-                End If
571
+                訂製狀態_cb_下拉表單資料載入() : 倉儲狀態_cb_下拉表單資料載入()
572
+                PA12 = 料號_tb.Text
573
+                SQL_銷售明細表_成本讀取()
574
+                If dr.Read() Then : 成本_nud.Value = dr("成本")
575
+                Else : 成本_nud.Value = 0
576
+                End If : conn.Close()
600 577
             End If
601 578
         End If
602 579
     End Sub
@@ -609,15 +586,6 @@ Public Class 銷售單申請
609 586
                 e.Graphics.DrawLine(linePen, startX, startY, endX, startY) : Exit Sub
610 587
             End If
611 588
         End If
612
-        For i As Integer = 0 To 物料清單_dgv.Rows.Count - 1
613
-            If Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) = 0 Then
614
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightPink
615
-            ElseIf Val(物料清單_dgv("庫存", i).Value) = 0 And (Val(物料清單_dgv("未入庫", i).Value) <> 0 Or Val(物料清單_dgv("未出庫", i).Value) <> 0) Then
616
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.LightGoldenrodYellow
617
-            ElseIf Val(物料清單_dgv("庫存", i).Value) + Val(物料清單_dgv("未入庫", i).Value) - Val(物料清單_dgv("未出庫", i).Value) <> 0 Then
618
-                物料清單_dgv.Rows(i).DefaultCellStyle.BackColor = Color.White
619
-            End If
620
-        Next
621 589
     End Sub
622 590
     Private Sub 窄間距_ch_CheckedChanged(sender As Object, e As EventArgs) Handles 小間距_ch.Click
623 591
         小間距_ch.Checked = True : 中間距_ch.Checked = False : 大間距_ch.Checked = False
@@ -712,8 +680,12 @@ Public Class 銷售單申請
712 680
                 ElseIf 含稅_ch.Checked = True Then : 銷售明細_dgv("含稅", i).Value = True
713 681
                 End If
714 682
                 If 銷售明細_dgv("含稅", i).Value = False Then
683
+                    If IsDBNull(銷售明細_dgv("售價", i).Value) = True Then : 銷售明細_dgv("售價", i).Value = "0" : End If
684
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
715 685
                     銷售明細_dgv("售價", i).Value = 銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value
716 686
                 ElseIf 銷售明細_dgv("含稅", i).Value = True Then
687
+                    If IsDBNull(銷售明細_dgv("售價", i).Value) = True Then : 銷售明細_dgv("售價", i).Value = "0" : End If
688
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
717 689
                     銷售明細_dgv("售價", i).Value = 銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value * 1.05
718 690
                 End If
719 691
             Next
@@ -1322,14 +1294,20 @@ Public Class 銷售單申請
1322 1294
             售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1323 1295
             If 銷售明細_dgv("無管銷", i).Value = False Then
1324 1296
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1297
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1298
+                    If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1325 1299
                     無管物料 = 無管物料 + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1326 1300
                 End If
1327 1301
             End If
1328 1302
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1303
+                If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1304
+                If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1329 1305
                 物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1330 1306
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
1331 1307
             End If
1332 1308
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
1309
+                If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1310
+                If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1333 1311
                 其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1334 1312
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
1335 1313
             End If
@@ -1428,14 +1406,20 @@ Public Class 銷售單申請
1428 1406
             售價小計_tb.Text = Val(售價小計_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("單價", i).Value)
1429 1407
             If 銷售明細_dgv("無管銷", i).Value = False Then
1430 1408
                 If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1409
+                    If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1410
+                    If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1431 1411
                     無管物料 = 無管物料 + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1432 1412
                 End If
1433 1413
             End If
1434 1414
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) <> "1001" Then
1415
+                If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1416
+                If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1435 1417
                 物料成本_tb.Text = Val(物料成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1436 1418
                 不含1類銷售小記 = 不含1類銷售小記 + 銷售明細_dgv("售價", i).Value
1437 1419
             End If
1438 1420
             If Strings.Left(銷售明細_dgv("料號", i).Value.ToString, 4) = "1001" Then
1421
+                If IsDBNull(銷售明細_dgv("數量", i).Value) = True Then : 銷售明細_dgv("數量", i).Value = "0" : End If
1422
+                If IsDBNull(銷售明細_dgv("成本", i).Value) = True Then : 銷售明細_dgv("成本", i).Value = "0" : End If
1439 1423
                 其他成本_tb.Text = Val(其他成本_tb.Text) + (銷售明細_dgv("數量", i).Value * 銷售明細_dgv("成本", i).Value)
1440 1424
                 '不含1類銷售小記 = 不含1類銷售小記 - 銷售明細_dgv("成本", i).Value
1441 1425
             End If

+ 80
- 77
YD-ERP-SYS/財務系統管理/財務_收支單一覽表.Designer.vb Переглянути файл

@@ -23,11 +23,11 @@ Partial Class 財務_收支單一覽表
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private Sub InitializeComponent()
25 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
-        Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
-        Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle19 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle20 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle21 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31 31
         Me.會計月_ch = New System.Windows.Forms.CheckBox()
32 32
         Me.下個月_bt = New System.Windows.Forms.Button()
33 33
         Me.上個月_bt = New System.Windows.Forms.Button()
@@ -100,7 +100,7 @@ Partial Class 財務_收支單一覽表
100 100
         Me.會計月_ch.AutoSize = True
101 101
         Me.會計月_ch.Checked = True
102 102
         Me.會計月_ch.CheckState = System.Windows.Forms.CheckState.Checked
103
-        Me.會計月_ch.Location = New System.Drawing.Point(43, 58)
103
+        Me.會計月_ch.Location = New System.Drawing.Point(30, 54)
104 104
         Me.會計月_ch.Name = "會計月_ch"
105 105
         Me.會計月_ch.Size = New System.Drawing.Size(63, 20)
106 106
         Me.會計月_ch.TabIndex = 1222
@@ -111,7 +111,7 @@ Partial Class 財務_收支單一覽表
111 111
         '
112 112
         Me.下個月_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
113 113
         Me.下個月_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
114
-        Me.下個月_bt.Location = New System.Drawing.Point(274, 56)
114
+        Me.下個月_bt.Location = New System.Drawing.Point(261, 52)
115 115
         Me.下個月_bt.Name = "下個月_bt"
116 116
         Me.下個月_bt.Size = New System.Drawing.Size(57, 23)
117 117
         Me.下個月_bt.TabIndex = 1221
@@ -122,7 +122,7 @@ Partial Class 財務_收支單一覽表
122 122
         '
123 123
         Me.上個月_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
124 124
         Me.上個月_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
125
-        Me.上個月_bt.Location = New System.Drawing.Point(216, 56)
125
+        Me.上個月_bt.Location = New System.Drawing.Point(203, 52)
126 126
         Me.上個月_bt.Name = "上個月_bt"
127 127
         Me.上個月_bt.Size = New System.Drawing.Size(57, 23)
128 128
         Me.上個月_bt.TabIndex = 1220
@@ -133,7 +133,7 @@ Partial Class 財務_收支單一覽表
133 133
         '
134 134
         Me.中間日期_dtp.DropDownAlign = System.Windows.Forms.LeftRightAlignment.Right
135 135
         Me.中間日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
136
-        Me.中間日期_dtp.Location = New System.Drawing.Point(39, 100)
136
+        Me.中間日期_dtp.Location = New System.Drawing.Point(26, 100)
137 137
         Me.中間日期_dtp.Name = "中間日期_dtp"
138 138
         Me.中間日期_dtp.Size = New System.Drawing.Size(43, 23)
139 139
         Me.中間日期_dtp.TabIndex = 1219
@@ -154,7 +154,7 @@ Partial Class 財務_收支單一覽表
154 154
         '一般月_ch
155 155
         '
156 156
         Me.一般月_ch.AutoSize = True
157
-        Me.一般月_ch.Location = New System.Drawing.Point(135, 58)
157
+        Me.一般月_ch.Location = New System.Drawing.Point(122, 54)
158 158
         Me.一般月_ch.Name = "一般月_ch"
159 159
         Me.一般月_ch.Size = New System.Drawing.Size(63, 20)
160 160
         Me.一般月_ch.TabIndex = 1223
@@ -165,7 +165,7 @@ Partial Class 財務_收支單一覽表
165 165
         '
166 166
         Me.Label2.AutoSize = True
167 167
         Me.Label2.ForeColor = System.Drawing.Color.Red
168
-        Me.Label2.Location = New System.Drawing.Point(504, 59)
168
+        Me.Label2.Location = New System.Drawing.Point(494, 59)
169 169
         Me.Label2.Name = "Label2"
170 170
         Me.Label2.Size = New System.Drawing.Size(32, 16)
171 171
         Me.Label2.TabIndex = 1217
@@ -174,7 +174,7 @@ Partial Class 財務_收支單一覽表
174 174
         '人民幣零用金_tb
175 175
         '
176 176
         Me.人民幣零用金_tb.ForeColor = System.Drawing.Color.Red
177
-        Me.人民幣零用金_tb.Location = New System.Drawing.Point(417, 56)
177
+        Me.人民幣零用金_tb.Location = New System.Drawing.Point(407, 56)
178 178
         Me.人民幣零用金_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
179 179
         Me.人民幣零用金_tb.Name = "人民幣零用金_tb"
180 180
         Me.人民幣零用金_tb.Size = New System.Drawing.Size(85, 23)
@@ -185,7 +185,7 @@ Partial Class 財務_收支單一覽表
185 185
         '
186 186
         Me.人民幣零用金_.AutoSize = True
187 187
         Me.人民幣零用金_.ForeColor = System.Drawing.Color.Red
188
-        Me.人民幣零用金_.Location = New System.Drawing.Point(333, 60)
188
+        Me.人民幣零用金_.Location = New System.Drawing.Point(323, 60)
189 189
         Me.人民幣零用金_.Name = "人民幣零用金_"
190 190
         Me.人民幣零用金_.Size = New System.Drawing.Size(85, 16)
191 191
         Me.人民幣零用金_.TabIndex = 1215
@@ -194,7 +194,7 @@ Partial Class 財務_收支單一覽表
194 194
         '人民幣支票_tb
195 195
         '
196 196
         Me.人民幣支票_tb.ForeColor = System.Drawing.Color.Red
197
-        Me.人民幣支票_tb.Location = New System.Drawing.Point(537, 56)
197
+        Me.人民幣支票_tb.Location = New System.Drawing.Point(527, 56)
198 198
         Me.人民幣支票_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
199 199
         Me.人民幣支票_tb.Name = "人民幣支票_tb"
200 200
         Me.人民幣支票_tb.Size = New System.Drawing.Size(85, 23)
@@ -204,7 +204,7 @@ Partial Class 財務_收支單一覽表
204 204
         '人民幣現金餘額_tb
205 205
         '
206 206
         Me.人民幣現金餘額_tb.ForeColor = System.Drawing.Color.Red
207
-        Me.人民幣現金餘額_tb.Location = New System.Drawing.Point(895, 56)
207
+        Me.人民幣現金餘額_tb.Location = New System.Drawing.Point(885, 56)
208 208
         Me.人民幣現金餘額_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
209 209
         Me.人民幣現金餘額_tb.Name = "人民幣現金餘額_tb"
210 210
         Me.人民幣現金餘額_tb.Size = New System.Drawing.Size(113, 23)
@@ -215,7 +215,7 @@ Partial Class 財務_收支單一覽表
215 215
         '
216 216
         Me.Label13.AutoSize = True
217 217
         Me.Label13.ForeColor = System.Drawing.Color.Red
218
-        Me.Label13.Location = New System.Drawing.Point(863, 60)
218
+        Me.Label13.Location = New System.Drawing.Point(853, 60)
219 219
         Me.Label13.Name = "Label13"
220 220
         Me.Label13.Size = New System.Drawing.Size(32, 16)
221 221
         Me.Label13.TabIndex = 1213
@@ -224,7 +224,7 @@ Partial Class 財務_收支單一覽表
224 224
         '人民幣支出_tb
225 225
         '
226 226
         Me.人民幣支出_tb.ForeColor = System.Drawing.Color.Red
227
-        Me.人民幣支出_tb.Location = New System.Drawing.Point(776, 56)
227
+        Me.人民幣支出_tb.Location = New System.Drawing.Point(766, 56)
228 228
         Me.人民幣支出_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
229 229
         Me.人民幣支出_tb.Name = "人民幣支出_tb"
230 230
         Me.人民幣支出_tb.Size = New System.Drawing.Size(85, 23)
@@ -235,7 +235,7 @@ Partial Class 財務_收支單一覽表
235 235
         '
236 236
         Me.Label16.AutoSize = True
237 237
         Me.Label16.ForeColor = System.Drawing.Color.Red
238
-        Me.Label16.Location = New System.Drawing.Point(744, 59)
238
+        Me.Label16.Location = New System.Drawing.Point(734, 59)
239 239
         Me.Label16.Name = "Label16"
240 240
         Me.Label16.Size = New System.Drawing.Size(32, 16)
241 241
         Me.Label16.TabIndex = 1211
@@ -244,7 +244,7 @@ Partial Class 財務_收支單一覽表
244 244
         '人民幣現金_tb
245 245
         '
246 246
         Me.人民幣現金_tb.ForeColor = System.Drawing.Color.Red
247
-        Me.人民幣現金_tb.Location = New System.Drawing.Point(657, 56)
247
+        Me.人民幣現金_tb.Location = New System.Drawing.Point(647, 56)
248 248
         Me.人民幣現金_tb.Name = "人民幣現金_tb"
249 249
         Me.人民幣現金_tb.Size = New System.Drawing.Size(85, 23)
250 250
         Me.人民幣現金_tb.TabIndex = 1210
@@ -254,7 +254,7 @@ Partial Class 財務_收支單一覽表
254 254
         '
255 255
         Me.Label17.AutoSize = True
256 256
         Me.Label17.ForeColor = System.Drawing.Color.Red
257
-        Me.Label17.Location = New System.Drawing.Point(624, 59)
257
+        Me.Label17.Location = New System.Drawing.Point(614, 59)
258 258
         Me.Label17.Name = "Label17"
259 259
         Me.Label17.Size = New System.Drawing.Size(32, 16)
260 260
         Me.Label17.TabIndex = 1209
@@ -264,7 +264,7 @@ Partial Class 財務_收支單一覽表
264 264
         '
265 265
         Me.圖片編碼_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
266 266
         Me.圖片編碼_tb.ForeColor = System.Drawing.Color.Blue
267
-        Me.圖片編碼_tb.Location = New System.Drawing.Point(203, 596)
267
+        Me.圖片編碼_tb.Location = New System.Drawing.Point(190, 605)
268 268
         Me.圖片編碼_tb.Name = "圖片編碼_tb"
269 269
         Me.圖片編碼_tb.Size = New System.Drawing.Size(128, 23)
270 270
         Me.圖片編碼_tb.TabIndex = 1208
@@ -274,7 +274,7 @@ Partial Class 財務_收支單一覽表
274 274
         '
275 275
         Me.驗證碼_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
276 276
         Me.驗證碼_tb.ForeColor = System.Drawing.Color.Blue
277
-        Me.驗證碼_tb.Location = New System.Drawing.Point(204, 572)
277
+        Me.驗證碼_tb.Location = New System.Drawing.Point(191, 581)
278 278
         Me.驗證碼_tb.Name = "驗證碼_tb"
279 279
         Me.驗證碼_tb.Size = New System.Drawing.Size(127, 23)
280 280
         Me.驗證碼_tb.TabIndex = 1207
@@ -285,7 +285,7 @@ Partial Class 財務_收支單一覽表
285 285
         Me.Label20.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
286 286
         Me.Label20.AutoSize = True
287 287
         Me.Label20.ForeColor = System.Drawing.Color.Blue
288
-        Me.Label20.Location = New System.Drawing.Point(147, 599)
288
+        Me.Label20.Location = New System.Drawing.Point(134, 608)
289 289
         Me.Label20.Name = "Label20"
290 290
         Me.Label20.Size = New System.Drawing.Size(56, 16)
291 291
         Me.Label20.TabIndex = 1206
@@ -296,7 +296,7 @@ Partial Class 財務_收支單一覽表
296 296
         Me.Label19.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
297 297
         Me.Label19.AutoSize = True
298 298
         Me.Label19.ForeColor = System.Drawing.Color.Blue
299
-        Me.Label19.Location = New System.Drawing.Point(147, 575)
299
+        Me.Label19.Location = New System.Drawing.Point(134, 584)
300 300
         Me.Label19.Name = "Label19"
301 301
         Me.Label19.Size = New System.Drawing.Size(44, 16)
302 302
         Me.Label19.TabIndex = 1205
@@ -307,7 +307,7 @@ Partial Class 財務_收支單一覽表
307 307
         Me.簽名圖_pb.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
308 308
         Me.簽名圖_pb.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch
309 309
         Me.簽名圖_pb.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
310
-        Me.簽名圖_pb.Location = New System.Drawing.Point(15, 572)
310
+        Me.簽名圖_pb.Location = New System.Drawing.Point(2, 581)
311 311
         Me.簽名圖_pb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
312 312
         Me.簽名圖_pb.Name = "簽名圖_pb"
313 313
         Me.簽名圖_pb.Size = New System.Drawing.Size(129, 47)
@@ -317,7 +317,7 @@ Partial Class 財務_收支單一覽表
317 317
         '彙總_rb
318 318
         '
319 319
         Me.彙總_rb.AutoSize = True
320
-        Me.彙總_rb.Location = New System.Drawing.Point(278, 7)
320
+        Me.彙總_rb.Location = New System.Drawing.Point(265, 3)
321 321
         Me.彙總_rb.Name = "彙總_rb"
322 322
         Me.彙總_rb.Size = New System.Drawing.Size(50, 20)
323 323
         Me.彙總_rb.TabIndex = 1203
@@ -328,7 +328,7 @@ Partial Class 財務_收支單一覽表
328 328
         '明細_rb
329 329
         '
330 330
         Me.明細_rb.AutoSize = True
331
-        Me.明細_rb.Location = New System.Drawing.Point(222, 7)
331
+        Me.明細_rb.Location = New System.Drawing.Point(209, 3)
332 332
         Me.明細_rb.Name = "明細_rb"
333 333
         Me.明細_rb.Size = New System.Drawing.Size(50, 20)
334 334
         Me.明細_rb.TabIndex = 1202
@@ -340,7 +340,7 @@ Partial Class 財務_收支單一覽表
340 340
         '
341 341
         Me.Label14.AutoSize = True
342 342
         Me.Label14.ForeColor = System.Drawing.Color.Green
343
-        Me.Label14.Location = New System.Drawing.Point(504, 33)
343
+        Me.Label14.Location = New System.Drawing.Point(494, 33)
344 344
         Me.Label14.Name = "Label14"
345 345
         Me.Label14.Size = New System.Drawing.Size(32, 16)
346 346
         Me.Label14.TabIndex = 1200
@@ -349,7 +349,7 @@ Partial Class 財務_收支單一覽表
349 349
         '台幣零用金_tb
350 350
         '
351 351
         Me.台幣零用金_tb.ForeColor = System.Drawing.Color.Green
352
-        Me.台幣零用金_tb.Location = New System.Drawing.Point(417, 30)
352
+        Me.台幣零用金_tb.Location = New System.Drawing.Point(407, 30)
353 353
         Me.台幣零用金_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
354 354
         Me.台幣零用金_tb.Name = "台幣零用金_tb"
355 355
         Me.台幣零用金_tb.Size = New System.Drawing.Size(85, 23)
@@ -360,7 +360,7 @@ Partial Class 財務_收支單一覽表
360 360
         '
361 361
         Me.Label15.AutoSize = True
362 362
         Me.Label15.ForeColor = System.Drawing.Color.Green
363
-        Me.Label15.Location = New System.Drawing.Point(339, 34)
363
+        Me.Label15.Location = New System.Drawing.Point(329, 34)
364 364
         Me.Label15.Name = "Label15"
365 365
         Me.Label15.Size = New System.Drawing.Size(79, 16)
366 366
         Me.Label15.TabIndex = 1198
@@ -369,7 +369,7 @@ Partial Class 財務_收支單一覽表
369 369
         '台幣支票_tb
370 370
         '
371 371
         Me.台幣支票_tb.ForeColor = System.Drawing.Color.Green
372
-        Me.台幣支票_tb.Location = New System.Drawing.Point(537, 30)
372
+        Me.台幣支票_tb.Location = New System.Drawing.Point(527, 30)
373 373
         Me.台幣支票_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
374 374
         Me.台幣支票_tb.Name = "台幣支票_tb"
375 375
         Me.台幣支票_tb.Size = New System.Drawing.Size(85, 23)
@@ -379,7 +379,7 @@ Partial Class 財務_收支單一覽表
379 379
         '台幣現金餘額_tb
380 380
         '
381 381
         Me.台幣現金餘額_tb.ForeColor = System.Drawing.Color.Green
382
-        Me.台幣現金餘額_tb.Location = New System.Drawing.Point(895, 30)
382
+        Me.台幣現金餘額_tb.Location = New System.Drawing.Point(885, 30)
383 383
         Me.台幣現金餘額_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
384 384
         Me.台幣現金餘額_tb.Name = "台幣現金餘額_tb"
385 385
         Me.台幣現金餘額_tb.Size = New System.Drawing.Size(113, 23)
@@ -390,7 +390,7 @@ Partial Class 財務_收支單一覽表
390 390
         '
391 391
         Me.Label9.AutoSize = True
392 392
         Me.Label9.ForeColor = System.Drawing.Color.Green
393
-        Me.Label9.Location = New System.Drawing.Point(863, 34)
393
+        Me.Label9.Location = New System.Drawing.Point(853, 34)
394 394
         Me.Label9.Name = "Label9"
395 395
         Me.Label9.Size = New System.Drawing.Size(32, 16)
396 396
         Me.Label9.TabIndex = 1196
@@ -399,7 +399,7 @@ Partial Class 財務_收支單一覽表
399 399
         '台幣支出_tb
400 400
         '
401 401
         Me.台幣支出_tb.ForeColor = System.Drawing.Color.Green
402
-        Me.台幣支出_tb.Location = New System.Drawing.Point(776, 30)
402
+        Me.台幣支出_tb.Location = New System.Drawing.Point(766, 30)
403 403
         Me.台幣支出_tb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
404 404
         Me.台幣支出_tb.Name = "台幣支出_tb"
405 405
         Me.台幣支出_tb.Size = New System.Drawing.Size(85, 23)
@@ -410,7 +410,7 @@ Partial Class 財務_收支單一覽表
410 410
         '
411 411
         Me.Label11.AutoSize = True
412 412
         Me.Label11.ForeColor = System.Drawing.Color.Green
413
-        Me.Label11.Location = New System.Drawing.Point(745, 33)
413
+        Me.Label11.Location = New System.Drawing.Point(735, 33)
414 414
         Me.Label11.Name = "Label11"
415 415
         Me.Label11.Size = New System.Drawing.Size(32, 16)
416 416
         Me.Label11.TabIndex = 1194
@@ -420,7 +420,7 @@ Partial Class 財務_收支單一覽表
420 420
         '
421 421
         Me.當月_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
422 422
         Me.當月_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
423
-        Me.當月_bt.Location = New System.Drawing.Point(286, 29)
423
+        Me.當月_bt.Location = New System.Drawing.Point(273, 25)
424 424
         Me.當月_bt.Name = "當月_bt"
425 425
         Me.當月_bt.Size = New System.Drawing.Size(45, 25)
426 426
         Me.當月_bt.TabIndex = 1193
@@ -431,7 +431,7 @@ Partial Class 財務_收支單一覽表
431 431
         '
432 432
         Me.當日_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
433 433
         Me.當日_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
434
-        Me.當日_bt.Location = New System.Drawing.Point(232, 29)
434
+        Me.當日_bt.Location = New System.Drawing.Point(219, 25)
435 435
         Me.當日_bt.Name = "當日_bt"
436 436
         Me.當日_bt.Size = New System.Drawing.Size(45, 25)
437 437
         Me.當日_bt.TabIndex = 1192
@@ -441,7 +441,7 @@ Partial Class 財務_收支單一覽表
441 441
         'Label4
442 442
         '
443 443
         Me.Label4.AutoSize = True
444
-        Me.Label4.Location = New System.Drawing.Point(112, 34)
444
+        Me.Label4.Location = New System.Drawing.Point(99, 30)
445 445
         Me.Label4.Name = "Label4"
446 446
         Me.Label4.Size = New System.Drawing.Size(20, 16)
447 447
         Me.Label4.TabIndex = 1191
@@ -450,7 +450,7 @@ Partial Class 財務_收支單一覽表
450 450
         '結束日期_dtp
451 451
         '
452 452
         Me.結束日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
453
-        Me.結束日期_dtp.Location = New System.Drawing.Point(135, 30)
453
+        Me.結束日期_dtp.Location = New System.Drawing.Point(122, 26)
454 454
         Me.結束日期_dtp.Name = "結束日期_dtp"
455 455
         Me.結束日期_dtp.Size = New System.Drawing.Size(91, 23)
456 456
         Me.結束日期_dtp.TabIndex = 1190
@@ -458,7 +458,7 @@ Partial Class 財務_收支單一覽表
458 458
         '開始日期_dtp
459 459
         '
460 460
         Me.開始日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
461
-        Me.開始日期_dtp.Location = New System.Drawing.Point(15, 30)
461
+        Me.開始日期_dtp.Location = New System.Drawing.Point(2, 26)
462 462
         Me.開始日期_dtp.Name = "開始日期_dtp"
463 463
         Me.開始日期_dtp.Size = New System.Drawing.Size(91, 23)
464 464
         Me.開始日期_dtp.TabIndex = 1189
@@ -466,7 +466,7 @@ Partial Class 財務_收支單一覽表
466 466
         '台幣現金_tb
467 467
         '
468 468
         Me.台幣現金_tb.ForeColor = System.Drawing.Color.Green
469
-        Me.台幣現金_tb.Location = New System.Drawing.Point(657, 30)
469
+        Me.台幣現金_tb.Location = New System.Drawing.Point(647, 30)
470 470
         Me.台幣現金_tb.Name = "台幣現金_tb"
471 471
         Me.台幣現金_tb.Size = New System.Drawing.Size(85, 23)
472 472
         Me.台幣現金_tb.TabIndex = 1188
@@ -476,7 +476,7 @@ Partial Class 財務_收支單一覽表
476 476
         '
477 477
         Me.Label10.AutoSize = True
478 478
         Me.Label10.ForeColor = System.Drawing.Color.Green
479
-        Me.Label10.Location = New System.Drawing.Point(625, 33)
479
+        Me.Label10.Location = New System.Drawing.Point(615, 33)
480 480
         Me.Label10.Name = "Label10"
481 481
         Me.Label10.Size = New System.Drawing.Size(32, 16)
482 482
         Me.Label10.TabIndex = 1187
@@ -486,7 +486,7 @@ Partial Class 財務_收支單一覽表
486 486
         '
487 487
         Me.支付單列印成EXCEL.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
488 488
         Me.支付單列印成EXCEL.ForeColor = System.Drawing.Color.Blue
489
-        Me.支付單列印成EXCEL.Location = New System.Drawing.Point(1010, 29)
489
+        Me.支付單列印成EXCEL.Location = New System.Drawing.Point(1000, 29)
490 490
         Me.支付單列印成EXCEL.Name = "支付單列印成EXCEL"
491 491
         Me.支付單列印成EXCEL.Size = New System.Drawing.Size(79, 51)
492 492
         Me.支付單列印成EXCEL.TabIndex = 1186
@@ -497,7 +497,7 @@ Partial Class 財務_收支單一覽表
497 497
         '
498 498
         Me.Label8.AutoSize = True
499 499
         Me.Label8.ForeColor = System.Drawing.Color.Blue
500
-        Me.Label8.Location = New System.Drawing.Point(957, 7)
500
+        Me.Label8.Location = New System.Drawing.Point(947, 7)
501 501
         Me.Label8.Name = "Label8"
502 502
         Me.Label8.Size = New System.Drawing.Size(32, 16)
503 503
         Me.Label8.TabIndex = 1185
@@ -507,7 +507,7 @@ Partial Class 財務_收支單一覽表
507 507
         '
508 508
         Me.Label7.AutoSize = True
509 509
         Me.Label7.ForeColor = System.Drawing.Color.Blue
510
-        Me.Label7.Location = New System.Drawing.Point(697, 7)
510
+        Me.Label7.Location = New System.Drawing.Point(687, 7)
511 511
         Me.Label7.Name = "Label7"
512 512
         Me.Label7.Size = New System.Drawing.Size(32, 16)
513 513
         Me.Label7.TabIndex = 1184
@@ -516,7 +516,7 @@ Partial Class 財務_收支單一覽表
516 516
         '審核日期_dtp
517 517
         '
518 518
         Me.審核日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
519
-        Me.審核日期_dtp.Location = New System.Drawing.Point(989, 4)
519
+        Me.審核日期_dtp.Location = New System.Drawing.Point(979, 4)
520 520
         Me.審核日期_dtp.Name = "審核日期_dtp"
521 521
         Me.審核日期_dtp.Size = New System.Drawing.Size(99, 23)
522 522
         Me.審核日期_dtp.TabIndex = 1183
@@ -524,7 +524,7 @@ Partial Class 財務_收支單一覽表
524 524
         '申請日期_dtp
525 525
         '
526 526
         Me.申請日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
527
-        Me.申請日期_dtp.Location = New System.Drawing.Point(729, 4)
527
+        Me.申請日期_dtp.Location = New System.Drawing.Point(719, 4)
528 528
         Me.申請日期_dtp.Name = "申請日期_dtp"
529 529
         Me.申請日期_dtp.Size = New System.Drawing.Size(99, 23)
530 530
         Me.申請日期_dtp.TabIndex = 1182
@@ -533,7 +533,7 @@ Partial Class 財務_收支單一覽表
533 533
         '
534 534
         Me.Label5.AutoSize = True
535 535
         Me.Label5.ForeColor = System.Drawing.Color.Blue
536
-        Me.Label5.Location = New System.Drawing.Point(834, 7)
536
+        Me.Label5.Location = New System.Drawing.Point(824, 7)
537 537
         Me.Label5.Name = "Label5"
538 538
         Me.Label5.Size = New System.Drawing.Size(44, 16)
539 539
         Me.Label5.TabIndex = 1181
@@ -542,7 +542,7 @@ Partial Class 財務_收支單一覽表
542 542
         '審核人_tb
543 543
         '
544 544
         Me.審核人_tb.ForeColor = System.Drawing.Color.Blue
545
-        Me.審核人_tb.Location = New System.Drawing.Point(878, 4)
545
+        Me.審核人_tb.Location = New System.Drawing.Point(868, 4)
546 546
         Me.審核人_tb.Name = "審核人_tb"
547 547
         Me.審核人_tb.Size = New System.Drawing.Size(74, 23)
548 548
         Me.審核人_tb.TabIndex = 1180
@@ -550,7 +550,7 @@ Partial Class 財務_收支單一覽表
550 550
         '申請人_tb
551 551
         '
552 552
         Me.申請人_tb.ForeColor = System.Drawing.Color.Blue
553
-        Me.申請人_tb.Location = New System.Drawing.Point(617, 4)
553
+        Me.申請人_tb.Location = New System.Drawing.Point(607, 4)
554 554
         Me.申請人_tb.Name = "申請人_tb"
555 555
         Me.申請人_tb.Size = New System.Drawing.Size(74, 23)
556 556
         Me.申請人_tb.TabIndex = 1177
@@ -558,7 +558,7 @@ Partial Class 財務_收支單一覽表
558 558
         '收支單號_tb
559 559
         '
560 560
         Me.收支單號_tb.ForeColor = System.Drawing.Color.Blue
561
-        Me.收支單號_tb.Location = New System.Drawing.Point(417, 4)
561
+        Me.收支單號_tb.Location = New System.Drawing.Point(407, 4)
562 562
         Me.收支單號_tb.Name = "收支單號_tb"
563 563
         Me.收支單號_tb.Size = New System.Drawing.Size(150, 23)
564 564
         Me.收支單號_tb.TabIndex = 1175
@@ -566,7 +566,7 @@ Partial Class 財務_收支單一覽表
566 566
         'Label6
567 567
         '
568 568
         Me.Label6.AutoSize = True
569
-        Me.Label6.Location = New System.Drawing.Point(12, 9)
569
+        Me.Label6.Location = New System.Drawing.Point(-1, 5)
570 570
         Me.Label6.Name = "Label6"
571 571
         Me.Label6.Size = New System.Drawing.Size(140, 16)
572 572
         Me.Label6.TabIndex = 1174
@@ -574,24 +574,25 @@ Partial Class 財務_收支單一覽表
574 574
         '
575 575
         '單據彙總_dgv
576 576
         '
577
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
578
-        Me.單據彙總_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
577
+        DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
578
+        Me.單據彙總_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17
579 579
         Me.單據彙總_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
580 580
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
581 581
         Me.單據彙總_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
582
+        Me.單據彙總_dgv.BackgroundColor = System.Drawing.Color.White
582 583
         Me.單據彙總_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
583
-        Me.單據彙總_dgv.Location = New System.Drawing.Point(16, 82)
584
+        Me.單據彙總_dgv.Location = New System.Drawing.Point(3, 78)
584 585
         Me.單據彙總_dgv.Name = "單據彙總_dgv"
585 586
         Me.單據彙總_dgv.RowHeadersWidth = 5
586 587
         Me.單據彙總_dgv.RowTemplate.Height = 24
587
-        Me.單據彙總_dgv.Size = New System.Drawing.Size(315, 483)
588
+        Me.單據彙總_dgv.Size = New System.Drawing.Size(315, 499)
588 589
         Me.單據彙總_dgv.TabIndex = 1173
589 590
         '
590 591
         'Label1
591 592
         '
592 593
         Me.Label1.AutoSize = True
593 594
         Me.Label1.ForeColor = System.Drawing.Color.Blue
594
-        Me.Label1.Location = New System.Drawing.Point(336, 7)
595
+        Me.Label1.Location = New System.Drawing.Point(326, 7)
595 596
         Me.Label1.Name = "Label1"
596 597
         Me.Label1.Size = New System.Drawing.Size(80, 16)
597 598
         Me.Label1.TabIndex = 1176
@@ -601,7 +602,7 @@ Partial Class 財務_收支單一覽表
601 602
         '
602 603
         Me.Label3.AutoSize = True
603 604
         Me.Label3.ForeColor = System.Drawing.Color.Blue
604
-        Me.Label3.Location = New System.Drawing.Point(573, 7)
605
+        Me.Label3.Location = New System.Drawing.Point(563, 7)
605 606
         Me.Label3.Name = "Label3"
606 607
         Me.Label3.Size = New System.Drawing.Size(44, 16)
607 608
         Me.Label3.TabIndex = 1178
@@ -609,39 +610,41 @@ Partial Class 財務_收支單一覽表
609 610
         '
610 611
         '明細_dgv
611 612
         '
612
-        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
613
-        Me.明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
613
+        DataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
614
+        Me.明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle18
614 615
         Me.明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
615 616
             Or System.Windows.Forms.AnchorStyles.Left) _
616 617
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
617 618
         Me.明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
619
+        Me.明細_dgv.BackgroundColor = System.Drawing.Color.White
618 620
         Me.明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
619
-        Me.明細_dgv.Location = New System.Drawing.Point(342, 82)
621
+        Me.明細_dgv.Location = New System.Drawing.Point(321, 82)
620 622
         Me.明細_dgv.Name = "明細_dgv"
621 623
         Me.明細_dgv.RowHeadersWidth = 5
622
-        DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
623
-        Me.明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle3
624
+        DataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
625
+        Me.明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle19
624 626
         Me.明細_dgv.RowTemplate.Height = 24
625
-        Me.明細_dgv.Size = New System.Drawing.Size(1045, 537)
627
+        Me.明細_dgv.Size = New System.Drawing.Size(1075, 546)
626 628
         Me.明細_dgv.TabIndex = 1179
627 629
         '
628 630
         '財務彙總_dgv
629 631
         '
630
-        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
631
-        Me.財務彙總_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
632
+        DataGridViewCellStyle20.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
633
+        Me.財務彙總_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle20
632 634
         Me.財務彙總_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
633 635
             Or System.Windows.Forms.AnchorStyles.Left) _
634 636
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
635 637
         Me.財務彙總_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
638
+        Me.財務彙總_dgv.BackgroundColor = System.Drawing.Color.White
636 639
         Me.財務彙總_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
637
-        Me.財務彙總_dgv.Location = New System.Drawing.Point(342, 82)
640
+        Me.財務彙總_dgv.Location = New System.Drawing.Point(321, 82)
638 641
         Me.財務彙總_dgv.Name = "財務彙總_dgv"
639 642
         Me.財務彙總_dgv.RowHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None
640 643
         Me.財務彙總_dgv.RowHeadersWidth = 5
641
-        DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
642
-        Me.財務彙總_dgv.RowsDefaultCellStyle = DataGridViewCellStyle5
644
+        DataGridViewCellStyle21.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
645
+        Me.財務彙總_dgv.RowsDefaultCellStyle = DataGridViewCellStyle21
643 646
         Me.財務彙總_dgv.RowTemplate.Height = 24
644
-        Me.財務彙總_dgv.Size = New System.Drawing.Size(1045, 537)
647
+        Me.財務彙總_dgv.Size = New System.Drawing.Size(1075, 546)
645 648
         Me.財務彙總_dgv.TabIndex = 1224
646 649
         '
647 650
         '字體大小調整_lb
@@ -652,7 +655,7 @@ Partial Class 財務_收支單一覽表
652 655
         Me.字體大小調整_lb.Font = New System.Drawing.Font("微軟正黑體", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
653 656
         Me.字體大小調整_lb.ForeColor = System.Drawing.Color.Brown
654 657
         Me.字體大小調整_lb.ImeMode = System.Windows.Forms.ImeMode.NoControl
655
-        Me.字體大小調整_lb.Location = New System.Drawing.Point(1153, 58)
658
+        Me.字體大小調整_lb.Location = New System.Drawing.Point(1143, 58)
656 659
         Me.字體大小調整_lb.Name = "字體大小調整_lb"
657 660
         Me.字體大小調整_lb.Size = New System.Drawing.Size(60, 17)
658 661
         Me.字體大小調整_lb.TabIndex = 1495
@@ -664,7 +667,7 @@ Partial Class 財務_收支單一覽表
664 667
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
665 668
         Me.字體_NUD.DecimalPlaces = 1
666 669
         Me.字體_NUD.Increment = New Decimal(New Integer() {1, 0, 0, 65536})
667
-        Me.字體_NUD.Location = New System.Drawing.Point(1214, 55)
670
+        Me.字體_NUD.Location = New System.Drawing.Point(1204, 55)
668 671
         Me.字體_NUD.Maximum = New Decimal(New Integer() {18, 0, 0, 0})
669 672
         Me.字體_NUD.Minimum = New Decimal(New Integer() {6, 0, 0, 0})
670 673
         Me.字體_NUD.Name = "字體_NUD"
@@ -675,7 +678,7 @@ Partial Class 財務_收支單一覽表
675 678
         '非稅_ch
676 679
         '
677 680
         Me.非稅_ch.AutoSize = True
678
-        Me.非稅_ch.Location = New System.Drawing.Point(1096, 56)
681
+        Me.非稅_ch.Location = New System.Drawing.Point(1086, 56)
679 682
         Me.非稅_ch.Name = "非稅_ch"
680 683
         Me.非稅_ch.Size = New System.Drawing.Size(51, 20)
681 684
         Me.非稅_ch.TabIndex = 1498
@@ -685,7 +688,7 @@ Partial Class 財務_收支單一覽表
685 688
         '含稅_ch
686 689
         '
687 690
         Me.含稅_ch.AutoSize = True
688
-        Me.含稅_ch.Location = New System.Drawing.Point(1095, 30)
691
+        Me.含稅_ch.Location = New System.Drawing.Point(1085, 30)
689 692
         Me.含稅_ch.Name = "含稅_ch"
690 693
         Me.含稅_ch.Size = New System.Drawing.Size(51, 20)
691 694
         Me.含稅_ch.TabIndex = 1497
@@ -697,7 +700,7 @@ Partial Class 財務_收支單一覽表
697 700
         Me.全部_ch.AutoSize = True
698 701
         Me.全部_ch.Checked = True
699 702
         Me.全部_ch.CheckState = System.Windows.Forms.CheckState.Checked
700
-        Me.全部_ch.Location = New System.Drawing.Point(1095, 4)
703
+        Me.全部_ch.Location = New System.Drawing.Point(1085, 4)
701 704
         Me.全部_ch.Name = "全部_ch"
702 705
         Me.全部_ch.Size = New System.Drawing.Size(51, 20)
703 706
         Me.全部_ch.TabIndex = 1496
@@ -709,6 +712,7 @@ Partial Class 財務_收支單一覽表
709 712
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
710 713
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
711 714
         Me.ClientSize = New System.Drawing.Size(1399, 631)
715
+        Me.Controls.Add(Me.單據彙總_dgv)
712 716
         Me.Controls.Add(Me.非稅_ch)
713 717
         Me.Controls.Add(Me.含稅_ch)
714 718
         Me.Controls.Add(Me.全部_ch)
@@ -763,11 +767,10 @@ Partial Class 財務_收支單一覽表
763 767
         Me.Controls.Add(Me.Label6)
764 768
         Me.Controls.Add(Me.Label1)
765 769
         Me.Controls.Add(Me.Label3)
766
-        Me.Controls.Add(Me.單據彙總_dgv)
767 770
         Me.Controls.Add(Me.明細_dgv)
768 771
         Me.Controls.Add(Me.財務彙總_dgv)
769 772
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
770
-        Me.ForeColor = System.Drawing.Color.CornflowerBlue
773
+        Me.ForeColor = System.Drawing.Color.Black
771 774
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
772 775
         Me.Name = "財務_收支單一覽表"
773 776
         Me.Text = "財務收支單一覽表"

+ 10
- 5
YD-ERP-SYS/財務系統管理/財務_收支單一覽表.vb Переглянути файл

@@ -106,12 +106,15 @@ Public Class 財務_收支單一覽表
106 106
                 人民幣支票_tb.Text = Val(人民幣支票_tb.Text) + 明細_dgv.Rows(i).Cells("支票").Value
107 107
             End If
108 108
         Next i
109
-        台幣現金餘額_tb.Text = Val(台幣零用金_tb.Text) + Val(台幣現金_tb.Text) - Val(台幣支出_tb.Text) : 人民幣現金餘額_tb.Text = Val(人民幣零用金_tb.Text) + Val(人民幣現金_tb.Text) - Val(人民幣支出_tb.Text)
109
+        台幣現金餘額_tb.Text = Val(台幣零用金_tb.Text) + Val(台幣現金_tb.Text) - Val(台幣支出_tb.Text)
110
+        人民幣現金餘額_tb.Text = Val(人民幣零用金_tb.Text) + Val(人民幣現金_tb.Text) - Val(人民幣支出_tb.Text)
110 111
         If Val(台幣現金餘額_tb.Text) > 0 Then : 台幣現金餘額_tb.ForeColor = Color.Blue : Else : 台幣現金餘額_tb.ForeColor = Color.Red : End If
111 112
         If Val(人民幣現金餘額_tb.Text) > 0 Then : 人民幣現金餘額_tb.ForeColor = Color.Blue : Else : 台幣現金餘額_tb.ForeColor = Color.Red : End If
112
-        台幣現金_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")
113
+        台幣現金_tb.Text = Strings.Format(Val(台幣現金_tb.Text), "#,##0.00") : 台幣支出_tb.Text = Strings.Format(Val(台幣支出_tb.Text), "#,##0.00")
114
+        台幣現金餘額_tb.Text = Strings.Format(Val(台幣現金餘額_tb.Text), "#,##0.00")
113 115
         台幣零用金_tb.Text = Strings.Format(Val(台幣零用金_tb.Text), "#,##0.00") : 台幣支票_tb.Text = Strings.Format(Val(台幣支票_tb.Text), "#,##0.00")
114
-        人民幣零用金_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")
116
+        人民幣零用金_tb.Text = Strings.Format(Val(人民幣零用金_tb.Text), "#,##0.00") : 人民幣支票_tb.Text = Strings.Format(Val(人民幣支票_tb.Text), "#,##0.00")
117
+        人民幣現金_tb.Text = Strings.Format(Val(人民幣現金_tb.Text), "#,##0.00")
115 118
         人民幣支出_tb.Text = Strings.Format(Val(人民幣支出_tb.Text), "#,##0.00") : 人民幣現金餘額_tb.Text = Strings.Format(Val(人民幣現金餘額_tb.Text), "#,##0.00")
116 119
     End Sub
117 120
     Private Sub 日期格式()
@@ -244,9 +247,11 @@ Public Class 財務_收支單一覽表
244 247
             台幣現金餘額_tb.Text = Val(台幣零用金_tb.Text) + Val(台幣現金_tb.Text) - Val(台幣支出_tb.Text) : 人民幣現金餘額_tb.Text = Val(人民幣零用金_tb.Text) + Val(人民幣現金_tb.Text) - Val(人民幣支出_tb.Text)
245 248
             If Val(台幣現金餘額_tb.Text) > 0 Then : 台幣現金餘額_tb.ForeColor = Color.Blue : Else : 台幣現金餘額_tb.ForeColor = Color.Red : End If
246 249
             If Val(人民幣現金餘額_tb.Text) > 0 Then : 人民幣現金餘額_tb.ForeColor = Color.Blue : Else : 台幣現金餘額_tb.ForeColor = Color.Red : End If
247
-            台幣現金_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")
250
+            台幣現金_tb.Text = Strings.Format(Val(台幣現金_tb.Text), "#,##0.00") : 台幣支出_tb.Text = Strings.Format(Val(台幣支出_tb.Text), "#,##0.00")
251
+            台幣現金餘額_tb.Text = Strings.Format(Val(台幣現金餘額_tb.Text), "#,##0.00")
248 252
             台幣零用金_tb.Text = Strings.Format(Val(台幣零用金_tb.Text), "#,##0.00") : 台幣支票_tb.Text = Strings.Format(Val(台幣支票_tb.Text), "#,##0.00")
249
-            人民幣零用金_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")
253
+            人民幣零用金_tb.Text = Strings.Format(Val(人民幣零用金_tb.Text), "#,##0.00") : 人民幣支票_tb.Text = Strings.Format(Val(人民幣支票_tb.Text), "#,##0.00")
254
+            人民幣現金_tb.Text = Strings.Format(Val(人民幣現金_tb.Text), "#,##0.00")
250 255
             人民幣支出_tb.Text = Strings.Format(Val(人民幣支出_tb.Text), "#,##0.00") : 人民幣現金餘額_tb.Text = Strings.Format(Val(人民幣現金餘額_tb.Text), "#,##0.00")
251 256
         End If
252 257
     End Sub

+ 173
- 58
YD-ERP-SYS/資料庫系統管理/系統編碼規則.Designer.vb Переглянути файл

@@ -22,13 +22,16 @@ 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
-        Me.Label3 = New System.Windows.Forms.Label()
25
+        Dim DataGridViewCellStyle21 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle22 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle23 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle24 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle25 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle26 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Dim DataGridViewCellStyle27 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
+        Dim DataGridViewCellStyle28 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
+        Dim DataGridViewCellStyle29 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
+        Dim DataGridViewCellStyle30 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32 35
         Me.GroupBox2 = New System.Windows.Forms.GroupBox()
33 36
         Me.級別修改_bt = New System.Windows.Forms.Button()
34 37
         Me.級別_cb = New System.Windows.Forms.ComboBox()
@@ -86,6 +89,13 @@ Partial Class 系統編碼規則
86 89
         Me.年份_tb = New System.Windows.Forms.TextBox()
87 90
         Me.字體大小調整_lb = New System.Windows.Forms.Label()
88 91
         Me.字體_NUD = New System.Windows.Forms.NumericUpDown()
92
+        Me.伺服器狀態2_dgv = New System.Windows.Forms.DataGridView()
93
+        Me.LOG檔截斷3_bt = New System.Windows.Forms.Button()
94
+        Me.Label3 = New System.Windows.Forms.Label()
95
+        Me.重新讀取_bt = New System.Windows.Forms.Button()
96
+        Me.伺服器_lb = New System.Windows.Forms.Label()
97
+        Me.MAX_nud = New System.Windows.Forms.NumericUpDown()
98
+        Me.資料庫清單1_dgv = New System.Windows.Forms.DataGridView()
89 99
         Me.GroupBox2.SuspendLayout()
90 100
         CType(Me.職稱_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
91 101
         Me.GroupBox1.SuspendLayout()
@@ -99,23 +109,13 @@ Partial Class 系統編碼規則
99 109
         Me.GroupBox6.SuspendLayout()
100 110
         CType(Me.年份_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
101 111
         CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).BeginInit()
112
+        CType(Me.伺服器狀態2_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
113
+        CType(Me.MAX_nud, System.ComponentModel.ISupportInitialize).BeginInit()
114
+        CType(Me.資料庫清單1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
102 115
         Me.SuspendLayout()
103 116
         '
104
-        'Label3
105
-        '
106
-        Me.Label3.AutoSize = True
107
-        Me.Label3.Font = New System.Drawing.Font("微軟正黑體", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
108
-        Me.Label3.ForeColor = System.Drawing.Color.Red
109
-        Me.Label3.Location = New System.Drawing.Point(2, 2)
110
-        Me.Label3.Name = "Label3"
111
-        Me.Label3.Size = New System.Drawing.Size(986, 34)
112
-        Me.Label3.TabIndex = 241
113
-        Me.Label3.Text = "*  編碼原則對於系統非常重要,如有更動需求請與系統開發商進行討論後再行修改"
114
-        '
115 117
         'GroupBox2
116 118
         '
117
-        Me.GroupBox2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
118
-            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
119 119
         Me.GroupBox2.Controls.Add(Me.級別修改_bt)
120 120
         Me.GroupBox2.Controls.Add(Me.級別_cb)
121 121
         Me.GroupBox2.Controls.Add(Me.Label32)
@@ -125,9 +125,9 @@ Partial Class 系統編碼規則
125 125
         Me.GroupBox2.Controls.Add(Me.職稱新增_bt)
126 126
         Me.GroupBox2.Controls.Add(Me.職稱刪除_bt)
127 127
         Me.GroupBox2.Controls.Add(Me.職稱_tb)
128
-        Me.GroupBox2.Location = New System.Drawing.Point(12, 39)
128
+        Me.GroupBox2.Location = New System.Drawing.Point(2, 1)
129 129
         Me.GroupBox2.Name = "GroupBox2"
130
-        Me.GroupBox2.Size = New System.Drawing.Size(210, 586)
130
+        Me.GroupBox2.Size = New System.Drawing.Size(210, 409)
131 131
         Me.GroupBox2.TabIndex = 242
132 132
         Me.GroupBox2.TabStop = False
133 133
         Me.GroupBox2.Text = "職稱清單管理"
@@ -164,8 +164,8 @@ Partial Class 系統編碼規則
164 164
         '
165 165
         '職稱_dgv
166 166
         '
167
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
168
-        Me.職稱_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
167
+        DataGridViewCellStyle21.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
168
+        Me.職稱_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle21
169 169
         Me.職稱_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
170 170
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
171 171
         Me.職稱_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -174,7 +174,7 @@ Partial Class 系統編碼規則
174 174
         Me.職稱_dgv.Name = "職稱_dgv"
175 175
         Me.職稱_dgv.RowHeadersWidth = 5
176 176
         Me.職稱_dgv.RowTemplate.Height = 24
177
-        Me.職稱_dgv.Size = New System.Drawing.Size(197, 484)
177
+        Me.職稱_dgv.Size = New System.Drawing.Size(197, 307)
178 178
         Me.職稱_dgv.TabIndex = 222
179 179
         '
180 180
         '職稱修改_bt
@@ -238,9 +238,9 @@ Partial Class 系統編碼規則
238 238
         Me.GroupBox1.Controls.Add(Me.地區碼新增_bt)
239 239
         Me.GroupBox1.Controls.Add(Me.地區碼刪除_bt)
240 240
         Me.GroupBox1.Controls.Add(Me.地區_tb)
241
-        Me.GroupBox1.Location = New System.Drawing.Point(228, 39)
241
+        Me.GroupBox1.Location = New System.Drawing.Point(216, 1)
242 242
         Me.GroupBox1.Name = "GroupBox1"
243
-        Me.GroupBox1.Size = New System.Drawing.Size(210, 586)
243
+        Me.GroupBox1.Size = New System.Drawing.Size(210, 675)
244 244
         Me.GroupBox1.TabIndex = 243
245 245
         Me.GroupBox1.TabStop = False
246 246
         Me.GroupBox1.Text = "地區碼管理"
@@ -266,8 +266,8 @@ Partial Class 系統編碼規則
266 266
         '
267 267
         '地區碼_dgv
268 268
         '
269
-        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
270
-        Me.地區碼_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
269
+        DataGridViewCellStyle22.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
270
+        Me.地區碼_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle22
271 271
         Me.地區碼_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
272 272
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
273 273
         Me.地區碼_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -276,7 +276,7 @@ Partial Class 系統編碼規則
276 276
         Me.地區碼_dgv.Name = "地區碼_dgv"
277 277
         Me.地區碼_dgv.RowHeadersWidth = 5
278 278
         Me.地區碼_dgv.RowTemplate.Height = 24
279
-        Me.地區碼_dgv.Size = New System.Drawing.Size(197, 510)
279
+        Me.地區碼_dgv.Size = New System.Drawing.Size(197, 599)
280 280
         Me.地區碼_dgv.TabIndex = 222
281 281
         '
282 282
         '地區碼修改_bt
@@ -340,9 +340,9 @@ Partial Class 系統編碼規則
340 340
         Me.GroupBox3.Controls.Add(Me.倉狀碼新增_bt)
341 341
         Me.GroupBox3.Controls.Add(Me.倉狀碼刪除_bt)
342 342
         Me.GroupBox3.Controls.Add(Me.倉儲狀態_tb)
343
-        Me.GroupBox3.Location = New System.Drawing.Point(444, 39)
343
+        Me.GroupBox3.Location = New System.Drawing.Point(2, 411)
344 344
         Me.GroupBox3.Name = "GroupBox3"
345
-        Me.GroupBox3.Size = New System.Drawing.Size(210, 586)
345
+        Me.GroupBox3.Size = New System.Drawing.Size(210, 265)
346 346
         Me.GroupBox3.TabIndex = 244
347 347
         Me.GroupBox3.TabStop = False
348 348
         Me.GroupBox3.Text = "倉儲狀態"
@@ -368,8 +368,8 @@ Partial Class 系統編碼規則
368 368
         '
369 369
         '倉儲狀態_dgv
370 370
         '
371
-        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
372
-        Me.倉儲狀態_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
371
+        DataGridViewCellStyle23.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
372
+        Me.倉儲狀態_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle23
373 373
         Me.倉儲狀態_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
374 374
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
375 375
         Me.倉儲狀態_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -378,7 +378,7 @@ Partial Class 系統編碼規則
378 378
         Me.倉儲狀態_dgv.Name = "倉儲狀態_dgv"
379 379
         Me.倉儲狀態_dgv.RowHeadersWidth = 5
380 380
         Me.倉儲狀態_dgv.RowTemplate.Height = 24
381
-        Me.倉儲狀態_dgv.Size = New System.Drawing.Size(197, 510)
381
+        Me.倉儲狀態_dgv.Size = New System.Drawing.Size(197, 189)
382 382
         Me.倉儲狀態_dgv.TabIndex = 222
383 383
         '
384 384
         '倉狀碼修改_bt
@@ -442,9 +442,9 @@ Partial Class 系統編碼規則
442 442
         Me.GroupBox4.Controls.Add(Me.料定新增_bt)
443 443
         Me.GroupBox4.Controls.Add(Me.料定刪除_bt)
444 444
         Me.GroupBox4.Controls.Add(Me.訂製內容_tb)
445
-        Me.GroupBox4.Location = New System.Drawing.Point(660, 39)
445
+        Me.GroupBox4.Location = New System.Drawing.Point(430, 411)
446 446
         Me.GroupBox4.Name = "GroupBox4"
447
-        Me.GroupBox4.Size = New System.Drawing.Size(276, 586)
447
+        Me.GroupBox4.Size = New System.Drawing.Size(276, 265)
448 448
         Me.GroupBox4.TabIndex = 245
449 449
         Me.GroupBox4.TabStop = False
450 450
         Me.GroupBox4.Text = "物料訂製狀態"
@@ -467,8 +467,8 @@ Partial Class 系統編碼規則
467 467
         '
468 468
         '料定狀態_dgv
469 469
         '
470
-        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
471
-        Me.料定狀態_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
470
+        DataGridViewCellStyle24.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
471
+        Me.料定狀態_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle24
472 472
         Me.料定狀態_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
473 473
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
474 474
         Me.料定狀態_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -477,7 +477,7 @@ Partial Class 系統編碼規則
477 477
         Me.料定狀態_dgv.Name = "料定狀態_dgv"
478 478
         Me.料定狀態_dgv.RowHeadersWidth = 5
479 479
         Me.料定狀態_dgv.RowTemplate.Height = 24
480
-        Me.料定狀態_dgv.Size = New System.Drawing.Size(262, 510)
480
+        Me.料定狀態_dgv.Size = New System.Drawing.Size(262, 189)
481 481
         Me.料定狀態_dgv.TabIndex = 222
482 482
         '
483 483
         '料定修改_bt
@@ -531,8 +531,6 @@ Partial Class 系統編碼規則
531 531
         '
532 532
         'GroupBox5
533 533
         '
534
-        Me.GroupBox5.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
535
-            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
536 534
         Me.GroupBox5.Controls.Add(Me.低售_tb)
537 535
         Me.GroupBox5.Controls.Add(Me.Label11)
538 536
         Me.GroupBox5.Controls.Add(Me.運費_tb)
@@ -543,9 +541,9 @@ Partial Class 系統編碼規則
543 541
         Me.GroupBox5.Controls.Add(Me.送貨新增_bt)
544 542
         Me.GroupBox5.Controls.Add(Me.送貨刪除_bt)
545 543
         Me.GroupBox5.Controls.Add(Me.地點_tb)
546
-        Me.GroupBox5.Location = New System.Drawing.Point(942, 39)
544
+        Me.GroupBox5.Location = New System.Drawing.Point(430, 1)
547 545
         Me.GroupBox5.Name = "GroupBox5"
548
-        Me.GroupBox5.Size = New System.Drawing.Size(276, 586)
546
+        Me.GroupBox5.Size = New System.Drawing.Size(276, 409)
549 547
         Me.GroupBox5.TabIndex = 246
550 548
         Me.GroupBox5.TabStop = False
551 549
         Me.GroupBox5.Text = "送貨起車參數"
@@ -584,8 +582,8 @@ Partial Class 系統編碼規則
584 582
         '
585 583
         '送貨運費_dgv
586 584
         '
587
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
588
-        Me.送貨運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
585
+        DataGridViewCellStyle25.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
586
+        Me.送貨運費_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle25
589 587
         Me.送貨運費_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
590 588
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
591 589
         Me.送貨運費_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -594,7 +592,7 @@ Partial Class 系統編碼規則
594 592
         Me.送貨運費_dgv.Name = "送貨運費_dgv"
595 593
         Me.送貨運費_dgv.RowHeadersWidth = 5
596 594
         Me.送貨運費_dgv.RowTemplate.Height = 24
597
-        Me.送貨運費_dgv.Size = New System.Drawing.Size(262, 484)
595
+        Me.送貨運費_dgv.Size = New System.Drawing.Size(262, 307)
598 596
         Me.送貨運費_dgv.TabIndex = 222
599 597
         '
600 598
         '送貨修改_bt
@@ -656,17 +654,17 @@ Partial Class 系統編碼規則
656 654
         Me.GroupBox6.Controls.Add(Me.年份_新增_bt)
657 655
         Me.GroupBox6.Controls.Add(Me.年份_刪除_bt)
658 656
         Me.GroupBox6.Controls.Add(Me.年份_tb)
659
-        Me.GroupBox6.Location = New System.Drawing.Point(1224, 39)
657
+        Me.GroupBox6.Location = New System.Drawing.Point(711, 161)
660 658
         Me.GroupBox6.Name = "GroupBox6"
661
-        Me.GroupBox6.Size = New System.Drawing.Size(99, 586)
659
+        Me.GroupBox6.Size = New System.Drawing.Size(99, 515)
662 660
         Me.GroupBox6.TabIndex = 681
663 661
         Me.GroupBox6.TabStop = False
664 662
         Me.GroupBox6.Text = "報表及對帳單年份清單"
665 663
         '
666 664
         '年份_dgv
667 665
         '
668
-        DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
669
-        Me.年份_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
666
+        DataGridViewCellStyle26.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
667
+        Me.年份_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle26
670 668
         Me.年份_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
671 669
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
672 670
         Me.年份_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -675,7 +673,7 @@ Partial Class 系統編碼規則
675 673
         Me.年份_dgv.Name = "年份_dgv"
676 674
         Me.年份_dgv.RowHeadersWidth = 5
677 675
         Me.年份_dgv.RowTemplate.Height = 24
678
-        Me.年份_dgv.Size = New System.Drawing.Size(86, 446)
676
+        Me.年份_dgv.Size = New System.Drawing.Size(86, 375)
679 677
         Me.年份_dgv.TabIndex = 222
680 678
         '
681 679
         '年份_修改_bt
@@ -729,11 +727,12 @@ Partial Class 系統編碼規則
729 727
         '
730 728
         '字體大小調整_lb
731 729
         '
730
+        Me.字體大小調整_lb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
732 731
         Me.字體大小調整_lb.AutoSize = True
733 732
         Me.字體大小調整_lb.Font = New System.Drawing.Font("微軟正黑體", 11.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
734 733
         Me.字體大小調整_lb.ForeColor = System.Drawing.Color.Brown
735 734
         Me.字體大小調整_lb.ImeMode = System.Windows.Forms.ImeMode.NoControl
736
-        Me.字體大小調整_lb.Location = New System.Drawing.Point(994, 9)
735
+        Me.字體大小調整_lb.Location = New System.Drawing.Point(1224, 4)
737 736
         Me.字體大小調整_lb.Name = "字體大小調整_lb"
738 737
         Me.字體大小調整_lb.Size = New System.Drawing.Size(69, 19)
739 738
         Me.字體大小調整_lb.TabIndex = 1497
@@ -741,7 +740,8 @@ Partial Class 系統編碼規則
741 740
         '
742 741
         '字體_NUD
743 742
         '
744
-        Me.字體_NUD.Location = New System.Drawing.Point(1065, 8)
743
+        Me.字體_NUD.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
744
+        Me.字體_NUD.Location = New System.Drawing.Point(1295, 3)
745 745
         Me.字體_NUD.Maximum = New Decimal(New Integer() {12, 0, 0, 0})
746 746
         Me.字體_NUD.Minimum = New Decimal(New Integer() {9, 0, 0, 0})
747 747
         Me.字體_NUD.Name = "字體_NUD"
@@ -749,11 +749,119 @@ Partial Class 系統編碼規則
749 749
         Me.字體_NUD.TabIndex = 1496
750 750
         Me.字體_NUD.Value = New Decimal(New Integer() {9, 0, 0, 0})
751 751
         '
752
+        '伺服器狀態2_dgv
753
+        '
754
+        DataGridViewCellStyle27.BackColor = System.Drawing.Color.White
755
+        Me.伺服器狀態2_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle27
756
+        Me.伺服器狀態2_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
757
+            Or System.Windows.Forms.AnchorStyles.Left) _
758
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
759
+        Me.伺服器狀態2_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
760
+        Me.伺服器狀態2_dgv.BackgroundColor = System.Drawing.Color.White
761
+        DataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
762
+        DataGridViewCellStyle28.BackColor = System.Drawing.Color.White
763
+        DataGridViewCellStyle28.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
764
+        DataGridViewCellStyle28.ForeColor = System.Drawing.SystemColors.WindowText
765
+        DataGridViewCellStyle28.SelectionBackColor = System.Drawing.SystemColors.Highlight
766
+        DataGridViewCellStyle28.SelectionForeColor = System.Drawing.SystemColors.HighlightText
767
+        DataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
768
+        Me.伺服器狀態2_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle28
769
+        Me.伺服器狀態2_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
770
+        Me.伺服器狀態2_dgv.Location = New System.Drawing.Point(711, 30)
771
+        Me.伺服器狀態2_dgv.Name = "伺服器狀態2_dgv"
772
+        Me.伺服器狀態2_dgv.RowHeadersWidth = 5
773
+        Me.伺服器狀態2_dgv.RowTemplate.Height = 24
774
+        Me.伺服器狀態2_dgv.Size = New System.Drawing.Size(634, 126)
775
+        Me.伺服器狀態2_dgv.TabIndex = 1498
776
+        '
777
+        'LOG檔截斷3_bt
778
+        '
779
+        Me.LOG檔截斷3_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
780
+        Me.LOG檔截斷3_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
781
+        Me.LOG檔截斷3_bt.Location = New System.Drawing.Point(770, 4)
782
+        Me.LOG檔截斷3_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
783
+        Me.LOG檔截斷3_bt.Name = "LOG檔截斷3_bt"
784
+        Me.LOG檔截斷3_bt.Size = New System.Drawing.Size(72, 23)
785
+        Me.LOG檔截斷3_bt.TabIndex = 1503
786
+        Me.LOG檔截斷3_bt.Text = "LOG檔截斷"
787
+        '
788
+        'Label3
789
+        '
790
+        Me.Label3.AutoSize = True
791
+        Me.Label3.BackColor = System.Drawing.SystemColors.Control
792
+        Me.Label3.Location = New System.Drawing.Point(712, 7)
793
+        Me.Label3.Name = "Label3"
794
+        Me.Label3.Size = New System.Drawing.Size(56, 16)
795
+        Me.Label3.TabIndex = 1502
796
+        Me.Label3.Text = "主伺服器"
797
+        '
798
+        '重新讀取_bt
799
+        '
800
+        Me.重新讀取_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(0, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
801
+        Me.重新讀取_bt.Location = New System.Drawing.Point(1151, 3)
802
+        Me.重新讀取_bt.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
803
+        Me.重新讀取_bt.Name = "重新讀取_bt"
804
+        Me.重新讀取_bt.Size = New System.Drawing.Size(72, 23)
805
+        Me.重新讀取_bt.TabIndex = 1501
806
+        Me.重新讀取_bt.Text = "重新讀取"
807
+        '
808
+        '伺服器_lb
809
+        '
810
+        Me.伺服器_lb.AutoSize = True
811
+        Me.伺服器_lb.BackColor = System.Drawing.SystemColors.Control
812
+        Me.伺服器_lb.Location = New System.Drawing.Point(848, 6)
813
+        Me.伺服器_lb.Name = "伺服器_lb"
814
+        Me.伺服器_lb.Size = New System.Drawing.Size(230, 16)
815
+        Me.伺服器_lb.TabIndex = 1500
816
+        Me.伺服器_lb.Text = "伺服器中資料庫極限容量監控設定值 (MB)"
817
+        '
818
+        'MAX_nud
819
+        '
820
+        Me.MAX_nud.Location = New System.Drawing.Point(1083, 3)
821
+        Me.MAX_nud.Maximum = New Decimal(New Integer() {100000000, 0, 0, 0})
822
+        Me.MAX_nud.Name = "MAX_nud"
823
+        Me.MAX_nud.Size = New System.Drawing.Size(67, 23)
824
+        Me.MAX_nud.TabIndex = 1499
825
+        Me.MAX_nud.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
826
+        Me.MAX_nud.ThousandsSeparator = True
827
+        Me.MAX_nud.Value = New Decimal(New Integer() {1024, 0, 0, 0})
828
+        '
829
+        '資料庫清單1_dgv
830
+        '
831
+        DataGridViewCellStyle29.BackColor = System.Drawing.Color.White
832
+        Me.資料庫清單1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle29
833
+        Me.資料庫清單1_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
834
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
835
+        Me.資料庫清單1_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
836
+        Me.資料庫清單1_dgv.BackgroundColor = System.Drawing.Color.White
837
+        DataGridViewCellStyle30.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
838
+        DataGridViewCellStyle30.BackColor = System.Drawing.Color.White
839
+        DataGridViewCellStyle30.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
840
+        DataGridViewCellStyle30.ForeColor = System.Drawing.SystemColors.WindowText
841
+        DataGridViewCellStyle30.SelectionBackColor = System.Drawing.SystemColors.Highlight
842
+        DataGridViewCellStyle30.SelectionForeColor = System.Drawing.SystemColors.HighlightText
843
+        DataGridViewCellStyle30.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
844
+        Me.資料庫清單1_dgv.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle30
845
+        Me.資料庫清單1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
846
+        Me.資料庫清單1_dgv.Location = New System.Drawing.Point(816, 161)
847
+        Me.資料庫清單1_dgv.Name = "資料庫清單1_dgv"
848
+        Me.資料庫清單1_dgv.RowHeadersWidth = 5
849
+        Me.資料庫清單1_dgv.RowTemplate.Height = 24
850
+        Me.資料庫清單1_dgv.Size = New System.Drawing.Size(220, 81)
851
+        Me.資料庫清單1_dgv.TabIndex = 1504
852
+        '
752 853
         '系統編碼規則
753 854
         '
754 855
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
755 856
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
756
-        Me.ClientSize = New System.Drawing.Size(1329, 630)
857
+        Me.ClientSize = New System.Drawing.Size(1350, 681)
858
+        Me.Controls.Add(Me.資料庫清單1_dgv)
859
+        Me.Controls.Add(Me.LOG檔截斷3_bt)
860
+        Me.Controls.Add(Me.Label3)
861
+        Me.Controls.Add(Me.重新讀取_bt)
862
+        Me.Controls.Add(Me.伺服器_lb)
863
+        Me.Controls.Add(Me.MAX_nud)
864
+        Me.Controls.Add(Me.伺服器狀態2_dgv)
757 865
         Me.Controls.Add(Me.字體大小調整_lb)
758 866
         Me.Controls.Add(Me.字體_NUD)
759 867
         Me.Controls.Add(Me.GroupBox6)
@@ -762,7 +870,6 @@ Partial Class 系統編碼規則
762 870
         Me.Controls.Add(Me.GroupBox3)
763 871
         Me.Controls.Add(Me.GroupBox1)
764 872
         Me.Controls.Add(Me.GroupBox2)
765
-        Me.Controls.Add(Me.Label3)
766 873
         Me.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
767 874
         Me.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
768 875
         Me.Name = "系統編碼規則"
@@ -786,12 +893,13 @@ Partial Class 系統編碼規則
786 893
         Me.GroupBox6.PerformLayout()
787 894
         CType(Me.年份_dgv, System.ComponentModel.ISupportInitialize).EndInit()
788 895
         CType(Me.字體_NUD, System.ComponentModel.ISupportInitialize).EndInit()
896
+        CType(Me.伺服器狀態2_dgv, System.ComponentModel.ISupportInitialize).EndInit()
897
+        CType(Me.MAX_nud, System.ComponentModel.ISupportInitialize).EndInit()
898
+        CType(Me.資料庫清單1_dgv, System.ComponentModel.ISupportInitialize).EndInit()
789 899
         Me.ResumeLayout(False)
790 900
         Me.PerformLayout()
791 901
 
792 902
     End Sub
793
-
794
-    Friend WithEvents Label3 As Windows.Forms.Label
795 903
     Friend WithEvents GroupBox2 As Windows.Forms.GroupBox
796 904
     Friend WithEvents 級別修改_bt As Windows.Forms.Button
797 905
     Friend WithEvents 級別_cb As Windows.Forms.ComboBox
@@ -849,4 +957,11 @@ Partial Class 系統編碼規則
849 957
     Friend WithEvents 年份_tb As TextBox
850 958
     Friend WithEvents 字體大小調整_lb As Label
851 959
     Friend WithEvents 字體_NUD As NumericUpDown
960
+    Friend WithEvents 伺服器狀態2_dgv As DataGridView
961
+    Friend WithEvents LOG檔截斷3_bt As Button
962
+    Friend WithEvents Label3 As Label
963
+    Friend WithEvents 重新讀取_bt As Button
964
+    Friend WithEvents 伺服器_lb As Label
965
+    Friend WithEvents MAX_nud As NumericUpDown
966
+    Friend WithEvents 資料庫清單1_dgv As DataGridView
852 967
 End Class

+ 42
- 0
YD-ERP-SYS/資料庫系統管理/系統編碼規則.vb Переглянути файл

@@ -56,6 +56,37 @@
56 56
         da.Fill(ds3) : 倉儲狀態_dgv.DataSource = ds3.Tables(0) : conn.Close()
57 57
         倉儲狀態_dgv.Columns(0).FillWeight = 100 : 倉儲狀態_dgv.Columns(1).FillWeight = 50
58 58
     End Sub
59
+    Private Sub Set_主伺服器狀態()
60
+        Dim ds8 As New DataSet : 伺服器狀態2_dgv.DataSource = Nothing : ds8.Clear()
61
+        伺服器狀態2_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
62
+        伺服器狀態2_dgv.ColumnHeadersHeight = 25
63
+        伺服器狀態2_dgv.AllowUserToAddRows = False
64
+        SQL_主資料庫狀態()
65
+        da.Fill(ds8) : 伺服器狀態2_dgv.DataSource = ds8.Tables(0) : conn.Close()
66
+        Set_進度條顯示2()
67
+        伺服器狀態2_dgv.Columns(4).DefaultCellStyle.Format = "#,##0.000"
68
+        伺服器狀態2_dgv.Columns(5).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
69
+        伺服器狀態2_dgv.Columns(5).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
70
+        伺服器狀態2_dgv.Columns(0).FillWeight = 100 : 伺服器狀態2_dgv.Columns(1).FillWeight = 200
71
+        伺服器狀態2_dgv.Columns(2).FillWeight = 50 : 伺服器狀態2_dgv.Columns(3).FillWeight = 50
72
+        伺服器狀態2_dgv.Columns(4).Visible = False
73
+    End Sub
74
+    Private Sub Set_進度條顯示2()
75
+        Dim Col As New DataGridViewProgressColumn With {
76
+            .FillWeight = 130,
77
+            .DataPropertyName = "容量"
78
+        }
79
+        Col.HeaderText = "檔案大小(MB)" : Col.Name = "容量" : Col.DataPropertyName = "檔案大小(MB)"
80
+        伺服器狀態2_dgv.Columns.Insert(5, Col)
81
+    End Sub
82
+    Private Sub Set_伺服器1清單()
83
+        Dim ds8 As New DataSet : 資料庫清單1_dgv.DataSource = Nothing : ds8.Clear()
84
+        資料庫清單1_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
85
+        資料庫清單1_dgv.ColumnHeadersHeight = 25
86
+        資料庫清單1_dgv.AllowUserToAddRows = False
87
+        SQL_伺服器1清單()
88
+        da.Fill(ds8) : 資料庫清單1_dgv.DataSource = ds8.Tables(0) : conn.Close()
89
+    End Sub
59 90
     Private Sub 系統編碼規則_Load(sender As Object, e As EventArgs) Handles MyBase.Load
60 91
         Me.MdiParent = YD_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
61 92
         訂製編碼_tb.Enabled = False
@@ -63,6 +94,7 @@
63 94
         首次開啟 = False : 式共用1() : 首次開啟 = True
64 95
         職稱_dgv.RowTemplate.Height = 25 : 地區碼_dgv.RowTemplate.Height = 25 : 倉儲狀態_dgv.RowTemplate.Height = 25
65 96
         料定狀態_dgv.RowTemplate.Height = 25 : 送貨運費_dgv.RowTemplate.Height = 25 : 年份_dgv.RowTemplate.Height = 25
97
+        重新讀取_bt.PerformClick()
66 98
     End Sub
67 99
     Private Sub 送貨運費_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 送貨運費_dgv.CellEnter
68 100
         If 首次開啟 = True Then
@@ -317,4 +349,14 @@
317 349
         送貨運費_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
318 350
         年份_dgv.RowsDefaultCellStyle.Font = New System.Drawing.Font("微軟正黑體", 字體_NUD.Value)
319 351
     End Sub
352
+    Private Sub 重新讀取_bt_Click(sender As Object, e As EventArgs) Handles 重新讀取_bt.Click
353
+        分母 = MAX_nud.Value : 分段1 = 0.2 : 分段2 = 0.19 : 分段3 = 0.8 : 分段4 = 0.79 : 進度條後墜 = " MB"
354
+        Set_主伺服器狀態() : Set_伺服器1清單()
355
+    End Sub
356
+    Private Sub LOG檔截斷3_bt_Click(sender As Object, e As EventArgs) Handles LOG檔截斷3_bt.Click
357
+        For I As Integer = 0 To 資料庫清單1_dgv.Rows.Count - 1
358
+            PA = 資料庫清單1_dgv(0, I).Value.ToString : SQL_主資料庫LOG檔案截斷()
359
+        Next
360
+        重新讀取_bt.PerformClick()
361
+    End Sub
320 362
 End Class

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