Foxtable(狐表)用户栏目专家坐堂 → 关于OA如果完成审批,显示审批图标!!


  共有4907人关注过本帖树形打印复制链接

主题:关于OA如果完成审批,显示审批图标!!

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/5/9 9:24:00 [显示全部帖子]

 显示图标这样做,判断的代码自己写一下,就是判断一下e.row.isnull("xxx") 而已。

 

http://www.foxtable.com/help/topics/2387.htm


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/5/9 11:46:00 [显示全部帖子]

 还是给你写吧。

 

全局代码 http://www.foxtable.com/help/topics/1842.htm

 

Public delimg1 As Image = GetImage("delete1.ico")
Public delimg2 As Image = GetImage("delete2.ico")
Public delimg3 As Image = GetImage("delete3.ico")
Public delimg4 As Image = GetImage("delete4.ico")
Public delimg5 As Image = GetImage("delete5.ico")

 

 

Drawcell事件

 

If e.Col.Name = "状态图标列" Then
    e.StartDraw
    If e.Row.isnull("裁决")=False Then
        e.Graphics.DrawImage(delimg1, e.x + 3,e.y + 3)
    Else If e.Row .isnull("终审")=False Then
        e.Graphics.DrawImage(delimg2, e.x + 3,e.y + 3)
    Else If e.Row.isnull("批准") =False Then
        e.Graphics.DrawImage(delimg3, e.x + 3,e.y + 3)
    Else If e.Row.Isnull("审核") = False Then
        e.Graphics.DrawImage(delimg4, e.x + 3,e.y + 3)
    Else
        e.Graphics.DrawImage(delimg5, e.x + 3,e.y + 3)
    End If
    e.EndDraw
End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/5/9 15:30:00 [显示全部帖子]

你换成这样试试

 

If e.Col.Name = "状态" Or e.Col.Name = "审核" Or e.Col.Name = "批准" Or e.Col.Name = "终审" Or e.Col.Name = "裁决" Then
    Dim msg As String
    If e.Col.Name = "状态" Then
        If e.Row.isnull("裁决")=False Then
            msg  = "已裁决"
        Else If e.Row .isnull("终审")=False Then
            msg = "已终审"
        Else If e.Row.isnull("批准") =False Then
            msg  = "已批准"
        Else If e.Row.Isnull("审核") = False Then
            msg  = "已审核"
        Else
            msg  = "已提报"
        End If
    Else
        Dim tl As Integer = e.Text.Length
        Select Case tl
            Case 2
                msg = "  " & e.Text & "  "
            Case 3
                msg = " " & e.Text & " "
            Case Else
                msg = e.Text
        End Select
    End If
    e.StartDraw()
   
    If msg = "" Then Return
    If tl <= 4 Then
        e.Col.Width = 61
    Else
        e.Col.width = tl*15+1
    End If
   
    Dim w As Integer = e.Width - 4
    Dim h As Integer = e.Height - 4
    Dim x As Integer = e.x + (e.Width - w)/2
    Dim n As Pen
    Dim fnt As New Font("宋体",9,FontStyle.Bold)
    Dim br As Brush
   
    If e.Text.Contains("已") Then
        n = New Pen(Color.Green,2)
        br = New SolidBrush(color.Green)
    Else
        n = New Pen(Color.Red,2)
        br = New SolidBrush(color.red)
    End If
   
    e.Graphics.DrawRectangle(n,x,e.y + 2,w,h)
    e.Graphics.DrawString(msg,fnt,br,x + 1,e.y + 4)
    e.Text = ""
    e.EndDraw()
End If


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  4楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/5/9 17:49:00 [显示全部帖子]

 呃,再改

 

If e.Col.Name = "状态" Or e.Col.Name = "审核" Or e.Col.Name = "批准" Or e.Col.Name = "终审" Or e.Col.Name = "裁决" Then
    Dim msg As String
    Dim tl As Integer
    If e.Col.Name = "状态" Then
        If e.Row.isnull("裁决")=False Then
            msg  = "已裁决"
        Else If e.Row .isnull("终审")=False Then
            msg = "已终审"
        Else If e.Row.isnull("批准") =False Then
            msg  = "已批准"
        Else If e.Row.Isnull("审核") = False Then
            msg  = "已审核"
        Else
            msg  = "已提报"
        End If
    Else
        tl = e.Text.Length
        Select Case tl
            Case 2
                msg = "  " & e.Text & "  "
            Case 3
                msg = " " & e.Text & " "
            Case Else
                msg = e.Text
        End Select
    End If
    e.StartDraw()
   
    If msg = "" Then Return
    If tl <= 4 Then
        e.Col.Width = 61
    Else
        e.Col.width = tl*15+1
    End If
   
    Dim w As Integer = e.Width - 4
    Dim h As Integer = e.Height - 4
    Dim x As Integer = e.x + (e.Width - w)/2
    Dim n As Pen
    Dim fnt As New Font("宋体",9,FontStyle.Bold)
    Dim br As Brush
   
    If e.Text.Contains("已") Then
        n = New Pen(Color.Green,2)
        br = New SolidBrush(color.Green)
    Else
        n = New Pen(Color.Red,2)
        br = New SolidBrush(color.red)
    End If
   
    e.Graphics.DrawRectangle(n,x,e.y + 2,w,h)
    e.Graphics.DrawString(msg,fnt,br,x + 1,e.y + 4)
    e.Text = ""
    e.EndDraw()
End If

 


 回到顶部