+
diff --git a/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterList.html b/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterList.html
index 28a6af7..98816af 100644
--- a/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterList.html
+++ b/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterList.html
@@ -49,7 +49,7 @@
diff --git a/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterList.js b/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterList.js
index abaa121..2d00fee 100644
--- a/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterList.js
+++ b/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterList.js
@@ -168,30 +168,120 @@ function checkView(proId) {
var fnc = myIframe.setData(proId); //aaa()为子页面的方法
},
});
- // $.ajax({
- // type: 'get',
- // contentType: "application/x-www-form-urlencoded",
- // url: ctxPath + '/personComprehensive/getWorkerRosterProList'+proId,
- // dataType: 'json',
- // success: function (data) {
- //
- // }
- // })
}
-function buttonUpdate(idNumber, permission, pers) {
+function buttonUpdate(proId, permission, pers) {
if (permission != "") {
if ($.inArray(permission, pers) < 0) {
return "";
}
}
- var btn = $("
");
+ var btn = $("
");
return btn.prop("outerHTML");
}
/**
* 导出
* */
-function updateView(idNumber) {
+function updateView(proIds) {
+ var index = layer.msg('正在导出,请稍等...', {
+ icon: 16,
+ time: 60000,
+ shade: [0.1, '#fff']
+ });
+ // 获取查询条件
+ let params = {
+ proId: proIds,
+ };
+
+ let token = localStorage.getItem("smz-token");
+ let url = ctxPath + "/personComprehensive/exportWorkerRoster?param=" + encodeURIComponent(JSON.stringify(params));
+ let xhr = new XMLHttpRequest();
+ xhr.open("GET", url, true);
+ xhr.responseType = "blob"; // 转换流
+ xhr.setRequestHeader("Authorization", token);
+
+ xhr.onload = function () {
+ layer.close(index);
+ if (this.status === 200) {
+ let blob = this.response;
+ let a = document.createElement("a");
+ let url = window.URL.createObjectURL(blob);
+ a.href = url;
+ a.download = "农民工花名册.xlsx";
+ a.click();
+ window.URL.revokeObjectURL(url);
+ layer.msg('导出成功');
+ } else if (this.status === 401) {
+ localStorage.removeItem("smz-token");
+ layer.msg('用户登录过期,请重新登录', {icon: 5, time: 2000}, function () {
+ location.href = ctxPath + '/login.html';
+ });
+ } else {
+ layer.msg('导出失败,请稍后重试', {icon: 2});
+ }
+ };
+
+ xhr.onerror = function() {
+ layer.close(index);
+ layer.msg('导出失败,请稍后重试', {icon: 2});
+ };
+
+ xhr.send();
+}
+
+
+function checkup(){
+ var index = layer.msg('正在导出,请稍等...', {
+ icon: 16,
+ time: 60000,
+ shade: [0.1, '#fff']
+ });
+
+ var proGeneralName = $("#proGeneralName").val();
+ var proId = $('#proId').val();
+ var proStatusId = $("#proStatusId").val();
+
+ // 获取查询条件
+ let params = {
+ proGeneralName: proGeneralName,
+ proId:proId,
+ proStatusId:proStatusId
+ };
+
+ let token = localStorage.getItem("smz-token");
+ let url = ctxPath + "/personComprehensive/exportWorkerRosterList?param=" + encodeURIComponent(JSON.stringify(params));
+ let xhr = new XMLHttpRequest();
+ xhr.open("GET", url, true);
+ xhr.responseType = "blob"; // 转换流
+ xhr.setRequestHeader("Authorization", token);
+
+ xhr.onload = function () {
+ layer.close(index);
+ if (this.status === 200) {
+ let blob = this.response;
+ let a = document.createElement("a");
+ let url = window.URL.createObjectURL(blob);
+ a.href = url;
+ a.download = "农民工花名册.xlsx";
+ a.click();
+ window.URL.revokeObjectURL(url);
+ layer.msg('导出成功');
+ } else if (this.status === 401) {
+ localStorage.removeItem("smz-token");
+ layer.msg('用户登录过期,请重新登录', {icon: 5, time: 2000}, function () {
+ location.href = ctxPath + '/login.html';
+ });
+ } else {
+ layer.msg('导出失败,请稍后重试', {icon: 2});
+ }
+ };
+
+ xhr.onerror = function() {
+ layer.close(index);
+ layer.msg('导出失败,请稍后重试', {icon: 2});
+ };
+
+ xhr.send();
}
\ No newline at end of file
diff --git a/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterProList.html b/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterProList.html
index 5ceae85..5dc63d9 100644
--- a/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterProList.html
+++ b/modules/bmw/src/main/resources/static/pages/work/Person/AttendanceMachine/workerRosterProList.html
@@ -5,9 +5,14 @@
农民工花名册-工程
-
+
+
-
+