Auto Submit

dev_local_v9_test2
autosubmit 2 years ago
parent 85ad0202a1
commit 0d580eb70d

@ -1,403 +1,5 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[98662],{
/***/ 22197:
/*!******************************************************************!*\
!*** ./src/pages/Materials/ItemAssetsType/index.tsx + 1 modules ***!
\******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ ItemAssetsType; }
});
// 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/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(44742);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssetsType/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var ItemAssetsTypemodules = ({"header_div":"header_div___vIi6W","header_title":"header_title___N7Kkj","search":"search___V6do5","searchIcon":"searchIcon___R9Tr9","clear_Data":"clear_Data___w3xTH","formWrap":"formWrap___EfDnW"});
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
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/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(20008);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(86383);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = __webpack_require__(36697);
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(85454);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssetsType/index.tsx
var Navigation = function Navigation(_ref) {
var loading = _ref.loading;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
keyword = _useState2[0],
setkeyword = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(),
_useState4 = slicedToArray_default()(_useState3, 2),
typeId = _useState4[0],
setTypeId = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
openMyModal = _useState6[0],
setOpenMyModal = _useState6[1];
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
myForm = _Form$useForm2[0];
//分页
var _useState7 = (0,_react_17_0_2_react.useState)(0),
_useState8 = slicedToArray_default()(_useState7, 2),
total = _useState8[0],
setTotal = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(1),
_useState10 = slicedToArray_default()(_useState9, 2),
page = _useState10[0],
setPage = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(10),
_useState12 = slicedToArray_default()(_useState11, 2),
limit = _useState12[0],
setLimit = _useState12[1];
//预约数据
var _useState13 = (0,_react_17_0_2_react.useState)([]),
_useState14 = slicedToArray_default()(_useState13, 2),
tableData = _useState14[0],
setTableData = _useState14[1];
(0,_react_17_0_2_react.useEffect)(function () {
getData(false);
}, [page]);
(0,_react_17_0_2_react.useEffect)(function () {
getData(true);
}, [keyword, limit]);
var getData = function getData(flag) {
if (flag) {
setPage(1);
}
(0,materials/* substance_categories_query */.xb)({
page: page,
limit: limit,
keyword: keyword
}).then(function (res) {
var _res$data, _res$data2;
setTableData(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list);
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
});
};
var columns = [{
title: '类别名称',
dataIndex: 'title',
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: 'risk',
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: '操作',
width: 150,
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
},
onClick: function onClick() {
setTypeId(record === null || record === void 0 ? void 0 : record.id);
myForm.setFieldValue('title', record === null || record === void 0 ? void 0 : record.title);
myForm.setFieldValue('risk', record === null || record === void 0 ? void 0 : record.risk);
setOpenMyModal(true);
},
children: "\u7F16\u8F91"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#5F6367",
marginLeft: "10px",
cursor: "pointer"
},
onClick: function onClick() {
modal/* default */.Z.confirm({
centered: true,
okText: '确定',
cancelText: '取消',
title: "提示",
content: "是否确认删除该物资类别?",
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_categories_delete */.HX)({
id: record === null || record === void 0 ? void 0 : record.id
}).then(function (res) {
if (res.status === 0) {
message/* default */.ZP.success('删除成功');
getData(true);
}
});
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
},
children: "\u5220\u9664"
})]
});
}
}];
var onShowSizeChange = function onShowSizeChange(page, size) {
setPage(page);
setLimit(size);
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ItemAssetsTypemodules.header_div,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ItemAssetsTypemodules.header_title,
children: "\u7269\u8D44\u7C7B\u522B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
placeholder: "\u8BF7\u8F93\u5165\u7C7B\u522B\u540D\u79F0\u641C\u7D22",
size: "large",
className: ItemAssetsTypemodules.search,
value: keyword,
onChange: function onChange(e) {
setkeyword(e.target.value);
},
onSearch: function onSearch(value) {
setkeyword(value);
},
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-sousuo9 font14 ".concat(ItemAssetsTypemodules.searchIcon),
onClick: function onClick() {
setkeyword(keyword);
getData(true);
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ItemAssetsTypemodules.clear_Data,
onClick: function onClick() {
setOpenMyModal(true);
setTypeId('');
},
children: "\u65B0\u589E\u7C7B\u522B"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ItemAssetsTypemodules.search_params
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
pagination: false,
dataSource: tableData,
columns: columns
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '10px 7px 20px 7px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#656F87'
},
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-primary",
children: total
}), "\u6761\u6570\u636E"]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
showSizeChanger: true,
showQuickJumper: true,
onChange: onShowSizeChange,
defaultCurrent: 1,
pageSizeOptions: ['10', '20', '50', '100'],
current: page || 1,
pageSize: limit || 10,
defaultPageSize: 10,
total: total
})]
}) : ''
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
maskClosable: false,
centered: true,
keyboard: false,
destroyOnClose: true,
className: ItemAssetsTypemodules.my_modal,
open: openMyModal,
title: "".concat(typeId ? '编辑' : '新建', "\u7269\u8D44\u7C7B\u522B"),
width: "600px",
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:
_context2.next = 2;
return myForm.validateFields();
case 2:
if (typeId) {
(0,materials/* substance_categories_update */.en)({
id: typeId,
substance_category: myForm.getFieldsValue()
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('编辑成功');
getData(true);
}
setOpenMyModal(false);
myForm.resetFields();
});
} else {
(0,materials/* substance_categories_create */.Td)({
substance_category: myForm.getFieldsValue()
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('新增成功');
getData(true);
}
setOpenMyModal(false);
myForm.resetFields();
});
}
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
})),
onCancel: function onCancel() {
setOpenMyModal(false);
myForm.resetFields();
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: ItemAssetsTypemodules.formWrap,
form: myForm,
wrapperCol: {
span: 20
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
labelCol: {
span: 4
},
label: "\u7C7B\u522B\u540D\u79F0",
name: "title",
rules: [{
required: true,
message: '请输入类别名称'
}],
style: {
marginTop: '20px',
marginBottom: '10px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
style: {
height: '40px'
},
maxLength: 50,
showCount: true,
onChange: function onChange(e) {
var _e$target;
myForm.setFieldValue('title', e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 || (_e$target = _e$target.value) === null || _e$target === void 0 ? void 0 : _e$target.trim());
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
labelCol: {
span: 4
},
label: "\u98CE\u9669\u70B9",
name: "risk",
style: {
marginTop: '20px',
marginBottom: '10px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
style: {
height: '40px'
},
onChange: function onChange(e) {
var _e$target2;
myForm.setFieldValue('risk', e === null || e === void 0 || (_e$target2 = e.target) === null || _e$target2 === void 0 || (_e$target2 = _e$target2.value) === null || _e$target2 === void 0 ? void 0 : _e$target2.trim());
}
})
})]
})
})]
});
};
/* harmony default export */ var ItemAssetsType = ((0,_umi_production_exports.connect)(function (_ref3) {
var loading = _ref3.loading,
engineeringNavigtion = _ref3.engineeringNavigtion;
return objectSpread2_default()({
loading: loading
}, engineeringNavigtion);
})(Navigation));
/***/ }),
(self["webpackChunk"] = self["webpackChunk"] || []).push([[85454],{
/***/ 85454:
/*!**********************************!*\
@ -406,7 +8,9 @@ var Navigation = function Navigation(_ref) {
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ AY: function() { return /* binding */ purchases_review; },
/* harmony export */ FA: function() { return /* binding */ substance_details_scrapped; },
/* harmony export */ FE: function() { return /* binding */ my_purchases_query; },
/* harmony export */ FZ: function() { return /* binding */ substances_import; },
/* harmony export */ HM: function() { return /* binding */ substances_query; },
/* harmony export */ HX: function() { return /* binding */ substance_categories_delete; },
@ -416,15 +20,20 @@ var Navigation = function Navigation(_ref) {
/* harmony export */ O_: function() { return /* binding */ bills_query; },
/* harmony export */ Td: function() { return /* binding */ substance_categories_create; },
/* harmony export */ VT: function() { return /* binding */ bills_update; },
/* harmony export */ ZW: function() { return /* binding */ purchases_query; },
/* harmony export */ aQ: function() { return /* binding */ purchases_update; },
/* harmony export */ cO: function() { return /* binding */ substance_details_query; },
/* harmony export */ eZ: function() { return /* binding */ bills_info; },
/* harmony export */ en: function() { return /* binding */ substance_categories_update; },
/* harmony export */ i6: function() { return /* binding */ substances_create; },
/* harmony export */ jc: function() { return /* binding */ purchases_create; },
/* harmony export */ os: function() { return /* binding */ substances_info; },
/* harmony export */ pd: function() { return /* binding */ purchases_canceled; },
/* harmony export */ xR: function() { return /* binding */ substances_update; },
/* harmony export */ xb: function() { return /* binding */ substance_categories_query; },
/* harmony export */ y_: function() { return /* binding */ substance_details_update; },
/* harmony export */ yu: function() { return /* binding */ substance_details_create; }
/* harmony export */ yu: function() { return /* binding */ substance_details_create; },
/* harmony export */ zG: function() { return /* binding */ purchases_info; }
/* harmony export */ });
/* unused harmony export substances_list */
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
@ -852,6 +461,8 @@ function _substance_details_update() {
function substance_details_scrapped(_x20) {
return _substance_details_scrapped.apply(this, arguments);
}
//申购列表
function _substance_details_scrapped() {
_substance_details_scrapped = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee20(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee20$(_context20) {
@ -869,6 +480,157 @@ function _substance_details_scrapped() {
}));
return _substance_details_scrapped.apply(this, arguments);
}
function purchases_query(_x21) {
return _purchases_query.apply(this, arguments);
}
//我的申购列表
function _purchases_query() {
_purchases_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee21(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee21$(_context21) {
while (1) switch (_context21.prev = _context21.next) {
case 0:
return _context21.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/purchases.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context21.stop();
}
}, _callee21);
}));
return _purchases_query.apply(this, arguments);
}
function my_purchases_query(_x22) {
return _my_purchases_query.apply(this, arguments);
}
//驳回与同意采购申请
function _my_purchases_query() {
_my_purchases_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee22(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee22$(_context22) {
while (1) switch (_context22.prev = _context22.next) {
case 0:
return _context22.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/purchases/me_purchases.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context22.stop();
}
}, _callee22);
}));
return _my_purchases_query.apply(this, arguments);
}
function purchases_review(_x23) {
return _purchases_review.apply(this, arguments);
}
//取消采购申请
function _purchases_review() {
_purchases_review = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee23(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee23$(_context23) {
while (1) switch (_context23.prev = _context23.next) {
case 0:
return _context23.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/purchases/".concat(data === null || data === void 0 ? void 0 : data.id, "/review.json"), {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context23.stop();
}
}, _callee23);
}));
return _purchases_review.apply(this, arguments);
}
function purchases_canceled(_x24) {
return _purchases_canceled.apply(this, arguments);
}
//创建采购申请
function _purchases_canceled() {
_purchases_canceled = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee24(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee24$(_context24) {
while (1) switch (_context24.prev = _context24.next) {
case 0:
return _context24.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/purchases/".concat(params === null || params === void 0 ? void 0 : params.id, "/canceled.json"), {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context24.stop();
}
}, _callee24);
}));
return _purchases_canceled.apply(this, arguments);
}
function purchases_create(_x25) {
return _purchases_create.apply(this, arguments);
}
//编辑采购申请
function _purchases_create() {
_purchases_create = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee25(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee25$(_context25) {
while (1) switch (_context25.prev = _context25.next) {
case 0:
return _context25.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/purchases.json", {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context25.stop();
}
}, _callee25);
}));
return _purchases_create.apply(this, arguments);
}
function purchases_update(_x26) {
return _purchases_update.apply(this, arguments);
}
//采购详情
function _purchases_update() {
_purchases_update = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee26(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee26$(_context26) {
while (1) switch (_context26.prev = _context26.next) {
case 0:
return _context26.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/purchases/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'put',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context26.stop();
}
}, _callee26);
}));
return _purchases_update.apply(this, arguments);
}
function purchases_info(_x27) {
return _purchases_info.apply(this, arguments);
}
function _purchases_info() {
_purchases_info = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee27(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee27$(_context27) {
while (1) switch (_context27.prev = _context27.next) {
case 0:
return _context27.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/purchases/".concat(params === null || params === void 0 ? void 0 : params.id, ".json"), {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context27.stop();
}
}, _callee27);
}));
return _purchases_info.apply(this, arguments);
}
/***/ })

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

@ -0,0 +1,684 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[7202],{
/***/ 84263:
/*!*******************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***!
\*******************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_InboxOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.0@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(36384);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/InboxOutlined.js
// This icon file is generated automatically.
var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" };
/* harmony default export */ var asn_InboxOutlined = (InboxOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(15436);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/InboxOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_InboxOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(InboxOutlined_InboxOutlined));
/***/ }),
/***/ 63183:
/*!*********************************************************!*\
!*** ./src/pages/Materials/Entry/index.tsx + 3 modules ***!
\*********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ Entry; }
});
// 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/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(44742);
;// CONCATENATED MODULE: ./src/pages/Materials/Entry/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var Entrymodules = ({"header_div":"header_div___HMlol","header_title":"header_title___JUhMA","search":"search___j2_OT","searchIcon":"searchIcon___eX8nB","clear_Data":"clear_Data___Rb0QM","infoItem":"infoItem___ibpAn"});
// 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/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(20008);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(86383);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = __webpack_require__(36697);
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
var dayjs_min = __webpack_require__(9498);
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
var NoData = __webpack_require__(77068);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/date-picker/index.js + 66 modules
var date_picker = __webpack_require__(72086);
;// CONCATENATED MODULE: ./src/pages/Materials/Entry/EditModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var EditModalmodules = ({"my_modal":"my_modal___v4ok1"});
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
var markdown_editor = __webpack_require__(74385);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(41883);
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(85454);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/Entry/EditModal/index.tsx
var EditModal = function EditModal(_ref) {
var openEditModal = _ref.openEditModal,
_ref$centerId = _ref.centerId,
centerId = _ref$centerId === void 0 ? null : _ref$centerId,
_onCancel = _ref.onCancel,
user = _ref.user;
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
ruleForm = _Form$useForm2[0];
var _useState = (0,_react_17_0_2_react.useState)({}),
_useState2 = slicedToArray_default()(_useState, 2),
formValue = _useState2[0],
setFormValue = _useState2[1];
(0,_react_17_0_2_react.useEffect)(function () {
if (openEditModal) {
if (centerId) {
(0,materials/* bills_info */.eZ)({
id: centerId
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
var _res$data, _res$data2, _res$data3, _res$data4, _res$data5, _res$data6;
var formData = {
title: res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.title,
user_name: res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.user_name,
phone: res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.phone,
date: res !== null && res !== void 0 && (_res$data4 = res.data) !== null && _res$data4 !== void 0 && _res$data4.date ? dayjs_min_default()(res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.date) : '',
description: res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.description,
attachment: (0,MultiUpload/* coverToFileList */.z)(res === null || res === void 0 ? void 0 : res.data.attachments)
};
ruleForm.setFieldsValue(formData);
setFormValue(objectSpread2_default()({}, formData));
}
});
} else {
var _user$userInfo, _user$userInfo2;
var formData = {
title: '',
user_name: user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.username,
phone: user === null || user === void 0 || (_user$userInfo2 = user.userInfo) === null || _user$userInfo2 === void 0 ? void 0 : _user$userInfo2.phone,
date: '',
description: '',
attachment: ''
};
ruleForm.setFieldsValue(formData);
setFormValue(objectSpread2_default()({}, formData));
}
}
}, [openEditModal]);
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
maskClosable: false,
centered: true,
keyboard: false,
destroyOnClose: true,
className: EditModalmodules.my_modal,
open: openEditModal,
title: "".concat(centerId ? '编辑' : '增加', "\u5165\u8D26\u5355"),
width: "790px",
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _ruleForm$getFieldVal;
var formInfo;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return ruleForm.validateFields();
case 2:
formInfo = {
title: ruleForm.getFieldValue('title'),
user_name: ruleForm.getFieldValue('user_name'),
phone: ruleForm.getFieldValue('phone'),
date: ruleForm.getFieldValue('date'),
description: ruleForm.getFieldValue('description'),
attachment_ids: ruleForm.getFieldValue('attachment') ? (_ruleForm$getFieldVal = ruleForm.getFieldValue('attachment')) === null || _ruleForm$getFieldVal === void 0 ? void 0 : _ruleForm$getFieldVal.map(function (item) {
var _item$response;
return item === null || item === void 0 || (_item$response = item.response) === null || _item$response === void 0 ? void 0 : _item$response.id;
}) : []
};
if (centerId) {
(0,materials/* bills_update */.VT)({
id: centerId,
bill: formInfo
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('编辑成功');
_onCancel();
}
});
} else {
(0,materials/* bills_create */.K$)({
bill: formInfo
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('新增成功');
_onCancel();
}
});
}
case 4:
case "end":
return _context.stop();
}
}, _callee);
})),
onCancel: function onCancel() {
_onCancel();
ruleForm === null || ruleForm === void 0 || ruleForm.resetFields();
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: EditModalmodules.formWrap,
form: ruleForm,
style: {
marginTop: '20px'
},
onValuesChange: function onValuesChange() {
setFormValue(objectSpread2_default()({}, ruleForm.getFieldsValue()));
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u91C7\u8D2D\u540D\u79F0",
name: "title",
rules: [{
required: true,
message: '请输入采购名称'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u91C7\u8D2D\u540D\u79F0",
maxLength: 30,
showCount: true,
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u91C7\u8D2D\u4EBA",
name: "user_name",
rules: [{
required: true,
message: '请输入采购人'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u91C7\u8D2D\u4EBA",
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u91C7\u8D2D\u4EBA\u7535\u8BDD",
name: "phone",
rules: [{
required: true,
message: '请输入采购人电话'
}, {
pattern: new RegExp(/^((0\d{2,3}(-)?\d{7,8})|(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8})$/, "g"),
message: '必须是正确的座机号或者手机号'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
placeholder: "\u8BF7\u8F93\u5165\u91C7\u8D2D\u4EBA\u7535\u8BDD",
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u91C7\u8D2D\u65F6\u95F4",
name: "date",
rules: [{
required: true,
message: '请选择采购时间'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(date_picker["default"], {
size: "large",
style: {
width: '100%'
},
placeholder: "\u8BF7\u9009\u62E9\u91C7\u8D2D\u65F6\u95F4",
format: "YYYY-MM-DD HH:mm",
showTime: {
format: 'HH:mm'
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
label: "\u5907\u6CE8\u8BF4\u660E",
name: "description",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
height: 235,
defaultValue: (formValue === null || formValue === void 0 ? void 0 : formValue.description) || '',
watch: true
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: " ",
name: "attachment",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MultiUpload/* default */.Z, {})
})]
})
});
};
/* harmony default export */ var Entry_EditModal = ((0,_umi_production_exports.connect)(function (_ref3) {
var user = _ref3.user;
return {
user: user
};
})(EditModal));
;// CONCATENATED MODULE: ./src/pages/Materials/Entry/index.tsx
var Navigation = function Navigation(_ref) {
var loading = _ref.loading;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
keyword = _useState2[0],
setkeyword = _useState2[1];
//分页
var _useState3 = (0,_react_17_0_2_react.useState)(0),
_useState4 = slicedToArray_default()(_useState3, 2),
total = _useState4[0],
setTotal = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(1),
_useState6 = slicedToArray_default()(_useState5, 2),
page = _useState6[0],
setPage = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(10),
_useState8 = slicedToArray_default()(_useState7, 2),
limit = _useState8[0],
setLimit = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)([]),
_useState10 = slicedToArray_default()(_useState9, 2),
tableData = _useState10[0],
setTableData = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(false),
_useState12 = slicedToArray_default()(_useState11, 2),
editVisible = _useState12[0],
setEditVisible = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)(''),
_useState14 = slicedToArray_default()(_useState13, 2),
centerId = _useState14[0],
setCenterId = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)(false),
_useState16 = slicedToArray_default()(_useState15, 2),
viewVisible = _useState16[0],
setViewVisible = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)({}),
_useState18 = slicedToArray_default()(_useState17, 2),
viewData = _useState18[0],
setViewData = _useState18[1];
var columns = [{
title: '序号',
render: function render(text, record, index) {
return "".concat(limit * (page - 1) + index + 1);
},
width: 80
}, {
title: '采购名称',
dataIndex: 'title',
ellipsis: true
}, {
title: '采购人',
dataIndex: 'user_name',
ellipsis: true
}, {
title: '采购电话',
dataIndex: 'phone',
ellipsis: true,
render: function render(text, record, index) {
return text ? text : '--';
}
}, {
title: '采购时间',
dataIndex: 'date',
ellipsis: true,
render: function render(text, record, index) {
return text ? dayjs_min_default()(text).format('YYYY-MM-DD HH:mm') : '--';
}
}, {
title: '操作',
ellipsis: true,
width: 150,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
},
onClick: function onClick() {
setCenterId(record.id);
setEditVisible(true);
},
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: '确定',
cancelText: '取消',
title: "提示",
content: "\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664 ".concat(record === null || record === void 0 ? void 0 : record.title, " \u7684\u76F8\u5173\u4FE1\u606F\uFF1F\u5220\u9664\u7684\u4FE1\u606F\u5C06\u65E0\u6CD5\u6062\u590D"),
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/* bills_delete */.M1)({
id: record === null || record === void 0 ? void 0 : record.id
}).then(function (res) {
if (res.status === 0) {
message/* default */.ZP.success('删除成功');
getData(true);
}
});
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
},
children: "\u5220\u9664"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: "10px"
},
onClick: function onClick() {
setViewData(record);
setViewVisible(true);
},
children: "\u67E5\u770B"
})]
});
}
}];
(0,_react_17_0_2_react.useEffect)(function () {
//列表查询
getData(false);
}, [page, limit]);
(0,_react_17_0_2_react.useEffect)(function () {
//列表查询
getData(true);
}, [keyword]);
var getData = function getData(flag) {
if (flag) {
setPage(1);
}
(0,materials/* bills_query */.O_)({
page: page,
limit: limit,
keyword: keyword
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
var _res$data, _res$data2;
setTableData(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list);
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
}
});
};
var onShowSizeChange = function onShowSizeChange(page, size) {
setPage(page);
setLimit(size);
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Entrymodules.header_div,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Entrymodules.header_title,
children: "\u5165\u8D26\u7BA1\u7406"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
placeholder: "\u8BF7\u8F93\u5165\u7533\u8D2D\u7F16\u53F7\u8FDB\u884C\u641C\u7D22",
size: "large",
className: Entrymodules.search,
value: keyword,
onChange: function onChange(e) {
setkeyword(e.target.value);
},
onSearch: function onSearch(value) {
setkeyword(value);
},
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-sousuo9 font14 ".concat(Entrymodules.searchIcon),
onClick: function onClick() {
setkeyword(keyword);
getData(true);
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Entrymodules.clear_Data,
style: {
width: '116px',
marginLeft: '20px'
},
onClick: function onClick() {
setCenterId('');
setEditVisible(true);
},
children: "\u589E\u52A0\u5165\u8D26\u5355"
})]
})]
}), total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
pagination: false,
dataSource: tableData,
columns: columns
}) : /*#__PURE__*/(0,jsx_runtime.jsx)(NoData/* default */.Z, {
customText: "\u6682\u65E0\u6570\u636E"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '10px 7px 20px 7px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#656F87'
},
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-primary",
children: total
}), "\u6761\u6570\u636E"]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
showSizeChanger: true,
showQuickJumper: true,
onChange: onShowSizeChange,
defaultCurrent: 1,
pageSizeOptions: ['10', '20', '50', '100'],
current: page || 1,
pageSize: limit || 10,
defaultPageSize: 10,
total: total
})]
}) : ''
}), /*#__PURE__*/(0,jsx_runtime.jsx)(Entry_EditModal, {
openEditModal: editVisible,
centerId: centerId,
onCancel: function onCancel() {
setEditVisible(false);
getData(true);
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
maskClosable: false,
title: "\u8D26\u5355\u8BE6\u60C5",
centered: true,
open: viewVisible,
onOk: function onOk() {
return setViewVisible(false);
},
onCancel: function onCancel() {
return setViewVisible(false);
},
width: 600,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Entrymodules.infoItem,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '100px'
},
children: "\u91C7\u8D2D\u540D\u79F0\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (viewData === null || viewData === void 0 ? void 0 : viewData.title) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Entrymodules.infoItem,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '100px'
},
children: "\u91C7\u8D2D\u4EBA\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (viewData === null || viewData === void 0 ? void 0 : viewData.user_name) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Entrymodules.infoItem,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '100px'
},
children: "\u91C7\u8D2D\u4EBA\u7535\u8BDD\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: (viewData === null || viewData === void 0 ? void 0 : viewData.phone) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Entrymodules.infoItem,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '100px'
},
children: "\u91C7\u8D2D\u65F6\u95F4\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: viewData !== null && viewData !== void 0 && viewData.date ? dayjs_min_default()(viewData === null || viewData === void 0 ? void 0 : viewData.date).format('YYYY-MM-DD HH:mm') : '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Entrymodules.infoItem,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '100px'
},
children: "\u5907\u6CE8\u8BF4\u660E\uFF1A"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
width: '460px',
textAlign: "left"
},
children: (viewData === null || viewData === void 0 ? void 0 : viewData.description) || '--'
})]
})]
})]
});
};
/* harmony default export */ var Entry = ((0,_umi_production_exports.connect)(function (_ref2) {
var loading = _ref2.loading,
engineeringNavigtion = _ref2.engineeringNavigtion;
return objectSpread2_default()({
loading: loading
}, engineeringNavigtion);
})(Navigation));
/***/ }),
/***/ 60028:
/*!**********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/upload/index.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _Dragger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dragger */ 71409);
/* harmony import */ var _Upload__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Upload */ 73442);
"use client";
const Upload = _Upload__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z;
Upload.Dragger = _Dragger__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
Upload.LIST_IGNORE = _Upload__WEBPACK_IMPORTED_MODULE_0__/* .LIST_IGNORE */ .E;
/* harmony default export */ __webpack_exports__.Z = (Upload);
/***/ })
}]);

