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

📄 frmproductionsummary.frm

📁 企业ERP系统 采用VB+SQL2000实现。 有客户合约
💻 FRM
📖 第 1 页 / 共 3 页
字号:
               Height          =   255
               Index           =   1
               Left            =   1020
               TabIndex        =   23
               Top             =   1080
               Width           =   1035
            End
            Begin VB.Label Label3 
               BackColor       =   &H00FFFFFF&
               Caption         =   "加工單編號"
               Height          =   255
               Index           =   4
               Left            =   1020
               TabIndex        =   22
               Top             =   240
               Width           =   1035
            End
            Begin VB.Label Label1 
               BackColor       =   &H00FFFFFF&
               Caption         =   "下單日期"
               Height          =   315
               Left            =   1020
               TabIndex        =   21
               Top             =   2040
               Width           =   915
            End
            Begin VB.Label Label4 
               BackColor       =   &H00FFFFFF&
               Caption         =   "交期"
               Height          =   195
               Left            =   1020
               TabIndex        =   20
               Top             =   2520
               Width           =   915
            End
            Begin VB.Label Label5 
               BackColor       =   &H00FFFFFF&
               Caption         =   "下单公司"
               Height          =   315
               Left            =   5580
               TabIndex        =   19
               Top             =   240
               Width           =   915
            End
            Begin VB.Label Label6 
               BackColor       =   &H00FFFFFF&
               Caption         =   "业务员"
               Height          =   255
               Left            =   5580
               TabIndex        =   18
               Top             =   660
               Width           =   915
            End
            Begin VB.Label Label7 
               BackColor       =   &H00FFFFFF&
               Caption         =   "布號"
               Height          =   375
               Left            =   5580
               TabIndex        =   17
               Top             =   1080
               Width           =   915
            End
            Begin VB.Label Label13 
               BackColor       =   &H00FFFFFF&
               Caption         =   "至"
               Height          =   255
               Left            =   5640
               TabIndex        =   16
               Top             =   2640
               Width           =   255
            End
         End
         Begin MSHierarchicalFlexGridLib.MSHFlexGrid MSHF1 
            Height          =   8175
            Left            =   120
            TabIndex        =   2
            Top             =   180
            Width           =   14775
            _ExtentX        =   26061
            _ExtentY        =   14420
            _Version        =   393216
            AllowUserResizing=   1
            _NumberOfBands  =   1
            _Band(0).Cols   =   2
         End
      End
   End
End
Attribute VB_Name = "frmProductionSummary"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim lngrow As Long
Private Sub ActiveBar21_ToolClick(ByVal Tool As ActiveBar2LibraryCtl.Tool)
     Select Case Tool.Name
        Case "cmdAdd":
            frmProductionSummaryInfo.newItem = True
            frmProductionSummaryInfo.Show vbModal
        Case "cmdDel":
            DelOperatorInf
        Case "cmdCancel":
            Unload Me
'        Case "cmdEdit":
'            EditOperatorInf
        Case "cmdFind"
            fraFind.Visible = True
'        Case "cmdView":
'            frmProductionProgress.FillMshf1 ("select * from tBusinessOrderSub a, (select distinct Delivery,orderno,FoundDate from tBusinessOrder where FoundDate='" & MSHF1.TextMatrix(lngrow, 1) & "') b where a.orderno=b.orderno")
'            frmProductionProgress.Show
'            Unload Me
        Case "cmdRefurbish":
             FillMshf1 ("select * from tBusinessOrder a ,(select orderno,Labdip,LateDate,Composition,LayoutColor,ReportDate,SuppliersName,EmbryoAmount,ProductionState,ProductionQuantity,season,UlkColor,UlkQuality,UlkLayout,Report,MtlResult,Price,ShipmentsAmount from tBusinessOrderSub) b where a.orderno=b.orderno")
