⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 frmtakestockwizard.frm

📁 金算盘软件代码
💻 FRM
📖 第 1 页 / 共 5 页
字号:
        
        If ListText(1).ReferRow > ListText(1).RowsOfArea(1) Then
            If ListText(1).ReferRow <= ListText(1).RowsOfArea(1) + ListText(1).RowsOfArea(2) Then
                strSqlI = " (ItemType.strItemTypeCode='" & ListText(1).TextMatrix(ListText(1).ReferRow, 2) & _
                    "' OR ItemType.strItemTypeCode Like '" & ListText(1).TextMatrix(ListText(1).ReferRow, 2) & "-%') "
            Else
                strSqlI = "Item.lngItemID=" & ListText(1).ID
            End If
        End If
    End Select
End Sub


Private Sub stbBuildNewAcnt_Click(PreviousTab As Integer)
    If stbBuildNewAcnt.Tab = 0 Then
        cmdPNFC(0).Enabled = False
        cmdPNFC(1).Enabled = True
    ElseIf stbBuildNewAcnt.Tab = 4 Then
        cmdPNFC(1).Enabled = False
        cmdPNFC(0).Enabled = True
    Else
        cmdPNFC(0).Enabled = True
        cmdPNFC(1).Enabled = True
    End If
    SetTabStop
End Sub

Private Sub SetTabStop()
''''    Select Case stbBuildNewAcnt.Tab
''''    Case 0
''''        ListText(0).TabStop = True
''''
''''        ListText(1).TabStop = False
''''
''''        ListSelect(0).TabStop = False
''''        ListSelect(1).TabStop = False
''''        cmdButton1(0).TabStop = False
''''        cmdButton1(1).TabStop = False
''''        cmdButton1(2).TabStop = False
''''        cmdButton1(3).TabStop = False
''''        cmdButton1(4).TabStop = False
''''        cmdButton1(5).TabStop = False
''''
''''        ListSelect(2).TabStop = False
''''        ListSelect(3).TabStop = False
''''        cmdButton2(0).TabStop = False
''''        cmdButton2(1).TabStop = False
''''        cmdButton2(2).TabStop = False
''''        cmdButton2(3).TabStop = False
''''        cmdButton2(4).TabStop = False
''''        cmdButton2(5).TabStop = False
''''        Combo1.TabStop = False
''''
''''        GACalendar1.TabStop = False
''''    Case 1
''''        ListText(0).TabStop = False
''''
''''        ListText(1).TabStop = True
''''
''''        ListSelect(0).TabStop = False
''''        ListSelect(1).TabStop = False
''''        cmdButton1(0).TabStop = False
''''        cmdButton1(1).TabStop = False
''''        cmdButton1(2).TabStop = False
''''        cmdButton1(3).TabStop = False
''''        cmdButton1(4).TabStop = False
''''        cmdButton1(5).TabStop = False
''''
''''        ListSelect(2).TabStop = False
''''        ListSelect(3).TabStop = False
''''        cmdButton2(0).TabStop = False
''''        cmdButton2(1).TabStop = False
''''        cmdButton2(2).TabStop = False
''''        cmdButton2(3).TabStop = False
''''        cmdButton2(4).TabStop = False
''''        cmdButton2(5).TabStop = False
''''        Combo1.TabStop = False
''''
''''        GACalendar1.TabStop = False
''''
''''    Case 2
''''        ListText(0).TabStop = False
''''
''''        ListText(1).TabStop = False
''''
''''        ListSelect(0).TabStop = True
''''        ListSelect(1).TabStop = True
''''        cmdButton1(0).TabStop = True
''''        cmdButton1(1).TabStop = True
''''        cmdButton1(2).TabStop = True
''''        cmdButton1(3).TabStop = True
''''        cmdButton1(4).TabStop = True
''''        cmdButton1(5).TabStop = True
''''
''''        ListSelect(2).TabStop = False
''''        ListSelect(3).TabStop = False
''''        cmdButton2(0).TabStop = False
''''        cmdButton2(1).TabStop = False
''''        cmdButton2(2).TabStop = False
''''        cmdButton2(3).TabStop = False
''''        cmdButton2(4).TabStop = False
''''        cmdButton2(5).TabStop = False
''''        Combo1.TabStop = False
''''
''''        GACalendar1.TabStop = False
''''    Case 3
''''        ListText(0).TabStop = False
''''
''''        ListText(1).TabStop = False
''''
''''        ListSelect(0).TabStop = False
''''        ListSelect(1).TabStop = False
''''        cmdButton1(0).TabStop = False
''''        cmdButton1(1).TabStop = False
''''        cmdButton1(2).TabStop = False
''''        cmdButton1(3).TabStop = False
''''        cmdButton1(4).TabStop = False
''''        cmdButton1(5).TabStop = False
''''
''''        ListSelect(2).TabStop = True
''''        ListSelect(3).TabStop = True
''''        cmdButton2(0).TabStop = True
''''        cmdButton2(1).TabStop = True
''''        cmdButton2(2).TabStop = True
''''        cmdButton2(3).TabStop = True
''''        cmdButton2(4).TabStop = True
''''        cmdButton2(5).TabStop = True
''''        Combo1.TabStop = True
''''
''''        GACalendar1.TabStop = False
''''    Case 4
''''        ListText(0).TabStop = False
''''
''''        ListText(1).TabStop = False
''''
''''        ListSelect(0).TabStop = False
''''        ListSelect(1).TabStop = False
''''        cmdButton1(0).TabStop = False
''''        cmdButton1(1).TabStop = False
''''        cmdButton1(2).TabStop = False
''''        cmdButton1(3).TabStop = False
''''        cmdButton1(4).TabStop = False
''''        cmdButton1(5).TabStop = False
''''
''''        ListSelect(2).TabStop = False
''''        ListSelect(3).TabStop = False
''''        cmdButton2(0).TabStop = False
''''        cmdButton2(1).TabStop = False
''''        cmdButton2(2).TabStop = False
''''        cmdButton2(3).TabStop = False
''''        cmdButton2(4).TabStop = False
''''        cmdButton2(5).TabStop = False
''''        Combo1.TabStop = False
''''
''''        GACalendar1.TabStop = True
''''    End Select

    Dim i As Integer
    For i = 0 To 4
        If i <> stbBuildNewAcnt.Tab Then
            FrameSEL(i).Enabled = False
        Else
            FrameSEL(i).Enabled = True
        End If
    Next
