siu před 5 měsíci
rodič
revize
fbdc57feae
39 změnil soubory, kde provedl 1860 přidání a 1450 odebrání
  1. binární
      .vs/OW-ERP-SYS/FileContentIndex/4db1bb50-906e-4c16-ba36-51861713b27e.vsidx
  2. binární
      .vs/OW-ERP-SYS/FileContentIndex/5e21d51b-9d33-429c-a667-e5ca679f1d1f.vsidx
  3. binární
      .vs/OW-ERP-SYS/FileContentIndex/75b83c0b-1a72-4065-8854-a9594b746510.vsidx
  4. binární
      .vs/OW-ERP-SYS/FileContentIndex/7f3ce0ae-2773-4ba6-869e-2d6610112edd.vsidx
  5. binární
      .vs/OW-ERP-SYS/FileContentIndex/85db547e-47df-432c-94bb-124ac6b9ca49.vsidx
  6. binární
      .vs/OW-ERP-SYS/FileContentIndex/90a409cd-8ccc-4128-8bd4-1633f0c1123a.vsidx
  7. binární
      .vs/OW-ERP-SYS/FileContentIndex/a79619f5-f77b-4fd7-8914-ac0768a2b268.vsidx
  8. binární
      .vs/OW-ERP-SYS/FileContentIndex/d40fb6be-62dd-489f-bc49-2f7f1d0d7f88.vsidx
  9. binární
      .vs/OW-ERP-SYS/FileContentIndex/e7873f30-7685-48d3-8f7d-46126d449ae2.vsidx
  10. binární
      .vs/OW-ERP-SYS/FileContentIndex/f0418fe5-d199-414f-96f8-c36a185a388d.vsidx
  11. binární
      .vs/OW-ERP-SYS/v17/.suo
  12. 441
    414
      .vs/OW-ERP-SYS/v17/DocumentLayout.json
  13. 19
    7
      OW-ERP-SYS/03、倉儲管理系統/倉儲基本控制/物料領料單.vb
  14. 6
    6
      OW-ERP-SYS/03、倉儲管理系統/倉儲明細表.vb
  15. 129
    32
      OW-ERP-SYS/03、倉儲管理系統/盤營盤損.Designer.vb
  16. 68
    18
      OW-ERP-SYS/03、倉儲管理系統/盤營盤損.vb
  17. 1
    0
      OW-ERP-SYS/03、倉儲管理系統/退貨單審核.Designer.vb
  18. 41
    40
      OW-ERP-SYS/03、倉儲管理系統/退貨申請單.Designer.vb
  19. 1
    1
      OW-ERP-SYS/03、倉儲管理系統/退貨申請單.vb
  20. 1
    1
      OW-ERP-SYS/03、倉儲管理系統/退貨處理單.vb
  21. 45
    30
      OW-ERP-SYS/03、倉儲管理系統/送貨單審核.Designer.vb
  22. 20
    46
      OW-ERP-SYS/03、倉儲管理系統/送貨單審核.vb
  23. 132
    143
      OW-ERP-SYS/03、倉儲管理系統/送貨單申請.Designer.vb
  24. 141
    95
      OW-ERP-SYS/03、倉儲管理系統/送貨單申請.vb
  25. 72
    38
      OW-ERP-SYS/05、技術管理系統/生產排程表.Designer.vb
  26. 42
    20
      OW-ERP-SYS/05、技術管理系統/生產排程表.vb
  27. 3
    3
      OW-ERP-SYS/05、技術管理系統/製程管制紀錄表_一般組.vb
  28. 39
    39
      OW-ERP-SYS/05、技術管理系統/製程管制紀錄表_奶油組.Designer.vb
  29. 3
    1
      OW-ERP-SYS/05、技術管理系統/製程管制紀錄表_奶油組.vb
  30. 504
    439
      OW-ERP-SYS/06、業務管理系統/訂購單.Designer.vb
  31. 76
    45
      OW-ERP-SYS/06、業務管理系統/訂購單.vb
  32. 1
    0
      OW-ERP-SYS/06、業務管理系統/訂購單審核.Designer.vb
  33. 67
    28
      OW-ERP-SYS/0、MyModule/主資料庫/SQL_倉儲系統管理.vb
  34. 8
    4
      OW-ERP-SYS/0、MyModule/主資料庫/SQL_技術管理系統.vb
  35. binární
      OW-ERP-SYS/bin/Debug/OW-ERP-SYS.exe
  36. binární
      OW-ERP-SYS/bin/Debug/OW-ERP-SYS.pdb
  37. binární
      OW-ERP-SYS/obj/Debug/OW-ERP-SYS.pdb
  38. binární
      OW-ERP-SYS/obj/Debug/OW-ERP-SYS.vbproj.GenerateResource.cache
  39. binární
      OW-ERP-SYS/obj/Debug/ow-erp-sys.exe

binární
.vs/OW-ERP-SYS/FileContentIndex/4db1bb50-906e-4c16-ba36-51861713b27e.vsidx Zobrazit soubor


binární
.vs/OW-ERP-SYS/FileContentIndex/5e21d51b-9d33-429c-a667-e5ca679f1d1f.vsidx Zobrazit soubor


binární
.vs/OW-ERP-SYS/FileContentIndex/75b83c0b-1a72-4065-8854-a9594b746510.vsidx Zobrazit soubor


binární
.vs/OW-ERP-SYS/FileContentIndex/7f3ce0ae-2773-4ba6-869e-2d6610112edd.vsidx Zobrazit soubor


binární
.vs/OW-ERP-SYS/FileContentIndex/85db547e-47df-432c-94bb-124ac6b9ca49.vsidx Zobrazit soubor


binární
.vs/OW-ERP-SYS/FileContentIndex/90a409cd-8ccc-4128-8bd4-1633f0c1123a.vsidx Zobrazit soubor


binární
.vs/OW-ERP-SYS/FileContentIndex/a79619f5-f77b-4fd7-8914-ac0768a2b268.vsidx Zobrazit soubor


binární
.vs/OW-ERP-SYS/FileContentIndex/d40fb6be-62dd-489f-bc49-2f7f1d0d7f88.vsidx Zobrazit soubor


binární
.vs/OW-ERP-SYS/FileContentIndex/e7873f30-7685-48d3-8f7d-46126d449ae2.vsidx Zobrazit soubor


binární
.vs/OW-ERP-SYS/FileContentIndex/f0418fe5-d199-414f-96f8-c36a185a388d.vsidx Zobrazit soubor


binární
.vs/OW-ERP-SYS/v17/.suo Zobrazit soubor


+ 441
- 414
.vs/OW-ERP-SYS/v17/DocumentLayout.json
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 19
- 7
OW-ERP-SYS/03、倉儲管理系統/倉儲基本控制/物料領料單.vb Zobrazit soubor

@@ -1439,24 +1439,36 @@ Public Class 物料領料單
1439 1439
     Private Sub 確認出庫_bt_Click(sender As Object, e As EventArgs) Handles 確認出庫_bt.Click
1440 1440
         If 領料單編號_tb.Text <> "" Then
1441 1441
             If 指定倉庫_cb.Text <> "" Then
1442
+                SQL_指定倉儲_資料讀取(指定倉庫_cb.Text)
1443
+                Dim 倉庫級別 As String = ""
1444
+                Dim 倉庫編號 As String = ""
1445
+                If dr.Read() Then
1446
+                    倉庫級別 = dr("倉級") : 倉庫編號 = dr("倉名編號")
1447
+                End If : conn.Close()
1448
+
1442 1449
 
1443 1450
                 For I As Integer = 0 To 領料單明細_dgv.Rows.Count - 1
1444 1451
                     Dim 物料編號 As String = 領料單明細_dgv.Rows(I).Cells("物料編號").Value.ToString().Trim()
1452
+                    Dim 物品名稱 As String = 領料單明細_dgv.Rows(I).Cells("物品名稱").Value.ToString()
1453
+                    Dim 數量 As Double = 領料單明細_dgv.Rows(I).Cells("數量").Value
1445 1454
                     If String.IsNullOrEmpty(物料編號) Then
1446 1455
                         MGB("物料不能為空", 1)
1447 1456
                         Return ' 如果有任意一個物料料號為空,則不繼續執行
1448 1457
                     End If
1458
+
1459
+                    Dim 庫存量 As Double = 0
1460
+                    SQL_庫存餘額判斷(倉庫編號, 物料編號)
1461
+                    If dr.Read() Then
1462
+                        庫存量 = dr("庫存量")
1463
+                        If 數量 > 庫存量 Then
1464
+                            MGB(物品名稱 & "庫存量不足", 1)
1465
+                            Return
1466
+                        End If
1467
+                    End If : conn.Close()
1449 1468
                 Next
1450 1469
 
1451 1470
                 MGB("確定要出庫嗎?", 2) ' 確認刪除操作
1452 1471
                 If 訊息回應 <> "YES" Then Return
1453
-                SQL_指定倉儲_資料讀取(指定倉庫_cb.Text)
1454
-                Dim 倉庫級別 As String = ""
1455
-                Dim 倉庫編號 As String = ""
1456
-                If dr.Read() Then
1457
-                    倉庫級別 = dr("倉級") : 倉庫編號 = dr("倉名編號")
1458
-                End If : conn.Close()
1459
-
1460 1472
 
1461 1473
                 For I As Integer = 0 To 領料單明細_dgv.Rows.Count - 1
1462 1474
                     Dim 領料單明細編號 As String = 領料單明細_dgv.Rows(I).Cells("領料單明細編號").Value.ToString()

+ 6
- 6
OW-ERP-SYS/03、倉儲管理系統/倉儲明細表.vb Zobrazit soubor

@@ -42,17 +42,17 @@ Public Class 倉儲明細表
42 42
         End If
43 43
         SQL_倉儲管理系統_倉儲明細表(物料種類_cb.Text, 關鍵字_tb.Text, 倉庫編號, str) : da.Fill(ds1) : 明細表_dgv.DataSource = ds1.Tables(0) : conn.Close()
44 44
         明細表_dgv.Columns(1).ReadOnly = True : 明細表_dgv.Columns(2).ReadOnly = True : 明細表_dgv.Columns(3).ReadOnly = True
45
-        明細表_dgv.Columns(0).Visible = False : 明細表_dgv.Columns(1).FillWeight = 150 : 明細表_dgv.Columns(2).FillWeight = 150
46
-        明細表_dgv.Columns(3).FillWeight = 50
47
-        明細表_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
48
-        明細表_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
49
-        明細表_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
45
+        明細表_dgv.Columns(0).Visible = False : 明細表_dgv.Columns(1).FillWeight = 100 : 明細表_dgv.Columns(2).FillWeight = 150
46
+        明細表_dgv.Columns(3).FillWeight = 150 : 明細表_dgv.Columns(4).FillWeight = 50 : 明細表_dgv.Columns(5).Visible = False
47
+        明細表_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
48
+        明細表_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
49
+        明細表_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
50 50
 
51 51
     End Sub
52 52
     Private Sub 明細表_dgv_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles 明細表_dgv.CellClick
53 53
         If e.RowIndex = -1 Then : Else
54 54
             料號_tb.Text = 明細表_dgv(0, e.RowIndex).Value.ToString
55
-            品名_tb.Text = 明細表_dgv(1, e.RowIndex).Value.ToString
55
+            品名_tb.Text = 明細表_dgv(2, e.RowIndex).Value.ToString
56 56
             Set_清單1()
57 57
         End If
58 58
     End Sub

+ 129
- 32
OW-ERP-SYS/03、倉儲管理系統/盤營盤損.Designer.vb Zobrazit soubor

@@ -22,6 +22,10 @@ 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()
25 29
         Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26 30
         Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27 31
         Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
@@ -38,14 +42,23 @@ Partial Class 盤營盤損
38 42
         Me.明細表1_dgv = New System.Windows.Forms.DataGridView()
39 43
         Me.明細表_dgv = New System.Windows.Forms.DataGridView()
40 44
         Me.存檔 = New System.Windows.Forms.Button()
