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

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{BEEECC20-4D5F-4F8B-BFDC-5D9B6FBDE09D}#1.0#0"; "vsflex8.ocx"
  3. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  4. Begin VB.Form Start_BillInputList 
  5.    Caption         =   "单据列表"
  6.    ClientHeight    =   6345
  7.    ClientLeft      =   60
  8.    ClientTop       =   345
  9.    ClientWidth     =   11535
  10.    HelpContextID   =   130202
  11.    Icon            =   "期初_单据列表.frx":0000
  12.    LinkTopic       =   "Form2"
  13.    MDIChild        =   -1  'True
  14.    ScaleHeight     =   6345
  15.    ScaleWidth      =   11535
  16.    WindowState     =   2  'Maximized
  17.    Begin VB.Timer Timer1 
  18.       Enabled         =   0   'False
  19.       Interval        =   1
  20.       Left            =   7620
  21.       Top             =   90
  22.    End
  23.    Begin VB.PictureBox Pic_Title 
  24.       BackColor       =   &H00FFFFFF&
  25.       Height          =   825
  26.       Left            =   0
  27.       Picture         =   "期初_单据列表.frx":1042
  28.       ScaleHeight     =   765
  29.       ScaleWidth      =   11715
  30.       TabIndex        =   1
  31.       Top             =   570
  32.       Width           =   11775
  33.       Begin VB.Label Lab_Title 
  34.          BackColor       =   &H80000018&
  35.          BackStyle       =   0  'Transparent
  36.          Caption         =   "期初单据列表"
  37.          BeginProperty Font 
  38.             Name            =   "宋体"
  39.             Size            =   12
  40.             Charset         =   134
  41.             Weight          =   700
  42.             Underline       =   0   'False
  43.             Italic          =   0   'False
  44.             Strikethrough   =   0   'False
  45.          EndProperty
  46.          ForeColor       =   &H00000000&
  47.          Height          =   300
  48.          Index           =   4
  49.          Left            =   480
  50.          TabIndex        =   2
  51.          Top             =   210
  52.          Width           =   2715
  53.       End
  54.    End
  55.    Begin MSComctlLib.Toolbar GsToolbar 
  56.       Height          =   525
  57.       Left            =   9330
  58.       TabIndex        =   0
  59.       Top             =   30
  60.       Width           =   2475
  61.       _ExtentX        =   4366
  62.       _ExtentY        =   926
  63.       ButtonWidth     =   1455
  64.       ButtonHeight    =   926
  65.       Appearance      =   1
  66.       Style           =   1
  67.       ImageList       =   "ImageList2"
  68.       _Version        =   393216
  69.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  70.          NumButtons      =   3
  71.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  72.             Caption         =   "保存格式"
  73.             Key             =   "bcgs"
  74.             ImageKey        =   "bcgs"
  75.          EndProperty
  76.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  77.             Caption         =   "默认列宽"
  78.             Key             =   "hfmrgs"
  79.             ImageKey        =   "mrlk"
  80.          EndProperty
  81.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  82.             Caption         =   "显示项目"
  83.             Key             =   "szxsxm"
  84.             ImageKey        =   "xsxm"
  85.          EndProperty
  86.       EndProperty
  87.    End
  88.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  89.       Height          =   7545
  90.       Left            =   0
  91.       TabIndex        =   3
  92.       Top             =   1470
  93.       Width           =   11775
  94.       _cx             =   5080
  95.       _cy             =   5080
  96.       Appearance      =   1
  97.       BorderStyle     =   1
  98.       Enabled         =   -1  'True
  99.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  100.          Name            =   "宋体"
  101.          Size            =   9
  102.          Charset         =   134
  103.          Weight          =   400
  104.          Underline       =   0   'False
  105.          Italic          =   0   'False
  106.          Strikethrough   =   0   'False
  107.       EndProperty
  108.       MousePointer    =   0
  109.       BackColor       =   16777215
  110.       ForeColor       =   -2147483640
  111.       BackColorFixed  =   13826538
  112.       ForeColorFixed  =   -2147483630
  113.       BackColorSel    =   -2147483635
  114.       ForeColorSel    =   -2147483634
  115.       BackColorBkg    =   -2147483636
  116.       BackColorAlternate=   16777215
  117.       GridColor       =   -2147483633
  118.       GridColorFixed  =   -2147483632
  119.       TreeColor       =   -2147483632
  120.       FloodColor      =   192
  121.       SheetBorder     =   -2147483642
  122.       FocusRect       =   1
  123.       HighLight       =   1
  124.       AllowSelection  =   -1  'True
  125.       AllowBigSelection=   -1  'True
  126.       AllowUserResizing=   0
  127.       SelectionMode   =   0
  128.       GridLines       =   1
  129.       GridLinesFixed  =   2
  130.       GridLineWidth   =   1
  131.       Rows            =   50
  132.       Cols            =   10
  133.       FixedRows       =   1
  134.       FixedCols       =   1
  135.       RowHeightMin    =   0
  136.       RowHeightMax    =   0
  137.       ColWidthMin     =   0
  138.       ColWidthMax     =   0
  139.       ExtendLastCol   =   0   'False
  140.       FormatString    =   ""
  141.       ScrollTrack     =   0   'False
  142.       ScrollBars      =   3
  143.       ScrollTips      =   0   'False
  144.       MergeCells      =   0
  145.       MergeCompare    =   0
  146.       AutoResize      =   -1  'True
  147.       AutoSizeMode    =   0
  148.       AutoSearch      =   0
  149.       AutoSearchDelay =   2
  150.       MultiTotals     =   -1  'True
  151.       SubtotalPosition=   1
  152.       OutlineBar      =   0
  153.       OutlineCol      =   0
  154.       Ellipsis        =   0
  155.       ExplorerBar     =   0
  156.       PicturesOver    =   0   'False
  157.       FillStyle       =   0
  158.       RightToLeft     =   0   'False
  159.       PictureType     =   0
  160.       TabBehavior     =   0
  161.       OwnerDraw       =   0
  162.       Editable        =   0
  163.       ShowComboButton =   1
  164.       WordWrap        =   0   'False
  165.       TextStyle       =   0
  166.       TextStyleFixed  =   0
  167.       OleDragMode     =   0
  168.       OleDropMode     =   0
  169.       DataMode        =   0
  170.       VirtualData     =   -1  'True
  171.       DataMember      =   ""
  172.       ComboSearch     =   3
  173.       AutoSizeMouse   =   -1  'True
  174.       FrozenRows      =   0
  175.       FrozenCols      =   0
  176.       AllowUserFreezing=   0
  177.       BackColorFrozen =   0
  178.       ForeColorFrozen =   0
  179.       WallPaperAlignment=   9
  180.       AccessibleName  =   ""
  181.       AccessibleDescription=   ""
  182.       AccessibleValue =   ""
  183.       AccessibleRole  =   24
  184.       Begin MSComctlLib.ImageList ImageList2 
  185.          Left            =   0
  186.          Top             =   0
  187.          _ExtentX        =   1005
  188.          _ExtentY        =   1005
  189.          BackColor       =   -2147483643
  190.          ImageWidth      =   16
  191.          ImageHeight     =   16
  192.          MaskColor       =   12632256
  193.          _Version        =   393216
  194.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  195.             NumListImages   =   40
  196.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  197.                Picture         =   "期初_单据列表.frx":35106
  198.                Key             =   "sz"
  199.             EndProperty
  200.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  201.                Picture         =   "期初_单据列表.frx":354A0
  202.                Key             =   "dy"
  203.             EndProperty
  204.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  205.                Picture         =   "期初_单据列表.frx":3583A
  206.                Key             =   "yl"
  207.             EndProperty
  208.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  209.                Picture         =   "期初_单据列表.frx":35BD4
  210.                Key             =   "xg"
  211.             EndProperty
  212.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  213.                Picture         =   "期初_单据列表.frx":35F6E
  214.                Key             =   "zh"
  215.             EndProperty
  216.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  217.                Picture         =   "期初_单据列表.frx":36308
  218.                Key             =   "sh"
  219.             EndProperty
  220.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  221.                Picture         =   "期初_单据列表.frx":366A2
  222.                Key             =   "bc"
  223.             EndProperty
  224.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  225.                Picture         =   "期初_单据列表.frx":36A3C
  226.                Key             =   "fq"
  227.             EndProperty
  228.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  229.                Picture         =   "期初_单据列表.frx":36DD6
  230.                Key             =   "bz"
  231.             EndProperty
  232.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  233.                Picture         =   "期初_单据列表.frx":37170
  234.                Key             =   "tc"
  235.             EndProperty
  236.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  237.                Picture         =   "期初_单据列表.frx":3750A
  238.                Key             =   "bcgs"
  239.             EndProperty
  240.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  241.                Picture         =   "期初_单据列表.frx":378A4
  242.                Key             =   "mrlk"
  243.             EndProperty
  244.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  245.                Picture         =   "期初_单据列表.frx":37C3E
  246.                Key             =   "xsxm"
  247.             EndProperty
  248.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  249.                Picture         =   "期初_单据列表.frx":37FD8
  250.                Key             =   "first"
  251.             EndProperty
  252.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  253.                Picture         =   "期初_单据列表.frx":38372
  254.                Key             =   "prev"
  255.             EndProperty
  256.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  257.                Picture         =   "期初_单据列表.frx":3870C
  258.                Key             =   "next"
  259.             EndProperty
  260.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  261.                Picture         =   "期初_单据列表.frx":38AA6
  262.                Key             =   "last"
  263.             EndProperty
  264.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  265.                Picture         =   "期初_单据列表.frx":38E40
  266.                Key             =   "xx"
  267.             EndProperty
  268.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  269.                Picture         =   "期初_单据列表.frx":391DA
  270.                Key             =   "define"
  271.             EndProperty
  272.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  273.                Picture         =   "期初_单据列表.frx":39574
  274.                Key             =   "exec"
  275.             EndProperty
  276.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  277.                Picture         =   "期初_单据列表.frx":3990E
  278.                Key             =   "xz"
  279.             EndProperty
  280.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  281.                Picture         =   "期初_单据列表.frx":39CA8
  282.                Key             =   "sc"
  283.             EndProperty
  284.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  285.                Picture         =   "期初_单据列表.frx":3A042
  286.                Key             =   "sx"
  287.             EndProperty
  288.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  289.                Picture         =   "期初_单据列表.frx":3A3DC
  290.                Key             =   "cx"
  291.             EndProperty
  292.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  293.                Picture         =   "期初_单据列表.frx":3A776
  294.                Key             =   "zd"
  295.             EndProperty
  296.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  297.                Picture         =   "期初_单据列表.frx":3AB10
  298.                Key             =   "dz"
  299.             EndProperty
  300.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  301.                Picture         =   "期初_单据列表.frx":3AEAA
  302.                Key             =   "ph"
  303.             EndProperty
  304.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  305.                Picture         =   "期初_单据列表.frx":3B244
  306.                Key             =   "fz"
  307.             EndProperty
  308.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  309.                Picture         =   "期初_单据列表.frx":3B5DE
  310.                Key             =   "dw"
  311.             EndProperty
  312.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  313.                Picture         =   "期初_单据列表.frx":3B978
  314.                Key             =   "hf"
  315.             EndProperty
  316.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  317.                Picture         =   "期初_单据列表.frx":3BD12
  318.                Key             =   "pz"
  319.             EndProperty
  320.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  321.                Picture         =   "期初_单据列表.frx":3C0AC
  322.                Key             =   "check"
  323.             EndProperty
  324.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  325.                Picture         =   "期初_单据列表.frx":3C446
  326.                Key             =   "qs"
  327.             EndProperty
  328.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  329.                Picture         =   "期初_单据列表.frx":3C7E0
  330.                Key             =   "fullcheck"
  331.             EndProperty
  332.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  333.                Picture         =   "期初_单据列表.frx":3CB7A
  334.                Key             =   "qq"
  335.             EndProperty
  336.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  337.                Picture         =   "期初_单据列表.frx":3CF14
  338.                Key             =   "bcw"
  339.             EndProperty
  340.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  341.                Picture         =   "期初_单据列表.frx":3D2AE
  342.                Key             =   "ye"
  343.             EndProperty
  344.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  345.                Picture         =   "期初_单据列表.frx":3D648
  346.                Key             =   ""
  347.             EndProperty
  348.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  349.                Picture         =   "期初_单据列表.frx":3D9E2
  350.                Key             =   "frist"
  351.             EndProperty
  352.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  353.                Picture         =   "期初_单据列表.frx":3DD7C
  354.                Key             =   "dj"
  355.             EndProperty
  356.          EndProperty
  357.       End
  358.    End
  359.    Begin MSComctlLib.Toolbar SzToolbar 
  360.       Align           =   1  'Align Top
  361.       Height          =   555
  362.       Left            =   0
  363.       TabIndex        =   4
  364.       Top             =   0
  365.       Width           =   11535
  366.       _ExtentX        =   20346
  367.       _ExtentY        =   979
  368.       ButtonWidth     =   820
  369.       ButtonHeight    =   926
  370.       AllowCustomize  =   0   'False
  371.       Appearance      =   1
  372.       Style           =   1
  373.       ImageList       =   "ImageList1"
  374.       _Version        =   393216
  375.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  376.          NumButtons      =   12
  377.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  378.             Caption         =   "设置"
  379.             Key             =   "ymsz"
  380.             ImageKey        =   "sz"
  381.          EndProperty
  382.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  383.             Caption         =   "打印"
  384.             Key             =   "dy"
  385.             ImageKey        =   "dy"
  386.          EndProperty
  387.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  388.             Caption         =   "预览"
  389.             Key             =   "yl"
  390.             ImageKey        =   "yl"
  391.          EndProperty
  392.          BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  393.             Style           =   3
  394.          EndProperty
  395.          BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  396.             Caption         =   "查询"
  397.             Key             =   "cx"
  398.             ImageKey        =   "cx"
  399.          EndProperty
  400.          BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  401.             Caption         =   "单据"
  402.             Key             =   "Bill"
  403.             ImageKey        =   "pz"
  404.          EndProperty
  405.          BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  406.             Style           =   3
  407.          EndProperty
  408.          BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  409.             Caption         =   "新增"
  410.             Key             =   "xz"
  411.             ImageKey        =   "xz"
  412.          EndProperty
  413.          BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  414.             Caption         =   "删除"
  415.             Key             =   "sc"
  416.             ImageKey        =   "sc"
  417.          EndProperty
  418.          BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  419.             Style           =   3
  420.          EndProperty
  421.          BeginProperty Button11 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  422.             Caption         =   "帮助"
  423.             Key             =   "bz"
  424.             ImageKey        =   "bz"
  425.          EndProperty
  426.          BeginProperty Button12 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  427.             Caption         =   "退出"
  428.             Key             =   "fh"
  429.             ImageKey        =   "tc"
  430.          EndProperty
  431.       EndProperty
  432.       BorderStyle     =   1
  433.       Begin MSComctlLib.ImageList ImageList1 
  434.          Left            =   6990
  435.          Top             =   30
  436.          _ExtentX        =   1005
  437.          _ExtentY        =   1005
  438.          BackColor       =   -2147483643
  439.          ImageWidth      =   16
  440.          ImageHeight     =   16
  441.          MaskColor       =   12632256
  442.          _Version        =   393216
  443.          BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
  444.             NumListImages   =   32
  445.             BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  446.                Picture         =   "期初_单据列表.frx":3E116
  447.                Key             =   "sz"
  448.             EndProperty
  449.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  450.                Picture         =   "期初_单据列表.frx":3E4B0
  451.                Key             =   "dy"
  452.             EndProperty
  453.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  454.                Picture         =   "期初_单据列表.frx":3E84A
  455.                Key             =   "yl"
  456.             EndProperty
  457.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  458.                Picture         =   "期初_单据列表.frx":3EBE4
  459.                Key             =   "xg"
  460.             EndProperty
  461.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  462.                Picture         =   "期初_单据列表.frx":3EF7E
  463.                Key             =   "zh"
  464.             EndProperty
  465.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  466.                Picture         =   "期初_单据列表.frx":3F318
  467.                Key             =   "sh"
  468.             EndProperty
  469.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  470.                Picture         =   "期初_单据列表.frx":3F6B2
  471.                Key             =   "bc"
  472.             EndProperty
  473.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  474.                Picture         =   "期初_单据列表.frx":3FA4C
  475.                Key             =   "fq"
  476.             EndProperty
  477.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  478.                Picture         =   "期初_单据列表.frx":3FDE6
  479.                Key             =   "bz"
  480.             EndProperty
  481.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  482.                Picture         =   "期初_单据列表.frx":40180
  483.                Key             =   "tc"
  484.             EndProperty
  485.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  486.                Picture         =   "期初_单据列表.frx":4051A
  487.                Key             =   "bcgs"
  488.             EndProperty
  489.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  490.                Picture         =   "期初_单据列表.frx":408B4
  491.                Key             =   "mrlk"
  492.             EndProperty
  493.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  494.                Picture         =   "期初_单据列表.frx":40C4E
  495.                Key             =   "xsxm"
  496.             EndProperty
  497.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  498.                Picture         =   "期初_单据列表.frx":40FE8
  499.                Key             =   "first"
  500.             EndProperty
  501.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  502.                Picture         =   "期初_单据列表.frx":41382
  503.                Key             =   "prev"
  504.             EndProperty
  505.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  506.                Picture         =   "期初_单据列表.frx":4171C
  507.                Key             =   "next"
  508.             EndProperty
  509.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  510.                Picture         =   "期初_单据列表.frx":41AB6
  511.                Key             =   "last"
  512.             EndProperty
  513.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  514.                Picture         =   "期初_单据列表.frx":41E50
  515.                Key             =   "xx"
  516.             EndProperty
  517.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  518.                Picture         =   "期初_单据列表.frx":421EA
  519.                Key             =   "define"
  520.             EndProperty
  521.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  522.                Picture         =   "期初_单据列表.frx":42584
  523.                Key             =   "exec"
  524.             EndProperty
  525.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  526.                Picture         =   "期初_单据列表.frx":4291E
  527.                Key             =   "xz"
  528.             EndProperty
  529.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  530.                Picture         =   "期初_单据列表.frx":42CB8
  531.                Key             =   "sc"
  532.             EndProperty
  533.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  534.                Picture         =   "期初_单据列表.frx":43052
  535.                Key             =   "sx"
  536.             EndProperty
  537.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  538.                Picture         =   "期初_单据列表.frx":433EC
  539.                Key             =   "cx"
  540.             EndProperty
  541.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  542.                Picture         =   "期初_单据列表.frx":43786
  543.                Key             =   "zd"
  544.             EndProperty
  545.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  546.                Picture         =   "期初_单据列表.frx":43B20
  547.                Key             =   "dz"
  548.             EndProperty
  549.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  550.                Picture         =   "期初_单据列表.frx":43EBA
  551.                Key             =   "ph"
  552.             EndProperty
  553.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  554.                Picture         =   "期初_单据列表.frx":44254
  555.                Key             =   "fz"
  556.             EndProperty
  557.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  558.                Picture         =   "期初_单据列表.frx":445EE
  559.                Key             =   "dw"
  560.             EndProperty
  561.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  562.                Picture         =   "期初_单据列表.frx":44988
  563.                Key             =   "hf"
  564.             EndProperty
  565.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  566.                Picture         =   "期初_单据列表.frx":44D22
  567.                Key             =   "pz"
  568.             EndProperty
  569.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  570.                Picture         =   "期初_单据列表.frx":450BC
  571.                Key             =   "check"
  572.             EndProperty
  573.          EndProperty
  574.       End
  575.    End
  576. End
  577. Attribute VB_Name = "Start_BillInputList"
  578. Attribute VB_GlobalNameSpace = False
  579. Attribute VB_Creatable = False
  580. Attribute VB_PredeclaredId = True
  581. Attribute VB_Exposed = False
  582. '**************************************************************************
  583. '*    模 块 名 称 :期初单据列表
  584. '*    功 能 描 述 :
  585. '*    程序员姓名  :白凤英
  586. '*    最后修改人  :白凤英
  587. '*    最后修改时间:2001/11/23
  588. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  589. '**************************************************************************
  590. Dim ReportTitle As String                '报表主标题
  591. Dim Str_QueryCondi As String             '用户录入查询条件
  592. Dim Rec_BillID As New ADODB.Recordset    '用户查询单据ID动态集
  593. '以下为固定使用变量
  594. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  595. Dim GridCode As String                   '显示网格网格代码
  596. Dim GridInf() As Variant                 '整个网格设置信息
  597. Dim Tsxx As String                       '系统提示信息
  598. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  599. Dim Sjhgd As Double                      '网格数据行高度
  600. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  601. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  602. Dim GridStr()  As String                 '网格列信息(字符型)
  603. Dim GridInt() As Integer                 '网格列信息(整型)
  604. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  605. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  606.     On Error Resume Next
  607.     With CxbbGrid
  608.         .Width = Me.Width - 160
  609.         .Height = Me.Height - .Top - 400
  610.     End With
  611.     With Pic_Title
  612.         .Width = Me.Width - 160
  613.     End With
  614.     
  615.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  616. End Sub
  617. Private Sub Form_Load()                                                   '窗体装入
  618.   
  619.     '调入打印页面设置窗体
  620.     ReportTitle = "期初单据列表列表"
  621.     XtReportCode = "Chhs_StartBillList"
  622.     Load Dyymctbl
  623.       
  624.     '调整标题栏及网格、格式工具条位置(Fixed)
  625.     Pic_Title.Left = 40
  626.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  627.     CxbbGrid.Left = Pic_Title.Left
  628.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  629.      
  630.     '调 入 网 格(Fixed)
  631.     GridCode = "Chhs_StartBillList"
  632.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  633.       
  634.     Qslz = GridInf(1)
  635.     Sjhgd = GridInf(2)
  636.     Sfxshjwg = GridInf(7)
  637.     Szzls = CxbbGrid.Cols - 1
  638. End Sub
  639. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  640.     '卸载条件窗体
  641.     Start_BillListCond.UnloadCheck.Value = 1
  642.     Unload Start_BillListCond
  643.     
  644.     '卸载打印页面设置窗体
  645.     Unload Dyymctbl
  646. End Sub
  647. Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  648.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  649. End Sub
  650. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)                '网格格式调整(Fixed)
  651.   
  652.     Select Case Button.Key
  653.         Case "bcgs"                                          '保存表格格式
  654.             Call Bcwggs(CxbbGrid, GridCode, GridStr())
  655.         Case "hfmrgs"                                        '恢复默认格式
  656.             Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  657.         Case "szxsxm"                                        '设置显示项目
  658.             Call Szxsxm(CxbbGrid, GridCode)
  659.     End Select
  660. End Sub
  661. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  662.     
  663.     Select Case Button.Key
  664.         Case "ymsz"                                          '页面设置
  665.             Dyymctbl.Show 1
  666.         Case "yl"                                            '预 览
  667.             Call bbyl(True)
  668.         Case "dy"                                            '打 印
  669.             Call bbyl(False)
  670.         Case "cx"                                            '查 询
  671.             Start_BillListCond.Show 1
  672.         Case "Bill"                                          '单 据
  673.             Call CxbbGrid_DblClick
  674.         Case "xz"                                            '新 增
  675.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  676.             If Not Security_Log("Chhs_StartBillEdit", Xtczybm, 1, True) Then
  677.                 Exit Sub
  678.             End If
  679.             Call Sub_AddBill
  680.         Case "sc"                                            '删 除
  681.             '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  682.             If Not Security_Log("Chhs_StartBillEdit", Xtczybm, 1, True) Then
  683.                 Exit Sub
  684.             End If
  685.             Call Sub_DeleteBill
  686.         Case "bz"                                            '帮 助
  687.             Call F1bz
  688.         Case "fh"                                            '退 出
  689.            Unload Me
  690.     End Select
  691. End Sub
  692. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  693.     
  694.     Timer1.Enabled = False
  695.     Xt_Wait.Show
  696.     Xt_Wait.Refresh
  697.    
  698.     '加快显示速度
  699.     CxbbGrid.Redraw = False
  700.  
  701.     '生成查询结果
  702.     Call Sub_Query(0)
  703.     
  704.     '调整工具条
  705.     Call Sub_ToolBar
  706.    
  707.     CxbbGrid.Redraw = True
  708.     
  709.     Xt_Wait.Hide
  710. End Sub
  711. Private Sub Sub_Query(Int_QueryType As Integer)                                     '生成查询结果(Define)
  712.     
  713.     '过程参数:Int_QueryType 0-"点确定按钮"查询  1-"刷新"查询
  714.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  715.     Dim Coljsq As Long                          '网格列计数器
  716.     Dim Jsqte As Long                        '临时动态计数器
  717.     
  718.     '以下为自定义部分[
  719.  
  720.     If Int_QueryType = 0 Then   '0-"点确定按钮"查询
  721.         With Start_BillListCond
  722.          
  723.             '生成查询条件
  724.             Str_QueryCondi = " where 1=1 "
  725.             For Jsqte = 0 To 18
  726.                 Select Case Jsqte
  727.                     Case 0  '查询日期范围(起始)
  728.                         If Trim(.LrText(0).Text) <> "" Then
  729.                             Str_QueryCondi = Str_QueryCondi & " And a.whcode='" & Trim(.LrText(0).Tag) & "'"
  730.                         End If
  731.                     Case 1  '单据号(起始)
  732.                         If Trim(.LrText(1).Text) <> "" Then
  733.                             Str_QueryCondi = Str_QueryCondi & " And a.billnum>='" & Trim(.LrText(1).Text) & "'"
  734.                         End If
  735.                     Case 2  '单据号(终止)
  736.                         If Trim(.LrText(2).Text) <> "" Then
  737.                             Str_QueryCondi = Str_QueryCondi & " And a.billnum<= '" & Trim(.LrText(2).Text) & "'"
  738.                         End If
  739.                     Case 3  '查询日期范围(起始)
  740.                         If Trim(.LrText(3).Text) <> "" Then
  741.                             Str_QueryCondi = Str_QueryCondi & " And a.BillDate>='" & Trim(.LrText(3).Text) & "'"
  742.                         End If
  743.                     Case 4  '查询日期范围(终止)
  744.                         If Trim(.LrText(4).Text) <> "" Then
  745.                             Str_QueryCondi = Str_QueryCondi & " And a.BillDate<= '" & Trim(.LrText(4).Text) & "'"
  746.                         End If
  747.                     Case 5  '存货分类(Like)
  748.                         If Trim(.LrText(5).Text) <> "" Then
  749.                             Str_QueryCondi = Str_QueryCondi & " And a.invsortcode like '" & Trim(.LrText(5).Tag) & "%'"
  750.                         End If
  751.                     Case 6  '查询存货范围(起始)
  752.                         If Trim(.LrText(6).Text) <> "" Then
  753.                             Str_QueryCondi = Str_QueryCondi & " And a.mnumber>='" & Trim(.LrText(6).Text) & "'"
  754.                         End If
  755.                     Case 7  '查询存货范围(终止)
  756.                         If Trim(.LrText(7).Text) <> "" Then
  757.                             Str_QueryCondi = Str_QueryCondi & " And a.mnumber<= '" & Trim(.LrText(7).Text) & "'"
  758.                         End If
  759.                     Case 8  '供应商
  760.                         If Trim(.LrText(8).Text) <> "" Then
  761.                             Str_QueryCondi = Str_QueryCondi & " and a.suppliercode = '" & Trim(.LrText(8).Tag) & "'"
  762.                         End If
  763.                     Case 9  '部门
  764.                         If Trim(.LrText(9).Text) <> "" Then
  765.                             Str_QueryCondi = Str_QueryCondi & " and a.deptcode = '" & Trim(.LrText(9).Tag) & "'"
  766.                         End If
  767.                     Case 10  '入库类别
  768.                         If Trim(.LrText(10).Text) <> "" Then
  769.                             Str_QueryCondi = Str_QueryCondi & " and a.inoutclasscode = '" & Trim(.LrText(10).Tag) & "'"
  770.                         End If
  771.                     Case 11  '记帐状态
  772.                         If Not .Opt_Check(0).Value Then
  773.                             If .Opt_Check(1).Value Then
  774.                                 Str_QueryCondi = Str_QueryCondi & " and  a.chalkitupman <>'' "
  775.                             Else
  776.                                 Str_QueryCondi = Str_QueryCondi & " and  a.chalkitupman =''  "
  777.                             End If
  778.                         End If
  779.                      Case 12  '查询数量范围(起始)
  780.                         If Trim(.LrText(11).Text) <> "" Then
  781.                             Str_QueryCondi = Str_QueryCondi & " And a.quan>='" & Val(.LrText(11).Text) & "'"
  782.                         End If
  783.                      Case 13  '查询数量范围(终止)
  784.                         If Trim(.LrText(12).Text) <> "" Then
  785.                             Str_QueryCondi = Str_QueryCondi & " And a.quan<= '" & Val(.LrText(12).Text) & "'"
  786.                         End If
  787.                      Case 14  '查询金额范围(起始)
  788.                         If Trim(.LrText(13).Text) <> "" Then
  789.                             Str_QueryCondi = Str_QueryCondi & " And a.emoney>=" + .LrText(13).Text
  790.                         End If
  791.                      Case 15  '查询金额范围(终止)
  792.                         If Trim(.LrText(14).Text) <> "" Then
  793.                             Str_QueryCondi = Str_QueryCondi & " And a.emoney<= " + .LrText(14).Text
  794.                         End If
  795.                      Case 16  '业务员
  796.                         If Trim(.LrText(15).Text) <> "" Then
  797.                             Str_QueryCondi = Str_QueryCondi & " and a.personcode = '" & Trim(.LrText(15).Tag) & "'"
  798.                         End If
  799.                      Case 17  '制单人
  800.                         If Trim(.LrText(16).Text) <> "" Then
  801.                             Str_QueryCondi = Str_QueryCondi & " and a.maker = '" & Trim(.LrText(16).Text) & "'"
  802.                         End If
  803.                      Case 18  '记帐人
  804.                         If Trim(.LrText(17).Text) <> "" Then
  805.                             Str_QueryCondi = Str_QueryCondi & " and a.ChalkitupMan= '" & Trim(.LrText(17).Tag) & "'"
  806.                         End If
  807.                        
  808.                 End Select
  809.             Next Jsqte
  810.         End With
  811.     Else
  812.         '1-"刷新"查询
  813.         If Str_QueryCondi = "" Then
  814.             Str_QueryCondi = " where 1=2 "
  815.         End If
  816.     End If
  817.      
  818.     SqlStr = "SELECT * FROM Chhs_V_StartBill a LEFT OUTER JOIN Gy_WhLimit ON " & _
  819.             " a.Whcode = Gy_WhLimit.Whcode " & _
  820.              Trim(Str_QueryCondi) & " and Gy_WhLimit.czybm='" & Xtczybm & "'" & _
  821.              "Order By a.Whcode,a.StartInputMainId,a.StartInputSubId"
  822.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  823.     With Rec_Query
  824.         CxbbGrid.Rows = CxbbGrid.FixedRows
  825.         Jsqte = CxbbGrid.FixedRows
  826.         Do While Not .EOF
  827.             CxbbGrid.AddItem ""
  828.             '[>>自定义填充内容
  829.             CxbbGrid.TextMatrix(Jsqte, 0) = .Fields("StartInputMainId")                                                 '销售订单ID(主要用来查询定位用)
  830.             CxbbGrid.TextMatrix(Jsqte, Sydz("001", GridStr(), Szzls)) = Trim(.Fields("BillNum") & "")        '订单号
  831.             CxbbGrid.TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("WhName") & "")        '订单号
  832.             CxbbGrid.TextMatrix(Jsqte, Sydz("003", GridStr(), Szzls)) = Format(.Fields("BillDate"), "yyyy-mm-dd")  '订单日期
  833.             CxbbGrid.TextMatrix(Jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("SupplierName") & "")              '客户
  834.             CxbbGrid.TextMatrix(Jsqte, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("Deptname") & "")         '存货编码
  835.             CxbbGrid.TextMatrix(Jsqte, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("InoutClassName") & "")         '存货名称
  836.             CxbbGrid.TextMatrix(Jsqte, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("PersonName") & "")        '规格型号
  837.             CxbbGrid.TextMatrix(Jsqte, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("Maker") & "")        '规格型号
  838.             CxbbGrid.TextMatrix(Jsqte, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("Checker") & "")        '规格型号
  839.             CxbbGrid.TextMatrix(Jsqte, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("ChalkitupMan") & "")        '规格型号
  840.             CxbbGrid.TextMatrix(Jsqte, Sydz("019", GridStr(), Szzls)) = Trim(.Fields("Mnumber") & "")        '规格型号
  841.             CxbbGrid.TextMatrix(Jsqte, Sydz("011", GridStr(), Szzls)) = Trim(.Fields("MName") & "")        '规格型号
  842.             CxbbGrid.TextMatrix(Jsqte, Sydz("012", GridStr(), Szzls)) = Trim(.Fields("Model") & "")        '规格型号
  843.             CxbbGrid.TextMatrix(Jsqte, Sydz("013", GridStr(), Szzls)) = Trim(.Fields("PrimaryUnitName") & "")        '规格型号
  844.             CxbbGrid.TextMatrix(Jsqte, Sydz("020", GridStr(), Szzls)) = Trim(.Fields("kjyear") & "")        '规格型号
  845.             CxbbGrid.TextMatrix(Jsqte, Sydz("021", GridStr(), Szzls)) = Trim(.Fields("period") & "")        '规格型号
  846.             If .Fields("Quan") <> 0 Then                                                                            '单重
  847.                 CxbbGrid.TextMatrix(Jsqte, Sydz("014", GridStr(), Szzls)) = .Fields("Quan")
  848.             End If
  849.             If .Fields("PlanPrice") <> 0 Then                                                                            '单价
  850.                 CxbbGrid.TextMatrix(Jsqte, Sydz("015", GridStr(), Szzls)) = .Fields("PlanPrice")
  851.             End If
  852.             If .Fields("PlanMoney") <> 0 Then                                                                       '数量
  853.                 CxbbGrid.TextMatrix(Jsqte, Sydz("016", GridStr(), Szzls)) = .Fields("PlanMoney")
  854.             End If
  855.             If .Fields("Price") <> 0 Then                                                                         '总重
  856.                 CxbbGrid.TextMatrix(Jsqte, Sydz("017", GridStr(), Szzls)) = .Fields("Price")
  857.             End If
  858.             If .Fields("Emoney") <> 0 Then                                                                       '金额
  859.                 CxbbGrid.TextMatrix(Jsqte, Sydz("018", GridStr(), Szzls)) = .Fields("EMoney")
  860.             End If
  861.             
  862.             '<<]
  863.             '设置数据行高度(Fixed)
  864.             CxbbGrid.RowHeight(Jsqte) = Sjhgd
  865.      
  866.             '动态集指针加1,同时将计数器加1(Fixed)
  867.             .MoveNext
  868.             Jsqte = Jsqte + 1
  869.         Loop
  870.     End With
  871.     
  872.     '输入合计
  873.     With CxbbGrid
  874.         If Start_BillListCond.Chk_Sum.Value = 1 Then
  875.            .SubtotalPosition = flexSTBelow
  876.            For Jsqte = Qslz To .Cols - 1
  877.                 If GridBoolean(Jsqte, 4) Then
  878.                      .Subtotal flexSTSum, 0, Jsqte, , &HF7F3EC, , , , , True
  879.                 End If
  880.            Next
  881.            
  882.            For Jsqte = .FixedRows To .Rows - 1
  883.                 If .IsSubtotal(Jsqte) Then
  884.                     For Coljsq = Qslz To .Cols - 1
  885.                         If Val(.TextMatrix(Jsqte, Coljsq)) = 0 And GridBoolean(Coljsq, 4) Then
  886.                             .TextMatrix(Jsqte, Coljsq) = ""
  887.                         End If
  888.                     Next
  889.                     .TextMatrix(Jsqte, 0) = .TextMatrix(Jsqte - 1, 0)
  890.                     .TextMatrix(Jsqte, Sydz("002", GridStr(), Szzls)) = "    合计 "
  891.                     .RowHeight(Jsqte) = Sjhgd
  892.                 End If
  893.            Next
  894.         End If
  895.     End With
  896.     
  897.     ']以上为用户自定义部分
  898. End Sub
  899. Private Sub CxbbGrid_DblClick()                                              '用户双击网格调入相应单据
  900.     
  901.     Dim Rectemp As New ADODB.Recordset               '临时使用动态集
  902.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then Exit Sub
  903.     
  904.     '非数据行退出
  905.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  906.         Exit Sub
  907.     End If
  908.     SqlStr = "SELECT StartInputMainId From Chhs_StartInputMain Where StartInputMainId=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  909.     Set Rectemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  910.     With Rectemp
  911.         If .EOF Then
  912.             Tsxx = "此期初单据已被其他用户删除!"
  913.             Call Xtxxts(Tsxx, 0, 4)
  914.             Exit Sub
  915.         Else
  916.             '调入单据处理窗体
  917.             With Start_BillInput
  918.                 
  919.                 '填充查询单据标识
  920.                 XT_BillID = CxbbGrid.TextMatrix(CxbbGrid.Row, 0)
  921.                 Xtcdcsfz = Str_QueryCondi
  922.                 
  923.                 '设置单据处理为列表查询(修改)状态
  924.                 Xtcdcs = "2"
  925.                 
  926.                 .Show 1
  927.             End With
  928.             If Xtfhcs = "1" Then
  929.                 Tsxx = "期初单据发生变化,是否刷新期初单据列表?"
  930.                 yhAnswer = Xtxxts(Tsxx, 2, 2)
  931.                 If yhAnswer = 1 Then
  932.                     Xt_Wait.Show
  933.                     Xt_Wait.Refresh
  934.    
  935.                     '加快显示速度
  936.                     CxbbGrid.Redraw = False
  937.  
  938.                     '生成查询结果
  939.                     Call Sub_Query(1)
  940.    
  941.                     CxbbGrid.Redraw = True
  942.                     Xt_Wait.Hide
  943.                 End If
  944.             End If
  945.         End If
  946.     End With
  947. End Sub
  948. Private Sub Sub_AddBill()                                              '新增单据
  949. Dim Rectemp As Recordset
  950. Dim mYear As Integer
  951.     mYear = PGKjYear
  952.     
  953.     If Xtyear <> mYear Then
  954.         Tsxx = "操作日期不在当前会计年度(" + Trim(Str(mYear)) + "),请重新登录!"
  955.         Call Xtxxts(Tsxx, 0, 1)
  956.         Exit Sub
  957.     End If
  958.     
  959.     Set Rectemp = Cw_DataEnvi.DataConnect.Execute("select * from gy_kjrlb where kjyear=" & mYear & " and beginflag=1")
  960.     If Rectemp.EOF Then
  961.         Tsxx = "非开帐年度,不允许期初单据录入!"
  962.         Call Xtxxts(Tsxx, 0, 4)
  963.         Exit Sub
  964.     Else
  965.         If Xtmm <> StartMon Then
  966.             If Not Rectemp.Fields("chhsjzbz") Then
  967.                 Tsxx = "操作日期不在当前会计期间(" + Trim(Str(mYear)) + "." + Trim(Str(StartMon)) + "),请重新登录!"
  968.                 Call Xtxxts(Tsxx, 0, 1)
  969.                 Exit Sub
  970.             Else
  971.                 If Rectemp.Fields("chhsjzbz") Then
  972.                     Tsxx = "非开帐月份,不允许期初单据录入!"
  973.                     Call Xtxxts(Tsxx, 0, 1)
  974.                     Exit Sub
  975.                 End If
  976.             End If
  977.         Else
  978.             If Rectemp.Fields("chhsjzbz") Then
  979.                 Tsxx = "开帐月份已结帐,不允许期初单据录入!"
  980.                 Call Xtxxts(Tsxx, 0, 1)
  981.                 Exit Sub
  982.             End If
  983.         End If
  984.     End If
  985.     
  986.     Set Rectemp = Nothing
  987.      
  988.     With Start_BillInput
  989.    
  990.         '设置单据处理为填制单据状态
  991.         Xtcdcs = "1"
  992.         .Show 1
  993.     End With
  994.        
  995.     If Xtfhcs = "1" Then
  996.         Tsxx = "期初单据发生变化,是否刷新期初单据列表?"
  997.         yhAnswer = Xtxxts(Tsxx, 2, 2)
  998.         If yhAnswer = 1 Then
  999.             Xt_Wait.Show
  1000.             Xt_Wait.Refresh
  1001.    
  1002.             '加快显示速度
  1003.             CxbbGrid.Redraw = False
  1004.  
  1005.             '生成查询结果
  1006.             Call Sub_Query(1)
  1007.    
  1008.             CxbbGrid.Redraw = True
  1009.             Xt_Wait.Hide
  1010.         End If
  1011.     End If
  1012.    
  1013. End Sub
  1014. Private Sub Sub_DeleteBill()                                            '删除选中当前销售订单
  1015.     
  1016.     Dim YAnswer As Integer
  1017.     Dim Lng_BillID As Long           '单据标识
  1018.   
  1019.     '非数据行退出
  1020.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  1021.         Exit Sub
  1022.     End If
  1023.     
  1024.     Tsxx = "请确认是否删除当前期初单据?"
  1025.     yhAnswer = Xtxxts(Tsxx, 2, 2)
  1026.   
  1027.     If yhAnswer = 1 Then
  1028.         '1.判断当前期初单据是否允许删除
  1029.         If Not Fun_AllowDelete Then
  1030.             Exit Sub
  1031.         End If
  1032.         '2.删除单据所有内容
  1033.         Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1034.         On Error GoTo Swcwcl
  1035.         Cw_DataEnvi.DataConnect.BeginTrans
  1036.         Cw_DataEnvi.DataConnect.Execute ("Delete Chhs_StartInputSub Where StartInputMainId=" & Lng_BillID)         '删除单据子表内容
  1037.         Cw_DataEnvi.DataConnect.Execute ("Delete Chhs_StartInputMain Where StartInputMainId=" & Lng_BillID)        '删除单据主表内容
  1038.         Cw_DataEnvi.DataConnect.CommitTrans
  1039.       
  1040.         '删除网格中单据数据
  1041.         Jsqte = CxbbGrid.FixedRows
  1042.         Do While Jsqte <= CxbbGrid.Rows - 1
  1043.             Jsqte = CxbbGrid.FindRow(Lng_BillID, Jsqte, 0)
  1044.             If Jsqte > 0 Then
  1045.                 CxbbGrid.RemoveItem (Jsqte)
  1046.             Else
  1047.                 Exit Do
  1048.             End If
  1049.         Loop
  1050.     Else
  1051.         Exit Sub
  1052.     End If
  1053.     Exit Sub
  1054. Swcwcl:
  1055.     Cw_DataEnvi.DataConnect.RollbackTrans
  1056.     Tsxx = "删除期初单据过程中出现未知错误,程序自动恢复删除前状态!"
  1057.     Call Xtxxts(Tsxx, 0, 1)
  1058.     Exit Sub
  1059.   
  1060. End Sub
  1061. Private Function Fun_AllowDelete() As Boolean                                        '判断当前单据是否允许删除
  1062.   
  1063.     Dim Rectemp As New ADODB.Recordset     '临时使用动态集
  1064.     Dim SqlStr As String                   '查询字符串
  1065.     Dim Lng_BillID As Long                 '单据ID
  1066.   
  1067.     Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1068.     SqlStr = "Select Checker,ChalkitupMan From Chhs_StartInputMain Where StartInputMainId=" & Lng_BillID
  1069.     Set Rectemp = Cw_DataEnvi.DataConnect.Execute(SqlStr)
  1070.     With Rectemp
  1071.         If Not .EOF Then
  1072.             If Trim(.Fields("Checker") & "") <> "" Or Trim(.Fields("ChalkitupMan") & "") <> "" Then
  1073.                 Tsxx = "该期初单据已审核或已记帐,不能删除!"
  1074.                 Call Xtxxts(Tsxx, 0, 4)
  1075.                 Exit Function
  1076.             End If
  1077.             End If
  1078.     End With
  1079.     Fun_AllowDelete = True
  1080.   
  1081. End Function
  1082. Private Sub Sub_ToolBar()          '设置工具条按钮
  1083.     
  1084.     '无查询记录时,单据和删除按钮不可选
  1085.     With SzToolbar
  1086.         If CxbbGrid.Rows = CxbbGrid.FixedRows Then
  1087.             .Buttons("Bill").Enabled = False
  1088.             .Buttons("sc").Enabled = False
  1089.         Else
  1090.             .Buttons("Bill").Enabled = True
  1091.             .Buttons("sc").Enabled = True
  1092.         End If
  1093.     End With
  1094.     
  1095. End Sub
  1096. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1097.     
  1098.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1099.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1100.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1101.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1102.     ReDim Bbxbt(1 To Bbxbtgs)
  1103.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1104.     If Bbbwhgs <> 0 Then
  1105.         ReDim Bbbwh(1 To Bbbwhgs)
  1106.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1107.     End If
  1108.     Bbzbt = ReportTitle
  1109.     Bbxbt(1) = ""
  1110.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1111.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1112.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1113.     If Not bbylte Then
  1114.         Unload DY_Tybbyldy
  1115.     End If
  1116. End Sub