|
@@ -80,7 +80,7 @@ function queryTask() {
|
|
|
"startTime": getMomentTimeFormat(t.starttime),
|
|
"startTime": getMomentTimeFormat(t.starttime),
|
|
|
"endTime": getMomentTimeFormat(t.endtime),
|
|
"endTime": getMomentTimeFormat(t.endtime),
|
|
|
"dept": $("#deptlist").val(),
|
|
"dept": $("#deptlist").val(),
|
|
|
- "isComplete":$("#isComplete").val(),
|
|
|
|
|
|
|
+ "isComplete": $("#isComplete").val(),
|
|
|
// "check_status": cur_status
|
|
// "check_status": cur_status
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -96,13 +96,13 @@ function queryTask() {
|
|
|
{ width: 80, text: '车牌号', type: 'string', flex: true, hide: hide, colClass: 'text-center', field: 'car_info' },
|
|
{ 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: 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: 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: 'last_time' },
|
|
|
|
|
|
|
+ // { width: 160, text: '最后时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'last_time' },
|
|
|
{ width: 120, text: '出勤人员', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'userNames' },
|
|
{ width: 120, text: '出勤人员', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'userNames' },
|
|
|
// {width: 120, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'}
|
|
// {width: 120, text: '状态', type: 'string', flex: true, colClass: '',field: 'check_status_name'}
|
|
|
];
|
|
];
|
|
|
if (hasRole(ROLE_DDZS_ADMIN) || hasRole(ROLE_DDZS)) {
|
|
if (hasRole(ROLE_DDZS_ADMIN) || hasRole(ROLE_DDZS)) {
|
|
|
var colFunc = { width: 160, text: '操作', type: 'string', flex: true, field: 'id', colClass: 'text-center' };
|
|
var colFunc = { width: 160, text: '操作', type: 'string', flex: true, field: 'id', colClass: 'text-center' };
|
|
|
- var colStr = { width: 160, text: '最后时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'last_time' };
|
|
|
|
|
|
|
+ var colStr = { width: 160, text: '最后时间', type: 'string', flex: true, sort: 'down', colClass: 'text-center', field: 'last_time' };
|
|
|
colFunc.oper = $.zui.store.get("task_table_btn_1");
|
|
colFunc.oper = $.zui.store.get("task_table_btn_1");
|
|
|
cols.push(colStr);
|
|
cols.push(colStr);
|
|
|
cols.push(colFunc);
|
|
cols.push(colFunc);
|
|
@@ -110,7 +110,7 @@ function queryTask() {
|
|
|
} else if (hasRole(ROLE_WRECKER_MANAGER) || hasRole(ROLE_WRECKER_NQ) || hasRole(ROLE_WRECKER)) {
|
|
} else if (hasRole(ROLE_WRECKER_MANAGER) || hasRole(ROLE_WRECKER_NQ) || hasRole(ROLE_WRECKER)) {
|
|
|
var colFunc1 = { width: 160, text: '视频上传', type: 'imagebutton', flex: true, field: 'videos', colClass: 'text-center' };
|
|
var colFunc1 = { width: 160, text: '视频上传', type: 'imagebutton', flex: true, field: 'videos', colClass: 'text-center' };
|
|
|
var colFunc2 = { width: 160, text: '图片上传', type: 'imagebutton', flex: true, field: 'pics', colClass: 'text-center' };
|
|
var colFunc2 = { width: 160, text: '图片上传', type: 'imagebutton', flex: true, field: 'pics', colClass: 'text-center' };
|
|
|
- // colFunc.oper = $.zui.store.get("task_table_btn_1");
|
|
|
|
|
|
|
+ // colFunc.oper = $.zui.store.get("task_table_btn_1");
|
|
|
cols.push(colFunc1);
|
|
cols.push(colFunc1);
|
|
|
cols.push(colFunc2);
|
|
cols.push(colFunc2);
|
|
|
}
|
|
}
|
|
@@ -136,14 +136,14 @@ function queryTask() {
|
|
|
|
|
|
|
|
$(".uploadervideo").each(function() {
|
|
$(".uploadervideo").each(function() {
|
|
|
var type = this.id.split("_")[2];
|
|
var type = this.id.split("_")[2];
|
|
|
- var title= '';
|
|
|
|
|
|
|
+ var title = '';
|
|
|
var extensions = '';
|
|
var extensions = '';
|
|
|
- if(type == "videos"){
|
|
|
|
|
- title = "视频";
|
|
|
|
|
- extensions ='mp4,avi';
|
|
|
|
|
- }else{
|
|
|
|
|
- title ='图片',
|
|
|
|
|
- extensions ='jpg,gif,png'
|
|
|
|
|
|
|
+ if (type == "videos") {
|
|
|
|
|
+ title = "视频";
|
|
|
|
|
+ extensions = 'mp4,avi';
|
|
|
|
|
+ } else {
|
|
|
|
|
+ title = '图片',
|
|
|
|
|
+ extensions = 'jpg,gif,png'
|
|
|
}
|
|
}
|
|
|
$(this).uploader({
|
|
$(this).uploader({
|
|
|
autoUpload: true, // 当选择文件后立即自动进行上传操作
|
|
autoUpload: true, // 当选择文件后立即自动进行上传操作
|
|
@@ -154,7 +154,7 @@ function queryTask() {
|
|
|
title: title,
|
|
title: title,
|
|
|
extensions: extensions
|
|
extensions: extensions
|
|
|
}],
|
|
}],
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 不允许上传重复文件
|
|
// 不允许上传重复文件
|
|
|
prevent_duplicates: true
|
|
prevent_duplicates: true
|
|
|
},
|
|
},
|
|
@@ -169,11 +169,11 @@ function queryTask() {
|
|
|
}
|
|
}
|
|
|
var data = {
|
|
var data = {
|
|
|
"id": id,
|
|
"id": id,
|
|
|
- "isComplete":1
|
|
|
|
|
|
|
+ "isComplete": 1
|
|
|
};
|
|
};
|
|
|
- if(file.type.indexOf('image') === 0) {
|
|
|
|
|
|
|
+ if (file.type.indexOf('image') === 0) {
|
|
|
data.pics = file_src;
|
|
data.pics = file_src;
|
|
|
- }else{
|
|
|
|
|
|
|
+ } else {
|
|
|
data.videos = file_src;
|
|
data.videos = file_src;
|
|
|
}
|
|
}
|
|
|
recordVideos = file_src;
|
|
recordVideos = file_src;
|
|
@@ -218,48 +218,48 @@ function checkUpdate(id) {
|
|
|
$('#addModal').modal('show');
|
|
$('#addModal').modal('show');
|
|
|
$("#type").val(redata.type);
|
|
$("#type").val(redata.type);
|
|
|
$("#carinfo").val(redata.car_info);
|
|
$("#carinfo").val(redata.car_info);
|
|
|
- if(redata.arrive_time != null){
|
|
|
|
|
|
|
+ if (redata.arrive_time != null) {
|
|
|
var time = moment(redata.arrive_time).format("YYYY-MM-DD HH:mm:ss");
|
|
var time = moment(redata.arrive_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
$("#arrive_time").val(time);
|
|
$("#arrive_time").val(time);
|
|
|
}
|
|
}
|
|
|
- if(redata.arrive_time != null){
|
|
|
|
|
- time = moment(redata.received_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
- $("#received_time").val(time);
|
|
|
|
|
- }
|
|
|
|
|
- if(redata.start_time != null){
|
|
|
|
|
- time = moment(redata.start_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
- $("#startTime").val(time);
|
|
|
|
|
- }
|
|
|
|
|
- if(redata.back_time != null){
|
|
|
|
|
- time = moment(redata.back_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
- $("#back_time").val(time);
|
|
|
|
|
- }
|
|
|
|
|
- if(redata.backfield_time != null){
|
|
|
|
|
- time = moment(redata.backfield_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
- $("#backfield_time").val(time);
|
|
|
|
|
- }
|
|
|
|
|
- if(redata.delivery_time != null){
|
|
|
|
|
- time = moment(redata.delivery_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
- $("#delivery_time").val(time);
|
|
|
|
|
- }
|
|
|
|
|
- if(redata.accept_time != null){
|
|
|
|
|
- time = moment(redata.accept_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
- $("#accept_time").val(time);
|
|
|
|
|
- }
|
|
|
|
|
- if(redata.rescue_time != null){
|
|
|
|
|
- time = moment(redata.rescue_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
- $("#rescue_time").val(time);
|
|
|
|
|
- }
|
|
|
|
|
- if(redata.relief_time != null){
|
|
|
|
|
- time = moment(redata.relief_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
- $("#relief_time").val(time);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (redata.arrive_time != null) {
|
|
|
|
|
+ time = moment(redata.received_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
+ $("#received_time").val(time);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (redata.start_time != null) {
|
|
|
|
|
+ time = moment(redata.start_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
+ $("#startTime").val(time);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (redata.back_time != null) {
|
|
|
|
|
+ time = moment(redata.back_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
+ $("#back_time").val(time);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (redata.backfield_time != null) {
|
|
|
|
|
+ time = moment(redata.backfield_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
+ $("#backfield_time").val(time);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (redata.delivery_time != null) {
|
|
|
|
|
+ time = moment(redata.delivery_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
+ $("#delivery_time").val(time);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (redata.accept_time != null) {
|
|
|
|
|
+ time = moment(redata.accept_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
+ $("#accept_time").val(time);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (redata.rescue_time != null) {
|
|
|
|
|
+ time = moment(redata.rescue_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
+ $("#rescue_time").val(time);
|
|
|
|
|
+ }
|
|
|
|
|
+ if (redata.relief_time != null) {
|
|
|
|
|
+ time = moment(redata.relief_time).format("YYYY-MM-DD HH:mm:ss");
|
|
|
|
|
+ $("#relief_time").val(time);
|
|
|
|
|
+ }
|
|
|
$("#carUserinfo").val(redata.car_user_info);
|
|
$("#carUserinfo").val(redata.car_user_info);
|
|
|
$("#dept").val(redata.dept);
|
|
$("#dept").val(redata.dept);
|
|
|
var userids = redata.users.split(",");
|
|
var userids = redata.users.split(",");
|
|
|
setRecordUserID(userids);
|
|
setRecordUserID(userids);
|
|
|
$("#carUserSatisfaction").val(redata.car_user_satisfaction);
|
|
$("#carUserSatisfaction").val(redata.car_user_satisfaction);
|
|
|
- // var userids = redata.users.split(",");
|
|
|
|
|
|
|
+ // var userids = redata.users.split(",");
|
|
|
// setTimeout(function() {
|
|
// setTimeout(function() {
|
|
|
// for (var i in userids) {
|
|
// for (var i in userids) {
|
|
|
// $('span[data-id="' + userids[i] + '"] input').click();
|
|
// $('span[data-id="' + userids[i] + '"] input').click();
|
|
@@ -354,7 +354,7 @@ function setRecordId(id, videos) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
-function removeVideo(id, videos, field ,index) {
|
|
|
|
|
|
|
+function removeVideo(id, videos, field, index) {
|
|
|
|
|
|
|
|
|
|
|
|
|
var p = "";
|
|
var p = "";
|
|
@@ -362,7 +362,7 @@ function removeVideo(id, videos, field ,index) {
|
|
|
var recordId = id;
|
|
var recordId = id;
|
|
|
var vvs = recordVideos.split(",");
|
|
var vvs = recordVideos.split(",");
|
|
|
for (var i = 0; i < vvs.length; i++) {
|
|
for (var i = 0; i < vvs.length; i++) {
|
|
|
- console.log(vvs)
|
|
|
|
|
|
|
+ if (vvs[i] == undefined || vvs[i] == "undefined") { continue; }
|
|
|
if (vvs[i].length > 0 && i != index) {
|
|
if (vvs[i].length > 0 && i != index) {
|
|
|
p += vvs[i] + ",";
|
|
p += vvs[i] + ",";
|
|
|
}
|
|
}
|
|
@@ -371,11 +371,11 @@ function removeVideo(id, videos, field ,index) {
|
|
|
var data = {
|
|
var data = {
|
|
|
"id": recordId
|
|
"id": recordId
|
|
|
};
|
|
};
|
|
|
- if(field == videos){
|
|
|
|
|
|
|
+ if (field == "videos") {
|
|
|
data.videos = p;
|
|
data.videos = p;
|
|
|
- }else{
|
|
|
|
|
- data.pics = p;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ data.pics = p;
|
|
|
|
|
+ }
|
|
|
post_common_service('q/record/update', data, function(redata) {
|
|
post_common_service('q/record/update', data, function(redata) {
|
|
|
queryTask();
|
|
queryTask();
|
|
|
});
|
|
});
|