diff --git a/topages/hourscount/hourscount.html b/topages/hourscount/hourscount.html
index 6fa3fd2..11ed49c 100644
--- a/topages/hourscount/hourscount.html
+++ b/topages/hourscount/hourscount.html
@@ -12,9 +12,9 @@
选择项目
@@ -23,7 +23,7 @@
diff --git a/topages/hourscount/hourscount.js b/topages/hourscount/hourscount.js
index 05966dd..c6eb6e7 100644
--- a/topages/hourscount/hourscount.js
+++ b/topages/hourscount/hourscount.js
@@ -5,6 +5,9 @@ var fun= {
init: function () {
$('#hourscount-projectName').selectpicker('render');
fun.dateInit();
+ fun.queryBtn();
+ //
+ fun.queryAsraDailyAllForList();
},
dateInit: function () {
//时间初始化
@@ -43,6 +46,77 @@ var fun= {
}).on("click", function () {
$("#hourscount-daterange-btnend").datetimepicker("setStartDate", $("#hourscount-daterange-btnsta").val())
});
+ //项目查询
+ fn.getAsraProject("",function(data){
+ var html="";
+ $.each(data,function(index,row){
+ html+='';
+ });
+ if(html != null && html != ""){
+ $("#hourscount-projectName").empty();
+ $("#hourscount-projectName").append(html);
+ $("#hourscount-projectName").selectpicker('refresh');
+
+ }
+ });
+ },
+ //工时统计查询
+ queryAsraDailyAllForList:function(){
+ debugger;
+ var noDataShow = '';
+ var req = fun.getParams();
+ var opt = {
+ data: JSON.stringify(req),
+ method: "POST",
+ async: false,
+ url: dataUrl.util.queryAsraDailyAllForList(),
+ success: function (res) {
+ if(res != null && res.code =='8888' ){
+ var data = res.data.list;
+ if(data == null || data.length == 0 ){
+ $('#workquery-list-wrap').empty();
+ $('#workquery-list-wrap').append(noDataShow);
+ }else{
+ var html = '';
+ $.each(data,function(index,rows){
+ html+=' ';
+ html+='- '+rows.projectName+'
';
+ html+='- 填报人员 '+rows.commitPersonNum+' 人
';
+ html+='- 工时 : '+rows.commitPersonNum*8+' 时
';
+ html+='
';
+ });
+ html+='';
+ $('#workquery-list-wrap').empty();
+ $('#workquery-list-wrap').append(html);
+ }
+
+ }else{
+ $('#workquery-list-wrap').empty();
+ $('#workquery-list-wrap').append(noDataShow);
+ }
+
+ }
+ }
+ sysAjax(opt);
+ },
+ //查询announce
+ queryBtn:function(){
+ $(document).on('click','#queryBtn',function(){
+ fun.queryAsraDailyAllForList();
+ });
+ },
+ //获取参数
+ getParams:function() {
+ var req = {};
+ var beginTime = $('#hourscount-daterange-btnsta').val(); //开始时间
+ var endTime = $('#hourscount-daterange-btnend').val(); //结束时间
+ var projectId = $('#hourscount-projectName').val();//项目id
+ req.beginTime = beginTime;
+ req.endTime = endTime;
+ req.projectId = projectId;
+ return req;
+
+
},
}
fun.init();
\ No newline at end of file
diff --git a/topages/workfill/workfill.js b/topages/workfill/workfill.js
index 0c0cc78..36725cc 100644
--- a/topages/workfill/workfill.js
+++ b/topages/workfill/workfill.js
@@ -154,7 +154,7 @@ var fun = {
});
},
//工时信息提交
- dailyReportCommit:function (id) {
+ dailyReportCommit:function (id,_this) {
console.log(id);
var arsaId = $("#weekday"+id).attr("data-id");
var projectId = $("#work-projectName"+id).find("option:selected").val();
@@ -177,17 +177,20 @@ var fun = {
dataType:'json',
success: function(res){
if(res.success == true){
- // console.log("aaa");
+ _this.text('编辑');
+ _this.parent().parent().find(".workfill-list-container").attr("contenteditable","false");
+ _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none');
+ var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text();
+ _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').toggleClass('display-none');
+ _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName);
+
}else{
- $("#areamanage_areaaddmodel-errormsg").text("保存失败,请新重试保存!");
- $("#areamanage_areaaddmodel-errormsg").show();
+ alert("失败");
return false;
-
}
}
};
sysAjax(editAreaBlok);
-
}
};
fun.init();
@@ -208,17 +211,17 @@ $(document).on('click','.workfill-list-btn',function () {
if(_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').hasClass('display-none')){
_this.text('提交');
_this.parent().parent().find(".workfill-list-container").attr("contenteditable","true");
+ _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none');
+ var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text();
+ _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').toggleClass('display-none');
+ _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName);
+
}else {
var commitId = _this.attr("id");
var id = commitId.substring(10,11);
- fun.dailyReportCommit(id);
- _this.text('编辑');
- _this.parent().parent().find(".workfill-list-container").attr("contenteditable","false");
+ fun.dailyReportCommit(id,_this);
+
}
- _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon').toggleClass('display-none');
- var projectName=_this.parent().parent().find('.workfill-list-projectnamewrap .workfill-projectCon .work-projectName').find("option:selected").text();
- _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').toggleClass('display-none');
- _this.parent().parent().find('.workfill-list-projectnamewrap .workfill-list-projectname').text(projectName);
});
diff --git a/topages/workquery/workquery.js b/topages/workquery/workquery.js
index 1ff6a1a..49d9131 100644
--- a/topages/workquery/workquery.js
+++ b/topages/workquery/workquery.js
@@ -141,9 +141,9 @@ var fun={
},
//查询announce
queryBtn:function(){
- $(document).on('click','#queryBtn',function(){
- fun.queryAsraDailyAllForList();
- });
+ $(document).on('click','#queryBtn',function(){
+ fun.queryAsraDailyAllForList();
+ });
},
//获取参数
getParams:function() {