ʰ
上传用户:zhpu1995
上传日期:2013-09-06
资源大小:61151k
文件大小:16k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Begin VB.Form YH_FrmGltj 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "查询条件"
  5.    ClientHeight    =   2430
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   5085
  9.    Icon            =   "银行_过滤条件.frx":0000
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   2430
  14.    ScaleWidth      =   5085
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   2  '屏幕中心
  17.    Begin VB.CommandButton Command2 
  18.       Caption         =   "取消(&C)"
  19.       Height          =   300
  20.       Left            =   3900
  21.       TabIndex        =   13
  22.       Top             =   2040
  23.       Width           =   1120
  24.    End
  25.    Begin VB.CommandButton Command1 
  26.       Caption         =   "确定(&O)"
  27.       Height          =   300
  28.       Left            =   2700
  29.       TabIndex        =   12
  30.       Top             =   2040
  31.       Width           =   1120
  32.    End
  33.    Begin VB.CheckBox Check1 
  34.       Caption         =   "取消过滤"
  35.       Height          =   225
  36.       Left            =   60
  37.       TabIndex        =   11
  38.       Top             =   2070
  39.       Width           =   1215
  40.    End
  41.    Begin VB.Frame Frame1 
  42.       Height          =   1905
  43.       Left            =   60
  44.       TabIndex        =   0
  45.       Top             =   30
  46.       Width           =   4965
  47.       Begin VB.Frame Frame2 
  48.          Height          =   480
  49.          Left            =   990
  50.          TabIndex        =   16
  51.          Top             =   1260
  52.          Width           =   3855
  53.          Begin VB.OptionButton Option1 
  54.             Caption         =   "不限"
  55.             Height          =   180
  56.             Left            =   210
  57.             TabIndex        =   19
  58.             Top             =   210
  59.             Value           =   -1  'True
  60.             Width           =   885
  61.          End
  62.          Begin VB.OptionButton Option2 
  63.             Caption         =   "借方"
  64.             Height          =   180
  65.             Left            =   1470
  66.             TabIndex        =   18
  67.             Top             =   210
  68.             Width           =   825
  69.          End
  70.          Begin VB.OptionButton Option3 
  71.             Caption         =   "贷方"
  72.             Height          =   180
  73.             Left            =   2670
  74.             TabIndex        =   17
  75.             Top             =   210
  76.             Width           =   945
  77.          End
  78.       End
  79.       Begin VB.CommandButton Command4 
  80.          Height          =   345
  81.          Left            =   4530
  82.          Picture         =   "银行_过滤条件.frx":1042
  83.          Style           =   1  'Graphical
  84.          TabIndex        =   15
  85.          Top             =   240
  86.          Width           =   315
  87.       End
  88.       Begin VB.CommandButton Command3 
  89.          Height          =   315
  90.          Left            =   2310
  91.          Picture         =   "银行_过滤条件.frx":13CC
  92.          Style           =   1  'Graphical
  93.          TabIndex        =   14
  94.          Top             =   255
  95.          Width           =   345
  96.       End
  97.       Begin VB.TextBox Text4 
  98.          Height          =   300
  99.          Left            =   990
  100.          TabIndex        =   10
  101.          Top             =   960
  102.          Width           =   3855
  103.       End
  104.       Begin VB.TextBox Text3 
  105.          Height          =   300
  106.          Left            =   3150
  107.          TabIndex        =   9
  108.          Top             =   600
  109.          Width           =   1695
  110.       End
  111.       Begin VB.ComboBox Combo1 
  112.          Height          =   300
  113.          ItemData        =   "银行_过滤条件.frx":1756
  114.          Left            =   990
  115.          List            =   "银行_过滤条件.frx":1758
  116.          TabIndex        =   8
  117.          Top             =   600
  118.          Width           =   1665
  119.       End
  120.       Begin VB.TextBox Text2 
  121.          Height          =   300
  122.          Left            =   2970
  123.          TabIndex        =   7
  124.          Top             =   255
  125.          Width           =   1575
  126.       End
  127.       Begin VB.TextBox Text1 
  128.          Height          =   300
  129.          Left            =   990
  130.          TabIndex        =   6
  131.          Top             =   240
  132.          Width           =   1335
  133.       End
  134.       Begin VB.Line Line1 
  135.          X1              =   2700
  136.          X2              =   2910
  137.          Y1              =   390
  138.          Y2              =   390
  139.       End
  140.       Begin VB.Label Label1 
  141.          AutoSize        =   -1  'True
  142.          Caption         =   "金额:"
  143.          Height          =   180
  144.          Index           =   5
  145.          Left            =   150
  146.          TabIndex        =   5
  147.          Top             =   990
  148.          Width           =   450
  149.       End
  150.       Begin VB.Label Label1 
  151.          AutoSize        =   -1  'True
  152.          Caption         =   "方向:"
  153.          Height          =   180
  154.          Index           =   4
  155.          Left            =   150
  156.          TabIndex        =   4
  157.          Top             =   1380
  158.          Width           =   450
  159.       End
  160.       Begin VB.Label Label1 
  161.          AutoSize        =   -1  'True
  162.          Caption         =   "票号:"
  163.          Height          =   180
  164.          Index           =   3
  165.          Left            =   2730
  166.          TabIndex        =   3
  167.          Top             =   660
  168.          Width           =   450
  169.       End
  170.       Begin VB.Label Label1 
  171.          AutoSize        =   -1  'True
  172.          Caption         =   "结算方式:"
  173.          Height          =   180
  174.          Index           =   2
  175.          Left            =   150
  176.          TabIndex        =   2
  177.          Top             =   660
  178.          Width           =   810
  179.       End
  180.       Begin VB.Label Label1 
  181.          AutoSize        =   -1  'True
  182.          Caption         =   "截止日期:"
  183.          Height          =   180
  184.          Index           =   0
  185.          Left            =   150
  186.          TabIndex        =   1
  187.          Top             =   315
  188.          Width           =   810
  189.       End
  190.    End
  191. End
  192. Attribute VB_Name = "YH_FrmGltj"
  193. Attribute VB_GlobalNameSpace = False
  194. Attribute VB_Creatable = False
  195. Attribute VB_PredeclaredId = True
  196. Attribute VB_Exposed = False
  197. '*************************************************************
  198. '*    模 块 名 称 :银行对帐过滤条件
  199. '*    功 能 描 述 :银行对帐查询
  200. '*    程序员姓名  : xjl
  201. '*    最后修改人  : xjl
  202. '*    最后修改时间:2001/08/16
  203. '*    备        注:
  204. '*************************************************************
  205. Dim SqlStr As String, SqlStrA As String
  206. '取消过滤
  207. Private Sub Check1_Click()
  208.     If Check1.Value = 1 Then
  209.         Frame1.Enabled = False
  210.     Else
  211.         Frame1.Enabled = True
  212.     End If
  213. End Sub
  214. '进行查询
  215. Private Sub Command1_Click()
  216.     Dim Rowjsq As Integer
  217.     Dim A As Double
  218.     '判断日期
  219.     If Trim(Text1.Text) <> "" And Trim(Text2.Text) <> "" Then
  220.         If CDate(Text1.Text) > CDate(Text2.Text) Then
  221.             MsgBox "起始日期不能大于截止日期", 16, "提示:"
  222.             Exit Sub
  223.         End If
  224.     End If
  225.     
  226.     If YH_FrmGltj.Tag = "Z" Then
  227.     
  228.         With YH_FrmZddz.CxbbGrid
  229.             
  230.             For Rowjsq = 1 To .Rows - 1
  231.                 
  232.                 A = False
  233.                 If Check1.Value <> 1 Then
  234.                     
  235.                     '截止日期
  236.                     If Text1.Text <> "" Or Text2.Text <> "" Then
  237.                         If Format(Trim(.TextMatrix(Rowjsq, 0)), "yyyy-mm-dd") < Format(Trim(Text1.Text), "yyyy-mm-dd") Or Format(Trim(.TextMatrix(Rowjsq, 0)), "yyyy-mm-dd") > Format(Trim(Text2.Text), "yyyy-mm-dd") Then
  238.                             A = True
  239.                         End If
  240.                     End If
  241.                     '结算方式
  242.                     If Combo1.Text <> "" Then
  243.                         If Trim(.TextMatrix(Rowjsq, 1)) <> Trim(Mid(Combo1.Text, 4)) Then
  244.                             A = True
  245.                         End If
  246.                     End If
  247.                     '票号
  248.                     If Text3 <> "" Then
  249.                         If Trim(.TextMatrix(Rowjsq, 2)) <> Trim(Text3.Text) Then
  250.                             A = True
  251.                         End If
  252.                     End If
  253.                     '方向借方
  254.                     If Option2.Value = True Then
  255.                         If .TextMatrix(Rowjsq, 3) <> "借" Then
  256.                             A = True
  257.                         End If
  258.                     End If
  259.                     '方向贷方
  260.                     If Option3.Value = True Then
  261.                         If .TextMatrix(Rowjsq, 3) <> "贷" Then
  262.                             A = True
  263.                         End If
  264.                     End If
  265.                     '金额
  266.                     If Text4.Text <> "" Then
  267.                         If Val(Format(.TextMatrix(Rowjsq, 4), "0.00")) <> Val(Text4.Text) Then
  268.                             A = True
  269.                         End If
  270.                     End If
  271.                     
  272.                 End If
  273.                 
  274.                 If A = -1 Then
  275.                     .RowHidden(Rowjsq) = True
  276.                 Else
  277.                     .RowHidden(Rowjsq) = False
  278.                 End If
  279.                 
  280.             Next Rowjsq
  281.             
  282.         End With
  283.         
  284.         With YH_FrmZddz.vsFlexGrid1
  285.             
  286.             For Rowjsq = 1 To .Rows - 1
  287.                 A = False
  288.                 If Check1.Value <> 1 Then
  289.                     '截止日期
  290.                     If Text1.Text <> "" Or Text2.Text <> "" Then
  291.                         If Trim(.TextMatrix(Rowjsq, 0)) < Text1.Text Or Trim(.TextMatrix(Rowjsq, 0)) > Text2.Text Then
  292.                             A = True
  293.                         End If
  294.                     End If
  295.                     '结算方式
  296.                     If Combo1.Text <> "" Then
  297.                         If Trim(.TextMatrix(Rowjsq, 2)) <> Trim(Mid(Combo1.Text, 4)) Then
  298.                             A = True
  299.                         End If
  300.                     End If
  301.                     '票号
  302.                     If Text3 <> "" Then
  303.                         If Trim(.TextMatrix(Rowjsq, 3)) <> Trim(Text3.Text) Then
  304.                             A = True
  305.                         End If
  306.                     End If
  307.                     '方向借方
  308.                     If Option2.Value = True Then
  309.                         If .TextMatrix(Rowjsq, 4) <> "借" Then
  310.                             A = True
  311.                         End If
  312.                     End If
  313.                     '方向贷方
  314.                     If Option3.Value = True Then
  315.                         If .TextMatrix(Rowjsq, 4) <> "贷" Then
  316.                             A = True
  317.                         End If
  318.                     End If
  319.                     '金额
  320.                     If Text4.Text <> "" Then
  321.                         If Val(Format(.TextMatrix(Rowjsq, 5), "0.00")) <> Val(Text4.Text) Then
  322.                             A = True
  323.                         End If
  324.                     End If
  325.                     
  326.                 End If
  327.                 
  328.                 If A = -1 Then
  329.                     .RowHidden(Rowjsq) = True
  330.                 Else
  331.                     .RowHidden(Rowjsq) = False
  332.                 End If
  333.                 
  334.             Next Rowjsq
  335.             
  336.         End With
  337.         
  338.     Else
  339.         With YH_FrmDzdCx.WglrGrid
  340.             For Rowjsq = 1 To .Rows - 1
  341.                 A = False
  342.                 If Check1.Value <> 1 Then
  343.                     '截止日期
  344.                     If Text1.Text <> "" And Trim(Text2.Text) <> "" Then
  345.                         If Format(Trim(.TextMatrix(Rowjsq, 2)), "yyyy-mm-dd") < Format(Trim(Text1.Text), "yyyy-mm-dd") Or Format(Trim(.TextMatrix(Rowjsq, 2)), "yyyy-mm-dd") > Format(Trim(Text2.Text), "yyyy-mm-dd") Then
  346.                             A = True
  347.                         End If
  348.                     End If
  349.                     '截止日期
  350.                     If Text1.Text <> "" And Trim(Text2.Text) = "" Then
  351.                         If Format(Trim(.TextMatrix(Rowjsq, 2)), "yyyy-mm-dd") < Format(Trim(Text1.Text), "yyyy-mm-dd") Then
  352.                             A = True
  353.                         End If
  354.                     End If
  355.                     '截止日期
  356.                     If Trim(Text1.Text) = "" And Text2.Text <> "" Then
  357.                         If Format(Trim(.TextMatrix(Rowjsq, 2)), "yyyy-mm-dd") > Format(Trim(Text2.Text), "yyyy-mm-dd") Then
  358.                             A = True
  359.                         End If
  360.                     End If
  361.                     '结算方式
  362.                     If Combo1.Text <> "" Then
  363.                         If Trim(.TextMatrix(Rowjsq, 3)) <> Trim(Mid(Combo1.Text, 4)) Then
  364.                             A = True
  365.                         End If
  366.                     End If
  367.                     '票号
  368.                     If Text3 <> "" Then
  369.                         If Trim(.TextMatrix(Rowjsq, 4)) <> Trim(Text3.Text) Then
  370.                             A = True
  371.                         End If
  372.                     End If
  373.                     '方向借方
  374.                     If Option2.Value = True Then
  375.                         If Val(Format(.TextMatrix(Rowjsq, 6), "0.00")) <> 0 Then
  376.                             A = True
  377.                         End If
  378.                         
  379.                         '金额
  380.                         If Text4.Text <> "" Then
  381.                             If Val(Format(.TextMatrix(Rowjsq, 5), "0.00")) <> Val(Text4.Text) Then
  382.                                 A = True
  383.                             End If
  384.                         End If
  385.                     
  386.                     End If
  387.                     
  388.                     '方向贷方
  389.                     If Option3.Value = True Then
  390.                         If Val(Format(.TextMatrix(Rowjsq, 5), "0.00")) <> 0 Then
  391.                             A = True
  392.                         End If
  393.                     
  394.                         '金额
  395.                         If Text4.Text <> "" Then
  396.                             If Val(Format(.TextMatrix(Rowjsq, 6), "0.00")) <> Val(Text4.Text) Then
  397.                                 A = True
  398.                             End If
  399.                         End If
  400.                     
  401.                     End If
  402.                     
  403.                     '方向不限
  404.                     If Option1.Value = True Then
  405.                         
  406.                         '金额
  407.                         If Text4.Text <> "" Then
  408.                             If Val(Format(.TextMatrix(Rowjsq, 5), "0.00")) <> Val(Text4.Text) Then
  409.                                 A = True
  410.                             End If
  411.                         End If
  412.                         
  413.                         '金额
  414.                         If Text4.Text <> "" Then
  415.                             If Val(Format(.TextMatrix(Rowjsq, 6), "0.00")) <> Val(Text4.Text) Then
  416.                                 A = True
  417.                             Else
  418.                                 A = False
  419.                             End If
  420.                         End If
  421.                     
  422.                     End If
  423.                     
  424.                 End If
  425.                 
  426.                 If A = -1 Then
  427.                     .RowHidden(Rowjsq) = True
  428.                 Else
  429.                     .RowHidden(Rowjsq) = False
  430.                 End If
  431.                 
  432.             Next Rowjsq
  433.         End With
  434.         
  435.     End If
  436.     YH_FrmGltj.Hide
  437. End Sub
  438. '退出
  439. Private Sub Command2_Click()
  440.     Unload Me
  441. End Sub
  442. '选择日期
  443. Private Sub Command3_Click()
  444.     XT_calendar.Show 1
  445.     Text1.Text = Xtfhcs
  446.     Text1.Tag = Xtfhcsfz
  447.     Text1.SetFocus
  448. End Sub
  449. '选择日期
  450. Private Sub Command4_Click()
  451.     XT_calendar.Show 1
  452.     Text2.Text = Xtfhcs
  453.     Text2.Tag = Xtfhcsfz
  454.     Text2.SetFocus
  455. End Sub
  456. '调入窗体
  457. Private Sub Form_Load()
  458.     Dim RecTemp As New ADODB.Recordset
  459.     SqlStr = "select * from Gy_settlement"
  460.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  461.     Do While Not RecTemp.EOF()
  462.         Combo1.AddItem RecTemp.Fields("sscode") + Trim(RecTemp.Fields("ssname"))
  463.         RecTemp.MoveNext
  464.     Loop
  465.     Command3.Enabled = True
  466.     Command4.Enabled = True
  467. End Sub