|
@@ -528,6 +528,7 @@ function initDetailed() {
|
|
|
cellEdit: false,
|
|
|
sortable: false,
|
|
|
loadonce: false, //一次加载全部数据到客户端,由客户端进行排序。
|
|
|
+ footerrow:true,//设置属性,显示统计行
|
|
|
cellsubmit: "remote",
|
|
|
colNames: ['单号', '药品编码', '药品名称', '规格', '零售价', '请领数量', '出库量', '金额', '基本药物', 'serial'],
|
|
|
colModel: [
|
|
@@ -567,6 +568,16 @@ function initDetailed() {
|
|
|
selectRowId = rowid;
|
|
|
loadInDetlDetailed($("#tb_table_detailed").getRowData(rowid));
|
|
|
},
|
|
|
+ gridComplete:function(){
|
|
|
+ var rowNum=parseInt($(this).getGridParam("records"),20);//获取行数
|
|
|
+ if(rowNum>0){
|
|
|
+ $(".ui-jqgrid-sdiv").show();
|
|
|
+ let amountOutMoney=$(this).getCol("amountOutMoney",false,"sum");//需要统计的列
|
|
|
+ $(this).footerData("set",{"amountOut":"合计","amountOutMoney":keepTwoDecimal(amountOutMoney)}); //将合计值显示出来
|
|
|
+ }else{
|
|
|
+ $(".ui-jqgrid-sdiv").hide();
|
|
|
+ }
|
|
|
+ },
|
|
|
loadComplete: function (res) { //加载完成(初始加载),回调函数
|
|
|
if (res.data != null && res.data.length > 0) {
|
|
|
$("#xxform")[0].reset();
|
|
@@ -669,7 +680,7 @@ function setPrintHtml() {
|
|
|
html += '</tr>';
|
|
|
}
|
|
|
}
|
|
|
- html += '<tr style="border:0;border-top:2px solid #fff;overflow:hidden;font-size: 13px;">';
|
|
|
+ html += '<tr class="sjh" style="border:0;border-top:2px solid #fff;overflow:hidden;font-size: 13px;">';
|
|
|
html += '<td colspan="6" style="text-align: right;border: transparent !important;font-weight: bold;"></td>';
|
|
|
html += '<td colspan="4" style="text-align: right;border: transparent !important;font-weight: bold;">合计:零售总额:<span class="packRetpriceSum"></span></td>';
|
|
|
html += '<td colspan="2" style="text-align: right;border: transparent !important;font-weight: bold;">购入总额:<span class="buyPriceSum"></span></td></tr>';
|