UNPKG

tplus-pos

Version:

pos module

217 lines (174 loc) 8.45 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = undefined; var _regenerator = require('babel-runtime/regenerator'); var _regenerator2 = _interopRequireDefault(_regenerator); var _asyncToGenerator2 = require('babel-runtime/helpers/asyncToGenerator'); var _asyncToGenerator3 = _interopRequireDefault(_asyncToGenerator2); var _classCallCheck2 = require('babel-runtime/helpers/classCallCheck'); var _classCallCheck3 = _interopRequireDefault(_classCallCheck2); var _createClass2 = require('babel-runtime/helpers/createClass'); var _createClass3 = _interopRequireDefault(_createClass2); var _tplusApi = require('tplus-api'); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * 获取促销方案的API */ var PromotionApi = function () { function PromotionApi() { (0, _classCallCheck3.default)(this, PromotionApi); } (0, _createClass3.default)(PromotionApi, null, [{ key: 'getAllRetailPromotions', value: function () { var _ref = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(dto) { return _regenerator2.default.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: _context.next = 2; return (0, _tplusApi.tApi)({ retailDTO: dto }, 'chanjet.PR.IRetailPromotion.GetAllRetailPromotions'); case 2: return _context.abrupt('return', _context.sent); case 3: case 'end': return _context.stop(); } } }, _callee, this); })); function getAllRetailPromotions(_x) { return _ref.apply(this, arguments); } return getAllRetailPromotions; }() //获取扫码的存货信息 }, { key: 'getInventoryData', value: function () { var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(idmember, Idstore, code, promotionType, cashBackWay, promotionObject, promotionDiscounts) { return _regenerator2.default.wrap(function _callee2$(_context2) { while (1) { switch (_context2.prev = _context2.next) { case 0: _context2.next = 2; return (0, _tplusApi.tApi)({ "idmember": idmember, "idStore": Idstore, "code": code, "promotionType": promotionType, "cashBackWay": cashBackWay, "promotionObject": promotionObject, "promotionDiscounts": promotionDiscounts, "serialNumberId": '' }, 'chanjet.PR.IRetailPromotion.GetInventoryData', false, false); case 2: return _context2.abrupt('return', _context2.sent); case 3: case 'end': return _context2.stop(); } } }, _callee2, this); })); function getInventoryData(_x2, _x3, _x4, _x5, _x6, _x7, _x8) { return _ref2.apply(this, arguments); } return getInventoryData; }() //获取一码多物的存货信息 }, { key: 'getInventoryInfo', value: function () { var _ref3 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(idInventory, idmember, idStore, barCode, promotionType, cashBackWay, idUnit, serialNumberId) { return _regenerator2.default.wrap(function _callee3$(_context3) { while (1) { switch (_context3.prev = _context3.next) { case 0: _context3.next = 2; return (0, _tplusApi.tApi)({ "IdInventory": idInventory, "IdMember": idmember, "idStore": idStore, "BarCode": barCode, "promotionType": promotionType, "cashBackWay": cashBackWay, "idUnit": idUnit, "serialNumberId": serialNumberId }, 'chanjet.PR.IRetailPromotion.GetInventoryInfo', false, false); case 2: return _context3.abrupt('return', _context3.sent); case 3: case 'end': return _context3.stop(); } } }, _callee3, this); })); function getInventoryInfo(_x9, _x10, _x11, _x12, _x13, _x14, _x15, _x16) { return _ref3.apply(this, arguments); } return getInventoryInfo; }() //获取单品打折方案 }, { key: 'getSingleDiscount', value: function () { var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(idInventory, idunit, idmember, idStore) { return _regenerator2.default.wrap(function _callee4$(_context4) { while (1) { switch (_context4.prev = _context4.next) { case 0: _context4.next = 2; return (0, _tplusApi.tApi)({ "idInventory": idInventory, "idunit": idunit, "idMember": idmember, "idStore": idStore }, 'chanjet.PR.IRetailPromotion.GetSingleDiscountInfo', false, false); case 2: return _context4.abrupt('return', _context4.sent); case 3: case 'end': return _context4.stop(); } } }, _callee4, this); })); function getSingleDiscount(_x17, _x18, _x19, _x20) { return _ref4.apply(this, arguments); } return getSingleDiscount; }() //自助收银的促销执行 }, { key: 'selfSettlePromotion', value: function () { var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(dto) { return _regenerator2.default.wrap(function _callee5$(_context5) { while (1) { switch (_context5.prev = _context5.next) { case 0: _context5.next = 2; return (0, _tplusApi.tApi)({ retailDTO: dto }, 'chanjet.PR.IRetailPromotion.SelfSettlePromotion'); case 2: return _context5.abrupt('return', _context5.sent); case 3: case 'end': return _context5.stop(); } } }, _callee5, this); })); function selfSettlePromotion(_x21) { return _ref5.apply(this, arguments); } return selfSettlePromotion; }() }]); return PromotionApi; }(); exports.default = PromotionApi; //# sourceMappingURL=PromotionApi.js.map