FRMckd.frm
上传用户:xiao_xia32
上传日期:2022-07-21
资源大小:1174k
文件大小:56k
源码类别:

企业管理

开发平台:

Visual Basic

  1. VERSION 5.00
  2. Object = "{86CF1D34-0C5F-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCT2.OCX"
  3. Object = "{CDE57A40-8B86-11D0-B3C6-00A0C90AEA82}#1.0#0"; "MSDATGRD.OCX"
  4. Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
  5. Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
  6. Begin VB.Form FRMckd 
  7.    BorderStyle     =   1  'Fixed Single
  8.    Caption         =   "出库单"
  9.    ClientHeight    =   4515
  10.    ClientLeft      =   1950
  11.    ClientTop       =   2325
  12.    ClientWidth     =   9420
  13.    ControlBox      =   0   'False
  14.    LinkTopic       =   "Form1"
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    Moveable        =   0   'False
  18.    ScaleHeight     =   4515
  19.    ScaleWidth      =   9420
  20.    StartUpPosition =   1  '所有者中心
  21.    Begin VB.CommandButton Command3 
  22.       BackColor       =   &H000000FF&
  23.       Enabled         =   0   'False
  24.       Height          =   375
  25.       Left            =   0
  26.       Style           =   1  'Graphical
  27.       TabIndex        =   30
  28.       Top             =   0
  29.       Width           =   405
  30.    End
  31.    Begin VB.Frame Frame4 
  32.       Height          =   1545
  33.       Left            =   0
  34.       TabIndex        =   28
  35.       Top             =   4470
  36.       Width           =   9405
  37.       Begin VB.ListBox List1 
  38.          Height          =   960
  39.          ItemData        =   "FRMckd.frx":0000
  40.          Left            =   1500
  41.          List            =   "FRMckd.frx":0002
  42.          TabIndex        =   35
  43.          Top             =   1830
  44.          Visible         =   0   'False
  45.          Width           =   3345
  46.       End
  47.       Begin MSComctlLib.ListView ListView1 
  48.          Height          =   1125
  49.          Left            =   2190
  50.          TabIndex        =   34
  51.          Top             =   390
  52.          Width           =   4185
  53.          _ExtentX        =   7382
  54.          _ExtentY        =   1984
  55.          View            =   3
  56.          LabelEdit       =   1
  57.          LabelWrap       =   -1  'True
  58.          HideSelection   =   -1  'True
  59.          HideColumnHeaders=   -1  'True
  60.          AllowReorder    =   -1  'True
  61.          FullRowSelect   =   -1  'True
  62.          _Version        =   393217
  63.          ForeColor       =   -2147483635
  64.          BackColor       =   -2147483624
  65.          BorderStyle     =   1
  66.          Appearance      =   0
  67.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  68.             Name            =   "宋体"
  69.             Size            =   9
  70.             Charset         =   134
  71.             Weight          =   400
  72.             Underline       =   0   'False
  73.             Italic          =   0   'False
  74.             Strikethrough   =   0   'False
  75.          EndProperty
  76.          NumItems        =   0
  77.       End
  78.       Begin VB.CommandButton Command4 
  79.          Caption         =   "关闭"
  80.          Height          =   405
  81.          Left            =   7680
  82.          TabIndex        =   31
  83.          Top             =   1050
  84.          Width           =   675
  85.       End
  86.       Begin VB.CommandButton Command2 
  87.          Caption         =   "确定"
  88.          Height          =   405
  89.          Left            =   6840
  90.          TabIndex        =   29
  91.          Top             =   1050
  92.          Width           =   705
  93.       End
  94.       Begin VB.Label Label6 
  95.          Caption         =   "领用部门:"
  96.          Height          =   195
  97.          Left            =   3990
  98.          TabIndex        =   33
  99.          Top             =   210
  100.          Width           =   1065
  101.       End
  102.       Begin VB.Label Label4 
  103.          Caption         =   "凭单编号:"
  104.          Height          =   315
  105.          Left            =   2460
  106.          TabIndex        =   32
  107.          Top             =   210
  108.          Width           =   1305
  109.       End
  110.    End
  111.    Begin VB.CommandButton Command1 
  112.       Caption         =   "打印"
  113.       Height          =   375
  114.       Left            =   7290
  115.       TabIndex        =   27
  116.       Top             =   4050
  117.       Width           =   855
  118.    End
  119.    Begin VB.Frame Frame1 
  120.       Height          =   4095
  121.       Left            =   0
  122.       TabIndex        =   0
  123.       Top             =   390
  124.       Width           =   9405
  125.       Begin VB.ListBox List2 
  126.          Appearance      =   0  'Flat
  127.          Height          =   390
  128.          ItemData        =   "FRMckd.frx":0004
  129.          Left            =   5880
  130.          List            =   "FRMckd.frx":000E
  131.          TabIndex        =   26
  132.          Top             =   1440
  133.          Visible         =   0   'False
  134.          Width           =   975
  135.       End
  136.       Begin MSDataGridLib.DataGrid DataGrid1 
  137.          Bindings        =   "FRMckd.frx":001E
  138.          Height          =   2175
  139.          Left            =   120
  140.          TabIndex        =   25
  141.          Top             =   840
  142.          Width           =   9225
  143.          _ExtentX        =   16272
  144.          _ExtentY        =   3836
  145.          _Version        =   393216
  146.          AllowUpdate     =   -1  'True
  147.          AllowArrows     =   -1  'True
  148.          BackColor       =   -2147483624
  149.          ForeColor       =   -2147483635
  150.          HeadLines       =   1
  151.          RowHeight       =   14
  152.          TabAction       =   2
  153.          FormatLocked    =   -1  'True
  154.          AllowAddNew     =   -1  'True
  155.          BeginProperty HeadFont {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  156.             Name            =   "宋体"
  157.             Size            =   9
  158.             Charset         =   134
  159.             Weight          =   400
  160.             Underline       =   0   'False
  161.             Italic          =   0   'False
  162.             Strikethrough   =   0   'False
  163.          EndProperty
  164.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  165.             Name            =   "宋体"
  166.             Size            =   9
  167.             Charset         =   134
  168.             Weight          =   400
  169.             Underline       =   0   'False
  170.             Italic          =   0   'False
  171.             Strikethrough   =   0   'False
  172.          EndProperty
  173.          ColumnCount     =   22
  174.          BeginProperty Column00 
  175.             DataField       =   "凭单编号"
  176.             Caption         =   "凭单编号"
  177.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  178.                Type            =   0
  179.                Format          =   ""
  180.                HaveTrueFalseNull=   0
  181.                FirstDayOfWeek  =   0
  182.                FirstWeekOfYear =   0
  183.                LCID            =   2052
  184.                SubFormatType   =   0
  185.             EndProperty
  186.          EndProperty
  187.          BeginProperty Column01 
  188.             DataField       =   "商品编号"
  189.             Caption         =   "商品编号"
  190.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  191.                Type            =   0
  192.                Format          =   ""
  193.                HaveTrueFalseNull=   0
  194.                FirstDayOfWeek  =   0
  195.                FirstWeekOfYear =   0
  196.                LCID            =   2052
  197.                SubFormatType   =   0
  198.             EndProperty
  199.          EndProperty
  200.          BeginProperty Column02 
  201.             DataField       =   "名称"
  202.             Caption         =   "名称"
  203.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  204.                Type            =   0
  205.                Format          =   ""
  206.                HaveTrueFalseNull=   0
  207.                FirstDayOfWeek  =   0
  208.                FirstWeekOfYear =   0
  209.                LCID            =   2052
  210.                SubFormatType   =   0
  211.             EndProperty
  212.          EndProperty
  213.          BeginProperty Column03 
  214.             DataField       =   "物资大类"
  215.             Caption         =   "物资大类"
  216.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  217.                Type            =   0
  218.                Format          =   ""
  219.                HaveTrueFalseNull=   0
  220.                FirstDayOfWeek  =   0
  221.                FirstWeekOfYear =   0
  222.                LCID            =   2052
  223.                SubFormatType   =   0
  224.             EndProperty
  225.          EndProperty
  226.          BeginProperty Column04 
  227.             DataField       =   "物资子类"
  228.             Caption         =   "物资子类"
  229.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  230.                Type            =   0
  231.                Format          =   ""
  232.                HaveTrueFalseNull=   0
  233.                FirstDayOfWeek  =   0
  234.                FirstWeekOfYear =   0
  235.                LCID            =   2052
  236.                SubFormatType   =   0
  237.             EndProperty
  238.          EndProperty
  239.          BeginProperty Column05 
  240.             DataField       =   "计量单位"
  241.             Caption         =   "单位"
  242.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  243.                Type            =   0
  244.                Format          =   ""
  245.                HaveTrueFalseNull=   0
  246.                FirstDayOfWeek  =   0
  247.                FirstWeekOfYear =   0
  248.                LCID            =   2052
  249.                SubFormatType   =   0
  250.             EndProperty
  251.          EndProperty
  252.          BeginProperty Column06 
  253.             DataField       =   "规格型号"
  254.             Caption         =   "规格型号"
  255.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  256.                Type            =   0
  257.                Format          =   ""
  258.                HaveTrueFalseNull=   0
  259.                FirstDayOfWeek  =   0
  260.                FirstWeekOfYear =   0
  261.                LCID            =   2052
  262.                SubFormatType   =   0
  263.             EndProperty
  264.          EndProperty
  265.          BeginProperty Column07 
  266.             DataField       =   "数量"
  267.             Caption         =   "数量"
  268.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  269.                Type            =   0
  270.                Format          =   ""
  271.                HaveTrueFalseNull=   0
  272.                FirstDayOfWeek  =   0
  273.                FirstWeekOfYear =   0
  274.                LCID            =   2052
  275.                SubFormatType   =   0
  276.             EndProperty
  277.          EndProperty
  278.          BeginProperty Column08 
  279.             DataField       =   "单价"
  280.             Caption         =   "单价"
  281.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  282.                Type            =   0
  283.                Format          =   ""
  284.                HaveTrueFalseNull=   0
  285.                FirstDayOfWeek  =   0
  286.                FirstWeekOfYear =   0
  287.                LCID            =   2052
  288.                SubFormatType   =   0
  289.             EndProperty
  290.          EndProperty
  291.          BeginProperty Column09 
  292.             DataField       =   "金额"
  293.             Caption         =   "金额"
  294.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  295.                Type            =   0
  296.                Format          =   ""
  297.                HaveTrueFalseNull=   0
  298.                FirstDayOfWeek  =   0
  299.                FirstWeekOfYear =   0
  300.                LCID            =   2052
  301.                SubFormatType   =   0
  302.             EndProperty
  303.          EndProperty
  304.          BeginProperty Column10 
  305.             DataField       =   "领用类别"
  306.             Caption         =   "领用类别"
  307.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  308.                Type            =   0
  309.                Format          =   ""
  310.                HaveTrueFalseNull=   0
  311.                FirstDayOfWeek  =   0
  312.                FirstWeekOfYear =   0
  313.                LCID            =   2052
  314.                SubFormatType   =   0
  315.             EndProperty
  316.          EndProperty
  317.          BeginProperty Column11 
  318.             DataField       =   "接收部门"
  319.             Caption         =   "接收部门"
  320.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  321.                Type            =   0
  322.                Format          =   ""
  323.                HaveTrueFalseNull=   0
  324.                FirstDayOfWeek  =   0
  325.                FirstWeekOfYear =   0
  326.                LCID            =   2052
  327.                SubFormatType   =   0
  328.             EndProperty
  329.          EndProperty
  330.          BeginProperty Column12 
  331.             DataField       =   "使用人"
  332.             Caption         =   "使用人"
  333.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  334.                Type            =   0
  335.                Format          =   ""
  336.                HaveTrueFalseNull=   0
  337.                FirstDayOfWeek  =   0
  338.                FirstWeekOfYear =   0
  339.                LCID            =   2052
  340.                SubFormatType   =   0
  341.             EndProperty
  342.          EndProperty
  343.          BeginProperty Column13 
  344.             DataField       =   "是否退库"
  345.             Caption         =   "是否退库"
  346.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  347.                Type            =   0
  348.                Format          =   ""
  349.                HaveTrueFalseNull=   0
  350.                FirstDayOfWeek  =   0
  351.                FirstWeekOfYear =   0
  352.                LCID            =   2052
  353.                SubFormatType   =   0
  354.             EndProperty
  355.          EndProperty
  356.          BeginProperty Column14 
  357.             DataField       =   "是否报废"
  358.             Caption         =   "是否报废"
  359.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  360.                Type            =   0
  361.                Format          =   ""
  362.                HaveTrueFalseNull=   0
  363.                FirstDayOfWeek  =   0
  364.                FirstWeekOfYear =   0
  365.                LCID            =   2052
  366.                SubFormatType   =   0
  367.             EndProperty
  368.          EndProperty
  369.          BeginProperty Column15 
  370.             DataField       =   "盘实"
  371.             Caption         =   "盘实"
  372.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  373.                Type            =   0
  374.                Format          =   ""
  375.                HaveTrueFalseNull=   0
  376.                FirstDayOfWeek  =   0
  377.                FirstWeekOfYear =   0
  378.                LCID            =   2052
  379.                SubFormatType   =   0
  380.             EndProperty
  381.          EndProperty
  382.          BeginProperty Column16 
  383.             DataField       =   "盘亏"
  384.             Caption         =   "盘亏"
  385.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  386.                Type            =   0
  387.                Format          =   ""
  388.                HaveTrueFalseNull=   0
  389.                FirstDayOfWeek  =   0
  390.                FirstWeekOfYear =   0
  391.                LCID            =   2052
  392.                SubFormatType   =   0
  393.             EndProperty
  394.          EndProperty
  395.          BeginProperty Column17 
  396.             DataField       =   "ID"
  397.             Caption         =   "ID"
  398.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  399.                Type            =   0
  400.                Format          =   ""
  401.                HaveTrueFalseNull=   0
  402.                FirstDayOfWeek  =   0
  403.                FirstWeekOfYear =   0
  404.                LCID            =   2052
  405.                SubFormatType   =   0
  406.             EndProperty
  407.          EndProperty
  408.          BeginProperty Column18 
  409.             DataField       =   "出库日期"
  410.             Caption         =   "出库日期"
  411.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  412.                Type            =   0
  413.                Format          =   ""
  414.                HaveTrueFalseNull=   0
  415.                FirstDayOfWeek  =   0
  416.                FirstWeekOfYear =   0
  417.                LCID            =   2052
  418.                SubFormatType   =   0
  419.             EndProperty
  420.          EndProperty
  421.          BeginProperty Column19 
  422.             DataField       =   "经手人"
  423.             Caption         =   "经手人"
  424.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  425.                Type            =   0
  426.                Format          =   ""
  427.                HaveTrueFalseNull=   0
  428.                FirstDayOfWeek  =   0
  429.                FirstWeekOfYear =   0
  430.                LCID            =   2052
  431.                SubFormatType   =   0
  432.             EndProperty
  433.          EndProperty
  434.          BeginProperty Column20 
  435.             DataField       =   "处理状态"
  436.             Caption         =   "处理状态"
  437.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  438.                Type            =   0
  439.                Format          =   ""
  440.                HaveTrueFalseNull=   0
  441.                FirstDayOfWeek  =   0
  442.                FirstWeekOfYear =   0
  443.                LCID            =   2052
  444.                SubFormatType   =   0
  445.             EndProperty
  446.          EndProperty
  447.          BeginProperty Column21 
  448.             DataField       =   "备注"
  449.             Caption         =   "备注"
  450.             BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED} 
  451.                Type            =   0
  452.                Format          =   ""
  453.                HaveTrueFalseNull=   0
  454.                FirstDayOfWeek  =   0
  455.                FirstWeekOfYear =   0
  456.                LCID            =   2052
  457.                SubFormatType   =   0
  458.             EndProperty
  459.          EndProperty
  460.          SplitCount      =   1
  461.          BeginProperty Split0 
  462.             BeginProperty Column00 
  463.                Object.Visible         =   0   'False
  464.                ColumnWidth     =   810.142
  465.             EndProperty
  466.             BeginProperty Column01 
  467.                ColumnWidth     =   794.835
  468.             EndProperty
  469.             BeginProperty Column02 
  470.                ColumnWidth     =   840.189
  471.             EndProperty
  472.             BeginProperty Column03 
  473.                ColumnWidth     =   1005.165
  474.             EndProperty
  475.             BeginProperty Column04 
  476.                ColumnWidth     =   870.236
  477.             EndProperty
  478.             BeginProperty Column05 
  479.                ColumnWidth     =   434.835
  480.             EndProperty
  481.             BeginProperty Column06 
  482.                ColumnWidth     =   780.095
  483.             EndProperty
  484.             BeginProperty Column07 
  485.                ColumnWidth     =   555.024
  486.             EndProperty
  487.             BeginProperty Column08 
  488.                ColumnWidth     =   734.74
  489.             EndProperty
  490.             BeginProperty Column09 
  491.                ColumnWidth     =   824.882
  492.             EndProperty
  493.             BeginProperty Column10 
  494.                Button          =   -1  'True
  495.                ColumnWidth     =   780.095
  496.             EndProperty
  497.             BeginProperty Column11 
  498.                Object.Visible         =   0   'False
  499.                ColumnWidth     =   90.142
  500.             EndProperty
  501.             BeginProperty Column12 
  502.                ColumnWidth     =   645.165
  503.             EndProperty
  504.             BeginProperty Column13 
  505.                Object.Visible         =   0   'False
  506.                ColumnWidth     =   1094.74
  507.             EndProperty
  508.             BeginProperty Column14 
  509.                Object.Visible         =   0   'False
  510.                ColumnWidth     =   1094.74
  511.             EndProperty
  512.             BeginProperty Column15 
  513.                Object.Visible         =   0   'False
  514.                ColumnWidth     =   1365.165
  515.             EndProperty
  516.             BeginProperty Column16 
  517.                Object.Visible         =   0   'False
  518.                ColumnWidth     =   1365.165
  519.             EndProperty
  520.             BeginProperty Column17 
  521.                Object.Visible         =   0   'False
  522.                ColumnWidth     =   1094.74
  523.             EndProperty
  524.             BeginProperty Column18 
  525.                Object.Visible         =   0   'False
  526.                ColumnWidth     =   2085.166
  527.             EndProperty
  528.             BeginProperty Column19 
  529.                Object.Visible         =   0   'False
  530.                ColumnWidth     =   1365.165
  531.             EndProperty
  532.             BeginProperty Column20 
  533.                Object.Visible         =   0   'False
  534.                ColumnWidth     =   1365.165
  535.             EndProperty
  536.             BeginProperty Column21 
  537.                ColumnWidth     =   629.858
  538.             EndProperty
  539.          EndProperty
  540.       End
  541.       Begin MSAdodcLib.Adodc Adodc1 
  542.          Height          =   330
  543.          Left            =   4740
  544.          Top             =   3570
  545.          Visible         =   0   'False
  546.          Width           =   1575
  547.          _ExtentX        =   2778
  548.          _ExtentY        =   582
  549.          ConnectMode     =   0
  550.          CursorLocation  =   3
  551.          IsolationLevel  =   -1
  552.          ConnectionTimeout=   15
  553.          CommandTimeout  =   30
  554.          CursorType      =   3
  555.          LockType        =   4
  556.          CommandType     =   8
  557.          CursorOptions   =   0
  558.          CacheSize       =   50
  559.          MaxRecords      =   0
  560.          BOFAction       =   0
  561.          EOFAction       =   0
  562.          ConnectStringType=   1
  563.          Appearance      =   1
  564.          BackColor       =   -2147483643
  565.          ForeColor       =   -2147483640
  566.          Orientation     =   0
  567.          Enabled         =   -1
  568.          Connect         =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=LandaMIS"
  569.          OLEDBString     =   "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=LandaMIS"
  570.          OLEDBFile       =   ""
  571.          DataSourceName  =   ""
  572.          OtherAttributes =   ""
  573.          UserName        =   ""
  574.          Password        =   ""
  575.          RecordSource    =   "select * from 出库明细表 where 1>2"
  576.          Caption         =   "Adodc1"
  577.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  578.             Name            =   "MS Sans Serif"
  579.             Size            =   8.25
  580.             Charset         =   0
  581.             Weight          =   400
  582.             Underline       =   0   'False
  583.             Italic          =   0   'False
  584.             Strikethrough   =   0   'False
  585.          EndProperty
  586.          _Version        =   393216
  587.       End
  588.       Begin VB.CheckBox Check1 
  589.          Appearance      =   0  'Flat
  590.          BackColor       =   &H80000005&
  591.          ForeColor       =   &H80000008&
  592.          Height          =   255
  593.          Left            =   3240
  594.          TabIndex        =   24
  595.          Top             =   3720
  596.          Visible         =   0   'False
  597.          Width           =   1095
  598.       End
  599.       Begin VB.Frame Frame12 
  600.          Height          =   495
  601.          Left            =   120
  602.          TabIndex        =   21
  603.          Top             =   3000
  604.          Width           =   2235
  605.          Begin VB.ComboBox ComboZG 
  606.             Height          =   300
  607.             Left            =   960
  608.             TabIndex        =   22
  609.             Top             =   150
  610.             Width           =   1245
  611.          End
  612.          Begin VB.Label Label12 
  613.             Alignment       =   2  'Center
  614.             Caption         =   "部门经理"
  615.             Height          =   255
  616.             Left            =   60
  617.             TabIndex        =   23
  618.             Top             =   210
  619.             Width           =   765
  620.          End
  621.          Begin VB.Line Line23 
  622.             BorderColor     =   &H80000003&
  623.             X1              =   885
  624.             X2              =   885
  625.             Y1              =   120
  626.             Y2              =   480
  627.          End
  628.          Begin VB.Line Line22 
  629.             BorderColor     =   &H80000005&
  630.             X1              =   900
  631.             X2              =   900
  632.             Y1              =   120
  633.             Y2              =   600
  634.          End
  635.       End
  636.       Begin VB.Frame Frame11 
  637.          Height          =   495
  638.          Left            =   2430
  639.          TabIndex        =   18
  640.          Top             =   3000
  641.          Width           =   2115
  642.          Begin VB.ComboBox ComboKJ 
  643.             Height          =   300
  644.             Left            =   780
  645.             TabIndex        =   19
  646.             Top             =   150
  647.             Width           =   1275
  648.          End
  649.          Begin VB.Line Line21 
  650.             BorderColor     =   &H80000005&
  651.             X1              =   720
  652.             X2              =   720
  653.             Y1              =   120
  654.             Y2              =   600
  655.          End
  656.          Begin VB.Line Line20 
  657.             BorderColor     =   &H80000003&
  658.             X1              =   705
  659.             X2              =   705
  660.             Y1              =   120
  661.             Y2              =   480
  662.          End
  663.          Begin VB.Label Label11 
  664.             Alignment       =   2  'Center
  665.             Caption         =   "会计"
  666.             Height          =   255
  667.             Left            =   120
  668.             TabIndex        =   20
  669.             Top             =   195
  670.             Width           =   495
  671.          End
  672.       End
  673.       Begin VB.Frame Frame10 
  674.          Height          =   495
  675.          Left            =   4620
  676.          TabIndex        =   15
  677.          Top             =   3000
  678.          Width           =   2265
  679.          Begin VB.ComboBox ComboBGY 
  680.             Height          =   300
  681.             Left            =   900
  682.             TabIndex        =   16
  683.             Top             =   150
  684.             Width           =   1305
  685.          End
  686.          Begin VB.Line Line19 
  687.             BorderColor     =   &H80000005&
  688.             X1              =   840
  689.             X2              =   840
  690.             Y1              =   120
  691.             Y2              =   600
  692.          End
  693.          Begin VB.Line Line18 
  694.             BorderColor     =   &H80000003&
  695.             X1              =   825
  696.             X2              =   825
  697.             Y1              =   120
  698.             Y2              =   480
  699.          End
  700.          Begin VB.Label Label10 
  701.             Alignment       =   2  'Center
  702.             Caption         =   "保管员"
  703.             Height          =   255
  704.             Left            =   120
  705.             TabIndex        =   17
  706.             Top             =   195
  707.             Width           =   615
  708.          End
  709.       End
  710.       Begin VB.Frame Frame9 
  711.          Height          =   495
  712.          Left            =   6960
  713.          TabIndex        =   13
  714.          Top             =   3000
  715.          Width           =   2145
  716.          Begin VB.ComboBox JSRR 
  717.             Height          =   315
  718.             Left            =   870
  719.             TabIndex        =   37
  720.             Top             =   150
  721.             Width           =   1215
  722.          End
  723.          Begin VB.Label Label9 
  724.             Alignment       =   2  'Center
  725.             Caption         =   "经手人 "
  726.             Height          =   255
  727.             Left            =   120
  728.             TabIndex        =   14
  729.             Top             =   195
  730.             Width           =   615
  731.          End
  732.          Begin VB.Line Line17 
  733.             BorderColor     =   &H80000003&
  734.             X1              =   825
  735.             X2              =   825
  736.             Y1              =   120
  737.             Y2              =   480
  738.          End
  739.          Begin VB.Line Line16 
  740.             BorderColor     =   &H80000005&
  741.             X1              =   840
  742.             X2              =   840
  743.             Y1              =   120
  744.             Y2              =   600
  745.          End
  746.       End
  747.       Begin VB.CommandButton Save 
  748.          Caption         =   "保存"
  749.          Height          =   375
  750.          Left            =   6300
  751.          TabIndex        =   2
  752.          Top             =   3660
  753.          Width           =   855
  754.       End
  755.       Begin VB.CommandButton exit 
  756.          Caption         =   "关闭"
  757.          Height          =   375
  758.          Left            =   8280
  759.          TabIndex        =   11
  760.          Top             =   3660
  761.          Width           =   855
  762.       End
  763.       Begin VB.Frame Frame2 
  764.          Height          =   495
  765.          Left            =   150
  766.          TabIndex        =   7
  767.          Top             =   240
  768.          Width           =   2625
  769.          Begin VB.ComboBox Combo1 
  770.             Height          =   300
  771.             Left            =   880
  772.             TabIndex        =   8
  773.             Top             =   150
  774.             Width           =   1635
  775.          End
  776.          Begin VB.Line Line2 
  777.             BorderColor     =   &H80000005&
  778.             X1              =   840
  779.             X2              =   840
  780.             Y1              =   120
  781.             Y2              =   600
  782.          End
  783.          Begin VB.Line Line3 
  784.             BorderColor     =   &H80000003&
  785.             X1              =   825
  786.             X2              =   825
  787.             Y1              =   120
  788.             Y2              =   480
  789.          End
  790.          Begin VB.Label Label2 
  791.             Alignment       =   2  'Center
  792.             BackStyle       =   0  'Transparent
  793.             Caption         =   "领用部门"
  794.             Height          =   255
  795.             Left            =   0
  796.             TabIndex        =   9
  797.             Top             =   195
  798.             Width           =   855
  799.          End
  800.       End
  801.       Begin VB.Frame Frame3 
  802.          Height          =   495
  803.          Left            =   4050
  804.          TabIndex        =   4
  805.          Top             =   240
  806.          Width           =   1935
  807.          Begin MSComCtl2.DTPicker DTPicker1 
  808.             Height          =   285
  809.             Left            =   520
  810.             TabIndex        =   5
  811.             Top             =   150
  812.             Width           =   1335
  813.             _ExtentX        =   2355
  814.             _ExtentY        =   503
  815.             _Version        =   393216
  816.             Format          =   58916865
  817.             CurrentDate     =   36146
  818.          End
  819.          Begin VB.Label Label3 
  820.             Alignment       =   2  'Center
  821.             BackStyle       =   0  'Transparent
  822.             Caption         =   "日期"
  823.             Height          =   255
  824.             Left            =   0
  825.             TabIndex        =   6
  826.             Top             =   195
  827.             Width           =   495
  828.          End
  829.          Begin VB.Line Line4 
  830.             BorderColor     =   &H80000003&
  831.             X1              =   465
  832.             X2              =   465
  833.             Y1              =   120
  834.             Y2              =   480
  835.          End
  836.          Begin VB.Line Line5 
  837.             BorderColor     =   &H80000005&
  838.             X1              =   480
  839.             X2              =   480
  840.             Y1              =   120
  841.             Y2              =   600
  842.          End
  843.       End
  844.       Begin VB.Frame Frame8 
  845.          Height          =   495
  846.          Left            =   7080
  847.          TabIndex        =   1
  848.          Top             =   240
  849.          Width           =   2085
  850.          Begin VB.TextBox pdbh 
  851.             Height          =   300
  852.             Left            =   880
  853.             Locked          =   -1  'True
  854.             TabIndex        =   12
  855.             Top             =   150
  856.             Width           =   1125
  857.          End
  858.          Begin VB.Label Label8 
  859.             Alignment       =   2  'Center
  860.             BackStyle       =   0  'Transparent
  861.             Caption         =   "凭单编号"
  862.             Height          =   255
  863.             Left            =   0
  864.             TabIndex        =   3
  865.             Top             =   225
  866.             Width           =   855
  867.          End
  868.          Begin VB.Line Line14 
  869.             BorderColor     =   &H80000003&
  870.             X1              =   825
  871.             X2              =   825
  872.             Y1              =   120
  873.             Y2              =   480
  874.          End
  875.          Begin VB.Line Line15 
  876.             BorderColor     =   &H80000005&
  877.             X1              =   840
  878.             X2              =   840
  879.             Y1              =   120
  880.             Y2              =   600
  881.          End
  882.       End
  883.       Begin VB.Label Label5 
  884.          Alignment       =   2  'Center
  885.          ForeColor       =   &H00FF0000&
  886.          Height          =   375
  887.          Left            =   180
  888.          TabIndex        =   36
  889.          Top             =   3600
  890.          Width           =   2895
  891.       End
  892.    End
  893.    Begin VB.Label Label1 
  894.       Alignment       =   2  'Center
  895.       BackStyle       =   0  'Transparent
  896.       Caption         =   "出   库  单"
  897.       BeginProperty Font 
  898.          Name            =   "MS Sans Serif"
  899.          Size            =   13.5
  900.          Charset         =   0
  901.          Weight          =   700
  902.          Underline       =   0   'False
  903.          Italic          =   0   'False
  904.          Strikethrough   =   0   'False
  905.       EndProperty
  906.       Height          =   255
  907.       Left            =   60
  908.       TabIndex        =   10
  909.       Top             =   30
  910.       Width           =   9195
  911.    End
  912.    Begin VB.Line Line1 
  913.       X1              =   2910
  914.       X2              =   6420
  915.       Y1              =   360
  916.       Y2              =   360
  917.    End
  918. End
  919. Attribute VB_Name = "FRMckd"
  920. Attribute VB_GlobalNameSpace = False
  921. Attribute VB_Creatable = False
  922. Attribute VB_PredeclaredId = True
  923. Attribute VB_Exposed = False
  924. Dim pdbh1 As Long
  925. Dim pdbh2 As Long
  926. Dim StrFLG As Integer
  927. Dim HJj As Double
  928. Private Sub Command1_Click()
  929.     FRMrkd.PrintForm
  930.    'DataGrid1.Row = 5
  931.    'DataGrid1.Col = 0
  932.    'DataGrid1.Text = "1"
  933.    
  934. End Sub
  935. Private Sub Command2_Click()
  936.     
  937.     If YJBM = "服务管理部" And EJBM = "物资组" Then
  938.         For i = 0 To ListView1.ListItems.Count - 1
  939.             If ListView1.ListItems(i + 1).Selected = True Then
  940.                pdbh1 = ListView1.ListItems.Item(i + 1)
  941.             End If
  942.         Next
  943.         Adodc1.RecordSource = "select * from 出库明细表 where 凭单编号=" & pdbh1 & ""
  944.         Adodc1.Refresh
  945.         If pdbh1 = 0 Then
  946.             MsgBox "请选择要处理的单据!"
  947.             Exit Sub
  948.         End If
  949.         Sql = "select * from 出库凭单表 where 凭单编号=" & pdbh1 & ""
  950.         Set rs = ConnWZ.Execute(Sql)
  951.         Combo1 = rs("接收部门")
  952.         DTPicker1.Value = rs("出库日期")
  953.         pdbh = pdbh1
  954.         ComboZG = rs("主管")
  955.         JSRR = rs("经手人")
  956.         ComboZG.Enabled = False
  957.         Combo1.Enabled = False
  958.         JSRR.Enabled = False
  959.         DataGrid1.Columns("数量").Locked = True
  960.         DataGrid1.Columns("使用人").Locked = True
  961.         DataGrid1.Columns("领用类别").Locked = True
  962.         DataGrid1.Columns("领用类别").Button = False
  963.         Combo1.Locked = True
  964.     End If
  965.     ListView1.ListItems.Clear
  966.     StrFLG = 1
  967.     Me.Height = 4890
  968. End Sub
  969. Private Sub Command3_Click()
  970.     
  971.     Me.Height = 6465
  972.     ListView1.ColumnHeaders.Add , , "凭单编号"
  973.     ListView1.ColumnHeaders.Add , , "领用部门"
  974.     Sql = "select * from 出库凭单表 where 处理状态='待处理' ORDER BY 凭单编号"
  975.     Set rs = ConnWZ.Execute(Sql)
  976.     j = rs.RecordCount
  977.     
  978.     For i = 0 To rs.RecordCount - 1
  979.         If Not IsNull(rs("凭单编号")) Then ListView1.ListItems.Add , "g + " & i, Trim(rs("凭单编号"))
  980.         If Not IsNull(rs("接收部门")) Then ListView1.ListItems(i + 1).SubItems(1) = Trim(rs("接收部门"))
  981.         rs.MoveNext
  982.     Next
  983. End Sub
  984. Private Sub Command4_Click()
  985.     ListView1.ListItems.Clear
  986.     Me.Height = 4890
  987. End Sub
  988. Private Sub DataGrid1_AfterColEdit(ByVal ColIndex As Integer)
  989.     
  990.     If YJBM = "服务管理部" And EJBM = "物资组" Then
  991.         If ColIndex = 7 Then
  992.             S = DataGrid1.Row
  993.             DataGrid1.Col = 7
  994.             DataGrid1.Row = S
  995.             sll = DataGrid1.Text
  996.             DataGrid1.Col = 8
  997.             DataGrid1.Row = S
  998.             djj = DataGrid1.Text
  999.             If IsNumeric(djj) = False Then
  1000.                 MsgBox "请输入数字!"
  1001.                 DataGrid1.Col = 8
  1002.                 DataGrid1.Row = S
  1003.                 DataGrid1.Text = 0
  1004.                 DataGrid1.Col = 15
  1005.                 DataGrid1.Row = S
  1006.                 DataGrid1.Text = 0
  1007.                 Exit Sub
  1008.             End If
  1009.             DataGrid1.Col = 15
  1010.             DataGrid1.Row = S
  1011.             DataGrid1.Text = sll
  1012.             DataGrid1.Col = 9
  1013.             DataGrid1.Row = S
  1014.             jje = djj * sll
  1015.             DataGrid1.Text = jje
  1016.         End If
  1017.     End If
  1018. End Sub
  1019. Private Sub DataGrid1_AfterColUpdate(ByVal ColIndex As Integer)
  1020.     
  1021.     If YJBM = "服务管理部" And EJBM = "物资组" Then
  1022.         On Error Resume Next
  1023.         If ColIndex = 1 Then
  1024.             t = DataGrid1.Row
  1025.             DataGrid1.Col = 1
  1026.             DataGrid1.Row = t
  1027.             bbh = Val(DataGrid1.Text)
  1028.             If IsNumeric(bbh) = False Then
  1029.                 MsgBox "请输入数字!"
  1030.                 DataGrid1.Col = 1
  1031.                 DataGrid1.Row = t
  1032.                 DataGrid1.Text = 0
  1033.                 Exit Sub
  1034.             End If
  1035.             Sql = "select * from 商品目录表 where 商品编号=" & bbh & ""
  1036.             Set rs = ConnWZ.Execute(Sql)
  1037.             DataGrid1.Col = 2
  1038.             DataGrid1.Row = t
  1039.             DataGrid1.Text = Trim(rs("名称"))
  1040.             strmc = Trim(rs("名称"))
  1041.             DataGrid1.Col = 3
  1042.             DataGrid1.Row = t
  1043.             DataGrid1.Text = Trim(rs("大类"))
  1044.             DataGrid1.Col = 4
  1045.             DataGrid1.Row = t
  1046.             DataGrid1.Text = Trim(rs("子类"))
  1047.             DataGrid1.Col = 5
  1048.             DataGrid1.Row = t
  1049.             DataGrid1.Text = Trim(rs("计量单位"))
  1050.             DataGrid1.Col = 6
  1051.             DataGrid1.Row = t
  1052.             DataGrid1.Text = Trim(rs("规格型号"))
  1053.             DataGrid1.Col = 8
  1054.             DataGrid1.Row = t
  1055.             DataGrid1.Text = Trim(rs("单价"))
  1056.             DataGrid1.Col = 7
  1057.             DataGrid1.Row = t
  1058.             ssl = DataGrid1.Text
  1059.             DataGrid1.Col = 9
  1060.             DataGrid1.Row = t
  1061.             DataGrid1.Text = ssl * Val(Trim(rs("单价")))
  1062.             W = DataGrid1.Row
  1063.             DataGrid1.Col = 7
  1064.             DataGrid1.Row = W
  1065.             ssll = DataGrid1.Text
  1066.             DataGrid1.Col = 15
  1067.             DataGrid1.Row = S
  1068.             DataGrid1.Text = ssll
  1069.             If ssll = "" Then GoTo 1000
  1070.             '报警
  1071.             DataGrid1.Col = 1
  1072.             DataGrid1.Row = t
  1073.             bbh = Val(DataGrid1.Text)
  1074.             SL = 0
  1075.             sql1 = "select * from 入库明细表 where 商品编号=" & bbh & ""
  1076.             Set RsKCCKCX = ConnWZ.Execute(sql1)
  1077.             Do While Not RsKCCKCX.EOF
  1078.                 SL = SL + Val(RsKCCKCX("数量"))
  1079.                 RsKCCKCX.MoveNext
  1080.             Loop
  1081.             sql1 = "select * from 出库明细表 where 商品编号=" & bbh & ""
  1082.             Set RsKCCKCX = ConnWZ.Execute(sql1)
  1083.             Do While Not RsKCCKCX.EOF
  1084.                 SL = SL - Val(RsKCCKCX("数量"))
  1085.                 RsKCCKCX.MoveNext
  1086.             Loop
  1087.             If SL < Val(ssll) Then
  1088.                 MsgBox "库存量只有" & SL & ". 无法出库!"
  1089.                 DataGrid1.Col = 7
  1090.                 DataGrid1.Row = W
  1091.                 DataGrid1.Text = 0
  1092.             End If
  1093.             
  1094.             '显示库存量
  1095. 1000:       SL = 0
  1096.             sql1 = "select * from 入库明细表 where 商品编号=" & bbh & ""
  1097.             Set RsKCCKCX = ConnWZ.Execute(sql1)
  1098.             Do While Not RsKCCKCX.EOF
  1099.                 SL = SL + Val(RsKCCKCX("数量"))
  1100.                 RsKCCKCX.MoveNext
  1101.             Loop
  1102.             sql1 = "select * from 出库明细表 where 商品编号=" & bbh & ""
  1103.             Set RsKCCKCX = ConnWZ.Execute(sql1)
  1104.             Do While Not RsKCCKCX.EOF
  1105.                 SL = SL - Val(RsKCCKCX("数量"))
  1106.                 RsKCCKCX.MoveNext
  1107.             Loop
  1108.             If SL = "" Then SL = 0
  1109.             Label5 = strmc & "库存量为:" & SL & ""
  1110.         End If
  1111.         If ColIndex = 7 Then
  1112.             W = DataGrid1.Row
  1113.             DataGrid1.Col = 7
  1114.             DataGrid1.Row = W
  1115.             ssll = DataGrid1.Text
  1116.             If IsNumeric(ssll) = False Then
  1117.                 MsgBox "请输入数字!"
  1118.                 DataGrid1.Col = 7
  1119.                 DataGrid1.Row = W
  1120.                 DataGrid1.Text = 0
  1121.                 DataGrid1.Col = 15
  1122.                 DataGrid1.Row = S
  1123.                 DataGrid1.Text = 0
  1124.                 Exit Sub
  1125.             End If
  1126.             
  1127.             DataGrid1.Col = 7
  1128.             t = DataGrid1.Row
  1129.             DataGrid1.Row = t
  1130.             ssl = DataGrid1.Text
  1131.             DataGrid1.Col = 8
  1132.             DataGrid1.Row = t
  1133.             ddj = DataGrid1.Text
  1134.             DataGrid1.Col = 9
  1135.             DataGrid1.Row = t
  1136.             DataGrid1.Text = Val(ssl) * Val(ddj)
  1137.             DataGrid1.Col = 15
  1138.             DataGrid1.Row = S
  1139.             DataGrid1.Text = ssll
  1140.             t = DataGrid1.Row
  1141.             DataGrid1.Col = 1
  1142.             DataGrid1.Row = t
  1143.             bbh = Val(DataGrid1.Text)
  1144.             sql1 = "select * from 入库明细表 where 商品编号=" & bbh & ""
  1145.             Set RsKCCKCX = ConnWZ.Execute(sql1)
  1146.             Do While Not RsKCCKCX.EOF
  1147.                 SL = SL + Val(RsKCCKCX("数量"))
  1148.                 RsKCCKCX.MoveNext
  1149.             Loop
  1150.             sql1 = "select * from 出库明细表 where 商品编号=" & bbh & ""
  1151.             Set RsKCCKCX = ConnWZ.Execute(sql1)
  1152.             Do While Not RsKCCKCX.EOF
  1153.                 SL = SL - Val(RsKCCKCX("数量"))
  1154.                 RsKCCKCX.MoveNext
  1155.             Loop
  1156.             If SL < Val(ssll) Then
  1157.                 MsgBox "库存量只有" & SL & ". 无法出库!"
  1158.                 DataGrid1.Col = 7
  1159.                 DataGrid1.Row = W
  1160.                 DataGrid1.Text = 0
  1161.             End If
  1162.             
  1163.         End If
  1164.     End If
  1165. End Sub
  1166. Private Sub DataGrid1_ButtonClick(ByVal ColIndex As Integer)
  1167.     
  1168.     If ColIndex = 10 Then
  1169.         List2.Move DataGrid1.Left + DataGrid1.Columns(10).Left + Frame1.Left, DataGrid1.Top + (DataGrid1.Row + 1) * (DataGrid1.RowHeight + 10) + DataGrid1.Columns(10).Top, DataGrid1.Columns(10).Width, List2.Height
  1170.         List2.Visible = True
  1171.     End If
  1172. End Sub
  1173. Private Sub DataGrid1_Click()
  1174.     If YJBM = "服务管理部" And EJBM = "物资组" Then
  1175.         Combo1.Enabled = False
  1176.         pdbh.Enabled = False
  1177.         DTPicker1.Enabled = False
  1178.         If pdbh = "" Then
  1179.             MsgBox "请先填写凭单编号"
  1180.             Exit Sub
  1181.         End If
  1182.     End If
  1183. End Sub
  1184. Private Sub DataGrid1_Error(ByVal DataError As Integer, Response As Integer)
  1185.     Response = 0
  1186. End Sub
  1187. Private Sub DataGrid1_OnAddNew()
  1188.     
  1189.     If YJBM = "服务管理部" And EJBM = "物资组" Then
  1190.         If pdbh = "" Then Exit Sub
  1191.         jsbm = Combo1.Text
  1192.         RQ = DTPicker1.Value
  1193.         Adodc1.Recordset.Fields("凭单编号") = pdbh
  1194.         Adodc1.Recordset.Fields("接收部门") = jsbm
  1195.         Adodc1.Recordset.Fields("出库日期") = RQ
  1196.         Adodc1.Recordset.Fields("是否报废") = 0
  1197.         Adodc1.Recordset.Fields("是否退库") = 0
  1198.         Adodc1.Recordset.Fields("盘亏") = "0"
  1199.         Adodc1.Recordset.Fields("处理状态") = "已处理"
  1200.     Else
  1201.         'jsbm = Combo1.Text
  1202.         RQ = DTPicker1.Value
  1203.         Adodc1.Recordset.Fields("出库日期") = RQ
  1204.         'If pdbh2 = "0" Then Exit Sub
  1205.         Adodc1.Recordset.Fields("凭单编号") = pdbh2
  1206.         Adodc1.Recordset.Fields("接收部门") = jsbm
  1207.         Adodc1.Recordset.Fields("处理状态") = "待处理"
  1208.     End If
  1209. 'Adodc1.Recordset.Fields("领用类别") = Combo2.Text
  1210. End Sub
  1211. Private Sub Exit_Click()
  1212.     Unload Me
  1213. End Sub
  1214. Private Sub Form_Load()
  1215.         StrFLG = 0
  1216.         If YJBM = "服务管理部" And EJBM = "物资组" Then
  1217.             Sql = "select * from 出库凭单表 where 处理状态='待处理'"
  1218.             Set rs = ConnWZ.Execute(Sql)
  1219.             If Not rs.EOF Then
  1220.                 Command3.BackColor = &HFF00&   ' RGB(0, 255, 0)
  1221.                 Command3.Enabled = True
  1222.             End If
  1223.             Sql = "select * from 商品目录表"
  1224.             Set rs = ConnWZ.Execute(Sql)
  1225.             Do While Not rs.EOF
  1226.                 spmcc = rs("名称")
  1227.                 sql1 = "select * from 入库明细表 where 名称='" & spmcc & "'"
  1228.                 Set RsKCCKCX = ConnWZ.Execute(sql1)
  1229.                 Do While Not RsKCCKCX.EOF
  1230.                     sll = sll + Val(RsKCCKCX("数量"))
  1231.                     RsKCCKCX.MoveNext
  1232.                 Loop
  1233.                 sql1 = "select * from 出库明细表 where 名称='" & spmcc & "'"
  1234.                 Set RsKCCKCX = ConnWZ.Execute(sql1)
  1235.                 Do While Not RsKCCKCX.EOF
  1236.                     sll = sll - Val(RsKCCKCX("数量"))
  1237.                     RsKCCKCX.MoveNext
  1238.                 Loop
  1239.                 zdccl = Val(rs("最低存储"))
  1240.                 zgccl = Val(rs("最高存储"))
  1241.                 If sll < zdccl Then
  1242.                     Result = MsgBox(Trim(spmcc) & "的数量为" & sll & "." & "该商品短缺!继续查看吗?", vbYesNo)
  1243.                     If Result = 7 Then
  1244.                         Exit Do
  1245.                     End If
  1246.                 End If
  1247.                 If sll > zgccl Then
  1248.                     Result = MsgBox(Trim(spmcc) & "的数量为" & sll & "." & "该商品积压!继续查看吗?", vbYesNo)
  1249.                     If Result = 7 Then
  1250.                         Exit Do
  1251.                     End If
  1252.                 End If
  1253.                 
  1254.                 rs.MoveNext
  1255.                 sll = 0
  1256.             Loop
  1257.             Sql = "select max(凭单编号) from 出库凭单表"
  1258.             Set Rsrkpd = ConnWZ.Execute(Sql)
  1259.             If Rsrkpd.EOF Then Exit Sub
  1260.             If IsNull(Rsrkpd(0)) = False Then
  1261.                 pdbh2 = Rsrkpd(0) + 1
  1262.             Else
  1263.                 pdbh2 = 1
  1264.             End If
  1265.             pdbh = pdbh2
  1266.             DTPicker1.Value = Date
  1267.             Sql = "select * from 部门维护表"
  1268.             Set rs = ConnWZ.Execute(Sql)
  1269.             Do While Not rs.EOF
  1270.                 Combo1.AddItem rs("部门名称")
  1271.                 rs.MoveNext
  1272.             Loop
  1273.             sqlyg = "select * from 员工表 where 二级部门='物资组'"
  1274.             Set rsyg = ConnWZ.Execute(sqlyg)
  1275.             Do While Not rsyg.EOF
  1276.                 ComboKJ.AddItem rsyg("员工姓名")
  1277.                 ComboBGY.AddItem rsyg("员工姓名")
  1278.                 rsyg.MoveNext
  1279.             Loop
  1280.         Else
  1281.                 Sql = "select max(凭单编号) from 出库凭单表"
  1282.                 Set Rsrkpd = ConnWZ.Execute(Sql)
  1283.                 If Rsrkpd.EOF Then Exit Sub
  1284.                 If IsNull(Rsrkpd(0)) = False Then
  1285.                     pdbh2 = Rsrkpd(0) + 1
  1286.                 Else
  1287.                     pdbh2 = 1
  1288.                 End If
  1289.                 Frame8.Visible = False
  1290.                 
  1291.                 DataGrid1.Columns("商品编号").Locked = True
  1292.                 DataGrid1.Columns("物资大类").Locked = True
  1293.                 DataGrid1.Columns("物资子类").Locked = True
  1294.                 DataGrid1.Columns("单位").Locked = True
  1295.                 DataGrid1.Columns("规格型号").Locked = True
  1296.                 DataGrid1.Columns("单价").Locked = True
  1297.                 DataGrid1.Columns("金额").Locked = True
  1298.                 DataGrid1.Columns("备注").Locked = True
  1299.                 ComboKJ.Locked = True
  1300.                 ComboBGY.Locked = True
  1301.                 Command3.Visible = False
  1302.                 DTPicker1.Value = Date
  1303.                 If YJBM = "总经理办公室" Then
  1304.                     Combo1.Text = "总经理办公室"
  1305.                     Label1 = "物品领用单"
  1306.                     sqlyg = "select * from 员工表 where 一级部门='总经理办公室' and 岗位='部门经理'"
  1307.                     Set rsyg = ConnWZ.Execute(sqlyg)
  1308.                     Do While Not rsyg.EOF
  1309.                         ComboZG.AddItem rsyg("员工姓名")
  1310.                         rsyg.MoveNext
  1311.                     Loop
  1312.                     sqlyg = "select * from 员工表 where 一级部门='总经理办公室'"
  1313.                     Set rsyg = ConnWZ.Execute(sqlyg)
  1314.                     Do While Not rsyg.EOF
  1315.                         JSRR.AddItem rsyg("员工姓名")
  1316.                         rsyg.MoveNext
  1317.                     Loop
  1318.                 End If
  1319.                 If YJBM = "动物部" Then
  1320.                     Combo1.Text = "动物部"
  1321.                     Label1 = "物品领用单"
  1322.                 End If
  1323.                 If YJBM = "通用公司" Then
  1324.                     Combo1.Text = "通用公司"
  1325.                     Label1 = "物品领用单"
  1326.                 End If
  1327.                 If YJBM = "人力资源部" Then
  1328.                     Combo1.Text = "人力资源部"
  1329.                     Label1 = "物品领用单"
  1330.                     sqlyg = "select * from 员工表 where 一级部门='人力资源部' and 岗位='部门经理'"
  1331.                     Set rsyg = ConnWZ.Execute(sqlyg)
  1332.                     Do While Not rsyg.EOF
  1333.                         ComboZG.AddItem rsyg("员工姓名")
  1334.                         rsyg.MoveNext
  1335.                     Loop
  1336.                     sqlyg = "select * from 员工表 where 一级部门='人力资源部'"
  1337.                     Set rsyg = ConnWZ.Execute(sqlyg)
  1338.                     Do While Not rsyg.EOF
  1339.                         JSRR.AddItem rsyg("员工姓名")
  1340.                         rsyg.MoveNext
  1341.                     Loop
  1342.                 End If
  1343.                 If YJBM = "商品部" Then
  1344.                     Combo1.Text = "商品部"
  1345.                     Label1 = "物品领用单"
  1346.                 End If
  1347.                 If YJBM = "水族部" Then
  1348.                     Combo1.Text = "水族部"
  1349.                     Label1 = "物品领用单"
  1350.                 End If
  1351.                 If YJBM = "设备工程部" Then
  1352.                     Combo1.Text = "设备工程部"
  1353.                     Label1 = "物品领用单"
  1354.                 End If
  1355.                 If YJBM = "公关策划部" Then
  1356.                     Combo1.Text = "公关策划部"
  1357.                     Label1 = "物品领用单"
  1358.                 End If
  1359.                 If YJBM = "计财部" Then
  1360.                     Combo1.Text = "计财部"
  1361.                     Label1 = "物品领用单"
  1362.                 End If
  1363.                 If YJBM = "服务管理部" And EJBM = "车管组" Then
  1364.                     Combo1.Text = "服务管理部"
  1365.                     Label1 = "物品领用单"
  1366.                 End If
  1367.                 If YJBM = "服务管理部" And EJBM = " 保安组" Then
  1368.                     Combo1.Text = "服务管理部"
  1369.                     Label1 = "物品领用单"
  1370.                 End If
  1371.                 If YJBM = "服务管理部" And EJBM = " 食堂组" Then
  1372.                     Combo1.Text = "服务管理部"
  1373.                     Label1 = "物品领用单"
  1374.                 End If
  1375.                 
  1376.         End If
  1377. End Sub
  1378. Private Sub List1_Click()
  1379.     For i = 0 To List1.ListCount - 1
  1380.         If List1.Selected(i) = True Then
  1381.             pdbh1 = List1.List(i)
  1382.             Sql = "select * from 出库凭单表 where 凭单编号=" & pdbh1 & ""
  1383.             Set rs = ConnWZ.Execute(Sql)
  1384.             XSBM = rs("接收部门")
  1385.         End If
  1386.    Next
  1387. End Sub
  1388. Private Sub List2_Click()
  1389.     DataGrid1.Columns(10).Text = List2.Text
  1390.     List2.Visible = False
  1391. End Sub
  1392. Private Sub ListView1_ItemCheck(ByVal Item As MSComctlLib.ListItem)
  1393. '    For i = 1 To ListView1.ListItems.Count
  1394. '        If ListView1.ListItems(i).Checked = True Then
  1395. '            For j = i To ListView1.ListItems.Count
  1396. '                If j = ListView1.ListItems.Count Then Exit Sub
  1397. '                ListView1.ListItems(j + 1).Checked = False
  1398. '            Next
  1399. '        End If
  1400. '    Next
  1401. End Sub
  1402. Private Sub pdbh_Change()
  1403.    DataGrid1.Enabled = True
  1404. End Sub
  1405. Private Sub pdbh_LostFocus()
  1406.  On Error Resume Next
  1407.     'res = StrComp(Str(Val(pdbh)), Str(pdbh))
  1408.      Str (pdbh)
  1409.    If Err = 13 Then
  1410.       MsgBox "凭单编号必须为数字!"
  1411.       pdbh = ""
  1412.       DataGrid1.Enabled = False
  1413.    Else
  1414.       Sql = "select * from 出库凭单表"
  1415.       Set RsCkpd = ConnWZ.Execute(Sql)
  1416.     Do While Not RsCkpd.EOF
  1417.      If pdbh = RsCkpd("凭单编号") Then
  1418.       MsgBox "凭单编号已存在,请确定是否输入错误!"
  1419.       DataGrid1.Enabled = False
  1420.       Exit Sub
  1421.      Else
  1422.       DataGrid1.Enabled = True
  1423.      End If
  1424.       RsCkpd.MoveNext
  1425.     Loop
  1426.       RsCkpd.Close
  1427.    End If
  1428.    
  1429.    End Sub
  1430. 'Private Sub List1_Click()
  1431.    ' DataGrid1.Columns(3).Text = List1.Text
  1432.    ' List1.Visible = False
  1433. 'End Sub
  1434. Private Sub Save_Click()
  1435.     
  1436.   'Do While Not Rsrkpd.EOF
  1437.   'If pdbh = Rsrkpd("凭单编号") Then
  1438.   '  MsgBox "凭单编号已存在,请确定是否输入错误!"
  1439.   '  Exit Sub
  1440.   'End If
  1441.   '  Rsrkpd.MoveNext
  1442.   'Loop
  1443.   'Rsrkpd.CLOSE
  1444.     Result = MsgBox("您确实要保存吗?", vbYesNo)
  1445.       
  1446. If Result = 6 Then
  1447.     
  1448.     If YJBM = "服务管理部" And EJBM = "物资组" Then
  1449.         If pdbh = "" Then
  1450.             MsgBox "请您输入凭单编号!"
  1451.             Exit Sub
  1452.         End If
  1453.         jsbm = Combo1.Text
  1454.         ZG = ComboZG.Text
  1455.         BGY = ComboBGY.Text
  1456.         kj = ComboKJ.Text
  1457.         JSRR = JSRR.Text
  1458.         pdbh = Val(pdbh)
  1459.         RQ = DTPicker1.Value
  1460.         Adodc1.Recordset.UpdateBatch
  1461.         If StrFLG = 0 Then
  1462.             Sql = "insert 出库凭单表 (凭单编号,会计,保管员,处理状态,接收部门,出库日期,主管,经手人) values(" & pdbh & ",'" & ComboKJ & "','" & ComboBGY & "','已处理','" & Combo1 & "','" & DTPicker1 & "','" & ComboZG & "','" & JSRR & "' )"
  1463.             Set Rsrkpd = ConnWZ.Execute(Sql)
  1464.           Else
  1465.             Sql = "update 出库凭单表 set 会计='" & kj & "',保管员='" & BGY & "',处理状态='已处理' where 凭单编号=" & pdbh & ""
  1466.             Set Rsrkpd = ConnWZ.Execute(Sql)
  1467.             Sql = "update 出库明细表 set 接收部门='" & Combo1 & "',经手人='" & JSRR & "',处理状态='已处理',盘亏='0',是否报废=0,是否退库=0 where 凭单编号=" & pdbh & ""
  1468.             Set rs = ConnWZ.Execute(Sql)
  1469.         End If
  1470.         Sql = "select * from 出库明细表 where 凭单编号=" & pdbh & ""
  1471.         Set rs = ConnWZ.Execute(Sql)
  1472.         Do While Not rs.EOF
  1473.             RIQI = DTPicker1.Value
  1474.             WUZZL = rs("物资子类")
  1475.             MC = rs("名称")
  1476.             BH = rs("商品编号")
  1477.             SHUL = rs("数量")
  1478.             DANJ = rs("单价")
  1479.             JINE = rs("金额")
  1480.             jsbmm = rs("接收部门")
  1481.             HJj = 0
  1482.             sqlmxz = "select * from 物品明细帐 where 收入或支出='收入'"
  1483.             Set Rsmxz = ConnWZ.Execute(sqlmxz)
  1484.             Do While Not Rsmxz.EOF
  1485.                 jjee = Rsmxz("金额")
  1486.                 HJj = HJj + Val(jjee)
  1487.                 Rsmxz.MoveNext
  1488.             Loop
  1489.             sqlmxz = "select * from 物品明细帐 where 收入或支出='支出'"
  1490.             Set Rsmxz = ConnWZ.Execute(sqlmxz)
  1491.             Do While Not Rsmxz.EOF
  1492.                 jjee = Rsmxz("金额")
  1493.                 HJj = HJj - Val(jjee)
  1494.                 Rsmxz.MoveNext
  1495.             Loop
  1496.             HJj = HJj - JINE
  1497.             Sql = "insert 物品明细帐(日期,名称,商品编号,物资子类,数量,单价,金额,收入或支出,合计,去向) values('" & RIQI & "','" & MC & "','" & BH & "','" & WUZZL & "'," & SHUL & "," & DANJ & "," & JINE & ",'支出'," & HJj & ",'" & jsbmm & "')"
  1498.             Set Rsrkpd = ConnWZ.Execute(Sql)
  1499.             rs.MoveNext
  1500.         Loop
  1501.         WZGL.Enabled = True
  1502.         Unload Me
  1503.     Else
  1504.         
  1505.         jsbm = Combo1.Text
  1506.         ZG = ComboZG.Text
  1507.         BGY = ComboBGY.Text
  1508.         kj = ComboKJ.Text
  1509.         JSRR = JSRR.Text
  1510.         RQ = DTPicker1.Value
  1511.         Adodc1.Recordset.UpdateBatch
  1512.         Sql = "insert 出库凭单表(凭单编号,接收部门,出库日期,经手人,主管,会计,保管员,处理状态) values(" & pdbh2 & ",'" & jsbm & "','" & RQ & "','" & JSRR & "','" & ZG & "','" & kj & "','" & BGY & "','待处理')"
  1513.         Set Rsrkpd = ConnWZ.Execute(Sql)
  1514.         Sql = "update 出库明细表 set 经手人='" & JSRR & "' where 凭单编号=" & pdbh2 & ""
  1515.         Set rs = ConnWZ.Execute(Sql)
  1516.                 If YJBM = "总经理办公室" Then
  1517.                     XingZhengGL.Enabled = True
  1518.                 End If
  1519.                 If YJBM = "动物部" Then
  1520.                     Combo1.Text = "动物部"
  1521.                 End If
  1522.                 If YJBM = "通用公司" Then
  1523.                     Combo1.Text = "通用公司"
  1524.                 End If
  1525.                 If YJBM = "人力资源部" Then
  1526.                     RSGL.Enabled = True
  1527.                 End If
  1528.                 If YJBM = "商品部" Then
  1529.                     SPGL.Enabled = True
  1530.                 End If
  1531.                 If YJBM = "水族部" Then
  1532.                     SZBGL.Enabled = True
  1533.                 End If
  1534.                 If YJBM = "设备工程部" Then
  1535.                     SBGCGL.Enabled = True
  1536.                 End If
  1537.                 If YJBM = "公关策划部" Then
  1538.                     SCGL.Enabled = True
  1539.                 End If
  1540.                 If YJBM = "计财部" Then
  1541.                     CWGL.Enabled = True
  1542.                 End If
  1543.                 If YJBM = "服务管理部" And EJBM = "车管组" Then
  1544.                     CLGL.Enabled = True
  1545.                 End If
  1546.                 If YJBM = "服务管理部" And EJBM = " 保安组" Then
  1547.                     BABFrm.Enabled = True
  1548.                 End If
  1549.                 If YJBM = "服务管理部" And EJBM = " 食堂组" Then
  1550.                     STGL.Enabled = True
  1551.                 End If
  1552.                 Unload Me
  1553.     End If
  1554. End If
  1555. End Sub