45
+        Me.日期_dgv = New System.Windows.Forms.DataGridView()
46
+        Me.日期明細_dgv = New System.Windows.Forms.DataGridView()
47
+        Me.Panel1 = New System.Windows.Forms.Panel()
48
+        Me.人員_tb = New System.Windows.Forms.TextBox()
49
+        Me.日期_tb = New System.Windows.Forms.TextBox()
41 50
         CType(Me.明細表1_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
42 51
         CType(Me.明細表_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
52
+        CType(Me.日期_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
53
+        CType(Me.日期明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
54
+        Me.Panel1.SuspendLayout()
43 55
         Me.SuspendLayout()
44 56
         '
45 57
         '庫存為零_rb
46 58
         '
59
+        Me.庫存為零_rb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
47 60
         Me.庫存為零_rb.AutoSize = True
48
-        Me.庫存為零_rb.Location = New System.Drawing.Point(543, 35)
61
+        Me.庫存為零_rb.Location = New System.Drawing.Point(1199, 35)
49 62
         Me.庫存為零_rb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
50 63
         Me.庫存為零_rb.Name = "庫存為零_rb"
51 64
         Me.庫存為零_rb.Size = New System.Drawing.Size(73, 20)
@@ -56,9 +69,10 @@ Partial Class 盤營盤損
56 69
         '
57 70
         '庫存非零_rb
58 71
         '
72
+        Me.庫存非零_rb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
59 73
         Me.庫存非零_rb.AutoSize = True
60 74
         Me.庫存非零_rb.ImageAlign = System.Drawing.ContentAlignment.BottomRight
61
-        Me.庫存非零_rb.Location = New System.Drawing.Point(543, 5)
75
+        Me.庫存非零_rb.Location = New System.Drawing.Point(1199, 5)
62 76
         Me.庫存非零_rb.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
63 77
         Me.庫存非零_rb.Name = "庫存非零_rb"
64 78
         Me.庫存非零_rb.Size = New System.Drawing.Size(73, 20)
@@ -69,20 +83,22 @@ Partial Class 盤營盤損
69 83
         '
70 84
         '指定倉庫_cb
71 85
         '
86
+        Me.指定倉庫_cb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
72 87
         Me.指定倉庫_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple
73 88
         Me.指定倉庫_cb.FormattingEnabled = True
74 89
         Me.指定倉庫_cb.Items.AddRange(New Object() {"2019"})
75
-        Me.指定倉庫_cb.Location = New System.Drawing.Point(292, 2)
90
+        Me.指定倉庫_cb.Location = New System.Drawing.Point(999, 4)
76 91
         Me.指定倉庫_cb.Name = "指定倉庫_cb"
77
-        Me.指定倉庫_cb.Size = New System.Drawing.Size(179, 24)
92
+        Me.指定倉庫_cb.Size = New System.Drawing.Size(135, 24)
78 93
         Me.指定倉庫_cb.TabIndex = 2002
79 94
         '
80 95
         'Label2
81 96
         '
97
+        Me.Label2.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
82 98
         Me.Label2.AutoSize = True
83 99
         Me.Label2.BackColor = System.Drawing.Color.Transparent
84 100
         Me.Label2.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
85
-        Me.Label2.Location = New System.Drawing.Point(255, 5)
101
+        Me.Label2.Location = New System.Drawing.Point(962, 7)
86 102
         Me.Label2.Name = "Label2"
87 103
         Me.Label2.Size = New System.Drawing.Size(31, 16)
88 104
         Me.Label2.TabIndex = 2001
@@ -91,20 +107,22 @@ Partial Class 盤營盤損
91 107
         '
92 108
         '物料種類_cb
93 109
         '
110
+        Me.物料種類_cb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
94 111
         Me.物料種類_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple
95 112
         Me.物料種類_cb.FormattingEnabled = True
96 113
         Me.物料種類_cb.Items.AddRange(New Object() {"2019"})
97
-        Me.物料種類_cb.Location = New System.Drawing.Point(68, 2)
114
+        Me.物料種類_cb.Location = New System.Drawing.Point(821, 4)
98 115
         Me.物料種類_cb.Name = "物料種類_cb"
99
-        Me.物料種類_cb.Size = New System.Drawing.Size(181, 24)
116
+        Me.物料種類_cb.Size = New System.Drawing.Size(135, 24)
100 117
         Me.物料種類_cb.TabIndex = 1996
101 118
         '
102 119
         '簡稱_lb
103 120
         '
121
+        Me.簡稱_lb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
104 122
         Me.簡稱_lb.AutoSize = True
105 123
         Me.簡稱_lb.BackColor = System.Drawing.Color.Transparent
106 124
         Me.簡稱_lb.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
107
-        Me.簡稱_lb.Location = New System.Drawing.Point(9, 5)
125
+        Me.簡稱_lb.Location = New System.Drawing.Point(760, 7)
108 126
         Me.簡稱_lb.Name = "簡稱_lb"
109 127
         Me.簡稱_lb.Size = New System.Drawing.Size(55, 16)
110 128
         Me.簡稱_lb.TabIndex = 1995
@@ -113,16 +131,18 @@ Partial Class 盤營盤損
113 131
         '
114 132
         '關鍵字_tb
115 133
         '
116
-        Me.關鍵字_tb.Location = New System.Drawing.Point(68, 31)
134
+        Me.關鍵字_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
135
+        Me.關鍵字_tb.Location = New System.Drawing.Point(821, 31)
117 136
         Me.關鍵字_tb.Name = "關鍵字_tb"
118
-        Me.關鍵字_tb.Size = New System.Drawing.Size(403, 23)
137
+        Me.關鍵字_tb.Size = New System.Drawing.Size(313, 23)
119 138
         Me.關鍵字_tb.TabIndex = 1994
120 139
         '
121 140
         'Label1
122 141
         '
142
+        Me.Label1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
123 143
         Me.Label1.AutoSize = True
124 144
         Me.Label1.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
125
-        Me.Label1.Location = New System.Drawing.Point(9, 34)
145
+        Me.Label1.Location = New System.Drawing.Point(760, 34)
126 146
         Me.Label1.Name = "Label1"
127 147
         Me.Label1.Size = New System.Drawing.Size(55, 16)
128 148
         Me.Label1.TabIndex = 1993
@@ -131,11 +151,12 @@ Partial Class 盤營盤損
131 151
         '
132 152
         '客戶搜尋_bt
133 153
         '
154
+        Me.客戶搜尋_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
134 155
         Me.客戶搜尋_bt.BackgroundImage = Global.OW_ERP_SYS.My.Resources.Resources.Search
135 156
         Me.客戶搜尋_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
136 157
         Me.客戶搜尋_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
137 158
         Me.客戶搜尋_bt.ForeColor = System.Drawing.Color.Black
138
-        Me.客戶搜尋_bt.Location = New System.Drawing.Point(477, 2)
159
+        Me.客戶搜尋_bt.Location = New System.Drawing.Point(1141, 2)
139 160
         Me.客戶搜尋_bt.Name = "客戶搜尋_bt"
140 161
         Me.客戶搜尋_bt.Size = New System.Drawing.Size(51, 53)
141 162
         Me.客戶搜尋_bt.TabIndex = 1992
@@ -143,63 +164,130 @@ Partial Class 盤營盤損
143 164
         '
144 165
         '明細表1_dgv
145 166
         '
146
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
147
-        Me.明細表1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
148
-        Me.明細表1_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
149
-            Or System.Windows.Forms.AnchorStyles.Left) _
167
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
168
+        Me.明細表1_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
169
+        Me.明細表1_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
150 170
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
151 171
         Me.明細表1_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
152 172
         Me.明細表1_dgv.BackgroundColor = System.Drawing.Color.White
153 173
         Me.明細表1_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
154
-        Me.明細表1_dgv.Location = New System.Drawing.Point(5, 59)
174
+        Me.明細表1_dgv.Location = New System.Drawing.Point(757, 59)
155 175
         Me.明細表1_dgv.Margin = New System.Windows.Forms.Padding(5)
156 176
         Me.明細表1_dgv.Name = "明細表1_dgv"
157 177
         Me.明細表1_dgv.RowHeadersWidth = 5
158
-        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
159
-        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
160
-        Me.明細表1_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
178
+        DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
179
+        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
180
+        Me.明細表1_dgv.RowsDefaultCellStyle = DataGridViewCellStyle2
161 181
         Me.明細表1_dgv.RowTemplate.Height = 24
162
-        Me.明細表1_dgv.Size = New System.Drawing.Size(675, 619)
182
+        Me.明細表1_dgv.Size = New System.Drawing.Size(574, 619)
163 183
         Me.明細表1_dgv.TabIndex = 1991
164 184
         '
165 185
         '明細表_dgv
166 186
         '
167
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
168
-        Me.明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
169
-        Me.明細表_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
170
-            Or System.Windows.Forms.AnchorStyles.Left) _
187
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
188
+        Me.明細表_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
189
+        Me.明細表_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
171 190
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
172 191
         Me.明細表_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
173 192
         Me.明細表_dgv.BackgroundColor = System.Drawing.Color.White
174 193
         Me.明細表_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
175
-        Me.明細表_dgv.Location = New System.Drawing.Point(5, 59)
194
+        Me.明細表_dgv.Location = New System.Drawing.Point(757, 59)
176 195
         Me.明細表_dgv.Margin = New System.Windows.Forms.Padding(5)
177 196
         Me.明細表_dgv.Name = "明細表_dgv"
178 197
         Me.明細表_dgv.RowHeadersWidth = 5
179
-        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
180
-        DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
181
-        Me.明細表_dgv.RowsDefaultCellStyle = DataGridViewCellStyle8
198
+        DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
199
+        DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
200
+        Me.明細表_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
182 201
         Me.明細表_dgv.RowTemplate.Height = 24
183
-        Me.明細表_dgv.Size = New System.Drawing.Size(675, 619)
202
+        Me.明細表_dgv.Size = New System.Drawing.Size(574, 619)
184 203
         Me.明細表_dgv.TabIndex = 1990
185 204
         '
186 205
         '存檔
187 206
         '
207
+        Me.存檔.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
188 208
         Me.存檔.BackgroundImage = Global.OW_ERP_SYS.My.Resources.Resources.Save_Win11
189 209
         Me.存檔.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
190 210
         Me.存檔.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
191 211
         Me.存檔.ForeColor = System.Drawing.Color.Black
192
-        Me.存檔.Location = New System.Drawing.Point(629, 2)
212
+        Me.存檔.Location = New System.Drawing.Point(1278, 2)
193 213
         Me.存檔.Name = "存檔"
194 214
         Me.存檔.Size = New System.Drawing.Size(51, 53)
195 215
         Me.存檔.TabIndex = 2005
196 216
         Me.存檔.UseVisualStyleBackColor = True
197 217
         '
218
+        '日期_dgv
219
+        '
220
+        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
221
+        Me.日期_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
222
+        Me.日期_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
223
+            Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
224
+        Me.日期_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
225
+        Me.日期_dgv.BackgroundColor = System.Drawing.Color.White
226
+        Me.日期_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
227
+        Me.日期_dgv.Location = New System.Drawing.Point(5, 5)
228
+        Me.日期_dgv.Margin = New System.Windows.Forms.Padding(5)
229
+        Me.日期_dgv.Name = "日期_dgv"
230
+        Me.日期_dgv.RowHeadersWidth = 5
231
+        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
232
+        DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
233
+        Me.日期_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
234
+        Me.日期_dgv.RowTemplate.Height = 24
235
+        Me.日期_dgv.Size = New System.Drawing.Size(148, 673)
236
+        Me.日期_dgv.TabIndex = 2006
237
+        '
238
+        '日期明細_dgv
239
+        '
240
+        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
241
+        Me.日期明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
242
+        Me.日期明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
243
+            Or System.Windows.Forms.AnchorStyles.Left) _
244
+            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
245
+        Me.日期明細_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
246
+        Me.日期明細_dgv.BackgroundColor = System.Drawing.Color.White
247
+        Me.日期明細_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
248
+        Me.日期明細_dgv.Location = New System.Drawing.Point(155, 5)
249
+        Me.日期明細_dgv.Margin = New System.Windows.Forms.Padding(5)
250
+        Me.日期明細_dgv.Name = "日期明細_dgv"
251
+        Me.日期明細_dgv.RowHeadersWidth = 5
252
+        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
253
+        DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
254
+        Me.日期明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle8
255
+        Me.日期明細_dgv.RowTemplate.Height = 24
256
+        Me.日期明細_dgv.Size = New System.Drawing.Size(597, 673)
257
+        Me.日期明細_dgv.TabIndex = 2007
258
+        '
259
+        'Panel1
260
+        '
261
+        Me.Panel1.Controls.Add(Me.日期_tb)
262
+        Me.Panel1.Controls.Add(Me.人員_tb)
263
+        Me.Panel1.Location = New System.Drawing.Point(260, 243)
264
+        Me.Panel1.Name = "Panel1"
265
+        Me.Panel1.Size = New System.Drawing.Size(290, 206)
266
+        Me.Panel1.TabIndex = 2008
267
+        Me.Panel1.Visible = False
268
+        '
269
+        '人員_tb
270
+        '
271
+        Me.人員_tb.Location = New System.Drawing.Point(12, 15)
272
+        Me.人員_tb.Name = "人員_tb"
273
+        Me.人員_tb.Size = New System.Drawing.Size(97, 23)
274
+        Me.人員_tb.TabIndex = 1995
275
+        '
276
+        '日期_tb
277
+        '
278
+        Me.日期_tb.Location = New System.Drawing.Point(115, 15)
279
+        Me.日期_tb.Name = "日期_tb"
280
+        Me.日期_tb.Size = New System.Drawing.Size(97, 23)
281
+        Me.日期_tb.TabIndex = 1996
282
+        '
198 283
         '盤營盤損
199 284
         '
200 285
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
201 286
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
202
-        Me.ClientSize = New System.Drawing.Size(690, 681)
287
+        Me.ClientSize = New System.Drawing.Size(1334, 681)
288
+        Me.Controls.Add(Me.Panel1)
289
+        Me.Controls.Add(Me.日期明細_dgv)
290
+        Me.Controls.Add(Me.日期_dgv)
203 291
         Me.Controls.Add(Me.存檔)
204 292
         Me.Controls.Add(Me.庫存為零_rb)
205 293
         Me.Controls.Add(Me.庫存非零_rb)
@@ -219,6 +307,10 @@ Partial Class 盤營盤損
219 307
         Me.Text = "盤營盤損"
220 308
         CType(Me.明細表1_dgv, System.ComponentModel.ISupportInitialize).EndInit()
221 309
         CType(Me.明細表_dgv, System.ComponentModel.ISupportInitialize).EndInit()
310
+        CType(Me.日期_dgv, System.ComponentModel.ISupportInitialize).EndInit()
311
+        CType(Me.日期明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
312
+        Me.Panel1.ResumeLayout(False)
313
+        Me.Panel1.PerformLayout()
222 314
         Me.ResumeLayout(False)
223 315
         Me.PerformLayout()
224 316
 
@@ -236,4 +328,9 @@ Partial Class 盤營盤損
236 328
     Friend WithEvents 明細表1_dgv As DataGridView
237 329
     Friend WithEvents 明細表_dgv As DataGridView
238 330
     Friend WithEvents 存檔 As Button
331
+    Friend WithEvents 日期_dgv As DataGridView
332
+    Friend WithEvents 日期明細_dgv As DataGridView
333
+    Friend WithEvents Panel1 As Panel
334
+    Friend WithEvents 日期_tb As TextBox
335
+    Friend WithEvents 人員_tb As TextBox
239 336
 End Class

+ 68
- 18
OW-ERP-SYS/03、倉儲管理系統/盤營盤損.vb Zobrazit soubor

@@ -1,11 +1,12 @@
1 1
 Public Class 盤營盤損
2 2
     Dim EDR As Integer = 0 : Dim ESTR As String
3 3
     Private Sub 盤營盤損_Load(sender As Object, e As EventArgs) Handles MyBase.Load
4
+        Me.MdiParent = OW_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
4 5
         庫存非零_rb.Checked = True : 庫存為零_rb.Checked = False
5 6
         物料種類_cb_下拉表單資料載入() : 指定倉庫_cb_下拉表單資料載入()
6 7
     End Sub
7 8
     Private Sub 盤營盤損_Shown(sender As Object, e As EventArgs) Handles MyBase.Shown
8
-        CB選擇清單(指定倉庫_cb, 指定倉庫_cb.Text) : Set_清單()
9
+        Set_清單1() : CB選擇清單(指定倉庫_cb, 指定倉庫_cb.Text) : Set_清單()
9 10
     End Sub
10 11
     Private Sub 物料種類_cb_Click(sender As Object, e As EventArgs) Handles 物料種類_cb.Click
11 12
         CB選擇清單(物料種類_cb, 物料種類_cb.Text)
@@ -49,14 +50,61 @@
49 50
         End If
50 51
         SQL_倉儲管理系統_倉儲明細表(物料種類_cb.Text, 關鍵字_tb.Text, 倉庫編號, str) : da.Fill(ds1) : 明細表_dgv.DataSource = ds1.Tables(0)
51 52
         da.Fill(ds2) : 明細表1_dgv.DataSource = ds2.Tables(0) : conn.Close()
52
-        明細表_dgv.Columns(1).ReadOnly = True : 明細表_dgv.Columns(2).ReadOnly = True
53
-        明細表_dgv.Columns(0).FillWeight = 100 : 明細表_dgv.Columns(1).FillWeight = 150 : 明細表_dgv.Columns(2).FillWeight = 150
54
-        明細表_dgv.Columns(3).FillWeight = 50
55
-        明細表_dgv.Columns(3).DefaultCellStyle.Format = "#,##0"
56
-        明細表_dgv.Columns(3).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
57
-        明細表_dgv.Columns(3).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
53
+        明細表_dgv.Columns(1).ReadOnly = True : 明細表_dgv.Columns(2).ReadOnly = True : 明細表_dgv.Columns(3).ReadOnly = True
54
+        明細表_dgv.Columns(0).Visible = False : 明細表_dgv.Columns(1).FillWeight = 100 : 明細表_dgv.Columns(2).FillWeight = 150
55
+        明細表_dgv.Columns(3).Visible = False : 明細表_dgv.Columns(4).FillWeight = 50 : 明細表_dgv.Columns(5).FillWeight = 150
56
+        明細表_dgv.Columns(4).DefaultCellStyle.Format = "#,##0"
57
+        明細表_dgv.Columns(4).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
58
+        明細表_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
58 59
     End Sub
60
+    Private Sub Set_清單1()
61
+        Dim ds1 As New DataSet : 日期_dgv.DataSource = Nothing : ds1.Clear()
62
+        日期_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
63
+        日期_dgv.ColumnHeadersHeight = 25
64
+        日期_dgv.AllowUserToAddRows = False
65
+        日期_dgv.RowTemplate.Height = 35
66
+        日期_dgv.EditMode = DataGridViewEditMode.EditOnEnter
59 67
 
68
+        SQL_盤營盤損_日期清單() : da.Fill(ds1) : 日期_dgv.DataSource = ds1.Tables(0) : conn.Close()
69
+        日期_dgv.Columns(0).ReadOnly = True : 日期_dgv.Columns(1).ReadOnly = True
70
+        日期_dgv.Columns(0).FillWeight = 45 : 日期_dgv.Columns(1).FillWeight = 55
71
+    End Sub
72
+    Private Sub 日期_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 日期_dgv.CellClick
73
+        If e.RowIndex = -1 Then : Else
74
+            人員_tb.Text = 日期_dgv(0, e.RowIndex).Value.ToString : 日期_tb.Text = 日期_dgv(1, e.RowIndex).Value.ToString
75
+            Set_清單2()
76
+        End If
77
+    End Sub
78
+    Private Sub Set_清單2()
79
+        Dim ds1 As New DataSet : 日期明細_dgv.DataSource = Nothing : ds1.Clear()
80
+        日期明細_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
81
+        日期明細_dgv.ColumnHeadersHeight = 25
82
+        日期明細_dgv.AllowUserToAddRows = False
83
+        日期明細_dgv.RowTemplate.Height = 35
84
+        日期明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter
85
+
86
+        SQL_盤營盤損_日期清單明細(人員_tb.Text, 日期_tb.Text) : da.Fill(ds1) : 日期明細_dgv.DataSource = ds1.Tables(0) : conn.Close()
87
+        日期明細_dgv.Columns(0).ReadOnly = True : 日期明細_dgv.Columns(1).ReadOnly = True
88
+        日期明細_dgv.Columns(0).Visible = False : 日期明細_dgv.Columns(1).FillWeight = 50 : 日期明細_dgv.Columns(2).FillWeight = 80
89
+        日期明細_dgv.Columns(3).Visible = False : 日期明細_dgv.Columns(4).FillWeight = 150 : 日期明細_dgv.Columns(5).Visible = False
90
+        日期明細_dgv.Columns(6).FillWeight = 50 : 日期明細_dgv.Columns(7).FillWeight = 50 : 日期明細_dgv.Columns(8).FillWeight = 50
91
+        日期明細_dgv.Columns(9).FillWeight = 50 : 日期明細_dgv.Columns(10).FillWeight = 100
92
+        日期明細_dgv.Columns(1).ReadOnly = True : 日期明細_dgv.Columns(2).ReadOnly = True : 日期明細_dgv.Columns(4).ReadOnly = True
93
+        日期明細_dgv.Columns(5).ReadOnly = True : 日期明細_dgv.Columns(6).ReadOnly = True : 日期明細_dgv.Columns(7).ReadOnly = True
94
+        日期明細_dgv.Columns(8).ReadOnly = True : 日期明細_dgv.Columns(9).ReadOnly = True : 日期明細_dgv.Columns(10).ReadOnly = True
95
+        日期明細_dgv.Columns(6).DefaultCellStyle.Format = "#,##0"
96
+        日期明細_dgv.Columns(6).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
97
+        日期明細_dgv.Columns(6).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
98
+        日期明細_dgv.Columns(7).DefaultCellStyle.Format = "#,##0"
99
+        日期明細_dgv.Columns(7).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
100
+        日期明細_dgv.Columns(7).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
101
+        日期明細_dgv.Columns(8).DefaultCellStyle.Format = "#,##0"
102
+        日期明細_dgv.Columns(8).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
103
+        日期明細_dgv.Columns(8).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
104
+        日期明細_dgv.Columns(9).DefaultCellStyle.Format = "#,##0"
105
+        日期明細_dgv.Columns(9).DefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter
106
+        日期明細_dgv.Columns(9).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
107
+    End Sub
60 108
     Private Sub 客戶搜尋_bt_Click(sender As Object, e As EventArgs) Handles 客戶搜尋_bt.Click
61 109
         Set_清單()
62 110
     End Sub
@@ -86,13 +134,14 @@
86 134
                 倉庫級別 = dr("倉級") : 倉庫編號 = dr("倉名編號")
87 135
             End If : conn.Close()
88 136
             For I As Integer = 0 To 明細表_dgv.Rows.Count - 1
89
-                Dim 數量 As Double = 明細表_dgv.Rows(I).Cells("庫存量").Value
90
-                Dim 數量1 As Double = 明細表1_dgv.Rows(I).Cells("庫存量").Value
91
-                Dim 料號 As String = 明細表1_dgv.Rows(I).Cells("物料料號").Value
137
+                Dim 盤點量 As Double = 明細表_dgv.Rows(I).Cells("庫存量").Value
138
+                Dim 庫存量 As Double = 明細表1_dgv.Rows(I).Cells("庫存量").Value
139
+                Dim 料號 As String = 明細表_dgv.Rows(I).Cells("物料料號").Value
140
+                Dim 備註 As String = 明細表_dgv.Rows(I).Cells("備註").Value
92 141
                 Dim 差 As Double = 0
93
-                If (數量 <> 數量1) Then
94
-                    If (數量 > 數量1) Then
95
-                        差 = 數量 - 數量1
142
+                If (盤點量 <> 庫存量) Then
143
+                    If (盤點量 > 庫存量) Then
144
+                        差 = 盤點量 - 庫存量
96 145
                         SQL_倉儲明細表_最後一筆資料()
97 146
                         If dr.Read() Then : EDR = Double.Parse(Strings.Right(dr("資料流水號").ToString, 9)) : Else : EDR = 0 : End If
98 147
                         conn.Close()
@@ -106,10 +155,10 @@
106 155
                         ElseIf EDR > 999999 And EDR < 1000000 Then : ESTR = "WH" & "00" & EDR
107 156
                         ElseIf EDR > 9999999 And EDR < 10000000 Then : ESTR = "WH" & "0" & EDR
108 157
                         ElseIf EDR > 99999999 Then : ESTR = "WH" & EDR : End If
109
-                        SQL_料驗收與指定入庫_倉儲明細表_新增(ESTR, "", 倉庫級別, 倉庫編號, 料號, 差, "0", "", "盤營入庫", "") : conn.Close()
110
-
158
+                        SQL_料驗收與指定入庫_倉儲明細表_新增(ESTR, "", 倉庫級別, 倉庫編號, 料號, 差, "0", 備註, "盤營入庫", "") : conn.Close()
159
+                        SQL_盤營盤損_倉儲明細表(ESTR, 庫存量, 盤點量) : conn.Close()
111 160
                     Else
112
-                        差 = 數量1 - 數
161
+                        差 = 庫存量 - 盤點
113 162
                         SQL_倉儲明細表_最後一筆資料()
114 163
                         If dr.Read() Then : EDR = Double.Parse(Strings.Right(dr("資料流水號").ToString, 9)) : Else : EDR = 0 : End If
115 164
                         conn.Close()
@@ -123,11 +172,12 @@
123 172
                         ElseIf EDR > 999999 And EDR < 1000000 Then : ESTR = "WH" & "00" & EDR
124 173
                         ElseIf EDR > 9999999 And EDR < 10000000 Then : ESTR = "WH" & "0" & EDR
125 174
                         ElseIf EDR > 99999999 Then : ESTR = "WH" & EDR : End If
126
-                        SQL_料驗收與指定入庫_倉儲明細表_新增(ESTR, "", 倉庫級別, 倉庫編號, 料號, "0", 差, "", "盤損出庫", "") : conn.Close()
175
+                        SQL_料驗收與指定入庫_倉儲明細表_新增(ESTR, "", 倉庫級別, 倉庫編號, 料號, "0", 差, 備註, "盤損出庫", "") : conn.Close()
176
+                        SQL_盤營盤損_倉儲明細表(ESTR, 庫存量, 盤點量) : conn.Close()
127 177
                     End If
128 178
                 End If
129 179
             Next
130
-            Set_清單()
180
+            Set_清單() : Set_清單1() : 日期明細_dgv.DataSource = Nothing : 人員_tb.Text = "" : 日期_tb.Text = ""
131 181
         End If
132 182
     End Sub
133 183
 End Class

+ 1
- 0
OW-ERP-SYS/03、倉儲管理系統/退貨單審核.Designer.vb Zobrazit soubor

@@ -312,6 +312,7 @@ Partial Class 退貨單審核
312 312
         Me.項次_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
313 313
         Me.項次_tb.Location = New System.Drawing.Point(1113, 54)
314 314
         Me.項次_tb.Name = "項次_tb"
315
+        Me.項次_tb.ReadOnly = True
315 316
         Me.項次_tb.Size = New System.Drawing.Size(50, 23)
316 317
         Me.項次_tb.TabIndex = 1987
317 318
         '

+ 41
- 40
OW-ERP-SYS/03、倉儲管理系統/退貨申請單.Designer.vb Zobrazit soubor

@@ -23,18 +23,18 @@ 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()
31
-        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
-        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
-        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
-        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35
-        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
-        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
-        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle21 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle22 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
+        Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
+        Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
+        Dim DataGridViewCellStyle19 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35
+        Dim DataGridViewCellStyle20 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
+        Dim DataGridViewCellStyle23 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
+        Dim DataGridViewCellStyle24 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
38 38
         Me.TabControl1 = New System.Windows.Forms.TabControl()
39 39
         Me.TabPage1 = New System.Windows.Forms.TabPage()
40 40
         Me.Panel3 = New System.Windows.Forms.Panel()
@@ -119,9 +119,9 @@ Partial Class 退貨申請單
119 119
         Me.TabControl1.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
120 120
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
121 121
         Me.TabControl1.Appearance = System.Windows.Forms.TabAppearance.Buttons
122
-        Me.TabControl1.Controls.Add(Me.TabPage1)
123 122
         Me.TabControl1.Controls.Add(Me.TabPage3)
124 123
         Me.TabControl1.Controls.Add(Me.TabPage2)
124
+        Me.TabControl1.Controls.Add(Me.TabPage1)
125 125
         Me.TabControl1.Location = New System.Drawing.Point(1, 2)
126 126
         Me.TabControl1.Name = "TabControl1"
127 127
         Me.TabControl1.SelectedIndex = 0
@@ -292,8 +292,8 @@ Partial Class 退貨申請單
292 292
         '
293 293
         '物料清單_dgv
294 294
         '
295
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
296
-        Me.物料清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
295
+        DataGridViewCellStyle21.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
296
+        Me.物料清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle21
297 297
         Me.物料清單_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
298 298
             Or System.Windows.Forms.AnchorStyles.Left) _
299 299
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -304,9 +304,9 @@ Partial Class 退貨申請單
304 304
         Me.物料清單_dgv.Location = New System.Drawing.Point(0, -1)
305 305
         Me.物料清單_dgv.Name = "物料清單_dgv"
306 306
         Me.物料清單_dgv.RowHeadersWidth = 5
307
-        DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
308
-        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
309
-        Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle2
307
+        DataGridViewCellStyle22.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
308
+        DataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
309
+        Me.物料清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle22
310 310
         Me.物料清單_dgv.RowTemplate.Height = 24
311 311
         Me.物料清單_dgv.Size = New System.Drawing.Size(389, 544)
312 312
         Me.物料清單_dgv.TabIndex = 680
@@ -379,8 +379,8 @@ Partial Class 退貨申請單
379 379
         '
380 380
         '作廢清單_dgv
381 381
         '
382
-        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
383
-        Me.作廢清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
382
+        DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
383
+        Me.作廢清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13
384 384
         Me.作廢清單_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
385 385
             Or System.Windows.Forms.AnchorStyles.Left) _
386 386
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -391,16 +391,16 @@ Partial Class 退貨申請單
391 391
         Me.作廢清單_dgv.Location = New System.Drawing.Point(2, 28)
392 392
         Me.作廢清單_dgv.Name = "作廢清單_dgv"
393 393
         Me.作廢清單_dgv.RowHeadersWidth = 5
394
-        DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
395
-        Me.作廢清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
394
+        DataGridViewCellStyle14.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
395
+        Me.作廢清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle14
396 396
         Me.作廢清單_dgv.RowTemplate.Height = 24
397 397
         Me.作廢清單_dgv.Size = New System.Drawing.Size(385, 612)
398 398
         Me.作廢清單_dgv.TabIndex = 1022
399 399
         '
400 400
         '未核准_dgv
401 401
         '
402
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
403
-        Me.未核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
402
+        DataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
403
+        Me.未核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle15
404 404
         Me.未核准_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
405 405
             Or System.Windows.Forms.AnchorStyles.Left) _
406 406
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -411,16 +411,16 @@ Partial Class 退貨申請單
411 411
         Me.未核准_dgv.Location = New System.Drawing.Point(2, 28)
412 412
         Me.未核准_dgv.Name = "未核准_dgv"
413 413
         Me.未核准_dgv.RowHeadersWidth = 5
414
-        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
415
-        Me.未核准_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
414
+        DataGridViewCellStyle16.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
415
+        Me.未核准_dgv.RowsDefaultCellStyle = DataGridViewCellStyle16
416 416
         Me.未核准_dgv.RowTemplate.Height = 24
417 417
         Me.未核准_dgv.Size = New System.Drawing.Size(385, 612)
418 418
         Me.未核准_dgv.TabIndex = 1026
419 419
         '
420 420
         '已核准_dgv
421 421
         '
422
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
423
-        Me.已核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
422
+        DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
423
+        Me.已核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17
424 424
         Me.已核准_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
425 425
             Or System.Windows.Forms.AnchorStyles.Left) _
426 426
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -431,8 +431,8 @@ Partial Class 退貨申請單
431 431
         Me.已核准_dgv.Location = New System.Drawing.Point(2, 28)
432 432
         Me.已核准_dgv.Name = "已核准_dgv"
433 433
         Me.已核准_dgv.RowHeadersWidth = 5
434
-        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
435
-        Me.已核准_dgv.RowsDefaultCellStyle = DataGridViewCellStyle8
434
+        DataGridViewCellStyle18.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
435
+        Me.已核准_dgv.RowsDefaultCellStyle = DataGridViewCellStyle18
436 436
         Me.已核准_dgv.RowTemplate.Height = 24
437 437
         Me.已核准_dgv.Size = New System.Drawing.Size(385, 612)
438 438
         Me.已核准_dgv.TabIndex = 1018
@@ -581,8 +581,8 @@ Partial Class 退貨申請單
581 581
         '
582 582
         '客戶清單_dgv
583 583
         '
584
-        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
585
-        Me.客戶清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
584
+        DataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(255, Byte), Integer))
585
+        Me.客戶清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle19
586 586
         Me.客戶清單_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
587 587
             Or System.Windows.Forms.AnchorStyles.Left) _
588 588
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -593,9 +593,9 @@ Partial Class 退貨申請單
593 593
         Me.客戶清單_dgv.Location = New System.Drawing.Point(0, -1)
594 594
         Me.客戶清單_dgv.Name = "客戶清單_dgv"
595 595
         Me.客戶清單_dgv.RowHeadersWidth = 5
596
-        DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
597
-        DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
598
-        Me.客戶清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle10
596
+        DataGridViewCellStyle20.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
597
+        DataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
598
+        Me.客戶清單_dgv.RowsDefaultCellStyle = DataGridViewCellStyle20
599 599
         Me.客戶清單_dgv.RowTemplate.Height = 24
600 600
         Me.客戶清單_dgv.Size = New System.Drawing.Size(385, 516)
601 601
         Me.客戶清單_dgv.TabIndex = 680
@@ -615,8 +615,8 @@ Partial Class 退貨申請單
615 615
         '
616 616
         '退貨明細_dgv
617 617
         '
618
-        DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
619
-        Me.退貨明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
618
+        DataGridViewCellStyle23.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
619
+        Me.退貨明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle23
620 620
         Me.退貨明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
621 621
             Or System.Windows.Forms.AnchorStyles.Left) _
622 622
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -627,9 +627,9 @@ Partial Class 退貨申請單
627 627
         Me.退貨明細_dgv.Location = New System.Drawing.Point(401, 82)
628 628
         Me.退貨明細_dgv.Name = "退貨明細_dgv"
629 629
         Me.退貨明細_dgv.RowHeadersWidth = 5
630
-        DataGridViewCellStyle12.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
631
-        DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
632
-        Me.退貨明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle12
630
+        DataGridViewCellStyle24.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
631
+        DataGridViewCellStyle24.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
632
+        Me.退貨明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle24
633 633
         Me.退貨明細_dgv.RowTemplate.Height = 24
634 634
         Me.退貨明細_dgv.Size = New System.Drawing.Size(929, 594)
635 635
         Me.退貨明細_dgv.TabIndex = 1975
@@ -738,6 +738,7 @@ Partial Class 退貨申請單
738 738
         Me.項次_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
739 739
         Me.項次_tb.Location = New System.Drawing.Point(1117, 53)
740 740
         Me.項次_tb.Name = "項次_tb"
741
+        Me.項次_tb.ReadOnly = True
741 742
         Me.項次_tb.Size = New System.Drawing.Size(50, 23)
742 743
         Me.項次_tb.TabIndex = 1967
743 744
         '

+ 1
- 1
OW-ERP-SYS/03、倉儲管理系統/退貨申請單.vb Zobrazit soubor

@@ -145,7 +145,7 @@ Public Class 退貨申請單
145 145
     End Sub
146 146
     Private Sub 物料清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 物料清單_dgv.CellClick
147 147
         If e.RowIndex = -1 Then : Else
148
-            料號_tb.Text = 物料清單_dgv(1, e.RowIndex).Value.ToString
148
+            料號_tb.Text = 物料清單_dgv(4, e.RowIndex).Value.ToString
149 149
             品名_tb.Text = 物料清單_dgv(2, e.RowIndex).Value.ToString
150 150
             NUM2 = e.RowIndex
151 151
         End If

+ 1
- 1
OW-ERP-SYS/03、倉儲管理系統/退貨處理單.vb Zobrazit soubor

@@ -902,6 +902,6 @@ Public Class 退貨處理單
902 902
         ToolTip1.SetToolTip(Me.存檔_bt, "存檔")
903 903
     End Sub
904 904
     Private Sub 處理完成_bt_MouseEnter(sender As Object, e As EventArgs) Handles 處理完成_bt.MouseEnter
905
-        ToolTip1.SetToolTip(Me.處理完成_bt, "退貨處理")
905
+        ToolTip1.SetToolTip(Me.處理完成_bt, "執行退貨處理入庫")
906 906
     End Sub
907 907
 End Class

+ 45
- 30
OW-ERP-SYS/03、倉儲管理系統/送貨單審核.Designer.vb Zobrazit soubor

@@ -23,14 +23,14 @@ 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()
31
-        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
-        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
-        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
26
+        Dim DataGridViewCellStyle25 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
+        Dim DataGridViewCellStyle26 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
+        Dim DataGridViewCellStyle27 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
+        Dim DataGridViewCellStyle28 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle29 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Dim DataGridViewCellStyle30 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
+        Dim DataGridViewCellStyle31 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
+        Dim DataGridViewCellStyle32 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34 34
         Me.Panel1 = New System.Windows.Forms.Panel()
35 35
         Me.Panel2 = New System.Windows.Forms.Panel()
36 36
         Me.訂購明細_dgv = New System.Windows.Forms.DataGridView()
@@ -77,6 +77,7 @@ Partial Class 送貨單審核
77 77
         Me.ToolTip1 = New System.Windows.Forms.ToolTip(Me.components)
78 78
         Me.指定倉庫_cb = New System.Windows.Forms.ComboBox()
79 79
         Me.Label12 = New System.Windows.Forms.Label()
80
+        Me.已出貨_ch = New System.Windows.Forms.CheckBox()
80 81
         Me.Panel1.SuspendLayout()
81 82
         Me.Panel2.SuspendLayout()
82 83
         CType(Me.訂購明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -110,7 +111,6 @@ Partial Class 送貨單審核
110 111
         Me.Panel2.Controls.Add(Me.電話1_tb)
111 112
         Me.Panel2.Controls.Add(Me.項次_lb)
112 113
         Me.Panel2.Controls.Add(Me.地址1_tb)
113
-        Me.Panel2.Controls.Add(Me.已簽收_ch)
114 114
         Me.Panel2.Controls.Add(Me.項次_tb)
115 115
         Me.Panel2.Location = New System.Drawing.Point(41, 197)
116 116
         Me.Panel2.Name = "Panel2"
@@ -120,8 +120,8 @@ Partial Class 送貨單審核
120 120
         '
121 121
         '訂購明細_dgv
122 122
         '
123
-        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
124
-        Me.訂購明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
123
+        DataGridViewCellStyle25.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
124
+        Me.訂購明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle25
125 125
         Me.訂購明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
126 126
             Or System.Windows.Forms.AnchorStyles.Left) _
