tplus-components-touch 3.33.5 → 3.35.1
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.
- package/dist/components/modalWraper/index.js +1 -1
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/settlement/settlement.js +244 -299
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +1 -22
- package/dist/components/settlement/settlementStore.js +272 -391
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo.css +539 -539
- package/package.json +35 -35
|
@@ -365,7 +365,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
365
365
|
isReturn = _this2$props.isReturn,
|
|
366
366
|
type = _this2$props.type;
|
|
367
367
|
|
|
368
|
-
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate(
|
|
368
|
+
_promise2.default.resolve(!_this2.props.onValidate || _this2.props.onValidate()).then(function (result) {
|
|
369
369
|
if (result) {
|
|
370
370
|
_this2.setState({
|
|
371
371
|
settleDisabled: false
|
|
@@ -1942,147 +1942,96 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1942
1942
|
};
|
|
1943
1943
|
|
|
1944
1944
|
_this2.handleSettle = function () {
|
|
1945
|
-
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1945
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
|
|
1946
1946
|
var handleUserInputs = function () {
|
|
1947
|
-
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1948
|
-
var
|
|
1949
|
-
|
|
1950
|
-
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result, currentZeroTime, voucherDateTime;
|
|
1947
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
|
|
1948
|
+
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
|
1951
1949
|
|
|
1952
|
-
return _regenerator2.default.wrap(function
|
|
1950
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1953
1951
|
while (1) {
|
|
1954
|
-
switch (
|
|
1952
|
+
switch (_context10.prev = _context10.next) {
|
|
1955
1953
|
case 0:
|
|
1956
1954
|
results = [];
|
|
1957
|
-
|
|
1955
|
+
_context10.prev = 1;
|
|
1958
1956
|
_iteratorNormalCompletion = true;
|
|
1959
1957
|
_didIteratorError = false;
|
|
1960
1958
|
_iteratorError = undefined;
|
|
1961
|
-
|
|
1959
|
+
_context10.prev = 5;
|
|
1962
1960
|
_iterator = (0, _getIterator3.default)(promises);
|
|
1963
1961
|
|
|
1964
1962
|
case 7:
|
|
1965
1963
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
|
1966
|
-
|
|
1964
|
+
_context10.next = 16;
|
|
1967
1965
|
break;
|
|
1968
1966
|
}
|
|
1969
1967
|
|
|
1970
1968
|
p = _step.value;
|
|
1971
|
-
|
|
1969
|
+
_context10.next = 11;
|
|
1972
1970
|
return p;
|
|
1973
1971
|
|
|
1974
1972
|
case 11:
|
|
1975
|
-
_result =
|
|
1973
|
+
_result = _context10.sent;
|
|
1976
1974
|
|
|
1977
1975
|
results.push(_result);
|
|
1978
1976
|
|
|
1979
1977
|
case 13:
|
|
1980
1978
|
_iteratorNormalCompletion = true;
|
|
1981
|
-
|
|
1979
|
+
_context10.next = 7;
|
|
1982
1980
|
break;
|
|
1983
1981
|
|
|
1984
1982
|
case 16:
|
|
1985
|
-
|
|
1983
|
+
_context10.next = 22;
|
|
1986
1984
|
break;
|
|
1987
1985
|
|
|
1988
1986
|
case 18:
|
|
1989
|
-
|
|
1990
|
-
|
|
1987
|
+
_context10.prev = 18;
|
|
1988
|
+
_context10.t0 = _context10['catch'](5);
|
|
1991
1989
|
_didIteratorError = true;
|
|
1992
|
-
_iteratorError =
|
|
1990
|
+
_iteratorError = _context10.t0;
|
|
1993
1991
|
|
|
1994
1992
|
case 22:
|
|
1995
|
-
|
|
1996
|
-
|
|
1993
|
+
_context10.prev = 22;
|
|
1994
|
+
_context10.prev = 23;
|
|
1997
1995
|
|
|
1998
1996
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
1999
1997
|
_iterator.return();
|
|
2000
1998
|
}
|
|
2001
1999
|
|
|
2002
2000
|
case 25:
|
|
2003
|
-
|
|
2001
|
+
_context10.prev = 25;
|
|
2004
2002
|
|
|
2005
2003
|
if (!_didIteratorError) {
|
|
2006
|
-
|
|
2004
|
+
_context10.next = 28;
|
|
2007
2005
|
break;
|
|
2008
2006
|
}
|
|
2009
2007
|
|
|
2010
2008
|
throw _iteratorError;
|
|
2011
2009
|
|
|
2012
2010
|
case 28:
|
|
2013
|
-
return
|
|
2011
|
+
return _context10.finish(25);
|
|
2014
2012
|
|
|
2015
2013
|
case 29:
|
|
2016
|
-
return
|
|
2014
|
+
return _context10.finish(22);
|
|
2017
2015
|
|
|
2018
2016
|
case 30:
|
|
2019
2017
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
|
2020
|
-
|
|
2021
|
-
voucherDateTime = new Date(VoucherDate).getTime();
|
|
2022
|
-
// let isUpdate1 = await isUpdateDate && isUpdateDate();
|
|
2023
|
-
|
|
2024
|
-
if (!isUpdateDate) {
|
|
2025
|
-
_context11.next = 37;
|
|
2026
|
-
break;
|
|
2027
|
-
}
|
|
2028
|
-
|
|
2029
|
-
isUpdateDate(function () {
|
|
2030
|
-
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(result1) {
|
|
2031
|
-
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
2032
|
-
while (1) {
|
|
2033
|
-
switch (_context10.prev = _context10.next) {
|
|
2034
|
-
case 0:
|
|
2035
|
-
if (!result1) {
|
|
2036
|
-
if (voucherDateTime < currentZeroTime) {
|
|
2037
|
-
_this5.store.setVoucherDate();
|
|
2038
|
-
}
|
|
2039
|
-
}
|
|
2040
|
-
_context10.next = 3;
|
|
2041
|
-
return commit(results);
|
|
2042
|
-
|
|
2043
|
-
case 3:
|
|
2044
|
-
case 'end':
|
|
2045
|
-
return _context10.stop();
|
|
2046
|
-
}
|
|
2047
|
-
}
|
|
2048
|
-
}, _callee10, _this5);
|
|
2049
|
-
}));
|
|
2050
|
-
|
|
2051
|
-
return function (_x7) {
|
|
2052
|
-
return _ref20.apply(this, arguments);
|
|
2053
|
-
};
|
|
2054
|
-
}());
|
|
2055
|
-
_context11.next = 43;
|
|
2056
|
-
break;
|
|
2057
|
-
|
|
2058
|
-
case 37:
|
|
2059
|
-
if (!(voucherDateTime < currentZeroTime)) {
|
|
2060
|
-
_context11.next = 41;
|
|
2061
|
-
break;
|
|
2062
|
-
}
|
|
2063
|
-
|
|
2064
|
-
this.store.setVoucherDate();
|
|
2065
|
-
_context11.next = 41;
|
|
2018
|
+
_context10.next = 33;
|
|
2066
2019
|
return commit(results);
|
|
2067
2020
|
|
|
2068
|
-
case
|
|
2069
|
-
|
|
2070
|
-
return commit(results);
|
|
2071
|
-
|
|
2072
|
-
case 43:
|
|
2073
|
-
_context11.next = 47;
|
|
2021
|
+
case 33:
|
|
2022
|
+
_context10.next = 37;
|
|
2074
2023
|
break;
|
|
2075
2024
|
|
|
2076
|
-
case
|
|
2077
|
-
|
|
2078
|
-
|
|
2025
|
+
case 35:
|
|
2026
|
+
_context10.prev = 35;
|
|
2027
|
+
_context10.t1 = _context10['catch'](1);
|
|
2079
2028
|
|
|
2080
|
-
case
|
|
2029
|
+
case 37:
|
|
2081
2030
|
case 'end':
|
|
2082
|
-
return
|
|
2031
|
+
return _context10.stop();
|
|
2083
2032
|
}
|
|
2084
2033
|
}
|
|
2085
|
-
},
|
|
2034
|
+
}, _callee10, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
2086
2035
|
}));
|
|
2087
2036
|
|
|
2088
2037
|
return function handleUserInputs(_x6) {
|
|
@@ -2090,11 +2039,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2090
2039
|
};
|
|
2091
2040
|
}();
|
|
2092
2041
|
|
|
2093
|
-
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit
|
|
2042
|
+
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
2094
2043
|
|
|
2095
|
-
return _regenerator2.default.wrap(function
|
|
2044
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
2096
2045
|
while (1) {
|
|
2097
|
-
switch (
|
|
2046
|
+
switch (_context11.prev = _context11.next) {
|
|
2098
2047
|
case 0:
|
|
2099
2048
|
_this2.setState({
|
|
2100
2049
|
settleDisabled: true
|
|
@@ -2126,7 +2075,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2126
2075
|
});
|
|
2127
2076
|
|
|
2128
2077
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
|
2129
|
-
|
|
2078
|
+
_context11.next = 13;
|
|
2130
2079
|
break;
|
|
2131
2080
|
}
|
|
2132
2081
|
|
|
@@ -2134,11 +2083,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2134
2083
|
_this2.setState({
|
|
2135
2084
|
settleDisabled: false
|
|
2136
2085
|
});
|
|
2137
|
-
return
|
|
2086
|
+
return _context11.abrupt('return');
|
|
2138
2087
|
|
|
2139
2088
|
case 13:
|
|
2140
2089
|
if (!(args !== "zero" && !newStyle)) {
|
|
2141
|
-
|
|
2090
|
+
_context11.next = 19;
|
|
2142
2091
|
break;
|
|
2143
2092
|
}
|
|
2144
2093
|
|
|
@@ -2147,7 +2096,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2147
2096
|
});
|
|
2148
2097
|
|
|
2149
2098
|
if (!zeromode) {
|
|
2150
|
-
|
|
2099
|
+
_context11.next = 19;
|
|
2151
2100
|
break;
|
|
2152
2101
|
}
|
|
2153
2102
|
|
|
@@ -2155,7 +2104,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2155
2104
|
settleDisabled: false
|
|
2156
2105
|
});
|
|
2157
2106
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
|
2158
|
-
return
|
|
2107
|
+
return _context11.abrupt('return');
|
|
2159
2108
|
|
|
2160
2109
|
case 19:
|
|
2161
2110
|
promises = [];
|
|
@@ -2164,14 +2113,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2164
2113
|
}) : paymode.thePaymodes, 'orderBy');
|
|
2165
2114
|
|
|
2166
2115
|
if (!isQuickPay) {
|
|
2167
|
-
|
|
2116
|
+
_context11.next = 27;
|
|
2168
2117
|
break;
|
|
2169
2118
|
}
|
|
2170
2119
|
|
|
2171
2120
|
quickmode = thePaymodes[0];
|
|
2172
2121
|
|
|
2173
2122
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
|
2174
|
-
|
|
2123
|
+
_context11.next = 27;
|
|
2175
2124
|
break;
|
|
2176
2125
|
}
|
|
2177
2126
|
|
|
@@ -2179,7 +2128,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2179
2128
|
settleDisabled: false
|
|
2180
2129
|
});
|
|
2181
2130
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
|
2182
|
-
return
|
|
2131
|
+
return _context11.abrupt('return');
|
|
2183
2132
|
|
|
2184
2133
|
case 27:
|
|
2185
2134
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
|
@@ -2267,18 +2216,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2267
2216
|
};
|
|
2268
2217
|
}();
|
|
2269
2218
|
|
|
2270
|
-
_this2$props3 = _this2.props, isUpdateDate = _this2$props3.isUpdateDate, type = _this2$props3.type;
|
|
2271
|
-
VoucherDate = _this2.store.dto.VoucherDate;
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
2219
|
handleUserInputs(promises);
|
|
2275
2220
|
|
|
2276
|
-
case
|
|
2221
|
+
case 30:
|
|
2277
2222
|
case 'end':
|
|
2278
|
-
return
|
|
2223
|
+
return _context11.stop();
|
|
2279
2224
|
}
|
|
2280
2225
|
}
|
|
2281
|
-
},
|
|
2226
|
+
}, _callee11, _this3);
|
|
2282
2227
|
}));
|
|
2283
2228
|
|
|
2284
2229
|
return function (_x4) {
|
|
@@ -2286,91 +2231,91 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2286
2231
|
};
|
|
2287
2232
|
}();
|
|
2288
2233
|
|
|
2289
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
2234
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
|
2290
2235
|
var handleUserInputs = function () {
|
|
2291
|
-
var
|
|
2236
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
|
|
2292
2237
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
|
2293
2238
|
|
|
2294
|
-
return _regenerator2.default.wrap(function
|
|
2239
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
2295
2240
|
while (1) {
|
|
2296
|
-
switch (
|
|
2241
|
+
switch (_context13.prev = _context13.next) {
|
|
2297
2242
|
case 0:
|
|
2298
2243
|
results = [];
|
|
2299
|
-
|
|
2244
|
+
_context13.prev = 1;
|
|
2300
2245
|
_iteratorNormalCompletion2 = true;
|
|
2301
2246
|
_didIteratorError2 = false;
|
|
2302
2247
|
_iteratorError2 = undefined;
|
|
2303
|
-
|
|
2248
|
+
_context13.prev = 5;
|
|
2304
2249
|
_iterator2 = (0, _getIterator3.default)(promises);
|
|
2305
2250
|
|
|
2306
2251
|
case 7:
|
|
2307
2252
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
|
2308
|
-
|
|
2253
|
+
_context13.next = 16;
|
|
2309
2254
|
break;
|
|
2310
2255
|
}
|
|
2311
2256
|
|
|
2312
2257
|
p = _step2.value;
|
|
2313
|
-
|
|
2258
|
+
_context13.next = 11;
|
|
2314
2259
|
return p;
|
|
2315
2260
|
|
|
2316
2261
|
case 11:
|
|
2317
|
-
_result2 =
|
|
2262
|
+
_result2 = _context13.sent;
|
|
2318
2263
|
|
|
2319
2264
|
results.push(_result2);
|
|
2320
2265
|
|
|
2321
2266
|
case 13:
|
|
2322
2267
|
_iteratorNormalCompletion2 = true;
|
|
2323
|
-
|
|
2268
|
+
_context13.next = 7;
|
|
2324
2269
|
break;
|
|
2325
2270
|
|
|
2326
2271
|
case 16:
|
|
2327
|
-
|
|
2272
|
+
_context13.next = 22;
|
|
2328
2273
|
break;
|
|
2329
2274
|
|
|
2330
2275
|
case 18:
|
|
2331
|
-
|
|
2332
|
-
|
|
2276
|
+
_context13.prev = 18;
|
|
2277
|
+
_context13.t0 = _context13['catch'](5);
|
|
2333
2278
|
_didIteratorError2 = true;
|
|
2334
|
-
_iteratorError2 =
|
|
2279
|
+
_iteratorError2 = _context13.t0;
|
|
2335
2280
|
|
|
2336
2281
|
case 22:
|
|
2337
|
-
|
|
2338
|
-
|
|
2282
|
+
_context13.prev = 22;
|
|
2283
|
+
_context13.prev = 23;
|
|
2339
2284
|
|
|
2340
2285
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
2341
2286
|
_iterator2.return();
|
|
2342
2287
|
}
|
|
2343
2288
|
|
|
2344
2289
|
case 25:
|
|
2345
|
-
|
|
2290
|
+
_context13.prev = 25;
|
|
2346
2291
|
|
|
2347
2292
|
if (!_didIteratorError2) {
|
|
2348
|
-
|
|
2293
|
+
_context13.next = 28;
|
|
2349
2294
|
break;
|
|
2350
2295
|
}
|
|
2351
2296
|
|
|
2352
2297
|
throw _iteratorError2;
|
|
2353
2298
|
|
|
2354
2299
|
case 28:
|
|
2355
|
-
return
|
|
2300
|
+
return _context13.finish(25);
|
|
2356
2301
|
|
|
2357
2302
|
case 29:
|
|
2358
|
-
return
|
|
2303
|
+
return _context13.finish(22);
|
|
2359
2304
|
|
|
2360
2305
|
case 30:
|
|
2361
|
-
|
|
2306
|
+
_context13.next = 32;
|
|
2362
2307
|
return commit(results);
|
|
2363
2308
|
|
|
2364
2309
|
case 32:
|
|
2365
|
-
|
|
2310
|
+
_context13.next = 37;
|
|
2366
2311
|
break;
|
|
2367
2312
|
|
|
2368
2313
|
case 34:
|
|
2369
|
-
|
|
2370
|
-
|
|
2314
|
+
_context13.prev = 34;
|
|
2315
|
+
_context13.t1 = _context13['catch'](1);
|
|
2371
2316
|
|
|
2372
|
-
if (
|
|
2373
|
-
_message2.default.error(
|
|
2317
|
+
if (_context13.t1 != "cancelpwd") {
|
|
2318
|
+
_message2.default.error(_context13.t1);
|
|
2374
2319
|
setTimeout(function () {
|
|
2375
2320
|
that.handleCzk();
|
|
2376
2321
|
}, 500);
|
|
@@ -2378,27 +2323,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2378
2323
|
|
|
2379
2324
|
case 37:
|
|
2380
2325
|
case 'end':
|
|
2381
|
-
return
|
|
2326
|
+
return _context13.stop();
|
|
2382
2327
|
}
|
|
2383
2328
|
}
|
|
2384
|
-
},
|
|
2329
|
+
}, _callee13, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
2385
2330
|
}));
|
|
2386
2331
|
|
|
2387
|
-
return function handleUserInputs(
|
|
2388
|
-
return
|
|
2332
|
+
return function handleUserInputs(_x8) {
|
|
2333
|
+
return _ref23.apply(this, arguments);
|
|
2389
2334
|
};
|
|
2390
2335
|
}();
|
|
2391
2336
|
|
|
2392
|
-
var that, curmode, promises,
|
|
2337
|
+
var that, curmode, promises, _ref21, isNewRetailBCPos, _enumController$getEn22, PayStyle, commit;
|
|
2393
2338
|
|
|
2394
|
-
return _regenerator2.default.wrap(function
|
|
2339
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
2395
2340
|
while (1) {
|
|
2396
|
-
switch (
|
|
2341
|
+
switch (_context14.prev = _context14.next) {
|
|
2397
2342
|
case 0:
|
|
2398
2343
|
that = _this2;
|
|
2399
2344
|
curmode = _this2.store.paymode.currentMode;
|
|
2400
2345
|
promises = [];
|
|
2401
|
-
|
|
2346
|
+
_ref21 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref21.isNewRetailBCPos;
|
|
2402
2347
|
|
|
2403
2348
|
if (isNewRetailBCPos) {
|
|
2404
2349
|
if (curmode.value > 0) {
|
|
@@ -2419,33 +2364,33 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2419
2364
|
}
|
|
2420
2365
|
|
|
2421
2366
|
commit = function () {
|
|
2422
|
-
var
|
|
2367
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
|
|
2423
2368
|
var result;
|
|
2424
|
-
return _regenerator2.default.wrap(function
|
|
2369
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
2425
2370
|
while (1) {
|
|
2426
|
-
switch (
|
|
2371
|
+
switch (_context12.prev = _context12.next) {
|
|
2427
2372
|
case 0:
|
|
2428
2373
|
if (!(values.length > 0)) {
|
|
2429
|
-
|
|
2374
|
+
_context12.next = 6;
|
|
2430
2375
|
break;
|
|
2431
2376
|
}
|
|
2432
2377
|
|
|
2433
|
-
|
|
2378
|
+
_context12.next = 3;
|
|
2434
2379
|
return that.store.validePwd(values[0]);
|
|
2435
2380
|
|
|
2436
2381
|
case 3:
|
|
2437
|
-
|
|
2438
|
-
|
|
2382
|
+
_context12.t0 = _context12.sent;
|
|
2383
|
+
_context12.next = 7;
|
|
2439
2384
|
break;
|
|
2440
2385
|
|
|
2441
2386
|
case 6:
|
|
2442
|
-
|
|
2387
|
+
_context12.t0 = "";
|
|
2443
2388
|
|
|
2444
2389
|
case 7:
|
|
2445
|
-
result =
|
|
2390
|
+
result = _context12.t0;
|
|
2446
2391
|
|
|
2447
2392
|
if (!(result == "")) {
|
|
2448
|
-
|
|
2393
|
+
_context12.next = 13;
|
|
2449
2394
|
break;
|
|
2450
2395
|
}
|
|
2451
2396
|
|
|
@@ -2453,23 +2398,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2453
2398
|
//返回
|
|
2454
2399
|
that.setCurrentFocusAndAddPay(curmode.paymentType, curmode.paymethodId);
|
|
2455
2400
|
_promise2.default.resolve();
|
|
2456
|
-
|
|
2401
|
+
_context12.next = 15;
|
|
2457
2402
|
break;
|
|
2458
2403
|
|
|
2459
2404
|
case 13:
|
|
2460
|
-
|
|
2405
|
+
_context12.next = 15;
|
|
2461
2406
|
return _promise2.default.reject(result);
|
|
2462
2407
|
|
|
2463
2408
|
case 15:
|
|
2464
2409
|
case 'end':
|
|
2465
|
-
return
|
|
2410
|
+
return _context12.stop();
|
|
2466
2411
|
}
|
|
2467
2412
|
}
|
|
2468
|
-
},
|
|
2413
|
+
}, _callee12, _this3);
|
|
2469
2414
|
}));
|
|
2470
2415
|
|
|
2471
|
-
return function commit(
|
|
2472
|
-
return
|
|
2416
|
+
return function commit(_x7) {
|
|
2417
|
+
return _ref22.apply(this, arguments);
|
|
2473
2418
|
};
|
|
2474
2419
|
}();
|
|
2475
2420
|
|
|
@@ -2477,10 +2422,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2477
2422
|
|
|
2478
2423
|
case 7:
|
|
2479
2424
|
case 'end':
|
|
2480
|
-
return
|
|
2425
|
+
return _context14.stop();
|
|
2481
2426
|
}
|
|
2482
2427
|
}
|
|
2483
|
-
},
|
|
2428
|
+
}, _callee14, _this3);
|
|
2484
2429
|
}));
|
|
2485
2430
|
|
|
2486
2431
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
|
@@ -2520,15 +2465,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2520
2465
|
};
|
|
2521
2466
|
|
|
2522
2467
|
_this2.inputPwd = function () {
|
|
2523
|
-
var
|
|
2468
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
|
|
2524
2469
|
var that, confirmPwd;
|
|
2525
|
-
return _regenerator2.default.wrap(function
|
|
2470
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
|
2526
2471
|
while (1) {
|
|
2527
|
-
switch (
|
|
2472
|
+
switch (_context15.prev = _context15.next) {
|
|
2528
2473
|
case 0:
|
|
2529
2474
|
that = _this2;
|
|
2530
2475
|
confirmPwd = _this2.state.confirmPwd;
|
|
2531
|
-
return
|
|
2476
|
+
return _context15.abrupt('return', new _promise2.default(function (resolve, reject) {
|
|
2532
2477
|
var modal = (0, _asyncModal2.default)({
|
|
2533
2478
|
onPressEnter: function onPressEnter() {
|
|
2534
2479
|
_keyboard2.default.close();
|
|
@@ -2536,8 +2481,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2536
2481
|
// if (v !== '') {
|
|
2537
2482
|
modal.destroy();
|
|
2538
2483
|
|
|
2539
|
-
var
|
|
2540
|
-
confirmPwd =
|
|
2484
|
+
var _ref25 = that.state || {},
|
|
2485
|
+
confirmPwd = _ref25.confirmPwd;
|
|
2541
2486
|
|
|
2542
2487
|
setTimeout(function () {
|
|
2543
2488
|
paymode.authCode = v;
|
|
@@ -2627,8 +2572,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2627
2572
|
type: 'primary', size: 'large', onClick: function onClick() {
|
|
2628
2573
|
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
|
2629
2574
|
|
|
2630
|
-
var
|
|
2631
|
-
confirmPwd =
|
|
2575
|
+
var _ref26 = that.state || {},
|
|
2576
|
+
confirmPwd = _ref26.confirmPwd;
|
|
2632
2577
|
// if (v !== '') {
|
|
2633
2578
|
|
|
2634
2579
|
|
|
@@ -2662,14 +2607,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2662
2607
|
|
|
2663
2608
|
case 3:
|
|
2664
2609
|
case 'end':
|
|
2665
|
-
return
|
|
2610
|
+
return _context15.stop();
|
|
2666
2611
|
}
|
|
2667
2612
|
}
|
|
2668
|
-
},
|
|
2613
|
+
}, _callee15, _this3);
|
|
2669
2614
|
}));
|
|
2670
2615
|
|
|
2671
|
-
return function (
|
|
2672
|
-
return
|
|
2616
|
+
return function (_x9) {
|
|
2617
|
+
return _ref24.apply(this, arguments);
|
|
2673
2618
|
};
|
|
2674
2619
|
}();
|
|
2675
2620
|
|
|
@@ -2723,8 +2668,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2723
2668
|
|
|
2724
2669
|
_this2.onCzkChange = function (v) {
|
|
2725
2670
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
|
2726
|
-
var
|
|
2727
|
-
isNewRetailBCPos =
|
|
2671
|
+
var _ref27 = _mutantsUtil.platform || {},
|
|
2672
|
+
isNewRetailBCPos = _ref27.isNewRetailBCPos;
|
|
2728
2673
|
|
|
2729
2674
|
if (!isNewRetailBCPos) {
|
|
2730
2675
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
|
@@ -2856,9 +2801,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2856
2801
|
var that = _this2;
|
|
2857
2802
|
var isStoredValueCard = false;
|
|
2858
2803
|
var discountPrototypeTotalAmount = _this2.state.discountPrototypeTotalAmount;
|
|
2859
|
-
var _this2$
|
|
2860
|
-
isReturn = _this2$
|
|
2861
|
-
type = _this2$
|
|
2804
|
+
var _this2$props3 = _this2.props,
|
|
2805
|
+
isReturn = _this2$props3.isReturn,
|
|
2806
|
+
type = _this2$props3.type;
|
|
2862
2807
|
|
|
2863
2808
|
var isManualIntoAmount = void 0;
|
|
2864
2809
|
// 付款弹窗
|
|
@@ -3305,19 +3250,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3305
3250
|
|
|
3306
3251
|
_this2.hasElectron = hasElectron;
|
|
3307
3252
|
|
|
3308
|
-
var
|
|
3309
|
-
MemberMeStorageCardInputByKeyBoard =
|
|
3310
|
-
ICCardServer =
|
|
3311
|
-
ICCardPassword =
|
|
3253
|
+
var _ref28 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
|
3254
|
+
MemberMeStorageCardInputByKeyBoard = _ref28.MemberMeStorageCardInputByKeyBoard,
|
|
3255
|
+
ICCardServer = _ref28.ICCardServer,
|
|
3256
|
+
ICCardPassword = _ref28.ICCardPassword;
|
|
3312
3257
|
|
|
3313
3258
|
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
|
3314
3259
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3315
3260
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
|
3316
3261
|
//移动端环境下,没有读取IC卡的方式。
|
|
3317
3262
|
|
|
3318
|
-
var
|
|
3319
|
-
isHorizontalPad =
|
|
3320
|
-
isHorizontalSunMi =
|
|
3263
|
+
var _ref29 = _mutantsUtil.platform || {},
|
|
3264
|
+
isHorizontalPad = _ref29.isHorizontalPad,
|
|
3265
|
+
isHorizontalSunMi = _ref29.isHorizontalSunMi;
|
|
3321
3266
|
|
|
3322
3267
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
|
3323
3268
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
|
@@ -3363,7 +3308,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3363
3308
|
|
|
3364
3309
|
//IC卡连接
|
|
3365
3310
|
value: function connectRfCard() {
|
|
3366
|
-
var
|
|
3311
|
+
var _this5 = this;
|
|
3367
3312
|
|
|
3368
3313
|
//客户端环境下,并开启了启用IC卡。
|
|
3369
3314
|
if (this.hasElectron === true && this.iCCardServer === 1) {
|
|
@@ -3374,7 +3319,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3374
3319
|
} else {
|
|
3375
3320
|
result = { connectCardStatus: true, connectCardError: '' };
|
|
3376
3321
|
}
|
|
3377
|
-
|
|
3322
|
+
_this5.setState(result);
|
|
3378
3323
|
});
|
|
3379
3324
|
}
|
|
3380
3325
|
}
|
|
@@ -3383,7 +3328,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3383
3328
|
}, {
|
|
3384
3329
|
key: 'readRfCard',
|
|
3385
3330
|
value: function readRfCard() {
|
|
3386
|
-
var
|
|
3331
|
+
var _this6 = this;
|
|
3387
3332
|
|
|
3388
3333
|
//客户端环境下,并开启了启用IC卡。
|
|
3389
3334
|
if (this.hasElectron === true && this.iCCardServer === 1) {
|
|
@@ -3400,15 +3345,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3400
3345
|
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ReadRfCard', (0, _extends3.default)({}, params), function (ret) {
|
|
3401
3346
|
if (ret.status === 0) {
|
|
3402
3347
|
_message2.default.error(ret.value);
|
|
3403
|
-
|
|
3348
|
+
_this6.connectRfCard(); //读取失败后,重新连接一下。
|
|
3404
3349
|
return;
|
|
3405
3350
|
} else if (ret.status === 1) {
|
|
3406
3351
|
// this.searchMember(ret.value);
|
|
3407
3352
|
// this.czkInput.input["value"]=ret.value;
|
|
3408
|
-
|
|
3353
|
+
_this6.setState({
|
|
3409
3354
|
czkValue: ret.value
|
|
3410
3355
|
});
|
|
3411
|
-
|
|
3356
|
+
_this6.loadCzk(ret.value);
|
|
3412
3357
|
}
|
|
3413
3358
|
});
|
|
3414
3359
|
}
|
|
@@ -3466,7 +3411,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3466
3411
|
}, {
|
|
3467
3412
|
key: 'renderToolbtn',
|
|
3468
3413
|
value: function renderToolbtn(mode, index) {
|
|
3469
|
-
var
|
|
3414
|
+
var _this7 = this;
|
|
3470
3415
|
|
|
3471
3416
|
var _enumController$getEn32 = _mutantsUtil.enumController.getEnumOj(),
|
|
3472
3417
|
PayIcon = _enumController$getEn32.PayIcon,
|
|
@@ -3503,7 +3448,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3503
3448
|
return _react2.default.createElement(
|
|
3504
3449
|
'div',
|
|
3505
3450
|
{ key: index + "", className: paymodeDisabled + ' ' + paymodeSelected + ' paymode hotkey_' + this.compoundHotkeysList[hotkeyIndex], onClick: function onClick() {
|
|
3506
|
-
|
|
3451
|
+
_this7.onTabsClick(mode.paymentType);
|
|
3507
3452
|
} },
|
|
3508
3453
|
_react2.default.createElement(
|
|
3509
3454
|
'div',
|
|
@@ -3540,7 +3485,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3540
3485
|
}, {
|
|
3541
3486
|
key: 'render',
|
|
3542
3487
|
value: function render() {
|
|
3543
|
-
var
|
|
3488
|
+
var _this8 = this;
|
|
3544
3489
|
|
|
3545
3490
|
var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
|
|
3546
3491
|
PayIcon = _enumController$getEn33.PayIcon,
|
|
@@ -3559,8 +3504,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3559
3504
|
newPassConfirm = _state2.newPassConfirm,
|
|
3560
3505
|
newPass = _state2.newPass;
|
|
3561
3506
|
|
|
3562
|
-
var
|
|
3563
|
-
isNewRetailBCPos =
|
|
3507
|
+
var _ref30 = _mutantsUtil.platform || {},
|
|
3508
|
+
isNewRetailBCPos = _ref30.isNewRetailBCPos;
|
|
3564
3509
|
|
|
3565
3510
|
var _store2 = this.store,
|
|
3566
3511
|
paymode = _store2.paymode,
|
|
@@ -3581,7 +3526,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3581
3526
|
var totalTaxAmount = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.TotalTaxAmount;
|
|
3582
3527
|
// 单据模式
|
|
3583
3528
|
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
|
3584
|
-
return !(
|
|
3529
|
+
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
|
3585
3530
|
}) : paymode.thePaymodes;
|
|
3586
3531
|
var paymodes = paymode.paymodes,
|
|
3587
3532
|
settle = paymode.settle,
|
|
@@ -3623,11 +3568,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3623
3568
|
quantity4 = 0;
|
|
3624
3569
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3625
3570
|
|
|
3626
|
-
var
|
|
3627
|
-
|
|
3628
|
-
buyQuantity =
|
|
3629
|
-
|
|
3630
|
-
returnQuantity =
|
|
3571
|
+
var _ref31 = quantityDetail || {},
|
|
3572
|
+
_ref31$buyQuantity = _ref31.buyQuantity,
|
|
3573
|
+
buyQuantity = _ref31$buyQuantity === undefined ? 0 : _ref31$buyQuantity,
|
|
3574
|
+
_ref31$returnQuantity = _ref31.returnQuantity,
|
|
3575
|
+
returnQuantity = _ref31$returnQuantity === undefined ? 0 : _ref31$returnQuantity;
|
|
3631
3576
|
|
|
3632
3577
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3633
3578
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -3651,7 +3596,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3651
3596
|
return _react2.default.createElement(
|
|
3652
3597
|
'div',
|
|
3653
3598
|
{ className: 'billingSettlement', ref: function ref(r) {
|
|
3654
|
-
return
|
|
3599
|
+
return _this8.billingSettlementDocumnet = r;
|
|
3655
3600
|
} },
|
|
3656
3601
|
this.props.MemberPoints ? _react2.default.createElement(
|
|
3657
3602
|
'div',
|
|
@@ -3781,9 +3726,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3781
3726
|
return _react2.default.createElement(
|
|
3782
3727
|
_button2.default,
|
|
3783
3728
|
{ className: (0, _classnames4.default)({ "quick": true, "quick2": type == 1 }), key: 'paymentType_' + p.paymentType, onClick: function onClick() {
|
|
3784
|
-
|
|
3729
|
+
_this8.btnDebounced(p.paymentType, true);
|
|
3785
3730
|
},
|
|
3786
|
-
disabled: productsIsEmpty || type != 1 &&
|
|
3731
|
+
disabled: productsIsEmpty || type != 1 && _this8.checkModeDisabled(p.paymentType, (_this8.context.viewModel.data.TotalTaxAmount || 0 - _this8.context.viewModel.data.OnlinePaymentAmount || 0) < 0, boriginReturn) },
|
|
3787
3732
|
_react2.default.createElement(
|
|
3788
3733
|
'div',
|
|
3789
3734
|
{ className: (0, _classnames4.default)((_classnames2 = {}, (0, _defineProperty3.default)(_classnames2, iconclass, true), (0, _defineProperty3.default)(_classnames2, "icon", true), _classnames2)) },
|
|
@@ -3799,7 +3744,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3799
3744
|
_react2.default.createElement(
|
|
3800
3745
|
_button2.default,
|
|
3801
3746
|
{ key: 'settle', className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }), onClick: function onClick() {
|
|
3802
|
-
|
|
3747
|
+
_this8.btnDebounced();
|
|
3803
3748
|
}, disabled: productsIsEmpty },
|
|
3804
3749
|
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : settle.name
|
|
3805
3750
|
)
|
|
@@ -3827,7 +3772,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3827
3772
|
'div',
|
|
3828
3773
|
null,
|
|
3829
3774
|
(0, _map3.default)(paymodes, function (mode, index) {
|
|
3830
|
-
return
|
|
3775
|
+
return _this8.renderToolbtn(mode, index);
|
|
3831
3776
|
})
|
|
3832
3777
|
),
|
|
3833
3778
|
paymodes.length > carouselStart && this.paymodesCarouselList(params, paymodes, carouselStart)
|
|
@@ -3864,28 +3809,28 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3864
3809
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
|
3865
3810
|
className: _index.hotKey.hotKeyNotFilter(),
|
|
3866
3811
|
onClick: function onClick() {
|
|
3867
|
-
|
|
3812
|
+
_this8.editModal(index, mode.paymentType, boriginReturn);
|
|
3868
3813
|
}, value: (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
|
3869
3814
|
className: _index.hotKey.hotKeyNotFilter(),
|
|
3870
3815
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
3871
3816
|
onClick: function onClick(e) {
|
|
3872
|
-
return
|
|
3817
|
+
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
|
3873
3818
|
},
|
|
3874
3819
|
onBlur: function onBlur(e) {
|
|
3875
|
-
return
|
|
3820
|
+
return _this8.onBlur(index, e);
|
|
3876
3821
|
},
|
|
3877
3822
|
onFocus: function onFocus(e) {
|
|
3878
|
-
return
|
|
3823
|
+
return _this8.onFocusHack(index, mode, paymode, e);
|
|
3879
3824
|
},
|
|
3880
3825
|
onChange: function onChange(e) {
|
|
3881
|
-
return
|
|
3826
|
+
return _this8.handleChange(index, e);
|
|
3882
3827
|
}
|
|
3883
3828
|
})
|
|
3884
3829
|
),
|
|
3885
3830
|
_react2.default.createElement(
|
|
3886
3831
|
'span',
|
|
3887
3832
|
{ className: 'minus', onClick: function onClick() {
|
|
3888
|
-
|
|
3833
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3889
3834
|
} },
|
|
3890
3835
|
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
3891
3836
|
)
|
|
@@ -3931,7 +3876,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3931
3876
|
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
|
3932
3877
|
_button2.default,
|
|
3933
3878
|
{ onClick: function onClick() {
|
|
3934
|
-
|
|
3879
|
+
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3935
3880
|
}, className: 'addCard btn-border-primary' },
|
|
3936
3881
|
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
3937
3882
|
_react2.default.createElement(
|
|
@@ -4172,7 +4117,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4172
4117
|
'\u8BF7\u6DFB\u52A0\u7ED3\u7B97\u65B9\u5F0F'
|
|
4173
4118
|
),
|
|
4174
4119
|
(0, _map3.default)(thePaymodes, function (mode, mindex) {
|
|
4175
|
-
var isReturn =
|
|
4120
|
+
var isReturn = _this8.props.isReturn;
|
|
4176
4121
|
|
|
4177
4122
|
var hasSMZF = (0, _find3.default)(thePaymodes, function (m) {
|
|
4178
4123
|
return m.paymentType === PayStyle.smzf;
|
|
@@ -4216,7 +4161,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4216
4161
|
_react2.default.createElement(
|
|
4217
4162
|
'div',
|
|
4218
4163
|
{ className: 'hotkey' },
|
|
4219
|
-
|
|
4164
|
+
_this8.isHorizontalPad ? '' : _this8.compoundHotkeysList[hotkeyIndex] || ''
|
|
4220
4165
|
)
|
|
4221
4166
|
),
|
|
4222
4167
|
_react2.default.createElement(
|
|
@@ -4224,8 +4169,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4224
4169
|
{ className: (0, _classnames4.default)({ "content": true }) },
|
|
4225
4170
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4226
4171
|
|
|
4227
|
-
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
|
4228
|
-
disabled:
|
|
4172
|
+
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex]),
|
|
4173
|
+
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
|
4229
4174
|
onClick: function onClick() {
|
|
4230
4175
|
// let czkinput = document.getElementById('inputS' + index);
|
|
4231
4176
|
// if (mode.paymentType === PayStyle.hyczk) {
|
|
@@ -4238,10 +4183,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4238
4183
|
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4239
4184
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
4240
4185
|
if (themodeHyczk && themodeHyczk.length === 0) {
|
|
4241
|
-
|
|
4186
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4242
4187
|
}
|
|
4243
4188
|
} else {
|
|
4244
|
-
|
|
4189
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4245
4190
|
}
|
|
4246
4191
|
},
|
|
4247
4192
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
@@ -4249,20 +4194,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4249
4194
|
}), function (sum, m) {
|
|
4250
4195
|
return Math.Add(sum, m.value);
|
|
4251
4196
|
}, 0)) : (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4252
|
-
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
|
4253
|
-
disabled:
|
|
4197
|
+
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex]),
|
|
4198
|
+
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn) || _this8.checkScanDisabled(mode.paymentType),
|
|
4254
4199
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
4255
4200
|
onClick: function onClick(e) {
|
|
4256
|
-
return
|
|
4201
|
+
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
|
4257
4202
|
},
|
|
4258
4203
|
onBlur: function onBlur(e) {
|
|
4259
|
-
return
|
|
4204
|
+
return _this8.onBlur(index, e);
|
|
4260
4205
|
},
|
|
4261
4206
|
onFocus: function onFocus(e) {
|
|
4262
|
-
return
|
|
4207
|
+
return _this8.onFocusHack(index, mode, paymode, e);
|
|
4263
4208
|
},
|
|
4264
4209
|
onChange: function onChange(e) {
|
|
4265
|
-
return
|
|
4210
|
+
return _this8.handleChange(index, e);
|
|
4266
4211
|
}
|
|
4267
4212
|
})
|
|
4268
4213
|
)
|
|
@@ -4311,7 +4256,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4311
4256
|
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
|
4312
4257
|
_button2.default,
|
|
4313
4258
|
{ onClick: function onClick() {
|
|
4314
|
-
return
|
|
4259
|
+
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4315
4260
|
}, className: 'addCard btn-border-primary' },
|
|
4316
4261
|
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
4317
4262
|
_react2.default.createElement(
|
|
@@ -4378,7 +4323,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4378
4323
|
'div',
|
|
4379
4324
|
null,
|
|
4380
4325
|
(0, _map3.default)(paymodes, function (mode, index) {
|
|
4381
|
-
return
|
|
4326
|
+
return _this8.renderToolbtn(mode, index);
|
|
4382
4327
|
})
|
|
4383
4328
|
),
|
|
4384
4329
|
paymodes.length > carouselStart2 && this.paymodesCarouselList(params, paymodes, carouselStart2)
|
|
@@ -4489,24 +4434,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4489
4434
|
{ className: (0, _classnames4.default)({ "content": true }) },
|
|
4490
4435
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4491
4436
|
onClick: function onClick() {
|
|
4492
|
-
|
|
4437
|
+
_this8.editModal(index, mode.paymentType);
|
|
4493
4438
|
}, value: (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4494
4439
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
4495
4440
|
onBlur: function onBlur(e) {
|
|
4496
|
-
return
|
|
4441
|
+
return _this8.onBlur(index, e);
|
|
4497
4442
|
},
|
|
4498
4443
|
onChange: function onChange(e) {
|
|
4499
|
-
return
|
|
4444
|
+
return _this8.handleChange(index, e);
|
|
4500
4445
|
},
|
|
4501
4446
|
onFocus: function onFocus(e) {
|
|
4502
|
-
return
|
|
4447
|
+
return _this8.onFocusHack(index, mode, paymode, e);
|
|
4503
4448
|
}
|
|
4504
4449
|
})
|
|
4505
4450
|
),
|
|
4506
4451
|
_react2.default.createElement(
|
|
4507
4452
|
'div',
|
|
4508
4453
|
{ className: 'minus', onClick: function onClick() {
|
|
4509
|
-
|
|
4454
|
+
_this8.onDelPay(index);
|
|
4510
4455
|
} },
|
|
4511
4456
|
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
4512
4457
|
)
|
|
@@ -4696,7 +4641,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4696
4641
|
|
|
4697
4642
|
// _map(_sortBy(thePaymodes, pay => pay['order'] || 0), (mode) => {
|
|
4698
4643
|
(0, _map3.default)(thePaymodes, function (mode, mindex) {
|
|
4699
|
-
var isReturn =
|
|
4644
|
+
var isReturn = _this8.props.isReturn;
|
|
4700
4645
|
|
|
4701
4646
|
var hasSMZF = (0, _find3.default)(thePaymodes, function (m) {
|
|
4702
4647
|
return m.paymentType === PayStyle.smzf;
|
|
@@ -4740,7 +4685,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4740
4685
|
_react2.default.createElement(
|
|
4741
4686
|
'div',
|
|
4742
4687
|
{ className: 'hotkey' },
|
|
4743
|
-
|
|
4688
|
+
_this8.isHorizontalPad ? '' : _this8.compoundHotkeysList[mindex] || ""
|
|
4744
4689
|
)
|
|
4745
4690
|
),
|
|
4746
4691
|
_react2.default.createElement(
|
|
@@ -4748,32 +4693,32 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4748
4693
|
{ className: (0, _classnames4.default)({ "content": true }) },
|
|
4749
4694
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index
|
|
4750
4695
|
// className={classnames({'paymode':mode.paymentType == PayStyle.hyczk?(_findIndex(thePaymodes,(m)=>{return m.paymentType==PayStyle.hyczk;})==mindex?true:false):true})}
|
|
4751
|
-
, className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
|
4696
|
+
, className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex])
|
|
4752
4697
|
// className="paymode"
|
|
4753
|
-
, disabled:
|
|
4698
|
+
, disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
|
4754
4699
|
onClick: function onClick() {
|
|
4755
|
-
|
|
4700
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4756
4701
|
},
|
|
4757
4702
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
4758
4703
|
return tm.paymentType == PayStyle.hyczk;
|
|
4759
4704
|
}), function (sum, m) {
|
|
4760
4705
|
return Math.Add(sum, m.value);
|
|
4761
4706
|
}, 0)) : (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4762
|
-
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
|
4707
|
+
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex])
|
|
4763
4708
|
// className="paymode"
|
|
4764
|
-
, disabled:
|
|
4709
|
+
, disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn) || _this8.checkScanDisabled(mode.paymentType),
|
|
4765
4710
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
4766
4711
|
onClick: function onClick(e) {
|
|
4767
|
-
return
|
|
4712
|
+
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
|
4768
4713
|
},
|
|
4769
4714
|
onBlur: function onBlur(e) {
|
|
4770
|
-
return
|
|
4715
|
+
return _this8.onBlur(index, e);
|
|
4771
4716
|
},
|
|
4772
4717
|
onFocus: function onFocus(e) {
|
|
4773
|
-
return
|
|
4718
|
+
return _this8.onFocusHack(index, mode, paymode, e);
|
|
4774
4719
|
},
|
|
4775
4720
|
onChange: function onChange(e) {
|
|
4776
|
-
return
|
|
4721
|
+
return _this8.handleChange(index, e);
|
|
4777
4722
|
}
|
|
4778
4723
|
})
|
|
4779
4724
|
)
|
|
@@ -4956,79 +4901,79 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4956
4901
|
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u624B\u673A\u53F7/\u50A8\u503C\u5361\u53F7',
|
|
4957
4902
|
className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4958
4903
|
onChange: function onChange(e) {
|
|
4959
|
-
return
|
|
4904
|
+
return _this8.onCzkChange(e.target.value);
|
|
4960
4905
|
},
|
|
4961
4906
|
defaultValue: currentMode && currentMode.storageCardNo,
|
|
4962
4907
|
value: czkValue,
|
|
4963
4908
|
ref: function ref(input) {
|
|
4964
|
-
return
|
|
4909
|
+
return _this8.czkInput = input;
|
|
4965
4910
|
},
|
|
4966
4911
|
onKeyDown: function () {
|
|
4967
|
-
var
|
|
4912
|
+
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(e) {
|
|
4968
4913
|
var time, _paymode;
|
|
4969
4914
|
|
|
4970
|
-
return _regenerator2.default.wrap(function
|
|
4915
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
4971
4916
|
while (1) {
|
|
4972
|
-
switch (
|
|
4917
|
+
switch (_context16.prev = _context16.next) {
|
|
4973
4918
|
case 0:
|
|
4974
4919
|
if (!(e.keyCode == 13)) {
|
|
4975
|
-
|
|
4920
|
+
_context16.next = 14;
|
|
4976
4921
|
break;
|
|
4977
4922
|
}
|
|
4978
4923
|
|
|
4979
4924
|
time = Date.parse(new Date());
|
|
4980
4925
|
|
|
4981
|
-
if (!(
|
|
4982
|
-
|
|
4926
|
+
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
|
4927
|
+
_context16.next = 7;
|
|
4983
4928
|
break;
|
|
4984
4929
|
}
|
|
4985
4930
|
|
|
4986
4931
|
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
4987
|
-
|
|
4988
|
-
|
|
4932
|
+
_this8.keypressStime = null;
|
|
4933
|
+
_this8.setState({
|
|
4989
4934
|
czkValue: null
|
|
4990
4935
|
});
|
|
4991
|
-
return
|
|
4936
|
+
return _context16.abrupt('return');
|
|
4992
4937
|
|
|
4993
4938
|
case 7:
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
return
|
|
4939
|
+
_this8.keypressStime = null;
|
|
4940
|
+
_context16.next = 10;
|
|
4941
|
+
return _this8.loadCzk(e.target.value);
|
|
4997
4942
|
|
|
4998
4943
|
case 10:
|
|
4999
|
-
_paymode =
|
|
4944
|
+
_paymode = _this8.store.paymode;
|
|
5000
4945
|
|
|
5001
4946
|
if (!_paymode.currentMode.storageCardNo) {
|
|
5002
|
-
|
|
4947
|
+
_this8.setState({
|
|
5003
4948
|
czkvalue: null
|
|
5004
4949
|
});
|
|
5005
4950
|
}
|
|
5006
|
-
|
|
4951
|
+
_context16.next = 15;
|
|
5007
4952
|
break;
|
|
5008
4953
|
|
|
5009
4954
|
case 14:
|
|
5010
|
-
if (!
|
|
5011
|
-
|
|
4955
|
+
if (!_this8.keypressStime && e.keyCode !== 8) {
|
|
4956
|
+
_this8.keypressStime = Date.parse(new Date());
|
|
5012
4957
|
}
|
|
5013
4958
|
|
|
5014
4959
|
case 15:
|
|
5015
4960
|
case 'end':
|
|
5016
|
-
return
|
|
4961
|
+
return _context16.stop();
|
|
5017
4962
|
}
|
|
5018
4963
|
}
|
|
5019
|
-
},
|
|
4964
|
+
}, _callee16, _this8);
|
|
5020
4965
|
}));
|
|
5021
4966
|
|
|
5022
|
-
return function (
|
|
5023
|
-
return
|
|
4967
|
+
return function (_x11) {
|
|
4968
|
+
return _ref32.apply(this, arguments);
|
|
5024
4969
|
};
|
|
5025
4970
|
}(),
|
|
5026
4971
|
onFocus: function onFocus(e) {
|
|
5027
|
-
|
|
5028
|
-
!
|
|
5029
|
-
var value = _keyboard2.default.getNewValue(
|
|
5030
|
-
|
|
5031
|
-
},
|
|
4972
|
+
_this8.inputTarget = _this8.czkInput.input;
|
|
4973
|
+
!_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
|
4974
|
+
var value = _keyboard2.default.getNewValue(_this8.inputTarget, _this8.inputTarget.value, v);
|
|
4975
|
+
_this8.onCzkChange(value);
|
|
4976
|
+
}, _this8.czkKeyboardOnOk, _this8.czkKeyboardOnClose)();
|
|
5032
4977
|
},
|
|
5033
4978
|
onBlur: function onBlur(e) {
|
|
5034
4979
|
_keyboard2.default.close();
|
|
@@ -5040,7 +4985,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5040
4985
|
|
|
5041
4986
|
/* 扫描组件 */
|
|
5042
4987
|
this.isHorizontalPad && _react2.default.createElement(_scan2.default, { ref: function ref(scan) {
|
|
5043
|
-
return
|
|
4988
|
+
return _this8.scanObj = scan;
|
|
5044
4989
|
}, onChange: this.onScanCzkResult })
|
|
5045
4990
|
),
|
|
5046
4991
|
_react2.default.createElement(
|
|
@@ -5074,22 +5019,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5074
5019
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
5075
5020
|
value: storageValue,
|
|
5076
5021
|
onChange: function onChange(event) {
|
|
5077
|
-
|
|
5022
|
+
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
5078
5023
|
},
|
|
5079
5024
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
|
5080
|
-
ref: function ref(
|
|
5081
|
-
return
|
|
5025
|
+
ref: function ref(_ref33) {
|
|
5026
|
+
return _this8["inputCzkAmount"] = _ref33;
|
|
5082
5027
|
},
|
|
5083
5028
|
onFocus: function onFocus(e) {
|
|
5084
|
-
|
|
5029
|
+
_this8.inputkey = "inputCzkAmount";
|
|
5085
5030
|
_keyboard2.default.open(function (v) {
|
|
5086
|
-
var value = _keyboard2.default.getNewValue(
|
|
5087
|
-
|
|
5088
|
-
},
|
|
5031
|
+
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
5032
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
5033
|
+
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
5089
5034
|
},
|
|
5090
5035
|
onBlur: function onBlur(e) {
|
|
5091
5036
|
_keyboard2.default.close();
|
|
5092
|
-
|
|
5037
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.balance));
|
|
5093
5038
|
}
|
|
5094
5039
|
})
|
|
5095
5040
|
)
|
|
@@ -5216,16 +5161,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5216
5161
|
maxLength: 6,
|
|
5217
5162
|
value: newPass,
|
|
5218
5163
|
ref: function ref(input) {
|
|
5219
|
-
return
|
|
5164
|
+
return _this8.inputNewAmount = input;
|
|
5220
5165
|
},
|
|
5221
5166
|
onChange: function onChange(value) {
|
|
5222
|
-
return
|
|
5167
|
+
return _this8.setPwdValue('newPass', value.target.value);
|
|
5223
5168
|
},
|
|
5224
5169
|
onBlur: function onBlur(value) {
|
|
5225
|
-
return
|
|
5170
|
+
return _this8.handleBlur('newPass');
|
|
5226
5171
|
},
|
|
5227
5172
|
onPressEnter: function onPressEnter() {
|
|
5228
|
-
return
|
|
5173
|
+
return _this8.onPressEnterCzk('newPass');
|
|
5229
5174
|
}
|
|
5230
5175
|
})
|
|
5231
5176
|
)
|
|
@@ -5248,16 +5193,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5248
5193
|
maxLength: 6,
|
|
5249
5194
|
value: newPassConfirm,
|
|
5250
5195
|
ref: function ref(input) {
|
|
5251
|
-
return
|
|
5196
|
+
return _this8.inputConfirmAmount = input;
|
|
5252
5197
|
},
|
|
5253
5198
|
onChange: function onChange(value) {
|
|
5254
|
-
return
|
|
5199
|
+
return _this8.setPwdValue('newPassConfirm', value.target.value);
|
|
5255
5200
|
},
|
|
5256
5201
|
onBlur: function onBlur(value) {
|
|
5257
|
-
return
|
|
5202
|
+
return _this8.handleBlur('newPassConfirm');
|
|
5258
5203
|
},
|
|
5259
5204
|
onPressEnter: function onPressEnter() {
|
|
5260
|
-
return
|
|
5205
|
+
return _this8.onPressEnterCzk('newPassConfirm');
|
|
5261
5206
|
}
|
|
5262
5207
|
})
|
|
5263
5208
|
)
|
|
@@ -5317,22 +5262,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5317
5262
|
// onChange={this.onDjqChange}
|
|
5318
5263
|
// value={currentMode && currentMode.member.cardNo}
|
|
5319
5264
|
, ref: function ref(input) {
|
|
5320
|
-
return
|
|
5265
|
+
return _this8.inputdjq = input;
|
|
5321
5266
|
},
|
|
5322
5267
|
onKeyDown: function onKeyDown(e) {
|
|
5323
5268
|
if (e.keyCode == 13) {
|
|
5324
|
-
|
|
5269
|
+
_this8.addDjq(e.target.value);
|
|
5325
5270
|
}
|
|
5326
5271
|
},
|
|
5327
5272
|
onFocus: function onFocus(e) {
|
|
5328
|
-
|
|
5273
|
+
_this8.inputTarget = _this8.inputdjq.input;
|
|
5329
5274
|
_keyboard2.default.open(function (v) {
|
|
5330
|
-
var value = _keyboard2.default.getNewValue(
|
|
5331
|
-
|
|
5332
|
-
},
|
|
5275
|
+
var value = _keyboard2.default.getNewValue(_this8.inputTarget, _this8.inputTarget.value, v);
|
|
5276
|
+
_this8.onDjqChange(value, true);
|
|
5277
|
+
}, _this8.djqKeyboardOnOk, _this8.djqKeyboardOnClose)();
|
|
5333
5278
|
},
|
|
5334
5279
|
onBlur: function onBlur(e) {
|
|
5335
|
-
_keyboard2.default.close();
|
|
5280
|
+
_keyboard2.default.close();_this8.inputdjq.input.value = '';
|
|
5336
5281
|
}
|
|
5337
5282
|
})
|
|
5338
5283
|
),
|
|
@@ -5366,7 +5311,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5366
5311
|
{ className: 'col3' },
|
|
5367
5312
|
_react2.default.createElement(_ticon2.default, { type: 'saomiao1', className: 'icon', onClick: this.changeScanProduct }),
|
|
5368
5313
|
_react2.default.createElement(_scan2.default, { ref: function ref(scan) {
|
|
5369
|
-
return
|
|
5314
|
+
return _this8.scanObj = scan;
|
|
5370
5315
|
}, onChange: this.onScanDjqResult })
|
|
5371
5316
|
)
|
|
5372
5317
|
),
|
|
@@ -5377,10 +5322,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5377
5322
|
'div',
|
|
5378
5323
|
{ className: 'djq2' },
|
|
5379
5324
|
currentMode && currentMode.djqs && currentMode.djqs.length > 0 ? (0, _map3.default)(currentMode.djqs || [], function (q, index) {
|
|
5380
|
-
if (!
|
|
5325
|
+
if (!_this8.state.couponLight && !q.count) {
|
|
5381
5326
|
return;
|
|
5382
5327
|
}
|
|
5383
|
-
if (
|
|
5328
|
+
if (_this8.state.couponLight && q.count && q.count === 1) {
|
|
5384
5329
|
return;
|
|
5385
5330
|
}
|
|
5386
5331
|
return _react2.default.createElement(
|
|
@@ -5434,7 +5379,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5434
5379
|
_react2.default.createElement(
|
|
5435
5380
|
'div',
|
|
5436
5381
|
{ className: (0, _classnames4.default)('djqRight', { 'djqRightSelected': q.checked }), onClick: function onClick(e) {
|
|
5437
|
-
return q.IsEnable ?
|
|
5382
|
+
return q.IsEnable ? _this8.djqChecked(q, _this8.props.dto) : null;
|
|
5438
5383
|
} },
|
|
5439
5384
|
q.checked ? _react2.default.createElement(_ticon2.default, { className: 'checkIcon primary-color', type: 'xuanzhong1' }) : _react2.default.createElement('span', { className: '' + (q.IsEnable ? 'noxuanzhong' : 'noxuanzhong1') }),
|
|
5440
5385
|
q.checked ? _react2.default.createElement(
|
|
@@ -5741,22 +5686,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5741
5686
|
type: 'text',
|
|
5742
5687
|
value: storageValue,
|
|
5743
5688
|
onChange: function onChange(e) {
|
|
5744
|
-
|
|
5689
|
+
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5745
5690
|
},
|
|
5746
5691
|
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5747
|
-
ref: function ref(
|
|
5748
|
-
return
|
|
5692
|
+
ref: function ref(_ref34) {
|
|
5693
|
+
return _this8["inputJfdxAmount"] = _ref34;
|
|
5749
5694
|
},
|
|
5750
5695
|
onFocus: function onFocus(e) {
|
|
5751
|
-
|
|
5696
|
+
_this8.inputkey = "inputJfdxAmount";
|
|
5752
5697
|
_keyboard2.default.open(function (v) {
|
|
5753
|
-
var value = _keyboard2.default.getNewValue(
|
|
5754
|
-
|
|
5755
|
-
},
|
|
5698
|
+
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
5699
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5700
|
+
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
5756
5701
|
},
|
|
5757
5702
|
onBlur: function onBlur(e) {
|
|
5758
5703
|
_keyboard2.default.close();
|
|
5759
|
-
|
|
5704
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputJfdxAmount.input.value), Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5760
5705
|
}
|
|
5761
5706
|
})
|
|
5762
5707
|
)
|