Bläddra i källkod

版本號 : 2021031701

更新內容如下
1、生產進步表列印中加入可以選擇工廠。
B70340 4 år sedan
förälder
incheckning
09859f971d

Binär
.vs/WINPROFIT-ERP-SYS/v16/.suo Visa fil


+ 1
- 1
SHENKANG-MES-SYS/MyModule/全域變數.vb Visa fil

@@ -9,7 +9,7 @@
9 9
                                  CC51, CC52, CC53, CC54, CC55, CC56, CC57, CC58, CC59, CC60, CC61, CC62, CC63, CC64, CC65, CC66, CC67, CC68, CC69, CC70, CC71, CC72, CC73, CC74, CC75, CC76, CC77, CC78, 
10 10
                                  CC79, CC80, CC81, CC82, CC83, CC84, CC85, CC86, CC87, CC88, CC89, CC90, CC91, CC92, CC93, CC94, CC95 FROM"
11 11
     '----系統版本-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
12
-    Public 版本 As String = "2021020401"
12
+    Public 版本 As String = "2021031701"
13 13
     '----系統用全域變數-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
14 14
     Public PA As String = "" : Public PA1 As String = "" : Public PA2 As String = "" : Public PA3 As String = "" : Public PA4 As String = "" : Public PA5 As String = "" : Public PA6 As String = ""
15 15
     Public PA7 As String = "" : Public PA8 As String = "" : Public PA9 As String = "" : Public PA10 As String = "" : Public PA11 As String = "" : Public PA12 As String = "" : Public PA13 As String = ""

+ 1
- 1
SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.application Visa fil

@@ -14,7 +14,7 @@
14 14
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
15 15
         </dsig:Transforms>
16 16
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
17
-        <dsig:DigestValue>fYU/TXwRbbJWcgRyGAYlIwyhBuSiIzRaRUxzn7/SV+U=</dsig:DigestValue>
17
+        <dsig:DigestValue>RtySCBG8t9TvO0A2/2SdIU1zLA1JxC1bhcxoY8TzNyY=</dsig:DigestValue>
18 18
       </hash>
19 19
     </dependentAssembly>
20 20
   </dependency>

Binär
SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.exe Visa fil


+ 2
- 2
SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.exe.manifest Visa fil

@@ -43,14 +43,14 @@
43 43
     </dependentAssembly>
44 44
   </dependency>
45 45
   <dependency>
46
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WINPROFIT-ERP-SYS.exe" size="5492224">
46
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WINPROFIT-ERP-SYS.exe" size="5496320">
47 47
       <assemblyIdentity name="WINPROFIT-ERP-SYS" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
48 48
       <hash>
49 49
         <dsig:Transforms>
50 50
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
51 51
         </dsig:Transforms>
52 52
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
53
-        <dsig:DigestValue>4uQEhEfE9Z3kGe5J++J2DoDPCIPigO9qU9aWvkLcaS0=</dsig:DigestValue>
53
+        <dsig:DigestValue>jTsdGe5fA0HrAX0eV9BK0wzIhx+CSTtDMuHZkI9WaiQ=</dsig:DigestValue>
54 54
       </hash>
55 55
     </dependentAssembly>
56 56
   </dependency>

Binär
SHENKANG-MES-SYS/bin/Debug/WINPROFIT-ERP-SYS.pdb Visa fil


Binär
SHENKANG-MES-SYS/bin/Debug/app.publish/WINPROFIT-ERP-SYS.exe Visa fil


Binär
SHENKANG-MES-SYS/obj/Debug/DesignTimeResolveAssemblyReferences.cache Visa fil


+ 1
- 1
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.application Visa fil

@@ -14,7 +14,7 @@
14 14
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
15 15
         </dsig:Transforms>
16 16
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
17
-        <dsig:DigestValue>fYU/TXwRbbJWcgRyGAYlIwyhBuSiIzRaRUxzn7/SV+U=</dsig:DigestValue>
17
+        <dsig:DigestValue>RtySCBG8t9TvO0A2/2SdIU1zLA1JxC1bhcxoY8TzNyY=</dsig:DigestValue>
18 18
       </hash>