127 127
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -132,9 +132,9 @@ Partial Class 送貨單審核
132 132
         Me.訂購明細_dgv.Location = New System.Drawing.Point(19, 177)
133 133
         Me.訂購明細_dgv.Name = "訂購明細_dgv"
134 134
         Me.訂購明細_dgv.RowHeadersWidth = 5
135
-        DataGridViewCellStyle2.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
136
-        DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
137
-        Me.訂購明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle2
135
+        DataGridViewCellStyle26.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
136
+        DataGridViewCellStyle26.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
137
+        Me.訂購明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle26
138 138
         Me.訂購明細_dgv.RowTemplate.Height = 24
139 139
         Me.訂購明細_dgv.Size = New System.Drawing.Size(103, 70)
140 140
         Me.訂購明細_dgv.TabIndex = 2221
@@ -215,7 +215,7 @@ Partial Class 送貨單審核
215 215
         Me.已簽收_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
216 216
         Me.已簽收_ch.AutoSize = True
217 217
         Me.已簽收_ch.Enabled = False
218
-        Me.已簽收_ch.Location = New System.Drawing.Point(221, 254)
218
+        Me.已簽收_ch.Location = New System.Drawing.Point(1253, 81)
219 219
         Me.已簽收_ch.Name = "已簽收_ch"
220 220
         Me.已簽收_ch.Size = New System.Drawing.Size(62, 20)
221 221
         Me.已簽收_ch.TabIndex = 2209
@@ -256,8 +256,8 @@ Partial Class 送貨單審核
256 256
         '
257 257
         '已核准_dgv
258 258
         '
259
-        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
260
-        Me.已核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
259
+        DataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
260
+        Me.已核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle27
261 261
         Me.已核准_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
262 262
             Or System.Windows.Forms.AnchorStyles.Left) _
263 263
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -268,16 +268,16 @@ Partial Class 送貨單審核
268 268
         Me.已核准_dgv.Location = New System.Drawing.Point(0, 30)
269 269
         Me.已核准_dgv.Name = "已核准_dgv"
270 270
         Me.已核准_dgv.RowHeadersWidth = 5
271
-        DataGridViewCellStyle4.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
272
-        Me.已核准_dgv.RowsDefaultCellStyle = DataGridViewCellStyle4
271
+        DataGridViewCellStyle28.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
272
+        Me.已核准_dgv.RowsDefaultCellStyle = DataGridViewCellStyle28
273 273
         Me.已核准_dgv.RowTemplate.Height = 24
274 274
         Me.已核准_dgv.Size = New System.Drawing.Size(385, 641)
275 275
         Me.已核准_dgv.TabIndex = 1027
276 276
         '
277 277
         '未核准_dgv
278 278
         '
279
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
280
-        Me.未核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
279
+        DataGridViewCellStyle29.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
280
+        Me.未核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle29
281 281
         Me.未核准_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
282 282
             Or System.Windows.Forms.AnchorStyles.Left) _
283 283
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -288,8 +288,8 @@ Partial Class 送貨單審核
288 288
         Me.未核准_dgv.Location = New System.Drawing.Point(0, 30)
289 289
         Me.未核准_dgv.Name = "未核准_dgv"
290 290
         Me.未核准_dgv.RowHeadersWidth = 5
291
-        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
292
-        Me.未核准_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
291
+        DataGridViewCellStyle30.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
292
+        Me.未核准_dgv.RowsDefaultCellStyle = DataGridViewCellStyle30
293 293
         Me.未核准_dgv.RowTemplate.Height = 24
294 294
         Me.未核准_dgv.Size = New System.Drawing.Size(385, 641)
295 295
         Me.未核准_dgv.TabIndex = 1032
@@ -309,8 +309,8 @@ Partial Class 送貨單審核
309 309
         '
310 310
         '送貨明細_dgv
311 311
         '
312
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
313
-        Me.送貨明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
312
+        DataGridViewCellStyle31.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
313
+        Me.送貨明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle31
314 314
         Me.送貨明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
315 315
             Or System.Windows.Forms.AnchorStyles.Left) _
316 316
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -321,9 +321,9 @@ Partial Class 送貨單審核
321 321
         Me.送貨明細_dgv.Location = New System.Drawing.Point(398, 106)
322 322
         Me.送貨明細_dgv.Name = "送貨明細_dgv"
323 323
         Me.送貨明細_dgv.RowHeadersWidth = 5
324
-        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
325
-        DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
326
-        Me.送貨明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle8
324
+        DataGridViewCellStyle32.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
325
+        DataGridViewCellStyle32.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
326
+        Me.送貨明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle32
327 327
         Me.送貨明細_dgv.RowTemplate.Height = 24
328 328
         Me.送貨明細_dgv.Size = New System.Drawing.Size(927, 572)
329 329
         Me.送貨明細_dgv.TabIndex = 2244
@@ -407,7 +407,7 @@ Partial Class 送貨單審核
407 407
         Me.備註_tb.Location = New System.Drawing.Point(947, 53)
408 408
         Me.備註_tb.Multiline = True
409 409
         Me.備註_tb.Name = "備註_tb"
410
-        Me.備註_tb.Size = New System.Drawing.Size(378, 48)
410
+        Me.備註_tb.Size = New System.Drawing.Size(300, 48)
411 411
         Me.備註_tb.TabIndex = 2238
412 412
         '
413 413
         '申請日期_lb
@@ -417,7 +417,7 @@ Partial Class 送貨單審核
417 417
         Me.申請日期_lb.Name = "申請日期_lb"
418 418
         Me.申請日期_lb.Size = New System.Drawing.Size(55, 16)
419 419
         Me.申請日期_lb.TabIndex = 2236
420
-        Me.申請日期_lb.Text = "申請日期"
420
+        Me.申請日期_lb.Text = "送貨日期"
421 421
         '
422 422
         '填表日期_dtp
423 423
         '
@@ -582,11 +582,24 @@ Partial Class 送貨單審核
582 582
         Me.Label12.Text = "出庫庫別"
583 583
         Me.Label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
584 584
         '
585
+        '已出貨_ch
586
+        '
587
+        Me.已出貨_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
588
+        Me.已出貨_ch.AutoSize = True
589
+        Me.已出貨_ch.Enabled = False
590
+        Me.已出貨_ch.Location = New System.Drawing.Point(1253, 55)
591
+        Me.已出貨_ch.Name = "已出貨_ch"
592
+        Me.已出貨_ch.Size = New System.Drawing.Size(62, 20)
593
+        Me.已出貨_ch.TabIndex = 2250
594
+        Me.已出貨_ch.Text = "已出貨"
595
+        Me.已出貨_ch.UseVisualStyleBackColor = True
596
+        '
585 597
         '送貨單審核
586 598
         '
587 599
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
588 600
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
589 601
         Me.ClientSize = New System.Drawing.Size(1334, 681)
602
+        Me.Controls.Add(Me.已出貨_ch)
590 603
         Me.Controls.Add(Me.指定倉庫_cb)
591 604
         Me.Controls.Add(Me.Label12)
592 605
         Me.Controls.Add(Me.車號_cb)
@@ -596,6 +609,7 @@ Partial Class 送貨單審核
596 609
         Me.Controls.Add(Me.小間距_ch)
597 610
         Me.Controls.Add(Me.大間距_ch)
598 611
         Me.Controls.Add(Me.中間距_ch)
612
+        Me.Controls.Add(Me.已簽收_ch)
599 613
         Me.Controls.Add(Me.Label8)
600 614
         Me.Controls.Add(Me.送貨單號_tb)
601 615
         Me.Controls.Add(Me.儲存_bt)
@@ -679,4 +693,5 @@ Partial Class 送貨單審核
679 693
     Friend WithEvents ToolTip1 As ToolTip
680 694
     Friend WithEvents 指定倉庫_cb As ComboBox
681 695
     Friend WithEvents Label12 As Label
696
+    Friend WithEvents 已出貨_ch As CheckBox
682 697
 End Class

+ 20
- 46
OW-ERP-SYS/03、倉儲管理系統/送貨單審核.vb Zobrazit soubor

@@ -1,5 +1,5 @@
1 1
 Public Class 送貨單審核
2
-    Dim EDR As Integer = 0 : Dim ESTR As String
2
+
3 3
     Private Sub 送貨單審核_Load(sender As Object, e As EventArgs) Handles MyBase.Load
4 4
         Me.MdiParent = OW_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
5 5
         儲存_bt.Enabled = False : 簽收_bt.Enabled = False
@@ -36,7 +36,7 @@
36 36
         未核准_dgv.ColumnHeadersHeight = 40 : 未核准_dgv.AllowUserToAddRows = False
37 37
         SQL_送貨單控制表_未審核()
38 38
         da.Fill(ds6) : 未核准_dgv.DataSource = ds6.Tables(0) : conn.Close()
39
-        For i As Integer = 0 To 14
39
+        For i As Integer = 0 To 16
40 40
             If i = 0 Then
41 41
                 未核准_dgv.Columns(i).FillWeight = 50 : 未核准_dgv.Columns(i).ReadOnly = True
42 42
             ElseIf i = 5 Then
@@ -54,7 +54,7 @@
54 54
         已核准_dgv.ColumnHeadersHeight = 40 : 已核准_dgv.AllowUserToAddRows = False
55 55
         SQL_送貨單控制表_已審核()
56 56
         da.Fill(ds6) : 已核准_dgv.DataSource = ds6.Tables(0) : conn.Close()
57
-        For i As Integer = 0 To 14
57
+        For i As Integer = 0 To 16
58 58
             If i = 0 Then
59 59
                 已核准_dgv.Columns(i).FillWeight = 50 : 已核准_dgv.Columns(i).ReadOnly = True
60 60
             ElseIf i = 5 Then
@@ -115,9 +115,9 @@
115 115
             客編_tb.Text = 未核准_dgv(4, e.RowIndex).Value.ToString : 客名_tb.Text = 未核准_dgv(5, e.RowIndex).Value.ToString
116 116
             地址_tb.Text = 未核准_dgv(6, e.RowIndex).Value.ToString : 電話_tb.Text = 未核准_dgv(7, e.RowIndex).Value.ToString
117 117
             備註_tb.Text = 未核准_dgv(8, e.RowIndex).Value.ToString : 已簽收_ch.Checked = 未核准_dgv(13, e.RowIndex).Value
118
-            指定倉庫_cb.Text = 未核准_dgv(14, e.RowIndex).Value.ToString
119
-            If Not String.IsNullOrEmpty(未核准_dgv(10, e.RowIndex).Value.ToString()) Then
120
-                填表日期_dtp.Value = Convert.ToDateTime(未核准_dgv(10, e.RowIndex).Value.ToString())
118
+            指定倉庫_cb.Text = 未核准_dgv(14, e.RowIndex).Value.ToString : 已出貨_ch.Checked = 未核准_dgv(15, e.RowIndex).Value
119
+            If Not String.IsNullOrEmpty(未核准_dgv(16, e.RowIndex).Value.ToString()) Then
120
+                填表日期_dtp.Value = Convert.ToDateTime(未核准_dgv(16, e.RowIndex).Value.ToString())
121 121
             End If
122 122
             Set_清單5()
123 123
         End If
@@ -129,9 +129,9 @@
129 129
             客編_tb.Text = 已核准_dgv(4, e.RowIndex).Value.ToString : 客名_tb.Text = 已核准_dgv(5, e.RowIndex).Value.ToString
130 130
             地址_tb.Text = 已核准_dgv(6, e.RowIndex).Value.ToString : 電話_tb.Text = 已核准_dgv(7, e.RowIndex).Value.ToString
131 131
             備註_tb.Text = 已核准_dgv(8, e.RowIndex).Value.ToString : 已簽收_ch.Checked = 已核准_dgv(13, e.RowIndex).Value
132
-            指定倉庫_cb.Text = 未核准_dgv(14, e.RowIndex).Value.ToString
133
-            If Not String.IsNullOrEmpty(已核准_dgv(10, e.RowIndex).Value.ToString()) Then
134
-                填表日期_dtp.Value = Convert.ToDateTime(已核准_dgv(10, e.RowIndex).Value.ToString())
132
+            指定倉庫_cb.Text = 已核准_dgv(14, e.RowIndex).Value.ToString : 已出貨_ch.Checked = 已核准_dgv(15, e.RowIndex).Value
133
+            If Not String.IsNullOrEmpty(已核准_dgv(16, e.RowIndex).Value.ToString()) Then
134
+                填表日期_dtp.Value = Convert.ToDateTime(已核准_dgv(16, e.RowIndex).Value.ToString())
135 135
             End If
136 136
             Set_清單5()
137 137
         End If
@@ -160,53 +160,27 @@
160 160
             Dim 日期 As String = 送貨明細_dgv.Rows(i).Cells("有效日期").Value
161 161
             SQL_送貨單明細表_存檔(送貨單號_tb.Text, 項次, 規格, 數量, 單位, 批號, 日期) : conn.Close()
162 162
         Next
163
-        SQL_送貨單控制表_修改(送貨單號_tb.Text, 訂購單號_tb.Text, 客編_tb.Text, 地址_tb.Text, 電話_tb.Text, 備註_tb.Text, 物流_tb.Text, 車號_cb.Text, 指定倉庫_cb.Text)
163
+        SQL_送貨單控制表_修改(送貨單號_tb.Text, 訂購單號_tb.Text, 客編_tb.Text, 地址_tb.Text, 電話_tb.Text, 備註_tb.Text, 物流_tb.Text, 車號_cb.Text, 指定倉庫_cb.Text, 填表日期_dtp.Value.ToString("yyyy/MM/dd"))
164 164
     End Sub
165 165
 
166 166
     Private Sub 簽收_bt_Click(sender As Object, e As EventArgs) Handles 簽收_bt.Click
167 167
         Set_日期格式轉換()
168 168
         If 訂購單號_tb.Text = "" Then : MsgBox("沒有選擇單據。") : Else
169
-            存檔()
170
-            SQL_送貨單核准_核准(送貨單號_tb.Text, gUserName) : conn.Close()
171
-
172
-
173
-            SQL_指定倉儲_資料讀取(指定倉庫_cb.Text)
174
-            Dim 倉庫級別 As String = ""
175
-            Dim 倉庫編號 As String = ""
176
-            If dr.Read() Then
177
-                倉庫級別 = dr("倉級") : 倉庫編號 = dr("倉名編號")
178
-            End If : conn.Close()
179
-
180
-            For I As Integer = 0 To 送貨明細_dgv.Rows.Count - 1
181
-                SQL_倉儲明細表_最後一筆資料()
182
-                If dr.Read() Then : EDR = Double.Parse(Strings.Right(dr("資料流水號").ToString, 9)) : Else : EDR = 0 : End If
183
-                conn.Close()
184
-                EDR += 1
185
-                If EDR < 10 Then : ESTR = "WH" & "00000000" & EDR
186
-                ElseIf EDR > 9 And EDR < 100 Then : ESTR = "WH" & "0000000" & EDR
187
-                ElseIf EDR > 99 And EDR < 1000 Then : ESTR = "WH" & "000000" & EDR
188
-                ElseIf EDR > 999 And EDR < 10000 Then : ESTR = "WH" & "00000" & EDR
189
-                ElseIf EDR > 9999 And EDR < 100000 Then : ESTR = "WH" & "0000" & EDR
190
-                ElseIf EDR > 99999 And EDR < 100000 Then : ESTR = "WH" & "000" & EDR
191
-                ElseIf EDR > 999999 And EDR < 1000000 Then : ESTR = "WH" & "00" & EDR
192
-                ElseIf EDR > 9999999 And EDR < 10000000 Then : ESTR = "WH" & "0" & EDR
193
-                ElseIf EDR > 99999999 Then : ESTR = "WH" & EDR : End If
194
-                Dim 數量 As String = 送貨明細_dgv.Rows(I).Cells("數量").Value
195
-                Dim 料號 As String = 送貨明細_dgv.Rows(I).Cells("料號").Value
196
-                Dim 批號 As String = 送貨明細_dgv.Rows(I).Cells("生產批號").Value
197
-                SQL_料驗收與指定入庫_倉儲明細表_新增(ESTR, 送貨單號_tb.Text, 倉庫級別, 倉庫編號, 料號, "0", 數量, "", "送貨出庫", 批號) : conn.Close()
198
-            Next
199
-            MsgBox("單據 [" & 送貨單號_tb.Text & "] 核准完成。")
200
-            送貨明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 客編_tb.Text = ""
201
-            地址_tb.Text = "" : 電話_tb.Text = "" : 備註_tb.Text = "" : 送貨單號_tb.Text = "" : 指定倉庫_cb.Text = ""
202
-            物流_tb.Text = "" : 車號_cb.Text = "" : 項次_tb.Text = "" : 已簽收_ch.Checked = False
203
-            Set_清單5() : Set_清單1() : Set_清單2()
169
+            If 已出貨_ch.Checked = False Then : MsgBox("未出貨的單據無法審核") : Else
170
+                存檔()
171
+                SQL_送貨單核准_核准(送貨單號_tb.Text, gUserName) : conn.Close()
172
+                MsgBox("單據 [" & 送貨單號_tb.Text & "] 核准完成。")
173
+                送貨明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 客編_tb.Text = ""
174
+                地址_tb.Text = "" : 電話_tb.Text = "" : 備註_tb.Text = "" : 送貨單號_tb.Text = "" : 指定倉庫_cb.Text = ""
175
+                物流_tb.Text = "" : 車號_cb.Text = "" : 項次_tb.Text = "" : 已簽收_ch.Checked = False
176
+                Set_清單5() : Set_清單1() : Set_清單2()
177
+            End If
204 178
         End If
205 179
     End Sub
206 180
     Private Sub 儲存_bt_MouseEnter(sender As Object, e As EventArgs) Handles 儲存_bt.MouseEnter
207 181
         ToolTip1.SetToolTip(Me.儲存_bt, "儲存")
208 182
     End Sub
209 183
     Private Sub 簽收_bt_MouseEnter(sender As Object, e As EventArgs) Handles 簽收_bt.MouseEnter
210
-        ToolTip1.SetToolTip(Me.簽收_bt, "確認審核審核")
184
+        ToolTip1.SetToolTip(Me.簽收_bt, "核准")
211 185
     End Sub
212 186
 End Class

+ 132
- 143
OW-ERP-SYS/03、倉儲管理系統/送貨單申請.Designer.vb Zobrazit soubor

@@ -33,8 +33,6 @@ Partial Class 送貨單申請
33 33
         Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34 34
         Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35 35
         Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
-        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
-        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
38 36
         Me.TabControl1 = New System.Windows.Forms.TabControl()
39 37
         Me.TabPage1 = New System.Windows.Forms.TabPage()
40 38
         Me.Panel3 = New System.Windows.Forms.Panel()
@@ -51,20 +49,20 @@ Partial Class 送貨單申請
51 49
         Me.電話1_tb = New System.Windows.Forms.TextBox()
52 50
         Me.項次_lb = New System.Windows.Forms.Label()
53 51
         Me.地址1_tb = New System.Windows.Forms.TextBox()
54
-        Me.已簽收_ch = New System.Windows.Forms.CheckBox()
55 52
         Me.項次_tb = New System.Windows.Forms.TextBox()
56 53
         Me.Label3 = New System.Windows.Forms.Label()
57 54
         Me.客編1_tb = New System.Windows.Forms.TextBox()
58 55
         Me.訂單清單_dgv = New System.Windows.Forms.DataGridView()
59 56
         Me.Label2 = New System.Windows.Forms.Label()
57
+        Me.訂單加入_bt = New System.Windows.Forms.Button()
60 58
         Me.TabPage3 = New System.Windows.Forms.TabPage()
61 59
         Me.單據_p = New System.Windows.Forms.Panel()
62
-        Me.已審已收_rb = New System.Windows.Forms.RadioButton()
63 60
         Me.未審核_rb = New System.Windows.Forms.RadioButton()
64
-        Me.已審未收_rb = New System.Windows.Forms.RadioButton()
65
-        Me.已審已收_dgv = New System.Windows.Forms.DataGridView()
61
+        Me.已審核_rb = New System.Windows.Forms.RadioButton()
66 62
         Me.未核准_dgv = New System.Windows.Forms.DataGridView()
67
-        Me.已審未收_dgv = New System.Windows.Forms.DataGridView()
63
+        Me.已審核_dgv = New System.Windows.Forms.DataGridView()
64
+        Me.重新整理_bt = New System.Windows.Forms.Button()
65
+        Me.已簽收_ch = New System.Windows.Forms.CheckBox()
68 66
         Me.客名_tb = New System.Windows.Forms.TextBox()
69 67
         Me.Label1 = New System.Windows.Forms.Label()
70 68
         Me.客編_tb = New System.Windows.Forms.TextBox()
@@ -96,8 +94,8 @@ Partial Class 送貨單申請
96 94
         Me.刪除_bt = New System.Windows.Forms.Button()
97 95
         Me.儲存_bt = New System.Windows.Forms.Button()
98 96
         Me.開立訂購單_bt = New System.Windows.Forms.Button()
99
-        Me.訂單加入_bt = New System.Windows.Forms.Button()
100
-        Me.重新整理_bt = New System.Windows.Forms.Button()
97
+        Me.出貨_bt = New System.Windows.Forms.Button()
98
+        Me.已出貨_ch = New System.Windows.Forms.CheckBox()
101 99
         Me.TabControl1.SuspendLayout()
102 100
         Me.TabPage1.SuspendLayout()
103 101
         Me.Panel3.SuspendLayout()
