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

📄 plancjsc.frm

📁 一个机械产品(产品、部件、零件)的工时、工资及进度软件
💻 FRM
📖 第 1 页 / 共 2 页
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "comctl32.ocx"
Object = "{4F29B06F-16D9-4A0C-9C8A-2F0C02F625FE}#1.0#0"; "FlexCell.ocx"
Begin VB.Form plancjsc 
   Caption         =   "生产计划"
   ClientHeight    =   8505
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   11865
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   8505
   ScaleWidth      =   11865
   Begin FlexCell.Grid Grid1 
      Height          =   6975
      Left            =   60
      TabIndex        =   15
      Top             =   930
      Width           =   11775
      _ExtentX        =   20770
      _ExtentY        =   12303
      Cols            =   5
      Rows            =   30
   End
   Begin VB.TextBox txtrows 
      Alignment       =   1  'Right Justify
      Height          =   285
      Left            =   4680
      TabIndex        =   14
      Top             =   600
      Width           =   735
   End
   Begin ComctlLib.ProgressBar ProgressBar2 
      Height          =   255
      Left            =   660
      TabIndex        =   11
      Top             =   7920
      Width           =   11145
      _ExtentX        =   19659
      _ExtentY        =   450
      _Version        =   327682
      Appearance      =   1
   End
   Begin MSComctlLib.ProgressBar ProgressBar1 
      Height          =   270
      Left            =   660
      TabIndex        =   10
      Top             =   8220
      Width           =   11175
      _ExtentX        =   19711
      _ExtentY        =   476
      _Version        =   393216
      Appearance      =   1
   End
   Begin VB.CommandButton cmdexcel 
      Caption         =   "Excel导出"
      Height          =   315
      Left            =   9540
      TabIndex        =   9
      Top             =   540
      Width           =   1215
   End
   Begin VB.TextBox txtym 
      Height          =   285
      Left            =   3240
      TabIndex        =   8
      Top             =   120
      Width           =   975
   End
   Begin VB.ComboBox cmbcj 
      Height          =   315
      Left            =   6780
      Style           =   2  'Dropdown List
      TabIndex        =   2
      Top             =   540
      Width           =   1275
   End
   Begin VB.CommandButton cmdexit 
      Caption         =   "退出"
      Height          =   315
      Left            =   10920
      TabIndex        =   1
      Top             =   540
      Width           =   795
   End
   Begin VB.CommandButton cmdfind 
      Caption         =   "编排"
      Height          =   315
      Left            =   8340
      TabIndex        =   0
      Top             =   540
      Width           =   1035
   End
   Begin VB.Label Label1 
      Caption         =   "表格行数"
      Height          =   195
      Index           =   2
      Left            =   3840
      TabIndex        =   7
      Top             =   660
      Width           =   795
   End
   Begin VB.Label Label2 
      Caption         =   "当前进度"
      Height          =   195
      Index           =   1
      Left            =   -60
      TabIndex        =   13
      Top             =   7920
      Width           =   735
   End
   Begin VB.Label Label2 
      Caption         =   "总进度"
      Height          =   195
      Index           =   0
      Left            =   60
      TabIndex        =   12
      Top             =   8220
      Width           =   555
   End
   Begin VB.Label Label1 
      Caption         =   "车间生产计划表"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   315
      Index           =   0
      Left            =   4560
      TabIndex        =   6
      Top             =   60
      Width           =   2595
   End
   Begin VB.Line Line1 
      X1              =   3000
      X2              =   4440
      Y1              =   480
      Y2              =   480
   End
   Begin VB.Label Label1 
      Caption         =   "单位:小时、kg"
      Height          =   195
      Index           =   1
      Left            =   120
      TabIndex        =   5
      Top             =   660
      Width           =   1515
   End
   Begin VB.Label Label1 
      Caption         =   "车间名称"
      Height          =   195
      Index           =   4
      Left            =   6000
      TabIndex        =   4
      Top             =   600
      Width           =   795
   End
   Begin VB.Label Label3 
      Caption         =   "定额工时"
      ForeColor       =   &H000000FF&
      Height          =   195
      Index           =   0
      Left            =   120
      TabIndex        =   3
      Top             =   180
      Width           =   735
   End
