|
|
@@ -9,7 +9,7 @@ $(function () {
|
|
|
{ label: '金额', name: 'amount', index: 'amount', sortable: false,
|
|
|
formatter: function (cellvalue, options, rowdata) {
|
|
|
var amount = parseFloat(cellvalue) || 0;
|
|
|
- if (amount > 0) {
|
|
|
+ if (rowdata.type === 1) {
|
|
|
return '<span style="color:#52c41a">+¥' + amount.toFixed(2) + '</span>';
|
|
|
} else {
|
|
|
return '<span style="color:#ff4d4f">-¥' + Math.abs(amount).toFixed(2) + '</span>';
|
|
|
@@ -36,15 +36,15 @@ $(function () {
|
|
|
rowList: [10, 30, 50],
|
|
|
multiselect: false,
|
|
|
pager: "#jqGridPager",
|
|
|
- jsonReader: {
|
|
|
- root: "list",
|
|
|
- page: "currPage",
|
|
|
- total: "totalPage",
|
|
|
- records: "totalCount"
|
|
|
+ jsonReader : {
|
|
|
+ root: "page.list",
|
|
|
+ page: "page.currPage",
|
|
|
+ total: "page.totalPage",
|
|
|
+ records: "page.totalCount"
|
|
|
},
|
|
|
prmNames: {
|
|
|
- page: "pageNum",
|
|
|
- rows: "pageSize",
|
|
|
+ page:"page",
|
|
|
+ rows:"limit",
|
|
|
order: "order"
|
|
|
},
|
|
|
gridComplete: function () {
|