End Sub


Private Function Select_Some(ByVal lngViewId As Long) As String
    Dim i As Integer
    Dim j As Integer
    Dim k As Integer
    Dim strTmp As String
    Dim strChg As String
    Dim strCut1 As String
    Dim strCut2 As String
    Dim strSql As String
    
    
    Select_Some = ""
    
    Set MyList = New ListSet
    MyList.ViewId = lngViewId
    
    If MyList.ListID = 0 Then
        MyList.SaveList
    End If
    
    Filter.ShowFilter MyList.ListID, 1
    MyList.SaveList
    MyList.ViewId = lngViewId
    strTmp = MyList.GetPureWhere
    
    strTmp = UCase(strTmp)
    If lngViewId = lngViewIDP Then
        strTmp = Salary.Change_Text("POSITION.", "STPOSITION.", strTmp)
    End If
    Debug.Print strTmp
    strTmp = " " & strTmp
'    '空值处理
'    For i = Len(strTmp) To 1 Step -1
'        If Mid(strTmp, i, 1) = "." Then
'            For j = i - 1 To 0 Step -1
'                If Not ((Mid(strTmp, j, 1) >= "A" And Mid(strTmp, j, 1) <= "Z") Or (Mid(strTmp, j, 1) >= "a" And Mid(strTmp, j, 1) <= "z") Or (Mid(strTmp, j, 1) >= "0" And Mid(strTmp, j, 1) <= "9")) Then
'                    Debug.Print j
'                    Debug.Print "(" & Mid(strTmp, j, 1) & ")"
'                    j = j + 1
'                    Exit For
'                End If
'            Next
'            For k = i + 1 To Len(strTmp)
'
'                If Not ((Mid(strTmp, k, 1) >= "A" And Mid(strTmp, k, 1) <= "Z") Or (Mid(strTmp, k, 1) >= "a" And Mid(strTmp, k, 1) <= "z") Or (Mid(strTmp, k, 1) >= "0" And Mid(strTmp, k, 1) <= "9")) Then
'                    k = k - 1
'                    Exit For
'                End If
'            Next
'            strCut1 = Left(strTmp, j - 1)
'            strCut2 = Right(strTmp, Len(strTmp) - k)
''            If InStr(strTmp, "startDate") <> 0 Then
''                strChg = "(IIF(ISNULL(" & strChg & "),Date," & strChg & "))"
''            Else
'                strChg = Mid(strTmp, j, k - j + 1)
'                Select Case Mid(strTmp, i + 1, 1)
'                Case "s", "S"   '字符型
'                    strChg = "(IIF(ISNULL(" & strChg & "),''," & strChg & "))"
'                Case "b", "B"   '布尔型
'                    strChg = "(IIF(ISNULL(" & strChg & "),False," & strChg & "))"
'                Case Else       '数值型
'                    strChg = "(IIF(ISNULL(" & strChg & "),0," & strChg & "))"
'                End Select
''            End If
'            strTmp = strCut1 & strChg & strCut2
'            i = j
'        End If
'    Next
    If Trim(strTmp) <> "" Then
        Select_Some = "(" & strTmp & ")"
    Else
        Select_Some = ""
    End If