File diff suppressed because it is too large Load Diff

@ -0,0 +1,757 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[77248],{
/***/ 55967:
/*!***********************************************************************************!*\
!*** ./src/pages/Materials/ItemAssetsList/CreateItemAssets/index.tsx + 3 modules ***!
\***********************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ CreateItemAssets; }
});
// 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);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(44742);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(20008);
// 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/message/index.js + 4 modules
var message = __webpack_require__(8591);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssetsList/CreateItemAssets/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var CreateItemAssetsmodules = ({"wrap":"wrap___DmOGS","back_style":"back_style___TmAJ9","header":"header___Jryyz","header_form":"header_form___Vnph8","guize_select":"guize_select___Uq_oh","guize_update":"guize_update___jNBfj","shangchuan_button":"shangchuan_button___FGARg","shangchuan_img":"shangchuan_img___molWX","shangchuan_close":"shangchuan_close___VkAWB","close_button":"close_button___SDAUv","submit_button":"submit_button___IGPOo","add_button":"add_button___Jz6GY"});
// EXTERNAL MODULE: ./src/service/laboratory.ts
var service_laboratory = __webpack_require__(66754);
// 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/spin/index.js + 1 modules
var spin = __webpack_require__(71418);
// EXTERNAL MODULE: ./node_modules/_react-cropper@1.3.0@react-cropper/dist/react-cropper.js
var react_cropper = __webpack_require__(33555);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssetsList/CreateItemAssets/UpdateAvatarModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var UpdateAvatarModalmodules = ({"modal":"modal___GMdv5","avatarWrap":"avatarWrap___k2FvQ","tip":"tip___dUCZq","previewWrap":"previewWrap___Lbfik","previewImg":"previewImg___CIcte","uploadButton":"uploadButton___AUTsw"});
// EXTERNAL MODULE: ./node_modules/_cropperjs@1.6.1@cropperjs/dist/cropper.css
var cropper = __webpack_require__(45971);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssetsList/CreateItemAssets/UpdateAvatarModal/index.tsx
var UpdateAvatarModal = function UpdateAvatarModal(_ref) {
var user = _ref.user,
account = _ref.account,
globalSetting = _ref.globalSetting,
loading = _ref.loading,
dispatch = _ref.dispatch,
visible = _ref.visible,
onClose = _ref.onClose,
setImgUrl = _ref.setImgUrl;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
avatarImg = _useState2[0],
setAvatarImg = _useState2[1];
var cropper = (0,_react_17_0_2_react.useRef)();
(0,_react_17_0_2_react.useEffect)(function () {
if (visible) {
// setAvatarImg(`${env.IMG_SERVER}/images/${user.userInfo?.image_url}`);
setAvatarImg("");
}
}, [user.userInfo, visible]);
var onChange = function onChange(e) {
var _files;
var files;
if (e.dataTransfer) {
files = e.dataTransfer.files;
} else if (e.target) {
files = e.target.files;
}
if (!((_files = files) !== null && _files !== void 0 && _files.length)) {
return;
}
var file = files[0];
if (!/^image\/\w+/.test(file.type)) {
message/* default */.ZP.info('请选择一个图片格式的文件');
return;
}
// if (file.size > 10 * 1024 * 1024) {
// message.info('仅支持文件大小小于10M的文件');
// return;
// }
var reader = new FileReader();
reader.onload = function () {
setAvatarImg(reader.result);
};
reader.readAsDataURL(files[0]);
};
var handleOk = /*#__PURE__*/function () {
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var dataUrl;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
dataUrl = cropper.current.getCroppedCanvas().toDataURL("image/jpeg");
if (!dataUrl) {
message/* default */.ZP.info('请先上传图片');
}
setImgUrl(dataUrl);
onClose();
// const res = await dispatch({
// type: 'account/updateAvatar',
// payload: { image: dataUrl, login: user.userInfo?.login }
// });
// handlerCancel();
// if (res.status === 0) {
// message.info('修改头像成功');
// dispatch({
// type: 'user/getUserInfo',
// });
// }
case 4:
case "end":
return _context.stop();
}
}, _callee);
}));
return function handleOk() {
return _ref2.apply(this, arguments);
};
}();
var handlerCancel = function handlerCancel() {
onClose();
};
return /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
maskClosable: false,
centered: true,
keyboard: false,
closable: false,
open: visible,
title: "\u4E0A\u4F20\u7269\u8D44\u56FE\u7247",
width: 550,
forceRender: true,
confirmLoading: loading['account/updateAvatar'],
onOk: handleOk,
onCancel: handlerCancel,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(spin/* default */.Z, {
spinning: !!loading['account/updateAvatar'],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: UpdateAvatarModalmodules.modal,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: UpdateAvatarModalmodules.avatarWrap,
children: /*#__PURE__*/(0,jsx_runtime.jsx)(react_cropper/* default */.Z, {
style: {
height: 320,
width: 320
},
ref: cropper,
src: avatarImg,
guides: false,
aspectRatio: 2 / 1,
preview: "#updateAvatarImg"
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: UpdateAvatarModalmodules.previewWrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: UpdateAvatarModalmodules.previewImg,
id: "updateAvatarImg"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: "".concat(UpdateAvatarModalmodules.tip, " tc"),
children: "\u7269\u8D44\u56FE\u7247\u9884\u89C8"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("label", {
className: UpdateAvatarModalmodules.uploadButton,
id: "uploadBtn",
htmlFor: "inputImage",
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("input", {
type: "file",
className: "sr-only",
id: "inputImage",
name: "file",
accept: "image/*",
style: {
display: "none"
},
onChange: onChange
}), "\u70B9\u51FB\u4E0A\u4F20"]
})]
})]
})
})
});
};
/* harmony default export */ var CreateItemAssets_UpdateAvatarModal = ((0,_umi_production_exports.connect)(function (_ref3) {
var user = _ref3.user,
account = _ref3.account,
loading = _ref3.loading,
globalSetting = _ref3.globalSetting;
return {
user: user,
account: account,
globalSetting: globalSetting,
loading: loading.effects
};
})(UpdateAvatarModal));
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(41883);
// EXTERNAL MODULE: ./src/assets/images/uploadImg.svg
var uploadImg = __webpack_require__(18782);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(33259);
// EXTERNAL MODULE: ./src/assets/images/roomInitImg.png
var roomInitImg = __webpack_require__(58253);
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
var markdown_editor = __webpack_require__(74385);
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(85454);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssetsList/CreateItemAssets/index.tsx
var Navigation = function Navigation(_ref) {
var _account$actionTabs;
var loading = _ref.loading,
user = _ref.user,
dispatch = _ref.dispatch,
account = _ref.account;
var params = (0,_umi_production_exports.useParams)();
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
myForm = _Form$useForm2[0];
//实验室房间
var _useState = (0,_react_17_0_2_react.useState)([]),
_useState2 = slicedToArray_default()(_useState, 2),
laboratoryRooms = _useState2[0],
setLaboratoryRooms = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(''),
_useState4 = slicedToArray_default()(_useState3, 2),
laboratoryRoom = _useState4[0],
setLaboratoryRoom = _useState4[1];
//实验室
var _useState5 = (0,_react_17_0_2_react.useState)([]),
_useState6 = slicedToArray_default()(_useState5, 2),
laboratorys = _useState6[0],
setLaboratorys = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(''),
_useState8 = slicedToArray_default()(_useState7, 2),
laboratory = _useState8[0],
setLaboratory = _useState8[1];
//物资分类
var _useState9 = (0,_react_17_0_2_react.useState)([]),
_useState10 = slicedToArray_default()(_useState9, 2),
substanceList = _useState10[0],
setSubstanceList = _useState10[1];
//单位
var _useState11 = (0,_react_17_0_2_react.useState)([{
label: '个',
value: 1
}, {
label: '套',
value: 2
}, {
label: '袋',
value: 3
}, {
label: '条',
value: 4
}, {
label: '根',
value: 5
}, {
label: '升',
value: 6
}, {
label: '毫升',
value: 7
}]),
_useState12 = slicedToArray_default()(_useState11, 2),
unitList = _useState12[0],
setUnitList = _useState12[1];
(0,_react_17_0_2_react.useEffect)(function () {
if ((params === null || params === void 0 ? void 0 : params.itemAssetsId) != 'null') {
//编辑 房间详情
(0,materials/* substances_info */.os)({
id: params === null || params === void 0 ? void 0 : params.itemAssetsId
}).then(function (res) {
var _res$data, _res$data2, _res$data3, _res$data4, _res$data5, _res$data6, _res$data7, _res$data8, _res$data9, _res$data10, _res$data11, _res$data12, _res$data13, _res$data14, _res$data15, _res$data16, _res$data18;
myForm.setFieldsValue({
attachment_ids: (0,MultiUpload/* coverToFileList */.z)(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.attachments),
title: res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.title,
number: res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.number,
substance_category_id: res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.substance_category_id,
model: res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.model,
price: res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.price,
capacity: res === null || res === void 0 || (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : _res$data7.capacity,
low_value: res === null || res === void 0 || (_res$data8 = res.data) === null || _res$data8 === void 0 ? void 0 : _res$data8.low_value,
facturer: res === null || res === void 0 || (_res$data9 = res.data) === null || _res$data9 === void 0 ? void 0 : _res$data9.facturer,
unit: res === null || res === void 0 || (_res$data10 = res.data) === null || _res$data10 === void 0 ? void 0 : _res$data10.unit,
classroom_room_id: res === null || res === void 0 || (_res$data11 = res.data) === null || _res$data11 === void 0 ? void 0 : _res$data11.classroom_room_id,
classroom_id: res === null || res === void 0 || (_res$data12 = res.data) === null || _res$data12 === void 0 ? void 0 : _res$data12.classroom_id,
description: res === null || res === void 0 || (_res$data13 = res.data) === null || _res$data13 === void 0 ? void 0 : _res$data13.description,
image: res !== null && res !== void 0 && (_res$data14 = res.data) !== null && _res$data14 !== void 0 && _res$data14.image ? res === null || res === void 0 || (_res$data15 = res.data) === null || _res$data15 === void 0 ? void 0 : _res$data15.image : ''
});
if (res !== null && res !== void 0 && (_res$data16 = res.data) !== null && _res$data16 !== void 0 && _res$data16.image) {
var _res$data17;
setRoomImg(env/* default */.Z.API_SERVER + '/' + (res === null || res === void 0 || (_res$data17 = res.data) === null || _res$data17 === void 0 ? void 0 : _res$data17.image));
}
//实验室房间
(0,service_laboratory/* classroom_rooms_query */.jd)({
page: 1,
limit: 10000,
keyword: '',
classroom_id: res === null || res === void 0 || (_res$data18 = res.data) === null || _res$data18 === void 0 ? void 0 : _res$data18.classroom_id
}).then(function (res) {
var _res$data19;
setLaboratoryRooms(res === null || res === void 0 || (_res$data19 = res.data) === null || _res$data19 === void 0 ? void 0 : _res$data19.list);
});
});
}
//实验室
(0,service_laboratory/* classroom_query */.GJ)({
page: 1,
limit: 10000,
keyword: ''
}).then(function (res) {
var _res$data20;
setLaboratorys(res === null || res === void 0 || (_res$data20 = res.data) === null || _res$data20 === void 0 ? void 0 : _res$data20.list);
});
//物资分类
(0,materials/* substance_categories_query */.xb)({
page: 1,
limit: 10000,
keyword: ''
}).then(function (res) {
var _res$data21;
setSubstanceList(res === null || res === void 0 || (_res$data21 = res.data) === null || _res$data21 === void 0 ? void 0 : _res$data21.list);
});
dispatch({
type: 'globalSetting/headerFooterToggle',
payload: false
});
return function () {
dispatch({
type: 'globalSetting/headerFooterToggle',
payload: true
});
};
}, []);
var _useState13 = (0,_react_17_0_2_react.useState)(''),
_useState14 = slicedToArray_default()(_useState13, 2),
roomImg = _useState14[0],
setRoomImg = _useState14[1];
//正则校验
var validateInput = function validateInput(rule, value, callback) {
var pattern = /^[0-9a-zA-Z]+$/;
if (!pattern.test(value)) {
callback('请输入数字和字母');
} else {
callback();
}
};
var setImgUrl = function setImgUrl(box) {
myForm.setFieldValue('image', box);
setRoomImg(box);
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: CreateItemAssetsmodules.wrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: CreateItemAssetsmodules.back_style,
onClick: function onClick() {
_umi_production_exports.history.push('/materials/itemAssetsList');
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-fanhui2 font12 mr5"
}), "\u8FD4\u56DE"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: CreateItemAssetsmodules.header,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: myForm,
className: CreateItemAssetsmodules.header_form
// labelCol={{ span: 3 }}
,
wrapperCol: {
span: 21
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7269\u8D44\u7F16\u53F7",
name: "number",
rules: [{
required: true,
message: '请输入物资编号'
}, {
validator: validateInput,
message: '请输入数字和字母'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7269\u8D44\u540D\u79F0",
name: "title",
rules: [{
required: true,
message: '请输入物资名称'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7269\u8D44\u5206\u7C7B",
name: "substance_category_id",
rules: [{
required: true,
message: '请选择物资分类'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
size: "large",
children: substanceList === null || substanceList === void 0 ? void 0 : substanceList.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
}, index);
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u578B\u53F7\u89C4\u683C",
name: "model",
rules: [{
required: true,
message: '请输入型号规格'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5355\u4EF7\uFF08\u5143\uFF09",
name: "price",
rules: [{
required: true,
message: '请输入单价'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: "flex"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5BB9\u91CF",
name: "capacity",
rules: [{
required: true,
message: '必填项'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large",
style: {
width: 502
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
name: "unit",
rules: [{
required: true,
message: '请选择单位'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
size: "large",
style: {
width: 502,
marginLeft: '20px'
},
children: unitList === null || unitList === void 0 ? void 0 : unitList.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.value,
children: item === null || item === void 0 ? void 0 : item.label
}, index);
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: "flex"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5B58\u653E\u5730\u70B9",
name: "classroom_id",
rules: [{
required: true,
message: '必填项'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
size: "large",
style: {
width: 502
},
defaultValue: laboratory,
value: laboratory,
onChange: function onChange(e) {
setLaboratory(e);
setLaboratoryRoom('');
//实验室房间
(0,service_laboratory/* classroom_rooms_query */.jd)({
page: 1,
limit: 10000,
keyword: '',
classroom_id: e
}).then(function (res) {
var _res$data22;
setLaboratoryRooms(res === null || res === void 0 || (_res$data22 = res.data) === null || _res$data22 === void 0 ? void 0 : _res$data22.list);
});
myForm.setFieldValue('classroom_room_id', '');
},
children: laboratorys === null || laboratorys === void 0 ? void 0 : laboratorys.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
}, index);
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
name: "classroom_room_id",
rules: [{
required: true,
message: '请选择实验室房间'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
size: "large",
style: {
width: 502,
marginLeft: '20px'
},
defaultValue: laboratoryRoom,
value: laboratoryRoom,
onChange: function onChange(e) {
setLaboratoryRoom(e);
},
children: laboratoryRooms === null || laboratoryRooms === void 0 ? void 0 : laboratoryRooms.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
}, index);
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u6570\u91CF\u4E0B\u9650\u63D0\u9192\u503C",
name: "low_value",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u751F\u4EA7\u5382\u5BB6",
name: "facturer",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7269\u8D44\u56FE\u7247",
name: "image",
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: CreateItemAssetsmodules.shangchuan_button,
onClick: function onClick() {
dispatch({
type: 'account/setActionTabs',
payload: {
key: 'Account-UpdateAvatar'
}
});
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
className: "aBtn_img",
src: uploadImg/* default */.Z,
style: {
marginTop: '-4px',
marginRight: '8px'
}
}), "\u4E0A\u4F20\u56FE\u7247"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: CreateItemAssetsmodules.shangchuan_img,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("img", {
src: roomImg ? roomImg : roomInitImg,
style: {
width: '300px',
height: "156px"
}
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: CreateItemAssetsmodules.shangchuan_close,
onClick: function onClick() {
setRoomImg('');
myForm.setFieldValue('image', '');
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-shanchu6"
})
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u4F7F\u7528\u987B\u77E5",
name: "description",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
height: 300,
defaultValue: myForm.getFieldValue('description') || '',
watch: true
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u9644\u4EF6",
name: "attachment_ids",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MultiUpload/* default */.Z, {})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
marginTop: '40px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: CreateItemAssetsmodules.close_button,
onClick: function onClick() {
_umi_production_exports.history.push('/materials/itemAssetsList');
},
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: CreateItemAssetsmodules.submit_button,
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _myForm$getFieldValue, _myForm$getFieldValue2;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
_context.next = 2;
return myForm.validateFields();
case 2:
if ((params === null || params === void 0 ? void 0 : params.itemAssetsId) != 'null') {
//编辑
(0,materials/* substances_update */.xR)({
id: params === null || params === void 0 ? void 0 : params.itemAssetsId,
substance: objectSpread2_default()(objectSpread2_default()({}, myForm.getFieldsValue()), {}, {
attachment_ids: (_myForm$getFieldValue = myForm.getFieldValue('attachment_ids')) === null || _myForm$getFieldValue === void 0 ? void 0 : _myForm$getFieldValue.map(function (item) {
var _item$response;
return item === null || item === void 0 || (_item$response = item.response) === null || _item$response === void 0 ? void 0 : _item$response.id;
})
})
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('编辑成功');
_umi_production_exports.history.push("/materials/itemAssetsList");
}
});
} else {
(0,materials/* substances_create */.i6)({
substance: objectSpread2_default()(objectSpread2_default()({}, myForm.getFieldsValue()), {}, {
attachment_ids: (_myForm$getFieldValue2 = myForm.getFieldValue('attachment_ids')) === null || _myForm$getFieldValue2 === void 0 ? void 0 : _myForm$getFieldValue2.map(function (item) {
var _item$response2;
return item === null || item === void 0 || (_item$response2 = item.response) === null || _item$response2 === void 0 ? void 0 : _item$response2.id;
})
})
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('新建成功');
_umi_production_exports.history.push("/materials/itemAssetsList");
}
});
}
case 3:
case "end":
return _context.stop();
}
}, _callee);
})),
children: "\u63D0\u4EA4"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(CreateItemAssets_UpdateAvatarModal, {
setImgUrl: setImgUrl,
visible: ((_account$actionTabs = account.actionTabs) === null || _account$actionTabs === void 0 ? void 0 : _account$actionTabs.key) === 'Account-UpdateAvatar',
onClose: function onClose() {
dispatch({
type: 'account/setActionTabs'
});
}
})]
});
};
/* harmony default export */ var CreateItemAssets = ((0,_umi_production_exports.connect)(function (_ref3) {
var loading = _ref3.loading,
user = _ref3.user,
engineeringNavigtion = _ref3.engineeringNavigtion,
dispatch = _ref3.dispatch,
account = _ref3.account;
return objectSpread2_default()(objectSpread2_default()({
loading: loading,
user: user
}, engineeringNavigtion), {}, {
dispatch: dispatch,
account: account
});
})(Navigation));
/***/ })
}]);

