easy3wui 1.5.55-beta13 → 1.5.55-beta15
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.
|
@@ -1,272 +1,177 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
_this.props.form.validateFieldsAndScroll(function (err, values) {
|
|
180
|
-
if (!err) {
|
|
181
|
-
var batchField = values.batchField_easy3wView,
|
|
182
|
-
valuesNew = (0, _objectWithoutProperties3['default'])(values, ['batchField_easy3wView']);
|
|
183
|
-
// delete values.batchField_easy3wView;
|
|
184
|
-
|
|
185
|
-
if (confirmCallback && typeof confirmCallback === 'function') {
|
|
186
|
-
var columns = objOtherParameters.columns;
|
|
187
|
-
|
|
188
|
-
var objColumn = columns[batchField];
|
|
189
|
-
confirmCallback(valuesNew, objColumn);
|
|
190
|
-
}
|
|
191
|
-
_this.touchCancel();
|
|
192
|
-
}
|
|
193
|
-
});
|
|
194
|
-
};
|
|
195
|
-
|
|
196
|
-
_this.touchCancel = function () {
|
|
197
|
-
var hideModal = _this.props.hideModal;
|
|
198
|
-
|
|
199
|
-
if (hideModal && typeof hideModal === 'function') {
|
|
200
|
-
hideModal();
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
var bidPureComponent = _this.props.bidPureComponent;
|
|
205
|
-
|
|
206
|
-
if (bidPureComponent && typeof bidPureComponent === 'function') {
|
|
207
|
-
bidPureComponent(_this);
|
|
208
|
-
}
|
|
209
|
-
_this.getOptionLst();
|
|
210
|
-
_this.state = {};
|
|
211
|
-
return _this;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
Easy3wEditBigTableForm.prototype.componentDidMount = function componentDidMount() {};
|
|
215
|
-
|
|
216
|
-
Easy3wEditBigTableForm.prototype.componentWillUnmount = function componentWillUnmount() {};
|
|
217
|
-
// 绑定组件
|
|
218
|
-
|
|
219
|
-
// 创建columns
|
|
220
|
-
|
|
221
|
-
// 获取批量录入字段
|
|
222
|
-
|
|
223
|
-
// 字段值变化回调
|
|
224
|
-
|
|
225
|
-
// 保存
|
|
226
|
-
|
|
227
|
-
// 取消
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
Easy3wEditBigTableForm.prototype.render = function render() {
|
|
231
|
-
var _props = this.props,
|
|
232
|
-
objOtherParameters = _props.objOtherParameters,
|
|
233
|
-
visible = _props.visible,
|
|
234
|
-
form = _props.form;
|
|
235
|
-
var batchButtonText = objOtherParameters.batchButtonText;
|
|
236
|
-
|
|
237
|
-
var footBtnArr = [{ func: this.touchConfirm, cName: '保存' }, { func: this.touchCancel, cName: '取消' }];
|
|
238
|
-
|
|
239
|
-
var _getBatchField = this.getBatchField(),
|
|
240
|
-
fieldRowItems = _getBatchField.fieldRowItems,
|
|
241
|
-
hiddenItems = _getBatchField.hiddenItems;
|
|
242
|
-
|
|
243
|
-
var rowItems = [{
|
|
244
|
-
cols: [{
|
|
245
|
-
label: '录入内容',
|
|
246
|
-
fieldId: 'batchField_easy3wView',
|
|
247
|
-
fieldType: 'select',
|
|
248
|
-
required: true,
|
|
249
|
-
value: '',
|
|
250
|
-
cmptPros: {
|
|
251
|
-
optionLst: this.arrColumns
|
|
252
|
-
}
|
|
253
|
-
}]
|
|
254
|
-
}].concat(fieldRowItems);
|
|
255
|
-
return _react2['default'].createElement(
|
|
256
|
-
_easy3wui.Easy3wModal,
|
|
257
|
-
{
|
|
258
|
-
title: batchButtonText || '批量录入',
|
|
259
|
-
visible: visible,
|
|
260
|
-
onCancel: this.touchCancel,
|
|
261
|
-
footBtnArr: footBtnArr,
|
|
262
|
-
width: '80%'
|
|
263
|
-
},
|
|
264
|
-
_react2['default'].createElement(_easy3wui.Easy3wFormPage, { rowItems: rowItems, hiddenItems: hiddenItems, form: form, mixColFlag: true })
|
|
265
|
-
);
|
|
266
|
-
};
|
|
267
|
-
|
|
268
|
-
return Easy3wEditBigTableForm;
|
|
269
|
-
}(_react.PureComponent);
|
|
270
|
-
|
|
271
|
-
exports['default'] = _form2['default'].create()(Easy3wEditBigTableForm);
|
|
272
|
-
module.exports = exports['default'];
|
|
1
|
+
// import React, { PureComponent } from 'react';
|
|
2
|
+
// import { Form } from 'antd';
|
|
3
|
+
// import { Easy3wModal, Easy3wFormPage } from 'easy3wui';
|
|
4
|
+
|
|
5
|
+
// class Easy3wEditBigTableForm extends PureComponent {
|
|
6
|
+
// constructor(props) {
|
|
7
|
+
// super(props);
|
|
8
|
+
// const { bidPureComponent } = this.props;
|
|
9
|
+
// if (bidPureComponent && typeof bidPureComponent === 'function') {
|
|
10
|
+
// bidPureComponent(this);
|
|
11
|
+
// }
|
|
12
|
+
// this.getOptionLst();
|
|
13
|
+
// this.state = {
|
|
14
|
+
// };
|
|
15
|
+
// }
|
|
16
|
+
// componentDidMount() {
|
|
17
|
+
// }
|
|
18
|
+
// componentWillUnmount() {
|
|
19
|
+
// }
|
|
20
|
+
// // 绑定组件
|
|
21
|
+
// bidPureComponent = (pureComponentName, that) => {
|
|
22
|
+
// this[pureComponentName] = that;
|
|
23
|
+
// }
|
|
24
|
+
// // 创建columns
|
|
25
|
+
// getOptionLst = () => {
|
|
26
|
+
// const { objOtherParameters } = this.props;
|
|
27
|
+
// const { columns } = objOtherParameters;
|
|
28
|
+
// const arrColumns = [];
|
|
29
|
+
// const columnsNew = [...columns];
|
|
30
|
+
// columnsNew.map((item, index) => {
|
|
31
|
+
// const { strName, name, editable, editor, otherEditable } = item;
|
|
32
|
+
// if (editable || editor || otherEditable) { // 编辑
|
|
33
|
+
// arrColumns.push({
|
|
34
|
+
// label: strName || name,
|
|
35
|
+
// value: index,
|
|
36
|
+
// });
|
|
37
|
+
// }
|
|
38
|
+
// return item;
|
|
39
|
+
// });
|
|
40
|
+
// this.arrColumns = arrColumns;
|
|
41
|
+
// }
|
|
42
|
+
// // 获取批量录入字段
|
|
43
|
+
// getBatchField = () => {
|
|
44
|
+
// const { form, objOtherParameters } = this.props;
|
|
45
|
+
// const { columns } = objOtherParameters;
|
|
46
|
+
// const batchField = form.getFieldValue('batchField_easy3wView');
|
|
47
|
+
// const fieldRowItems = [];
|
|
48
|
+
// let hiddenItems = [];
|
|
49
|
+
// if (batchField) {
|
|
50
|
+
// const objColumn = columns[batchField];
|
|
51
|
+
// const { strName, name, key, fieldId, rowItem, unit, hiddeKeys, required = true, fieldType, optionLst = [], options = [], rules = [], ruleType, regex, regexMsg } = objColumn;
|
|
52
|
+
// // strNName 字段名称
|
|
53
|
+
// // name 字段名称
|
|
54
|
+
// // key 字段key
|
|
55
|
+
// // rowItem 字段行
|
|
56
|
+
// // unit 字段单位
|
|
57
|
+
// // hiddeKeys 隐藏字段key
|
|
58
|
+
// // required 是否必填
|
|
59
|
+
// // fieldType 字段类型
|
|
60
|
+
// // optionLst 选项列表
|
|
61
|
+
// // rules 校验规则
|
|
62
|
+
// // ruleType 校验规则类型
|
|
63
|
+
// // onChange 字段值变化回调
|
|
64
|
+
// const arrHiddenItems = [];
|
|
65
|
+
// if (hiddeKeys) {
|
|
66
|
+
// const arrHiddenKeys = hiddeKeys.split(',');
|
|
67
|
+
// arrHiddenKeys.map((item) => {
|
|
68
|
+
// arrHiddenItems.push({
|
|
69
|
+
// fieldId: item,
|
|
70
|
+
// });
|
|
71
|
+
// return item;
|
|
72
|
+
// });
|
|
73
|
+
// hiddenItems = [...arrHiddenItems];
|
|
74
|
+
// }
|
|
75
|
+
// const arrRules = [...rules];
|
|
76
|
+
// if (ruleType === 'phone') {
|
|
77
|
+
// arrRules.push({ pattern: /^1\d{10}$/, message: '手机格式错误!' });
|
|
78
|
+
// } else if (ruleType === 'email') {
|
|
79
|
+
// arrRules.push({ type: 'email', message: '邮箱地址格式错误!' });
|
|
80
|
+
// } else if (ruleType === 'idcard') {
|
|
81
|
+
// arrRules.push({ pattern: /(^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$)|(^[1-9]\d{5}\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{2}[0-9Xx]$)/, message: '身份证格式错误!' });
|
|
82
|
+
// } else if (regex) {
|
|
83
|
+
// arrRules.push({ pattern: new RegExp(regex), message: regexMsg || '数据格式错误!' });
|
|
84
|
+
// }
|
|
85
|
+
// const fieldRowItem = {
|
|
86
|
+
// cols: [
|
|
87
|
+
// rowItem || {
|
|
88
|
+
// label: strName || name,
|
|
89
|
+
// fieldId: fieldId || key,
|
|
90
|
+
// fieldType: fieldType || 'input',
|
|
91
|
+
// value: '',
|
|
92
|
+
// required,
|
|
93
|
+
// cmptPros: {
|
|
94
|
+
// optionLst,
|
|
95
|
+
// options,
|
|
96
|
+
// addonAfter: unit || '',
|
|
97
|
+
// rules: arrRules,
|
|
98
|
+
// onChange: (...arg) => this.onChange(arg, objColumn),
|
|
99
|
+
// },
|
|
100
|
+
// },
|
|
101
|
+
// ],
|
|
102
|
+
// };
|
|
103
|
+
// fieldRowItems.push(fieldRowItem);
|
|
104
|
+
// }
|
|
105
|
+
// return { fieldRowItems, hiddenItems };
|
|
106
|
+
// }
|
|
107
|
+
// // 字段值变化回调
|
|
108
|
+
// onChange = (arg, objColumn) => {
|
|
109
|
+
// const { form } = this.props;
|
|
110
|
+
// const { onChange } = objColumn;
|
|
111
|
+
// if (onChange && typeof onChange === 'function') {
|
|
112
|
+
// onChange(form, arg, objColumn);
|
|
113
|
+
// }
|
|
114
|
+
// }
|
|
115
|
+
// // 保存
|
|
116
|
+
// touchConfirm = () => {
|
|
117
|
+
// const { confirmCallback, objOtherParameters } = this.props;
|
|
118
|
+
// this.props.form.validateFieldsAndScroll((err, values) => {
|
|
119
|
+
// if (!err) {
|
|
120
|
+
// const { batchField_easy3wView: batchField, ...valuesNew } = values;
|
|
121
|
+
// // delete values.batchField_easy3wView;
|
|
122
|
+
// if (confirmCallback && typeof confirmCallback === 'function') {
|
|
123
|
+
// const { columns } = objOtherParameters;
|
|
124
|
+
// const objColumn = columns[batchField];
|
|
125
|
+
// confirmCallback(valuesNew, objColumn);
|
|
126
|
+
// }
|
|
127
|
+
// this.touchCancel();
|
|
128
|
+
// }
|
|
129
|
+
// });
|
|
130
|
+
// }
|
|
131
|
+
// // 取消
|
|
132
|
+
// touchCancel = () => {
|
|
133
|
+
// const { hideModal } = this.props;
|
|
134
|
+
// if (hideModal && typeof hideModal === 'function') {
|
|
135
|
+
// hideModal();
|
|
136
|
+
// }
|
|
137
|
+
// }
|
|
138
|
+
// render() {
|
|
139
|
+
// const { objOtherParameters, visible, form } = this.props;
|
|
140
|
+
// const { batchButtonText } = objOtherParameters;
|
|
141
|
+
// const footBtnArr = [
|
|
142
|
+
// { func: this.touchConfirm, cName: '保存' },
|
|
143
|
+
// { func: this.touchCancel, cName: '取消' },
|
|
144
|
+
// ];
|
|
145
|
+
// const { fieldRowItems, hiddenItems } = this.getBatchField();
|
|
146
|
+
// const rowItems = [
|
|
147
|
+
// {
|
|
148
|
+
// cols: [
|
|
149
|
+
// {
|
|
150
|
+
// label: '录入内容',
|
|
151
|
+
// fieldId: 'batchField_easy3wView',
|
|
152
|
+
// fieldType: 'select',
|
|
153
|
+
// required: true,
|
|
154
|
+
// value: '',
|
|
155
|
+
// cmptPros: {
|
|
156
|
+
// optionLst: this.arrColumns,
|
|
157
|
+
// },
|
|
158
|
+
// },
|
|
159
|
+
// ],
|
|
160
|
+
// },
|
|
161
|
+
// ...fieldRowItems,
|
|
162
|
+
// ];
|
|
163
|
+
// return (
|
|
164
|
+
// <Easy3wModal
|
|
165
|
+
// title={batchButtonText || '批量录入'}
|
|
166
|
+
// visible={visible}
|
|
167
|
+
// onCancel={this.touchCancel}
|
|
168
|
+
// footBtnArr={footBtnArr}
|
|
169
|
+
// width="80%"
|
|
170
|
+
// >
|
|
171
|
+
// <Easy3wFormPage rowItems={rowItems} hiddenItems={hiddenItems} form={form} mixColFlag />
|
|
172
|
+
// </Easy3wModal>
|
|
173
|
+
// );
|
|
174
|
+
// }
|
|
175
|
+
// }
|
|
176
|
+
// export default Form.create()(Easy3wEditBigTableForm);
|
|
177
|
+
"use strict";
|
|
@@ -44,13 +44,12 @@ var _numeral = require('numeral');
|
|
|
44
44
|
|
|
45
45
|
var _numeral2 = _interopRequireDefault(_numeral);
|
|
46
46
|
|
|
47
|
-
var _Easy3wEditBigTableForm = require('./Easy3wEditBigTableForm');
|
|
48
|
-
|
|
49
|
-
var _Easy3wEditBigTableForm2 = _interopRequireDefault(_Easy3wEditBigTableForm);
|
|
50
|
-
|
|
51
47
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }
|
|
52
48
|
|
|
53
|
-
|
|
49
|
+
// import Easy3wEditBigTableForm from './Easy3wEditBigTableForm';
|
|
50
|
+
|
|
51
|
+
/* eslint-disable no-alert */
|
|
52
|
+
var Selectors = _reactDataGridAddons.Data.Selectors;
|
|
54
53
|
|
|
55
54
|
var Easy3wEditBigTable = function (_Component) {
|
|
56
55
|
(0, _inherits3['default'])(Easy3wEditBigTable, _Component);
|
|
@@ -879,18 +878,7 @@ var Easy3wEditBigTable = function (_Component) {
|
|
|
879
878
|
)
|
|
880
879
|
);
|
|
881
880
|
})
|
|
882
|
-
) : ''
|
|
883
|
-
visible ? _react2['default'].createElement(_Easy3wEditBigTableForm2['default'] // 批量录入Modal
|
|
884
|
-
, { visible: visible // 是否显示
|
|
885
|
-
, objOtherParameters: (0, _extends3['default'])({}, objToolbarProps, { // 工具栏属性
|
|
886
|
-
columns: columns // 表头
|
|
887
|
-
}) // 其他参数
|
|
888
|
-
, bidPureComponent: function bidPureComponent(that) {
|
|
889
|
-
return _this2.bidPureComponent('Easy3wEditBigTableForm', that);
|
|
890
|
-
} // 绑定组件
|
|
891
|
-
, confirmCallback: this.confirmCallbackBatchEditBigTable,
|
|
892
|
-
hideModal: this.hideModalBatchEditBigTable
|
|
893
|
-
}) : ''
|
|
881
|
+
) : ''
|
|
894
882
|
);
|
|
895
883
|
};
|
|
896
884
|
|