@@ -106,9 +104,8 @@ Partial Class 送貨單申請
106 104
         CType(Me.訂單清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
107 105
         Me.TabPage3.SuspendLayout()
108 106
         Me.單據_p.SuspendLayout()
109
-        CType(Me.已審已收_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
110 107
         CType(Me.未核准_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
111
-        CType(Me.已審未收_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
108
+        CType(Me.已審_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
112 109
         CType(Me.送貨明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
113 110
         Me.SuspendLayout()
114 111
         '
@@ -197,7 +194,6 @@ Partial Class 送貨單申請
197 194
         Me.Panel1.Controls.Add(Me.電話1_tb)
198 195
         Me.Panel1.Controls.Add(Me.項次_lb)
199 196
         Me.Panel1.Controls.Add(Me.地址1_tb)
200
-        Me.Panel1.Controls.Add(Me.已簽收_ch)
201 197
         Me.Panel1.Controls.Add(Me.項次_tb)
202 198
         Me.Panel1.Location = New System.Drawing.Point(34, 230)
203 199
         Me.Panel1.Name = "Panel1"
@@ -297,18 +293,6 @@ Partial Class 送貨單申請
297 293
         Me.地址1_tb.Size = New System.Drawing.Size(95, 23)
298 294
         Me.地址1_tb.TabIndex = 1981
299 295
         '
300
-        '已簽收_ch
301
-        '
302
-        Me.已簽收_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
303
-        Me.已簽收_ch.AutoSize = True
304
-        Me.已簽收_ch.Enabled = False
305
-        Me.已簽收_ch.Location = New System.Drawing.Point(221, 254)
306
-        Me.已簽收_ch.Name = "已簽收_ch"
307
-        Me.已簽收_ch.Size = New System.Drawing.Size(62, 20)
308
-        Me.已簽收_ch.TabIndex = 2209
309
-        Me.已簽收_ch.Text = "已簽收"
310
-        Me.已簽收_ch.UseVisualStyleBackColor = True
311
-        '
312 296
         '項次_tb
313 297
         '
314 298
         Me.項次_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -367,6 +351,19 @@ Partial Class 送貨單申請
367 351
         Me.Label2.TabIndex = 1991
368 352
         Me.Label2.Text = "客戶編號"
369 353
         '
354
+        '訂單加入_bt
355
+        '
356
+        Me.訂單加入_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
357
+        Me.訂單加入_bt.BackgroundImage = Global.OW_ERP_SYS.My.Resources.Resources.add_blue_cercle
358
+        Me.訂單加入_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
359
+        Me.訂單加入_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
360
+        Me.訂單加入_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
361
+        Me.訂單加入_bt.Location = New System.Drawing.Point(335, 8)
362
+        Me.訂單加入_bt.Name = "訂單加入_bt"
363
+        Me.訂單加入_bt.Size = New System.Drawing.Size(50, 50)
364
+        Me.訂單加入_bt.TabIndex = 1030
365
+        Me.訂單加入_bt.UseVisualStyleBackColor = True
366
+        '
370 367
         'TabPage3
371 368
         '
372 369
         Me.TabPage3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
@@ -385,30 +382,16 @@ Partial Class 送貨單申請
385 382
             Or System.Windows.Forms.AnchorStyles.Left) _
386 383
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
387 384
         Me.單據_p.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
388
-        Me.單據_p.Controls.Add(Me.已審已收_rb)
389 385
         Me.單據_p.Controls.Add(Me.未審核_rb)
390
-        Me.單據_p.Controls.Add(Me.已審未收_rb)
391
-        Me.單據_p.Controls.Add(Me.已審已收_dgv)
386
+        Me.單據_p.Controls.Add(Me.已審核_rb)
392 387
         Me.單據_p.Controls.Add(Me.未核准_dgv)
393
-        Me.單據_p.Controls.Add(Me.已審未收_dgv)
388
+        Me.單據_p.Controls.Add(Me.已審_dgv)
394 389
         Me.單據_p.Controls.Add(Me.重新整理_bt)
395 390
         Me.單據_p.Location = New System.Drawing.Point(0, -1)
396 391
         Me.單據_p.Name = "單據_p"
397 392
         Me.單據_p.Size = New System.Drawing.Size(390, 645)
398 393
         Me.單據_p.TabIndex = 5
399 394
         '
400
-        '已審已收_rb
401
-        '
402
-        Me.已審已收_rb.AutoSize = True
403
-        Me.已審已收_rb.ForeColor = System.Drawing.Color.Green
404
-        Me.已審已收_rb.Location = New System.Drawing.Point(223, 2)
405
-        Me.已審已收_rb.Name = "已審已收_rb"
406
-        Me.已審已收_rb.Size = New System.Drawing.Size(112, 20)
407
-        Me.已審已收_rb.TabIndex = 1951
408
-        Me.已審已收_rb.TabStop = True
409
-        Me.已審已收_rb.Text = "已 審 核 已 簽 收"
410
-        Me.已審已收_rb.UseVisualStyleBackColor = True
411
-        '
412 395
         '未審核_rb
413 396
         '
414 397
         Me.未審核_rb.AutoSize = True
@@ -421,42 +404,22 @@ Partial Class 送貨單申請
421 404
         Me.未審核_rb.Text = "未  審  核"
422 405
         Me.未審核_rb.UseVisualStyleBackColor = True
423 406
         '
424
-        '已審未收_rb
407
+        '已審_rb
425 408
         '
426
-        Me.已審未收_rb.AutoSize = True
427
-        Me.已審未收_rb.ForeColor = System.Drawing.Color.Green
428
-        Me.已審未收_rb.Location = New System.Drawing.Point(95, 2)
429
-        Me.已審未收_rb.Name = "已審未收_rb"
430
-        Me.已審未收_rb.Size = New System.Drawing.Size(112, 20)
431
-        Me.已審未收_rb.TabIndex = 1024
432
-        Me.已審未收_rb.TabStop = True
433
-        Me.已審未收_rb.Text = "已 審 核 未 簽 收"
434
-        Me.已審未收_rb.UseVisualStyleBackColor = True
435
-        '
436
-        '已審已收_dgv
437
-        '
438
-        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
439
-        Me.已審已收_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
440
-        Me.已審已收_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
441
-            Or System.Windows.Forms.AnchorStyles.Left) _
442
-            Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
443
-        Me.已審已收_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
444
-        Me.已審已收_dgv.BackgroundColor = System.Drawing.Color.White
445
-        Me.已審已收_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
446
-        Me.已審已收_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
447
-        Me.已審已收_dgv.Location = New System.Drawing.Point(2, 28)
448
-        Me.已審已收_dgv.Name = "已審已收_dgv"
449
-        Me.已審已收_dgv.RowHeadersWidth = 5
450
-        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
451
-        Me.已審已收_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
452
-        Me.已審已收_dgv.RowTemplate.Height = 24
453
-        Me.已審已收_dgv.Size = New System.Drawing.Size(385, 612)
454
-        Me.已審已收_dgv.TabIndex = 1022
409
+        Me.已審核_rb.AutoSize = True
410
+        Me.已審核_rb.ForeColor = System.Drawing.Color.Green
411
+        Me.已審核_rb.Location = New System.Drawing.Point(141, 2)
412
+        Me.已審核_rb.Name = "已審核_rb"
413
+        Me.已審核_rb.Size = New System.Drawing.Size(67, 20)
414
+        Me.已審核_rb.TabIndex = 1024
415
+        Me.已審核_rb.TabStop = True
416
+        Me.已審核_rb.Text = "已 審 核"
417
+        Me.已審核_rb.UseVisualStyleBackColor = True
455 418
         '
456 419
         '未核准_dgv
457 420
         '
458
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
459
-        Me.未核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
421
+        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
422
+        Me.未核准_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
460 423
         Me.未核准_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
461 424
             Or System.Windows.Forms.AnchorStyles.Left) _
462 425
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -467,31 +430,56 @@ Partial Class 送貨單申請
467 430
         Me.未核准_dgv.Location = New System.Drawing.Point(2, 28)
468 431
         Me.未核准_dgv.Name = "未核准_dgv"
469 432
         Me.未核准_dgv.RowHeadersWidth = 5
470
-        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
471
-        Me.未核准_dgv.RowsDefaultCellStyle = DataGridViewCellStyle8
433
+        DataGridViewCellStyle6.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
434
+        Me.未核准_dgv.RowsDefaultCellStyle = DataGridViewCellStyle6
472 435
         Me.未核准_dgv.RowTemplate.Height = 24
473 436
         Me.未核准_dgv.Size = New System.Drawing.Size(385, 612)
474 437
         Me.未核准_dgv.TabIndex = 1026
475 438
         '
476
-        '已審未收_dgv
439
+        '已審_dgv
477 440
         '
478
-        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
479
-        Me.已審未收_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
480
-        Me.已審未收_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
441
+        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(192, Byte), Integer))
442
+        Me.已審核_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
443
+        Me.已審_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
481 444
             Or System.Windows.Forms.AnchorStyles.Left) _
482 445
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
483
-        Me.已審未收_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
484
-        Me.已審未收_dgv.BackgroundColor = System.Drawing.Color.White
485
-        Me.已審未收_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
486
-        Me.已審未收_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
487
-        Me.已審未收_dgv.Location = New System.Drawing.Point(2, 28)
488
-        Me.已審未收_dgv.Name = "已審未收_dgv"
489
-        Me.已審未收_dgv.RowHeadersWidth = 5
490
-        DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
491
-        Me.已審未收_dgv.RowsDefaultCellStyle = DataGridViewCellStyle10
492
-        Me.已審未收_dgv.RowTemplate.Height = 24
493
-        Me.已審未收_dgv.Size = New System.Drawing.Size(385, 612)
494
-        Me.已審未收_dgv.TabIndex = 1018
446
+        Me.已審核_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
447
+        Me.已審核_dgv.BackgroundColor = System.Drawing.Color.White
448
+        Me.已審核_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
449
+        Me.已審核_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
450
+        Me.已審核_dgv.Location = New System.Drawing.Point(2, 28)
451
+        Me.已審核_dgv.Name = "已審核_dgv"
452
+        Me.已審核_dgv.RowHeadersWidth = 5
453
+        DataGridViewCellStyle8.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
454
+        Me.已審核_dgv.RowsDefaultCellStyle = DataGridViewCellStyle8
455
+        Me.已審核_dgv.RowTemplate.Height = 24
456
+        Me.已審核_dgv.Size = New System.Drawing.Size(385, 612)
457
+        Me.已審核_dgv.TabIndex = 1018
458
+        '
459
+        '重新整理_bt
460
+        '
461
+        Me.重新整理_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
462
+        Me.重新整理_bt.BackgroundImage = Global.OW_ERP_SYS.My.Resources.Resources.renew
463
+        Me.重新整理_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
464
+        Me.重新整理_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
465
+        Me.重新整理_bt.ForeColor = System.Drawing.Color.Black
466
+        Me.重新整理_bt.Location = New System.Drawing.Point(359, 0)
467
+        Me.重新整理_bt.Name = "重新整理_bt"
468
+        Me.重新整理_bt.Size = New System.Drawing.Size(27, 27)
469
+        Me.重新整理_bt.TabIndex = 1950
470
+        Me.重新整理_bt.UseVisualStyleBackColor = True
471
+        '
472
+        '已簽收_ch
473
+        '
474
+        Me.已簽收_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
475
+        Me.已簽收_ch.AutoSize = True
476
+        Me.已簽收_ch.Enabled = False
477
+        Me.已簽收_ch.Location = New System.Drawing.Point(1162, 105)
478
+        Me.已簽收_ch.Name = "已簽收_ch"
479
+        Me.已簽收_ch.Size = New System.Drawing.Size(62, 20)
480
+        Me.已簽收_ch.TabIndex = 2209
481
+        Me.已簽收_ch.Text = "已簽收"
482
+        Me.已簽收_ch.UseVisualStyleBackColor = True
495 483
         '
496 484
         '客名_tb
497 485
         '
@@ -626,16 +614,16 @@ Partial Class 送貨單申請
626 614
         Me.車號_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple
627 615
         Me.車號_cb.FormattingEnabled = True
628 616
         Me.車號_cb.Items.AddRange(New Object() {"2019"})
629
-        Me.車號_cb.Location = New System.Drawing.Point(956, 76)
617
+        Me.車號_cb.Location = New System.Drawing.Point(850, 76)
630 618
         Me.車號_cb.Name = "車號_cb"
631
-        Me.車號_cb.Size = New System.Drawing.Size(197, 24)
619
+        Me.車號_cb.Size = New System.Drawing.Size(131, 24)
632 620
         Me.車號_cb.TabIndex = 2032
633 621
         '
634 622
         'Label9
635 623
         '
636 624
         Me.Label9.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
637 625
         Me.Label9.AutoSize = True
638
-        Me.Label9.Location = New System.Drawing.Point(895, 80)
626
+        Me.Label9.Location = New System.Drawing.Point(789, 80)
639 627
         Me.Label9.Name = "Label9"
640 628
         Me.Label9.Size = New System.Drawing.Size(55, 16)
641 629
         Me.Label9.TabIndex = 2031
@@ -645,17 +633,17 @@ Partial Class 送貨單申請
645 633
         '
646 634
         Me.申請日期_lb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
647 635
         Me.申請日期_lb.AutoSize = True
648
-        Me.申請日期_lb.Location = New System.Drawing.Point(1159, 80)
636
+        Me.申請日期_lb.Location = New System.Drawing.Point(986, 80)
649 637
         Me.申請日期_lb.Name = "申請日期_lb"
650 638
         Me.申請日期_lb.Size = New System.Drawing.Size(55, 16)
651 639
         Me.申請日期_lb.TabIndex = 2033
652
-        Me.申請日期_lb.Text = "申請日期"
640
+        Me.申請日期_lb.Text = "送貨日期"
653 641
         '
654 642
         '填表日期_dtp
655 643
         '
656 644
         Me.填表日期_dtp.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
657 645
         Me.填表日期_dtp.Format = System.Windows.Forms.DateTimePickerFormat.[Short]
658
-        Me.填表日期_dtp.Location = New System.Drawing.Point(1220, 77)
646
+        Me.填表日期_dtp.Location = New System.Drawing.Point(1047, 76)
659 647
         Me.填表日期_dtp.Name = "填表日期_dtp"
660 648
         Me.填表日期_dtp.Size = New System.Drawing.Size(109, 23)
661 649
         Me.填表日期_dtp.TabIndex = 2034
@@ -676,14 +664,14 @@ Partial Class 送貨單申請
676 664
         Me.備註_tb.Location = New System.Drawing.Point(463, 77)
677 665
         Me.備註_tb.Multiline = True
678 666
         Me.備註_tb.Name = "備註_tb"
679
-        Me.備註_tb.Size = New System.Drawing.Size(427, 48)
667
+        Me.備註_tb.Size = New System.Drawing.Size(324, 48)
680 668
         Me.備註_tb.TabIndex = 2035
681 669
         '
682 670
         '小間距_ch
683 671
         '
684 672
         Me.小間距_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
685 673
         Me.小間距_ch.AutoSize = True
686
-        Me.小間距_ch.Location = New System.Drawing.Point(1187, 106)
674
+        Me.小間距_ch.Location = New System.Drawing.Point(1002, 105)
687 675
         Me.小間距_ch.Name = "小間距_ch"
688 676
         Me.小間距_ch.Size = New System.Drawing.Size(39, 20)
689 677
         Me.小間距_ch.TabIndex = 2217
@@ -694,7 +682,7 @@ Partial Class 送貨單申請
694 682
         '
695 683
         Me.大間距_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
696 684
         Me.大間距_ch.AutoSize = True
697
-        Me.大間距_ch.Location = New System.Drawing.Point(1272, 106)
685
+        Me.大間距_ch.Location = New System.Drawing.Point(1087, 105)
698 686
         Me.大間距_ch.Name = "大間距_ch"
699 687
         Me.大間距_ch.Size = New System.Drawing.Size(39, 20)
700 688
         Me.大間距_ch.TabIndex = 2219
@@ -707,7 +695,7 @@ Partial Class 送貨單申請
707 695
         Me.中間距_ch.AutoSize = True
708 696
         Me.中間距_ch.Checked = True
709 697
         Me.中間距_ch.CheckState = System.Windows.Forms.CheckState.Checked
710
-        Me.中間距_ch.Location = New System.Drawing.Point(1229, 106)
698
+        Me.中間距_ch.Location = New System.Drawing.Point(1044, 105)
711 699
         Me.中間距_ch.Name = "中間距_ch"
712 700
         Me.中間距_ch.Size = New System.Drawing.Size(39, 20)
713 701
         Me.中間距_ch.TabIndex = 2218
@@ -716,8 +704,8 @@ Partial Class 送貨單申請
716 704
         '
717 705
         '送貨明細_dgv
718 706
         '
719
-        DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
720
-        Me.送貨明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
707
+        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
708
+        Me.送貨明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
721 709
         Me.送貨明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
722 710
             Or System.Windows.Forms.AnchorStyles.Left) _
723 711
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -728,9 +716,9 @@ Partial Class 送貨單申請
728 716
         Me.送貨明細_dgv.Location = New System.Drawing.Point(403, 131)
729 717
         Me.送貨明細_dgv.Name = "送貨明細_dgv"
730 718
         Me.送貨明細_dgv.RowHeadersWidth = 5
731
-        DataGridViewCellStyle12.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
732
-        DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
733
-        Me.送貨明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle12
719
+        DataGridViewCellStyle10.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
720
+        DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
721
+        Me.送貨明細_dgv.RowsDefaultCellStyle = DataGridViewCellStyle10
734 722
         Me.送貨明細_dgv.RowTemplate.Height = 24
735 723
         Me.送貨明細_dgv.Size = New System.Drawing.Size(929, 546)
736 724
         Me.送貨明細_dgv.TabIndex = 2220
@@ -749,16 +737,16 @@ Partial Class 送貨單申請
749 737
         Me.指定倉庫_cb.DropDownStyle = System.Windows.Forms.ComboBoxStyle.Simple
750 738
         Me.指定倉庫_cb.FormattingEnabled = True
751 739
         Me.指定倉庫_cb.Items.AddRange(New Object() {"2019"})
752
-        Me.指定倉庫_cb.Location = New System.Drawing.Point(956, 101)
740
+        Me.指定倉庫_cb.Location = New System.Drawing.Point(850, 101)
753 741
         Me.指定倉庫_cb.Name = "指定倉庫_cb"
754
-        Me.指定倉庫_cb.Size = New System.Drawing.Size(197, 24)
742
+        Me.指定倉庫_cb.Size = New System.Drawing.Size(131, 24)
755 743
         Me.指定倉庫_cb.TabIndex = 2222
756 744
         '
757 745
         'Label12
758 746
         '
759 747
         Me.Label12.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
760 748
         Me.Label12.AutoSize = True
761
-        Me.Label12.Location = New System.Drawing.Point(895, 105)
749
+        Me.Label12.Location = New System.Drawing.Point(789, 105)
762 750
         Me.Label12.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
763 751
         Me.Label12.Name = "Label12"
764 752
         Me.Label12.Size = New System.Drawing.Size(55, 16)
@@ -773,7 +761,7 @@ Partial Class 送貨單申請
773 761
         Me.簽收_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
774 762
         Me.簽收_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
775 763
         Me.簽收_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
776
-        Me.簽收_bt.Location = New System.Drawing.Point(1231, 1)
764
+        Me.簽收_bt.Location = New System.Drawing.Point(1280, 77)
777 765
         Me.簽收_bt.Name = "簽收_bt"
778 766
         Me.簽收_bt.Size = New System.Drawing.Size(50, 50)
779 767
         Me.簽收_bt.TabIndex = 2221
@@ -786,7 +774,7 @@ Partial Class 送貨單申請
786 774
         Me.刪除_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
787 775
         Me.刪除_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
788 776
         Me.刪除_bt.ForeColor = System.Drawing.Color.Red
789
-        Me.刪除_bt.Location = New System.Drawing.Point(1281, 1)
777
+        Me.刪除_bt.Location = New System.Drawing.Point(1280, 1)
790 778
         Me.刪除_bt.Name = "刪除_bt"
791 779
         Me.刪除_bt.Size = New System.Drawing.Size(50, 50)
792 780
         Me.刪除_bt.TabIndex = 2212
@@ -799,7 +787,7 @@ Partial Class 送貨單申請
799 787
         Me.儲存_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
800 788
         Me.儲存_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
801 789
         Me.儲存_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
802
-        Me.儲存_bt.Location = New System.Drawing.Point(1181, 1)
790
+        Me.儲存_bt.Location = New System.Drawing.Point(1230, 1)
803 791
         Me.儲存_bt.Name = "儲存_bt"
804 792
         Me.儲存_bt.Size = New System.Drawing.Size(50, 50)
805 793
         Me.儲存_bt.TabIndex = 2211
@@ -812,43 +800,44 @@ Partial Class 送貨單申請
812 800
         Me.開立訂購單_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
813 801
         Me.開立訂購單_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
814 802
         Me.開立訂購單_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
815
-        Me.開立訂購單_bt.Location = New System.Drawing.Point(1131, 1)
803
+        Me.開立訂購單_bt.Location = New System.Drawing.Point(1180, 1)
816 804
         Me.開立訂購單_bt.Name = "開立訂購單_bt"
817 805
         Me.開立訂購單_bt.Size = New System.Drawing.Size(50, 50)
818 806
         Me.開立訂購單_bt.TabIndex = 2210
819 807
         Me.開立訂購單_bt.UseVisualStyleBackColor = True
820 808
         '
821
-        '訂單加入_bt
822
-        '
823
-        Me.訂單加入_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
824
-        Me.訂單加入_bt.BackgroundImage = Global.OW_ERP_SYS.My.Resources.Resources.add_blue_cercle
825
-        Me.訂單加入_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
826
-        Me.訂單加入_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
827
-        Me.訂單加入_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
828
-        Me.訂單加入_bt.Location = New System.Drawing.Point(335, 8)
829
-        Me.訂單加入_bt.Name = "訂單加入_bt"
830
-        Me.訂單加入_bt.Size = New System.Drawing.Size(50, 50)
831
-        Me.訂單加入_bt.TabIndex = 1030
832
-        Me.訂單加入_bt.UseVisualStyleBackColor = True
833
-        '
834
-        '重新整理_bt
835
-        '
836
-        Me.重新整理_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
837
-        Me.重新整理_bt.BackgroundImage = Global.OW_ERP_SYS.My.Resources.Resources.renew
838
-        Me.重新整理_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
839
-        Me.重新整理_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
840
-        Me.重新整理_bt.ForeColor = System.Drawing.Color.Black
841
-        Me.重新整理_bt.Location = New System.Drawing.Point(359, 0)
842
-        Me.重新整理_bt.Name = "重新整理_bt"
843
-        Me.重新整理_bt.Size = New System.Drawing.Size(27, 27)
844
-        Me.重新整理_bt.TabIndex = 1950
845
-        Me.重新整理_bt.UseVisualStyleBackColor = True
809
+        '出貨_bt
810
+        '
811
+        Me.出貨_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
812
+        Me.出貨_bt.BackgroundImage = Global.OW_ERP_SYS.My.Resources.Resources.Carton_01
813
+        Me.出貨_bt.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom
814
+        Me.出貨_bt.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
815
+        Me.出貨_bt.ForeColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(0, Byte), Integer), CType(CType(192, Byte), Integer))
816
+        Me.出貨_bt.Location = New System.Drawing.Point(1230, 77)
817
+        Me.出貨_bt.Name = "出貨_bt"
818
+        Me.出貨_bt.Size = New System.Drawing.Size(50, 50)
819
+        Me.出貨_bt.TabIndex = 2224
820
+        Me.出貨_bt.UseVisualStyleBackColor = True
821
+        '
822
+        '已出貨_ch
823
+        '
824
+        Me.已出貨_ch.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
825
+        Me.已出貨_ch.AutoSize = True
826
+        Me.已出貨_ch.Enabled = False
827
+        Me.已出貨_ch.Location = New System.Drawing.Point(1162, 80)
828
+        Me.已出貨_ch.Name = "已出貨_ch"
829
+        Me.已出貨_ch.Size = New System.Drawing.Size(62, 20)
830
+        Me.已出貨_ch.TabIndex = 2225
831
+        Me.已出貨_ch.Text = "已出貨"
832
+        Me.已出貨_ch.UseVisualStyleBackColor = True
846 833
         '
847 834
         '送貨單申請
848 835
         '
849 836
         Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
850 837
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
851 838
         Me.ClientSize = New System.Drawing.Size(1334, 681)
839
+        Me.Controls.Add(Me.已出貨_ch)
840
+        Me.Controls.Add(Me.出貨_bt)
852 841
         Me.Controls.Add(Me.指定倉庫_cb)
853 842
         Me.Controls.Add(Me.Label12)
854 843
         Me.Controls.Add(Me.簽收_bt)
@@ -857,6 +846,7 @@ Partial Class 送貨單申請
857 846
         Me.Controls.Add(Me.大間距_ch)
858 847
         Me.Controls.Add(Me.中間距_ch)
859 848
         Me.Controls.Add(Me.Label8)
849
+        Me.Controls.Add(Me.已簽收_ch)
860 850
         Me.Controls.Add(Me.送貨單號_tb)
861 851
         Me.Controls.Add(Me.刪除_bt)
862 852
         Me.Controls.Add(Me.儲存_bt)
@@ -895,9 +885,8 @@ Partial Class 送貨單申請
895 885
         Me.TabPage3.ResumeLayout(False)
896 886
         Me.單據_p.ResumeLayout(False)
897 887
         Me.單據_p.PerformLayout()
898
-        CType(Me.已審已收_dgv, System.ComponentModel.ISupportInitialize).EndInit()
899 888
         CType(Me.未核准_dgv, System.ComponentModel.ISupportInitialize).EndInit()