@ -0,0 +1,705 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[9134],{
/***/ 62190:
/*!******************************************************************!*\
!*** ./src/pages/Materials/ItemAssetsList/index.tsx + 2 modules ***!
\******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ ItemAssetsList; }
});
// 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/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
var toConsumableArray = __webpack_require__(37205);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(44742);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssetsList/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var ItemAssetsListmodules = ({"tabs_content":"tabs_content___nlFwP","header_div":"header_div___Jh1DK","search":"search___CWnRQ","searchIcon":"searchIcon___fXBwc","search_params":"search_params___fZdCk","add_Data":"add_Data___eJpfM","daoru_Data":"daoru_Data___piDwM","upload_modal":"upload_modal___KxO6A","modal_moban":"modal_moban___AyGUa","xiazai":"xiazai___c6mAR","modal_shangchuan":"modal_shangchuan___KKj_n","shangchuan":"shangchuan___tsjf2","geshi":"geshi___snpRc"});
// 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/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/tabs/index.js + 24 modules
var tabs = __webpack_require__(99313);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(20008);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// 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/table/index.js + 85 modules
var table = __webpack_require__(86383);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = __webpack_require__(36697);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
// EXTERNAL MODULE: ./src/service/laboratory.ts
var laboratory = __webpack_require__(66754);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(63834);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/upload/Dragger.js
var Dragger = __webpack_require__(71409);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssetsList/itemAssetsList_module.xlsx
var itemAssetsList_module_namespaceObject = __webpack_require__.p + "static/itemAssetsList_module.4e9b5d39.xlsx";
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(85454);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssetsList/index.tsx
var unitType = {
1: '个',
2: '套',
3: '袋',
4: '条',
5: '根',
6: '升',
7: '毫升'
};
var Navigation = function Navigation(_ref) {
var loading = _ref.loading;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
keyword = _useState2[0],
setkeyword = _useState2[1];
//分页
var _useState3 = (0,_react_17_0_2_react.useState)(0),
_useState4 = slicedToArray_default()(_useState3, 2),
total = _useState4[0],
setTotal = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(1),
_useState6 = slicedToArray_default()(_useState5, 2),
page = _useState6[0],
setPage = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(10),
_useState8 = slicedToArray_default()(_useState7, 2),
limit = _useState8[0],
setLimit = _useState8[1];
//物资类型 可用、报废
var _useState9 = (0,_react_17_0_2_react.useState)('1'),
_useState10 = slicedToArray_default()(_useState9, 2),
itemType = _useState10[0],
setItemType = _useState10[1];
//预约数据
var _useState11 = (0,_react_17_0_2_react.useState)([]),
_useState12 = slicedToArray_default()(_useState11, 2),
tableData = _useState12[0],
setTableData = _useState12[1];
//导入
var _useState13 = (0,_react_17_0_2_react.useState)(false),
_useState14 = slicedToArray_default()(_useState13, 2),
openUpload = _useState14[0],
setOpenUpload = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)([]),
_useState16 = slicedToArray_default()(_useState15, 2),
fileList = _useState16[0],
setFileList = _useState16[1];
//实验室、实验室房间、物资类别
var _useState17 = (0,_react_17_0_2_react.useState)([]),
_useState18 = slicedToArray_default()(_useState17, 2),
roomList = _useState18[0],
setRoomList = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)(''),
_useState20 = slicedToArray_default()(_useState19, 2),
classroomRoomId = _useState20[0],
setClassroomRoomId = _useState20[1];
var _useState21 = (0,_react_17_0_2_react.useState)([]),
_useState22 = slicedToArray_default()(_useState21, 2),
classroomList = _useState22[0],
setClassroomList = _useState22[1];
var _useState23 = (0,_react_17_0_2_react.useState)(''),
_useState24 = slicedToArray_default()(_useState23, 2),
classroomId = _useState24[0],
setClassroomId = _useState24[1];
var _useState25 = (0,_react_17_0_2_react.useState)([]),
_useState26 = slicedToArray_default()(_useState25, 2),
substanceList = _useState26[0],
setSubstanceList = _useState26[1];
var _useState27 = (0,_react_17_0_2_react.useState)(''),
_useState28 = slicedToArray_default()(_useState27, 2),
substanceCategoryId = _useState28[0],
setSubstanceCategoryId = _useState28[1];
(0,_react_17_0_2_react.useEffect)(function () {
getData(false);
}, [page]);
(0,_react_17_0_2_react.useEffect)(function () {
getData(true);
}, [keyword, classroomRoomId, classroomId, substanceCategoryId, itemType, limit]);
(0,_react_17_0_2_react.useEffect)(function () {
//实验室列表
(0,laboratory/* classroom_query */.GJ)({
page: 1,
limit: 10000,
keyword: ''
}).then(function (res) {
var _res$data;
setClassroomList([{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list)));
});
//实验室房间
(0,laboratory/* classroom_rooms_query */.jd)({
page: 1,
limit: 10000,
keyword: '',
classroom_id: ''
}).then(function (res) {
var _res$data2;
setRoomList([{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.list)));
});
//物资分类
(0,materials/* substance_categories_query */.xb)({
page: 1,
limit: 10000,
keyword: ''
}).then(function (res) {
var _res$data3;
setSubstanceList([{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list)));
});
}, []);
var getData = function getData(flag) {
if (flag) {
setPage(1);
}
(0,materials/* me_substances_query */.OV)({
page: page,
limit: limit,
keyword: keyword,
classroom_room_id: classroomRoomId,
classroom_id: classroomId,
substance_category_id: substanceCategoryId,
scrapped: itemType == 2 ? 1 : ''
}).then(function (res) {
var _res$data4, _res$data5;
setTableData(res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.list);
setTotal(res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 ? void 0 : _res$data5.count);
});
};
var columns = [{
title: '物资编号',
dataIndex: 'number',
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: 'title',
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 || '--'
})
});
}
}, itemType == '1' && {
title: '可申请',
dataIndex: 'apply_total',
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: 'total',
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: 'unit',
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: unitType[text]
})
});
}
}, {
title: '物资类别',
dataIndex: 'substance_category_title',
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: 'model',
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: 'classroom_titile',
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: 'classroom_room_title',
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: 'facturer',
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: '操作',
width: 200,
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
},
onClick: function onClick() {
_umi_production_exports.history.push("/materials/itemAssetsList/createItemAssets/".concat(record === null || record === void 0 ? void 0 : record.id));
},
children: "\u7F16\u8F91"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: '20px'
},
children: "\u5220\u9664"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: '20px'
},
onClick: function onClick() {
// ${record?.id}
_umi_production_exports.history.push("/materials/itemAssets/".concat(record === null || record === void 0 ? void 0 : record.id, "/info?backUrl=/materials/itemAssetsList&indexType=").concat(itemType));
},
children: "\u7269\u8D44\u660E\u7EC6"
})]
});
}
}].filter(function (item) {
return !!item;
});
var onShowSizeChange = function onShowSizeChange(page, size) {
setPage(page);
setLimit(size);
};
var Draggers = {
onRemove: function onRemove() {
setFileList([]);
},
beforeUpload: function beforeUpload(file) {
if ((file === null || file === void 0 ? void 0 : file.size) > 1024 * 1024 * 50) {
message/* default */.ZP.info('文件超过50M不符合上传要求');
return false;
}
var filelist = [];
filelist.push(file);
setFileList([].concat(filelist));
return false;
},
fileList: fileList,
accept: ".xls,.xlsx"
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ItemAssetsListmodules.tabs_content,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(tabs/* default */.Z, {
defaultActiveKey: itemType,
items: [{
key: '1',
label: '可用物资'
}, {
key: '2',
label: '报废物资'
}],
onChange: function onChange(e) {
setItemType(e);
}
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ItemAssetsListmodules.header_div,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
placeholder: "\u8BF7\u641C\u7D22\u540D\u79F0/\u7269\u8D44\u7F16\u53F7",
size: "large",
className: ItemAssetsListmodules.search,
value: keyword,
onChange: function onChange(e) {
setkeyword(e.target.value);
},
onSearch: function onSearch(value) {
setkeyword(value);
},
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-sousuo9 font14 ".concat(ItemAssetsListmodules.searchIcon),
onClick: function onClick() {
setkeyword(keyword);
getData(true);
}
})
}), itemType == 1 && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ItemAssetsListmodules.add_Data,
onClick: function onClick() {
_umi_production_exports.history.push("/materials/itemAssetsList/createItemAssets/null");
},
children: "\u6DFB\u52A0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ItemAssetsListmodules.daoru_Data,
onClick: function onClick() {
setOpenUpload(true);
},
children: "\u5BFC\u5165"
})]
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ItemAssetsListmodules.search_params,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u6240\u5C5E\u5B9E\u9A8C\u5BA4",
style: {
marginLeft: 'auto'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
style: {
width: 160
},
defaultValue: classroomId,
value: classroomId,
onChange: function onChange(e) {
setClassroomId(e);
//实验室房间
(0,laboratory/* classroom_rooms_query */.jd)({
page: 1,
limit: 10000,
keyword: '',
classroom_id: e
}).then(function (res) {
var _res$data6;
setRoomList([{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.list)));
});
setClassroomRoomId('');
},
children: classroomList === null || classroomList === void 0 ? void 0 : classroomList.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
}, index);
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u6240\u5C5E\u5B9E\u9A8C\u5BA4\u623F\u95F4",
style: {
marginLeft: '20px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
style: {
width: 140
},
defaultValue: classroomRoomId,
value: classroomRoomId,
onChange: function onChange(e) {
setClassroomRoomId(e);
},
children: roomList === null || roomList === void 0 ? void 0 : roomList.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
}, index);
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7269\u8D44\u7C7B\u522B",
style: {
marginLeft: '20px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
style: {
width: 140
},
defaultValue: substanceCategoryId,
value: substanceCategoryId,
onChange: function onChange(e) {
setSubstanceCategoryId(e);
},
children: substanceList === null || substanceList === void 0 ? void 0 : substanceList.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
}, index);
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
style: {
marginTop: '-10px'
},
pagination: false,
dataSource: tableData,
columns: columns
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '10px 7px 20px 7px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#656F87'
},
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-primary",
children: total
}), "\u6761\u6570\u636E"]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
showSizeChanger: true,
showQuickJumper: true,
onChange: onShowSizeChange,
defaultCurrent: 1,
pageSizeOptions: ['10', '20', '50', '100'],
current: page || 1,
pageSize: limit || 10,
defaultPageSize: 10,
total: total
})]
}) : ''
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
maskClosable: false,
centered: true,
keyboard: false,
destroyOnClose: true,
className: ItemAssetsListmodules.upload_modal,
open: openUpload,
title: "\u5BFC\u5165\u7269\u8D44",
width: "500px",
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var formData;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
formData = new FormData();
formData.append('file', fileList === null || fileList === void 0 ? void 0 : fileList[0]);
(0,materials/* substances_import */.FZ)(formData).then(function (res) {
var _res$fail;
if ((res === null || res === void 0 || (_res$fail = res.fail) === null || _res$fail === void 0 ? void 0 : _res$fail.length) > 0) {
modal/* default */.Z.info({
title: "批量导入失败信息",
icon: null,
okText: "确认",
width: 600,
centered: true,
onOk: function onOk() {
getData(true);
},
content: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
scroll: {
y: 300
},
pagination: false,
dataSource: res === null || res === void 0 ? void 0 : res.fail,
columns: [{
title: '实验室中心名称',
dataIndex: 'title',
ellipsis: true
}, {
title: '导入失败原因',
dataIndex: 'message',
ellipsis: true
}]
})
});
} else if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('导入成功');
getData(true);
} else {
getData(true);
}
});
setOpenUpload(false);
setFileList([]);
case 5:
case "end":
return _context.stop();
}
}, _callee);
})),
onCancel: function onCancel() {
setOpenUpload(false);
setFileList([]);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ItemAssetsListmodules.modal_moban,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
padding: '20px'
},
children: ["1.\u4E0B\u8F7D\u5BFC\u5165\u6A21\u7248", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#999999',
marginLeft: '10px'
},
children: "\uFF08\u6839\u636E\u63D0\u793A\u4FE1\u606F\u5B8C\u5584\u8868\u683C\u5185\u5BB9\uFF09"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ItemAssetsListmodules.xiazai,
onClick: function onClick() {
(0,util/* downLoadFile */.FH)('物资导入模版', (0,util/* setUrlQuery */.NY)({
url: itemAssetsList_module_namespaceObject,
query: {}
}));
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-xiazai4 mr5"
}), "\u4E0B\u8F7D\u6A21\u7248\u8868\u683C"]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ItemAssetsListmodules.modal_shangchuan,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
padding: '20px'
},
children: "2.\u4E0A\u4F20\u5B8C\u5584\u540E\u7684\u6A21\u7248"
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(Dragger/* default */.Z, objectSpread2_default()(objectSpread2_default()({}, Draggers), {}, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ItemAssetsListmodules.shangchuan,
children: "\u9009\u62E9\u6587\u4EF6"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ItemAssetsListmodules.geshi,
children: "\u4E0B\u8F7D\u6A21\u677F\u5E76\u5B8C\u5584\u4FE1\u606F\u540E\uFF0C\u53EF\u5C06\u6587\u4EF6\u62D6\u66F3\u81F3\u6B64\u5904\u4E0A\u4F20\u3001\u652F\u6301\u683C\u5F0F\uFF1A.xls\u3001.xlsx"
})]
}))]
})]
})]
});
};
/* harmony default export */ var ItemAssetsList = ((0,_umi_production_exports.connect)(function (_ref3) {
var loading = _ref3.loading,
engineeringNavigtion = _ref3.engineeringNavigtion;
return objectSpread2_default()({
loading: loading
}, engineeringNavigtion);
})(Navigation));
/***/ })
}]);

File diff suppressed because it is too large Load Diff

@ -0,0 +1,402 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[98662],{
/***/ 22197:
/*!******************************************************************!*\
!*** ./src/pages/Materials/ItemAssetsType/index.tsx + 1 modules ***!
\******************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ ItemAssetsType; }
});
// 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/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(44742);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssetsType/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var ItemAssetsTypemodules = ({"header_div":"header_div___vIi6W","header_title":"header_title___N7Kkj","search":"search___V6do5","searchIcon":"searchIcon___R9Tr9","clear_Data":"clear_Data___w3xTH","formWrap":"formWrap___EfDnW"});
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
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/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(20008);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(86383);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = __webpack_require__(36697);
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(85454);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssetsType/index.tsx
var Navigation = function Navigation(_ref) {
var loading = _ref.loading;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
keyword = _useState2[0],
setkeyword = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(),
_useState4 = slicedToArray_default()(_useState3, 2),
typeId = _useState4[0],
setTypeId = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
openMyModal = _useState6[0],
setOpenMyModal = _useState6[1];
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
myForm = _Form$useForm2[0];
//分页
var _useState7 = (0,_react_17_0_2_react.useState)(0),
_useState8 = slicedToArray_default()(_useState7, 2),
total = _useState8[0],
setTotal = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(1),
_useState10 = slicedToArray_default()(_useState9, 2),
page = _useState10[0],
setPage = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(10),
_useState12 = slicedToArray_default()(_useState11, 2),
limit = _useState12[0],
setLimit = _useState12[1];
//预约数据
var _useState13 = (0,_react_17_0_2_react.useState)([]),
_useState14 = slicedToArray_default()(_useState13, 2),
tableData = _useState14[0],
setTableData = _useState14[1];
(0,_react_17_0_2_react.useEffect)(function () {
getData(false);
}, [page]);
(0,_react_17_0_2_react.useEffect)(function () {
getData(true);
}, [keyword, limit]);
var getData = function getData(flag) {
if (flag) {
setPage(1);
}
(0,materials/* substance_categories_query */.xb)({
page: page,
limit: limit,
keyword: keyword
}).then(function (res) {
var _res$data, _res$data2;
setTableData(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list);
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
});
};
var columns = [{
title: '类别名称',
dataIndex: 'title',
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: 'risk',
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: '操作',
width: 150,
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
},
onClick: function onClick() {
setTypeId(record === null || record === void 0 ? void 0 : record.id);
myForm.setFieldValue('title', record === null || record === void 0 ? void 0 : record.title);
myForm.setFieldValue('risk', record === null || record === void 0 ? void 0 : record.risk);
setOpenMyModal(true);
},
children: "\u7F16\u8F91"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#5F6367",
marginLeft: "10px",
cursor: "pointer"
},
onClick: function onClick() {
modal/* default */.Z.confirm({
centered: true,
okText: '确定',
cancelText: '取消',
title: "提示",
content: "是否确认删除该物资类别?",
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_categories_delete */.HX)({
id: record === null || record === void 0 ? void 0 : record.id
}).then(function (res) {
if (res.status === 0) {
message/* default */.ZP.success('删除成功');
getData(true);
}
});
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
},
children: "\u5220\u9664"
})]
});
}
}];
var onShowSizeChange = function onShowSizeChange(page, size) {
setPage(page);
setLimit(size);
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ItemAssetsTypemodules.header_div,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ItemAssetsTypemodules.header_title,
children: "\u7269\u8D44\u7C7B\u522B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
placeholder: "\u8BF7\u8F93\u5165\u7C7B\u522B\u540D\u79F0\u641C\u7D22",
size: "large",
className: ItemAssetsTypemodules.search,
value: keyword,
onChange: function onChange(e) {
setkeyword(e.target.value);
},
onSearch: function onSearch(value) {
setkeyword(value);
},
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-sousuo9 font14 ".concat(ItemAssetsTypemodules.searchIcon),
onClick: function onClick() {
setkeyword(keyword);
getData(true);
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ItemAssetsTypemodules.clear_Data,
onClick: function onClick() {
setOpenMyModal(true);
setTypeId('');
},
children: "\u65B0\u589E\u7C7B\u522B"
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ItemAssetsTypemodules.search_params
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
pagination: false,
dataSource: tableData,
columns: columns
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '10px 7px 20px 7px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#656F87'
},
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-primary",
children: total
}), "\u6761\u6570\u636E"]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
showSizeChanger: true,
showQuickJumper: true,
onChange: onShowSizeChange,
defaultCurrent: 1,
pageSizeOptions: ['10', '20', '50', '100'],
current: page || 1,
pageSize: limit || 10,
defaultPageSize: 10,
total: total
})]
}) : ''
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
maskClosable: false,
centered: true,
keyboard: false,
destroyOnClose: true,
className: ItemAssetsTypemodules.my_modal,
open: openMyModal,
title: "".concat(typeId ? '编辑' : '新建', "\u7269\u8D44\u7C7B\u522B"),
width: "600px",
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:
_context2.next = 2;
return myForm.validateFields();
case 2:
if (typeId) {
(0,materials/* substance_categories_update */.en)({
id: typeId,
substance_category: myForm.getFieldsValue()
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('编辑成功');
getData(true);
}
setOpenMyModal(false);
myForm.resetFields();
});
} else {
(0,materials/* substance_categories_create */.Td)({
substance_category: myForm.getFieldsValue()
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('新增成功');
getData(true);
}
setOpenMyModal(false);
myForm.resetFields();
});
}
case 3:
case "end":
return _context2.stop();
}
}, _callee2);
})),
onCancel: function onCancel() {
setOpenMyModal(false);
myForm.resetFields();
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
className: ItemAssetsTypemodules.formWrap,
form: myForm,
wrapperCol: {
span: 20
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
labelCol: {
span: 4
},
label: "\u7C7B\u522B\u540D\u79F0",
name: "title",
rules: [{
required: true,
message: '请输入类别名称'
}],
style: {
marginTop: '20px',
marginBottom: '10px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
style: {
height: '40px'
},
maxLength: 50,
showCount: true,
onChange: function onChange(e) {
var _e$target;
myForm.setFieldValue('title', e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 || (_e$target = _e$target.value) === null || _e$target === void 0 ? void 0 : _e$target.trim());
}
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
labelCol: {
span: 4
},
label: "\u98CE\u9669\u70B9",
name: "risk",
style: {
marginTop: '20px',
marginBottom: '10px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
style: {
height: '40px'
},
onChange: function onChange(e) {
var _e$target2;
myForm.setFieldValue('risk', e === null || e === void 0 || (_e$target2 = e.target) === null || _e$target2 === void 0 || (_e$target2 = _e$target2.value) === null || _e$target2 === void 0 ? void 0 : _e$target2.trim());
}
})
})]
})
})]
});
};
/* harmony default export */ var ItemAssetsType = ((0,_umi_production_exports.connect)(function (_ref3) {
var loading = _ref3.loading,
engineeringNavigtion = _ref3.engineeringNavigtion;
return objectSpread2_default()({
loading: loading
}, engineeringNavigtion);
})(Navigation));
/***/ })
}]);

