|
|
@@ -11,7 +11,7 @@ function initTaskPage() {
|
|
|
initQueryParams();
|
|
|
initTableRowBtn();
|
|
|
queryTask();
|
|
|
- getRecord();
|
|
|
+ // getRecord();
|
|
|
}
|
|
|
|
|
|
function initQueryParams() {
|
|
|
@@ -51,9 +51,9 @@ function initQueryParams() {
|
|
|
}
|
|
|
//初始化表行按钮
|
|
|
function initTableRowBtn() {
|
|
|
- $.zui.store.set("task_table_btn_1", [{ func: 'checkUpdate', text: '修改',icon_class: ''},
|
|
|
- { func: 'deleteRecord', text: '删除',icon_class: 'text-center' }
|
|
|
-]);
|
|
|
+ $.zui.store.set("task_table_btn_1", [{ func: 'checkUpdate', text: '修改', icon_class: '' },
|
|
|
+ { func: 'deleteRecord', text: '删除', icon_class: 'text-center' }
|
|
|
+ ]);
|
|
|
$.zui.store.set("task_table_btn_2", [{ func: 'showCheck', text: '开始稽查', icon_class: 'icon-eye-open' }]);
|
|
|
// $.zui.store.set("task_table_btn_2", [{ func: 'showCheck', text: '开始稽查', icon_class: 'icon-eye-open' }]);
|
|
|
// $.zui.store.set("task_table_btn_3", [{ func: 'showCheck', text: '开始稽查', icon_class: 'icon-eye-open' }]);
|
|
|
@@ -70,9 +70,9 @@ function queryTask() {
|
|
|
console.log(user.roles[0]);
|
|
|
var t = getTimeByMonth(GV("#start_time"));
|
|
|
var data = {
|
|
|
- "startTime": new Date(getMomentTimeFormat(t.starttime)),
|
|
|
- "endTime":new Date(getMomentTimeFormat(t.endtime)),
|
|
|
- "dept": $("#deptlist").val(),
|
|
|
+ "startTime": getMomentTimeFormat(t.starttime),
|
|
|
+ "endTime": getMomentTimeFormat(t.endtime),
|
|
|
+ "dept": $("#deptlist").val(),
|
|
|
// "check_status": cur_status
|
|
|
};
|
|
|
var hide = false;
|
|
|
@@ -81,22 +81,22 @@ function queryTask() {
|
|
|
}
|
|
|
var cols = [
|
|
|
{ width: 80, text: '序号', type: 'number', flex: true, colClass: 'text-center', field: 'num' },
|
|
|
- { width: 80, text: '清障队', type: 'string', flex: true,colClass: 'text-center', sort: 'down', field: 'deptName' },
|
|
|
- { width: 80, text: '桩号', type: 'string', flex: true, colClass: 'text-center',sort: 'down', field: 'addr' },
|
|
|
+ { width: 80, text: '清障队', type: 'string', flex: true, colClass: 'text-center', sort: 'down', field: 'deptName' },
|
|
|
+ { width: 80, text: '桩号', type: 'string', flex: true, colClass: 'text-center', sort: 'down', field: 'addr' },
|
|
|
{ width: 80, text: '车牌号', type: 'string', flex: true, hide: hide, colClass: 'text-center', field: 'car_info' },
|
|
|
- { width: 80, text: '客户信息', type: 'string', flex: true, sort: 'down',colClass: 'text-center', field: 'car_user_info' },
|
|
|
- { width: 120, text: '接警时间', type: 'string', flex: true, sort: 'down',colClass: 'text-center', field: 'received_time' },
|
|
|
- { width: 160, text: '出勤人员', type: 'string', flex: true, sort: 'down',colClass: 'text-center', field: 'userNames' },
|
|
|
+ { width: 80, text: '客户信息', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'car_user_info' },
|
|
|
+ { width: 120, text: '接警时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'received_time' },
|
|
|
+ { width: 160, text: '出勤人员', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'userNames' },
|
|
|
// {width: 120, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'}
|
|
|
];
|
|
|
user.roles[0].id = 1;
|
|
|
- if(user.roles[0].id == 1){
|
|
|
- var colFunc = { width: 160, text: '操作', type: 'string', flex: true, field: 'id',colClass: 'text-center' };
|
|
|
+ if (user.roles[0].id == 1) {
|
|
|
+ var colFunc = { width: 160, text: '操作', type: 'string', flex: true, field: 'id', colClass: 'text-center' };
|
|
|
colFunc.oper = $.zui.store.get("task_table_btn_1");
|
|
|
cols.push(colFunc);
|
|
|
$("#saveButton").show();
|
|
|
- }else if(user.roles[0].id == 16 || user.roles[0].id == 17){
|
|
|
- var colFunc = { width: 160, text: '操作', type: 'imagebutton', flex: true, field: 'pics',colClass: 'text-center' };
|
|
|
+ } else if (user.roles[0].id == 16 || user.roles[0].id == 17) {
|
|
|
+ var colFunc = { width: 160, text: '操作', type: 'imagebutton', flex: true, field: 'pics', colClass: 'text-center' };
|
|
|
colFunc.oper = $.zui.store.get("task_table_btn_1");
|
|
|
cols.push(colFunc);
|
|
|
}
|
|
|
@@ -124,7 +124,7 @@ function queryTask() {
|
|
|
}
|
|
|
|
|
|
|
|
|
-function addTask(){
|
|
|
+function addTask() {
|
|
|
is_save = 0;
|
|
|
resert();
|
|
|
// var contenthtml = base_ui_url+'qzd/view/task/addtask.html';
|
|
|
@@ -132,7 +132,7 @@ function addTask(){
|
|
|
$('#addModal').modal('show');
|
|
|
}
|
|
|
|
|
|
-function openUpload(){
|
|
|
+function openUpload() {
|
|
|
return $("#fileupload").click();
|
|
|
}
|
|
|
|
|
|
@@ -151,10 +151,10 @@ function UpladFile() {
|
|
|
}, "task");
|
|
|
}
|
|
|
|
|
|
-function checkUpdate(id){
|
|
|
- is_save = "_"+id;
|
|
|
- var data ={
|
|
|
- "id":id
|
|
|
+function checkUpdate(id) {
|
|
|
+ is_save = "_" + id;
|
|
|
+ var data = {
|
|
|
+ "id": id
|
|
|
};
|
|
|
post_common_service('q/record/one', data, function(redata) {
|
|
|
$('#addModal').modal('show');
|
|
|
@@ -182,44 +182,42 @@ function checkUpdate(id){
|
|
|
$("#dept").val(redata.dept);
|
|
|
$("#carUserSatisfaction").val(redata.car_user_satisfaction);
|
|
|
var userids = redata.users.split(",");
|
|
|
- for(var i in userids){
|
|
|
- $('span[data-id="'+userids[i]+'"] input').click();
|
|
|
+ for (var i in userids) {
|
|
|
+ $('span[data-id="' + userids[i] + '"] input').click();
|
|
|
}
|
|
|
$("#recordUser").val(redata.userNames);
|
|
|
$("#addr").val(redata.addr);
|
|
|
- })
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
-function deleteRecord(id){
|
|
|
- var data ={
|
|
|
- "id":id
|
|
|
+function deleteRecord(id) {
|
|
|
+ var data = {
|
|
|
+ "id": id
|
|
|
};
|
|
|
post_common_service('q/record/delete', data, function(redata) {
|
|
|
queryTask();
|
|
|
- });
|
|
|
-}
|
|
|
-
|
|
|
-function resert(){
|
|
|
- $("#type").val('1');
|
|
|
- $("#carinfo").val('');
|
|
|
- $("#startTime").val('');
|
|
|
- $("#carUserinfo").val('');
|
|
|
- $("#dept").val('');
|
|
|
- $("#carUserSatisfaction").val('');
|
|
|
- $(".ComboTreeItemChlid").find("input").prop('checked', false);
|
|
|
- $("#recordUser").val('');
|
|
|
- $("#addr").val('');
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+function resert() {
|
|
|
+ $("#type").val('1');
|
|
|
+ $("#carinfo").val('');
|
|
|
+ $("#startTime").val('');
|
|
|
+ $("#carUserinfo").val('');
|
|
|
+ $("#dept").val('');
|
|
|
+ $("#carUserSatisfaction").val('');
|
|
|
+ $(".ComboTreeItemChlid").find("input").prop('checked', false);
|
|
|
+ $("#recordUser").val('');
|
|
|
+ $("#addr").val('');
|
|
|
}
|
|
|
|
|
|
-function getRecord(){
|
|
|
+function getRecord() {
|
|
|
var data = {
|
|
|
// "startTime": new Date(getMomentTimeFormat(t.starttime)),
|
|
|
// "endTime":new Date(getMomentTimeFormat(t.endtime)),
|
|
|
"dept": $("#deptlist").val(),
|
|
|
- // "check_status": cur_status
|
|
|
-
|
|
|
- };
|
|
|
- post_common_service('q/record/getall/0/0', data, function(redata) {
|
|
|
- console.log(redata);
|
|
|
-});
|
|
|
+ // "check_status": cur_status
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
}
|