900
-        CType(Me.已審未收_dgv, System.ComponentModel.ISupportInitialize).EndInit()
889
+        CType(Me.已審_dgv, System.ComponentModel.ISupportInitialize).EndInit()
901 890
         CType(Me.送貨明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
902 891
         Me.ResumeLayout(False)
903 892
         Me.PerformLayout()
@@ -916,12 +905,10 @@ Partial Class 送貨單申請
916 905
     Friend WithEvents TabPage3 As TabPage
917 906
     Friend WithEvents 單據_p As Panel
918 907
     Friend WithEvents 未審核_rb As RadioButton
919
-    Friend WithEvents 已審未收_rb As RadioButton
920
-    Friend WithEvents 已審已收_dgv As DataGridView
908
+    Friend WithEvents 已審核_rb As RadioButton
921 909
     Friend WithEvents 未核准_dgv As DataGridView
922
-    Friend WithEvents 已審未收_dgv As DataGridView
910
+    Friend WithEvents 已審_dgv As DataGridView
923 911
     Friend WithEvents 重新整理_bt As Button
924
-    Friend WithEvents 已審已收_rb As RadioButton
925 912
     Friend WithEvents 訂購單號1_tb As TextBox
926 913
     Friend WithEvents 客名1_tb As TextBox
927 914
     Friend WithEvents 請購單號_lb As Label
@@ -967,4 +954,6 @@ Partial Class 送貨單申請
967 954
     Friend WithEvents ToolTip1 As ToolTip
968 955
     Friend WithEvents 指定倉庫_cb As ComboBox
969 956
     Friend WithEvents Label12 As Label
957
+    Friend WithEvents 出貨_bt As Button
958
+    Friend WithEvents 已出貨_ch As CheckBox
970 959
 End Class

+ 141
- 95
OW-ERP-SYS/03、倉儲管理系統/送貨單申請.vb Zobrazit soubor

@@ -3,12 +3,13 @@ Imports System.Windows.Forms.VisualStyles.VisualStyleElement
3 3
 
4 4
 Public Class 送貨單申請
5 5
     Dim 訂單 As String
6
+    Dim EDR As Integer = 0 : Dim ESTR As String
6 7
     Private Sub 送貨單申請_Load(sender As Object, e As EventArgs) Handles MyBase.Load
7 8
         Me.MdiParent = OW_ERP_SYS : Me.WindowState = 2 : Me.AutoScroll = True
8
-        開立訂購單_bt.Enabled = True : 刪除_bt.Enabled = False : 儲存_bt.Enabled = False : 訂單加入_bt.Enabled = False : 簽收_bt.Enabled = False
9
-        未核准_dgv.Visible = True : 已審未收_dgv.Visible = False : 已審已收_dgv.Visible = False
9
+        開立訂購單_bt.Enabled = True : 刪除_bt.Enabled = False : 儲存_bt.Enabled = False : 訂單加入_bt.Enabled = False : 簽收_bt.Enabled = False : 出貨_bt.Enabled = False
10
+        未核准_dgv.Visible = True : 已審_dgv.Visible = False
10 11
         小間距_ch.Checked = False : 中間距_ch.Checked = True : 大間距_ch.Checked = False : 未審核_rb.Checked = True
11
-        車號類別_cb_下拉表單資料載入() : 指定倉庫_cb_下拉表單資料載入() : Set_清單4() : Set_清單1() : Set_清單2() : Set_清單3()
12
+        車號類別_cb_下拉表單資料載入() : 指定倉庫_cb_下拉表單資料載入() : Set_清單4() : Set_清單1() : Set_清單2()
12 13
     End Sub
13 14
     Private Sub 車號_cb_Click(sender As Object, e As EventArgs) Handles 車號_cb.Click
14 15
         CB選擇清單(車號_cb, 車號_cb.Text)
@@ -39,7 +40,7 @@ Public Class 送貨單申請
39 40
         未核准_dgv.ColumnHeadersHeight = 40 : 未核准_dgv.AllowUserToAddRows = False
40 41
         SQL_送貨單控制表_未審核()
41 42
         da.Fill(ds6) : 未核准_dgv.DataSource = ds6.Tables(0) : conn.Close()
42
-        For i As Integer = 0 To 14
43
+        For i As Integer = 0 To 16
43 44
             If i = 0 Then
44 45
                 未核准_dgv.Columns(i).FillWeight = 50 : 未核准_dgv.Columns(i).ReadOnly = True
45 46
             ElseIf i = 5 Then
@@ -52,41 +53,24 @@ Public Class 送貨單申請
52 53
         Next
53 54
     End Sub
54 55
     Private Sub Set_清單2()
55
-        Dim ds6 As New DataSet : 已審未收_dgv.DataSource = Nothing : ds6.Clear()
56
-        已審未收_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
57
-        已審未收_dgv.ColumnHeadersHeight = 40 : 已審未收_dgv.AllowUserToAddRows = False
58
-        SQL_送貨單控制表_已審未收()
59
-        da.Fill(ds6) : 已審未收_dgv.DataSource = ds6.Tables(0) : conn.Close()
60
-        For i As Integer = 0 To 14
56
+        Dim ds6 As New DataSet : 已審_dgv.DataSource = Nothing : ds6.Clear()
57
+        已審_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
58
+        已審核_dgv.ColumnHeadersHeight = 40 : 已審核_dgv.AllowUserToAddRows = False
59
+        SQL_送貨單控制表_已審()
60
+        da.Fill(ds6) : 已審_dgv.DataSource = ds6.Tables(0) : conn.Close()
61
+        For i As Integer = 0 To 16
61 62
             If i = 0 Then
62
-                已審未收_dgv.Columns(i).FillWeight = 50 : 已審未收_dgv.Columns(i).ReadOnly = True
63
+                已審核_dgv.Columns(i).FillWeight = 50 : 已審核_dgv.Columns(i).ReadOnly = True
63 64
             ElseIf i = 5 Then
64
-                已審未收_dgv.Columns(i).FillWeight = 80 : 已審未收_dgv.Columns(i).ReadOnly = True
65
+                已審核_dgv.Columns(i).FillWeight = 80 : 已審核_dgv.Columns(i).ReadOnly = True
65 66
             ElseIf i = 9 Then
66
-                已審未收_dgv.Columns(i).FillWeight = 30 : 已審未收_dgv.Columns(i).ReadOnly = True
67
+                已審核_dgv.Columns(i).FillWeight = 30 : 已審核_dgv.Columns(i).ReadOnly = True
67 68
             Else
68
-                已審未收_dgv.Columns(i).Visible = False
69
-            End If
70
-        Next
71
-    End Sub
72
-    Private Sub Set_清單3()
73
-        Dim ds6 As New DataSet : 已審已收_dgv.DataSource = Nothing : ds6.Clear()
74
-        已審已收_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
75
-        已審已收_dgv.ColumnHeadersHeight = 40 : 已審已收_dgv.AllowUserToAddRows = False
76
-        SQL_送貨單控制表_已審已收()
77
-        da.Fill(ds6) : 已審已收_dgv.DataSource = ds6.Tables(0) : conn.Close()
78
-        For i As Integer = 0 To 14
79
-            If i = 0 Then
80
-                已審已收_dgv.Columns(i).FillWeight = 50 : 已審已收_dgv.Columns(i).ReadOnly = True
81
-            ElseIf i = 5 Then
82
-                已審已收_dgv.Columns(i).FillWeight = 80 : 已審已收_dgv.Columns(i).ReadOnly = True
83
-            ElseIf i = 9 Then
84
-                已審已收_dgv.Columns(i).FillWeight = 30 : 已審已收_dgv.Columns(i).ReadOnly = True
85
-            Else
86
-                已審已收_dgv.Columns(i).Visible = False
69
+                已審核_dgv.Columns(i).Visible = False
87 70
             End If
88 71
         Next
89 72
     End Sub
73
+
90 74
     Private Sub Set_清單4()
91 75
         Dim ds6 As New DataSet : 訂單清單_dgv.DataSource = Nothing : ds6.Clear()
92 76
         訂單清單_dgv.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
@@ -147,35 +131,24 @@ Public Class 送貨單申請
147 131
         If 未審核_rb.Checked = True Then
148 132
             送貨明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 客編_tb.Text = ""
149 133
             地址_tb.Text = "" : 電話_tb.Text = "" : 備註_tb.Text = "" : 送貨單號_tb.Text = "" : 指定倉庫_cb.Text = ""
150
-            物流_tb.Text = "" : 車號_cb.Text = "" : 項次_tb.Text = "" : 已簽收_ch.Checked = False
151
-            開立訂購單_bt.Enabled = True : 刪除_bt.Enabled = True : 儲存_bt.Enabled = True : 訂單加入_bt.Enabled = True : 簽收_bt.Enabled = False
152
-            未核准_dgv.Visible = True : 已審未收_dgv.Visible = False : 已審已收_dgv.Visible = False
153
-            未審核_rb.Checked = True : 已審未收_rb.Checked = False : 已審已收_rb.Checked = False
134
+            物流_tb.Text = "" : 車號_cb.Text = "" : 項次_tb.Text = "" : 已簽收_ch.Checked = False : 已出貨_ch.Checked = False
135
+            開立訂購單_bt.Enabled = True : 刪除_bt.Enabled = True : 儲存_bt.Enabled = True : 訂單加入_bt.Enabled = True : 簽收_bt.Enabled = False : 出貨_bt.Enabled = False
136
+            未核准_dgv.Visible = True : 已審_dgv.Visible = False
137
+            未審核_rb.Checked = True : 已審_rb.Checked = False
154 138
             Set_清單1()
155 139
         End If
156 140
     End Sub
157
-    Private Sub 已審未收_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 已審未收_rb.Click
158
-        If 已審未收_rb.Checked = True Then
141
+    Private Sub 已審核_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 已審核_rb.Click
142
+        If 已審_rb.Checked = True Then
159 143
             送貨明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 客編_tb.Text = ""
160 144
             地址_tb.Text = "" : 電話_tb.Text = "" : 備註_tb.Text = "" : 送貨單號_tb.Text = "" : 指定倉庫_cb.Text = ""
161
-            物流_tb.Text = "" : 車號_cb.Text = "" : 項次_tb.Text = "" : 已簽收_ch.Checked = False
162
-            開立訂購單_bt.Enabled = True : 刪除_bt.Enabled = False : 儲存_bt.Enabled = False : 訂單加入_bt.Enabled = False : 簽收_bt.Enabled = True
163
-            未核准_dgv.Visible = False : 已審未收_dgv.Visible = True : 已審已收_dgv.Visible = False
164
-            未審核_rb.Checked = False : 已審未收_rb.Checked = True : 已審已收_rb.Checked = False
145
+            物流_tb.Text = "" : 車號_cb.Text = "" : 項次_tb.Text = "" : 已簽收_ch.Checked = False : 已出貨_ch.Checked = False
146
+            開立訂購單_bt.Enabled = True : 刪除_bt.Enabled = False : 儲存_bt.Enabled = False : 訂單加入_bt.Enabled = False : 簽收_bt.Enabled = False : 出貨_bt.Enabled = False
147
+            未核准_dgv.Visible = False : 已審核_dgv.Visible = True
148
+            未審核_rb.Checked = False : 已審核_rb.Checked = True
165 149
             Set_清單2()
166 150
         End If
167 151
     End Sub
168
-    Private Sub 已審已收_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 已審已收_rb.Click
169
-        If 已審已收_rb.Checked = True Then
170
-            送貨明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 客編_tb.Text = ""
171
-            地址_tb.Text = "" : 電話_tb.Text = "" : 備註_tb.Text = "" : 送貨單號_tb.Text = "" : 指定倉庫_cb.Text = ""
172
-            物流_tb.Text = "" : 車號_cb.Text = "" : 項次_tb.Text = "" : 已簽收_ch.Checked = False
173
-            開立訂購單_bt.Enabled = True : 刪除_bt.Enabled = False : 儲存_bt.Enabled = False : 訂單加入_bt.Enabled = False : 簽收_bt.Enabled = False
174
-            未核准_dgv.Visible = False : 已審未收_dgv.Visible = False : 已審已收_dgv.Visible = True
175
-            未審核_rb.Checked = False : 已審未收_rb.Checked = False : 已審已收_rb.Checked = True
176
-            Set_清單3()
177
-        End If
178
-    End Sub
179 152
 
180 153
     Private Sub 訂單清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 訂單清單_dgv.CellClick
181 154
         If e.RowIndex = -1 Then : Else
@@ -191,55 +164,74 @@ Public Class 送貨單申請
191 164
             客編_tb.Text = 未核准_dgv(4, e.RowIndex).Value.ToString : 客名_tb.Text = 未核准_dgv(5, e.RowIndex).Value.ToString
192 165
             地址_tb.Text = 未核准_dgv(6, e.RowIndex).Value.ToString : 電話_tb.Text = 未核准_dgv(7, e.RowIndex).Value.ToString
193 166
             備註_tb.Text = 未核准_dgv(8, e.RowIndex).Value.ToString : 已簽收_ch.Checked = 未核准_dgv(13, e.RowIndex).Value
194
-            指定倉庫_cb.Text = 未核准_dgv(14, e.RowIndex).Value.ToString
195
-            If Not String.IsNullOrEmpty(未核准_dgv(10, e.RowIndex).Value.ToString()) Then
196
-                填表日期_dtp.Value = Convert.ToDateTime(未核准_dgv(10, e.RowIndex).Value.ToString())
167
+            指定倉庫_cb.Text = 未核准_dgv(14, e.RowIndex).Value.ToString : 已出貨_ch.Checked = 未核准_dgv(15, e.RowIndex).Value
168
+            If Not String.IsNullOrEmpty(未核准_dgv(16, e.RowIndex).Value.ToString()) Then
169
+                填表日期_dtp.Value = Convert.ToDateTime(未核准_dgv(16, e.RowIndex).Value.ToString())
197 170
             End If
198 171
             訂單 = 未核准_dgv(1, e.RowIndex).Value.ToString
199
-            Set_清單5()
200
-        End If
201
-    End Sub
202
-    Private Sub 已審未收_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 已審未收_dgv.CellClick
203
-        If e.RowIndex = -1 Then : Else
204
-            送貨單號_tb.Text = 已審未收_dgv(0, e.RowIndex).Value.ToString : 訂購單號_tb.Text = 已審未收_dgv(1, e.RowIndex).Value.ToString
205
-            物流_tb.Text = 已審未收_dgv(2, e.RowIndex).Value.ToString : 車號_cb.Text = 已審未收_dgv(3, e.RowIndex).Value.ToString
206
-            客編_tb.Text = 已審未收_dgv(4, e.RowIndex).Value.ToString : 客名_tb.Text = 已審未收_dgv(5, e.RowIndex).Value.ToString
207
-            地址_tb.Text = 已審未收_dgv(6, e.RowIndex).Value.ToString : 電話_tb.Text = 已審未收_dgv(7, e.RowIndex).Value.ToString
208
-            備註_tb.Text = 已審未收_dgv(8, e.RowIndex).Value.ToString : 已簽收_ch.Checked = 已審未收_dgv(13, e.RowIndex).Value
209
-            指定倉庫_cb.Text = 未核准_dgv(14, e.RowIndex).Value.ToString
210
-            If Not String.IsNullOrEmpty(已審未收_dgv(10, e.RowIndex).Value.ToString()) Then
211
-                填表日期_dtp.Value = Convert.ToDateTime(已審未收_dgv(10, e.RowIndex).Value.ToString())
172
+            If 未核准_dgv(14, e.RowIndex).Value.ToString = "" Then
173
+                出貨_bt.Enabled = False
174
+                簽收_bt.Enabled = False
175
+            Else
176
+                If 已出貨_ch.Checked = True Then
177
+                    If 已簽收_ch.Checked = True Then
178
+                        簽收_bt.Enabled = False
179
+                    Else
180
+                        簽收_bt.Enabled = True
181
+                    End If
182
+                    出貨_bt.Enabled = False
183
+                Else
184
+                    簽收_bt.Enabled = False
185
+                    出貨_bt.Enabled = True
186
+                End If
212 187
             End If
213 188
             Set_清單5()
214 189
         End If
215 190
     End Sub
216
-    Private Sub 已審已收_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 已審已收_dgv.CellClick
191
+    Private Sub 已審核_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 已審核_dgv.CellClick
217 192
         If e.RowIndex = -1 Then : Else
218
-            送貨單號_tb.Text = 已審已收_dgv(0, e.RowIndex).Value.ToString : 訂購單號_tb.Text = 已審已收_dgv(1, e.RowIndex).Value.ToString
219
-            物流_tb.Text = 已審已收_dgv(2, e.RowIndex).Value.ToString : 車號_cb.Text = 已審已收_dgv(3, e.RowIndex).Value.ToString
220
-            客編_tb.Text = 已審已收_dgv(4, e.RowIndex).Value.ToString : 客名_tb.Text = 已審已收_dgv(5, e.RowIndex).Value.ToString
221
-            地址_tb.Text = 已審已收_dgv(6, e.RowIndex).Value.ToString : 電話_tb.Text = 已審已收_dgv(7, e.RowIndex).Value.ToString
222
-            備註_tb.Text = 已審已收_dgv(8, e.RowIndex).Value.ToString : 已簽收_ch.Checked = 已審已收_dgv(13, e.RowIndex).Value
223
-            指定倉庫_cb.Text = 未核准_dgv(14, e.RowIndex).Value.ToString
224
-            If Not String.IsNullOrEmpty(已審已收_dgv(10, e.RowIndex).Value.ToString()) Then
225
-                填表日期_dtp.Value = Convert.ToDateTime(已審已收_dgv(10, e.RowIndex).Value.ToString())
193
+            送貨單號_tb.Text = 已審核_dgv(0, e.RowIndex).Value.ToString : 訂購單號_tb.Text = 已審核_dgv(1, e.RowIndex).Value.ToString
194
+            物流_tb.Text = 已審核_dgv(2, e.RowIndex).Value.ToString : 車號_cb.Text = 已審核_dgv(3, e.RowIndex).Value.ToString
195
+            客編_tb.Text = 已審核_dgv(4, e.RowIndex).Value.ToString : 客名_tb.Text = 已審核_dgv(5, e.RowIndex).Value.ToString
196
+            地址_tb.Text = 已審核_dgv(6, e.RowIndex).Value.ToString : 電話_tb.Text = 已審核_dgv(7, e.RowIndex).Value.ToString
197
+            備註_tb.Text = 已審核_dgv(8, e.RowIndex).Value.ToString : 已簽收_ch.Checked = 已審核_dgv(13, e.RowIndex).Value
198
+            指定倉庫_cb.Text = 已審核_dgv(14, e.RowIndex).Value.ToString : 已出貨_ch.Checked = 已審核_dgv(15, e.RowIndex).Value
199
+            If Not String.IsNullOrEmpty(已審核_dgv(16, e.RowIndex).Value.ToString()) Then
200
+                填表日期_dtp.Value = Convert.ToDateTime(已審核_dgv(16, e.RowIndex).Value.ToString())
201
+            End If
202
+            If 已審核_dgv(14, e.RowIndex).Value.ToString = "" Then
203
+                出貨_bt.Enabled = False
204
+                簽收_bt.Enabled = False
205
+            Else
206
+                If 已出貨_ch.Checked = True Then
207
+                    If 已簽收_ch.Checked = True Then
208
+                        簽收_bt.Enabled = False
209
+                    Else
210
+                        簽收_bt.Enabled = True
211
+                    End If
212
+                    出貨_bt.Enabled = False
213
+                Else
214
+                    簽收_bt.Enabled = False
215
+                    出貨_bt.Enabled = True
216
+                End If
226 217
             End If
227 218
             Set_清單5()
228 219
         End If
229 220
     End Sub
221
+
230 222
     Private Sub 重新整理_bt_Click(sender As Object, e As EventArgs) Handles 重新整理_bt.Click
231
-        If 未審核_rb.Checked = True Then : Set_清單1() : ElseIf 已審未收_rb.Checked = True Then : Set_清單2() : ElseIf 已審已收_rb.Checked = True Then : Set_清單3() : End If
223
+        If 未審核_rb.Checked = True Then : Set_清單1() : ElseIf 已審核_rb.Checked = True Then : Set_清單2() : End If
232 224
     End Sub
233 225
     Private Sub Set_日期格式轉換()
234 226
         DTP = Format(Today(), "yyyy/MM/dd") : DTP1 = Format(Today(), "yyyyMMdd")
235 227
     End Sub
236 228
     Private Sub 開立訂購單_bt_Click(sender As Object, e As EventArgs) Handles 開立訂購單_bt.Click
237
-        刪除_bt.Enabled = True : 儲存_bt.Enabled = True : 訂單加入_bt.Enabled = True
229
+        刪除_bt.Enabled = True : 儲存_bt.Enabled = True : 訂單加入_bt.Enabled = True : 簽收_bt.Enabled = False : 出貨_bt.Enabled = False
238 230
         送貨明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 客編_tb.Text = ""
239 231
         地址_tb.Text = "" : 電話_tb.Text = "" : 備註_tb.Text = "" : 送貨單號_tb.Text = "" : 指定倉庫_cb.Text = ""
240
-        物流_tb.Text = "" : 車號_cb.Text = "" : 項次_tb.Text = "" : 已簽收_ch.Checked = False
241
-        未核准_dgv.Visible = True : 已審未收_dgv.Visible = False : 已審已收_dgv.Visible = False
242
-        未審核_rb.Checked = True : 已審未收_rb.Checked = False : 已審已收_rb.Checked = False
232
+        物流_tb.Text = "" : 車號_cb.Text = "" : 項次_tb.Text = "" : 已簽收_ch.Checked = False : 已出貨_ch.Checked = False
233
+        未核准_dgv.Visible = True : 已審_dgv.Visible = False
234
+        未審核_rb.Checked = True : 已審_rb.Checked = False
243 235
         Set_日期格式轉換() : Dim NUM1 As Integer
244 236
         訂單 = "" : 填表日期_dtp.Value = Format(Today(), "yyyy/MM/dd")
245 237
         For i As Integer = 1 To 999
@@ -255,7 +247,7 @@ Public Class 送貨單申請
255 247
     End Sub
256 248
 
257 249
     Private Sub 訂單加入_bt_Click(sender As Object, e As EventArgs) Handles 訂單加入_bt.Click
258
-        If 已審未收_rb.Checked = True Or 已審已收_rb.Checked = True Then : MsgBox("選擇的單據無法在編輯!!") : Else
250
+        If 已審_rb.Checked = True Then : MsgBox("選擇的單據無法在編輯!!") : Else
259 251
             If 送貨單號_tb.Text = "" Then : MsgBox("沒有選擇送貨單據!!") : Else
260 252
                 If 訂購單號1_tb.Text = "" Then : MsgBox("沒有選擇訂購單據!!") : Else
261 253
                     If 訂購單號_tb.Text <> "" Then
@@ -289,27 +281,27 @@ Public Class 送貨單申請
289 281
     End Sub
290 282
 
291 283
     Private Sub 刪除_bt_Click(sender As Object, e As EventArgs) Handles 刪除_bt.Click
292
-        If 已審未收_rb.Checked = True Or 已審已收_rb.Checked = True Then : MsgBox("選擇的單據無法在編輯!!") : Else
284
+        If 已審_rb.Checked = True Then : MsgBox("選擇的單據無法在編輯!!") : Else
293 285
             If 送貨單號_tb.Text = "" Then : MsgBox("沒有選擇單據!!") : Else
294 286
                 訊息回應 = InputBox("確定要刪除該筆資料? 請輸入大寫 [YES] 繼續執行下面的動作!!")
295 287
                 If 訊息回應 = "YES" Then
296 288
                     SQL_送貨單控制表_刪除(送貨單號_tb.Text) : SQL_送貨單明細表_刪除(送貨單號_tb.Text) : SQL_訂購單控制表_修改1(訂購單號_tb.Text, "0") : conn.Close()
297 289
                     送貨明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 客編_tb.Text = ""
298 290
                     地址_tb.Text = "" : 電話_tb.Text = "" : 備註_tb.Text = "" : 送貨單號_tb.Text = "" : 指定倉庫_cb.Text = ""
299
-                    物流_tb.Text = "" : 車號_cb.Text = "" : 項次_tb.Text = "" : 已簽收_ch.Checked = False
291
+                    物流_tb.Text = "" : 車號_cb.Text = "" : 項次_tb.Text = "" : 已簽收_ch.Checked = False : 已出貨_ch.Checked = False
292
+                    簽收_bt.Enabled = False : 出貨_bt.Enabled = False : 已出貨_ch.Checked = False : 儲存_bt.Enabled = False
300 293
                     Set_清單1() : Set_清單4()
301 294
                 End If
302 295
             End If
303 296
         End If
304 297
     End Sub
305 298
     Private Sub 儲存_bt_Click(sender As Object, e As EventArgs) Handles 儲存_bt.Click
306
-        If 已審未收_rb.Checked = True Or 已審已收_rb.Checked = True Then : MsgBox("選擇的單據無法在編輯!!") : Else
299
+        If 已審_rb.Checked = True Then : MsgBox("選擇的單據無法在編輯!!") : Else
307 300
             If 送貨單號_tb.Text = "" Then : MsgBox("沒有選擇送貨單據!!") : Else
308 301
                 If 訂購單號_tb.Text = "" Then : MsgBox("沒有選擇訂購單據!!") : Else
309 302
                     If 指定倉庫_cb.Text = "" Then : MsgBox("沒有選擇出庫庫別!!") : Else
310
-                        存檔() : MsgBox("儲存成功!!") : Set_清單5() : Set_清單1() : Set_清單2() : Set_清單3() : Set_清單4()
303
+                        存檔() : 出貨_bt.Enabled = True : MsgBox("儲存成功!!") : Set_清單5() : Set_清單1() : Set_清單2() : Set_清單4()
311 304
                     End If
312
-
313 305
                 End If
314 306
             End If
315 307
         End If
@@ -331,15 +323,64 @@ Public Class 送貨單申請
331 323
         Else
332 324
             SQL_訂購單控制表_修改1(訂購單號_tb.Text, "1")
333 325
         End If
334
-        SQL_送貨單控制表_修改(送貨單號_tb.Text, 訂購單號_tb.Text, 客編_tb.Text, 地址_tb.Text, 電話_tb.Text, 備註_tb.Text, 物流_tb.Text, 車號_cb.Text, 指定倉庫_cb.Text)
326
+
327
+        SQL_送貨單控制表_修改(送貨單號_tb.Text, 訂購單號_tb.Text, 客編_tb.Text, 地址_tb.Text, 電話_tb.Text, 備註_tb.Text, 物流_tb.Text, 車號_cb.Text, 指定倉庫_cb.Text, 填表日期_dtp.Value.ToString("yyyy/MM/dd"))
335 328
     End Sub
336 329
 
337 330
     Private Sub 簽收_bt_Click(sender As Object, e As EventArgs) Handles 簽收_bt.Click
338
-        If 未審核_rb.Checked = True Or 已審已收_rb.Checked = True Then : MsgBox("選擇的單據無法在編輯!!") : Else
339
-            If 送貨單號_tb.Text = "" Then : MsgBox("沒有選擇送貨單據!!") : Else
340
-                If 訂購單號_tb.Text = "" Then : MsgBox("沒有選擇訂購單據!!") : Else
341
-                    SQL_送貨單控制表_修改1(送貨單號_tb.Text, "1") : 已簽收_ch.Checked = True : MsgBox("簽收成功!!") : Set_清單1() : Set_清單2() : Set_清單3()
342
-                End If
331
+        If 送貨單號_tb.Text = "" Then : MsgBox("沒有選擇送貨單據!!") : Else
332
+            If 訂購單號_tb.Text = "" Then : MsgBox("沒有選擇訂購單據!!") : Else
333
+                SQL_送貨單控制表_修改1(送貨單號_tb.Text, "1") : 已簽收_ch.Checked = True : 簽收_bt.Enabled = False : MsgBox("簽收成功!!") : Set_清單1() : Set_清單2()
334
+            End If
335
+        End If
336
+    End Sub
337
+    Private Sub 出貨_bt_Click(sender As Object, e As EventArgs) Handles 出貨_bt.Click
338
+        If 送貨單號_tb.Text = "" Then : MsgBox("沒有選擇送貨單據!!") : Else
339
+            If 訂購單號_tb.Text = "" Then : MsgBox("沒有選擇訂購單據!!") : Else
340
+                SQL_指定倉儲_資料讀取(指定倉庫_cb.Text)
341
+                Dim 倉庫級別 As String = ""
342
+                Dim 倉庫編號 As String = ""
343
+                If dr.Read() Then
344
+                    倉庫級別 = dr("倉級") : 倉庫編號 = dr("倉名編號")
345
+                End If : conn.Close()
346
+
347
+                For I As Integer = 0 To 送貨明細_dgv.Rows.Count - 1
348
+                    Dim 物料編號 As String = 送貨明細_dgv.Rows(I).Cells("料號").Value.ToString().Trim()
349
+                    Dim 物品名稱 As String = 送貨明細_dgv.Rows(I).Cells("品名").Value.ToString()
350
+                    Dim 數量 As Double = 送貨明細_dgv.Rows(I).Cells("數量").Value
351
+                    Dim 庫存量 As Double = 0
352
+                    SQL_庫存餘額判斷(倉庫編號, 物料編號)
353
+                    If dr.Read() Then
354
+                        庫存量 = dr("庫存量")
355
+                        If 數量 > 庫存量 Then
356
+                            MGB(物品名稱 & "庫存量不足", 1)
357
+                            Return
358
+                        End If
359
+                    End If : conn.Close()
360
+                Next
361
+
362
+                For I As Integer = 0 To 送貨明細_dgv.Rows.Count - 1
363
+                    SQL_倉儲明細表_最後一筆資料()
364
+                    If dr.Read() Then : EDR = Double.Parse(Strings.Right(dr("資料流水號").ToString, 9)) : Else : EDR = 0 : End If
365
+                    conn.Close()
366
+                    EDR += 1
367
+                    If EDR < 10 Then : ESTR = "WH" & "00000000" & EDR
368
+                    ElseIf EDR > 9 And EDR < 100 Then : ESTR = "WH" & "0000000" & EDR
369
+                    ElseIf EDR > 99 And EDR < 1000 Then : ESTR = "WH" & "000000" & EDR
370
+                    ElseIf EDR > 999 And EDR < 10000 Then : ESTR = "WH" & "00000" & EDR
371
+                    ElseIf EDR > 9999 And EDR < 100000 Then : ESTR = "WH" & "0000" & EDR
372
+                    ElseIf EDR > 99999 And EDR < 100000 Then : ESTR = "WH" & "000" & EDR
373
+                    ElseIf EDR > 999999 And EDR < 1000000 Then : ESTR = "WH" & "00" & EDR
374
+                    ElseIf EDR > 9999999 And EDR < 10000000 Then : ESTR = "WH" & "0" & EDR
375
+                    ElseIf EDR > 99999999 Then : ESTR = "WH" & EDR : End If
376
+                    Dim 數量 As String = 送貨明細_dgv.Rows(I).Cells("數量").Value
377
+                    Dim 料號 As String = 送貨明細_dgv.Rows(I).Cells("料號").Value
378
+                    Dim 批號 As String = 送貨明細_dgv.Rows(I).Cells("生產批號").Value
379
+                    SQL_料驗收與指定入庫_倉儲明細表_新增(ESTR, 送貨單號_tb.Text, 倉庫級別, 倉庫編號, 料號, "0", 數量, "", "送貨出庫", 批號) : conn.Close()
380
+                Next
381
+
382
+                SQL_送貨單控制表_修改2(送貨單號_tb.Text, "1") : 已出貨_ch.Checked = True : 出貨_bt.Enabled = False : 簽收_bt.Enabled = True
383
+                MsgBox("出貨成功!!") : Set_清單1() : Set_清單2()
343 384
             End If
344 385
         End If
345 386
     End Sub
@@ -361,10 +402,15 @@ Public Class 送貨單申請
361 402
     Private Sub 簽收_bt_MouseEnter(sender As Object, e As EventArgs) Handles 簽收_bt.MouseEnter
362 403
         ToolTip1.SetToolTip(Me.簽收_bt, "確認簽收")
363 404
     End Sub
405
+    Private Sub 出貨_bt_MouseEnter(sender As Object, e As EventArgs) Handles 出貨_bt.MouseEnter
406
+        ToolTip1.SetToolTip(Me.出貨_bt, "確認出貨")
407
+    End Sub
364 408
     Private Sub 刪除_bt_MouseEnter(sender As Object, e As EventArgs) Handles 刪除_bt.MouseEnter
365 409
         ToolTip1.SetToolTip(Me.刪除_bt, "刪除送貨單")
366 410
     End Sub
367 411
     Private Sub 訂單加入_bt_MouseEnter(sender As Object, e As EventArgs) Handles 訂單加入_bt.MouseEnter
368 412
         ToolTip1.SetToolTip(Me.訂單加入_bt, "訂單加入送貨單")
369 413
     End Sub
414
+
415
+
370 416
 End Class

+ 72
- 38
OW-ERP-SYS/05、技術管理系統/生產排程表.Designer.vb Zobrazit soubor

@@ -23,12 +23,13 @@ Partial Class 生產排程表
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private Sub InitializeComponent()
25 25
         Me.components = New System.ComponentModel.Container()
26
-        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
-        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
-        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
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 DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29 29
         Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(生產排程表))
