tplus-components-touch 3.22.3 → 3.22.7

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.
@@ -287,7 +287,7 @@ var SettlementStore = (_class = function () {
287
287
  }
288
288
  });
289
289
  if (promoVoucher.coupon_code) {
290
- _this2.paymode.calcDjqValue(_this2.paymode.currentMode.djqs[0]);
290
+ _this2.paymode.calcDjqCheckValue(_this2.paymode.currentMode.djqs[0], _this2.dto, 'single');
291
291
  }
292
292
  } else {
293
293
  if (promoVoucher.coupon_code) {
@@ -321,7 +321,7 @@ var SettlementStore = (_class = function () {
321
321
  }
322
322
 
323
323
  _context.next = 4;
324
- return _this2.getCouponList(sn);
324
+ return _this2.getCouponList(sn, 'sinlge');
325
325
 
326
326
  case 4:
327
327
  return _context.abrupt('return', _context.sent);
@@ -965,12 +965,10 @@ var SettlementStore = (_class = function () {
965
965
  }, {
966
966
  key: 'delPay',
967
967
  value: function delPay(index) {
968
- var _this10 = this;
968
+ var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
969
+ PayStyle = _enumController$getEn12.PayStyle;
969
970
 
970
971
  (0, _remove3.default)(this.paymode.thePaymodes, function (mode) {
971
- if (mode.paymethodId === index) {
972
- _this10.paymode.amount = _this10.paymode.amount + mode.value;
973
- }
974
972
  return mode.paymethodId === index;
975
973
  });
976
974
  this.paymode.currentFocus = -1;
@@ -980,6 +978,8 @@ var SettlementStore = (_class = function () {
980
978
  key: 'commit',
981
979
  value: function () {
982
980
  var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(bTest) {
981
+ var _ref12, isNewRetailBCPos;
982
+
983
983
  return _regenerator2.default.wrap(function _callee2$(_context2) {
984
984
  while (1) {
985
985
  switch (_context2.prev = _context2.next) {
@@ -994,43 +994,59 @@ var SettlementStore = (_class = function () {
994
994
  return _context2.abrupt('return', _promise2.default.resolve(true));
995
995
 
996
996
  case 3:
997
- _context2.prev = 3;
997
+ _ref12 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref12.isNewRetailBCPos;
998
+ _context2.prev = 4;
998
999
 
999
1000
  if (!(this.type == 1)) {
1000
- _context2.next = 9;
1001
+ _context2.next = 10;
1001
1002
  break;
1002
1003
  }
1003
1004
 
1004
- _context2.next = 7;
1005
+ _context2.next = 8;
1005
1006
  return this.saveMember();
1006
1007
 
1007
- case 7:
1008
- _context2.next = 11;
1008
+ case 8:
1009
+ _context2.next = 18;
1009
1010
  break;
1010
1011
 
1011
- case 9:
1012
- _context2.next = 11;
1012
+ case 10:
1013
+ if (!isNewRetailBCPos) {
1014
+ _context2.next = 13;
1015
+ break;
1016
+ }
1017
+
1018
+ _context2.next = 13;
1019
+ return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
1020
+
1021
+ case 13:
1022
+ _context2.next = 15;
1013
1023
  return this.save();
1014
1024
 
1015
- case 11:
1025
+ case 15:
1026
+ if (!isNewRetailBCPos) {
1027
+ _context2.next = 18;
1028
+ break;
1029
+ }
1030
+
1031
+ _context2.next = 18;
1032
+ return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
1033
+
1034
+ case 18:
1016
1035
  return _context2.abrupt('return', _promise2.default.resolve(true));
1017
1036
 
1018
- case 14:
1019
- _context2.prev = 14;
1020
- _context2.t0 = _context2['catch'](3);
1037
+ case 21:
1038
+ _context2.prev = 21;
1039
+ _context2.t0 = _context2['catch'](4);
1021
1040
 
1022
1041
  console.error('settlementStore.commit失败,错误信息:' + _context2.t0);
1023
1042
  return _context2.abrupt('return', _promise2.default.resolve(_context2.t0));
1024
1043
 
1025
- case 18:
1026
- console.error('settlementStore.commit失败,错误信息:' + err);
1027
-
1028
- case 19:
1044
+ case 25:
1029
1045
  case 'end':
1030
1046
  return _context2.stop();
1031
1047
  }
1032
1048
  }
1033
- }, _callee2, this, [[3, 14]]);
1049
+ }, _callee2, this, [[4, 21]]);
1034
1050
  }));
1035
1051
 
1036
1052
  function commit(_x2) {
@@ -1043,31 +1059,31 @@ var SettlementStore = (_class = function () {
1043
1059
  key: 'handlePrint',
1044
1060
  value: function handlePrint(resp) {
1045
1061
  // 储值打印
1046
- return (0, _tplusComponentsTouch.printDispatch)(_tplusComponentsTouch.DoNameList.DO_STORAGE_PRINT, resp.ID, {});
1062
+ return (0, _tplusComponentsTouch.printDispatch)(_tplusComponentsTouch.DoNameList.DO_STORAGE_PRINT, resp, {});
1047
1063
  }
1048
1064
  }, {
1049
1065
  key: 'saveMember',
1050
1066
  value: function saveMember() {
1051
- var _this11 = this;
1067
+ var _this10 = this;
1052
1068
 
1053
- var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
1054
- PayStyle = _enumController$getEn12.PayStyle;
1069
+ var _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(),
1070
+ PayStyle = _enumController$getEn13.PayStyle;
1055
1071
 
1056
1072
  (0, _mobx.runInAction)(function () {
1057
- _this11.dto.StorageMutiSettleDetails = [];
1058
- var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
1073
+ _this10.dto.StorageMutiSettleDetails = [];
1074
+ var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
1059
1075
  return parseFloat(mode.value) != 0;
1060
- }) : _this11.paymode.thePaymodes;
1076
+ }) : _this10.paymode.thePaymodes;
1061
1077
  (0, _each3.default)(thePaymodes, function (mode) {
1062
- var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
1078
+ var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
1063
1079
 
1064
1080
  var value = parseFloat(mode.value);
1065
1081
  var giveChange = null;
1066
- if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
1067
- value = Math.Add(value, _this11.paymode.receivable);
1068
- giveChange = Math.abs(_this11.paymode.receivable);
1082
+ if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
1083
+ value = Math.Add(value, _this10.paymode.receivable);
1084
+ giveChange = Math.abs(_this10.paymode.receivable);
1069
1085
  }
1070
- _this11.dto.StorageMutiSettleDetails.push({
1086
+ _this10.dto.StorageMutiSettleDetails.push({
1071
1087
  Code: mode.paymethodId,
1072
1088
  StorageAmount: value,
1073
1089
  GiveChange: giveChange,
@@ -1076,7 +1092,7 @@ var SettlementStore = (_class = function () {
1076
1092
  PaymentCode: mode.authCode,
1077
1093
  DynamicPropertyKeys: [],
1078
1094
  DynamicPropertyValues: [],
1079
- DataSource: { Id: _this11.dataSource }
1095
+ DataSource: { Id: _this10.dataSource }
1080
1096
  });
1081
1097
  });
1082
1098
  });
@@ -1086,42 +1102,42 @@ var SettlementStore = (_class = function () {
1086
1102
  IPMSG = JSON.parse(window.localStorage.IPMSG);
1087
1103
  }
1088
1104
  return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
1089
- _this11.handlePrint(resp);
1105
+ _this10.handlePrint(resp);
1090
1106
  });
1091
1107
  }
1092
1108
  }, {
1093
1109
  key: 'save',
1094
1110
  value: function () {
1095
- var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
1096
- var _this12 = this;
1111
+ var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
1112
+ var _this11 = this;
1097
1113
 
1098
- var _enumController$getEn13, PayStyle, _ref14, isNewRetailBCPos, IPMSG, RetailTypeEnum;
1114
+ var _enumController$getEn14, PayStyle, _ref15, isNewRetailBCPos, IPMSG, RetailTypeEnum;
1099
1115
 
1100
1116
  return _regenerator2.default.wrap(function _callee3$(_context3) {
1101
1117
  while (1) {
1102
1118
  switch (_context3.prev = _context3.next) {
1103
1119
  case 0:
1104
- _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn13.PayStyle;
1120
+ _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn14.PayStyle;
1105
1121
 
1106
1122
  (0, _mobx.runInAction)(function () {
1107
- _this12.dto.RetailPaymentDetails = [];
1108
- _this12.dto.RetailStorageDetails = [];
1109
- _this12.dto.RetailCouponDetails = [];
1123
+ _this11.dto.RetailPaymentDetails = [];
1124
+ _this11.dto.RetailStorageDetails = [];
1125
+ _this11.dto.RetailCouponDetails = [];
1110
1126
  var czkSum = 0;
1111
- var Idmember = _this12.dto.Idmember;
1127
+ var Idmember = _this11.dto.Idmember;
1112
1128
  var count = 0;
1113
- var thePaymodes = _this12.newStyle ? (0, _filter3.default)(_this12.paymode.thePaymodes, function (mode) {
1129
+ var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
1114
1130
  return parseFloat(mode.value) != 0;
1115
- }) : _this12.paymode.thePaymodes;
1131
+ }) : _this11.paymode.thePaymodes;
1116
1132
  (0, _each3.default)(thePaymodes, function (mode, index) {
1117
- var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': mode.paymentType });
1133
+ var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
1118
1134
  if (mode.paymentType == PayStyle.hyczk) {
1119
1135
  if (!Idmember) {
1120
1136
  Idmember = mode.member.id;
1121
1137
  }
1122
1138
  czkSum = Math.Add(czkSum, mode.value);
1123
- var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this12.member.MeStorageCardId;
1124
- _this12.dto.RetailStorageDetails.push({
1139
+ var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this11.member.MeStorageCardId;
1140
+ _this11.dto.RetailStorageDetails.push({
1125
1141
  Code: mode.paymethodId,
1126
1142
  MeStorageCardId: MeStorageCardId,
1127
1143
  StoragePaymentAmount: mode.value,
@@ -1130,17 +1146,17 @@ var SettlementStore = (_class = function () {
1130
1146
  Idmember: mode.member.id,
1131
1147
  DynamicPropertyKeys: [],
1132
1148
  DynamicPropertyValues: [],
1133
- DataSource: { Id: _this12.dataSource },
1149
+ DataSource: { Id: _this11.dataSource },
1134
1150
  Password: mode.authCode
1135
1151
  });
1136
1152
  } else {
1137
1153
  var value = parseFloat(mode.value);
1138
1154
  var giveChange = null;
1139
- if (mode.paymentType == PayStyle.xianjin && _this12.paymode.receivable < 0 && value > Math.abs(_this12.paymode.receivable)) {
1140
- value = Math.Add(value, _this12.paymode.receivable);
1141
- giveChange = Math.abs(_this12.paymode.receivable);
1155
+ if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
1156
+ value = Math.Add(value, _this11.paymode.receivable);
1157
+ giveChange = Math.abs(_this11.paymode.receivable);
1142
1158
  }
1143
- _this12.dto.RetailPaymentDetails.push({
1159
+ _this11.dto.RetailPaymentDetails.push({
1144
1160
  Code: mode.paymethodId,
1145
1161
  OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
1146
1162
  Amount: value,
@@ -1154,12 +1170,12 @@ var SettlementStore = (_class = function () {
1154
1170
  OverchargesAmount: mode.overchargesAmount,
1155
1171
  DynamicPropertyKeys: [],
1156
1172
  DynamicPropertyValues: [],
1157
- DataSource: { Id: _this12.dataSource }
1173
+ DataSource: { Id: _this11.dataSource }
1158
1174
  });
1159
1175
  if (mode.paymentType == PayStyle.djq) {
1160
1176
  (0, _each3.default)(mode.djqs, function (djq) {
1161
1177
  if (djq.checked) {
1162
- _this12.dto.RetailCouponDetails.push({
1178
+ _this11.dto.RetailCouponDetails.push({
1163
1179
  CouponCode: djq.code,
1164
1180
  ReductionAmount: djq.amount,
1165
1181
  EnableAmount: djq.doorsill,
@@ -1169,7 +1185,7 @@ var SettlementStore = (_class = function () {
1169
1185
  PromotionId: djq.promoId,
1170
1186
  PromotionRuleId: djq.promoRuleId,
1171
1187
  PromoCouponAllocatedId: djq.id,
1172
- DataSource: { Id: _this12.dataSource }
1188
+ DataSource: { Id: _this11.dataSource }
1173
1189
  });
1174
1190
  }
1175
1191
  });
@@ -1177,42 +1193,42 @@ var SettlementStore = (_class = function () {
1177
1193
  }
1178
1194
  });
1179
1195
 
1180
- var _ref13 = _mutantsUtil.platform || {},
1181
- isNewRetailBCPos = _ref13.isNewRetailBCPos;
1196
+ var _ref14 = _mutantsUtil.platform || {},
1197
+ isNewRetailBCPos = _ref14.isNewRetailBCPos;
1182
1198
 
1183
- if (_this12.dto.RetailStorageDetails.length > 0) {
1184
- var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
1199
+ if (_this11.dto.RetailStorageDetails.length > 0) {
1200
+ var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
1185
1201
  if (isNewRetailBCPos) {
1186
1202
  // this.dto.RetailStorageDetails && this.dto.RetailStorageDetails.forEach((value, index) => {
1187
1203
  // value.MeStorageCardId = (mode.MeStorageCardId ? mode.MeStorageCardId : this.member.MeStorageCardId);
1188
1204
  // })
1189
- _this12.dto.RetailPaymentDetails.push({
1190
- Code: _this12.paymode.counter,
1205
+ _this11.dto.RetailPaymentDetails.push({
1206
+ Code: _this11.paymode.counter,
1191
1207
  OrigAmount: czkSum,
1192
1208
  Amount: czkSum,
1193
1209
  IdsettleStyle: themode.idSettleStyle,
1194
1210
  IdbankAccount: themode.idBankAccount,
1195
1211
  DynamicPropertyKeys: [],
1196
1212
  DynamicPropertyValues: [],
1197
- DataSource: { Id: _this12.dataSource },
1198
- RetailStorageDetails: _this12.dto.RetailStorageDetails
1213
+ DataSource: { Id: _this11.dataSource },
1214
+ RetailStorageDetails: _this11.dto.RetailStorageDetails
1199
1215
  });
1200
1216
  } else {
1201
- _this12.dto.RetailPaymentDetails.push({
1202
- Code: _this12.paymode.counter,
1217
+ _this11.dto.RetailPaymentDetails.push({
1218
+ Code: _this11.paymode.counter,
1203
1219
  OrigAmount: czkSum,
1204
1220
  Amount: czkSum,
1205
1221
  IdsettleStyle: themode.idSettleStyle,
1206
1222
  IdbankAccount: themode.idBankAccount,
1207
1223
  DynamicPropertyKeys: [],
1208
1224
  DynamicPropertyValues: [],
1209
- DataSource: { Id: _this12.dataSource }
1225
+ DataSource: { Id: _this11.dataSource }
1210
1226
  });
1211
1227
  }
1212
- _this12.dto.Idmember = Idmember;
1228
+ _this11.dto.Idmember = Idmember;
1213
1229
  }
1214
1230
  });
1215
- _ref14 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref14.isNewRetailBCPos;
1231
+ _ref15 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref15.isNewRetailBCPos;
1216
1232
 
1217
1233
  console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
1218
1234
 
@@ -1258,8 +1274,8 @@ var SettlementStore = (_class = function () {
1258
1274
  }
1259
1275
 
1260
1276
  return _context3.abrupt('return', (0, _tplusApi.ccApi)({ dto: (0, _extends3.default)({}, this.dto.cut(), { RetailOms: { RetailTypeEnum: RetailTypeEnum } }), cip: IPMSG.query || "" }, '/retail/RetailPos/settle', false, false, { method: 'post', timeout_skip: true }).then(function (resp) {
1261
- _this12.setDtoID(resp.ID);
1262
- _this12.billID = resp.ID;
1277
+ _this11.setDtoID(resp.ID);
1278
+ _this11.billID = resp.ID;
1263
1279
  }));
1264
1280
 
1265
1281
  case 18:
@@ -1268,8 +1284,8 @@ var SettlementStore = (_class = function () {
1268
1284
 
1269
1285
  case 20:
1270
1286
  return _context3.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
1271
- _this12.setDtoID(resp.ID);
1272
- _this12.billID = resp.ID;
1287
+ _this11.setDtoID(resp.ID);
1288
+ _this11.billID = resp.ID;
1273
1289
  }));
1274
1290
 
1275
1291
  case 21:
@@ -1281,7 +1297,7 @@ var SettlementStore = (_class = function () {
1281
1297
  }));
1282
1298
 
1283
1299
  function save() {
1284
- return _ref12.apply(this, arguments);
1300
+ return _ref13.apply(this, arguments);
1285
1301
  }
1286
1302
 
1287
1303
  return save;
@@ -1294,7 +1310,7 @@ var SettlementStore = (_class = function () {
1294
1310
  }, {
1295
1311
  key: 'querySettleResult',
1296
1312
  value: function () {
1297
- var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1313
+ var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1298
1314
  return _regenerator2.default.wrap(function _callee4$(_context4) {
1299
1315
  while (1) {
1300
1316
  switch (_context4.prev = _context4.next) {
@@ -1322,7 +1338,7 @@ var SettlementStore = (_class = function () {
1322
1338
  }));
1323
1339
 
1324
1340
  function querySettleResult() {
1325
- return _ref15.apply(this, arguments);
1341
+ return _ref16.apply(this, arguments);
1326
1342
  }
1327
1343
 
1328
1344
  return querySettleResult;
@@ -1348,14 +1364,14 @@ var SettlementStore = (_class = function () {
1348
1364
  }, {
1349
1365
  key: 'validePwd',
1350
1366
  value: function () {
1351
- var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(value) {
1352
- var _ref17, isNewRetailBCPos, cook1, cook2, message, result, count, _result;
1367
+ var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(value) {
1368
+ var _ref18, isNewRetailBCPos, cook1, cook2, message, result, count, _result;
1353
1369
 
1354
1370
  return _regenerator2.default.wrap(function _callee5$(_context5) {
1355
1371
  while (1) {
1356
1372
  switch (_context5.prev = _context5.next) {
1357
1373
  case 0:
1358
- _ref17 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref17.isNewRetailBCPos;
1374
+ _ref18 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref18.isNewRetailBCPos;
1359
1375
  _context5.prev = 1;
1360
1376
 
1361
1377
  if (!isNewRetailBCPos) {
@@ -1439,7 +1455,7 @@ var SettlementStore = (_class = function () {
1439
1455
  }));
1440
1456
 
1441
1457
  function validePwd(_x3) {
1442
- return _ref16.apply(this, arguments);
1458
+ return _ref17.apply(this, arguments);
1443
1459
  }
1444
1460
 
1445
1461
  return validePwd;
@@ -1449,7 +1465,7 @@ var SettlementStore = (_class = function () {
1449
1465
  }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
1450
1466
  enumerable: true,
1451
1467
  initializer: function initializer() {
1452
- var _this13 = this;
1468
+ var _this12 = this;
1453
1469
 
1454
1470
  return function (newPass, newPassConfirm) {
1455
1471
  if (!newPass || !newPassConfirm) {
@@ -1461,7 +1477,7 @@ var SettlementStore = (_class = function () {
1461
1477
  var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
1462
1478
  return (0, _tplusApi.ccApi)({
1463
1479
  Idstore: idstore,
1464
- meMemberId: _this13.member.ID,
1480
+ meMemberId: _this12.member.ID,
1465
1481
  oldPassword: null,
1466
1482
  newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
1467
1483
  dataSource: "POS"
@@ -1475,19 +1491,19 @@ var SettlementStore = (_class = function () {
1475
1491
  }), _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), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, 'updateMemberInfo', [_mobx.action], {
1476
1492
  enumerable: true,
1477
1493
  initializer: function initializer() {
1478
- var _this14 = this;
1494
+ var _this13 = this;
1479
1495
 
1480
1496
  return function () {
1481
- var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(_this) {
1497
+ var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(_this) {
1482
1498
  var _getLoginInfo, IdStore, StoreCode, resp;
1483
1499
 
1484
1500
  return _regenerator2.default.wrap(function _callee6$(_context6) {
1485
1501
  while (1) {
1486
1502
  switch (_context6.prev = _context6.next) {
1487
1503
  case 0:
1488
- _getLoginInfo = _this14.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
1504
+ _getLoginInfo = _this13.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
1489
1505
  _context6.next = 3;
1490
- return (0, _tplusApi.tApi)({ Idmember: _this14.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
1506
+ return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
1491
1507
 
1492
1508
  case 3:
1493
1509
  resp = _context6.sent;
@@ -1501,11 +1517,11 @@ var SettlementStore = (_class = function () {
1501
1517
  return _context6.stop();
1502
1518
  }
1503
1519
  }
1504
- }, _callee6, _this14);
1520
+ }, _callee6, _this13);
1505
1521
  }));
1506
1522
 
1507
1523
  return function (_x4) {
1508
- return _ref18.apply(this, arguments);
1524
+ return _ref19.apply(this, arguments);
1509
1525
  };
1510
1526
  }();
1511
1527
  }
@@ -1582,8 +1598,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
1582
1598
  }
1583
1599
  }, {
1584
1600
  key: 'calcDjqCheckValue',
1585
- value: function calcDjqCheckValue(q1, dto) {
1586
- var _this15 = this;
1601
+ value: function calcDjqCheckValue(q1, dto, params) {
1602
+ var _this14 = this;
1587
1603
 
1588
1604
  var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
1589
1605
  var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
@@ -1593,13 +1609,16 @@ var PayMode = exports.PayMode = (_class3 = function () {
1593
1609
  _message2.default.warn('本单最多可用' + useLimitPerOrder + '张');
1594
1610
  return;
1595
1611
  }
1612
+ if (params === 'single') {
1613
+ this.checkList = [];
1614
+ }
1596
1615
 
1597
- var _ref19 = _mutantsUtil.platform || {},
1598
- isNewRetailBCPos = _ref19.isNewRetailBCPos;
1616
+ var _ref20 = _mutantsUtil.platform || {},
1617
+ isNewRetailBCPos = _ref20.isNewRetailBCPos;
1599
1618
 
1600
- var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
1601
- PayStyle = _enumController$getEn14.PayStyle,
1602
- Differentiate = _enumController$getEn14.Differentiate;
1619
+ var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
1620
+ PayStyle = _enumController$getEn15.PayStyle,
1621
+ Differentiate = _enumController$getEn15.Differentiate;
1603
1622
 
1604
1623
  if (q1) {
1605
1624
  if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
@@ -1627,7 +1646,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1627
1646
  if (!q1.checked) {
1628
1647
  this.checkList.forEach(function (ele, i) {
1629
1648
  if (ele.id === q1.id) {
1630
- _this15.checkList.splice(i, 1);
1649
+ _this14.checkList.splice(i, 1);
1631
1650
  }
1632
1651
  });
1633
1652
  } else {
@@ -1639,7 +1658,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1639
1658
  this.checkList.forEach(function (ele, i) {
1640
1659
  if (ele.discountPct > 0) {
1641
1660
  if (ele.amount === 0) {
1642
- ele.amount = (1 - ele.discountPct) * _this15.currentMode.receivable;
1661
+ ele.amount = (1 - ele.discountPct) * _this14.currentMode.receivable;
1643
1662
  }
1644
1663
  }
1645
1664
  sum = Math.Add(sum, ele.amount);
@@ -1647,6 +1666,9 @@ var PayMode = exports.PayMode = (_class3 = function () {
1647
1666
  this.currentMode.value = (0, _utils.getFixedNumber)(Math.min(this.receivable, sum, this.currentMode.maxamount));
1648
1667
  this.currentMode.receivable = (0, _utils.getFixedNumber)(this.receivable - this.currentMode.value);
1649
1668
  this.currentMode.overchargesAmount = (0, _utils.getFixedNumber)(sum - this.currentMode.value);
1669
+ if (params === 'single') {
1670
+ return;
1671
+ }
1650
1672
  var promoVoucher = {};
1651
1673
  promoVoucher.boName = "Retail";
1652
1674
  // promoVoucher.promoLinks = _filter(this.currentMode.djqs,djq=>djq.checked);
@@ -1698,22 +1720,22 @@ var PayMode = exports.PayMode = (_class3 = function () {
1698
1720
  return (0, _tplusApi.ccApi)((0, _extends3.default)({}, promoVoucher), 'promotion/PromoCalculate/findUsefulCouponPromoList', false, false, { method: 'post', timeout_skip: true }).then(function (result) {
1699
1721
  if (result && result.length != 0) {
1700
1722
  result.forEach(function (element) {
1701
- var djq1 = (0, _filter3.default)(_this15.currentMode.djqs, function (djq) {
1723
+ var djq1 = (0, _filter3.default)(_this14.currentMode.djqs, function (djq) {
1702
1724
  return djq.id === element.id;
1703
1725
  });
1704
1726
 
1705
- var _ref20 = element || {},
1706
- couponCode = _ref20.couponCode,
1707
- name = _ref20.name,
1708
- tieredAmountResult = _ref20.tieredAmountResult,
1709
- fromDate = _ref20.fromDate,
1710
- dateMount = _ref20.dateMount,
1711
- promoMethodEnum = _ref20.promoMethodEnum,
1712
- discountPct = _ref20.discountPct,
1713
- nominalAmount = _ref20.nominalAmount,
1714
- promoId = _ref20.promoId,
1715
- id = _ref20.id,
1716
- doorsill = _ref20.doorsill;
1727
+ var _ref21 = element || {},
1728
+ couponCode = _ref21.couponCode,
1729
+ name = _ref21.name,
1730
+ tieredAmountResult = _ref21.tieredAmountResult,
1731
+ fromDate = _ref21.fromDate,
1732
+ dateMount = _ref21.dateMount,
1733
+ promoMethodEnum = _ref21.promoMethodEnum,
1734
+ discountPct = _ref21.discountPct,
1735
+ nominalAmount = _ref21.nominalAmount,
1736
+ promoId = _ref21.promoId,
1737
+ id = _ref21.id,
1738
+ doorsill = _ref21.doorsill;
1717
1739
 
1718
1740
  var condValue = tieredAmountResult.condValue,
1719
1741
  promoDiscount = tieredAmountResult.promoDiscount,
@@ -1741,9 +1763,9 @@ var PayMode = exports.PayMode = (_class3 = function () {
1741
1763
  // couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
1742
1764
  // id
1743
1765
  // })
1744
- _this15.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
1766
+ _this14.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
1745
1767
  } else {
1746
- _this15.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum);
1768
+ _this14.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum);
1747
1769
  // this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
1748
1770
  // djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
1749
1771
  }
@@ -1755,11 +1777,11 @@ var PayMode = exports.PayMode = (_class3 = function () {
1755
1777
  }, {
1756
1778
  key: 'calcDjqValue',
1757
1779
  value: function calcDjqValue(q1) {
1758
- var _ref21 = _mutantsUtil.platform || {},
1759
- isNewRetailBCPos = _ref21.isNewRetailBCPos;
1780
+ var _ref22 = _mutantsUtil.platform || {},
1781
+ isNewRetailBCPos = _ref22.isNewRetailBCPos;
1760
1782
 
1761
- var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
1762
- Differentiate = _enumController$getEn15.Differentiate;
1783
+ var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1784
+ Differentiate = _enumController$getEn16.Differentiate;
1763
1785
 
1764
1786
  if (q1) {
1765
1787
  if (!this.currentMode.boriginReturn && parseFloat(this.currentMode.maxamount) <= 0) {
@@ -1821,8 +1843,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
1821
1843
  this.currentMode.errinfo = '';
1822
1844
  var sum = this.amount;
1823
1845
 
1824
- var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1825
- PayStyle = _enumController$getEn16.PayStyle;
1846
+ var _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(),
1847
+ PayStyle = _enumController$getEn17.PayStyle;
1826
1848
 
1827
1849
  this.paymodes.thePaymodes && this.paymodes.thePaymodes.forEach(function (mode) {
1828
1850
  if (mode.paymentType === PayStyle.hyczk) {
@@ -1846,16 +1868,16 @@ var PayMode = exports.PayMode = (_class3 = function () {
1846
1868
  }, {
1847
1869
  key: 'setPaymodes',
1848
1870
  value: function () {
1849
- var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, isIntegralExchange) {
1850
- var _this16 = this;
1871
+ var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, isIntegralExchange) {
1872
+ var _this15 = this;
1851
1873
 
1852
- var _enumController$getEn17, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
1874
+ var _enumController$getEn18, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
1853
1875
 
1854
1876
  return _regenerator2.default.wrap(function _callee7$(_context7) {
1855
1877
  while (1) {
1856
1878
  switch (_context7.prev = _context7.next) {
1857
1879
  case 0:
1858
- _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn17.settleStyleType, PayStyle = _enumController$getEn17.PayStyle;
1880
+ _enumController$getEn18 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn18.settleStyleType, PayStyle = _enumController$getEn18.PayStyle;
1859
1881
  memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
1860
1882
  param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
1861
1883
  _context7.next = 5;
@@ -1879,6 +1901,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1879
1901
  isQuick: (0, _findIndex3.default)(modes.QuickSettleStyles, { 'Code': mode.Code }) >= 0,
1880
1902
  orderBy: 1,
1881
1903
  paymentType: mode.Code,
1904
+ offlineDisable: mode.offlineDisable,
1882
1905
  idSettleStyle: mode.IdSettleStyle,
1883
1906
  idBankAccount: mode.IdBankAccount,
1884
1907
  exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
@@ -1886,7 +1909,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1886
1909
  calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
1887
1910
  });
1888
1911
  });
1889
- _this16.paymodes = paymodes;
1912
+ _this15.paymodes = paymodes;
1890
1913
  //modes.QuickSettleStyles
1891
1914
  });
1892
1915
  }
@@ -1900,7 +1923,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1900
1923
  }));
1901
1924
 
1902
1925
  function setPaymodes(_x5, _x6) {
1903
- return _ref22.apply(this, arguments);
1926
+ return _ref23.apply(this, arguments);
1904
1927
  }
1905
1928
 
1906
1929
  return setPaymodes;
@@ -1945,19 +1968,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
1945
1968
  }), _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), _descriptor8 = _applyDecoratedDescriptor(_class3.prototype, 'calcCheckList', [_mobx.action], {
1946
1969
  enumerable: true,
1947
1970
  initializer: function initializer() {
1948
- var _this17 = this;
1971
+ var _this16 = this;
1949
1972
 
1950
1973
  return function () {
1951
- _this17.checkList = [];
1974
+ _this16.checkList = [];
1952
1975
  };
1953
1976
  }
1954
1977
  }), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
1955
1978
  enumerable: true,
1956
1979
  initializer: function initializer() {
1957
- var _this18 = this;
1980
+ var _this17 = this;
1958
1981
 
1959
1982
  return function (id, couponNum, code) {
1960
- _this18.currentMode.djqs.forEach(function (ele) {
1983
+ _this17.currentMode.djqs.forEach(function (ele) {
1961
1984
  if (ele.id === id) {
1962
1985
  ele.couponCategoryEnum = couponNum;
1963
1986
  var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
@@ -1969,7 +1992,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1969
1992
  }), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
1970
1993
  enumerable: true,
1971
1994
  initializer: function initializer() {
1972
- var _this19 = this;
1995
+ var _this18 = this;
1973
1996
 
1974
1997
  return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
1975
1998
  var djq = {
@@ -1991,13 +2014,13 @@ var PayMode = exports.PayMode = (_class3 = function () {
1991
2014
  couponCategoryEnum: couponCategoryEnum,
1992
2015
  id: id
1993
2016
  };
1994
- _this19.currentMode.djqs.push(djq);
2017
+ _this18.currentMode.djqs.push(djq);
1995
2018
  };
1996
2019
  }
1997
2020
  }), _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);
1998
2021
  var Member = exports.Member = (_class5 = function () {
1999
2022
  function Member(m) {
2000
- var _this20 = this;
2023
+ var _this19 = this;
2001
2024
 
2002
2025
  (0, _classCallCheck3.default)(this, Member);
2003
2026
 
@@ -2020,17 +2043,17 @@ var Member = exports.Member = (_class5 = function () {
2020
2043
  return key == 'canusedbalancestorage';
2021
2044
  });
2022
2045
 
2023
- var _ref23 = _mutantsUtil.platform || {},
2024
- isNewRetailBCPos = _ref23.isNewRetailBCPos;
2046
+ var _ref24 = _mutantsUtil.platform || {},
2047
+ isNewRetailBCPos = _ref24.isNewRetailBCPos;
2025
2048
 
2026
2049
  m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
2027
2050
  m.MeStorageCardId && (this.MeStorageCardId = m.MeStorageCardId);
2028
2051
  (0, _mobx.runInAction)(function () {
2029
- _this20.cardNo = m.CardCode;
2052
+ _this19.cardNo = m.CardCode;
2030
2053
  if (index >= 0) {
2031
- _this20.balance = parseFloat(m.DynamicPropertyValues[index]);
2054
+ _this19.balance = parseFloat(m.DynamicPropertyValues[index]);
2032
2055
  } else {
2033
- _this20.balance = _this20.rawbalance;
2056
+ _this19.balance = _this19.rawbalance;
2034
2057
  }
2035
2058
  });
2036
2059
  this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;