projectitem.js
2.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
define(['jquery', 'bootstrap', 'frontend', 'form', 'template', 'swiper', 'layer'], function($, undefined, Frontend,
Form, Template, Swiper, Layer) {
var Controller = {
index: function() {
// 项目延期
$("#subject_delay").click(function () {
var item_id = $(this).data('id');
var get_url = "/index/program_list/subject_delay";
layer.prompt({
formType: 2,
title: '项目延期申请',
placeholder:'延期申请',
area: ['600px', '350px']
}, function(value, index, elem){
Fast.api.ajax({url:get_url,data:{item_id:item_id , delay_memo:value}},function (success) {
layer.msg("申请成功",{icon: 1 , time:1000} , function () {
window.location.href = success.url;
}); return false;
},function (error) {
layer.msg(error,{icon: 2})
})
layer.close(index);
});
})
// 项目终止申请
$("#subject_ended").click(function () {
var item_id = $(this).data('id');
var get_url = "/index/programList/subject_ended";
layer.prompt({
formType: 2,
title: '项目终止申请',
placeholder:'终止申请',
area: ['600px', '350px']
}, function(value, index, elem){
Fast.api.ajax({url:get_url,data:{item_id:item_id , end_memo:value}},function (success) {
layer.msg("申请成功",{icon: 1, time:1000} , function () {
window.location.href = success.url;
}); return false;
},function (error) {
layer.msg(error,{icon: 2})
})
layer.close(index);
});
})
$("#member_declare").click(function(){
layer.open({
type: 1,
title:['审核成员','font-size:1rem;'],
area:['50rem','20rem'],
scrollbar:false,
content: $('#modal')
});
});
$(document).on('click','.verify_list',function() {
var stage = $(this).data('stage'),
id = $(this).data('id');
Fast.api.open('/index/projectitem/verify_list?review_stage='+stage+'®ister_id=' + id,'审核信息列表',{area:["90%","90%"]});
});
},
}
return Controller;
});