• 了解 : 怎么处理jobbox status drop down list roll back


    that.onStatusEnumChange = function (toStatus) {
      //设计理念是当completed 和 rejected 的状态下,是无法换状态 if (toStatus == "completed" || toStatus == "rejected") { S.confirm("After status change to " + toStatus + ", it will not able to change back, are you sure ?", function () { updateStatus(); }, function () { rollbackValue(); }); } else { updateStatus(); }
      //恢复资料 function rollbackValue() { that.resourceClone.statusEnum = that.resource.statusEnum; }
    function updateStatus() {
        //new HttpObj 制作一个请求对象 var updateStatushttpObj = new HttpObj({ url: "//localhost:4745/api/Orders(" + that.resourceClone.id + ")/RPC.changeStatus", method: "POST", data: { toStatusEnum: that.resourceClone.statusEnum } });

        //refreshAsyncHttpObj 制作一个请求对象,同时有promise(把回来的资源给覆盖回之前的资源) var refreshResourceHttpObj = that.resource.extend.refreshAsyncHttpObj();

        //batchHttp 就是把所有请求对象给发出去 batchHttp([updateStatushttpObj, refreshResourceHttpObj], { ajaxCommObject: {} }).then(function () { that.resourceClone = that.resource.extend.cloneForPut(); }, function () { rollbackValue(); }); } }

      

  • 相关阅读:
    Arr
    class4
    class3联大网页
    class33
    class3
    人机交换 NO 1书签
    大数据的框架与特点
    mapreduce排序
    mapreduce求平均数
    mapreduce去重
  • 原文地址:https://www.cnblogs.com/stooges/p/4887480.html
Copyright © 2020-2023  润新知