End
Attribute VB_Name = "plancjsc"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'工时统计以工票日期为准
Option Explicit
Dim rsTempD As Recordset, rstempE As Recordset
Dim curyear As Integer, curmonth1 As Integer, curdate1 As String  '计划起始日(前月截止日)
Dim Gsdn As Currency, Tempgs As Currency '定额工时
Dim Igx As Integer         '工序数量
Dim mc(13) As String, gs(13) As Currency  '工序名称,定额工时数 数组变量,维数为ajdlj表的工序名称、工时数的字段数,现为12
Dim barcount As Integer, barvalue As Integer   ' 总进程条计数
Dim barcount2 As Integer, barvalue2 As Integer   ' 当前进程条计数
Dim subgs As Currency
Private Sub Form_Load()
    Me.Width = 12000
    Me.Height = 8350  '9000
    
    Grid1.AutoRedraw = False
    Grid1.DisplayFocusRect = False
    Grid1.Cols = 12
    Grid1.Rows = 2
    Grid1.FixedCols = 8
    Grid1.FixedRows = 2
   
    Grid1.Column(0).Width = 2
    Grid1.Column(1).Width = 20
    Grid1.Column(2).Width = 50
    Grid1.Column(3).Width = 70
    Grid1.Column(4).Width = 60
    Grid1.Column(5).Width = 80
    Grid1.Column(6).Width = 70
    Grid1.Column(7).Width = 70
    Grid1.Column(8).Width = 100
    Grid1.Column(9).Width = 40
    Grid1.Column(10).Width = 40
    Grid1.Column(11).Width = 55
    Grid1.Column(5).Alignment = cellLeftCenter
    Grid1.Column(6).Alignment = cellLeftCenter
    Grid1.Column(7).Alignment = cellLeftCenter
    Grid1.Column(8).Alignment = cellLeftCenter
    
    dogridfill
    Grid1.AutoRedraw = True
    Grid1.Refresh
    
    '填列车间
    Set rsTempA = oDb.Execute("select * from acj ")
    Do Until rsTempA.EOF
        cmbcj.AddItem rsTempA!cjmc
        rsTempA.MoveNext
    Loop
    cmbcj.ListIndex = 0
    
    txtym.Text = Left(NOWDate + 10, 4) & Mid(NOWDate + 10, 6, 2)
End Sub
Private Sub cmdfind_Click()
    If cmbcj.Text = "" Then
        MsgBox "车间必须选择!", vbOKOnly, "车间选择"
        Exit Sub
    End If
    answer = MsgBox("此过程数据量宠大,编制时间较长,确需继续码?", vbYesNo, "编制计划")
    If answer <> 6 Then Exit Sub
    
    plancjsc.Height = 9000
    
    frmwait.Show 0
    DoEvents
    
    dogridfill
    
     If Val(Mid(txtym.Text, 5, 2)) = 1 Then
        curyear = Left(txtym.Text, 4) - 1
        curmonth1 = 12
        Else
        curyear = Left(txtym.Text, 4)
        curmonth1 = Mid(txtym.Text, 5, 2) - 1
    End If
    curdate1 = curyear & "-" & Format(curmonth1, "00") & "-25"
    
    Screen.MousePointer = vbHourglass
    
    dofillgrid
    Screen.MousePointer = vbDefault
    plancjsc.Height = 8350
    Unload frmwait
End Sub
Private Sub dofillgrid()
     '取得工序表agx中所选车间的工序数,以设置表格的列数,并填列
    Set rsTempC = oDb.Execute("select * from agx where gxtj='Y' and gxcj='" & cmbcj.Text & "' order by gxbh")
    rsTempC.MoveLast
    Igx = rsTempC.RecordCount
    rsTempC.MoveFirst
    
    Grid1.Rows = 2
    Grid1.Cols = 12
    Grid1.Cols = 12 + Igx * 2 + 1  '列数
    

⌨️ 快捷键说明

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