tplus-components-touch 3.53.8 → 3.54.2

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