tplus-components-touch 3.26.1 → 3.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -16
- package/dist/components/acCitySelect/CitySelect.js +18 -18
- package/dist/components/acCitySelect/CitySelect.js.map +1 -1
- package/dist/components/acCitySelect/CitySelect.less +9 -9
- package/dist/components/acCitySelect/citys.js.map +1 -1
- package/dist/components/acCitySelect/index.js.map +1 -1
- package/dist/components/acCitySelect/provinceData.js +7 -7
- package/dist/components/acCitySelect/provinceData.js.map +1 -1
- package/dist/components/addLog/AddLogProcessor.js +6 -6
- package/dist/components/addLog/AddLogProcessor.js.map +1 -1
- package/dist/components/addLog/OperationLogApi.js +3 -3
- package/dist/components/addLog/OperationLogApi.js.map +1 -1
- package/dist/components/autoComplete/index.js +14 -14
- package/dist/components/autoComplete/index.js.map +1 -1
- package/dist/components/autoComplete/index.less +89 -89
- package/dist/components/autoComplete/option.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.js +14 -14
- package/dist/components/autoCompleteWithKeyboard/index.js.map +1 -1
- package/dist/components/autoCompleteWithKeyboard/index.less +7 -7
- package/dist/components/billSearch/api.js +29 -29
- package/dist/components/billSearch/api.js.map +1 -1
- package/dist/components/billSearch/index.js +6 -6
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/billSearch/index.less +373 -373
- package/dist/components/cloudPrint/BTPrintFormatUtil.js +17 -17
- package/dist/components/cloudPrint/BTPrintFormatUtil.js.map +1 -1
- package/dist/components/cloudPrint/api.js.map +1 -1
- package/dist/components/cloudPrint/index.js.map +1 -1
- package/dist/components/cloudPrint/printDispatch.js +7 -7
- package/dist/components/cloudPrint/printDispatch.js.map +1 -1
- package/dist/components/commonForm/addressPicker/index.js +7 -7
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/commonForm/addressPicker/style.less +10 -10
- package/dist/components/commonForm/autoComplete/index.js.map +1 -1
- package/dist/components/commonForm/autoComplete/style.less +2 -2
- package/dist/components/commonForm/datePicker/index.js.map +1 -1
- package/dist/components/commonForm/datePicker/style.less +4 -4
- package/dist/components/commonForm/formControl/index.js.map +1 -1
- package/dist/components/commonForm/index.js +4 -4
- package/dist/components/commonForm/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/style.less +10 -10
- package/dist/components/commonForm/radio/index.js.map +1 -1
- package/dist/components/commonForm/style.less +1 -1
- package/dist/components/deliverySearch/api.js +21 -21
- package/dist/components/deliverySearch/api.js.map +1 -1
- package/dist/components/deliverySearch/index.js +6 -6
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/deliverySearch/index.less +553 -553
- package/dist/components/form/index.js.map +1 -1
- package/dist/components/hardwareAPI/index.js.map +1 -1
- package/dist/components/hotKey/config.js +23 -23
- package/dist/components/hotKey/config.js.map +1 -1
- package/dist/components/hotKey/hotKeyModal.js.map +1 -1
- package/dist/components/hotKey/index.js +26 -26
- package/dist/components/hotKey/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +12 -12
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/hotKey/style.less +96 -96
- package/dist/components/hotKey/utils.js.map +1 -1
- package/dist/components/input/index.js +6 -6
- package/dist/components/input/index.js.map +1 -1
- package/dist/components/input/style.less +99 -99
- package/dist/components/input/tplusInput/index.js +30 -30
- package/dist/components/input/tplusInput/index.js.map +1 -1
- package/dist/components/input/tplusInput/inputContent.js.map +1 -1
- package/dist/components/input/tplusInput/inputs.js.map +1 -1
- package/dist/components/input/tplusInput/style.less +132 -132
- package/dist/components/input/utils/index.js.map +1 -1
- package/dist/components/inventorySearch/api.js +58 -58
- package/dist/components/inventorySearch/api.js.map +1 -1
- package/dist/components/inventorySearch/index.js +3 -3
- package/dist/components/inventorySearch/index.js.map +1 -1
- package/dist/components/inventorySearch/index.less +119 -119
- package/dist/components/inventorySearch/store.js.map +1 -1
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/index.js.map +1 -1
- package/dist/components/keyboard/index.less +469 -469
- package/dist/components/keyboard/letterKeyboard.js +2 -2
- package/dist/components/keyboard/letterKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboard.js +4 -4
- package/dist/components/keyboard/numKeyboard.js.map +1 -1
- package/dist/components/keyboard/numKeyboardScan.js.map +1 -1
- package/dist/components/keyboard/numberButton_input.js +5 -5
- package/dist/components/keyboard/numberButton_input.js.map +1 -1
- package/dist/components/keyboard/numkeyboardPassword.js +4 -4
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -1
- package/dist/components/keyboard/onlyKeyboard.js +7 -7
- package/dist/components/keyboard/onlyKeyboard.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton.js +2 -2
- package/dist/components/keyboard/onlyLetterButton.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.js +2 -2
- package/dist/components/keyboard/onlyLetterButton2.js.map +1 -1
- package/dist/components/keyboard/onlyLetterButton2.less +161 -161
- package/dist/components/keyboard/onlyNumberButton.js +2 -2
- package/dist/components/keyboard/onlyNumberButton.js.map +1 -1
- package/dist/components/keyboard/onlyNumberButton2.js +3 -3
- package/dist/components/keyboard/onlyNumberButton2.js.map +1 -1
- package/dist/components/keyboard/textKeyboard.js.map +1 -1
- package/dist/components/layout/hamburger.js.map +1 -1
- package/dist/components/layout/index.js +10 -10
- package/dist/components/layout/index.js.map +1 -1
- package/dist/components/layout/layout.js.map +1 -1
- package/dist/components/layout/sider.js +12 -12
- package/dist/components/layout/sider.js.map +1 -1
- package/dist/components/layout/style.less +82 -82
- package/dist/components/loading/index.js +15 -15
- package/dist/components/loading/index.js.map +1 -1
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/loading/style.less +61 -61
- package/dist/components/loading/utils.js.map +1 -1
- package/dist/components/message/index.js +8 -8
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/message/index.less +101 -101
- package/dist/components/modal/index.js.map +1 -1
- package/dist/components/modal/index.less +19 -19
- package/dist/components/modalVertical/index.js +7 -7
- package/dist/components/modalVertical/index.js.map +1 -1
- package/dist/components/modalVertical/style.less +60 -60
- package/dist/components/modalWraper/index.js +15 -15
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/modalWraper/style.less +257 -257
- package/dist/components/modalWraper/utils.js.map +1 -1
- package/dist/components/notification/index.js +4 -4
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/notification/index.less +51 -51
- package/dist/components/overflowTip/index.js +15 -15
- package/dist/components/overflowTip/index.js.map +1 -1
- package/dist/components/overflowTip/style.less +66 -66
- package/dist/components/page/index.js.map +1 -1
- package/dist/components/page/index.less +21 -21
- package/dist/components/product/detail.js +7 -7
- package/dist/components/product/detail.js.map +1 -1
- package/dist/components/product/getCard.js +5 -5
- package/dist/components/product/getCard.js.map +1 -1
- package/dist/components/product/index.less +128 -128
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
- package/dist/components/progressState/ProgressState.js +10 -10
- package/dist/components/progressState/ProgressState.js.map +1 -1
- package/dist/components/progressState/index.js.map +1 -1
- package/dist/components/progressState/style.less +65 -65
- package/dist/components/scan/index.js.map +1 -1
- package/dist/components/scan/index.less +33 -33
- package/dist/components/select/index.js.map +1 -1
- package/dist/components/select/index.less +11 -11
- package/dist/components/settlement/asyncModal.js.map +1 -1
- package/dist/components/settlement/index.js.map +1 -1
- package/dist/components/settlement/prototypeTable/index.js.map +1 -1
- package/dist/components/settlement/prototypeTable/style.less +58 -58
- package/dist/components/settlement/prototypeTable/utils.js.map +1 -1
- package/dist/components/settlement/settlement.js +402 -366
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +1643 -1640
- package/dist/components/settlement/settlementStore.js +268 -157
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js.map +1 -1
- package/dist/components/socket/index.js +11 -11
- package/dist/components/socket/index.js.map +1 -1
- package/dist/components/spin/index.js +6 -6
- package/dist/components/spin/index.js.map +1 -1
- package/dist/components/spin/spin-style.less +436 -436
- package/dist/components/test/index.js +3 -3
- package/dist/components/test/index.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +5248 -5248
- package/dist/components/ticon/iconfont/iconfont.css +895 -895
- package/dist/components/ticon/iconfont/iconfont.json +1549 -1549
- package/dist/components/ticon/iconfont/iconfont.svg +593 -593
- package/dist/components/ticon/index.js.map +1 -1
- package/dist/components/touchScroll/index.js +9 -9
- package/dist/components/touchScroll/index.js.map +1 -1
- package/dist/components/touchTable/AuthProcess.js.map +1 -1
- package/dist/components/touchTable/generateWater.js.map +1 -1
- package/dist/components/touchTable/index.js +9 -9
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/index.less +369 -369
- package/dist/components/touchTable/utils.js.map +1 -1
- package/dist/demo/PopOverDemo.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/util/tools.js.map +1 -1
- package/locales/zh/tplus-components-touch.json +1 -1
- package/locales/zh-CN/tplus-components-touch.json +1 -1
- package/mocks/memberInfo.json +79 -79
- package/package.json +1 -1
- package/tsconfig.json +26 -26
|
@@ -41,7 +41,7 @@ var _createClass2 = require('babel-runtime/helpers/createClass');
|
|
|
41
41
|
|
|
42
42
|
var _createClass3 = _interopRequireDefault(_createClass2);
|
|
43
43
|
|
|
44
|
-
var _desc, _value, _class, _descriptor, _descriptor2,
|
|
44
|
+
var _desc, _value, _class, _descriptor, _descriptor2, _descriptor3, _descriptor4, _desc2, _value2, _class3, _descriptor5, _descriptor6, _descriptor7, _descriptor8, _descriptor9, _descriptor10, _descriptor11, _descriptor12, _descriptor13, _descriptor14, _desc3, _value3, _class5, _descriptor15, _descriptor16, _descriptor17, _descriptor18, _descriptor19;
|
|
45
45
|
|
|
46
46
|
var _mobx = require('mobx');
|
|
47
47
|
|
|
@@ -178,6 +178,10 @@ var SettlementStore = (_class = function () {
|
|
|
178
178
|
|
|
179
179
|
_initDefineProp(this, 'updateMemberInfo', _descriptor2, this);
|
|
180
180
|
|
|
181
|
+
_initDefineProp(this, 'updateCurrentMode', _descriptor3, this);
|
|
182
|
+
|
|
183
|
+
_initDefineProp(this, 'updateCardInfo', _descriptor4, this);
|
|
184
|
+
|
|
181
185
|
this.getCouponList = function (coupon_code) {
|
|
182
186
|
var _enumController$getEn = _mutantsUtil.enumController.getEnumOj(),
|
|
183
187
|
PayStyle = _enumController$getEn.PayStyle,
|
|
@@ -591,7 +595,7 @@ var SettlementStore = (_class = function () {
|
|
|
591
595
|
|
|
592
596
|
//抵现积分
|
|
593
597
|
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
594
|
-
Idmember: this.paymode.currentMode.
|
|
598
|
+
Idmember: this.paymode.currentMode.memberId,
|
|
595
599
|
TotalTaxAmount: this.paymode.amount,
|
|
596
600
|
BalanceTaxAmount: this.paymode.currentMode.value
|
|
597
601
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
@@ -624,7 +628,6 @@ var SettlementStore = (_class = function () {
|
|
|
624
628
|
|
|
625
629
|
if ((0, _trim3.default)(v) === "") {
|
|
626
630
|
(0, _mobx.runInAction)(function () {
|
|
627
|
-
_this7.paymode.currentMode.member = new Member(null);
|
|
628
631
|
_this7.paymode.currentMode.errinfo = "请输入储值卡";
|
|
629
632
|
});
|
|
630
633
|
return;
|
|
@@ -638,31 +641,29 @@ var SettlementStore = (_class = function () {
|
|
|
638
641
|
var address = '';
|
|
639
642
|
if (isNewRetailBCPos) {
|
|
640
643
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
|
641
|
-
address = '/
|
|
644
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v;
|
|
642
645
|
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function (result) {
|
|
643
646
|
var data = result.data;
|
|
644
647
|
var m = data;
|
|
645
|
-
_this7.paymode
|
|
646
|
-
|
|
647
|
-
_this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
|
|
648
|
-
_this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
|
|
649
|
-
if (!m || !m.ID) {
|
|
648
|
+
_this7.paymode.updateCardInfo(m);
|
|
649
|
+
if (!m || !m.StorageCardNo) {
|
|
650
650
|
(0, _mobx.runInAction)(function () {
|
|
651
651
|
_this7.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
652
652
|
});
|
|
653
653
|
} else {
|
|
654
654
|
(0, _mobx.runInAction)(function () {
|
|
655
655
|
_this7.paymode.currentMode.errinfo = "";
|
|
656
|
-
_this7.paymode.currentMode.
|
|
656
|
+
_this7.paymode.currentMode.memberId = m.ID;
|
|
657
657
|
_this7.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this7.brefund ? _this7.paymode.receivable : Math.max(_this7.paymode.receivable, 0));
|
|
658
658
|
_this7.updateEvent();
|
|
659
659
|
var message = '';
|
|
660
660
|
var sum = (0, _reduce3.default)(_this7.paymode.thePaymodes, function (total, cur) {
|
|
661
661
|
return total + cur.value;
|
|
662
662
|
}, 0);
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
663
|
+
// 对于卡不用判断会员的一些信息
|
|
664
|
+
// if (global.CheckMemberStorageProcessorBlock ) {
|
|
665
|
+
// message= CheckMemberStorageProcessorBlock.execute(m);
|
|
666
|
+
// }
|
|
666
667
|
if (!String.isNullOrEmpty(message)) {
|
|
667
668
|
_this7.paymode.currentMode.errinfo = message;
|
|
668
669
|
} else if (_this7.checkReceived(_this7.paymode.currentMode, "balance")) {
|
|
@@ -682,16 +683,6 @@ var SettlementStore = (_class = function () {
|
|
|
682
683
|
return (0, _tplusApi.tApi)({ SearchParams: { Key: v, IsSingleMember: true, IdStore: IdStore, StoreCode: StoreCode } }, address, false, false).then(function (result) {
|
|
683
684
|
var data = JSON.parse(result.Data);
|
|
684
685
|
var m = data && data.length > 0 && data[0];
|
|
685
|
-
|
|
686
|
-
var _ref9 = _mutantsUtil.platform || {},
|
|
687
|
-
isNewRetailBCPos = _ref9.isNewRetailBCPos;
|
|
688
|
-
|
|
689
|
-
if (isNewRetailBCPos) {
|
|
690
|
-
_this7.paymode && _this7.paymode.currentMode.member.setMeStorageCardId(m.MeStorageCardId);
|
|
691
|
-
_this7.paymode && _this7.paymode.currentMode.member.setStorageCardNo(m.StorageCardNo);
|
|
692
|
-
_this7.paymode && (_this7.paymode.currentMode.MeStorageCardId = m.MeStorageCardId);
|
|
693
|
-
_this7.paymode && (_this7.paymode.currentMode.StorageCardNo = m.StorageCardNo);
|
|
694
|
-
}
|
|
695
686
|
if (!m || !m.ID) {
|
|
696
687
|
(0, _mobx.runInAction)(function () {
|
|
697
688
|
_this7.paymode.currentMode.errinfo = "无效的会员卡号";
|
|
@@ -787,7 +778,7 @@ var SettlementStore = (_class = function () {
|
|
|
787
778
|
}
|
|
788
779
|
|
|
789
780
|
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
|
790
|
-
Idmember: this.paymode.currentMode.
|
|
781
|
+
Idmember: this.paymode.currentMode.memberId,
|
|
791
782
|
TotalTaxAmount: this.paymode.amount,
|
|
792
783
|
BalanceTaxAmount: this.paymode.amount
|
|
793
784
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
|
@@ -814,6 +805,22 @@ var SettlementStore = (_class = function () {
|
|
|
814
805
|
|
|
815
806
|
var value = (0, _utils.getFixedNumber)(v || (this.brefund ? this.paymode.receivable : Math.max(this.paymode.receivable, 0)));
|
|
816
807
|
var themode = (0, _find3.default)(this.paymode.paymodes, { 'paymentType': type });
|
|
808
|
+
var balance = null;
|
|
809
|
+
var rawbalance = null;
|
|
810
|
+
var storageCardNo = null;
|
|
811
|
+
var memberId = this.member && this.member.ID ? this.member.ID : null;
|
|
812
|
+
var cardTypeEnum = null;
|
|
813
|
+
var walletEnabled = null;
|
|
814
|
+
var meStorageCardId = null;
|
|
815
|
+
if (type === PayStyle.hyczk) {
|
|
816
|
+
// 会员概念改为卡,把这些字段都放开
|
|
817
|
+
cardTypeEnum = this.member.CardTypeEnum ? this.member.CardTypeEnum : null;
|
|
818
|
+
walletEnabled = this.member.WalletEnabled ? this.member.WalletEnabled : null;
|
|
819
|
+
storageCardNo = this.member.StorageCardNo ? this.member.StorageCardNo : null;
|
|
820
|
+
balance = this.member.BalanceStorage ? this.member.BalanceStorage : null;
|
|
821
|
+
rawbalance = this.member.BalanceStorage ? this.member.BalanceStorage : null;
|
|
822
|
+
meStorageCardId = this.member.MeStorageCardId ? this.member.MeStorageCardId : null;
|
|
823
|
+
}
|
|
817
824
|
var mode = (0, _mobx.observable)({
|
|
818
825
|
paymethodId: this.paymode.counter,
|
|
819
826
|
name: themode.name,
|
|
@@ -825,6 +832,14 @@ var SettlementStore = (_class = function () {
|
|
|
825
832
|
order: this.paymode.thePaymodes.length + 1,
|
|
826
833
|
paymentType: type,
|
|
827
834
|
djqs: [],
|
|
835
|
+
card: null,
|
|
836
|
+
cardTypeEnum: !notwithm ? cardTypeEnum : null,
|
|
837
|
+
walletEnabled: !notwithm ? walletEnabled : null,
|
|
838
|
+
memberId: !notwithm ? memberId : null,
|
|
839
|
+
meStorageCardId: !notwithm ? meStorageCardId : null,
|
|
840
|
+
storageCardNo: !notwithm ? storageCardNo : null,
|
|
841
|
+
balance: !notwithm ? balance : null,
|
|
842
|
+
rawbalance: !notwithm ? rawbalance : null,
|
|
828
843
|
member: new Member(!notwithm ? this.member : null),
|
|
829
844
|
authCode: '',
|
|
830
845
|
steadCashIntegral: null,
|
|
@@ -832,7 +847,7 @@ var SettlementStore = (_class = function () {
|
|
|
832
847
|
maxamount: this.paymode.amount
|
|
833
848
|
});
|
|
834
849
|
if (type == PayStyle.hyczk) {
|
|
835
|
-
if (!mode.
|
|
850
|
+
if (!mode.storageCardNo) {
|
|
836
851
|
(0, _mobx.runInAction)(function () {
|
|
837
852
|
mode.errinfo = '未录入储值卡';
|
|
838
853
|
});
|
|
@@ -978,8 +993,8 @@ var SettlementStore = (_class = function () {
|
|
|
978
993
|
}, {
|
|
979
994
|
key: 'commit',
|
|
980
995
|
value: function () {
|
|
981
|
-
var
|
|
982
|
-
var
|
|
996
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(bTest) {
|
|
997
|
+
var _ref10, isNewRetailBCPos;
|
|
983
998
|
|
|
984
999
|
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
|
985
1000
|
while (1) {
|
|
@@ -995,7 +1010,7 @@ var SettlementStore = (_class = function () {
|
|
|
995
1010
|
return _context2.abrupt('return', _promise2.default.resolve(true));
|
|
996
1011
|
|
|
997
1012
|
case 3:
|
|
998
|
-
|
|
1013
|
+
_ref10 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref10.isNewRetailBCPos;
|
|
999
1014
|
_context2.prev = 4;
|
|
1000
1015
|
|
|
1001
1016
|
if (!(this.type == 1)) {
|
|
@@ -1051,7 +1066,7 @@ var SettlementStore = (_class = function () {
|
|
|
1051
1066
|
}));
|
|
1052
1067
|
|
|
1053
1068
|
function commit(_x2) {
|
|
1054
|
-
return
|
|
1069
|
+
return _ref9.apply(this, arguments);
|
|
1055
1070
|
}
|
|
1056
1071
|
|
|
1057
1072
|
return commit;
|
|
@@ -1109,10 +1124,10 @@ var SettlementStore = (_class = function () {
|
|
|
1109
1124
|
}, {
|
|
1110
1125
|
key: 'save',
|
|
1111
1126
|
value: function () {
|
|
1112
|
-
var
|
|
1127
|
+
var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
|
|
1113
1128
|
var _this11 = this;
|
|
1114
1129
|
|
|
1115
|
-
var _enumController$getEn14, PayStyle,
|
|
1130
|
+
var _enumController$getEn14, PayStyle, _ref13, isNewRetailBCPos, IPMSG, RetailTypeEnum;
|
|
1116
1131
|
|
|
1117
1132
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
|
1118
1133
|
while (1) {
|
|
@@ -1134,17 +1149,16 @@ var SettlementStore = (_class = function () {
|
|
|
1134
1149
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
|
1135
1150
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
1136
1151
|
if (!Idmember) {
|
|
1137
|
-
Idmember = mode.
|
|
1152
|
+
Idmember = mode.memberId;
|
|
1138
1153
|
}
|
|
1139
1154
|
czkSum = Math.Add(czkSum, mode.value);
|
|
1140
|
-
var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this11.member.MeStorageCardId;
|
|
1141
1155
|
_this11.dto.RetailStorageDetails.push({
|
|
1142
1156
|
Code: mode.paymethodId,
|
|
1143
|
-
MeStorageCardId:
|
|
1157
|
+
MeStorageCardId: mode.meStorageCardId,
|
|
1144
1158
|
StoragePaymentAmount: mode.value,
|
|
1145
1159
|
IsOrigReturn: false,
|
|
1146
1160
|
BalanceStorage: mode.balance,
|
|
1147
|
-
Idmember: mode.
|
|
1161
|
+
Idmember: mode.memberId,
|
|
1148
1162
|
DynamicPropertyKeys: [],
|
|
1149
1163
|
DynamicPropertyValues: [],
|
|
1150
1164
|
DataSource: { Id: _this11.dataSource },
|
|
@@ -1180,7 +1194,7 @@ var SettlementStore = (_class = function () {
|
|
|
1180
1194
|
ReductionAmount: djq.amount,
|
|
1181
1195
|
EnableAmount: djq.doorsill,
|
|
1182
1196
|
CouponTitle: djq.name,
|
|
1183
|
-
IdMember: djq.UMemberID ? mode.
|
|
1197
|
+
IdMember: djq.UMemberID ? mode.memberId : null,
|
|
1184
1198
|
LastTS: djq.LastTS,
|
|
1185
1199
|
PromotionId: djq.promoId,
|
|
1186
1200
|
PromotionRuleId: djq.promoRuleId,
|
|
@@ -1192,15 +1206,12 @@ var SettlementStore = (_class = function () {
|
|
|
1192
1206
|
}
|
|
1193
1207
|
});
|
|
1194
1208
|
|
|
1195
|
-
var
|
|
1196
|
-
isNewRetailBCPos =
|
|
1209
|
+
var _ref12 = _mutantsUtil.platform || {},
|
|
1210
|
+
isNewRetailBCPos = _ref12.isNewRetailBCPos;
|
|
1197
1211
|
|
|
1198
1212
|
if (_this11.dto.RetailStorageDetails.length > 0) {
|
|
1199
1213
|
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
|
1200
1214
|
if (isNewRetailBCPos) {
|
|
1201
|
-
// this.dto.RetailStorageDetails && this.dto.RetailStorageDetails.forEach((value, index) => {
|
|
1202
|
-
// value.MeStorageCardId = (mode.MeStorageCardId ? mode.MeStorageCardId : this.member.MeStorageCardId);
|
|
1203
|
-
// })
|
|
1204
1215
|
_this11.dto.RetailPaymentDetails.push({
|
|
1205
1216
|
Code: _this11.paymode.counter,
|
|
1206
1217
|
OrigAmount: czkSum,
|
|
@@ -1227,7 +1238,7 @@ var SettlementStore = (_class = function () {
|
|
|
1227
1238
|
_this11.dto.Idmember = Idmember;
|
|
1228
1239
|
}
|
|
1229
1240
|
});
|
|
1230
|
-
|
|
1241
|
+
_ref13 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref13.isNewRetailBCPos;
|
|
1231
1242
|
|
|
1232
1243
|
console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
|
|
1233
1244
|
|
|
@@ -1297,7 +1308,7 @@ var SettlementStore = (_class = function () {
|
|
|
1297
1308
|
}));
|
|
1298
1309
|
|
|
1299
1310
|
function save() {
|
|
1300
|
-
return
|
|
1311
|
+
return _ref11.apply(this, arguments);
|
|
1301
1312
|
}
|
|
1302
1313
|
|
|
1303
1314
|
return save;
|
|
@@ -1310,7 +1321,7 @@ var SettlementStore = (_class = function () {
|
|
|
1310
1321
|
}, {
|
|
1311
1322
|
key: 'querySettleResult',
|
|
1312
1323
|
value: function () {
|
|
1313
|
-
var
|
|
1324
|
+
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
|
1314
1325
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
|
1315
1326
|
while (1) {
|
|
1316
1327
|
switch (_context4.prev = _context4.next) {
|
|
@@ -1338,7 +1349,7 @@ var SettlementStore = (_class = function () {
|
|
|
1338
1349
|
}));
|
|
1339
1350
|
|
|
1340
1351
|
function querySettleResult() {
|
|
1341
|
-
return
|
|
1352
|
+
return _ref14.apply(this, arguments);
|
|
1342
1353
|
}
|
|
1343
1354
|
|
|
1344
1355
|
return querySettleResult;
|
|
@@ -1364,37 +1375,37 @@ var SettlementStore = (_class = function () {
|
|
|
1364
1375
|
}, {
|
|
1365
1376
|
key: 'validePwd',
|
|
1366
1377
|
value: function () {
|
|
1367
|
-
var
|
|
1368
|
-
var
|
|
1378
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(value) {
|
|
1379
|
+
var _ref16, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, result, count, _result;
|
|
1369
1380
|
|
|
1370
1381
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
|
1371
1382
|
while (1) {
|
|
1372
1383
|
switch (_context5.prev = _context5.next) {
|
|
1373
1384
|
case 0:
|
|
1374
|
-
|
|
1385
|
+
_ref16 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref16.isNewRetailBCPos;
|
|
1375
1386
|
_context5.prev = 1;
|
|
1376
1387
|
|
|
1377
1388
|
if (!isNewRetailBCPos) {
|
|
1378
|
-
_context5.next =
|
|
1389
|
+
_context5.next = 27;
|
|
1379
1390
|
break;
|
|
1380
1391
|
}
|
|
1381
1392
|
|
|
1382
1393
|
cook1 = this.getAllCookies()['errorPwd'];
|
|
1383
1394
|
cook2 = cook1 && JSON.parse(cook1);
|
|
1384
1395
|
message = '密码输入错误';
|
|
1385
|
-
|
|
1396
|
+
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
|
1386
1397
|
|
|
1387
1398
|
if (!cook2) {
|
|
1388
1399
|
_context5.next = 12;
|
|
1389
1400
|
break;
|
|
1390
1401
|
}
|
|
1391
1402
|
|
|
1392
|
-
if (!cook2.hasOwnProperty(
|
|
1403
|
+
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1393
1404
|
_context5.next = 12;
|
|
1394
1405
|
break;
|
|
1395
1406
|
}
|
|
1396
1407
|
|
|
1397
|
-
if (!(cook2[
|
|
1408
|
+
if (!(cook2[memberStorageId] > 3)) {
|
|
1398
1409
|
_context5.next = 12;
|
|
1399
1410
|
break;
|
|
1400
1411
|
}
|
|
@@ -1403,60 +1414,78 @@ var SettlementStore = (_class = function () {
|
|
|
1403
1414
|
return _context5.abrupt('return', _promise2.default.resolve(message));
|
|
1404
1415
|
|
|
1405
1416
|
case 12:
|
|
1406
|
-
|
|
1407
|
-
|
|
1417
|
+
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId;
|
|
1418
|
+
result = null;
|
|
1419
|
+
|
|
1420
|
+
if (!(cardTypeEnum === 'BALANCE_CARD')) {
|
|
1421
|
+
_context5.next = 20;
|
|
1422
|
+
break;
|
|
1423
|
+
}
|
|
1424
|
+
|
|
1425
|
+
_context5.next = 17;
|
|
1426
|
+
return (0, _tplusApi.ccApi)({ password: _tplusApi.User.pwdEncrypt(value.pwd) }, '/member/MeMemberWallet/checkPaymentPassword/' + memberId, false, false);
|
|
1427
|
+
|
|
1428
|
+
case 17:
|
|
1429
|
+
result = _context5.sent;
|
|
1430
|
+
_context5.next = 23;
|
|
1431
|
+
break;
|
|
1432
|
+
|
|
1433
|
+
case 20:
|
|
1434
|
+
_context5.next = 22;
|
|
1435
|
+
return (0, _tplusApi.ccApi)({ password: _tplusApi.User.pwdEncrypt(value.pwd) }, '/marketingtool/MeStorageCard/updateStorageKey', false, false);
|
|
1408
1436
|
|
|
1409
|
-
case
|
|
1437
|
+
case 22:
|
|
1410
1438
|
result = _context5.sent;
|
|
1411
1439
|
|
|
1440
|
+
case 23:
|
|
1412
1441
|
if (!result.data) {
|
|
1413
1442
|
if (cook2) {
|
|
1414
|
-
if (cook2.hasOwnProperty(
|
|
1415
|
-
count = cook2[
|
|
1443
|
+
if (cook2.hasOwnProperty(memberStorageId + "")) {
|
|
1444
|
+
count = cook2[memberStorageId];
|
|
1416
1445
|
|
|
1417
|
-
cook2[
|
|
1446
|
+
cook2[memberStorageId] = count + 1;
|
|
1418
1447
|
} else {
|
|
1419
|
-
cook2[
|
|
1448
|
+
cook2[memberStorageId] = 1;
|
|
1420
1449
|
}
|
|
1421
1450
|
} else {
|
|
1422
1451
|
cook2 = {};
|
|
1423
|
-
cook2[
|
|
1452
|
+
cook2[memberStorageId] = 1;
|
|
1424
1453
|
}
|
|
1425
1454
|
this.setCookie('errorPwd', '', -1);
|
|
1426
1455
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
|
1427
1456
|
}
|
|
1428
1457
|
return _context5.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
|
1429
1458
|
|
|
1430
|
-
case
|
|
1431
|
-
_context5.next =
|
|
1459
|
+
case 27:
|
|
1460
|
+
_context5.next = 29;
|
|
1432
1461
|
return (0, _tplusApi.tApi)({ "CheckoutParams": {
|
|
1433
1462
|
"Idmember": value.id,
|
|
1434
1463
|
"Password": value.pwd
|
|
1435
1464
|
} }, 'AA.DR.newRetailMember.CheckoutMemberPassword', false, false);
|
|
1436
1465
|
|
|
1437
|
-
case
|
|
1466
|
+
case 29:
|
|
1438
1467
|
_result = _context5.sent;
|
|
1439
1468
|
return _context5.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
|
1440
1469
|
|
|
1441
|
-
case
|
|
1442
|
-
_context5.next =
|
|
1470
|
+
case 31:
|
|
1471
|
+
_context5.next = 36;
|
|
1443
1472
|
break;
|
|
1444
1473
|
|
|
1445
|
-
case
|
|
1446
|
-
_context5.prev =
|
|
1474
|
+
case 33:
|
|
1475
|
+
_context5.prev = 33;
|
|
1447
1476
|
_context5.t0 = _context5['catch'](1);
|
|
1448
1477
|
return _context5.abrupt('return', "failed");
|
|
1449
1478
|
|
|
1450
|
-
case
|
|
1479
|
+
case 36:
|
|
1451
1480
|
case 'end':
|
|
1452
1481
|
return _context5.stop();
|
|
1453
1482
|
}
|
|
1454
1483
|
}
|
|
1455
|
-
}, _callee5, this, [[1,
|
|
1484
|
+
}, _callee5, this, [[1, 33]]);
|
|
1456
1485
|
}));
|
|
1457
1486
|
|
|
1458
1487
|
function validePwd(_x3) {
|
|
1459
|
-
return
|
|
1488
|
+
return _ref15.apply(this, arguments);
|
|
1460
1489
|
}
|
|
1461
1490
|
|
|
1462
1491
|
return validePwd;
|
|
@@ -1478,7 +1507,7 @@ var SettlementStore = (_class = function () {
|
|
|
1478
1507
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
|
1479
1508
|
return (0, _tplusApi.ccApi)({
|
|
1480
1509
|
Idstore: idstore,
|
|
1481
|
-
meMemberId: _this12.
|
|
1510
|
+
meMemberId: _this12.paymode.currentMode.memberId,
|
|
1482
1511
|
oldPassword: null,
|
|
1483
1512
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
|
1484
1513
|
dataSource: "POS"
|
|
@@ -1495,7 +1524,7 @@ var SettlementStore = (_class = function () {
|
|
|
1495
1524
|
var _this13 = this;
|
|
1496
1525
|
|
|
1497
1526
|
return function () {
|
|
1498
|
-
var
|
|
1527
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(_this) {
|
|
1499
1528
|
var _getLoginInfo, IdStore, StoreCode, resp;
|
|
1500
1529
|
|
|
1501
1530
|
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
|
@@ -1510,7 +1539,7 @@ var SettlementStore = (_class = function () {
|
|
|
1510
1539
|
resp = _context6.sent;
|
|
1511
1540
|
|
|
1512
1541
|
_this.member = resp;
|
|
1513
|
-
_this.paymode.currentMode.
|
|
1542
|
+
_this.paymode.currentMode.storageCardNo = resp.StorageCardNo;
|
|
1514
1543
|
return _context6.abrupt('return', _promise2.default.resolve(resp));
|
|
1515
1544
|
|
|
1516
1545
|
case 7:
|
|
@@ -1522,10 +1551,78 @@ var SettlementStore = (_class = function () {
|
|
|
1522
1551
|
}));
|
|
1523
1552
|
|
|
1524
1553
|
return function (_x4) {
|
|
1554
|
+
return _ref17.apply(this, arguments);
|
|
1555
|
+
};
|
|
1556
|
+
}();
|
|
1557
|
+
}
|
|
1558
|
+
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
|
1559
|
+
enumerable: true,
|
|
1560
|
+
initializer: function initializer() {
|
|
1561
|
+
var _this14 = this;
|
|
1562
|
+
|
|
1563
|
+
return function () {
|
|
1564
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(memberId) {
|
|
1565
|
+
var result;
|
|
1566
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
|
1567
|
+
while (1) {
|
|
1568
|
+
switch (_context7.prev = _context7.next) {
|
|
1569
|
+
case 0:
|
|
1570
|
+
_context7.next = 2;
|
|
1571
|
+
return (0, _tplusApi.ccApi)({}, '/marketingtool/MeStorageCard/getCardInfoByMemberId/' + memberId, false, false, { method: 'get' });
|
|
1572
|
+
|
|
1573
|
+
case 2:
|
|
1574
|
+
result = _context7.sent;
|
|
1575
|
+
|
|
1576
|
+
if (result && result.data.length) {
|
|
1577
|
+
result.data.forEach(function (m) {
|
|
1578
|
+
if (m.CardTypeEnum === 'BALANCE_CARD') {
|
|
1579
|
+
// 会员概念改为卡,把这些字段都放开
|
|
1580
|
+
_this14.paymode.updateCardInfo(m);
|
|
1581
|
+
}
|
|
1582
|
+
});
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
case 4:
|
|
1586
|
+
case 'end':
|
|
1587
|
+
return _context7.stop();
|
|
1588
|
+
}
|
|
1589
|
+
}
|
|
1590
|
+
}, _callee7, _this14);
|
|
1591
|
+
}));
|
|
1592
|
+
|
|
1593
|
+
return function (_x5) {
|
|
1525
1594
|
return _ref18.apply(this, arguments);
|
|
1526
1595
|
};
|
|
1527
1596
|
}();
|
|
1528
1597
|
}
|
|
1598
|
+
}), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
|
1599
|
+
enumerable: true,
|
|
1600
|
+
initializer: function initializer() {
|
|
1601
|
+
var _this15 = this;
|
|
1602
|
+
|
|
1603
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
|
1604
|
+
var address, result;
|
|
1605
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
|
1606
|
+
while (1) {
|
|
1607
|
+
switch (_context8.prev = _context8.next) {
|
|
1608
|
+
case 0:
|
|
1609
|
+
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + _this15.paymode.currentMode.storageCardNo;
|
|
1610
|
+
_context8.next = 3;
|
|
1611
|
+
return (0, _tplusApi.ccApi)({}, address, false, false, { method: 'get', timeout_skip: true });
|
|
1612
|
+
|
|
1613
|
+
case 3:
|
|
1614
|
+
result = _context8.sent;
|
|
1615
|
+
|
|
1616
|
+
_this15.paymode.updateCardInfo(result.data);
|
|
1617
|
+
|
|
1618
|
+
case 5:
|
|
1619
|
+
case 'end':
|
|
1620
|
+
return _context8.stop();
|
|
1621
|
+
}
|
|
1622
|
+
}
|
|
1623
|
+
}, _callee8, _this15);
|
|
1624
|
+
}));
|
|
1625
|
+
}
|
|
1529
1626
|
}), _applyDecoratedDescriptor(_class.prototype, 'addDjq', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addDjq'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeClickFocusOnly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeClickFocusOnly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeValue'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPayDirectly', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPayDirectly'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'addPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'addPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'delPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'delPay'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'setDtoID', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'setDtoID'), _class.prototype)), _class);
|
|
1530
1627
|
exports.default = SettlementStore;
|
|
1531
1628
|
var PayMode = exports.PayMode = (_class3 = function () {
|
|
@@ -1540,15 +1637,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1540
1637
|
this.onlineamount = 0;
|
|
1541
1638
|
this.maxamount = 0;
|
|
1542
1639
|
|
|
1543
|
-
_initDefineProp(this, 'currentFocus',
|
|
1640
|
+
_initDefineProp(this, 'currentFocus', _descriptor5, this);
|
|
1641
|
+
|
|
1642
|
+
_initDefineProp(this, 'received', _descriptor6, this);
|
|
1544
1643
|
|
|
1545
|
-
_initDefineProp(this, '
|
|
1644
|
+
_initDefineProp(this, 'receivable', _descriptor7, this);
|
|
1546
1645
|
|
|
1547
|
-
_initDefineProp(this, '
|
|
1646
|
+
_initDefineProp(this, 'paymodes', _descriptor8, this);
|
|
1548
1647
|
|
|
1549
|
-
_initDefineProp(this, '
|
|
1648
|
+
_initDefineProp(this, 'thePaymodes', _descriptor9, this);
|
|
1550
1649
|
|
|
1551
|
-
_initDefineProp(this, '
|
|
1650
|
+
_initDefineProp(this, 'storageCardNo', _descriptor10, this);
|
|
1651
|
+
|
|
1652
|
+
_initDefineProp(this, 'balance', _descriptor11, this);
|
|
1552
1653
|
|
|
1553
1654
|
this.currentMode = null;
|
|
1554
1655
|
this.checkList = [];
|
|
@@ -1557,11 +1658,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1557
1658
|
hotKey: "Ctrl+M"
|
|
1558
1659
|
};
|
|
1559
1660
|
|
|
1560
|
-
_initDefineProp(this, 'calcCheckList',
|
|
1661
|
+
_initDefineProp(this, 'calcCheckList', _descriptor12, this);
|
|
1561
1662
|
|
|
1562
|
-
_initDefineProp(this, 'setCouponNum',
|
|
1663
|
+
_initDefineProp(this, 'setCouponNum', _descriptor13, this);
|
|
1563
1664
|
|
|
1564
|
-
_initDefineProp(this, 'addDjqs',
|
|
1665
|
+
_initDefineProp(this, 'addDjqs', _descriptor14, this);
|
|
1565
1666
|
}
|
|
1566
1667
|
// @observable store = null;
|
|
1567
1668
|
|
|
@@ -1597,10 +1698,22 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1597
1698
|
this.received = (0, _utils.getFixedNumber)(sum);
|
|
1598
1699
|
this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
|
|
1599
1700
|
}
|
|
1701
|
+
}, {
|
|
1702
|
+
key: 'updateCardInfo',
|
|
1703
|
+
value: function updateCardInfo(m) {
|
|
1704
|
+
this.currentMode.isNeedPassword = m.IsNeedPassword;
|
|
1705
|
+
this.currentMode.meStorageCardId = m.MeStorageCardId;
|
|
1706
|
+
this.currentMode.storageCardNo = m.StorageCardNo;
|
|
1707
|
+
this.currentMode.balance = m.BalanceStorage;
|
|
1708
|
+
this.currentMode.rawbalance = m.BalanceStorage;
|
|
1709
|
+
this.currentMode.cardTypeEnum = m.CardTypeEnum;
|
|
1710
|
+
this.currentMode.walletEnabled = m.WalletEnabled;
|
|
1711
|
+
this.currentMode.memberId = m.ID;
|
|
1712
|
+
}
|
|
1600
1713
|
}, {
|
|
1601
1714
|
key: 'calcDjqCheckValue',
|
|
1602
1715
|
value: function calcDjqCheckValue(q1, dto, params) {
|
|
1603
|
-
var
|
|
1716
|
+
var _this16 = this;
|
|
1604
1717
|
|
|
1605
1718
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
|
1606
1719
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
|
@@ -1614,8 +1727,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1614
1727
|
this.checkList = [];
|
|
1615
1728
|
}
|
|
1616
1729
|
|
|
1617
|
-
var
|
|
1618
|
-
isNewRetailBCPos =
|
|
1730
|
+
var _ref20 = _mutantsUtil.platform || {},
|
|
1731
|
+
isNewRetailBCPos = _ref20.isNewRetailBCPos;
|
|
1619
1732
|
|
|
1620
1733
|
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
|
1621
1734
|
PayStyle = _enumController$getEn15.PayStyle,
|
|
@@ -1647,7 +1760,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1647
1760
|
if (!q1.checked) {
|
|
1648
1761
|
this.checkList.forEach(function (ele, i) {
|
|
1649
1762
|
if (ele.id === q1.id) {
|
|
1650
|
-
|
|
1763
|
+
_this16.checkList.splice(i, 1);
|
|
1651
1764
|
}
|
|
1652
1765
|
});
|
|
1653
1766
|
} else {
|
|
@@ -1719,24 +1832,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1719
1832
|
if (result && result.length != 0) {
|
|
1720
1833
|
result.forEach(function (element, index) {
|
|
1721
1834
|
var djq1 = false;
|
|
1722
|
-
|
|
1835
|
+
_this16.currentMode.djqs.forEach(function (djq) {
|
|
1723
1836
|
if (element.id === djq.id) {
|
|
1724
1837
|
djq1 = true;
|
|
1725
1838
|
}
|
|
1726
1839
|
});
|
|
1727
1840
|
|
|
1728
|
-
var
|
|
1729
|
-
couponCode =
|
|
1730
|
-
name =
|
|
1731
|
-
tieredAmountResult =
|
|
1732
|
-
fromDate =
|
|
1733
|
-
dateMount =
|
|
1734
|
-
promoMethodEnum =
|
|
1735
|
-
discountPct =
|
|
1736
|
-
nominalAmount =
|
|
1737
|
-
promoId =
|
|
1738
|
-
id =
|
|
1739
|
-
doorsill =
|
|
1841
|
+
var _ref21 = element || {},
|
|
1842
|
+
couponCode = _ref21.couponCode,
|
|
1843
|
+
name = _ref21.name,
|
|
1844
|
+
tieredAmountResult = _ref21.tieredAmountResult,
|
|
1845
|
+
fromDate = _ref21.fromDate,
|
|
1846
|
+
dateMount = _ref21.dateMount,
|
|
1847
|
+
promoMethodEnum = _ref21.promoMethodEnum,
|
|
1848
|
+
discountPct = _ref21.discountPct,
|
|
1849
|
+
nominalAmount = _ref21.nominalAmount,
|
|
1850
|
+
promoId = _ref21.promoId,
|
|
1851
|
+
id = _ref21.id,
|
|
1852
|
+
doorsill = _ref21.doorsill;
|
|
1740
1853
|
|
|
1741
1854
|
var condValue = tieredAmountResult.condValue,
|
|
1742
1855
|
promoDiscount = tieredAmountResult.promoDiscount,
|
|
@@ -1764,10 +1877,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1764
1877
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
|
1765
1878
|
// id
|
|
1766
1879
|
// })
|
|
1767
|
-
|
|
1880
|
+
_this16.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
|
1768
1881
|
djq1 = false;
|
|
1769
1882
|
} else {
|
|
1770
|
-
|
|
1883
|
+
_this16.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
|
1771
1884
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
|
1772
1885
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
|
1773
1886
|
}
|
|
@@ -1780,8 +1893,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1780
1893
|
}, {
|
|
1781
1894
|
key: 'calcDjqValue',
|
|
1782
1895
|
value: function calcDjqValue(q1) {
|
|
1783
|
-
var
|
|
1784
|
-
isNewRetailBCPos =
|
|
1896
|
+
var _ref22 = _mutantsUtil.platform || {},
|
|
1897
|
+
isNewRetailBCPos = _ref22.isNewRetailBCPos;
|
|
1785
1898
|
|
|
1786
1899
|
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
|
1787
1900
|
Differentiate = _enumController$getEn16.Differentiate;
|
|
@@ -1866,28 +1979,28 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1866
1979
|
}, {
|
|
1867
1980
|
key: 'calcMemberBalance',
|
|
1868
1981
|
value: function calcMemberBalance() {
|
|
1869
|
-
this.currentMode.balance = this.currentMode.
|
|
1982
|
+
this.currentMode.balance = this.currentMode.rawbalance - this.currentMode.value;
|
|
1870
1983
|
}
|
|
1871
1984
|
}, {
|
|
1872
1985
|
key: 'setPaymodes',
|
|
1873
1986
|
value: function () {
|
|
1874
|
-
var
|
|
1875
|
-
var
|
|
1987
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(type, isIntegralExchange) {
|
|
1988
|
+
var _this17 = this;
|
|
1876
1989
|
|
|
1877
1990
|
var _enumController$getEn18, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
|
1878
1991
|
|
|
1879
|
-
return _regenerator2.default.wrap(function
|
|
1992
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
|
1880
1993
|
while (1) {
|
|
1881
|
-
switch (
|
|
1994
|
+
switch (_context9.prev = _context9.next) {
|
|
1882
1995
|
case 0:
|
|
1883
1996
|
_enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn18.settleStyleType, PayStyle = _enumController$getEn18.PayStyle;
|
|
1884
1997
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
|
1885
1998
|
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
|
1886
|
-
|
|
1999
|
+
_context9.next = 5;
|
|
1887
2000
|
return (0, _tplusApi.tApi)({ param: param }, 'chanjet.RE.NewPos.GetNewStoreSettleStyles', false, false);
|
|
1888
2001
|
|
|
1889
2002
|
case 5:
|
|
1890
|
-
modes =
|
|
2003
|
+
modes = _context9.sent;
|
|
1891
2004
|
|
|
1892
2005
|
if (modes) {
|
|
1893
2006
|
(0, _mobx.runInAction)(function () {
|
|
@@ -1912,21 +2025,21 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1912
2025
|
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
|
|
1913
2026
|
});
|
|
1914
2027
|
});
|
|
1915
|
-
|
|
2028
|
+
_this17.paymodes = paymodes;
|
|
1916
2029
|
//modes.QuickSettleStyles
|
|
1917
2030
|
});
|
|
1918
2031
|
}
|
|
1919
2032
|
|
|
1920
2033
|
case 7:
|
|
1921
2034
|
case 'end':
|
|
1922
|
-
return
|
|
2035
|
+
return _context9.stop();
|
|
1923
2036
|
}
|
|
1924
2037
|
}
|
|
1925
|
-
},
|
|
2038
|
+
}, _callee9, this);
|
|
1926
2039
|
}));
|
|
1927
2040
|
|
|
1928
|
-
function setPaymodes(
|
|
1929
|
-
return
|
|
2041
|
+
function setPaymodes(_x6, _x7) {
|
|
2042
|
+
return _ref23.apply(this, arguments);
|
|
1930
2043
|
}
|
|
1931
2044
|
|
|
1932
2045
|
return setPaymodes;
|
|
@@ -1943,47 +2056,57 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1943
2056
|
}
|
|
1944
2057
|
}]);
|
|
1945
2058
|
return PayMode;
|
|
1946
|
-
}(), (
|
|
2059
|
+
}(), (_descriptor5 = _applyDecoratedDescriptor(_class3.prototype, 'currentFocus', [_mobx.observable], {
|
|
1947
2060
|
enumerable: true,
|
|
1948
2061
|
initializer: function initializer() {
|
|
1949
2062
|
return "";
|
|
1950
2063
|
}
|
|
1951
|
-
}),
|
|
2064
|
+
}), _descriptor6 = _applyDecoratedDescriptor(_class3.prototype, 'received', [_mobx.observable], {
|
|
1952
2065
|
enumerable: true,
|
|
1953
2066
|
initializer: function initializer() {
|
|
1954
2067
|
return 0;
|
|
1955
2068
|
}
|
|
1956
|
-
}),
|
|
2069
|
+
}), _descriptor7 = _applyDecoratedDescriptor(_class3.prototype, 'receivable', [_mobx.observable], {
|
|
1957
2070
|
enumerable: true,
|
|
1958
2071
|
initializer: function initializer() {
|
|
1959
2072
|
return 0;
|
|
1960
2073
|
}
|
|
1961
|
-
}),
|
|
2074
|
+
}), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'paymodes', [_mobx.observable], {
|
|
1962
2075
|
enumerable: true,
|
|
1963
2076
|
initializer: function initializer() {
|
|
1964
2077
|
return [];
|
|
1965
2078
|
}
|
|
1966
|
-
}),
|
|
2079
|
+
}), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'thePaymodes', [_mobx.observable], {
|
|
1967
2080
|
enumerable: true,
|
|
1968
2081
|
initializer: function initializer() {
|
|
1969
2082
|
return [];
|
|
1970
2083
|
}
|
|
1971
|
-
}),
|
|
2084
|
+
}), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2085
|
+
enumerable: true,
|
|
2086
|
+
initializer: function initializer() {
|
|
2087
|
+
return null;
|
|
2088
|
+
}
|
|
2089
|
+
}), _descriptor11 = _applyDecoratedDescriptor(_class3.prototype, 'balance', [_mobx.observable], {
|
|
2090
|
+
enumerable: true,
|
|
2091
|
+
initializer: function initializer() {
|
|
2092
|
+
return null;
|
|
2093
|
+
}
|
|
2094
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'clean', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clean'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clear', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clear'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcReserved', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcReserved'), _class3.prototype), _descriptor12 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
|
|
1972
2095
|
enumerable: true,
|
|
1973
2096
|
initializer: function initializer() {
|
|
1974
|
-
var
|
|
2097
|
+
var _this18 = this;
|
|
1975
2098
|
|
|
1976
2099
|
return function () {
|
|
1977
|
-
|
|
2100
|
+
_this18.checkList = [];
|
|
1978
2101
|
};
|
|
1979
2102
|
}
|
|
1980
|
-
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype),
|
|
2103
|
+
}), _applyDecoratedDescriptor(_class3.prototype, 'updateCardInfo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateCardInfo'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor13 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
|
1981
2104
|
enumerable: true,
|
|
1982
2105
|
initializer: function initializer() {
|
|
1983
|
-
var
|
|
2106
|
+
var _this19 = this;
|
|
1984
2107
|
|
|
1985
2108
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
|
1986
|
-
|
|
2109
|
+
_this19.currentMode.djqs.forEach(function (ele) {
|
|
1987
2110
|
if (ele.id === id) {
|
|
1988
2111
|
promoMethodEnum == "CASH_COUPON" ? ele.amount = nominalAmount : ele.amount = promoDiscount;
|
|
1989
2112
|
ele.couponCategoryEnum = couponNum;
|
|
@@ -1993,10 +2116,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
1993
2116
|
});
|
|
1994
2117
|
};
|
|
1995
2118
|
}
|
|
1996
|
-
}),
|
|
2119
|
+
}), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
|
1997
2120
|
enumerable: true,
|
|
1998
2121
|
initializer: function initializer() {
|
|
1999
|
-
var
|
|
2122
|
+
var _this20 = this;
|
|
2000
2123
|
|
|
2001
2124
|
return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
|
2002
2125
|
var djq = {
|
|
@@ -2018,25 +2141,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
|
2018
2141
|
couponCategoryEnum: couponCategoryEnum,
|
|
2019
2142
|
id: id
|
|
2020
2143
|
};
|
|
2021
|
-
|
|
2144
|
+
_this20.currentMode.djqs.push(djq);
|
|
2022
2145
|
};
|
|
2023
2146
|
}
|
|
2024
2147
|
}), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'reCalculationDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'reCalculationDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'clearDjqs', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'clearDjqs'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'setCurrentModeValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'setCurrentModeValue'), _class3.prototype), _applyDecoratedDescriptor(_class3.prototype, 'calcMemberBalance', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcMemberBalance'), _class3.prototype)), _class3);
|
|
2025
2148
|
var Member = exports.Member = (_class5 = function () {
|
|
2026
2149
|
function Member(m) {
|
|
2027
|
-
var
|
|
2150
|
+
var _this21 = this;
|
|
2028
2151
|
|
|
2029
2152
|
(0, _classCallCheck3.default)(this, Member);
|
|
2030
2153
|
|
|
2031
|
-
_initDefineProp(this, 'cardNo',
|
|
2154
|
+
_initDefineProp(this, 'cardNo', _descriptor15, this);
|
|
2032
2155
|
|
|
2033
|
-
_initDefineProp(this, 'balance',
|
|
2156
|
+
_initDefineProp(this, 'balance', _descriptor16, this);
|
|
2034
2157
|
|
|
2035
|
-
_initDefineProp(this, 'exchangable',
|
|
2158
|
+
_initDefineProp(this, 'exchangable', _descriptor17, this);
|
|
2036
2159
|
|
|
2037
|
-
_initDefineProp(this, '
|
|
2160
|
+
_initDefineProp(this, 'meStorageCardId', _descriptor18, this);
|
|
2038
2161
|
|
|
2039
|
-
_initDefineProp(this, '
|
|
2162
|
+
_initDefineProp(this, 'storageCardNo', _descriptor19, this);
|
|
2040
2163
|
|
|
2041
2164
|
if (m) {
|
|
2042
2165
|
this.id = m.ID;
|
|
@@ -2047,17 +2170,15 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2047
2170
|
return key == 'canusedbalancestorage';
|
|
2048
2171
|
});
|
|
2049
2172
|
|
|
2050
|
-
var
|
|
2051
|
-
isNewRetailBCPos =
|
|
2173
|
+
var _ref24 = _mutantsUtil.platform || {},
|
|
2174
|
+
isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
|
2052
2175
|
|
|
2053
|
-
m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
|
|
2054
|
-
m.MeStorageCardId && (this.MeStorageCardId = m.MeStorageCardId);
|
|
2055
2176
|
(0, _mobx.runInAction)(function () {
|
|
2056
|
-
|
|
2177
|
+
_this21.cardNo = m.CardCode;
|
|
2057
2178
|
if (index >= 0) {
|
|
2058
|
-
|
|
2179
|
+
_this21.balance = parseFloat(m.DynamicPropertyValues[index]);
|
|
2059
2180
|
} else {
|
|
2060
|
-
|
|
2181
|
+
_this21.balance = _this21.rawbalance;
|
|
2061
2182
|
}
|
|
2062
2183
|
});
|
|
2063
2184
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|
|
@@ -2077,32 +2198,22 @@ var Member = exports.Member = (_class5 = function () {
|
|
|
2077
2198
|
this.cardNo = v;
|
|
2078
2199
|
this.id = null;
|
|
2079
2200
|
}
|
|
2080
|
-
}, {
|
|
2081
|
-
key: 'setMeStorageCardId',
|
|
2082
|
-
value: function setMeStorageCardId(v) {
|
|
2083
|
-
this.MeStorageCardId = v;
|
|
2084
|
-
}
|
|
2085
|
-
}, {
|
|
2086
|
-
key: 'setStorageCardNo',
|
|
2087
|
-
value: function setStorageCardNo(v) {
|
|
2088
|
-
this.StorageCardNo = v;
|
|
2089
|
-
}
|
|
2090
2201
|
}]);
|
|
2091
2202
|
return Member;
|
|
2092
|
-
}(), (
|
|
2203
|
+
}(), (_descriptor15 = _applyDecoratedDescriptor(_class5.prototype, 'cardNo', [_mobx.observable], {
|
|
2093
2204
|
enumerable: true,
|
|
2094
2205
|
initializer: null
|
|
2095
|
-
}),
|
|
2206
|
+
}), _descriptor16 = _applyDecoratedDescriptor(_class5.prototype, 'balance', [_mobx.observable], {
|
|
2096
2207
|
enumerable: true,
|
|
2097
2208
|
initializer: null
|
|
2098
|
-
}),
|
|
2209
|
+
}), _descriptor17 = _applyDecoratedDescriptor(_class5.prototype, 'exchangable', [_mobx.observable], {
|
|
2099
2210
|
enumerable: true,
|
|
2100
2211
|
initializer: null
|
|
2101
|
-
}),
|
|
2212
|
+
}), _descriptor18 = _applyDecoratedDescriptor(_class5.prototype, 'meStorageCardId', [_mobx.observable], {
|
|
2102
2213
|
enumerable: true,
|
|
2103
2214
|
initializer: null
|
|
2104
|
-
}),
|
|
2215
|
+
}), _descriptor19 = _applyDecoratedDescriptor(_class5.prototype, 'storageCardNo', [_mobx.observable], {
|
|
2105
2216
|
enumerable: true,
|
|
2106
2217
|
initializer: null
|
|
2107
|
-
}), _applyDecoratedDescriptor(_class5.prototype, 'setExchangable', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setExchangable'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setCardNo'), _class5.prototype)
|
|
2218
|
+
}), _applyDecoratedDescriptor(_class5.prototype, 'setExchangable', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setExchangable'), _class5.prototype), _applyDecoratedDescriptor(_class5.prototype, 'setCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class5.prototype, 'setCardNo'), _class5.prototype)), _class5);
|
|
2108
2219
|
//# sourceMappingURL=settlementStore.js.map
|