easyUI MVC3一些注意的东东(4)

datagrid 只保留两位数字的方法

<table id="FA_AssetDg"  
           toolbar="#ToolBarFA_Asset"  
           rownumbers="true" fitColumns="true" singleSelect="true" pagination="true">  
        <thead>  
        <tr>
            <th field="AssetCode" width="100">
                资产编号
            </th>
           @* <th field="TypeName" width="100">
                资产类别
            </th>*@
            <th field="AssetName" width="100">
                资产名称
            </th>
            <th field="DepreciateStatus" width="100">
                折旧状态
            </th>
            <th field="AssetValue" width="100">
                资产原值
            </th>
             <th field="GetDate" width="100">
                取得日期
            </th>
          
             <th field="ExpectLeftValue" width="100" formatter="formatStatus">
                预计残值
            </th>
             <th field="MonthsDepreciateValue" width="100" formatter="formatStatus">
                月折旧额
            </th>
              <th field="SumDepreciateMonths" width="100">
                已提折旧月数
            </th>
              <th field="SumDepreciateValue" width="100" formatter="formatStatus">
                累计折旧
            </th>
              <th field="LeftValue" width="100"  formatter="formatStatus">
                账面净值
            </th>

           
            <th field="AssetUseMonths" width="100">
                使用年限(月份)
            </th>
         
            <th field="SalvageValue" width="100">
                残值率
            </th>
            <th field="UsedBranch" width="100">
                使用部门
            </th>
            <th field="User" width="100">
                保管人
            </th>
         
        </tr>
        </thead>
        </table>
formatStatus 方法:
    function formatStatus(value, row) {
        return parseFloat(value,10).toFixed(2);
    }

 

posted @ 2013-06-20 11:11  飞翔的天空  阅读(264)  评论(0编辑  收藏  举报