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> "
"<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>" + " "+
"<button type='button' class='btn btn-primary btn-xs' id='invGrid_btn_clear_"+row.id+"' οnclick='clearDept(" + row.id + ")'>清空</button>" + " "+
"<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>" + " "+
"<button type='button' disabled class='btn btn-primary btn-xs' id='invoiceGrid_btn_save_"+row.id+"' οnclick='preservation(" + row.id + ")'>保存</button>" + " "+
"<button type='button' disabled class='btn btn-primary btn-xs'id='invoiceGrid_btn_cancel_"+row.id+"' οnclick='reset(" + row.id + ")'>撤销</button>";
}
}
});
Searcher.create(‘#invoiceGrid‘列表下小三角 显示明细 和统计金额
最新推荐文章于 2025-06-21 21:18:02 发布
3082

被折叠的 条评论
为什么被折叠?