@ -0,0 +1,901 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[19116],{
/***/ 84263:
/*!*******************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***!
\*******************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_InboxOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.0@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(36384);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/InboxOutlined.js
// This icon file is generated automatically.
var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" };
/* harmony default export */ var asn_InboxOutlined = (InboxOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(15436);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/InboxOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_InboxOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(InboxOutlined_InboxOutlined));
/***/ }),
/***/ 35892:
/*!*************************************************************************!*\
!*** ./src/pages/Materials/ItemAssets/AddProcure/index.tsx + 1 modules ***!
\*************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ AddProcure; }
});
// 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);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/toConsumableArray.js
var toConsumableArray = __webpack_require__(37205);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(44742);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(20008);
// 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/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(86383);
// 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/pagination/index.js + 10 modules
var pagination = __webpack_require__(36697);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssets/AddProcure/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var AddProcuremodules = ({"wrap":"wrap___uDEdN","back_style":"back_style___Wh6NB","header":"header___EYIbO","header_form":"header_form___axdTB","guize_select":"guize_select___zWIti","guize_update":"guize_update___FiKWW","shangchuan_button":"shangchuan_button___z7F26","shangchuan_img":"shangchuan_img___mHcZH","shangchuan_close":"shangchuan_close___sWJYn","close_button":"close_button___KyOIv","submit_button":"submit_button___ISIvd","add_button":"add_button___xX4Rr","search_params":"search_params___XFwut","search":"search___h0smH","searchIcon":"searchIcon___QdwCn"});
// EXTERNAL MODULE: ./src/service/laboratory.ts
var laboratory = __webpack_require__(66754);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(41883);
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
var markdown_editor = __webpack_require__(74385);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(14735);
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(85454);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssets/AddProcure/index.tsx
var unitType = {
1: '个',
2: '套',
3: '袋',
4: '条',
5: '根',
6: '升',
7: '毫升'
};
var Navigation = function Navigation(_ref) {
var loading = _ref.loading,
user = _ref.user,
dispatch = _ref.dispatch,
account = _ref.account;
var params = (0,_umi_production_exports.useParams)();
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
myForm = _Form$useForm2[0];
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
openRuleModal = _useState2[0],
setOpenRuleModal = _useState2[1]; //选择规则弹框
//实验室下拉
var _useState3 = (0,_react_17_0_2_react.useState)([]),
_useState4 = slicedToArray_default()(_useState3, 2),
laboratoryLists = _useState4[0],
setLaboratoryLists = _useState4[1];
// 关联
var _useState5 = (0,_react_17_0_2_react.useState)([]),
_useState6 = slicedToArray_default()(_useState5, 2),
containerList = _useState6[0],
setContainerList = _useState6[1];
var _useSearchParams = (0,_umi_production_exports.useSearchParams)(),
_useSearchParams2 = slicedToArray_default()(_useSearchParams, 1),
searchParams = _useSearchParams2[0];
//分页
var _useState7 = (0,_react_17_0_2_react.useState)(0),
_useState8 = slicedToArray_default()(_useState7, 2),
total = _useState8[0],
setTotal = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(1),
_useState10 = slicedToArray_default()(_useState9, 2),
page = _useState10[0],
setPage = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(20),
_useState12 = slicedToArray_default()(_useState11, 2),
limit = _useState12[0],
setLimit = _useState12[1];
//物资类型 可用、报废
var _useState13 = (0,_react_17_0_2_react.useState)(),
_useState14 = slicedToArray_default()(_useState13, 2),
keyword = _useState14[0],
setkeyword = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)([]),
_useState16 = slicedToArray_default()(_useState15, 2),
tableData = _useState16[0],
setTableData = _useState16[1];
//实验室、实验室房间、物资类别
var _useState17 = (0,_react_17_0_2_react.useState)([]),
_useState18 = slicedToArray_default()(_useState17, 2),
roomList = _useState18[0],
setRoomList = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)(''),
_useState20 = slicedToArray_default()(_useState19, 2),
classroomRoomId = _useState20[0],
setClassroomRoomId = _useState20[1];
var _useState21 = (0,_react_17_0_2_react.useState)([]),
_useState22 = slicedToArray_default()(_useState21, 2),
substanceList = _useState22[0],
setSubstanceList = _useState22[1];
var _useState23 = (0,_react_17_0_2_react.useState)(''),
_useState24 = slicedToArray_default()(_useState23, 2),
substanceCategoryId = _useState24[0],
setSubstanceCategoryId = _useState24[1];
//申请物资
var _useState25 = (0,_react_17_0_2_react.useState)([]),
_useState26 = slicedToArray_default()(_useState25, 2),
modalTableData = _useState26[0],
setModalTableData = _useState26[1];
var _useState27 = (0,_react_17_0_2_react.useState)([]),
_useState28 = slicedToArray_default()(_useState27, 2),
formTableData = _useState28[0],
setFormTableData = _useState28[1];
var _useState29 = (0,_react_17_0_2_react.useState)(''),
_useState30 = slicedToArray_default()(_useState29, 2),
refresh = _useState30[0],
setRefresh = _useState30[1];
var _useState31 = (0,_react_17_0_2_react.useState)([]),
_useState32 = slicedToArray_default()(_useState31, 2),
rowKeys = _useState32[0],
setRowKeys = _useState32[1];
var addColumns = [{
title: '物资编码',
dataIndex: 'number',
ellipsis: true
}, {
title: '物资名称',
dataIndex: 'title',
ellipsis: true
}, {
title: '规格型号',
dataIndex: 'model',
ellipsis: true
}, {
title: '存放实验室房间',
dataIndex: 'classroom_room_title',
ellipsis: true
}, {
title: '单位',
dataIndex: 'unit',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: unitType[text]
});
}
}, {
title: '需申请数量',
dataIndex: 'apply_total',
ellipsis: true,
render: function render(text, record, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
defaultValue: text,
onChange: function onChange(e) {
formTableData[index].apply_total = e.target.value;
setFormTableData(toConsumableArray_default()(formTableData));
}
});
}
}, {
title: '操作',
render: function render(text, record, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#165DFF',
cursor: 'pointer'
},
onClick: function onClick() {
formTableData.splice(index, 1);
setFormTableData(toConsumableArray_default()(formTableData));
},
children: "\u5220\u9664"
});
}
}];
(0,_react_17_0_2_react.useEffect)(function () {
if (searchParams.get('initId')) {
//从物资详情里面进入
(0,materials/* substances_info */.os)({
id: searchParams.get('initId')
}).then(function (res) {
var _res$data, _res$data2;
myForm.setFieldValue('classroom_id', res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.classroom_id);
setFormTableData([res === null || res === void 0 ? void 0 : res.data]);
//实验室房间
(0,laboratory/* classroom_rooms_query */.jd)({
page: 1,
limit: 10000,
keyword: '',
classroom_id: res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.classroom_id
}).then(function (res) {
var _res$data3;
setRoomList([{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list)));
});
});
}
if ((params === null || params === void 0 ? void 0 : params.receiveId) != 'null') {
//编辑
(0,materials/* purchases_info */.zG)({
id: params === null || params === void 0 ? void 0 : params.receiveId
}).then(function (res) {
var _res$data4, _res$data5, _res$data6, _res$data7, _res$data8, _res$data9, _res$data10, _res$data11, _res$data12, _res$data13, _res$data14, _res$data15, _res$data16, _res$data17, _res$data19;
myForm.setFieldsValue({
number: res === null || res === void 0 || (_res$data4 = res.data) === null || _res$data4 === void 0 ? void 0 : _res$data4.number,
attachment_ids: (res === null || res === void 0 || (_res$data5 = res.data) === null || _res$data5 === void 0 || (_res$data5 = _res$data5.attachments) === null || _res$data5 === void 0 ? void 0 : _res$data5.length) > 0 ? (0,MultiUpload/* coverToFileList */.z)(res === null || res === void 0 || (_res$data6 = res.data) === null || _res$data6 === void 0 ? void 0 : _res$data6.attachments) : [],
classroom_id: res === null || res === void 0 || (_res$data7 = res.data) === null || _res$data7 === void 0 ? void 0 : _res$data7.classroom_id,
phone: res === null || res === void 0 || (_res$data8 = res.data) === null || _res$data8 === void 0 ? void 0 : _res$data8.phone,
mail: res === null || res === void 0 || (_res$data9 = res.data) === null || _res$data9 === void 0 ? void 0 : _res$data9.mail,
reason: res === null || res === void 0 || (_res$data10 = res.data) === null || _res$data10 === void 0 ? void 0 : _res$data10.reason,
container_type: res === null || res === void 0 || (_res$data11 = res.data) === null || _res$data11 === void 0 ? void 0 : _res$data11.container_type,
container_id: res === null || res === void 0 || (_res$data12 = res.data) === null || _res$data12 === void 0 ? void 0 : _res$data12.container_id,
description: res === null || res === void 0 || (_res$data13 = res.data) === null || _res$data13 === void 0 ? void 0 : _res$data13.description,
substances: (res === null || res === void 0 || (_res$data14 = res.data) === null || _res$data14 === void 0 || (_res$data14 = _res$data14.substances) === null || _res$data14 === void 0 ? void 0 : _res$data14.length) > 0 ? res === null || res === void 0 || (_res$data15 = res.data) === null || _res$data15 === void 0 || (_res$data15 = _res$data15.substances) === null || _res$data15 === void 0 ? void 0 : _res$data15.map(function (item) {
item.apply_total = item === null || item === void 0 ? void 0 : item.apply_num;
return item;
}) : []
});
setFormTableData(toConsumableArray_default()(res === null || res === void 0 || (_res$data16 = res.data) === null || _res$data16 === void 0 || (_res$data16 = _res$data16.substances) === null || _res$data16 === void 0 ? void 0 : _res$data16.map(function (item) {
item.apply_total = item.apply_num;
return item;
})));
//实验室房间
(0,laboratory/* classroom_rooms_query */.jd)({
page: 1,
limit: 10000,
keyword: '',
classroom_id: res === null || res === void 0 || (_res$data17 = res.data) === null || _res$data17 === void 0 ? void 0 : _res$data17.classroom_id
}).then(function (res) {
var _res$data18;
setRoomList([{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data18 = res.data) === null || _res$data18 === void 0 ? void 0 : _res$data18.list)));
});
getContainerList(res === null || res === void 0 || (_res$data19 = res.data) === null || _res$data19 === void 0 ? void 0 : _res$data19.container_type);
});
}
//我的实验室下拉
(0,laboratory/* classroom_query */.GJ)({
page: 1,
limit: 10000,
keyword: ''
}).then(function (res) {
var _res$data20;
setLaboratoryLists(res === null || res === void 0 || (_res$data20 = res.data) === null || _res$data20 === void 0 ? void 0 : _res$data20.list);
});
//物资分类
(0,materials/* substance_categories_query */.xb)({
page: 1,
limit: 10000,
keyword: ''
}).then(function (res) {
var _res$data21;
setSubstanceList([{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data21 = res.data) === null || _res$data21 === void 0 ? void 0 : _res$data21.list)));
});
dispatch({
type: 'globalSetting/headerFooterToggle',
payload: false
});
return function () {
dispatch({
type: 'globalSetting/headerFooterToggle',
payload: true
});
};
}, []);
//获取关联
var getContainerList = function getContainerList(e) {
var _user$userInfo;
var obj = e == 'Subject' ? 'subjects' : e == 'Shixun' ? 'shixuns' : 'courses';
(0,fetch/* default */.ZP)("/api/users/".concat(user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login, "/").concat(obj, ".json"), {
method: 'get',
params: {
page: 1,
per_page: 1000,
username: user.userInfo.login
}
}).then(function (res) {
setContainerList(res === null || res === void 0 ? void 0 : res[obj]);
});
};
(0,_react_17_0_2_react.useEffect)(function () {
getData(false);
}, [page]);
(0,_react_17_0_2_react.useEffect)(function () {
getData(true);
}, [keyword, classroomRoomId, substanceCategoryId, myForm.getFieldValue('classroom_id'), limit]);
var getData = function getData(flag) {
if (flag) {
setPage(1);
}
(0,materials/* me_substances_query */.OV)({
page: page,
limit: limit,
keyword: keyword,
classroom_room_id: classroomRoomId,
classroom_id: myForm.getFieldValue('classroom_id'),
substance_category_id: substanceCategoryId,
scrapped: 0
}).then(function (res) {
var _res$data22, _res$data23;
setTableData(res === null || res === void 0 || (_res$data22 = res.data) === null || _res$data22 === void 0 || (_res$data22 = _res$data22.list) === null || _res$data22 === void 0 ? void 0 : _res$data22.map(function (item) {
item.key = item === null || item === void 0 ? void 0 : item.id;
return item;
}));
setTotal(res === null || res === void 0 || (_res$data23 = res.data) === null || _res$data23 === void 0 ? void 0 : _res$data23.count);
});
};
var onShowSizeChange = function onShowSizeChange(page, size) {
setPage(page);
setLimit(size);
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AddProcuremodules.wrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AddProcuremodules.back_style,
onClick: function onClick() {
_umi_production_exports.history.push(searchParams.get('backUrl'));
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-fanhui2 font12 mr5"
}), "\u8FD4\u56DE"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AddProcuremodules.header,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: myForm,
className: AddProcuremodules.header_form
// labelCol={{ span: 3 }}
,
wrapperCol: {
span: 21
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7533\u8BF7\u539F\u56E0",
name: "reason",
rules: [{
required: true,
message: '请输入申请原因'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large",
showCount: true,
maxLength: 30
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: "flex"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5173\u8054",
name: "container_type",
rules: [{
required: true,
message: '必填项'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
size: "large",
style: {
width: '300px'
},
onChange: function onChange(e) {
getContainerList(e);
myForm.setFieldValue('container_id', '');
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: 'Subject',
children: "\u5B9E\u8DF5\u8BFE\u7A0B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: 'Shixun',
children: "\u5B9E\u8DF5\u9879\u76EE"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: 'Course',
children: "\u6559\u5B66\u8BFE\u5802"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
name: "container_id",
rules: [{
required: true,
message: '请选择关联'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
size: "large",
style: {
marginLeft: '10px',
width: '714px'
},
children: containerList === null || containerList === void 0 ? void 0 : containerList.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.name
}, index);
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7533\u8BF7\u5B9E\u9A8C\u5BA4",
name: "classroom_id",
rules: [{
required: true,
message: '请选择实验室'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
size: "large",
onChange: function onChange(e) {
//实验室房间
(0,laboratory/* classroom_rooms_query */.jd)({
page: 1,
limit: 10000,
keyword: '',
classroom_id: e
}).then(function (res) {
var _res$data24;
setRoomList([{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data24 = res.data) === null || _res$data24 === void 0 ? void 0 : _res$data24.list)));
});
setFormTableData([]);
},
children: laboratoryLists === null || laboratoryLists === void 0 ? void 0 : laboratoryLists.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item.id,
children: item.title
}, index);
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u624B\u673A\u53F7",
name: "phone",
rules: [{
required: true,
message: '请输入手机号'
}, {
required: true,
pattern: /^(0|[1-9]\d*)$/,
message: '请输入正整数'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u90AE\u7BB1",
name: "mail",
rules: [{
required: true,
pattern: /^[1-9]\d*(\.\d+)?$/,
message: '请输入正数'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5907\u6CE8\u8BF4\u660E",
name: "description",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
height: 300,
defaultValue: myForm.getFieldValue('description') || '',
watch: true
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u9644\u4EF6",
name: "attachment_ids",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MultiUpload/* default */.Z, {})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7533\u8BF7\u7269\u8D44",
name: "substances",
rules: [{
required: true,
message: '请选择申请物资'
}],
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AddProcuremodules.guize_select,
onClick: function onClick() {
if (myForm.getFieldValue('classroom_id')) {
setOpenRuleModal(true);
getData(true);
setModalTableData(toConsumableArray_default()(formTableData));
setRowKeys(toConsumableArray_default()(formTableData === null || formTableData === void 0 ? void 0 : formTableData.map(function (item) {
return item === null || item === void 0 ? void 0 : item.id;
})));
} else {
message/* default */.ZP.error('请先选择申请实验室');
}
},
children: "\u6DFB\u52A0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
scroll: {
y: 300
},
pagination: false,
style: {
marginTop: '10px'
},
dataSource: formTableData,
columns: addColumns
}, refresh)]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
marginTop: '40px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AddProcuremodules.close_button,
onClick: function onClick() {
_umi_production_exports.history.push(searchParams.get('backUrl'));
},
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AddProcuremodules.submit_button,
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _myForm$getFieldValue, _myForm$getFieldValue2;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
console.log(formTableData);
myForm.setFieldValue('substances', formTableData === null || formTableData === void 0 ? void 0 : formTableData.map(function (item) {
item.apply_num = item === null || item === void 0 ? void 0 : item.apply_total;
return item;
}));
_context.next = 4;
return myForm.validateFields();
case 4:
if ((params === null || params === void 0 ? void 0 : params.receiveId) != 'null') {
//编辑
(0,materials/* purchases_update */.aQ)({
id: params === null || params === void 0 ? void 0 : params.receiveId,
purchase: objectSpread2_default()(objectSpread2_default()({}, myForm.getFieldsValue()), {}, {
attachment_ids: myForm.getFieldValue('attachment_ids') ? (_myForm$getFieldValue = myForm.getFieldValue('attachment_ids')) === null || _myForm$getFieldValue === void 0 ? void 0 : _myForm$getFieldValue.map(function (item) {
var _item$response;
return item === null || item === void 0 || (_item$response = item.response) === null || _item$response === void 0 ? void 0 : _item$response.id;
}) : []
})
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('编辑成功');
_umi_production_exports.history.push(searchParams.get('backUrl'));
}
});
} else {
(0,materials/* purchases_create */.jc)({
purchase: objectSpread2_default()(objectSpread2_default()({}, myForm.getFieldsValue()), {}, {
attachment_ids: myForm.getFieldValue('attachment_ids') ? (_myForm$getFieldValue2 = myForm.getFieldValue('attachment_ids')) === null || _myForm$getFieldValue2 === void 0 ? void 0 : _myForm$getFieldValue2.map(function (item) {
var _item$response2;
return item === null || item === void 0 || (_item$response2 = item.response) === null || _item$response2 === void 0 ? void 0 : _item$response2.id;
}) : []
})
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('申请成功');
_umi_production_exports.history.push(searchParams.get('backUrl'));
}
});
}
case 5:
case "end":
return _context.stop();
}
}, _callee);
})),
children: "\u63D0\u4EA4"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
maskClosable: false,
centered: true,
keyboard: false,
destroyOnClose: true,
className: AddProcuremodules.my_modal,
open: openRuleModal,
title: "\u9009\u62E9\u7269\u8D44",
width: "1000px",
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
var i, j;
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
//去重保存已选的值的 需申请数据
for (i in modalTableData) {
for (j in formTableData) {
if (formTableData[j].id == modalTableData[i].id) {
modalTableData[i] = formTableData[j];
}
}
}
setFormTableData(toConsumableArray_default()(modalTableData));
setOpenRuleModal(false);
setRefresh(new Date());
case 4:
case "end":
return _context2.stop();
}
}, _callee2);
})),
onCancel: function onCancel() {
setOpenRuleModal(false);
setRefresh(new Date());
},
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AddProcuremodules.search_params,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5B9E\u9A8C\u5BA4\u623F\u95F4",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
style: {
width: 140
},
defaultValue: classroomRoomId,
value: classroomRoomId,
onChange: function onChange(e) {
setClassroomRoomId(e);
},
children: roomList === null || roomList === void 0 ? void 0 : roomList.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
}, index);
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7269\u8D44\u7C7B\u522B",
style: {
marginLeft: '20px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
style: {
width: 140
},
defaultValue: substanceCategoryId,
value: substanceCategoryId,
onChange: function onChange(e) {
setSubstanceCategoryId(e);
},
children: substanceList === null || substanceList === void 0 ? void 0 : substanceList.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
}, index);
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
placeholder: "\u8BF7\u641C\u7D22\u540D\u79F0/\u7269\u8D44\u7F16\u53F7",
size: "large",
className: AddProcuremodules.search,
value: keyword,
onChange: function onChange(e) {
setkeyword(e.target.value);
},
onSearch: function onSearch(value) {
setkeyword(value);
},
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-sousuo9 font14 ".concat(AddProcuremodules.searchIcon),
onClick: function onClick() {
setkeyword(keyword);
getData(true);
}
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
rowSelection: {
type: 'checkbox',
selectedRowKeys: rowKeys,
getCheckboxProps: function getCheckboxProps(record) {
return {
checked: rowKeys.includes(record.key)
};
},
onSelect: function onSelect(record, selected) {
if (selected) {
//添加
setModalTableData([].concat(toConsumableArray_default()(modalTableData), [record]));
setRowKeys([].concat(toConsumableArray_default()(rowKeys), [record === null || record === void 0 ? void 0 : record.id]));
} else {
//删除
for (var i = 0; i < (rowKeys === null || rowKeys === void 0 ? void 0 : rowKeys.length); i++) {
if (rowKeys[i] == (record === null || record === void 0 ? void 0 : record.id)) {
rowKeys.splice(i, 1);
modalTableData.splice(i, 1);
}
}
setModalTableData(toConsumableArray_default()(modalTableData));
setRowKeys(toConsumableArray_default()(rowKeys));
}
}
},
scroll: {
y: 300
},
pagination: false,
dataSource: tableData,
columns: [{
title: '物资编号',
dataIndex: 'number',
ellipsis: true
}, {
title: '物资名称',
dataIndex: 'title',
ellipsis: true
}, {
title: '型号规格',
dataIndex: 'model',
ellipsis: true
}, {
title: '可申请数量',
dataIndex: 'apply_total',
ellipsis: true
}, {
title: '物资类别',
dataIndex: 'substance_category_title',
ellipsis: true
}, {
title: '实验室房间',
dataIndex: 'classroom_room_title',
ellipsis: true
}]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '10px 7px 20px 7px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#656F87'
},
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-primary",
children: total
}), "\u6761\u6570\u636E"]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
showSizeChanger: true,
showQuickJumper: true,
onChange: onShowSizeChange,
defaultCurrent: 1,
pageSizeOptions: ['20', '50', '100'],
current: page || 1,
pageSize: limit || 20,
defaultPageSize: 20,
total: total
})]
}) : ''
})]
})]
});
};
/* harmony default export */ var AddProcure = ((0,_umi_production_exports.connect)(function (_ref4) {
var loading = _ref4.loading,
user = _ref4.user,
engineeringNavigtion = _ref4.engineeringNavigtion,
dispatch = _ref4.dispatch,
account = _ref4.account;
return objectSpread2_default()(objectSpread2_default()({
loading: loading,
user: user
}, engineeringNavigtion), {}, {
dispatch: dispatch,
account: account
});
})(Navigation));
/***/ }),
/***/ 60028:
/*!**********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/upload/index.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _Dragger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dragger */ 71409);
/* harmony import */ var _Upload__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Upload */ 73442);
"use client";
const Upload = _Upload__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z;
Upload.Dragger = _Dragger__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
Upload.LIST_IGNORE = _Upload__WEBPACK_IMPORTED_MODULE_0__/* .LIST_IGNORE */ .E;
/* harmony default export */ __webpack_exports__.Z = (Upload);
/***/ })
}]);