30
-        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
-        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
+        Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
+        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
+        Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32 33
         Me.成品油槽04_cb = New System.Windows.Forms.ComboBox()
33 34
         Me.成品油槽03_cb = New System.Windows.Forms.ComboBox()
34 35
         Me.成品油槽02_cb = New System.Windows.Forms.ComboBox()
@@ -198,6 +199,7 @@ Partial Class 生產排程表
198 199
         Me.新增配方_lb = New System.Windows.Forms.Label()
199 200
         Me.配方選擇_dgv = New System.Windows.Forms.DataGridView()
200 201
         Me.隱藏1_pl = New System.Windows.Forms.Panel()
202
+        Me.單位_tb = New System.Windows.Forms.TextBox()
201 203
         Me.加入cb_dgv = New System.Windows.Forms.DataGridView()
202 204
         Me.生產流水號_tb = New System.Windows.Forms.TextBox()
203 205
         Me.排程表組別_tb = New System.Windows.Forms.TextBox()
@@ -338,6 +340,8 @@ Partial Class 生產排程表
338 340
         Me.sharedContextMenu = New System.Windows.Forms.ContextMenuStrip(Me.components)
339 341
         Me.deleteMenuItem = New System.Windows.Forms.ToolStripMenuItem()
340 342
         Me.再製選擇_pl = New System.Windows.Forms.Panel()
343
+        Me.後一天1_bt = New System.Windows.Forms.Button()
344
+        Me.前一天1_bt = New System.Windows.Forms.Button()
341 345
         Me.選擇_lb = New System.Windows.Forms.Label()
342 346
         Me.項次_lb = New System.Windows.Forms.Label()
343 347
         Me.項次_tb = New System.Windows.Forms.TextBox()
@@ -365,8 +369,7 @@ Partial Class 生產排程表
365 369
         Me.新增排程_bt = New System.Windows.Forms.Button()
366 370
         Me.儲存_bt = New System.Windows.Forms.Button()
367 371
         Me.批次向上_bt = New System.Windows.Forms.Button()
368
-        Me.後一天1_bt = New System.Windows.Forms.Button()
369
-        Me.前一天1_bt = New System.Windows.Forms.Button()
372
+        Me.暫存_dgv = New System.Windows.Forms.DataGridView()
370 373
         Me.TableLayoutPanel3.SuspendLayout()
