tplus-components-touch 3.22.2 → 3.22.6

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,7 +965,12 @@ var SettlementStore = (_class = function () {
965
965
  }, {
966
966
  key: 'delPay',
967
967
  value: function delPay(index) {
968
+ var _this10 = this;
969
+
968
970
  (0, _remove3.default)(this.paymode.thePaymodes, function (mode) {
971
+ if (mode.paymethodId === index) {
972
+ _this10.paymode.amount = _this10.paymode.amount + mode.value;
973
+ }
969
974
  return mode.paymethodId === index;
970
975
  });
971
976
  this.paymode.currentFocus = -1;
@@ -975,6 +980,8 @@ var SettlementStore = (_class = function () {
975
980
  key: 'commit',
976
981
  value: function () {
977
982
  var _ref11 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee2(bTest) {
983
+ var _ref12, isNewRetailBCPos;
984
+
978
985
  return _regenerator2.default.wrap(function _callee2$(_context2) {
979
986
  while (1) {
980
987
  switch (_context2.prev = _context2.next) {
@@ -989,43 +996,59 @@ var SettlementStore = (_class = function () {
989
996
  return _context2.abrupt('return', _promise2.default.resolve(true));
990
997
 
991
998
  case 3:
992
- _context2.prev = 3;
999
+ _ref12 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref12.isNewRetailBCPos;
1000
+ _context2.prev = 4;
993
1001
 
994
1002
  if (!(this.type == 1)) {
995
- _context2.next = 9;
1003
+ _context2.next = 10;
996
1004
  break;
997
1005
  }
998
1006
 
999
- _context2.next = 7;
1007
+ _context2.next = 8;
1000
1008
  return this.saveMember();
1001
1009
 
1002
- case 7:
1003
- _context2.next = 11;
1010
+ case 8:
1011
+ _context2.next = 18;
1004
1012
  break;
1005
1013
 
1006
- case 9:
1007
- _context2.next = 11;
1014
+ case 10:
1015
+ if (!isNewRetailBCPos) {
1016
+ _context2.next = 13;
1017
+ break;
1018
+ }
1019
+
1020
+ _context2.next = 13;
1021
+ return _mutantsMicrofx.stores.offlineSys.generatorCode(this.dto);
1022
+
1023
+ case 13:
1024
+ _context2.next = 15;
1008
1025
  return this.save();
1009
1026
 
1010
- case 11:
1027
+ case 15:
1028
+ if (!isNewRetailBCPos) {
1029
+ _context2.next = 18;
1030
+ break;
1031
+ }
1032
+
1033
+ _context2.next = 18;
1034
+ return _mutantsMicrofx.stores.offlineSys.retailSequenceUpload();
1035
+
1036
+ case 18:
1011
1037
  return _context2.abrupt('return', _promise2.default.resolve(true));
1012
1038
 
1013
- case 14:
1014
- _context2.prev = 14;
1015
- _context2.t0 = _context2['catch'](3);
1039
+ case 21:
1040
+ _context2.prev = 21;
1041
+ _context2.t0 = _context2['catch'](4);
1016
1042
 
1017
1043
  console.error('settlementStore.commit失败,错误信息:' + _context2.t0);
1018
1044
  return _context2.abrupt('return', _promise2.default.resolve(_context2.t0));
1019
1045
 
1020
- case 18:
1021
- console.error('settlementStore.commit失败,错误信息:' + err);
1022
-
1023
- case 19:
1046
+ case 25:
1024
1047
  case 'end':
1025
1048
  return _context2.stop();
1026
1049
  }
1027
1050
  }
1028
- }, _callee2, this, [[3, 14]]);
1051
+ }, _callee2, this, [[4, 21]]);
1029
1052
  }));
1030
1053
 
1031
1054
  function commit(_x2) {
@@ -1038,31 +1061,31 @@ var SettlementStore = (_class = function () {
1038
1061
  key: 'handlePrint',
1039
1062
  value: function handlePrint(resp) {
1040
1063
  // 储值打印
1041
- return (0, _tplusComponentsTouch.printDispatch)(_tplusComponentsTouch.DoNameList.DO_STORAGE_PRINT, resp.ID, {});
1064
+ return (0, _tplusComponentsTouch.printDispatch)(_tplusComponentsTouch.DoNameList.DO_STORAGE_PRINT, resp, {});
1042
1065
  }
1043
1066
  }, {
1044
1067
  key: 'saveMember',
1045
1068
  value: function saveMember() {
1046
- var _this10 = this;
1069
+ var _this11 = this;
1047
1070
 
1048
1071
  var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
1049
1072
  PayStyle = _enumController$getEn12.PayStyle;
1050
1073
 
1051
1074
  (0, _mobx.runInAction)(function () {
1052
- _this10.dto.StorageMutiSettleDetails = [];
1053
- var thePaymodes = _this10.newStyle ? (0, _filter3.default)(_this10.paymode.thePaymodes, function (mode) {
1075
+ _this11.dto.StorageMutiSettleDetails = [];
1076
+ var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
1054
1077
  return parseFloat(mode.value) != 0;
1055
- }) : _this10.paymode.thePaymodes;
1078
+ }) : _this11.paymode.thePaymodes;
1056
1079
  (0, _each3.default)(thePaymodes, function (mode) {
1057
- var themode = (0, _find3.default)(_this10.paymode.paymodes, { 'paymentType': mode.paymentType });
1080
+ var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
1058
1081
 
1059
1082
  var value = parseFloat(mode.value);
1060
1083
  var giveChange = null;
1061
- if (mode.paymentType == PayStyle.xianjin && _this10.paymode.receivable < 0 && value > Math.abs(_this10.paymode.receivable)) {
1062
- value = Math.Add(value, _this10.paymode.receivable);
1063
- giveChange = Math.abs(_this10.paymode.receivable);
1084
+ if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
1085
+ value = Math.Add(value, _this11.paymode.receivable);
1086
+ giveChange = Math.abs(_this11.paymode.receivable);
1064
1087
  }
1065
- _this10.dto.StorageMutiSettleDetails.push({
1088
+ _this11.dto.StorageMutiSettleDetails.push({
1066
1089
  Code: mode.paymethodId,
1067
1090
  StorageAmount: value,
1068
1091
  GiveChange: giveChange,
@@ -1071,7 +1094,7 @@ var SettlementStore = (_class = function () {
1071
1094
  PaymentCode: mode.authCode,
1072
1095
  DynamicPropertyKeys: [],
1073
1096
  DynamicPropertyValues: [],
1074
- DataSource: { Id: _this10.dataSource }
1097
+ DataSource: { Id: _this11.dataSource }
1075
1098
  });
1076
1099
  });
1077
1100
  });
@@ -1081,16 +1104,16 @@ var SettlementStore = (_class = function () {
1081
1104
  IPMSG = JSON.parse(window.localStorage.IPMSG);
1082
1105
  }
1083
1106
  return (0, _tplusApi.tApi)({ dto: this.dto }, 'chanjet.ME.INewRetailMemberStorage.Save', false, false).then(function (resp) {
1084
- _this10.handlePrint(resp);
1107
+ _this11.handlePrint(resp);
1085
1108
  });
1086
1109
  }
1087
1110
  }, {
1088
1111
  key: 'save',
1089
1112
  value: function () {
1090
- var _ref12 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
1091
- var _this11 = this;
1113
+ var _ref13 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee3() {
1114
+ var _this12 = this;
1092
1115
 
1093
- var _enumController$getEn13, PayStyle, _ref14, isNewRetailBCPos, IPMSG, RetailTypeEnum;
1116
+ var _enumController$getEn13, PayStyle, _ref15, isNewRetailBCPos, IPMSG, RetailTypeEnum;
1094
1117
 
1095
1118
  return _regenerator2.default.wrap(function _callee3$(_context3) {
1096
1119
  while (1) {
@@ -1099,24 +1122,24 @@ var SettlementStore = (_class = function () {
1099
1122
  _enumController$getEn13 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn13.PayStyle;
1100
1123
 
1101
1124
  (0, _mobx.runInAction)(function () {
1102
- _this11.dto.RetailPaymentDetails = [];
1103
- _this11.dto.RetailStorageDetails = [];
1104
- _this11.dto.RetailCouponDetails = [];
1125
+ _this12.dto.RetailPaymentDetails = [];
1126
+ _this12.dto.RetailStorageDetails = [];
1127
+ _this12.dto.RetailCouponDetails = [];
1105
1128
  var czkSum = 0;
1106
- var Idmember = _this11.dto.Idmember;
1129
+ var Idmember = _this12.dto.Idmember;
1107
1130
  var count = 0;
1108
- var thePaymodes = _this11.newStyle ? (0, _filter3.default)(_this11.paymode.thePaymodes, function (mode) {
1131
+ var thePaymodes = _this12.newStyle ? (0, _filter3.default)(_this12.paymode.thePaymodes, function (mode) {
1109
1132
  return parseFloat(mode.value) != 0;
1110
- }) : _this11.paymode.thePaymodes;
1133
+ }) : _this12.paymode.thePaymodes;
1111
1134
  (0, _each3.default)(thePaymodes, function (mode, index) {
1112
- var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': mode.paymentType });
1135
+ var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': mode.paymentType });
1113
1136
  if (mode.paymentType == PayStyle.hyczk) {
1114
1137
  if (!Idmember) {
1115
1138
  Idmember = mode.member.id;
1116
1139
  }
1117
1140
  czkSum = Math.Add(czkSum, mode.value);
1118
- var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this11.member.MeStorageCardId;
1119
- _this11.dto.RetailStorageDetails.push({
1141
+ var MeStorageCardId = mode.member.MeStorageCardId ? mode.member.MeStorageCardId : _this12.member.MeStorageCardId;
1142
+ _this12.dto.RetailStorageDetails.push({
1120
1143
  Code: mode.paymethodId,
1121
1144
  MeStorageCardId: MeStorageCardId,
1122
1145
  StoragePaymentAmount: mode.value,
@@ -1125,17 +1148,17 @@ var SettlementStore = (_class = function () {
1125
1148
  Idmember: mode.member.id,
1126
1149
  DynamicPropertyKeys: [],
1127
1150
  DynamicPropertyValues: [],
1128
- DataSource: { Id: _this11.dataSource },
1151
+ DataSource: { Id: _this12.dataSource },
1129
1152
  Password: mode.authCode
1130
1153
  });
1131
1154
  } else {
1132
1155
  var value = parseFloat(mode.value);
1133
1156
  var giveChange = null;
1134
- if (mode.paymentType == PayStyle.xianjin && _this11.paymode.receivable < 0 && value > Math.abs(_this11.paymode.receivable)) {
1135
- value = Math.Add(value, _this11.paymode.receivable);
1136
- giveChange = Math.abs(_this11.paymode.receivable);
1157
+ if (mode.paymentType == PayStyle.xianjin && _this12.paymode.receivable < 0 && value > Math.abs(_this12.paymode.receivable)) {
1158
+ value = Math.Add(value, _this12.paymode.receivable);
1159
+ giveChange = Math.abs(_this12.paymode.receivable);
1137
1160
  }
1138
- _this11.dto.RetailPaymentDetails.push({
1161
+ _this12.dto.RetailPaymentDetails.push({
1139
1162
  Code: mode.paymethodId,
1140
1163
  OrigAmount: mode.exchangeRate != 1 ? mode.value2 : value,
1141
1164
  Amount: value,
@@ -1149,12 +1172,12 @@ var SettlementStore = (_class = function () {
1149
1172
  OverchargesAmount: mode.overchargesAmount,
1150
1173
  DynamicPropertyKeys: [],
1151
1174
  DynamicPropertyValues: [],
1152
- DataSource: { Id: _this11.dataSource }
1175
+ DataSource: { Id: _this12.dataSource }
1153
1176
  });
1154
1177
  if (mode.paymentType == PayStyle.djq) {
1155
1178
  (0, _each3.default)(mode.djqs, function (djq) {
1156
1179
  if (djq.checked) {
1157
- _this11.dto.RetailCouponDetails.push({
1180
+ _this12.dto.RetailCouponDetails.push({
1158
1181
  CouponCode: djq.code,
1159
1182
  ReductionAmount: djq.amount,
1160
1183
  EnableAmount: djq.doorsill,
@@ -1164,7 +1187,7 @@ var SettlementStore = (_class = function () {
1164
1187
  PromotionId: djq.promoId,
1165
1188
  PromotionRuleId: djq.promoRuleId,
1166
1189
  PromoCouponAllocatedId: djq.id,
1167
- DataSource: { Id: _this11.dataSource }
1190
+ DataSource: { Id: _this12.dataSource }
1168
1191
  });
1169
1192
  }
1170
1193
  });
@@ -1172,42 +1195,42 @@ var SettlementStore = (_class = function () {
1172
1195
  }
1173
1196
  });
1174
1197
 
1175
- var _ref13 = _mutantsUtil.platform || {},
1176
- isNewRetailBCPos = _ref13.isNewRetailBCPos;
1198
+ var _ref14 = _mutantsUtil.platform || {},
1199
+ isNewRetailBCPos = _ref14.isNewRetailBCPos;
1177
1200
 
1178
- if (_this11.dto.RetailStorageDetails.length > 0) {
1179
- var themode = (0, _find3.default)(_this11.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
1201
+ if (_this12.dto.RetailStorageDetails.length > 0) {
1202
+ var themode = (0, _find3.default)(_this12.paymode.paymodes, { 'paymentType': PayStyle.hyczk });
1180
1203
  if (isNewRetailBCPos) {
1181
1204
  // this.dto.RetailStorageDetails && this.dto.RetailStorageDetails.forEach((value, index) => {
1182
1205
  // value.MeStorageCardId = (mode.MeStorageCardId ? mode.MeStorageCardId : this.member.MeStorageCardId);
1183
1206
  // })
1184
- _this11.dto.RetailPaymentDetails.push({
1185
- Code: _this11.paymode.counter,
1207
+ _this12.dto.RetailPaymentDetails.push({
1208
+ Code: _this12.paymode.counter,
1186
1209
  OrigAmount: czkSum,
1187
1210
  Amount: czkSum,
1188
1211
  IdsettleStyle: themode.idSettleStyle,
1189
1212
  IdbankAccount: themode.idBankAccount,
1190
1213
  DynamicPropertyKeys: [],
1191
1214
  DynamicPropertyValues: [],
1192
- DataSource: { Id: _this11.dataSource },
1193
- RetailStorageDetails: _this11.dto.RetailStorageDetails
1215
+ DataSource: { Id: _this12.dataSource },
1216
+ RetailStorageDetails: _this12.dto.RetailStorageDetails
1194
1217
  });
1195
1218
  } else {
1196
- _this11.dto.RetailPaymentDetails.push({
1197
- Code: _this11.paymode.counter,
1219
+ _this12.dto.RetailPaymentDetails.push({
1220
+ Code: _this12.paymode.counter,
1198
1221
  OrigAmount: czkSum,
1199
1222
  Amount: czkSum,
1200
1223
  IdsettleStyle: themode.idSettleStyle,
1201
1224
  IdbankAccount: themode.idBankAccount,
1202
1225
  DynamicPropertyKeys: [],
1203
1226
  DynamicPropertyValues: [],
1204
- DataSource: { Id: _this11.dataSource }
1227
+ DataSource: { Id: _this12.dataSource }
1205
1228
  });
1206
1229
  }
1207
- _this11.dto.Idmember = Idmember;
1230
+ _this12.dto.Idmember = Idmember;
1208
1231
  }
1209
1232
  });
1210
- _ref14 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref14.isNewRetailBCPos;
1233
+ _ref15 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref15.isNewRetailBCPos;
1211
1234
 
1212
1235
  console.log('bc_pos\u73AF\u5883:' + isNewRetailBCPos + ',\u7ED3\u7B97\u6570\u636E\uFF1A', this.dto);
1213
1236
 
@@ -1253,8 +1276,8 @@ var SettlementStore = (_class = function () {
1253
1276
  }
1254
1277
 
1255
1278
  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) {
1256
- _this11.setDtoID(resp.ID);
1257
- _this11.billID = resp.ID;
1279
+ _this12.setDtoID(resp.ID);
1280
+ _this12.billID = resp.ID;
1258
1281
  }));
1259
1282
 
1260
1283
  case 18:
@@ -1263,8 +1286,8 @@ var SettlementStore = (_class = function () {
1263
1286
 
1264
1287
  case 20:
1265
1288
  return _context3.abrupt('return', (0, _tplusApi.tApi)({ dto: this.dto.cut() }, 'chanjet.RE.newRetail.Settle', false, false, { timeout_skip: true }).then(function (resp) {
1266
- _this11.setDtoID(resp.ID);
1267
- _this11.billID = resp.ID;
1289
+ _this12.setDtoID(resp.ID);
1290
+ _this12.billID = resp.ID;
1268
1291
  }));
1269
1292
 
1270
1293
  case 21:
@@ -1276,7 +1299,7 @@ var SettlementStore = (_class = function () {
1276
1299
  }));
1277
1300
 
1278
1301
  function save() {
1279
- return _ref12.apply(this, arguments);
1302
+ return _ref13.apply(this, arguments);
1280
1303
  }
1281
1304
 
1282
1305
  return save;
@@ -1289,7 +1312,7 @@ var SettlementStore = (_class = function () {
1289
1312
  }, {
1290
1313
  key: 'querySettleResult',
1291
1314
  value: function () {
1292
- var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1315
+ var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee4() {
1293
1316
  return _regenerator2.default.wrap(function _callee4$(_context4) {
1294
1317
  while (1) {
1295
1318
  switch (_context4.prev = _context4.next) {
@@ -1317,7 +1340,7 @@ var SettlementStore = (_class = function () {
1317
1340
  }));
1318
1341
 
1319
1342
  function querySettleResult() {
1320
- return _ref15.apply(this, arguments);
1343
+ return _ref16.apply(this, arguments);
1321
1344
  }
1322
1345
 
1323
1346
  return querySettleResult;
@@ -1343,14 +1366,14 @@ var SettlementStore = (_class = function () {
1343
1366
  }, {
1344
1367
  key: 'validePwd',
1345
1368
  value: function () {
1346
- var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(value) {
1347
- var _ref17, isNewRetailBCPos, cook1, cook2, message, result, count, _result;
1369
+ var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee5(value) {
1370
+ var _ref18, isNewRetailBCPos, cook1, cook2, message, result, count, _result;
1348
1371
 
1349
1372
  return _regenerator2.default.wrap(function _callee5$(_context5) {
1350
1373
  while (1) {
1351
1374
  switch (_context5.prev = _context5.next) {
1352
1375
  case 0:
1353
- _ref17 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref17.isNewRetailBCPos;
1376
+ _ref18 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref18.isNewRetailBCPos;
1354
1377
  _context5.prev = 1;
1355
1378
 
1356
1379
  if (!isNewRetailBCPos) {
@@ -1434,7 +1457,7 @@ var SettlementStore = (_class = function () {
1434
1457
  }));
1435
1458
 
1436
1459
  function validePwd(_x3) {
1437
- return _ref16.apply(this, arguments);
1460
+ return _ref17.apply(this, arguments);
1438
1461
  }
1439
1462
 
1440
1463
  return validePwd;
@@ -1444,7 +1467,7 @@ var SettlementStore = (_class = function () {
1444
1467
  }(), (_descriptor = _applyDecoratedDescriptor(_class.prototype, 'queryPwd', [_mobx.action], {
1445
1468
  enumerable: true,
1446
1469
  initializer: function initializer() {
1447
- var _this12 = this;
1470
+ var _this13 = this;
1448
1471
 
1449
1472
  return function (newPass, newPassConfirm) {
1450
1473
  if (!newPass || !newPassConfirm) {
@@ -1456,7 +1479,7 @@ var SettlementStore = (_class = function () {
1456
1479
  var idstore = (0, _tplusPoslogin.PosInitData)('storeID');
1457
1480
  return (0, _tplusApi.ccApi)({
1458
1481
  Idstore: idstore,
1459
- meMemberId: _this12.member.ID,
1482
+ meMemberId: _this13.member.ID,
1460
1483
  oldPassword: null,
1461
1484
  newPassword: _tplusApi.User.pwdEncrypt(newPassConfirm),
1462
1485
  dataSource: "POS"
@@ -1470,19 +1493,19 @@ var SettlementStore = (_class = function () {
1470
1493
  }), _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], {
1471
1494
  enumerable: true,
1472
1495
  initializer: function initializer() {
1473
- var _this13 = this;
1496
+ var _this14 = this;
1474
1497
 
1475
1498
  return function () {
1476
- var _ref18 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(_this) {
1499
+ var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee6(_this) {
1477
1500
  var _getLoginInfo, IdStore, StoreCode, resp;
1478
1501
 
1479
1502
  return _regenerator2.default.wrap(function _callee6$(_context6) {
1480
1503
  while (1) {
1481
1504
  switch (_context6.prev = _context6.next) {
1482
1505
  case 0:
1483
- _getLoginInfo = _this13.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
1506
+ _getLoginInfo = _this14.getLoginInfo(), IdStore = _getLoginInfo.IdStore, StoreCode = _getLoginInfo.StoreCode;
1484
1507
  _context6.next = 3;
1485
- return (0, _tplusApi.tApi)({ Idmember: _this13.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
1508
+ return (0, _tplusApi.tApi)({ Idmember: _this14.member.ID, IdStore: IdStore, StoreCode: StoreCode }, 'chanjet.AA.DR.INewRetailMember.GetUmemberDTO', false, false);
1486
1509
 
1487
1510
  case 3:
1488
1511
  resp = _context6.sent;
@@ -1496,11 +1519,11 @@ var SettlementStore = (_class = function () {
1496
1519
  return _context6.stop();
1497
1520
  }
1498
1521
  }
1499
- }, _callee6, _this13);
1522
+ }, _callee6, _this14);
1500
1523
  }));
1501
1524
 
1502
1525
  return function (_x4) {
1503
- return _ref18.apply(this, arguments);
1526
+ return _ref19.apply(this, arguments);
1504
1527
  };
1505
1528
  }();
1506
1529
  }
@@ -1577,8 +1600,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
1577
1600
  }
1578
1601
  }, {
1579
1602
  key: 'calcDjqCheckValue',
1580
- value: function calcDjqCheckValue(q1, dto) {
1581
- var _this14 = this;
1603
+ value: function calcDjqCheckValue(q1, dto, params) {
1604
+ var _this15 = this;
1582
1605
 
1583
1606
  var useLimitPerOrder = (0, _tplusPoslogin.PosInitData)('UseLimitPerOrder');
1584
1607
  var qList = (0, _filter3.default)(this.currentMode.djqs, function (djq) {
@@ -1588,9 +1611,12 @@ var PayMode = exports.PayMode = (_class3 = function () {
1588
1611
  _message2.default.warn('本单最多可用' + useLimitPerOrder + '张');
1589
1612
  return;
1590
1613
  }
1614
+ if (params === 'single') {
1615
+ this.checkList = [];
1616
+ }
1591
1617
 
1592
- var _ref19 = _mutantsUtil.platform || {},
1593
- isNewRetailBCPos = _ref19.isNewRetailBCPos;
1618
+ var _ref20 = _mutantsUtil.platform || {},
1619
+ isNewRetailBCPos = _ref20.isNewRetailBCPos;
1594
1620
 
1595
1621
  var _enumController$getEn14 = _mutantsUtil.enumController.getEnumOj(),
1596
1622
  PayStyle = _enumController$getEn14.PayStyle,
@@ -1622,7 +1648,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1622
1648
  if (!q1.checked) {
1623
1649
  this.checkList.forEach(function (ele, i) {
1624
1650
  if (ele.id === q1.id) {
1625
- _this14.checkList.splice(i, 1);
1651
+ _this15.checkList.splice(i, 1);
1626
1652
  }
1627
1653
  });
1628
1654
  } else {
@@ -1634,9 +1660,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1634
1660
  this.checkList.forEach(function (ele, i) {
1635
1661
  if (ele.discountPct > 0) {
1636
1662
  if (ele.amount === 0) {
1637
- console.log(ele.amount, _this14.currentMode.receivable, 'amount2222222222');
1638
- ele.amount = (1 - ele.discountPct) * _this14.currentMode.receivable;
1639
- console.log(ele.amount, _this14.currentMode.receivable, 'amount1111111111');
1663
+ ele.amount = (1 - ele.discountPct) * _this15.currentMode.receivable;
1640
1664
  }
1641
1665
  }
1642
1666
  sum = Math.Add(sum, ele.amount);
@@ -1644,6 +1668,9 @@ var PayMode = exports.PayMode = (_class3 = function () {
1644
1668
  this.currentMode.value = (0, _utils.getFixedNumber)(Math.min(this.receivable, sum, this.currentMode.maxamount));
1645
1669
  this.currentMode.receivable = (0, _utils.getFixedNumber)(this.receivable - this.currentMode.value);
1646
1670
  this.currentMode.overchargesAmount = (0, _utils.getFixedNumber)(sum - this.currentMode.value);
1671
+ if (params === 'single') {
1672
+ return;
1673
+ }
1647
1674
  var promoVoucher = {};
1648
1675
  promoVoucher.boName = "Retail";
1649
1676
  // promoVoucher.promoLinks = _filter(this.currentMode.djqs,djq=>djq.checked);
@@ -1695,22 +1722,22 @@ var PayMode = exports.PayMode = (_class3 = function () {
1695
1722
  return (0, _tplusApi.ccApi)((0, _extends3.default)({}, promoVoucher), 'promotion/PromoCalculate/findUsefulCouponPromoList', false, false, { method: 'post', timeout_skip: true }).then(function (result) {
1696
1723
  if (result && result.length != 0) {
1697
1724
  result.forEach(function (element) {
1698
- var djq1 = (0, _filter3.default)(_this14.currentMode.djqs, function (djq) {
1725
+ var djq1 = (0, _filter3.default)(_this15.currentMode.djqs, function (djq) {
1699
1726
  return djq.id === element.id;
1700
1727
  });
1701
1728
 
1702
- var _ref20 = element || {},
1703
- couponCode = _ref20.couponCode,
1704
- name = _ref20.name,
1705
- tieredAmountResult = _ref20.tieredAmountResult,
1706
- fromDate = _ref20.fromDate,
1707
- dateMount = _ref20.dateMount,
1708
- promoMethodEnum = _ref20.promoMethodEnum,
1709
- discountPct = _ref20.discountPct,
1710
- nominalAmount = _ref20.nominalAmount,
1711
- promoId = _ref20.promoId,
1712
- id = _ref20.id,
1713
- doorsill = _ref20.doorsill;
1729
+ var _ref21 = element || {},
1730
+ couponCode = _ref21.couponCode,
1731
+ name = _ref21.name,
1732
+ tieredAmountResult = _ref21.tieredAmountResult,
1733
+ fromDate = _ref21.fromDate,
1734
+ dateMount = _ref21.dateMount,
1735
+ promoMethodEnum = _ref21.promoMethodEnum,
1736
+ discountPct = _ref21.discountPct,
1737
+ nominalAmount = _ref21.nominalAmount,
1738
+ promoId = _ref21.promoId,
1739
+ id = _ref21.id,
1740
+ doorsill = _ref21.doorsill;
1714
1741
 
1715
1742
  var condValue = tieredAmountResult.condValue,
1716
1743
  promoDiscount = tieredAmountResult.promoDiscount,
@@ -1738,9 +1765,9 @@ var PayMode = exports.PayMode = (_class3 = function () {
1738
1765
  // couponCategoryEnum: tieredAmountResult.couponCategoryEnum,
1739
1766
  // id
1740
1767
  // })
1741
- _this14.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
1768
+ _this15.addDjqs(couponCode, name, true, nominalAmount, doorsill, element.LastTS, false, true, dto.Idmember, dateMount, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, tieredAmountResult.couponCategoryEnum, id);
1742
1769
  } else {
1743
- _this14.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum);
1770
+ _this15.setCouponNum(element.id, tieredAmountResult.couponCategoryEnum);
1744
1771
  // this.currentMode.djqs[0].couponCategoryEnum = 'couponCategoryEnum';
1745
1772
  // djq1.couponCategoryEnum = element.tieredAmountResult.couponCategoryEnum
1746
1773
  }
@@ -1752,8 +1779,8 @@ var PayMode = exports.PayMode = (_class3 = function () {
1752
1779
  }, {
1753
1780
  key: 'calcDjqValue',
1754
1781
  value: function calcDjqValue(q1) {
1755
- var _ref21 = _mutantsUtil.platform || {},
1756
- isNewRetailBCPos = _ref21.isNewRetailBCPos;
1782
+ var _ref22 = _mutantsUtil.platform || {},
1783
+ isNewRetailBCPos = _ref22.isNewRetailBCPos;
1757
1784
 
1758
1785
  var _enumController$getEn15 = _mutantsUtil.enumController.getEnumOj(),
1759
1786
  Differentiate = _enumController$getEn15.Differentiate;
@@ -1816,9 +1843,20 @@ var PayMode = exports.PayMode = (_class3 = function () {
1816
1843
  value: function setCurrentModeValue(v, max) {
1817
1844
  this.currentMode.value = parseFloat(v) || 0;
1818
1845
  this.currentMode.errinfo = '';
1846
+ var sum = this.amount;
1847
+
1848
+ var _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(),
1849
+ PayStyle = _enumController$getEn16.PayStyle;
1850
+
1851
+ this.paymodes.thePaymodes && this.paymodes.thePaymodes.forEach(function (mode) {
1852
+ if (mode.paymentType === PayStyle.hyczk) {
1853
+ sum -= mode.value;
1854
+ }
1855
+ });
1856
+
1819
1857
  if (this.amount > 0 && (v === '' || v === '0.00')) {
1820
1858
  this.currentMode.errinfo = "实收金额必须录入";
1821
- } else if (Math.abs(parseFloat(v)) > Math.abs(this.amount)) {
1859
+ } else if (Math.abs(parseFloat(v)) > Math.abs(sum)) {
1822
1860
  this.currentMode.errinfo = "实收不应大于应收";
1823
1861
  } else if (parseFloat(v) > 0 && parseFloat(v) > (max || 0)) {
1824
1862
  this.currentMode.errinfo = "余额不足";
@@ -1832,16 +1870,16 @@ var PayMode = exports.PayMode = (_class3 = function () {
1832
1870
  }, {
1833
1871
  key: 'setPaymodes',
1834
1872
  value: function () {
1835
- var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, isIntegralExchange) {
1836
- var _this15 = this;
1873
+ var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee7(type, isIntegralExchange) {
1874
+ var _this16 = this;
1837
1875
 
1838
- var _enumController$getEn16, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
1876
+ var _enumController$getEn17, settleStyleType, PayStyle, memberStoreCode, settlementCode, param, modes;
1839
1877
 
1840
1878
  return _regenerator2.default.wrap(function _callee7$(_context7) {
1841
1879
  while (1) {
1842
1880
  switch (_context7.prev = _context7.next) {
1843
1881
  case 0:
1844
- _enumController$getEn16 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn16.settleStyleType, PayStyle = _enumController$getEn16.PayStyle;
1882
+ _enumController$getEn17 = _mutantsUtil.enumController.getEnumOj(), settleStyleType = _enumController$getEn17.settleStyleType, PayStyle = _enumController$getEn17.PayStyle;
1845
1883
  memberStoreCode = settleStyleType.memberStoreCode, settlementCode = settleStyleType.settlementCode;
1846
1884
  param = { 'settleStyleType': type == 1 ? memberStoreCode : settlementCode, isIntegralExchange: isIntegralExchange };
1847
1885
  _context7.next = 5;
@@ -1865,6 +1903,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1865
1903
  isQuick: (0, _findIndex3.default)(modes.QuickSettleStyles, { 'Code': mode.Code }) >= 0,
1866
1904
  orderBy: 1,
1867
1905
  paymentType: mode.Code,
1906
+ offlineDisable: mode.offlineDisable,
1868
1907
  idSettleStyle: mode.IdSettleStyle,
1869
1908
  idBankAccount: mode.IdBankAccount,
1870
1909
  exchangeRate: mode.Currency ? mode.Currency.ExchangeRate : 1,
@@ -1872,7 +1911,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1872
1911
  calDirection: mode.Currency ? mode.Currency.CalDirection.Id : "88"
1873
1912
  });
1874
1913
  });
1875
- _this15.paymodes = paymodes;
1914
+ _this16.paymodes = paymodes;
1876
1915
  //modes.QuickSettleStyles
1877
1916
  });
1878
1917
  }
@@ -1886,7 +1925,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1886
1925
  }));
1887
1926
 
1888
1927
  function setPaymodes(_x5, _x6) {
1889
- return _ref22.apply(this, arguments);
1928
+ return _ref23.apply(this, arguments);
1890
1929
  }
1891
1930
 
1892
1931
  return setPaymodes;
@@ -1931,19 +1970,19 @@ var PayMode = exports.PayMode = (_class3 = function () {
1931
1970
  }), _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], {
1932
1971
  enumerable: true,
1933
1972
  initializer: function initializer() {
1934
- var _this16 = this;
1973
+ var _this17 = this;
1935
1974
 
1936
1975
  return function () {
1937
- _this16.checkList = [];
1976
+ _this17.checkList = [];
1938
1977
  };
1939
1978
  }
1940
1979
  }), _applyDecoratedDescriptor(_class3.prototype, 'calcDjqCheckValue', [_mobx.action], (0, _getOwnPropertyDescriptor2.default)(_class3.prototype, 'calcDjqCheckValue'), _class3.prototype), _descriptor9 = _applyDecoratedDescriptor(_class3.prototype, 'setCouponNum', [_mobx.action], {
1941
1980
  enumerable: true,
1942
1981
  initializer: function initializer() {
1943
- var _this17 = this;
1982
+ var _this18 = this;
1944
1983
 
1945
1984
  return function (id, couponNum, code) {
1946
- _this17.currentMode.djqs.forEach(function (ele) {
1985
+ _this18.currentMode.djqs.forEach(function (ele) {
1947
1986
  if (ele.id === id) {
1948
1987
  ele.couponCategoryEnum = couponNum;
1949
1988
  var IsEnable = ele.couponCategoryEnum === 'RIGUP' || ele.couponCategoryEnum === 'UN_MATCH' || ele.couponCategoryEnum === "PREPARING" || ele.couponCategoryEnum === 'PROMO_LIMITED' || ele.couponCategoryEnum === 'COUPON_CONFLICT' ? false : true;
@@ -1955,7 +1994,7 @@ var PayMode = exports.PayMode = (_class3 = function () {
1955
1994
  }), _descriptor10 = _applyDecoratedDescriptor(_class3.prototype, 'addDjqs', [_mobx.action], {
1956
1995
  enumerable: true,
1957
1996
  initializer: function initializer() {
1958
- var _this18 = this;
1997
+ var _this19 = this;
1959
1998
 
1960
1999
  return function (promoCouponCode, name, IsEnable, amount, doorsill, LastTS, checked, IsRepelWithPoints, UMemberID, expired, displayText, promoMethodEnum, discountPct, promoId, promoRuleId, couponCategoryEnum, id) {
1961
2000
  var djq = {
@@ -1977,13 +2016,13 @@ var PayMode = exports.PayMode = (_class3 = function () {
1977
2016
  couponCategoryEnum: couponCategoryEnum,
1978
2017
  id: id
1979
2018
  };
1980
- _this18.currentMode.djqs.push(djq);
2019
+ _this19.currentMode.djqs.push(djq);
1981
2020
  };
1982
2021
  }
1983
2022
  }), _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);
1984
2023
  var Member = exports.Member = (_class5 = function () {
1985
2024
  function Member(m) {
1986
- var _this19 = this;
2025
+ var _this20 = this;
1987
2026
 
1988
2027
  (0, _classCallCheck3.default)(this, Member);
1989
2028
 
@@ -2006,17 +2045,17 @@ var Member = exports.Member = (_class5 = function () {
2006
2045
  return key == 'canusedbalancestorage';
2007
2046
  });
2008
2047
 
2009
- var _ref23 = _mutantsUtil.platform || {},
2010
- isNewRetailBCPos = _ref23.isNewRetailBCPos;
2048
+ var _ref24 = _mutantsUtil.platform || {},
2049
+ isNewRetailBCPos = _ref24.isNewRetailBCPos;
2011
2050
 
2012
2051
  m.StorageCardNo && (this.StorageCardNo = m.StorageCardNo);
2013
2052
  m.MeStorageCardId && (this.MeStorageCardId = m.MeStorageCardId);
2014
2053
  (0, _mobx.runInAction)(function () {
2015
- _this19.cardNo = m.CardCode;
2054
+ _this20.cardNo = m.CardCode;
2016
2055
  if (index >= 0) {
2017
- _this19.balance = parseFloat(m.DynamicPropertyValues[index]);
2056
+ _this20.balance = parseFloat(m.DynamicPropertyValues[index]);
2018
2057
  } else {
2019
- _this19.balance = _this19.rawbalance;
2058
+ _this20.balance = _this20.rawbalance;
2020
2059
  }
2021
2060
  });
2022
2061
  this.needPwd = m.MemberType ? m.MemberType.IsNeedPwd : false;