@ -151,6 +151,61 @@
top: 5px;
right: 0;
}
.search_params___XFwut {
display: flex;
}
.search_params___XFwut [class~='ant-form-item'] [class~='ant-form-item-label'] {
text-align: right !important;
}
.search_params___XFwut [class~='ant-form-item'] [class~='ant-form-item-label'] label {
color: #666 !important;
display: block !important;
height: 36px !important;
line-height: 36px !important;
}
.search_params___XFwut [class~='ant-select-selector'] {
height: 36px !important;
}
.search_params___XFwut [class~='ant-picker'] {
height: 36px !important;
}
.search_params___XFwut [class~='ant-select-selection-item'] {
line-height: 34px !important;
}
.search_params___XFwut .search___h0smH {
display: flex;
align-items: center;
overflow: hidden;
border-radius: 19px;
height: 38px;
width: 260px;
padding-left: 8px;
background-color: #f6f7f9;
border: none;
margin-left: auto;
}
.search_params___XFwut .search___h0smH span[class~='ant-input-search-icon'] {
display: none !important;
}
.search_params___XFwut .search___h0smH [class~='ant-input-affix-wrapper'] {
background-color: #f6f7f9 !important;
border: none !important;
}
.search_params___XFwut .search___h0smH [class~='ant-input-affix-wrapper'] {
outline: none !important;
border: none !important;
box-shadow: none !important;
}
.search_params___XFwut .search___h0smH span[class~='ant-input-group-addon'] {
display: none !important;
}
.search_params___XFwut .search___h0smH .searchIcon___QdwCn {
margin-right: 14px;
cursor: pointer;
}
.search_params___XFwut .search___h0smH input {
background-color: #f6f7f9;
}
/*!*********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[1].use[1]!./node_modules/_@umijs_bundler-webpack@4.1.2@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[2]!./node_modules/_@umijs_bundler-webpack@4.1.2@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[1].use[3]!./src/components/MultiUpload/index.less ***!

@ -1,500 +0,0 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[19116],{
/***/ 84263:
/*!*******************************************************************************************************!*\
!*** ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/InboxOutlined.js + 1 modules ***!
\*******************************************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
Z: function() { return /* binding */ icons_InboxOutlined; }
});
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.24.0@@babel/runtime/helpers/esm/extends.js
var esm_extends = __webpack_require__(36384);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons-svg@4.4.2@@ant-design/icons-svg/es/asn/InboxOutlined.js
// This icon file is generated automatically.
var InboxOutlined = { "icon": { "tag": "svg", "attrs": { "viewBox": "0 0 1024 1024", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M885.2 446.3l-.2-.8-112.2-285.1c-5-16.1-19.9-27.2-36.8-27.2H281.2c-17 0-32.1 11.3-36.9 27.6L139.4 443l-.3.7-.2.8c-1.3 4.9-1.7 9.9-1 14.8-.1 1.6-.2 3.2-.2 4.8V830a60.9 60.9 0 0060.8 60.8h627.2c33.5 0 60.8-27.3 60.9-60.8V464.1c0-1.3 0-2.6-.1-3.7.4-4.9 0-9.6-1.3-14.1zm-295.8-43l-.3 15.7c-.8 44.9-31.8 75.1-77.1 75.1-22.1 0-41.1-7.1-54.8-20.6S436 441.2 435.6 419l-.3-15.7H229.5L309 210h399.2l81.7 193.3H589.4zm-375 76.8h157.3c24.3 57.1 76 90.8 140.4 90.8 33.7 0 65-9.4 90.3-27.2 22.2-15.6 39.5-37.4 50.7-63.6h156.5V814H214.4V480.1z" } }] }, "name": "inbox", "theme": "outlined" };
/* harmony default export */ var asn_InboxOutlined = (InboxOutlined);
// EXTERNAL MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/components/AntdIcon.js + 3 modules
var AntdIcon = __webpack_require__(15436);
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.3.1@@ant-design/icons/es/icons/InboxOutlined.js
// GENERATE BY ./scripts/generate.ts
// DON NOT EDIT IT MANUALLY
var InboxOutlined_InboxOutlined = function InboxOutlined(props, ref) {
return /*#__PURE__*/_react_17_0_2_react.createElement(AntdIcon/* default */.Z, (0,esm_extends/* default */.Z)({}, props, {
ref: ref,
icon: asn_InboxOutlined
}));
};
if (false) {}
/* harmony default export */ var icons_InboxOutlined = (/*#__PURE__*/_react_17_0_2_react.forwardRef(InboxOutlined_InboxOutlined));
/***/ }),
/***/ 35892:
/*!*************************************************************************!*\
!*** ./src/pages/Materials/ItemAssets/AddProcure/index.tsx + 1 modules ***!
\*************************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ AddProcure; }
});
// 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/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(44742);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules
var input = __webpack_require__(20008);
// 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/table/index.js + 85 modules
var table = __webpack_require__(86383);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/modal/index.js + 16 modules
var modal = __webpack_require__(43418);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssets/AddProcure/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var AddProcuremodules = ({"wrap":"wrap___uDEdN","back_style":"back_style___Wh6NB","header":"header___EYIbO","header_form":"header_form___axdTB","guize_select":"guize_select___zWIti","guize_update":"guize_update___FiKWW","shangchuan_button":"shangchuan_button___z7F26","shangchuan_img":"shangchuan_img___mHcZH","shangchuan_close":"shangchuan_close___sWJYn","close_button":"close_button___KyOIv","submit_button":"submit_button___ISIvd","add_button":"add_button___xX4Rr"});
// EXTERNAL MODULE: ./src/service/laboratory.ts
var laboratory = __webpack_require__(66754);
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
var MultiUpload = __webpack_require__(41883);
// EXTERNAL MODULE: ./src/components/markdown-editor/index.tsx + 10 modules
var markdown_editor = __webpack_require__(74385);
// EXTERNAL MODULE: ./src/utils/fetch.ts
var fetch = __webpack_require__(14735);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/ItemAssets/AddProcure/index.tsx
var Navigation = function Navigation(_ref) {
var loading = _ref.loading,
user = _ref.user,
dispatch = _ref.dispatch,
account = _ref.account;
var params = (0,_umi_production_exports.useParams)();
var _Form$useForm = es_form/* default */.Z.useForm(),
_Form$useForm2 = slicedToArray_default()(_Form$useForm, 1),
myForm = _Form$useForm2[0];
var _useState = (0,_react_17_0_2_react.useState)(false),
_useState2 = slicedToArray_default()(_useState, 2),
openRuleModal = _useState2[0],
setOpenRuleModal = _useState2[1]; //选择规则弹框
//实验室下拉
var _useState3 = (0,_react_17_0_2_react.useState)([]),
_useState4 = slicedToArray_default()(_useState3, 2),
laboratoryLists = _useState4[0],
setLaboratoryLists = _useState4[1];
// 关联
var _useState5 = (0,_react_17_0_2_react.useState)([]),
_useState6 = slicedToArray_default()(_useState5, 2),
containerList = _useState6[0],
setContainerList = _useState6[1];
//实验室房间
var _useState7 = (0,_react_17_0_2_react.useState)([]),
_useState8 = slicedToArray_default()(_useState7, 2),
laboratoryRooms = _useState8[0],
setLaboratoryRooms = _useState8[1];
var addColumns = [{
title: '物资编码',
dataIndex: 'title',
ellipsis: true
}, {
title: '物资名称',
dataIndex: 'user_name1',
ellipsis: true
}, {
title: '规格型号',
dataIndex: 'user_name2',
ellipsis: true
}, {
title: '存放实验室房间',
dataIndex: 'user_name3',
ellipsis: true
}, {
title: '单位',
dataIndex: 'user_name4',
ellipsis: true
}, {
title: '可申请数量',
dataIndex: 'user_name5',
ellipsis: true
}, {
title: '需申请数量',
dataIndex: 'user_name6',
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {});
}
}, {
title: '操作',
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#165DFF'
},
children: "\u5220\u9664"
});
}
}];
var _useState9 = (0,_react_17_0_2_react.useState)([{}]),
_useState10 = slicedToArray_default()(_useState9, 2),
addData = _useState10[0],
setAddData = _useState10[1];
(0,_react_17_0_2_react.useEffect)(function () {
//我的实验室下拉
(0,laboratory/* classroom_query */.GJ)({
page: 1,
limit: 10000,
keyword: ''
}).then(function (res) {
var _res$data;
setLaboratoryLists(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list);
});
dispatch({
type: 'globalSetting/headerFooterToggle',
payload: false
});
return function () {
dispatch({
type: 'globalSetting/headerFooterToggle',
payload: true
});
};
}, []);
var rowSelection = {
onChange: function onChange(selectedRowKeys, selectedRows) {
console.log(selectedRows);
}
};
//获取关联
var getContainerList = function getContainerList(e) {
var _user$userInfo;
var obj = e == 'Subject' ? 'subjects' : e == 'Shixun' ? 'shixuns' : 'courses';
(0,fetch/* default */.ZP)("/api/users/".concat(user === null || user === void 0 || (_user$userInfo = user.userInfo) === null || _user$userInfo === void 0 ? void 0 : _user$userInfo.login, "/").concat(obj, ".json"), {
method: 'get',
params: {
page: 1,
per_page: 1000,
username: user.userInfo.login
}
}).then(function (res) {
setContainerList(res === null || res === void 0 ? void 0 : res[obj]);
});
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AddProcuremodules.wrap,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AddProcuremodules.back_style,
onClick: function onClick() {
_umi_production_exports.history.push('/materials/itemAssets');
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-fanhui2 font12 mr5"
}), "\u8FD4\u56DE"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: AddProcuremodules.header,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z, {
form: myForm,
className: AddProcuremodules.header_form
// labelCol={{ span: 3 }}
,
wrapperCol: {
span: 21
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7533\u8BF7\u539F\u56E0",
name: "area1",
rules: [{
required: true,
message: '请输入申请原因'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large",
showCount: true,
maxLength: 30
})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: "flex"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5173\u8054",
name: "container_type",
rules: [{
required: true,
message: '必填项'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
size: "large",
style: {
width: '300px'
},
onChange: function onChange(e) {
getContainerList(e);
myForm.setFieldValue('container_id', '');
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: 'Subject',
children: "\u5B9E\u8DF5\u8BFE\u7A0B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: 'Shixun',
children: "\u5B9E\u8DF5\u9879\u76EE"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: 'Course',
children: "\u6559\u5B66\u8BFE\u5802"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
name: "container_id",
rules: [{
required: true,
message: '请选择关联'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
size: "large",
style: {
marginLeft: '10px',
width: '714px'
},
children: containerList === null || containerList === void 0 ? void 0 : containerList.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.name
}, index);
})
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7533\u8BF7\u5B9E\u9A8C\u5BA4",
name: "classroom_id",
rules: [{
required: true,
message: '请选择实验室'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
size: "large",
children: laboratoryLists === null || laboratoryLists === void 0 ? void 0 : laboratoryLists.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item.id,
children: item.title
}, index);
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u624B\u673A\u53F7",
name: "work_num1",
rules: [{
required: true,
message: '请输入手机号'
}, {
required: true,
pattern: /^(0|[1-9]\d*)$/,
message: '请输入正整数'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u90AE\u7BB1",
name: "area22",
rules: [{
required: true,
pattern: /^[1-9]\d*(\.\d+)?$/,
message: '请输入正数'
}],
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
size: "large"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u5907\u6CE8\u8BF4\u660E",
name: "description",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(markdown_editor/* default */.Z, {
height: 300,
defaultValue: myForm.getFieldValue('description') || '',
watch: true
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u9644\u4EF6",
name: "attachment_ids",
children: /*#__PURE__*/(0,jsx_runtime.jsx)(MultiUpload/* default */.Z, {})
}), /*#__PURE__*/(0,jsx_runtime.jsxs)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7533\u8BF7\u7269\u8D44",
name: "reservation_rule_id",
rules: [{
required: true,
message: '请选择规则设置'
}],
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AddProcuremodules.guize_select,
onClick: function onClick() {
setOpenRuleModal(true);
},
children: "\u6DFB\u52A0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
scroll: {
y: 300
},
pagination: false,
style: {
marginTop: '10px'
},
dataSource: addData,
columns: addColumns
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
marginTop: '40px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AddProcuremodules.close_button,
onClick: function onClick() {
_umi_production_exports.history.push("/materials/itemAssets");
},
children: "\u53D6\u6D88"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AddProcuremodules.submit_button,
onClick: function onClick() {
console.log(addData);
},
children: "\u63D0\u4EA4"
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)(modal/* default */.Z, {
maskClosable: false,
centered: true,
keyboard: false,
destroyOnClose: true,
className: AddProcuremodules.my_modal,
open: openRuleModal,
title: "\u9009\u62E9\u89C4\u5219",
width: "600px",
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
setOpenRuleModal(false);
case 1:
case "end":
return _context.stop();
}
}, _callee);
})),
onCancel: function onCancel() {
setOpenRuleModal(false);
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
rowSelection: objectSpread2_default()({
type: 'checkbox'
}, rowSelection),
scroll: {
y: 300
},
pagination: false,
dataSource: [{}],
columns: [{
title: '规则名称',
dataIndex: 'title',
ellipsis: true
}, {
title: '创建人',
dataIndex: 'user_name',
ellipsis: true
}]
})
})]
});
};
/* harmony default export */ var AddProcure = ((0,_umi_production_exports.connect)(function (_ref3) {
var loading = _ref3.loading,
user = _ref3.user,
engineeringNavigtion = _ref3.engineeringNavigtion,
dispatch = _ref3.dispatch,
account = _ref3.account;
return objectSpread2_default()(objectSpread2_default()({
loading: loading,
user: user
}, engineeringNavigtion), {}, {
dispatch: dispatch,
account: account
});
})(Navigation));
/***/ }),
/***/ 60028:
/*!**********************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/upload/index.js ***!
\**********************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony import */ var _Dragger__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Dragger */ 71409);
/* harmony import */ var _Upload__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Upload */ 73442);
"use client";
const Upload = _Upload__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Z;
Upload.Dragger = _Dragger__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z;
Upload.LIST_IGNORE = _Upload__WEBPACK_IMPORTED_MODULE_0__/* .LIST_IGNORE */ .E;
/* harmony default export */ __webpack_exports__.Z = (Upload);
/***/ })
}]);

