123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
- return new (P || (P = Promise))(function (resolve, reject) {
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
- step((generator = generator.apply(thisArg, _arguments || [])).next());
- });
- };
- var Bizgaze;
- (function (Bizgaze) {
- let Apps;
- (function (Apps) {
- let Transact;
- (function (Transact) {
- let Managers;
- (function (Managers) {
- class PriceListManager extends Unibase.Platform.Core.BaseManager {
- saveMrp(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/savemrp';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- getItem(itemid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/unibase/transact/items/getitem/itemid/' + itemid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- editMrp(MrpId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/getmrp/mrpid/' + MrpId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- exportList(PriceListId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelist/export/pricelistid/' + PriceListId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null)
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- saveBatch(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/savebatch';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- getbatch(batchid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelist/getbatch/batchid/' + batchid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result !== '')
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getpricecodes(lobid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/pricecode/' + lobid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- getPriceCodeByContact(ContactId, LobId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelist/getpricecodebycontact/contactid/' + ContactId + '/lobid/' + LobId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- getpricelists(pricelistid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/pricelist/' + pricelistid;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- postdatafilter(request) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/savepricelist';
- return yield this.dataHelper().postAsync(url, request).then(function (response) {
- return response;
- });
- });
- }
- pricelistvalues(request) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/savepricevalues';
- return yield this.dataHelper().postAsync(url, request).then(function (response) {
- Unibase.Apps.Transact.Controls.CreatePriceList.Instance().editPriceList(Number($("#gridPager2").find('.pagination').find(".active").text()) - 1, 2, "");
- return response;
- });
- });
- }
- CreatePriceListItems(voucherid, contactid, page, searchtext) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/getpricelistitems/id/' + voucherid + '/page/' + page + '/rows/10/query/' + searchtext;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result != "")
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- EditPriceListItems(voucherid, contactid, page, searchtext) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/pricelistitems/id/' + voucherid + '/page/' + page + '/rows/10/query/' + searchtext;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return response;
- });
- });
- }
- getlobs(ContactId) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/automationrules/getruleautotaggroups/' + ContactId;
- return yield this.dataHelper().getAsync(url).then(function (response) {
- return JSON.parse(response.result);
- });
- });
- }
- saveContactDefault(obj) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelists/contactdefault';
- return yield this.dataHelper().postAsync(url, obj).then(function (response) {
- return response;
- });
- });
- }
- getPriceValue(itemid) {
- return __awaiter(this, void 0, void 0, function* () {
- const url = 'apis/v4/bizgaze/transact/pricelist/getlatestpricevalue/itemid/' + itemid + '/mrpid/0/lobid/0';
- return yield this.dataHelper().getAsync(url).then(function (response) {
- if (response.result !== null && response.result !== '')
- response.result = JSON.parse(response.result);
- return response;
- });
- });
- }
- static Instance() {
- if (this._instance === undefined)
- this._instance = new Bizgaze.Apps.Transact.Managers.PriceListManager();
- return this._instance;
- }
- }
- Managers.PriceListManager = PriceListManager;
- })(Managers = Transact.Managers || (Transact.Managers = {}));
- })(Transact = Apps.Transact || (Apps.Transact = {}));
- })(Apps = Bizgaze.Apps || (Bizgaze.Apps = {}));
- })(Bizgaze || (Bizgaze = {}));
|