dlt-for-react 1.0.23 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -2
- package/lib/components/Button/index.js +79 -0
- package/lib/components/HqSelector/HqLsrySelector/index.js +3 -5
- package/lib/components/HqSelector/HqRySelector/index.js +3 -5
- package/lib/components/HqSelector/HqWzSelector/index.js +3 -5
- package/lib/components/KyEditableTable/component.js +3 -5
- package/lib/components/KyEditableTable/index.js +7 -13
- package/lib/components/KyExcel/index.js +3 -5
- package/lib/components/KyInputPicker/render.js +13 -43
- package/lib/components/KyInputPicker/setting-checkbox.js +3 -5
- package/lib/components/KyInputPicker/setting-multiSelect.js +3 -5
- package/lib/components/KyInputPicker/setting-nhcascader.js +3 -5
- package/lib/components/KyInputPicker/setting-select.js +3 -5
- package/lib/components/KyInputPicker/setting-stu-selector.js +3 -5
- package/lib/components/KyInputPicker/setting-tea-selector.js +3 -5
- package/lib/components/KyTable/checkButtons.js +4 -7
- package/lib/components/KyTree/index.js +6 -16
- package/lib/components/KyUpload/index.js +13 -21
- package/lib/components/NHAuditPanel/config/Axios.js +263 -0
- package/lib/components/NHAuditPanel/config/api.js +479 -0
- package/lib/components/NHAuditPanel/config/data.js +156 -0
- package/lib/components/NHAuditPanel/config/typeMap.js +1234 -0
- package/lib/components/NHAuditPanel/config/uiValidate.js +92 -0
- package/lib/components/NHAuditPanel/index.js +413 -0
- package/lib/components/NHAuditPanel/node.js +619 -0
- package/lib/components/NHCascader/index.js +355 -0
- package/lib/components/NHCheckboxGroup/index.js +135 -0
- package/lib/components/NHDynamicFormShow/baseInfo/index.js +194 -0
- package/lib/components/NHDynamicFormShow/custom/index.js +553 -0
- package/lib/components/NHDynamicFormShow/customModule/common/CommonMethod.js +43 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/EditForm.js +1113 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/qgzx/index.js +263 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/EditForm.js +880 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/xfjm/index.js +171 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/EditForm.js +865 -0
- package/lib/components/NHDynamicFormShow/customModule/czxy/zxj/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/EditForm.js +571 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zsxxhd/index.js +147 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/EditForm.js +474 -0
- package/lib/components/NHDynamicFormShow/customModule/eszy/zybjtz/index.js +139 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/EditForm.js +506 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/cqzg/index.js +143 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/EditForm.js +1074 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/gwsb/index.js +172 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/EditForm.js +927 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/qjgl/index.js +195 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/EditForm.js +1064 -0
- package/lib/components/NHDynamicFormShow/customModule/gnyxy/sxsqj/index.js +183 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/EditForm.js +763 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/jxj/index.js +137 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/EditForm.js +819 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/lzjxj/index.js +137 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/EditForm.js +700 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/qgzx/index.js +162 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/EditForm.js +743 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/xsqj/index.js +177 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/EditForm.js +848 -0
- package/lib/components/NHDynamicFormShow/customModule/hblgxy/zxj/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/EditForm.js +777 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/qjgl/index.js +161 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/EditForm.js +706 -0
- package/lib/components/NHDynamicFormShow/customModule/hljwgy/xjgl/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/cfjcEditForm.js +413 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/cfjcsq/index.js +135 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/EditForm.js +1013 -0
- package/lib/components/NHDynamicFormShow/customModule/jhysxy/xsqj/index.js +175 -0
- package/lib/components/NHDynamicFormShow/customModule/jjrlx/EditForm.js +1345 -0
- package/lib/components/NHDynamicFormShow/customModule/jjrlx/index.js +274 -0
- package/lib/components/NHDynamicFormShow/customModule/jxj/EditForm.js +669 -0
- package/lib/components/NHDynamicFormShow/customModule/jxj/index.js +134 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/EditForm.js +378 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/fqkns/index.js +120 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/EditForm.js +638 -0
- package/lib/components/NHDynamicFormShow/customModule/jxsl/xwryfjjd/index.js +133 -0
- package/lib/components/NHDynamicFormShow/customModule/qgzx/EditForm.js +965 -0
- package/lib/components/NHDynamicFormShow/customModule/qgzx/index.js +237 -0
- package/lib/components/NHDynamicFormShow/customModule/qjgl/EditForm.js +823 -0
- package/lib/components/NHDynamicFormShow/customModule/qjgl/index.js +188 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/EditForm.js +401 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/jqlssq/index.js +472 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/EditForm.js +304 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHCascader/index.js +375 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/RadioGroup.js +118 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/index.js +62 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/input-const.js +55 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/NHInputPicker/render.js +1238 -0
- package/lib/components/NHDynamicFormShow/customModule/rcgl/tssq/index.js +375 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/collective/EditForm.js +554 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/collective/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/personal/EditForm.js +542 -0
- package/lib/components/NHDynamicFormShow/customModule/rych/personal/index.js +133 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/EditForm.js +575 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/collective/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/EditForm.js +563 -0
- package/lib/components/NHDynamicFormShow/customModule/sxgy/rych/personal/index.js +133 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/EditForm.js +745 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/qjgl/index.js +164 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/EditForm.js +587 -0
- package/lib/components/NHDynamicFormShow/customModule/whcz/rccrxy/index.js +143 -0
- package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/EditForm.js +743 -0
- package/lib/components/NHDynamicFormShow/customModule/whdlqjgl/index.js +172 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/EditForm.js +1410 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jjrlx/index.js +274 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/EditForm.js +755 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/jxj/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/EditForm.js +814 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/qjgl/index.js +188 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/EditForm.js +769 -0
- package/lib/components/NHDynamicFormShow/customModule/whgc/zxj/index.js +130 -0
- package/lib/components/NHDynamicFormShow/customModule/whgcrych/EditForm.js +1004 -0
- package/lib/components/NHDynamicFormShow/customModule/whgcrych/index.js +126 -0
- package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/EditForm.js +503 -0
- package/lib/components/NHDynamicFormShow/customModule/whtl/jsrzsq/index.js +149 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlyhk/EditForm.js +379 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlyhk/index.js +148 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzxj/EditForm.js +748 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzxj/index.js +135 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/EditForm.js +762 -0
- package/lib/components/NHDynamicFormShow/customModule/whtlzy/jxj/index.js +134 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/cfjcEditForm.js +682 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/cfjc/index.js +135 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/index.js +152 -0
- package/lib/components/NHDynamicFormShow/customModule/wjcf/wjsb/wjsbEditForm.js +783 -0
- package/lib/components/NHDynamicFormShow/customModule/zxj/EditForm.js +764 -0
- package/lib/components/NHDynamicFormShow/customModule/zxj/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/cfjcEditForm.js +677 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/cfjcsq/index.js +138 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/EditForm.js +1173 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/qjgl/index.js +242 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistForm.js +862 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/rcgl/rcxwgrdj/IndividualRegistIndex.js +201 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/stuinfo/messageInfo.js +196 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/index.js +167 -0
- package/lib/components/NHDynamicFormShow/customModule/zzsd/wjsb/wjsbEditForm.js +1096 -0
- package/lib/components/NHDynamicFormShow/index.js +647 -0
- package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/cardItem/index.js +279 -0
- package/lib/components/NHDynamicFormShow/oneOnMany/cardForm/index.js +206 -0
- package/lib/components/NHDynamicFormShow/oneOnMany/index.js +419 -0
- package/lib/components/NHDynamicFormShow/oneOnOne/EditForm.js +401 -0
- package/lib/components/NHDynamicFormShow/oneOnOne/index.js +271 -0
- package/lib/components/NHImagePicker/index.js +554 -0
- package/lib/components/NHInputPicker/RadioGroup.js +118 -0
- package/lib/components/NHInputPicker/index.js +62 -0
- package/lib/components/NHInputPicker/input-const.js +55 -0
- package/lib/components/NHInputPicker/render.js +1271 -0
- package/lib/components/NHListView/index.js +374 -0
- package/lib/components/NHMapGeolocation/index.js +537 -0
- package/lib/components/NHMapGeolocation/initMap/initGdMap.js +104 -0
- package/lib/components/NHMapGeolocation/initMap/initTencentMap.js +138 -0
- package/lib/components/NHMapGeolocation/style.js +51 -0
- package/lib/components/NHMultiSelect/index.js +272 -0
- package/lib/components/NHRadioGroup/index.js +118 -0
- package/lib/components/NHSelect/index.js +364 -0
- package/lib/components/NHTreeMenu/index.js +126 -0
- package/lib/components/NHTreeMenu/treeNode.js +164 -0
- package/lib/components/StuSelector/index.js +611 -0
- package/lib/index.js +161 -116
- package/lib/layouts/KyInputPicker/edit-page.js +585 -0
- package/lib/layouts/KyInputPicker/index.js +220 -0
- package/lib/layouts/KyInputPicker/input-const.js +134 -0
- package/lib/layouts/KyInputPicker/render.js +2477 -0
- package/lib/layouts/KyInputPicker/setting-checkbox.js +850 -0
- package/lib/layouts/KyInputPicker/setting-datepicker.js +430 -0
- package/lib/layouts/KyInputPicker/setting-datetimepicker.js +443 -0
- package/lib/layouts/KyInputPicker/setting-input.js +555 -0
- package/lib/layouts/KyInputPicker/setting-inputNumber.js +612 -0
- package/lib/layouts/KyInputPicker/setting-monthpicker.js +434 -0
- package/lib/layouts/KyInputPicker/setting-multiSelect.js +532 -0
- package/lib/layouts/KyInputPicker/setting-nhcascader.js +584 -0
- package/lib/layouts/KyInputPicker/setting-old-upload.js +428 -0
- package/lib/layouts/KyInputPicker/setting-radio.js +468 -0
- package/lib/layouts/KyInputPicker/setting-rangepicker.js +466 -0
- package/lib/layouts/KyInputPicker/setting-select.js +534 -0
- package/lib/layouts/KyInputPicker/setting-stu-selector.js +507 -0
- package/lib/layouts/KyInputPicker/setting-switch.js +274 -0
- package/lib/layouts/KyInputPicker/setting-tea-selector.js +507 -0
- package/lib/layouts/KyInputPicker/setting-textarea.js +619 -0
- package/lib/layouts/KyInputPicker/setting-timepicker.js +437 -0
- package/lib/layouts/KyInputPicker/setting-upload.js +766 -0
- package/lib/layouts/KyModal/buildTitle.js +81 -0
- package/lib/layouts/KyModal/dragM.js +127 -0
- package/lib/layouts/KyModal/index.js +321 -0
- package/lib/layouts/KyPreview/index.js +219 -0
- package/lib/layouts/KyUpload/index.js +1155 -0
- package/lib/layouts/LeftMenu/index.js +5 -11
- package/lib/layouts/NavigationBar/index.js +4 -10
- package/lib/layouts/Top/editPassWord.js +5 -7
- package/lib/layouts/Top/index.js +6 -20
- package/lib/layouts/TopMenu/index.js +11 -14
- package/lib/layouts/layout/index.js +7 -13
- package/lib/layouts/{Login → login}/index-pre.js +3 -5
- package/lib/layouts/{Login → login}/index.js +6 -8
- package/lib/layouts/{Login → login}/login.js +8 -17
- package/lib/layouts/mixTop/index.js +13 -28
- package/lib/layouts/settingDrawer/index.js +3 -5
- package/lib/routes/AuthorizedRoute.js +7 -13
- package/lib/utils/NHCore.js +46 -2
- package/lib/utils/base64.js +238 -0
- package/lib/utils/browserJudge.js +33 -0
- package/lib/utils/common.js +18 -20
- package/lib/utils/createUuid.js +11 -31
- package/lib/utils/device.js +44 -0
- package/lib/utils/dynamicLoadCss.js +14 -0
- package/lib/utils/dynamicLoadJs.js +21 -0
- package/lib/utils/getLoginUser.js +1 -1
- package/lib/utils/getSize.js +2 -11
- package/lib/utils/getStyle.js +26 -0
- package/lib/utils/getSuitHeight.js +49 -0
- package/lib/utils/hasAuth.js +11 -0
- package/lib/utils/index.js +1 -34
- package/lib/utils/loadJS.js +40 -0
- package/package.json +1 -1
- /package/lib/layouts/{Login → login}/lyPassword.js +0 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
var _toast = require('antd-mobile/lib/toast');
|
|
8
|
+
|
|
9
|
+
var _toast2 = _interopRequireDefault(_toast);
|
|
10
|
+
|
|
11
|
+
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
|
|
12
|
+
|
|
13
|
+
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
|
14
|
+
|
|
15
|
+
require('antd-mobile/lib/toast/style/css');
|
|
16
|
+
|
|
17
|
+
var _react = require('react');
|
|
18
|
+
|
|
19
|
+
var _react2 = _interopRequireDefault(_react);
|
|
20
|
+
|
|
21
|
+
var _NHFetch = require('../../../../../utils/NHFetch');
|
|
22
|
+
|
|
23
|
+
var _NHFetch2 = _interopRequireDefault(_NHFetch);
|
|
24
|
+
|
|
25
|
+
var _EditForm = require('./EditForm');
|
|
26
|
+
|
|
27
|
+
var _EditForm2 = _interopRequireDefault(_EditForm);
|
|
28
|
+
|
|
29
|
+
var _moment = require('moment');
|
|
30
|
+
|
|
31
|
+
var _moment2 = _interopRequireDefault(_moment);
|
|
32
|
+
|
|
33
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
34
|
+
|
|
35
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
36
|
+
|
|
37
|
+
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
38
|
+
|
|
39
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
|
40
|
+
|
|
41
|
+
var base_url = 'api/sm-daily-mgr';
|
|
42
|
+
|
|
43
|
+
var JjrlxIndex = function (_Component) {
|
|
44
|
+
_inherits(JjrlxIndex, _Component);
|
|
45
|
+
|
|
46
|
+
function JjrlxIndex(props) {
|
|
47
|
+
_classCallCheck(this, JjrlxIndex);
|
|
48
|
+
|
|
49
|
+
var _this = _possibleConstructorReturn(this, (JjrlxIndex.__proto__ || Object.getPrototypeOf(JjrlxIndex)).call(this, props));
|
|
50
|
+
|
|
51
|
+
_this.validate = function (func) {
|
|
52
|
+
_this.nhEditForm.validateFields(function (err, formData) {
|
|
53
|
+
var _formData$djxxQxList = formData.djxxQxList,
|
|
54
|
+
djxxQxList = _formData$djxxQxList === undefined ? [] : _formData$djxxQxList,
|
|
55
|
+
minJjrrq = formData.minJjrrq,
|
|
56
|
+
maxJjrrq = formData.maxJjrrq;
|
|
57
|
+
|
|
58
|
+
formData.yjfxsj = formData.yjfxsj ? (0, _moment2.default)(formData.yjfxsj).format('YYYY-MM-DD') : '';
|
|
59
|
+
djxxQxList && djxxQxList.length > 0 && djxxQxList.map(function (item) {
|
|
60
|
+
item.kssj = item.kssj ? (0, _moment2.default)(item.kssj).format('YYYY-MM-DD') : '';
|
|
61
|
+
item.jssj = item.jssj ? (0, _moment2.default)(item.jssj).format('YYYY-MM-DD') : '';
|
|
62
|
+
});
|
|
63
|
+
// console.log(formData,'formData')
|
|
64
|
+
// 替换紧急联系电话的空格
|
|
65
|
+
var lxdh = formData && formData.lxdh ? formData.lxdh.replace(/\s+/g, '') : '';
|
|
66
|
+
// 手机正则
|
|
67
|
+
var regex = /^1\d{10}$/;
|
|
68
|
+
if (lxdh && !lxdh.match(regex)) {
|
|
69
|
+
_toast2.default.fail('请正确填写联系电话!');
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
if (djxxQxList.length <= 0) {
|
|
74
|
+
_toast2.default.fail('请确认是否填写节假日去向!');
|
|
75
|
+
return;
|
|
76
|
+
func(false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (!_this.validateDJXXList(djxxQxList)) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// //验证节假日日期是否每天都有填写
|
|
84
|
+
// let maxDayLength = parseInt(new Date(maxJjrrq) - new Date(minJjrrq)) / (24*60*60*1000) + 1;
|
|
85
|
+
// let DateList = [];
|
|
86
|
+
// djxxQxList.map(item=>{
|
|
87
|
+
// //获取节假日填写的全部日期
|
|
88
|
+
// if( item && item.kssj && item.jssj ) {
|
|
89
|
+
// let kssj_dates_y = item.kssj.getFullYear()+'-';
|
|
90
|
+
// let kssj_dates_m = (item.kssj.getMonth()+1 < 10)?'0'+(item.kssj.getMonth()+1)+'-':(item.kssj.getMonth()+1)+'-';
|
|
91
|
+
// let kssj_dates_d = (item.kssj.getDate() < 10)?'0'+item.kssj.getDate():item.kssj.getDate();
|
|
92
|
+
// let jssj_dates_y = item.jssj.getFullYear()+'-';
|
|
93
|
+
// let jssj_dates_m = (item.jssj.getMonth()+1 < 10)?'0'+(item.jssj.getMonth()+1)+'-':(item.jssj.getMonth()+1)+'-';
|
|
94
|
+
// let jssj_dates_d = (item.jssj.getDate() < 10)?'0'+item.jssj.getDate():item.jssj.getDate();
|
|
95
|
+
|
|
96
|
+
// let kssjDate = `${kssj_dates_y}${kssj_dates_m}${kssj_dates_d}`;
|
|
97
|
+
// let JssjDate = `${jssj_dates_y}${jssj_dates_m}${jssj_dates_d}`;
|
|
98
|
+
// let BetweenDate = this.getDayList( kssjDate, JssjDate );
|
|
99
|
+
// DateList = [ ...DateList, ...BetweenDate ];
|
|
100
|
+
// }
|
|
101
|
+
|
|
102
|
+
// })
|
|
103
|
+
// //去重
|
|
104
|
+
// let uniqueDate = this.unique(DateList);
|
|
105
|
+
// let flag = true;
|
|
106
|
+
// //判断该段日期是否重复
|
|
107
|
+
// flag = this.continueDays( uniqueDate );
|
|
108
|
+
|
|
109
|
+
if (err) {
|
|
110
|
+
func(false);
|
|
111
|
+
}
|
|
112
|
+
//else if( !flag || maxDayLength != uniqueDate.length) {
|
|
113
|
+
// // 验证节假日是否每天都有填写
|
|
114
|
+
// Toast.fail('请确认是否节假日去向是否全部填写!')
|
|
115
|
+
// return ;
|
|
116
|
+
// func(false);
|
|
117
|
+
// }
|
|
118
|
+
else {
|
|
119
|
+
_this.setState({ formData: formData }, function () {
|
|
120
|
+
func(true);
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
_this.unique = function (arr) {
|
|
127
|
+
return Array.from(new Set(arr));
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
_this.validateDJXXList = function (djxxQxList) {
|
|
131
|
+
var fieldMap = _this.props.fieldMap;
|
|
132
|
+
|
|
133
|
+
var flag = true;
|
|
134
|
+
djxxQxList.map(function (item) {
|
|
135
|
+
var kssj = item.kssj,
|
|
136
|
+
jssj = item.jssj,
|
|
137
|
+
jjrqxlx = item.jjrqxlx,
|
|
138
|
+
jjrqx = item.jjrqx,
|
|
139
|
+
jtgjdm = item.jtgjdm;
|
|
140
|
+
|
|
141
|
+
if (fieldMap.KSSJ.sfbt === '1' && !kssj) {
|
|
142
|
+
_toast2.default.fail('请检查是否填写开始时间!');
|
|
143
|
+
flag = false;
|
|
144
|
+
} else if (fieldMap.JSSJ.sfbt === '1' && !jssj) {
|
|
145
|
+
_toast2.default.fail('请检查是否填写结束时间!');
|
|
146
|
+
flag = false;
|
|
147
|
+
} else if (fieldMap.JJRQXLX.sfbt === '1' && !jjrqxlx) {
|
|
148
|
+
_toast2.default.fail('请检查是否选择节假日去向类型!');
|
|
149
|
+
flag = false;
|
|
150
|
+
} else if (fieldMap.JJRQX.sfbt === '1' && !jjrqx) {
|
|
151
|
+
_toast2.default.fail('请检查是否选择节假日去向!');
|
|
152
|
+
flag = false;
|
|
153
|
+
} else if (fieldMap.JTGJDM.sfbt === '1' && !jtgjdm && jjrqxlx !== '2') {
|
|
154
|
+
_toast2.default.fail('请检查是否选择交通工具!');
|
|
155
|
+
flag = false;
|
|
156
|
+
}
|
|
157
|
+
});
|
|
158
|
+
return flag;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
_this.getDayList = function (startDay, endDay) {
|
|
162
|
+
var DayList = [];
|
|
163
|
+
var startDay_v = startDay;
|
|
164
|
+
while (startDay_v <= endDay) {
|
|
165
|
+
DayList.push(startDay_v);
|
|
166
|
+
var next_date = new Date(startDay_v).getTime() + 24 * 60 * 60 * 1000;
|
|
167
|
+
var next_dates_y = new Date(next_date).getFullYear() + '-';
|
|
168
|
+
var next_dates_m = new Date(next_date).getMonth() + 1 < 10 ? '0' + (new Date(next_date).getMonth() + 1) + '-' : new Date(next_date).getMonth() + 1 + '-';
|
|
169
|
+
var next_dates_d = new Date(next_date).getDate() < 10 ? '0' + new Date(next_date).getDate() : new Date(next_date).getDate();
|
|
170
|
+
startDay_v = '' + next_dates_y + next_dates_m + next_dates_d;
|
|
171
|
+
}
|
|
172
|
+
// console.log(DayList,'DayList')
|
|
173
|
+
return DayList;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
_this.continueDays = function (arr_days) {
|
|
177
|
+
// 先排序,然后转时间戳
|
|
178
|
+
var days = arr_days.sort().map(function (d, i) {
|
|
179
|
+
var dt = new Date(d);
|
|
180
|
+
dt.setDate(dt.getDate() + 4 - i); // 处理为相同日期
|
|
181
|
+
|
|
182
|
+
// 抹去 时 分 秒 毫秒
|
|
183
|
+
dt.setHours(0);
|
|
184
|
+
dt.setMinutes(0);
|
|
185
|
+
dt.setSeconds(0);
|
|
186
|
+
dt.setMilliseconds(0);
|
|
187
|
+
|
|
188
|
+
return +dt;
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
var ret = true;
|
|
192
|
+
|
|
193
|
+
days.forEach(function (d) {
|
|
194
|
+
if (days[0] !== d) {
|
|
195
|
+
ret = false;
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
return ret;
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
_this.save = function (func, failCallback) {
|
|
203
|
+
var _this$props = _this.props,
|
|
204
|
+
processApplyId = _this$props.processApplyId,
|
|
205
|
+
objId = _this$props.objId,
|
|
206
|
+
pkid = _this$props.pkid;
|
|
207
|
+
// console.log('save.this.props', this.props)
|
|
208
|
+
|
|
209
|
+
var formData = _this.state.formData;
|
|
210
|
+
|
|
211
|
+
var param = formData;
|
|
212
|
+
param.pkid = pkid;
|
|
213
|
+
param.xsid = objId;
|
|
214
|
+
param.lcslid = processApplyId;
|
|
215
|
+
// NHFetch('front/zhxg-unauth/dynamic/save', 'POST', list).then(res=>{
|
|
216
|
+
// if (res && res.code === 200){
|
|
217
|
+
(0, _NHFetch2.default)(base_url + '/jjrdjxx/saveDjxx', 'POST', formData).then(function (res) {
|
|
218
|
+
if (res && res.code === 200) {
|
|
219
|
+
func();
|
|
220
|
+
} else {
|
|
221
|
+
_toast2.default.fail("保存失败");
|
|
222
|
+
}
|
|
223
|
+
});
|
|
224
|
+
// }
|
|
225
|
+
// else {
|
|
226
|
+
// Toast.fail("附件保存失败")
|
|
227
|
+
// }
|
|
228
|
+
// })
|
|
229
|
+
};
|
|
230
|
+
|
|
231
|
+
_this.state = {
|
|
232
|
+
formData: {}
|
|
233
|
+
};
|
|
234
|
+
return _this;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* 校验该分类表单是否全部填写完成,该方法必须存在
|
|
239
|
+
*/
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
//数组去重
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
/** 验证节假日离校登记列表 */
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
// 获取一段日期范围内的所有日期
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
//判断一组时间数组是否连续
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
//保存
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
_createClass(JjrlxIndex, [{
|
|
258
|
+
key: 'render',
|
|
259
|
+
value: function render() {
|
|
260
|
+
var _this2 = this;
|
|
261
|
+
|
|
262
|
+
// console.log('this.props', this.props)
|
|
263
|
+
return _react2.default.createElement(_EditForm2.default, _extends({
|
|
264
|
+
ref: function ref(form) {
|
|
265
|
+
_this2.nhEditForm = form;
|
|
266
|
+
}
|
|
267
|
+
}, this.props));
|
|
268
|
+
}
|
|
269
|
+
}]);
|
|
270
|
+
|
|
271
|
+
return JjrlxIndex;
|
|
272
|
+
}(_react.Component);
|
|
273
|
+
|
|
274
|
+
exports.default = JjrlxIndex;
|