Auto Submit

dev_local_v9_test2
autosubmit 2 years ago
parent aa8f505591
commit 803341cd15

File diff suppressed because one or more lines are too long

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

@ -249,8 +249,6 @@ var Navigation = function Navigation(_ref) {
render: function render(text, record, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
defaultValue: text,
type: "number",
min: 1,
onChange: function onChange(e) {
formTableData[index].apply_total = e.target.value;
setFormTableData(toConsumableArray_default()(formTableData));
@ -622,34 +620,35 @@ var Navigation = function Navigation(_ref) {
}), /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
className: AddProcuremodules.submit_button,
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var i, _myForm$getFieldValue, _myForm$getFieldValue2;
var regex, i, _myForm$getFieldValue, _myForm$getFieldValue2;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
regex = /^(?!0+(\.0*)?$)\d+(\.\d)?$/;
_context.t0 = regeneratorRuntime_default()().keys(formTableData);
case 1:
case 2:
if ((_context.t1 = _context.t0()).done) {
_context.next = 8;
_context.next = 9;
break;
}
i = _context.t1.value;
if (!(formTableData[i].apply_total <= 0)) {
_context.next = 6;
if (regex.test(formTableData[i].apply_total)) {
_context.next = 7;
break;
}
message/* default */.ZP.error('请检查需申请数量必须大于0');
message/* default */.ZP.error("请检查需申请数量必须大于0且最多只能一位小数");
return _context.abrupt("return", false);
case 6:
_context.next = 1;
case 7:
_context.next = 2;
break;
case 8:
case 9:
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 = 11;
_context.next = 12;
return myForm.validateFields();
case 11:
case 12:
if ((params === null || params === void 0 ? void 0 : params.receiveId) != 'null') {
//编辑
(0,materials/* purchases_update */.aQ)({
@ -681,7 +680,7 @@ var Navigation = function Navigation(_ref) {
}
});
}
case 12:
case 13:
case "end":
return _context.stop();
}

@ -259,8 +259,6 @@ var Navigation = function Navigation(_ref) {
render: function render(text, record, index) {
return /*#__PURE__*/(0,jsx_runtime.jsx)(input/* default */.Z, {
defaultValue: text,
type: "number",
min: 1,
onChange: function onChange(e) {
formTableData[index].apply_total = e.target.value;
setFormTableData(toConsumableArray_default()(formTableData));
@ -756,34 +754,35 @@ var Navigation = function Navigation(_ref) {
className: AddReceivemodules.submit_button,
onClick: /*#__PURE__*/asyncToGenerator_default()( /*#__PURE__*/regeneratorRuntime_default()().mark(function _callee() {
var _myForm$getFieldValue, _myForm$getFieldValue2, _myForm$getFieldValue3;
var i;
var regex, i;
return regeneratorRuntime_default()().wrap(function _callee$(_context) {
while (1) switch (_context.prev = _context.next) {
case 0:
regex = /^(?!0+(\.0*)?$)\d+(\.\d)?$/;
_context.t0 = regeneratorRuntime_default()().keys(formTableData);
case 1:
case 2:
if ((_context.t1 = _context.t0()).done) {
_context.next = 8;
_context.next = 9;
break;
}
i = _context.t1.value;
if (!(formTableData[i].apply_total <= 0)) {
_context.next = 6;
if (regex.test(formTableData[i].apply_total)) {
_context.next = 7;
break;
}
message/* default */.ZP.error('请检查需申请数量必须大于0');
message/* default */.ZP.error("请检查需申请数量必须大于0且最多只能一位小数");
return _context.abrupt("return", false);
case 6:
_context.next = 1;
case 7:
_context.next = 2;
break;
case 8:
case 9:
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 = 11;
_context.next = 12;
return myForm.validateFields();
case 11:
case 12:
console.log(objectSpread2_default()(objectSpread2_default()({}, myForm.getFieldsValue()), {}, {
start_time: dayjs_min_default()((_myForm$getFieldValue = myForm.getFieldValue('start_time')) === null || _myForm$getFieldValue === void 0 ? void 0 : _myForm$getFieldValue.$d).format('YYYY-MM-DD HH:ss'),
end_time: dayjs_min_default()((_myForm$getFieldValue2 = myForm.getFieldValue('end_time')) === null || _myForm$getFieldValue2 === void 0 ? void 0 : _myForm$getFieldValue2.$d).format('YYYY-MM-DD HH:ss'),
@ -832,7 +831,7 @@ var Navigation = function Navigation(_ref) {
// }
// })
// }
case 13:
case 14:
case "end":
return _context.stop();
}

@ -704,69 +704,112 @@ var Navigation = function Navigation(_ref) {
className: Infomodules.header_content,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u7269\u8D44\u7F16\u7801"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '200px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.number
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.number,
placement: "topLeft",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '200px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.number
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u578B\u53F7\u89C4\u683C"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '200px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.model
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.model,
placement: "topLeft",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '200px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.model
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Infomodules.header_content,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u751F\u4EA7\u5382\u5BB6"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '200px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.facturer
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.facturer,
placement: "topLeft",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '200px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.facturer
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u6240\u5728\u5B9E\u9A8C\u5BA4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '200px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.classroom_titile
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.classroom_titile,
placement: "topLeft",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '200px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.classroom_titile
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Infomodules.header_content,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u6240\u5728\u5B9E\u9A8C\u5BA4\u623F\u95F4"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '200px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.classroom_room_title
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.classroom_room_title,
placement: "topLeft",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '200px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.classroom_room_title
})
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u603B\u6570\u91CF"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '200px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.total
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.total,
placement: "topLeft",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#000',
width: '200px'
},
children: [itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.total, " ", unitType[itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.unit]]
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Infomodules.header_content,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u53EF\u7533\u8BF7\u6570\u91CF"
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.apply_total,
placement: "topLeft",
children: /*#__PURE__*/(0,jsx_runtime.jsxs)("span", {
style: {
color: '#000',
width: '200px'
},
children: [itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.apply_total, " ", unitType[itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.unit]]
})
})]
}), /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
className: Infomodules.header_content,
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("span", {
children: "\u5907\u6CE8\u8BF4\u660E"
}), /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '600px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.classroom_category_title
}), /*#__PURE__*/(0,jsx_runtime.jsx)(tooltip/* default */.Z, {
title: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.description,
placement: "topLeft",
children: /*#__PURE__*/(0,jsx_runtime.jsx)("span", {
style: {
color: '#000',
width: '600px'
},
children: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.description
})
})]
}), itemAsssInfo === null || itemAsssInfo === void 0 || (_itemAsssInfo$attachm = itemAsssInfo.attachments) === null || _itemAsssInfo$attachm === void 0 ? void 0 : _itemAsssInfo$attachm.map(function (item, index) {
return /*#__PURE__*/(0,jsx_runtime.jsxs)("div", {
@ -804,7 +847,7 @@ var Navigation = function Navigation(_ref) {
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)
content: env/* default */.Z.API_SERVER + (item === null || item === void 0 ? void 0 : item.url)
});
},
children: [/*#__PURE__*/(0,jsx_runtime.jsx)("i", {
@ -893,9 +936,9 @@ var Navigation = function Navigation(_ref) {
setOpenBox(true);
setCodeNumber('');
myForm.setFieldsValue({
unit: '',
unit: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.unit,
number: '',
num: ''
num: itemAsssInfo === null || itemAsssInfo === void 0 ? void 0 : itemAsssInfo.capacity
});
},
children: "\u6DFB\u52A0"
@ -1109,6 +1152,7 @@ var Navigation = function Navigation(_ref) {
width: 210,
marginLeft: '10px'
},
disabled: true,
defaultValue: unit,
value: unit,
onChange: function onChange(e) {

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