bootstraptable修改合计行内容

bootstraptable修改合计行内容

html

<table  id="detail_ddtable1" class="table table-hover table-striped"></table>

设置表格(msg: ‘detail_ddtable1’ 将msg的值设置为table 的id)

 templateTableParams = {
                classes: "table table-bordered table-hover",
                // url: "${ctx}/puReceiveInfo/puCgddInfoListHT.z",
                method: 'post',
                contentType: "application/x-www-form-urlencoded",
                dataType: "json",
                cache: false,
                striped: true,
                //singleSelect: true,
                // showColumns: false,
                //clickToSelect: true,
                height:$(window).height()*0.7,
                // no_overflow_x : true,   //默认没有X轴滚动条
                showFooter:true,//合计
                msg: 'detail_ddtable1',
                columns: [
                    {
                        checkbox: true,width:'25'
                    },
                    {
                        title: '序号',align:'center',width:'40',
                        formatter: function (value, row, index) {
                            return index + 1;
                        }
                    },
                    {
                        field: 'djh', title: '采购合同号',align:'center',width:'100',halign :'center', formatter :'paramsMatter', footerFormatter: function (value) {return "选择合计"; }
                    },
                    {
                        field: 'xshth', title: '销售合同号',align:'center',width:'100',halign :'center', formatter :'paramsMatter'
                    },
                    {
                        field: 'jhlb', title: '物资类别',align:'center',width:'70'
                    },
                    {
                        field: 'itemCode', title: '物资编码',align:'left',halign :'center',width:'200', formatter :'paramsMatter'
                    },
                    {
                        field: 'itemName', title: '物资名称',align:'left',halign :'center',width:'100', formatter :'paramsMatter'
                    },
                    {
                        field: 'czgg', title: '物资属性',align:'left',halign :'center',width:'100', formatter :'paramsMatter'
                    },
                    {
                        field: 'cgsl', title: '订单数量',align:'right',halign :'center',width:'70', formatter :'paramsMatter'
                    },
                    {
                        field: 'dhsl', title: '已到货数量',align:'right',halign :'center',width:'90', formatter :'paramsMatter'
                    },
                    {
                        field: 'sysl', title: '剩余数量',align:'right',width:'70', formatter :'paramsMatter'
                    },
                    {
                        field: 'cgdj', title: '采购单价',align:'right',halign :'center',width:'70', formatter :'paramsMatter'
                    },
                    {
                        field: 'dw', title: '单位',align :'center',width:'40', formatter :'paramsMatter'
                    },
                    {
                        field: 'jhdhrq', title: '要求采购完成时间',align :'center',width:'150', formatter :'paramsMatter'
                    },
                    {
                        field: 'orderNo', title: '合同号',align:'left',halign :'center',width:'200', formatter :'paramsMatter'
                    },
                    {
                        field: 'cgddmxid', title: 'cgddmxid',align:'left',halign :'center',width:'100', formatter :'paramsMatter', visible: false
                    },
                    {
                        field: 'cghtmxid', title: 'cghtmxid',align:'left',halign :'center',width:'100', formatter :'paramsMatter', visible: false
                    },
                    {
                        field: 'shuil', title: '税率',align:'right',halign :'center',width:'70', visible: false
                    },
                    {
                        field: 'shuie', title: '税额',align:'right',halign :'center',width:'70', visible: false
                    },
                    {
                        field: 'wsdj', title: '无税单价',align:'right',halign :'center',width:'70', visible: false
                    },
                    {
                        field: 'wsje', title: '无税金额',align:'right',halign :'center',width:'70', visible: false
                    }
                    ,
                    {
                        field: 'id', title: 'id',align:'right',halign :'center',width:'70', visible: false
                    },
                    {
                        field: 'purchaseSource',visible: false
                    }
                ],
                cardView:(function(){ return /Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent); })(),
                search: false,//页面搜索框
                trimOnSearch: true,
                idField: 'id',
                uniqueId: 'id',
            };
            $('#detail_ddtable1').bootstrapTable(templateTableParams);

修改合计行的内容
$("#_footer(msg的值) table tbody tr td").eq(8)[0].innerText =“修改内容”;

       //修改合计行的第9列内容
       $("#_footerdetail_ddtable1 table tbody tr td").eq(8)[0].innerText =“修改内容”;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

桀骜浮沉

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值