19 19
     </dependentAssembly>
20 20
   </dependency>

Binär
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.exe Visa fil


+ 2
- 2
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.exe.manifest Visa fil

@@ -43,14 +43,14 @@
43 43
     </dependentAssembly>
44 44
   </dependency>
45 45
   <dependency>
46
-    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WINPROFIT-ERP-SYS.exe" size="5492224">
46
+    <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="WINPROFIT-ERP-SYS.exe" size="5496320">
47 47
       <assemblyIdentity name="WINPROFIT-ERP-SYS" version="1.0.0.0" language="neutral" processorArchitecture="msil" />
48 48
       <hash>
49 49
         <dsig:Transforms>
50 50
           <dsig:Transform Algorithm="urn:schemas-microsoft-com:HashTransforms.Identity" />
51 51
         </dsig:Transforms>
52 52
         <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha256" />
53
-        <dsig:DigestValue>4uQEhEfE9Z3kGe5J++J2DoDPCIPigO9qU9aWvkLcaS0=</dsig:DigestValue>
53
+        <dsig:DigestValue>jTsdGe5fA0HrAX0eV9BK0wzIhx+CSTtDMuHZkI9WaiQ=</dsig:DigestValue>
54 54
       </hash>
55 55
     </dependentAssembly>
56 56
   </dependency>

Binär
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.pdb Visa fil


Binär
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbproj.GenerateResource.cache Visa fil


Binär
SHENKANG-MES-SYS/obj/Debug/WINPROFIT-ERP-SYS.vbprojAssemblyReference.cache Visa fil


+ 31
- 6
SHENKANG-MES-SYS/量產訂單管理系統/列印_生產進度表.Designer.vb Visa fil

@@ -22,7 +22,9 @@ 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()
25 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()
26 28
         Me.CheckBox7 = New System.Windows.Forms.CheckBox()
27 29
         Me.CheckBox6 = New System.Windows.Forms.CheckBox()
28 30
         Me.CheckBox5 = New System.Windows.Forms.CheckBox()
@@ -33,7 +35,9 @@ Partial Class 列印_生產進度表
33 35
         Me.Button1 = New System.Windows.Forms.Button()
34 36
         Me.Button11 = New System.Windows.Forms.Button()
35 37
         Me.DataGridView1 = New System.Windows.Forms.DataGridView()
38
+        Me.工廠_DGV = New System.Windows.Forms.DataGridView()
36 39
         CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).BeginInit()
40
+        CType(Me.工廠_DGV, System.ComponentModel.ISupportInitialize).BeginInit()
37 41
         Me.SuspendLayout()
38 42
         '
39 43
         'CheckBox7
@@ -116,7 +120,7 @@ Partial Class 列印_生產進度表
116 120
         '
117 121
         Me.Button1.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
118 122
         Me.Button1.ForeColor = System.Drawing.Color.Red
119
-        Me.Button1.Location = New System.Drawing.Point(128, 12)
123
+        Me.Button1.Location = New System.Drawing.Point(189, 64)
120 124
         Me.Button1.Name = "Button1"
121 125
         Me.Button1.Size = New System.Drawing.Size(110, 54)
122 126
         Me.Button1.TabIndex = 329
@@ -127,7 +131,7 @@ Partial Class 列印_生產進度表
127 131
         '
128 132
         Me.Button11.Font = New System.Drawing.Font("微軟正黑體", 9.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(136, Byte))
129 133
         Me.Button11.ForeColor = System.Drawing.Color.Blue
130
-        Me.Button11.Location = New System.Drawing.Point(12, 12)
134
+        Me.Button11.Location = New System.Drawing.Point(189, 4)
131 135
         Me.Button11.Name = "Button11"
132 136
         Me.Button11.Size = New System.Drawing.Size(110, 54)
133 137
         Me.Button11.TabIndex = 328
@@ -136,21 +140,40 @@ Partial Class 列印_生產進度表
136 140
         '
137 141
         'DataGridView1
138 142
         '
139
-        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
140
-        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
143
+        DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
144
+        Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
141 145
         Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
142
-        Me.DataGridView1.Location = New System.Drawing.Point(13, 98)
146
+        Me.DataGridView1.Location = New System.Drawing.Point(325, 138)
143 147
         Me.DataGridView1.Name = "DataGridView1"
144 148
         Me.DataGridView1.RowHeadersWidth = 5
145 149
         Me.DataGridView1.RowTemplate.Height = 24
146 150
         Me.DataGridView1.Size = New System.Drawing.Size(775, 143)
147 151
         Me.DataGridView1.TabIndex = 327
148 152
         '
153
+        '工廠_DGV
154
+        '
155
+        DataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer))
156
+        Me.工廠_DGV.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle2
157
+        Me.工廠_DGV.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill
158
+        Me.工廠_DGV.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
159
+        Me.工廠_DGV.Location = New System.Drawing.Point(6, 4)
160
+        Me.工廠_DGV.Margin = New System.Windows.Forms.Padding(3, 4, 3, 4)
161
+        Me.工廠_DGV.Name = "工廠_DGV"
162
+        Me.工廠_DGV.RowHeadersWidth = 5
163
+        DataGridViewCellStyle3.ForeColor = System.Drawing.Color.Black
164
+        DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
165
+        Me.工廠_DGV.RowsDefaultCellStyle = DataGridViewCellStyle3
166
+        Me.工廠_DGV.RowTemplate.Height = 24
167
+        Me.工廠_DGV.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect
168
+        Me.工廠_DGV.Size = New System.Drawing.Size(177, 160)
169
+        Me.工廠_DGV.TabIndex = 917
170
+        '
149 171
         '列印_生產進度表
150 172
         '
151 173
         Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 12.0!)
152 174
         Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
153
-        Me.ClientSize = New System.Drawing.Size(255, 70)
175
+        Me.ClientSize = New System.Drawing.Size(302, 168)
176
+        Me.Controls.Add(Me.工廠_DGV)
154 177
         Me.Controls.Add(Me.CheckBox7)
155 178
         Me.Controls.Add(Me.CheckBox6)
156 179
         Me.Controls.Add(Me.CheckBox5)
@@ -165,6 +188,7 @@ Partial Class 列印_生產進度表
165 188
         Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
166 189
         Me.Text = "列印_生產進度表"
167 190
         CType(Me.DataGridView1, System.ComponentModel.ISupportInitialize).EndInit()
191
+        CType(Me.工廠_DGV, System.ComponentModel.ISupportInitialize).EndInit()
168 192
         Me.ResumeLayout(False)
169 193
         Me.PerformLayout()
170 194
 
@@ -180,4 +204,5 @@ Partial Class 列印_生產進度表
180 204
     Friend WithEvents Button1 As Button
181 205
     Friend WithEvents Button11 As Button
182 206
     Friend WithEvents DataGridView1 As DataGridView
207
+    Friend WithEvents 工廠_DGV As DataGridView
183 208
 End Class

+ 97
- 71
SHENKANG-MES-SYS/量產訂單管理系統/列印_生產進度表.vb Visa fil

@@ -13,25 +13,36 @@ Public Class 列印_生產進度表
13 13
     ReadOnly conn As New SqlConnection
14 14
     ReadOnly da As New SqlDataAdapter
15 15
     ReadOnly cmd As New SqlCommand
16
-    ReadOnly ds As New DataSet
16
+    ReadOnly ds As New DataSet : ReadOnly ds1 As New DataSet
17 17
     Dim xlApp As Application
18 18
     Dim xlBook As Workbook
19 19
     Dim xlSheet As Worksheet
20 20
     Public Property ThisWorkbook As Object
