⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmbillmanage.frm

📁 自己写的物流管理系统
💻 FRM
📖 第 1 页 / 共 5 页
字号:
                        .Cell(1, 2).Range.Text = sys.StrToText(rs("CARNUM"))
                        .Cell(1, 3).Width = 80
                        .Cell(1, 3).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(1, 3).Range.Text = "品名:"
                        .Cell(1, 4).Width = 133
                        .Cell(1, 4).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        inum = 0
                        isfind = False
                        For inum = 0 To UBound(arrProduct, 2)
                                If arrProduct(0, inum) = sys.TextTolong(rs("PRODUCTNAME")) Then
                                    .Cell(1, 4).Range.Text = sys.StrToText(arrProduct(1, inum))
                                    isfind = True
                                    Exit For
                                End If
                        Next
                        If isfind = False Then
                            .Cell(1, 4).Range.Text = ""
                        End If
                        .Cell(2, 1).Width = 80
                        .Cell(2, 1).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(2, 1).Range.Text = "发货人"
                        .Cell(2, 2).Width = 133
                        .Cell(2, 2).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        inum = 0
                        isfind = False
                        For inum = 0 To UBound(arrclient, 2)
                                If arrclient(0, inum) = sys.TextTolong(rs("SENDER")) Then
                                    .Cell(2, 2).Range.Text = sys.StrToText(arrclient(1, inum))
                                    isfind = True
                                    Exit For
                                End If
                        Next
                        If isfind = False Then
                            .Cell(2, 2).Range.Text = ""
                        End If
                        .Cell(2, 3).Width = 80
                        .Cell(2, 3).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(2, 3).Range.Text = "收货人:"
                        .Cell(2, 4).Width = 133
                        .Cell(2, 4).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        inum = 0
                        isfind = False
                        For inum = 0 To UBound(arrclient, 2)
                                If arrclient(0, inum) = sys.TextTolong(rs("RECEIVER")) Then
                                    .Cell(2, 4).Range.Text = sys.StrToText(arrclient(1, inum))
                                    isfind = True
                                    Exit For
                                End If
                        Next
                        If isfind = False Then
                            .Cell(2, 4).Range.Text = ""
                        End If
                        .Cell(3, 1).Width = 80
                        .Cell(3, 1).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(3, 1).Range.Text = "国铁运费:"
                        .Cell(3, 2).Width = 133
                        .Cell(3, 2).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        If Not IsNull(rs("BASICCARRIAGE")) Then
                            .Cell(3, 2).Range.Text = sys.StrToText(rs("BASICCARRIAGE"))
                        Else
                            .Cell(3, 2).Range.Text = "-"
                        End If
                        .Cell(3, 3).Width = 80
                        .Cell(3, 3).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(3, 3).Range.Text = "地铁运费:"
                        .Cell(3, 4).Width = 133
                        .Cell(3, 4).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        If Not IsNull(rs("LOCALCARRIAGE")) Then
                            .Cell(3, 4).Range.Text = sys.StrToText(rs("LOCALCARRIAGE"))
                        Else
                            .Cell(3, 4).Range.Text = "-"
                        End If
                        .Cell(4, 1).Width = 80
                        .Cell(4, 1).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(4, 1).Range.Text = "服务费:"
                        .Cell(4, 2).Width = 133
                        .Cell(4, 2).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        If Not IsNull(rs("SERVECHARGE")) Then
                            .Cell(4, 2).Range.Text = sys.StrToText(rs("SERVECHARGE"))
                        Else
                            .Cell(4, 2).Range.Text = "-"
                        End If
                        .Cell(4, 3).Width = 80
                        .Cell(4, 3).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(4, 3).Range.Text = "装卸费:"
                        .Cell(4, 4).Width = 133
                        .Cell(4, 4).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        If Not IsNull(rs("LOADCHARGE")) Then
                         .Cell(4, 4).Range.Text = sys.StrToText(rs("LOADCHARGE"))
                        Else
                            .Cell(4, 4).Range.Text = "-"
                        End If
                        .Cell(5, 1).Width = 80
                        .Cell(5, 1).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(5, 1).Range.Text = "短途运费:"
                        .Cell(5, 2).Width = 133
                        .Cell(5, 2).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        If Not IsNull(rs("SHORTCARRIAGE")) Then
                            .Cell(5, 2).Range.Text = sys.StrToText(rs("SHORTCARRIAGE"))
                        Else
                            .Cell(5, 2).Range.Text = "-"
                        End If
                        .Cell(5, 3).Width = 80
                        .Cell(5, 3).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(5, 3).Range.Text = "仓储费:"
                        .Cell(5, 4).Width = 133
                        .Cell(5, 4).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        If Not IsNull(rs("STORAGECHARGE")) Then
                            .Cell(5, 4).Range.Text = sys.StrToText(rs("STORAGECHARGE"))
                        Else
                            .Cell(5, 4).Range.Text = "-"
                        End If
                        .Cell(6, 1).Width = 80
                        .Cell(6, 1).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(6, 1).Range.Text = "清扫费:"
                        .Cell(6, 2).Width = 133
                        .Cell(6, 2).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        If Not IsNull(rs("CLEARCHARGE")) Then
                            .Cell(6, 2).Range.Text = sys.StrToText(rs("CLEARCHARGE"))
                        Else
                            .Cell(6, 2).Range.Text = "-"
                        End If
                        .Cell(6, 3).Width = 80
                        .Cell(6, 3).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(6, 3).Range.Text = "优惠金额:"
                        .Cell(6, 4).Width = 133
                        .Cell(6, 4).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        If Not IsNull(rs("FAVOURABILE")) Then
                            .Cell(6, 4).Range.Text = sys.StrToText(rs("FAVOURABILE"))
                        Else
                            .Cell(6, 4).Range.Text = "-"
                        End If
                        .Cell(7, 1).Width = 80
                        .Cell(7, 1).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(7, 1).Range.Text = "单价:"
                        .Cell(7, 2).Width = 133
                        .Cell(7, 2).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        If (IsNumeric(rs("TOTAL"))) And (IsNumeric(rs("WEIGHT"))) Then
                            .Cell(7, 2).Range.Text = sys.StrToText(FormatNumber(rs("TOTAL") / rs("WEIGHT"), 2))
                        Else
                            .Cell(7, 2).Range.Text = "-"
                        End If
                        .Cell(7, 3).Width = 80
                        .Cell(7, 3).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(7, 3).Range.Text = "运费合计:"
                        .Cell(7, 4).Width = 133
                        .Cell(7, 4).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        If Not IsNull(rs("TOTAL")) Then
                            .Cell(7, 4).Range.Text = sys.StrToText(rs("TOTAL")) & "元"
                        Else
                            .Cell(7, 4).Range.Text = "-"
                        End If
                    End With
                    .MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
                    .MoveDown Unit:=wdLine, Count:=7
                    .TypeText Text:="备注: "
                    .TypeParagraph
                    .TypeParagraph
                    .ParagraphFormat.Alignment = wdAlignParagraphRight
                    .TypeText Text:="宜春市金胜物流有限公司 "
                    .TypeParagraph
                    .TypeText Text:=sys.StrToText(Year(Date)) & " 年 " & sys.StrToText(Month(Date)) & " 月" & sys.StrToText(Day(Date)) & " 日"
                    .TypeParagraph
                    .TypeParagraph
                    .TypeParagraph
                    .TypeText Text:="---------------------------------------------------------------------"
                    .TypeParagraph
                    .TypeParagraph
                    .TypeParagraph
                    .ParagraphFormat.Alignment = wdAlignParagraphRight
                    .Paragraphs.Last.Range.Font.Name = "楷体_GB2312"
                    .Paragraphs.Last.Range.Font.Bold = False
                    .Paragraphs.Last.Range.Font.Size = 10
                    .TypeText Text:="第二联:客户联"
                    .TypeParagraph
                    .TypeParagraph
                    .TypeParagraph
                    .ParagraphFormat.Alignment = wdAlignParagraphCenter
                    .Paragraphs.Last.Range.Font.Bold = True
                    .Paragraphs.Last.Range.Font.Size = 20
                    .TypeText Text:="运  输  结  算  单"
                    .TypeParagraph
                    .ParagraphFormat.Alignment = wdAlignParagraphLeft
                    .Paragraphs.Last.Range.Font.Bold = False
                    .Paragraphs.Last.Range.Font.Size = 12
                    '客户
                    inum = 0
                    isfind = False
                    strTemp = ""
                    For inum = 0 To UBound(arrclient, 2)
                            If arrclient(0, inum) = sys.TextTolong(rs("SENDER")) Then
                                strTemp = strTemp & "客户名称:" & sys.StrToText(arrclient(1, inum)) & "                          发货日期:" & sys.StrToText(rs("DATENUM"))
                                isfind = True
                                Exit For
                            End If
                    Next
                    If isfind = False Then
                        strTemp = strTemp & "客户名称:                        " & "                          发货日期:" & sys.StrToText(rs("DATENUM"))
                    End If
                    .TypeText Text:=strTemp
                    .TypeParagraph
                    '发站
                    inum = 0
                    isfind = False
                    strTemp = ""
                    For inum = 0 To UBound(arrstation, 2)
                            If arrstation(0, inum) = sys.TextTolong(rs("SENDSTATION")) Then
                                strTemp = strTemp & "发站:" & arrstation(1, inum) & "        "
                                isfind = True
                                Exit For
                            End If
                    Next
                    If isfind = False Then
                        strTemp = strTemp & "发站:        "
                    End If
                    '到站
                    inum = 0
                    isfind = False
                    For inum = 0 To UBound(arrstation, 2)
                            If arrstation(0, inum) = sys.TextTolong(rs("RECEIVESTATION")) Then
                                strTemp = strTemp & "到站:" & arrstation(1, inum) & "                        重量:" & sys.StrToText(rs("WEIGHT")) & "吨"
                                isfind = True
                                Exit For
                            End If
                    Next
                    If isfind = False Then
                        strTemp = strTemp & "到站 :                       重量:" & sys.StrToText(rs("WEIGHT")) & "吨"
                    End If
                    .TypeText Text:=strTemp
                    .TypeParagraph
                    .Tables.Add Range:=.Range, NumRows:=7, NumColumns:=4, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:=wdAutoFitFixed
                    Set oTable = .Tables(1)
                    With oTable
                        .Cell(1, 1).Width = 80
                        .Cell(1, 1).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(1, 1).Range.Text = "车号:"
                        .Cell(1, 2).Width = 133
                        .Cell(1, 2).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        .Cell(1, 2).Range.Text = sys.StrToText(rs("CARNUM"))
                        .Cell(1, 3).Width = 80
                        .Cell(1, 3).Range.Paragraphs.Alignment = wdAlignParagraphLeft
                        .Cell(1, 3).Range.Text = "品名:"
                        .Cell(1, 4).Width = 133
                        .Cell(1, 4).Range.Paragraphs.Alignment = wdAlignParagraphCenter
                        inum = 0
                        isfind = False
                        For inum = 0 To UBound(arrProduct, 2)
                                If arrProduct(0, inum) = sys.TextTolong(rs("PRODUCTNAME")) Then
                                    .Cell(1, 4).Range.Text = sys.StrToText(arrProduct(1, inum))
                                    isfind = True
                                    Exit For

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -