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

📄 yy_khth_bs.frm

📁 基于SQL2000的企业管理MRPII,包含进销存,财务,报关等组件,VB6开发,带文档说明.
💻 FRM
📖 第 1 页 / 共 4 页
字号:
   Begin MSAdodcLib.Adodc ADO_cP_cx 
      Height          =   495
      Left            =   3630
      Top             =   810
      Width           =   2535
      _ExtentX        =   4471
      _ExtentY        =   873
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Ado_CP_cx"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSAdodcLib.Adodc Ado_sc_kc 
      Height          =   375
      Left            =   720
      Top             =   3690
      Width           =   1695
      _ExtentX        =   2990
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Ado_sc_kc"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label1 
      Caption         =   "数量总计:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   4
      Left            =   9210
      TabIndex        =   21
      Top             =   6435
      Width           =   1185
   End
   Begin VB.Label Label1 
      Caption         =   "总计金额:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   5
      Left            =   2880
      TabIndex        =   20
      Top             =   6405
      Width           =   1155
   End
   Begin VB.Label Label1 
      Caption         =   "导入客户退货单:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   11.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   3
      Left            =   8070
      TabIndex        =   19
      Top             =   1590
      Width           =   1905
   End
End
Attribute VB_Name = "YY_khth_BS"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'*****************************************************************************************
'*            曹汉华   2004.6.17 编写       汇能科技开发有限公司           *
'*****************************************************************************************
Dim hla, DdBh_Ado, Combo6_Data, Combo7_data, Combo8, Dr_ShD As Recordset
Dim N As Long
Dim Sh_Zj, th_Ys As Double
Dim Sh_TJ As Recordset
Dim Tjbz As Boolean

Private Sub CMd_Find_Click()
On Error Resume Next
Set CX_FrM_SjY = YY_khth_BS.AdoprimaryRs
CX_SJy = "select * from yy_cpshdt where not khbh is null and left(shdbh,2)<>'SH'"
With SEC_Dialog
  .Combo1(0).Clear
  .Combo1(1).Clear
  .Combo1(0).AddItem ("khbh(客户编号)")
  .Combo1(1).AddItem ("khbh(客户编号)")
  .Combo1(0).AddItem ("khmc(客户名称)")
  .Combo1(1).AddItem ("khmc(客户名称)")
  .Combo1(0).AddItem ("shdbh(送货单编号)")
  .Combo1(1).AddItem ("shdbh(送货单编号)")
End With
Load SEC_Dialog
SEC_Dialog.Show 1
End Sub

Private Sub CmD_SH_Click()
 Dim Sh_Dh As String
 Sh_Dh = Text1(0).Text
 DB.Execute "update yy_cpshdt set sh = '已审' where shdbh='" & Text1(0).Text & "'"
 AdoprimaryRs.Recordset.Requery
 AdoprimaryRs.Recordset.Find ("shdbh='" & Sh_Dh & "'")
End Sub

Private Sub cmdnext_Click() '向后
On Error GoTo GoNextError
  If Not AdoprimaryRs.Recordset.EOF Then AdoprimaryRs.Recordset.MoveNext
  If AdoprimaryRs.Recordset.EOF And AdoprimaryRs.Recordset.RecordCount > 0 Then
    Beep
    AdoprimaryRs.Recordset.MoveLast
  End If
  Exit Sub
GoNextError:
  MsgBox Err.Description
End Sub
Private Sub CmdPrint_Click()
If Trim(Text1(0).Text) = "" Then
Exit Sub
Else
yy_sh_rpt.L_HzJe.Caption = HZJe(Val(Text1(5).Text)) + "(大写金额)"
yy_sh_rpt.DataControl1.ConnectionString = Conn_Str
yy_sh_rpt.DataControl1.Source = "select yy_cpshdt.*,yy_cpshd.* from yy_cpshd inner join yy_cpshdt on yy_cpshd.shdbh=yy_cpshdt.shdbh where yy_cpshd.shdbh='" & Text1(0).Text & "'"
yy_sh_rpt.Show VBRUN.FormShowConstants.vbModal
End If
End Sub
Private Sub Cmdqd_Click() '首端
  If AdoprimaryRs.Recordset.RecordCount > 0 Then
  If AdoprimaryRs.BOFAction = False Then
  AdoprimaryRs.Recordset.MoveFirst
  Else
  AdoprimaryRs.Recordset.MoveNext
  End If
  Else
  Exit Sub
  End If
  End Sub
Private Sub Cmdreturn_Click()
 Unload Me
End Sub

Private Sub cmdxq_Click() '向前
  On Error GoTo GoPrevError
  If Not AdoprimaryRs.Recordset.BOF Then AdoprimaryRs.Recordset.MovePrevious
  If AdoprimaryRs.Recordset.BOF And AdoprimaryRs.Recordset.RecordCount > 0 Then
    Beep
    AdoprimaryRs.Recordset.MoveFirst
  End If
  
  Exit Sub
GoPrevError:
  MsgBox Err.Description
End Sub

Private Sub cmdmd_Click() '末端
 If AdoprimaryRs.Recordset.RecordCount > 0 Then
 If AdoprimaryRs.Recordset.EOF = False Then
    AdoprimaryRs.Recordset.MoveLast
    Else
    AdoprimaryRs.Recordset.MovePrevious
 End If
 Else
 Exit Sub
 End If
End Sub
Private Sub Combo_Click(Index As Integer)
'On Error Resume Next
If Cmdadd.Enabled = False Then
If Index = 0 Then
Set hla = New Recordset
hla.Open "select distinct * from yy_khzl where khbh='" & Trim(Combo(0).Text) & "' and (khbh<>'' or khbh is null)", DB, adOpenStatic, adLockOptimistic
Text1(2).Text = hla!KHMc
Text1(3).Text = hla!Phone
Text1(4).Text = Trim(hla!bizh)
AdoprimaryRs.Recordset.Fields("hl").Value = hla!hl
AdoprimaryRs.Recordset.Fields("shdz").Value = hla!dizhi
Call Shd_Dr
End If
End If
If Index = 2 Then '导入退货记录
Set Dr_ShD = New Recordset
Dr_ShD.Open "select * FROM yy_khth where thdh='" & Trim(Combo(2).Text) & "'and (wanch is null or wanch='' OR WANCH='未完成')", DB, adOpenStatic, adLockReadOnly
If Dr_ShD.RecordCount > 0 Then
   Dr_ShD.MoveFirst
   For i = 1 To Dr_ShD.RecordCount
    Set Sh_TJ = New Recordset
    Sh_TJ.Open "select sum(isnull(sl,0)) as shsl from yy_cpshd where khbh='" & Dr_ShD!khbh & "' and ddbh='" & Dr_ShD.Fields("ddbh").Value & "' and cpbh='" & Dr_ShD.Fields("cpbh").Value & "' and cpmc='" & Dr_ShD.Fields("cpmc").Value & "' and gg='" & Dr_ShD.Fields("gg").Value & "'AND yanse='" & Dr_ShD.Fields("yanse").Value & "' and caizh='" & Dr_ShD.Fields("caizh").Value & "'", DB, adOpenStatic
    If Sh_TJ.RecordCount > 0 Then
       Sh_TJ.MoveFirst
       If Not IsNull(Sh_TJ!shsl) Then
       Sh_Zj = Sh_TJ!shsl
       Else
       Sh_Zj = 0
       End If
    End If
    Set Sh_TJ = New Recordset
    Sh_TJ.Open "select sum(isnull(sl,0)) as shsl from yy_cpshd where thdh='" & Dr_ShD!thdh & "' and khbh='" & Dr_ShD!khbh & "' and ddbh='" & Dr_ShD.Fields("ddbh").Value & "' and cpbh='" & Dr_ShD.Fields("cpbh").Value & "' and cpmc='" & Dr_ShD.Fields("cpmc").Value & "' and gg='" & Dr_ShD.Fields("gg").Value & "'AND yanse='" & Dr_ShD.Fields("yanse").Value & "' and caizh='" & Dr_ShD.Fields("caizh").Value & "'", DB, adOpenStatic
    If Sh_TJ.RecordCount > 0 Then
       Sh_TJ.MoveFirst
       If Not IsNull(Sh_TJ!shsl) Then
       th_Ys = Sh_TJ!shsl
       Else
       th_Ys = 0
       End If
    End If
    DB.Execute "insert into yy_cpshd(shdbh,cpbh,cpmc,cplb,khlh,caizh,yanse,dj,xc,ddbh,khbh,sl,ddsl,shsl,dw,htbh,hybh,djrq,gg,bacp,thdh,thsl,th_ys) values('" & Text1(0).Text & "','" & Dr_ShD.Fields("cpbh").Value & "','" & Dr_ShD.Fields("cpmc").Value & "','" & Dr_ShD.Fields("cplb").Value & "','" & Dr_ShD.Fields("khlh").Value & "','" & Dr_ShD.Fields("caizh").Value & "'" & _
             ",'" & Dr_ShD.Fields("yanse").Value & "','" & Dr_ShD.Fields("dj").Value & "','" & Dr_ShD.Fields("xc").Value & "','" & Dr_ShD.Fields("ddbh").Value & "','" & Dr_ShD.Fields("khbh").Value & "',0,'" & Dr_ShD.Fields("ddsl").Value & "'," & Sh_Zj & ",'" & Dr_ShD.Fields("dw").Value & "','" & Dr_ShD.Fields("htbh").Value & "','" & Dr_ShD.Fields("hybh").Value & "','" & CVDate(Text1(1).Text) & "','" & Dr_ShD.Fields("gg").Value & "','" & Dr_ShD.Fields("bacp").Value & "','" & Dr_ShD.Fields("thdh").Value & "','" & Dr_ShD.Fields("sl").Value & "'," & th_Ys & ")"
    Dr_ShD.MoveNext
   Next i
