Public headCol As Integer = -1
Public Sub MouseLeaveCellHandler(sender As object, e As C1.Win.C1FlexGrid.RowColEventArgs )
headcol = -1
End Sub
Public Sub MouseEnterCellHandler(sender As object, e As C1.Win.C1FlexGrid.RowColEventArgs )
If e.Row >= 0 AndAlso e.Row <= 1 Then
headcol = e.Col
End If
End Sub
Public senders As String() = {"下单表","货期管理","生产跟进","核价单","大货进度","下单报价","报价单_Table1"}
Public Sub ClickHandler(sender As object, e As System.EventArgs)
If headcol <> -1 AndAlso senders.Contains(sender.name) Then
Dim cname = Tables(sender.Name).Cols(headcol-1).Name
Dim idx As Integer = headcol
' MessageBox.Show(sender.name & "-" & cname & "-" & idx & "-" & sender(0, idx))
System.Threading.Thread.Sleep(100)
Dim nms As String()
Dim nn As String = ""
If sender.name = "货期管理" AndAlso cname = "延期次数" Then
nms = {"货期申请","提交延期单时间","延期责任方","生产主管","生产组长","设计师名字","淘宝销售","唯品会销售","第三方销售","大货延期原因","主管确认","主管确认时间","经理确认","经理","经理确认时间","销售确认","销售确认时间","面料确认","面料主管","面料确认时间","设计确认","设计确认时间","淘宝确认","淘宝确认时间","唯品会确认","唯品会确认时间","第三方确认","第三方确认时间","设计组长确认","设计组长","设计经理确认","设计经理"}
nn = "延期"
End If
If sender.name = "生产跟进" AndAlso cname = "汇总" Then
nms = {"淘宝","唯品会","第三方","均码F","XS","S","M","L","XL","XXL","XXXL","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44"}
nn = "汇总"
End If
If sender.name = "大货进度" AndAlso cname = "状态" Then
nms = {"分类","生产部","生产理单","设计师名字","品类"}
nn = "状态"
End If
If sender.name = "大货进度" AndAlso cname = "货期" Then
nms = {"最新货期","面料理单","单价_价格","单价_单位","面料类别","面料备注"}
nn = "货期"
End If
If sender.name = "大货进度" AndAlso cname = "生产记录" Then
nms = {"胚布","打色","染色日期","生产异常","进度备注","生产报告"}
nn = "生产记录"
End If
If sender.name = "大货进度" AndAlso cname = "缸差记录" Then
nms = {"头缸确认","记录时间","缸差异常","处理结果","最新状态"}
nn = "缸差记录"
End If
If sender.name = "下单表" OrElse sender.name = "下单报价" Then
If cname = "汇总" Then
nms = {"均码F","XS","S","M","L","XL","XXL","XXXL","25","24","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","总计合计"}
If sender(0, idx) = "汇总 +" OrElse sender(1, idx) = "汇总 +" Then
For Each nm As String In nms
Tables(sender.name).Cols(nm).Visible = True
Next
sender(0, idx) = "汇总 -"
sender(1, idx) = "汇总 -"
Return
Else
nms = {"均码F","XS","S","M","L","XL","XXL","XXXL","25","24","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","总计合计","均码","淘宝_XS","淘宝_S","淘宝_M","淘宝_L","淘宝_XL","淘宝_XXL","淘宝_XXXL","淘宝_24","淘宝_25","淘宝_26","淘宝_27","淘宝_28","淘宝_29","淘宝_30","淘宝_31","淘宝_32","淘宝_33","淘宝_34","淘宝_35","淘宝_36","淘宝_37","淘宝_38","淘宝_39","淘宝_40","淘宝_41","淘宝_42","淘宝_43","淘宝_44","淘宝合计","均码1","WP_XS","WP_S","WP_M","WP_L","WP_XL","WP_XXL","WP_XXXL","WP_24","WP_25","WP_26","WP_27","WP_28","WP_29","WP_30","WP_31","WP_32","WP_33","WP_34","WP_35","WP_36","WP_37","WP_38","WP_39","WP_40","WP_41","WP_42","WP_43","WP_44","WP合计","均码2","京东_XS","京东_S","京东_M","京东_L","京东_XL","京东_XXL","京东_XXXL","京东_24","京东_25","京东_26","京东_27","京东_28","京东_29","京东_30","京东_31","京东_32","京东_33","京东_34","京东_35","京东_36","京东_37","京东_38","京东_39","京东_40","京东_41","京东_42","京东_43","京东_44","京东合计"}
With DataTables(sender.name)
.DataCols("总计合计").Caption = "总计合计 +"
.BuildHeader()
End With
For Each nm As String In nms
Tables(sender.name).Cols(nm).Visible = False
Next
sender(0, idx) = "汇总 +"
sender(1, idx) = "汇总 +"
Return
End If
End If
If cname = "总计合计" Then
nms = {"均码","淘宝_XS","淘宝_S","淘宝_M","淘宝_L","淘宝_XL","淘宝_XXL","淘宝_XXXL","淘宝_24","淘宝_25","淘宝_26","淘宝_27","淘宝_28","淘宝_29","淘宝_30","淘宝_31","淘宝_32","淘宝_33","淘宝_34","淘宝_35","淘宝_36","淘宝_37","淘宝_38","淘宝_39","淘宝_40","淘宝_41","淘宝_42","淘宝_43","淘宝_44","淘宝合计","均码1","WP_XS","WP_S","WP_M","WP_L","WP_XL","WP_XXL","WP_XXXL","WP_24","WP_25","WP_26","WP_27","WP_28","WP_29","WP_30","WP_31","WP_32","WP_33","WP_34","WP_35","WP_36","WP_37","WP_38","WP_39","WP_40","WP_41","WP_42","WP_43","WP_44","WP合计","均码2","京东_XS","京东_S","京东_M","京东_L","京东_XL","京东_XXL","京东_XXXL","京东_24","京东_25","京东_26","京东_27","京东_28","京东_29","京东_30","京东_31","京东_32","京东_33","京东_34","京东_35","京东_36","京东_37","京东_38","京东_39","京东_40","京东_41","京东_42","京东_43","京东_44","京东合计"}
nn = "总计合计"
End If
If sender.name = "下单报价" AndAlso cname = "报价" Then
nms = {"面料分类","面料成分","工厂","货期","广告样时间","修改意见","面料信息","版型","上新时间","淘宝金额","唯品金额","京东金额","合计金额","类型","花型","细节","报销款号","淘宝销售","唯品会销售","第三方销售","授权号","生产周期","充绒量","毛领信息","合同号","最新货期","生产主管","生产组长","生产理单","生产跟单","订单分类","翻单类型"}
nn = "报价"
End If
End If
If sender.name = "核价单" OrElse sender.name = "报价单_Table1" Then
If cname = "报价时间" Then
nms = {"设计师","季节归属","来源","性别","推广方式","尺寸表","样衣图片","版单"}
nn = "下单报价时间"
End If
If cname = "面料_品名" Then
nms = {"面料_单价","面料_用料","撞拼布_单价","撞拼布_用料","里料_单价","里料_用料","胆布_单价","胆布_用量","羽绒_单价","羽绒_用量","毛领_长度厘米","毛领_宽度厘米","毛领_单价平方厘米","辅料_压胶","辅料_摇粒绒","辅料_手塞棉","辅料_仿丝棉","辅料_行棉","辅料_袋布","辅料_衬布","辅料_罗纹","辅料_横机","辅料_拉链","辅料_扣子","辅料_气眼","辅料_织标","辅料_织带","辅料_松紧橡筋","辅料_魔术贴","辅料_撞钉","辅料_帽绳配件","辅料_三标","辅料_线","辅料_其他"}
nn = "面料品名"
End If
End If
If nn > "" Then
If sender(0, idx) = nn & " +" Then
sender(0, idx) = nn & " -"
sender(1, idx) = nn & " -"
For Each nm As String In nms
Tables(sender.name).Cols(nm).Visible = True
Next
Return
Else
sender(0, idx) = nn & " +"
sender(1, idx) = nn & " +"
For Each nm As String In nms
Tables(sender.name).Cols(nm).Visible = False
Next
Return
End If
End If
End If
End Sub