|
|
@@ -73,8 +73,11 @@ var al_data = [];
|
|
|
loadData(nodedata);
|
|
|
$("#add_btn").data("tree_flag",0);
|
|
|
})
|
|
|
+
|
|
|
+ setCheckTypeSelect('#speacial_type_select','','special_check_type',true);
|
|
|
queryTable();
|
|
|
- setCheckTypeSelect('#select-check-type','');
|
|
|
+ setCheckTypeSelect('#select-check-type','','wrecker_group_check_type');
|
|
|
+ setCheckTypeSelect('#select-special-check-type','','special_check_type');
|
|
|
}
|
|
|
|
|
|
//关闭弹窗
|
|
|
@@ -95,6 +98,7 @@ var al_data = [];
|
|
|
var check_time = $("#month_date2").val();
|
|
|
var check_num = $("#check_num").val();
|
|
|
var wrecker_check_type = $("#select-check-type").val();
|
|
|
+ var special_check_type = $("#select-special-check-type").val();
|
|
|
if(idUpdate){
|
|
|
if($("#editImage").attr("file_src") != ''){
|
|
|
var src = $("#editImage").attr("file_src").split(",");
|
|
|
@@ -142,9 +146,10 @@ var al_data = [];
|
|
|
"check_time":check_time,
|
|
|
"check_time_name":check_time_name,
|
|
|
"check_num":check_num,
|
|
|
- "wrecker_check_type":wrecker_check_type
|
|
|
+ "wrecker_check_type":wrecker_check_type,
|
|
|
+ "special_check_type":special_check_type
|
|
|
}
|
|
|
- console.log(data);
|
|
|
+ // console.log(data);
|
|
|
if(idUpdate){
|
|
|
post_common_service("checkOther/update", data, function(data){
|
|
|
file_src = "";
|
|
|
@@ -202,29 +207,33 @@ function queryTable(){
|
|
|
var data = {
|
|
|
"check_time_name":$("#month_date").val(),
|
|
|
"dept_id":$("#second").val(),
|
|
|
- "check_type":check_type
|
|
|
+ "check_type":check_type,
|
|
|
+ "special_check_type":$("#speacial_type_select").val()
|
|
|
}
|
|
|
- hide = true;
|
|
|
+ var hide = true;
|
|
|
if(check_type==5){
|
|
|
hide = false;
|
|
|
}
|
|
|
operation = true;
|
|
|
- if(check_type==5){
|
|
|
- hide = false;
|
|
|
+ var hide1 = true;
|
|
|
+ if(check_type==2){
|
|
|
+
|
|
|
+ hide1 = false;
|
|
|
}
|
|
|
var cols = [
|
|
|
{width: 30, text: '序号', flex: false, colClass: 'text-center',field:'num'},
|
|
|
{width: 50, text: '时间', flex: false,colClass: '',field:'check_time'},
|
|
|
{width: 50, text: '部门', flex: false,colClass: '',field:'organname'},
|
|
|
- {width: 50, text: '人员', flex: false,colClass: '',field:'username'},
|
|
|
+ {width: 30, text: '人员', flex: false,colClass: '',field:'username'},
|
|
|
{width: 50, text: '扣分类型', flex: false,colClass: '',field:'check_item_name'},
|
|
|
- {width: 50, text: '扣分值', flex: false,colClass: '',field:'check_score'},
|
|
|
- {width: 120, text: '附件', type: 'imagedd',flex: false,colClass: '',field:'file_ids'},
|
|
|
- {width: 50, text: '扣分描述', flex: false,colClass: '',field:'remark'},
|
|
|
- {width: 50, text: '检查类型', flex: false,hide: hide,field:'wrecker_check_type_name'}
|
|
|
+ {width: 30, text: '扣分值', flex: false,colClass: '',field:'check_score'},
|
|
|
+ {width: 70, text: '扣分描述', flex: false,colClass: '',field:'remark'},
|
|
|
+ {width: 30, text: '检查类型', flex: false,hide: hide,field:'wrecker_check_type_name'},
|
|
|
+ {width: 50, text: '稽查类型', flex: false,hide: hide1,field:'special_check_type_name'},
|
|
|
+ {width: 120, text: '附件', type: 'imagedd',flex: false,colClass: '',field:'file_ids'}
|
|
|
];
|
|
|
if(roleContains("JICHA") || hasRole("ROLE_ADMIN")){
|
|
|
- cols.push({width: 50, text: '操作', flex: false,field:'id',oper:[
|
|
|
+ cols.push({width: 60, text: '操作', flex: false,field:'id',oper:[
|
|
|
{func:'updateCheckTeam',text:'修改',icon_class:'icon-edit'},{func:'deleteCheckTeam',text:'删除',icon_class:'icon-remove-circle'}
|
|
|
]});
|
|
|
}
|
|
|
@@ -254,7 +263,8 @@ function updateCheckTeam(id){
|
|
|
var time = data.check_time;
|
|
|
$("#month_date2").val(data.check_time);
|
|
|
$("#check_num").val(data.check_num);
|
|
|
- setCheckTypeSelect('#select-check-type',data.wrecker_check_type);
|
|
|
+ setCheckTypeSelect('#select-check-type',data.wrecker_check_type,"wrecker_group_check_type");
|
|
|
+ setCheckTypeSelect('#select-special-check-type',data.special_check_type,'special_check_type');
|
|
|
$("#editImage").empty();
|
|
|
if(data.file_ids !=null && data.file_ids != ""){
|
|
|
var ids = data.file_ids.split(",");
|
|
|
@@ -415,10 +425,12 @@ function refreshUploader(){
|
|
|
for (var i = 0; i < data.length; i++) {
|
|
|
// for (var j = 33; j <= 53; j++) {
|
|
|
// if (select_road == j) {
|
|
|
+ var workno=data[i].workno;
|
|
|
+ if(workno) workno = workno.substring(workno.length-3);
|
|
|
if (data[i].id == userId) {
|
|
|
- tempStr += "<option value=" + data[i].id + " selected='selected'>" + data[i].truename + "</option>";
|
|
|
+ tempStr += "<option value=" + data[i].id + " selected='selected'>" + workno+ data[i].truename + "</option>";
|
|
|
} else {
|
|
|
- tempStr += "<option value=" + data[i].id + ">" + data[i].truename + "</option>";
|
|
|
+ tempStr += "<option value=" + data[i].id + ">" + workno+data[i].truename + "</option>";
|
|
|
}
|
|
|
// }
|
|
|
// }
|
|
|
@@ -659,9 +671,10 @@ function refreshUploader(){
|
|
|
|
|
|
var map = {} ;
|
|
|
|
|
|
-function setCheckTypeSelect(div, selectId) {
|
|
|
- post_common_service("/constant/getConstantByFlag", {code_flag: "wrecker_group_check_type"}, function(data) {
|
|
|
+function setCheckTypeSelect(div, selectId, codeFlag, hasAll) {
|
|
|
+ post_common_service("/constant/getConstantByFlag", {code_flag: codeFlag}, function(data) {
|
|
|
var optStr = '';
|
|
|
+ if(hasAll) optStr='<option value="">全部</option>';
|
|
|
for (var i in data) {
|
|
|
if (data[i].code_value == selectId)
|
|
|
optStr += '<option value="' + data[i].code_value + '" selected="selected">' + data[i].code_name + '</option>';
|