tplus-components-touch 3.45.4 → 3.46.3
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/message/index.js +4 -3
- package/dist/components/message/index.js.map +1 -1
- package/dist/components/modalWraper/index.js +1 -16
- package/dist/components/modalWraper/index.js.map +1 -1
- package/dist/components/modalWraper/style.less +0 -6
- package/dist/components/settlement/asyncModal.js +1 -4
- package/dist/components/settlement/asyncModal.js.map +1 -1
- package/dist/components/settlement/settlement.js +216 -286
- package/dist/components/settlement/settlement.js.map +1 -1
- package/dist/components/settlement/settlement.less +0 -3
- package/dist/components/settlement/settlementStore.js +705 -708
- package/dist/components/settlement/settlementStore.js.map +1 -1
- package/dist/components/ticon/iconfont/demo_index.html +3 -3
- package/dist/components/ticon/iconfont/iconfont.css +3 -3
- package/dist/components/ticon/iconfont/iconfont.eot +0 -0
- package/dist/components/ticon/iconfont/iconfont.js +1 -2
- package/dist/components/ticon/iconfont/iconfont.js.map +1 -1
- package/dist/components/ticon/iconfont/iconfont.svg +593 -0
- package/dist/components/ticon/iconfont/iconfont.ttf +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff +0 -0
- package/dist/components/ticon/iconfont/iconfont.woff2 +0 -0
- package/dist/components/touchTable/index.js +24 -35
- package/dist/components/touchTable/index.js.map +1 -1
- package/dist/components/touchTable/utils.js +0 -13
- package/dist/components/touchTable/utils.js.map +1 -1
- package/dist/index.js +3 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/components/settlement/settlementApi.js +0 -512
- package/dist/components/settlement/settlementApi.js.map +0 -1
@@ -227,7 +227,6 @@ var hasElectron = _mutantsMicrofx.env.platform === _mutantsMicrofx.env.constant.
|
|
227
227
|
var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (_React$Component) {
|
228
228
|
(0, _inherits3.default)(Settlement, _React$Component);
|
229
229
|
|
230
|
-
// 复核结算方式快捷键列表
|
231
230
|
function Settlement(props) {
|
232
231
|
var _this3 = this;
|
233
232
|
|
@@ -270,13 +269,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
270
269
|
czkValue: null,
|
271
270
|
isInputMember: false,
|
272
271
|
selectedRowIndex: 0,
|
273
|
-
isNotAutoFocus: true
|
272
|
+
isNotAutoFocus: true
|
273
|
+
// 复核结算方式快捷键列表
|
274
|
+
};
|
274
275
|
_this2.compoundHotkeysList = (window.$.operationControl[5] ? window.$.operationControl[5].control || [] : []).map(function (key) {
|
275
276
|
return key.toLocaleUpperCase();
|
276
277
|
});
|
277
278
|
_this2.hotkeydebounced = null;
|
278
279
|
_this2.hotkeydebouncedPayMode = "";
|
279
|
-
_this2.voucherRunningFast = false;
|
280
280
|
_this2.currentInput = null;
|
281
281
|
|
282
282
|
_this2.getIsReturn = function () {
|
@@ -791,11 +791,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
791
791
|
storageValue: '0.00',
|
792
792
|
czkValue: null
|
793
793
|
});
|
794
|
-
_this2.closeRfCard();
|
795
794
|
_this2.store.paymode.calcMemberBalance();
|
796
795
|
_this2.handleCzk();
|
797
796
|
|
798
|
-
case
|
797
|
+
case 18:
|
799
798
|
case 'end':
|
800
799
|
return _context2.stop();
|
801
800
|
}
|
@@ -848,7 +847,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
848
847
|
storageValue: '0.00',
|
849
848
|
czkValue: null
|
850
849
|
});
|
851
|
-
_this2.closeRfCard();
|
852
850
|
_keyboard2.default.close();
|
853
851
|
_this2.setInventoryFocus();
|
854
852
|
};
|
@@ -1821,7 +1819,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1821
1819
|
};
|
1822
1820
|
|
1823
1821
|
_this2.settleSuccess = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee8() {
|
1824
|
-
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, isFull, resp1;
|
1822
|
+
var _enumController$getEn20, PayStyle, _this2$store$paymode, amount, received, thePaymodes, IdbusiType, charge, openCashBox, _this, showTwoScreen, _this2$store6, getSettleGift, isFull, type, resp1;
|
1825
1823
|
|
1826
1824
|
return _regenerator2.default.wrap(function _callee8$(_context8) {
|
1827
1825
|
while (1) {
|
@@ -1881,13 +1879,31 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1881
1879
|
}
|
1882
1880
|
};
|
1883
1881
|
|
1884
|
-
|
1885
|
-
|
1886
|
-
|
1882
|
+
_this2$store6 = _this2.store, getSettleGift = _this2$store6.getSettleGift, isFull = _this2$store6.isFull;
|
1883
|
+
type = _this2.props.type;
|
1884
|
+
resp1 = false;
|
1885
|
+
|
1886
|
+
if (!(type !== 1)) {
|
1887
|
+
_context8.next = 20;
|
1888
|
+
break;
|
1889
|
+
}
|
1890
|
+
|
1891
|
+
_context8.prev = 11;
|
1892
|
+
_context8.next = 14;
|
1893
|
+
return getSettleGift();
|
1887
1894
|
|
1888
|
-
case
|
1895
|
+
case 14:
|
1889
1896
|
resp1 = _context8.sent;
|
1897
|
+
_context8.next = 20;
|
1898
|
+
break;
|
1890
1899
|
|
1900
|
+
case 17:
|
1901
|
+
_context8.prev = 17;
|
1902
|
+
_context8.t0 = _context8['catch'](11);
|
1903
|
+
|
1904
|
+
console.log("获取支付礼包getSettleGift失败");
|
1905
|
+
|
1906
|
+
case 20:
|
1891
1907
|
|
1892
1908
|
setTimeout(function () {
|
1893
1909
|
if (window.__loadingModal) {
|
@@ -1921,80 +1937,25 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
1921
1937
|
_this2.cancelState();
|
1922
1938
|
}, 0);
|
1923
1939
|
|
1924
|
-
case
|
1940
|
+
case 21:
|
1925
1941
|
case 'end':
|
1926
1942
|
return _context8.stop();
|
1927
1943
|
}
|
1928
1944
|
}
|
1929
|
-
}, _callee8, _this3);
|
1930
|
-
}));
|
1931
|
-
_this2.settleGiftOpenedInRunningFast = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9() {
|
1932
|
-
var resp, isCheckGift, vocherPayGift, getSettleGift, type;
|
1933
|
-
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
1934
|
-
while (1) {
|
1935
|
-
switch (_context9.prev = _context9.next) {
|
1936
|
-
case 0:
|
1937
|
-
resp = false;
|
1938
|
-
isCheckGift = true;
|
1939
|
-
|
1940
|
-
if (_this2.voucherRunningFast) {
|
1941
|
-
vocherPayGift = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('vocherPayGift');
|
1942
|
-
|
1943
|
-
if (!vocherPayGift || vocherPayGift == 'false') {
|
1944
|
-
isCheckGift = false;
|
1945
|
-
}
|
1946
|
-
}
|
1947
|
-
|
1948
|
-
if (!isCheckGift) {
|
1949
|
-
_context9.next = 16;
|
1950
|
-
break;
|
1951
|
-
}
|
1952
|
-
|
1953
|
-
getSettleGift = _this2.store.getSettleGift;
|
1954
|
-
type = _this2.props.type;
|
1955
|
-
|
1956
|
-
if (!(type != 1)) {
|
1957
|
-
_context9.next = 16;
|
1958
|
-
break;
|
1959
|
-
}
|
1960
|
-
|
1961
|
-
_context9.prev = 7;
|
1962
|
-
_context9.next = 10;
|
1963
|
-
return getSettleGift();
|
1964
|
-
|
1965
|
-
case 10:
|
1966
|
-
resp = _context9.sent;
|
1967
|
-
_context9.next = 16;
|
1968
|
-
break;
|
1969
|
-
|
1970
|
-
case 13:
|
1971
|
-
_context9.prev = 13;
|
1972
|
-
_context9.t0 = _context9['catch'](7);
|
1973
|
-
|
1974
|
-
console.log("获取支付礼包getSettleGift失败");
|
1975
|
-
|
1976
|
-
case 16:
|
1977
|
-
return _context9.abrupt('return', resp);
|
1978
|
-
|
1979
|
-
case 17:
|
1980
|
-
case 'end':
|
1981
|
-
return _context9.stop();
|
1982
|
-
}
|
1983
|
-
}
|
1984
|
-
}, _callee9, _this3, [[7, 13]]);
|
1945
|
+
}, _callee8, _this3, [[11, 17]]);
|
1985
1946
|
}));
|
1986
1947
|
|
1987
1948
|
_this2.handleGuestShow = function (dtype, value) {
|
1988
1949
|
if (_this2.hasElectron === false) return;
|
1989
1950
|
var dt = _mutantsMicrofx.localStore.get('portsetting_hardSet') || [];
|
1990
1951
|
|
1991
|
-
var
|
1992
|
-
guestshow_enable =
|
1993
|
-
guestshow_clear =
|
1994
|
-
guestshow_welcome =
|
1995
|
-
guestshow_collect =
|
1996
|
-
guestshow_refund =
|
1997
|
-
guestshow_change =
|
1952
|
+
var _ref14 = dt || {},
|
1953
|
+
guestshow_enable = _ref14.guestshow_enable,
|
1954
|
+
guestshow_clear = _ref14.guestshow_clear,
|
1955
|
+
guestshow_welcome = _ref14.guestshow_welcome,
|
1956
|
+
guestshow_collect = _ref14.guestshow_collect,
|
1957
|
+
guestshow_refund = _ref14.guestshow_refund,
|
1958
|
+
guestshow_change = _ref14.guestshow_change;
|
1998
1959
|
|
1999
1960
|
var hasSuccess = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('portsetting_hardSet_isSuccess');
|
2000
1961
|
if (!guestshow_enable || !!guestshow_enable && hasSuccess == '0') return;
|
@@ -2029,115 +1990,115 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2029
1990
|
};
|
2030
1991
|
|
2031
1992
|
_this2.handleSettle = function () {
|
2032
|
-
var
|
1993
|
+
var _ref15 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee11(args) {
|
2033
1994
|
var handleUserInputs = function () {
|
2034
|
-
var
|
1995
|
+
var _ref17 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee10(promises) {
|
2035
1996
|
var results, _iteratorNormalCompletion, _didIteratorError, _iteratorError, _iterator, _step, p, _result;
|
2036
1997
|
|
2037
|
-
return _regenerator2.default.wrap(function
|
1998
|
+
return _regenerator2.default.wrap(function _callee10$(_context10) {
|
2038
1999
|
while (1) {
|
2039
|
-
switch (
|
2000
|
+
switch (_context10.prev = _context10.next) {
|
2040
2001
|
case 0:
|
2041
2002
|
results = [];
|
2042
|
-
|
2003
|
+
_context10.prev = 1;
|
2043
2004
|
_iteratorNormalCompletion = true;
|
2044
2005
|
_didIteratorError = false;
|
2045
2006
|
_iteratorError = undefined;
|
2046
|
-
|
2007
|
+
_context10.prev = 5;
|
2047
2008
|
_iterator = (0, _getIterator3.default)(promises);
|
2048
2009
|
|
2049
2010
|
case 7:
|
2050
2011
|
if (_iteratorNormalCompletion = (_step = _iterator.next()).done) {
|
2051
|
-
|
2012
|
+
_context10.next = 16;
|
2052
2013
|
break;
|
2053
2014
|
}
|
2054
2015
|
|
2055
2016
|
p = _step.value;
|
2056
|
-
|
2017
|
+
_context10.next = 11;
|
2057
2018
|
return p;
|
2058
2019
|
|
2059
2020
|
case 11:
|
2060
|
-
_result =
|
2021
|
+
_result = _context10.sent;
|
2061
2022
|
|
2062
2023
|
results.push(_result);
|
2063
2024
|
|
2064
2025
|
case 13:
|
2065
2026
|
_iteratorNormalCompletion = true;
|
2066
|
-
|
2027
|
+
_context10.next = 7;
|
2067
2028
|
break;
|
2068
2029
|
|
2069
2030
|
case 16:
|
2070
|
-
|
2031
|
+
_context10.next = 22;
|
2071
2032
|
break;
|
2072
2033
|
|
2073
2034
|
case 18:
|
2074
|
-
|
2075
|
-
|
2035
|
+
_context10.prev = 18;
|
2036
|
+
_context10.t0 = _context10['catch'](5);
|
2076
2037
|
_didIteratorError = true;
|
2077
|
-
_iteratorError =
|
2038
|
+
_iteratorError = _context10.t0;
|
2078
2039
|
|
2079
2040
|
case 22:
|
2080
|
-
|
2081
|
-
|
2041
|
+
_context10.prev = 22;
|
2042
|
+
_context10.prev = 23;
|
2082
2043
|
|
2083
2044
|
if (!_iteratorNormalCompletion && _iterator.return) {
|
2084
2045
|
_iterator.return();
|
2085
2046
|
}
|
2086
2047
|
|
2087
2048
|
case 25:
|
2088
|
-
|
2049
|
+
_context10.prev = 25;
|
2089
2050
|
|
2090
2051
|
if (!_didIteratorError) {
|
2091
|
-
|
2052
|
+
_context10.next = 28;
|
2092
2053
|
break;
|
2093
2054
|
}
|
2094
2055
|
|
2095
2056
|
throw _iteratorError;
|
2096
2057
|
|
2097
2058
|
case 28:
|
2098
|
-
return
|
2059
|
+
return _context10.finish(25);
|
2099
2060
|
|
2100
2061
|
case 29:
|
2101
|
-
return
|
2062
|
+
return _context10.finish(22);
|
2102
2063
|
|
2103
2064
|
case 30:
|
2104
2065
|
window.__loadingModal = (0, _utils.openLoadingModal)();
|
2105
|
-
|
2066
|
+
_context10.next = 33;
|
2106
2067
|
return commit(results);
|
2107
2068
|
|
2108
2069
|
case 33:
|
2109
|
-
|
2070
|
+
_context10.next = 37;
|
2110
2071
|
break;
|
2111
2072
|
|
2112
2073
|
case 35:
|
2113
|
-
|
2114
|
-
|
2074
|
+
_context10.prev = 35;
|
2075
|
+
_context10.t1 = _context10['catch'](1);
|
2115
2076
|
|
2116
2077
|
case 37:
|
2117
2078
|
case 'end':
|
2118
|
-
return
|
2079
|
+
return _context10.stop();
|
2119
2080
|
}
|
2120
2081
|
}
|
2121
|
-
},
|
2082
|
+
}, _callee10, this, [[1, 35], [5, 18, 22, 30], [23,, 25, 29]]);
|
2122
2083
|
}));
|
2123
2084
|
|
2124
2085
|
return function handleUserInputs(_x6) {
|
2125
|
-
return
|
2086
|
+
return _ref17.apply(this, arguments);
|
2126
2087
|
};
|
2127
2088
|
}();
|
2128
2089
|
|
2129
|
-
var _enumController$getEn21, PayStyle, _this2$
|
2090
|
+
var _enumController$getEn21, PayStyle, _this2$store7, paymode, brefund, boriginReturn, newStyle, isQuickPay, that, status, zeromode, promises, thePaymodes, quickmode, commit;
|
2130
2091
|
|
2131
|
-
return _regenerator2.default.wrap(function
|
2092
|
+
return _regenerator2.default.wrap(function _callee11$(_context11) {
|
2132
2093
|
while (1) {
|
2133
|
-
switch (
|
2094
|
+
switch (_context11.prev = _context11.next) {
|
2134
2095
|
case 0:
|
2135
2096
|
_this2.setState({
|
2136
2097
|
settleDisabled: true
|
2137
2098
|
});
|
2138
2099
|
console.log("settlement.handleSettle开始执行,参数:", +args);
|
2139
2100
|
_enumController$getEn21 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn21.PayStyle;
|
2140
|
-
_this2$
|
2101
|
+
_this2$store7 = _this2.store, paymode = _this2$store7.paymode, brefund = _this2$store7.brefund, boriginReturn = _this2$store7.boriginReturn, newStyle = _this2$store7.newStyle;
|
2141
2102
|
isQuickPay = args === 'quickPay';
|
2142
2103
|
that = _this2;
|
2143
2104
|
status = false;
|
@@ -2152,7 +2113,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2152
2113
|
});
|
2153
2114
|
|
2154
2115
|
if (!(that.checkCharge() && Math.abs(paymode.receivable) > that.props.initData("posChangeUpperAmount"))) {
|
2155
|
-
|
2116
|
+
_context11.next = 13;
|
2156
2117
|
break;
|
2157
2118
|
}
|
2158
2119
|
|
@@ -2160,11 +2121,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2160
2121
|
_this2.setState({
|
2161
2122
|
settleDisabled: false
|
2162
2123
|
});
|
2163
|
-
return
|
2124
|
+
return _context11.abrupt('return');
|
2164
2125
|
|
2165
2126
|
case 13:
|
2166
2127
|
if (!(args !== "zero" && !newStyle)) {
|
2167
|
-
|
2128
|
+
_context11.next = 19;
|
2168
2129
|
break;
|
2169
2130
|
}
|
2170
2131
|
|
@@ -2173,7 +2134,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2173
2134
|
});
|
2174
2135
|
|
2175
2136
|
if (!zeromode) {
|
2176
|
-
|
2137
|
+
_context11.next = 19;
|
2177
2138
|
break;
|
2178
2139
|
}
|
2179
2140
|
|
@@ -2181,7 +2142,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2181
2142
|
settleDisabled: false
|
2182
2143
|
});
|
2183
2144
|
_message2.default.error(zeromode.name + ' 的结算金额为零,不可以结算。');
|
2184
|
-
return
|
2145
|
+
return _context11.abrupt('return');
|
2185
2146
|
|
2186
2147
|
case 19:
|
2187
2148
|
promises = [];
|
@@ -2190,14 +2151,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2190
2151
|
}) : paymode.thePaymodes, 'orderBy');
|
2191
2152
|
|
2192
2153
|
if (!isQuickPay) {
|
2193
|
-
|
2154
|
+
_context11.next = 27;
|
2194
2155
|
break;
|
2195
2156
|
}
|
2196
2157
|
|
2197
2158
|
quickmode = thePaymodes[0];
|
2198
2159
|
|
2199
2160
|
if (!_this2.checkModeDisabled(quickmode.paymentType, brefund, boriginReturn)) {
|
2200
|
-
|
2161
|
+
_context11.next = 27;
|
2201
2162
|
break;
|
2202
2163
|
}
|
2203
2164
|
|
@@ -2205,7 +2166,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2205
2166
|
settleDisabled: false
|
2206
2167
|
});
|
2207
2168
|
_message2.default.error('退款不能使用' + quickmode.name + '结算,请使用其他结算方式!');
|
2208
|
-
return
|
2169
|
+
return _context11.abrupt('return');
|
2209
2170
|
|
2210
2171
|
case 27:
|
2211
2172
|
(0, _forEach3.default)(thePaymodes, function (mode) {
|
@@ -2215,27 +2176,27 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2215
2176
|
});
|
2216
2177
|
|
2217
2178
|
commit = function () {
|
2218
|
-
var
|
2179
|
+
var _ref16 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee9(values) {
|
2219
2180
|
var result;
|
2220
|
-
return _regenerator2.default.wrap(function
|
2181
|
+
return _regenerator2.default.wrap(function _callee9$(_context9) {
|
2221
2182
|
while (1) {
|
2222
|
-
switch (
|
2183
|
+
switch (_context9.prev = _context9.next) {
|
2223
2184
|
case 0:
|
2224
|
-
|
2185
|
+
_context9.next = 2;
|
2225
2186
|
return _this2.store.commit(_this2.props.bTest);
|
2226
2187
|
|
2227
2188
|
case 2:
|
2228
|
-
result =
|
2189
|
+
result = _context9.sent;
|
2229
2190
|
|
2230
2191
|
if (!(result === true)) {
|
2231
|
-
|
2192
|
+
_context9.next = 8;
|
2232
2193
|
break;
|
2233
2194
|
}
|
2234
2195
|
|
2235
2196
|
//成功
|
2236
2197
|
that.settleSuccess();
|
2237
2198
|
_promise2.default.resolve();
|
2238
|
-
|
2199
|
+
_context9.next = 23;
|
2239
2200
|
break;
|
2240
2201
|
|
2241
2202
|
case 8:
|
@@ -2252,24 +2213,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2252
2213
|
}, 0);
|
2253
2214
|
|
2254
2215
|
if (!(result && (result.Code || result.code))) {
|
2255
|
-
|
2216
|
+
_context9.next = 20;
|
2256
2217
|
break;
|
2257
2218
|
}
|
2258
2219
|
|
2259
|
-
|
2260
|
-
|
2220
|
+
_context9.t0 = result.Code || result.code;
|
2221
|
+
_context9.next = _context9.t0 === 'RE_Settle_UnReturn' ? 14 : _context9.t0 === 'ECONNABORTED' ? 18 : 20;
|
2261
2222
|
break;
|
2262
2223
|
|
2263
2224
|
case 14:
|
2264
2225
|
console.log('settlement--RE_Settle_UnReturn--调用清除数据==Focus==');
|
2265
2226
|
_this2.props.clearVoucherData && _this2.props.clearVoucherData();
|
2266
2227
|
_this2.cancelState();
|
2267
|
-
return
|
2228
|
+
return _context9.abrupt('break', 20);
|
2268
2229
|
|
2269
2230
|
case 18:
|
2270
2231
|
//error.code === 'ECONNABORTED' && error.message.indexOf('timeout')
|
2271
2232
|
result.message.indexOf('timeout') > -1 && that.settleUnReturn();
|
2272
|
-
return
|
2233
|
+
return _context9.abrupt('break', 20);
|
2273
2234
|
|
2274
2235
|
case 20:
|
2275
2236
|
if (isQuickPay) {
|
@@ -2277,19 +2238,19 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2277
2238
|
that.cancelState();
|
2278
2239
|
}
|
2279
2240
|
|
2280
|
-
|
2241
|
+
_context9.next = 23;
|
2281
2242
|
return _promise2.default.reject();
|
2282
2243
|
|
2283
2244
|
case 23:
|
2284
2245
|
case 'end':
|
2285
|
-
return
|
2246
|
+
return _context9.stop();
|
2286
2247
|
}
|
2287
2248
|
}
|
2288
|
-
},
|
2249
|
+
}, _callee9, _this3);
|
2289
2250
|
}));
|
2290
2251
|
|
2291
2252
|
return function commit(_x5) {
|
2292
|
-
return
|
2253
|
+
return _ref16.apply(this, arguments);
|
2293
2254
|
};
|
2294
2255
|
}();
|
2295
2256
|
|
@@ -2297,102 +2258,102 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2297
2258
|
|
2298
2259
|
case 30:
|
2299
2260
|
case 'end':
|
2300
|
-
return
|
2261
|
+
return _context11.stop();
|
2301
2262
|
}
|
2302
2263
|
}
|
2303
|
-
},
|
2264
|
+
}, _callee11, _this3);
|
2304
2265
|
}));
|
2305
2266
|
|
2306
2267
|
return function (_x4) {
|
2307
|
-
return
|
2268
|
+
return _ref15.apply(this, arguments);
|
2308
2269
|
};
|
2309
2270
|
}();
|
2310
2271
|
|
2311
|
-
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function
|
2272
|
+
_this2.handleCzk = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee14() {
|
2312
2273
|
var handleUserInputs = function () {
|
2313
|
-
var
|
2274
|
+
var _ref20 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee13(promises) {
|
2314
2275
|
var results, _iteratorNormalCompletion2, _didIteratorError2, _iteratorError2, _iterator2, _step2, p, _result2;
|
2315
2276
|
|
2316
|
-
return _regenerator2.default.wrap(function
|
2277
|
+
return _regenerator2.default.wrap(function _callee13$(_context13) {
|
2317
2278
|
while (1) {
|
2318
|
-
switch (
|
2279
|
+
switch (_context13.prev = _context13.next) {
|
2319
2280
|
case 0:
|
2320
2281
|
results = [];
|
2321
|
-
|
2282
|
+
_context13.prev = 1;
|
2322
2283
|
_iteratorNormalCompletion2 = true;
|
2323
2284
|
_didIteratorError2 = false;
|
2324
2285
|
_iteratorError2 = undefined;
|
2325
|
-
|
2286
|
+
_context13.prev = 5;
|
2326
2287
|
_iterator2 = (0, _getIterator3.default)(promises);
|
2327
2288
|
|
2328
2289
|
case 7:
|
2329
2290
|
if (_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done) {
|
2330
|
-
|
2291
|
+
_context13.next = 16;
|
2331
2292
|
break;
|
2332
2293
|
}
|
2333
2294
|
|
2334
2295
|
p = _step2.value;
|
2335
|
-
|
2296
|
+
_context13.next = 11;
|
2336
2297
|
return p;
|
2337
2298
|
|
2338
2299
|
case 11:
|
2339
|
-
_result2 =
|
2300
|
+
_result2 = _context13.sent;
|
2340
2301
|
|
2341
2302
|
results.push(_result2);
|
2342
2303
|
|
2343
2304
|
case 13:
|
2344
2305
|
_iteratorNormalCompletion2 = true;
|
2345
|
-
|
2306
|
+
_context13.next = 7;
|
2346
2307
|
break;
|
2347
2308
|
|
2348
2309
|
case 16:
|
2349
|
-
|
2310
|
+
_context13.next = 22;
|
2350
2311
|
break;
|
2351
2312
|
|
2352
2313
|
case 18:
|
2353
|
-
|
2354
|
-
|
2314
|
+
_context13.prev = 18;
|
2315
|
+
_context13.t0 = _context13['catch'](5);
|
2355
2316
|
_didIteratorError2 = true;
|
2356
|
-
_iteratorError2 =
|
2317
|
+
_iteratorError2 = _context13.t0;
|
2357
2318
|
|
2358
2319
|
case 22:
|
2359
|
-
|
2360
|
-
|
2320
|
+
_context13.prev = 22;
|
2321
|
+
_context13.prev = 23;
|
2361
2322
|
|
2362
2323
|
if (!_iteratorNormalCompletion2 && _iterator2.return) {
|
2363
2324
|
_iterator2.return();
|
2364
2325
|
}
|
2365
2326
|
|
2366
2327
|
case 25:
|
2367
|
-
|
2328
|
+
_context13.prev = 25;
|
2368
2329
|
|
2369
2330
|
if (!_didIteratorError2) {
|
2370
|
-
|
2331
|
+
_context13.next = 28;
|
2371
2332
|
break;
|
2372
2333
|
}
|
2373
2334
|
|
2374
2335
|
throw _iteratorError2;
|
2375
2336
|
|
2376
2337
|
case 28:
|
2377
|
-
return
|
2338
|
+
return _context13.finish(25);
|
2378
2339
|
|
2379
2340
|
case 29:
|
2380
|
-
return
|
2341
|
+
return _context13.finish(22);
|
2381
2342
|
|
2382
2343
|
case 30:
|
2383
|
-
|
2344
|
+
_context13.next = 32;
|
2384
2345
|
return commit(results);
|
2385
2346
|
|
2386
2347
|
case 32:
|
2387
|
-
|
2348
|
+
_context13.next = 37;
|
2388
2349
|
break;
|
2389
2350
|
|
2390
2351
|
case 34:
|
2391
|
-
|
2392
|
-
|
2352
|
+
_context13.prev = 34;
|
2353
|
+
_context13.t1 = _context13['catch'](1);
|
2393
2354
|
|
2394
|
-
if (
|
2395
|
-
_message2.default.error(
|
2355
|
+
if (_context13.t1 != "cancelpwd") {
|
2356
|
+
_message2.default.error(_context13.t1);
|
2396
2357
|
setTimeout(function () {
|
2397
2358
|
that.handleCzk();
|
2398
2359
|
}, 500);
|
@@ -2400,22 +2361,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2400
2361
|
|
2401
2362
|
case 37:
|
2402
2363
|
case 'end':
|
2403
|
-
return
|
2364
|
+
return _context13.stop();
|
2404
2365
|
}
|
2405
2366
|
}
|
2406
|
-
},
|
2367
|
+
}, _callee13, this, [[1, 34], [5, 18, 22, 30], [23,, 25, 29]]);
|
2407
2368
|
}));
|
2408
2369
|
|
2409
2370
|
return function handleUserInputs(_x8) {
|
2410
|
-
return
|
2371
|
+
return _ref20.apply(this, arguments);
|
2411
2372
|
};
|
2412
2373
|
}();
|
2413
2374
|
|
2414
2375
|
var that, curmode, promises, _enumController$getEn22, PayStyle, commit;
|
2415
2376
|
|
2416
|
-
return _regenerator2.default.wrap(function
|
2377
|
+
return _regenerator2.default.wrap(function _callee14$(_context14) {
|
2417
2378
|
while (1) {
|
2418
|
-
switch (
|
2379
|
+
switch (_context14.prev = _context14.next) {
|
2419
2380
|
case 0:
|
2420
2381
|
that = _this2;
|
2421
2382
|
curmode = _this2.store.paymode.currentMode;
|
@@ -2434,33 +2395,33 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2434
2395
|
}
|
2435
2396
|
|
2436
2397
|
commit = function () {
|
2437
|
-
var
|
2398
|
+
var _ref19 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee12(values) {
|
2438
2399
|
var result;
|
2439
|
-
return _regenerator2.default.wrap(function
|
2400
|
+
return _regenerator2.default.wrap(function _callee12$(_context12) {
|
2440
2401
|
while (1) {
|
2441
|
-
switch (
|
2402
|
+
switch (_context12.prev = _context12.next) {
|
2442
2403
|
case 0:
|
2443
2404
|
if (!(values.length > 0)) {
|
2444
|
-
|
2405
|
+
_context12.next = 6;
|
2445
2406
|
break;
|
2446
2407
|
}
|
2447
2408
|
|
2448
|
-
|
2409
|
+
_context12.next = 3;
|
2449
2410
|
return that.store.validePwd(values[0]);
|
2450
2411
|
|
2451
2412
|
case 3:
|
2452
|
-
|
2453
|
-
|
2413
|
+
_context12.t0 = _context12.sent;
|
2414
|
+
_context12.next = 7;
|
2454
2415
|
break;
|
2455
2416
|
|
2456
2417
|
case 6:
|
2457
|
-
|
2418
|
+
_context12.t0 = "";
|
2458
2419
|
|
2459
2420
|
case 7:
|
2460
|
-
result =
|
2421
|
+
result = _context12.t0;
|
2461
2422
|
|
2462
2423
|
if (!(result == "")) {
|
2463
|
-
|
2424
|
+
_context12.next = 13;
|
2464
2425
|
break;
|
2465
2426
|
}
|
2466
2427
|
|
@@ -2468,23 +2429,23 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2468
2429
|
//返回
|
2469
2430
|
that.setCurrentFocusAndAddPay(curmode.paymentType, null, curmode.paymethodId);
|
2470
2431
|
_promise2.default.resolve();
|
2471
|
-
|
2432
|
+
_context12.next = 15;
|
2472
2433
|
break;
|
2473
2434
|
|
2474
2435
|
case 13:
|
2475
|
-
|
2436
|
+
_context12.next = 15;
|
2476
2437
|
return _promise2.default.reject(result);
|
2477
2438
|
|
2478
2439
|
case 15:
|
2479
2440
|
case 'end':
|
2480
|
-
return
|
2441
|
+
return _context12.stop();
|
2481
2442
|
}
|
2482
2443
|
}
|
2483
|
-
},
|
2444
|
+
}, _callee12, _this3);
|
2484
2445
|
}));
|
2485
2446
|
|
2486
2447
|
return function commit(_x7) {
|
2487
|
-
return
|
2448
|
+
return _ref19.apply(this, arguments);
|
2488
2449
|
};
|
2489
2450
|
}();
|
2490
2451
|
|
@@ -2492,10 +2453,10 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2492
2453
|
|
2493
2454
|
case 6:
|
2494
2455
|
case 'end':
|
2495
|
-
return
|
2456
|
+
return _context14.stop();
|
2496
2457
|
}
|
2497
2458
|
}
|
2498
|
-
},
|
2459
|
+
}, _callee14, _this3);
|
2499
2460
|
}));
|
2500
2461
|
|
2501
2462
|
_this2.fKeyboardOnOk = function (paymethodeId) {
|
@@ -2535,15 +2496,15 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2535
2496
|
};
|
2536
2497
|
|
2537
2498
|
_this2.inputPwd = function () {
|
2538
|
-
var
|
2499
|
+
var _ref21 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee15(paymode) {
|
2539
2500
|
var that, confirmPwd;
|
2540
|
-
return _regenerator2.default.wrap(function
|
2501
|
+
return _regenerator2.default.wrap(function _callee15$(_context15) {
|
2541
2502
|
while (1) {
|
2542
|
-
switch (
|
2503
|
+
switch (_context15.prev = _context15.next) {
|
2543
2504
|
case 0:
|
2544
2505
|
that = _this2;
|
2545
2506
|
confirmPwd = _this2.state.confirmPwd;
|
2546
|
-
return
|
2507
|
+
return _context15.abrupt('return', new _promise2.default(function (resolve, reject) {
|
2547
2508
|
var modal = (0, _asyncModal2.default)({
|
2548
2509
|
onPressEnter: function onPressEnter() {
|
2549
2510
|
_keyboard2.default.close();
|
@@ -2551,8 +2512,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2551
2512
|
// if (v !== '') {
|
2552
2513
|
modal.destroy();
|
2553
2514
|
|
2554
|
-
var
|
2555
|
-
confirmPwd =
|
2515
|
+
var _ref22 = that.state || {},
|
2516
|
+
confirmPwd = _ref22.confirmPwd;
|
2556
2517
|
|
2557
2518
|
setTimeout(function () {
|
2558
2519
|
paymode.authCode = v;
|
@@ -2643,8 +2604,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2643
2604
|
type: 'primary', size: 'large', onClick: function onClick() {
|
2644
2605
|
var v = (0, _trim3.default)(that['inputAmount']['input']['value']);
|
2645
2606
|
|
2646
|
-
var
|
2647
|
-
confirmPwd =
|
2607
|
+
var _ref23 = that.state || {},
|
2608
|
+
confirmPwd = _ref23.confirmPwd;
|
2648
2609
|
// if (v !== '') {
|
2649
2610
|
|
2650
2611
|
|
@@ -2678,24 +2639,24 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2678
2639
|
|
2679
2640
|
case 3:
|
2680
2641
|
case 'end':
|
2681
|
-
return
|
2642
|
+
return _context15.stop();
|
2682
2643
|
}
|
2683
2644
|
}
|
2684
|
-
},
|
2645
|
+
}, _callee15, _this3);
|
2685
2646
|
}));
|
2686
2647
|
|
2687
2648
|
return function (_x9) {
|
2688
|
-
return
|
2649
|
+
return _ref21.apply(this, arguments);
|
2689
2650
|
};
|
2690
2651
|
}();
|
2691
2652
|
|
2692
2653
|
_this2.btnDebounced = function () {
|
2693
|
-
var
|
2694
|
-
var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title,
|
2654
|
+
var _ref24 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee16(type, bquick) {
|
2655
|
+
var IdbusiType, CustomerPhone, DistributionMode, Address, isEnableSerialNumber, resultObj, title, _enumController$getEn23, PayStyle, _this2$store8, paymode, brefund, boriginReturn, newStyle, status;
|
2695
2656
|
|
2696
|
-
return _regenerator2.default.wrap(function
|
2657
|
+
return _regenerator2.default.wrap(function _callee16$(_context16) {
|
2697
2658
|
while (1) {
|
2698
|
-
switch (
|
2659
|
+
switch (_context16.prev = _context16.next) {
|
2699
2660
|
case 0:
|
2700
2661
|
IdbusiType = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.IdbusiType;
|
2701
2662
|
CustomerPhone = _this2.context && _this2.context.viewModel && _this2.context.viewModel.data && _this2.context.viewModel.data.CustomerPhone;
|
@@ -2704,7 +2665,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2704
2665
|
//预订时,若没录入买家手机号,或配送方式为快递时,弹框买家信息确认框
|
2705
2666
|
|
2706
2667
|
if (!(IdbusiType == 38)) {
|
2707
|
-
|
2668
|
+
_context16.next = 14;
|
2708
2669
|
break;
|
2709
2670
|
}
|
2710
2671
|
|
@@ -2715,11 +2676,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2715
2676
|
});
|
2716
2677
|
|
2717
2678
|
if (!(isEnableSerialNumber && resultObj && (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE'))) {
|
2718
|
-
|
2679
|
+
_context16.next = 9;
|
2719
2680
|
break;
|
2720
2681
|
}
|
2721
2682
|
|
2722
|
-
return
|
2683
|
+
return _context16.abrupt('return', _message2.default.error('启用了序列号管理和批号/有效期管理的商品,不支持快递和同城配送'));
|
2723
2684
|
|
2724
2685
|
case 9:
|
2725
2686
|
|
@@ -2728,49 +2689,31 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2728
2689
|
}
|
2729
2690
|
|
2730
2691
|
if (!(!CustomerPhone && !_this2.context.viewModel.data.Member.Mobilephone || DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE')) {
|
2731
|
-
|
2692
|
+
_context16.next = 14;
|
2732
2693
|
break;
|
2733
2694
|
}
|
2734
2695
|
|
2735
2696
|
title = (DistributionMode.Id == 'ELECTRONIC' || DistributionMode.Id == 'CITY_DISTRIBUTE') && Address ? '收货地址确认' : '收货人';
|
2736
|
-
|
2697
|
+
_context16.next = 14;
|
2737
2698
|
return _this2.props.openBuyerModal(title);
|
2738
2699
|
|
2739
2700
|
case 14:
|
2740
2701
|
|
2741
|
-
// 极速模式错误校验
|
2742
|
-
|
2743
|
-
productStore = _mutantsMicrofx.stores.productStore;
|
2744
|
-
_context17.next = 17;
|
2745
|
-
return productStore.checkShouldSettlement();
|
2746
|
-
|
2747
|
-
case 17:
|
2748
|
-
checkResult = _context17.sent;
|
2749
|
-
|
2750
|
-
if (checkResult) {
|
2751
|
-
_context17.next = 20;
|
2752
|
-
break;
|
2753
|
-
}
|
2754
|
-
|
2755
|
-
return _context17.abrupt('return', false);
|
2756
|
-
|
2757
|
-
case 20:
|
2758
|
-
|
2759
2702
|
_this2.setState({
|
2760
2703
|
bquick: bquick,
|
2761
2704
|
isInputMember: true
|
2762
2705
|
});
|
2763
2706
|
_enumController$getEn23 = _mutantsUtil.enumController.getEnumOj(), PayStyle = _enumController$getEn23.PayStyle;
|
2764
|
-
_this2$
|
2707
|
+
_this2$store8 = _this2.store, paymode = _this2$store8.paymode, brefund = _this2$store8.brefund, boriginReturn = _this2$store8.boriginReturn, newStyle = _this2$store8.newStyle;
|
2765
2708
|
|
2766
2709
|
if (!(bquick && !_mutantsMicrofx.stores.offlineSys.shouldSettlement(type))) {
|
2767
|
-
|
2710
|
+
_context16.next = 19;
|
2768
2711
|
break;
|
2769
2712
|
}
|
2770
2713
|
|
2771
|
-
return
|
2714
|
+
return _context16.abrupt('return', false);
|
2772
2715
|
|
2773
|
-
case
|
2716
|
+
case 19:
|
2774
2717
|
status = false;
|
2775
2718
|
|
2776
2719
|
paymode.thePaymodes.forEach(function (v) {
|
@@ -2783,13 +2726,13 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2783
2726
|
});
|
2784
2727
|
|
2785
2728
|
if (!_this2.btndebounced) {
|
2786
|
-
|
2729
|
+
_context16.next = 24;
|
2787
2730
|
break;
|
2788
2731
|
}
|
2789
2732
|
|
2790
|
-
return
|
2733
|
+
return _context16.abrupt('return');
|
2791
2734
|
|
2792
|
-
case
|
2735
|
+
case 24:
|
2793
2736
|
_this2.btndebounced = (0, _debounce3.default)(function () {
|
2794
2737
|
if (bquick) {
|
2795
2738
|
_this2.quickSettle(type);
|
@@ -2806,22 +2749,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
2806
2749
|
_this2.btndebounced = null;
|
2807
2750
|
}, 2000);
|
2808
2751
|
|
2809
|
-
case
|
2752
|
+
case 27:
|
2810
2753
|
case 'end':
|
2811
|
-
return
|
2754
|
+
return _context16.stop();
|
2812
2755
|
}
|
2813
2756
|
}
|
2814
|
-
},
|
2757
|
+
}, _callee16, _this3);
|
2815
2758
|
}));
|
2816
2759
|
|
2817
2760
|
return function (_x10, _x11) {
|
2818
|
-
return
|
2761
|
+
return _ref24.apply(this, arguments);
|
2819
2762
|
};
|
2820
2763
|
}();
|
2821
2764
|
|
2822
2765
|
_this2.onCzkChange = function (v) {
|
2823
|
-
var
|
2824
|
-
isNewRetailBCPos =
|
2766
|
+
var _ref25 = _mutantsUtil.platform || {},
|
2767
|
+
isNewRetailBCPos = _ref25.isNewRetailBCPos;
|
2825
2768
|
|
2826
2769
|
if (!isNewRetailBCPos) {
|
2827
2770
|
_this2.store.paymode.currentMode.member.setCardNo(v);
|
@@ -3244,9 +3187,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3244
3187
|
};
|
3245
3188
|
|
3246
3189
|
_this2.checkCurrentModeHaveMutex = function (type) {
|
3247
|
-
var _this2$
|
3248
|
-
paymode = _this2$
|
3249
|
-
newStyle = _this2$
|
3190
|
+
var _this2$store9 = _this2.store,
|
3191
|
+
paymode = _this2$store9.paymode,
|
3192
|
+
newStyle = _this2$store9.newStyle;
|
3250
3193
|
|
3251
3194
|
var _enumController$getEn28 = _mutantsUtil.enumController.getEnumOj(),
|
3252
3195
|
PayStyle = _enumController$getEn28.PayStyle;
|
@@ -3422,12 +3365,12 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3422
3365
|
|
3423
3366
|
_this2.hasElectron = hasElectron;
|
3424
3367
|
|
3425
|
-
var
|
3426
|
-
MemberMeStorageCardInputByKeyBoard =
|
3427
|
-
ICCardServer =
|
3428
|
-
ICCardPassword =
|
3429
|
-
PreSellOrBook =
|
3430
|
-
PercentageWhenBook =
|
3368
|
+
var _ref26 = _mutantsMicrofx.stores.user.options.get('loginInfo') || {},
|
3369
|
+
MemberMeStorageCardInputByKeyBoard = _ref26.MemberMeStorageCardInputByKeyBoard,
|
3370
|
+
ICCardServer = _ref26.ICCardServer,
|
3371
|
+
ICCardPassword = _ref26.ICCardPassword,
|
3372
|
+
PreSellOrBook = _ref26.PreSellOrBook,
|
3373
|
+
PercentageWhenBook = _ref26.PercentageWhenBook;
|
3431
3374
|
|
3432
3375
|
_this2.isStorageCardInputType = MemberMeStorageCardInputByKeyBoard; // 仅储值卡是否禁用键盘输入,'0'为不禁用 '1'为禁用
|
3433
3376
|
_this2.iCCardServer = parseInt(ICCardServer); // 启用IC卡:0为禁用 1为启用
|
@@ -3436,9 +3379,9 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3436
3379
|
_this2.percentageWhenBook = PercentageWhenBook;
|
3437
3380
|
//移动端环境下,没有读取IC卡的方式。
|
3438
3381
|
|
3439
|
-
var
|
3440
|
-
isHorizontalPad =
|
3441
|
-
isHorizontalSunMi =
|
3382
|
+
var _ref27 = _mutantsUtil.platform || {},
|
3383
|
+
isHorizontalPad = _ref27.isHorizontalPad,
|
3384
|
+
isHorizontalSunMi = _ref27.isHorizontalSunMi;
|
3442
3385
|
|
3443
3386
|
_this2.isHorizontalPad = !!isHorizontalPad;
|
3444
3387
|
_this2.isHorizontalSunMi = !!isHorizontalSunMi;
|
@@ -3447,7 +3390,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3447
3390
|
_this2.setTimer = null;
|
3448
3391
|
_this2.keypressStime = null;
|
3449
3392
|
_this2.store = !(props.type == 1) ? _mutantsMicrofx.stores.settlementVoucherStore : _mutantsMicrofx.stores.settlementMemberStore;
|
3450
|
-
_this2.voucherRunningFast = _mutantsMicrofx.localStore && _mutantsMicrofx.localStore.get('vocherRunningFast') == '1';
|
3451
3393
|
return _this2;
|
3452
3394
|
}
|
3453
3395
|
|
@@ -3544,16 +3486,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3544
3486
|
}
|
3545
3487
|
}
|
3546
3488
|
|
3547
|
-
//IC卡关闭
|
3548
|
-
|
3549
|
-
}, {
|
3550
|
-
key: 'closeRfCard',
|
3551
|
-
value: function closeRfCard() {
|
3552
|
-
if (this.hasElectron === true && this.iCCardServer === 1) {
|
3553
|
-
_mutantsMicrofx.nativeMs.setIpcRendererMethod('CloseRfCard');
|
3554
|
-
}
|
3555
|
-
}
|
3556
|
-
|
3557
3489
|
//czk
|
3558
3490
|
|
3559
3491
|
|
@@ -3587,8 +3519,6 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3587
3519
|
* @param {*} symbol 从当前currenIndex开始 还是从当前currenIndex截止
|
3588
3520
|
*/
|
3589
3521
|
|
3590
|
-
// 极速模式下是否开启了支付有礼功能
|
3591
|
-
|
3592
3522
|
// 处理客显显示功能
|
3593
3523
|
|
3594
3524
|
|
@@ -3597,8 +3527,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3597
3527
|
}, {
|
3598
3528
|
key: 'isNoProductTip',
|
3599
3529
|
value: function isNoProductTip(nonProductMap) {
|
3600
|
-
var
|
3601
|
-
RetailDetails =
|
3530
|
+
var _ref28 = this.context.viewModel.data || {},
|
3531
|
+
RetailDetails = _ref28.RetailDetails;
|
3602
3532
|
|
3603
3533
|
var temphtml = [];
|
3604
3534
|
if ((0, _keys2.default)(nonProductMap).length > 0) {
|
@@ -3869,11 +3799,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
3869
3799
|
quantity4 = 0;
|
3870
3800
|
var sumQuantity = 0; //数量总和的值,包括称重的。
|
3871
3801
|
|
3872
|
-
var
|
3873
|
-
|
3874
|
-
buyQuantity =
|
3875
|
-
|
3876
|
-
returnQuantity =
|
3802
|
+
var _ref29 = quantityDetail || {},
|
3803
|
+
_ref29$buyQuantity = _ref29.buyQuantity,
|
3804
|
+
buyQuantity = _ref29$buyQuantity === undefined ? 0 : _ref29$buyQuantity,
|
3805
|
+
_ref29$returnQuantity = _ref29.returnQuantity,
|
3806
|
+
returnQuantity = _ref29$returnQuantity === undefined ? 0 : _ref29$returnQuantity;
|
3877
3807
|
|
3878
3808
|
var quantityPrecision = (0, _tplusPoslogin.PosInitData)("QuantityPrecision");
|
3879
3809
|
quantityPrecision = quantityPrecision ? parseInt(quantityPrecision) : '';
|
@@ -4065,7 +3995,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4065
3995
|
onClose: this.handleCancel,
|
4066
3996
|
visible: this.state.visible,
|
4067
3997
|
destroyOnClose: true,
|
4068
|
-
className: 'settlement-wraper
|
3998
|
+
className: 'settlement-wraper',
|
4069
3999
|
style: { 'zIndex': 1006 }
|
4070
4000
|
},
|
4071
4001
|
_react2.default.createElement(
|
@@ -4336,7 +4266,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4336
4266
|
onClose: this.handleCancel,
|
4337
4267
|
visible: this.state.visible,
|
4338
4268
|
destroyOnClose: true,
|
4339
|
-
className: 'settlement-wraper
|
4269
|
+
className: 'settlement-wraper',
|
4340
4270
|
style: { 'zIndex': 1006 }
|
4341
4271
|
},
|
4342
4272
|
_react2.default.createElement(
|
@@ -4646,7 +4576,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4646
4576
|
_react2.default.createElement(
|
4647
4577
|
_modal2.default,
|
4648
4578
|
{
|
4649
|
-
wrapClassName: 'czk ' + (this.
|
4579
|
+
wrapClassName: 'czk ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
4650
4580
|
width: '400px',
|
4651
4581
|
visible: this.state.czkVisible,
|
4652
4582
|
maskClosable: false,
|
@@ -4758,22 +4688,22 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4758
4688
|
return _this8.czkInput = input;
|
4759
4689
|
},
|
4760
4690
|
onKeyDown: function () {
|
4761
|
-
var
|
4691
|
+
var _ref30 = (0, _asyncToGenerator3.default)( /*#__PURE__*/_regenerator2.default.mark(function _callee17(e) {
|
4762
4692
|
var time, _paymode;
|
4763
4693
|
|
4764
|
-
return _regenerator2.default.wrap(function
|
4694
|
+
return _regenerator2.default.wrap(function _callee17$(_context17) {
|
4765
4695
|
while (1) {
|
4766
|
-
switch (
|
4696
|
+
switch (_context17.prev = _context17.next) {
|
4767
4697
|
case 0:
|
4768
4698
|
if (!(e.keyCode == 13)) {
|
4769
|
-
|
4699
|
+
_context17.next = 14;
|
4770
4700
|
break;
|
4771
4701
|
}
|
4772
4702
|
|
4773
4703
|
time = Date.parse(new Date());
|
4774
4704
|
|
4775
4705
|
if (!(_this8.isStorageCardInputType && time - _this8.keypressStime > 350)) {
|
4776
|
-
|
4706
|
+
_context17.next = 7;
|
4777
4707
|
break;
|
4778
4708
|
}
|
4779
4709
|
|
@@ -4782,11 +4712,11 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4782
4712
|
_this8.setState({
|
4783
4713
|
czkValue: null
|
4784
4714
|
});
|
4785
|
-
return
|
4715
|
+
return _context17.abrupt('return');
|
4786
4716
|
|
4787
4717
|
case 7:
|
4788
4718
|
_this8.keypressStime = null;
|
4789
|
-
|
4719
|
+
_context17.next = 10;
|
4790
4720
|
return _this8.loadCzk(e.target.value);
|
4791
4721
|
|
4792
4722
|
case 10:
|
@@ -4797,7 +4727,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4797
4727
|
czkvalue: null
|
4798
4728
|
});
|
4799
4729
|
}
|
4800
|
-
|
4730
|
+
_context17.next = 15;
|
4801
4731
|
break;
|
4802
4732
|
|
4803
4733
|
case 14:
|
@@ -4807,14 +4737,14 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4807
4737
|
|
4808
4738
|
case 15:
|
4809
4739
|
case 'end':
|
4810
|
-
return
|
4740
|
+
return _context17.stop();
|
4811
4741
|
}
|
4812
4742
|
}
|
4813
|
-
},
|
4743
|
+
}, _callee17, _this8);
|
4814
4744
|
}));
|
4815
4745
|
|
4816
4746
|
return function (_x13) {
|
4817
|
-
return
|
4747
|
+
return _ref30.apply(this, arguments);
|
4818
4748
|
};
|
4819
4749
|
}(),
|
4820
4750
|
onFocus: function onFocus(e) {
|
@@ -4871,8 +4801,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4871
4801
|
_this8.setCurrentModeValue(event.target.value, Math.min(currentMode.maxamount, currentMode.balance));
|
4872
4802
|
},
|
4873
4803
|
defaultValue: currentMode && (0, _utils.getFixedNumber)(brefund ? currentMode.value : Math.min(currentMode.value, currentMode.maxamount, currentMode.balance)),
|
4874
|
-
ref: function ref(
|
4875
|
-
return _this8["inputCzkAmount"] =
|
4804
|
+
ref: function ref(_ref31) {
|
4805
|
+
return _this8["inputCzkAmount"] = _ref31;
|
4876
4806
|
},
|
4877
4807
|
onFocus: function onFocus(e) {
|
4878
4808
|
_this8.inputkey = "inputCzkAmount";
|
@@ -4924,7 +4854,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4924
4854
|
_react2.default.createElement(
|
4925
4855
|
_modal2.default,
|
4926
4856
|
{
|
4927
|
-
wrapClassName: _index.hotKey.hotKeyBindClass('5', 'moreCzkModal') + ' ' + (this.
|
4857
|
+
wrapClassName: _index.hotKey.hotKeyBindClass('5', 'moreCzkModal') + ' ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
4928
4858
|
width: '400px',
|
4929
4859
|
visible: this.state.moreCzkVisible,
|
4930
4860
|
maskClosable: false,
|
@@ -4966,7 +4896,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
4966
4896
|
_react2.default.createElement(
|
4967
4897
|
_modal2.default,
|
4968
4898
|
(0, _defineProperty3.default)({
|
4969
|
-
wrapClassName: 'djq ' + (this.
|
4899
|
+
wrapClassName: 'djq ' + (this.isHorizontalPad ? 'extraHeight' : '') + ' passwordContainer',
|
4970
4900
|
width: '400px',
|
4971
4901
|
visible: this.state.showSetPwdModal,
|
4972
4902
|
backdropClosable: false,
|
@@ -5063,7 +4993,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5063
4993
|
_react2.default.createElement(
|
5064
4994
|
_modal2.default,
|
5065
4995
|
{
|
5066
|
-
wrapClassName: 'djq ' + (this.
|
4996
|
+
wrapClassName: 'djq ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
5067
4997
|
width: '810px',
|
5068
4998
|
visible: this.state.djqVisible,
|
5069
4999
|
maskClosable: false,
|
@@ -5387,7 +5317,7 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5387
5317
|
_react2.default.createElement(
|
5388
5318
|
_modal2.default,
|
5389
5319
|
{
|
5390
|
-
wrapClassName: 'czk ' + (this.
|
5320
|
+
wrapClassName: 'czk ' + (this.isHorizontalPad ? 'extraHeight' : ''),
|
5391
5321
|
width: '420px',
|
5392
5322
|
visible: this.state.jfdxVisible,
|
5393
5323
|
maskClosable: false,
|
@@ -5542,8 +5472,8 @@ var Settlement = (0, _mobxReact.observer)(_class = (_temp = _class2 = function (
|
|
5542
5472
|
_this8.setCurrentModeValue(e.target.value, Math.min(currentMode.maxamount, currentMode.member.exchangable));
|
5543
5473
|
},
|
5544
5474
|
defaultValue: currentMode && currentMode.member && (0, _utils.getFixedNumber)(Math.min(currentMode.value, currentMode.maxamount, currentMode.member.exchangable)),
|
5545
|
-
ref: function ref(
|
5546
|
-
return _this8["inputJfdxAmount"] =
|
5475
|
+
ref: function ref(_ref32) {
|
5476
|
+
return _this8["inputJfdxAmount"] = _ref32;
|
5547
5477
|
},
|
5548
5478
|
onFocus: function onFocus(e) {
|
5549
5479
|
_this8.inputkey = "inputJfdxAmount";
|