Built files from Bizgaze WebServer
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

rulemanager.js 11KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
  2. function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
  3. return new (P || (P = Promise))(function (resolve, reject) {
  4. function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
  5. function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
  6. function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
  7. step((generator = generator.apply(thisArg, _arguments || [])).next());
  8. });
  9. };
  10. var Bizgaze;
  11. (function (Bizgaze) {
  12. let Apps;
  13. (function (Apps) {
  14. let Transact;
  15. (function (Transact) {
  16. let Managers;
  17. (function (Managers) {
  18. class RuleManager extends Unibase.Platform.Core.BaseManager {
  19. savecontactdefault(obj) {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = 'apis/v4/bizgaze/transact/automationrules/saveorderapprovalruledefaultcontact';
  22. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  23. return response;
  24. });
  25. });
  26. }
  27. getRuleTags(IncludedTags, ExcludedTags, TagLobs) {
  28. return __awaiter(this, void 0, void 0, function* () {
  29. const url = 'apis/v4/unibase/platform/forms/getincludedandexcludedtags/includedtags/' + IncludedTags + '/excludedtags/' + ExcludedTags + '/taggroupids/' + TagLobs + '';
  30. return yield this.dataHelper().getAsync(url).then(function (response) {
  31. if (response.result !== null)
  32. response.result = JSON.parse(response.result);
  33. return response;
  34. });
  35. });
  36. }
  37. savecontactdefaultPaymentTerm(obj) {
  38. return __awaiter(this, void 0, void 0, function* () {
  39. const url = 'apis/v4/bizgaze/transact/automationrules/savepaymenttermruledefaultcontact';
  40. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  41. return response;
  42. });
  43. });
  44. }
  45. savecontactdetails(obj) {
  46. return __awaiter(this, void 0, void 0, function* () {
  47. const url = 'apis/v4/bizgaze/transact/automationrules/savecreditimitruledefaultcontact';
  48. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  49. return response;
  50. });
  51. });
  52. }
  53. UpdateCreditLimitRuleContact(obj) {
  54. return __awaiter(this, void 0, void 0, function* () {
  55. const url = 'apis/v4/bizgaze/transact/automationrules/updatecreditlimitrulecontact';
  56. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  57. return response;
  58. });
  59. });
  60. }
  61. UpdatePriceCodeRuleContact(obj) {
  62. return __awaiter(this, void 0, void 0, function* () {
  63. const url = 'apis/v4/bizgaze/transact/automationrules/updatepricecoderulecontact';
  64. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  65. return response;
  66. });
  67. });
  68. }
  69. UpdatePaymentTermRuleContact(obj) {
  70. return __awaiter(this, void 0, void 0, function* () {
  71. const url = 'apis/v4/bizgaze/transact/automationrules/updatepaymenttermrulecontact';
  72. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  73. return response;
  74. });
  75. });
  76. }
  77. UpdateOrderApprovalRuleContact(obj) {
  78. return __awaiter(this, void 0, void 0, function* () {
  79. const url = 'apis/v4/bizgaze/transact/automationrules/updateorderapprovalrulecontact';
  80. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  81. return response;
  82. });
  83. });
  84. }
  85. savecontactdefaultPriceCode(obj) {
  86. return __awaiter(this, void 0, void 0, function* () {
  87. const url = 'apis/v4/bizgaze/transact/automationrules/savepricecoderuledefaultcontact';
  88. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  89. return response;
  90. });
  91. });
  92. }
  93. updateRuleTags(IncludedTags, ExcludedTags, TagLobIds, PKId, InstalledAppId) {
  94. return __awaiter(this, void 0, void 0, function* () {
  95. const url = 'apis/v4/unibase/transact/rules/updateruletagsdetailsbytags/includedtags/' + IncludedTags + '/excludedtags/' + ExcludedTags + '/lobids/' + TagLobIds + '/pkid/' + PKId + '/installedappid/' + InstalledAppId;
  96. return yield this.dataHelper().postAsync(url, null).then(function (response) {
  97. if (response.result !== null && response.result != "")
  98. response.result = JSON.parse(response.result);
  99. return response;
  100. });
  101. });
  102. }
  103. refreshcreditlimitrules(versionguid, rulename, pkid) {
  104. return __awaiter(this, void 0, void 0, function* () {
  105. const url = 'apis/v4/bizgaze/transact/pricelists/configureruleactionprovider/versionguid/' + versionguid + '/rulename/' + rulename + '/pkid/' + pkid + '/lobid/0';
  106. return yield this.dataHelper().getAsync(url).then(function (response) {
  107. debugger;
  108. return response;
  109. });
  110. });
  111. }
  112. refreshPriceCodeRule(PriceCodeRuleId) {
  113. return __awaiter(this, void 0, void 0, function* () {
  114. const url = 'apis/v4/bizgaze/transact/automationrules/refreshpricecoderule/pricecoderuleid/' + PriceCodeRuleId;
  115. return yield this.dataHelper().postAsync(url, PriceCodeRuleId).then(function (response) {
  116. if (response.result !== null && response.result != "")
  117. response.result = JSON.parse(response.result);
  118. return response;
  119. });
  120. });
  121. }
  122. refreshCreditRule(ruleid) {
  123. return __awaiter(this, void 0, void 0, function* () {
  124. const url = 'apis/v4/bizgaze/transact/automationrules/refreshcreditlimitrule/ruleid/' + ruleid;
  125. return yield this.dataHelper().postAsync(url, ruleid).then(function (response) {
  126. if (response.result !== null && response.result != "")
  127. response.result = JSON.parse(response.result);
  128. return response;
  129. });
  130. });
  131. }
  132. refreshPaymentTermRule(PaymentTermRuleId) {
  133. return __awaiter(this, void 0, void 0, function* () {
  134. const url = 'apis/v4/bizgaze/transact/automationrules/refreshpaymenttermrule/paymenttermruleid/' + PaymentTermRuleId;
  135. return yield this.dataHelper().postAsync(url, PaymentTermRuleId).then(function (response) {
  136. if (response.result !== null && response.result != "")
  137. response.result = JSON.parse(response.result);
  138. return response;
  139. });
  140. });
  141. }
  142. refreshOrderApprovalRule(OrderApprovalRuleId) {
  143. return __awaiter(this, void 0, void 0, function* () {
  144. const url = 'apis/v4/bizgaze/transact/automationrules/refreshorderapprovalrule/orderapprovalruleid/' + OrderApprovalRuleId;
  145. return yield this.dataHelper().postAsync(url, OrderApprovalRuleId).then(function (response) {
  146. if (response.result !== null && response.result != "")
  147. response.result = JSON.parse(response.result);
  148. return response;
  149. });
  150. });
  151. }
  152. refreshSkuRecommendation(SkuRecommendationId) {
  153. return __awaiter(this, void 0, void 0, function* () {
  154. const url = 'apis/v4/bizgaze/transact/automationrules/refreshskurecommendation/skurecommendationid/' + SkuRecommendationId;
  155. return yield this.dataHelper().postAsync(url, SkuRecommendationId).then(function (response) {
  156. if (response.result !== null && response.result != "")
  157. response.result = JSON.parse(response.result);
  158. return response;
  159. });
  160. });
  161. }
  162. static Instance() {
  163. if (this.instance === undefined) {
  164. this.instance = new RuleManager();
  165. }
  166. return this.instance;
  167. }
  168. }
  169. Managers.RuleManager = RuleManager;
  170. })(Managers = Transact.Managers || (Transact.Managers = {}));
  171. })(Transact = Apps.Transact || (Apps.Transact = {}));
  172. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  173. })(Bizgaze || (Bizgaze = {}));