371 374
         CType(Me.組別_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
372 375
         Me.配方選擇_pl.SuspendLayout()
@@ -385,6 +388,7 @@ Partial Class 生產排程表
385 388
         CType(Me.再製明細_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
386 389
         CType(Me.批次數值2_nud, System.ComponentModel.ISupportInitialize).BeginInit()
387 390
         CType(Me.再製清單_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
391
+        CType(Me.暫存_dgv, System.ComponentModel.ISupportInitialize).BeginInit()
388 392
         Me.SuspendLayout()
389 393
         '
390 394
         '成品油槽04_cb
@@ -1730,8 +1734,8 @@ Partial Class 生產排程表
1730 1734
         '
1731 1735
         '組別_dgv
1732 1736
         '
1733
-        DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1734
-        Me.組別_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
1737
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1738
+        Me.組別_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
1735 1739
         Me.組別_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1736 1740
         Me.組別_dgv.BackgroundColor = System.Drawing.Color.White
1737 1741
         Me.組別_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
@@ -1928,8 +1932,8 @@ Partial Class 生產排程表
1928 1932
         '
1929 1933
         '配方選擇_dgv
1930 1934
         '
1931
-        DataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1932
-        Me.配方選擇_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
1935
+        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1936
+        Me.配方選擇_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
1933 1937
         Me.配方選擇_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
1934 1938
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1935 1939
         Me.配方選擇_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -1947,6 +1951,8 @@ Partial Class 生產排程表
1947 1951
         '
1948 1952
         '隱藏1_pl
1949 1953
         '
1954
+        Me.隱藏1_pl.Controls.Add(Me.暫存_dgv)
1955
+        Me.隱藏1_pl.Controls.Add(Me.單位_tb)
1950 1956
         Me.隱藏1_pl.Controls.Add(Me.加入cb_dgv)
1951 1957
         Me.隱藏1_pl.Controls.Add(Me.生產流水號_tb)
1952 1958
         Me.隱藏1_pl.Controls.Add(Me.排程表組別_tb)
@@ -1955,15 +1961,23 @@ Partial Class 生產排程表
1955 1961
         Me.隱藏1_pl.Controls.Add(Me.加入配方_bt)
1956 1962
         Me.隱藏1_pl.Controls.Add(Me.組別_dgv)
1957 1963
         Me.隱藏1_pl.Controls.Add(Me.配方編號_tb)
1958
-        Me.隱藏1_pl.Location = New System.Drawing.Point(1134, 126)
1964
+        Me.隱藏1_pl.Location = New System.Drawing.Point(1164, 126)
1959 1965
         Me.隱藏1_pl.Name = "隱藏1_pl"
1960 1966
         Me.隱藏1_pl.Size = New System.Drawing.Size(149, 370)
1961 1967
         Me.隱藏1_pl.TabIndex = 2075
1962 1968
         '
1969
+        '單位_tb
1970
+        '
1971
+        Me.單位_tb.Location = New System.Drawing.Point(30, 310)
1972
+        Me.單位_tb.Name = "單位_tb"
1973
+        Me.單位_tb.ReadOnly = True
1974
+        Me.單位_tb.Size = New System.Drawing.Size(102, 23)
1975
+        Me.單位_tb.TabIndex = 2188
1976
+        '
1963 1977
         '加入cb_dgv
1964 1978
         '
1965
-        DataGridViewCellStyle8.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1966
-        Me.加入cb_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
1979
+        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1980
+        Me.加入cb_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
1967 1981
         Me.加入cb_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1968 1982
         Me.加入cb_dgv.BackgroundColor = System.Drawing.Color.White
1969 1983
         Me.加入cb_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
@@ -3220,6 +3234,26 @@ Partial Class 生產排程表
3220 3234
         Me.再製選擇_pl.Size = New System.Drawing.Size(1020, 464)
3221 3235
         Me.再製選擇_pl.TabIndex = 2176
3222 3236
         '
3237
+        '後一天1_bt
3238
+        '
3239
+        Me.後一天1_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
3240
+        Me.後一天1_bt.Location = New System.Drawing.Point(643, 31)
3241
+        Me.後一天1_bt.Name = "後一天1_bt"
3242
+        Me.後一天1_bt.Size = New System.Drawing.Size(100, 23)
3243
+        Me.後一天1_bt.TabIndex = 2193
3244
+        Me.後一天1_bt.Text = "後一日"
3245
+        Me.後一天1_bt.UseVisualStyleBackColor = True
3246
+        '
3247
+        '前一天1_bt
3248
+        '
3249
+        Me.前一天1_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
3250
+        Me.前一天1_bt.Location = New System.Drawing.Point(541, 31)
3251
+        Me.前一天1_bt.Name = "前一天1_bt"
3252
+        Me.前一天1_bt.Size = New System.Drawing.Size(100, 23)
3253
+        Me.前一天1_bt.TabIndex = 2192
3254
+        Me.前一天1_bt.Text = "前一日"
3255
+        Me.前一天1_bt.UseVisualStyleBackColor = True
3256
+        '
3223 3257
         '選擇_lb
3224 3258
         '
3225 3259
         Me.選擇_lb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -3341,8 +3375,8 @@ Partial Class 生產排程表
3341 3375
         '
3342 3376
         '再製明細_dgv
3343 3377
         '
3344
-        DataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
3345
-        Me.再製明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
3378
+        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
3379
+        Me.再製明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
3346 3380
         Me.再製明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
3347 3381
             Or System.Windows.Forms.AnchorStyles.Left) _
3348 3382
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -3413,8 +3447,8 @@ Partial Class 生產排程表
3413 3447
         '
3414 3448
         '再製清單_dgv
3415 3449
         '
3416
-        DataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
3417
-        Me.再製清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle10
3450
+        DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
3451
+        Me.再製清單_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
3418 3452
         Me.再製清單_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
3419 3453
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
3420 3454
         Me.再製清單_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -3438,7 +3472,7 @@ Partial Class 生產排程表
3438 3472
         Me.加入再製_bt.Name = "加入再製_bt"
3439 3473
         Me.加入再製_bt.Size = New System.Drawing.Size(89, 50)
3440 3474
         Me.加入再製_bt.TabIndex = 2177
3441
-        Me.加入再製_bt.Text = "排加入再製"
3475
+        Me.加入再製_bt.Text = "排加入再製"
3442 3476
         Me.加入再製_bt.UseVisualStyleBackColor = True
3443 3477
         '
3444 3478
         '批次向下_bt
@@ -3521,25 +3555,22 @@ Partial Class 生產排程表
3521 3555
         Me.批次向上_bt.TabIndex = 2067
3522 3556
         Me.批次向上_bt.UseVisualStyleBackColor = True
3523 3557
         '
3524
-        '後一天1_bt
3525
-        '
3526
-        Me.後一天1_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
3527
-        Me.後一天1_bt.Location = New System.Drawing.Point(643, 31)
3528
-        Me.後一天1_bt.Name = "後一天1_bt"
3529
-        Me.後一天1_bt.Size = New System.Drawing.Size(100, 23)
3530
-        Me.後一天1_bt.TabIndex = 2193
3531
-        Me.後一天1_bt.Text = "後一日"
3532
-        Me.後一天1_bt.UseVisualStyleBackColor = True
3533
-        '
3534
-        '前一天1_bt
3535
-        '
3536
-        Me.前一天1_bt.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
3537
-        Me.前一天1_bt.Location = New System.Drawing.Point(541, 31)
3538
-        Me.前一天1_bt.Name = "前一天1_bt"
3539
-        Me.前一天1_bt.Size = New System.Drawing.Size(100, 23)
3540
-        Me.前一天1_bt.TabIndex = 2192
3541
-        Me.前一天1_bt.Text = "前一日"
3542
-        Me.前一天1_bt.UseVisualStyleBackColor = True
3558
+        '暫存_dgv
3559
+        '
3560
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
3561
+        Me.暫存_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
3562
+        Me.暫存_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
3563
+        Me.暫存_dgv.BackgroundColor = System.Drawing.Color.White
3564
+        Me.暫存_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
3565
+        Me.暫存_dgv.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
3566
+        Me.暫存_dgv.Location = New System.Drawing.Point(30, 339)
3567
+        Me.暫存_dgv.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
3568
+        Me.暫存_dgv.Name = "暫存_dgv"
3569
+        Me.暫存_dgv.ReadOnly = True
3570
+        Me.暫存_dgv.RowHeadersWidth = 5
3571
+        Me.暫存_dgv.RowTemplate.Height = 24
3572
+        Me.暫存_dgv.Size = New System.Drawing.Size(102, 26)
3573
+        Me.暫存_dgv.TabIndex = 2189
3543 3574
         '
3544 3575
         '生產排程表
3545 3576
         '
@@ -3842,6 +3873,7 @@ Partial Class 生產排程表
3842 3873
         CType(Me.再製明細_dgv, System.ComponentModel.ISupportInitialize).EndInit()
3843 3874
         CType(Me.批次數值2_nud, System.ComponentModel.ISupportInitialize).EndInit()
3844 3875
         CType(Me.再製清單_dgv, System.ComponentModel.ISupportInitialize).EndInit()
3876
+        CType(Me.暫存_dgv, System.ComponentModel.ISupportInitialize).EndInit()
3845 3877
         Me.ResumeLayout(False)
3846 3878
         Me.PerformLayout()
3847 3879
 
@@ -4184,4 +4216,6 @@ Partial Class 生產排程表
4184 4216
     Friend WithEvents 項次_tb As TextBox
4185 4217
     Friend WithEvents 後一天1_bt As Button
4186 4218
     Friend WithEvents 前一天1_bt As Button
4219
+    Friend WithEvents 單位_tb As TextBox
4220
+    Friend WithEvents 暫存_dgv As DataGridView
4187 4221
 End Class

+ 42
- 20
OW-ERP-SYS/05、技術管理系統/生產排程表.vb Zobrazit soubor

@@ -90,9 +90,14 @@ Public Class 生產排程表
90 90
 
91 91
     Private Sub 更新製程明細(前綴 As String, 生產日期 As String, 批次 As String, 組別 As String)
92 92
         SQL_製程明細表_讀取(生產日期, 批次, 組別)
93
+        Dim 流水號 As String = ""
94
+        暫存_dgv.DataSource = Nothing
95
+        Me.Controls("生產數量" & 前綴 & "_cb").ForeColor = Color.Black
96
+        Me.Controls("生產數量" & 前綴 & "_tb").ForeColor = Color.Black
93 97
         If dr.HasRows Then
94 98
             Dim 迴圈index As Integer = 0
95 99
             While dr.Read()
100
+                流水號 = dr("生產流水號").ToString()
96 101
                 If Me.Controls("品名" & 前綴 & "_cb").Text = "" Then
97 102
                     Me.Controls("品名" & 前綴 & "_cb").Text = dr("產品名稱").ToString()
98 103
                 Else
@@ -114,28 +119,32 @@ Public Class 生產排程表
114 119
 
115 120
                 Dim 生產數集合 As String() = dr("生產數量").Split(New Char() {";"c})
116 121
                 Dim 各別生產量 As String = 生產數集合(迴圈index).Trim() ' 去除前后空白
117
-
118
-                If dr("生產數量").ToString() <> "" AndAlso Convert.ToDouble(各別生產量) > 0 AndAlso dr("淨重").ToString() <> "" AndAlso Convert.ToDouble(dr("淨重")) > 0 Then
119
-                    Dim 生產數量 As Double : Dim 淨重 As Double
120
-                    Try
121
-                        生產數量 = Convert.ToDouble(各別生產量)
122
-                        淨重 = Convert.ToDouble(dr("淨重").ToString())
123
-                    Catch ex As FormatException
124
-                        Console.WriteLine("格式錯誤")
125
-                    Catch ex As OverflowException
126
-                        Console.WriteLine("數值超出範圍")
127
-                    End Try
128
-                    If Me.Controls("生產數量" & 前綴 & "_tb").Text = "" Then
122
+                Dim 生產數量 As Double : Dim 淨重 As Double
123
+                If Not String.IsNullOrEmpty(dr("生產數量").ToString()) AndAlso Double.TryParse(各別生產量, 生產數量) AndAlso 生產數量 > 0 AndAlso
124
+                    Not String.IsNullOrEmpty(dr("淨重").ToString()) AndAlso Double.TryParse(dr("淨重").ToString(), 淨重) AndAlso 淨重 > 0 Then
125
+                    ' 計算生產數量與淨重的比值,並設置文本框的值
126
+                    If String.IsNullOrEmpty(Me.Controls("生產數量" & 前綴 & "_tb").Text) Then
129 127
                         Me.Controls("生產數量" & 前綴 & "_tb").Text = (生產數量 * 1000 / 淨重).ToString("0.##")
130 128
                     Else
131
-                        Me.Controls("生產數量" & 前綴 & "_tb").Text = Me.Controls("生產數量" & 前綴 & "_tb").Text & ";" & (生產數量 * 1000 / 淨重).ToString("0.##")
129
+                        Me.Controls("生產數量" & 前綴 & "_tb").Text &= ";" & (生產數量 * 1000 / 淨重).ToString("0.##")
132 130
                     End If
133
-                Else ' 可以處理或記錄空字符串的情況
131
+                Else
132
+                    ' 處理無效的數據或空字符串
134 133
                     MGB("生產數量或淨重沒有數值!" & Environment.NewLine & "請輸入正確生產數量 或 將配方資料的淨重填寫完整!", 1)
135 134
                 End If
136 135
                 迴圈index += 1
137 136
             End While
138 137
         End If
138
+        If 流水號 <> "" Then
139
+            Dim ds1 As New DataSet : 暫存_dgv.DataSource = Nothing : ds1.Clear()
140
+            SQL_生產製程_再製明細(流水號)
141
+            da.Fill(ds1) : 暫存_dgv.DataSource = ds1.Tables(0) : conn.Close()
142
+            If 暫存_dgv.Rows.Count - 1 > 0 Then
143
+                Me.Controls("生產數量" & 前綴 & "_cb").ForeColor = Color.Red
144
+                Me.Controls("生產數量" & 前綴 & "_tb").ForeColor = Color.Red
145
+            End If
146
+        End If
147
+
139 148
     End Sub
140 149
     Private Sub 清除製程CB內容(前綴陣列 As String())
141 150
         For Each 前綴 As String In 前綴陣列
@@ -1385,10 +1394,10 @@ Public Class 生產排程表
1385 1394
         SQL_生產製程_再製清單()
1386 1395
         da.Fill(ds1) : 再製清單_dgv.DataSource = ds1.Tables(0) : conn.Close()
1387 1396
         ' 隱藏指定範圍的列
1388
-        再製清單_dgv.Columns(0).Visible = False : 再製清單_dgv.Columns(1).FillWeight = 100 : 再製清單_dgv.Columns(2).FillWeight = 100
1389
-        再製清單_dgv.Columns(3).FillWeight = 50
1397
+        再製清單_dgv.Columns(0).FillWeight = 100 : 再製清單_dgv.Columns(1).Visible = False : 再製清單_dgv.Columns(2).FillWeight = 100
1398
+        再製清單_dgv.Columns(3).FillWeight = 100 : 再製清單_dgv.Columns(4).FillWeight = 50 : 再製清單_dgv.Columns(5).Visible = False
1390 1399
         再製清單_dgv.Columns(1).ReadOnly = True : 再製清單_dgv.Columns(2).ReadOnly = True : 再製清單_dgv.Columns(3).ReadOnly = True
1391
-        料號_tb.Text = "" : 申請數_nud.Text = "0" : 品名_tb.Text = ""
1400
+        料號_tb.Text = "" : 申請數_nud.Text = "0" : 品名_tb.Text = "" : 單位_tb.Text = ""
1392 1401
     End Sub
1393 1402
     Public Sub Set_再製明細()
1394 1403
         Dim ds1 As New DataSet : 再製明細_dgv.DataSource = Nothing : ds1.Clear()
@@ -1416,8 +1425,9 @@ Public Class 生產排程表
1416 1425
 
1417 1426
     Private Sub 再製清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 再製清單_dgv.CellClick
1418 1427
         If e.RowIndex = -1 Then : Else
1419
-            料號_tb.Text = 再製清單_dgv(0, e.RowIndex).Value.ToString
1420
-            品名_tb.Text = 再製清單_dgv(1, e.RowIndex).Value.ToString
1428
+            料號_tb.Text = 再製清單_dgv(1, e.RowIndex).Value.ToString
1429
+            品名_tb.Text = 再製清單_dgv(2, e.RowIndex).Value.ToString
1430
+            單位_tb.Text = 再製清單_dgv(5, e.RowIndex).Value.ToString
1421 1431
             NUM2 = e.RowIndex
1422 1432
         End If
1423 1433
     End Sub
@@ -1457,7 +1467,7 @@ Public Class 生產排程表
1457 1467
                             If NUM1 < 10 Then : 新項次 = "0" & NUM1 : ElseIf NUM1 > 9 And NUM1 < 100 Then : 新項次 = NUM1 : End If
1458 1468
                             Dim 規格 As String = 再製清單_dgv.Rows(NUM2).Cells("規格1").Value.ToString()
1459 1469
                             Dim 數量 As String = 申請數_nud.Value.ToString()
1460
-                            SQL_再製明細表_新增(流水號_tb.Text, 新項次, 料號_tb.Text, 品名_tb.Text, 規格, 數量, "", 組別_cb.Text)
1470
+                            SQL_再製明細表_新增(流水號_tb.Text, 新項次, 料號_tb.Text, 品名_tb.Text, 規格, 數量, 單位_tb.Text, 組別_cb.Text)
1461 1471
                             conn.Close() : MsgBox("新增完成,資料已在明細上!!") : Set_再製明細() : 申請數_nud.Value = 0
1462 1472
                         End If
1463 1473
                     End If
@@ -1507,4 +1517,16 @@ Public Class 生產排程表
1507 1517
             MessageBox.Show("已達到可選擇的最晚日期。")
1508 1518
         End If
1509 1519
     End Sub
1520
+    Private Sub 加入明細_bt_MouseEnter(sender As Object, e As EventArgs) Handles 加入明細_bt.MouseEnter
1521
+        ToolTip1.SetToolTip(Me.加入明細_bt, "物料加入明細")
1522
+    End Sub
1523
+    Private Sub 刪除退貨單上點選資料_bt_MouseEnter(sender As Object, e As EventArgs) Handles 刪除退貨單上點選資料_bt.MouseEnter
1524
+        ToolTip1.SetToolTip(Me.刪除退貨單上點選資料_bt, "再製明細單項刪除")
1525
+    End Sub
1526
+    Private Sub 明細刪除_bt_MouseEnter(sender As Object, e As EventArgs) Handles 明細刪除_bt.MouseEnter
1527
+        ToolTip1.SetToolTip(Me.明細刪除_bt, "再製明細刪除")
1528
+    End Sub
1529
+    Private Sub 關閉再製_bt_MouseEnter(sender As Object, e As EventArgs) Handles 關閉再製_bt.MouseEnter
1530
+        ToolTip1.SetToolTip(Me.關閉再製_bt, "關閉再製")
1531
+    End Sub
1510 1532
 End Class

+ 3
- 3
OW-ERP-SYS/05、技術管理系統/製程管制紀錄表_一般組.vb Zobrazit soubor

@@ -35,7 +35,7 @@ Public Class 製程管制紀錄表_一般組
35 35
         Array.Resize(標籤代號, 3) : Array.Resize(打包帶色, 3) : Array.Resize(打包代數, 3)
36 36
         品項 = "1"
37 37
         儲存_bt.Enabled = False : 修改_bt.Enabled = False
38
-        品項1_bt.Enabled = False : 品項2_bt.Enabled = False : 品項3_bt.Enabled = False : 顯示再製_bt.Enabled = False
38
+        品項1_bt.Enabled = False : 品項2_bt.Enabled = False : 品項3_bt.Enabled = False : 顯示再製_bt.Enabled = False : 顯示再製_bt.ForeColor = Color.Blue
39 39
     End Sub
40 40
     Private Sub Set_生產排程表_讀取()
41 41
         ' 查 生產排程表單 中有無資料
@@ -1326,9 +1326,9 @@ Public Class 製程管制紀錄表_一般組
1326 1326
         再製明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter
1327 1327
         ' 隱藏指定範圍的列
1328 1328
         If 再製明細_dgv.Rows.Count > 0 Then
1329
-            顯示再製_bt.Enabled = True
1329
+            顯示再製_bt.Enabled = True : 顯示再製_bt.ForeColor = Color.Red
1330 1330
         Else
1331
-            顯示再製_bt.Enabled = False
1331
+            顯示再製_bt.Enabled = False : 顯示再製_bt.ForeColor = Color.Blue
1332 1332
         End If
1333 1333
     End Sub
1334 1334
     Private Sub 顯示再製_bt_Click(sender As Object, e As EventArgs) Handles 顯示再製_bt.Click

+ 39
- 39
OW-ERP-SYS/05、技術管理系統/製程管制紀錄表_奶油組.Designer.vb Zobrazit soubor

@@ -23,19 +23,19 @@ Partial Class 製程管制紀錄表_奶油組
23 23
     <System.Diagnostics.DebuggerStepThrough()>
24 24
     Private Sub InitializeComponent()
25 25
         Me.components = New System.ComponentModel.Container()
26
-        Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
27
-        Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
28
-        Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
29
-        Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
30
-        Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
31
-        Dim DataGridViewCellStyle19 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
-        Dim DataGridViewCellStyle20 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
-        Dim DataGridViewCellStyle21 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
-        Dim DataGridViewCellStyle22 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35
-        Dim DataGridViewCellStyle23 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
-        Dim DataGridViewCellStyle24 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
-        Dim DataGridViewCellStyle25 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
38
-        Dim DataGridViewCellStyle26 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
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()
31
+        Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
32
+        Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
33
+        Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
34
+        Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
35
+        Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
36
+        Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
37
+        Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
38
+        Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
39 39
         Me.原料顯示_pl = New System.Windows.Forms.Panel()
40 40
         Me.輸入重量_pl = New System.Windows.Forms.Panel()
41 41
         Me.投入備註_tb = New System.Windows.Forms.TextBox()
@@ -555,8 +555,8 @@ Partial Class 製程管制紀錄表_奶油組
555 555
         '
556 556
         '製程原料油_dgv
557 557
         '
558
-        DataGridViewCellStyle14.BackColor = System.Drawing.Color.White
559
-        Me.製程原料油_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle14
558
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.White
559
+        Me.製程原料油_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
560 560
         Me.製程原料油_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
561 561
         Me.製程原料油_dgv.BackgroundColor = System.Drawing.Color.White
562 562
         Me.製程原料油_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
@@ -584,8 +584,8 @@ Partial Class 製程管制紀錄表_奶油組
584 584
         '
585 585
         '配方原料油_dgv
586 586
         '
587
-        DataGridViewCellStyle15.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
588
-        Me.配方原料油_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle15
587
+        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
588
+        Me.配方原料油_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
589 589
         Me.配方原料油_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
590 590
         Me.配方原料油_dgv.BackgroundColor = System.Drawing.Color.White
591 591
         Me.配方原料油_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
@@ -600,8 +600,8 @@ Partial Class 製程管制紀錄表_奶油組
600 600
         '
601 601
         '配方香料_dgv
602 602
         '
603
-        DataGridViewCellStyle16.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
604
-        Me.配方香料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle16
603
+        DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
604
+        Me.配方香料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
605 605
         Me.配方香料_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
606 606
         Me.配方香料_dgv.BackgroundColor = System.Drawing.Color.White
607 607
         Me.配方香料_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
@@ -616,8 +616,8 @@ Partial Class 製程管制紀錄表_奶油組
616 616
         '
617 617
         '配方乳化劑_dgv
618 618
         '
619
-        DataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
620
-        Me.配方乳化劑_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle17
619
+        DataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
620
+        Me.配方乳化劑_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle4
621 621
         Me.配方乳化劑_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
622 622
         Me.配方乳化劑_dgv.BackgroundColor = System.Drawing.Color.White
623 623
         Me.配方乳化劑_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
@@ -632,8 +632,8 @@ Partial Class 製程管制紀錄表_奶油組
632 632
         '
633 633
         '配方其他_dgv
634 634
         '
635
-        DataGridViewCellStyle18.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
636
-        Me.配方其他_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle18
635
+        DataGridViewCellStyle5.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
636
+        Me.配方其他_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle5
637 637
         Me.配方其他_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
638 638
         Me.配方其他_dgv.BackgroundColor = System.Drawing.Color.White
639 639
         Me.配方其他_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
@@ -648,8 +648,8 @@ Partial Class 製程管制紀錄表_奶油組
648 648
         '
649 649
         '配方著色劑_dgv
650 650
         '
651
-        DataGridViewCellStyle19.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
652
-        Me.配方著色劑_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle19
651
+        DataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
652
+        Me.配方著色劑_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6
653 653
         Me.配方著色劑_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
654 654
         Me.配方著色劑_dgv.BackgroundColor = System.Drawing.Color.White
655 655
         Me.配方著色劑_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
@@ -664,8 +664,8 @@ Partial Class 製程管制紀錄表_奶油組
664 664
         '
665 665
         '製程其他_dgv
666 666
         '
667
-        DataGridViewCellStyle20.BackColor = System.Drawing.Color.White
668
-        Me.製程其他_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle20
667
+        DataGridViewCellStyle7.BackColor = System.Drawing.Color.White
668
+        Me.製程其他_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle7
669 669
         Me.製程其他_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
670 670
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
671 671
         Me.製程其他_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -691,8 +691,8 @@ Partial Class 製程管制紀錄表_奶油組
691 691
         '
692 692
         '製程香料_dgv
693 693
         '
694
-        DataGridViewCellStyle21.BackColor = System.Drawing.Color.White
695
-        Me.製程香料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle21
694
+        DataGridViewCellStyle8.BackColor = System.Drawing.Color.White
695
+        Me.製程香料_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle8
696 696
         Me.製程香料_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
697 697
             Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
698 698
         Me.製程香料_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -1183,8 +1183,8 @@ Partial Class 製程管制紀錄表_奶油組
1183 1183
         '
1184 1184
         '製程乳化劑_dgv
1185 1185
         '
1186
-        DataGridViewCellStyle22.BackColor = System.Drawing.Color.White
1187
-        Me.製程乳化劑_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle22
1186
+        DataGridViewCellStyle9.BackColor = System.Drawing.Color.White
1187
+        Me.製程乳化劑_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle9
1188 1188
         Me.製程乳化劑_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
1189 1189
         Me.製程乳化劑_dgv.BackgroundColor = System.Drawing.Color.White
1190 1190
         Me.製程乳化劑_dgv.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
@@ -1199,8 +1199,8 @@ Partial Class 製程管制紀錄表_奶油組
1199 1199
         '
1200 1200
         '製程著色劑_dgv
1201 1201
         '
1202
-        DataGridViewCellStyle23.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1203
-        Me.製程著色劑_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle23
1202
+        DataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
1203
+        Me.製程著色劑_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle10
1204 1204
         Me.製程著色劑_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
1205 1205
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
1206 1206
         Me.製程著色劑_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -2823,8 +2823,8 @@ Partial Class 製程管制紀錄表_奶油組
2823 2823
         '
2824 2824
         '回收品項_dgv
2825 2825
         '
2826
-        DataGridViewCellStyle24.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
2827
-        Me.回收品項_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle24
2826
+        DataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
2827
+        Me.回收品項_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11
2828 2828
         Me.回收品項_dgv.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
2829 2829
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
2830 2830
         Me.回收品項_dgv.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
@@ -3367,8 +3367,8 @@ Partial Class 製程管制紀錄表_奶油組
3367 3367
         Me.簽名檔_dgv.Name = "簽名檔_dgv"
3368 3368
         Me.簽名檔_dgv.ReadOnly = True
3369 3369
         Me.簽名檔_dgv.RowHeadersWidth = 5
3370
-        DataGridViewCellStyle25.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
3371
-        Me.簽名檔_dgv.RowsDefaultCellStyle = DataGridViewCellStyle25
3370
+        DataGridViewCellStyle12.Font = New System.Drawing.Font("微軟正黑體", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
3371
+        Me.簽名檔_dgv.RowsDefaultCellStyle = DataGridViewCellStyle12
3372 3372
         Me.簽名檔_dgv.RowTemplate.Height = 24
3373 3373
         Me.簽名檔_dgv.Size = New System.Drawing.Size(150, 111)
3374 3374
         Me.簽名檔_dgv.TabIndex = 1785
@@ -3409,8 +3409,8 @@ Partial Class 製程管制紀錄表_奶油組
3409 3409
         '
3410 3410
         '再製明細_dgv
3411 3411
         '
3412
-        DataGridViewCellStyle26.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
3413
-        Me.再製明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle26
3412
+        DataGridViewCellStyle13.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
3413
+        Me.再製明細_dgv.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle13
3414 3414
         Me.再製明細_dgv.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
3415 3415
             Or System.Windows.Forms.AnchorStyles.Left) _
3416 3416
             Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)

+ 3
- 1
OW-ERP-SYS/05、技術管理系統/製程管制紀錄表_奶油組.vb Zobrazit soubor

@@ -43,7 +43,7 @@ Public Class 製程管制紀錄表_奶油組
43 43
         Array.Resize(標籤代號, 3) : Array.Resize(打包帶色, 3) : Array.Resize(打包代數, 3)
44 44
         品項 = "1"
45 45
         儲存_bt.Enabled = False : 修改_bt.Enabled = False
46
-        品項1_bt.Enabled = False : 品項2_bt.Enabled = False : 品項3_bt.Enabled = False : 顯示再製_bt.Enabled = False
46
+        品項1_bt.Enabled = False : 品項2_bt.Enabled = False : 品項3_bt.Enabled = False : 顯示再製_bt.Enabled = False : 顯示再製_bt.ForeColor = Color.Blue
47 47
     End Sub
48 48
     Private Sub Set_生產排程表_讀取()
49 49
         ' 查 生產排程表單 中有無資料
@@ -1431,8 +1431,10 @@ Public Class 製程管制紀錄表_奶油組
1431 1431
         ' 隱藏指定範圍的列
1432 1432
         If 再製明細_dgv.Rows.Count > 0 Then
1433 1433
             顯示再製_bt.Enabled = True
1434
+            顯示再製_bt.ForeColor = Color.Red
1434 1435
         Else
1435 1436
             顯示再製_bt.Enabled = False
1437
+            顯示再製_bt.ForeColor = Color.Blue
1436 1438
         End If
1437 1439
     End Sub
1438 1440
     Private Sub 顯示再製_bt_Click(sender As Object, e As EventArgs) Handles 顯示再製_bt.Click

+ 504
- 439
OW-ERP-SYS/06、業務管理系統/訂購單.Designer.vb
Diff nebyl zobrazen, protože je příliš veliký
Zobrazit soubor


+ 76
- 45
OW-ERP-SYS/06、業務管理系統/訂購單.vb Zobrazit soubor

@@ -9,6 +9,10 @@ Public Class 訂購單
9 9
         開立訂購單_bt.Enabled = True : 刪除訂購單上點選資料_bt.Enabled = False : 刪除_bt.Enabled = False : 儲存_bt.Enabled = False
10 10
         未核准_dgv.Visible = True : 作廢清單_dgv.Visible = False : 已核准_dgv.Visible = False
11 11
         小間距_ch.Checked = False : 中間距_ch.Checked = True : 大間距_ch.Checked = False
12
+        來電業務_rb.Checked = False : 來電客戶_rb.Checked = False : 運費公司_rb.Checked = False : 運費客戶_rb.Checked = False : 重量公司_rb.Checked = False
13
+        重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_cb.Checked = False
14
+        折扣_cb.Checked = False : 現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
15
+        賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False : 收款天數_tb.Text = "" : 票期天數_tb.Text = ""
12 16
         未審核_rb.Checked = True : Set_清單1() : Set_清單2() : Set_清單3() : Set_清單4() : Set_清單5()
13 17
     End Sub
14 18
 
@@ -147,6 +151,24 @@ Public Class 訂購單
147 151
         累計明細_dgv.Columns(4).HeaderCell.Style.Alignment = DataGridViewContentAlignment.MiddleCenter
148 152
         累計明細_dgv.EditMode = DataGridViewEditMode.EditOnEnter
149 153
     End Sub
154
+    Private Sub 累計明細_dgv_CellEndEdit(sender As Object, e As DataGridViewCellEventArgs) Handles 累計明細_dgv.CellEndEdit
155
+        ' 只對第 1 列的編輯進行檢查
156
+        If e.ColumnIndex = 2 Then
157
+            Dim cellValue As String = 累計明細_dgv.Rows(e.RowIndex).Cells(e.ColumnIndex).Value.ToString()
158
+
159
+            If String.IsNullOrEmpty(cellValue) Then
160
+                Exit Sub
161
+            End If
162
+
163
+            ' 使用正則表達式來檢查是否僅包含數字、小數點和符號
164
+            Dim pattern As String = "^[0-9+\-*/.]*$"
165
+            If Not System.Text.RegularExpressions.Regex.IsMatch(cellValue, pattern) Then
166
+                MessageBox.Show("僅允許輸入數字、小數點或符號 (0-9, +, -, *, /, .)")
167
+                ' 清空或恢復單元格的值
168
+                累計明細_dgv.Rows(e.RowIndex).Cells(e.ColumnIndex).Value = String.Empty
169
+            End If
170
+        End If
171
+    End Sub
150 172
     Private Sub 物料搜尋_bt_Click(sender As Object, e As EventArgs) Handles 物料搜尋_bt.Click
151 173
         Set_清單1()
152 174
     End Sub
@@ -162,8 +184,8 @@ Public Class 訂購單
162 184
             訂購明細_dgv.DataSource = Nothing : 累計明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 項次_tb.Text = "" : 客編_tb.Text = ""
163 185
             地址_tb.Text = "" : 電話_tb.Text = "" : 聯絡人_tb.Text = "" : 備註_tb.Text = "" : 收款天數_tb.Text = "" : 票期天數_tb.Text = "" : 項次1_tb.Text = ""
164 186
             來電業務_rb.Checked = False : 來電客戶_rb.Checked = False : 運費公司_rb.Checked = False : 運費客戶_rb.Checked = False : 重量公司_rb.Checked = False
165
-            重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_rb.Checked = False
166
-            折扣_rb.Checked = False : 現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
187
+            重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_cb.Checked = False
188
+            折扣_cb.Checked = False : 現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
167 189
             賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False
168 190
 
169 191
             刪除訂購單上點選資料_bt.Enabled = True : 刪除_bt.Enabled = True : 儲存_bt.Enabled = True : 客戶新增_bt.Enabled = True : 物料新增_bt.Enabled = True
@@ -178,8 +200,8 @@ Public Class 訂購單
178 200
             訂購明細_dgv.DataSource = Nothing : 累計明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 項次_tb.Text = "" : 客編_tb.Text = ""
179 201
             地址_tb.Text = "" : 電話_tb.Text = "" : 聯絡人_tb.Text = "" : 備註_tb.Text = "" : 收款天數_tb.Text = "" : 票期天數_tb.Text = "" : 項次1_tb.Text = ""
180 202
             來電業務_rb.Checked = False : 來電客戶_rb.Checked = False : 運費公司_rb.Checked = False : 運費客戶_rb.Checked = False : 重量公司_rb.Checked = False
181
-            重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_rb.Checked = False
182
-            折扣_rb.Checked = False : 現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
203
+            重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_cb.Checked = False
204
+            折扣_cb.Checked = False : 現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
183 205
             賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False
184 206
 
185 207
             刪除訂購單上點選資料_bt.Enabled = False : 刪除_bt.Enabled = False : 儲存_bt.Enabled = False : 客戶新增_bt.Enabled = False : 物料新增_bt.Enabled = False
@@ -194,8 +216,8 @@ Public Class 訂購單
194 216
             訂購明細_dgv.DataSource = Nothing : 累計明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 項次_tb.Text = "" : 客編_tb.Text = ""
195 217
             地址_tb.Text = "" : 電話_tb.Text = "" : 聯絡人_tb.Text = "" : 備註_tb.Text = "" : 收款天數_tb.Text = "" : 票期天數_tb.Text = "" : 項次1_tb.Text = ""
196 218
             來電業務_rb.Checked = False : 來電客戶_rb.Checked = False : 運費公司_rb.Checked = False : 運費客戶_rb.Checked = False : 重量公司_rb.Checked = False
197
-            重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_rb.Checked = False
198
-            折扣_rb.Checked = False : 現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
219
+            重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_cb.Checked = False
220
+            折扣_cb.Checked = False : 現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
199 221
             賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False
200 222
 
201 223
             刪除訂購單上點選資料_bt.Enabled = False : 刪除_bt.Enabled = False : 儲存_bt.Enabled = False : 客戶新增_bt.Enabled = False : 物料新增_bt.Enabled = False
@@ -207,7 +229,7 @@ Public Class 訂購單
207 229
     End Sub
208 230
     Private Sub 物料清單_dgv_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 物料清單_dgv.CellClick
209 231
         If e.RowIndex = -1 Then : Else
210
-            料號_tb.Text = 物料清單_dgv(1, e.RowIndex).Value.ToString
232
+            料號_tb.Text = 物料清單_dgv(4, e.RowIndex).Value.ToString
211 233
             品名_tb.Text = 物料清單_dgv(2, e.RowIndex).Value.ToString
212 234
             NUM2 = e.RowIndex
213 235
         End If
@@ -241,8 +263,8 @@ Public Class 訂購單
241 263
             運費公司_rb.Checked = 已核准_dgv(10, e.RowIndex).Value : 運費客戶_rb.Checked = 已核准_dgv(11, e.RowIndex).Value
242 264
             重量公司_rb.Checked = 已核准_dgv(12, e.RowIndex).Value : 重量客戶_rb.Checked = 已核准_dgv(13, e.RowIndex).Value
243 265
             重量地磅_rb.Checked = 已核准_dgv(14, e.RowIndex).Value : 客戶寄回_rb.Checked = 已核准_dgv(15, e.RowIndex).Value
244
-            代表收回_rb.Checked = 已核准_dgv(16, e.RowIndex).Value : 傭金_rb.Checked = 已核准_dgv(18, e.RowIndex).Value
245
-            折扣_rb.Checked = 已核准_dgv(19, e.RowIndex).Value : 現金_rb.Checked = 已核准_dgv(20, e.RowIndex).Value : 匯款_rb.Checked = 已核准_dgv(21, e.RowIndex).Value
266
+            代表收回_rb.Checked = 已核准_dgv(16, e.RowIndex).Value : 傭金_cb.Checked = 已核准_dgv(18, e.RowIndex).Value
267
+            折扣_cb.Checked = 已核准_dgv(19, e.RowIndex).Value : 現金_rb.Checked = 已核准_dgv(20, e.RowIndex).Value : 匯款_rb.Checked = 已核准_dgv(21, e.RowIndex).Value
246 268
             票期_rb.Checked = 已核准_dgv(22, e.RowIndex).Value : 買_rb.Checked = 已核准_dgv(24, e.RowIndex).Value
247 269
             賣_rb.Checked = 已核准_dgv(25, e.RowIndex).Value : 借_rb.Checked = 已核准_dgv(26, e.RowIndex).Value : 還_rb.Checked = 已核准_dgv(27, e.RowIndex).Value
248 270
             If Not String.IsNullOrEmpty(已核准_dgv(5, e.RowIndex).Value.ToString()) Then
@@ -262,8 +284,8 @@ Public Class 訂購單
262 284
             運費公司_rb.Checked = 未核准_dgv(10, e.RowIndex).Value : 運費客戶_rb.Checked = 未核准_dgv(11, e.RowIndex).Value
263 285
             重量公司_rb.Checked = 未核准_dgv(12, e.RowIndex).Value : 重量客戶_rb.Checked = 未核准_dgv(13, e.RowIndex).Value
264 286
             重量地磅_rb.Checked = 未核准_dgv(14, e.RowIndex).Value : 客戶寄回_rb.Checked = 未核准_dgv(15, e.RowIndex).Value
265
-            代表收回_rb.Checked = 未核准_dgv(16, e.RowIndex).Value : 傭金_rb.Checked = 未核准_dgv(18, e.RowIndex).Value
266
-            折扣_rb.Checked = 未核准_dgv(19, e.RowIndex).Value : 現金_rb.Checked = 未核准_dgv(20, e.RowIndex).Value : 匯款_rb.Checked = 未核准_dgv(21, e.RowIndex).Value
287
+            代表收回_rb.Checked = 未核准_dgv(16, e.RowIndex).Value : 傭金_cb.Checked = 未核准_dgv(18, e.RowIndex).Value
288
+            折扣_cb.Checked = 未核准_dgv(19, e.RowIndex).Value : 現金_rb.Checked = 未核准_dgv(20, e.RowIndex).Value : 匯款_rb.Checked = 未核准_dgv(21, e.RowIndex).Value
267 289
             票期_rb.Checked = 未核准_dgv(22, e.RowIndex).Value : 買_rb.Checked = 未核准_dgv(24, e.RowIndex).Value
268 290
             賣_rb.Checked = 未核准_dgv(25, e.RowIndex).Value : 借_rb.Checked = 未核准_dgv(26, e.RowIndex).Value : 還_rb.Checked = 未核准_dgv(27, e.RowIndex).Value
269 291
             If Not String.IsNullOrEmpty(未核准_dgv(5, e.RowIndex).Value.ToString()) Then
@@ -282,8 +304,8 @@ Public Class 訂購單
282 304
             運費公司_rb.Checked = 作廢清單_dgv(10, e.RowIndex).Value : 運費客戶_rb.Checked = 作廢清單_dgv(11, e.RowIndex).Value
283 305
             重量公司_rb.Checked = 作廢清單_dgv(12, e.RowIndex).Value : 重量客戶_rb.Checked = 作廢清單_dgv(13, e.RowIndex).Value
284 306
             重量地磅_rb.Checked = 作廢清單_dgv(14, e.RowIndex).Value : 客戶寄回_rb.Checked = 作廢清單_dgv(15, e.RowIndex).Value
285
-            代表收回_rb.Checked = 作廢清單_dgv(16, e.RowIndex).Value : 傭金_rb.Checked = 作廢清單_dgv(18, e.RowIndex).Value
286
-            折扣_rb.Checked = 作廢清單_dgv(19, e.RowIndex).Value : 現金_rb.Checked = 作廢清單_dgv(20, e.RowIndex).Value : 匯款_rb.Checked = 作廢清單_dgv(21, e.RowIndex).Value
307
+            代表收回_rb.Checked = 作廢清單_dgv(16, e.RowIndex).Value : 傭金_cb.Checked = 作廢清單_dgv(18, e.RowIndex).Value
308
+            折扣_cb.Checked = 作廢清單_dgv(19, e.RowIndex).Value : 現金_rb.Checked = 作廢清單_dgv(20, e.RowIndex).Value : 匯款_rb.Checked = 作廢清單_dgv(21, e.RowIndex).Value
287 309
             票期_rb.Checked = 作廢清單_dgv(22, e.RowIndex).Value : 買_rb.Checked = 作廢清單_dgv(24, e.RowIndex).Value
288 310
             賣_rb.Checked = 作廢清單_dgv(25, e.RowIndex).Value : 借_rb.Checked = 作廢清單_dgv(26, e.RowIndex).Value : 還_rb.Checked = 作廢清單_dgv(27, e.RowIndex).Value
289 311
             If Not String.IsNullOrEmpty(作廢清單_dgv(5, e.RowIndex).Value.ToString()) Then
@@ -301,8 +323,8 @@ Public Class 訂購單
301 323
         訂購明細_dgv.DataSource = Nothing : 累計明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 項次_tb.Text = "" : 客編_tb.Text = ""
302 324
         地址_tb.Text = "" : 電話_tb.Text = "" : 聯絡人_tb.Text = "" : 備註_tb.Text = "" : 收款天數_tb.Text = "" : 票期天數_tb.Text = "" : 項次1_tb.Text = ""
303 325
         來電業務_rb.Checked = False : 來電客戶_rb.Checked = False : 運費公司_rb.Checked = False : 運費客戶_rb.Checked = False : 重量公司_rb.Checked = False
304
-        重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_rb.Checked = False
305
-        折扣_rb.Checked = False : 現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
326
+        重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_cb.Checked = False
327
+        折扣_cb.Checked = False : 現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
306 328
         賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False
307 329
 
308 330
         未核准_dgv.Visible = True : 作廢清單_dgv.Visible = False : 已核准_dgv.Visible = False
@@ -365,8 +387,8 @@ Public Class 訂購單
365 387
                     訂購明細_dgv.DataSource = Nothing : 累計明細_dgv.DataSource = Nothing : 訂購單號_tb.Text = "" : 客名_tb.Text = "" : 項次_tb.Text = "" : 客編_tb.Text = ""
366 388
                     地址_tb.Text = "" : 電話_tb.Text = "" : 聯絡人_tb.Text = "" : 備註_tb.Text = "" : 收款天數_tb.Text = "" : 票期天數_tb.Text = "" : 項次1_tb.Text = ""
367 389
                     來電業務_rb.Checked = False : 來電客戶_rb.Checked = False : 運費公司_rb.Checked = False : 運費客戶_rb.Checked = False : 重量公司_rb.Checked = False
368
-                    重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_rb.Checked = False
369
-                    折扣_rb.Checked = False : 現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
390
+                    重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_cb.Checked = False
391
+                    折扣_cb.Checked = False : 現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
370 392
                     賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False
371 393
                     Set_清單2() : 訂購明細_dgv.DataSource = Nothing : 累計明細_dgv.DataSource = Nothing
372 394
                 End If
@@ -397,8 +419,8 @@ Public Class 訂購單
397 419
         Dim 交貨日期 As String = 交貨日期_dtp.Value.ToString("yyyy/MM/dd")
398 420
         SQL_訂購單控制表_修改(訂購單號_tb.Text, 交貨日期, 客編_tb.Text, 地址_tb.Text, 電話_tb.Text, 聯絡人_tb.Text, 備註_tb.Text,
399 421
                               來電業務_rb.Checked, 來電客戶_rb.Checked, 運費公司_rb.Checked, 運費客戶_rb.Checked, 重量公司_rb.Checked,
400
-                              重量客戶_rb.Checked, 重量地磅_rb.Checked, 客戶寄回_rb.Checked, 代表收回_rb.Checked, 收款天數_tb.Text, 傭金_rb.Checked,
401
-                              折扣_rb.Checked, 現金_rb.Checked, 匯款_rb.Checked, 票期_rb.Checked, 票期天數_tb.Text, 買_rb.Checked,
422
+                              重量客戶_rb.Checked, 重量地磅_rb.Checked, 客戶寄回_rb.Checked, 代表收回_rb.Checked, 收款天數_tb.Text, 傭金_cb.Checked,
423
+                              折扣_cb.Checked, 現金_rb.Checked, 匯款_rb.Checked, 票期_rb.Checked, 票期天數_tb.Text, 買_rb.Checked,
402 424
                               賣_rb.Checked, 借_rb.Checked, 還_rb.Checked)
403 425
     End Sub
404 426
 
@@ -481,66 +503,59 @@ Public Class 訂購單
481 503
     End Sub
482 504
     Private Sub 現金_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 現金_rb.Click
483 505
         If 現金_rb.Checked = True Then
484
-            現金_rb.Checked = True : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
485
-            賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False : 票期天數_tb.Text = ""
506
+            現金_rb.Checked = True : 匯款_rb.Checked = False : 票期_rb.Checked = False : 票期天數_tb.Text = ""
486 507
         End If
487 508
     End Sub
488 509
     Private Sub 匯款_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 匯款_rb.Click
489 510
         If 匯款_rb.Checked = True Then
490
-            現金_rb.Checked = False : 匯款_rb.Checked = True : 票期_rb.Checked = False : 買_rb.Checked = False
491
-            賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False : 票期天數_tb.Text = ""
511
+            現金_rb.Checked = False : 匯款_rb.Checked = True : 票期_rb.Checked = False : 票期天數_tb.Text = ""
492 512
         End If
493 513
     End Sub
494 514
     Private Sub 票期_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 票期_rb.Click
495 515
         If 票期_rb.Checked = True Then
496
-            現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = True : 買_rb.Checked = False
497
-            賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False : 票期天數_tb.Text = "0"
516
+            現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = True : 票期天數_tb.Text = "0"
498 517
         End If
499 518
     End Sub
500 519
     Private Sub 買_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 買_rb.Click
501 520
         If 買_rb.Checked = True Then
502
-            現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = True
503
-            賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False : 票期天數_tb.Text = ""
521
+            買_rb.Checked = True
522
+            賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False
504 523
         End If
505 524
     End Sub
506 525
     Private Sub 賣_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 賣_rb.Click
507 526
         If 賣_rb.Checked = True Then
508
-            現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
509
-            賣_rb.Checked = True : 借_rb.Checked = False : 還_rb.Checked = False : 票期天數_tb.Text = ""
527
+            買_rb.Checked = False
528
+            賣_rb.Checked = True : 借_rb.Checked = False : 還_rb.Checked = False
510 529
         End If
511 530
     End Sub
512 531
     Private Sub 借_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 借_rb.Click
513 532
         If 借_rb.Checked = True Then
514
-            現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
515
-            賣_rb.Checked = False : 借_rb.Checked = True : 還_rb.Checked = False : 票期天數_tb.Text = ""
533
+            買_rb.Checked = False
534
+            賣_rb.Checked = False : 借_rb.Checked = True : 還_rb.Checked = False
516 535
         End If
517 536
     End Sub
518 537
     Private Sub 還_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 還_rb.Click
519 538
         If 還_rb.Checked = True Then
520
-            現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
521
-            賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = True : 票期天數_tb.Text = ""
539
+            買_rb.Checked = False
540
+            賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = True
522 541
         End If
523 542
     End Sub
524 543
     Private Sub 客戶寄回_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 客戶寄回_rb.Click
525 544
         If 客戶寄回_rb.Checked = True Then
526
-            收款天數_tb.Text = "0" : 客戶寄回_rb.Checked = True : 代表收回_rb.Checked = False : 傭金_rb.Checked = False : 折扣_rb.Checked = False
545
+            收款天數_tb.Text = "0" : 客戶寄回_rb.Checked = True : 代表收回_rb.Checked = False
527 546
         End If
528 547
     End Sub
529 548
     Private Sub 代表收回_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 代表收回_rb.Click
530 549
         If 代表收回_rb.Checked = True Then
531
-            收款天數_tb.Text = "0" : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = True : 傭金_rb.Checked = False : 折扣_rb.Checked = False
532
-        End If
533
-    End Sub
534
-    Private Sub 傭金_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 傭金_rb.Click
535
-        If 傭金_rb.Checked = True Then
536
-            收款天數_tb.Text = "" : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_rb.Checked = True : 折扣_rb.Checked = False
537
-        End If
538
-    End Sub
539
-    Private Sub 折扣_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 折扣_rb.Click
540
-        If 折扣_rb.Checked = True Then
541
-            收款天數_tb.Text = "" : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_rb.Checked = False : 折扣_rb.Checked = True
550
+            收款天數_tb.Text = "0" : 客戶寄回_rb.Checked = False : 代表收回_rb.Checked = True
542 551
         End If
543 552
     End Sub
553
+    'Private Sub 傭金_cb_CheckedChanged(sender As Object, e As EventArgs) Handles 傭金_cb.Click
554
+    '    傭金_cb.Checked = Not 傭金_cb.Checked
555
+    'End Sub
556
+    'Private Sub 折扣_cb_CheckedChanged(sender As Object, e As EventArgs) Handles 折扣_cb.Click
557
+    '    折扣_cb.Checked = Not 折扣_cb.Checked
558
+    'End Sub
544 559
     Private Sub 運費公司_rb_CheckedChanged(sender As Object, e As EventArgs) Handles 運費公司_rb.Click
545 560
         If 運費公司_rb.Checked = True Then
546 561
             運費公司_rb.Checked = True : 運費客戶_rb.Checked = False
@@ -602,6 +617,22 @@ Public Class 訂購單
602 617
     Private Sub 累計表單項刪除_bt_MouseEnter(sender As Object, e As EventArgs) Handles 累計表單項刪除_bt.MouseEnter
603 618
         ToolTip1.SetToolTip(Me.累計表單項刪除_bt, "刪除累計量單上點選資料")
604 619
     End Sub
620
+
621
+    Private Sub 全關1_bt_Click(sender As Object, e As EventArgs) Handles 全關1_bt.Click
622
+        運費公司_rb.Checked = False : 運費客戶_rb.Checked = False : 重量公司_rb.Checked = False
623
+        重量客戶_rb.Checked = False : 重量地磅_rb.Checked = False
624
+    End Sub
625
+
626
+    Private Sub 全關2_bt_Click(sender As Object, e As EventArgs) Handles 全關2_bt.Click
627
+        客戶寄回_rb.Checked = False : 代表收回_rb.Checked = False : 傭金_cb.Checked = False
628
+        折扣_cb.Checked = False : 收款天數_tb.Text = ""
629
+    End Sub
630
+
631
+    Private Sub 全關3_bt_Click(sender As Object, e As EventArgs) Handles 全關3_bt.Click
632
+        現金_rb.Checked = False : 匯款_rb.Checked = False : 票期_rb.Checked = False : 買_rb.Checked = False
633
+        賣_rb.Checked = False : 借_rb.Checked = False : 還_rb.Checked = False : 票期天數_tb.Text = ""
634
+    End Sub
635
+
605 636
     Private Sub 累計表刪除_bt_MouseEnter(sender As Object, e As EventArgs) Handles 累計表刪除_bt.MouseEnter
606 637
         ToolTip1.SetToolTip(Me.累計表刪除_bt, "刪除累計量單")
607 638
     End Sub

+ 1
- 0
OW-ERP-SYS/06、業務管理系統/訂購單審核.Designer.vb Zobrazit soubor

@@ -748,6 +748,7 @@ Partial Class 訂購單審核
748 748
         Me.項次_tb.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
749 749
         Me.項次_tb.Location = New System.Drawing.Point(1116, 59)
750 750
         Me.項次_tb.Name = "項次_tb"
751
+        Me.項次_tb.ReadOnly = True
751 752
         Me.項次_tb.Size = New System.Drawing.Size(50, 23)
752 753
         Me.項次_tb.TabIndex = 2045
753 754
         '

+ 67
- 28
OW-ERP-SYS/0、MyModule/主資料庫/SQL_倉儲系統管理.vb Zobrazit soubor

@@ -2,6 +2,28 @@
2 2
 Imports System.Windows.Forms.VisualStyles.VisualStyleElement
3 3
 
4 4
 Module SQL_倉儲系統管理
5
+    '---------------------通用-----------------------------------------------------------------------------------------------------------------
6
+    Friend Sub SQL_庫存餘額判斷(倉名 As String, 料號 As String)
7
+        ConnOpen()
8
+        SQL1 = "SELECT
9
+                    物料規格表.物料料號,
10
+                    物料規格表.舊編號,
11
+                    物料規格表.名稱,
12
+                    物料規格表.規格1 AS 規格,
13
+                    ISNULL(SUM(CAST(倉儲明細表.入庫 AS float) - CAST(倉儲明細表.出庫 AS float)), 0) AS 庫存量
14
+                FROM
15
+                    物料規格表
16
+                LEFT JOIN 倉儲明細表 ON 物料規格表.物料料號 = 倉儲明細表.料號 AND 倉儲明細表.倉名編號  = N'" & 倉名 & "'
17
+				WHERE 物料料號 = N'" & 料號 & "'
18
+
19
+                GROUP BY
20
+                    物料規格表.物料料號,
21
+                    物料規格表.舊編號,
22
+                    物料規格表.名稱,
23
+                    物料規格表.規格1"
24
+        CmdSet_For_dr()
25
+    End Sub
26
+
5 27
     '---------------------物料資料庫-----------------------------------------------------------------------------------------------------------------
6 28
     Friend Sub SQL_物料明細表_讀取()
7 29
         ConnOpen()
@@ -608,47 +630,30 @@ Module SQL_倉儲系統管理
608 630
     Friend Sub SQL_送貨單控制表_未審核()
609 631
         ConnOpen()
610 632
         SQL1 = "SELECT   送貨單號, 訂購單號, 物流, 車號, 客戶編號,客戶資料表.客戶名稱, 電話, 送貨單控制表.地址, 備註, 申請人, 申請日期, 核准人, 核准日期, 
611
-                         已簽收,庫別
633
+                         已簽收,庫別, 已出貨, 送貨日期
612 634
                 FROM     送貨單控制表
613 635
 				LEFT OUTER JOIN 客戶資料表 ON 送貨單控制表 .客戶編號 = 客戶資料表.流水號
614
-                WHERE      (送貨單控制表.核准人 LIKE N'') AND  (送貨單控制表.已簽收 ='0') ORDER BY 送貨單控制表.送貨單號 DESC"
636
+                WHERE      (送貨單控制表.核准人 LIKE N'')  ORDER BY 送貨單控制表.送貨單號 DESC"
615 637
         CmdSet_For_DGV()
616 638
     End Sub
617 639
     Friend Sub SQL_送貨單控制表_已審核()
618 640
         ConnOpen()
619 641
         SQL1 = "SELECT   送貨單號, 訂購單號, 物流, 車號, 客戶編號,客戶資料表.客戶名稱, 電話, 送貨單控制表.地址, 備註, 申請人, 申請日期, 核准人, 核准日期, 
620
-                         已簽收,庫別
642
+                         已簽收,庫別, 已出貨, 送貨日期
621 643
                 FROM     送貨單控制表
622 644
 				LEFT OUTER JOIN 客戶資料表 ON 送貨單控制表 .客戶編號 = 客戶資料表.流水號
623 645
                 WHERE      (送貨單控制表.核准人 NOT LIKE N'')  ORDER BY 送貨單控制表.送貨單號 DESC"
624 646
         CmdSet_For_DGV()
625 647
     End Sub
626
-    Friend Sub SQL_送貨單控制表_已審未收()
627
-        ConnOpen()
628
-        SQL1 = "SELECT   送貨單號, 訂購單號, 物流, 車號, 客戶編號,客戶資料表.客戶名稱, 電話, 送貨單控制表.地址, 備註, 申請人, 申請日期, 核准人, 核准日期, 
629
-                         已簽收,庫別
630
-                FROM     送貨單控制表
631
-				LEFT OUTER JOIN 客戶資料表 ON 送貨單控制表 .客戶編號 = 客戶資料表.流水號
632
-                WHERE      (送貨單控制表.核准人 NOT LIKE N'') AND  (送貨單控制表.已簽收 ='0') ORDER BY 送貨單控制表.送貨單號 DESC"
633
-        CmdSet_For_DGV()
634
-    End Sub
635
-    Friend Sub SQL_送貨單控制表_已審已收()
636
-        ConnOpen()
637
-        SQL1 = "SELECT   送貨單號, 訂購單號, 物流, 車號, 客戶編號,客戶資料表.客戶名稱, 電話, 送貨單控制表.地址, 備註, 申請人, 申請日期, 核准人, 核准日期, 
638
-                         已簽收,庫別
639
-                FROM     送貨單控制表
640
-				LEFT OUTER JOIN 客戶資料表 ON 送貨單控制表 .客戶編號 = 客戶資料表.流水號
641
-                WHERE      (送貨單控制表.核准人 NOT LIKE N'') AND  (送貨單控制表.已簽收 ='1') ORDER BY 送貨單控制表.送貨單號 DESC"
642
-        CmdSet_For_DGV()
643
-    End Sub
648
+
644 649
     Friend Sub SQL_送貨單控制表_流水號查詢(單號 As String)
645 650
         ConnOpen() : SQL1 = "SELECT TOP (1)  送貨單號 FROM 送貨單控制表 WHERE ( 送貨單號 LIKE N'" & 單號 & "')" : CmdSet_For_dr()
646 651
     End Sub
647 652
     Friend Sub SQL_送貨單控制表_新增(單號 As String)
648 653
         ConnOpen()
649 654
         SQL1 = "INSERT INTO 送貨單控制表 (送貨單號, 訂購單號, 物流, 車號, 客戶編號, 電話, 地址, 備註, 申請人, 申請日期, 核准人, 核准日期, 
650
-                            已簽收) 
651
-                VALUES (N'" & 單號 & "',N'',N'',N'',N'',N'',N'',N'',N'" & gUserName & "',N'" & DTP & "',N'',N'',N'0')"
655
+                            已簽收,庫別, 已出貨, 送貨日期) 
656
+                VALUES (N'" & 單號 & "',N'',N'',N'',N'',N'',N'',N'',N'" & gUserName & "',N'" & DTP & "',N'',N'',N'0',N'',N'0',N'')"
652 657
         CmdSet_For_dr()