@ -313,7 +313,7 @@ var Navigation = function Navigation(_ref) {
}
});
}
}, searchParams.get('indexType') != '0' && {
}, (searchParams.get('indexType') == '1' || searchParams.get('indexType') == '2') && {
title: '操作',
ellipsis: true,
width: searchParams.get('indexType') == '1' ? 250 : 100,
@ -456,11 +456,12 @@ var Navigation = function Navigation(_ref) {
if (flag) {
setPage(1);
}
// (searchParams.get('indexType') == '1' ? 0 : '')
(0,materials/* substance_details_query */.cO)({
page: page,
limit: limit,
keyword: keyword,
scrapped: searchParams.get('indexType') == '2' ? 1 : searchParams.get('indexType') == '1' ? 0 : '',
scrapped: searchParams.get('indexType') == '2' ? 1 : 0,
status: status,
substance_id: params === null || params === void 0 ? void 0 : params.itemAssetsId
}).then(function (res) {
@ -674,12 +675,15 @@ var Navigation = function Navigation(_ref) {
getData(true);
}
})
}), searchParams.get('indexType') == '0' && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
}), searchParams.get('indexType') != '1' && searchParams.get('indexType') != '2' && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Infomodules.header_button,
children: "\u7533\u8BF7\u9886\u7528"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: Infomodules.header_button,
onClick: function onClick() {
_umi_production_exports.history.push("/materials/itemAssets/AddProcure/null?backUrl=/materials/itemAssets/".concat(params === null || params === void 0 ? void 0 : params.itemAssetsId, "/info?backUrl=").concat(searchParams.get('backUrl'), "&initId=").concat(params === null || params === void 0 ? void 0 : params.itemAssetsId));
},
children: "\u7533\u8BF7\u91C7\u8D2D"
})]
}), searchParams.get('indexType') == '1' && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
@ -997,480 +1001,6 @@ var Navigation = function Navigation(_ref) {
/***/ }),
/***/ 85454:
/*!**********************************!*\
!*** ./src/service/materials.ts ***!
\**********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ FA: function() { return /* binding */ substance_details_scrapped; },
/* harmony export */ FZ: function() { return /* binding */ substances_import; },
/* harmony export */ HM: function() { return /* binding */ substances_query; },
/* harmony export */ HX: function() { return /* binding */ substance_categories_delete; },
/* harmony export */ K$: function() { return /* binding */ bills_create; },
/* harmony export */ M1: function() { return /* binding */ bills_delete; },
/* harmony export */ OV: function() { return /* binding */ me_substances_query; },
/* harmony export */ O_: function() { return /* binding */ bills_query; },
/* harmony export */ Td: function() { return /* binding */ substance_categories_create; },
/* harmony export */ VT: function() { return /* binding */ bills_update; },
/* harmony export */ cO: function() { return /* binding */ substance_details_query; },
/* harmony export */ eZ: function() { return /* binding */ bills_info; },
/* harmony export */ en: function() { return /* binding */ substance_categories_update; },
/* harmony export */ i6: function() { return /* binding */ substances_create; },
/* harmony export */ os: function() { return /* binding */ substances_info; },
/* harmony export */ xR: function() { return /* binding */ substances_update; },
/* harmony export */ xb: function() { return /* binding */ substance_categories_query; },
/* harmony export */ y_: function() { return /* binding */ substance_details_update; },
/* harmony export */ yu: function() { return /* binding */ substance_details_create; }
/* harmony export */ });
/* unused harmony export substances_list */
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/fetch */ 14735);
//物资分类列表
function substance_categories_query(_x) {
return _substance_categories_query.apply(this, arguments);
}
//创建物资分类
function _substance_categories_query() {
_substance_categories_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_categories.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _substance_categories_query.apply(this, arguments);
}
function substance_categories_create(_x2) {
return _substance_categories_create.apply(this, arguments);
}
//编辑物资分类
function _substance_categories_create() {
_substance_categories_create = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_categories.json", {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _substance_categories_create.apply(this, arguments);
}
function substance_categories_update(_x3) {
return _substance_categories_update.apply(this, arguments);
}
//删除物资
function _substance_categories_update() {
_substance_categories_update = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee3(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_categories/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'put',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _substance_categories_update.apply(this, arguments);
}
function substance_categories_delete(_x4) {
return _substance_categories_delete.apply(this, arguments);
}
//账单列表
function _substance_categories_delete() {
_substance_categories_delete = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee4(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_categories/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'delete',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _substance_categories_delete.apply(this, arguments);
}
function bills_query(_x5) {
return _bills_query.apply(this, arguments);
}
//账单详情
function _bills_query() {
_bills_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee5(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/bills.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _bills_query.apply(this, arguments);
}
function bills_info(_x6) {
return _bills_info.apply(this, arguments);
}
//创建账单
function _bills_info() {
_bills_info = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee6(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/bills/".concat(params === null || params === void 0 ? void 0 : params.id, ".json"), {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _bills_info.apply(this, arguments);
}
function bills_create(_x7) {
return _bills_create.apply(this, arguments);
}
//编辑账单
function _bills_create() {
_bills_create = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee7(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/bills.json", {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _bills_create.apply(this, arguments);
}
function bills_update(_x8) {
return _bills_update.apply(this, arguments);
}
//删除账单
function _bills_update() {
_bills_update = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee8(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/bills/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'put',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _bills_update.apply(this, arguments);
}
function bills_delete(_x9) {
return _bills_delete.apply(this, arguments);
}
//物资库首页列表数据
function _bills_delete() {
_bills_delete = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee9(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/bills/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'delete',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _bills_delete.apply(this, arguments);
}
function substances_query(_x10) {
return _substances_query.apply(this, arguments);
}
//物资管理列表数据
function _substances_query() {
_substances_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee10(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substances.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _substances_query.apply(this, arguments);
}
function me_substances_query(_x11) {
return _me_substances_query.apply(this, arguments);
}
//导入物资
function _me_substances_query() {
_me_substances_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee11(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substances/me_substances.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _me_substances_query.apply(this, arguments);
}
function substances_import(_x12) {
return _substances_import.apply(this, arguments);
}
//创建物资
function _substances_import() {
_substances_import = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee12(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)('/api/yn_classrooms/substances/import', {
method: 'post',
body: data
}, true));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _substances_import.apply(this, arguments);
}
function substances_create(_x13) {
return _substances_create.apply(this, arguments);
}
//编辑物资
function _substances_create() {
_substances_create = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee13(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substances.json", {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _substances_create.apply(this, arguments);
}
function substances_update(_x14) {
return _substances_update.apply(this, arguments);
}
//物资详情
function _substances_update() {
_substances_update = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee14(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substances/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'put',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _substances_update.apply(this, arguments);
}
function substances_info(_x15) {
return _substances_info.apply(this, arguments);
}
//物资库首页列表数据
function _substances_info() {
_substances_info = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee15(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substances/".concat(params === null || params === void 0 ? void 0 : params.id, ".json"), {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _substances_info.apply(this, arguments);
}
function substances_list(_x16) {
return _substances_list.apply(this, arguments);
}
//物资细则列表
function _substances_list() {
_substances_list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Fetch("/api/yn_classrooms/substances.json", {
method: 'get',
params: _objectSpread({}, params)
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _substances_list.apply(this, arguments);
}
function substance_details_query(_x17) {
return _substance_details_query.apply(this, arguments);
}
//物资细则创建
function _substance_details_query() {
_substance_details_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee17(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_details.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _substance_details_query.apply(this, arguments);
}
function substance_details_create(_x18) {
return _substance_details_create.apply(this, arguments);
}
//物资细则编辑
function _substance_details_create() {
_substance_details_create = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee18(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_details.json", {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _substance_details_create.apply(this, arguments);
}
function substance_details_update(_x19) {
return _substance_details_update.apply(this, arguments);
}
//物资细则报废
function _substance_details_update() {
_substance_details_update = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee19(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
return _context19.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_details/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'put',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return _substance_details_update.apply(this, arguments);
}
function substance_details_scrapped(_x20) {
return _substance_details_scrapped.apply(this, arguments);
}
function _substance_details_scrapped() {
_substance_details_scrapped = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee20(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
return _context20.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_details/".concat(data === null || data === void 0 ? void 0 : data.id, "/scrapped.json"), {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return _substance_details_scrapped.apply(this, arguments);
}
/***/ }),
/***/ 18782:
/*!*****************************************!*\
!*** ./src/assets/images/uploadImg.svg ***!

@ -430,7 +430,7 @@ var Navigation = function Navigation(_ref) {
marginLeft: '20px'
},
onClick: function onClick() {
_umi_production_exports.history.push("/materials/itemAssets/AddReceive/null");
_umi_production_exports.history.push("/materials/itemAssets/AddReceive/null?backUrl=/materials/itemAssets");
},
children: "\u6279\u91CF\u7533\u8BF7\u9886\u7528"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
@ -440,7 +440,7 @@ var Navigation = function Navigation(_ref) {
marginLeft: '20px'
},
onClick: function onClick() {
_umi_production_exports.history.push("/materials/itemAssets/AddProcure/null");
_umi_production_exports.history.push("/materials/itemAssets/AddProcure/null?backUrl=/materials/itemAssets");
},
children: "\u7533\u8BF7\u91C7\u8D2D"
})]
@ -555,479 +555,6 @@ var Navigation = function Navigation(_ref) {
/***/ }),
/***/ 85454:
/*!**********************************!*\
!*** ./src/service/materials.ts ***!
\**********************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ FA: function() { return /* binding */ substance_details_scrapped; },
/* harmony export */ FZ: function() { return /* binding */ substances_import; },
/* harmony export */ HM: function() { return /* binding */ substances_query; },
/* harmony export */ HX: function() { return /* binding */ substance_categories_delete; },
/* harmony export */ K$: function() { return /* binding */ bills_create; },
/* harmony export */ M1: function() { return /* binding */ bills_delete; },
/* harmony export */ OV: function() { return /* binding */ me_substances_query; },
/* harmony export */ O_: function() { return /* binding */ bills_query; },
/* harmony export */ Td: function() { return /* binding */ substance_categories_create; },
/* harmony export */ VT: function() { return /* binding */ bills_update; },
/* harmony export */ cO: function() { return /* binding */ substance_details_query; },
/* harmony export */ eZ: function() { return /* binding */ bills_info; },
/* harmony export */ en: function() { return /* binding */ substance_categories_update; },
/* harmony export */ i6: function() { return /* binding */ substances_create; },
/* harmony export */ os: function() { return /* binding */ substances_info; },
/* harmony export */ xR: function() { return /* binding */ substances_update; },
/* harmony export */ xb: function() { return /* binding */ substance_categories_query; },
/* harmony export */ y_: function() { return /* binding */ substance_details_update; },
/* harmony export */ yu: function() { return /* binding */ substance_details_create; }
/* harmony export */ });
/* unused harmony export substances_list */
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/regeneratorRuntime.js */ 7557);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/objectSpread2.js */ 82242);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/asyncToGenerator.js */ 41498);
/* harmony import */ var _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _utils_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @/utils/fetch */ 14735);
//物资分类列表
function substance_categories_query(_x) {
return _substance_categories_query.apply(this, arguments);
}
//创建物资分类
function _substance_categories_query() {
_substance_categories_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
return _context.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_categories.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
return _substance_categories_query.apply(this, arguments);
}
function substance_categories_create(_x2) {
return _substance_categories_create.apply(this, arguments);
}
//编辑物资分类
function _substance_categories_create() {
_substance_categories_create = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee2(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee2$(_context2) {
while (1) switch (_context2.prev = _context2.next) {
case 0:
return _context2.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_categories.json", {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context2.stop();
}
}, _callee2);
}));
return _substance_categories_create.apply(this, arguments);
}
function substance_categories_update(_x3) {
return _substance_categories_update.apply(this, arguments);
}
//删除物资
function _substance_categories_update() {
_substance_categories_update = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee3(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee3$(_context3) {
while (1) switch (_context3.prev = _context3.next) {
case 0:
return _context3.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_categories/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'put',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context3.stop();
}
}, _callee3);
}));
return _substance_categories_update.apply(this, arguments);
}
function substance_categories_delete(_x4) {
return _substance_categories_delete.apply(this, arguments);
}
//账单列表
function _substance_categories_delete() {
_substance_categories_delete = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee4(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee4$(_context4) {
while (1) switch (_context4.prev = _context4.next) {
case 0:
return _context4.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_categories/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'delete',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context4.stop();
}
}, _callee4);
}));
return _substance_categories_delete.apply(this, arguments);
}
function bills_query(_x5) {
return _bills_query.apply(this, arguments);
}
//账单详情
function _bills_query() {
_bills_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee5(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee5$(_context5) {
while (1) switch (_context5.prev = _context5.next) {
case 0:
return _context5.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/bills.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context5.stop();
}
}, _callee5);
}));
return _bills_query.apply(this, arguments);
}
function bills_info(_x6) {
return _bills_info.apply(this, arguments);
}
//创建账单
function _bills_info() {
_bills_info = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee6(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee6$(_context6) {
while (1) switch (_context6.prev = _context6.next) {
case 0:
return _context6.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/bills/".concat(params === null || params === void 0 ? void 0 : params.id, ".json"), {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context6.stop();
}
}, _callee6);
}));
return _bills_info.apply(this, arguments);
}
function bills_create(_x7) {
return _bills_create.apply(this, arguments);
}
//编辑账单
function _bills_create() {
_bills_create = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee7(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee7$(_context7) {
while (1) switch (_context7.prev = _context7.next) {
case 0:
return _context7.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/bills.json", {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context7.stop();
}
}, _callee7);
}));
return _bills_create.apply(this, arguments);
}
function bills_update(_x8) {
return _bills_update.apply(this, arguments);
}
//删除账单
function _bills_update() {
_bills_update = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee8(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee8$(_context8) {
while (1) switch (_context8.prev = _context8.next) {
case 0:
return _context8.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/bills/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'put',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context8.stop();
}
}, _callee8);
}));
return _bills_update.apply(this, arguments);
}
function bills_delete(_x9) {
return _bills_delete.apply(this, arguments);
}
//物资库首页列表数据
function _bills_delete() {
_bills_delete = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee9(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee9$(_context9) {
while (1) switch (_context9.prev = _context9.next) {
case 0:
return _context9.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/bills/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'delete',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context9.stop();
}
}, _callee9);
}));
return _bills_delete.apply(this, arguments);
}
function substances_query(_x10) {
return _substances_query.apply(this, arguments);
}
//物资管理列表数据
function _substances_query() {
_substances_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee10(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee10$(_context10) {
while (1) switch (_context10.prev = _context10.next) {
case 0:
return _context10.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substances.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context10.stop();
}
}, _callee10);
}));
return _substances_query.apply(this, arguments);
}
function me_substances_query(_x11) {
return _me_substances_query.apply(this, arguments);
}
//导入物资
function _me_substances_query() {
_me_substances_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee11(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee11$(_context11) {
while (1) switch (_context11.prev = _context11.next) {
case 0:
return _context11.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substances/me_substances.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context11.stop();
}
}, _callee11);
}));
return _me_substances_query.apply(this, arguments);
}
function substances_import(_x12) {
return _substances_import.apply(this, arguments);
}
//创建物资
function _substances_import() {
_substances_import = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee12(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee12$(_context12) {
while (1) switch (_context12.prev = _context12.next) {
case 0:
return _context12.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)('/api/yn_classrooms/substances/import', {
method: 'post',
body: data
}, true));
case 1:
case "end":
return _context12.stop();
}
}, _callee12);
}));
return _substances_import.apply(this, arguments);
}
function substances_create(_x13) {
return _substances_create.apply(this, arguments);
}
//编辑物资
function _substances_create() {
_substances_create = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee13(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee13$(_context13) {
while (1) switch (_context13.prev = _context13.next) {
case 0:
return _context13.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substances.json", {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context13.stop();
}
}, _callee13);
}));
return _substances_create.apply(this, arguments);
}
function substances_update(_x14) {
return _substances_update.apply(this, arguments);
}
//物资详情
function _substances_update() {
_substances_update = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee14(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee14$(_context14) {
while (1) switch (_context14.prev = _context14.next) {
case 0:
return _context14.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substances/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'put',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context14.stop();
}
}, _callee14);
}));
return _substances_update.apply(this, arguments);
}
function substances_info(_x15) {
return _substances_info.apply(this, arguments);
}
//物资库首页列表数据
function _substances_info() {
_substances_info = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee15(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee15$(_context15) {
while (1) switch (_context15.prev = _context15.next) {
case 0:
return _context15.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substances/".concat(params === null || params === void 0 ? void 0 : params.id, ".json"), {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context15.stop();
}
}, _callee15);
}));
return _substances_info.apply(this, arguments);
}
function substances_list(_x16) {
return _substances_list.apply(this, arguments);
}
//物资细则列表
function _substances_list() {
_substances_list = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee16(params) {
return _regeneratorRuntime().wrap(function _callee16$(_context16) {
while (1) switch (_context16.prev = _context16.next) {
case 0:
return _context16.abrupt("return", Fetch("/api/yn_classrooms/substances.json", {
method: 'get',
params: _objectSpread({}, params)
}));
case 1:
case "end":
return _context16.stop();
}
}, _callee16);
}));
return _substances_list.apply(this, arguments);
}
function substance_details_query(_x17) {
return _substance_details_query.apply(this, arguments);
}
//物资细则创建
function _substance_details_query() {
_substance_details_query = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee17(params) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee17$(_context17) {
while (1) switch (_context17.prev = _context17.next) {
case 0:
return _context17.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_details.json", {
method: 'get',
params: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, params)
}));
case 1:
case "end":
return _context17.stop();
}
}, _callee17);
}));
return _substance_details_query.apply(this, arguments);
}
function substance_details_create(_x18) {
return _substance_details_create.apply(this, arguments);
}
//物资细则编辑
function _substance_details_create() {
_substance_details_create = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee18(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee18$(_context18) {
while (1) switch (_context18.prev = _context18.next) {
case 0:
return _context18.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_details.json", {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context18.stop();
}
}, _callee18);
}));
return _substance_details_create.apply(this, arguments);
}
function substance_details_update(_x19) {
return _substance_details_update.apply(this, arguments);
}
//物资细则报废
function _substance_details_update() {
_substance_details_update = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee19(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee19$(_context19) {
while (1) switch (_context19.prev = _context19.next) {
case 0:
return _context19.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_details/".concat(data === null || data === void 0 ? void 0 : data.id, ".json"), {
method: 'put',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context19.stop();
}
}, _callee19);
}));
return _substance_details_update.apply(this, arguments);
}
function substance_details_scrapped(_x20) {
return _substance_details_scrapped.apply(this, arguments);
}
function _substance_details_scrapped() {
_substance_details_scrapped = _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_2___default()( /*#__PURE__*/_root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().mark(function _callee20(data) {
return _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_regeneratorRuntime_js__WEBPACK_IMPORTED_MODULE_0___default()().wrap(function _callee20$(_context20) {
while (1) switch (_context20.prev = _context20.next) {
case 0:
return _context20.abrupt("return", (0,_utils_fetch__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .ZP)("/api/yn_classrooms/substance_details/".concat(data === null || data === void 0 ? void 0 : data.id, "/scrapped.json"), {
method: 'post',
body: _root_workspace_ppte5yg23_local_v9_test2_node_modules_babel_runtime_7_23_6_babel_runtime_helpers_objectSpread2_js__WEBPACK_IMPORTED_MODULE_1___default()({}, data)
}));
case 1:
case "end":
return _context20.stop();
}
}, _callee20);
}));
return _substance_details_scrapped.apply(this, arguments);
}
/***/ }),
/***/ 20008:
/*!*********************************************************************!*\
!*** ./node_modules/_antd@5.9.0@antd/es/input/index.js + 5 modules ***!

@ -1,121 +0,0 @@
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/_@umijs_bundler-webpack@4.1.2@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/_@umijs_bundler-webpack@4.1.2@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Materials/MyProcure/index.less?modules ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.header_div___Wlpv4 {
display: flex;
}
.header_div___Wlpv4 .header_title___Ke5eh {
height: 38px;
font-size: 16px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
color: #000000;
line-height: 38px;
}
.header_div___Wlpv4 .search___TCi9C {
display: flex;
align-items: center;
overflow: hidden;
border-radius: 19px;
height: 38px;
width: 260px;
padding-left: 8px;
background-color: #f6f7f9;
border: none;
margin-left: 20px;
}
.header_div___Wlpv4 .search___TCi9C span[class~='ant-input-search-icon'] {
display: none;
}
.header_div___Wlpv4 .search___TCi9C [class~='ant-input-affix-wrapper'] {
background-color: #f6f7f9;
border: none;
}
.header_div___Wlpv4 .search___TCi9C [class~='ant-input-affix-wrapper'] {
outline: none !important;
border: none !important;
box-shadow: none !important;
}
.header_div___Wlpv4 .search___TCi9C span[class~='ant-input-group-addon'] {
display: none;
}
.header_div___Wlpv4 .search___TCi9C .searchIcon___aj2zp {
margin-right: 14px;
cursor: pointer;
}
.header_div___Wlpv4 .search___TCi9C input {
background-color: #f6f7f9;
}
.header_div___Wlpv4 [class~='ant-form-item'] [class~='ant-form-item-label'] {
text-align: right !important;
}
.header_div___Wlpv4 [class~='ant-form-item'] [class~='ant-form-item-label'] label {
color: #666 !important;
display: block !important;
height: 36px !important;
line-height: 36px !important;
}
.header_div___Wlpv4 [class~='ant-select-selector'] {
height: 36px !important;
}
.header_div___Wlpv4 [class~='ant-select-selection-item'] {
line-height: 34px !important;
}
.clear_Data___alPld {
width: 130px;
height: 32px;
background: #3061D0;
box-shadow: 0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5);
border-radius: 2px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #FFFFFF;
line-height: 32px;
font-style: normal;
text-align: center;
cursor: pointer;
margin-top: 4px;
margin-left: 20px;
}
.batch___AYgkR {
height: 60px;
margin: auto;
background: #ffffff;
box-shadow: 0px -1px 6px 0px #efefef;
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 100;
}
.batch___AYgkR > aside {
margin: 0 100px;
padding-left: 270px;
display: flex;
align-items: center;
height: 100%;
}
.batch___AYgkR > aside .btns___Hq8qk {
flex: 1 1;
display: flex;
align-items: center;
}
.batch___AYgkR > aside .btns___Hq8qk .btn___fFGnN {
height: 32px;
line-height: 32px;
background: #ffffff;
border-radius: 2px;
border: 1px solid #d9d9d9;
padding: 0 10px;
color: #145dff;
cursor: pointer;
margin-right: 15px;
font-size: 14px;
}
.batch___AYgkR > aside .btns___Hq8qk .btn___fFGnN i {
color: #464f66;
margin-right: 6px;
font-size: 14px;
}

@ -1,465 +0,0 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[25807],{
/***/ 17040:
/*!*************************************************************!*\
!*** ./src/pages/Materials/MyProcure/index.tsx + 1 modules ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ MyProcure; }
});
// 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/toConsumableArray.js
var toConsumableArray = __webpack_require__(37205);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// 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/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(44742);
;// CONCATENATED MODULE: ./src/pages/Materials/MyProcure/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var MyProcuremodules = ({"header_div":"header_div___Wlpv4","header_title":"header_title___Ke5eh","search":"search___TCi9C","searchIcon":"searchIcon___aj2zp","clear_Data":"clear_Data___alPld","batch":"batch___AYgkR","btns":"btns___Hq8qk","btn":"btn___fFGnN"});
// 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/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// 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/input/index.js + 5 modules
var input = __webpack_require__(20008);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(86383);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = __webpack_require__(36697);
// EXTERNAL MODULE: ./src/service/laboratory.ts
var service_laboratory = __webpack_require__(66754);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/MyProcure/index.tsx
var Navigation = function Navigation(_ref) {
var loading = _ref.loading,
dispatch = _ref.dispatch;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
keyword = _useState2[0],
setkeyword = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(''),
_useState4 = slicedToArray_default()(_useState3, 2),
reason = _useState4[0],
setReason = _useState4[1];
var countRef = (0,_react_17_0_2_react.useRef)(reason);
countRef.current = reason;
//预约数据
var _useState5 = (0,_react_17_0_2_react.useState)([]),
_useState6 = slicedToArray_default()(_useState5, 2),
tableData = _useState6[0],
setTableData = _useState6[1];
var columns = [{
title: '申购编号',
dataIndex: 'title',
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#165DFF',
cursor: 'pointer'
},
onClick: function onClick() {
_umi_production_exports.history.push("/laboratory/reservations/".concat(record === null || record === void 0 ? void 0 : record.id, "/info?index=laboratoryRoom"));
},
children: text || '--'
})
});
}
}, {
title: '申购名称',
dataIndex: 'permission',
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 == '0' ? '学生' : text == '1' ? '教师(已认证)' : '学生、教师(已认证)'
})
});
}
}, {
title: '状态',
dataIndex: 'status',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: text,
children: text == '0' ? /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#FA6400'
},
children: "\u5DF2\u542F\u7528"
}) : /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000000'
},
children: "\u5DF2\u7981\u7528"
})
});
}
}, {
title: '申购实验室',
dataIndex: 'area',
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 ? "".concat(text, "\u5E73\u65B9\u7C73") : '--'
})
});
}
}, {
title: '申购物资',
dataIndex: 'work_num',
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: 'classroom_title',
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: '操作',
ellipsis: true,
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
},
onClick: function onClick() {
setRoomId(record === null || record === void 0 ? void 0 : record.id);
_umi_production_exports.history.push("/laboratory/laboratoryRoom/".concat(record === null || record === void 0 ? void 0 : record.id));
},
children: "\u67E5\u770B"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
},
onClick: function onClick() {
setRoomId(record === null || record === void 0 ? void 0 : record.id);
_umi_production_exports.history.push("/laboratory/laboratoryRoom/".concat(record === null || record === void 0 ? void 0 : record.id));
},
children: "\u4FEE\u6539"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#5F6367",
marginLeft: "10px",
cursor: "pointer"
},
onClick: function onClick() {
modal/* default */.Z.confirm({
centered: true,
okText: '确定',
cancelText: '取消',
title: "提示",
content: "\u8BF7\u786E\u8BA4\u662F\u5426\u5220\u9664".concat(record === null || record === void 0 ? void 0 : record.title, "\u7684\u76F8\u5173\u4FE1\u606F\uFF1F\u5220\u9664\u7684\u4FE1\u606F\u5C06\u65E0\u6CD5\u6062\u590D\u3002"),
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,service_laboratory/* classroom_rooms_delete */.L7)({
id: record === null || record === void 0 ? void 0 : record.id
}).then(function (res) {
if (res.status === 0) {
message/* default */.ZP.success('删除成功');
getData(true);
}
});
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
},
children: "\u53D6\u6D88"
})]
});
}
}];
//分页
var _useState7 = (0,_react_17_0_2_react.useState)(0),
_useState8 = slicedToArray_default()(_useState7, 2),
total = _useState8[0],
setTotal = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)(1),
_useState10 = slicedToArray_default()(_useState9, 2),
page = _useState10[0],
setPage = _useState10[1];
var _useState11 = (0,_react_17_0_2_react.useState)(10),
_useState12 = slicedToArray_default()(_useState11, 2),
limit = _useState12[0],
setLimit = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)(null),
_useState14 = slicedToArray_default()(_useState13, 2),
roomId = _useState14[0],
setRoomId = _useState14[1];
//实验室
var _useState15 = (0,_react_17_0_2_react.useState)([]),
_useState16 = slicedToArray_default()(_useState15, 2),
laboratoryLists = _useState16[0],
setLaboratoryLists = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)(''),
_useState18 = slicedToArray_default()(_useState17, 2),
laboratory = _useState18[0],
setLaboratory = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)(''),
_useState20 = slicedToArray_default()(_useState19, 2),
status = _useState20[0],
setStatus = _useState20[1];
(0,_react_17_0_2_react.useEffect)(function () {
//实验室列表
(0,service_laboratory/* classroom_query */.GJ)({
page: 1,
limit: 10000,
keyword: ''
}).then(function (res) {
var _res$data;
setLaboratoryLists([{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list)));
});
dispatch({
type: 'globalSetting/footerToggle',
payload: false
});
return function () {
dispatch({
type: 'globalSetting/footerToggle',
payload: true
});
};
}, []);
(0,_react_17_0_2_react.useEffect)(function () {
getData(false);
}, [page]);
(0,_react_17_0_2_react.useEffect)(function () {
getData(true);
}, [keyword, status, laboratory, limit]);
var getData = function getData(flag) {
if (flag) {
setPage(1);
}
(0,service_laboratory/* classroom_rooms_query */.jd)({
page: page,
limit: limit,
keyword: keyword,
classroom_id: laboratory,
status: status
}).then(function (res) {
var _res$data2, _res$data3;
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
setTableData(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 || (_res$data3 = _res$data3.list) === null || _res$data3 === void 0 ? void 0 : _res$data3.map(function (item) {
item.key = item === null || item === void 0 ? void 0 : item.id;
return item;
}));
});
};
var onShowSizeChange = function onShowSizeChange(page, size) {
setPage(page);
setLimit(size);
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: MyProcuremodules.header_div,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: MyProcuremodules.header_title,
children: "\u6211\u7684\u91C7\u8D2D\u7533\u8BF7"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7533\u8BF7\u5B9E\u9A8C\u5BA4",
style: {
marginLeft: 'auto'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
style: {
width: 160
},
defaultValue: laboratory,
value: laboratory,
onChange: function onChange(e) {
setLaboratory(e);
},
children: laboratoryLists === null || laboratoryLists === void 0 ? void 0 : laboratoryLists.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
}, index);
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u72B6\u6001",
style: {
marginLeft: '20px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
style: {
width: 100
},
defaultValue: status,
value: status,
onChange: function onChange(e) {
setStatus(e);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "",
children: "\u5168\u90E8"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "0",
children: "\u5DF2\u542F\u7528"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "1",
children: "\u5DF2\u7981\u7528"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
placeholder: "\u8BF7\u8F93\u5165\u623F\u95F4\u540D\u79F0\u641C\u7D22",
size: "large",
className: MyProcuremodules.search,
value: keyword,
onChange: function onChange(e) {
setkeyword(e.target.value);
},
onSearch: function onSearch(value) {
setkeyword(value);
},
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-sousuo9 font14 ".concat(MyProcuremodules.searchIcon),
onClick: function onClick() {
setkeyword(keyword);
getData(true);
}
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: MyProcuremodules.search_params
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
pagination: false,
dataSource: tableData,
columns: columns
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '10px 7px 20px 7px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#656F87'
},
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-primary",
children: total
}), "\u6761\u6570\u636E"]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
showSizeChanger: true,
showQuickJumper: true,
onChange: onShowSizeChange,
defaultCurrent: 1,
pageSizeOptions: ['10', '20', '50', '100'],
current: page || 1,
pageSize: limit || 10,
defaultPageSize: 10,
total: total
})]
}) : ''
})]
});
};
/* harmony default export */ var MyProcure = ((0,_umi_production_exports.connect)(function (_ref2) {
var loading = _ref2.loading,
engineeringNavigtion = _ref2.engineeringNavigtion,
dispatch = _ref2.dispatch;
return objectSpread2_default()(objectSpread2_default()({
loading: loading
}, engineeringNavigtion), {}, {
dispatch: dispatch
});
})(Navigation));
/***/ })
}]);

