|
@@ -3,18 +3,25 @@ define(function (require) {
|
|
|
|
|
|
var $grid1, $form;
|
|
|
|
|
|
+ // 弹框的方式
|
|
|
+ var widgets = {
|
|
|
+ // 搜索分类检索
|
|
|
+ selectTable: {
|
|
|
+ url: 'app/whepi/home/selectUptown.js',
|
|
|
+ bind: {
|
|
|
+ uptownId: 'uptownId',
|
|
|
+ uptownName: 'uptownName',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// 导出
|
|
|
function exportExcel() {
|
|
|
- var row = $grid1.rowData();
|
|
|
- if (!row) {
|
|
|
- $.yvan.msg('请先选择一行数据');
|
|
|
- return;
|
|
|
- }
|
|
|
var queryForm = $form.formGet();
|
|
|
$.yvan.download({
|
|
|
method: 'post',
|
|
|
- url: api('/sweepCode/export?queryProperties=' + queryForm.queryProperties + '&goStatus=' + queryForm.goStatus + '&dateSta=' + queryForm.dateSta + '&dateEnd=' + queryForm.dateEnd),
|
|
|
+ url: api('/sweepCode/export?queryProperties=' + queryForm.queryProperties + '&uptownId=' + queryForm.uptownId + '&goStatus=' + queryForm.goStatus + '&dateSta=' + queryForm.dateSta + '&dateEnd=' + queryForm.dateEnd),
|
|
|
fileName: '进出管理-' + $.yvan.getMoment().format('YYYY-MM-DD HH:mm:ss') + '.xlsx'
|
|
|
|
|
|
});
|
|
@@ -33,6 +40,14 @@ define(function (require) {
|
|
|
function queryGrid1() {
|
|
|
var queryUrl = '/sweepCode/selectCode';// 自行替换此参数
|
|
|
var queryForm = $form.formGet();
|
|
|
+ if (!queryForm.dateSta) {
|
|
|
+ $form.formSet({dateSta: getFormatDate() + " 00:00:00"});
|
|
|
+ queryForm.dateSta = getFormatDate() + " 00:00:00";
|
|
|
+ }
|
|
|
+ if (!queryForm.dateEnd) {
|
|
|
+ $form.formSet({dateEnd: getFormatDate() + " 23:59:59"});
|
|
|
+ queryForm.dateEnd = getFormatDate() + " 23:59:59";
|
|
|
+ }
|
|
|
queryForm.roleCode = App.currentRoleCode;
|
|
|
$grid1.reload({
|
|
|
mtype: 'POST',
|
|
@@ -63,7 +78,6 @@ define(function (require) {
|
|
|
};
|
|
|
|
|
|
// 搜索条件
|
|
|
- var queryFormPrompt = '名称';// 自行替换此参数
|
|
|
var queryForm = {
|
|
|
onRender: function () {
|
|
|
$form = $(this);
|
|
@@ -72,11 +86,29 @@ define(function (require) {
|
|
|
items: [[
|
|
|
{
|
|
|
xtype: 'textbox',
|
|
|
- label: '小区名称',
|
|
|
+ label: '大门名称',
|
|
|
name: 'queryProperties',
|
|
|
- prompt: queryFormPrompt,
|
|
|
+ prompt: "大门名称",
|
|
|
labelWidth: 'auto',
|
|
|
- events: {keydown: enterQueryGrid1}, width: 350
|
|
|
+ events: {keydown: enterQueryGrid1}, width: 250
|
|
|
+ },
|
|
|
+ {xtype: 'hidden', name: 'uptownId'},
|
|
|
+ {
|
|
|
+ xtype: 'searchbox',
|
|
|
+ label: '小区',
|
|
|
+ name: 'uptownName',
|
|
|
+ prompt: "小区",
|
|
|
+ width: '300px',
|
|
|
+ widget: widgets.selectTable,// 弹出框方法
|
|
|
+ labelWidth: '70px',
|
|
|
+ onChange: function (value) {
|
|
|
+ if (!isNotNullOrEmpty(value)) {
|
|
|
+ $form.formSet({
|
|
|
+ uptownId: ''
|
|
|
+ })
|
|
|
+ }
|
|
|
+ queryGrid1();
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
xtype: 'yvselect', label: '通行状态', name: 'goStatus', labelWidth: 'auto', value: '', width: 220,
|
|
@@ -89,7 +121,7 @@ define(function (require) {
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- xtype: 'datebox',
|
|
|
+ xtype: 'datetimebox',
|
|
|
name: 'dateSta',
|
|
|
label: '进出时间',
|
|
|
labelWidth: 'auto',
|
|
@@ -106,7 +138,7 @@ define(function (require) {
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- xtype: 'datebox', label: '--', name: 'dateEnd', labelWidth: 'auto', width: 180,
|
|
|
+ xtype: 'datetimebox', label: '--', name: 'dateEnd', labelWidth: 'auto', width: 220,
|
|
|
onChange: function (data) {
|
|
|
/* var expDateStart = $form.formGet().nextRepairDate;
|
|
|
var expDateEnd = $form.formGet().expDateEnd;
|