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

企业管理

开发平台:

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