diff --git a/src/main/resources/static/js/imageUpload/coordinatePhoto/child/coordinatePhotoForm.js b/src/main/resources/static/js/imageUpload/coordinatePhoto/child/coordinatePhotoForm.js
index be69fcb..ce4b838 100644
--- a/src/main/resources/static/js/imageUpload/coordinatePhoto/child/coordinatePhotoForm.js
+++ b/src/main/resources/static/js/imageUpload/coordinatePhoto/child/coordinatePhotoForm.js
@@ -14,6 +14,8 @@ let buildAfterImgList = []; // 恢复后照片
let CODE_1 = 0, CODE_2 = 0, CODE_3 = 0;
+let files1,files2,files3;
+
let proId, proName, majorId, majorName, gxId, gxName;
layui.use(['laydate', 'upload'], function () {
var upload = layui.upload;
@@ -54,6 +56,7 @@ layui.use(['laydate', 'upload'], function () {
CODE_1 = 1;
uploadcom1.config.elem.next()[0].value = '';
let files = obj.pushFile();
+ files1 = obj.pushFile();
obj.preview(function (index, file, result) {
var length = $('#demo1 img').length;
if (length > 8) {
@@ -66,7 +69,7 @@ layui.use(['laydate', 'upload'], function () {
$('#demo1').append(
'
' +
'

' +
- '
' +
+ '
' +
'
'
);
});
@@ -105,6 +108,7 @@ layui.use(['laydate', 'upload'], function () {
CODE_2 = 1;
uploadcom2.config.elem.next()[0].value = '';
let files = obj.pushFile();
+ files2 = obj.pushFile();
obj.preview(function (index, file, result) {
var length = $('#demo2 img').length;
if (length > 49) {
@@ -116,7 +120,7 @@ layui.use(['laydate', 'upload'], function () {
$('#demo2').append(
'' +
'

' +
- '
' +
+ '
' +
'
'
);
});
@@ -155,6 +159,7 @@ layui.use(['laydate', 'upload'], function () {
CODE_3 = 1;
uploadcom3.config.elem.next()[0].value = '';
let files = obj.pushFile();
+ files3 = obj.pushFile();
obj.preview(function (index, file, result) {
var length = $('#demo3 img').length;
if (length > 8) {
@@ -166,7 +171,7 @@ layui.use(['laydate', 'upload'], function () {
$('#demo3').append(
'' +
'

' +
- '
' +
+ '
' +
'
'
);
});
@@ -190,7 +195,18 @@ layui.use(['laydate', 'upload'], function () {
});
- window.removeImage = function (uniqueId) {
+ window.removeImage1 = function (uniqueId,index) {
+ delete files1[index];//删除指定图片
+ $('#img-' + uniqueId).remove();
+ };
+
+ window.removeImage2 = function (uniqueId,index) {
+ delete files2[index];//删除指定图片
+ $('#img-' + uniqueId).remove();
+ };
+
+ window.removeImage3 = function (uniqueId,index) {
+ delete files3[index];//删除指定图片
$('#img-' + uniqueId).remove();
};
laydate = layui.laydate;
diff --git a/src/main/resources/static/js/imageUpload/coordinatePhoto/coordinatePhotoList.js b/src/main/resources/static/js/imageUpload/coordinatePhoto/coordinatePhotoList.js
index f78c59e..6258a5e 100644
--- a/src/main/resources/static/js/imageUpload/coordinatePhoto/coordinatePhotoList.js
+++ b/src/main/resources/static/js/imageUpload/coordinatePhoto/coordinatePhotoList.js
@@ -287,7 +287,7 @@ function exportExcel() {
gxId: $('#processId').val(),
};
let loadingMsg = layer.msg("数据导出中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
- let url = dataUrl + "/imgUpload/safetyViolation/downloadExcel?token=" + tokens + "&encryptedData=" + encodeURIComponent(encryptCBC(JSON.stringify(obj)));
+ let url = dataUrl + "/coordinatePhoto/coordinatePhotoExport?token=" + tokens + "&encryptedData=" + encodeURIComponent(encryptCBC(JSON.stringify(obj)));
let xhr = new XMLHttpRequest();
xhr.open("post", url, true);
xhr.responseType = "blob"; // 转换流
@@ -299,7 +299,7 @@ function exportExcel() {
var a = document.createElement("a");
var url = window.URL.createObjectURL(blob);
a.href = url;
- a.download = "安全违章列表" + ".xlsx"; // 文件名
+ a.download = "协调照片(建设用地)列表" + ".xlsx"; // 文件名
} else {
layer.msg("数据导出发生异常,请稍后重试", {icon: 16, scrollbar: false, time: 2000});
}
diff --git a/src/main/resources/static/js/imageUpload/importantMatter/child/importantMatterForm.js b/src/main/resources/static/js/imageUpload/importantMatter/child/importantMatterForm.js
index 850a4c5..7c737de 100644
--- a/src/main/resources/static/js/imageUpload/importantMatter/child/importantMatterForm.js
+++ b/src/main/resources/static/js/imageUpload/importantMatter/child/importantMatterForm.js
@@ -11,6 +11,8 @@ let processList;
let vrImgList = []; // 违章照片
let CODE_1 = 0;
+let files1;
+
let proId, proName, majorId, majorName, gxId, gxName;
layui.use(['laydate', 'upload'], function () {
var upload = layui.upload;
@@ -39,6 +41,7 @@ layui.use(['laydate', 'upload'], function () {
CODE_1 = 1;
uploadcom1.config.elem.next()[0].value = '';
let files = obj.pushFile();
+ files1 = obj.pushFile();
obj.preview(function (index, file, result) {
var length = $('#demo1 img').length;
if (length > 8) {
@@ -51,7 +54,7 @@ layui.use(['laydate', 'upload'], function () {
$('#demo1').append(
'' +
'

' +
- '
' +
+ '
' +
'
'
);
});
@@ -75,7 +78,8 @@ layui.use(['laydate', 'upload'], function () {
}
});
- window.removeImage = function (uniqueId) {
+ window.removeImage1 = function (uniqueId) {
+ delete files1[index];//删除指定图片
$('#img-' + uniqueId).remove();
};
diff --git a/src/main/resources/static/js/imageUpload/qualityInspection/child/qualityInspectionForm.js b/src/main/resources/static/js/imageUpload/qualityInspection/child/qualityInspectionForm.js
index 0097ed1..6984011 100644
--- a/src/main/resources/static/js/imageUpload/qualityInspection/child/qualityInspectionForm.js
+++ b/src/main/resources/static/js/imageUpload/qualityInspection/child/qualityInspectionForm.js
@@ -14,6 +14,9 @@ let correctionImgList = []; // 整改照片
const deleteFileList = [];// 删除照片
let CODE_1 = 0, CODE_2 = 0;
+// 自定义文件队列
+let files1,files2;
+
let proId, proName, majorId, majorName, gxId, gxName;
layui.use(['laydate', 'upload'], function () {
var upload = layui.upload;
@@ -48,6 +51,7 @@ layui.use(['laydate', 'upload'], function () {
CODE_1 = 1;
uploadcom1.config.elem.next()[0].value = '';
let files = obj.pushFile();
+ files1 = obj.pushFile();
obj.preview(function (index, file, result) {
var length = $('#demo1 img').length;
if (length > 8) {
@@ -60,7 +64,7 @@ layui.use(['laydate', 'upload'], function () {
$('#demo1').append(
'' +
'

' +
- '
' +
+ '
' +
'
'
);
});
@@ -96,6 +100,7 @@ layui.use(['laydate', 'upload'], function () {
CODE_2 = 1;
uploadcom2.config.elem.next()[0].value = '';
let files = obj.pushFile();
+ files2 = obj.pushFile();
obj.preview(function (index, file, result) {
var length = $('#demo2 img').length;
if (length > 8) {
@@ -107,7 +112,7 @@ layui.use(['laydate', 'upload'], function () {
$('#demo2').append(
'' +
'

' +
- '
' +
+ '
' +
'
'
);
});
@@ -127,22 +132,62 @@ layui.use(['laydate', 'upload'], function () {
}
});
- window.removeImage = function (uniqueId) {
+ window.removeImage1 = function (uniqueId,index) {
+ delete files1[index];//删除指定图片
+ $('#img-' + uniqueId).remove();
+ };
+
+ window.removeImage2 = function (uniqueId,index) {
+ delete files2[index];//删除指定图片
$('#img-' + uniqueId).remove();
};
laydate = layui.laydate;
laydate.render({
elem: '#vioDate',
+ done: function(value, date) {
+ validateDates();
+ }
});
laydate.render({
elem: '#rectDate',
+ done: function(value, date) {
+ validateDates();
+ }
});
laydate.render({
elem: '#rectTime',
+ done: function(value, date) {
+ validateDates();
+ }
});
});
+// 校验日期逻辑
+function validateDates() {
+ var vioDate = document.getElementById('vioDate').value;
+ var rectDate = document.getElementById('rectDate').value;
+ var rectTime = document.getElementById('rectTime').value;
+
+ if (vioDate && rectDate) {
+ if (new Date(rectDate) < new Date(vioDate)) {
+ document.getElementById('rectDate').value = ''; // 清空整改期限
+ layer.msg('整改期限必须大于等于检查时间', {icon: 5});
+ return false;
+ }
+ }
+
+ if (rectDate && rectTime) {
+ if (new Date(rectTime) < new Date(rectDate)) {
+ document.getElementById('rectTime').value = ''; // 清空整改时间
+ layer.msg('整改时间必须大于等于整改期限', {icon: 5});
+ return false;
+ }
+ }
+
+ return true;
+}
+
function setParams(params) {
idParam = JSON.parse(params).id;
details = JSON.parse(params).details;
@@ -391,10 +436,26 @@ function saveData(data) {
data.field.dataSource = 1;
data.field.fileList = [...vrImgList, ...correctionImgList];
+ let rectTime = $("#rectTime").val()
if (correctionImgList.length > 0) {
+ if(rectTime == ""){
+ layer.msg("请填写整改时间", {icon: 2, time: 2000});
+ return "";
+ }
data.field.rectStatus = 1;
} else {
- data.field.rectStatus = 0;
+ //获取当前日期进行判断
+ let currentDate = getCurrentDate();
+ if(rectTime == ""){
+ data.field.rectStatus = 0;
+ }else{
+ // 判断整改时间是否早于当前日期
+ if (new Date(rectTime) < new Date(currentDate)) {
+ data.field.rectStatus = 0;
+ }else{
+ data.field.rectStatus = 2;
+ }
+ }
}
data.field.delFileList = deleteFileList;
diff --git a/src/main/resources/static/js/imageUpload/qualityInspection/qualityInspectionList.js b/src/main/resources/static/js/imageUpload/qualityInspection/qualityInspectionList.js
index 4f1e6cc..98926a4 100644
--- a/src/main/resources/static/js/imageUpload/qualityInspection/qualityInspectionList.js
+++ b/src/main/resources/static/js/imageUpload/qualityInspection/qualityInspectionList.js
@@ -8,7 +8,6 @@ layui.use(['form', 'layer', 'table', 'laydate'], function () {
layui.form.render();
getProSelected();
getProcessIdSelected();
- getStateIdSelected();
pages(1, 10, 1);
})
@@ -136,7 +135,7 @@ function getReqParams(page, limit, type) {
$('#keyWord').val('')
$('#proId').val('')
$('#processId').val('')
- $('#stateId').val('')
+ $('#rectStatus').val('')
layui.form.render();
}
obj = {
@@ -145,7 +144,7 @@ function getReqParams(page, limit, type) {
keyWord: $('#keyWord').val(),
proId: $('#proId').val(),
gxId: $('#processId').val(),
- proStatus: $('#stateId').val()
+ rectStatus: $('#rectStatus').val()
};
console.log(obj)
obj={
@@ -266,26 +265,6 @@ function getProcessIdSelected() {
});
}
-/**
- * 获取状态
- */
-function getStateIdSelected() {
- let url = dataUrl + '/sys/select/getDictSelectByType';
- let data={
- encryptedData:encryptCBC(JSON.stringify({"code":"pro_status"}))
- }
- ajaxRequest(url, "GET", data, true, function () {
- }, function (result) {
- if (result.code === 200) {
- setSelectValue(result.data, 'stateId','请选择状态类型');
- } else {
- layer.alert(result.msg, {icon: 2})
- }
- }, function (xhr) {
- error(xhr)
- });
-}
-
/*下拉选表单赋值*/
function setSelectValue(list, selectName, placeholder) {
let html = '';
@@ -319,7 +298,7 @@ function exportExcel() {
keyWord: $('#keyWord').val(),
proId: $('#proId').val(),
gxId: $('#processId').val(),
- proStatus: $('#stateId').val()
+ rectStatus: $('#rectStatus').val()
};
let loadingMsg = layer.msg("数据导出中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
let url = dataUrl + "/imgUpload/qualityInspection/downloadExcel?token=" + tokens + "&encryptedData=" + encodeURIComponent(encryptCBC(JSON.stringify(obj)));
diff --git a/src/main/resources/static/js/imageUpload/safetyMeasure/child/safetyMeasureForm.js b/src/main/resources/static/js/imageUpload/safetyMeasure/child/safetyMeasureForm.js
index dfbca68..4738d19 100644
--- a/src/main/resources/static/js/imageUpload/safetyMeasure/child/safetyMeasureForm.js
+++ b/src/main/resources/static/js/imageUpload/safetyMeasure/child/safetyMeasureForm.js
@@ -11,6 +11,8 @@ let processList;
let vrImgList = []; // 违章照片
let CODE_1 = 0;
+let files1;
+
let proId, proName, majorId, majorName, gxId, gxName;
layui.use(['laydate', 'upload'], function () {
var upload = layui.upload;
@@ -39,6 +41,7 @@ layui.use(['laydate', 'upload'], function () {
CODE_1 = 1;
uploadcom1.config.elem.next()[0].value = '';
let files = obj.pushFile();
+ files1 = obj.pushFile();
obj.preview(function (index, file, result) {
var length = $('#demo1 img').length;
if (length > 8) {
@@ -51,7 +54,7 @@ layui.use(['laydate', 'upload'], function () {
$('#demo1').append(
'' +
'

' +
- '
' +
+ '
' +
'
'
);
});
@@ -75,7 +78,8 @@ layui.use(['laydate', 'upload'], function () {
}
});
- window.removeImage = function (uniqueId) {
+ window.removeImage = function (uniqueId, index) {
+ delete files1[index];//删除指定图片
$('#img-' + uniqueId).remove();
};
diff --git a/src/main/resources/static/js/imageUpload/safetyViolations/child/safetyViolationsForm.js b/src/main/resources/static/js/imageUpload/safetyViolations/child/safetyViolationsForm.js
index 588749a..cfe7f71 100644
--- a/src/main/resources/static/js/imageUpload/safetyViolations/child/safetyViolationsForm.js
+++ b/src/main/resources/static/js/imageUpload/safetyViolations/child/safetyViolationsForm.js
@@ -14,6 +14,8 @@ let correctionImgList = []; // 整改照片
const deleteFileList = [];// 删除照片
let CODE_1 = 0, CODE_2 = 0;
+let files1,files2;
+
let proId, proName, majorId, majorName, gxId, gxName;
layui.use(['laydate', 'upload'], function () {
var upload = layui.upload;
@@ -48,6 +50,7 @@ layui.use(['laydate', 'upload'], function () {
CODE_1 = 1;
uploadcom1.config.elem.next()[0].value = '';
let files = obj.pushFile();
+ files1 = obj.pushFile();
obj.preview(function (index, file, result) {
var length = $('#demo1 img').length;
if (length > 8) {
@@ -60,7 +63,7 @@ layui.use(['laydate', 'upload'], function () {
$('#demo1').append(
'' +
'

' +
- '
' +
+ '
' +
'
'
);
});
@@ -99,6 +102,7 @@ layui.use(['laydate', 'upload'], function () {
CODE_2 = 1;
uploadcom2.config.elem.next()[0].value = '';
let files = obj.pushFile();
+ files2 = obj.pushFile();
obj.preview(function (index, file, result) {
var length = $('#demo2 img').length;
if (length > 8) {
@@ -110,7 +114,7 @@ layui.use(['laydate', 'upload'], function () {
$('#demo2').append(
'' +
'

' +
- '
' +
+ '
' +
'
'
);
});
@@ -134,7 +138,13 @@ layui.use(['laydate', 'upload'], function () {
});
- window.removeImage = function (uniqueId) {
+ window.removeImage1 = function (uniqueId,index) {
+ delete files1[index];//删除指定图片
+ $('#img-' + uniqueId).remove();
+ };
+
+ window.removeImage2 = function (uniqueId,index) {
+ delete files2[index];//删除指定图片
$('#img-' + uniqueId).remove();
};
@@ -142,15 +152,48 @@ layui.use(['laydate', 'upload'], function () {
laydate.render({
elem: '#vioDate',
+ done: function(value, date) {
+ validateDates();
+ }
});
laydate.render({
elem: '#rectDate',
+ done: function(value, date) {
+ validateDates();
+ }
});
laydate.render({
elem: '#rectTime',
+ done: function(value, date) {
+ validateDates();
+ }
});
});
+// 校验日期逻辑
+function validateDates() {
+ var vioDate = document.getElementById('vioDate').value;
+ var rectDate = document.getElementById('rectDate').value;
+ var rectTime = document.getElementById('rectTime').value;
+
+ if (vioDate && rectDate) {
+ if (new Date(rectDate) < new Date(vioDate)) {
+ document.getElementById('rectDate').value = ''; // 清空整改期限
+ layer.msg('整改期限必须大于等于检查时间', {icon: 5});
+ return false;
+ }
+ }
+
+ if (rectDate && rectTime) {
+ if (new Date(rectTime) < new Date(rectDate)) {
+ document.getElementById('rectTime').value = ''; // 清空整改时间
+ layer.msg('整改时间必须大于等于整改期限', {icon: 5});
+ return false;
+ }
+ }
+
+ return true;
+}
function setParams(params) {
idParam = JSON.parse(params).id;
@@ -398,10 +441,26 @@ function saveData(data) {
data.field.dataSource = 1;
data.field.fileList = [...vrImgList, ...correctionImgList];
+ let rectTime = $("#rectTime").val()
if (correctionImgList.length > 0) {
+ if(rectTime == ""){
+ layer.msg("请填写整改时间", {icon: 2, time: 2000});
+ return "";
+ }
data.field.rectStatus = 1;
} else {
- data.field.rectStatus = 0;
+ //获取当前日期进行判断
+ let currentDate = getCurrentDate();
+ if(rectTime == ""){
+ data.field.rectStatus = 0;
+ }else{
+ // 判断整改时间是否早于当前日期
+ if (new Date(rectTime) < new Date(currentDate)) {
+ data.field.rectStatus = 0;
+ }else{
+ data.field.rectStatus = 2;
+ }
+ }
}
data.field.delFileList = deleteFileList;
diff --git a/src/main/resources/static/js/imageUpload/safetyViolations/safetyViolationsList.js b/src/main/resources/static/js/imageUpload/safetyViolations/safetyViolationsList.js
index b377827..e1ec0ce 100644
--- a/src/main/resources/static/js/imageUpload/safetyViolations/safetyViolationsList.js
+++ b/src/main/resources/static/js/imageUpload/safetyViolations/safetyViolationsList.js
@@ -8,7 +8,6 @@ layui.use(['form', 'layer', 'table', 'laydate'], function () {
layui.form.render();
getProSelected();
getProcessIdSelected();
- getStateIdSelected();
pages(1, 10, 1);
})
@@ -135,7 +134,7 @@ function getReqParams(page, limit, type) {
$('#keyWord').val('')
$('#proId').val('')
$('#processId').val('')
- $('#stateId').val('')
+ $('#rectStatus').val('')
layui.form.render();
}
obj = {
@@ -144,7 +143,7 @@ function getReqParams(page, limit, type) {
keyWord: $('#keyWord').val(),
proId: $('#proId').val(),
gxId: $('#processId').val(),
- proStatus: $('#stateId').val()
+ rectStatus: $('#rectStatus').val()
};
console.log(obj)
@@ -266,26 +265,6 @@ function getProcessIdSelected() {
});
}
-/**
- * 获取状态
- */
-function getStateIdSelected() {
- let url = dataUrl + '/sys/select/getDictSelectByType';
- let data={
- encryptedData:encryptCBC(JSON.stringify({"code":"pro_status"}))
- }
- ajaxRequest(url, "GET", data, true, function () {
- }, function (result) {
- if (result.code === 200) {
- setSelectValue(result.data, 'stateId','请选择状态类型');
- } else {
- layer.alert(result.msg, {icon: 2})
- }
- }, function (xhr) {
- error(xhr)
- });
-}
-
/*下拉选表单赋值*/
function setSelectValue(list, selectName, placeholder) {
let html = '';
@@ -319,7 +298,7 @@ function exportExcel() {
keyWord: $('#keyWord').val(),
proId: $('#proId').val(),
gxId: $('#processId').val(),
- proStatus: $('#stateId').val()
+ rectStatus: $('#rectStatus').val()
};
let loadingMsg = layer.msg("数据导出中,请稍候...", {icon: 16, scrollbar: false, time: 0,});
let url = dataUrl + "/imgUpload/safetyViolation/downloadExcel?token=" + tokens + "&encryptedData=" + encodeURIComponent(encryptCBC(JSON.stringify(obj)));
diff --git a/src/main/resources/static/js/select.js b/src/main/resources/static/js/select.js
index 6553186..bf9e3bd 100644
--- a/src/main/resources/static/js/select.js
+++ b/src/main/resources/static/js/select.js
@@ -287,4 +287,13 @@ function getGxsSelect(majorId) {
error(xhr)
});
return data;
+}
+
+// 获取当前日期并格式化为 yyyy-MM-dd
+function getCurrentDate() {
+ var today = new Date();
+ var year = today.getFullYear();
+ var month = String(today.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要+1
+ var day = String(today.getDate()).padStart(2, '0'); // 获取日
+ return `${year}-${month}-${day}`;
}
\ No newline at end of file
diff --git a/src/main/resources/static/pages/imageUpload/qualityInspection/child/qualityInspectionForm.html b/src/main/resources/static/pages/imageUpload/qualityInspection/child/qualityInspectionForm.html
index dbf997e..d68c519 100644
--- a/src/main/resources/static/pages/imageUpload/qualityInspection/child/qualityInspectionForm.html
+++ b/src/main/resources/static/pages/imageUpload/qualityInspection/child/qualityInspectionForm.html
@@ -87,9 +87,9 @@
-
+
-
+
@@ -98,9 +98,9 @@
-
+
-
+
diff --git a/src/main/resources/static/pages/imageUpload/qualityInspection/qualityInspectionList.html b/src/main/resources/static/pages/imageUpload/qualityInspection/qualityInspectionList.html
index 1ec916a..b5857d2 100644
--- a/src/main/resources/static/pages/imageUpload/qualityInspection/qualityInspectionList.html
+++ b/src/main/resources/static/pages/imageUpload/qualityInspection/qualityInspectionList.html
@@ -42,8 +42,11 @@
-
diff --git a/src/main/resources/static/pages/imageUpload/safetyViolations/child/safetyViolationsForm.html b/src/main/resources/static/pages/imageUpload/safetyViolations/child/safetyViolationsForm.html
index 8e218b4..d70ed22 100644
--- a/src/main/resources/static/pages/imageUpload/safetyViolations/child/safetyViolationsForm.html
+++ b/src/main/resources/static/pages/imageUpload/safetyViolations/child/safetyViolationsForm.html
@@ -88,9 +88,9 @@
-
+
-
+
@@ -99,9 +99,9 @@
-
+
-
+
diff --git a/src/main/resources/static/pages/imageUpload/safetyViolations/safetyViolationsList.html b/src/main/resources/static/pages/imageUpload/safetyViolations/safetyViolationsList.html
index 927f318..33991fb 100644
--- a/src/main/resources/static/pages/imageUpload/safetyViolations/safetyViolationsList.html
+++ b/src/main/resources/static/pages/imageUpload/safetyViolations/safetyViolationsList.html
@@ -42,8 +42,11 @@
-
-
+
+
+
+
+