@ -0,0 +1,257 @@
/*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/_@umijs_bundler-webpack@4.1.2@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/_@umijs_bundler-webpack@4.1.2@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Materials/MyProcure/index.less?modules ***!
\********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.header_div___Wlpv4 {
display: flex;
}
.header_div___Wlpv4 .header_title___Ke5eh {
height: 38px;
font-size: 16px;
font-family: PingFangSC, PingFang SC;
font-weight: 500;
color: #000000;
line-height: 38px;
}
.header_div___Wlpv4 .search___TCi9C {
display: flex;
align-items: center;
overflow: hidden;
border-radius: 19px;
height: 38px;
width: 260px;
padding-left: 8px;
background-color: #f6f7f9;
border: none;
margin-left: 20px;
}
.header_div___Wlpv4 .search___TCi9C span[class~='ant-input-search-icon'] {
display: none;
}
.header_div___Wlpv4 .search___TCi9C [class~='ant-input-affix-wrapper'] {
background-color: #f6f7f9;
border: none;
}
.header_div___Wlpv4 .search___TCi9C [class~='ant-input-affix-wrapper'] {
outline: none !important;
border: none !important;
box-shadow: none !important;
}
.header_div___Wlpv4 .search___TCi9C span[class~='ant-input-group-addon'] {
display: none;
}
.header_div___Wlpv4 .search___TCi9C .searchIcon___aj2zp {
margin-right: 14px;
cursor: pointer;
}
.header_div___Wlpv4 .search___TCi9C input {
background-color: #f6f7f9;
}
.header_div___Wlpv4 [class~='ant-form-item'] [class~='ant-form-item-label'] {
text-align: right !important;
}
.header_div___Wlpv4 [class~='ant-form-item'] [class~='ant-form-item-label'] label {
color: #666 !important;
display: block !important;
height: 36px !important;
line-height: 36px !important;
}
.header_div___Wlpv4 [class~='ant-select-selector'] {
height: 36px !important;
}
.header_div___Wlpv4 [class~='ant-select-selection-item'] {
line-height: 34px !important;
}
.clear_Data___alPld {
width: 130px;
height: 32px;
background: #3061D0;
box-shadow: 0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5);
border-radius: 2px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 14px;
color: #FFFFFF;
line-height: 32px;
font-style: normal;
text-align: center;
cursor: pointer;
margin-top: 4px;
margin-left: 20px;
}
.batch___AYgkR {
height: 60px;
margin: auto;
background: #ffffff;
box-shadow: 0px -1px 6px 0px #efefef;
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 100;
}
.batch___AYgkR > aside {
margin: 0 100px;
padding-left: 270px;
display: flex;
align-items: center;
height: 100%;
}
.batch___AYgkR > aside .btns___Hq8qk {
flex: 1 1;
display: flex;
align-items: center;
}
.batch___AYgkR > aside .btns___Hq8qk .btn___fFGnN {
height: 32px;
line-height: 32px;
background: #ffffff;
border-radius: 2px;
border: 1px solid #d9d9d9;
padding: 0 10px;
color: #145dff;
cursor: pointer;
margin-right: 15px;
font-size: 14px;
}
.batch___AYgkR > aside .btns___Hq8qk .btn___fFGnN i {
color: #464f66;
margin-right: 6px;
font-size: 14px;
}
/*!******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
!*** css ./node_modules/_css-loader@6.7.1@css-loader/dist/cjs.js??ruleSet[1].rules[5].oneOf[0].use[1]!./node_modules/_@umijs_bundler-webpack@4.1.2@@umijs/bundler-webpack/compiled/postcss-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[2]!./node_modules/_@umijs_bundler-webpack@4.1.2@@umijs/bundler-webpack/compiled/less-loader/index.js??ruleSet[1].rules[5].oneOf[0].use[3]!./src/pages/Materials/MyProcure/ViewModal/index.less?modules ***!
\******************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
.header___WAU_M {
background: #FFFFFF;
border-radius: 4px;
}
.header___WAU_M .header_params___yLDqY {
width: 600px;
}
.header___WAU_M .header_params___yLDqY .header_title___rUNO1 {
height: 30px;
font-size: 26px;
font-family: PingFangSC, PingFang SC;
font-weight: 600;
color: #000F37;
line-height: 30px;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin-top: 10px;
margin-bottom: 20px;
}
.header___WAU_M .file_list___d0mtl {
display: flex;
color: #3061D0;
font-size: 12px;
margin-bottom: 10px;
margin-left: 66px;
}
.header___WAU_M .file_list___d0mtl .file_list_title___RR5Cq {
height: 24px;
line-height: 24px;
padding: 0 10px;
background: rgba(22, 93, 255, 0.06);
border-radius: 12px;
}
.header___WAU_M .file_list___d0mtl .file_list_size___QnZni {
height: 24px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 12px;
color: #B2B2B2;
line-height: 24px;
text-align: left;
margin-left: 10px;
font-style: normal;
}
.header___WAU_M .search_params___MJSjv {
display: flex;
}
.header___WAU_M .search_params___MJSjv [class~='ant-select-selector'] {
height: 36px !important;
line-height: 36px !important;
}
.header___WAU_M .search_params___MJSjv [class~='ant-form-item-label'] {
height: 36px !important;
line-height: 36px !important;
}
.header___WAU_M .search_params___MJSjv [class~='ant-select-selection-item'] {
line-height: 34px !important;
}
.header___WAU_M .search_params___MJSjv .search___cH3AF {
margin-left: auto;
display: flex;
align-items: center;
overflow: hidden;
border-radius: 19px;
height: 38px;
width: 350px;
padding-left: 8px;
background-color: #f6f7f9;
border: none;
margin-top: 18px;
}
.header___WAU_M .search_params___MJSjv .search___cH3AF span[class~='ant-input-search-icon'] {
display: none;
}
.header___WAU_M .search_params___MJSjv .search___cH3AF [class~='ant-input-affix-wrapper'] {
background-color: #f6f7f9;
border: none;
}
.header___WAU_M .search_params___MJSjv .search___cH3AF [class~='ant-input-affix-wrapper'] {
outline: none !important;
border: none !important;
box-shadow: none !important;
}
.header___WAU_M .search_params___MJSjv .search___cH3AF span[class~='ant-input-group-addon'] {
display: none;
}
.header___WAU_M .search_params___MJSjv .search___cH3AF .searchIcon___lPynu {
margin-right: 14px;
cursor: pointer;
}
.header___WAU_M .search_params___MJSjv .search___cH3AF input {
background-color: #f6f7f9;
}
.header___WAU_M .search_params___MJSjv .header_button___oWVt6 {
width: 96px;
height: 38px;
background: #3061D0;
box-shadow: 0px 2px 4px 0px #E0DFE1, inset 0px 1px 3px 0px rgba(255, 255, 255, 0.5);
border-radius: 2px;
font-size: 14px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #FFFFFF;
line-height: 38px;
text-align: center;
cursor: pointer;
margin-left: 20px;
margin-top: 18px;
margin-bottom: 20px;
}
.header___WAU_M .header_content___fv5Z5 {
width: 749px;
display: flex;
align-items: center;
justify-content: space-between;
}
.header___WAU_M .header_content___fv5Z5 div {
width: 49%;
margin-bottom: 14px;
}
.header___WAU_M .header_content___fv5Z5 span {
font-size: 14px;
font-family: PingFangSC, PingFang SC;
font-weight: 400;
color: #999999;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
margin-bottom: 14px;
margin-right: 10px;
}

@ -0,0 +1,737 @@
"use strict";
(self["webpackChunk"] = self["webpackChunk"] || []).push([[25807],{
/***/ 78759:
/*!*************************************************************!*\
!*** ./src/pages/Materials/MyProcure/index.tsx + 3 modules ***!
\*************************************************************/
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
// ESM COMPAT FLAG
__webpack_require__.r(__webpack_exports__);
// EXPORTS
__webpack_require__.d(__webpack_exports__, {
"default": function() { return /* binding */ MyProcure; }
});
// 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/toConsumableArray.js
var toConsumableArray = __webpack_require__(37205);
var toConsumableArray_default = /*#__PURE__*/__webpack_require__.n(toConsumableArray);
// 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/asyncToGenerator.js
var asyncToGenerator = __webpack_require__(41498);
var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);
// EXTERNAL MODULE: ./node_modules/_@babel_runtime@7.23.6@@babel/runtime/helpers/slicedToArray.js
var slicedToArray = __webpack_require__(79800);
var slicedToArray_default = /*#__PURE__*/__webpack_require__.n(slicedToArray);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/index.js
var _react_17_0_2_react = __webpack_require__(59301);
// EXTERNAL MODULE: ./src/.umi-production/exports.ts
var _umi_production_exports = __webpack_require__(44742);
;// CONCATENATED MODULE: ./src/pages/Materials/MyProcure/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var MyProcuremodules = ({"header_div":"header_div___Wlpv4","header_title":"header_title___Ke5eh","search":"search___TCi9C","searchIcon":"searchIcon___aj2zp","clear_Data":"clear_Data___alPld","batch":"batch___AYgkR","btns":"btns___Hq8qk","btn":"btn___fFGnN"});
// 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/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// 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/input/index.js + 5 modules
var input = __webpack_require__(20008);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
var table = __webpack_require__(86383);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
var pagination = __webpack_require__(36697);
// EXTERNAL MODULE: ./src/service/laboratory.ts
var service_laboratory = __webpack_require__(66754);
;// CONCATENATED MODULE: ./src/pages/Materials/MyProcure/ViewModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var ViewModalmodules = ({"header":"header___WAU_M","header_params":"header_params___yLDqY","header_title":"header_title___rUNO1","file_list":"file_list___d0mtl","file_list_title":"file_list_title___RR5Cq","file_list_size":"file_list_size___QnZni","search_params":"search_params___MJSjv","search":"search___cH3AF","searchIcon":"searchIcon___lPynu","header_button":"header_button___oWVt6","header_content":"header_content___fv5Z5"});
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/button/index.js
var es_button = __webpack_require__(3113);
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
var env = __webpack_require__(33259);
// EXTERNAL MODULE: ./src/utils/util.tsx
var util = __webpack_require__(63834);
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 3 modules
var PreviewAll = __webpack_require__(26965);
// EXTERNAL MODULE: ./node_modules/_react@17.0.2@react/jsx-runtime.js
var jsx_runtime = __webpack_require__(37712);
;// CONCATENATED MODULE: ./src/pages/Materials/MyProcure/ViewModal/index.tsx
var unitType = {
1: '个',
2: '套',
3: '袋',
4: '条',
5: '根',
6: '升',
7: '毫升'
};
var ViewModal = function ViewModal(_ref) {
var _viewInfo$attachments;
var openViewModal = _ref.openViewModal,
viewInfo = _ref.viewInfo,
_onCancel = _ref.onCancel,
onReject = _ref.onReject;
var _useState = (0,_react_17_0_2_react.useState)({
content: "",
type: ""
}),
_useState2 = slicedToArray_default()(_useState, 2),
data = _useState2[0],
setData = _useState2[1];
var columns = [{
title: '资产编号',
dataIndex: 'number',
ellipsis: true
}, {
title: '物资名称',
dataIndex: 'title',
ellipsis: true
}, {
title: '规格型号',
dataIndex: 'model',
ellipsis: true
}, {
title: '存放实验室房间',
dataIndex: 'classroom_room_title',
ellipsis: true
}, {
title: '单位',
dataIndex: 'unit',
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: unitType[text]
})
});
}
}, {
title: '需申请数量',
dataIndex: 'apply_num',
ellipsis: true
}];
return /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
maskClosable: false,
centered: true,
keyboard: false,
destroyOnClose: true,
className: ViewModalmodules.my_modal,
open: openViewModal,
title: "\u7533\u8D2D\u7EC6\u5219",
width: "800px",
footer: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.status) == 'pending' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ViewModalmodules.footer,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "default",
onClick: function onClick() {
onReject();
},
children: "\u9A73\u56DE"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "primary",
onClick: function onClick() {
return _onCancel();
},
children: "\u540C\u610F"
})]
}),
onCancel: function onCancel(e) {
_onCancel();
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ViewModalmodules.header,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ViewModalmodules.header_params,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ViewModalmodules.header_content,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u7533\u8D2D\u539F\u56E0"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
title: viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.classroom_title,
style: {
color: '#000',
display: 'inline-block',
width: 250,
marginBottom: 0,
position: 'relative',
top: 6
},
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.classroom_title) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u5173\u8054"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000'
},
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.container_titile) || '--'
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ViewModalmodules.header_content,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u7533\u8BF7\u5B9E\u9A8C\u5BA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000'
},
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.classroom_title) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u7533\u8BF7\u4EBA"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000'
},
children: viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.user_name
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ViewModalmodules.header_content,
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u624B\u673A\u53F7"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000'
},
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.phone) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u90AE\u7BB1"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000'
},
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.mail) || '--'
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ViewModalmodules.header_content,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: "flex"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
color: '#999999',
width: '65px'
},
children: "\u5907\u6CE8\u8BF4\u660E"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
color: '#000',
width: '85%'
},
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.description) || '--'
})]
})
}), viewInfo === null || viewInfo === void 0 || (_viewInfo$attachments = viewInfo.attachments) === null || _viewInfo$attachments === void 0 ? void 0 : _viewInfo$attachments.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ViewModalmodules.file_list,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ViewModalmodules.file_list_title,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-fujian font12 mr5"
}), item === null || item === void 0 ? void 0 : item.title]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ViewModalmodules.file_list_size,
children: item === null || item === void 0 ? void 0 : item.filesize
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginLeft: '20px',
cursor: 'pointer',
lineHeight: '24px'
},
onClick: function onClick() {
var _item$url;
(0,util/* downLoadLink */.Nd)('', "".concat(env/* default */.Z.API_SERVER).concat(item === null || item === void 0 || (_item$url = item.url) === null || _item$url === void 0 ? void 0 : _item$url.replace('disposition=inline', '')));
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-xiazai4 font12 mr5"
}), "\u4E0B\u8F7D"]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
marginLeft: '20px',
cursor: 'pointer',
lineHeight: '24px',
color: '#50A760'
},
onClick: function onClick() {
setData({
type: item === null || item === void 0 ? void 0 : item.file_type,
content: env/* default */.Z.API_SERVER + (item === null || item === void 0 ? void 0 : item.url)
});
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-yulan font12 mr5"
}), "\u9884\u89C8"]
})]
});
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ViewModalmodules.header_content,
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u7533\u8BF7\u7269\u8D44"
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
width: 749
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
pagination: false,
dataSource: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.substances) || [],
columns: columns,
rowKey: "id"
})
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(PreviewAll/* default */.Z, {
close: true,
data: data === null || data === void 0 ? void 0 : data.content,
type: data === null || data === void 0 ? void 0 : data.type,
hasMask: true,
monacoEditor: {
language: "txt",
onChange: function onChange() {},
options: {
readOnly: true,
fontSize: 14,
minimap: {
enabled: false
}
}
},
onClose: function onClose() {
setData({
content: "",
type: ""
});
}
})]
});
};
/* harmony default export */ var MyProcure_ViewModal = (ViewModal);
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(85454);
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
var dayjs_min = __webpack_require__(9498);
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
;// CONCATENATED MODULE: ./src/pages/Materials/MyProcure/index.tsx
var statusType = {
pending: '待审核',
approved: '已同意',
rejected: '已驳回',
canceled: '已取消'
};
var Navigation = function Navigation(_ref) {
var loading = _ref.loading,
dispatch = _ref.dispatch;
var _useState = (0,_react_17_0_2_react.useState)(),
_useState2 = slicedToArray_default()(_useState, 2),
keyword = _useState2[0],
setkeyword = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(false),
_useState4 = slicedToArray_default()(_useState3, 2),
openViewModal = _useState4[0],
setOpenViewModal = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
openRejectModal = _useState6[0],
setOpenRejectModal = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)({}),
_useState8 = slicedToArray_default()(_useState7, 2),
viewData = _useState8[0],
setViewData = _useState8[1];
//预约数据
var _useState9 = (0,_react_17_0_2_react.useState)([]),
_useState10 = slicedToArray_default()(_useState9, 2),
tableData = _useState10[0],
setTableData = _useState10[1];
//分页
var _useState11 = (0,_react_17_0_2_react.useState)(0),
_useState12 = slicedToArray_default()(_useState11, 2),
total = _useState12[0],
setTotal = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)(1),
_useState14 = slicedToArray_default()(_useState13, 2),
page = _useState14[0],
setPage = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)(10),
_useState16 = slicedToArray_default()(_useState15, 2),
limit = _useState16[0],
setLimit = _useState16[1];
//实验室
var _useState17 = (0,_react_17_0_2_react.useState)([]),
_useState18 = slicedToArray_default()(_useState17, 2),
laboratoryLists = _useState18[0],
setLaboratoryLists = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)(''),
_useState20 = slicedToArray_default()(_useState19, 2),
laboratory = _useState20[0],
setLaboratory = _useState20[1];
var _useState21 = (0,_react_17_0_2_react.useState)(''),
_useState22 = slicedToArray_default()(_useState21, 2),
status = _useState22[0],
setStatus = _useState22[1];
var columns = [{
title: '申购编号',
dataIndex: 'number',
ellipsis: true
}, {
title: '申购名称',
dataIndex: '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: 'status',
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: statusType[text]
})
});
}
}, {
title: '申购物资',
ellipsis: true,
render: function render(text, record) {
var _record$substances, _record$substances2;
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: record === null || record === void 0 || (_record$substances = record.substances) === null || _record$substances === void 0 ? void 0 : _record$substances.map(function (item, index) {
return item === null || item === void 0 ? void 0 : item.title;
}).join('、'),
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: record === null || record === void 0 || (_record$substances2 = record.substances) === null || _record$substances2 === void 0 ? void 0 : _record$substances2.map(function (item, index) {
return item === null || item === void 0 ? void 0 : item.title;
}).join('、')
})
});
}
}, {
title: '申请时间',
dataIndex: 'apply_time',
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 ? dayjs_min_default()(text).format('YYYY-MM-DD') : '--'
})
});
}
}, {
title: '操作',
ellipsis: true,
width: '150',
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer"
},
onClick: function onClick() {
setViewData(record);
setOpenViewModal(true);
},
children: "\u67E5\u770B"
}), ((record === null || record === void 0 ? void 0 : record.status) == 'pending' || (record === null || record === void 0 ? void 0 : record.status) == 'rejected') && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: 10
},
onClick: function onClick() {
_umi_production_exports.history.push("/materials/itemAssets/AddProcure/".concat(record === null || record === void 0 ? void 0 : record.id, "?backUrl=/materials/myProcure"));
},
children: "\u4FEE\u6539"
}), (record === null || record === void 0 ? void 0 : record.status) == 'pending' && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: 10
},
onClick: function onClick() {
modal/* default */.Z.confirm({
centered: true,
okText: '确定',
cancelText: '取消',
title: "提示",
content: "\u8BF7\u786E\u8BA4\u662F\u5426\u53D6\u6D88\u8BE5\u91C7\u8D2D\u7533\u8BF7",
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/* purchases_canceled */.pd)({
id: record === null || record === void 0 ? void 0 : record.id
}).then(function (res) {
if (res.status === 0) {
message/* default */.ZP.success('取消成功');
getData(true);
}
});
case 1:
case "end":
return _context.stop();
}
}, _callee);
}));
function onOk() {
return _onOk.apply(this, arguments);
}
return onOk;
}()
});
},
children: "\u53D6\u6D88"
})]
});
}
}];
(0,_react_17_0_2_react.useEffect)(function () {
//实验室列表
(0,service_laboratory/* classroom_query */.GJ)({
page: 1,
limit: 10000,
keyword: ''
}).then(function (res) {
var _res$data;
setLaboratoryLists([{
id: '',
title: '全部'
}].concat(toConsumableArray_default()(res === null || res === void 0 || (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.list)));
});
}, []);
(0,_react_17_0_2_react.useEffect)(function () {
getData(false);
}, [page]);
(0,_react_17_0_2_react.useEffect)(function () {
getData(true);
}, [keyword, status, laboratory, limit]);
var getData = function getData(flag) {
if (flag) {
setPage(1);
}
(0,materials/* my_purchases_query */.FE)({
page: page,
limit: limit,
keyword: keyword,
classroom_id: laboratory,
status: status
}).then(function (res) {
var _res$data2, _res$data3;
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
setTableData(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list);
});
};
var onShowSizeChange = function onShowSizeChange(page, size) {
setPage(page);
setLimit(size);
};
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: MyProcuremodules.header_div,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: MyProcuremodules.header_title,
children: "\u6211\u7684\u91C7\u8D2D\u7533\u8BF7"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u7533\u8BF7\u5B9E\u9A8C\u5BA4",
style: {
marginLeft: 'auto'
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"], {
style: {
width: 140
},
defaultValue: laboratory,
value: laboratory,
onChange: function onChange(e) {
setLaboratory(e);
},
children: laboratoryLists === null || laboratoryLists === void 0 ? void 0 : laboratoryLists.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: item === null || item === void 0 ? void 0 : item.id,
children: item === null || item === void 0 ? void 0 : item.title
}, index);
})
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
colon: false,
label: "\u72B6\u6001",
style: {
marginLeft: '20px'
},
children: /*#__PURE__*/(0,jsx_runtime.jsxs)(es_select["default"], {
style: {
width: 120
},
defaultValue: status,
value: status,
onChange: function onChange(e) {
setStatus(e);
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "",
children: "\u5168\u90E8"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "1",
children: "\u5F85\u5BA1\u6838"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "2",
children: "\u5DF2\u540C\u610F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "3",
children: "\u5DF2\u9A73\u56DE"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "4",
children: "\u5DF2\u53D6\u6D88"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
placeholder: "\u8BF7\u8F93\u5165\u7533\u8D2D\u7F16\u53F7\u641C\u7D22",
size: "large",
className: MyProcuremodules.search,
value: keyword,
onChange: function onChange(e) {
setkeyword(e.target.value);
},
onSearch: function onSearch(value) {
setkeyword(value);
},
suffix: /*#__PURE__*/(0,jsx_runtime.jsx)("i", {
className: "iconfont icon-sousuo9 font14 ".concat(MyProcuremodules.searchIcon),
onClick: function onClick() {
setkeyword(keyword);
getData(true);
}
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: MyProcuremodules.search_params
}), /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
pagination: false,
dataSource: tableData,
columns: columns
}), /*#__PURE__*/(0,jsx_runtime.jsx)("aside", {
children: total > 0 ? /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
style: {
display: 'flex',
alignItems: 'center',
justifyContent: 'space-between',
padding: '10px 7px 20px 7px'
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#656F87'
},
children: ["\u5171", /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
className: "c-light-primary",
children: total
}), "\u6761\u6570\u636E"]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(pagination/* default */.Z, {
showSizeChanger: true,
showQuickJumper: true,
onChange: onShowSizeChange,
defaultCurrent: 1,
pageSizeOptions: ['10', '20', '50', '100'],
current: page || 1,
pageSize: limit || 10,
defaultPageSize: 10,
total: total
})]
}) : ''
}), /*#__PURE__*/(0,jsx_runtime.jsx)(MyProcure_ViewModal, {
openViewModal: openViewModal,
viewInfo: viewData,
onCancel: function onCancel() {
return setOpenViewModal(false);
},
onReject: function onReject() {
setOpenViewModal(false);
setOpenRejectModal(true);
}
})]
});
};
/* harmony default export */ var MyProcure = ((0,_umi_production_exports.connect)(function (_ref2) {
var loading = _ref2.loading,
engineeringNavigtion = _ref2.engineeringNavigtion,
dispatch = _ref2.dispatch;
return objectSpread2_default()(objectSpread2_default()({
loading: loading
}, engineeringNavigtion), {}, {
dispatch: dispatch
});
})(Navigation));
/***/ })
}]);

