tplus-components-touch 3.40.1 → 3.41.1
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/dist/components/billSearch/api.js +74 -13
- package/dist/components/billSearch/api.js.map +1 -1
- package/dist/components/billSearch/index.js +76 -41
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/commonForm/addressPicker/index.js +16 -7
- package/dist/components/commonForm/addressPicker/index.js.map +1 -1
- package/dist/components/commonForm/datePicker/index.js +6 -3
- package/dist/components/commonForm/datePicker/index.js.map +1 -1
- package/dist/components/commonForm/formControl/index.js +2 -1
- package/dist/components/commonForm/formControl/index.js.map +1 -1
- package/dist/components/commonForm/index.js +9 -3
- package/dist/components/commonForm/index.js.map +1 -1
- package/dist/components/deliverySearch/index.js +1 -5
- package/dist/components/deliverySearch/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +52 -0
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/input/style.less +7 -0
- package/dist/components/inventorySearch/tab.js +1 -6
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/layout/style.less +1 -1
- package/dist/components/loading/loadingContent.js +2 -5
- package/dist/components/loading/loadingContent.js.map +1 -1
- package/dist/components/message/index.js +5 -4
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/notification/index.js +12 -11
- package/dist/components/notification/index.js.map +1 -1
- package/dist/components/presale/pickup.js +479 -0
- package/dist/components/presale/pickup.js.map +1 -0
- package/dist/components/presale/style.less +59 -0
- package/dist/components/progressState/EmptyAndErrorView.js +7 -5
- package/dist/components/progressState/EmptyAndErrorView.js.map +1 -1
- package/dist/components/settlement/prototypeTable/index.js +3 -1
- package/dist/components/settlement/prototypeTable/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +413 -164
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +23 -8
- package/dist/components/settlement/settlementStore.js +249 -106
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/settlement/utils.js +2 -2
- package/dist/components/settlement/utils.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +3 -3
- package/dist/components/ticon/iconfont/iconfont.css +3 -3
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/touchTable/index.js +15 -5
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/index.js +8 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
@@ -5,6 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.Member = exports.PayMode = exports.default = undefined;
|
7
7
|
|
8
|
+
var _isInteger = require('babel-runtime/core-js/number/is-integer');
|
9
|
+
|
10
|
+
var _isInteger2 = _interopRequireDefault(_isInteger);
|
11
|
+
|
8
12
|
var _defineProperty = require('babel-runtime/core-js/object/define-property');
|
9
13
|
|
10
14
|
var _defineProperty2 = _interopRequireDefault(_defineProperty);
|
@@ -161,7 +165,7 @@ function _initializerWarningHelper(descriptor, context) {
|
|
161
165
|
var t = _mutantsMicrofx.i18n.getFixedT(null, 'newretail');
|
162
166
|
|
163
167
|
var SettlementStore = (_class = function () {
|
164
|
-
//
|
168
|
+
// 预售都是全款;预订是否全款,在点击确认支付时计算订金和商品金额计算得出
|
165
169
|
function SettlementStore() {
|
166
170
|
var _this2 = this;
|
167
171
|
|
@@ -176,6 +180,8 @@ var SettlementStore = (_class = function () {
|
|
176
180
|
|
177
181
|
_initDefineProp(this, 'newStyle', _descriptor, this);
|
178
182
|
|
183
|
+
this.isFull = true;
|
184
|
+
|
179
185
|
_initDefineProp(this, 'setNewStyle', _descriptor2, this);
|
180
186
|
|
181
187
|
_initDefineProp(this, 'queryPwd', _descriptor3, this);
|
@@ -276,7 +282,7 @@ var SettlementStore = (_class = function () {
|
|
276
282
|
}
|
277
283
|
detailDTO.listPrice = JSON.getCellValue(item, "listPrice");
|
278
284
|
detailDTO.netAmountWithTax = Math.Multiply(detailDTO.listPrice, Math.Minus(item.Quantity, bookingQuantity)); //item.TaxAmount;
|
279
|
-
//}
|
285
|
+
//}
|
280
286
|
detailDTO.taxRate = item.TaxRate;
|
281
287
|
detailDTO.quantity = item.Quantity;
|
282
288
|
|
@@ -345,6 +351,10 @@ var SettlementStore = (_class = function () {
|
|
345
351
|
return (0, _tplusApi.ccApi)({}, '/marketingtool/paygift/executeRightsForPos/' + _this2.billID, false, false, { method: 'get', timeout_skip: true });
|
346
352
|
};
|
347
353
|
|
354
|
+
this.getRefWareHouseList = function () {
|
355
|
+
return (0, _tplusApi.ccApi)({}, '/retail/RetailPos/getRefWareHouseList', false, false);
|
356
|
+
};
|
357
|
+
|
348
358
|
this.checkCoupon = function () {
|
349
359
|
var _ref2 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(sn) {
|
350
360
|
var _ref3, isNewRetailBCPos, _enumController$getEn3, PayStyle, Differentiate;
|
@@ -498,7 +508,8 @@ var SettlementStore = (_class = function () {
|
|
498
508
|
var params = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('cloudPrintArguments');
|
499
509
|
if (params) this.cloudPrintArguments = params;
|
500
510
|
this.setNewStyle();
|
501
|
-
}
|
511
|
+
} //type==2
|
512
|
+
|
502
513
|
|
503
514
|
(0, _createClass3.default)(SettlementStore, [{
|
504
515
|
key: 'initPaymodes',
|
@@ -538,7 +549,45 @@ var SettlementStore = (_class = function () {
|
|
538
549
|
});
|
539
550
|
// this.member=context.stores && context.stores.memberStore && context.stores.memberStore.member;
|
540
551
|
this.member = this.dto.Member; //stores.selectMemberStore.selectMemberInfo;
|
541
|
-
|
552
|
+
|
553
|
+
this.paymode.isNotFullBook = false;
|
554
|
+
this.paymode.isNotFullOnlyBook = false;
|
555
|
+
//预订按比例收取订金处理
|
556
|
+
var value = this.dto.TotalTaxAmount;
|
557
|
+
|
558
|
+
var _getLoginInfo = this.getLoginInfo(),
|
559
|
+
PreSellOrBook = _getLoginInfo.PreSellOrBook,
|
560
|
+
PercentageWhenBook = _getLoginInfo.PercentageWhenBook;
|
561
|
+
|
562
|
+
var _ref5 = this.dto || {},
|
563
|
+
IdbusiType = _ref5.IdbusiType,
|
564
|
+
DistributionMode = _ref5.DistributionMode;
|
565
|
+
|
566
|
+
if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
567
|
+
this.paymode.bookMaxValue = value;
|
568
|
+
this.paymode.isNotFullBook = true;
|
569
|
+
this.paymode.isNotFullOnlyBook = true;
|
570
|
+
value = value * PercentageWhenBook / 100;
|
571
|
+
}
|
572
|
+
if (IdbusiType == 38 && PreSellOrBook == 'BOOK') {
|
573
|
+
(0, _mobx.runInAction)(function () {
|
574
|
+
_this3.dto.PrepaidAmount = value;
|
575
|
+
});
|
576
|
+
}
|
577
|
+
//预订计算快递或同城配送运费
|
578
|
+
if (IdbusiType == 38 && PreSellOrBook != 'DISABLED' && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
579
|
+
value += this.dto.BuyerPayFreight || 0;
|
580
|
+
}
|
581
|
+
//预订取货应补款金额
|
582
|
+
if (IdbusiType == 39) {
|
583
|
+
value = _mutantsMicrofx.stores.drawerStore.thisWaitPaidAmount;
|
584
|
+
if (_mutantsMicrofx.stores.drawerStore.totalWaitPaidAmount > 0) {
|
585
|
+
this.paymode.isNotFullBook = true;
|
586
|
+
this.paymode.bookMaxValue = _mutantsMicrofx.stores.drawerStore.totalWaitPaidAmount;
|
587
|
+
}
|
588
|
+
}
|
589
|
+
|
590
|
+
this.brefund = this.paymode.setAmount(value, this.dto.OnlinePaymentAmount);
|
542
591
|
} else {
|
543
592
|
this.brefund = this.paymode.setAmount(amount, 0);
|
544
593
|
this.dto = data;
|
@@ -586,8 +635,8 @@ var SettlementStore = (_class = function () {
|
|
586
635
|
var _enumController$getEn5 = _mutantsUtil.enumController.getEnumOj(),
|
587
636
|
PayStyle = _enumController$getEn5.PayStyle;
|
588
637
|
|
589
|
-
var
|
590
|
-
isNewRetailBCPos =
|
638
|
+
var _ref6 = _mutantsUtil.platform || {},
|
639
|
+
isNewRetailBCPos = _ref6.isNewRetailBCPos;
|
591
640
|
|
592
641
|
console.log(this.dto, 'dto==========');
|
593
642
|
this.paymode.checkList = [];
|
@@ -613,14 +662,14 @@ var SettlementStore = (_class = function () {
|
|
613
662
|
if (themode.paymentType == PayStyle.djq) {
|
614
663
|
(0, _each3.default)(_this5.dto.RetailCouponDetails, function (djq) {
|
615
664
|
if (isNewRetailBCPos) {
|
616
|
-
var
|
617
|
-
displayText =
|
618
|
-
promoRuleId =
|
619
|
-
dateMount =
|
620
|
-
promoMethodEnum =
|
621
|
-
discountPct =
|
622
|
-
promoId =
|
623
|
-
id =
|
665
|
+
var _ref7 = djq || {},
|
666
|
+
displayText = _ref7.displayText,
|
667
|
+
promoRuleId = _ref7.promoRuleId,
|
668
|
+
dateMount = _ref7.dateMount,
|
669
|
+
promoMethodEnum = _ref7.promoMethodEnum,
|
670
|
+
discountPct = _ref7.discountPct,
|
671
|
+
promoId = _ref7.promoId,
|
672
|
+
id = _ref7.id;
|
624
673
|
|
625
674
|
_this5.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false, _this5.dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, null, id, true);
|
626
675
|
return;
|
@@ -663,7 +712,7 @@ var SettlementStore = (_class = function () {
|
|
663
712
|
}, {
|
664
713
|
key: 'quickSettle',
|
665
714
|
value: function quickSettle(key) {
|
666
|
-
this.addPay(key, true);
|
715
|
+
this.addPay(key, null, true);
|
667
716
|
}
|
668
717
|
|
669
718
|
//outer call
|
@@ -671,7 +720,7 @@ var SettlementStore = (_class = function () {
|
|
671
720
|
|
672
721
|
}, {
|
673
722
|
key: 'changeFocusAndAddPay',
|
674
|
-
value: function changeFocusAndAddPay(type) {
|
723
|
+
value: function changeFocusAndAddPay(type, bookType) {
|
675
724
|
var _this6 = this;
|
676
725
|
|
677
726
|
var _enumController$getEn6 = _mutantsUtil.enumController.getEnumOj(),
|
@@ -696,14 +745,17 @@ var SettlementStore = (_class = function () {
|
|
696
745
|
TotalTaxAmount: this.paymode.amount,
|
697
746
|
BalanceTaxAmount: this.paymode.currentMode.value
|
698
747
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
699
|
-
|
748
|
+
// this.paymode.currentMode.steadCashIntegral=result.Integral;
|
749
|
+
// this.paymode.currentMode.perIntegral=result.perIntegral;
|
750
|
+
// this.paymode.currentMode.cashAmount=result.cashAmount;
|
751
|
+
_this6.paymode.currentMode.integralCashOverOrderAmount = result.integralCashOverOrderAmount;
|
700
752
|
_this6.paymode.currentMode.overchargesAmount = result.Amount - _this6.paymode.currentMode.value;
|
701
753
|
});
|
702
754
|
} else {
|
703
755
|
this.addPayDirectly(this.paymode.currentMode);
|
704
756
|
}
|
705
757
|
} else {
|
706
|
-
this.addPay(type);
|
758
|
+
this.addPay(type, bookType);
|
707
759
|
}
|
708
760
|
}
|
709
761
|
|
@@ -728,15 +780,15 @@ var SettlementStore = (_class = function () {
|
|
728
780
|
var IdStore = this.storeInfo.storeID;
|
729
781
|
var StoreCode = this.storeInfo.storeCode; //_find(this.storeInfo.storeInfos,(store)=>{return store.ID==IdStore;}).Code;
|
730
782
|
|
731
|
-
var
|
732
|
-
isNewRetailBCPos =
|
783
|
+
var _ref8 = _mutantsUtil.platform || {},
|
784
|
+
isNewRetailBCPos = _ref8.isNewRetailBCPos;
|
733
785
|
|
734
786
|
var address = '';
|
735
787
|
if (isNewRetailBCPos) {
|
736
788
|
// address = '/member/memberProfile/FindByStorageCode/'+v;
|
737
789
|
address = '/marketingtool/MeStorageCard/getCardInfoByCardNo/' + v + '/' + true;
|
738
790
|
return (0, _tplusApi.ccApi)({ code: v }, address, false, false, { method: 'get', timeout_skip: true }).then(function () {
|
739
|
-
var
|
791
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3(result) {
|
740
792
|
var data, m;
|
741
793
|
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
742
794
|
while (1) {
|
@@ -811,7 +863,7 @@ var SettlementStore = (_class = function () {
|
|
811
863
|
}));
|
812
864
|
|
813
865
|
return function (_x2) {
|
814
|
-
return
|
866
|
+
return _ref9.apply(this, arguments);
|
815
867
|
};
|
816
868
|
}()
|
817
869
|
// result.data.forEach((m) => {
|
@@ -921,12 +973,34 @@ var SettlementStore = (_class = function () {
|
|
921
973
|
}
|
922
974
|
}
|
923
975
|
|
976
|
+
//积分抵现不包含运费
|
977
|
+
var BuyerPayFreight = this.dto.BuyerPayFreight;
|
978
|
+
var DistributionMode = this.dto.DistributionMode;
|
979
|
+
var IdbusiType = this.dto.IdbusiType;
|
980
|
+
|
981
|
+
var _getLoginInfo2 = this.getLoginInfo(),
|
982
|
+
PreSellOrBook = _getLoginInfo2.PreSellOrBook,
|
983
|
+
PercentageWhenBook = _getLoginInfo2.PercentageWhenBook;
|
984
|
+
|
985
|
+
var value = 0;
|
986
|
+
if ((DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0) {
|
987
|
+
value = (0, _utils.getFixedNumber)(Math.Minus(this.paymode.amount, BuyerPayFreight));
|
988
|
+
} else if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
989
|
+
//预订场景下:现场提货,且订金比例非100%时,积分抵现按全款计算(因为只有全款才能使用积分抵现)
|
990
|
+
value = this.paymode.bookMaxValue;
|
991
|
+
} else {
|
992
|
+
value = this.paymode.amount;
|
993
|
+
}
|
994
|
+
|
924
995
|
(0, _tplusApi.tApi)({ IntegralSteadCashParams: {
|
925
996
|
Idmember: this.paymode.currentMode.memberId,
|
926
|
-
TotalTaxAmount:
|
927
|
-
BalanceTaxAmount:
|
997
|
+
TotalTaxAmount: value,
|
998
|
+
BalanceTaxAmount: value
|
928
999
|
} }, 'AA.DR.newRetailMember.CalculdateIntegralSteadCash', false, false).then(function (result) {
|
929
1000
|
_this8.paymode.currentMode.member.setExchangable(result.MaxAmount);
|
1001
|
+
_this8.paymode.currentMode.perIntegral = result.perIntegral;
|
1002
|
+
_this8.paymode.currentMode.cashAmount = result.cashAmount;
|
1003
|
+
_this8.paymode.currentMode.integralCashOverOrderAmount = result.integralCashOverOrderAmount;
|
930
1004
|
_this8.updateEvent();
|
931
1005
|
if (_this8.checkReceived(_this8.paymode.currentMode, "exchangable")) {
|
932
1006
|
(0, _mobx.runInAction)(function () {
|
@@ -968,7 +1042,8 @@ var SettlementStore = (_class = function () {
|
|
968
1042
|
authCode: '',
|
969
1043
|
steadCashIntegral: null,
|
970
1044
|
errinfo: '',
|
971
|
-
maxamount: this.paymode.amount
|
1045
|
+
maxamount: this.paymode.amount,
|
1046
|
+
virtualPay: themode.virtualPay
|
972
1047
|
});
|
973
1048
|
if (type == PayStyle.hyczk) {
|
974
1049
|
if (!mode.storageCardNo) {
|
@@ -1012,7 +1087,17 @@ var SettlementStore = (_class = function () {
|
|
1012
1087
|
|
1013
1088
|
this.amountHandler && this.amountHandler(type).then(function () {
|
1014
1089
|
(0, _mobx.runInAction)(function () {
|
1015
|
-
|
1090
|
+
|
1091
|
+
//预售储值结算应包含运费
|
1092
|
+
var BuyerPayFreight = _this9.dto.BuyerPayFreight;
|
1093
|
+
var DistributionMode = _this9.dto.DistributionMode;
|
1094
|
+
var value = 0;
|
1095
|
+
if ((DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 && type == PayStyle.hyczk) {
|
1096
|
+
value = (0, _utils.getFixedNumber)(parseFloat(_this9.context.viewModel.getViewItem('Voucher').availableAmount) + parseFloat(BuyerPayFreight));
|
1097
|
+
} else {
|
1098
|
+
value = _this9.context.viewModel.getViewItem('Voucher').availableAmount;
|
1099
|
+
}
|
1100
|
+
mode.maxamount = (0, _utils.getFixedNumber)(Math.Minus(value, sum));
|
1016
1101
|
_this9.updateEvent();
|
1017
1102
|
});
|
1018
1103
|
});
|
@@ -1033,12 +1118,12 @@ var SettlementStore = (_class = function () {
|
|
1033
1118
|
mode.value = shouldSetValue;
|
1034
1119
|
mode.value2 = (0, _utils.getFixedNumber)(mode.calDirection == "88" ? shouldSetValue / mode.exchangeRate : shouldSetValue * mode.exchangeRate);
|
1035
1120
|
mode.value3 = shouldSetValue;
|
1036
|
-
this.paymode.calcReserved();
|
1121
|
+
this.paymode.calcReserved('bookPay'); //参数multiPay代表复合结算
|
1037
1122
|
}
|
1038
1123
|
}
|
1039
1124
|
}, {
|
1040
1125
|
key: 'changeValue',
|
1041
|
-
value: function changeValue(index, value, blur) {
|
1126
|
+
value: function changeValue(index, value, blur, type) {
|
1042
1127
|
var mode = (0, _find3.default)(this.paymode.thePaymodes, { 'paymethodId': index });
|
1043
1128
|
var v = blur ? (0, _utils.getFixedNumber)(value) : isNaN(value) && value != '-' ? 0.00 : value;
|
1044
1129
|
if (mode) {
|
@@ -1054,7 +1139,7 @@ var SettlementStore = (_class = function () {
|
|
1054
1139
|
mode.value2 = v;
|
1055
1140
|
}
|
1056
1141
|
|
1057
|
-
this.paymode.calcReserved();
|
1142
|
+
this.paymode.calcReserved(type);
|
1058
1143
|
}
|
1059
1144
|
}
|
1060
1145
|
}, {
|
@@ -1078,7 +1163,7 @@ var SettlementStore = (_class = function () {
|
|
1078
1163
|
}
|
1079
1164
|
}, {
|
1080
1165
|
key: 'addPay',
|
1081
|
-
value: function addPay(type, isQuick) {
|
1166
|
+
value: function addPay(type, bookType, isQuick) {
|
1082
1167
|
var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
|
1083
1168
|
PayStyle = _enumController$getEn12.PayStyle;
|
1084
1169
|
|
@@ -1090,11 +1175,11 @@ var SettlementStore = (_class = function () {
|
|
1090
1175
|
pos = index == -1 ? pos : index + 1;
|
1091
1176
|
}
|
1092
1177
|
this.paymode.thePaymodes.splice(pos, 0, this.genNewMode(type, this.newStyle && type == PayStyle.hyczk, undefined, isQuick));
|
1093
|
-
this.paymode.calcReserved();
|
1178
|
+
this.paymode.calcReserved(bookType);
|
1094
1179
|
}
|
1095
1180
|
}, {
|
1096
1181
|
key: 'delPay',
|
1097
|
-
value: function delPay(index) {
|
1182
|
+
value: function delPay(index, bookType) {
|
1098
1183
|
var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
|
1099
1184
|
PayStyle = _enumController$getEn13.PayStyle;
|
1100
1185
|
|
@@ -1102,7 +1187,7 @@ var SettlementStore = (_class = function () {
|
|
1102
1187
|
return mode.paymethodId === index;
|
1103
1188
|
});
|
1104
1189
|
this.paymode.currentFocus = -1;
|
1105
|
-
this.paymode.calcReserved();
|
1190
|
+
this.paymode.calcReserved(bookType);
|
1106
1191
|
}
|
1107
1192
|
|
1108
1193
|
// 获取储值是否重复, 在commit方法中使用
|
@@ -1150,8 +1235,8 @@ var SettlementStore = (_class = function () {
|
|
1150
1235
|
}, {
|
1151
1236
|
key: 'commit',
|
1152
1237
|
value: function () {
|
1153
|
-
var
|
1154
|
-
var status, paylist, ret,
|
1238
|
+
var _ref10 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4(bTest) {
|
1239
|
+
var status, paylist, ret, _ref11, _ref11$data, code, returnMsg, state, ret1, ret2;
|
1155
1240
|
|
1156
1241
|
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
1157
1242
|
while (1) {
|
@@ -1192,9 +1277,9 @@ var SettlementStore = (_class = function () {
|
|
1192
1277
|
|
1193
1278
|
case 12:
|
1194
1279
|
ret = _context4.sent;
|
1195
|
-
|
1196
|
-
|
1197
|
-
code =
|
1280
|
+
_ref11 = ret || {}, _ref11$data = _ref11.data;
|
1281
|
+
_ref11$data = _ref11$data === undefined ? {} : _ref11$data;
|
1282
|
+
code = _ref11$data.code, returnMsg = _ref11$data.returnMsg;
|
1198
1283
|
|
1199
1284
|
if (!(code && code == 10001)) {
|
1200
1285
|
_context4.next = 24;
|
@@ -1276,7 +1361,7 @@ var SettlementStore = (_class = function () {
|
|
1276
1361
|
}));
|
1277
1362
|
|
1278
1363
|
function commit(_x3) {
|
1279
|
-
return
|
1364
|
+
return _ref10.apply(this, arguments);
|
1280
1365
|
}
|
1281
1366
|
|
1282
1367
|
return commit;
|
@@ -1290,10 +1375,10 @@ var SettlementStore = (_class = function () {
|
|
1290
1375
|
}, {
|
1291
1376
|
key: 'saveMember',
|
1292
1377
|
value: function () {
|
1293
|
-
var
|
1378
|
+
var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5() {
|
1294
1379
|
var _this11 = this;
|
1295
1380
|
|
1296
|
-
var _enumController$getEn15, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret,
|
1381
|
+
var _enumController$getEn15, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret, _ref13, type, data, msg, code;
|
1297
1382
|
|
1298
1383
|
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
1299
1384
|
while (1) {
|
@@ -1355,7 +1440,7 @@ var SettlementStore = (_class = function () {
|
|
1355
1440
|
|
1356
1441
|
case 11:
|
1357
1442
|
ret = _context5.sent;
|
1358
|
-
|
1443
|
+
_ref13 = ret || {}, type = _ref13.type, data = _ref13.data, msg = _ref13.msg, code = _ref13.code;
|
1359
1444
|
|
1360
1445
|
if (!(type === true)) {
|
1361
1446
|
_context5.next = 17;
|
@@ -1386,7 +1471,7 @@ var SettlementStore = (_class = function () {
|
|
1386
1471
|
}));
|
1387
1472
|
|
1388
1473
|
function saveMember() {
|
1389
|
-
return
|
1474
|
+
return _ref12.apply(this, arguments);
|
1390
1475
|
}
|
1391
1476
|
|
1392
1477
|
return saveMember;
|
@@ -1394,10 +1479,10 @@ var SettlementStore = (_class = function () {
|
|
1394
1479
|
}, {
|
1395
1480
|
key: 'save',
|
1396
1481
|
value: function () {
|
1397
|
-
var
|
1482
|
+
var _ref14 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
1398
1483
|
var _this12 = this;
|
1399
1484
|
|
1400
|
-
var _enumController$getEn16, PayStyle, TradeType, IPMSG, RetailTypeEnum, dtoParams, payList, payment, tradeType, ret,
|
1485
|
+
var _enumController$getEn16, PayStyle, TradeType, IPMSG, RetailTypeEnum, _getLoginInfo3, PreSellOrBook, PercentageWhenBook, _ref15, IdbusiType, DistributionMode, prepaidAmount, fullPayment, dtoParams, payList, payment, tradeType, ret, _ref16, type, data, msg, code;
|
1401
1486
|
|
1402
1487
|
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
1403
1488
|
while (1) {
|
@@ -1496,32 +1581,48 @@ var SettlementStore = (_class = function () {
|
|
1496
1581
|
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
1497
1582
|
}
|
1498
1583
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
1584
|
+
_getLoginInfo3 = this.getLoginInfo(), PreSellOrBook = _getLoginInfo3.PreSellOrBook, PercentageWhenBook = _getLoginInfo3.PercentageWhenBook;
|
1585
|
+
_ref15 = this.dto || {}, IdbusiType = _ref15.IdbusiType, DistributionMode = _ref15.DistributionMode;
|
1586
|
+
|
1587
|
+
if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
1588
|
+
prepaidAmount = (0, _utils.getFixedNumber)(this.dto.RetailPaymentDetails.reduce(function (c, item) {
|
1589
|
+
return c + (item.Amount || 0);
|
1590
|
+
}, 0));
|
1591
|
+
fullPayment = (0, _utils.getFixedNumber)(this.dto.RetailDetails.reduce(function (c, item) {
|
1592
|
+
return c + (item.TaxAmount || 0);
|
1593
|
+
}, 0));
|
1594
|
+
|
1595
|
+
this.isFull = fullPayment == prepaidAmount; // 是否全款
|
1596
|
+
(0, _mobx.runInAction)(function () {
|
1597
|
+
_this12.dto.PrepaidAmount = prepaidAmount;
|
1598
|
+
});
|
1599
|
+
}
|
1499
1600
|
_context6.t1 = this.dto.IdbusiType == 37;
|
1500
1601
|
|
1501
1602
|
if (!_context6.t1) {
|
1502
|
-
_context6.next =
|
1603
|
+
_context6.next = 14;
|
1503
1604
|
break;
|
1504
1605
|
}
|
1505
1606
|
|
1506
|
-
_context6.next =
|
1607
|
+
_context6.next = 13;
|
1507
1608
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
1508
1609
|
|
1509
|
-
case
|
1610
|
+
case 13:
|
1510
1611
|
_context6.t1 = _context6.sent;
|
1511
1612
|
|
1512
|
-
case
|
1613
|
+
case 14:
|
1513
1614
|
_context6.t0 = _context6.t1;
|
1514
1615
|
|
1515
1616
|
if (_context6.t0) {
|
1516
|
-
_context6.next =
|
1617
|
+
_context6.next = 17;
|
1517
1618
|
break;
|
1518
1619
|
}
|
1519
1620
|
|
1520
1621
|
_context6.t0 = this.dto.IdbusiType != 37;
|
1521
1622
|
|
1522
|
-
case
|
1623
|
+
case 17:
|
1523
1624
|
if (!_context6.t0) {
|
1524
|
-
_context6.next =
|
1625
|
+
_context6.next = 36;
|
1525
1626
|
break;
|
1526
1627
|
}
|
1527
1628
|
|
@@ -1533,45 +1634,45 @@ var SettlementStore = (_class = function () {
|
|
1533
1634
|
});
|
1534
1635
|
|
1535
1636
|
if (!(payList && payList.length > 0)) {
|
1536
|
-
_context6.next =
|
1637
|
+
_context6.next = 33;
|
1537
1638
|
break;
|
1538
1639
|
}
|
1539
1640
|
|
1540
1641
|
payment = payList[0];
|
1541
1642
|
tradeType = payment && payment.Amount > 0 ? TradeType.PAY : TradeType.REFUND;
|
1542
|
-
_context6.next =
|
1643
|
+
_context6.next = 25;
|
1543
1644
|
return this.thirdPay(1, payment, tradeType, dtoParams);
|
1544
1645
|
|
1545
|
-
case
|
1646
|
+
case 25:
|
1546
1647
|
ret = _context6.sent;
|
1547
|
-
|
1648
|
+
_ref16 = ret || {}, type = _ref16.type, data = _ref16.data, msg = _ref16.msg, code = _ref16.code;
|
1548
1649
|
|
1549
1650
|
if (!(type === true)) {
|
1550
|
-
_context6.next =
|
1651
|
+
_context6.next = 31;
|
1551
1652
|
break;
|
1552
1653
|
}
|
1553
1654
|
|
1554
1655
|
dtoParams = data;
|
1555
|
-
_context6.next =
|
1656
|
+
_context6.next = 33;
|
1556
1657
|
break;
|
1557
1658
|
|
1558
|
-
case
|
1659
|
+
case 31:
|
1559
1660
|
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
1560
1661
|
return _context6.abrupt('return', false);
|
1561
1662
|
|
1562
|
-
case
|
1663
|
+
case 33:
|
1563
1664
|
this.dtoParams = dtoParams;
|
1564
1665
|
console.log('结算信息:', dtoParams);
|
1565
1666
|
return _context6.abrupt('return', (0, _tplusApi.ccApi)({ dto: dtoParams, cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
|
1566
|
-
var
|
1567
|
-
ID =
|
1667
|
+
var _ref17 = resp || {},
|
1668
|
+
ID = _ref17.ID;
|
1568
1669
|
|
1569
1670
|
_this12.setDtoID(ID);
|
1570
1671
|
_this12.billID = ID;
|
1571
1672
|
_this12.paymode.checkList = [];
|
1572
1673
|
}));
|
1573
1674
|
|
1574
|
-
case
|
1675
|
+
case 36:
|
1575
1676
|
case 'end':
|
1576
1677
|
return _context6.stop();
|
1577
1678
|
}
|
@@ -1580,7 +1681,7 @@ var SettlementStore = (_class = function () {
|
|
1580
1681
|
}));
|
1581
1682
|
|
1582
1683
|
function save() {
|
1583
|
-
return
|
1684
|
+
return _ref14.apply(this, arguments);
|
1584
1685
|
}
|
1585
1686
|
|
1586
1687
|
return save;
|
@@ -1597,7 +1698,7 @@ var SettlementStore = (_class = function () {
|
|
1597
1698
|
return data;
|
1598
1699
|
}
|
1599
1700
|
|
1600
|
-
/**
|
1701
|
+
/**
|
1601
1702
|
* 二开支付
|
1602
1703
|
* vType:1零售单、2储值单
|
1603
1704
|
* payment:结算方式
|
@@ -1608,8 +1709,8 @@ var SettlementStore = (_class = function () {
|
|
1608
1709
|
}, {
|
1609
1710
|
key: 'thirdPay',
|
1610
1711
|
value: function () {
|
1611
|
-
var
|
1612
|
-
var cto, params, ret,
|
1712
|
+
var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(vType, payment, trade, dto) {
|
1713
|
+
var cto, params, ret, _ref19, Code, _Message, Result, _ref20, ThirdPaymentReturnInfo;
|
1613
1714
|
|
1614
1715
|
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
1615
1716
|
while (1) {
|
@@ -1632,7 +1733,7 @@ var SettlementStore = (_class = function () {
|
|
1632
1733
|
|
1633
1734
|
console.log('刷卡返回信息:', ret);
|
1634
1735
|
ret = JSON.parse(ret);
|
1635
|
-
|
1736
|
+
_ref19 = ret || {}, Code = _ref19.Code, _Message = _ref19.Message, Result = _ref19.Result;
|
1636
1737
|
|
1637
1738
|
if (!(Code > 0)) {
|
1638
1739
|
_context7.next = 14;
|
@@ -1647,7 +1748,7 @@ var SettlementStore = (_class = function () {
|
|
1647
1748
|
break;
|
1648
1749
|
}
|
1649
1750
|
|
1650
|
-
|
1751
|
+
_ref20 = Result || {}, ThirdPaymentReturnInfo = _ref20.ThirdPaymentReturnInfo;
|
1651
1752
|
|
1652
1753
|
if (vType == 1) {
|
1653
1754
|
dto.RetailPaymentDetails.forEach(function (v) {
|
@@ -1690,7 +1791,7 @@ var SettlementStore = (_class = function () {
|
|
1690
1791
|
}));
|
1691
1792
|
|
1692
1793
|
function thirdPay(_x4, _x5, _x6, _x7) {
|
1693
|
-
return
|
1794
|
+
return _ref18.apply(this, arguments);
|
1694
1795
|
}
|
1695
1796
|
|
1696
1797
|
return thirdPay;
|
@@ -1701,7 +1802,7 @@ var SettlementStore = (_class = function () {
|
|
1701
1802
|
}, {
|
1702
1803
|
key: 'thirdPayRefund',
|
1703
1804
|
value: function () {
|
1704
|
-
var
|
1805
|
+
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(type) {
|
1705
1806
|
var _this13 = this;
|
1706
1807
|
|
1707
1808
|
var dto, pay, payment, _enumController$getEn17, TradeType;
|
@@ -1723,7 +1824,7 @@ var SettlementStore = (_class = function () {
|
|
1723
1824
|
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn17.TradeType;
|
1724
1825
|
|
1725
1826
|
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
1726
|
-
var ret,
|
1827
|
+
var ret, _ref23, msg;
|
1727
1828
|
|
1728
1829
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
1729
1830
|
while (1) {
|
@@ -1734,7 +1835,7 @@ var SettlementStore = (_class = function () {
|
|
1734
1835
|
|
1735
1836
|
case 2:
|
1736
1837
|
ret = _context8.sent;
|
1737
|
-
|
1838
|
+
_ref23 = ret || {}, msg = _ref23.msg;
|
1738
1839
|
|
1739
1840
|
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
1740
1841
|
|
@@ -1756,7 +1857,7 @@ var SettlementStore = (_class = function () {
|
|
1756
1857
|
}));
|
1757
1858
|
|
1758
1859
|
function thirdPayRefund(_x8) {
|
1759
|
-
return
|
1860
|
+
return _ref21.apply(this, arguments);
|
1760
1861
|
}
|
1761
1862
|
|
1762
1863
|
return thirdPayRefund;
|
@@ -1769,7 +1870,7 @@ var SettlementStore = (_class = function () {
|
|
1769
1870
|
}, {
|
1770
1871
|
key: 'querySettleResult',
|
1771
1872
|
value: function () {
|
1772
|
-
var
|
1873
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10() {
|
1773
1874
|
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
1774
1875
|
while (1) {
|
1775
1876
|
switch (_context10.prev = _context10.next) {
|
@@ -1797,7 +1898,7 @@ var SettlementStore = (_class = function () {
|
|
1797
1898
|
}));
|
1798
1899
|
|
1799
1900
|
function querySettleResult() {
|
1800
|
-
return
|
1901
|
+
return _ref24.apply(this, arguments);
|
1801
1902
|
}
|
1802
1903
|
|
1803
1904
|
return querySettleResult;
|
@@ -1823,14 +1924,14 @@ var SettlementStore = (_class = function () {
|
|
1823
1924
|
}, {
|
1824
1925
|
key: 'validePwd',
|
1825
1926
|
value: function () {
|
1826
|
-
var
|
1827
|
-
var
|
1927
|
+
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(value) {
|
1928
|
+
var _ref26, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, result, count, _result;
|
1828
1929
|
|
1829
1930
|
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
1830
1931
|
while (1) {
|
1831
1932
|
switch (_context11.prev = _context11.next) {
|
1832
1933
|
case 0:
|
1833
|
-
|
1934
|
+
_ref26 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref26.isNewRetailBCPos;
|
1834
1935
|
_context11.prev = 1;
|
1835
1936
|
|
1836
1937
|
if (!isNewRetailBCPos) {
|
@@ -1947,7 +2048,7 @@ var SettlementStore = (_class = function () {
|
|
1947
2048
|
}));
|
1948
2049
|
|
1949
2050
|
function validePwd(_x9) {
|
1950
|
-
return
|
2051
|
+
return _ref25.apply(this, arguments);
|
1951
2052
|
}
|
1952
2053
|
|
1953
2054
|
return validePwd;
|
@@ -2000,14 +2101,14 @@ var SettlementStore = (_class = function () {
|
|
2000
2101
|
var _this16 = this;
|
2001
2102
|
|
2002
2103
|
return function () {
|
2003
|
-
var
|
2004
|
-
var
|
2104
|
+
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(_this) {
|
2105
|
+
var _getLoginInfo4, IdStore, StoreCode, resp;
|
2005
2106
|
|
2006
2107
|
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
2007
2108
|
while (1) {
|
2008
2109
|
switch (_context12.prev = _context12.next) {
|
2009
2110
|
case 0:
|
2010
|
-
|
2111
|
+
_getLoginInfo4 = _this16.getLoginInfo(), IdStore = _getLoginInfo4.IdStore, StoreCode = _getLoginInfo4.StoreCode;
|
2011
2112
|
_context12.next = 3;
|
2012
2113
|
return (0, _tplusApi.tApi)({ Idmember: _this16.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
|
2013
2114
|
|
@@ -2027,7 +2128,7 @@ var SettlementStore = (_class = function () {
|
|
2027
2128
|
}));
|
2028
2129
|
|
2029
2130
|
return function (_x10) {
|
2030
|
-
return
|
2131
|
+
return _ref27.apply(this, arguments);
|
2031
2132
|
};
|
2032
2133
|
}();
|
2033
2134
|
}
|
@@ -2037,7 +2138,7 @@ var SettlementStore = (_class = function () {
|
|
2037
2138
|
var _this17 = this;
|
2038
2139
|
|
2039
2140
|
return function () {
|
2040
|
-
var
|
2141
|
+
var _ref28 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(memberId) {
|
2041
2142
|
var result;
|
2042
2143
|
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
2043
2144
|
while (1) {
|
@@ -2092,7 +2193,7 @@ var SettlementStore = (_class = function () {
|
|
2092
2193
|
}));
|
2093
2194
|
|
2094
2195
|
return function (_x11) {
|
2095
|
-
return
|
2196
|
+
return _ref28.apply(this, arguments);
|
2096
2197
|
};
|
2097
2198
|
}();
|
2098
2199
|
}
|
@@ -2127,7 +2228,7 @@ var SettlementStore = (_class = function () {
|
|
2127
2228
|
}), _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);
|
2128
2229
|
exports.default = SettlementStore;
|
2129
2230
|
var PayMode = exports.PayMode = (_class3 = function () {
|
2130
|
-
|
2231
|
+
//预订场景下,现场提货,且选项设置订金比例非100% or 取货最大补款数大于0时 为 true
|
2131
2232
|
function PayMode() {
|
2132
2233
|
// this.amount=getFixedNumber(amount);
|
2133
2234
|
// this.calcReserved();
|
@@ -2148,6 +2249,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2148
2249
|
|
2149
2250
|
_initDefineProp(this, 'thePaymodes', _descriptor11, this);
|
2150
2251
|
|
2252
|
+
this.bookMaxValue = 0;
|
2253
|
+
this.isNotFullBook = false;
|
2254
|
+
this.isNotFullOnlyBook = false;
|
2255
|
+
|
2151
2256
|
_initDefineProp(this, 'storageCardNo', _descriptor12, this);
|
2152
2257
|
|
2153
2258
|
_initDefineProp(this, 'balance', _descriptor13, this);
|
@@ -2166,6 +2271,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2166
2271
|
_initDefineProp(this, 'addDjqs', _descriptor16, this);
|
2167
2272
|
}
|
2168
2273
|
// @observable store = null;
|
2274
|
+
//只是预订场景下,现场提货,且选项设置订金比例非100%时 为 true
|
2275
|
+
//应收
|
2169
2276
|
|
2170
2277
|
|
2171
2278
|
(0, _createClass3.default)(PayMode, [{
|
@@ -2191,13 +2298,25 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2191
2298
|
}
|
2192
2299
|
}, {
|
2193
2300
|
key: 'calcReserved',
|
2194
|
-
value: function calcReserved() {
|
2301
|
+
value: function calcReserved(type) {
|
2195
2302
|
var sum = 0;
|
2196
2303
|
(0, _each3.default)(this.thePaymodes, function (mode) {
|
2197
2304
|
sum = Math.Add(sum, mode.value == "" ? 0 : mode.value);
|
2198
2305
|
});
|
2199
2306
|
this.received = (0, _utils.getFixedNumber)(sum);
|
2200
|
-
|
2307
|
+
if (type === 'bookPay' && this.isNotFullBook) {
|
2308
|
+
if (this.amount <= sum && sum <= this.bookMaxValue) {
|
2309
|
+
this.receivable = (0, _utils.getFixedNumber)(0);
|
2310
|
+
}
|
2311
|
+
if (sum < this.amount) {
|
2312
|
+
this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
|
2313
|
+
}
|
2314
|
+
if (sum > this.bookMaxValue) {
|
2315
|
+
this.receivable = (0, _utils.getFixedNumber)(this.bookMaxValue - sum);
|
2316
|
+
}
|
2317
|
+
} else {
|
2318
|
+
this.receivable = (0, _utils.getFixedNumber)(this.amount - sum);
|
2319
|
+
}
|
2201
2320
|
}
|
2202
2321
|
}, {
|
2203
2322
|
key: 'updateMemberStorageCardNo',
|
@@ -2236,6 +2355,9 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2236
2355
|
this.checkList = [];
|
2237
2356
|
}
|
2238
2357
|
|
2358
|
+
var _ref30 = _mutantsUtil.platform || {},
|
2359
|
+
isNewRetailBCPos = _ref30.isNewRetailBCPos;
|
2360
|
+
|
2239
2361
|
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
2240
2362
|
PayStyle = _enumController$getEn18.PayStyle,
|
2241
2363
|
Differentiate = _enumController$getEn18.Differentiate;
|
@@ -2308,13 +2430,13 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2308
2430
|
// }
|
2309
2431
|
// else
|
2310
2432
|
// {
|
2433
|
+
|
2311
2434
|
var bookingQuantity = 0;
|
2312
2435
|
if (item.BookingQuantity) {
|
2313
2436
|
bookingQuantity = item.BookingQuantity;
|
2314
2437
|
}
|
2315
2438
|
detailDTO.listPrice = JSON.getCellValue(item, "listPrice");
|
2316
2439
|
detailDTO.netAmountWithTax = Math.Multiply(detailDTO.listPrice, Math.Minus(item.Quantity, bookingQuantity)); //item.TaxAmount;
|
2317
|
-
//}
|
2318
2440
|
detailDTO.taxRate = item.TaxRate;
|
2319
2441
|
detailDTO.quantity = item.Quantity;
|
2320
2442
|
|
@@ -2344,18 +2466,18 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2344
2466
|
}
|
2345
2467
|
});
|
2346
2468
|
|
2347
|
-
var
|
2348
|
-
couponCode =
|
2349
|
-
name =
|
2350
|
-
tieredAmountResult =
|
2351
|
-
fromDate =
|
2352
|
-
dateMount =
|
2353
|
-
promoMethodEnum =
|
2354
|
-
discountPct =
|
2355
|
-
nominalAmount =
|
2356
|
-
promoId =
|
2357
|
-
id =
|
2358
|
-
doorsill =
|
2469
|
+
var _ref31 = element || {},
|
2470
|
+
couponCode = _ref31.couponCode,
|
2471
|
+
name = _ref31.name,
|
2472
|
+
tieredAmountResult = _ref31.tieredAmountResult,
|
2473
|
+
fromDate = _ref31.fromDate,
|
2474
|
+
dateMount = _ref31.dateMount,
|
2475
|
+
promoMethodEnum = _ref31.promoMethodEnum,
|
2476
|
+
discountPct = _ref31.discountPct,
|
2477
|
+
nominalAmount = _ref31.nominalAmount,
|
2478
|
+
promoId = _ref31.promoId,
|
2479
|
+
id = _ref31.id,
|
2480
|
+
doorsill = _ref31.doorsill;
|
2359
2481
|
|
2360
2482
|
var condValue = tieredAmountResult.condValue,
|
2361
2483
|
promoDiscount = tieredAmountResult.promoDiscount,
|
@@ -2399,6 +2521,9 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2399
2521
|
}, {
|
2400
2522
|
key: 'calcDjqValue',
|
2401
2523
|
value: function calcDjqValue(q1) {
|
2524
|
+
var _ref32 = _mutantsUtil.platform || {},
|
2525
|
+
isNewRetailBCPos = _ref32.isNewRetailBCPos;
|
2526
|
+
|
2402
2527
|
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
2403
2528
|
Differentiate = _enumController$getEn19.Differentiate;
|
2404
2529
|
|
@@ -2478,6 +2603,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2478
2603
|
} else if (parseFloat(v) > 0 && parseFloat(v) > (max || 0)) {
|
2479
2604
|
this.currentMode.errinfo = "余额不足";
|
2480
2605
|
}
|
2606
|
+
// 如果是积分抵现的一些判断
|
2607
|
+
if (this.currentMode.paymentType === PayStyle.jfdx) {
|
2608
|
+
if (this.currentMode.integralCashOverOrderAmount === true) {
|
2609
|
+
this.currentMode.steadCashIntegral = Math.ceil(this.currentMode.value / this.currentMode.cashAmount) * this.currentMode.perIntegral;
|
2610
|
+
} else if (this.currentMode.integralCashOverOrderAmount === false) {
|
2611
|
+
var v1 = this.currentMode.value / this.currentMode.cashAmount;
|
2612
|
+
if ((0, _isInteger2.default)(v1)) {
|
2613
|
+
this.currentMode.steadCashIntegral = Math.floor(this.currentMode.value / this.currentMode.cashAmount) * this.currentMode.perIntegral;
|
2614
|
+
} else {
|
2615
|
+
this.currentMode.errinfo = '\u8BF7\u6309\u7167\u79EF\u5206\u62B5\u73B0\u89C4\u5219' + this.currentMode.perIntegral + '\u79EF\u5206\u62B5\u7528' + this.currentMode.cashAmount + '\u5143\u8F93\u5165\u91D1\u989D';
|
2616
|
+
}
|
2617
|
+
}
|
2618
|
+
}
|
2481
2619
|
}
|
2482
2620
|
}, {
|
2483
2621
|
key: 'calcMemberBalance',
|
@@ -2487,17 +2625,17 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2487
2625
|
}, {
|
2488
2626
|
key: 'setPaymodes',
|
2489
2627
|
value: function () {
|
2490
|
-
var
|
2628
|
+
var _ref33 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(type, isIntegralExchange) {
|
2491
2629
|
var _this20 = this;
|
2492
2630
|
|
2493
|
-
var
|
2631
|
+
var _ref34, isHorizontalPad, isHorizontalSunMi, isMobileEnvironment, _enumController$getEn21, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
2494
2632
|
|
2495
2633
|
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
2496
2634
|
while (1) {
|
2497
2635
|
switch (_context15.prev = _context15.next) {
|
2498
2636
|
case 0:
|
2499
2637
|
// 是否移动端判断
|
2500
|
-
|
2638
|
+
_ref34 = _mutantsUtil.platform || {}, isHorizontalPad = _ref34.isHorizontalPad, isHorizontalSunMi = _ref34.isHorizontalSunMi;
|
2501
2639
|
isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
|
2502
2640
|
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn21.settleStyleType, PayStyle = _enumController$getEn21.PayStyle;
|
2503
2641
|
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
@@ -2532,6 +2670,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2532
2670
|
exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
|
2533
2671
|
idCurrency: mode.Currency ? mode.Currency.ID : -1,
|
2534
2672
|
calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88",
|
2673
|
+
virtualPay: mode.VirtualPay,
|
2535
2674
|
thridPayment: mode.ThirdPaymentInfo
|
2536
2675
|
});
|
2537
2676
|
});
|
@@ -2548,7 +2687,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2548
2687
|
}));
|
2549
2688
|
|
2550
2689
|
function setPaymodes(_x12, _x13) {
|
2551
|
-
return
|
2690
|
+
return _ref33.apply(this, arguments);
|
2552
2691
|
}
|
2553
2692
|
|
2554
2693
|
return setPaymodes;
|
@@ -2680,6 +2819,10 @@ var Member = exports.Member = (_class5 = function () {
|
|
2680
2819
|
var index = (0, _findIndex3.default)(m.DynamicPropertyKeys, function (key) {
|
2681
2820
|
return key == 'canusedbalancestorage';
|
2682
2821
|
});
|
2822
|
+
|
2823
|
+
var _ref35 = _mutantsUtil.platform || {},
|
2824
|
+
isNewRetailBCPos = _ref35.isNewRetailBCPos;
|
2825
|
+
|
2683
2826
|
(0, _mobx.runInAction)(function () {
|
2684
2827
|
_this24.cardNo = m.CardCode;
|
2685
2828
|
if (index >= 0) {
|