tplus-components-touch 3.27.21 → 3.27.25

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.
@@ -996,7 +996,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
996
996
  }
997
997
  };
998
998
 
999
- _this2.onTabsClick2 = function (paymode, brefund, themode, key) {
999
+ _this2.onTabsClick2 = function (paymode, brefund, themode, key, bookType) {
1000
1000
  var _enumController$getEn7 = _mutantsUtil.enumController.getEnumOj(),
1001
1001
  PayStyle = _enumController$getEn7.PayStyle,
1002
1002
  Differentiate = _enumController$getEn7.Differentiate;
@@ -1025,7 +1025,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1025
1025
  })) {
1026
1026
  _message2.default.error('已使用了其他的付款码支付,不可以再使用微信了。');
1027
1027
  } else {
1028
- _this2.setCurrentFocusAndAddPay(key);
1028
+ _this2.setCurrentFocusAndAddPay(key, bookType);
1029
1029
  }
1030
1030
  break;
1031
1031
  case PayStyle.zfb:
@@ -1034,7 +1034,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1034
1034
  })) {
1035
1035
  _message2.default.error('已使用了其他的付款码支付,不可以再使用支付宝了。');
1036
1036
  } else {
1037
- _this2.setCurrentFocusAndAddPay(key);
1037
+ _this2.setCurrentFocusAndAddPay(key, bookType);
1038
1038
  }
1039
1039
  break;
1040
1040
  case PayStyle.smzf:
@@ -1043,11 +1043,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1043
1043
  })) {
1044
1044
  _message2.default.error('已使用了其他的付款码支付,不可以再使用扫码支付了。');
1045
1045
  } else {
1046
- _this2.setCurrentFocusAndAddPay(key);
1046
+ _this2.setCurrentFocusAndAddPay(key, bookType);
1047
1047
  }
1048
1048
  break;
1049
1049
  default:
1050
- _this2.setCurrentFocusAndAddPay(key);
1050
+ _this2.setCurrentFocusAndAddPay(key, bookType);
1051
1051
  break;
1052
1052
  }
1053
1053
  };
@@ -1090,7 +1090,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1090
1090
  return bdisabled;
1091
1091
  };
1092
1092
 
1093
- _this2.onTabsClick = function (key) {
1093
+ _this2.onTabsClick = function (key, bookType) {
1094
1094
  var _enumController$getEn9 = _mutantsUtil.enumController.getEnumOj(),
1095
1095
  PayStyle = _enumController$getEn9.PayStyle,
1096
1096
  Differentiate = _enumController$getEn9.Differentiate;
@@ -1120,6 +1120,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1120
1120
  return;
1121
1121
  }
1122
1122
  var themode = (0, _find3.default)(paymode.paymodes, { 'paymentType': key });
1123
+ //预订非全款不可使用零售抵现类支付方式
1124
+ if (bookType == 'bookPay' && _this2.store.paymode.isNotFullBook && themode.virtualPay) {
1125
+ return _message2.default.error("付订金时不可使用零售抵现类结算方式!");
1126
+ }
1123
1127
  if (themode.exchangeRate != 1) {
1124
1128
  var forign = (0, _find3.default)(paymode.thePaymodes, function (mode) {
1125
1129
  return mode.exchangeRate != 1 && mode.paymentType != key;
@@ -1150,17 +1154,17 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1150
1154
  that.setState({
1151
1155
  noAlreadyWarn: false
1152
1156
  });
1153
- that.onTabsClick2(paymode, brefund, themode, key);
1157
+ that.onTabsClick2(paymode, brefund, themode, key, bookType);
1154
1158
  },
1155
1159
  onCancel: function onCancel() {}
1156
- }) : that.onTabsClick2(paymode, brefund, themode, key);
1160
+ }) : that.onTabsClick2(paymode, brefund, themode, key, bookType);
1157
1161
  break;
1158
1162
  default:
1159
- _this2.onTabsClick2(paymode, brefund, themode, key);
1163
+ _this2.onTabsClick2(paymode, brefund, themode, key, bookType);
1160
1164
  break;