End Function
Private Sub GetstrOrder(ByRef strFrom As String, ByRef strOrder As String)
    If Combo1.ListIndex = 2 Then
        strOrder = ""
        Exit Sub
    End If
    If ListSelect(3).ListCount = 0 Then Exit Sub
    
    Dim i As Integer
    strOrder = ""
    For i = 0 To ListSelect(3).ListCount - 1
        If Trim(ListSelect(3).list(i)) = "货位编码" Then
            strOrder = strOrder & ",STPosition.strPositionCode"
        End If
        If Trim(ListSelect(3).list(i)) = "商品编码" Then
            strOrder = strOrder & ",Item.strItemCode"
        End If
        If Trim(ListSelect(3).list(i)) = "商品名称" Then
            strOrder = strOrder & ",Item.strItemName"
        End If
        If Trim(ListSelect(3).list(i)) = "规格型号" Then
            strOrder = strOrder & ",Item.strItemStyle"
        End If
        If Trim(ListSelect(3).list(i)) = "计量单位" Then
            strOrder = strOrder & ",ItemUnit.strUnitName"
        End If
        If Trim(ListSelect(3).list(i)) = "单价" Then
            strOrder = strOrder & ",Decode(ItemNature.strCostMethod,'7',Item.dblRecenetSalePrice,'6',Item.DblPlanPrice,Item.dblRecenetPurchasePrice)"
        End If
        If Trim(ListSelect(3).list(i)) = "厂商编码" Then
            strOrder = strOrder & ",Customer.strCustomerCode"
        End If
        If Trim(ListSelect(3).list(i)) = "生产批号" Then
            strOrder = strOrder & ",ItemActivityDetail.strProduceNum"
        End If
        If Trim(ListSelect(3).list(i)) = "生产日期" Then
            strOrder = strOrder & ",ItemActivityDetail.strProduceDate"
        End If
        If Trim(ListSelect(3).list(i)) = "到期日期" Then
            strOrder = strOrder & ",ItemActivityDetail.strValidDate"
        End If
        If Trim(ListSelect(3).list(i)) = "保质期" Then
            strOrder = strOrder & ",ItemActivityDetail.intValidDay"
        End If
    Next
    If Combo1.ListIndex = 1 Then
        strOrder = strOrder & " DESC"
    End If
    strOrder = " Order By " & Mid(strOrder, 2)
End Sub
Private Function blnOrderIsSelect(strName As String) As Boolean
    Dim i As Integer
    
    blnOrderIsSelect = False
    For i = 0 To ListSelect(3).ListCount - 1
        If Trim(strName) = Trim(ListSelect(3).list(i)) Then
            blnOrderIsSelect = True
            Exit For
        End If
    Next
End Function

Private Sub GetTemplate()
   Dim recTmp As rdoResultset
   Dim strSql As String
   Dim i As Long
   
   lngOldTempLateID = 0
   blnMakeTempLate = False
   
   
   strName(1) = "货位"
   strName(2) = "商品编码名称及规格"
   strName(3) = "计量单位"
   strName(4) = "单价"
   strName(5) = "帐存数量"
   strName(6) = "盘点数量"
   strName(7) = "盈亏数量"
   strName(8) = "供应商"
   strName(9) = "生产批号"
   strName(10) = "生产日期"
   strName(11) = "到期日期"
   strName(12) = "保质期"
   strName(13) = UserDefine(0)
   strName(14) = UserDefine(1)
   strName(15) = UserDefine(2)
   strName(16) = UserDefine(3)
   strName(17) = UserDefine(4)
   strName(18) = UserDefine(5)
   
   strSql = "SELECT Template.lngTempLateID,strControlLabel,bytOrder,blnIsScreen From TempLate,TempLateFormat " & _
      " WHERE Template.lngTemplateID=TempLateFormat.lngTemplateID " & _
      " AND blnIsInActive=0 " & _
      " AND (strControlType='C' OR strControlType='c') AND bytOrder> 0 AND blnIsSYS=0 AND strTemplateName='自定义商品盘点' " & _
      " ORDER BY lngControlID"

   Set recTmp = gclsBase.BaseDB.OpenResultset(strSql, r

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -