|
|
|
|
@ -105,12 +105,12 @@ __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/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);
|
|
|
|
|
@ -155,6 +155,8 @@ var materials = __webpack_require__(80231);
|
|
|
|
|
var HeaderNav = __webpack_require__(59827);
|
|
|
|
|
// EXTERNAL MODULE: ./src/utils/hooks/useCustomRequest.ts
|
|
|
|
|
var useCustomRequest = __webpack_require__(13158);
|
|
|
|
|
// EXTERNAL MODULE: ./src/components/Exercise/ip.tsx
|
|
|
|
|
var Exercise_ip = __webpack_require__(62984);
|
|
|
|
|
// 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
|
|
|
|
|
@ -177,6 +179,7 @@ var logo = __webpack_require__(/*! @/../public/images/materials/logo.png */ 1201
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var unitType = {
|
|
|
|
|
1: '个',
|
|
|
|
|
2: '套',
|
|
|
|
|
@ -444,11 +447,36 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
setContainerList(res === null || res === void 0 ? void 0 : res[obj]);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
var getIP = /*#__PURE__*/function () {
|
|
|
|
|
var _ref2 = asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
var ip;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
return (0,Exercise_ip/* findLocalIp */.y)({
|
|
|
|
|
ip_limit: true,
|
|
|
|
|
ip_bind: true
|
|
|
|
|
});
|
|
|
|
|
case 2:
|
|
|
|
|
ip = _context.sent;
|
|
|
|
|
myForm.setFieldValue("ip", ip);
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}));
|
|
|
|
|
return function getIP() {
|
|
|
|
|
return _ref2.apply(this, arguments);
|
|
|
|
|
};
|
|
|
|
|
}();
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
getData(false);
|
|
|
|
|
}, [page]);
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
getReviewUsers({});
|
|
|
|
|
getIP();
|
|
|
|
|
}, []);
|
|
|
|
|
(0,_react_17_0_2_react.useEffect)(function () {
|
|
|
|
|
getData(true);
|
|
|
|
|
@ -618,15 +646,14 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
colon: false,
|
|
|
|
|
label: "\u90AE\u7BB1",
|
|
|
|
|
name: "mail",
|
|
|
|
|
label: "IP\u5730\u5740",
|
|
|
|
|
name: "ip",
|
|
|
|
|
rules: [{
|
|
|
|
|
required: true,
|
|
|
|
|
pattern: emailReg,
|
|
|
|
|
message: '请输入正确的邮箱'
|
|
|
|
|
required: true
|
|
|
|
|
}],
|
|
|
|
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
|
|
|
|
|
size: "large"
|
|
|
|
|
size: "large",
|
|
|
|
|
readOnly: true
|
|
|
|
|
})
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)(es_form/* default */.Z.Item, {
|
|
|
|
|
colon: false,
|
|
|
|
|
@ -710,34 +737,34 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
children: "\u53D6\u6D88"
|
|
|
|
|
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|
|
|
|
|
className: AddProcuremodules.submit_button,
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
|
|
|
|
|
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
var regex, i, _myForm$getFieldValue, _myForm$getFieldValue2;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
|
|
|
|
|
while (1) switch (_context.prev = _context.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
regex = /^(?!0+(\.0*)?$)\d+(\.\d)?$/;
|
|
|
|
|
_context.t0 = regeneratorRuntime_default()().keys(formTableData);
|
|
|
|
|
_context2.t0 = regeneratorRuntime_default()().keys(formTableData);
|
|
|
|
|
case 2:
|
|
|
|
|
if ((_context.t1 = _context.t0()).done) {
|
|
|
|
|
_context.next = 9;
|
|
|
|
|
if ((_context2.t1 = _context2.t0()).done) {
|
|
|
|
|
_context2.next = 9;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
i = _context.t1.value;
|
|
|
|
|
i = _context2.t1.value;
|
|
|
|
|
if (regex.test(formTableData[i].apply_num)) {
|
|
|
|
|
_context.next = 7;
|
|
|
|
|
_context2.next = 7;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
message/* default */.ZP.error("请检查需申请数量,必须大于0且最多只能一位小数");
|
|
|
|
|
return _context.abrupt("return", false);
|
|
|
|
|
return _context2.abrupt("return", false);
|
|
|
|
|
case 7:
|
|
|
|
|
_context.next = 2;
|
|
|
|
|
_context2.next = 2;
|
|
|
|
|
break;
|
|
|
|
|
case 9:
|
|
|
|
|
myForm.setFieldValue('substances', formTableData === null || formTableData === void 0 ? void 0 : formTableData.map(function (item) {
|
|
|
|
|
item.apply_num = Number(item === null || item === void 0 ? void 0 : item.apply_num);
|
|
|
|
|
return item;
|
|
|
|
|
}));
|
|
|
|
|
_context.next = 12;
|
|
|
|
|
_context2.next = 12;
|
|
|
|
|
return myForm.validateFields();
|
|
|
|
|
case 12:
|
|
|
|
|
if ((params === null || params === void 0 ? void 0 : params.receiveId) != 'null') {
|
|
|
|
|
@ -773,9 +800,9 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
}
|
|
|
|
|
case 13:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context.stop();
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee);
|
|
|
|
|
}, _callee2);
|
|
|
|
|
})),
|
|
|
|
|
children: "\u63D0\u4EA4"
|
|
|
|
|
})]
|
|
|
|
|
@ -789,10 +816,10 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
open: openRuleModal,
|
|
|
|
|
title: "\u9009\u62E9\u7269\u8D44",
|
|
|
|
|
width: "1000px",
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee2() {
|
|
|
|
|
onOk: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee3() {
|
|
|
|
|
var i, j;
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee2$(_context2) {
|
|
|
|
|
while (1) switch (_context2.prev = _context2.next) {
|
|
|
|
|
return regeneratorRuntime_default()().wrap(function _callee3$(_context3) {
|
|
|
|
|
while (1) switch (_context3.prev = _context3.next) {
|
|
|
|
|
case 0:
|
|
|
|
|
//去重保存已选的值的 需申请数据
|
|
|
|
|
for (i in modalTableData) {
|
|
|
|
|
@ -807,9 +834,9 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
setRefresh(new Date());
|
|
|
|
|
case 4:
|
|
|
|
|
case "end":
|
|
|
|
|
return _context2.stop();
|
|
|
|
|
return _context3.stop();
|
|
|
|
|
}
|
|
|
|
|
}, _callee2);
|
|
|
|
|
}, _callee3);
|
|
|
|
|
})),
|
|
|
|
|
onCancel: function onCancel() {
|
|
|
|
|
setOpenRuleModal(false);
|
|
|
|
|
@ -1005,12 +1032,12 @@ var Navigation = function Navigation(_ref) {
|
|
|
|
|
})]
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
/* 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;
|
|
|
|
|
/* harmony default export */ var AddProcure = ((0,_umi_production_exports.connect)(function (_ref5) {
|
|
|
|
|
var loading = _ref5.loading,
|
|
|
|
|
user = _ref5.user,
|
|
|
|
|
engineeringNavigtion = _ref5.engineeringNavigtion,
|
|
|
|
|
dispatch = _ref5.dispatch,
|
|
|
|
|
account = _ref5.account;
|
|
|
|
|
return objectSpread2_default()(objectSpread2_default()({
|
|
|
|
|
loading: loading,
|
|
|
|
|
user: user
|