$.post ('@Url. Action ("Batchcancel")', PostData, function (res) {if(Res.flag) {ztlayer.showtips ('@T ("Admin.order.cancelorder.ok")',6, the, function () {window.location.reload (); }); }Else {
if(res.url) {window.location.href=Res.url; return; }
Ztlayer.showtips (res.msg||'@T ("Admin.common.cancelordererror")'); } });
Background specifications
if(!_workcontext.currentcustomer.isregistered ())returnJson (New{flag =false, url = Url.routeurl ("Login") }); Can not directly redirt to the login page, otherwise the foreground JS captures an HTML page, can not be judged
if(!string. IsNullOrEmpty (OrderIDs)) {Resultmodel Result=_orderprocessingservice.cancelorder (orderlist); returnJson (New{flag = result. Flag = =1, msg =result. Message}); }Else{
returnJson (New{flag =false, msg = _localizationservice.getresource ("Admin.common.cancelordererror") }); Unified return Format}
Standard front-desk JS operation returned