|
@ -22,28 +22,6 @@
|
|
|
this.grid.setOptions({parms: params});
|
|
|
this.grid.loadData(true);
|
|
|
}
|
|
|
function reloadExcel(params) {
|
|
|
// $.ajax({
|
|
|
// url: ctx + "/admin/healthIndex/toExcel",
|
|
|
// type: "post",
|
|
|
// dataType: "json",
|
|
|
// async: "true",
|
|
|
// data: params,
|
|
|
// success: function (result) {
|
|
|
// debugger;
|
|
|
// if (result.status == '200') {
|
|
|
// $.Notice.success(result.msg);
|
|
|
// } else {
|
|
|
// $.Notice.error(result.msg);
|
|
|
// }
|
|
|
// },
|
|
|
// error: function (data) {
|
|
|
// $.Notice.error("系统异常,请联系管理员!");
|
|
|
// }
|
|
|
//
|
|
|
// })
|
|
|
}
|
|
|
|
|
|
|
|
|
/* *************************** 模块初始化 ***************************** */
|
|
|
|
|
@ -59,15 +37,19 @@
|
|
|
$idcard: $("#inp_idcard"),
|
|
|
$userName: $("#inp_user_name"),//人员姓名
|
|
|
$indexType: $("#inp_index_type"),//指标类型
|
|
|
$searchMin:$("#search-min"),
|
|
|
$searchMax:$("#search-max"),
|
|
|
$searchMin1:$("#search-min-1"),
|
|
|
$searchMax1:$("#search-max-1"),
|
|
|
$searchMin2:$("#search-min-2"),
|
|
|
$searchMax2:$("#search-max-2"),
|
|
|
init: function () {
|
|
|
this.$element.show();
|
|
|
this.$element.attrScan();
|
|
|
window.form = this.$element;
|
|
|
this.$deviceCode.ligerTextBox({width: 200});
|
|
|
this.$searchMax.ligerTextBox({width: 150});
|
|
|
this.$searchMin.ligerTextBox({width: 150});
|
|
|
this.$searchMax1.ligerTextBox({width: 150});
|
|
|
this.$searchMin1.ligerTextBox({width: 150});
|
|
|
this.$searchMax2.ligerTextBox({width: 150});
|
|
|
this.$searchMin2.ligerTextBox({width: 150});
|
|
|
this.$czrd.ligerDateEditor({
|
|
|
format: "yyyy-MM-dd",
|
|
|
showTime: false,
|
|
@ -90,10 +72,21 @@
|
|
|
valueField: 'typeId',
|
|
|
onSelected: function (value,name) {
|
|
|
if(value){
|
|
|
$("#search-max").attr('placeholder',name+"最大值");
|
|
|
$("#search-min").attr('placeholder',name+'最小值');
|
|
|
$("#search-max").val('');
|
|
|
$("#search-min").val('');
|
|
|
var valueNum1='value1';
|
|
|
var valueNum2='value2';
|
|
|
if(value==3){
|
|
|
valueNum1='value3';
|
|
|
valueNum2='value4';
|
|
|
}
|
|
|
$("#search-max-1").attr('placeholder',name+valueNum1+"最大值");
|
|
|
$("#search-min-1").attr('placeholder',name+valueNum1+'最小值');
|
|
|
$("#search-max-1").val('');
|
|
|
$("#search-min-1").val('');
|
|
|
$("#select-list").show();
|
|
|
$("#search-max-2").attr('placeholder',name+valueNum2+"最大值");
|
|
|
$("#search-min-2").attr('placeholder',name+valueNum2+'最小值');
|
|
|
$("#search-max-2").val('');
|
|
|
$("#search-min-2").val('');
|
|
|
$("#select-list").show();
|
|
|
}
|
|
|
}
|
|
@ -106,7 +99,6 @@
|
|
|
master.reloadGrid();
|
|
|
});
|
|
|
self.$btnExport.click(function () {
|
|
|
// master.toExcel();
|
|
|
var myform = $("<form></form>");
|
|
|
myform.attr('method','post')
|
|
|
myform.attr('action',ctx + '/admin/healthIndex/getExcelByFilter');
|
|
@ -129,26 +121,37 @@
|
|
|
//血糖/血压/体重/腰围
|
|
|
var indexType = $("<input type='hidden' name='indexType' />")
|
|
|
indexType.attr('value',$("#inp_index_type_val").val());
|
|
|
//指标最小值
|
|
|
var indexTypeMin = $("<input type='hidden' name='indexTypeMin' />")
|
|
|
indexTypeMin.attr('value',$("#search-min").val());
|
|
|
//指标最大值
|
|
|
var indexTypeMax = $("<input type='hidden' name='indexTypeMax' />")
|
|
|
indexTypeMax.attr('value',$("#search-max").val());
|
|
|
//指标1最小值
|
|
|
var indexTypeMin1 = $("<input type='hidden' name='indexTypeMin1' />")
|
|
|
indexTypeMin1.attr('value',$("#search-min-1").val());
|
|
|
//指标1最大值
|
|
|
var indexTypeMax1 = $("<input type='hidden' name='indexTypeMax1' />")
|
|
|
indexTypeMax1.attr('value',$("#search-max-1").val());
|
|
|
//指标2最小值
|
|
|
var indexTypeMin2 = $("<input type='hidden' name='indexTypeMin2' />")
|
|
|
indexTypeMin2.attr('value',$("#search-min-2").val());
|
|
|
//指标2最大值
|
|
|
var indexTypeMax2 = $("<input type='hidden' name='indexTypeMax2' />")
|
|
|
indexTypeMax2.attr('value',$("#search-max-2").val());
|
|
|
myform.append(deviceSn);
|
|
|
myform.append(date);
|
|
|
myform.append(idcard);
|
|
|
myform.append(userName);
|
|
|
myform.append(indexType);
|
|
|
myform.append(indexTypeMin);
|
|
|
myform.append(indexTypeMax);
|
|
|
myform.append(indexTypeMin1);
|
|
|
myform.append(indexTypeMax1);
|
|
|
myform.append(indexTypeMin2);
|
|
|
myform.append(indexTypeMax2);
|
|
|
myform.appendTo('body').submit(); //must add this line for higher html spec
|
|
|
});
|
|
|
//隐藏操作
|
|
|
self.$indexType.change(function(obj){
|
|
|
if(!obj.target.value){
|
|
|
$("#search-max").val('');
|
|
|
$("#search-min").val('');
|
|
|
$("#search-max-1").val('');
|
|
|
$("#search-min-1").val('');
|
|
|
$("#select-list").hide();
|
|
|
$("#search-max-2").val('');
|
|
|
$("#search-min-2").val('');
|
|
|
$("#select-list").hide();
|
|
|
}
|
|
|
});
|
|
@ -241,12 +244,6 @@
|
|
|
values.indexType = retrieve.typeBox.getValue();
|
|
|
reloadGrid.call(this, values);
|
|
|
},
|
|
|
toExcel: function (msg) {
|
|
|
retrieve.$element.attrScan();
|
|
|
var values = retrieve.$element.Fields.getValues();
|
|
|
values.indexType = retrieve.typeBox.getValue();
|
|
|
reloadExcel(values);
|
|
|
}
|
|
|
};
|
|
|
|
|
|
pageInit();
|