Built files from Bizgaze WebServer
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dcmanager.js 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  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 DCManager extends Unibase.Platform.Core.BaseManager {
  19. getDcItems(url) {
  20. return __awaiter(this, void 0, void 0, function* () {
  21. const url1 = url;
  22. return yield this.dataHelper().getAsync(url1).then(function (response) {
  23. if (response.result !== null)
  24. response.result = JSON.parse(response.result);
  25. return response;
  26. });
  27. });
  28. }
  29. getDetails(url) {
  30. return __awaiter(this, void 0, void 0, function* () {
  31. const url1 = url;
  32. return yield this.dataHelper().getAsync(url1).then(function (response) {
  33. if (response.result !== null && response.result !== "")
  34. response.result = JSON.parse(response.result);
  35. return response;
  36. });
  37. });
  38. }
  39. getOrderDetails(OrderId, DcTypeId) {
  40. return __awaiter(this, void 0, void 0, function* () {
  41. const url = 'apis/v4/bizgaze/transact/dc/getorderdetails/orderid/' + OrderId + '/dctypeid/' + DcTypeId;
  42. return yield this.dataHelper().getAsync(url).then(function (response) {
  43. if (response.result !== null)
  44. response.result = JSON.parse(response.result);
  45. return response;
  46. });
  47. });
  48. }
  49. getItemDetails(ItemId, OrderItemId, OrderId, BranchId, IsClaim, dctypeid) {
  50. return __awaiter(this, void 0, void 0, function* () {
  51. const url1 = 'apis/v4/bizgaze/transact/dc/getitemdetails/itemid/' + ItemId + '/orderitemid/' + OrderItemId + '/orderid/' + OrderId + '/branchid/' + BranchId + '/isclaim/' + IsClaim + '/dctypeid/' + dctypeid;
  52. return yield this.dataHelper().getAsync(url1).then(function (response) {
  53. if (response.result !== null)
  54. response.result = JSON.parse(response.result);
  55. return response;
  56. });
  57. });
  58. }
  59. getLobSettings(LobId, BranchId, DcTypeId) {
  60. return __awaiter(this, void 0, void 0, function* () {
  61. const url1 = 'apis/v4/bizgaze/transact/dc/getlobsettings/lobid/' + LobId + '/branchid/' + BranchId + '/dctypeid/' + DcTypeId;
  62. return yield this.dataHelper().getAsync(url1).then(function (response) {
  63. if (response.result !== null)
  64. response.result = JSON.parse(response.result);
  65. return response;
  66. });
  67. });
  68. }
  69. savedcItemList(obj) {
  70. return __awaiter(this, void 0, void 0, function* () {
  71. const url = 'apis/v4/bizgaze/transact/dc/savedcitemlist/List';
  72. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  73. return response;
  74. });
  75. });
  76. }
  77. savedcItem(obj) {
  78. return __awaiter(this, void 0, void 0, function* () {
  79. const url = 'apis/v4/bizgaze/transact/dc/savedcitem';
  80. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  81. return response;
  82. });
  83. });
  84. }
  85. getdcsbyorderid(orderid) {
  86. return __awaiter(this, void 0, void 0, function* () {
  87. const url = 'apis/v4/bizgaze/transact/dc/getdcbyorderid/orderid/' + orderid;
  88. return yield this.dataHelper().getAsync(url).then(function (response) {
  89. if (response.result !== null)
  90. response.result = JSON.parse(response.result);
  91. return response;
  92. });
  93. });
  94. }
  95. getDcItemsbyItemId(itemid, dcid) {
  96. return __awaiter(this, void 0, void 0, function* () {
  97. const url = 'apis/v4/bizgaze/transact/Dc/getdcitemsbyitemid/dcid/' + dcid + '/itemid/' + itemid;
  98. return yield this.dataHelper().getAsync(url).then(function (response) {
  99. if (response.result !== null)
  100. response.result = JSON.parse(response.result);
  101. return response;
  102. });
  103. });
  104. }
  105. getDcItemsbyItemIdanddcid(itemid, dcid) {
  106. return __awaiter(this, void 0, void 0, function* () {
  107. const url = 'apis/v4/bizgaze/transact/Dc/getdcitemsbyitemidanddcid/itemid/' + itemid + '/dcid/' + dcid;
  108. return yield this.dataHelper().getAsync(url).then(function (response) {
  109. if (response.result !== null)
  110. response.result = JSON.parse(response.result);
  111. return response;
  112. });
  113. });
  114. }
  115. getdc(dcid) {
  116. return __awaiter(this, void 0, void 0, function* () {
  117. const url = 'apis/v4/bizgaze/transact/dcs/getdc/dcid/' + dcid;
  118. return yield this.dataHelper().getAsync(url).then(function (response) {
  119. if (response.result !== null)
  120. response.result = JSON.parse(response.result);
  121. return response;
  122. });
  123. });
  124. }
  125. getDcItemsbyId(DcItemId) {
  126. return __awaiter(this, void 0, void 0, function* () {
  127. const url = 'apis/v4/bizgaze/transact/dc/getdcitembydcitemid/dcitemid/' + DcItemId;
  128. return yield this.dataHelper().getAsync(url).then(function (response) {
  129. if (response.result !== null)
  130. response.result = JSON.parse(response.result);
  131. return response;
  132. });
  133. });
  134. }
  135. dcPrint(DcId) {
  136. return __awaiter(this, void 0, void 0, function* () {
  137. const url = 'apis/v4/bizgaze/transact/dc/getdchtml/dcid/' + DcId + '/templateid/0';
  138. return yield this.dataHelper().getAsync(url).then(function (response) {
  139. if (response.result !== null && response.result != "")
  140. response.result = JSON.parse(response.result);
  141. return response;
  142. });
  143. });
  144. }
  145. getMrpDcQty(itemid, BranchId, MrpId, isdcty) {
  146. return __awaiter(this, void 0, void 0, function* () {
  147. const url = 'apis/v4/bizgaze/transact/items/getavailablemrpqty/itemid/' + itemid + '/branchid/' + BranchId + '/mrpid/' + MrpId + '/isdcqty/' + isdcty;
  148. return yield this.dataHelper().getAsync(url).then(function (response) {
  149. if (response.result !== null)
  150. response.result = JSON.parse(response.result);
  151. return response;
  152. });
  153. });
  154. }
  155. getInventoryApplyType(LobId, Type, BranchId) {
  156. return __awaiter(this, void 0, void 0, function* () {
  157. const url = 'apis/v4/bizgaze/transact/settings/getinventoryapplytype/lobid/' + LobId + '/type/' + Type + '/branchid/' + BranchId;
  158. return yield this.dataHelper().getAsync(url).then(function (response) {
  159. if (response.result !== null)
  160. response.result = JSON.parse(response.result);
  161. return response;
  162. });
  163. });
  164. }
  165. getDcStock(ItemId, BranchId, isdcqty) {
  166. return __awaiter(this, void 0, void 0, function* () {
  167. const url = 'apis/v4/bizgaze/transact/items/getavailableqty/itemid/' + ItemId + '/branchid/' + BranchId + '/isclaim/false/isdcqty/' + isdcqty;
  168. return yield this.dataHelper().getAsync(url).then(function (response) {
  169. if (response.result !== null)
  170. response.result = JSON.parse(response.result);
  171. return response;
  172. });
  173. });
  174. }
  175. getDcItemsbyOrderItemId(Orderitemid) {
  176. return __awaiter(this, void 0, void 0, function* () {
  177. const url = 'apis/v4/bizgaze/transact/dc/getdcitembyorderitemid/' + Orderitemid;
  178. return yield this.dataHelper().getAsync(url).then(function (response) {
  179. if (response.result !== null && response.result != "")
  180. response.result = JSON.parse(response.result);
  181. return response;
  182. });
  183. });
  184. }
  185. deleteDcItem(obj) {
  186. return __awaiter(this, void 0, void 0, function* () {
  187. const url = 'apis/v4/bizgaze/transact/dc/deletedcitem';
  188. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  189. return response;
  190. });
  191. });
  192. }
  193. GetBatchandMRPQty(url) {
  194. return __awaiter(this, void 0, void 0, function* () {
  195. return yield this.dataHelper().getAsync(url).then(function (response) {
  196. if (response.result !== null)
  197. response.result = JSON.parse(response.result);
  198. return response;
  199. });
  200. });
  201. }
  202. getserialNo(StockId) {
  203. return __awaiter(this, void 0, void 0, function* () {
  204. const url = 'apis/v4/bizgaze/transact/dcs/getstockbystockid/stockid/' + StockId;
  205. return yield this.dataHelper().getAsync(url).then(function (response) {
  206. if (response.result !== null)
  207. response.result = JSON.parse(response.result);
  208. return response;
  209. });
  210. });
  211. }
  212. getserialNobySerialNo(url) {
  213. return __awaiter(this, void 0, void 0, function* () {
  214. return yield this.dataHelper().getAsync(url).then(function (response) {
  215. if (response.result !== null && response.result !== "")
  216. response.result = JSON.parse(response.result);
  217. return response;
  218. });
  219. });
  220. }
  221. getAllocatedStocks(url) {
  222. return __awaiter(this, void 0, void 0, function* () {
  223. return yield this.dataHelper().getAsync(url).then(function (response) {
  224. if (response.result !== null)
  225. response.result = JSON.parse(response.result);
  226. return response;
  227. });
  228. });
  229. }
  230. getScannedSerialNos(DcItemId) {
  231. return __awaiter(this, void 0, void 0, function* () {
  232. const url = 'apis/v4/bizgaze/transact/dcs/getscannedserialnosbydcitemid/dcitemid/' + DcItemId;
  233. return yield this.dataHelper().getAsync(url).then(function (response) {
  234. if (response.result !== null)
  235. response.result = JSON.parse(response.result);
  236. return response;
  237. });
  238. });
  239. }
  240. getItemScannedSerialNos(DcItemId, StockId) {
  241. return __awaiter(this, void 0, void 0, function* () {
  242. const url = 'apis/v4/bizgaze/transact/dcs/getitemscannedserialnos/dcitemid/' + DcItemId + '/parentstockid/' + StockId;
  243. return yield this.dataHelper().getAsync(url).then(function (response) {
  244. if (response.result !== null)
  245. response.result = JSON.parse(response.result);
  246. return response;
  247. });
  248. });
  249. }
  250. getActiveStocks(DcItemId, StockStatusId) {
  251. return __awaiter(this, void 0, void 0, function* () {
  252. const url = 'apis/v4/bizgaze/transact/dcs/getactivestocks/dcitemid/' + DcItemId + '/StockStatusId/' + StockStatusId;
  253. return yield this.dataHelper().getAsync(url).then(function (response) {
  254. if (response.result !== null)
  255. response.result = JSON.parse(response.result);
  256. return response;
  257. });
  258. });
  259. }
  260. deleteSerialNo(obj) {
  261. return __awaiter(this, void 0, void 0, function* () {
  262. const url = 'apis/v4/bizgaze/transact/dc/deleteserialno';
  263. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  264. return response;
  265. });
  266. });
  267. }
  268. deleteSerialNobyDcItemId(postdata) {
  269. return __awaiter(this, void 0, void 0, function* () {
  270. const url = 'apis/v4/bizgaze/transact/dc/ChangeSerialNoStage';
  271. return yield this.dataHelper().postAsync(url, postdata).then(function (response) {
  272. return response;
  273. });
  274. });
  275. }
  276. getItemSerialNos(DcItemId, ParentStockId) {
  277. return __awaiter(this, void 0, void 0, function* () {
  278. const url = 'apis/v4/bizgaze/transact/dcs/getstocksbyparentstockid/parentstockid/' + ParentStockId + '/dcitemid/' + DcItemId;
  279. return yield this.dataHelper().getAsync(url).then(function (response) {
  280. if (response.result !== null)
  281. response.result = JSON.parse(response.result);
  282. return response;
  283. });
  284. });
  285. }
  286. getdcSerialNos(DcId) {
  287. return __awaiter(this, void 0, void 0, function* () {
  288. const url = 'apis/v4/bizgaze/transact/dcs/getstocksbydcid/dcid/' + DcId;
  289. return yield this.dataHelper().getAsync(url).then(function (response) {
  290. if (response.result !== null)
  291. response.result = JSON.parse(response.result);
  292. return response;
  293. });
  294. });
  295. }
  296. getActivedcSerialNos(DcId) {
  297. return __awaiter(this, void 0, void 0, function* () {
  298. const url = 'apis/v4/bizgaze/transact/dcs/getactivestocksbydcid/dcid/' + DcId;
  299. return yield this.dataHelper().getAsync(url).then(function (response) {
  300. if (response.result !== null)
  301. response.result = JSON.parse(response.result);
  302. return response;
  303. });
  304. });
  305. }
  306. generateCouponforSNo(obj) {
  307. return __awaiter(this, void 0, void 0, function* () {
  308. const url = 'apis/v4/bizgaze/transact/dc/generatecouponforsno';
  309. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  310. return response;
  311. });
  312. });
  313. }
  314. GetSerialNosCount(DcItemId, DcType, IsTransfer) {
  315. return __awaiter(this, void 0, void 0, function* () {
  316. const url = 'apis/v4/bizgaze/transact/dcs/getdcserialnoscountbydcitemid/dcitemid/' + DcItemId + '/DcType/' + DcType + '/istransfer/' + IsTransfer;
  317. return yield this.dataHelper().getAsync(url).then(function (response) {
  318. if (response.result !== null)
  319. response.result = JSON.parse(response.result);
  320. return response;
  321. });
  322. });
  323. }
  324. generateMasterSerialNo(obj) {
  325. return __awaiter(this, void 0, void 0, function* () {
  326. const url = 'apis/v4/bizgaze/transact/dc/generatemasterserialno';
  327. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  328. return response;
  329. });
  330. });
  331. }
  332. scanSerialNo(url) {
  333. return __awaiter(this, void 0, void 0, function* () {
  334. return yield this.dataHelper().getAsync(url).then(function (response) {
  335. if (response.result !== null && response.result !== "")
  336. response.result = JSON.parse(response.result);
  337. return response;
  338. });
  339. });
  340. }
  341. scanMasterSerialNo(url) {
  342. return __awaiter(this, void 0, void 0, function* () {
  343. return yield this.dataHelper().getAsync(url).then(function (response) {
  344. if (response.result !== null && response.result !== "")
  345. response.result = JSON.parse(response.result);
  346. return response;
  347. });
  348. });
  349. }
  350. scrappedSNo(obj) {
  351. return __awaiter(this, void 0, void 0, function* () {
  352. const url = 'apis/v4/bizgaze/transact/generatemastercode/scrappedsno';
  353. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  354. return response;
  355. });
  356. });
  357. }
  358. scanDCAndGrn(DcId, StockId, DcItemId) {
  359. return __awaiter(this, void 0, void 0, function* () {
  360. const url = 'apis/v4/bizgaze/transact/dcs/ScanDCandGRN/dcid/' + DcId + '/stockid/' + StockId + '/dcitemid/' + DcItemId;
  361. return yield this.dataHelper().getAsync(url).then(function (response) {
  362. if (response.result !== null)
  363. response.result = JSON.parse(response.result);
  364. return response;
  365. });
  366. });
  367. }
  368. getAvailQty(ItemId, BranchId) {
  369. return __awaiter(this, void 0, void 0, function* () {
  370. const url1 = 'apis/v4/bizgaze/transact/items/getitemavailability_rec/itemid/' + ItemId + '/branchid/' + BranchId;
  371. return yield this.dataHelper().getAsync(url1).then(function (response) {
  372. if (response.result !== null)
  373. response.result = JSON.parse(response.result);
  374. return response;
  375. });
  376. });
  377. }
  378. getItemRecDetails(ItemRecId, ItemId) {
  379. return __awaiter(this, void 0, void 0, function* () {
  380. const url1 = 'apis/v4/bizgaze/transact/items/GetItemReconcilationDetails/itemrecid/' + ItemRecId + '/itemid/' + ItemId;
  381. return yield this.dataHelper().getAsync(url1).then(function (response) {
  382. if (response.result !== null)
  383. response.result = JSON.parse(response.result);
  384. return response;
  385. });
  386. });
  387. }
  388. savegrn(obj) {
  389. return __awaiter(this, void 0, void 0, function* () {
  390. const url = 'apis/v4/bizgaze/transact/dc/savegrn';
  391. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  392. return response;
  393. });
  394. });
  395. }
  396. getDcByRefDcId(DcId) {
  397. return __awaiter(this, void 0, void 0, function* () {
  398. const url1 = 'apis/v4/bizgaze/transact/dc/Getdcbyrefdcid/refdcid/' + DcId;
  399. return yield this.dataHelper().getAsync(url1).then(function (response) {
  400. if (response.result !== null && response.result !== "")
  401. response.result = JSON.parse(response.result);
  402. return response;
  403. });
  404. });
  405. }
  406. getLogisticDetails(LogisticId) {
  407. return __awaiter(this, void 0, void 0, function* () {
  408. const url1 = 'apis/v4/bizgaze/transact/logistics/getlogisticsbyid/logisticid/' + LogisticId;
  409. return yield this.dataHelper().getAsync(url1).then(function (response) {
  410. if (response.result !== null && response.result !== "")
  411. response.result = JSON.parse(response.result);
  412. return response;
  413. });
  414. });
  415. }
  416. getPickerDetails(frompincode, topincode, weight, height, breadth, length) {
  417. return __awaiter(this, void 0, void 0, function* () {
  418. const url1 = 'apis/v4/bizgaze/integrations/pickrr/pricecalculator/pickup_pincode/' + frompincode + '/drop_pincode/' + topincode
  419. + '/weight/' + weight + '/height/' + height + '/breadth/' + breadth + '/length/' + length;
  420. return yield this.dataHelper().getAsync(url1).then(function (response) {
  421. if (response.result !== null && response.result !== "")
  422. response.result = JSON.parse(response.result);
  423. return response;
  424. });
  425. });
  426. }
  427. cancelPicker(TrackingdId) {
  428. return __awaiter(this, void 0, void 0, function* () {
  429. const url1 = 'apis/v4/bizgaze/integrations/pickrr/cancelorder/' + TrackingdId;
  430. return yield this.dataHelper().getAsync(url1).then(function (response) {
  431. if (response.result !== null && response.result !== "")
  432. response.result = JSON.parse(response.result);
  433. return response;
  434. });
  435. });
  436. }
  437. UpdateCancelOrder(obj) {
  438. return __awaiter(this, void 0, void 0, function* () {
  439. const url = 'apis/v4/bizgaze/transact/logistics/updatecancelorder';
  440. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  441. return response;
  442. });
  443. });
  444. }
  445. updateIsReconcil(obj) {
  446. return __awaiter(this, void 0, void 0, function* () {
  447. const url = 'apis/v4/bizgaze/transact/itemrecon/updateisreconcil';
  448. return yield this.dataHelper().postAsync(url, obj).then(function (response) {
  449. return response;
  450. });
  451. });
  452. }
  453. static Instance() {
  454. if (this._instance === undefined)
  455. this._instance = new DCManager();
  456. return this._instance;
  457. }
  458. }
  459. Managers.DCManager = DCManager;
  460. })(Managers = Transact.Managers || (Transact.Managers = {}));
  461. })(Transact = Apps.Transact || (Apps.Transact = {}));
  462. })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
  463. })(Bizgaze || (Bizgaze = {}));