You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
793 lines
33 KiB
793 lines
33 KiB
"use strict";
|
|
(self["webpackChunk"] = self["webpackChunk"] || []).push([[7202],{
|
|
|
|
/***/ 25032:
|
|
/*!*******************************************************************************************************!*\
|
|
!*** ./node_modules/_@ant-design_icons@5.4.0@@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.25.6@@babel/runtime/helpers/esm/extends.js
|
|
var esm_extends = __webpack_require__(33614);
|
|
// 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.4.0@@ant-design/icons/es/components/AntdIcon.js + 3 modules
|
|
var AntdIcon = __webpack_require__(1393);
|
|
;// CONCATENATED MODULE: ./node_modules/_@ant-design_icons@5.4.0@@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
|
|
}));
|
|
};
|
|
|
|
/** */
|
|
var RefIcon = /*#__PURE__*/_react_17_0_2_react.forwardRef(InboxOutlined_InboxOutlined);
|
|
if (false) {}
|
|
/* harmony default export */ var icons_InboxOutlined = (RefIcon);
|
|
|
|
/***/ }),
|
|
|
|
/***/ 98845:
|
|
/*!*********************************************************!*\
|
|
!*** ./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__(80608);
|
|
;// 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","file_list":"file_list___GDpfw","file_list_title":"file_list_title___Du77A","file_list_size":"file_list_size___nMJsO"});
|
|
// 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 + 3 modules
|
|
var input = __webpack_require__(92832);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/table/index.js + 85 modules
|
|
var table = __webpack_require__(51945);
|
|
// EXTERNAL MODULE: ./node_modules/_antd@5.9.0@antd/es/pagination/index.js + 10 modules
|
|
var pagination = __webpack_require__(86859);
|
|
// EXTERNAL MODULE: ./node_modules/_dayjs@1.11.13@dayjs/dayjs.min.js
|
|
var dayjs_min = __webpack_require__(61186);
|
|
var dayjs_min_default = /*#__PURE__*/__webpack_require__.n(dayjs_min);
|
|
// EXTERNAL MODULE: ./src/components/NoData/index.tsx
|
|
var NoData = __webpack_require__(6638);
|
|
// 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__(30518);
|
|
;// 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__(77036);
|
|
// EXTERNAL MODULE: ./src/components/MultiUpload/index.tsx + 2 modules
|
|
var MultiUpload = __webpack_require__(1058);
|
|
// EXTERNAL MODULE: ./src/service/materials.ts
|
|
var materials = __webpack_require__(32013);
|
|
// 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: dayjs_min_default()(),
|
|
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",
|
|
style: {
|
|
marginTop: '-12px'
|
|
},
|
|
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));
|
|
// EXTERNAL MODULE: ./src/utils/util.tsx
|
|
var util = __webpack_require__(27876);
|
|
// EXTERNAL MODULE: ./src/utils/env.ts + 1 modules
|
|
var env = __webpack_require__(71681);
|
|
// EXTERNAL MODULE: ./src/components/PreviewAll/index.tsx + 3 modules
|
|
var PreviewAll = __webpack_require__(89976);
|
|
// EXTERNAL MODULE: ./src/components/RenderHtml/index.tsx + 2 modules
|
|
var RenderHtml = __webpack_require__(47759);
|
|
;// CONCATENATED MODULE: ./src/pages/Materials/Entry/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var Navigation = function Navigation(_ref) {
|
|
var _viewData$attachments;
|
|
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)({
|
|
content: "",
|
|
type: ""
|
|
}),
|
|
_useState12 = slicedToArray_default()(_useState11, 2),
|
|
data = _useState12[0],
|
|
setData = _useState12[1];
|
|
var _useState13 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState14 = slicedToArray_default()(_useState13, 2),
|
|
editVisible = _useState14[0],
|
|
setEditVisible = _useState14[1];
|
|
var _useState15 = (0,_react_17_0_2_react.useState)(''),
|
|
_useState16 = slicedToArray_default()(_useState15, 2),
|
|
centerId = _useState16[0],
|
|
setCenterId = _useState16[1];
|
|
var _useState17 = (0,_react_17_0_2_react.useState)(false),
|
|
_useState18 = slicedToArray_default()(_useState17, 2),
|
|
viewVisible = _useState18[0],
|
|
setViewVisible = _useState18[1];
|
|
var _useState19 = (0,_react_17_0_2_react.useState)({}),
|
|
_useState20 = slicedToArray_default()(_useState19, 2),
|
|
viewData = _useState20[0],
|
|
setViewData = _useState20[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\u91C7\u8D2D\u540D\u79F0\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.jsx)(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);
|
|
},
|
|
cancelButtonProps: {
|
|
style: {
|
|
display: 'none'
|
|
}
|
|
},
|
|
width: 600,
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
style: {
|
|
maxHeight: '500px',
|
|
overflowY: 'auto'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Entrymodules.infoItem,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
width: '85px'
|
|
},
|
|
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: '85px'
|
|
},
|
|
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: '85px'
|
|
},
|
|
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: '85px'
|
|
},
|
|
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,
|
|
style: {
|
|
marginBottom: '20px'
|
|
},
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
|
|
style: {
|
|
width: '85px'
|
|
},
|
|
children: "\u5907\u6CE8\u8BF4\u660E\uFF1A"
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
style: {
|
|
width: '460px',
|
|
textAlign: "left",
|
|
marginTop: '5px'
|
|
},
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(RenderHtml/* default */.Z, {
|
|
value: (viewData === null || viewData === void 0 ? void 0 : viewData.description) || ''
|
|
})
|
|
})]
|
|
}), viewData === null || viewData === void 0 || (_viewData$attachments = viewData.attachments) === null || _viewData$attachments === void 0 ? void 0 : _viewData$attachments.map(function (item, index) {
|
|
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
|
|
className: Entrymodules.file_list,
|
|
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
className: Entrymodules.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: Entrymodules.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)(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 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 */ 81376);
|
|
"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);
|
|
|
|
/***/ })
|
|
|
|
}]); |