21 21
     Public Property ActiveWorkbook As Object
22 22
     Dim N1 As Integer = 0
23
-    Private Sub Set_DGV1載入前設定()
23
+    Dim ASS As String
24
+    Private Sub Set_工廠清單()
25
+        工廠_DGV.DataSource = Nothing : ds1.Clear()
26
+        工廠_DGV.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
27
+        工廠_DGV.ColumnHeadersHeight = 25
28
+        工廠_DGV.AllowUserToAddRows = False
29
+        If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
30
+        SQL1 = "SELECT METOO選擇按鈕.選擇, QQ.生產工廠
31
+                FROM   METOO選擇按鈕 RIGHT OUTER JOIN
32
+                      (SELECT   TOP (100) PERCENT 生產工廠 FROM 訂單控制表 WHERE (CXL = 0) AND (訂單數量 - 出貨數量 > 0) 
33
+                       GROUP BY 生產工廠 ORDER BY 生產工廠) AS QQ ON METOO選擇按鈕.對應 = QQ.生產工廠"
34
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds1) : 工廠_DGV.DataSource = ds1.Tables(0) : conn.Close()
35
+        工廠_DGV.Columns(0).FillWeight = 30 : 工廠_DGV.Columns(1).FillWeight = 100
36
+        For i As Integer = 0 To 工廠_DGV.Rows.Count - 1
37
+            工廠_DGV.Rows(i).Cells("選擇").Value = False
38
+        Next
39
+    End Sub
40
+    Private Sub Set_訂單清單()
24 41
         DataGridView1.DataSource = Nothing : ds.Clear()
25 42
         DataGridView1.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.EnableResizing
26 43
         DataGridView1.ColumnHeadersHeight = 25
27 44
         DataGridView1.AllowUserToAddRows = False
28 45
         If conn.State = ConnectionState.Closed Then : conn.ConnectionString = ConString : conn.Open() : End If
29
-    End Sub
30
-    Private Sub Set_DGV1載入後設定()
31
-        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
32
-    End Sub
33
-    Private Sub Set_訂單清單()
34
-        Set_DGV1載入前設定()
35 46
         SQL1 = "SELECT  訂單明細表抬頭.下單日 AS 接單日, 訂單控制表.訂單流水號, 訂單控制表.客戶訂單號, 
36 47
                             訂單控制表.GOODBOX AS 型體名稱, 訂單控制表.型體號碼, 訂單控制表.年份季度, 訂單控制表.TVW AS 楦型, 
37 48
                             訂單控制表.APMA確認 AS 顏色, 訂單控制表.訂單數量, 訂單控制表.工廠回復交期 AS 最後交期, 訂單控制表.BUYER, 
@@ -44,79 +55,94 @@ Public Class 列印_生產進度表
44 55
                             訂單明細表抬頭 ON 訂單控制表.客戶訂單號 = 訂單明細表抬頭.客戶訂單號 AND 
45 56
                             訂單控制表.訂單流水號 = 訂單明細表抬頭.訂單流水號
46 57
                     WHERE  (訂單控制表.CXL = 0 OR
47
-                            訂單控制表.CXL IS NULL) AND (訂單控制表.訂單數量 - 訂單控制表.出貨數量 <> 0)
58
+                            訂單控制表.CXL IS NULL) AND (訂單控制表.訂單數量 - 訂單控制表.出貨數量 <> 0) AND (訂單控制表.生產工廠 LIKE '" & ASS & "')
48 59
                     ORDER BY   訂單控制表.訂單流水號 DESC, 訂單控制表.客戶交期1, 訂單控制表.型體號碼, 顏色, 楦型"
49
-        Set_DGV1載入後設定()
60
+        cmd.Connection = conn : cmd.CommandText = SQL1 : da.SelectCommand = cmd : da.Fill(ds) : DataGridView1.DataSource = ds.Tables(0) : conn.Close()
50 61
     End Sub
