autoUpdataFile

dev_local_v9_yndxsys
eduauto 2 years ago
parent 3bd92b6d1d
commit 87799cdbe5

@ -1563,31 +1563,33 @@ var User = function User(_ref) {
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
(0,util/* clearAllCookies */.m5)();
_context.prev = 1;
_context.next = 4;
_context.prev = 0;
_context.next = 3;
return (0,service_user/* LoginOut */.vR)({});
case 4:
case 3:
res = _context.sent;
message/* default */.ZP.success(res === null || res === void 0 ? void 0 : res.message);
_context.next = 10;
_context.next = 9;
break;
case 8:
_context.prev = 8;
_context.t0 = _context["catch"](1);
case 10:
case 7:
_context.prev = 7;
_context.t0 = _context["catch"](0);
case 9:
(0,util/* setCookie */.d8)("_educoder_session", "logout", 1);
(0,util/* clearAllCookies */.m5)();
localStorage.removeItem('isfirst');
localStorage.removeItem('SystemUpdateadvtime');
localStorage.removeItem('item');
localStorage.removeItem('iscreate');
// localStorage.removeItem('CCshow')
_umi_production_exports.history.replace('/');
window.location.reload();
setTimeout(function () {
window.location.href = '/';
}, 800);
case 16:
case "end":
return _context.stop();
}
}, _callee, null, [[1, 8]]);
}, _callee, null, [[0, 7]]);
})),
children: "\u9000\u51FA"
})

@ -27,7 +27,7 @@
display: block !important;
}
</style><script>if(document.domain !== "www.educoder.net") document.title = '';</script>
<script src="/react/build/umi.110d7d13.js"></script>
<script src="/react/build/umi.e1503185.js"></script>
<script src="/react/build/js/public.js"></script>
</body>
</html>

@ -410,6 +410,7 @@ var Navigation = function Navigation(_ref) {
_useState40 = slicedToArray_default()(_useState39, 2),
historyData = _useState40[0],
setHistoryData = _useState40[1];
var reasonRef = (0,_react_17_0_2_react.useRef)(reason); // 用来存储最新的 reason
//资产表格
var columns = [{
@ -503,6 +504,20 @@ var Navigation = function Navigation(_ref) {
})
});
}
}, searchParams.get('indexType') == '2' && {
title: '报废原因',
width: 150,
dataIndex: 'scrapped_reason',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: text || '--'
})
});
}
}, {
title: '条形码',
dataIndex: 'image',
@ -572,9 +587,10 @@ var Navigation = function Navigation(_ref) {
style: {
marginTop: '10px'
},
defaultValue: reason,
onChange: function onChange(e) {
return setReason(e.target.value);
var newReason = e.target.value;
setReason(newReason);
reasonRef.current = newReason;
},
placeholder: "\u8BF7\u8F93\u5165\u62A5\u5E9F\u539F\u56E0"
})]
@ -586,12 +602,13 @@ var Navigation = function Navigation(_ref) {
case 0:
(0,materials/* substance_details_scrapped */.FA)({
id: record === null || record === void 0 ? void 0 : record.id,
reason: reason
reason: reasonRef.current
}).then(function (res) {
if (res.status === 0) {
message/* default */.ZP.success('报废成功');
getData(true);
setReason('');
setReason(''); // 清空输入框
reasonRef.current = ''; // 清空 reasonRef
}
});
case 1:
@ -611,7 +628,8 @@ var Navigation = function Navigation(_ref) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
setReason('');
case 1:
reasonRef.current = '';
case 2:
case "end":
return _context2.stop();
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save