|
@@ -33,21 +33,23 @@
|
|
|
g = $("#maingrid").quiGrid({
|
|
|
columns: [
|
|
|
// { display: 'id', name: 'invoiceId', key: true, hidden: true , align: 'center', width: "8%"},
|
|
|
- { display: '发票号', name: 'invoiceNumb', align: 'center', width: "8%"},
|
|
|
- { display: '发票代码', name: 'invoiceCode', align: 'center', width: "8%"},
|
|
|
- { display: '金额', name: 'amountMoney', align: 'center', width: "10%"},
|
|
|
- { display: '开票时间', name: 'billingTime', align: 'center', width: "10%"},
|
|
|
- { display: '开票人', name: 'billingUser', align: 'center', width: "8%"},
|
|
|
- { display: '开票信息', name: 'invoiceInfo', align: 'center', width: "15%"},
|
|
|
+ { display: '发票代码', name: 'invoiceCode', align: 'center', width: "10%"},
|
|
|
+ { display: '发票号', name: 'invoiceNumb', align: 'center', width: "10%"},
|
|
|
+ { display: '发票抬头', name: 'orgName', align: 'center', width: "20%"},
|
|
|
+ // { display: '纳税人识别号', name: 'taxpayerNumber', align: 'center', width: "8%"},
|
|
|
+ { display: '总金额', name: 'totalAmount', align: 'center', width: "8%"},
|
|
|
+ { display: '税额', name: 'taxAmount', align: 'center', width: "8%"},
|
|
|
+ { display: '开票时间', name: 'billingTime', align: 'center', width: "8%"},
|
|
|
+ // { display: '开票人', name: 'billingUser', align: 'center', width: "8%"},
|
|
|
{ display: '发票状态', name: 'state', align: 'center', width: "8%",
|
|
|
render : function(rowdata, rowindex, value, column){
|
|
|
- if("0"==value)
|
|
|
- return "<font color=red>发票作废</font>";
|
|
|
if("1"==value)
|
|
|
- return "<font color=blue>冲红机制</font>";
|
|
|
+ return "<font color=blue>正常</font>";
|
|
|
+ if("2"==value)
|
|
|
+ return "<font color=red>作废</font>";
|
|
|
} },
|
|
|
- { display: '备注', name: 'remark', align: 'center', width: "20%"},
|
|
|
- { display: '操作', isAllowHide: false, align: 'left', width:"15%",
|
|
|
+ { display: '备注', name: 'remark', align: 'center', width: "8%"},
|
|
|
+ { display: '操作', isAllowHide: false, align: 'left', width:"10%",
|
|
|
render: function (rowdata, rowindex, value, column){
|
|
|
return '<div class="padding_top4 padding_left20">'
|
|
|
+'<a href="#" onclick="onEdit(' + rowdata.invoiceId +')"><span class="icon_edit">修改</span></a>'
|
|
@@ -62,8 +64,17 @@
|
|
|
{line:true}
|
|
|
]
|
|
|
},
|
|
|
- data:[],rownumbers:true,dataAction:'local',checkbox:false,usePager: false,
|
|
|
- height: '100%', width:"100%",heightDiff:-40
|
|
|
+ data:[],
|
|
|
+ rownumbers:true,
|
|
|
+ dataAction:'local',
|
|
|
+ checkbox:false,
|
|
|
+ usePager: false,
|
|
|
+ isScroll: true,
|
|
|
+ frozen:false,
|
|
|
+ height: '100%',
|
|
|
+ width:"100%",
|
|
|
+ heightDiff:-40,
|
|
|
+ detail: { onShowDetail: showInfoList, height: 'auto' }
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -71,6 +82,32 @@
|
|
|
getData(g_pageNo,g_pageSize);
|
|
|
});
|
|
|
|
|
|
+ function showInfoList(row, detailPanel,callback) {
|
|
|
+ console.log(row)
|
|
|
+ if (row.infoList) {
|
|
|
+
|
|
|
+ var childGrid = document.createElement('div');
|
|
|
+ $(detailPanel).append(childGrid);
|
|
|
+
|
|
|
+ var childGrid=$(childGrid).css('margin','5px 0px 5px 55px').quiGrid({
|
|
|
+ columns: [
|
|
|
+ { display: '名称', name: 'name', align: 'center',width: "20%"},
|
|
|
+ { display: '规格', name: 'specs', align: 'center',width: "10%"},
|
|
|
+ { display: '单位', name: 'unit', align: 'center',width: "5%"},
|
|
|
+ { display: '数量', name: 'number', align: 'center',width: "5%"},
|
|
|
+ { display: '单价', name: 'price', align: 'center',width: "20%"},
|
|
|
+ { display: '金额', name: 'amount', align: 'center',width: "20%"},
|
|
|
+ { display: '税率(%)', name: 'taxRate', align: 'center',width: "10%"},
|
|
|
+ { display: '税费', name: 'taxAmount', align: 'center',width: "10%"}
|
|
|
+
|
|
|
+ ],
|
|
|
+ isScroll: false,width: '600px', columnWidth: 120,usePager:false,
|
|
|
+ data: {rows: row.infoList}
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
/**初始时通过向后台传递排序id、排序顺序、初始页码、每页条数**/
|
|
|
function getData(pageNo,pageSize){
|
|
|
jQuery.post("${ctx}/invoice/listPage.do",
|
|
@@ -129,8 +166,8 @@
|
|
|
top.Dialog.open({
|
|
|
URL : "${ctx}/invoice/edit.do?invoiceId="+rowId,
|
|
|
Title : "编辑发票性质",
|
|
|
- Width : 500,
|
|
|
- Height : 320
|
|
|
+ Width : 800,
|
|
|
+ Height : 600
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -139,8 +176,8 @@
|
|
|
top.Dialog.open({
|
|
|
URL : "${ctx}/invoice/edit.do",
|
|
|
Title : "新增发票性质",
|
|
|
- Width : 500,
|
|
|
- Height : 320
|
|
|
+ Width : 800,
|
|
|
+ Height : 600
|
|
|
});
|
|
|
}
|
|
|
|