'        Case "cmdPrint"
'             Call PrintEmbryoContract
        Case "cmdExport":
            Dim strFile As String
            frmMain.CDFile.ShowOpen
            strFile = frmMain.CDFile.FileName
            If strFile = "" Then Exit Sub
            ExportExcel MSHF1, strFile
       End Select
End Sub
Private Sub PrintEmbryoContract()
'    If lngRow = 1 Then
'       MsgBox "請選擇合約!", vbInformation + vbOKOnly, "提示"
'       Exit Sub
'    End If
'   Dim rs As ADODB.Recordset
'   Set rs = New ADODB.Recordset
'   Dim strSql As String
'    With rs
'      .CursorLocation = adUseClient
'      .CursorType = adOpenDynamic
'      .LockType = adLockOptimistic
'      Set .ActiveConnection = cn
'    End With
'    strSql = "select * from tBusinessOrder as a,tBasicFabric as b "
'    strSql = strSql & "where a.id=" & MSHF1.TextMatrix(lngRow, 24)
'    strSql = strSql & "and a.FabricCode='" & MSHF1.TextMatrix(lngRow, 7) & "' and b.FabricCode='" & MSHF1.TextMatrix(lngRow, 7) & "'"
'    rs.Open strSql
'   With BillEmbryoContract
'       .EmbryoContractNo.SetText (rs.Fields!EmbryoContractNo)
'       .FoundDate.SetText (rs.Fields!FoundDate)
'       .SuppliersName.SetText (rs.Fields!SuppliersName)
'       .Linkman.SetText (rs.Fields!Linkman)
'       .Operation.SetText (rs.Fields!Operation)
'       .FabricName.SetText (rs.Fields!FabricName)
'       .Composition.SetText (rs.Fields!Composition)
'       .fWidth.SetText (MSHF1.TextMatrix(lngRow, 10))
' '      .fWidth.SetText (rs.Fields("tBusinessOrder.width"))
'       .FabricCode.SetText (rs.Fields!FabricCode)
'       .Price.SetText (rs.Fields!Price)
'       .Delivery.SetText (rs.Fields!Delivery)
'       .Remark.SetText (rs.Fields!Remark)
'       .Amount.SetText (rs.Fields!Amount)
'   End With
'    rs.Close
'    Set rs = Nothing
'    frmReportEmbryoContract.Show vbModal
End Sub
Private Function FormatQuery() As String
    FormatQuery = "select * from tBusinessOrder a ,(select orderno,Labdip,LateDate,Composition,LayoutColor,ReportDate,SuppliersName,EmbryoAmount,ProductionState,ProductionQuantity,season,UlkColor,UlkQuality,UlkLayout,Report,MtlResult,Price,ShipmentsAmount from tBusinessOrderSub) b where a.orderno=b.orderno"
    If Trim$(txtOrderNo.Text) <> "" Then
        FormatQuery = FormatQuery & " and a.orderNo='" & txtOrderNo & "'"
    End If
    If Trim$(txtFabricNo) <> "" Then
        FormatQuery = FormatQuery & " and FabricNo" & objDatabase.FormatLikeSQL(txtFabricNo)
    End If
    If chkdelivery.Value = vbChecked Then
        FormatQuery = FormatQuery & " and Delivery >= '" & FormatDateStr(Delivery.Value, "long") & "'"
        FormatQuery = FormatQuery & " and Delivery <= '" & FormatDateStr(EndDelivery.Value, "long") & "'"
    End If
    If chkFoundDate.Value = vbChecked Then
        FormatQuery = FormatQuery & " and FoundDate >= '" & FormatDateStr(Founddate.Value, "long") & "'"
        FormatQuery = FormatQuery & " and FoundDate <= '" & FormatDateStr(EndFounddate.Value, "long") & "'"
    End If
    If Trim$(txtCompanyName) <> "" Then
        FormatQuery = FormatQuery & " and CompanyName" & objDatabase.FormatLikeSQL(txtCompanyName)
    End If
    If Trim$(txtIssuer) <> "" Then
        FormatQuery = FormatQuery & " and Issuer" & objDatabase.FormatLikeSQL(txtIssuer)
    End If
    If Trim$(txtOperation) <> "" Then
        FormatQuery = FormatQuery & " and Operation" & objDatabase.FormatLikeSQL(txtOperation)
    End If
    If Trim$(txtFabricName) <> "" Then
        FormatQuery = FormatQuery & " and FabricName" & objDatabase.FormatLikeSQL(txtFabricName)
    End If
    If Trim$(txtFactoryName) <> "" Then
        FormatQuery = FormatQuery & " and FactoryName" & objDatabase.FormatLikeSQL(txtFactoryName)
    End If
    If Trim$(txtSeason) <> "" Then
        FormatQuery = FormatQuery & " and Season" & objDatabase.FormatLikeSQL(txtSeason)
    End If
