|
|
@@ -1,51 +1,74 @@
|
|
|
+var layer1 = null;
|
|
|
+var datatable = null;
|
|
|
|
|
|
-$(function(){
|
|
|
+var p_deptid = null;
|
|
|
+var p_name = null;
|
|
|
+var p_status = null
|
|
|
+var pageindex = 1
|
|
|
+$(function() {
|
|
|
|
|
|
setVisit();
|
|
|
var road_manager;
|
|
|
- if(roleContains("STATION")){
|
|
|
- road_manager = getCurrentUser().road_manager_id;
|
|
|
+ if (roleContains("STATION")) {
|
|
|
+ road_manager = getCurrentUser().road_manager_id;
|
|
|
}
|
|
|
- if(roleContains("ROAD_MANAGER")){
|
|
|
- road_manager = getCurrentUser().organid;
|
|
|
+ if (roleContains("ROAD_MANAGER")) {
|
|
|
+ road_manager = getCurrentUser().organid;
|
|
|
}
|
|
|
- setRoadManagerSelect("#center_manage",road_manager,true);
|
|
|
+ setRoadManagerSelect("#center_manage", road_manager, true);
|
|
|
// 当前月份初始化
|
|
|
// $("#sel_month").val(getM()-1);
|
|
|
- $.jeDate("#sel_month",{
|
|
|
- isinitVal:true,
|
|
|
- format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
|
|
|
- });
|
|
|
+ $.jeDate("#sel_month", {
|
|
|
+ isinitVal: true,
|
|
|
+ format: 'YYYY/MM' // 分隔符可以任意定义,该例子表示只显示年月
|
|
|
+ });
|
|
|
+
|
|
|
+ $("#month_name").html($("#sel_month").val());
|
|
|
+
|
|
|
+ var pdata = $.zui.store.get('store_param_' + current_url);
|
|
|
+ if (pdata != null) {
|
|
|
+ $.zui.store.set('store_param_' + current_url, null);
|
|
|
+
|
|
|
+ $("#sel_month").val(pdata.sel_month);
|
|
|
+ $("#fs_station").val(pdata.fs_station);
|
|
|
+ $("#center_manage").val(pdata.center_manage);
|
|
|
|
|
|
- $("#month_name").html( $("#sel_month").find("option:selected").text());
|
|
|
+ p_deptid = pdata.deptid;
|
|
|
+ p_name = pdata.name;
|
|
|
+ p_status = pdata.status;
|
|
|
+ pageindex = pdata.p_cur;
|
|
|
+
|
|
|
+ getappleTaskList(p_deptid, p_name, p_status)
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
|
|
|
- if(road_manager){
|
|
|
- getFsStationList(road_manager,function(obj){
|
|
|
+ if (road_manager) {
|
|
|
+ getFsStationList(road_manager, function(obj) {
|
|
|
$("#fs_station").html(obj);
|
|
|
var dept;
|
|
|
- if(roleContains("STATION")){
|
|
|
- dept = getCurrentUser().organid;
|
|
|
+ if (roleContains("STATION")) {
|
|
|
+ dept = getCurrentUser().organid;
|
|
|
}
|
|
|
$("#fs_station").val(dept);
|
|
|
// 初始化查询
|
|
|
getFsWorkInfo();
|
|
|
});
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
// 初始化查询
|
|
|
getFsWorkInfo();
|
|
|
}
|
|
|
// 导管中心选择
|
|
|
- $("#center_manage").change(function(){
|
|
|
+ $("#center_manage").change(function() {
|
|
|
var center_manage_id = GV(this);
|
|
|
- if(center_manage_id == ''){
|
|
|
+ if (center_manage_id == '') {
|
|
|
$("#fs_station,#fs_employee").html('');
|
|
|
- }else{
|
|
|
- getFsStationList(center_manage_id,function(obj){
|
|
|
+ } else {
|
|
|
+ getFsStationList(center_manage_id, function(obj) {
|
|
|
$("#fs_station").html(obj);
|
|
|
var dept;
|
|
|
- if(roleContains("STATION")){
|
|
|
- dept = getCurrentUser().organid;
|
|
|
+ if (roleContains("STATION")) {
|
|
|
+ dept = getCurrentUser().organid;
|
|
|
}
|
|
|
$("#fs_station").val(dept);
|
|
|
});
|
|
|
@@ -53,19 +76,19 @@ $(function(){
|
|
|
})
|
|
|
|
|
|
// 查询
|
|
|
- $("#searchBtn").click(function(){
|
|
|
- $("#month_name").html( $("#sel_month").find("option:selected").text() )
|
|
|
- getFsWorkInfo();
|
|
|
- })
|
|
|
- // 导出excel
|
|
|
- $("#exportExcel").click(function(){
|
|
|
+ $("#searchBtn").click(function() {
|
|
|
+ $("#month_name").html($("#sel_month").val())
|
|
|
+ getFsWorkInfo();
|
|
|
+ })
|
|
|
+ // 导出excel
|
|
|
+ $("#exportExcel").click(function() {
|
|
|
var param = '';
|
|
|
- if( GV("#fs_station") != '' && GV("#fs_station")!=null ){
|
|
|
- param = "&deptId="+ GV("#fs_station");
|
|
|
- }else if(GV("#center_manage")!='' ){
|
|
|
+ if (GV("#fs_station") != '' && GV("#fs_station") != null) {
|
|
|
+ param = "&deptId=" + GV("#fs_station");
|
|
|
+ } else if (GV("#center_manage") != '') {
|
|
|
param = "¢erId=" + GV("#center_manage");
|
|
|
}
|
|
|
- window.location.href = getserveraddr() +"/file/appeal/info?month="+GV("#sel_month")+param;
|
|
|
+ window.location.href = getserveraddr() + "/file/appeal/info?month=" + GV("#sel_month") + param;
|
|
|
})
|
|
|
|
|
|
|
|
|
@@ -75,51 +98,147 @@ $(function(){
|
|
|
|
|
|
/**
|
|
|
* 检索出勤明细数据
|
|
|
- * @param {*} param
|
|
|
+ * @param {*} param
|
|
|
*/
|
|
|
-function getFsWorkInfo(){
|
|
|
-
|
|
|
+function getFsWorkInfo() {
|
|
|
+
|
|
|
var param = {
|
|
|
- "start_time": timeTranslate( GV("#sel_month") ) ,
|
|
|
- "end_time": (GV("#sel_month")+"/25 23:00:00").replace("/","-").replace("/","-")
|
|
|
+ "start_time": timeTranslate(GV("#sel_month")),
|
|
|
+ "end_time": (GV("#sel_month") + "/25 23:00:00").replace("/", "-").replace("/", "-")
|
|
|
}
|
|
|
-
|
|
|
- if(GV("#fs_station")!=''){
|
|
|
- param[ 'dept_id' ] = GV("#fs_station");
|
|
|
- }else if(GV("#center_manage") != ''){
|
|
|
- param[ 'parent_dept_id' ] = GV("#center_manage");
|
|
|
+
|
|
|
+ if (GV("#fs_station") != '') {
|
|
|
+ param['dept_id'] = GV("#fs_station");
|
|
|
+ } else if (GV("#center_manage") != '') {
|
|
|
+ param['parent_dept_id'] = GV("#center_manage");
|
|
|
}
|
|
|
|
|
|
- post_common_service("statistics/check/appeal",param,function(data){
|
|
|
-
|
|
|
+ post_common_service("statistics/check/appeal", param, function(data) {
|
|
|
+
|
|
|
$(".table-tbody").empty();
|
|
|
- if(data.length >0){
|
|
|
- for(var i=0;i< data.length;i++){
|
|
|
- $(".table-tbody").append( getTableContent(data[i],i+1));
|
|
|
+ if (data.length > 0) {
|
|
|
+ for (var i = 0; i < data.length; i++) {
|
|
|
+ $(".table-tbody").append(getTableContent(data[i], i + 1));
|
|
|
}
|
|
|
}
|
|
|
- },function(error){
|
|
|
- });
|
|
|
+ }, function(error) {});
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 拼接表格内容
|
|
|
- * @param {*} obj
|
|
|
- * @param {*} seq
|
|
|
+ * @param {*} obj
|
|
|
+ * @param {*} seq
|
|
|
*/
|
|
|
-function getTableContent(obj,seq){
|
|
|
-
|
|
|
- var content = "<tr><td>"+seq+"</td> <td >"+obj.fee_station_name+"</td> <td >"+GDV(obj.appeal_num,0)+
|
|
|
- "</td> <td >"+GDV(obj.appeal_success_num,0)+"</td><td>"+ GDV(obj.appeal_fail_num,0) +"</td> </tr>";
|
|
|
+function getTableContent(obj, seq) {
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ var content = "<tr><td>" + seq + "</td> <td >" + obj.fee_station_name + "</td> <td >" + (GDV(obj.appeal_num, 0) > 0 ? ("<a href='javascript:void(0)' onclick='getappleTaskList(" + obj.dept_id + ",\"" + obj.fee_station_name + "\",0)'>" + GDV(obj.appeal_num, 0) + "</a>") : GDV(obj.appeal_num, 0)) +
|
|
|
+ "</td> <td >" + (GDV(obj.appeal_success_num, 0) > 0 ? ("<a href='javascript:void(0)' onclick='getappleTaskList(" + obj.dept_id + ",\"" + obj.fee_station_name + "\",1)'>" + GDV(obj.appeal_success_num, 0) + "</a>") : GDV(obj.appeal_success_num, 0)) + "</td><td>" + (GDV(obj.appeal_fail_num, 0) > 0 ? ("<a href='javascript:void(0)' onclick='getappleTaskList(" + obj.dept_id + ",\"" + obj.fee_station_name + "\",2)'>" + GDV(obj.appeal_fail_num, 0) + "</a>") : GDV(obj.appeal_fail_num, 0)) + "</td> </tr>";
|
|
|
|
|
|
return content;
|
|
|
}
|
|
|
-function setVisit(){
|
|
|
- if(roleContains("STATION")){
|
|
|
- $("#center_manage").attr("disabled","disabled");
|
|
|
- $("#fs_station").attr("disabled","disabled");
|
|
|
- }
|
|
|
- if(roleContains("ROAD_MANAGER")){
|
|
|
- $("#center_manage").attr("disabled","disabled");
|
|
|
- }
|
|
|
+
|
|
|
+function setVisit() {
|
|
|
+ if (roleContains("STATION")) {
|
|
|
+ $("#center_manage").attr("disabled", "disabled");
|
|
|
+ $("#fs_station").attr("disabled", "disabled");
|
|
|
+ }
|
|
|
+ if (roleContains("ROAD_MANAGER")) {
|
|
|
+ $("#center_manage").attr("disabled", "disabled");
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+//获取任务列表 status 为检索条件 0 为全部 1 为成功 2 为失败
|
|
|
+function getappleTaskList(deptid, name, status) {
|
|
|
+
|
|
|
+ p_deptid = deptid;
|
|
|
+ p_name = name;
|
|
|
+ p_status = status
|
|
|
+
|
|
|
+
|
|
|
+ var title = name + " " + $("#sel_month").val() + "月份" + (status == 0 ? "所有" : status == 1 ? "成功" : "失败") + "申诉任务列表"
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ var cols = [
|
|
|
+ { width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
|
|
|
+ { width: 160, text: '任务名称', type: 'string', flex: true, sort: 'down', field: 'name' },
|
|
|
+ { width: 80, text: '考核人员', type: 'string', flex: true, colClass: '', field: 'checked_person_name' },
|
|
|
+ { width: 160, text: '考核部门', type: 'string', flex: true, sort: 'down', field: 'checked_dept_name' },
|
|
|
+ { width: 80, text: '稽查人员', type: 'string', flex: true, hide: false, colClass: '', field: 'checkman_name' },
|
|
|
+ { width: 160, text: '稽查时间段', type: 'string', flex: true, sort: 'down', field: 'check_period' },
|
|
|
+ { width: 50, height: 60, text: '操作', flex: true, type: 'href_link', colClass: 'text-center', field: '<a href=\"javascript:void(0);\" onclick=\"jumptodetail(\'$field=id$\')\">详情</a>' },
|
|
|
+ ];
|
|
|
+
|
|
|
+ var data = {
|
|
|
+ "deptId": deptid,
|
|
|
+ "start_time": timeTranslate(GV("#sel_month")),
|
|
|
+ "end_time": (GV("#sel_month") + "/25 23:00:00").replace("/", "-").replace("/", "-"),
|
|
|
+ "status": status == 0 ? null : status
|
|
|
+ }
|
|
|
+
|
|
|
+ layer1 = layer.open({
|
|
|
+ area: ['50%', '50%'],
|
|
|
+ type: 1,
|
|
|
+ title: title,
|
|
|
+ closeBtn: 1,
|
|
|
+ shadeClose: true,
|
|
|
+ content: "<div id='tasktable' style='padding:10px'></div>",
|
|
|
+ success: function() {
|
|
|
+ datatable = $('#tasktable').mytable({
|
|
|
+ 'cols': cols,
|
|
|
+ 'url': "/task/gettasklistbydept",
|
|
|
+ 'param': data,
|
|
|
+ 'pager': {
|
|
|
+ 'page_size': 10,
|
|
|
+ 'p_cur': pageindex
|
|
|
+ }
|
|
|
+ });
|
|
|
+ pageindex = 1;
|
|
|
+
|
|
|
+ console.log(datatable)
|
|
|
+ }
|
|
|
+
|
|
|
+ });
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+function jumptodetail(id) {
|
|
|
+ if (layer1 != null) {
|
|
|
+ layer.close(layer1)
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ post_common_service("task/getById", { "id": id }, function(data) {
|
|
|
+
|
|
|
+ $.checkTask = data;
|
|
|
+ if (typeof($.checkTask) != "undefined" && typeof($.checkTask.appeal) != "undefined") {
|
|
|
+ $.checkTask.appeal = null;
|
|
|
+ }
|
|
|
+
|
|
|
+ var sel_month = $("#sel_month").val();
|
|
|
+ var fs_station = $("#fs_station").val();
|
|
|
+ var center_manage = $("#center_manage").val();
|
|
|
+
|
|
|
+ var pdata = {
|
|
|
+ "sel_month": sel_month,
|
|
|
+ "fs_station": fs_station,
|
|
|
+ "center_manage": center_manage,
|
|
|
+ "deptid": p_deptid,
|
|
|
+ "name": p_name,
|
|
|
+ "status": p_status,
|
|
|
+ "p_cur": datatable.options.pager.p_cur
|
|
|
+ }
|
|
|
+
|
|
|
+ $.zui.store.set('store_param_' + current_url, pdata);
|
|
|
+
|
|
|
+ url = "/view/mytask/taskDetail.html"
|
|
|
+ changePage(url);
|
|
|
+ }, function(error) {
|
|
|
+
|
|
|
+ });
|
|
|
}
|