Built files from Bizgaze WebServer
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ewaybillmanager.js 4.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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 EWayBillManager extends Unibase.Platform.Core.BaseManager {
  19. getPrintEWayBill(ewaybillid) {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url = "apis/v4/bizgaze/transact/ewaybill/getprintewaybill/ewaybillid/" + ewaybillid;
  22. return yield this.dataHelper().getAsync(url).then(function (response) {
  23. if (response.result != null) {
  24. response.result = JSON.parse(response.result);
  25. return response;
  26. }
  27. });
  28. });
  29. }
  30. getEwayBill(ewaybillid) {
  31. return __awaiter(this, void 0, void 0, function* () {
  32. const url = "apis/v4/bizgaze/transact/ewaybill/getewaybill/ewaybillid/" + ewaybillid;
  33. return yield this.dataHelper().getAsync(url).then(function (response) {
  34. if (response.result != null) {
  35. response.result = JSON.parse(response.result);
  36. return response;
  37. }
  38. });
  39. });
  40. }
  41. getewaybillpayload(ewaybillid) {
  42. return __awaiter(this, void 0, void 0, function* () {
  43. const url = "apis/v4/bizgaze/transact/ewaybill/getewaybillpayload/ewaybillid/" + ewaybillid;
  44. return yield this.dataHelper().getAsync(url).then(function (response) {
  45. if (response.result != null) {
  46. response.result = JSON.parse(response.result);
  47. return response;
  48. }
  49. });
  50. });
  51. }
  52. getEwayBillByInvoiceId(invoiceid) {
  53. return __awaiter(this, void 0, void 0, function* () {
  54. const url = "apis/v4/bizgaze/transact/ewaybill/getewaybillbyinvoiceid/ewaybillinvoiceid/" + invoiceid;
  55. return yield this.dataHelper().getAsync(url).then(function (response) {
  56. if (response.result != null) {
  57. response.result = JSON.parse(response.result);
  58. return response;
  59. }
  60. });
  61. });
  62. }
  63. static Instance() {
  64. if (this._instance === undefined)
  65. this._instance = new EWayBillManager();
  66. return this._instance;
  67. }
  68. }
  69. Managers.EWayBillManager = EWayBillManager;
  70. })(Managers = Transact.Managers || (Transact.Managers = {}));
  71. })(Transact = Apps.Transact || (Apps.Transact = {}));
  72. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  73. })(Bizgaze || (Bizgaze = {}));