@ -33,6 +33,8 @@ var _umi_production_exports = __webpack_require__(44742);
/* harmony default export */ var Procuremodules = ({"header_div":"header_div___PjEvU","header_title":"header_title___SdPR7","search":"search___nzx2s","searchIcon":"searchIcon___ylZqz","clear_Data":"clear_Data___SstH8","batch":"batch___E8ElC","btns":"btns___NozFY","btn":"btn___rcu07"});
// 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/message/index.js + 4 modules
var message = __webpack_require__(8591);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/form/index.js + 19 modules
var es_form = __webpack_require__(78241);
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/select/index.js
@ -70,6 +72,15 @@ var jsx_runtime = __webpack_require__(37712);
var unitType = {
1: '个',
2: '套',
3: '袋',
4: '条',
5: '根',
6: '升',
7: '毫升'
};
var ViewModal = function ViewModal(_ref) {
var _viewInfo$attachments;
var openViewModal = _ref.openViewModal,
@ -85,25 +96,37 @@ var ViewModal = function ViewModal(_ref) {
setData = _useState2[1];
var columns = [{
title: '资产编号',
dataIndex: 'file_name'
dataIndex: 'number',
ellipsis: true
}, {
title: '物资名称',
dataIndex: 'file_name'
dataIndex: 'title',
ellipsis: true
}, {
title: '规格型号',
dataIndex: 'file_type'
dataIndex: 'model',
ellipsis: true
}, {
title: '存放实验室房间',
dataIndex: 'file_name'
}, {
title: '文件类型',
dataIndex: 'file_type'
dataIndex: 'classroom_room_title',
ellipsis: true
}, {
title: '单位',
dataIndex: 'file_name'
dataIndex: 'unit',
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: unitType[text]
})
});
}
}, {
title: '需申请数量',
dataIndex: 'file_type'
dataIndex: 'apply_num',
ellipsis: true
}];
return /*#__PURE__*/(0,jsx_runtime.jsxs)(modal/* default */.Z, {
maskClosable: false,
@ -113,8 +136,8 @@ var ViewModal = function ViewModal(_ref) {
className: ViewModalmodules.my_modal,
open: openViewModal,
title: "\u7533\u8D2D\u7EC6\u5219",
width: "799px",
footer: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
width: "800px",
footer: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.status) == 'pending' && /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: ViewModalmodules.footer,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)(es_button/* default */.ZP, {
type: "default",
@ -161,7 +184,7 @@ var ViewModal = function ViewModal(_ref) {
style: {
color: '#000'
},
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.area) || '--'
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.container_titile) || '--'
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -173,7 +196,7 @@ var ViewModal = function ViewModal(_ref) {
style: {
color: '#000'
},
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.classroom_category_title) || '--'
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.classroom_title) || '--'
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
@ -182,7 +205,7 @@ var ViewModal = function ViewModal(_ref) {
style: {
color: '#000'
},
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.classroom_nature) == 0 ? '专业' : '普通' || 0
children: viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.user_name
})]
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -209,13 +232,21 @@ var ViewModal = function ViewModal(_ref) {
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: ViewModalmodules.header_content,
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
display: "flex"
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
color: '#999999',
width: '65px'
},
children: "\u5907\u6CE8\u8BF4\u660E"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
style: {
color: '#000'
color: '#000',
width: '85%'
},
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.classroom_category_title) || '--'
children: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.description) || '--'
})]
})
}), viewInfo === null || viewInfo === void 0 || (_viewInfo$attachments = viewInfo.attachments) === null || _viewInfo$attachments === void 0 ? void 0 : _viewInfo$attachments.map(function (item, index) {
@ -273,7 +304,7 @@ var ViewModal = function ViewModal(_ref) {
},
children: /*#__PURE__*/(0,jsx_runtime.jsx)(table/* default */.Z, {
pagination: false,
dataSource: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.list) || [],
dataSource: (viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.substances) || [],
columns: columns,
rowKey: "id"
})
@ -314,10 +345,10 @@ var asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerat
;// CONCATENATED MODULE: ./src/pages/Materials/Procure/RejectModal/index.less?modules
// extracted by mini-css-extract-plugin
/* harmony default export */ var RejectModalmodules = ({"header":"header___DJXF8","header_params":"header_params___EuMgY","header_title":"header_title___rhOY7","file_list":"file_list___ZLYpV","file_list_title":"file_list_title___Qn1g2","file_list_size":"file_list_size___nvHlV","search_params":"search_params___DSDA0","search":"search___zyFAv","searchIcon":"searchIcon___mMsUV","header_button":"header_button___qasKf","header_content":"header_content___WzhJ0"});
// 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/input/TextArea.js
var TextArea = __webpack_require__(1643);
// EXTERNAL MODULE: ./src/service/materials.ts
var materials = __webpack_require__(85454);
;// CONCATENATED MODULE: ./src/pages/Materials/Procure/RejectModal/index.tsx
@ -328,6 +359,7 @@ var TextArea = __webpack_require__(1643);
var RejectModal = function RejectModal(_ref) {
var openRejectModal = _ref.openRejectModal,
viewInfo = _ref.viewInfo,
@ -356,7 +388,16 @@ var RejectModal = function RejectModal(_ref) {
message/* default */.ZP.info('请填写驳回理由');
return _context.abrupt("return");
case 3:
_onCancel();
(0,materials/* purchases_review */.AY)({
id: viewInfo === null || viewInfo === void 0 ? void 0 : viewInfo.id,
type: 1,
reason: textAreaVal.trim()
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('操作成功');
_onCancel();
}
});
case 4:
case "end":
return _context.stop();
@ -387,6 +428,9 @@ var RejectModal = function RejectModal(_ref) {
});
};
/* harmony default export */ var Procure_RejectModal = (RejectModal);
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.10@dayjs/dayjs.min.js
var dayjs_min = __webpack_require__(9498);
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
;// CONCATENATED MODULE: ./src/pages/Materials/Procure/index.tsx
@ -401,6 +445,14 @@ var RejectModal = function RejectModal(_ref) {
var statusType = {
pending: '待审核',
approved: '已同意',
rejected: '已驳回',
canceled: '已取消'
};
var Navigation = function Navigation(_ref) {
var loading = _ref.loading,
dispatch = _ref.dispatch;
@ -408,65 +460,59 @@ var Navigation = function Navigation(_ref) {
_useState2 = slicedToArray_default()(_useState, 2),
keyword = _useState2[0],
setkeyword = _useState2[1];
var _useState3 = (0,_react_17_0_2_react.useState)(''),
var _useState3 = (0,_react_17_0_2_react.useState)(false),
_useState4 = slicedToArray_default()(_useState3, 2),
reason = _useState4[0],
setReason = _useState4[1];
openViewModal = _useState4[0],
setOpenViewModal = _useState4[1];
var _useState5 = (0,_react_17_0_2_react.useState)(false),
_useState6 = slicedToArray_default()(_useState5, 2),
openViewModal = _useState6[0],
setOpenViewModal = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)(false),
openRejectModal = _useState6[0],
setOpenRejectModal = _useState6[1];
var _useState7 = (0,_react_17_0_2_react.useState)({}),
_useState8 = slicedToArray_default()(_useState7, 2),
openRejectModal = _useState8[0],
setOpenRejectModal = _useState8[1];
var _useState9 = (0,_react_17_0_2_react.useState)({}),
_useState10 = slicedToArray_default()(_useState9, 2),
viewData = _useState10[0],
setViewData = _useState10[1];
var countRef = (0,_react_17_0_2_react.useRef)(reason);
countRef.current = reason;
viewData = _useState8[0],
setViewData = _useState8[1];
//预约数据
var _useState11 = (0,_react_17_0_2_react.useState)([]),
_useState12 = slicedToArray_default()(_useState11, 2),
tableData = _useState12[0],
setTableData = _useState12[1];
var _useState9 = (0,_react_17_0_2_react.useState)([]),
_useState10 = slicedToArray_default()(_useState9, 2),
tableData = _useState10[0],
setTableData = _useState10[1];
//分页
var _useState13 = (0,_react_17_0_2_react.useState)(0),
var _useState11 = (0,_react_17_0_2_react.useState)(0),
_useState12 = slicedToArray_default()(_useState11, 2),
total = _useState12[0],
setTotal = _useState12[1];
var _useState13 = (0,_react_17_0_2_react.useState)(1),
_useState14 = slicedToArray_default()(_useState13, 2),
total = _useState14[0],
setTotal = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)(1),
page = _useState14[0],
setPage = _useState14[1];
var _useState15 = (0,_react_17_0_2_react.useState)(10),
_useState16 = slicedToArray_default()(_useState15, 2),
page = _useState16[0],
setPage = _useState16[1];
var _useState17 = (0,_react_17_0_2_react.useState)(10),
_useState18 = slicedToArray_default()(_useState17, 2),
limit = _useState18[0],
setLimit = _useState18[1];
limit = _useState16[0],
setLimit = _useState16[1];
//实验室
var _useState19 = (0,_react_17_0_2_react.useState)([]),
var _useState17 = (0,_react_17_0_2_react.useState)([]),
_useState18 = slicedToArray_default()(_useState17, 2),
laboratoryLists = _useState18[0],
setLaboratoryLists = _useState18[1];
var _useState19 = (0,_react_17_0_2_react.useState)(''),
_useState20 = slicedToArray_default()(_useState19, 2),
laboratoryLists = _useState20[0],
setLaboratoryLists = _useState20[1];
laboratory = _useState20[0],
setLaboratory = _useState20[1];
var _useState21 = (0,_react_17_0_2_react.useState)(''),
_useState22 = slicedToArray_default()(_useState21, 2),
laboratory = _useState22[0],
setLaboratory = _useState22[1];
var _useState23 = (0,_react_17_0_2_react.useState)(''),
_useState24 = slicedToArray_default()(_useState23, 2),
status = _useState24[0],
setStatus = _useState24[1];
status = _useState22[0],
setStatus = _useState22[1];
var columns = [{
title: '申购编号',
dataIndex: 'classroom_room_title',
dataIndex: 'number',
ellipsis: true
}, {
title: '申请人',
dataIndex: 'classroom_room_title',
dataIndex: 'user_name',
ellipsis: true
}, {
title: '角色',
@ -479,15 +525,15 @@ var Navigation = function Navigation(_ref) {
}
}, {
title: '手机号码',
dataIndex: 'classroom_room_title',
dataIndex: 'phone',
ellipsis: true
}, {
title: '申请实验室',
dataIndex: 'classroom_room_title',
dataIndex: 'classroom_title',
ellipsis: true
}, {
title: '申购物资',
dataIndex: 'classroom_room_title',
title: '申购名称',
dataIndex: 'reason',
ellipsis: true,
render: function render(text) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
@ -498,13 +544,53 @@ var Navigation = function Navigation(_ref) {
})
});
}
}, {
title: '状态',
dataIndex: 'status',
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: statusType[text]
})
});
}
}, {
title: '申购物资',
ellipsis: true,
render: function render(text, record) {
var _record$substances, _record$substances2;
return /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
placement: "bottomLeft",
title: record === null || record === void 0 || (_record$substances = record.substances) === null || _record$substances === void 0 ? void 0 : _record$substances.map(function (item, index) {
return item === null || item === void 0 ? void 0 : item.title;
}).join('、'),
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: record === null || record === void 0 || (_record$substances2 = record.substances) === null || _record$substances2 === void 0 ? void 0 : _record$substances2.map(function (item, index) {
return item === null || item === void 0 ? void 0 : item.title;
}).join('、')
})
});
}
}, {
title: '申请时间',
dataIndex: 'classroom_room_title',
ellipsis: true
dataIndex: 'apply_time',
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 ? dayjs_min_default()(text).format('YYYY-MM-DD') : '--'
})
});
}
}, {
title: '操作',
ellipsis: true,
width: '150',
render: function render(text, record) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
@ -512,30 +598,42 @@ var Navigation = function Navigation(_ref) {
color: "#165DFF",
cursor: "pointer"
},
onClick: function onClick() {
setViewData(record);
setOpenRejectModal(true);
},
children: "\u9A73\u56DE"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: 10
},
onClick: function onClick() {},
children: "\u540C\u610F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: 10
},
onClick: function onClick() {
setViewData(record);
setOpenViewModal(true);
},
children: "\u67E5\u770B"
}), (record === null || record === void 0 ? void 0 : record.status) == 'pending' && /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: 10
},
onClick: function onClick() {
(0,materials/* purchases_review */.AY)({
id: record === null || record === void 0 ? void 0 : record.id,
type: 2
}).then(function (res) {
if ((res === null || res === void 0 ? void 0 : res.status) == 0) {
message/* default */.ZP.success('操作成功');
getData(true);
}
});
},
children: "\u540C\u610F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: "#165DFF",
cursor: "pointer",
marginLeft: 10
},
onClick: function onClick() {
setViewData(record);
setOpenRejectModal(true);
},
children: "\u9A73\u56DE"
})]
})]
});
}
@ -564,7 +662,7 @@ var Navigation = function Navigation(_ref) {
if (flag) {
setPage(1);
}
(0,service_laboratory/* classroom_rooms_query */.jd)({
(0,materials/* purchases_query */.ZW)({
page: page,
limit: limit,
keyword: keyword,
@ -573,10 +671,7 @@ var Navigation = function Navigation(_ref) {
}).then(function (res) {
var _res$data2, _res$data3;
setTotal(res === null || res === void 0 || (_res$data2 = res.data) === null || _res$data2 === void 0 ? void 0 : _res$data2.count);
setTableData(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 || (_res$data3 = _res$data3.list) === null || _res$data3 === void 0 ? void 0 : _res$data3.map(function (item) {
item.key = item === null || item === void 0 ? void 0 : item.id;
return item;
}));
setTableData(res === null || res === void 0 || (_res$data3 = res.data) === null || _res$data3 === void 0 ? void 0 : _res$data3.list);
});
};
var onShowSizeChange = function onShowSizeChange(page, size) {
@ -630,14 +725,17 @@ var Navigation = function Navigation(_ref) {
value: "",
children: "\u5168\u90E8"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "0",
value: "1",
children: "\u5F85\u5BA1\u6838"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "1",
value: "2",
children: "\u5DF2\u540C\u610F"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "2",
children: "\u88AB\u9A73\u56DE"
value: "3",
children: "\u5DF2\u9A73\u56DE"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_select["default"].Option, {
value: "4",
children: "\u5DF2\u53D6\u6D88"
})]
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z.Search, {
@ -709,7 +807,8 @@ var Navigation = function Navigation(_ref) {
openRejectModal: openRejectModal,
viewInfo: viewData,
onCancel: function onCancel() {
return setOpenRejectModal(false);
setOpenRejectModal(false);
getData(true);
}
})]
});

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