51
-
52 62
     Private Sub 生產進度表列印_Load(sender As Object, e As EventArgs) Handles MyBase.Load
63
+        ASS = ""
53 64
         FormBorderStyle = FormBorderStyle.SizableToolWindow : ControlBox = False
54 65
         CheckBox1.Visible = False : CheckBox3.Visible = False : CheckBox6.Visible = False : CheckBox5.Visible = False : CheckBox4.Visible = False
55
-        Set_訂單清單()
66
+        Set_工廠清單()
67
+    End Sub
68
+    Private Sub 工廠_DGV_CellClick(ByVal sender As System.Object, ByVal e As DataGridViewCellEventArgs) Handles 工廠_DGV.CellClick
69
+        If e.RowIndex = -1 Then : Else
70
+            For i As Integer = 0 To 工廠_DGV.Rows.Count - 1
71
+                If e.RowIndex = i Then
72
+                    工廠_DGV.Rows(i).Cells("選擇").Value = True : ASS = 工廠_DGV.Rows(i).Cells("生產工廠").Value.ToString : Set_訂單清單()
73
+                Else
74
+                    工廠_DGV.Rows(i).Cells("選擇").Value = False
75
+                End If
76
+            Next
77
+        End If
56 78
     End Sub
57 79
     Private Sub Button11_Click(sender As Object, e As EventArgs) Handles Button11.Click
58
-        xlApp = CType(CreateObject("Excel.Application"), Application)
59
-        xlApp.Visible = True
60
-        xlApp.DisplayAlerts = True
61
-        xlApp.Application.WindowState = xlMaximized
62
-        xlBook = xlApp.Workbooks.Add
63
-        xlSheet = NewMethod(xlBook)
64
-        xlApp.Sheets(1).Select
65
-        xlBook.Activate() : xlSheet.Activate()
66
-        xlApp.Sheets(1).Name = "SK"
67
-        xlSheet.Range("A1").Select()
68
-
69
-        xlSheet.Cells(1, 13) = "淺藍色欄位為系統輸出,請勿做任何更改
80
+        If ASS <> "" Then
81
+            xlApp = CType(CreateObject("Excel.Application"), Application)
82
+            xlApp.Visible = True
83
+            xlApp.DisplayAlerts = True
84
+            xlApp.Application.WindowState = xlMaximized
85
+            xlBook = xlApp.Workbooks.Add
86
+            xlSheet = NewMethod(xlBook)
87
+            xlApp.Sheets(1).Select
88
+            xlBook.Activate() : xlSheet.Activate()
89
+            xlApp.Sheets(1).Name = ASS
90
+            xlSheet.Range("A1").Select()
91
+
92
+            xlSheet.Cells(1, 13) = "淺藍色欄位為系統輸出,請勿做任何更改
70 93
 淺綠色欄位為巨益辦公室填入"
