|
@@ -265,60 +265,56 @@ |
|
@@ -265,60 +265,56 @@ |
265
|
var btn = $(this);
|
265
|
var btn = $(this);
|
266
|
var text = btn.text();
|
266
|
var text = btn.text();
|
267
|
if(submit_common('.form_data',form_data)) {
|
267
|
if(submit_common('.form_data',form_data)) {
|
268
|
- allow_submit = false;
|
|
|
269
|
- var data = {
|
|
|
270
|
- id: "{$orderInfo.id}",
|
|
|
271
|
- param: form_data.join(',')
|
|
|
272
|
- };
|
|
|
273
|
- console.log(data);
|
|
|
274
|
- // _common("{:url('submit_form')}",data,[$('.num').html(res.data),$('.mask').show()])
|
|
|
275
|
- $.ajax({
|
|
|
276
|
- url: "{:url('submit_form_edit')}",
|
|
|
277
|
- type: "POST",
|
|
|
278
|
- data: data,
|
|
|
279
|
- dataType: "JSON",
|
|
|
280
|
- beforeSend: function(){
|
|
|
281
|
- btn.text(text+'中...').prop('disabled', true);
|
|
|
282
|
- },
|
|
|
283
|
- success: function (res) {
|
|
|
284
|
- console.log(res);
|
|
|
285
|
- if (res.code == 1) {
|
|
|
286
|
- if(res.data == 1) {
|
|
|
287
|
- $('.change_text_o').html('订单修改成功');
|
|
|
288
|
- $('.mask').find('.change_class').removeClass('change_text');
|
|
|
289
|
- $('.mask').find('.change_class').addClass('change_text_single');
|
|
|
290
|
- $('.change_text_t').hide();
|
|
|
291
|
- }
|
|
|
292
|
- if(res.data == 2) {
|
|
|
293
|
- $('.change_text_o').html('抱歉,客户已支付订单');
|
|
|
294
|
- $('.mask').find('.change_class').addClass('change_text');
|
|
|
295
|
- $('.mask').find('.change_class').removeClass('change_text_single');
|
|
|
296
|
- $('.change_text_t').html('您无法进行修改');
|
|
|
297
|
- }
|
|
|
298
|
- if(res.data == 3) {
|
|
|
299
|
- $('.change_text_o').html('对不起,当前功能已暂停');
|
|
|
300
|
- $('.mask').find('.change_class').removeClass('change_text');
|
|
|
301
|
- $('.mask').find('.change_class').addClass('change_text_single');
|
|
|
302
|
- $('.change_text_t').hide();
|
268
|
+ if(allow_submit) {
|
|
|
269
|
+ allow_submit = false;
|
|
|
270
|
+ var data = {
|
|
|
271
|
+ id: "{$orderInfo.id}",
|
|
|
272
|
+ param: form_data.join(',')
|
|
|
273
|
+ };
|
|
|
274
|
+ $.ajax({
|
|
|
275
|
+ url: "{:url('submit_form_edit')}",
|
|
|
276
|
+ type: "POST",
|
|
|
277
|
+ data: data,
|
|
|
278
|
+ dataType: "JSON",
|
|
|
279
|
+ beforeSend: function(){
|
|
|
280
|
+ btn.text(text+'中...');
|
|
|
281
|
+ },
|
|
|
282
|
+ success: function (res) {
|
|
|
283
|
+ console.log(res);
|
|
|
284
|
+ if (res.code == 1) {
|
|
|
285
|
+ if(res.data == 1) {
|
|
|
286
|
+ $('.change_text_o').html('订单修改成功');
|
|
|
287
|
+ $('.mask').find('.change_class').removeClass('change_text');
|
|
|
288
|
+ $('.mask').find('.change_class').addClass('change_text_single');
|
|
|
289
|
+ $('.change_text_t').hide();
|
|
|
290
|
+ }
|
|
|
291
|
+ if(res.data == 2) {
|
|
|
292
|
+ $('.change_text_o').html('抱歉,客户已支付订单');
|
|
|
293
|
+ $('.mask').find('.change_class').addClass('change_text');
|
|
|
294
|
+ $('.mask').find('.change_class').removeClass('change_text_single');
|
|
|
295
|
+ $('.change_text_t').html('您无法进行修改');
|
|
|
296
|
+ }
|
|
|
297
|
+ if(res.data == 3) {
|
|
|
298
|
+ $('.change_text_o').html('对不起,当前功能已暂停');
|
|
|
299
|
+ $('.mask').find('.change_class').removeClass('change_text');
|
|
|
300
|
+ $('.mask').find('.change_class').addClass('change_text_single');
|
|
|
301
|
+ $('.change_text_t').hide();
|
|
|
302
|
+ }
|
|
|
303
|
+ $('.mask').show()
|
|
|
304
|
+ } else {
|
|
|
305
|
+ _error(res.msg);
|
303
|
}
|
306
|
}
|
304
|
- $('.mask').show()
|
|
|
305
|
- // setTimeout(function() {
|
|
|
306
|
- // window.location.href = res.url;
|
|
|
307
|
- // },1000);
|
|
|
308
|
- } else {
|
|
|
309
|
- _error(res.msg);
|
307
|
+ },
|
|
|
308
|
+ error: function(XHR,errorMsg,errorType) {
|
|
|
309
|
+ _error(errorMsg);
|
|
|
310
|
+ },
|
|
|
311
|
+ complete: function(XHR,TS) {
|
|
|
312
|
+ allow_submit = true;
|
|
|
313
|
+ btn.text(text);
|
310
|
}
|
314
|
}
|
311
|
- },
|
|
|
312
|
- error: function(XHR,errorMsg,errorType) {
|
|
|
313
|
- _error(errorMsg);
|
|
|
314
|
- },
|
|
|
315
|
- complete: function(XHR,TS) {
|
|
|
316
|
- allow_submit = true;
|
|
|
317
|
- btn.text(text).prop('disabled', false);
|
|
|
318
|
- }
|
|
|
319
|
- });
|
315
|
+ });
|
|
|
316
|
+ }
|
320
|
}
|
317
|
}
|
321
|
- // $('.mask').show()
|
|
|
322
|
});
|
318
|
});
|
323
|
|
319
|
|
324
|
$('.order_long').click(function() {
|
320
|
$('.order_long').click(function() {
|