frmCpTotal.vb
上传用户:wj57717022
上传日期:2014-12-16
资源大小:4093k
文件大小:23k
- Public Class frmCpTotal
- Inherits System.Windows.Forms.Form
- #Region " Windows 窗体设计器生成的代码 "
- Public Sub New()
- MyBase.New()
- '该调用是 Windows 窗体设计器所必需的。
- InitializeComponent()
- '在 InitializeComponent() 调用之后添加任何初始化
- End Sub
- '窗体重写 dispose 以清理组件列表。
- Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
- If disposing Then
- If Not (components Is Nothing) Then
- components.Dispose()
- End If
- End If
- MyBase.Dispose(disposing)
- End Sub
- 'Windows 窗体设计器所必需的
- Private components As System.ComponentModel.IContainer
- '注意: 以下过程是 Windows 窗体设计器所必需的
- '可以使用 Windows 窗体设计器修改此过程。
- '不要使用代码编辑器修改它。
- Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox
- Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox
- Friend WithEvents Label1 As System.Windows.Forms.Label
- Friend WithEvents txtBeginTime As System.Windows.Forms.DateTimePicker
- Friend WithEvents Label2 As System.Windows.Forms.Label
- Friend WithEvents txtEndTime As System.Windows.Forms.DateTimePicker
- Friend WithEvents Label3 As System.Windows.Forms.Label
- Friend WithEvents txtMedName As System.Windows.Forms.TextBox
- Friend WithEvents Label4 As System.Windows.Forms.Label
- Friend WithEvents txtBatch As System.Windows.Forms.TextBox
- Friend WithEvents btnQueryAll As System.Windows.Forms.Button
- Friend WithEvents btnQuery As System.Windows.Forms.Button
- Friend WithEvents btnPrint As System.Windows.Forms.Button
- Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox
- Friend WithEvents tabtable As System.Windows.Forms.TabControl
- Friend WithEvents tbrk As System.Windows.Forms.TabPage
- Friend WithEvents tbrkt As System.Windows.Forms.TabPage
- Friend WithEvents tbck As System.Windows.Forms.TabPage
- Friend WithEvents tbckt As System.Windows.Forms.TabPage
- Friend WithEvents tbkc As System.Windows.Forms.TabPage
- Friend WithEvents tbkcbs As System.Windows.Forms.TabPage
- Friend WithEvents tbkcby As System.Windows.Forms.TabPage
- Friend WithEvents tbbh As System.Windows.Forms.TabPage
- Friend WithEvents tbSh As System.Windows.Forms.TabPage
- Friend WithEvents tbps As System.Windows.Forms.TabPage
- Friend WithEvents tbpst As System.Windows.Forms.TabPage
- Friend WithEvents Panel1 As System.Windows.Forms.Panel
- Friend WithEvents dgview As System.Windows.Forms.DataGrid
- <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
- Me.GroupBox1 = New System.Windows.Forms.GroupBox
- Me.txtBatch = New System.Windows.Forms.TextBox
- Me.Label4 = New System.Windows.Forms.Label
- Me.txtMedName = New System.Windows.Forms.TextBox
- Me.Label3 = New System.Windows.Forms.Label
- Me.txtEndTime = New System.Windows.Forms.DateTimePicker
- Me.Label2 = New System.Windows.Forms.Label
- Me.txtBeginTime = New System.Windows.Forms.DateTimePicker
- Me.Label1 = New System.Windows.Forms.Label
- Me.GroupBox2 = New System.Windows.Forms.GroupBox
- Me.btnPrint = New System.Windows.Forms.Button
- Me.btnQuery = New System.Windows.Forms.Button
- Me.btnQueryAll = New System.Windows.Forms.Button
- Me.GroupBox3 = New System.Windows.Forms.GroupBox
- Me.tabtable = New System.Windows.Forms.TabControl
- Me.tbrk = New System.Windows.Forms.TabPage
- Me.tbrkt = New System.Windows.Forms.TabPage
- Me.tbck = New System.Windows.Forms.TabPage
- Me.tbckt = New System.Windows.Forms.TabPage
- Me.tbkc = New System.Windows.Forms.TabPage
- Me.tbkcbs = New System.Windows.Forms.TabPage
- Me.tbkcby = New System.Windows.Forms.TabPage
- Me.tbbh = New System.Windows.Forms.TabPage
- Me.tbSh = New System.Windows.Forms.TabPage
- Me.tbps = New System.Windows.Forms.TabPage
- Me.tbpst = New System.Windows.Forms.TabPage
- Me.Panel1 = New System.Windows.Forms.Panel
- Me.dgview = New System.Windows.Forms.DataGrid
- Me.GroupBox1.SuspendLayout()
- Me.GroupBox2.SuspendLayout()
- Me.GroupBox3.SuspendLayout()
- Me.tabtable.SuspendLayout()
- Me.Panel1.SuspendLayout()
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).BeginInit()
- Me.SuspendLayout()
- '
- 'GroupBox1
- '
- Me.GroupBox1.Controls.Add(Me.txtBatch)
- Me.GroupBox1.Controls.Add(Me.Label4)
- Me.GroupBox1.Controls.Add(Me.txtMedName)
- Me.GroupBox1.Controls.Add(Me.Label3)
- Me.GroupBox1.Controls.Add(Me.txtEndTime)
- Me.GroupBox1.Controls.Add(Me.Label2)
- Me.GroupBox1.Controls.Add(Me.txtBeginTime)
- Me.GroupBox1.Controls.Add(Me.Label1)
- Me.GroupBox1.Dock = System.Windows.Forms.DockStyle.Top
- Me.GroupBox1.Location = New System.Drawing.Point(0, 0)
- Me.GroupBox1.Name = "GroupBox1"
- Me.GroupBox1.Size = New System.Drawing.Size(1028, 103)
- Me.GroupBox1.TabIndex = 0
- Me.GroupBox1.TabStop = False
- '
- 'txtBatch
- '
- Me.txtBatch.Location = New System.Drawing.Point(363, 62)
- Me.txtBatch.Name = "txtBatch"
- Me.txtBatch.Size = New System.Drawing.Size(149, 25)
- Me.txtBatch.TabIndex = 7
- Me.txtBatch.Text = ""
- '
- 'Label4
- '
- Me.Label4.AutoSize = True
- Me.Label4.Location = New System.Drawing.Point(320, 72)
- Me.Label4.Name = "Label4"
- Me.Label4.Size = New System.Drawing.Size(44, 21)
- Me.Label4.TabIndex = 6
- Me.Label4.Text = "批号:"
- '
- 'txtMedName
- '
- Me.txtMedName.Location = New System.Drawing.Point(96, 62)
- Me.txtMedName.Name = "txtMedName"
- Me.txtMedName.Size = New System.Drawing.Size(149, 25)
- Me.txtMedName.TabIndex = 5
- Me.txtMedName.Text = ""
- '
- 'Label3
- '
- Me.Label3.AutoSize = True
- Me.Label3.Location = New System.Drawing.Point(21, 72)
- Me.Label3.Name = "Label3"
- Me.Label3.Size = New System.Drawing.Size(75, 21)
- Me.Label3.TabIndex = 4
- Me.Label3.Text = "药品名称:"
- '
- 'txtEndTime
- '
- Me.txtEndTime.Location = New System.Drawing.Point(363, 21)
- Me.txtEndTime.Name = "txtEndTime"
- Me.txtEndTime.Size = New System.Drawing.Size(149, 25)
- Me.txtEndTime.TabIndex = 3
- Me.txtEndTime.Value = New Date(2006, 2, 22, 0, 0, 0, 0)
- '
- 'Label2
- '
- Me.Label2.AutoSize = True
- Me.Label2.Location = New System.Drawing.Point(288, 31)
- Me.Label2.Name = "Label2"
- Me.Label2.Size = New System.Drawing.Size(75, 21)
- Me.Label2.TabIndex = 2
- Me.Label2.Text = "结束日期:"
- '
- 'txtBeginTime
- '
- Me.txtBeginTime.Location = New System.Drawing.Point(96, 21)
- Me.txtBeginTime.Name = "txtBeginTime"
- Me.txtBeginTime.Size = New System.Drawing.Size(149, 25)
- Me.txtBeginTime.TabIndex = 1
- Me.txtBeginTime.Value = New Date(2006, 2, 22, 0, 0, 0, 0)
- '
- 'Label1
- '
- Me.Label1.AutoSize = True
- Me.Label1.Location = New System.Drawing.Point(21, 31)
- Me.Label1.Name = "Label1"
- Me.Label1.Size = New System.Drawing.Size(75, 21)
- Me.Label1.TabIndex = 0
- Me.Label1.Text = "开始日期:"
- '
- 'GroupBox2
- '
- Me.GroupBox2.Controls.Add(Me.btnPrint)
- Me.GroupBox2.Controls.Add(Me.btnQuery)
- Me.GroupBox2.Controls.Add(Me.btnQueryAll)
- Me.GroupBox2.Dock = System.Windows.Forms.DockStyle.Right
- Me.GroupBox2.Location = New System.Drawing.Point(924, 103)
- Me.GroupBox2.Name = "GroupBox2"
- Me.GroupBox2.Size = New System.Drawing.Size(104, 529)
- Me.GroupBox2.TabIndex = 1
- Me.GroupBox2.TabStop = False
- '
- 'btnPrint
- '
- Me.btnPrint.Dock = System.Windows.Forms.DockStyle.Top
- Me.btnPrint.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.btnPrint.Location = New System.Drawing.Point(3, 81)
- Me.btnPrint.Name = "btnPrint"
- Me.btnPrint.Size = New System.Drawing.Size(98, 30)
- Me.btnPrint.TabIndex = 2
- Me.btnPrint.Text = "打印"
- '
- 'btnQuery
- '
- Me.btnQuery.Dock = System.Windows.Forms.DockStyle.Top
- Me.btnQuery.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.btnQuery.Location = New System.Drawing.Point(3, 51)
- Me.btnQuery.Name = "btnQuery"
- Me.btnQuery.Size = New System.Drawing.Size(98, 30)
- Me.btnQuery.TabIndex = 1
- Me.btnQuery.Tag = ""
- Me.btnQuery.Text = "条件查询"
- '
- 'btnQueryAll
- '
- Me.btnQueryAll.Dock = System.Windows.Forms.DockStyle.Top
- Me.btnQueryAll.FlatStyle = System.Windows.Forms.FlatStyle.Popup
- Me.btnQueryAll.Location = New System.Drawing.Point(3, 21)
- Me.btnQueryAll.Name = "btnQueryAll"
- Me.btnQueryAll.Size = New System.Drawing.Size(98, 30)
- Me.btnQueryAll.TabIndex = 0
- Me.btnQueryAll.Tag = ""
- Me.btnQueryAll.Text = "全部查询"
- '
- 'GroupBox3
- '
- Me.GroupBox3.Controls.Add(Me.tabtable)
- Me.GroupBox3.Dock = System.Windows.Forms.DockStyle.Top
- Me.GroupBox3.Location = New System.Drawing.Point(0, 103)
- Me.GroupBox3.Name = "GroupBox3"
- Me.GroupBox3.Size = New System.Drawing.Size(924, 62)
- Me.GroupBox3.TabIndex = 4
- Me.GroupBox3.TabStop = False
- '
- 'tabtable
- '
- Me.tabtable.Appearance = System.Windows.Forms.TabAppearance.FlatButtons
- Me.tabtable.Controls.Add(Me.tbrk)
- Me.tabtable.Controls.Add(Me.tbrkt)
- Me.tabtable.Controls.Add(Me.tbck)
- Me.tabtable.Controls.Add(Me.tbckt)
- Me.tabtable.Controls.Add(Me.tbkc)
- Me.tabtable.Controls.Add(Me.tbkcbs)
- Me.tabtable.Controls.Add(Me.tbkcby)
- Me.tabtable.Controls.Add(Me.tbbh)
- Me.tabtable.Controls.Add(Me.tbSh)
- Me.tabtable.Controls.Add(Me.tbps)
- Me.tabtable.Controls.Add(Me.tbpst)
- Me.tabtable.Dock = System.Windows.Forms.DockStyle.Fill
- Me.tabtable.Location = New System.Drawing.Point(3, 21)
- Me.tabtable.Name = "tabtable"
- Me.tabtable.SelectedIndex = 0
- Me.tabtable.Size = New System.Drawing.Size(918, 38)
- Me.tabtable.TabIndex = 3
- '
- 'tbrk
- '
- Me.tbrk.Location = New System.Drawing.Point(4, 27)
- Me.tbrk.Name = "tbrk"
- Me.tbrk.Size = New System.Drawing.Size(910, 7)
- Me.tbrk.TabIndex = 0
- Me.tbrk.Text = "采购入库"
- '
- 'tbrkt
- '
- Me.tbrkt.Location = New System.Drawing.Point(4, 27)
- Me.tbrkt.Name = "tbrkt"
- Me.tbrkt.Size = New System.Drawing.Size(884, 5)
- Me.tbrkt.TabIndex = 1
- Me.tbrkt.Text = "采购退货"
- Me.tbrkt.Visible = False
- '
- 'tbck
- '
- Me.tbck.Location = New System.Drawing.Point(4, 27)
- Me.tbck.Name = "tbck"
- Me.tbck.Size = New System.Drawing.Size(884, 5)
- Me.tbck.TabIndex = 2
- Me.tbck.Text = "销售出库"
- Me.tbck.Visible = False
- '
- 'tbckt
- '
- Me.tbckt.Location = New System.Drawing.Point(4, 27)
- Me.tbckt.Name = "tbckt"
- Me.tbckt.Size = New System.Drawing.Size(884, 5)
- Me.tbckt.TabIndex = 3
- Me.tbckt.Text = "销售退货"
- Me.tbckt.Visible = False
- '
- 'tbkc
- '
- Me.tbkc.Location = New System.Drawing.Point(4, 27)
- Me.tbkc.Name = "tbkc"
- Me.tbkc.Size = New System.Drawing.Size(884, 5)
- Me.tbkc.TabIndex = 4
- Me.tbkc.Text = "当前库存"
- Me.tbkc.Visible = False
- '
- 'tbkcbs
- '
- Me.tbkcbs.Location = New System.Drawing.Point(4, 27)
- Me.tbkcbs.Name = "tbkcbs"
- Me.tbkcbs.Size = New System.Drawing.Size(884, 5)
- Me.tbkcbs.TabIndex = 5
- Me.tbkcbs.Text = "报损单"
- Me.tbkcbs.Visible = False
- '
- 'tbkcby
- '
- Me.tbkcby.Location = New System.Drawing.Point(4, 27)
- Me.tbkcby.Name = "tbkcby"
- Me.tbkcby.Size = New System.Drawing.Size(884, 5)
- Me.tbkcby.TabIndex = 6
- Me.tbkcby.Text = "报溢单"
- Me.tbkcby.Visible = False
- '
- 'tbbh
- '
- Me.tbbh.Location = New System.Drawing.Point(4, 27)
- Me.tbbh.Name = "tbbh"
- Me.tbbh.Size = New System.Drawing.Size(884, 5)
- Me.tbbh.TabIndex = 7
- Me.tbbh.Text = "门店补货单"
- Me.tbbh.Visible = False
- '
- 'tbSh
- '
- Me.tbSh.Location = New System.Drawing.Point(4, 27)
- Me.tbSh.Name = "tbSh"
- Me.tbSh.Size = New System.Drawing.Size(884, 5)
- Me.tbSh.TabIndex = 9
- Me.tbSh.Text = "门店收货单"
- Me.tbSh.Visible = False
- '
- 'tbps
- '
- Me.tbps.Location = New System.Drawing.Point(4, 27)
- Me.tbps.Name = "tbps"
- Me.tbps.Size = New System.Drawing.Size(884, 5)
- Me.tbps.TabIndex = 10
- Me.tbps.Text = "配送单"
- Me.tbps.Visible = False
- '
- 'tbpst
- '
- Me.tbpst.Location = New System.Drawing.Point(4, 27)
- Me.tbpst.Name = "tbpst"
- Me.tbpst.Size = New System.Drawing.Size(884, 5)
- Me.tbpst.TabIndex = 11
- Me.tbpst.Text = "配送退货单"
- Me.tbpst.Visible = False
- '
- 'Panel1
- '
- Me.Panel1.Controls.Add(Me.dgview)
- Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
- Me.Panel1.Location = New System.Drawing.Point(0, 165)
- Me.Panel1.Name = "Panel1"
- Me.Panel1.Size = New System.Drawing.Size(924, 467)
- Me.Panel1.TabIndex = 5
- '
- 'dgview
- '
- Me.dgview.DataMember = ""
- Me.dgview.Dock = System.Windows.Forms.DockStyle.Fill
- Me.dgview.HeaderForeColor = System.Drawing.SystemColors.ControlText
- Me.dgview.Location = New System.Drawing.Point(0, 0)
- Me.dgview.Name = "dgview"
- Me.dgview.Size = New System.Drawing.Size(924, 467)
- Me.dgview.TabIndex = 4
- '
- 'frmCpTotal
- '
- Me.AutoScaleBaseSize = New System.Drawing.Size(8, 18)
- Me.ClientSize = New System.Drawing.Size(1028, 632)
- Me.Controls.Add(Me.Panel1)
- Me.Controls.Add(Me.GroupBox3)
- Me.Controls.Add(Me.GroupBox2)
- Me.Controls.Add(Me.GroupBox1)
- Me.Name = "frmCpTotal"
- Me.Text = "药品统计分析"
- Me.WindowState = System.Windows.Forms.FormWindowState.Maximized
- Me.GroupBox1.ResumeLayout(False)
- Me.GroupBox2.ResumeLayout(False)
- Me.GroupBox3.ResumeLayout(False)
- Me.tabtable.ResumeLayout(False)
- Me.Panel1.ResumeLayout(False)
- CType(Me.dgview, System.ComponentModel.ISupportInitialize).EndInit()
- Me.ResumeLayout(False)
- End Sub
- #End Region
- Public lsweb As New jxcmanage
- Public strquery As String
- Public strqueryes As String
- Private Sub tabtable_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
- Dim strtable As String
- Select Case tabtable.SelectedTab.Text
- Case "采购入库"
- btnQuery.Tag = "wz_rk"
- btnQueryAll.Tag = "wz_rk"
- Case "采购退货"
- Case "销售出库"
- btnQuery.Tag = "wz_ck"
- btnQueryAll.Tag = "wz_ck"
- Case "销售退货"
- Case "当前库存"
- ' btnQuery.Tag = "wz_kc"
- ' btnQueryAll.Tag = "wz_kc"
- Case "报损单"
- Case "报溢单"
- Case "门店补货单"
- Case "门店收货单"
- Case "配送单"
- Case "配送返货单"
- End Select
- End Sub
- Private Sub btnQuery_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQuery.Click
- Dim dslocal As DataSet
- If txtMedName.Text = String.Empty Or txtBatch.Text = String.Empty Then
- MessageBox.Show("不许为空!请输入查询值。", "", MessageBoxButtons.OK)
- Else
- Select Case tabtable.SelectedTab.Text
- Case "当前库存"
- strquery = "select * from wz_kc where 药品名称='" & txtMedName.Text.Trim & "' and 批号='" & txtBatch.Text.Trim & "'"
- Case "采购入库"
- strquery = "select * from wz_rk where 日期 between '" & txtBeginTime.Value & "' and '" & txtEndTime.Value & "' and 药品名称='" & txtMedName.Text.Trim & "' and 批号='" & txtBatch.Text.Trim & "' and substring(票号,1,2)='RK'"
- Case "采购退货"
- strquery = "select * from wz_rk where 日期 between '" & txtBeginTime.Value & "' and '" & txtEndTime.Value & "' and 药品名称='" & txtMedName.Text.Trim & "' and 批号='" & txtBatch.Text.Trim & "' and substring(票号,1,2)='TL'"
- Case "销售出库"
- strquery = "select * from wz_ck where 日期 between '" & txtBeginTime.Value & "' and '" & txtEndTime.Value & "' and 药品名称='" & txtMedName.Text.Trim & "' and 批号='" & txtBatch.Text.Trim & "' and substring(票号,1,2)='CK'"
- Case "销售退货"
- strquery = "select * from wz_ck where 日期 between '" & txtBeginTime.Value & "' and '" & txtEndTime.Value & "' and 药品名称='" & txtMedName.Text.Trim & "' and 批号='" & txtBatch.Text.Trim & "' and substring(票号,1,2)='TK'"
- Case "报损单"
- strquery = "select * from wz_kc_bs where 日期 between '" & txtBeginTime.Value & "' and '" & txtEndTime.Value & "' and 药品名称='" & txtMedName.Text.Trim & "' and 批号='" & txtBatch.Text.Trim & "'"
- Case "报溢单"
- strquery = "select * from wz_kc_by where 日期 between '" & txtBeginTime.Value & "' and '" & txtEndTime.Value & "' and 药品名称='" & txtMedName.Text.Trim & "' and 批号='" & txtBatch.Text.Trim & "'"
- Case "门店补货单"
- strquery = "select a.BhTime as 日期,PsMedName as 门店名称,PsCenter as 配送中心,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Package as 包装,Lcount as 数量,Price as 单价,b.Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期 from MdBh a,MdBhMx b where a.BillNumber=b.BillNumber and a.BhTime between '" & txtBeginTime.Value & "' and '" & txtEndTime.Value & "' and MedName='" & txtMedName.Text.Trim & "' and Batch='" & txtBatch.Text.Trim & "'"
- Case "门店收货单"
- strquery = "select a.shdata as 日期,PsMedName as 门店名称,PsCenter as 配送中心,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Package as 包装,Lcount as 数量,Price as 单价,b.Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期 from Mdshdj a,MdshdjMx b where a.BillNumber=b.BillNumber and a.shdata between '" & txtBeginTime.Value & "' and '" & txtEndTime.Value & "' and MedName='" & txtMedName.Text.Trim & "' and Batch='" & txtBatch.Text.Trim & "'"
- Case "配送单"
- strquery = "select a.BhDate as 日期,a.PsMedName as 门店名称,PsCenter as 配送中心,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Package as 包装,pfcount as 数量,Price as 单价,b.Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期 from pspsdj a,pspsdjMx b where a.BillNumber=b.BillNumber and a.BhDate between '" & txtBeginTime.Value & "' and '" & txtEndTime.Value & "' and MedName='" & txtMedName.Text.Trim & "' and Batch='" & txtBatch.Text.Trim & "'"
- Case "配送退货单"
- strquery = "select a.ThTime as 日期,a.PsMedName as 门店名称,PsCenter as 配送中心,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Package as 包装,lcount as 数量,Price as 单价,b.Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期 from psth a,psthMx b where a.BillNumber=b.BillNumber and a.ThTime between '" & txtBeginTime.Value & "' and '" & txtEndTime.Value & "' and MedName='" & txtMedName.Text.Trim & "' and Batch='" & txtBatch.Text.Trim & "'"
- End Select
- dslocal = lsweb.runSql(strquery)
- dgview.DataSource = dslocal.Tables(0).DefaultView
- End If
- End Sub
- Private Sub btnQueryAll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnQueryAll.Click
- Dim dslocal As DataSet
- Select Case tabtable.SelectedTab.Text
- Case "当前库存"
- strqueryes = "select * from wz_kc"
- Case "采购入库"
- strqueryes = "select * from wz_rk where substring(票号,1,2)='RK'"
- Case "采购退货"
- strqueryes = "select * from wz_rk where substring(票号,1,2)='TL'"
- Case "销售出库"
- strqueryes = "select * from wz_ck where substring(票号,1,2)='CK'"
- Case "销售退货"
- strqueryes = "select * from wz_ck where substring(票号,1,2)='TK'"
- Case "报损单"
- strqueryes = "select * from wz_kc_bs"
- Case "报溢单"
- strqueryes = "select * from wz_kc_by"
- Case "门店补货单"
- strqueryes = "select a.BhTime as 日期,PsMedName as 门店名称,PsCenter as 配送中心,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Package as 包装,Lcount as 数量,Price as 单价,b.Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期 from MdBh a,MdBhMx b where a.BillNumber=b.BillNumber"
- Case "门店收货单"
- strqueryes = "select a.shdata as 日期,PsMedName as 门店名称,PsCenter as 配送中心,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Package as 包装,Lcount as 数量,Price as 单价,b.Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期 from Mdshdj a,MdshdjMx b where a.BillNumber=b.BillNumber"
- Case "配送单"
- strqueryes = "select a.BhDate as 日期,a.PsMedName as 门店名称,PsCenter as 配送中心,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Package as 包装,pfcount as 数量,Price as 单价,b.Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期 from pspsdj a,pspsdjMx b where a.BillNumber=b.BillNumber"
- Case "配送退货单"
- strqueryes = "select a.ThTime as 日期,a.PsMedName as 门店名称,PsCenter as 配送中心,MedNumber as 药品编号,MedName as 药品名称,MedRule as 药品规格,Unit as 单位,Package as 包装,lcount as 数量,Price as 单价,b.Money as 金额,Batch as 批号,Product as 产地,Avaid as 有效期 from psth a,psthMx b where a.BillNumber=b.BillNumber"
- End Select
- dslocal = lsweb.runSql(strqueryes)
- dgview.DataSource = dslocal.Tables(0).DefaultView
- End Sub
- Private Sub frmCpTotal_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
- txtBeginTime.Value = Today.ToString
- txtEndTime.Value = Today.ToString
- End Sub
- End Class