71
-        xlSheet.Cells(2, 14) = "量產樣品" : xlSheet.Cells(2, 16) = "PRODUCTION"
72
-        xlSheet.Cells(3, 1) = "接單日" : xlSheet.Cells(3, 2) = "巨益PO#" : xlSheet.Cells(3, 3) = "客戶PO#" : xlSheet.Cells(3, 4) = "型體名稱"
73
-        xlSheet.Cells(3, 5) = "型體號碼" : xlSheet.Cells(3, 6) = "年份季度" : xlSheet.Cells(3, 7) = "楦型" : xlSheet.Cells(3, 8) = "顏色"
74
-        xlSheet.Cells(3, 9) = "訂單數" : xlSheet.Cells(3, 10) = "最後交期" : xlSheet.Cells(3, 11) = "BUYER" : xlSheet.Cells(3, 12) = "材質"
75
-        xlSheet.Cells(3, 13) = "東莞業務備註" : xlSheet.Cells(3, 14) = "手剪全套" : xlSheet.Cells(3, 15) = "斬刀全套"
76
-
77
-        xlSheet.Cells(3, 16) = "面料" : xlSheet.Cells(3, 17) = "副料" : xlSheet.Cells(3, 18) = "中底" : xlSheet.Cells(3, 19) = "鞋墊" : xlSheet.Cells(3, 20) = "大底"
78
-        xlSheet.Cells(3, 21) = "跟" : xlSheet.Cells(3, 22) = "包裝" : xlSheet.Cells(3, 23) = "裁斷" : xlSheet.Cells(3, 24) = "針車" : xlSheet.Cells(3, 25) = "成型"
79
-        xlSheet.Cells(3, 26) = "驗貨" : xlSheet.Cells(3, 27) = "驗貨結果" : xlSheet.Cells(3, 28) = "工廠備註"
80
-
81
-        For i As Integer = 0 To DataGridView1.Rows.Count - 1
82
-            xlSheet.Cells(i + 4, 1) = DataGridView1.Rows(i).Cells("接單日").Value : xlSheet.Cells(i + 4, 2) = DataGridView1.Rows(i).Cells("訂單流水號").Value
83
-            xlSheet.Cells(i + 4, 3) = DataGridView1.Rows(i).Cells("客戶訂單號").Value : xlSheet.Cells(i + 4, 4) = DataGridView1.Rows(i).Cells("型體名稱").Value
84
-            xlSheet.Cells(i + 4, 5) = DataGridView1.Rows(i).Cells("型體號碼").Value : xlSheet.Cells(i + 4, 6) = DataGridView1.Rows(i).Cells("年份季度").Value
85
-            xlSheet.Cells(i + 4, 7) = DataGridView1.Rows(i).Cells("楦型").Value : xlSheet.Cells(i + 4, 8) = DataGridView1.Rows(i).Cells("顏色").Value
86
-            xlSheet.Cells(i + 4, 9) = DataGridView1.Rows(i).Cells("訂單數量").Value : xlSheet.Cells(i + 4, 10) = DataGridView1.Rows(i).Cells("最後交期").Value
87
-
88
-            xlSheet.Cells(i + 4, 11) = DataGridView1.Rows(i).Cells("BUYER").Value
89
-            xlSheet.Cells(i + 4, 12) = DataGridView1.Rows(i).Cells("材質").Value
90
-            xlSheet.Cells(i + 4, 13) = DataGridView1.Rows(i).Cells("東莞業務備註").Value
91
-            xlSheet.Cells(i + 4, 14) = DataGridView1.Rows(i).Cells("手剪全套").Value
92
-            xlSheet.Cells(i + 4, 15) = DataGridView1.Rows(i).Cells("斬刀全套").Value
93
-
94
-            xlSheet.Cells(i + 4, 16) = DataGridView1.Rows(i).Cells("面料").Value : xlSheet.Cells(i + 4, 17) = DataGridView1.Rows(i).Cells("副料").Value
95
-            xlSheet.Cells(i + 4, 18) = DataGridView1.Rows(i).Cells("中底").Value : xlSheet.Cells(i + 4, 19) = DataGridView1.Rows(i).Cells("鞋墊").Value
96
-            xlSheet.Cells(i + 4, 20) = DataGridView1.Rows(i).Cells("大底").Value : xlSheet.Cells(i + 4, 21) = DataGridView1.Rows(i).Cells("跟").Value
97
-            xlSheet.Cells(i + 4, 22) = DataGridView1.Rows(i).Cells("包裝").Value : xlSheet.Cells(i + 4, 23) = DataGridView1.Rows(i).Cells("裁斷").Value
98
-            xlSheet.Cells(i + 4, 24) = DataGridView1.Rows(i).Cells("針車").Value : xlSheet.Cells(i + 4, 25) = DataGridView1.Rows(i).Cells("成形").Value
99
-            xlSheet.Cells(i + 4, 26) = DataGridView1.Rows(i).Cells("驗貨").Value : xlSheet.Cells(i + 4, 27) = DataGridView1.Rows(i).Cells("驗貨結果").Value
100
-            xlSheet.Cells(i + 4, 28) = DataGridView1.Rows(i).Cells("工廠備註").Value
101
-            With xlApp.Selection
102
-                .Font.Bold = True
103
-            End With
104
-            N1 = i
105
-        Next i
106
-
107
-        BB(xlApp, xlSheet)
108
-        xlSheet.Range("A4").Select()
109
-        If xlApp.Sheets(2).Name = "工作表1" Then
110
-            xlApp.Sheets("工作表1").Delete
94
+            xlSheet.Cells(2, 14) = "量產樣品" : xlSheet.Cells(2, 16) = "PRODUCTION"
95
+            xlSheet.Cells(3, 1) = "接單日" : xlSheet.Cells(3, 2) = "巨益PO#" : xlSheet.Cells(3, 3) = "客戶PO#" : xlSheet.Cells(3, 4) = "型體名稱"
96
+            xlSheet.Cells(3, 5) = "型體號碼" : xlSheet.Cells(3, 6) = "年份季度" : xlSheet.Cells(3, 7) = "楦型" : xlSheet.Cells(3, 8) = "顏色"
97
+            xlSheet.Cells(3, 9) = "訂單數" : xlSheet.Cells(3, 10) = "最後交期" : xlSheet.Cells(3, 11) = "BUYER" : xlSheet.Cells(3, 12) = "材質"
98
+            xlSheet.Cells(3, 13) = "東莞業務備註" : xlSheet.Cells(3, 14) = "手剪全套" : xlSheet.Cells(3, 15) = "斬刀全套"
99
+
100
+            xlSheet.Cells(3, 16) = "面料" : xlSheet.Cells(3, 17) = "副料" : xlSheet.Cells(3, 18) = "中底" : xlSheet.Cells(3, 19) = "鞋墊" : xlSheet.Cells(3, 20) = "大底"
101
+            xlSheet.Cells(3, 21) = "跟" : xlSheet.Cells(3, 22) = "包裝" : xlSheet.Cells(3, 23) = "裁斷" : xlSheet.Cells(3, 24) = "針車" : xlSheet.Cells(3, 25) = "成型"
102
+            xlSheet.Cells(3, 26) = "驗貨" : xlSheet.Cells(3, 27) = "驗貨結果" : xlSheet.Cells(3, 28) = "工廠備註"
103
+
104
+            For i As Integer = 0 To DataGridView1.Rows.Count - 1
105
+                xlSheet.Cells(i + 4, 1) = DataGridView1.Rows(i).Cells("接單日").Value : xlSheet.Cells(i + 4, 2) = DataGridView1.Rows(i).Cells("訂單流水號").Value
106
+                xlSheet.Cells(i + 4, 3) = DataGridView1.Rows(i).Cells("客戶訂單號").Value : xlSheet.Cells(i + 4, 4) = DataGridView1.Rows(i).Cells("型體名稱").Value
107
+                xlSheet.Cells(i + 4, 5) = DataGridView1.Rows(i).Cells("型體號碼").Value : xlSheet.Cells(i + 4, 6) = DataGridView1.Rows(i).Cells("年份季度").Value
108
+                xlSheet.Cells(i + 4, 7) = DataGridView1.Rows(i).Cells("楦型").Value : xlSheet.Cells(i + 4, 8) = DataGridView1.Rows(i).Cells("顏色").Value
109
+                xlSheet.Cells(i + 4, 9) = DataGridView1.Rows(i).Cells("訂單數量").Value : xlSheet.Cells(i + 4, 10) = DataGridView1.Rows(i).Cells("最後交期").Value
110
+
111
+                xlSheet.Cells(i + 4, 11) = DataGridView1.Rows(i).Cells("BUYER").Value
112
+                xlSheet.Cells(i + 4, 12) = DataGridView1.Rows(i).Cells("材質").Value
113
+                xlSheet.Cells(i + 4, 13) = DataGridView1.Rows(i).Cells("東莞業務備註").Value
114
+                xlSheet.Cells(i + 4, 14) = DataGridView1.Rows(i).Cells("手剪全套").Value
115
+                xlSheet.Cells(i + 4, 15) = DataGridView1.Rows(i).Cells("斬刀全套").Value
116
+
117
+                xlSheet.Cells(i + 4, 16) = DataGridView1.Rows(i).Cells("面料").Value : xlSheet.Cells(i + 4, 17) = DataGridView1.Rows(i).Cells("副料").Value
118
+                xlSheet.Cells(i + 4, 18) = DataGridView1.Rows(i).Cells("中底").Value : xlSheet.Cells(i + 4, 19) = DataGridView1.Rows(i).Cells("鞋墊").Value
119
+                xlSheet.Cells(i + 4, 20) = DataGridView1.Rows(i).Cells("大底").Value : xlSheet.Cells(i + 4, 21) = DataGridView1.Rows(i).Cells("跟").Value
120
+                xlSheet.Cells(i + 4, 22) = DataGridView1.Rows(i).Cells("包裝").Value : xlSheet.Cells(i + 4, 23) = DataGridView1.Rows(i).Cells("裁斷").Value
121
+                xlSheet.Cells(i + 4, 24) = DataGridView1.Rows(i).Cells("針車").Value : xlSheet.Cells(i + 4, 25) = DataGridView1.Rows(i).Cells("成形").Value
122
+                xlSheet.Cells(i + 4, 26) = DataGridView1.Rows(i).Cells("驗貨").Value : xlSheet.Cells(i + 4, 27) = DataGridView1.Rows(i).Cells("驗貨結果").Value
123
+                xlSheet.Cells(i + 4, 28) = DataGridView1.Rows(i).Cells("工廠備註").Value
124
+                With xlApp.Selection
125
+                    .Font.Bold = True
126
+                End With
127
+                N1 = i
128
+            Next i
129
+
130
+            BB(xlApp, xlSheet)
131
+            xlSheet.Range("A4").Select()
132
+            If xlApp.Sheets(2).Name = "工作表1" Then
133
+                xlApp.Sheets("工作表1").Delete
134
+            Else
135
+                xlApp.Sheets("sheet1").Delete
136
+            End If
137
+            xlSheet.Cells(1, 1) = "巨益 量產進度管理表"
138
+            xlSheet.PageSetup.PrintArea = ""
139
+            xlApp.Cells.Select()
140
+            xlApp.Application.WindowState = xlMinimized
141
+            MsgBox("列印完成")
142
+            Me.Close()
111 143
         Else
