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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Begin VB.Form Start_BillChalkitupCond 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "单据记帐条件"
  5.    ClientHeight    =   4200
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4515
  9.    HelpContextID   =   130203
  10.    Icon            =   "期初_单据记帐条件.frx":0000
  11.    KeyPreview      =   -1  'True
  12.    LinkTopic       =   "Form1"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   4200
  16.    ScaleWidth      =   4515
  17.    StartUpPosition =   2  'CenterScreen
  18.    Begin VB.CheckBox UnloadCheck 
  19.       Caption         =   "卸载窗体"
  20.       Height          =   615
  21.       Left            =   5250
  22.       TabIndex        =   10
  23.       Top             =   930
  24.       Width           =   825
  25.    End
  26.    Begin VB.Frame Frame2 
  27.       Caption         =   "记帐状态"
  28.       Height          =   585
  29.       Left            =   120
  30.       TabIndex        =   7
  31.       Top             =   3060
  32.       Width           =   4275
  33.       Begin VB.OptionButton Opt_Yjz 
  34.          Caption         =   "已记帐"
  35.          Height          =   315
  36.          Left            =   2430
  37.          TabIndex        =   9
  38.          Top             =   210
  39.          Width           =   975
  40.       End
  41.       Begin VB.OptionButton Opt_Wjz 
  42.          Caption         =   "未记帐"
  43.          Height          =   315
  44.          Left            =   840
  45.          TabIndex        =   8
  46.          Top             =   210
  47.          Value           =   -1  'True
  48.          Width           =   945
  49.       End
  50.    End
  51.    Begin VB.CheckBox Chk_Sum 
  52.       Caption         =   "每张单据输出合计"
  53.       Height          =   315
  54.       Left            =   150
  55.       TabIndex        =   6
  56.       Top             =   3780
  57.       Value           =   1  'Checked
  58.       Width           =   1785
  59.    End
  60.    Begin VB.CommandButton QxCommand 
  61.       Caption         =   "取消(&C)"
  62.       Height          =   300
  63.       Left            =   3270
  64.       TabIndex        =   5
  65.       Top             =   3780
  66.       Width           =   1120
  67.    End
  68.    Begin VB.CommandButton QdCommand 
  69.       Caption         =   "确定(&O)"
  70.       Height          =   300
  71.       Left            =   2040
  72.       TabIndex        =   4
  73.       Top             =   3780
  74.       Width           =   1120
  75.    End
  76.    Begin VB.Frame Frame1 
  77.       Caption         =   "仓库"
  78.       Height          =   2865
  79.       Left            =   120
  80.       TabIndex        =   0
  81.       Top             =   90
  82.       Width           =   4275
  83.       Begin VB.CommandButton QxuCommand 
  84.          Caption         =   "全选"
  85.          Height          =   300
  86.          Left            =   3000
  87.          TabIndex        =   3
  88.          Top             =   2460
  89.          Width           =   1120
  90.       End
  91.       Begin VB.CommandButton QcCommand 
  92.          Caption         =   "全消"
  93.          Height          =   300
  94.          Left            =   1770
  95.          TabIndex        =   2
  96.          Top             =   2460
  97.          Width           =   1120
  98.       End
  99.       Begin VB.ListBox Lst_WareHouse 
  100.          Height          =   2085
  101.          Left            =   150
  102.          Style           =   1  'Checkbox
  103.          TabIndex        =   1
  104.          Top             =   270
  105.          Width           =   3975
  106.       End
  107.    End
  108. End
  109. Attribute VB_Name = "Start_BillChalkitupCond"
  110. Attribute VB_GlobalNameSpace = False
  111. Attribute VB_Creatable = False
  112. Attribute VB_PredeclaredId = True
  113. Attribute VB_Exposed = False
  114. Dim mWhcode() As String              '仓库编码
  115. Dim mWhcodeStr As String             '选中仓库编码
  116. Dim Tsxx As String
  117. Dim Jsqte As Long
  118. Private Sub Form_Load()
  119.     Dim Rectemp As Recordset
  120.     
  121.     '仓库列表
  122.     Set Rectemp = Cw_DataEnvi.DataConnect.Execute("SELECT  Gy_Warehouse.* FROM Gy_Warehouse " & _
  123.            " LEFT OUTER JOIN  Gy_Whlimit ON Gy_Warehouse.WhCode = Gy_Whlimit.WhCode " & _
  124.            " WHERE Gy_Whlimit.Czybm = '" & Xtczybm & "' and Gy_Warehouse.chhsuseflag=1 " & _
  125.            " and enddealflagchhs=0 order by Gy_Warehouse.Whcode")
  126.     
  127.     If Not Rectemp.EOF Then
  128.         
  129.         ReDim mWhcode(Rectemp.RecordCount)
  130.         
  131.         For Jsqte = 0 To Rectemp.RecordCount - 1
  132.             If Not Rectemp.Fields("enddealflagchhs") Then
  133.                 Lst_WareHouse.AddItem Trim(Rectemp.Fields("whname")) + "(" + Trim(Rectemp.Fields("whcode")) + ")--- " + Trim(Rectemp.Fields("pricemode"))
  134.                 Lst_WareHouse.Selected(Lst_WareHouse.NewIndex) = True
  135.                 mWhcode(Lst_WareHouse.NewIndex) = Trim(Rectemp.Fields("whcode"))
  136.             End If
  137.             Rectemp.MoveNext
  138.         Next
  139.     End If
  140.     
  141. End Sub
  142. Private Sub QcCommand_Click()           '全消
  143.     For Jsqte = 0 To Lst_WareHouse.ListCount - 1
  144.         Lst_WareHouse.Selected(Jsqte) = False
  145.     Next
  146. End Sub
  147. Private Sub QdCommand_Click()           '确定
  148. Dim WareHouseCode As String
  149.     If Lst_WareHouse.SelCount = 0 Then
  150.        Tsxx = "至少选择一个仓库!"
  151.        Call Xtxxts(Tsxx, 0, 1)
  152.        Exit Sub
  153.     End If
  154.     
  155.     '选中计价方式
  156.     WareHouseCode = ""
  157.     For Jsqte = 0 To Lst_WareHouse.ListCount - 1
  158.         If Lst_WareHouse.Selected(Jsqte) Then
  159.             If WareHouseCode = "" Then
  160.                 WareHouseCode = "'" & mWhcode(Jsqte) & "'"
  161.             Else
  162.                 WareHouseCode = WareHouseCode + ",'" & mWhcode(Jsqte) & "'"
  163.             End If
  164.         End If
  165.     Next
  166.     
  167.     Me.WhCode = "a.whcode in(" + WareHouseCode + ")"
  168.     Me.Hide
  169.     
  170.     Start_BillChalkitup.Timer1.Enabled = True
  171.     Start_BillChalkitup.CxbbGrid.SetFocus
  172.   
  173. End Sub
  174. Private Sub QxCommand_Click()           '取消
  175.     Me.Hide
  176.     
  177.     '调整工具条
  178.     With Start_BillChalkitup.SzToolbar
  179.         If Start_BillChalkitup.CxbbGrid.Rows = Start_BillChalkitup.CxbbGrid.FixedRows Then
  180.             .Buttons("Bill").Enabled = False
  181.             .Buttons("mx").Enabled = False
  182.             .Buttons("hz").Enabled = False
  183.             .Buttons("jz").Enabled = False
  184.             .Buttons("hf").Enabled = False
  185.        End If
  186.     End With
  187. End Sub
  188. Private Sub QxuCommand_Click()          '全选
  189.     For Jsqte = 0 To Lst_WareHouse.ListCount - 1
  190.         Lst_WareHouse.Selected(Jsqte) = True
  191.     Next
  192. End Sub
  193. Public Property Get WhCode() As Variant
  194.     WhCode = mWhcodeStr
  195. End Property
  196. Public Property Let WhCode(ByVal vNewValue As Variant)
  197.     mWhcodeStr = vNewValue
  198. End Property