上传用户: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 KF_FrmMateOutList 
  5.    Caption         =   "材料出库单列表"
  6.    ClientHeight    =   8595
  7.    ClientLeft      =   315
  8.    ClientTop       =   390
  9.    ClientWidth     =   11820
  10.    HelpContextID   =   1214004
  11.    Icon            =   "出库_材料出库单列表.frx":0000
  12.    KeyPreview      =   -1  'True
  13.    LinkTopic       =   "Form1"
  14.    MDIChild        =   -1  'True
  15.    ScaleHeight     =   8595
  16.    ScaleWidth      =   11820
  17.    WindowState     =   2  'Maximized
  18.    Begin MSComctlLib.Toolbar GsToolbar 
  19.       Height          =   525
  20.       Left            =   9330
  21.       TabIndex        =   3
  22.       Top             =   30
  23.       Width           =   2475
  24.       _ExtentX        =   4366
  25.       _ExtentY        =   926
  26.       ButtonWidth     =   1455
  27.       ButtonHeight    =   926
  28.       Appearance      =   1
  29.       Style           =   1
  30.       ImageList       =   "ImageList2"
  31.       _Version        =   393216
  32.       BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
  33.          NumButtons      =   3
  34.          BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  35.             Caption         =   "保存格式"
  36.             Key             =   "bcgs"
  37.             ImageKey        =   "bcgs"
  38.          EndProperty
  39.          BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  40.             Caption         =   "默认列宽"
  41.             Key             =   "hfmrgs"
  42.             ImageKey        =   "mrlk"
  43.          EndProperty
  44.          BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
  45.             Caption         =   "显示项目"
  46.             Key             =   "szxsxm"
  47.             ImageKey        =   "xsxm"
  48.          EndProperty
  49.       EndProperty
  50.    End
  51.    Begin VB.PictureBox Pic_Title 
  52.       Height          =   825
  53.       Left            =   0
  54.       Picture         =   "出库_材料出库单列表.frx":1042
  55.       ScaleHeight     =   765
  56.       ScaleWidth      =   11715
  57.       TabIndex        =   1
  58.       Top             =   570
  59.       Width           =   11775
  60.       Begin VB.Label Lab_Title 
  61.          BackColor       =   &H80000018&
  62.          BackStyle       =   0  'Transparent
  63.          Caption         =   "材料出库单列表"
  64.          BeginProperty Font 
  65.             Name            =   "宋体"
  66.             Size            =   12
  67.             Charset         =   134
  68.             Weight          =   700
  69.             Underline       =   0   'False
  70.             Italic          =   0   'False
  71.             Strikethrough   =   0   'False
  72.          EndProperty
  73.          ForeColor       =   &H00000000&
  74.          Height          =   300
  75.          Index           =   4
  76.          Left            =   480
  77.          TabIndex        =   2
  78.          Top             =   210
  79.          Width           =   2715
  80.       End
  81.    End
  82.    Begin VB.Timer Timer1 
  83.       Enabled         =   0   'False
  84.       Interval        =   1
  85.       Left            =   7620
  86.       Top             =   90
  87.    End
  88.    Begin VSFlex8Ctl.VSFlexGrid CxbbGrid 
  89.       Height          =   7545
  90.       Left            =   0
  91.       TabIndex        =   0
  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":1DF82
  198.                Key             =   "sz"
  199.             EndProperty
  200.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  201.                Picture         =   "出库_材料出库单列表.frx":1E31C
  202.                Key             =   "dy"
  203.             EndProperty
  204.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  205.                Picture         =   "出库_材料出库单列表.frx":1E6B6
  206.                Key             =   "yl"
  207.             EndProperty
  208.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  209.                Picture         =   "出库_材料出库单列表.frx":1EA50
  210.                Key             =   "xg"
  211.             EndProperty
  212.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  213.                Picture         =   "出库_材料出库单列表.frx":1EDEA
  214.                Key             =   "zh"
  215.             EndProperty
  216.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  217.                Picture         =   "出库_材料出库单列表.frx":1F184
  218.                Key             =   "sh"
  219.             EndProperty
  220.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  221.                Picture         =   "出库_材料出库单列表.frx":1F51E
  222.                Key             =   "bc"
  223.             EndProperty
  224.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  225.                Picture         =   "出库_材料出库单列表.frx":1F8B8
  226.                Key             =   "fq"
  227.             EndProperty
  228.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  229.                Picture         =   "出库_材料出库单列表.frx":1FC52
  230.                Key             =   "bz"
  231.             EndProperty
  232.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  233.                Picture         =   "出库_材料出库单列表.frx":1FFEC
  234.                Key             =   "tc"
  235.             EndProperty
  236.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  237.                Picture         =   "出库_材料出库单列表.frx":20386
  238.                Key             =   "bcgs"
  239.             EndProperty
  240.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  241.                Picture         =   "出库_材料出库单列表.frx":20720
  242.                Key             =   "mrlk"
  243.             EndProperty
  244.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  245.                Picture         =   "出库_材料出库单列表.frx":20ABA
  246.                Key             =   "xsxm"
  247.             EndProperty
  248.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  249.                Picture         =   "出库_材料出库单列表.frx":20E54
  250.                Key             =   "first"
  251.             EndProperty
  252.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  253.                Picture         =   "出库_材料出库单列表.frx":211EE
  254.                Key             =   "prev"
  255.             EndProperty
  256.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  257.                Picture         =   "出库_材料出库单列表.frx":21588
  258.                Key             =   "next"
  259.             EndProperty
  260.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  261.                Picture         =   "出库_材料出库单列表.frx":21922
  262.                Key             =   "last"
  263.             EndProperty
  264.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  265.                Picture         =   "出库_材料出库单列表.frx":21CBC
  266.                Key             =   "xx"
  267.             EndProperty
  268.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  269.                Picture         =   "出库_材料出库单列表.frx":22056
  270.                Key             =   "define"
  271.             EndProperty
  272.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  273.                Picture         =   "出库_材料出库单列表.frx":223F0
  274.                Key             =   "exec"
  275.             EndProperty
  276.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  277.                Picture         =   "出库_材料出库单列表.frx":2278A
  278.                Key             =   "xz"
  279.             EndProperty
  280.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  281.                Picture         =   "出库_材料出库单列表.frx":22B24
  282.                Key             =   "sc"
  283.             EndProperty
  284.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  285.                Picture         =   "出库_材料出库单列表.frx":22EBE
  286.                Key             =   "sx"
  287.             EndProperty
  288.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  289.                Picture         =   "出库_材料出库单列表.frx":23258
  290.                Key             =   "cx"
  291.             EndProperty
  292.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  293.                Picture         =   "出库_材料出库单列表.frx":235F2
  294.                Key             =   "zd"
  295.             EndProperty
  296.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  297.                Picture         =   "出库_材料出库单列表.frx":2398C
  298.                Key             =   "dz"
  299.             EndProperty
  300.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  301.                Picture         =   "出库_材料出库单列表.frx":23D26
  302.                Key             =   "ph"
  303.             EndProperty
  304.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  305.                Picture         =   "出库_材料出库单列表.frx":240C0
  306.                Key             =   "fz"
  307.             EndProperty
  308.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  309.                Picture         =   "出库_材料出库单列表.frx":2445A
  310.                Key             =   "dw"
  311.             EndProperty
  312.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  313.                Picture         =   "出库_材料出库单列表.frx":247F4
  314.                Key             =   "hf"
  315.             EndProperty
  316.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  317.                Picture         =   "出库_材料出库单列表.frx":24B8E
  318.                Key             =   "pz"
  319.             EndProperty
  320.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  321.                Picture         =   "出库_材料出库单列表.frx":24F28
  322.                Key             =   "check"
  323.             EndProperty
  324.             BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  325.                Picture         =   "出库_材料出库单列表.frx":252C2
  326.                Key             =   "qs"
  327.             EndProperty
  328.             BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  329.                Picture         =   "出库_材料出库单列表.frx":2565C
  330.                Key             =   "fullcheck"
  331.             EndProperty
  332.             BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  333.                Picture         =   "出库_材料出库单列表.frx":259F6
  334.                Key             =   "qq"
  335.             EndProperty
  336.             BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  337.                Picture         =   "出库_材料出库单列表.frx":25D90
  338.                Key             =   "bcw"
  339.             EndProperty
  340.             BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  341.                Picture         =   "出库_材料出库单列表.frx":2612A
  342.                Key             =   "ye"
  343.             EndProperty
  344.             BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  345.                Picture         =   "出库_材料出库单列表.frx":264C4
  346.                Key             =   ""
  347.             EndProperty
  348.             BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  349.                Picture         =   "出库_材料出库单列表.frx":2685E
  350.                Key             =   "frist"
  351.             EndProperty
  352.             BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  353.                Picture         =   "出库_材料出库单列表.frx":26BF8
  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           =   11820
  366.       _ExtentX        =   20849
  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":26F92
  447.                Key             =   "sz"
  448.             EndProperty
  449.             BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  450.                Picture         =   "出库_材料出库单列表.frx":2732C
  451.                Key             =   "dy"
  452.             EndProperty
  453.             BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  454.                Picture         =   "出库_材料出库单列表.frx":276C6
  455.                Key             =   "yl"
  456.             EndProperty
  457.             BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  458.                Picture         =   "出库_材料出库单列表.frx":27A60
  459.                Key             =   "xg"
  460.             EndProperty
  461.             BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  462.                Picture         =   "出库_材料出库单列表.frx":27DFA
  463.                Key             =   "zh"
  464.             EndProperty
  465.             BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  466.                Picture         =   "出库_材料出库单列表.frx":28194
  467.                Key             =   "sh"
  468.             EndProperty
  469.             BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  470.                Picture         =   "出库_材料出库单列表.frx":2852E
  471.                Key             =   "bc"
  472.             EndProperty
  473.             BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  474.                Picture         =   "出库_材料出库单列表.frx":288C8
  475.                Key             =   "fq"
  476.             EndProperty
  477.             BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  478.                Picture         =   "出库_材料出库单列表.frx":28C62
  479.                Key             =   "bz"
  480.             EndProperty
  481.             BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  482.                Picture         =   "出库_材料出库单列表.frx":28FFC
  483.                Key             =   "tc"
  484.             EndProperty
  485.             BeginProperty ListImage11 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  486.                Picture         =   "出库_材料出库单列表.frx":29396
  487.                Key             =   "bcgs"
  488.             EndProperty
  489.             BeginProperty ListImage12 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  490.                Picture         =   "出库_材料出库单列表.frx":29730
  491.                Key             =   "mrlk"
  492.             EndProperty
  493.             BeginProperty ListImage13 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  494.                Picture         =   "出库_材料出库单列表.frx":29ACA
  495.                Key             =   "xsxm"
  496.             EndProperty
  497.             BeginProperty ListImage14 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  498.                Picture         =   "出库_材料出库单列表.frx":29E64
  499.                Key             =   "first"
  500.             EndProperty
  501.             BeginProperty ListImage15 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  502.                Picture         =   "出库_材料出库单列表.frx":2A1FE
  503.                Key             =   "prev"
  504.             EndProperty
  505.             BeginProperty ListImage16 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  506.                Picture         =   "出库_材料出库单列表.frx":2A598
  507.                Key             =   "next"
  508.             EndProperty
  509.             BeginProperty ListImage17 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  510.                Picture         =   "出库_材料出库单列表.frx":2A932
  511.                Key             =   "last"
  512.             EndProperty
  513.             BeginProperty ListImage18 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  514.                Picture         =   "出库_材料出库单列表.frx":2ACCC
  515.                Key             =   "xx"
  516.             EndProperty
  517.             BeginProperty ListImage19 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  518.                Picture         =   "出库_材料出库单列表.frx":2B066
  519.                Key             =   "define"
  520.             EndProperty
  521.             BeginProperty ListImage20 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  522.                Picture         =   "出库_材料出库单列表.frx":2B400
  523.                Key             =   "exec"
  524.             EndProperty
  525.             BeginProperty ListImage21 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  526.                Picture         =   "出库_材料出库单列表.frx":2B79A
  527.                Key             =   "xz"
  528.             EndProperty
  529.             BeginProperty ListImage22 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  530.                Picture         =   "出库_材料出库单列表.frx":2BB34
  531.                Key             =   "sc"
  532.             EndProperty
  533.             BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  534.                Picture         =   "出库_材料出库单列表.frx":2BECE
  535.                Key             =   "sx"
  536.             EndProperty
  537.             BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  538.                Picture         =   "出库_材料出库单列表.frx":2C268
  539.                Key             =   "cx"
  540.             EndProperty
  541.             BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  542.                Picture         =   "出库_材料出库单列表.frx":2C602
  543.                Key             =   "zd"
  544.             EndProperty
  545.             BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  546.                Picture         =   "出库_材料出库单列表.frx":2C99C
  547.                Key             =   "dz"
  548.             EndProperty
  549.             BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  550.                Picture         =   "出库_材料出库单列表.frx":2CD36
  551.                Key             =   "ph"
  552.             EndProperty
  553.             BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  554.                Picture         =   "出库_材料出库单列表.frx":2D0D0
  555.                Key             =   "fz"
  556.             EndProperty
  557.             BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  558.                Picture         =   "出库_材料出库单列表.frx":2D46A
  559.                Key             =   "dw"
  560.             EndProperty
  561.             BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  562.                Picture         =   "出库_材料出库单列表.frx":2D804
  563.                Key             =   "hf"
  564.             EndProperty
  565.             BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  566.                Picture         =   "出库_材料出库单列表.frx":2DB9E
  567.                Key             =   "pz"
  568.             EndProperty
  569.             BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628} 
  570.                Picture         =   "出库_材料出库单列表.frx":2DF38
  571.                Key             =   "check"
  572.             EndProperty
  573.          EndProperty
  574.       End
  575.    End
  576. End
  577. Attribute VB_Name = "KF_FrmMateOutList"
  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/29
  588. '*    备        注:程序中所有依实际情况自定义部分均用[>>  <<]括起
  589. '**************************************************************************
  590. Dim ReportTitle As String                '报表主标题
  591. Dim Str_QueryCondi As String             '用户录入查询条件
  592. Dim Rec_BillID As New ADODB.Recordset    '用户查询单据ID动态集
  593. Dim intFatherID() As Integer
  594. Dim intChildID() As Integer
  595. Dim IsQc() As Boolean
  596. Dim intCount As Integer
  597. Dim Str_RightEdit As String                     '单据编辑(新增、修改、删除)权限索引
  598. '以下为固定使用变量
  599. Dim Dyymctbl As New DY_Dyymsz            '打印页面窗体变量
  600. Dim GridCode As String                   '显示网格网格代码
  601. Dim GridInf() As Variant                 '整个网格设置信息
  602. Dim Tsxx As String                       '系统提示信息
  603. Dim Qslz As Long                         '网格隐藏(非操作显示)列数
  604. Dim Sjhgd As Double                      '网格数据行高度
  605. Dim Sfxshjwg As Boolean                  '是否显示合计网格
  606. Dim GridBoolean() As Boolean             '网格列信息(布尔型)
  607. Dim GridStr()  As String                 '网格列信息(字符型)
  608. Dim GridInt() As Integer                 '网格列信息(整型)
  609. Dim Szzls As Integer                     '数组总列数(网格列数-1)
  610. Private Sub Form_Resize()                '根据窗体大小来调整网格,标题栏大小(Fixed)
  611.     On Error Resume Next
  612.     With CxbbGrid
  613.         .Width = Me.Width - 160
  614.         .Height = Me.Height - .Top - 400
  615.     End With
  616.     With Pic_Title
  617.         .Width = Me.Width - 160
  618.     End With
  619.     
  620.     GsToolbar.Left = Me.Width - GsToolbar.Width - 140
  621. End Sub
  622. Private Sub Form_Load()                                                   '窗体装入
  623.     '单据权限索引设置
  624.     Str_RightEdit = "Kf_MateOut_edit"
  625.     '调入打印页面设置窗体
  626.     ReportTitle = "材料出库单列表"
  627.     XtReportCode = "kf_MateOutList"
  628.     Load Dyymctbl
  629.       
  630.     '调整标题栏及网格、格式工具条位置(Fixed)
  631.     Pic_Title.Left = 40
  632.     Pic_Title.Top = SzToolbar.Top + SzToolbar.Height - 10
  633.     CxbbGrid.Left = Pic_Title.Left
  634.     CxbbGrid.Top = Pic_Title.Top + Pic_Title.Height + 20
  635.      
  636.     '调 入 网 格(Fixed)
  637.     GridCode = "kf_MateOutList"
  638.     Call BzWgcsh(CxbbGrid, GridCode, GridInf(), GridBoolean(), GridInt(), GridStr())
  639.       
  640.     Qslz = GridInf(1)
  641.     Sjhgd = GridInf(2)
  642.     Sfxshjwg = GridInf(7)
  643.     Szzls = CxbbGrid.Cols - 1
  644. End Sub
  645. Private Sub Form_Unload(Cancel As Integer)                                  '窗体卸载
  646.     '卸载条件窗体
  647.     KF_FrmMateOutQuery.UnloadCheck.Value = 1
  648.     Unload KF_FrmMateOutQuery
  649.     
  650.     '卸载打印页面设置窗体
  651.     Unload Dyymctbl
  652. End Sub
  653. Private Sub CxbbGrid_BeforeMoveColumn(ByVal Col As Long, Position As Long)           '网格列发生移动时自动交换网格索引信息
  654.     Call FnBln_RefreshArray(Col, Position, GridStr(), GridInf())
  655. End Sub
  656. Private Sub GsToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)                '网格格式调整(Fixed)
  657.   
  658.     Select Case Button.Key
  659.         Case "bcgs"                                          '保存表格格式
  660.             Call Bcwggs(CxbbGrid, GridCode, GridStr())
  661.         Case "hfmrgs"                                        '恢复默认格式
  662.             Call Hfmrgs(CxbbGrid, GridCode, GridStr())
  663.         Case "szxsxm"                                        '设置显示项目
  664.             Call Szxsxm(CxbbGrid, GridCode)
  665.     End Select
  666. End Sub
  667. Private Sub SzToolbar_ButtonClick(ByVal Button As MSComctlLib.Button)
  668.     
  669.     Select Case Button.Key
  670.         Case "ymsz"                                          '页面设置
  671.             Dyymctbl.Show 1
  672.         Case "yl"                                            '预 览
  673.             Call bbyl(True)
  674.         Case "dy"                                            '打 印
  675.             Call bbyl(False)
  676.         Case "cx"                                            '查 询
  677.             KF_FrmMateOutQuery.Show 1
  678.         Case "Bill"                                          '单 据
  679.             Call CxbbGrid_DblClick
  680.         Case "xz"                                            '新 增
  681.             Call Sub_AddBill
  682.         Case "sc"                                            '删 除
  683.             Call Sub_DeleteBill
  684.         Case "bz"                                            '帮 助
  685.             Call F1bz
  686.         Case "fh"                                            '退 出
  687.            Unload Me
  688.     End Select
  689. End Sub
  690. Private Sub Timer1_Timer()                                 '在窗体激活后调入查询程序
  691.     
  692.     Timer1.Enabled = False
  693.     Xt_Wait.Show
  694.     Xt_Wait.Refresh
  695.    
  696.     '加快显示速度
  697.     CxbbGrid.Redraw = False
  698.  
  699.     '生成查询结果
  700.     Call Sub_Query(0)
  701.    
  702.     CxbbGrid.Redraw = True
  703.     
  704.     Xt_Wait.Hide
  705. End Sub
  706. Private Sub Sub_Query(Int_QueryType As Integer)                                     '生成查询结果(Define)
  707.     
  708.     '过程参数:Int_QueryType 0-"点确定按钮"查询  1-"刷新"查询
  709.     Dim Rec_Query As New ADODB.Recordset        '查询结果动态集
  710.     Dim Coljsq As Long                          '网格列计数器
  711.     Dim jsqte As Long                        '临时动态计数器
  712.     Dim adoRe As New ADODB.Recordset
  713.     
  714.     '以下为自定义部分[
  715.  
  716.     If Int_QueryType = 0 Then   '0-"点确定按钮"查询
  717.         With KF_FrmMateOutQuery
  718.          
  719.             '生成查询条件
  720.             Str_QueryCondi = " where 1=1 "
  721.             For jsqte = 0 To 12
  722.                 Select Case jsqte
  723.                     Case 0              '开始日期--------结束日期
  724.                         If Trim(.LrText(0).Text) <> "" Then
  725.                             If Trim(.LrText(1).Text) <> "" Then
  726.                                 Str_QueryCondi = Str_QueryCondi & " and billdate between '" & CDate(Trim(.LrText(0).Text)) & "' and '" & CDate(Trim(.LrText(1).Text)) & "'"
  727.                             Else
  728.                                 Str_QueryCondi = Str_QueryCondi & " and billdate>='" & CDate(Trim(.LrText(0).Text)) & "'"
  729.                             End If
  730.                         Else
  731.                            If Trim(.LrText(1).Text) <> "" Then
  732.                               Str_QueryCondi = Str_QueryCondi & " and billdate<='" & CDate(Trim(.LrText(1).Text)) & "'"
  733.                            Else
  734.                            End If
  735.                         End If
  736.                     Case 1                  '单据号
  737.                         If Trim(.LrText(2).Text) <> "" Then
  738.                             Str_QueryCondi = Str_QueryCondi & " And BillNum>='" & Trim(.LrText(2).Text) & "'"
  739.                         End If
  740.                     Case 2                  '单据号
  741.                         If Trim(.LrText(3).Text) <> "" Then
  742.                             Str_QueryCondi = Str_QueryCondi & " And BillNum<='" & Trim(.LrText(3).Text) & "'"
  743.                         End If
  744.                     Case 3                  '仓库
  745.                         If Trim(.LrText(4).Tag) <> "" Then
  746.                             Str_QueryCondi = Str_QueryCondi & " And WhCode='" & Trim(.LrText(4).Tag) & "'"
  747.                         End If
  748.                     Case 4                  '领料申请单号
  749.                         If Trim(.LrText(5).Tag) <> "" Then
  750.                             Str_QueryCondi = Str_QueryCondi & " And IssueID=" & Trim(.LrText(5).Tag)
  751.                         End If
  752.                     Case 5                  '领料部门
  753.                         If Trim(.LrText(6).Tag) <> "" Then
  754.                             Str_QueryCondi = Str_QueryCondi & " and deptCode ='" & Trim(.LrText(6).Tag) & "'"
  755.                         End If
  756.                     Case 6                  '物料分类
  757.                         If Trim(.LrText(7).Text) <> "" Then
  758.                             Str_QueryCondi = Str_QueryCondi & " and InvSortCode like '" & Trim(.LrText(7).Tag) & "%'"
  759.                         End If
  760.                     Case 7                  '物料编码
  761.                         If Trim(.LrText(8).Text) <> "" Then
  762.                             Str_QueryCondi = Str_QueryCondi & " and MNumber = '" & Trim(.LrText(8).Text) & "'"
  763.                         End If
  764.                     Case 8                  '数量
  765.                         If Trim(.LrText(11).Text) <> "" Then
  766.                             Str_QueryCondi = Str_QueryCondi & " And FactIssueQuan>=" & Val(.LrText(11).Text)
  767.                         End If
  768.                     Case 9                  '数量
  769.                         If Trim(.LrText(12).Text) <> "" Then
  770.                             Str_QueryCondi = Str_QueryCondi & " And FactIssueQuan<=" & Val(.LrText(12).Text)
  771.                         End If
  772.                     Case 10                 '金额
  773.                         If Trim(.LrText(9).Text) <> "" Then
  774.                             Str_QueryCondi = Str_QueryCondi & " And IssueMoney>=" & Val(.LrText(9).Text)
  775.                         End If
  776.                     Case 11                 '金额
  777.                         If Trim(.LrText(10).Text) <> "" Then
  778.                             Str_QueryCondi = Str_QueryCondi & " And IssueMoney<=" & Val(.LrText(10).Text)
  779.                         End If
  780.                     Case 12                 '货区
  781.                         If Trim(.LrText(13).Text) <> "" Then
  782.                             Str_QueryCondi = Str_QueryCondi & " And MArea like '" & Trim(.LrText(13).Tag) & "%'"
  783.                         End If
  784.                 End Select
  785.             Next jsqte
  786.         End With
  787.     Else
  788.         '1-"刷新"查询
  789.         If Str_QueryCondi = "" Then
  790.             Str_QueryCondi = " where 1=2 "
  791.         End If
  792.     End If
  793.     '审核状态
  794.     If KF_FrmMateOutQuery.OptCheck(1) Then   '未审核
  795.         Str_QueryCondi = Str_QueryCondi & " and KFChecker=''"
  796.     End If
  797.     If KF_FrmMateOutQuery.OptCheck(2) Then   '已审核
  798.         Str_QueryCondi = Str_QueryCondi & " and KFChecker<>''"
  799.     End If
  800.      
  801.     Sqlstr = "SELECT * From KF_V_MateOut " & Str_QueryCondi & " order by  InOutMainId"
  802.            
  803.     Set Rec_Query = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  804.     With Rec_Query
  805.         CxbbGrid.Rows = CxbbGrid.FixedRows
  806.         jsqte = CxbbGrid.FixedRows
  807.         Do While Not .EOF
  808.             CxbbGrid.AddItem ""
  809.             '[>>自定义填充内容
  810.             CxbbGrid.TextMatrix(jsqte, 0) = .Fields("InOutMainId")                                                  '材料出库单ID(主要用来查询定位用)
  811.             CxbbGrid.TextMatrix(jsqte, Sydz("001", GridStr(), Szzls)) = Format(.Fields("BillDate"), "yyyy-mm-dd")               '订单日期
  812.             CxbbGrid.TextMatrix(jsqte, Sydz("002", GridStr(), Szzls)) = Trim(.Fields("whName") & "")                '仓库名称
  813.             CxbbGrid.TextMatrix(jsqte, Sydz("003", GridStr(), Szzls)) = Trim(.Fields("billnum") & "")               '单据号
  814.             CxbbGrid.TextMatrix(jsqte, Sydz("004", GridStr(), Szzls)) = Trim(.Fields("DeptName") & "")              '部门
  815.             CxbbGrid.TextMatrix(jsqte, Sydz("005", GridStr(), Szzls)) = Trim(.Fields("IssueNum") & "")              '申请单号
  816.             CxbbGrid.TextMatrix(jsqte, Sydz("006", GridStr(), Szzls)) = Trim(.Fields("mnumber") & "")               '物料编码
  817.             CxbbGrid.TextMatrix(jsqte, Sydz("007", GridStr(), Szzls)) = Trim(.Fields("mname") & "")                 '物料名称
  818.             CxbbGrid.TextMatrix(jsqte, Sydz("008", GridStr(), Szzls)) = Trim(.Fields("Model") & "")                 '规格型号
  819.             CxbbGrid.TextMatrix(jsqte, Sydz("009", GridStr(), Szzls)) = Trim(.Fields("BatchNum") & "")              '批次
  820.             CxbbGrid.TextMatrix(jsqte, Sydz("010", GridStr(), Szzls)) = Trim(.Fields("Mareaname") & "")             '货区
  821.             
  822.             If .Fields("FactIssuequan") <> 0 Then                                                                            '单重
  823.                 CxbbGrid.TextMatrix(jsqte, Sydz("011", GridStr(), Szzls)) = .Fields("FactIssuequan")
  824.             End If
  825.             If .Fields("price") <> 0 Then                                                                           '单价
  826.                 CxbbGrid.TextMatrix(jsqte, Sydz("012", GridStr(), Szzls)) = .Fields("price")
  827.             End If
  828.             If .Fields("IssueMoney") <> 0 Then                                                                      '数量
  829.                 CxbbGrid.TextMatrix(jsqte, Sydz("013", GridStr(), Szzls)) = .Fields("IssueMoney")
  830.             End If
  831.             CxbbGrid.TextMatrix(jsqte, Sydz("014", GridStr(), Szzls)) = Trim(.Fields("Maker") & "")                 '制单人
  832.             CxbbGrid.TextMatrix(jsqte, Sydz("015", GridStr(), Szzls)) = Trim(.Fields("KFChecker") & "")             '审核人
  833.             CxbbGrid.TextMatrix(jsqte, Sydz("016", GridStr(), Szzls)) = Trim(.Fields("ChalkitupMan") & "")          '记帐人
  834.             
  835.             '<<]
  836.             '设置数据行高度(Fixed)
  837.             CxbbGrid.RowHeight(jsqte) = Sjhgd
  838.             '设置背景颜色
  839.             If .Fields("RedBlueFlag") = 1 Then
  840.                 CxbbGrid.Cell(flexcpForeColor, jsqte, Qslz, jsqte, CxbbGrid.Cols - 1) = &HFF&
  841.             End If
  842.      
  843.             '动态集指针加1,同时将计数器加1(Fixed)
  844.             .MoveNext
  845.             jsqte = jsqte + 1
  846.         Loop
  847.     End With
  848.     ']以上为用户自定义部分
  849. End Sub
  850. Private Sub CxbbGrid_DblClick()                                              '用户双击网格调入相应单据
  851.     
  852.     Dim RecTemp As New ADODB.Recordset               '临时使用动态集
  853.     '当第一次查询结果为空时,判断总记录行是否与固定行数相同,如相同则出现错误(双表头出现此情况)
  854.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then
  855.         Exit Sub
  856.     End If
  857.     '非数据行退出
  858.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  859.         Exit Sub
  860.     End If
  861.     Sqlstr = "SELECT InOutMainID From gy_inoutMain Where InOutMainID=" & Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  862.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  863.     With RecTemp
  864.         If .EOF Then
  865.             Tsxx = "此材料出库单已被其他用户删除!"
  866.             Call Xtxxts(Tsxx, 0, 4)
  867.             Exit Sub
  868.         Else
  869.             '调入单据处理窗体
  870.             With KF_FrmMateOut
  871.                 
  872.                 '填充查询单据标识
  873.                 XT_BillID = CxbbGrid.TextMatrix(CxbbGrid.Row, 0)
  874.                 Xtcdcsfz = Str_QueryCondi
  875.                 
  876.                 '设置单据处理为列表查询(修改)状态
  877.                 Xtcdcs = "2"
  878.                 .Show 1
  879.             End With
  880.             If Xtfhcs = "1" Then
  881.                 Tsxx = "材料出库单发生变化,是否刷新材料出库单列表?"
  882.                 Yhanswer = Xtxxts(Tsxx, 2, 2)
  883.                 If Yhanswer = 1 Then
  884.                     Xt_Wait.Show
  885.                     Xt_Wait.Refresh
  886.    
  887.                     '加快显示速度
  888.                     CxbbGrid.Redraw = False
  889.  
  890.                     '生成查询结果
  891.                     Call Sub_Query(1)
  892.    
  893.                     CxbbGrid.Redraw = True
  894.                     Xt_Wait.Hide
  895.                 End If
  896.             End If
  897.         End If
  898.     End With
  899. End Sub
  900. Private Sub Sub_AddBill()                                              '新增单据
  901.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  902.      If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  903.         Exit Sub
  904.      End If
  905.    
  906.     With KF_FrmMateOut
  907.    
  908.         '设置单据处理为填制单据状态
  909.         Xtcdcs = "1"
  910.         .Show 1
  911.     End With
  912.        
  913.     If Xtfhcs = "1" Then
  914.         Tsxx = "材料出库单发生变化,是否刷新材料出库单列表?"
  915.         Yhanswer = Xtxxts(Tsxx, 2, 2)
  916.         If Yhanswer = 1 Then
  917.             Xt_Wait.Show
  918.             Xt_Wait.Refresh
  919.    
  920.             '加快显示速度
  921.             CxbbGrid.Redraw = False
  922.  
  923.             '生成查询结果
  924.             Call Sub_Query(1)
  925.    
  926.             CxbbGrid.Redraw = True
  927.             Xt_Wait.Hide
  928.         End If
  929.     End If
  930.    
  931. End Sub
  932. Private Sub Sub_DeleteBill()                                            '删除选中当前材料出库单
  933.     
  934.     Dim YAnswer As Integer
  935.     Dim Lng_BillID As Long           '单据标识
  936.     Dim Rec_Sub As New Recordset
  937.     Dim strSQL As String
  938.     Dim LsJs As Integer
  939.     Dim StrTemp1 As String
  940.     
  941.     '当第一次查询结果为空时,判断总记录行是否与固定行数相同,如相同则出现错误(双表头出现此情况)
  942.     If CxbbGrid.Rows = CxbbGrid.FixedRows Then
  943.         Exit Sub
  944.     End If
  945.     '判断用户是否有此功能执行权限,如有则写上机日志(进入)
  946.      If Not Security_Log(Str_RightEdit, Xtczybm, 1, True) Then
  947.         Exit Sub
  948.      End If
  949.   
  950.     '非数据行退出
  951.     If CxbbGrid.Row < CxbbGrid.FixedRows Or Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0)) = 0 Then
  952.         Exit Sub
  953.     End If
  954.   
  955.     Tsxx = "请确认是否删除当前材料出库单?"
  956.     Yhanswer = Xtxxts(Tsxx, 2, 2)
  957.   
  958.     If Yhanswer = 1 Then
  959.         '1.判断当前材料出库单是否允许删除
  960.         If Not Fun_AllowDelete Then
  961.             Exit Sub
  962.         End If
  963.   
  964.         '2.删除单据所有内容
  965.         Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  966.         On Error GoTo Swcwcl
  967.         Cw_DataEnvi.DataConnect.BeginTrans
  968.         
  969.         strSQL = "SELECT InOutMainID,MArea,WhCode,MNumber,FactIssueQuan,BatchNum,IssueID FROM KF_V_MateOut " & _
  970.                 "WHERE InOutMainID=" & Lng_BillID
  971.         Set Rec_Sub = Cw_DataEnvi.DataConnect.Execute(strSQL)
  972.         With Rec_Sub
  973.             If Not .EOF Then
  974.              .MoveFirst
  975.              For LsJs = 1 To .RecordCount
  976.                  StrTemp1 = Trim(.Fields("MArea") & "")
  977.                     '1修改现存量
  978.                     Cw_DataEnvi.DataConnect.Execute (" KF_SP_ChangeQuan '" & Trim(.Fields("WhCode")) & "','" & StrTemp1 & "','" & Trim(.Fields("mnumber")) & "','" & Trim(.Fields("batchnum")) & "'," & Val(.Fields("factIssuequan")) & ",0")
  979.                     '2修改物料表
  980.                     Cw_DataEnvi.DataConnect.Execute ("Update gy_material set NowStorage=NowStorage+(" & Val(.Fields("factIssuequan")) & ") where mNumber='" & Trim(.Fields("mnumber")) & "'")
  981.                     '3修改领料申请数量
  982.                     If Trim(.Fields("IssueID") & "") <> "" Then
  983.                         Cw_DataEnvi.DataConnect.Execute ("Update KF_IssueSub set factIssuequan=factIssuequan-(" & Val(.Fields("factIssuequan")) & ") where mnumber='" & Trim(.Fields("mnumber")) & "' and IssueMainId=" & Val(.Fields("IssueID")))
  984.                         Cw_DataEnvi.DataConnect.Execute ("Update gy_material set AllocateStorage=AllocateStorage+(" & Val(.Fields("factIssuequan")) & ") where mNumber='" & Trim(.Fields("mnumber")) & "'")
  985.                     End If
  986.                     '4修改已经出库数量
  987.                     If Trim(.Fields("batchnum") & "") <> "" Then
  988.                         If BatchJudge(Trim(.Fields("WhCode")), Trim(.Fields("mnumber")), Trim(.Fields("batchnum")), intCount, intFatherID(), intChildID(), IsQc(), True) = 0 Then
  989.                             Call RestoreQuan(intCount, intFatherID(), intChildID(), IsQc(), .Fields("factissuequan"), True)
  990.                         End If
  991.                     End If
  992.                     .MoveNext
  993.                 Next LsJs
  994.             End If
  995.         End With
  996.         Rec_Sub.Close
  997.         Set Rec_Sub = Nothing
  998.         
  999.         Cw_DataEnvi.DataConnect.Execute ("Delete Gy_InoutSub Where InOutMainID=" & Val(Lng_BillID))
  1000.         Cw_DataEnvi.DataConnect.Execute ("Delete gy_inoutMain Where InOutMainID=" & Val(Lng_BillID))
  1001.         Cw_DataEnvi.DataConnect.CommitTrans
  1002.       
  1003.         '删除网格中单据数据
  1004.         jsqte = CxbbGrid.FixedRows
  1005.         Do While jsqte <= CxbbGrid.Rows - 1
  1006.             If Val(CxbbGrid.TextMatrix(jsqte, 0)) = Lng_BillID Then
  1007.                 CxbbGrid.RemoveItem (jsqte)
  1008.             Else
  1009.                 jsqte = jsqte + 1
  1010.             End If
  1011.         Loop
  1012.     Else
  1013.         Exit Sub
  1014.     End If
  1015.     Exit Sub
  1016. Swcwcl:
  1017.     Cw_DataEnvi.DataConnect.RollbackTrans
  1018.     Tsxx = "删除材料出库单过程中出现未知错误,程序自动恢复删除前状态!"
  1019.     Call Xtxxts(Tsxx, 0, 1)
  1020.     Exit Sub
  1021.   
  1022. End Sub
  1023. Private Function Fun_AllowDel() As Boolean
  1024.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1025.     Fun_AllowDel = False
  1026.     Sqlstr = "Select useFlag From KF_Operation Where operationName='" & Trim(CxbbGrid.TextMatrix(CxbbGrid.Row, Sydz("005", GridStr(), Szzls))) & "'"
  1027.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1028.     With RecTemp
  1029.         If Not .EOF Then
  1030.             If CBool(.Fields("UseFlag")) = True Then
  1031.                 Tsxx = "该单据由系统生成,不允许修改或删除!"
  1032.                 Call Xtxxts(Tsxx, 0, 4)
  1033.                 Exit Function
  1034.             End If
  1035.         End If
  1036.     End With
  1037.     Fun_AllowDel = True
  1038. End Function
  1039. Private Function Fun_AllowDelete() As Boolean                                        '判断当前单据是否允许删除
  1040.   
  1041.     Dim RecTemp As New ADODB.Recordset     '临时使用动态集
  1042.     Dim Sqlstr As String                   '查询字符串
  1043.     Dim Lng_BillID As Long                 '单据ID
  1044.   
  1045.     Lng_BillID = Val(CxbbGrid.TextMatrix(CxbbGrid.Row, 0))
  1046.     Sqlstr = "Select KFChecker,ChalkitupMan,CheckFlag From Gy_InoutMain Where InOutMainId=" & Lng_BillID
  1047.     Set RecTemp = Cw_DataEnvi.DataConnect.Execute(Sqlstr)
  1048.     With RecTemp
  1049.         If Not .EOF Then
  1050.             If Trim(.Fields("KFChecker") & "") <> "" Then
  1051.                 Tsxx = "该单据已审核确认,不能修改或删除!"
  1052.                 Call Xtxxts(Tsxx, 0, 4)
  1053.                 Exit Function
  1054.             End If
  1055.             If CBool(.Fields("CheckFlag")) = True Then
  1056.                 Tsxx = "该单据已结帐,不能修改或删除!"
  1057.                 Call Xtxxts(Tsxx, 0, 4)
  1058.                 Exit Function
  1059.             End If
  1060.             If Trim(.Fields("ChalkitupMan") & "") <> "" Then
  1061.                 Tsxx = "该单据在物料核算系统已经记帐,不能修改或删除!"
  1062.                 Call Xtxxts(Tsxx, 0, 4)
  1063.                 Exit Function
  1064.             End If
  1065.         End If
  1066.     End With
  1067.     Fun_AllowDelete = True
  1068.   
  1069. End Function
  1070. Private Sub bbyl(bbylte As Boolean)                    '报表打印预览
  1071.     
  1072.     Dim Bbzbt$, Bbxbt() As String, bbxbtzzxs() As Integer, Bbxbtgs As Integer
  1073.     Dim Bbbwh() As String, Bbbwhzzxs() As Integer, Bbbwhgs As Integer
  1074.     Bbxbtgs = 1                                          '报 表 小 标 题 行 数
  1075.     Bbbwhgs = 0                                          '报 表 表 尾 行 数
  1076.     ReDim Bbxbt(1 To Bbxbtgs)
  1077.     ReDim bbxbtzzxs(1 To Bbxbtgs)
  1078.     If Bbbwhgs <> 0 Then
  1079.         ReDim Bbbwh(1 To Bbbwhgs)
  1080.         ReDim Bbbwhzzxs(1 To Bbbwhgs)
  1081.     End If
  1082.     Bbzbt = ReportTitle
  1083.     Bbxbt(1) = ""
  1084.     bbxbtzzxs(1) = 0                                     '报表行组织形式(0-居左 1-居中 2-居右)
  1085.     Call Scyxsjb(CxbbGrid)                               '生成报表数据
  1086.     Call Scdybb(Dyymctbl, Bbzbt, Bbxbt(), bbxbtzzxs(), Bbxbtgs, Bbbwh(), Bbbwhzzxs(), Bbbwhgs, bbylte)
  1087.     If Not bbylte Then
  1088.         Unload DY_Tybbyldy
  1089.     End If
  1090. End Sub