|
|
@@ -167,7 +167,56 @@ function btn_export() {
|
|
167
|
167
|
area: ['50%', '55%'], //宽高
|
|
168
|
168
|
});
|
|
169
|
169
|
}
|
|
170
|
|
-
|
|
|
170
|
+//批量更新
|
|
|
171
|
+function btn_updates(){
|
|
|
172
|
+ var updateIds = $.map($('#cusList').bootstrapTable('getSelections'),
|
|
|
173
|
+ function(row){
|
|
|
174
|
+ return row.F_CustomerId;
|
|
|
175
|
+ });
|
|
|
176
|
+ if(updateIds.length<=0){
|
|
|
177
|
+ layer.confirm('确定全部更新吗?', {
|
|
|
178
|
+ icon: 7,
|
|
|
179
|
+ btn: ['是', '否'] //按钮
|
|
|
180
|
+ }, function(index) {
|
|
|
181
|
+ $.ajax({
|
|
|
182
|
+ type: "post",
|
|
|
183
|
+ url: huayi.config.callcenter_url + "Sign/GetCustomersCs",
|
|
|
184
|
+ dataType: 'json',
|
|
|
185
|
+ async: true,
|
|
|
186
|
+ data: {
|
|
|
187
|
+ ids: '',//客户Id,可多选[1,2,3]
|
|
|
188
|
+ token: $.cookie("token")
|
|
|
189
|
+ },
|
|
|
190
|
+ success: function(data) {
|
|
|
191
|
+ layer.msg("更新成功!");
|
|
|
192
|
+ $('#cusList').bootstrapTable('refresh');
|
|
|
193
|
+ layer.close(index);
|
|
|
194
|
+ }
|
|
|
195
|
+ });
|
|
|
196
|
+ });
|
|
|
197
|
+ }else{
|
|
|
198
|
+ layer.confirm('确定更新吗?', {
|
|
|
199
|
+ icon: 7,
|
|
|
200
|
+ btn: ['是', '否'] //按钮
|
|
|
201
|
+ }, function(index) {
|
|
|
202
|
+ $.ajax({
|
|
|
203
|
+ type: "post",
|
|
|
204
|
+ url: huayi.config.callcenter_url + "Sign/GetCustomersCs",
|
|
|
205
|
+ dataType: 'json',
|
|
|
206
|
+ async: true,
|
|
|
207
|
+ data: {
|
|
|
208
|
+ ids: updateIds.toString(),
|
|
|
209
|
+ token: $.cookie("token")
|
|
|
210
|
+ },
|
|
|
211
|
+ success: function(data) {
|
|
|
212
|
+ layer.msg("更新成功!");
|
|
|
213
|
+ $('#cusList').bootstrapTable('refresh');
|
|
|
214
|
+ layer.close(index);
|
|
|
215
|
+ }
|
|
|
216
|
+ });
|
|
|
217
|
+ });
|
|
|
218
|
+ }
|
|
|
219
|
+}
|
|
171
|
220
|
|
|
172
|
221
|
//批量删除
|
|
173
|
222
|
function btn_deletes() {
|