zoukankan      html  css  js  c++  java
  • Extjs Gridpanel 动态加载

    colMArray_ljdj=[smQd,
                    {header : /*"代销机构代码"*/"机构",    dataIndex : "dxjgdm",    width : 100},
                    {header : /*客户名称*/"姓名",    dataIndex : "khmc",    width : 100},
                    {header : /*"交易金额"*/"金额",    dataIndex : "jyje",    width : 100, renderer:jyje_format, align:"right"},
                    {header : /*"交易日期"*/"预约日期",    dataIndex : "jyrq",    width : 100},
                       {header : /*"交易时间"*/"预约时间",    dataIndex : "jysj",    width : 100}, 
                       {header : "联系电话",    dataIndex : "yhdh",    width : 100},
                       {header : /*客户通知状态*/"目标客户",    dataIndex : "khtzzt",    width : 100},
                       {header : /*客户联系状态*/"订单联系状态",    dataIndex : "khlxzt",    width : 100},
                       {header : /*手工冻结状态*/"冻结状态",    dataIndex : "xgdjzt",    width : 100},
                       {header : "执行冻结",dataIndex: 'zxdj', width : 80, renderer:zxdj_btn},
                       {header : /*协议签约状态*/"签约状态",    dataIndex : "xyqyzt",    width : 100},
                       {header : "扣款状态",    dataIndex : "kkzt",    width : 100},
                       {header : "扣款",dataIndex: 'kk', width : 80, renderer:kk_btn}];
    function zxdj_btn(value, metaData, record, rowIndex, colIndex, store){
        var lsh = record.data['lsh'];
        var jyje_arr = record.data['jyje'].split(",");
        var jyje = "";
        for(var j = 0; j< jyje_arr.length; j++){
            jyje += jyje_arr[j];
        }
        jyje = parseFloat(jyje);
        if(((record.data['ywdm'] == '901')&&(record.data['xgdjzt'].split("-")[0] == 0))||((record.data['ywdm'] == '902')&&(record.data['khlxzt'].split("-")[0] == 1) && (record.data['xgdjzt'].split("-")[0] == 0))){
            return "<div align='center'><button style='cursor:hand' onclick='ybdj(""+lsh+"",""+jyje+"")'><font size='1'>执行</font></button></div>";
        }else if((record.data['ywdm'] == '902')&&(record.data['xgdjzt'].split("-")[0] == 2)&&(record.data['kkzt'].split("-")[0] == 0)){
            return "<div align='center'><button style='cursor:hand;' onclick='qxdj(""+lsh+"")'><font size='1'>取消执行</font></button></div>";
        }else{
            return "<div align='center'><button style='cursor:hand;' disabled onclick=''><font size='1'>执行</font></button></div>";
        }
        /*
        if((record.data['xgdjzt'].split("-")[0] == 2)||(record.data['khlxzt'].split("-")[0] == 0)){
            return "<div align='center'><button style='cursor:hand;' disabled onclick='ybdj(""+lsh+"")'><font size='1'>执行</font></button></div>";
        }else{
            return "<div align='center'><button style='cursor:hand' onclick=''><font size='1'>执行</font></button></div>";
        }*/
    }
    
    function kk_btn(value, metaData, record, rowIndex, colIndex, store){
        var lsh = record.data['lsh'];
        if((record.data['xgdjzt'].split("-")[0] == 2)&&(record.data['kkzt'].split("-")[0] == 0)){
            return "<div align='center'><button style='cursor:hand' onclick='kk(""+lsh+"")'><font size='1'>扣款</font></button></div>"
        }else{
            return "<div align='center'><button style='cursor:hand' disabled onclick=''><font size='1'>扣款</font></button></div>"
        }
    }
    
    function jyje_format(value, metaData, record, rowIndex, colIndex, store){
        if(value != null && value != ""){
            return rendererZhMoney(value);
        }else{
            return value;
        }
    }
  • 相关阅读:
    分布式事务的四种解决方案
    十大经典排序算法
    Vineyard 加入 CNCF Sandbox,将继续瞄准云原生大数据分析领域
    因你不同,2021 阿里云开发者大会重磅开启 @ 所有开发者!
    【深度】阿里巴巴万级规模 K8s 集群全局高可用体系之美
    业界率先支持 MCP-OVER-XDS 协议,Nacos 2.0.1 + 1.4.2 Release 正式发布
    被解救的代码
    KubeVela + KEDA:为应用带来“与生俱来”的弹性伸缩能力
    论好文章和烂文章
    Fluid 进入 CNCF Sandbox,加速大数据和 AI 应用拥抱云原生
  • 原文地址:https://www.cnblogs.com/mingforyou/p/3364272.html
Copyright © 2011-2022 走看看