112
-            xlApp.Sheets("sheet1").Delete
144
+            MsgBox("請先選擇工廠")
113 145
         End If
114
-        xlSheet.Cells(1, 1) = "巨益 量產進度管理表"
115
-        xlSheet.PageSetup.PrintArea = ""
116
-        xlApp.Cells.Select()
117
-        xlApp.Application.WindowState = xlMinimized
118
-        MsgBox("列印完成")
119
-        Me.Close()
120 146
     End Sub
121 147
     Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
122 148
         Me.Close()

+ 1
- 1
SHENKANG-MES-SYS/量產訂單管理系統/列印_量產訂單控制表.Designer.vb Visa fil

@@ -587,7 +587,7 @@ Partial Class 列印_量產訂單控制表
587 587
         DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(192, Byte), Integer), CType(CType(255, Byte), Integer), CType(CType(192, Byte), Integer))
588 588
         Me.DataGridView1.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1
589 589
         Me.DataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
590
-        Me.DataGridView1.Location = New System.Drawing.Point(486, 167)
590
+        Me.DataGridView1.Location = New System.Drawing.Point(143, 193)
591 591
         Me.DataGridView1.Name = "DataGridView1"
592 592
         Me.DataGridView1.RowHeadersWidth = 5
593 593
         Me.DataGridView1.RowTemplate.Height = 24

Loading…
Avbryt
Spara