| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- $(".pass").click(function () {
- var id = this.id;
- var remain = $("#remain").text();
- var quota = $("#quota").text();
- remain = parseInt(remain, 10)
- if (isNaN(remain)) remain = 0
- quota = parseInt(quota, 10)
- if (isNaN(quota)) quota = 0
- if (remain <= 0 && quota != 0) {
- layer.confirm('当前活动名额已满,是否继续通过报名人员?', function (index) {
- $.ajax({
- url: pagePath + "/government/activity/updateReviewState",
- type: "post",
- data: {
- 'id': id,
- 'state': '1 ',
- 'message': ''
- },
- dataType: "json",
- success: function (result) {
- if (result.success) {
- smileMessage(result.message);
- setTime();
- } else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- });
- })
- } else {
- layer.confirm('确认通过吗?', function (index) {
- $.ajax({
- url: pagePath + "/government/activity/updateReviewState",
- type: "post",
- data: {
- 'id': id,
- 'state': '1 ',
- 'message': ''
- },
- dataType: "json",
- success: function (result) {
- if (result.success) {
- smileMessage(result.message);
- setTime();
- } else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- });
- })
- }
- })
- $(".reject").click(function () {
- var id = this.id;
- layer_show("审核驳回", pagePath + '/government/activity/reject/' + id, 800, 600);
- })
- $(".passBatch").click(function () {
- var ids = '';
- $("input:checkbox[class='checkbox']:checked").each(function (i) {
- var val = $(this).val();
- ids += val + ',';
- });
- ids = ids.substr(0,ids.length-1)
- if (ids.length <= 0) {
- errorMessage("请选择数据!");
- return;
- }
- var remain = $("#remain").html();
- var quota = $("#quota").html();
- remain = parseInt(remain, 10)
- if (isNaN(remain)) remain = 0
- quota = parseInt(quota, 10)
- if (isNaN(quota)) quota = 0
- var idlist = ids.split(",")
- if (remain < idlist.length && quota != 0) {
- layer.confirm('当前活动名额已满,是否继续通过报名人员?', function (index) {
- $.ajax({
- url: pagePath + "/government/activity/updateReviewStateBatch",
- type: "post",
- data: {
- 'ids': ids,
- 'state': '1 ',
- 'message': ''
- },
- dataType: "json",
- success: function (result) {
- if (result.success) {
- smileMessage(result.message);
- setTime();
- } else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- });
- })
- } else {
- layer.confirm('确认通过吗?', function (index) {
- $.ajax({
- url: pagePath + "/government/activity/updateReviewStateBatch",
- type: "post",
- data: {
- 'ids': ids,
- 'state': '1 ',
- 'message': ''
- },
- dataType: "json",
- success: function (result) {
- if (result.success) {
- smileMessage(result.message);
- setTime();
- } else {
- errorMessage(result.message);
- }
- },
- error: function () {
- errorMessage('系统错误!');
- }
- })
- });
- }
- })
- $(".rejectBatch").click(function () {
- var ids = '';
- $("input:checkbox[type='checkbox']:checked").each(function () {
- if ($(this).val() !== "on"){
- var val = $(this).val();
- ids += val + ',';
- }
- });
- if (ids.length <= 0) {
- errorMessage("请选择数据!");
- return;
- }
- console.log(ids);
- layer_show("审核驳回", pagePath + '/government/activity/reject/' + ids, 800, 600);
- });
|