653 658
     End Sub
654 659
     Friend Sub SQL_送貨單明細表_新增(單號 As String, 項次 As String, 料號 As String, 品名 As String, 規格 As String, 數量 As String)
@@ -679,10 +684,10 @@ Module SQL_倉儲系統管理
679 684
         CmdSet_For_dr()
680 685
     End Sub
681 686
     Friend Sub SQL_送貨單控制表_修改(單號 As String, 訂購單號 As String, 客戶編號 As String, 地址 As String, 電話 As String, 備註 As String,
682
-                             物流 As String, 車號 As String, 庫別 As String)
687
+                             物流 As String, 車號 As String, 庫別 As String, 送貨日期 As String)
683 688
         ConnOpen()
684 689
         SQL1 = "UPDATE 送貨單控制表 SET  訂購單號 = '" & 訂購單號 & "',客戶編號 = '" & 客戶編號 & "',地址 = '" & 地址 & "',電話 = '" & 電話 & "' ,
685
-                                       備註 = '" & 備註 & "' ,物流 = '" & 物流 & "',車號 = '" & 車號 & "',庫別 = '" & 庫別 & "'
690
+                                       備註 = '" & 備註 & "' ,物流 = '" & 物流 & "',車號 = '" & 車號 & "',庫別 = '" & 庫別 & "', 送貨日期 = '" & 送貨日期 & "'
686 691
                              WHERE 送貨單號 LIKE N'" & 單號 & "'"
687 692
         CmdSet_For_dr()
688 693
     End Sub
@@ -692,6 +697,12 @@ Module SQL_倉儲系統管理
692 697
                              WHERE 送貨單號 LIKE N'" & 單號 & "'"
693 698
         CmdSet_For_dr()
694 699
     End Sub
700
+    Friend Sub SQL_送貨單控制表_修改2(單號 As String, 已出貨 As String)
701
+        ConnOpen()
702
+        SQL1 = "UPDATE 送貨單控制表 SET  已出貨 = '" & 已出貨 & "'
703
+                             WHERE 送貨單號 LIKE N'" & 單號 & "'"
704
+        CmdSet_For_dr()
705
+    End Sub
695 706
     Friend Sub SQL_送貨單核准_核准(單號 As String, 核准人 As String)
696 707
         ConnOpen() : SQL1 = "UPDATE 送貨單控制表 SET 核准人 = N'" & 核准人 & "', 核准日期 = N'" & DTP & "' WHERE (送貨單號 = N'" & 單號 & "')" : CmdSet_For_dr()
697 708
     End Sub
@@ -718,17 +729,20 @@ Module SQL_倉儲系統管理
718 729
 
719 730
         SQL1 = "SELECT
720 731
                     物料規格表.物料料號,
732
+                    物料規格表.舊編號,
721 733
                     物料規格表.名稱,
722
-                    物料規格表.規格1,
723
-                    ISNULL(SUM(CAST(倉儲明細表.入庫 AS float) - CAST(倉儲明細表.出庫 AS float)), 0) AS 庫存量
734
+                    物料規格表.規格1 AS 規格,
735
+                    ISNULL(SUM(CAST(倉儲明細表.入庫 AS float) - CAST(倉儲明細表.出庫 AS float)), 0) AS 庫存量,
736
+                    '' AS 備註
724 737
                 FROM
725 738
                     物料規格表
726 739
                 LEFT JOIN 倉儲明細表 ON 物料規格表.物料料號 = 倉儲明細表.料號 " & SQL2 & " 
727 740
 
728 741
                 GROUP BY
729 742
                     物料規格表.物料料號,
743
+                    物料規格表.舊編號,
730 744
                     物料規格表.名稱,
731
-                    物料規格表.規格1
745
+                    物料規格表.規格1 
732 746
                 HAVING
733 747
                      ISNULL(SUM(CAST(倉儲明細表.入庫 AS float) - CAST(倉儲明細表.出庫 AS float)), 0) " & 符號 & " 0
734 748
                 ORDER BY 庫存量 DESC"
@@ -742,4 +756,29 @@ Module SQL_倉儲系統管理
742 756
     Friend Sub SQL_物料種類_下拉清單()
743 757
         ConnOpen() : SQL1 = "SELECT DISTINCT 種類 FROM 物料規格表 ORDER BY 種類" : CmdSet_For_dr()
744 758
     End Sub
759
+    '---------------------盤營盤損-----------------------------------------------------------------------------------------------------------------
760
+    Friend Sub SQL_盤營盤損_日期清單()
761
+        ConnOpen()
762
+        SQL1 = "SELECT 倉庫作業 AS 作業人員, 作業日期
763
+                FROM   倉儲明細表
764
+                WHERE  狀態 IN ('盤營入庫', '盤損出庫')
765
+                GROUP BY 倉庫作業, 作業日期
766
+                ORDER BY 作業日期 DESC"
767
+        CmdSet_For_DGV()
768
+    End Sub
769
+    Friend Sub SQL_盤營盤損_日期清單明細(人員 As String, 日期 As String)
770
+        ConnOpen()
771
+        SQL1 = "SELECT      資料流水號, 倉儲分區控制表.倉名 AS 庫別, 物料規格表.舊編號,料號, 物料規格表.名稱, 物料規格表.規格1 AS 規格,審核人 AS 庫存量 ,審核日期 AS 盤點量,入庫 AS 盤營數, 出庫 AS 盤損數,倉儲明細表.備註
772
+                FROM   倉儲明細表
773
+                LEFT OUTER JOIN 倉儲分區控制表 ON 倉儲明細表.倉級= 倉儲分區控制表.倉級 AND 倉儲明細表.倉名編號= 倉儲分區控制表.倉名編號
774
+                LEFT OUTER JOIN 物料規格表 ON 倉儲明細表.料號= 物料規格表.物料料號
775
+                WHERE  狀態 IN ('盤營入庫', '盤損出庫') AND 倉庫作業 = '" & 人員 & "' AND 作業日期 ='" & 日期 & "'"
776
+        CmdSet_For_DGV()
777
+    End Sub
778
+    Friend Sub SQL_盤營盤損_倉儲明細表(流水號 As String, 庫存數 As String, 盤點數 As String)
779
+        ConnOpen()
780
+        SQL1 = "UPDATE 倉儲明細表 SET  審核人 = '" & 庫存數 & "' , 審核日期 = '" & 盤點數 & "'
781
+                             WHERE 資料流水號 LIKE N'" & 流水號 & "'"
782
+        CmdSet_For_dr()
783
+    End Sub
745 784
 End Module

+ 8
- 4
OW-ERP-SYS/0、MyModule/主資料庫/SQL_技術管理系統.vb Zobrazit soubor

@@ -406,10 +406,10 @@ Module SQL_技術管理系統
406 406
     Friend Sub SQL_料號選擇選項_讀取(種類 As String, 關鍵字 As String)
407 407
         ConnOpen()
408 408
         SQL1 = "SELECT      物料規格表.物料料號 AS 項次, 
409
-                        物料規格表.物料料號, 
409
+                        物料規格表.舊編號, 
410 410
                         物料規格表.名稱, 
411 411
                         物料規格表.規格1, 
412
-                        物料規格表.舊編號, 
412
+                        物料規格表.物料料號, 
413 413
                         OW空白圖片.圖片 AS 加入
414 414
             FROM        物料規格表 
415 415
             LEFT OUTER JOIN OW空白圖片 ON 物料規格表.物料料號 = OW空白圖片.選擇
@@ -729,17 +729,21 @@ Module SQL_技術管理系統
729 729
     Friend Sub SQL_生產製程_再製清單()
730 730
         ConnOpen()
731 731
         SQL1 = "SELECT
732
+                    物料規格表.舊編號,
732 733
                     物料規格表.物料料號,
733 734
                     物料規格表.名稱,
734 735
                     物料規格表.規格1,
735
-                    ISNULL(SUM(CAST(倉儲明細表.入庫 AS float) - CAST(倉儲明細表.出庫 AS float)), 0) AS 庫存量
736
+                    ISNULL(SUM(CAST(倉儲明細表.入庫 AS float) - CAST(倉儲明細表.出庫 AS float)), 0) AS 庫存量,
737
+                    物料規格表.單位
736 738
                 FROM
737 739
                     物料規格表
738 740
                 LEFT JOIN 倉儲明細表 ON 物料規格表.物料料號 = 倉儲明細表.料號 AND 倉儲明細表.倉名編號  LIKE N'%N05%'
739 741
                 GROUP BY
742
+                    物料規格表.舊編號,
740 743
                     物料規格表.物料料號,
741 744
                     物料規格表.名稱,
742
-                    物料規格表.規格1
745
+                    物料規格表.規格1,
746
+                    物料規格表.單位
743 747
                 HAVING
744 748
                      ISNULL(SUM(CAST(倉儲明細表.入庫 AS float) - CAST(倉儲明細表.出庫 AS float)), 0) <> 0
745 749
                 ORDER BY 庫存量 DESC"

binární
OW-ERP-SYS/bin/Debug/OW-ERP-SYS.exe Zobrazit soubor


binární
OW-ERP-SYS/bin/Debug/OW-ERP-SYS.pdb Zobrazit soubor


binární
OW-ERP-SYS/obj/Debug/OW-ERP-SYS.pdb Zobrazit soubor


binární
OW-ERP-SYS/obj/Debug/OW-ERP-SYS.vbproj.GenerateResource.cache Zobrazit soubor


binární
OW-ERP-SYS/obj/Debug/ow-erp-sys.exe Zobrazit soubor


Loading…
Zrušit
Uložit