|
|
|
|
@ -55,8 +55,6 @@ var table = __webpack_require__(86383);
|
|
|
|
|
var pagination = __webpack_require__(36697);
|
|
|
|
|
// EXTERNAL MODULE: ./src/service/laboratory.ts
|
|
|
|
|
var service_laboratory = __webpack_require__(66754);
|
|
|
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/input/TextArea.js
|
|
|
|
|
var TextArea = __webpack_require__(1643);
|
|
|
|
|
// 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
|
|
|
|
|
@ -73,7 +71,6 @@ var jsx_runtime = __webpack_require__(37712);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Navigation = function Navigation(_ref) {
|
|
|
|
|
var loading = _ref.loading,
|
|
|
|
|
dispatch = _ref.dispatch;
|
|
|
|
|
@ -94,7 +91,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
tableData = _useState6[0],
|
|
|
|
|
setTableData = _useState6[1];
|
|
|
|
|
var columns = [{
|
|
|
|
|
title: '房间名称',
|
|
|
|
|
title: '申购编号',
|
|
|
|
|
dataIndex: 'title',
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text, record) {
|
|
|
|
|
@ -114,7 +111,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '预约权限',
|
|
|
|
|
title: '申购名称',
|
|
|
|
|
dataIndex: 'permission',
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text) {
|
|
|
|
|
@ -148,7 +145,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '使用面积',
|
|
|
|
|
title: '申购实验室',
|
|
|
|
|
dataIndex: 'area',
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text) {
|
|
|
|
|
@ -161,7 +158,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '工位数量',
|
|
|
|
|
title: '申购物资',
|
|
|
|
|
dataIndex: 'work_num',
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text) {
|
|
|
|
|
@ -174,7 +171,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, {
|
|
|
|
|
title: '所属实验室',
|
|
|
|
|
title: '申请时间',
|
|
|
|
|
dataIndex: 'classroom_title',
|
|
|
|
|
ellipsis: true,
|
|
|
|
|
render: function render(text) {
|
|
|
|
|
@ -200,7 +197,17 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
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: "\u7F16\u8F91"
|
|
|
|
|
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",
|
|
|
|
|
@ -240,101 +247,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
children: "\u5220\u9664"
|
|
|
|
|
}), (record === null || record === void 0 ? void 0 : record.status) == 1 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: "#165DFF",
|
|
|
|
|
marginLeft: "10px",
|
|
|
|
|
cursor: "pointer"
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
centered: true,
|
|
|
|
|
okText: '确定',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
icon: null,
|
|
|
|
|
title: "确认启用房间",
|
|
|
|
|
content: "\u60A8\u9009\u4E2D\u7684\u623F\u95F4\u5373\u5C06\u542F\u7528\uFF0C\u542F\u7528\u540E\uFF0C\u5177\u5907\u9884\u7EA6\u6743\u9650\u7684\u7528\u6237\u80FD\u591F\u8FDB\u884C\u623F\u95F4\u7684\u9884\u7EA6\u548C\u4F7F\u7528\u3002",
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
(0,service_laboratory/* rooms_enable */.KB)({
|
|
|
|
|
classroom_room_ids: [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 _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk2.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
children: "\u542F\u7528"
|
|
|
|
|
}), (record === null || record === void 0 ? void 0 : record.status) == 0 && /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
|
|
|
style: {
|
|
|
|
|
color: "#165DFF",
|
|
|
|
|
marginLeft: "10px",
|
|
|
|
|
cursor: "pointer"
|
|
|
|
|
},
|
|
|
|
|
onClick: function onClick() {
|
|
|
|
|
modal/* default */.Z.confirm({
|
|
|
|
|
centered: true,
|
|
|
|
|
okText: '确定',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
icon: null,
|
|
|
|
|
title: "确认禁用房间",
|
|
|
|
|
content: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
children: record !== null && record !== void 0 && record.has_reservation ? '您选中的房间中存在用户预约,如禁用房间将自动取消预约,请通知相关用户取消预约的原因:' : '您选中的房间即将禁用,禁用后,用户不能进行房间的预约和使用。'
|
|
|
|
|
}), (record === null || record === void 0 ? void 0 : record.has_reservation) && /*#__PURE__*/(0,jsx_runtime.jsx)(TextArea/* default */.Z, {
|
|
|
|
|
placeholder: "\u8BF7\u586B\u5199\u53D6\u6D88\u9884\u7EA6\u7684\u539F\u56E0",
|
|
|
|
|
className: "mt10",
|
|
|
|
|
onChange: function onChange(e) {
|
|
|
|
|
var _e$target;
|
|
|
|
|
setReason(e === null || e === void 0 || (_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value);
|
|
|
|
|
}
|
|
|
|
|
})]
|
|
|
|
|
}),
|
|
|
|
|
onOk: function () {
|
|
|
|
|
var _onOk3 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
(0,service_laboratory/* rooms_disable */.Y_)({
|
|
|
|
|
classroom_room_ids: [record === null || record === void 0 ? void 0 : record.id],
|
|
|
|
|
reason: countRef.current
|
|
|
|
|
}).then(function (res) {
|
|
|
|
|
if (res.status === 0) {
|
|
|
|
|
message/* default */.ZP.success('禁用成功');
|
|
|
|
|
getData(true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
case 1:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee3);
|
|
|
|
|
}));
|
|
|
|
|
function onOk() {
|
|
|
|
|
return _onOk3.apply(this, arguments);
|
|
|
|
|
}
|
|
|
|
|
return onOk;
|
|
|
|
|
}()
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
children: "\u7981\u7528"
|
|
|
|
|
children: "\u53D6\u6D88"
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
@ -429,7 +342,7 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
className: MyProcuremodules.header_div,
|
|
|
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: MyProcuremodules.header_title,
|
|
|
|
|
children: "\u5B9E\u9A8C\u5BA4\u623F\u95F4"
|
|
|
|
|
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",
|