• 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;
        }
    }
  • 相关阅读:
    概述各种事务隔离级别发生的影响
    linux内核的经典书籍
    sso 登录,网页跳转的实现方式
    初探移动网站的架构和设计
    C# PrintDocument 打印
    .Text分页技术(1)分页的存储过程分析
    SQL2008使用CTE递归查询批量插入500万数据
    自己写的Web服务器
    OMCS 语音视频框架
    ESFramework4.x
  • 原文地址:https://www.cnblogs.com/mingforyou/p/3364272.html
Copyright © 2020-2023  润新知