tplus-components-touch 3.33.9 → 3.33.13
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/settlement/settlement.js +251 -302
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +2 -2
- package/dist/components/settlement/settlementStore.js +470 -367
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/package.json +1 -1
|
@@ -204,6 +204,8 @@ var _index = require('../../index');
|
|
|
204
204
|
|
|
205
205
|
var _tplusPoslogin = require('tplus-poslogin');
|
|
206
206
|
|
|
207
|
+
var _tplusApi = require('tplus-api');
|
|
208
|
+
|
|
207
209
|
var _index2 = require('./prototypeTable/index');
|
|
208
210
|
|
|
209
211
|
var _index3 = _interopRequireDefault(_index2);
|
|
@@ -1942,147 +1944,96 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
1942
1944
|
};
|
|
1943
1945
|
|
|
1944
1946
|
_this2.handleSettle = function () {
|
|
1945
|
-
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
1947
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
|
|
1946
1948
|
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;
|
|
1949
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
|
|
1950
|
+
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
|
1951
1951
|
|
|
1952
|
-
return _regenerator2.default.wrap(function
|
|
1952
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
|
1953
1953
|
while (1) {
|
|
1954
|
-
switch (
|
|
1954
|
+
switch (_context10.prev = _context10.next) {
|
|
1955
1955
|
case 0:
|
|
1956
1956
|
results = [];
|
|
1957
|
-
|
|
1957
|
+
_context10.prev = 1;
|
|
1958
1958
|
_iteratorNormalCompletion = true;
|
|
1959
1959
|
_didIteratorError = false;
|
|
1960
1960
|
_iteratorError = undefined;
|
|
1961
|
-
|
|
1961
|
+
_context10.prev = 5;
|
|
1962
1962
|
_iterator = (0, _getIterator3.default)(promises);
|
|
1963
1963
|
|
|
1964
1964
|
case 7:
|
|
1965
1965
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
|
1966
|
-
|
|
1966
|
+
_context10.next = 16;
|
|
1967
1967
|
break;
|
|
1968
1968
|
}
|
|
1969
1969
|
|
|
1970
1970
|
p = _step.value;
|
|
1971
|
-
|
|
1971
|
+
_context10.next = 11;
|
|
1972
1972
|
return p;
|
|
1973
1973
|
|
|
1974
1974
|
case 11:
|
|
1975
|
-
_result =
|
|
1975
|
+
_result = _context10.sent;
|
|
1976
1976
|
|
|
1977
1977
|
results.push(_result);
|
|
1978
1978
|
|
|
1979
1979
|
case 13:
|
|
1980
1980
|
_iteratorNormalCompletion = true;
|
|
1981
|
-
|
|
1981
|
+
_context10.next = 7;
|
|
1982
1982
|
break;
|
|
1983
1983
|
|
|
1984
1984
|
case 16:
|
|
1985
|
-
|
|
1985
|
+
_context10.next = 22;
|
|
1986
1986
|
break;
|
|
1987
1987
|
|
|
1988
1988
|
case 18:
|
|
1989
|
-
|
|
1990
|
-
|
|
1989
|
+
_context10.prev = 18;
|
|
1990
|
+
_context10.t0 = _context10['catch'](5);
|
|
1991
1991
|
_didIteratorError = true;
|
|
1992
|
-
_iteratorError =
|
|
1992
|
+
_iteratorError = _context10.t0;
|
|
1993
1993
|
|
|
1994
1994
|
case 22:
|
|
1995
|
-
|
|
1996
|
-
|
|
1995
|
+
_context10.prev = 22;
|
|
1996
|
+
_context10.prev = 23;
|
|
1997
1997
|
|
|
1998
1998
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
|
1999
1999
|
_iterator.return();
|
|
2000
2000
|
}
|
|
2001
2001
|
|
|
2002
2002
|
case 25:
|
|
2003
|
-
|
|
2003
|
+
_context10.prev = 25;
|
|
2004
2004
|
|
|
2005
2005
|
if (!_didIteratorError) {
|
|
2006
|
-
|
|
2006
|
+
_context10.next = 28;
|
|
2007
2007
|
break;
|
|
2008
2008
|
}
|
|
2009
2009
|
|
|
2010
2010
|
throw _iteratorError;
|
|
2011
2011
|
|
|
2012
2012
|
case 28:
|
|
2013
|
-
return
|
|
2013
|
+
return _context10.finish(25);
|
|
2014
2014
|
|
|
2015
2015
|
case 29:
|
|
2016
|
-
return
|
|
2016
|
+
return _context10.finish(22);
|
|
2017
2017
|
|
|
2018
2018
|
case 30:
|
|
2019
2019
|
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
|
-
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;
|
|
2066
|
-
return commit(results);
|
|
2067
|
-
|
|
2068
|
-
case 41:
|
|
2069
|
-
_context11.next = 43;
|
|
2020
|
+
_context10.next = 33;
|
|
2070
2021
|
return commit(results);
|
|
2071
2022
|
|
|
2072
|
-
case
|
|
2073
|
-
|
|
2023
|
+
case 33:
|
|
2024
|
+
_context10.next = 37;
|
|
2074
2025
|
break;
|
|
2075
2026
|
|
|
2076
|
-
case
|
|
2077
|
-
|
|
2078
|
-
|
|
2027
|
+
case 35:
|
|
2028
|
+
_context10.prev = 35;
|
|
2029
|
+
_context10.t1 = _context10['catch'](1);
|
|
2079
2030
|
|
|
2080
|
-
case
|
|
2031
|
+
case 37:
|
|
2081
2032
|
case 'end':
|
|
2082
|
-
return
|
|
2033
|
+
return _context10.stop();
|
|
2083
2034
|
}
|
|
2084
2035
|
}
|
|
2085
|
-
},
|
|
2036
|
+
}, _callee10, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
2086
2037
|
}));
|
|
2087
2038
|
|
|
2088
2039
|
return function handleUserInputs(_x6) {
|
|
@@ -2090,11 +2041,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2090
2041
|
};
|
|
2091
2042
|
}();
|
|
2092
2043
|
|
|
2093
|
-
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit
|
|
2044
|
+
var _enumController$getEn21, PayStyle, _this2$store6, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
|
2094
2045
|
|
|
2095
|
-
return _regenerator2.default.wrap(function
|
|
2046
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
|
2096
2047
|
while (1) {
|
|
2097
|
-
switch (
|
|
2048
|
+
switch (_context11.prev = _context11.next) {
|
|
2098
2049
|
case 0:
|
|
2099
2050
|
_this2.setState({
|
|
2100
2051
|
settleDisabled: true
|
|
@@ -2116,7 +2067,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2116
2067
|
});
|
|
2117
2068
|
|
|
2118
2069
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
|
2119
|
-
|
|
2070
|
+
_context11.next = 13;
|
|
2120
2071
|
break;
|
|
2121
2072
|
}
|
|
2122
2073
|
|
|
@@ -2124,11 +2075,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2124
2075
|
_this2.setState({
|
|
2125
2076
|
settleDisabled: false
|
|
2126
2077
|
});
|
|
2127
|
-
return
|
|
2078
|
+
return _context11.abrupt('return');
|
|
2128
2079
|
|
|
2129
2080
|
case 13:
|
|
2130
2081
|
if (!(args !== "zero" && !newStyle)) {
|
|
2131
|
-
|
|
2082
|
+
_context11.next = 19;
|
|
2132
2083
|
break;
|
|
2133
2084
|
}
|
|
2134
2085
|
|
|
@@ -2137,7 +2088,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2137
2088
|
});
|
|
2138
2089
|
|
|
2139
2090
|
if (!zeromode) {
|
|
2140
|
-
|
|
2091
|
+
_context11.next = 19;
|
|
2141
2092
|
break;
|
|
2142
2093
|
}
|
|
2143
2094
|
|
|
@@ -2145,7 +2096,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2145
2096
|
settleDisabled: false
|
|
2146
2097
|
});
|
|
2147
2098
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
|
2148
|
-
return
|
|
2099
|
+
return _context11.abrupt('return');
|
|
2149
2100
|
|
|
2150
2101
|
case 19:
|
|
2151
2102
|
promises = [];
|
|
@@ -2154,14 +2105,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2154
2105
|
}) : paymode.thePaymodes, 'orderBy');
|
|
2155
2106
|
|
|
2156
2107
|
if (!isQuickPay) {
|
|
2157
|
-
|
|
2108
|
+
_context11.next = 27;
|
|
2158
2109
|
break;
|
|
2159
2110
|
}
|
|
2160
2111
|
|
|
2161
2112
|
quickmode = thePaymodes[0];
|
|
2162
2113
|
|
|
2163
2114
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
|
2164
|
-
|
|
2115
|
+
_context11.next = 27;
|
|
2165
2116
|
break;
|
|
2166
2117
|
}
|
|
2167
2118
|
|
|
@@ -2169,7 +2120,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2169
2120
|
settleDisabled: false
|
|
2170
2121
|
});
|
|
2171
2122
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
|
2172
|
-
return
|
|
2123
|
+
return _context11.abrupt('return');
|
|
2173
2124
|
|
|
2174
2125
|
case 27:
|
|
2175
2126
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
|
@@ -2257,19 +2208,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2257
2208
|
};
|
|
2258
2209
|
}();
|
|
2259
2210
|
|
|
2260
|
-
_this2$props3 = _this2.props, isUpdateDate = _this2$props3.isUpdateDate, type = _this2$props3.type;
|
|
2261
|
-
VoucherDate = _this2.store.dto.VoucherDate;
|
|
2262
|
-
setVoucherDate = _this2.store.setVoucherDate;
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
2211
|
handleUserInputs(promises);
|
|
2266
2212
|
|
|
2267
|
-
case
|
|
2213
|
+
case 30:
|
|
2268
2214
|
case 'end':
|
|
2269
|
-
return
|
|
2215
|
+
return _context11.stop();
|
|
2270
2216
|
}
|
|
2271
2217
|
}
|
|
2272
|
-
},
|
|
2218
|
+
}, _callee11, _this3);
|
|
2273
2219
|
}));
|
|
2274
2220
|
|
|
2275
2221
|
return function (_x4) {
|
|
@@ -2277,91 +2223,91 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2277
2223
|
};
|
|
2278
2224
|
}();
|
|
2279
2225
|
|
|
2280
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
|
2226
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
|
2281
2227
|
var handleUserInputs = function () {
|
|
2282
|
-
var
|
|
2228
|
+
var _ref23 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
|
|
2283
2229
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
|
2284
2230
|
|
|
2285
|
-
return _regenerator2.default.wrap(function
|
|
2231
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
|
2286
2232
|
while (1) {
|
|
2287
|
-
switch (
|
|
2233
|
+
switch (_context13.prev = _context13.next) {
|
|
2288
2234
|
case 0:
|
|
2289
2235
|
results = [];
|
|
2290
|
-
|
|
2236
|
+
_context13.prev = 1;
|
|
2291
2237
|
_iteratorNormalCompletion2 = true;
|
|
2292
2238
|
_didIteratorError2 = false;
|
|
2293
2239
|
_iteratorError2 = undefined;
|
|
2294
|
-
|
|
2240
|
+
_context13.prev = 5;
|
|
2295
2241
|
_iterator2 = (0, _getIterator3.default)(promises);
|
|
2296
2242
|
|
|
2297
2243
|
case 7:
|
|
2298
2244
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
|
2299
|
-
|
|
2245
|
+
_context13.next = 16;
|
|
2300
2246
|
break;
|
|
2301
2247
|
}
|
|
2302
2248
|
|
|
2303
2249
|
p = _step2.value;
|
|
2304
|
-
|
|
2250
|
+
_context13.next = 11;
|
|
2305
2251
|
return p;
|
|
2306
2252
|
|
|
2307
2253
|
case 11:
|
|
2308
|
-
_result2 =
|
|
2254
|
+
_result2 = _context13.sent;
|
|
2309
2255
|
|
|
2310
2256
|
results.push(_result2);
|
|
2311
2257
|
|
|
2312
2258
|
case 13:
|
|
2313
2259
|
_iteratorNormalCompletion2 = true;
|
|
2314
|
-
|
|
2260
|
+
_context13.next = 7;
|
|
2315
2261
|
break;
|
|
2316
2262
|
|
|
2317
2263
|
case 16:
|
|
2318
|
-
|
|
2264
|
+
_context13.next = 22;
|
|
2319
2265
|
break;
|
|
2320
2266
|
|
|
2321
2267
|
case 18:
|
|
2322
|
-
|
|
2323
|
-
|
|
2268
|
+
_context13.prev = 18;
|
|
2269
|
+
_context13.t0 = _context13['catch'](5);
|
|
2324
2270
|
_didIteratorError2 = true;
|
|
2325
|
-
_iteratorError2 =
|
|
2271
|
+
_iteratorError2 = _context13.t0;
|
|
2326
2272
|
|
|
2327
2273
|
case 22:
|
|
2328
|
-
|
|
2329
|
-
|
|
2274
|
+
_context13.prev = 22;
|
|
2275
|
+
_context13.prev = 23;
|
|
2330
2276
|
|
|
2331
2277
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
|
2332
2278
|
_iterator2.return();
|
|
2333
2279
|
}
|
|
2334
2280
|
|
|
2335
2281
|
case 25:
|
|
2336
|
-
|
|
2282
|
+
_context13.prev = 25;
|
|
2337
2283
|
|
|
2338
2284
|
if (!_didIteratorError2) {
|
|
2339
|
-
|
|
2285
|
+
_context13.next = 28;
|
|
2340
2286
|
break;
|
|
2341
2287
|
}
|
|
2342
2288
|
|
|
2343
2289
|
throw _iteratorError2;
|
|
2344
2290
|
|
|
2345
2291
|
case 28:
|
|
2346
|
-
return
|
|
2292
|
+
return _context13.finish(25);
|
|
2347
2293
|
|
|
2348
2294
|
case 29:
|
|
2349
|
-
return
|
|
2295
|
+
return _context13.finish(22);
|
|
2350
2296
|
|
|
2351
2297
|
case 30:
|
|
2352
|
-
|
|
2298
|
+
_context13.next = 32;
|
|
2353
2299
|
return commit(results);
|
|
2354
2300
|
|
|
2355
2301
|
case 32:
|
|
2356
|
-
|
|
2302
|
+
_context13.next = 37;
|
|
2357
2303
|
break;
|
|
2358
2304
|
|
|
2359
2305
|
case 34:
|
|
2360
|
-
|
|
2361
|
-
|
|
2306
|
+
_context13.prev = 34;
|
|
2307
|
+
_context13.t1 = _context13['catch'](1);
|
|
2362
2308
|
|
|
2363
|
-
if (
|
|
2364
|
-
_message2.default.error(
|
|
2309
|
+
if (_context13.t1 != "cancelpwd") {
|
|
2310
|
+
_message2.default.error(_context13.t1);
|
|
2365
2311
|
setTimeout(function () {
|
|
2366
2312
|
that.handleCzk();
|
|
2367
2313
|
}, 500);
|
|
@@ -2369,27 +2315,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2369
2315
|
|
|
2370
2316
|
case 37:
|
|
2371
2317
|
case 'end':
|
|
2372
|
-
return
|
|
2318
|
+
return _context13.stop();
|
|
2373
2319
|
}
|
|
2374
2320
|
}
|
|
2375
|
-
},
|
|
2321
|
+
}, _callee13, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
|
2376
2322
|
}));
|
|
2377
2323
|
|
|
2378
|
-
return function handleUserInputs(
|
|
2379
|
-
return
|
|
2324
|
+
return function handleUserInputs(_x8) {
|
|
2325
|
+
return _ref23.apply(this, arguments);
|
|
2380
2326
|
};
|
|
2381
2327
|
}();
|
|
2382
2328
|
|
|
2383
|
-
var that, curmode, promises,
|
|
2329
|
+
var that, curmode, promises, _ref21, isNewRetailBCPos, _enumController$getEn22, PayStyle, commit;
|
|
2384
2330
|
|
|
2385
|
-
return _regenerator2.default.wrap(function
|
|
2331
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
|
2386
2332
|
while (1) {
|
|
2387
|
-
switch (
|
|
2333
|
+
switch (_context14.prev = _context14.next) {
|
|
2388
2334
|
case 0:
|
|
2389
2335
|
that = _this2;
|
|
2390
2336
|
curmode = _this2.store.paymode.currentMode;
|
|
2391
2337
|
promises = [];
|
|
2392
|
-
|
|
2338
|
+
_ref21 = _mutantsUtil.platform || {}, isNewRetailBCPos = _ref21.isNewRetailBCPos;
|
|
2393
2339
|
|
|
2394
2340
|
if (isNewRetailBCPos) {
|
|
2395
2341
|
if (curmode.value > 0) {
|
|
@@ -2410,33 +2356,33 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2410
2356
|
}
|
|
2411
2357
|
|
|
2412
2358
|
commit = function () {
|
|
2413
|
-
var
|
|
2359
|
+
var _ref22 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
|
|
2414
2360
|
var result;
|
|
2415
|
-
return _regenerator2.default.wrap(function
|
|
2361
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
|
2416
2362
|
while (1) {
|
|
2417
|
-
switch (
|
|
2363
|
+
switch (_context12.prev = _context12.next) {
|
|
2418
2364
|
case 0:
|
|
2419
2365
|
if (!(values.length > 0)) {
|
|
2420
|
-
|
|
2366
|
+
_context12.next = 6;
|
|
2421
2367
|
break;
|
|
2422
2368
|
}
|
|
2423
2369
|
|
|
2424
|
-
|
|
2370
|
+
_context12.next = 3;
|
|
2425
2371
|
return that.store.validePwd(values[0]);
|
|
2426
2372
|
|
|
2427
2373
|
case 3:
|
|
2428
|
-
|
|
2429
|
-
|
|
2374
|
+
_context12.t0 = _context12.sent;
|
|
2375
|
+
_context12.next = 7;
|
|
2430
2376
|
break;
|
|
2431
2377
|
|
|
2432
2378
|
case 6:
|
|
2433
|
-
|
|
2379
|
+
_context12.t0 = "";
|
|
2434
2380
|
|
|
2435
2381
|
case 7:
|
|
2436
|
-
result =
|
|
2382
|
+
result = _context12.t0;
|
|
2437
2383
|
|
|
2438
2384
|
if (!(result == "")) {
|
|
2439
|
-
|
|
2385
|
+
_context12.next = 13;
|
|
2440
2386
|
break;
|
|
2441
2387
|
}
|
|
2442
2388
|
|
|
@@ -2444,23 +2390,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2444
2390
|
//返回
|
|
2445
2391
|
that.setCurrentFocusAndAddPay(curmode.paymentType, curmode.paymethodId);
|
|
2446
2392
|
_promise2.default.resolve();
|
|
2447
|
-
|
|
2393
|
+
_context12.next = 15;
|
|
2448
2394
|
break;
|
|
2449
2395
|
|
|
2450
2396
|
case 13:
|
|
2451
|
-
|
|
2397
|
+
_context12.next = 15;
|
|
2452
2398
|
return _promise2.default.reject(result);
|
|
2453
2399
|
|
|
2454
2400
|
case 15:
|
|
2455
2401
|
case 'end':
|
|
2456
|
-
return
|
|
2402
|
+
return _context12.stop();
|
|
2457
2403
|
}
|
|
2458
2404
|
}
|
|
2459
|
-
},
|
|
2405
|
+
}, _callee12, _this3);
|
|
2460
2406
|
}));
|
|
2461
2407
|
|
|
2462
|
-
return function commit(
|
|
2463
|
-
return
|
|
2408
|
+
return function commit(_x7) {
|
|
2409
|
+
return _ref22.apply(this, arguments);
|
|
2464
2410
|
};
|
|
2465
2411
|
}();
|
|
2466
2412
|
|
|
@@ -2468,10 +2414,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2468
2414
|
|
|
2469
2415
|
case 7:
|
|
2470
2416
|
case 'end':
|
|
2471
|
-
return
|
|
2417
|
+
return _context14.stop();
|
|
2472
2418
|
}
|
|
2473
2419
|
}
|
|
2474
|
-
},
|
|
2420
|
+
}, _callee14, _this3);
|
|
2475
2421
|
}));
|
|
2476
2422
|
|
|
2477
2423
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
|
@@ -2511,15 +2457,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2511
2457
|
};
|
|
2512
2458
|
|
|
2513
2459
|
_this2.inputPwd = function () {
|
|
2514
|
-
var
|
|
2460
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
|
|
2515
2461
|
var that, confirmPwd;
|
|
2516
|
-
return _regenerator2.default.wrap(function
|
|
2462
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
|
2517
2463
|
while (1) {
|
|
2518
|
-
switch (
|
|
2464
|
+
switch (_context15.prev = _context15.next) {
|
|
2519
2465
|
case 0:
|
|
2520
2466
|
that = _this2;
|
|
2521
2467
|
confirmPwd = _this2.state.confirmPwd;
|
|
2522
|
-
return
|
|
2468
|
+
return _context15.abrupt('return', new _promise2.default(function (resolve, reject) {
|
|
2523
2469
|
var modal = (0, _asyncModal2.default)({
|
|
2524
2470
|
onPressEnter: function onPressEnter() {
|
|
2525
2471
|
_keyboard2.default.close();
|
|
@@ -2527,8 +2473,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2527
2473
|
// if (v !== '') {
|
|
2528
2474
|
modal.destroy();
|
|
2529
2475
|
|
|
2530
|
-
var
|
|
2531
|
-
confirmPwd =
|
|
2476
|
+
var _ref25 = that.state || {},
|
|
2477
|
+
confirmPwd = _ref25.confirmPwd;
|
|
2532
2478
|
|
|
2533
2479
|
setTimeout(function () {
|
|
2534
2480
|
paymode.authCode = v;
|
|
@@ -2618,8 +2564,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2618
2564
|
type: 'primary', size: 'large', onClick: function onClick() {
|
|
2619
2565
|
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
|
2620
2566
|
|
|
2621
|
-
var
|
|
2622
|
-
confirmPwd =
|
|
2567
|
+
var _ref26 = that.state || {},
|
|
2568
|
+
confirmPwd = _ref26.confirmPwd;
|
|
2623
2569
|
// if (v !== '') {
|
|
2624
2570
|
|
|
2625
2571
|
|
|
@@ -2653,14 +2599,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2653
2599
|
|
|
2654
2600
|
case 3:
|
|
2655
2601
|
case 'end':
|
|
2656
|
-
return
|
|
2602
|
+
return _context15.stop();
|
|
2657
2603
|
}
|
|
2658
2604
|
}
|
|
2659
|
-
},
|
|
2605
|
+
}, _callee15, _this3);
|
|
2660
2606
|
}));
|
|
2661
2607
|
|
|
2662
|
-
return function (
|
|
2663
|
-
return
|
|
2608
|
+
return function (_x9) {
|
|
2609
|
+
return _ref24.apply(this, arguments);
|
|
2664
2610
|
};
|
|
2665
2611
|
}();
|
|
2666
2612
|
|
|
@@ -2714,8 +2660,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2714
2660
|
|
|
2715
2661
|
_this2.onCzkChange = function (v) {
|
|
2716
2662
|
// console.log("czk change:"+new Date().toLocaleTimeString())
|
|
2717
|
-
var
|
|
2718
|
-
isNewRetailBCPos =
|
|
2663
|
+
var _ref27 = _mutantsUtil.platform || {},
|
|
2664
|
+
isNewRetailBCPos = _ref27.isNewRetailBCPos;
|
|
2719
2665
|
|
|
2720
2666
|
if (!isNewRetailBCPos) {
|
|
2721
2667
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
|
@@ -2847,9 +2793,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
2847
2793
|
var that = _this2;
|
|
2848
2794
|
var isStoredValueCard = false;
|
|
2849
2795
|
var discountPrototypeTotalAmount = _this2.state.discountPrototypeTotalAmount;
|
|
2850
|
-
var _this2$
|
|
2851
|
-
isReturn = _this2$
|
|
2852
|
-
type = _this2$
|
|
2796
|
+
var _this2$props3 = _this2.props,
|
|
2797
|
+
isReturn = _this2$props3.isReturn,
|
|
2798
|
+
type = _this2$props3.type;
|
|
2853
2799
|
|
|
2854
2800
|
var isManualIntoAmount = void 0;
|
|
2855
2801
|
// 付款弹窗
|
|
@@ -3296,19 +3242,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3296
3242
|
|
|
3297
3243
|
_this2.hasElectron = hasElectron;
|
|
3298
3244
|
|
|
3299
|
-
var
|
|
3300
|
-
MemberMeStorageCardInputByKeyBoard =
|
|
3301
|
-
ICCardServer =
|
|
3302
|
-
ICCardPassword =
|
|
3245
|
+
var _ref28 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
|
3246
|
+
MemberMeStorageCardInputByKeyBoard = _ref28.MemberMeStorageCardInputByKeyBoard,
|
|
3247
|
+
ICCardServer = _ref28.ICCardServer,
|
|
3248
|
+
ICCardPassword = _ref28.ICCardPassword;
|
|
3303
3249
|
|
|
3304
3250
|
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
|
3305
3251
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
|
3306
3252
|
_this2.iCCardPassword = ICCardPassword; //IC卡密码
|
|
3307
3253
|
//移动端环境下,没有读取IC卡的方式。
|
|
3308
3254
|
|
|
3309
|
-
var
|
|
3310
|
-
isHorizontalPad =
|
|
3311
|
-
isHorizontalSunMi =
|
|
3255
|
+
var _ref29 = _mutantsUtil.platform || {},
|
|
3256
|
+
isHorizontalPad = _ref29.isHorizontalPad,
|
|
3257
|
+
isHorizontalSunMi = _ref29.isHorizontalSunMi;
|
|
3312
3258
|
|
|
3313
3259
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
|
3314
3260
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
|
@@ -3354,7 +3300,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3354
3300
|
|
|
3355
3301
|
//IC卡连接
|
|
3356
3302
|
value: function connectRfCard() {
|
|
3357
|
-
var
|
|
3303
|
+
var _this5 = this;
|
|
3358
3304
|
|
|
3359
3305
|
//客户端环境下,并开启了启用IC卡。
|
|
3360
3306
|
if (this.hasElectron === true && this.iCCardServer === 1) {
|
|
@@ -3365,7 +3311,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3365
3311
|
} else {
|
|
3366
3312
|
result = { connectCardStatus: true, connectCardError: '' };
|
|
3367
3313
|
}
|
|
3368
|
-
|
|
3314
|
+
_this5.setState(result);
|
|
3369
3315
|
});
|
|
3370
3316
|
}
|
|
3371
3317
|
}
|
|
@@ -3374,7 +3320,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3374
3320
|
}, {
|
|
3375
3321
|
key: 'readRfCard',
|
|
3376
3322
|
value: function readRfCard() {
|
|
3377
|
-
var
|
|
3323
|
+
var _this6 = this;
|
|
3378
3324
|
|
|
3379
3325
|
//客户端环境下,并开启了启用IC卡。
|
|
3380
3326
|
if (this.hasElectron === true && this.iCCardServer === 1) {
|
|
@@ -3391,15 +3337,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3391
3337
|
_mutantsMicrofx.nativeMs.setIpcRendererMethod('ReadRfCard', (0, _extends3.default)({}, params), function (ret) {
|
|
3392
3338
|
if (ret.status === 0) {
|
|
3393
3339
|
_message2.default.error(ret.value);
|
|
3394
|
-
|
|
3340
|
+
_this6.connectRfCard(); //读取失败后,重新连接一下。
|
|
3395
3341
|
return;
|
|
3396
3342
|
} else if (ret.status === 1) {
|
|
3397
3343
|
// this.searchMember(ret.value);
|
|
3398
3344
|
// this.czkInput.input["value"]=ret.value;
|
|
3399
|
-
|
|
3345
|
+
_this6.setState({
|
|
3400
3346
|
czkValue: ret.value
|
|
3401
3347
|
});
|
|
3402
|
-
|
|
3348
|
+
_this6.loadCzk(ret.value);
|
|
3403
3349
|
}
|
|
3404
3350
|
});
|
|
3405
3351
|
}
|
|
@@ -3450,8 +3396,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3450
3396
|
PayStyle = _enumController$getEn32.PayStyle;
|
|
3451
3397
|
|
|
3452
3398
|
if (this.currentInput) {
|
|
3453
|
-
if (this.store.paymode.currentMode
|
|
3454
|
-
|
|
3399
|
+
if (this.store.paymode.currentMode) {
|
|
3400
|
+
var paymentType1 = this.store.paymode.currentMode.paymentType;
|
|
3401
|
+
if (paymentType1 === PayStyle.djq || paymentType1 === PayStyle.hyczk || paymentType1 === PayStyle.jfdx) {
|
|
3402
|
+
return;
|
|
3403
|
+
}
|
|
3455
3404
|
}
|
|
3456
3405
|
var value = _keyboard2.default.getNewValue(this.currentInput, this.currentInput.value, key, true);
|
|
3457
3406
|
if (!isNaN(value) || value == '-') {
|
|
@@ -3463,7 +3412,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3463
3412
|
}, {
|
|
3464
3413
|
key: 'renderToolbtn',
|
|
3465
3414
|
value: function renderToolbtn(mode, index) {
|
|
3466
|
-
var
|
|
3415
|
+
var _this7 = this;
|
|
3467
3416
|
|
|
3468
3417
|
var _enumController$getEn33 = _mutantsUtil.enumController.getEnumOj(),
|
|
3469
3418
|
PayIcon = _enumController$getEn33.PayIcon,
|
|
@@ -3500,7 +3449,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3500
3449
|
return _react2.default.createElement(
|
|
3501
3450
|
'div',
|
|
3502
3451
|
{ key: index + "", className: paymodeDisabled + ' ' + paymodeSelected + ' paymode hotkey_' + this.compoundHotkeysList[hotkeyIndex], onClick: function onClick() {
|
|
3503
|
-
|
|
3452
|
+
_this7.onTabsClick(mode.paymentType);
|
|
3504
3453
|
} },
|
|
3505
3454
|
_react2.default.createElement(
|
|
3506
3455
|
'div',
|
|
@@ -3537,7 +3486,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3537
3486
|
}, {
|
|
3538
3487
|
key: 'render',
|
|
3539
3488
|
value: function render() {
|
|
3540
|
-
var
|
|
3489
|
+
var _this8 = this;
|
|
3541
3490
|
|
|
3542
3491
|
var _enumController$getEn34 = _mutantsUtil.enumController.getEnumOj(),
|
|
3543
3492
|
PayIcon = _enumController$getEn34.PayIcon,
|
|
@@ -3556,8 +3505,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3556
3505
|
newPassConfirm = _state2.newPassConfirm,
|
|
3557
3506
|
newPass = _state2.newPass;
|
|
3558
3507
|
|
|
3559
|
-
var
|
|
3560
|
-
isNewRetailBCPos =
|
|
3508
|
+
var _ref30 = _mutantsUtil.platform || {},
|
|
3509
|
+
isNewRetailBCPos = _ref30.isNewRetailBCPos;
|
|
3561
3510
|
|
|
3562
3511
|
var _store2 = this.store,
|
|
3563
3512
|
paymode = _store2.paymode,
|
|
@@ -3578,7 +3527,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3578
3527
|
var totalTaxAmount = this.context && this.context.viewModel && this.context.viewModel.data && this.context.viewModel.data.TotalTaxAmount;
|
|
3579
3528
|
// 单据模式
|
|
3580
3529
|
var thePaymodes = newStyle ? (0, _filter3.default)(paymode.thePaymodes, function (m) {
|
|
3581
|
-
return !(
|
|
3530
|
+
return !(_this8.checkModeDisabled(m.paymentType, brefund, boriginReturn) && parseFloat(m.value) == 0);
|
|
3582
3531
|
}) : paymode.thePaymodes;
|
|
3583
3532
|
var paymodes = paymode.paymodes,
|
|
3584
3533
|
settle = paymode.settle,
|
|
@@ -3620,11 +3569,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3620
3569
|
quantity4 = 0;
|
|
3621
3570
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
|
3622
3571
|
|
|
3623
|
-
var
|
|
3624
|
-
|
|
3625
|
-
buyQuantity =
|
|
3626
|
-
|
|
3627
|
-
returnQuantity =
|
|
3572
|
+
var _ref31 = quantityDetail || {},
|
|
3573
|
+
_ref31$buyQuantity = _ref31.buyQuantity,
|
|
3574
|
+
buyQuantity = _ref31$buyQuantity === undefined ? 0 : _ref31$buyQuantity,
|
|
3575
|
+
_ref31$returnQuantity = _ref31.returnQuantity,
|
|
3576
|
+
returnQuantity = _ref31$returnQuantity === undefined ? 0 : _ref31$returnQuantity;
|
|
3628
3577
|
|
|
3629
3578
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
|
3630
3579
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
|
@@ -3648,7 +3597,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3648
3597
|
return _react2.default.createElement(
|
|
3649
3598
|
'div',
|
|
3650
3599
|
{ className: 'billingSettlement', ref: function ref(r) {
|
|
3651
|
-
return
|
|
3600
|
+
return _this8.billingSettlementDocumnet = r;
|
|
3652
3601
|
} },
|
|
3653
3602
|
this.props.MemberPoints ? _react2.default.createElement(
|
|
3654
3603
|
'div',
|
|
@@ -3778,9 +3727,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3778
3727
|
return _react2.default.createElement(
|
|
3779
3728
|
_button2.default,
|
|
3780
3729
|
{ className: (0, _classnames4.default)({ "quick": true, "quick2": type == 1 }), key: 'paymentType_' + p.paymentType, onClick: function onClick() {
|
|
3781
|
-
|
|
3730
|
+
_this8.btnDebounced(p.paymentType, true);
|
|
3782
3731
|
},
|
|
3783
|
-
disabled: productsIsEmpty || type != 1 &&
|
|
3732
|
+
disabled: productsIsEmpty || type != 1 && _this8.checkModeDisabled(p.paymentType, (_this8.context.viewModel.data.TotalTaxAmount || 0 - _this8.context.viewModel.data.OnlinePaymentAmount || 0) < 0, boriginReturn) },
|
|
3784
3733
|
_react2.default.createElement(
|
|
3785
3734
|
'div',
|
|
3786
3735
|
{ className: (0, _classnames4.default)((_classnames2 = {}, (0, _defineProperty3.default)(_classnames2, iconclass, true), (0, _defineProperty3.default)(_classnames2, "icon", true), _classnames2)) },
|
|
@@ -3796,7 +3745,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3796
3745
|
_react2.default.createElement(
|
|
3797
3746
|
_button2.default,
|
|
3798
3747
|
{ key: 'settle', className: (0, _classnames4.default)({ "settle": true, "settle2": type == 1, "settleStorage": true, 'primary-btn': true }), onClick: function onClick() {
|
|
3799
|
-
|
|
3748
|
+
_this8.btnDebounced();
|
|
3800
3749
|
}, disabled: productsIsEmpty },
|
|
3801
3750
|
this.props.isMemberPoints ? '立即兑换' : this.props.isMemberPointsReturn ? '退货' : settle.name
|
|
3802
3751
|
)
|
|
@@ -3824,7 +3773,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3824
3773
|
'div',
|
|
3825
3774
|
null,
|
|
3826
3775
|
(0, _map3.default)(paymodes, function (mode, index) {
|
|
3827
|
-
return
|
|
3776
|
+
return _this8.renderToolbtn(mode, index);
|
|
3828
3777
|
})
|
|
3829
3778
|
),
|
|
3830
3779
|
paymodes.length > carouselStart && this.paymodesCarouselList(params, paymodes, carouselStart)
|
|
@@ -3861,28 +3810,28 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3861
3810
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
|
3862
3811
|
className: _index.hotKey.hotKeyNotFilter(),
|
|
3863
3812
|
onClick: function onClick() {
|
|
3864
|
-
|
|
3813
|
+
_this8.editModal(index, mode.paymentType, boriginReturn);
|
|
3865
3814
|
}, value: (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
|
3866
3815
|
className: _index.hotKey.hotKeyNotFilter(),
|
|
3867
3816
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
3868
3817
|
onClick: function onClick(e) {
|
|
3869
|
-
return
|
|
3818
|
+
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
|
3870
3819
|
},
|
|
3871
3820
|
onBlur: function onBlur(e) {
|
|
3872
|
-
return
|
|
3821
|
+
return _this8.onBlur(index, e);
|
|
3873
3822
|
},
|
|
3874
3823
|
onFocus: function onFocus(e) {
|
|
3875
|
-
return
|
|
3824
|
+
return _this8.onFocusHack(index, mode, paymode, e);
|
|
3876
3825
|
},
|
|
3877
3826
|
onChange: function onChange(e) {
|
|
3878
|
-
return
|
|
3827
|
+
return _this8.handleChange(index, e);
|
|
3879
3828
|
}
|
|
3880
3829
|
})
|
|
3881
3830
|
),
|
|
3882
3831
|
_react2.default.createElement(
|
|
3883
3832
|
'span',
|
|
3884
3833
|
{ className: 'minus', onClick: function onClick() {
|
|
3885
|
-
|
|
3834
|
+
_this8.onDelPay(index, boriginReturn && mode.boriginReturn, mode.paymentType);
|
|
3886
3835
|
} },
|
|
3887
3836
|
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
3888
3837
|
)
|
|
@@ -3928,7 +3877,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
3928
3877
|
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === mode.paymethodId && !isReturn && _react2.default.createElement(
|
|
3929
3878
|
_button2.default,
|
|
3930
3879
|
{ onClick: function onClick() {
|
|
3931
|
-
|
|
3880
|
+
_this8.appendCzkmode(boriginReturn, 'noPlaySetPwd');
|
|
3932
3881
|
}, className: 'addCard btn-border-primary' },
|
|
3933
3882
|
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
3934
3883
|
_react2.default.createElement(
|
|
@@ -4169,7 +4118,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4169
4118
|
'\u8BF7\u6DFB\u52A0\u7ED3\u7B97\u65B9\u5F0F'
|
|
4170
4119
|
),
|
|
4171
4120
|
(0, _map3.default)(thePaymodes, function (mode, mindex) {
|
|
4172
|
-
var isReturn =
|
|
4121
|
+
var isReturn = _this8.props.isReturn;
|
|
4173
4122
|
|
|
4174
4123
|
var hasSMZF = (0, _find3.default)(thePaymodes, function (m) {
|
|
4175
4124
|
return m.paymentType === PayStyle.smzf;
|
|
@@ -4213,7 +4162,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4213
4162
|
_react2.default.createElement(
|
|
4214
4163
|
'div',
|
|
4215
4164
|
{ className: 'hotkey' },
|
|
4216
|
-
|
|
4165
|
+
_this8.isHorizontalPad ? '' : _this8.compoundHotkeysList[hotkeyIndex] || ''
|
|
4217
4166
|
)
|
|
4218
4167
|
),
|
|
4219
4168
|
_react2.default.createElement(
|
|
@@ -4221,8 +4170,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4221
4170
|
{ className: (0, _classnames4.default)({ "content": true }) },
|
|
4222
4171
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4223
4172
|
|
|
4224
|
-
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
|
4225
|
-
disabled:
|
|
4173
|
+
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex]),
|
|
4174
|
+
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
|
4226
4175
|
onClick: function onClick() {
|
|
4227
4176
|
// let czkinput = document.getElementById('inputS' + index);
|
|
4228
4177
|
// if (mode.paymentType === PayStyle.hyczk) {
|
|
@@ -4235,10 +4184,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4235
4184
|
// mode.paymentType == PayStyle.hyczk && czkinput && czkinput.value !== '0.00' ? this.editCzkModal() :
|
|
4236
4185
|
if (mode.paymentType == PayStyle.hyczk) {
|
|
4237
4186
|
if (themodeHyczk && themodeHyczk.length === 0) {
|
|
4238
|
-
|
|
4187
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4239
4188
|
}
|
|
4240
4189
|
} else {
|
|
4241
|
-
|
|
4190
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4242
4191
|
}
|
|
4243
4192
|
},
|
|
4244
4193
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
@@ -4246,20 +4195,20 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4246
4195
|
}), function (sum, m) {
|
|
4247
4196
|
return Math.Add(sum, m.value);
|
|
4248
4197
|
}, 0)) : (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4249
|
-
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
|
4250
|
-
disabled:
|
|
4198
|
+
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex]),
|
|
4199
|
+
disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn) || _this8.checkScanDisabled(mode.paymentType),
|
|
4251
4200
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
4252
4201
|
onClick: function onClick(e) {
|
|
4253
|
-
return
|
|
4202
|
+
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
|
4254
4203
|
},
|
|
4255
4204
|
onBlur: function onBlur(e) {
|
|
4256
|
-
return
|
|
4205
|
+
return _this8.onBlur(index, e);
|
|
4257
4206
|
},
|
|
4258
4207
|
onFocus: function onFocus(e) {
|
|
4259
|
-
return
|
|
4208
|
+
return _this8.onFocusHack(index, mode, paymode, e);
|
|
4260
4209
|
},
|
|
4261
4210
|
onChange: function onChange(e) {
|
|
4262
|
-
return
|
|
4211
|
+
return _this8.handleChange(index, e);
|
|
4263
4212
|
}
|
|
4264
4213
|
})
|
|
4265
4214
|
)
|
|
@@ -4308,7 +4257,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4308
4257
|
themodeHyczk && themodeHyczk.length && themodeHyczk[themodeHyczk.length - 1].paymethodId === m.paymethodId && _react2.default.createElement(
|
|
4309
4258
|
_button2.default,
|
|
4310
4259
|
{ onClick: function onClick() {
|
|
4311
|
-
return
|
|
4260
|
+
return _this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4312
4261
|
}, className: 'addCard btn-border-primary' },
|
|
4313
4262
|
_react2.default.createElement(_ticon2.default, { type: 'jiahao', className: 'plus b-theme-color' }),
|
|
4314
4263
|
_react2.default.createElement(
|
|
@@ -4375,7 +4324,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4375
4324
|
'div',
|
|
4376
4325
|
null,
|
|
4377
4326
|
(0, _map3.default)(paymodes, function (mode, index) {
|
|
4378
|
-
return
|
|
4327
|
+
return _this8.renderToolbtn(mode, index);
|
|
4379
4328
|
})
|
|
4380
4329
|
),
|
|
4381
4330
|
paymodes.length > carouselStart2 && this.paymodesCarouselList(params, paymodes, carouselStart2)
|
|
@@ -4486,24 +4435,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4486
4435
|
{ className: (0, _classnames4.default)({ "content": true }) },
|
|
4487
4436
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4488
4437
|
onClick: function onClick() {
|
|
4489
|
-
|
|
4438
|
+
_this8.editModal(index, mode.paymentType);
|
|
4490
4439
|
}, value: (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4491
4440
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
4492
4441
|
onBlur: function onBlur(e) {
|
|
4493
|
-
return
|
|
4442
|
+
return _this8.onBlur(index, e);
|
|
4494
4443
|
},
|
|
4495
4444
|
onChange: function onChange(e) {
|
|
4496
|
-
return
|
|
4445
|
+
return _this8.handleChange(index, e);
|
|
4497
4446
|
},
|
|
4498
4447
|
onFocus: function onFocus(e) {
|
|
4499
|
-
return
|
|
4448
|
+
return _this8.onFocusHack(index, mode, paymode, e);
|
|
4500
4449
|
}
|
|
4501
4450
|
})
|
|
4502
4451
|
),
|
|
4503
4452
|
_react2.default.createElement(
|
|
4504
4453
|
'div',
|
|
4505
4454
|
{ className: 'minus', onClick: function onClick() {
|
|
4506
|
-
|
|
4455
|
+
_this8.onDelPay(index);
|
|
4507
4456
|
} },
|
|
4508
4457
|
_react2.default.createElement(_ticon2.default, { type: 'shanchu', className: 'minusIcon primary-color' })
|
|
4509
4458
|
)
|
|
@@ -4693,7 +4642,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4693
4642
|
|
|
4694
4643
|
// _map(_sortBy(thePaymodes, pay => pay['order'] || 0), (mode) => {
|
|
4695
4644
|
(0, _map3.default)(thePaymodes, function (mode, mindex) {
|
|
4696
|
-
var isReturn =
|
|
4645
|
+
var isReturn = _this8.props.isReturn;
|
|
4697
4646
|
|
|
4698
4647
|
var hasSMZF = (0, _find3.default)(thePaymodes, function (m) {
|
|
4699
4648
|
return m.paymentType === PayStyle.smzf;
|
|
@@ -4737,7 +4686,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4737
4686
|
_react2.default.createElement(
|
|
4738
4687
|
'div',
|
|
4739
4688
|
{ className: 'hotkey' },
|
|
4740
|
-
|
|
4689
|
+
_this8.isHorizontalPad ? '' : _this8.compoundHotkeysList[mindex] || ""
|
|
4741
4690
|
)
|
|
4742
4691
|
),
|
|
4743
4692
|
_react2.default.createElement(
|
|
@@ -4745,32 +4694,32 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4745
4694
|
{ className: (0, _classnames4.default)({ "content": true }) },
|
|
4746
4695
|
mode.paymentType == PayStyle.hyczk || mode.paymentType == PayStyle.jfdx || mode.paymentType == PayStyle.djq ? _react2.default.createElement('input', { id: 'inputS' + index
|
|
4747
4696
|
// className={classnames({'paymode':mode.paymentType == PayStyle.hyczk?(_findIndex(thePaymodes,(m)=>{return m.paymentType==PayStyle.hyczk;})==mindex?true:false):true})}
|
|
4748
|
-
, className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
|
4697
|
+
, className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex])
|
|
4749
4698
|
// className="paymode"
|
|
4750
|
-
, disabled:
|
|
4699
|
+
, disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn),
|
|
4751
4700
|
onClick: function onClick() {
|
|
4752
|
-
|
|
4701
|
+
_this8.onHotKeyClick1(mode, index, boriginReturn);
|
|
4753
4702
|
},
|
|
4754
4703
|
value: mode.paymentType == PayStyle.hyczk ? (0, _utils.getFixedNumber)((0, _reduce3.default)((0, _filter3.default)(thePaymodes, function (tm) {
|
|
4755
4704
|
return tm.paymentType == PayStyle.hyczk;
|
|
4756
4705
|
}), function (sum, m) {
|
|
4757
4706
|
return Math.Add(sum, m.value);
|
|
4758
4707
|
}, 0)) : (0, _utils.getFixedNumber)(mode.value) }) : _react2.default.createElement('input', { id: 'inputS' + index,
|
|
4759
|
-
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" +
|
|
4708
|
+
className: _index.hotKey.hotKeyNotFilter("paymode hotkey_" + _this8.compoundHotkeysList[hotkeyIndex])
|
|
4760
4709
|
// className="paymode"
|
|
4761
|
-
, disabled:
|
|
4710
|
+
, disabled: _this8.checkModeDisabled(mode.paymentType, brefund, boriginReturn) || _this8.checkScanDisabled(mode.paymentType),
|
|
4762
4711
|
value: mode.exchangeRate != 1 ? mode.value2 : mode.value,
|
|
4763
4712
|
onClick: function onClick(e) {
|
|
4764
|
-
return
|
|
4713
|
+
return _this8.onHotKeyClick2(index, mode, paymode, e);
|
|
4765
4714
|
},
|
|
4766
4715
|
onBlur: function onBlur(e) {
|
|
4767
|
-
return
|
|
4716
|
+
return _this8.onBlur(index, e);
|
|
4768
4717
|
},
|
|
4769
4718
|
onFocus: function onFocus(e) {
|
|
4770
|
-
return
|
|
4719
|
+
return _this8.onFocusHack(index, mode, paymode, e);
|
|
4771
4720
|
},
|
|
4772
4721
|
onChange: function onChange(e) {
|
|
4773
|
-
return
|
|
4722
|
+
return _this8.handleChange(index, e);
|
|
4774
4723
|
}
|
|
4775
4724
|
})
|
|
4776
4725
|
)
|
|
@@ -4953,79 +4902,79 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
4953
4902
|
placeholder: '\u8BF7\u626B\u63CF\u6216\u8F93\u5165\u624B\u673A\u53F7/\u50A8\u503C\u5361\u53F7',
|
|
4954
4903
|
className: 'input ' + (this.hasElectron === true && this.iCCardServer === 1 || this.isHorizontalPad === true ? 'temp' : ''),
|
|
4955
4904
|
onChange: function onChange(e) {
|
|
4956
|
-
return
|
|
4905
|
+
return _this8.onCzkChange(e.target.value);
|
|
4957
4906
|
},
|
|
4958
4907
|
defaultValue: currentMode && currentMode.storageCardNo,
|
|
4959
4908
|
value: czkValue,
|
|
4960
4909
|
ref: function ref(input) {
|
|
4961
|
-
return
|
|
4910
|
+
return _this8.czkInput = input;
|
|
4962
4911
|
},
|
|
4963
4912
|
onKeyDown: function () {
|
|
4964
|
-
var
|
|
4913
|
+
var _ref32 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(e) {
|
|
4965
4914
|
var time, _paymode;
|
|
4966
4915
|
|
|
4967
|
-
return _regenerator2.default.wrap(function
|
|
4916
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
|
4968
4917
|
while (1) {
|
|
4969
|
-
switch (
|
|
4918
|
+
switch (_context16.prev = _context16.next) {
|
|
4970
4919
|
case 0:
|
|
4971
4920
|
if (!(e.keyCode == 13)) {
|
|
4972
|
-
|
|
4921
|
+
_context16.next = 14;
|
|
4973
4922
|
break;
|
|
4974
4923
|
}
|
|
4975
4924
|
|
|
4976
4925
|
time = Date.parse(new Date());
|
|
4977
4926
|
|
|
4978
|
-
if (!(
|
|
4979
|
-
|
|
4927
|
+
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
|
4928
|
+
_context16.next = 7;
|
|
4980
4929
|
break;
|
|
4981
4930
|
}
|
|
4982
4931
|
|
|
4983
4932
|
_message2.default.warn('储值卡不可键盘录入,请刷卡!');
|
|
4984
|
-
|
|
4985
|
-
|
|
4933
|
+
_this8.keypressStime = null;
|
|
4934
|
+
_this8.setState({
|
|
4986
4935
|
czkValue: null
|
|
4987
4936
|
});
|
|
4988
|
-
return
|
|
4937
|
+
return _context16.abrupt('return');
|
|
4989
4938
|
|
|
4990
4939
|
case 7:
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
return
|
|
4940
|
+
_this8.keypressStime = null;
|
|
4941
|
+
_context16.next = 10;
|
|
4942
|
+
return _this8.loadCzk(e.target.value);
|
|
4994
4943
|
|
|
4995
4944
|
case 10:
|
|
4996
|
-
_paymode =
|
|
4945
|
+
_paymode = _this8.store.paymode;
|
|
4997
4946
|
|
|
4998
4947
|
if (!_paymode.currentMode.storageCardNo) {
|
|
4999
|
-
|
|
4948
|
+
_this8.setState({
|
|
5000
4949
|
czkvalue: null
|
|
5001
4950
|
});
|
|
5002
4951
|
}
|
|
5003
|
-
|
|
4952
|
+
_context16.next = 15;
|
|
5004
4953
|
break;
|
|
5005
4954
|
|
|
5006
4955
|
case 14:
|
|
5007
|
-
if (!
|
|
5008
|
-
|
|
4956
|
+
if (!_this8.keypressStime && e.keyCode !== 8) {
|
|
4957
|
+
_this8.keypressStime = Date.parse(new Date());
|
|
5009
4958
|
}
|
|
5010
4959
|
|
|
5011
4960
|
case 15:
|
|
5012
4961
|
case 'end':
|
|
5013
|
-
return
|
|
4962
|
+
return _context16.stop();
|
|
5014
4963
|
}
|
|
5015
4964
|
}
|
|
5016
|
-
},
|
|
4965
|
+
}, _callee16, _this8);
|
|
5017
4966
|
}));
|
|
5018
4967
|
|
|
5019
|
-
return function (
|
|
5020
|
-
return
|
|
4968
|
+
return function (_x11) {
|
|
4969
|
+
return _ref32.apply(this, arguments);
|
|
5021
4970
|
};
|
|
5022
4971
|
}(),
|
|
5023
4972
|
onFocus: function onFocus(e) {
|
|
5024
|
-
|
|
5025
|
-
!
|
|
5026
|
-
var value = _keyboard2.default.getNewValue(
|
|
5027
|
-
|
|
5028
|
-
},
|
|
4973
|
+
_this8.inputTarget = _this8.czkInput.input;
|
|
4974
|
+
!_this8.state.prototypeVisible && _keyboard2.default.open(function (v) {
|
|
4975
|
+
var value = _keyboard2.default.getNewValue(_this8.inputTarget, _this8.inputTarget.value, v);
|
|
4976
|
+
_this8.onCzkChange(value);
|
|
4977
|
+
}, _this8.czkKeyboardOnOk, _this8.czkKeyboardOnClose)();
|
|
5029
4978
|
},
|
|
5030
4979
|
onBlur: function onBlur(e) {
|
|
5031
4980
|
_keyboard2.default.close();
|
|
@@ -5037,7 +4986,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5037
4986
|
|
|
5038
4987
|
/* 扫描组件 */
|
|
5039
4988
|
this.isHorizontalPad && _react2.default.createElement(_scan2.default, { ref: function ref(scan) {
|
|
5040
|
-
return
|
|
4989
|
+
return _this8.scanObj = scan;
|
|
5041
4990
|
}, onChange: this.onScanCzkResult })
|
|
5042
4991
|
),
|
|
5043
4992
|
_react2.default.createElement(
|
|
@@ -5071,22 +5020,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5071
5020
|
className: _index.hotKey.hotKeyNotFilter('input'),
|
|
5072
5021
|
value: storageValue,
|
|
5073
5022
|
onChange: function onChange(event) {
|
|
5074
|
-
|
|
5023
|
+
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
5075
5024
|
},
|
|
5076
5025
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
|
5077
|
-
ref: function ref(
|
|
5078
|
-
return
|
|
5026
|
+
ref: function ref(_ref33) {
|
|
5027
|
+
return _this8["inputCzkAmount"] = _ref33;
|
|
5079
5028
|
},
|
|
5080
5029
|
onFocus: function onFocus(e) {
|
|
5081
|
-
|
|
5030
|
+
_this8.inputkey = "inputCzkAmount";
|
|
5082
5031
|
_keyboard2.default.open(function (v) {
|
|
5083
|
-
var value = _keyboard2.default.getNewValue(
|
|
5084
|
-
|
|
5085
|
-
},
|
|
5032
|
+
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
5033
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.balance));
|
|
5034
|
+
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
5086
5035
|
},
|
|
5087
5036
|
onBlur: function onBlur(e) {
|
|
5088
5037
|
_keyboard2.default.close();
|
|
5089
|
-
|
|
5038
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputCzkAmount.input.value), Math.min(currentMode.maxamount, currentMode.balance));
|
|
5090
5039
|
}
|
|
5091
5040
|
})
|
|
5092
5041
|
)
|
|
@@ -5213,16 +5162,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5213
5162
|
maxLength: 6,
|
|
5214
5163
|
value: newPass,
|
|
5215
5164
|
ref: function ref(input) {
|
|
5216
|
-
return
|
|
5165
|
+
return _this8.inputNewAmount = input;
|
|
5217
5166
|
},
|
|
5218
5167
|
onChange: function onChange(value) {
|
|
5219
|
-
return
|
|
5168
|
+
return _this8.setPwdValue('newPass', value.target.value);
|
|
5220
5169
|
},
|
|
5221
5170
|
onBlur: function onBlur(value) {
|
|
5222
|
-
return
|
|
5171
|
+
return _this8.handleBlur('newPass');
|
|
5223
5172
|
},
|
|
5224
5173
|
onPressEnter: function onPressEnter() {
|
|
5225
|
-
return
|
|
5174
|
+
return _this8.onPressEnterCzk('newPass');
|
|
5226
5175
|
}
|
|
5227
5176
|
})
|
|
5228
5177
|
)
|
|
@@ -5245,16 +5194,16 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5245
5194
|
maxLength: 6,
|
|
5246
5195
|
value: newPassConfirm,
|
|
5247
5196
|
ref: function ref(input) {
|
|
5248
|
-
return
|
|
5197
|
+
return _this8.inputConfirmAmount = input;
|
|
5249
5198
|
},
|
|
5250
5199
|
onChange: function onChange(value) {
|
|
5251
|
-
return
|
|
5200
|
+
return _this8.setPwdValue('newPassConfirm', value.target.value);
|
|
5252
5201
|
},
|
|
5253
5202
|
onBlur: function onBlur(value) {
|
|
5254
|
-
return
|
|
5203
|
+
return _this8.handleBlur('newPassConfirm');
|
|
5255
5204
|
},
|
|
5256
5205
|
onPressEnter: function onPressEnter() {
|
|
5257
|
-
return
|
|
5206
|
+
return _this8.onPressEnterCzk('newPassConfirm');
|
|
5258
5207
|
}
|
|
5259
5208
|
})
|
|
5260
5209
|
)
|
|
@@ -5314,22 +5263,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5314
5263
|
// onChange={this.onDjqChange}
|
|
5315
5264
|
// value={currentMode && currentMode.member.cardNo}
|
|
5316
5265
|
, ref: function ref(input) {
|
|
5317
|
-
return
|
|
5266
|
+
return _this8.inputdjq = input;
|
|
5318
5267
|
},
|
|
5319
5268
|
onKeyDown: function onKeyDown(e) {
|
|
5320
5269
|
if (e.keyCode == 13) {
|
|
5321
|
-
|
|
5270
|
+
_this8.addDjq(e.target.value);
|
|
5322
5271
|
}
|
|
5323
5272
|
},
|
|
5324
5273
|
onFocus: function onFocus(e) {
|
|
5325
|
-
|
|
5274
|
+
_this8.inputTarget = _this8.inputdjq.input;
|
|
5326
5275
|
_keyboard2.default.open(function (v) {
|
|
5327
|
-
var value = _keyboard2.default.getNewValue(
|
|
5328
|
-
|
|
5329
|
-
},
|
|
5276
|
+
var value = _keyboard2.default.getNewValue(_this8.inputTarget, _this8.inputTarget.value, v);
|
|
5277
|
+
_this8.onDjqChange(value, true);
|
|
5278
|
+
}, _this8.djqKeyboardOnOk, _this8.djqKeyboardOnClose)();
|
|
5330
5279
|
},
|
|
5331
5280
|
onBlur: function onBlur(e) {
|
|
5332
|
-
_keyboard2.default.close();
|
|
5281
|
+
_keyboard2.default.close();_this8.inputdjq.input.value = '';
|
|
5333
5282
|
}
|
|
5334
5283
|
})
|
|
5335
5284
|
),
|
|
@@ -5363,7 +5312,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5363
5312
|
{ className: 'col3' },
|
|
5364
5313
|
_react2.default.createElement(_ticon2.default, { type: 'saomiao1', className: 'icon', onClick: this.changeScanProduct }),
|
|
5365
5314
|
_react2.default.createElement(_scan2.default, { ref: function ref(scan) {
|
|
5366
|
-
return
|
|
5315
|
+
return _this8.scanObj = scan;
|
|
5367
5316
|
}, onChange: this.onScanDjqResult })
|
|
5368
5317
|
)
|
|
5369
5318
|
),
|
|
@@ -5374,10 +5323,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5374
5323
|
'div',
|
|
5375
5324
|
{ className: 'djq2' },
|
|
5376
5325
|
currentMode && currentMode.djqs && currentMode.djqs.length > 0 ? (0, _map3.default)(currentMode.djqs || [], function (q, index) {
|
|
5377
|
-
if (!
|
|
5326
|
+
if (!_this8.state.couponLight && !q.count) {
|
|
5378
5327
|
return;
|
|
5379
5328
|
}
|
|
5380
|
-
if (
|
|
5329
|
+
if (_this8.state.couponLight && q.count && q.count === 1) {
|
|
5381
5330
|
return;
|
|
5382
5331
|
}
|
|
5383
5332
|
return _react2.default.createElement(
|
|
@@ -5392,7 +5341,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5392
5341
|
_react2.default.createElement(
|
|
5393
5342
|
'span',
|
|
5394
5343
|
null,
|
|
5395
|
-
q.
|
|
5344
|
+
q.nominalAmount
|
|
5396
5345
|
),
|
|
5397
5346
|
_react2.default.createElement(
|
|
5398
5347
|
'span',
|
|
@@ -5431,7 +5380,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5431
5380
|
_react2.default.createElement(
|
|
5432
5381
|
'div',
|
|
5433
5382
|
{ className: (0, _classnames4.default)('djqRight', { 'djqRightSelected': q.checked }), onClick: function onClick(e) {
|
|
5434
|
-
return q.IsEnable ?
|
|
5383
|
+
return q.IsEnable ? _this8.djqChecked(q, _this8.props.dto) : null;
|
|
5435
5384
|
} },
|
|
5436
5385
|
q.checked ? _react2.default.createElement(_ticon2.default, { className: 'checkIcon primary-color', type: 'xuanzhong1' }) : _react2.default.createElement('span', { className: '' + (q.IsEnable ? 'noxuanzhong' : 'noxuanzhong1') }),
|
|
5437
5386
|
q.checked ? _react2.default.createElement(
|
|
@@ -5738,22 +5687,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
|
5738
5687
|
type: 'text',
|
|
5739
5688
|
value: storageValue,
|
|
5740
5689
|
onChange: function onChange(e) {
|
|
5741
|
-
|
|
5690
|
+
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5742
5691
|
},
|
|
5743
5692
|
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
|
5744
|
-
ref: function ref(
|
|
5745
|
-
return
|
|
5693
|
+
ref: function ref(_ref34) {
|
|
5694
|
+
return _this8["inputJfdxAmount"] = _ref34;
|
|
5746
5695
|
},
|
|
5747
5696
|
onFocus: function onFocus(e) {
|
|
5748
|
-
|
|
5697
|
+
_this8.inputkey = "inputJfdxAmount";
|
|
5749
5698
|
_keyboard2.default.open(function (v) {
|
|
5750
|
-
var value = _keyboard2.default.getNewValue(
|
|
5751
|
-
|
|
5752
|
-
},
|
|
5699
|
+
var value = _keyboard2.default.getNewValue(_this8[_this8.inputkey].input, _this8[_this8.inputkey].input.value, v);
|
|
5700
|
+
_this8.setCurrentModeValue(value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5701
|
+
}, _this8.keyboardOnOk, _this8.keyboardOnClose)();
|
|
5753
5702
|
},
|
|
5754
5703
|
onBlur: function onBlur(e) {
|
|
5755
5704
|
_keyboard2.default.close();
|
|
5756
|
-
|
|
5705
|
+
_this8.setCurrentModeValue((0, _utils.getFixedNumber)(_this8.inputJfdxAmount.input.value), Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
|
5757
5706
|
}
|
|
5758
5707
|
})
|
|
5759
5708
|
)
|