|
|
|
|
@ -15,12 +15,12 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
|
|
"default": function() { return /* binding */ Info; }
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js
|
|
|
|
|
var regeneratorRuntime = __webpack_require__(7557);
|
|
|
|
|
var regeneratorRuntime_default = /*#__PURE__*/__webpack_require__.n(regeneratorRuntime);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js
|
|
|
|
|
var objectSpread2 = __webpack_require__(82242);
|
|
|
|
|
var objectSpread2_default = /*#__PURE__*/__webpack_require__.n(objectSpread2);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js
|
|
|
|
|
var asyncToGenerator = __webpack_require__(41498);
|
|
|
|
|
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
|
|
|
|
|
@ -38,18 +38,18 @@ var _umi_production_exports = __webpack_require__(5841);
|
|
|
|
|
var es_form = __webpack_require__(78241);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tooltip/index.js + 3 modules
|
|
|
|
|
var tooltip = __webpack_require__(6848);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
|
|
var modal = __webpack_require__(43418);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 3 modules
|
|
|
|
|
var input = __webpack_require__(92832);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/message/index.js + 4 modules
|
|
|
|
|
var message = __webpack_require__(8591);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/breadcrumb/index.js + 6 modules
|
|
|
|
|
var breadcrumb = __webpack_require__(66104);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 3 modules
|
|
|
|
|
var input = __webpack_require__(92832);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
|
|
|
var table = __webpack_require__(1710);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
|
|
|
var pagination = __webpack_require__(58421);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
|
|
|
|
|
var modal = __webpack_require__(43418);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
|
|
|
|
|
var es_select = __webpack_require__(57809);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 12 modules
|
|
|
|
|
@ -486,6 +486,7 @@ var lib = __webpack_require__(64727);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var unitType = {
|
|
|
|
|
@ -627,6 +628,13 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
_useState42 = slicedToArray_default()(_useState41, 2),
|
|
|
|
|
warehousing = _useState42[0],
|
|
|
|
|
setWarehousing = _useState42[1];
|
|
|
|
|
var _useState43 = (0,_react_17_0_2_react.useState)(''),
|
|
|
|
|
_useState44 = slicedToArray_default()(_useState43, 2),
|
|
|
|
|
showEditStatus = _useState44[0],
|
|
|
|
|
setShowEditStatus = _useState44[1];
|
|
|
|
|
var _Form$useForm3 = es_form/* default */.Z.useForm(),
|
|
|
|
|
_Form$useForm4 = slicedToArray_default()(_Form$useForm3, 1),
|
|
|
|
|
form = _Form$useForm4[0];
|
|
|
|
|
|
|
|
|
|
//资产表格
|
|
|
|
|
var columns = [{
|
|
|
|
|
@ -757,112 +765,15 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
width: searchParams.get('indexType') == '1' ? 250 : 100,
|
|
|
|
|
render: function render(text, record) {
|
|
|
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [searchParams.get('indexType') == '1' && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("a", {
|
|
|
|
|
style: {
|
|
|
|
|
color: "#165DFF",
|
|
|
|
|
cursor: "pointer"
|
|
|
|
|
},
|
|
|
|
|
href: "".concat(env/* default */.Z.API_SERVER, "/api/yn_classrooms/substance_details/").concat(record === null || record === void 0 ? void 0 : record.id, "/download.json"),
|
|
|
|
|
download: true,
|
|
|
|
|
children: "\u5BFC\u51FA\u6761\u5F62\u7801"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: "#165DFF",
|
|
|
|
|
cursor: "pointer",
|
|
|
|
|
marginLeft: "10px"
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setBoxId(record === null || record === void 0 ? void 0 : record.id);
|
|
|
|
|
myForm.setFieldsValue({
|
|
|
|
|
unit: record === null || record === void 0 ? void 0 : record.unit,
|
|
|
|
|
number: record === null || record === void 0 ? void 0 : record.number,
|
|
|
|
|
num: record === null || record === void 0 ? void 0 : record.num
|
|
|
|
|
});
|
|
|
|
|
setOpenBox(true);
|
|
|
|
|
setCodeImg(record !== null && record !== void 0 && record.image ? env/* default */.Z.API_SERVER + '/' + (record === null || record === void 0 ? void 0 : record.image) : '');
|
|
|
|
|
myForm.setFieldValue('image', record !== null && record !== void 0 && record.image ? record === null || record === void 0 ? void 0 : record.image : '');
|
|
|
|
|
},
|
|
|
|
|
children: "\u4FEE\u6539"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: "#165DFF",
|
|
|
|
|
cursor: "pointer",
|
|
|
|
|
marginLeft: "10px"
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
centered: true,
|
|
|
|
|
okText: '确定',
|
|
|
|
|
icon: null,
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
title: "报废",
|
|
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: "\u62A5\u5E9F\u540E\uFF0C\u8BE5\u7269\u8D44\u5F52\u7C7B\u5728\u62A5\u5E9F\u7269\u8D44\u91CC\uFF0C\u4E14\u4E0D\u53EF\u518D\u88AB\u4F7F\u7528"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
|
|
|
|
style: {
|
|
|
|
|
marginTop: '10px'
|
|
|
|
|
},
|
|
|
|
|
maxLength: 200,
|
|
|
|
|
showCount: true,
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
var newReason = e.target.value;
|
|
|
|
|
setReason(newReason);
|
|
|
|
|
reasonRef.current = newReason;
|
|
|
|
|
},
|
|
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u62A5\u5E9F\u539F\u56E0"
|
|
|
|
|
})]
|
|
|
|
|
}),
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
(0,materials/* substance_details_scrapped */.FA)({
|
|
|
|
|
id: record === null || record === void 0 ? void 0 : record.id,
|
|
|
|
|
reason: reasonRef.current
|
|
|
|
|
}).then(function (res) {
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('报废成功');
|
|
|
|
|
getData(true);
|
|
|
|
|
setReason(''); // 清空输入框
|
|
|
|
|
reasonRef.current = ''; // 清空 reasonRef
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 1:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}(),
|
|
|
|
|
onCancel: function () {
|
|
|
|
|
var _onCancel = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
setReason('');
|
|
|
|
|
reasonRef.current = '';
|
|
|
|
|
case 2:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}));
|
|
|
|
|
function onCancel() {
|
|
|
|
|
return _onCancel.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onCancel;
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
children: "\u62A5\u5E9F"
|
|
|
|
|
})]
|
|
|
|
|
children: [searchParams.get('indexType') == '1' && /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: "#165DFF",
|
|
|
|
|
cursor: "pointer"
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
setShowEditStatus(record);
|
|
|
|
|
},
|
|
|
|
|
children: "\u4FEE\u6539\u72B6\u6001"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: "#165DFF",
|
|
|
|
|
@ -900,6 +811,45 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
callback();
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
var handleUpdateStatusOk = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var res;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
return form.validateFields();
|
|
|
|
|
case 2:
|
|
|
|
|
_context.next = 4;
|
|
|
|
|
return (0,fetch/* default */.ZP)("/api/yn_classrooms/substance_details/".concat(showEditStatus === null || showEditStatus === void 0 ? void 0 : showEditStatus.id, "/update_status.json"), {
|
|
|
|
|
method: 'post',
|
|
|
|
|
body: objectSpread2_default()({}, form.getFieldsValue())
|
|
|
|
|
});
|
|
|
|
|
case 4:
|
|
|
|
|
res = _context.sent;
|
|
|
|
|
if (!((res === null || res === void 0 ? void 0 : res.status) == 0)) {
|
|
|
|
|
_context.next = 12;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
form.resetFields();
|
|
|
|
|
setShowEditStatus(false);
|
|
|
|
|
message/* default */.ZP.success("修改成功");
|
|
|
|
|
// getData();
|
|
|
|
|
getData(false);
|
|
|
|
|
_context.next = 13;
|
|
|
|
|
break;
|
|
|
|
|
case 12:
|
|
|
|
|
return _context.abrupt("return", Promise.reject());
|
|
|
|
|
case 13:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function handleUpdateStatusOk() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
getInfo();
|
|
|
|
|
}, []);
|
|
|
|
|
@ -1202,11 +1152,11 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
open: openBox,
|
|
|
|
|
title: "".concat(boxId ? '修改' : '添加', "\u7269\u8D44"),
|
|
|
|
|
width: "600px",
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context3.next = 2;
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
return myForm.validateFields();
|
|
|
|
|
case 2:
|
|
|
|
|
if (boxId) {
|
|
|
|
|
@ -1247,9 +1197,9 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
}
|
|
|
|
|
case 3:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}, _callee2);
|
|
|
|
|
})),
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setOpenBox(false);
|
|
|
|
|
@ -1494,15 +1444,74 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
|
|
|
|
|
centered: true,
|
|
|
|
|
open: showEditStatus,
|
|
|
|
|
destroyOnClose: true,
|
|
|
|
|
okText: "\u786E\u5B9A",
|
|
|
|
|
cancelText: "\u53D6\u6D88",
|
|
|
|
|
title: "\u6DFB\u52A0",
|
|
|
|
|
onOk: handleUpdateStatusOk,
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
form.resetFields();
|
|
|
|
|
setShowEditStatus(false);
|
|
|
|
|
},
|
|
|
|
|
width: 500,
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
|
|
|
|
|
className: Infomodules.formWrap,
|
|
|
|
|
form: form,
|
|
|
|
|
labelCol: {
|
|
|
|
|
span: 8
|
|
|
|
|
},
|
|
|
|
|
wrapperCol: {
|
|
|
|
|
span: 16
|
|
|
|
|
},
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
colon: false,
|
|
|
|
|
label: "\u7269\u8D44\u72B6\u6001",
|
|
|
|
|
name: "device_state",
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请选择物资编号'
|
|
|
|
|
}],
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
|
|
|
|
|
placeholder: "\u8BF7\u9009\u62E9\u7269\u8D44\u72B6\u6001",
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
|
|
value: "fit_purpose",
|
|
|
|
|
children: "\u582A\u7528"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
|
|
value: "breakdown",
|
|
|
|
|
children: "\u635F\u574F"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
|
|
value: "scrapped",
|
|
|
|
|
children: "\u62A5\u5E9F"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
|
|
|
|
|
value: "upkeep",
|
|
|
|
|
children: "\u4FDD\u517B"
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
colon: false,
|
|
|
|
|
label: "\u8BF4\u660E",
|
|
|
|
|
name: "reason",
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true,
|
|
|
|
|
message: '请输入说明'
|
|
|
|
|
}],
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.TextArea, {
|
|
|
|
|
placeholder: "\u8BF7\u8F93\u5165\u8BF4\u660E"
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
})
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* harmony default export */ var Info = ((0,_umi_production_exports.connect)(function (_ref3) {
|
|
|
|
|
var loading = _ref3.loading,
|
|
|
|
|
user = _ref3.user,
|
|
|
|
|
engineeringNavigtion = _ref3.engineeringNavigtion,
|
|
|
|
|
account = _ref3.account,
|
|
|
|
|
dispatch = _ref3.dispatch;
|
|
|
|
|
/* harmony default export */ var Info = ((0,_umi_production_exports.connect)(function (_ref4) {
|
|
|
|
|
var loading = _ref4.loading,
|
|
|
|
|
user = _ref4.user,
|
|
|
|
|
engineeringNavigtion = _ref4.engineeringNavigtion,
|
|
|
|
|
account = _ref4.account,
|
|
|
|
|
dispatch = _ref4.dispatch;
|
|
|
|
|
return objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
loading: loading,
|
|
|
|
|
user: user
|