tplus-components-touch 3.54.11 → 3.55.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/billSearch/index.js +20 -10
- package/dist/components/billSearch/index.js.map +1 -1
- package/dist/components/commonForm/inputNumber/index.js +2 -17
- package/dist/components/commonForm/inputNumber/index.js.map +1 -1
- package/dist/components/hotKey/localConfig.js +0 -39
- package/dist/components/hotKey/localConfig.js.map +1 -1
- package/dist/components/inventorySearch/tab.js +14 -12
- package/dist/components/inventorySearch/tab.js.map +1 -1
- package/dist/components/keyboard/numkeyboardPassword.js +0 -31
- package/dist/components/keyboard/numkeyboardPassword.js.map +1 -1
- package/dist/components/message/index.js +11 -3
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +751 -752
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +0 -17
- package/dist/components/settlement/settlementApi.js +2 -2
- package/dist/components/settlement/settlementApi.js.map +1 -1
- package/dist/components/settlement/settlementStore.js +395 -578
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +3 -72
- package/dist/components/ticon/iconfont/iconfont.css +3 -15
- package/dist/components/ticon/iconfont/iconfont.js +1 -1
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.json +0 -21
- 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/index.js +1 -22
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/collection/api.js +0 -105
- package/dist/components/collection/api.js.map +0 -1
- package/dist/components/collection/index.js +0 -610
- package/dist/components/collection/index.js.map +0 -1
- package/dist/components/collection/searchView/index.js +0 -297
- package/dist/components/collection/searchView/index.js.map +0 -1
- package/dist/components/collection/searchView/index.less +0 -138
- package/dist/components/password/ModifyPass.js +0 -442
- package/dist/components/password/ModifyPass.js.map +0 -1
- package/dist/components/password/api.js +0 -100
- package/dist/components/password/api.js.map +0 -1
- package/dist/components/password/confirmPwd.js +0 -216
- package/dist/components/password/confirmPwd.js.map +0 -1
- package/dist/components/password/store.js +0 -284
- package/dist/components/password/store.js.map +0 -1
- package/dist/components/password/style.less +0 -95
@@ -169,7 +169,7 @@ function _initializerWarningHelper(descriptor, context) {
|
|
169
169
|
var t = _mutantsMicrofx.i18n.getFixedT(null, 'newretail');
|
170
170
|
|
171
171
|
var SettlementStore = (_class = (_temp = _class2 = function () {
|
172
|
-
//
|
172
|
+
//type==2
|
173
173
|
function SettlementStore() {
|
174
174
|
(0, _classCallCheck3.default)(this, SettlementStore);
|
175
175
|
|
@@ -180,12 +180,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
180
180
|
if (params) this.cloudPrintArguments = params;
|
181
181
|
this.setNewStyle();
|
182
182
|
this.SettlementApi = _settlementApi2.default;
|
183
|
-
}
|
184
|
-
|
185
|
-
// 赊销-欠款单据
|
186
|
-
//type==2
|
187
|
-
//type 1:储值;2:赊销; 不传或0是普通开单
|
188
|
-
|
183
|
+
} // 预售都是全款;预订是否全款,在点击确认支付时计算订金和商品金额计算得出
|
189
184
|
|
190
185
|
(0, _createClass3.default)(SettlementStore, [{
|
191
186
|
key: 'initPaymodes',
|
@@ -196,33 +191,12 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
196
191
|
}
|
197
192
|
}, {
|
198
193
|
key: 'init',
|
199
|
-
value: function init(
|
194
|
+
value: function init(context, amounthandler, datasource, storeinfo, bquick, amount, type, data, payModeKey) {
|
200
195
|
var _this2 = this;
|
201
196
|
|
202
|
-
var context = _ref.context,
|
203
|
-
amounthandler = _ref.amounthandler,
|
204
|
-
datasource = _ref.datasource,
|
205
|
-
storeinfo = _ref.storeinfo,
|
206
|
-
bquick = _ref.bquick,
|
207
|
-
amount = _ref.amount,
|
208
|
-
type = _ref.type,
|
209
|
-
data = _ref.data,
|
210
|
-
payModeKey = _ref.payModeKey,
|
211
|
-
creditSalesVoucher = _ref.creditSalesVoucher,
|
212
|
-
custVendorId = _ref.custVendorId;
|
213
|
-
|
214
197
|
this.setNewStyle();
|
215
198
|
this.type = type;
|
216
|
-
|
217
|
-
if (type == 1) {
|
218
|
-
this.brefund = this.paymode.setAmount(amount, 0);
|
219
|
-
this.dto = data;
|
220
|
-
} else if (type == 2) {
|
221
|
-
this.brefund = this.paymode.setAmount(amount, 0);
|
222
|
-
this.dto = context.viewModel.data;
|
223
|
-
this.creditSalesVoucher = creditSalesVoucher;
|
224
|
-
this.custVendorId = custVendorId;
|
225
|
-
} else {
|
199
|
+
if (context) {
|
226
200
|
this.context = context;
|
227
201
|
this.amountHandler = amounthandler;
|
228
202
|
this.dataSource = datasource;
|
@@ -256,9 +230,9 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
256
230
|
PreSellOrBook = _getLoginInfo.PreSellOrBook,
|
257
231
|
PercentageWhenBook = _getLoginInfo.PercentageWhenBook;
|
258
232
|
|
259
|
-
var
|
260
|
-
IdbusiType =
|
261
|
-
DistributionMode =
|
233
|
+
var _ref = this.dto || {},
|
234
|
+
IdbusiType = _ref.IdbusiType,
|
235
|
+
DistributionMode = _ref.DistributionMode;
|
262
236
|
|
263
237
|
if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
264
238
|
this.paymode.bookMaxValue = value;
|
@@ -283,11 +257,11 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
283
257
|
this.paymode.bookMaxValue = _mutantsMicrofx.stores.drawerStore.totalWaitPaidAmount;
|
284
258
|
}
|
285
259
|
}
|
286
|
-
|
287
|
-
if (IdbusiType == 42) {
|
288
|
-
value = amount;
|
289
|
-
}
|
260
|
+
|
290
261
|
this.brefund = this.paymode.setAmount(value, this.dto.OnlinePaymentAmount);
|
262
|
+
} else {
|
263
|
+
this.brefund = this.paymode.setAmount(amount, 0);
|
264
|
+
this.dto = data;
|
291
265
|
}
|
292
266
|
this.paymode.clean();
|
293
267
|
|
@@ -332,8 +306,8 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
332
306
|
var _enumController$getEn2 = _mutantsUtil.enumController.getEnumOj(),
|
333
307
|
PayStyle = _enumController$getEn2.PayStyle;
|
334
308
|
|
335
|
-
var
|
336
|
-
isNewRetailBCPos =
|
309
|
+
var _ref2 = _mutantsUtil.platform || {},
|
310
|
+
isNewRetailBCPos = _ref2.isNewRetailBCPos;
|
337
311
|
|
338
312
|
console.log(this.dto, 'dto==========');
|
339
313
|
this.paymode.checkList = [];
|
@@ -359,14 +333,14 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
359
333
|
if (themode.paymentType == PayStyle.djq) {
|
360
334
|
(0, _each3.default)(_this4.dto.RetailCouponDetails, function (djq) {
|
361
335
|
if (isNewRetailBCPos) {
|
362
|
-
var
|
363
|
-
displayText =
|
364
|
-
promoRuleId =
|
365
|
-
dateMount =
|
366
|
-
promoMethodEnum =
|
367
|
-
discountPct =
|
368
|
-
promoId =
|
369
|
-
id =
|
336
|
+
var _ref3 = djq || {},
|
337
|
+
displayText = _ref3.displayText,
|
338
|
+
promoRuleId = _ref3.promoRuleId,
|
339
|
+
dateMount = _ref3.dateMount,
|
340
|
+
promoMethodEnum = _ref3.promoMethodEnum,
|
341
|
+
discountPct = _ref3.discountPct,
|
342
|
+
promoId = _ref3.promoId,
|
343
|
+
id = _ref3.id;
|
370
344
|
|
371
345
|
_this4.addDjq(djq.CouponCode, djq.CouponTitle, true, null, djq.ReductionAmount, djq.EnableAmount, djq.LastTS, true, false, _this4.dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, null, id, true);
|
372
346
|
return;
|
@@ -479,7 +453,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
479
453
|
}
|
480
454
|
var isOnlyEnabled = returnType ? false : true; //非原单退货为false,其他true
|
481
455
|
return this.SettlementApi.getCardInfoByCardNo(v, isOnlyEnabled).then(function () {
|
482
|
-
var
|
456
|
+
var _ref4 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee(result) {
|
483
457
|
var data, m;
|
484
458
|
return _regenerator2.default.wrap(function _callee$(_context) {
|
485
459
|
while (1) {
|
@@ -554,7 +528,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
554
528
|
}));
|
555
529
|
|
556
530
|
return function (_x) {
|
557
|
-
return
|
531
|
+
return _ref4.apply(this, arguments);
|
558
532
|
};
|
559
533
|
}());
|
560
534
|
}
|
@@ -885,8 +859,8 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
885
859
|
}, {
|
886
860
|
key: 'commit',
|
887
861
|
value: function () {
|
888
|
-
var
|
889
|
-
var status, paylist, ret,
|
862
|
+
var _ref5 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(bTest) {
|
863
|
+
var status, paylist, ret, _ref6, _ref6$data, code, returnMsg, state, ret1, ret2;
|
890
864
|
|
891
865
|
return _regenerator2.default.wrap(function _callee2$(_context2) {
|
892
866
|
while (1) {
|
@@ -927,9 +901,9 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
927
901
|
|
928
902
|
case 12:
|
929
903
|
ret = _context2.sent;
|
930
|
-
|
931
|
-
|
932
|
-
code =
|
904
|
+
_ref6 = ret || {}, _ref6$data = _ref6.data;
|
905
|
+
_ref6$data = _ref6$data === undefined ? {} : _ref6$data;
|
906
|
+
code = _ref6$data.code, returnMsg = _ref6$data.returnMsg;
|
933
907
|
|
934
908
|
if (!(code && code == 10001)) {
|
935
909
|
_context2.next = 24;
|
@@ -968,63 +942,36 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
968
942
|
return _context2.abrupt('return', _promise2.default.resolve(false));
|
969
943
|
|
970
944
|
case 29:
|
971
|
-
_context2.next =
|
945
|
+
_context2.next = 40;
|
972
946
|
break;
|
973
947
|
|
974
948
|
case 31:
|
975
|
-
|
976
|
-
_context2.next = 39;
|
977
|
-
break;
|
978
|
-
}
|
979
|
-
|
980
|
-
_context2.next = 34;
|
981
|
-
return this.saveCreditSales();
|
982
|
-
|
983
|
-
case 34:
|
984
|
-
_ret = _context2.sent;
|
985
|
-
|
986
|
-
if (!(_ret === false)) {
|
987
|
-
_context2.next = 37;
|
988
|
-
break;
|
989
|
-
}
|
990
|
-
|
991
|
-
return _context2.abrupt('return', _promise2.default.resolve(false));
|
992
|
-
|
993
|
-
case 37:
|
994
|
-
_context2.next = 49;
|
995
|
-
break;
|
996
|
-
|
997
|
-
case 39:
|
998
|
-
if (dto) {
|
999
|
-
this.dto = dto;
|
1000
|
-
this.context = context;
|
1001
|
-
}
|
1002
|
-
_context2.next = 42;
|
949
|
+
_context2.next = 33;
|
1003
950
|
return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
|
1004
951
|
|
1005
|
-
case
|
1006
|
-
_context2.next =
|
952
|
+
case 33:
|
953
|
+
_context2.next = 35;
|
1007
954
|
return this.save();
|
1008
955
|
|
1009
|
-
case
|
956
|
+
case 35:
|
1010
957
|
ret2 = _context2.sent;
|
1011
958
|
|
1012
959
|
if (!(ret2 === false)) {
|
1013
|
-
_context2.next =
|
960
|
+
_context2.next = 38;
|
1014
961
|
break;
|
1015
962
|
}
|
1016
963
|
|
1017
964
|
return _context2.abrupt('return', _promise2.default.resolve(false));
|
1018
965
|
|
1019
|
-
case
|
1020
|
-
_context2.next =
|
966
|
+
case 38:
|
967
|
+
_context2.next = 40;
|
1021
968
|
return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
|
1022
969
|
|
1023
|
-
case
|
970
|
+
case 40:
|
1024
971
|
return _context2.abrupt('return', _promise2.default.resolve(true));
|
1025
972
|
|
1026
|
-
case
|
1027
|
-
_context2.prev =
|
973
|
+
case 43:
|
974
|
+
_context2.prev = 43;
|
1028
975
|
_context2.t0 = _context2['catch'](4);
|
1029
976
|
|
1030
977
|
console.error('settlementStore.commit失败,错误信息:' + _context2.t0);
|
@@ -1032,139 +979,20 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1032
979
|
this.thirdPayRefund(status == 1 ? 2 : 1);
|
1033
980
|
return _context2.abrupt('return', _promise2.default.resolve(_context2.t0));
|
1034
981
|
|
1035
|
-
case
|
982
|
+
case 48:
|
1036
983
|
case 'end':
|
1037
984
|
return _context2.stop();
|
1038
985
|
}
|
1039
986
|
}
|
1040
|
-
}, _callee2, this, [[4,
|
987
|
+
}, _callee2, this, [[4, 43]]);
|
1041
988
|
}));
|
1042
989
|
|
1043
|
-
function commit(_x2
|
1044
|
-
return
|
990
|
+
function commit(_x2) {
|
991
|
+
return _ref5.apply(this, arguments);
|
1045
992
|
}
|
1046
993
|
|
1047
994
|
return commit;
|
1048
995
|
}()
|
1049
|
-
|
1050
|
-
//赊销结算
|
1051
|
-
|
1052
|
-
}, {
|
1053
|
-
key: 'saveCreditSales',
|
1054
|
-
value: function () {
|
1055
|
-
var _ref8 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
|
1056
|
-
var _this10 = this;
|
1057
|
-
|
1058
|
-
var _enumController$getEn12, PayStyle, TradeType, IPMSG, retailPaymentDetails, thePaymodes, _ref9, UserCode, UserId, UserName, VoucherDate, IdShiftVoucher, Shift, ShiftCode, Idstore, POSCode, WipeChange, params, payList, payment, tradeType, ret, _ref10, type, data, code;
|
1059
|
-
|
1060
|
-
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
1061
|
-
while (1) {
|
1062
|
-
switch (_context3.prev = _context3.next) {
|
1063
|
-
case 0:
|
1064
|
-
_enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn12.PayStyle, TradeType = _enumController$getEn12.TradeType;
|
1065
|
-
IPMSG = {};
|
1066
|
-
|
1067
|
-
if (!!window.localStorage.IPMSG) {
|
1068
|
-
IPMSG = JSON.parse(window.localStorage.IPMSG);
|
1069
|
-
}
|
1070
|
-
retailPaymentDetails = [];
|
1071
|
-
thePaymodes = this.newStyle ? (0, _filter3.default)(this.paymode.thePaymodes, function (mode) {
|
1072
|
-
return parseFloat(mode.value) != 0;
|
1073
|
-
}) : this.paymode.thePaymodes;
|
1074
|
-
|
1075
|
-
(0, _each3.default)(thePaymodes, function (mode) {
|
1076
|
-
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
1077
|
-
|
1078
|
-
var value = parseFloat(mode.value);
|
1079
|
-
var giveChange = null;
|
1080
|
-
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
1081
|
-
value = Math.Add(value, _this10.paymode.receivable);
|
1082
|
-
giveChange = Math.abs(_this10.paymode.receivable);
|
1083
|
-
}
|
1084
|
-
retailPaymentDetails.push({
|
1085
|
-
"PaymentCode": mode.authCode,
|
1086
|
-
"ThirdPaymentInfo": themode.thridPayment || null,
|
1087
|
-
"IdbankAccount": themode.idBankAccount,
|
1088
|
-
"ExchangeRate": themode.exchangeRate,
|
1089
|
-
"OrigAmount": mode.exchangeRate != 1 ? mode.value2 : value,
|
1090
|
-
"Amount": value,
|
1091
|
-
"GiveChange": giveChange,
|
1092
|
-
"Code": mode.paymethodId,
|
1093
|
-
"IdsettleStyle": themode.idSettleStyle,
|
1094
|
-
"Idcurrency": themode.idCurrency,
|
1095
|
-
"ThirdPaymentReturnInfo": mode.thirdPaymentReturnInfo || null
|
1096
|
-
});
|
1097
|
-
});
|
1098
|
-
_ref9 = this.dto || {}, UserCode = _ref9.UserCode, UserId = _ref9.UserId, UserName = _ref9.UserName, VoucherDate = _ref9.VoucherDate, IdShiftVoucher = _ref9.IdShiftVoucher, Shift = _ref9.Shift, ShiftCode = _ref9.ShiftCode, Idstore = _ref9.Idstore, POSCode = _ref9.POSCode, WipeChange = _ref9.WipeChange;
|
1099
|
-
params = {
|
1100
|
-
"cip": IPMSG.query || "",
|
1101
|
-
"longitude": IPMSG.longitude || "",
|
1102
|
-
"latitude": IPMSG.latitude || "",
|
1103
|
-
"Retails": this.creditSalesVoucher,
|
1104
|
-
"IdCustVendor": this.custVendorId,
|
1105
|
-
"TotalOwedAmount": this.paymode.amount, //TotalOwedAmount欠款金额
|
1106
|
-
"TotalTaxAmount": this.paymode.received, //TotalTaxAmount 本次结算付款金额
|
1107
|
-
"RetailPaymentDetails": retailPaymentDetails,
|
1108
|
-
UserCode: UserCode,
|
1109
|
-
UserId: UserId,
|
1110
|
-
UserName: UserName,
|
1111
|
-
VoucherDate: VoucherDate,
|
1112
|
-
IdShiftVoucher: IdShiftVoucher,
|
1113
|
-
Shift: Shift,
|
1114
|
-
ShiftCode: ShiftCode,
|
1115
|
-
Idstore: Idstore,
|
1116
|
-
POSCode: POSCode,
|
1117
|
-
WipeChange: WipeChange
|
1118
|
-
//处理存在二开支付情况
|
1119
|
-
};
|
1120
|
-
payList = retailPaymentDetails.filter(function (v) {
|
1121
|
-
return v.ThirdPaymentInfo;
|
1122
|
-
});
|
1123
|
-
|
1124
|
-
if (!(payList && payList.length > 0)) {
|
1125
|
-
_context3.next = 22;
|
1126
|
-
break;
|
1127
|
-
}
|
1128
|
-
|
1129
|
-
payment = payList[0];
|
1130
|
-
tradeType = payment && payment.StorageAmount > 0 ? TradeType.PAY : TradeType.REFUND;
|
1131
|
-
_context3.next = 14;
|
1132
|
-
return this.thirdPay(1, payment, tradeType, params);
|
1133
|
-
|
1134
|
-
case 14:
|
1135
|
-
ret = _context3.sent;
|
1136
|
-
_ref10 = ret || {}, type = _ref10.type, data = _ref10.data, code = _ref10.code;
|
1137
|
-
|
1138
|
-
if (!(type === true)) {
|
1139
|
-
_context3.next = 20;
|
1140
|
-
break;
|
1141
|
-
}
|
1142
|
-
|
1143
|
-
params = data;
|
1144
|
-
_context3.next = 22;
|
1145
|
-
break;
|
1146
|
-
|
1147
|
-
case 20:
|
1148
|
-
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
1149
|
-
return _context3.abrupt('return', false);
|
1150
|
-
|
1151
|
-
case 22:
|
1152
|
-
return _context3.abrupt('return', this.SettlementApi.saveCreditSales({ params: params }));
|
1153
|
-
|
1154
|
-
case 23:
|
1155
|
-
case 'end':
|
1156
|
-
return _context3.stop();
|
1157
|
-
}
|
1158
|
-
}
|
1159
|
-
}, _callee3, this);
|
1160
|
-
}));
|
1161
|
-
|
1162
|
-
function saveCreditSales() {
|
1163
|
-
return _ref8.apply(this, arguments);
|
1164
|
-
}
|
1165
|
-
|
1166
|
-
return saveCreditSales;
|
1167
|
-
}()
|
1168
996
|
}, {
|
1169
997
|
key: 'handlePrint',
|
1170
998
|
value: function handlePrint(resp) {
|
@@ -1174,32 +1002,32 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1174
1002
|
}, {
|
1175
1003
|
key: 'saveMember',
|
1176
1004
|
value: function () {
|
1177
|
-
var
|
1178
|
-
var
|
1005
|
+
var _ref7 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
|
1006
|
+
var _this10 = this;
|
1179
1007
|
|
1180
|
-
var _enumController$
|
1008
|
+
var _enumController$getEn12, PayStyle, TradeType, IPMSG, dtoParams, payList, payment, tradeType, ret, _ref8, type, data, msg, code;
|
1181
1009
|
|
1182
|
-
return _regenerator2.default.wrap(function
|
1010
|
+
return _regenerator2.default.wrap(function _callee3$(_context3) {
|
1183
1011
|
while (1) {
|
1184
|
-
switch (
|
1012
|
+
switch (_context3.prev = _context3.next) {
|
1185
1013
|
case 0:
|
1186
|
-
_enumController$
|
1014
|
+
_enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn12.PayStyle, TradeType = _enumController$getEn12.TradeType;
|
1187
1015
|
|
1188
1016
|
(0, _mobx.runInAction)(function () {
|
1189
|
-
|
1190
|
-
var thePaymodes =
|
1017
|
+
_this10.dto.StorageMutiSettleDetails = [];
|
1018
|
+
var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
|
1191
1019
|
return parseFloat(mode.value) != 0;
|
1192
|
-
}) :
|
1020
|
+
}) : _this10.paymode.thePaymodes;
|
1193
1021
|
(0, _each3.default)(thePaymodes, function (mode) {
|
1194
|
-
var themode = (0, _find3.default)(
|
1022
|
+
var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
|
1195
1023
|
|
1196
1024
|
var value = parseFloat(mode.value);
|
1197
1025
|
var giveChange = null;
|
1198
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
1199
|
-
value = Math.Add(value,
|
1200
|
-
giveChange = Math.abs(
|
1026
|
+
if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
|
1027
|
+
value = Math.Add(value, _this10.paymode.receivable);
|
1028
|
+
giveChange = Math.abs(_this10.paymode.receivable);
|
1201
1029
|
}
|
1202
|
-
|
1030
|
+
_this10.dto.StorageMutiSettleDetails.push({
|
1203
1031
|
Code: mode.paymethodId,
|
1204
1032
|
StorageAmount: value,
|
1205
1033
|
GiveChange: giveChange,
|
@@ -1208,7 +1036,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1208
1036
|
PaymentCode: mode.authCode,
|
1209
1037
|
DynamicPropertyKeys: [],
|
1210
1038
|
DynamicPropertyValues: [],
|
1211
|
-
DataSource: { Id:
|
1039
|
+
DataSource: { Id: _this10.dataSource },
|
1212
1040
|
ThirdPaymentInfo: themode.thridPayment || null,
|
1213
1041
|
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
1214
1042
|
});
|
@@ -1228,49 +1056,49 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1228
1056
|
});
|
1229
1057
|
|
1230
1058
|
if (!(payList && payList.length > 0)) {
|
1231
|
-
|
1059
|
+
_context3.next = 19;
|
1232
1060
|
break;
|
1233
1061
|
}
|
1234
1062
|
|
1235
1063
|
payment = payList[0];
|
1236
1064
|
tradeType = payment && payment.StorageAmount > 0 ? TradeType.PAY : TradeType.REFUND;
|
1237
|
-
|
1065
|
+
_context3.next = 11;
|
1238
1066
|
return this.thirdPay(2, payment, tradeType, dtoParams);
|
1239
1067
|
|
1240
1068
|
case 11:
|
1241
|
-
ret =
|
1242
|
-
|
1069
|
+
ret = _context3.sent;
|
1070
|
+
_ref8 = ret || {}, type = _ref8.type, data = _ref8.data, msg = _ref8.msg, code = _ref8.code;
|
1243
1071
|
|
1244
1072
|
if (!(type === true)) {
|
1245
|
-
|
1073
|
+
_context3.next = 17;
|
1246
1074
|
break;
|
1247
1075
|
}
|
1248
1076
|
|
1249
1077
|
dtoParams = data;
|
1250
|
-
|
1078
|
+
_context3.next = 19;
|
1251
1079
|
break;
|
1252
1080
|
|
1253
1081
|
case 17:
|
1254
1082
|
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
1255
|
-
return
|
1083
|
+
return _context3.abrupt('return', false);
|
1256
1084
|
|
1257
1085
|
case 19:
|
1258
1086
|
this.dtoParams = dtoParams;
|
1259
1087
|
console.log('储值结算信息:', dtoParams);
|
1260
|
-
return
|
1261
|
-
|
1088
|
+
return _context3.abrupt('return', this.SettlementApi.INewRetailMemberStorageSave({ dto: dtoParams }).then(function (resp) {
|
1089
|
+
_this10.handlePrint(resp);
|
1262
1090
|
}));
|
1263
1091
|
|
1264
1092
|
case 22:
|
1265
1093
|
case 'end':
|
1266
|
-
return
|
1094
|
+
return _context3.stop();
|
1267
1095
|
}
|
1268
1096
|
}
|
1269
|
-
},
|
1097
|
+
}, _callee3, this);
|
1270
1098
|
}));
|
1271
1099
|
|
1272
1100
|
function saveMember() {
|
1273
|
-
return
|
1101
|
+
return _ref7.apply(this, arguments);
|
1274
1102
|
}
|
1275
1103
|
|
1276
1104
|
return saveMember;
|
@@ -1278,31 +1106,31 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1278
1106
|
}, {
|
1279
1107
|
key: 'save',
|
1280
1108
|
value: function () {
|
1281
|
-
var
|
1282
|
-
var
|
1109
|
+
var _ref9 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
|
1110
|
+
var _this11 = this;
|
1283
1111
|
|
1284
|
-
var _enumController$
|
1112
|
+
var _enumController$getEn13, PayStyle, TradeType, IPMSG, RetailTypeEnum, _getLoginInfo3, PreSellOrBook, PercentageWhenBook, _ref10, IdbusiType, DistributionMode, prepaidAmount, fullPayment, dtoParams, payList, payment, tradeType, ret, _ref11, type, data, msg, code;
|
1285
1113
|
|
1286
|
-
return _regenerator2.default.wrap(function
|
1114
|
+
return _regenerator2.default.wrap(function _callee4$(_context4) {
|
1287
1115
|
while (1) {
|
1288
|
-
switch (
|
1116
|
+
switch (_context4.prev = _context4.next) {
|
1289
1117
|
case 0:
|
1290
|
-
_enumController$
|
1118
|
+
_enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn13.PayStyle, TradeType = _enumController$getEn13.TradeType;
|
1291
1119
|
|
1292
1120
|
(0, _mobx.runInAction)(function () {
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1121
|
+
_this11.dto.RetailPaymentDetails = [];
|
1122
|
+
_this11.dto.RetailStorageDetails = [];
|
1123
|
+
_this11.dto.RetailCouponDetails = [];
|
1296
1124
|
var czkSum = 0;
|
1297
1125
|
var count = 0;
|
1298
|
-
var thePaymodes =
|
1126
|
+
var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
|
1299
1127
|
return parseFloat(mode.value) != 0;
|
1300
|
-
}) :
|
1128
|
+
}) : _this11.paymode.thePaymodes;
|
1301
1129
|
(0, _each3.default)(thePaymodes, function (mode, index) {
|
1302
|
-
var themode = (0, _find3.default)(
|
1130
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
|
1303
1131
|
if (mode.paymentType == PayStyle.hyczk) {
|
1304
1132
|
czkSum = Math.Add(czkSum, mode.value);
|
1305
|
-
|
1133
|
+
_this11.dto.RetailStorageDetails.push({
|
1306
1134
|
Code: mode.paymethodId,
|
1307
1135
|
MeStorageCardId: mode.meStorageCardId,
|
1308
1136
|
StoragePaymentAmount: mode.value,
|
@@ -1311,17 +1139,17 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1311
1139
|
Idmember: mode.memberId,
|
1312
1140
|
DynamicPropertyKeys: [],
|
1313
1141
|
DynamicPropertyValues: [],
|
1314
|
-
DataSource: { Id:
|
1142
|
+
DataSource: { Id: _this11.dataSource },
|
1315
1143
|
Password: mode.authCode
|
1316
1144
|
});
|
1317
1145
|
} else {
|
1318
1146
|
var value = parseFloat(mode.value);
|
1319
1147
|
var giveChange = null;
|
1320
|
-
if (mode.paymentType == PayStyle.xianjin &&
|
1321
|
-
value = Math.Add(value,
|
1322
|
-
giveChange = Math.abs(
|
1148
|
+
if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
|
1149
|
+
value = Math.Add(value, _this11.paymode.receivable);
|
1150
|
+
giveChange = Math.abs(_this11.paymode.receivable);
|
1323
1151
|
}
|
1324
|
-
|
1152
|
+
_this11.dto.RetailPaymentDetails.push({
|
1325
1153
|
Code: mode.paymethodId,
|
1326
1154
|
OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
|
1327
1155
|
Amount: value,
|
@@ -1335,14 +1163,14 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1335
1163
|
OverchargesAmount: mode.overchargesAmount,
|
1336
1164
|
DynamicPropertyKeys: [],
|
1337
1165
|
DynamicPropertyValues: [],
|
1338
|
-
DataSource: { Id:
|
1166
|
+
DataSource: { Id: _this11.dataSource },
|
1339
1167
|
ThirdPaymentInfo: themode.thridPayment || null,
|
1340
1168
|
SettleStyle: { Name: mode.name },
|
1341
1169
|
ThirdPaymentReturnInfo: mode.thirdPaymentReturnInfo || null
|
1342
1170
|
});
|
1343
1171
|
if (mode.paymentType == PayStyle.djq) {
|
1344
|
-
(0, _each3.default)(
|
1345
|
-
|
1172
|
+
(0, _each3.default)(_this11.paymode.checkList && _this11.paymode.checkList.length ? _this11.paymode.checkList : mode.djqs, function (djq) {
|
1173
|
+
_this11.dto.RetailCouponDetails.push({
|
1346
1174
|
CouponCode: djq.promoCouponCode,
|
1347
1175
|
ReductionAmount: djq.amount,
|
1348
1176
|
EnableAmount: djq.doorsill,
|
@@ -1352,24 +1180,24 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1352
1180
|
PromotionId: djq.promoId,
|
1353
1181
|
PromotionRuleId: djq.promoRuleId,
|
1354
1182
|
PromoCouponAllocatedId: djq.id,
|
1355
|
-
DataSource: { Id:
|
1183
|
+
DataSource: { Id: _this11.dataSource }
|
1356
1184
|
});
|
1357
1185
|
});
|
1358
1186
|
}
|
1359
1187
|
}
|
1360
1188
|
});
|
1361
|
-
if (
|
1362
|
-
var themode = (0, _find3.default)(
|
1363
|
-
|
1364
|
-
Code:
|
1189
|
+
if (_this11.dto.RetailStorageDetails.length > 0) {
|
1190
|
+
var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
|
1191
|
+
_this11.dto.RetailPaymentDetails.push({
|
1192
|
+
Code: _this11.paymode.counter,
|
1365
1193
|
OrigAmount: czkSum,
|
1366
1194
|
Amount: czkSum,
|
1367
1195
|
IdsettleStyle: themode.idSettleStyle,
|
1368
1196
|
IdbankAccount: themode.idBankAccount,
|
1369
1197
|
DynamicPropertyKeys: [],
|
1370
1198
|
DynamicPropertyValues: [],
|
1371
|
-
DataSource: { Id:
|
1372
|
-
RetailStorageDetails:
|
1199
|
+
DataSource: { Id: _this11.dataSource },
|
1200
|
+
RetailStorageDetails: _this11.dto.RetailStorageDetails
|
1373
1201
|
});
|
1374
1202
|
}
|
1375
1203
|
});
|
@@ -1382,16 +1210,8 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1382
1210
|
}
|
1383
1211
|
RetailTypeEnum = this.dto.IdbusiType == 36 ? "INTEGRAL_EXCHANGE" : "NORMAL";
|
1384
1212
|
_getLoginInfo3 = this.getLoginInfo(), PreSellOrBook = _getLoginInfo3.PreSellOrBook, PercentageWhenBook = _getLoginInfo3.PercentageWhenBook;
|
1385
|
-
|
1213
|
+
_ref10 = this.dto || {}, IdbusiType = _ref10.IdbusiType, DistributionMode = _ref10.DistributionMode;
|
1386
1214
|
|
1387
|
-
if (IdbusiType === 42) {
|
1388
|
-
_dto = this.dto, _TotalTaxAmount = _dto.TotalTaxAmount, ArrearsAmount = _dto.ArrearsAmount;
|
1389
|
-
returnAmount1 = Math.abs(_TotalTaxAmount) - ArrearsAmount;
|
1390
|
-
|
1391
|
-
(0, _mobx.runInAction)(function () {
|
1392
|
-
_this12.dto.CreditUsageAmount = -(returnAmount1 > 1 ? (0, _utils.getFixedNumber)(Math.abs(_TotalTaxAmount) - returnAmount1, 2) : Math.abs(_TotalTaxAmount, 2));
|
1393
|
-
});
|
1394
|
-
}
|
1395
1215
|
if (IdbusiType == 38 && PreSellOrBook == 'BOOK' && PercentageWhenBook < 100 && (!DistributionMode.Id || DistributionMode.Id == 'ON_SITE_PICKUP')) {
|
1396
1216
|
prepaidAmount = (0, _utils.getFixedNumber)(this.dto.RetailPaymentDetails.reduce(function (c, item) {
|
1397
1217
|
return c + (item.Amount || 0);
|
@@ -1402,106 +1222,99 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1402
1222
|
|
1403
1223
|
this.isFull = fullPayment == prepaidAmount; // 是否全款
|
1404
1224
|
(0, _mobx.runInAction)(function () {
|
1405
|
-
|
1225
|
+
_this11.dto.PrepaidAmount = prepaidAmount;
|
1406
1226
|
});
|
1407
1227
|
}
|
1408
|
-
|
1228
|
+
_context4.t1 = this.dto.IdbusiType == 37;
|
1409
1229
|
|
1410
|
-
if (!
|
1411
|
-
|
1230
|
+
if (!_context4.t1) {
|
1231
|
+
_context4.next = 14;
|
1412
1232
|
break;
|
1413
1233
|
}
|
1414
1234
|
|
1415
|
-
|
1235
|
+
_context4.next = 13;
|
1416
1236
|
return this.checkIntegralExchangeReturn(this.dto.RetailDetails[0].ReturnSourceId);
|
1417
1237
|
|
1418
|
-
case
|
1419
|
-
|
1238
|
+
case 13:
|
1239
|
+
_context4.t1 = _context4.sent;
|
1420
1240
|
|
1421
|
-
case
|
1422
|
-
|
1241
|
+
case 14:
|
1242
|
+
_context4.t0 = _context4.t1;
|
1423
1243
|
|
1424
|
-
if (
|
1425
|
-
|
1244
|
+
if (_context4.t0) {
|
1245
|
+
_context4.next = 17;
|
1426
1246
|
break;
|
1427
1247
|
}
|
1428
1248
|
|
1429
|
-
|
1249
|
+
_context4.t0 = this.dto.IdbusiType != 37;
|
1430
1250
|
|
1431
|
-
case
|
1432
|
-
if (!
|
1433
|
-
|
1251
|
+
case 17:
|
1252
|
+
if (!_context4.t0) {
|
1253
|
+
_context4.next = 36;
|
1434
1254
|
break;
|
1435
1255
|
}
|
1436
1256
|
|
1437
1257
|
dtoParams = (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } });
|
1438
|
-
|
1439
|
-
if (!(IdbusiType !== 42)) {
|
1440
|
-
_context5.next = 36;
|
1441
|
-
break;
|
1442
|
-
}
|
1443
|
-
|
1444
1258
|
//处理存在二开支付情况
|
1259
|
+
|
1445
1260
|
payList = dtoParams.RetailPaymentDetails.filter(function (v) {
|
1446
1261
|
return v.ThirdPaymentInfo;
|
1447
1262
|
});
|
1448
1263
|
|
1449
1264
|
if (!(payList && payList.length > 0)) {
|
1450
|
-
|
1265
|
+
_context4.next = 33;
|
1451
1266
|
break;
|
1452
1267
|
}
|
1453
1268
|
|
1454
1269
|
payment = payList[0];
|
1455
1270
|
tradeType = payment && payment.Amount > 0 ? TradeType.PAY : TradeType.REFUND;
|
1456
|
-
|
1271
|
+
_context4.next = 25;
|
1457
1272
|
return this.thirdPay(1, payment, tradeType, dtoParams);
|
1458
1273
|
|
1459
|
-
case
|
1460
|
-
ret =
|
1461
|
-
|
1274
|
+
case 25:
|
1275
|
+
ret = _context4.sent;
|
1276
|
+
_ref11 = ret || {}, type = _ref11.type, data = _ref11.data, msg = _ref11.msg, code = _ref11.code;
|
1462
1277
|
|
1463
1278
|
if (!(type === true)) {
|
1464
|
-
|
1279
|
+
_context4.next = 31;
|
1465
1280
|
break;
|
1466
1281
|
}
|
1467
1282
|
|
1468
1283
|
dtoParams = data;
|
1469
|
-
|
1284
|
+
_context4.next = 33;
|
1470
1285
|
break;
|
1471
1286
|
|
1472
|
-
case
|
1287
|
+
case 31:
|
1473
1288
|
_message2.default.warn('\u5237\u5361\u652F\u4ED8\u5931\u8D25,\u9519\u8BEF\u7801:' + code);
|
1474
|
-
return
|
1289
|
+
return _context4.abrupt('return', false);
|
1475
1290
|
|
1476
|
-
case
|
1291
|
+
case 33:
|
1477
1292
|
this.dtoParams = dtoParams;
|
1478
|
-
|
1479
|
-
case 36:
|
1480
1293
|
console.log('结算信息:', dtoParams);
|
1481
|
-
return
|
1294
|
+
return _context4.abrupt('return', this.SettlementApi.retailPosSettle({
|
1482
1295
|
dto: dtoParams,
|
1483
1296
|
cip: IPMSG.query || "",
|
1484
1297
|
longitude: IPMSG.longitude || "",
|
1485
1298
|
latitude: IPMSG.latitude || ""
|
1486
1299
|
}).then(function (resp) {
|
1487
|
-
var
|
1488
|
-
ID =
|
1300
|
+
var _ref12 = resp || {},
|
1301
|
+
ID = _ref12.ID;
|
1489
1302
|
|
1490
|
-
|
1491
|
-
|
1492
|
-
|
1303
|
+
_this11.setDtoID(ID);
|
1304
|
+
_this11.billID = ID;
|
1305
|
+
_this11.paymode.checkList = [];
|
1493
1306
|
}));
|
1494
1307
|
|
1495
|
-
case
|
1308
|
+
case 36:
|
1496
1309
|
case 'end':
|
1497
|
-
return
|
1310
|
+
return _context4.stop();
|
1498
1311
|
}
|
1499
1312
|
}
|
1500
|
-
},
|
1313
|
+
}, _callee4, this);
|
1501
1314
|
}));
|
1502
1315
|
|
1503
1316
|
function save() {
|
1504
|
-
return
|
1317
|
+
return _ref9.apply(this, arguments);
|
1505
1318
|
}
|
1506
1319
|
|
1507
1320
|
return save;
|
@@ -1529,19 +1342,19 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1529
1342
|
}, {
|
1530
1343
|
key: 'thirdPay',
|
1531
1344
|
value: function () {
|
1532
|
-
var
|
1533
|
-
var cto, params, ret,
|
1345
|
+
var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(vType, payment, trade, dto) {
|
1346
|
+
var cto, params, ret, _ref14, Code, _Message, Result, _ref15, ThirdPaymentReturnInfo;
|
1534
1347
|
|
1535
|
-
return _regenerator2.default.wrap(function
|
1348
|
+
return _regenerator2.default.wrap(function _callee5$(_context5) {
|
1536
1349
|
while (1) {
|
1537
|
-
switch (
|
1350
|
+
switch (_context5.prev = _context5.next) {
|
1538
1351
|
case 0:
|
1539
|
-
|
1352
|
+
_context5.prev = 0;
|
1540
1353
|
cto = this.removeThirdPayDto(dto);
|
1541
1354
|
params = { VoucherType: vType, Payment: payment, TradeType: trade, dto: cto };
|
1542
1355
|
|
1543
1356
|
console.log('刷卡信息:', (0, _stringify2.default)(params));
|
1544
|
-
|
1357
|
+
_context5.next = 6;
|
1545
1358
|
return new _promise2.default(function (resolve, reject) {
|
1546
1359
|
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ThirdPayment', (0, _extends3.default)({}, params), function (res) {
|
1547
1360
|
return resolve(res);
|
@@ -1549,26 +1362,26 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1549
1362
|
});
|
1550
1363
|
|
1551
1364
|
case 6:
|
1552
|
-
ret =
|
1365
|
+
ret = _context5.sent;
|
1553
1366
|
|
1554
1367
|
console.log('刷卡返回信息:', ret);
|
1555
1368
|
ret = JSON.parse(ret);
|
1556
|
-
|
1369
|
+
_ref14 = ret || {}, Code = _ref14.Code, _Message = _ref14.Message, Result = _ref14.Result;
|
1557
1370
|
|
1558
1371
|
if (!(Code > 0)) {
|
1559
|
-
|
1372
|
+
_context5.next = 14;
|
1560
1373
|
break;
|
1561
1374
|
}
|
1562
1375
|
|
1563
|
-
return
|
1376
|
+
return _context5.abrupt('return', { type: false, data: null, msg: _Message, code: Code });
|
1564
1377
|
|
1565
1378
|
case 14:
|
1566
1379
|
if (!(trade == '00')) {
|
1567
|
-
|
1380
|
+
_context5.next = 20;
|
1568
1381
|
break;
|
1569
1382
|
}
|
1570
1383
|
|
1571
|
-
|
1384
|
+
_ref15 = Result || {}, ThirdPaymentReturnInfo = _ref15.ThirdPaymentReturnInfo;
|
1572
1385
|
|
1573
1386
|
if (vType == 1) {
|
1574
1387
|
dto.RetailPaymentDetails.forEach(function (v) {
|
@@ -1583,35 +1396,35 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1583
1396
|
}
|
1584
1397
|
});
|
1585
1398
|
}
|
1586
|
-
return
|
1399
|
+
return _context5.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
1587
1400
|
|
1588
1401
|
case 20:
|
1589
1402
|
if (!(trade == '02')) {
|
1590
|
-
|
1403
|
+
_context5.next = 22;
|
1591
1404
|
break;
|
1592
1405
|
}
|
1593
1406
|
|
1594
|
-
return
|
1407
|
+
return _context5.abrupt('return', { type: true, data: dto, msg: _Message, code: Code });
|
1595
1408
|
|
1596
1409
|
case 22:
|
1597
|
-
|
1410
|
+
_context5.next = 27;
|
1598
1411
|
break;
|
1599
1412
|
|
1600
1413
|
case 24:
|
1601
|
-
|
1602
|
-
|
1603
|
-
return
|
1414
|
+
_context5.prev = 24;
|
1415
|
+
_context5.t0 = _context5['catch'](0);
|
1416
|
+
return _context5.abrupt('return', { type: false, data: null, msg: _context5.t0, code: '9999' });
|
1604
1417
|
|
1605
1418
|
case 27:
|
1606
1419
|
case 'end':
|
1607
|
-
return
|
1420
|
+
return _context5.stop();
|
1608
1421
|
}
|
1609
1422
|
}
|
1610
|
-
},
|
1423
|
+
}, _callee5, this, [[0, 24]]);
|
1611
1424
|
}));
|
1612
1425
|
|
1613
|
-
function thirdPay(
|
1614
|
-
return
|
1426
|
+
function thirdPay(_x3, _x4, _x5, _x6) {
|
1427
|
+
return _ref13.apply(this, arguments);
|
1615
1428
|
}
|
1616
1429
|
|
1617
1430
|
return thirdPay;
|
@@ -1622,14 +1435,14 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1622
1435
|
}, {
|
1623
1436
|
key: 'thirdPayRefund',
|
1624
1437
|
value: function () {
|
1625
|
-
var
|
1626
|
-
var
|
1438
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type) {
|
1439
|
+
var _this12 = this;
|
1627
1440
|
|
1628
|
-
var dto, pay, payment, _enumController$
|
1441
|
+
var dto, pay, payment, _enumController$getEn14, TradeType;
|
1629
1442
|
|
1630
|
-
return _regenerator2.default.wrap(function
|
1443
|
+
return _regenerator2.default.wrap(function _callee7$(_context7) {
|
1631
1444
|
while (1) {
|
1632
|
-
switch (
|
1445
|
+
switch (_context7.prev = _context7.next) {
|
1633
1446
|
case 0:
|
1634
1447
|
dto = type == 1 ? this.dtoParams.RetailPaymentDetails : this.dtoParams.StorageMutiSettleDetails;
|
1635
1448
|
pay = dto && dto.filter(function (v) {
|
@@ -1641,43 +1454,43 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1641
1454
|
_message2.default.warn("支付出现异常,将发起刷卡退款。", { duration: 4.5 });
|
1642
1455
|
}, 1000);
|
1643
1456
|
payment = pay[0];
|
1644
|
-
_enumController$
|
1457
|
+
_enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(), TradeType = _enumController$getEn14.TradeType;
|
1645
1458
|
|
1646
|
-
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
1647
|
-
var ret,
|
1459
|
+
setTimeout((0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6() {
|
1460
|
+
var ret, _ref18, msg;
|
1648
1461
|
|
1649
|
-
return _regenerator2.default.wrap(function
|
1462
|
+
return _regenerator2.default.wrap(function _callee6$(_context6) {
|
1650
1463
|
while (1) {
|
1651
|
-
switch (
|
1464
|
+
switch (_context6.prev = _context6.next) {
|
1652
1465
|
case 0:
|
1653
|
-
|
1654
|
-
return
|
1466
|
+
_context6.next = 2;
|
1467
|
+
return _this12.thirdPay(type, payment, TradeType.REFUND, dto);
|
1655
1468
|
|
1656
1469
|
case 2:
|
1657
|
-
ret =
|
1658
|
-
|
1470
|
+
ret = _context6.sent;
|
1471
|
+
_ref18 = ret || {}, msg = _ref18.msg;
|
1659
1472
|
|
1660
1473
|
console.log('\u5237\u5361\u652F\u4ED8\u9000\u6B3E:' + msg);
|
1661
1474
|
|
1662
1475
|
case 5:
|
1663
1476
|
case 'end':
|
1664
|
-
return
|
1477
|
+
return _context6.stop();
|
1665
1478
|
}
|
1666
1479
|
}
|
1667
|
-
},
|
1480
|
+
}, _callee6, _this12);
|
1668
1481
|
})), 4500);
|
1669
1482
|
}
|
1670
1483
|
|
1671
1484
|
case 3:
|
1672
1485
|
case 'end':
|
1673
|
-
return
|
1486
|
+
return _context7.stop();
|
1674
1487
|
}
|
1675
1488
|
}
|
1676
|
-
},
|
1489
|
+
}, _callee7, this);
|
1677
1490
|
}));
|
1678
1491
|
|
1679
|
-
function thirdPayRefund(
|
1680
|
-
return
|
1492
|
+
function thirdPayRefund(_x7) {
|
1493
|
+
return _ref16.apply(this, arguments);
|
1681
1494
|
}
|
1682
1495
|
|
1683
1496
|
return thirdPayRefund;
|
@@ -1690,35 +1503,35 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1690
1503
|
}, {
|
1691
1504
|
key: 'querySettleResult',
|
1692
1505
|
value: function () {
|
1693
|
-
var
|
1694
|
-
return _regenerator2.default.wrap(function
|
1506
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
1507
|
+
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
1695
1508
|
while (1) {
|
1696
|
-
switch (
|
1509
|
+
switch (_context8.prev = _context8.next) {
|
1697
1510
|
case 0:
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1511
|
+
_context8.prev = 0;
|
1512
|
+
_context8.t0 = _promise2.default;
|
1513
|
+
_context8.next = 4;
|
1701
1514
|
return this.SettlementApi.QuerySettleResult({ RetailCode: this.dto.Code });
|
1702
1515
|
|
1703
1516
|
case 4:
|
1704
|
-
|
1705
|
-
return
|
1517
|
+
_context8.t1 = _context8.sent;
|
1518
|
+
return _context8.abrupt('return', _context8.t0.resolve.call(_context8.t0, _context8.t1));
|
1706
1519
|
|
1707
1520
|
case 8:
|
1708
|
-
|
1709
|
-
|
1710
|
-
return
|
1521
|
+
_context8.prev = 8;
|
1522
|
+
_context8.t2 = _context8['catch'](0);
|
1523
|
+
return _context8.abrupt('return', _promise2.default.resolve({ Flag: "1" }));
|
1711
1524
|
|
1712
1525
|
case 11:
|
1713
1526
|
case 'end':
|
1714
|
-
return
|
1527
|
+
return _context8.stop();
|
1715
1528
|
}
|
1716
1529
|
}
|
1717
|
-
},
|
1530
|
+
}, _callee8, this, [[0, 8]]);
|
1718
1531
|
}));
|
1719
1532
|
|
1720
1533
|
function querySettleResult() {
|
1721
|
-
return
|
1534
|
+
return _ref19.apply(this, arguments);
|
1722
1535
|
}
|
1723
1536
|
|
1724
1537
|
return querySettleResult;
|
@@ -1744,18 +1557,18 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1744
1557
|
}, {
|
1745
1558
|
key: 'validePwd',
|
1746
1559
|
value: function () {
|
1747
|
-
var
|
1748
|
-
var
|
1560
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(value) {
|
1561
|
+
var _ref21, isNewRetailBCPos, cook1, cook2, message, memberStorageId, _paymode$currentMode, cardTypeEnum, memberId, meStorageCardId, cardStatusEnum, checkPaymentPasswordParams, checkPaymentPasswordId, result, count, _result;
|
1749
1562
|
|
1750
|
-
return _regenerator2.default.wrap(function
|
1563
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
1751
1564
|
while (1) {
|
1752
|
-
switch (
|
1565
|
+
switch (_context9.prev = _context9.next) {
|
1753
1566
|
case 0:
|
1754
|
-
|
1755
|
-
|
1567
|
+
_ref21 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref21.isNewRetailBCPos;
|
1568
|
+
_context9.prev = 1;
|
1756
1569
|
|
1757
1570
|
if (!isNewRetailBCPos) {
|
1758
|
-
|
1571
|
+
_context9.next = 23;
|
1759
1572
|
break;
|
1760
1573
|
}
|
1761
1574
|
|
@@ -1765,22 +1578,22 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1765
1578
|
memberStorageId = this.paymode.currentMode.meStorageCardId;
|
1766
1579
|
|
1767
1580
|
if (!cook2) {
|
1768
|
-
|
1581
|
+
_context9.next = 12;
|
1769
1582
|
break;
|
1770
1583
|
}
|
1771
1584
|
|
1772
1585
|
if (!cook2.hasOwnProperty(memberStorageId + "")) {
|
1773
|
-
|
1586
|
+
_context9.next = 12;
|
1774
1587
|
break;
|
1775
1588
|
}
|
1776
1589
|
|
1777
1590
|
if (!(cook2[memberStorageId] > 3)) {
|
1778
|
-
|
1591
|
+
_context9.next = 12;
|
1779
1592
|
break;
|
1780
1593
|
}
|
1781
1594
|
|
1782
1595
|
message = '今日密码错误已达上限,不可使用储值消费,请明日再试,如忘记请重置密码或修改密码。';
|
1783
|
-
return
|
1596
|
+
return _context9.abrupt('return', _promise2.default.resolve(message));
|
1784
1597
|
|
1785
1598
|
case 12:
|
1786
1599
|
_paymode$currentMode = this.paymode.currentMode, cardTypeEnum = _paymode$currentMode.cardTypeEnum, memberId = _paymode$currentMode.memberId, meStorageCardId = _paymode$currentMode.meStorageCardId, cardStatusEnum = _paymode$currentMode.cardStatusEnum;
|
@@ -1809,11 +1622,11 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1809
1622
|
checkPaymentPasswordId = meStorageCardId;
|
1810
1623
|
}
|
1811
1624
|
}
|
1812
|
-
|
1625
|
+
_context9.next = 18;
|
1813
1626
|
return this.SettlementApi.checkPaymentPassword(checkPaymentPasswordParams, checkPaymentPasswordId);
|
1814
1627
|
|
1815
1628
|
case 18:
|
1816
|
-
result =
|
1629
|
+
result = _context9.sent;
|
1817
1630
|
|
1818
1631
|
if (!result.data) {
|
1819
1632
|
if (cook2) {
|
@@ -1831,38 +1644,38 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1831
1644
|
this.setCookie('errorPwd', '', -1);
|
1832
1645
|
this.setCookie('errorPwd', (0, _stringify2.default)(cook2));
|
1833
1646
|
}
|
1834
|
-
return
|
1647
|
+
return _context9.abrupt('return', _promise2.default.resolve(result.data ? "" : message));
|
1835
1648
|
|
1836
1649
|
case 23:
|
1837
|
-
|
1650
|
+
_context9.next = 25;
|
1838
1651
|
return this.SettlementApi.CheckoutMemberPassword({ "CheckoutParams": {
|
1839
1652
|
"Idmember": value.id,
|
1840
1653
|
"Password": value.pwd
|
1841
1654
|
} });
|
1842
1655
|
|
1843
1656
|
case 25:
|
1844
|
-
_result =
|
1845
|
-
return
|
1657
|
+
_result = _context9.sent;
|
1658
|
+
return _context9.abrupt('return', _promise2.default.resolve(_result.Success ? "" : _result.Message));
|
1846
1659
|
|
1847
1660
|
case 27:
|
1848
|
-
|
1661
|
+
_context9.next = 32;
|
1849
1662
|
break;
|
1850
1663
|
|
1851
1664
|
case 29:
|
1852
|
-
|
1853
|
-
|
1854
|
-
return
|
1665
|
+
_context9.prev = 29;
|
1666
|
+
_context9.t0 = _context9['catch'](1);
|
1667
|
+
return _context9.abrupt('return', "failed");
|
1855
1668
|
|
1856
1669
|
case 32:
|
1857
1670
|
case 'end':
|
1858
|
-
return
|
1671
|
+
return _context9.stop();
|
1859
1672
|
}
|
1860
1673
|
}
|
1861
|
-
},
|
1674
|
+
}, _callee9, this, [[1, 29]]);
|
1862
1675
|
}));
|
1863
1676
|
|
1864
|
-
function validePwd(
|
1865
|
-
return
|
1677
|
+
function validePwd(_x8) {
|
1678
|
+
return _ref20.apply(this, arguments);
|
1866
1679
|
}
|
1867
1680
|
|
1868
1681
|
return validePwd;
|
@@ -1870,7 +1683,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1870
1683
|
}]);
|
1871
1684
|
return SettlementStore;
|
1872
1685
|
}(), _initialiseProps = function _initialiseProps() {
|
1873
|
-
var
|
1686
|
+
var _this13 = this;
|
1874
1687
|
|
1875
1688
|
this.paymode = null;
|
1876
1689
|
this.dto = null;
|
@@ -1883,11 +1696,10 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1883
1696
|
_initDefineProp(this, 'newStyle', _descriptor, this);
|
1884
1697
|
|
1885
1698
|
this.isFull = true;
|
1886
|
-
this.creditSalesVoucher = [];
|
1887
1699
|
this.isCanSettleOnQuickKey = true;
|
1888
1700
|
|
1889
1701
|
this.setCanSettleOnQuickKey = function (value) {
|
1890
|
-
|
1702
|
+
_this13.isCanSettleOnQuickKey = value;
|
1891
1703
|
};
|
1892
1704
|
|
1893
1705
|
_initDefineProp(this, 'setNewStyle', _descriptor2, this);
|
@@ -1903,16 +1715,16 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1903
1715
|
this.handleCzkData = function (m) {
|
1904
1716
|
if (!m || !m.StorageCardNo) {
|
1905
1717
|
(0, _mobx.runInAction)(function () {
|
1906
|
-
|
1718
|
+
_this13.paymode.currentMode.errinfo = "无效的会员卡号";
|
1907
1719
|
});
|
1908
1720
|
} else {
|
1909
1721
|
(0, _mobx.runInAction)(function () {
|
1910
|
-
|
1911
|
-
|
1912
|
-
|
1913
|
-
|
1722
|
+
_this13.paymode.currentMode.errinfo = "";
|
1723
|
+
_this13.paymode.currentMode.memberId = m.ID;
|
1724
|
+
_this13.paymode.currentMode.value = (0, _utils.getFixedNumber)(_this13.brefund ? _this13.paymode.receivable : Math.max(_this13.paymode.receivable, 0));
|
1725
|
+
_this13.updateEvent();
|
1914
1726
|
var message = '';
|
1915
|
-
var sum = (0, _reduce3.default)(
|
1727
|
+
var sum = (0, _reduce3.default)(_this13.paymode.thePaymodes, function (total, cur) {
|
1916
1728
|
return total + cur.value;
|
1917
1729
|
}, 0);
|
1918
1730
|
// 对于卡不用判断会员的一些信息
|
@@ -1920,11 +1732,11 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1920
1732
|
// message= CheckMemberStorageProcessorBlock.execute(m);
|
1921
1733
|
// }
|
1922
1734
|
if (!String.isNullOrEmpty(message)) {
|
1923
|
-
|
1924
|
-
} else if (
|
1925
|
-
|
1926
|
-
} else if (
|
1927
|
-
|
1735
|
+
_this13.paymode.currentMode.errinfo = message;
|
1736
|
+
} else if (_this13.checkReceived(_this13.paymode.currentMode, "balance")) {
|
1737
|
+
_this13.paymode.currentMode.errinfo = "余额不足";
|
1738
|
+
} else if (_this13.paymode.amount > 0 && parseFloat(_this13.paymode.amount) !== sum && _this13.paymode.currentMode.value == 0) {
|
1739
|
+
_this13.paymode.currentMode.errinfo = "实收金额必须录入";
|
1928
1740
|
} else {
|
1929
1741
|
// 查询成功后将焦点移入下一个输入框
|
1930
1742
|
setTimeout(function () {
|
@@ -1937,20 +1749,20 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1937
1749
|
};
|
1938
1750
|
|
1939
1751
|
this.getCouponList = function (coupon_code) {
|
1940
|
-
var _enumController$
|
1941
|
-
PayStyle = _enumController$
|
1942
|
-
Differentiate = _enumController$
|
1752
|
+
var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
|
1753
|
+
PayStyle = _enumController$getEn15.PayStyle,
|
1754
|
+
Differentiate = _enumController$getEn15.Differentiate;
|
1943
1755
|
|
1944
1756
|
var couponApplyRule = (0, _tplusPoslogin.PosInitData)('CouponApplyRule');
|
1945
1757
|
|
1946
|
-
var _enumController$
|
1947
|
-
CouponApplyRule = _enumController$
|
1758
|
+
var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
|
1759
|
+
CouponApplyRule = _enumController$getEn16.CouponApplyRule;
|
1948
1760
|
|
1949
1761
|
if (couponApplyRule == CouponApplyRule.SHOWN_BY_CUSTOMER && !!coupon_code || couponApplyRule != CouponApplyRule.SHOWN_BY_CUSTOMER) {
|
1950
|
-
var dto =
|
1762
|
+
var dto = _this13.dto;
|
1951
1763
|
var promoVoucher = {};
|
1952
|
-
|
1953
|
-
|
1764
|
+
_this13.paymode.clearDjqs();
|
1765
|
+
_this13.paymode.reCalculationDjqs();
|
1954
1766
|
promoVoucher.coupon_code = coupon_code || "";
|
1955
1767
|
promoVoucher.boName = "Retail";
|
1956
1768
|
promoVoucher.voucherId = dto.ID;
|
@@ -1958,7 +1770,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
1958
1770
|
if (dto.OnlinePaymentAmount) {
|
1959
1771
|
onlinePaymentAmount = dto.OnlinePaymentAmount;
|
1960
1772
|
}
|
1961
|
-
promoVoucher.promoLinks = (0, _filter3.default)(
|
1773
|
+
promoVoucher.promoLinks = (0, _filter3.default)(_this13.paymode.currentMode.djqs, function (djq) {
|
1962
1774
|
return djq.checked;
|
1963
1775
|
});
|
1964
1776
|
promoVoucher.totalAmountWithTax = Math.Minus(dto.TotalTaxAmount, onlinePaymentAmount);
|
@@ -2009,20 +1821,20 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2009
1821
|
// 促销 end
|
2010
1822
|
promoVoucher.voucherDetailList.push(detailDTO);
|
2011
1823
|
});
|
2012
|
-
return
|
1824
|
+
return _this13.SettlementApi.findUsefulCouponPromoList(promoVoucher).then(function (result) {
|
2013
1825
|
if (result && result.length != 0) {
|
2014
1826
|
result.forEach(function (element) {
|
2015
|
-
var
|
2016
|
-
couponCode =
|
2017
|
-
name =
|
2018
|
-
tieredAmountResult =
|
2019
|
-
fromDate =
|
2020
|
-
dateMount =
|
2021
|
-
promoMethodEnum =
|
2022
|
-
discountPct =
|
2023
|
-
nominalAmount =
|
2024
|
-
promoId =
|
2025
|
-
id =
|
1827
|
+
var _ref22 = element || {},
|
1828
|
+
couponCode = _ref22.couponCode,
|
1829
|
+
name = _ref22.name,
|
1830
|
+
tieredAmountResult = _ref22.tieredAmountResult,
|
1831
|
+
fromDate = _ref22.fromDate,
|
1832
|
+
dateMount = _ref22.dateMount,
|
1833
|
+
promoMethodEnum = _ref22.promoMethodEnum,
|
1834
|
+
discountPct = _ref22.discountPct,
|
1835
|
+
nominalAmount = _ref22.nominalAmount,
|
1836
|
+
promoId = _ref22.promoId,
|
1837
|
+
id = _ref22.id;
|
2026
1838
|
|
2027
1839
|
var condValue = tieredAmountResult.condValue,
|
2028
1840
|
promoDiscount = tieredAmountResult.promoDiscount,
|
@@ -2030,22 +1842,22 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2030
1842
|
promoRuleId = tieredAmountResult.promoRuleId,
|
2031
1843
|
couponCategoryEnum = tieredAmountResult.couponCategoryEnum;
|
2032
1844
|
|
2033
|
-
if (result.IsRepelWithPoints && (0, _find3.default)(
|
1845
|
+
if (result.IsRepelWithPoints && (0, _find3.default)(_this13.paymode.thePaymodes, function (themode) {
|
2034
1846
|
return themode.paymentType == PayStyle.jfdx;
|
2035
1847
|
})) {
|
2036
1848
|
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
2037
1849
|
} else {
|
2038
1850
|
var IsEnable = couponCategoryEnum === 'RIGUP' || couponCategoryEnum === 'UN_MATCH' || couponCategoryEnum === "PREPARING" || couponCategoryEnum === 'PROMO_LIMITED' || couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
|
2039
|
-
|
1851
|
+
_this13.addDjq(couponCode, name, IsEnable, promoMethodEnum == "CASH_COUPON" && nominalAmount, promoDiscount, condValue, null, false, !result.IsRepelWithPoints, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id, true, 1);
|
2040
1852
|
}
|
2041
1853
|
});
|
2042
1854
|
if (promoVoucher.coupon_code) {
|
2043
|
-
|
1855
|
+
_this13.paymode.calcDjqCheckValue(_this13.paymode.currentMode.djqs[0], _this13.dto, 'single');
|
2044
1856
|
}
|
2045
1857
|
} else {
|
2046
1858
|
if (promoVoucher.coupon_code) {
|
2047
1859
|
_message2.default.info(Differentiate.COUPON + '\u53F7\u4E0D\u5B58\u5728\uFF01');
|
2048
|
-
|
1860
|
+
_this13.getCouponList();
|
2049
1861
|
} else {
|
2050
1862
|
_message2.default.info('\u6CA1\u6709\u627E\u5230\u53EF\u4F7F\u7528\u7684' + Differentiate.COUPON + '\uFF01');
|
2051
1863
|
}
|
@@ -2055,41 +1867,41 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2055
1867
|
};
|
2056
1868
|
|
2057
1869
|
this.getSettleGift = function () {
|
2058
|
-
return
|
1870
|
+
return _this13.SettlementApi.executeRightsForPos(_this13.billID);
|
2059
1871
|
};
|
2060
1872
|
|
2061
1873
|
this.getRefWareHouseList = function () {
|
2062
|
-
return
|
1874
|
+
return _this13.SettlementApi.getRefWareHouseList();
|
2063
1875
|
};
|
2064
1876
|
|
2065
1877
|
this.checkCoupon = function () {
|
2066
|
-
var
|
2067
|
-
var
|
1878
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(sn) {
|
1879
|
+
var _ref24, isNewRetailBCPos, _enumController$getEn17, PayStyle, Differentiate, params;
|
2068
1880
|
|
2069
|
-
return _regenerator2.default.wrap(function
|
1881
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
2070
1882
|
while (1) {
|
2071
|
-
switch (
|
1883
|
+
switch (_context10.prev = _context10.next) {
|
2072
1884
|
case 0:
|
2073
|
-
|
1885
|
+
_ref24 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref24.isNewRetailBCPos;
|
2074
1886
|
|
2075
1887
|
if (!isNewRetailBCPos) {
|
2076
|
-
|
1888
|
+
_context10.next = 7;
|
2077
1889
|
break;
|
2078
1890
|
}
|
2079
1891
|
|
2080
|
-
|
2081
|
-
return
|
1892
|
+
_context10.next = 4;
|
1893
|
+
return _this13.getCouponList(sn, 'sinlge');
|
2082
1894
|
|
2083
1895
|
case 4:
|
2084
|
-
return
|
1896
|
+
return _context10.abrupt('return', _context10.sent);
|
2085
1897
|
|
2086
1898
|
case 7:
|
2087
|
-
_enumController$
|
1899
|
+
_enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn17.PayStyle, Differentiate = _enumController$getEn17.Differentiate;
|
2088
1900
|
params = { request: {
|
2089
|
-
Uid:
|
1901
|
+
Uid: _this13.paymode.currentMode.member.uid || '',
|
2090
1902
|
SN: sn,
|
2091
|
-
StoreCode:
|
2092
|
-
Inventories: (0, _map3.default)((0, _filter3.default)(
|
1903
|
+
StoreCode: _this13.dto.Idstore,
|
1904
|
+
Inventories: (0, _map3.default)((0, _filter3.default)(_this13.dto.RetailDetails, function (d) {
|
2093
1905
|
return d.Quantity > 0 && !d.IsPresent;
|
2094
1906
|
}), function (detail) {
|
2095
1907
|
return {
|
@@ -2109,37 +1921,37 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2109
1921
|
};
|
2110
1922
|
}),
|
2111
1923
|
// inventoryCodes:_join(_map(this.dto.RetailDetails,(detail)=>{return detail.Inventory.Code;}),','),
|
2112
|
-
InventoryClassCodes: (0, _join3.default)((0, _map3.default)((0, _filter3.default)(
|
1924
|
+
InventoryClassCodes: (0, _join3.default)((0, _map3.default)((0, _filter3.default)(_this13.dto.RetailDetails, function (d) {
|
2113
1925
|
return d.Quantity > 0;
|
2114
1926
|
}), function (detail) {
|
2115
1927
|
return (detail.Inventory.InventoryClass || { Code: '' }).Code;
|
2116
1928
|
}), ','),
|
2117
|
-
Amount:
|
1929
|
+
Amount: _this13.paymode.amount
|
2118
1930
|
} };
|
2119
|
-
return
|
2120
|
-
if ((0, _find3.default)(
|
1931
|
+
return _context10.abrupt('return', _this13.SettlementApi.CheckCoupon(params).then(function (result) {
|
1932
|
+
if ((0, _find3.default)(_this13.paymode.currentMode.djqs, function (djq) {
|
2121
1933
|
return djq.code == result.SN;
|
2122
1934
|
})) {
|
2123
1935
|
_message2.default.info(Differentiate.COUPON + '\u5DF2\u6DFB\u52A0');
|
2124
|
-
} else if (result.IsRepelWithPoints && (0, _find3.default)(
|
1936
|
+
} else if (result.IsRepelWithPoints && (0, _find3.default)(_this13.paymode.thePaymodes, function (themode) {
|
2125
1937
|
return themode.paymentType == PayStyle.jfdx;
|
2126
1938
|
})) {
|
2127
1939
|
_message2.default.error(Differentiate.COUPON + '\uFF08' + result.SN + '\uFF09\u4E0D\u53EF\u4E0E\u79EF\u5206\u4E00\u8D77\u4F7F\u7528');
|
2128
1940
|
} else {
|
2129
|
-
|
1941
|
+
_this13.addDjq(result.SN, result.Title, result.ReduceAmount, result.StartAmount, result.LastTS, false, !result.IsRepelWithPoints, result.UMemberID);
|
2130
1942
|
}
|
2131
1943
|
}));
|
2132
1944
|
|
2133
1945
|
case 10:
|
2134
1946
|
case 'end':
|
2135
|
-
return
|
1947
|
+
return _context10.stop();
|
2136
1948
|
}
|
2137
1949
|
}
|
2138
|
-
},
|
1950
|
+
}, _callee10, _this13);
|
2139
1951
|
}));
|
2140
1952
|
|
2141
|
-
return function (
|
2142
|
-
return
|
1953
|
+
return function (_x9) {
|
1954
|
+
return _ref23.apply(this, arguments);
|
2143
1955
|
};
|
2144
1956
|
}();
|
2145
1957
|
|
@@ -2152,17 +1964,17 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2152
1964
|
zIndex: 1007,
|
2153
1965
|
content: content,
|
2154
1966
|
onOk: function () {
|
2155
|
-
var
|
1967
|
+
var _ref25 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11() {
|
2156
1968
|
var ret;
|
2157
|
-
return _regenerator2.default.wrap(function
|
1969
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
2158
1970
|
while (1) {
|
2159
|
-
switch (
|
1971
|
+
switch (_context11.prev = _context11.next) {
|
2160
1972
|
case 0:
|
2161
|
-
|
2162
|
-
return
|
1973
|
+
_context11.next = 2;
|
1974
|
+
return _this13.saveMember();
|
2163
1975
|
|
2164
1976
|
case 2:
|
2165
|
-
ret =
|
1977
|
+
ret = _context11.sent;
|
2166
1978
|
|
2167
1979
|
if (ret === false) {
|
2168
1980
|
resolve(false);
|
@@ -2172,14 +1984,14 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2172
1984
|
|
2173
1985
|
case 4:
|
2174
1986
|
case 'end':
|
2175
|
-
return
|
1987
|
+
return _context11.stop();
|
2176
1988
|
}
|
2177
1989
|
}
|
2178
|
-
},
|
1990
|
+
}, _callee11, _this13);
|
2179
1991
|
}));
|
2180
1992
|
|
2181
1993
|
return function onOk() {
|
2182
|
-
return
|
1994
|
+
return _ref25.apply(this, arguments);
|
2183
1995
|
};
|
2184
1996
|
}(),
|
2185
1997
|
onCancel: function onCancel() {
|
@@ -2191,7 +2003,7 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2191
2003
|
|
2192
2004
|
this.checkIntegralExchangeReturn = function (id) {
|
2193
2005
|
return new _promise2.default(function (resolve, reject) {
|
2194
|
-
|
2006
|
+
_this13.SettlementApi.GetNewIntegralExchange({ param: { refVoucherId: id } }).then(function (resp) {
|
2195
2007
|
if (resp && resp.expireIntegral > 0) {
|
2196
2008
|
_tplusComponentsTouch.ModalWraper.confirm({
|
2197
2009
|
className: 'tplus-confirm-modal',
|
@@ -2219,17 +2031,17 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2219
2031
|
}), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'setNewStyle', [_mobx.action], {
|
2220
2032
|
enumerable: true,
|
2221
2033
|
initializer: function initializer() {
|
2222
|
-
var
|
2034
|
+
var _this14 = this;
|
2223
2035
|
|
2224
2036
|
return function () {
|
2225
2037
|
var voucherDefaultPosMode = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('voucherDefaultPosMode') || 'touch';
|
2226
|
-
|
2038
|
+
_this14.newStyle = voucherDefaultPosMode == 'voucher';
|
2227
2039
|
};
|
2228
2040
|
}
|
2229
2041
|
}), _descriptor3 = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
|
2230
2042
|
enumerable: true,
|
2231
2043
|
initializer: function initializer() {
|
2232
|
-
var
|
2044
|
+
var _this15 = this;
|
2233
2045
|
|
2234
2046
|
return function (newPass, newPassConfirm) {
|
2235
2047
|
if (!newPass || !newPassConfirm) {
|
@@ -2239,9 +2051,9 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2239
2051
|
return _message2.default.warn('您两次输入的密码不一致');
|
2240
2052
|
}
|
2241
2053
|
var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
|
2242
|
-
return
|
2054
|
+
return _this15.SettlementApi.setWalletPayPassword({
|
2243
2055
|
Idstore: idstore,
|
2244
|
-
meMemberId:
|
2056
|
+
meMemberId: _this15.paymode.currentMode.memberId,
|
2245
2057
|
oldPassword: null,
|
2246
2058
|
newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
|
2247
2059
|
dataSource: "POS"
|
@@ -2255,135 +2067,135 @@ var SettlementStore = (_class = (_temp = _class2 = function () {
|
|
2255
2067
|
}), _applyDecoratedDescriptor(_class.prototype, 'initByOriginReturn', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'initByOriginReturn'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'quickSettle', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'quickSettle'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'changeFocusAndAddPay', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class.prototype, 'changeFocusAndAddPay'), _class.prototype), _descriptor4 = _applyDecoratedDescriptor(_class.prototype, 'updateMemberInfo', [_mobx.action], {
|
2256
2068
|
enumerable: true,
|
2257
2069
|
initializer: function initializer() {
|
2258
|
-
var
|
2070
|
+
var _this16 = this;
|
2259
2071
|
|
2260
2072
|
return function () {
|
2261
|
-
var
|
2073
|
+
var _ref26 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(_this) {
|
2262
2074
|
var _getLoginInfo4, IdStore, StoreCode, resp;
|
2263
2075
|
|
2264
|
-
return _regenerator2.default.wrap(function
|
2076
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
2265
2077
|
while (1) {
|
2266
|
-
switch (
|
2078
|
+
switch (_context12.prev = _context12.next) {
|
2267
2079
|
case 0:
|
2268
|
-
_getLoginInfo4 =
|
2269
|
-
|
2270
|
-
return
|
2080
|
+
_getLoginInfo4 = _this16.getLoginInfo(), IdStore = _getLoginInfo4.IdStore, StoreCode = _getLoginInfo4.StoreCode;
|
2081
|
+
_context12.next = 3;
|
2082
|
+
return _this16.SettlementApi.GetUmemberDTO({ Idmember: _this16.member.ID, IdStore: IdStore, StoreCode: StoreCode });
|
2271
2083
|
|
2272
2084
|
case 3:
|
2273
|
-
resp =
|
2085
|
+
resp = _context12.sent;
|
2274
2086
|
|
2275
2087
|
_this.member = resp;
|
2276
2088
|
_this.paymode.updateMemberStorageCardNo(resp.StorageCardNo, resp.WalletEnabled);
|
2277
|
-
return
|
2089
|
+
return _context12.abrupt('return', _promise2.default.resolve(resp));
|
2278
2090
|
|
2279
2091
|
case 7:
|
2280
2092
|
case 'end':
|
2281
|
-
return
|
2093
|
+
return _context12.stop();
|
2282
2094
|
}
|
2283
2095
|
}
|
2284
|
-
},
|
2096
|
+
}, _callee12, _this16);
|
2285
2097
|
}));
|
2286
2098
|
|
2287
|
-
return function (
|
2288
|
-
return
|
2099
|
+
return function (_x10) {
|
2100
|
+
return _ref26.apply(this, arguments);
|
2289
2101
|
};
|
2290
2102
|
}();
|
2291
2103
|
}
|
2292
2104
|
}), _descriptor5 = _applyDecoratedDescriptor(_class.prototype, 'updateCurrentMode', [_mobx.action], {
|
2293
2105
|
enumerable: true,
|
2294
2106
|
initializer: function initializer() {
|
2295
|
-
var
|
2107
|
+
var _this17 = this;
|
2296
2108
|
|
2297
2109
|
return function () {
|
2298
|
-
var
|
2110
|
+
var _ref27 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(memberId, returnType) {
|
2299
2111
|
var isOnlyEnabled, result;
|
2300
|
-
return _regenerator2.default.wrap(function
|
2112
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
2301
2113
|
while (1) {
|
2302
|
-
switch (
|
2114
|
+
switch (_context13.prev = _context13.next) {
|
2303
2115
|
case 0:
|
2304
2116
|
isOnlyEnabled = returnType ? false : true; //非原单退货为false,其他true
|
2305
2117
|
// 查看会员卡信息
|
2306
2118
|
|
2307
|
-
|
2308
|
-
return
|
2119
|
+
_context13.next = 3;
|
2120
|
+
return _this17.SettlementApi.getCardInfoByMemberId(memberId, isOnlyEnabled);
|
2309
2121
|
|
2310
2122
|
case 3:
|
2311
|
-
result =
|
2123
|
+
result = _context13.sent;
|
2312
2124
|
|
2313
2125
|
if (!(result && result.data.length)) {
|
2314
|
-
|
2126
|
+
_context13.next = 21;
|
2315
2127
|
break;
|
2316
2128
|
}
|
2317
2129
|
|
2318
2130
|
if (!(result.data.length === 1)) {
|
2319
|
-
|
2131
|
+
_context13.next = 10;
|
2320
2132
|
break;
|
2321
2133
|
}
|
2322
2134
|
|
2323
|
-
|
2324
|
-
return
|
2135
|
+
_this17.paymode.updateCardInfo(result.data[0]);
|
2136
|
+
return _context13.abrupt('return', result.data);
|
2325
2137
|
|
2326
2138
|
case 10:
|
2327
2139
|
if (!(result.data && result.data.length === 1)) {
|
2328
|
-
|
2140
|
+
_context13.next = 15;
|
2329
2141
|
break;
|
2330
2142
|
}
|
2331
2143
|
|
2332
|
-
|
2333
|
-
return
|
2144
|
+
_this17.paymode.updateCardInfo(result.data[0]);
|
2145
|
+
return _context13.abrupt('return', result.data);
|
2334
2146
|
|
2335
2147
|
case 15:
|
2336
2148
|
if (!(result.data && result.data.length > 1)) {
|
2337
|
-
|
2149
|
+
_context13.next = 19;
|
2338
2150
|
break;
|
2339
2151
|
}
|
2340
2152
|
|
2341
|
-
return
|
2153
|
+
return _context13.abrupt('return', result.data);
|
2342
2154
|
|
2343
2155
|
case 19:
|
2344
2156
|
_message2.default.warn('没有可用储值卡!');
|
2345
|
-
return
|
2157
|
+
return _context13.abrupt('return', false);
|
2346
2158
|
|
2347
2159
|
case 21:
|
2348
2160
|
case 'end':
|
2349
|
-
return
|
2161
|
+
return _context13.stop();
|
2350
2162
|
}
|
2351
2163
|
}
|
2352
|
-
},
|
2164
|
+
}, _callee13, _this17);
|
2353
2165
|
}));
|
2354
2166
|
|
2355
|
-
return function (
|
2356
|
-
return
|
2167
|
+
return function (_x11, _x12) {
|
2168
|
+
return _ref27.apply(this, arguments);
|
2357
2169
|
};
|
2358
2170
|
}();
|
2359
2171
|
}
|
2360
2172
|
}), _descriptor6 = _applyDecoratedDescriptor(_class.prototype, 'updateCardInfo', [_mobx.action], {
|
2361
2173
|
enumerable: true,
|
2362
2174
|
initializer: function initializer() {
|
2363
|
-
var
|
2175
|
+
var _this18 = this;
|
2364
2176
|
|
2365
|
-
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
2177
|
+
return (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
2366
2178
|
var ctMode, cardNo, result;
|
2367
|
-
return _regenerator2.default.wrap(function
|
2179
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
2368
2180
|
while (1) {
|
2369
|
-
switch (
|
2181
|
+
switch (_context14.prev = _context14.next) {
|
2370
2182
|
case 0:
|
2371
|
-
ctMode =
|
2183
|
+
ctMode = _this18.paymode && _this18.paymode.currentMode;
|
2372
2184
|
cardNo = ctMode && ctMode.storageCardNo;
|
2373
|
-
|
2374
|
-
return
|
2185
|
+
_context14.next = 4;
|
2186
|
+
return _this18.SettlementApi.getCardInfoByCardNo(cardNo);
|
2375
2187
|
|
2376
2188
|
case 4:
|
2377
|
-
result =
|
2189
|
+
result = _context14.sent;
|
2378
2190
|
|
2379
|
-
|
2191
|
+
_this18.paymode.updateCardInfo(result && result.data);
|
2380
2192
|
|
2381
2193
|
case 6:
|
2382
2194
|
case 'end':
|
2383
|
-
return
|
2195
|
+
return _context14.stop();
|
2384
2196
|
}
|
2385
2197
|
}
|
2386
|
-
},
|
2198
|
+
}, _callee14, _this18);
|
2387
2199
|
}));
|
2388
2200
|
}
|
2389
2201
|
}), _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);
|
@@ -2503,7 +2315,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2503
2315
|
}, {
|
2504
2316
|
key: 'calcDjqCheckValue',
|
2505
2317
|
value: function calcDjqCheckValue(q1, dto, params) {
|
2506
|
-
var
|
2318
|
+
var _this19 = this;
|
2507
2319
|
|
2508
2320
|
var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
|
2509
2321
|
var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
|
@@ -2517,9 +2329,9 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2517
2329
|
this.checkList = [];
|
2518
2330
|
}
|
2519
2331
|
|
2520
|
-
var _enumController$
|
2521
|
-
PayStyle = _enumController$
|
2522
|
-
Differentiate = _enumController$
|
2332
|
+
var _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(),
|
2333
|
+
PayStyle = _enumController$getEn18.PayStyle,
|
2334
|
+
Differentiate = _enumController$getEn18.Differentiate;
|
2523
2335
|
|
2524
2336
|
if (q1) {
|
2525
2337
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
@@ -2547,7 +2359,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2547
2359
|
if (!q1.checked) {
|
2548
2360
|
this.checkList.forEach(function (ele, i) {
|
2549
2361
|
if (ele.id === q1.id) {
|
2550
|
-
|
2362
|
+
_this19.checkList.splice(i, 1);
|
2551
2363
|
}
|
2552
2364
|
});
|
2553
2365
|
} else {
|
@@ -2619,24 +2431,24 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2619
2431
|
if (result && result.length != 0) {
|
2620
2432
|
result.forEach(function (element, index) {
|
2621
2433
|
var djq1 = false;
|
2622
|
-
|
2434
|
+
_this19.currentMode.djqs.forEach(function (djq) {
|
2623
2435
|
if (element.id === djq.id) {
|
2624
2436
|
djq1 = true;
|
2625
2437
|
}
|
2626
2438
|
});
|
2627
2439
|
|
2628
|
-
var
|
2629
|
-
couponCode =
|
2630
|
-
name =
|
2631
|
-
tieredAmountResult =
|
2632
|
-
fromDate =
|
2633
|
-
dateMount =
|
2634
|
-
promoMethodEnum =
|
2635
|
-
discountPct =
|
2636
|
-
nominalAmount =
|
2637
|
-
promoId =
|
2638
|
-
id =
|
2639
|
-
doorsill =
|
2440
|
+
var _ref29 = element || {},
|
2441
|
+
couponCode = _ref29.couponCode,
|
2442
|
+
name = _ref29.name,
|
2443
|
+
tieredAmountResult = _ref29.tieredAmountResult,
|
2444
|
+
fromDate = _ref29.fromDate,
|
2445
|
+
dateMount = _ref29.dateMount,
|
2446
|
+
promoMethodEnum = _ref29.promoMethodEnum,
|
2447
|
+
discountPct = _ref29.discountPct,
|
2448
|
+
nominalAmount = _ref29.nominalAmount,
|
2449
|
+
promoId = _ref29.promoId,
|
2450
|
+
id = _ref29.id,
|
2451
|
+
doorsill = _ref29.doorsill;
|
2640
2452
|
|
2641
2453
|
var condValue = tieredAmountResult.condValue,
|
2642
2454
|
promoDiscount = tieredAmountResult.promoDiscount,
|
@@ -2664,10 +2476,10 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2664
2476
|
// couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
|
2665
2477
|
// id
|
2666
2478
|
// })
|
2667
|
-
|
2479
|
+
_this19.addDjqs(couponCode, name, true, nominalAmount, promoDiscount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
|
2668
2480
|
djq1 = false;
|
2669
2481
|
} else {
|
2670
|
-
|
2482
|
+
_this19.setCouponNum(element.id, couponCategoryEnum, promoMethodEnum, nominalAmount, promoDiscount);
|
2671
2483
|
// this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
|
2672
2484
|
// djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
|
2673
2485
|
}
|
@@ -2680,8 +2492,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2680
2492
|
}, {
|
2681
2493
|
key: 'calcDjqValue',
|
2682
2494
|
value: function calcDjqValue(q1) {
|
2683
|
-
var _enumController$
|
2684
|
-
Differentiate = _enumController$
|
2495
|
+
var _enumController$getEn19 = _mutantsUtil.enumController.getEnumOj(),
|
2496
|
+
Differentiate = _enumController$getEn19.Differentiate;
|
2685
2497
|
|
2686
2498
|
if (q1) {
|
2687
2499
|
if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
|
@@ -2743,8 +2555,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2743
2555
|
this.currentMode.errinfo = '';
|
2744
2556
|
var sum = this.amount;
|
2745
2557
|
|
2746
|
-
var _enumController$
|
2747
|
-
PayStyle = _enumController$
|
2558
|
+
var _enumController$getEn20 = _mutantsUtil.enumController.getEnumOj(),
|
2559
|
+
PayStyle = _enumController$getEn20.PayStyle;
|
2748
2560
|
|
2749
2561
|
this.thePaymodes && this.thePaymodes.forEach(function (mode) {
|
2750
2562
|
if (mode.paymentType === PayStyle.hyczk) {
|
@@ -2781,21 +2593,26 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2781
2593
|
}, {
|
2782
2594
|
key: 'setPaymodes',
|
2783
2595
|
value: function () {
|
2784
|
-
var
|
2785
|
-
var
|
2596
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(type, isIntegralExchange) {
|
2597
|
+
var _this20 = this;
|
2786
2598
|
|
2787
|
-
var
|
2599
|
+
var _ref31, isHorizontalPad, isHorizontalSunMi, isMobileEnvironment, _enumController$getEn21, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
|
2788
2600
|
|
2789
|
-
return _regenerator2.default.wrap(function
|
2601
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
2790
2602
|
while (1) {
|
2791
|
-
switch (
|
2603
|
+
switch (_context15.prev = _context15.next) {
|
2792
2604
|
case 0:
|
2793
2605
|
// 是否移动端判断
|
2794
|
-
|
2606
|
+
_ref31 = _mutantsUtil.platform || {}, isHorizontalPad = _ref31.isHorizontalPad, isHorizontalSunMi = _ref31.isHorizontalSunMi;
|
2795
2607
|
isMobileEnvironment = !!isHorizontalPad || !!isHorizontalSunMi;
|
2796
|
-
_enumController$
|
2797
|
-
|
2798
|
-
|
2608
|
+
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn21.settleStyleType, PayStyle = _enumController$getEn21.PayStyle;
|
2609
|
+
memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
|
2610
|
+
param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
|
2611
|
+
_context15.next = 7;
|
2612
|
+
return _settlementApi2.default.GetNewStoreSettleStyles({ param: param });
|
2613
|
+
|
2614
|
+
case 7:
|
2615
|
+
modes = _context15.sent;
|
2799
2616
|
|
2800
2617
|
if (modes) {
|
2801
2618
|
(0, _mobx.runInAction)(function () {
|
@@ -2804,7 +2621,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2804
2621
|
settleLists = isMobileEnvironment ? settleLists.filter(function (v) {
|
2805
2622
|
return !v.ThirdPaymentInfo;
|
2806
2623
|
}) : settleLists;
|
2807
|
-
(0, _each3.default)(settleLists, function (mode) {
|
2624
|
+
(0, _each3.default)(settleLists, function (mode, index) {
|
2808
2625
|
//产品需求确认会员储值卡结算方式前端展示统一调整为“储值卡" tuzha by 2020-07-08
|
2809
2626
|
if (mode.Code == PayStyle.hyczk) {
|
2810
2627
|
mode.Name = '储值卡';
|
@@ -2825,20 +2642,20 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2825
2642
|
thridPayment: mode.ThirdPaymentInfo
|
2826
2643
|
});
|
2827
2644
|
});
|
2828
|
-
|
2645
|
+
_this20.paymodes = paymodes;
|
2829
2646
|
});
|
2830
2647
|
}
|
2831
2648
|
|
2832
|
-
case
|
2649
|
+
case 9:
|
2833
2650
|
case 'end':
|
2834
|
-
return
|
2651
|
+
return _context15.stop();
|
2835
2652
|
}
|
2836
2653
|
}
|
2837
|
-
},
|
2654
|
+
}, _callee15, this);
|
2838
2655
|
}));
|
2839
2656
|
|
2840
|
-
function setPaymodes(
|
2841
|
-
return
|
2657
|
+
function setPaymodes(_x13, _x14) {
|
2658
|
+
return _ref30.apply(this, arguments);
|
2842
2659
|
}
|
2843
2660
|
|
2844
2661
|
return setPaymodes;
|
@@ -2893,19 +2710,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2893
2710
|
}), _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), _descriptor14 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
|
2894
2711
|
enumerable: true,
|
2895
2712
|
initializer: function initializer() {
|
2896
|
-
var
|
2713
|
+
var _this21 = this;
|
2897
2714
|
|
2898
2715
|
return function () {
|
2899
|
-
|
2716
|
+
_this21.checkList = [];
|
2900
2717
|
};
|
2901
2718
|
}
|
2902
2719
|
}), _applyDecoratedDescriptor(_class3.prototype, 'updateMemberStorageCardNo', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'updateMemberStorageCardNo'), _class3.prototype), _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), _descriptor15 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
|
2903
2720
|
enumerable: true,
|
2904
2721
|
initializer: function initializer() {
|
2905
|
-
var
|
2722
|
+
var _this22 = this;
|
2906
2723
|
|
2907
2724
|
return function (id, couponNum, promoMethodEnum, nominalAmount, promoDiscount) {
|
2908
|
-
|
2725
|
+
_this22.currentMode.djqs.forEach(function (ele) {
|
2909
2726
|
if (ele.id === id) {
|
2910
2727
|
ele.amount = promoDiscount;
|
2911
2728
|
promoMethodEnum == "CASH_COUPON" && (ele.nominalAmount = nominalAmount);
|
@@ -2919,7 +2736,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2919
2736
|
}), _descriptor16 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
|
2920
2737
|
enumerable: true,
|
2921
2738
|
initializer: function initializer() {
|
2922
|
-
var
|
2739
|
+
var _this23 = this;
|
2923
2740
|
|
2924
2741
|
return function (promoCouponCode, name, IsEnable, nominalAmount, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
|
2925
2742
|
var djq = {
|
@@ -2942,13 +2759,13 @@ var PayMode = exports.PayMode = (_class3 = function () {
|
|
2942
2759
|
couponCategoryEnum: couponCategoryEnum,
|
2943
2760
|
id: id
|
2944
2761
|
};
|
2945
|
-
|
2762
|
+
_this23.currentMode.djqs.push(djq);
|
2946
2763
|
};
|
2947
2764
|
}
|
2948
2765
|
}), _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);
|
2949
2766
|
var Member = exports.Member = (_class5 = function () {
|
2950
2767
|
function Member(m) {
|
2951
|
-
var
|
2768
|
+
var _this24 = this;
|
2952
2769
|
|
2953
2770
|
(0, _classCallCheck3.default)(this, Member);
|
2954
2771
|
|
@@ -2971,11 +2788,11 @@ var Member = exports.Member = (_class5 = function () {
|
|
2971
2788
|
return key == 'canusedbalancestorage';
|
2972
2789
|
});
|
2973
2790
|
(0, _mobx.runInAction)(function () {
|
2974
|
-
|
2791
|
+
_this24.cardNo = m.CardCode;
|
2975
2792
|
if (index >= 0) {
|
2976
|
-
|
2793
|
+
_this24.balance = parseFloat(m.DynamicPropertyValues[index]);
|
2977
2794
|
} else {
|
2978
|
-
|
2795
|
+
_this24.balance = _this24.rawbalance;
|
2979
2796
|
}
|
2980
2797
|
});
|
2981
2798
|
this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;
|