|
|
@@ -8,7 +8,7 @@
|
|
8
|
8
|
<link href="../css/layer/need/layer.css" />
|
|
9
|
9
|
<link rel="stylesheet" href="../css/init.css" />
|
|
10
|
10
|
<title>监察</title>
|
|
11
|
|
- <style>
|
|
|
11
|
+ <style>
|
|
12
|
12
|
.input {
|
|
13
|
13
|
background-color: #FFF;
|
|
14
|
14
|
background-image: none;
|
|
|
@@ -22,7 +22,8 @@
|
|
22
|
22
|
padding: 0!important;
|
|
23
|
23
|
border: none!important;
|
|
24
|
24
|
}
|
|
25
|
|
- #message{
|
|
|
25
|
+
|
|
|
26
|
+ #message {
|
|
26
|
27
|
display: none;
|
|
27
|
28
|
}
|
|
28
|
29
|
</style>
|
|
|
@@ -40,7 +41,7 @@
|
|
40
|
41
|
<td colspan="7">
|
|
41
|
42
|
<!--<span class="fjnr"></span>-->
|
|
42
|
43
|
<div class="fileBox">
|
|
43
|
|
- <!--<span class="files">文件1<i class="fa fa-remove"></i></span>-->
|
|
|
44
|
+ <!--<span class="files">文件1<i class="fa fa-remove"></i></span>-->
|
|
44
|
45
|
</div>
|
|
45
|
46
|
<input class="input" type="file" name="upFile" id="upFile" multiple="multiple" style="display: none;">
|
|
46
|
47
|
<input class="input" type="button" value="上传" id="scwj" />
|
|
|
@@ -53,10 +54,10 @@
|
|
53
|
54
|
</tr>
|
|
54
|
55
|
</table>
|
|
55
|
56
|
<div id="message" style="margin: 20px 0 0 130px;text-align: left;">
|
|
56
|
|
- 是否发送短信
|
|
57
|
|
- <input type="radio" name="message" id="" value="0" checked/>否
|
|
58
|
|
- <input type="radio" name="message" id="" value="1" />是
|
|
59
|
|
- </div>
|
|
|
57
|
+ 是否发送短信
|
|
|
58
|
+ <input type="radio" name="message" id="" value="0" />否
|
|
|
59
|
+ <input type="radio" name="message" id="" value="1" />是
|
|
|
60
|
+ </div>
|
|
60
|
61
|
<div class="btn_box">
|
|
61
|
62
|
<button class="btns DB">保存</button>
|
|
62
|
63
|
<button class="btns JC">保存</button>
|
|
|
@@ -69,17 +70,32 @@
|
|
69
|
70
|
var state = helper.request.queryString("state");
|
|
70
|
71
|
var depId = helper.request.queryString("depId");
|
|
71
|
72
|
$(document).ready(function() {
|
|
|
73
|
+ if(wid) {
|
|
|
74
|
+ $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder', {
|
|
|
75
|
+ workorderid: wid,
|
|
|
76
|
+ "token": $.cookie("token")
|
|
|
77
|
+ }, function(result) {
|
|
|
78
|
+ if(result.state.toLowerCase() == "success") {
|
|
|
79
|
+ var content = result.data;
|
|
|
80
|
+ if(content.data[0].F_DeptIdIsSms == 1) {
|
|
|
81
|
+ $('#message input[value="1"]').attr('checked', true)
|
|
|
82
|
+ } else {
|
|
|
83
|
+ $('#message input[value="0"]').attr('checked', true)
|
|
|
84
|
+ }
|
|
|
85
|
+ }
|
|
|
86
|
+ })
|
|
|
87
|
+ }
|
|
72
|
88
|
if(type == 1) {
|
|
73
|
|
- if (state==1) {
|
|
|
89
|
+ if(state == 1) {
|
|
74
|
90
|
$(".title").text("督办意见");
|
|
75
|
91
|
$(".JC").hide();
|
|
76
|
92
|
$('#message').show();
|
|
77
|
|
- }else{
|
|
|
93
|
+ } else {
|
|
78
|
94
|
$(".title").text("不督办意见");
|
|
79
|
95
|
$(".JC").hide();
|
|
80
|
96
|
$('#message').hide()
|
|
81
|
97
|
}
|
|
82
|
|
-
|
|
|
98
|
+
|
|
83
|
99
|
} else {
|
|
84
|
100
|
$(".title").text("监察意见")
|
|
85
|
101
|
$(".DB").hide();
|
|
|
@@ -90,7 +106,7 @@
|
|
90
|
106
|
} else {
|
|
91
|
107
|
type = 1;
|
|
92
|
108
|
JA();
|
|
93
|
|
- if($('#message input[type="radio"]:checked').val()==1){
|
|
|
109
|
+ if($('#message input[type="radio"]:checked').val() == 1) {
|
|
94
|
110
|
sendMessage();
|
|
95
|
111
|
}
|
|
96
|
112
|
}
|
|
|
@@ -110,21 +126,21 @@
|
|
110
|
126
|
$("#upFile").change(function() {
|
|
111
|
127
|
upload();
|
|
112
|
128
|
})
|
|
113
|
|
-// $("#scfj").click(function() {
|
|
114
|
|
-// $(".fjnr").text("");
|
|
115
|
|
-// $("#scfj").hide();
|
|
116
|
|
-// })
|
|
|
129
|
+ // $("#scfj").click(function() {
|
|
|
130
|
+ // $(".fjnr").text("");
|
|
|
131
|
+ // $("#scfj").hide();
|
|
|
132
|
+ // })
|
|
117
|
133
|
})
|
|
118
|
134
|
//发送短信
|
|
119
|
|
- function sendMessage(){
|
|
120
|
|
- $.post(huayi.config.callcenter_url + 'WorkOrder/SendSms',{
|
|
121
|
|
- workordercode:wid,
|
|
122
|
|
- deptid:depId, //主办单位
|
|
123
|
|
- type:1,
|
|
|
135
|
+ function sendMessage() {
|
|
|
136
|
+ $.post(huayi.config.callcenter_url + 'WorkOrder/SendSms', {
|
|
|
137
|
+ workordercode: wid,
|
|
|
138
|
+ deptid: depId, //主办单位
|
|
|
139
|
+ type: 1,
|
|
124
|
140
|
token: $.cookie("token")
|
|
125
|
|
- },function(result){
|
|
126
|
|
- result=JSON.parse(result);
|
|
127
|
|
- if(result.state.toLowerCase()=='success'){
|
|
|
141
|
+ }, function(result) {
|
|
|
142
|
+ result = JSON.parse(result);
|
|
|
143
|
+ if(result.state.toLowerCase() == 'success') {
|
|
128
|
144
|
layer.msg('发送短信成功')
|
|
129
|
145
|
}
|
|
130
|
146
|
})
|
|
|
@@ -135,8 +151,8 @@
|
|
135
|
151
|
workorderid: wid,
|
|
136
|
152
|
overseeopinion: $("#overseeopinion").val(),
|
|
137
|
153
|
type: type,
|
|
138
|
|
- state:state,
|
|
139
|
|
- files:$("#file").val(),
|
|
|
154
|
+ state: state,
|
|
|
155
|
+ files: $("#file").val(),
|
|
140
|
156
|
"token": $.cookie("token")
|
|
141
|
157
|
}, function(result) {
|
|
142
|
158
|
result = JSON.parse(result);
|
|
|
@@ -146,7 +162,7 @@
|
|
146
|
162
|
parent.layer.close(index); //再执行关闭
|
|
147
|
163
|
parent.$('#orderlist').bootstrapTable('refresh');
|
|
148
|
164
|
parent.layer.msg("操作成功");
|
|
149
|
|
- $('.fileBox').html('');
|
|
|
165
|
+ $('.fileBox').html('');
|
|
150
|
166
|
}
|
|
151
|
167
|
})
|
|
152
|
168
|
}
|
|
|
@@ -159,8 +175,8 @@
|
|
159
|
175
|
formData.append('file' + i, Files[i]);
|
|
160
|
176
|
}
|
|
161
|
177
|
formData.append("token", $.cookie("token"));
|
|
162
|
|
- var typeName=Files[0].name.split('.')[1];
|
|
163
|
|
- if (typeName=="png"||typeName=='jpg'||typeName=='mp4'||typeName=='mp3'||typeName=='pdf'||typeName=='doc'||typeName=='docx'||typeName=='xls'||typeName=='xlsx') {
|
|
|
178
|
+ var typeName = Files[0].name.split('.')[1];
|
|
|
179
|
+ if(typeName == "png" || typeName == 'jpg' || typeName == 'mp4' || typeName == 'mp3' || typeName == 'pdf' || typeName == 'doc' || typeName == 'docx' || typeName == 'xls' || typeName == 'xlsx') {
|
|
164
|
180
|
$.ajax({
|
|
165
|
181
|
url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
|
|
166
|
182
|
type: "POST",
|
|
|
@@ -183,42 +199,42 @@
|
|
183
|
199
|
if(r.state.toLowerCase() == "success") {
|
|
184
|
200
|
$(".fjnr").text(r.data[0].F_FileName);
|
|
185
|
201
|
var a = r.data;
|
|
186
|
|
- // var str = '';
|
|
187
|
|
- // var Str;
|
|
188
|
|
-
|
|
|
202
|
+ // var str = '';
|
|
|
203
|
+ // var Str;
|
|
|
204
|
+
|
|
189
|
205
|
$(a).each(function(i, n) {
|
|
190
|
|
- var strs='<span class="files" fiel-num="'+ n.F_FileId +'">'+ n.F_FileName.substring(19) +'<i class="fa fa-remove del_file"></i></span>'
|
|
191
|
|
- $(strs).appendTo($('.fileBox')).find('.del_file').click(function(event){
|
|
192
|
|
- event.stopPropagation();
|
|
193
|
|
- $(this).parent().remove();
|
|
|
206
|
+ var strs = '<span class="files" fiel-num="' + n.F_FileId + '">' + n.F_FileName.substring(19) + '<i class="fa fa-remove del_file"></i></span>'
|
|
|
207
|
+ $(strs).appendTo($('.fileBox')).find('.del_file').click(function(event) {
|
|
|
208
|
+ event.stopPropagation();
|
|
|
209
|
+ $(this).parent().remove();
|
|
194
|
210
|
file_num();
|
|
195
|
|
- })
|
|
|
211
|
+ })
|
|
196
|
212
|
})
|
|
197
|
213
|
file_num();
|
|
198
|
214
|
}
|
|
199
|
215
|
}
|
|
200
|
216
|
});
|
|
201
|
|
- }else{
|
|
202
|
|
- layer.msg("格式不正确");
|
|
203
|
|
- }
|
|
|
217
|
+ } else {
|
|
|
218
|
+ layer.msg("格式不正确");
|
|
|
219
|
+ }
|
|
204
|
220
|
} else {
|
|
205
|
221
|
layer.confirm('请上传文件!', {
|
|
206
|
222
|
btn: ['确定']
|
|
207
|
223
|
});
|
|
208
|
224
|
}
|
|
209
|
225
|
}
|
|
210
|
|
-
|
|
211
|
|
- //上传文件隐藏域值
|
|
212
|
|
- function file_num(){
|
|
|
226
|
+
|
|
|
227
|
+ //上传文件隐藏域值
|
|
|
228
|
+ function file_num() {
|
|
213
|
229
|
var str = '';
|
|
214
|
230
|
var Str;
|
|
215
|
|
- $('.fileBox .files').each(function(j,m){
|
|
216
|
|
- var aa=$(m).attr("fiel-num")
|
|
|
231
|
+ $('.fileBox .files').each(function(j, m) {
|
|
|
232
|
+ var aa = $(m).attr("fiel-num")
|
|
217
|
233
|
console.log(aa);
|
|
218
|
234
|
str += aa + ",";
|
|
219
|
235
|
Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
|
|
220
|
236
|
})
|
|
221
|
|
- $("#file").val(Str);
|
|
|
237
|
+ $("#file").val(Str);
|
|
222
|
238
|
}
|
|
223
|
239
|
</script>
|
|
224
|
240
|
</body>
|