End Function

Private Sub cmdCancel_Click()
     fraFind.Visible = False
End Sub

Private Sub CmdFabric_Click()
    frmFabricSelect.Show vbModal
    GetFabricInfo frmFabricSelect.FabricCode
End Sub
Private Sub GetFabricInfo(FabricNo As String)
        Dim rs As ADODB.Recordset
    On Error GoTo errLabel
    Set rs = New ADODB.Recordset
    With rs
      .CursorLocation = adUseClient
      .CursorType = adOpenDynamic
      .LockType = adLockOptimistic
      Set .ActiveConnection = Cn
    End With
    rs.Open "select * from tBasicProduct where FabricCode=" & objDatabase.FormatSQL(FabricNo)
        If Not rs.EOF Then
            txtFabricName = NullValue(rs.Fields!FabricName)
            txtFabricNo = NullValue(rs.Fields!FabricCode)
        End If
    rs.Close

remClear:
    Set rs = Nothing
    Exit Sub
errLabel:
    objDatabase.DatabaseError
    GoTo remClear
End Sub

'Private Sub CmdConfirm_Click()
'    frmProductionProgress.FillMshf1 ("select * from tBusinessOrderSub a, (select distinct Delivery,orderno,FoundDate from tBusinessOrder where FoundDate>='" & DtpFoundDate & "' and Founddate <='" & EndDtpFounddate & "') b where a.orderno=b.orderno")
'    frmProductionProgress.Show
'    frnView.Visible = False
'    Unload Me
'End Sub

Private Sub CmdFind_Click()
     FillMshf1 FormatQuery
     fraFind.Visible = False
End Sub

Private Sub cmdFindAll_Click()
   FillMshf1 ("select * from tBusinessOrder a ,(select * from tBusinessOrderSub) b where a.orderno=b.orderno")
   fraFind.Visible = False
End Sub

'Private Sub CmdReset_Click()
'    frnView.Visible = False
'End Sub

Private Sub Form_Load()
'设置窗口大小
    FormInit Me, True
    SetObjectWH Frame1
    SetObjectWH MSHF1
    FillMshf1 ("select * from tBusinessOrder a ,(select orderno,Labdip,LateDate,Composition,LayoutColor,ReportDate,SuppliersName,EmbryoAmount,ProductionState,ProductionQuantity,season,UlkColor,UlkQuality,UlkLayout,Report,MtlResult,Price,ShipmentsAmount from tBusinessOrderSub) b where a.orderno=b.orderno")
    ActiveBar21.Bands("toolbar").Tools.item("cmdDel").Enabled = False
    ActiveBar21.Bands("toolbar").Tools.item("cmdEdit").Enabled = False
    ActiveBar21.Bands("toolbar").Tools.item("cmdView").Enabled = False
    Initcbb txtOrderNo, "OrderNo", "tBusinessOrderSub"
    Initcbb txtSeason, "Season", "tBusinessOrderSub"
    Initcbb txtFactoryName, "FactoryName", "tBusinessOrderSub"
    InitTitle
    HookWheel Me.hwnd
End Sub

⌨️ 快捷键说明

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