1161
1165
  }
1162
1166
  } else {
1163
- _this2.onTabsClick2(paymode, brefund, themode, key);
1167
+ _this2.onTabsClick2(paymode, brefund, themode, key, bookType);
1164
1168
  }
1165
1169
  };
1166
1170
 
@@ -1183,8 +1187,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1183
1187
  }
1184
1188
  };
1185
1189
 
1186
- _this2.setCurrentFocusAndAddPay = function (key) {
1187
- _this2.store.changeFocusAndAddPay(key);
1190
+ _this2.setCurrentFocusAndAddPay = function (key, bookType) {
1191
+ _this2.store.changeFocusAndAddPay(key, bookType);
1188
1192
  if (_this2.store.bquick) {
1189
1193
  _this2.handleSettle("quickPay");
1190
1194
  } else {
@@ -1192,24 +1196,28 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1192
1196
  }
1193
1197
  };
1194
1198
 
1195
- _this2.onDelPay = function (index, boriginReturn, type) {
1199
+ _this2.onDelPay = function (index, boriginReturn, type, bookType) {
1196
1200
  var _enumController$getEn12 = _mutantsUtil.enumController.getEnumOj(),
1197
1201
  PayStyle = _enumController$getEn12.PayStyle;
1198
1202
 
1199
1203
  if (boriginReturn && (type == PayStyle.hyczk || type == PayStyle.djq || type == PayStyle.jfdx)) {
1200
1204
  _message2.default.info('原单退货时,该结算方式不可以删除。');
1201
1205
  } else {
1202
- _this2.store.delPay(index);
1206
+ _this2.store.delPay(index, bookType);
1203
1207
  }
1204
1208
  };
1205
1209
 
1206
- _this2.handleChange = function (index, e) {
1210
+ _this2.handleChange = function (index, e, type) {
1207
1211
  if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(_this2.store.paymode.currentFocus)) return;
1212
+ var mode = (0, _find3.default)(_this2.store.paymode.thePaymodes, { 'paymethodId': index });
1213
+ if (type == 'bookPay' && _this2.store.paymode.isNotFullBook && mode.virtualPay) {
1214
+ return _message2.default.error("付订金时不可使用零售抵现类结算方式!");
1215
+ }
1208
1216
  var currentInput = e.target;
1209
1217
  var amountMaxLength = parseInt(_this2.props.initData["AmountMaxLength"] || 10);
1210
1218
  if (!isNaN(e.target.value) || e.target.value == '-') {
1211
1219
  if (e.target.value.length <= amountMaxLength) {
1212
- _this2.store.changeValue(index, e.target.value, false);
1220
+ _this2.store.changeValue(index, e.target.value, false, type);
1213
1221
  }
1214
1222
  }
1215
1223
  };
@@ -1265,10 +1273,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1265
1273
  _this2.store.paymode.setCurrentModeValue(value, max);
1266
1274
  };
1267
1275
 
1268
- _this2.onBlur = function (index, e) {
1276
+ _this2.onBlur = function (index, e, type) {
1269
1277
  _this2.currentInput = null;
1270
1278
  _this2.store.changeFocusOnly(-1);
1271
- _this2.store.changeValue(index, e.target.value == '-' ? 0 : e.target.value, true);
1279
+ _this2.store.changeValue(index, e.target.value == '-' ? 0 : e.target.value, true, type);
1272
1280
  };
1273
1281
 
1274
1282
  _this2.onFocus = function (index, mode, paymode, e) {
@@ -1389,7 +1397,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1389
1397
  }, 2000);
1390
1398
  };
1391
1399
 
1392
- _this2.onHotKeyClick1 = function (mode, index, boriginReturn) {
1400
+ _this2.onHotKeyClick1 = function (mode, index, boriginReturn, bookType) {
1401
+ if (bookType == 'bookPay' && _this2.store.paymode.isNotFullBook && mode.virtualPay) {
1402
+ return _message2.default.error("付订金时不可使用零售抵现类结算方式!");
1403
+ }
1393
1404
  if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType)) return false;
