Searcher.create(‘#invoiceGrid‘列表下小三角 显示明细 和统计金额

 
    var searcher = Searcher.create('#invoiceGrid', [
            {name: 'id', hidden: true}, 
             {
                label: "发票日期",
                name: "invDate",
                index: "invDate",
                width: 100,
                sortable: false,
                editable: false,
                /*formatter: 'date',*/
                align: 'center'
            }, {
                label: "金额",
                name: "invAmount",
                index: "offlineCert",
                width: 80,
                sortable: false,
                editable: false,
                formatter: 'amount',
                align: 'center'
            }, {
                label: "税额",
                name: "invTax",
                index: "invTax",
                width: 100,
                sortable: false,
                editable: false,
                formatter: 'amount',
                align: 'center'
            },
            {
                label: "价税合计",
                name: "invTotal",
                index: "invTotal",
                width: 150,
                sortable: false,
                editable: false,
                formatter: 'amount',
                align: 'center',
                formatter: function (cellvalue, options, row) {
                    if (cellvalue==''||cellvalue==undefined) {
                        return '';
                    }else {
                        return cellvalue;
                    }
                }
            },  
            {
                label: "规则校验结果",
                name: "checkStatus",
                index: "checkStatus",
                width: 100,
                sortable: false,
                editable: false,
                align: 'right',
                formatter: function (cellvalue, options, row) {
                    if (checkStatus[cellvalue] == null) {
                        return '';
                    }
                    return checkStatus[cellvalue].text;
                }
            },
            {
                label: "部门",
                name: "dept",
                index: "dept",
                width: 100,
                sortable: false,
                editable: false,
                align: 'center',
                formatter: function (cellvalue, options, row) {
                    if (cellvalue==null||cellvalue==''||cellvalue==undefined) {
                        return "<a οnclick='getDept(" + JSON.stringify(row.id) +","+JSON.stringify(row.edocCompanyCode)+ ")'>请选择部门</a>";
                    }else {
                        return cellvalue;
                    }

                }
            },
            {
                label: "操作",
                width: 220,
                sortable: false,
                formatter: function (cellvalue, options, row) {
               
                    var op = "<button type='button' class='btn btn-primary btn-xs' οnclick='viewDetailInfo(" + row.edocImageId +")'>查看详情</button>&nbsp;"
                     "<shiro:hasPermission name="task:job:view">"+op+"</shiro:hasPermission>";

                    op += "<button type='button' class='btn btn-primary btn-xs' id='invGrid_btn_edit_"+row.id+"'  οnclick='editInv(" + row.id + ")'>编辑</button>" + "&nbsp;"+
                        "<button type='button' class='btn btn-primary btn-xs' id='invGrid_btn_clear_"+row.id+"'  οnclick='clearDept(" + row.id + ")'>清空</button>" + "&nbsp;"+
                        "<button type='button' disabled class='btn btn-primary btn-xs' id='invGrid_btn_save_"+row.id+"' οnclick='preservationInv(" + row.id + ")'>保存</button>";
                    if (row.extField1 !=null ) {
                        op += "<button type='button' class='btn btn-primary btn-xs' οnclick='Inv_Item.del(" + row.id + ")'>删除</button>";
                    }
                 
                    return op;
                }
            },
            {name: 'edocCompanyCode', hidden: true}
        ],{
            multiselect: true, shrinkToFit: false, subGrid: true,
            footerConfig: {
                'invDate': '已选中[{R.count}]条,合计:',
                'invAmount': 'sum()',
                'invTax': 'sum()',
                'invTotal': 'sum()',
                'extField3': 'sum()',
                'extField5': 'sum()'
            },
 
            mySubGridModel: [
                {name: 'id', hidden: true},
                {label: "名称", name: "itemName", index: "itemName", width: 100, sortable: false},
                {label: "规格型号", name: "itemSpec", index: "itemSpec", width: 80, sortable: false},
                {label: "单位", name: "unit", index: "unit", width: 80, sortable: false},
                {label: "数量", name: "itemQuantity", index: "itemQuantity", width: 150, sortable: false},
                {label: "单价", name: "itemPrice", index: "itemPrice", width: 100, sortable: false},
                {label: "金额", name: "itemAmount", index: "itemAmount", width: 100, sortable: false},
                {label: "税率", name: "itemTaxRate", index: "itemTaxRate", width: 100, sortable: false},
                {label: "税额", name: "itemTax", index: "itemTax", width: 100, sortable: false},
                {label: "含税金额", name: "itemTotal", index: "itemTotal", width: 100, sortable: false},
                {label: "实际报销含税金额", name: "extField3", index: "extField3", width: 100, sortable: false,editable:true,
                    formatter: function (cellvalue, options, row) {
                        if (cellvalue==undefined||cellvalue==null||cellvalue=='') {
                            return '';
                        }else {
                            return cellvalue;
                        }
                    }
                },
                {label: "实际报销税额", name: "extField5", index: "extField5", width: 100, sortable: false,editable:true,
                    formatter: function (cellvalue, options, row) {
                        if (cellvalue==undefined||cellvalue==null||cellvalue=='') {
                            return '';
                        }else {
                            return cellvalue;
                        }
                    }
                },
                {
                    label: "操作", sortable: false,
                    formatter: function (cellvalue, options, row) {
                        return "<button type='button' class='btn btn-primary btn-xs' id='invoiceGrid_btn_edit_"+row.id+"'  οnclick='edit(" + row.id + ")'>编辑</button>" + "&nbsp;"+
                            "<button type='button' disabled class='btn btn-primary btn-xs' id='invoiceGrid_btn_save_"+row.id+"' οnclick='preservation(" + row.id + ")'>保存</button>" + "&nbsp;"+
                            "<button type='button' disabled class='btn btn-primary btn-xs'id='invoiceGrid_btn_cancel_"+row.id+"' οnclick='reset(" + row.id + ")'>撤销</button>";
                         
                    }
                }
        });
内容概要:本文提出了一种基于主从博弈理论的售电商多元零售套餐设计与多级市场购电策略,旨在优化售电商在复杂电力市场环境下的运营决策。通过构建主从博弈模型,将售电商作为领导者制定差异化零售套餐,用户作为追随者根据自身效用做出用电与购电选择,从而实现供需双方的动态互动与均衡。研究结合Matlab进行仿真代码实现,完整复现了从模型构建、变量设定、均衡求解到结果分析的全过程,验证了该策略在提升售电商市场收益、降低用户用电成本、促进多级电力市场(如批发市场与零售市场)协调运行方面的有效性,具备较高的理论深度与工程应用价值; 适合人群:具备一定电力系统基础、博弈论知识及优化建模能力,从事电力市场、能源经济、综合能源系统等方向的科研人员、高校研究生及行业从业者; 使用场景及目标:①用于研究售电商在竞争性电力市场中的动态定价机制与多元化套餐设计方法;②支撑售电商在多级市场环境下的购电组合优化与风险规避决策;③为需求响应建模、用户行为分析及主从博弈在能源系统中的应用提供可复现的仿真框架与代码参考; 阅读建议:本文理论推导与编程实践紧密结合,建议读者结合Matlab代码逐模块学习模型实现过程,重点关注目标函数构建、约束条件处理、均衡点求解算法(如KKT条件应用)等关键环节,并可在现有模型基础上引入不确定性因素(如可再生能源出力波动、负荷预测误差)以拓展模型的鲁棒性与实用性。
内容概要:本文详细介绍了基于Matlab实现的5节点电力系统潮流计算,重点采用牛顿-拉夫逊法(牛拉法)PQ分解法两种经典数值算法进行求解。通过构建节点导纳矩阵、建立功率平衡方程并对其进行线性化处理,系统阐述了两种方法在迭代求解过程中的实现机制。资源涵盖完整的算法流程、高可读性代码实现、详尽的注释说明以及收敛特性分析,直观展示了牛拉法在收敛速度与精度上的优势,以及PQ分解法在简化计算方面的实用性,帮助读者深入掌握电力系统稳态分析的核心原理与工程应用技巧。; 适合人群:具备电力系统分析基础理论知识,熟悉Matlab编程环境,从事电气工程、电力系统规划、运行与控制等领域研究的研究生、科研人员及工程技术人员。; 使用场景及目标:①深入理解牛顿-拉夫逊法与PQ分解法的数学原理与迭代结构差异;②通过编程实践提升对潮流计算中雅可比矩阵构造、修正方程求解与收敛判据设置的能力;③为复杂电网的稳态仿真、优化调度、状态估计及后续动态分析提供扎实的算法基础与技术储备; 阅读建议:建议结合经典电力系统分析教材同步学习,先掌握算法的理论推导,再逐行调试Matlab代码,重点关注不同初值设定、参数变化对收敛性能的影响,鼓励自行修改网络拓扑或负荷参数以观察算法表现,从而深化对潮流计算鲁棒性与适用性的理解。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值