@@ -7,6 +7,8 @@
var refreshGirdData;
var refreshGirdData;
var bootstrap = function ($, learun) {
var bootstrap = function ($, learun) {
"use strict";
"use strict";
var startTime;
var endTime;
var processId = '';
var processId = '';
var page = {
var page = {
init: function () {
init: function () {
@@ -14,6 +16,37 @@ var bootstrap = function ($, learun) {
page.bind();
page.bind();
},
},
bind: function () {
bind: function () {
// 时间搜索框
$('#datesearch').lrdate({
dfdata: [
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } },
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }
],
// 月
mShow: false,
premShow: false,
// 季度
jShow: false,
prejShow: false,
// 年
ysShow: false,
yxShow: false,
preyShow: false,
yShow: false,
// 默认
dfvalue: '3',
selectfn: function (begin, end) {
startTime = begin;
endTime = end;
page.search();
}
});
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#ApplyUser').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_userid', text: 'f_realname' });
// 刷新
// 刷新
$('#lr_refresh').on('click', function () {
$('#lr_refresh').on('click', function () {
location.reload();
location.reload();
@@ -148,7 +181,7 @@ var bootstrap = function ($, learun) {
});
});
}
}
},
},
{ label: "填报时间", name: "ApplyTime", width: 10 0, align: "left" },
{ label: "填报时间", name: "ApplyTime", width: 15 0, align: "left" },
{
{
label: "填报人", name: "ApplyUser", width: 100, align: "left",
label: "填报人", name: "ApplyUser", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
formatterAsync: function (callback, value, row, op, $cell) {
@@ -162,7 +195,7 @@ var bootstrap = function ($, learun) {
},
},
{ label: "备注", name: "Remark", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
{ label: "总金额", name: "SumAmount", width: 100, align: "left" },
{ label: "总金额", name: "SumAmount", width: 100, align: "left" },
{ label: "人民币(大写)", name: "UpperAmount", width: 1 00, align: "left" },
{ label: "人民币(大写)", name: "UpperAmount", width: 2 00, align: "left" },
{
{
label: "审批状态", name: "Status", width: 100, align: "left",
label: "审批状态", name: "Status", width: 100, align: "left",
formatter: function (cellvalue, row) {
formatter: function (cellvalue, row) {
@@ -180,10 +213,12 @@ var bootstrap = function ($, learun) {
mainId: 'Id',
mainId: 'Id',
isPage: true
isPage: true
});
});
page.search();
// page.search();
},
},
search: function (param) {
search: function (param) {
param = param || {};
param = param || {};
param.StartTime = startTime;
param.EndTime = endTime;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
}
};
};