1394
1405
  if (_this2.hotkeydebouncedPayMode == mode) {
1395
1406
  return;
@@ -1429,11 +1440,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
1429
1440
  }
1430
1441
  };
1431
1442
 
1432
- _this2.onHotKeyClick2 = function (index, mode, paymode, e) {
1443
+ _this2.onHotKeyClick2 = function (index, mode, paymode, e, bookType) {
1433
1444
  if (!_mutantsMicrofx.stores.offlineSys.shouldSettlement(mode.paymentType)) return false;
1434
1445
  if (_this2.hotkeydebouncedPayMode == mode) {
1435
1446
  return;
1436
1447
  }
1448
+ if (bookType == 'bookPay' && _this2.store.paymode.isNotFullBook && mode.virtualPay) {
1449
+ return _message2.default.error("付订金时不可使用零售抵现类结算方式!");
1450
+ }
1437
1451
  _this2.store.changeClickFocusOnly(mode.paymentType);
1438
1452
  _this2.setCurrentFocusOnly(mode.paymentType);
1439
1453
  if (_this2.hotkeydebounced) {
@@ -2971,7 +2985,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
2971
2985
  settleDisabled: false
2972
2986
  });
2973
2987
  that.store.bquick && that.props.onCancelSettle && that.props.onCancelSettle();
2974
- that.store.delPay(paymode.paymethodId);
2988
+ that.store.delPay(paymode.paymethodId, !isQuickPay ? 'bookPay' : '');
2975
2989
  reject('\u652F\u4ED8\u65B9\u5F0F: ' + paymode.name + '\u5931\u8D25');
2976
2990
  } },
2977
2991
  '\u53D6\u6D88'
@@ -3001,7 +3015,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3001
3015
  modal.destroy();
3002
3016
  setTimeout(function () {
3003
3017
  if (paymode.paymentType == PayStyle.xianjin) {
3004
- that.store.changeValue(paymode.paymethodId, v, false, true);
3018
+ that.store.changeValue(paymode.paymethodId, v, false, 'bookPay');
3005
3019
  } else {
3006
3020
  paymode.authCode = v;
3007
3021
  }
@@ -3140,6 +3154,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3140
3154
  var CarouselTp = CarouseOut || _carousel2.default;
3141
3155
  var newParams = CarouseOut ? {} : params;
3142
3156
  var mapList = [];
3157
+ var type = _this2.props.type;
3158
+
3143
3159
  paymodes.forEach(function (item, index) {
3144
3160
  // 整除则新增轮播页面
3145
3161
  if (index % carouselStart === 0) {
@@ -3155,7 +3171,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3155
3171
  'div',
3156
3172
  null,
3157
3173
  (0, _map3.default)(modeList, function (mode, modeIndex) {
3158
- return _this2.renderToolbtn(mode, index * carouselStart + modeIndex);
3174
+ return _this2.renderToolbtn(mode, index * carouselStart + modeIndex, type !== 1 ? 'bookPay' : '');
3159
3175
  })
3160
3176
  );
3161
3177
  })
@@ -3433,7 +3449,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3433
3449
  }
3434
3450
  }, {
3435
3451
  key: 'renderToolbtn',
3436
- value: function renderToolbtn(mode, index) {
3452
+ value: function renderToolbtn(mode, index, bookType) {
3437
3453
  var _this7 = this;
3438
3454
 
3439
3455
  var _enumController$getEn31 = _mutantsUtil.enumController.getEnumOj(),
@@ -3471,7 +3487,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3471
3487
  return _react2.default.createElement(
3472
3488
  'div',
3473
3489
  { key: index + "", className: paymodeDisabled + ' ' + paymodeSelected + ' paymode hotkey_' + this.compoundHotkeysList[hotkeyIndex], onClick: function onClick() {
3474
- _this7.onTabsClick(mode.paymentType);
3490
+ _this7.onTabsClick(mode.paymentType, bookType);
3475
3491
  } },
3476
3492
  _react2.default.createElement(
3477
3493
  'div',
@@ -3802,7 +3818,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3802
3818
  'div',
3803
3819
  null,
3804
3820
  (0, _map3.default)(paymodes, function (mode, index) {
3805
- return _this8.renderToolbtn(mode, index);
3821
+ return _this8.renderToolbtn(mode, index, 'bookPay');
3806
3822
  })
3807
3823
  ),
3808
3824
  paymodes.length > carouselStart && this.paymodesCarouselList(params, paymodes, carouselStart)
@@ -3831,7 +3847,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3831
3847
  _react2.default.createElement(
3832
3848
  'div',
3833
3849
  { className: 'lefticon primary-color', onClick: function onClick() {
3834
- _this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
3850
+ _this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType, 'bookPay');
3835
3851
  } },
3836
3852
  _react2.default.createElement(_ticon2.default, { type: 'jianqu', className: 'minus' })
3837
3853
  ),
@@ -3854,13 +3870,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
3854
3870
  return _this8.onHotKeyClick2(index, mode, paymode, e);
3855
3871
  },
3856
3872
  onBlur: function onBlur(e) {
3857
- return _this8.onBlur(index, e);
3873
+ return _this8.onBlur(index, e, 'bookPay');
3858
3874
  },
3859
3875
  onFocus: function onFocus(e) {
3860
3876
  return _this8.onFocusHack(index, mode, paymode, e);
3861
3877
  },
3862
3878
  onChange: function onChange(e) {
3863
- return _this8.handleChange(index, e);
3879
+ return _this8.handleChange(index, e, 'bookPay');
3864
3880
  }
3865
3881
  })