End If
Adodc_body_general.Recordset.Requery
'Call cmdOK_Click
'Call Shd_Dr
'Call cmdEdit_Click
End If
End Sub
Private Sub combo_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = 13 Then    ' 按回车
      KeyAscii = 0
      SendKeys "{TAB}"
End If
End Sub

Private Sub DTPicker1_Change()
If Check1.Value = 0 Then
AdoprimaryRs.ConnectionString = Conn_Str
AdoprimaryRs.RecordSource = "SELECT * FROM yy_cpshdt WHERE left(shdbh,2)<>'SH' and YEAR(djRQ)='" & DTPicker1.Year & "' AND MONTH(djRQ)='" & DTPicker1.Month & "' ORDER BY shdbh"
Else
AdoprimaryRs.ConnectionString = Conn_Str
AdoprimaryRs.RecordSource = "SELECT * FROM yy_cpshdt WHERE left(shdbh,2)<>'SH' and djRQ='" & DTPicker1.Value & "' order BY shdbh"
End If
AdoprimaryRs.Refresh
End Sub

Private Sub Form_Load() '载入数据
  Me.Width = main_FRM.Picture1.Width - 30
  Me.Top = main_FRM.ActiveBar21.Bands("Band7").Height * 2.5 - 65
  Me.Height = main_FRM.Picture1.Height - 300
  Me.Left = main_FRM.Picture1.Left + 15
  Call Cob_Load
  Me.DTPicker1.Value = VBA.Date
  If SH_Right = True Then
    CmD_SH.Visible = True
    Else
    CmD_SH.Visible = False
  End If
  AdoprimaryRs.ConnectionString = Conn_Str
  AdoprimaryRs.RecordSource = "select * FROM yy_cpshdt where left(shdbh,2)<>'SH' and djrq='" & VBA.Date & "'"
  AdoprimaryRs.Refresh
  For i = 0 To Text1.Count - 1
  Text1(i).Enabled = False
  Next i
  For i = 0 To Combo.Count - 1
  Combo(i).Enabled = False
  Next i
End Sub
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) '非法退出
If Cmdcancel.Enabled = True Then
  If UnloadMode <> VBRUN.QueryUnloadConstants.vbFormCode Then
   Cancel = 1
  Exit Sub
  End If
End If
End Sub

Private Sub T_Sh_Change()
If T_Sh.Text = "已审" And SH_Right = False Then
  Cmdedit.Visible = False
  Cmddelete.Visible = False
  Else

⌨️ 快捷键说明

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