3866
3882
  ),
@@ -4138,6 +4154,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4138
4154
  { className: 'received' },
4139
4155
  (0, _utils.getFixedNumber)(Math.abs(paymode.receivable))
4140
4156
  )
4157
+ ),
4158
+ _react2.default.createElement(
4159
+ 'div',
4160
+ { className: 'receivable', style: { display: (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && BuyerPayFreight && BuyerPayFreight > 0 ? 'block' : 'none' } },
4161
+ _react2.default.createElement(
4162
+ 'span',
4163
+ null,
4164
+ '\u8FD0\u8D39'
4165
+ ),
4166
+ _react2.default.createElement(
4167
+ 'span',
4168
+ { className: 'received' },
4169
+ (0, _utils.getFixedNumber)(Math.abs(BuyerPayFreight))
4170
+ )
4141
4171
  )
4142
4172
  ),
4143
4173
  !isReturn && _react2.default.createElement(
@@ -4220,7 +4250,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4220
4250
  // }
4221
4251
  // }
4222
4252
  // mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
4223
- _this8.onHotKeyClick1(mode, index, boriginReturn);
4253
+ _this8.onHotKeyClick1(mode, index, boriginReturn, 'bookPay');
4224
4254
  },
4225
4255
  value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
4226
4256
  return tm.paymentType == PayStyle.hyczk;
@@ -4231,16 +4261,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
4231
4261
  disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn) || _this8.checkScanDisabled(mode.paymentType),
4232
4262
  value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
4233
4263
  onClick: function onClick(e) {
4234
- return _this8.onHotKeyClick2(index, mode, paymode, e);
4264
+ return _this8.onHotKeyClick2(index, mode, paymode, e, 'bookPay');
4235
4265
  },
4236
4266
  onBlur: function onBlur(e) {
4237
- return _this8.onBlur(index, e);
4267
+ return _this8.onBlur(index, e, 'bookPay');
4238
4268
  },
4239
4269
  onFocus: function onFocus(e) {
4240
4270
  return _this8.onFocusHack(index, mode, paymode, e);
4241
4271
  },
4242
4272
  onChange: function onChange(e) {
4243
- return _this8.handleChange(index, e);
4273
+ return _this8.handleChange(index, e, 'bookPay');
4244
4274
  }
4245
4275
  })
4246
4276
  )