fmui-base 2.3.35 → 2.3.37

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 CHANGED
@@ -3,6 +3,8 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.3.37:已办列表增加办理缓急标识,表单说明组件附件允许下载
7
+ - 2.3.36:单选多选可输入,输入内容过多时不换行
6
8
  - 2.3.35:upload:鸿蒙微信端上传异常点击无反应问题
7
9
  - 2.3.34:移动端支持新疆CA电子签章功能,去除截图base64png图片的操作
8
10
  - 2.3.33:移动端支持新疆CA电子签章功能,移动端选人组件增加一些再次加载的入口
package/lib/form/form.js CHANGED
@@ -695,8 +695,8 @@ var PageHome = function (_React$Component) {
695
695
  itemParam.decimalPlace = form.decimalPlace; //小数位数
696
696
  itemParam.dataAttr = form['dataAttr'];
697
697
  itemParam.maxlength = form['length'];
698
- /*if(itemParam.dataAttr){
699
- alert("265====="+itemParam.dataAttr.textLineFeed);
698
+ /*if(itemParam.dataAttr){
699
+ alert("265====="+itemParam.dataAttr.textLineFeed);
700
700
  }*/
701
701
  //宏值签名图片
702
702
  // if(itemParam.dataAttr && itemParam.dataAttr.dataSrc=='2' && !readOnly && !itemParam.bizCodeRuleId){
@@ -968,11 +968,11 @@ var PageHome = function (_React$Component) {
968
968
  if (value == item.value) {
969
969
  value = { value: value, text: item.name };
970
970
  }
971
- /*}else{
972
- var defaultValue=form.defaultValue;
973
- if(defaultValue == item.value){
974
- value = {value:value,text:item.name};
975
- }
971
+ /*}else{
972
+ var defaultValue=form.defaultValue;
973
+ if(defaultValue == item.value){
974
+ value = {value:value,text:item.name};
975
+ }
976
976
  }*/
977
977
  selectOptions.push(option);
978
978
  }
@@ -2498,21 +2498,21 @@ var PageHome = function (_React$Component) {
2498
2498
  var length = item.maxlength;
2499
2499
  var patrn = /^-?\d+(\.\d+)?$/;
2500
2500
  if (newValue !== '' && newValue != '-') {
2501
- /* var validAttr=item['validAttr'];
2502
- if(validAttr!=null && validAttr.length>0){
2503
- for(var va=0;va<validAttr.length;va++){
2504
- var regular=validAttr[va]['regular'];
2505
- var tips=validAttr[va]['tips'];
2506
- var reg=new RegExp(regular.slice(1,-1),"g");
2507
- if(!reg.test(newValue)){
2508
- Toast.show({
2509
- type: 'error',
2510
- content:item.title+':'+tips
2511
- });
2512
- return false;
2513
- }
2514
-
2515
- }
2501
+ /* var validAttr=item['validAttr'];
2502
+ if(validAttr!=null && validAttr.length>0){
2503
+ for(var va=0;va<validAttr.length;va++){
2504
+ var regular=validAttr[va]['regular'];
2505
+ var tips=validAttr[va]['tips'];
2506
+ var reg=new RegExp(regular.slice(1,-1),"g");
2507
+ if(!reg.test(newValue)){
2508
+ Toast.show({
2509
+ type: 'error',
2510
+ content:item.title+':'+tips
2511
+ });
2512
+ return false;
2513
+ }
2514
+
2515
+ }
2516
2516
  }*/
2517
2517
  if (this.checkEmoji(newValue)) {
2518
2518
  _Toast2.default.show({
@@ -3671,12 +3671,12 @@ var PageHome = function (_React$Component) {
3671
3671
  });
3672
3672
  return false;
3673
3673
  }
3674
- /* if(newValue=''){
3675
- Toast.show({
3676
- type: 'error',
3677
- content: '意见不能为空!',
3678
- });
3679
- return false;
3674
+ /* if(newValue=''){
3675
+ Toast.show({
3676
+ type: 'error',
3677
+ content: '意见不能为空!',
3678
+ });
3679
+ return false;
3680
3680
  }*/
3681
3681
  if (newValue.length > 2000) {
3682
3682
  newValue = newValue.substring(0, 2000);
@@ -3907,10 +3907,10 @@ var PageHome = function (_React$Component) {
3907
3907
  return resolved.strategy === 'wpsWebOffice' || resolved.officeType === 'wpsWebOffice';
3908
3908
  }
3909
3909
 
3910
- /**
3911
- * 解析正文类型,决定是否显示「编辑正文」。
3912
- * 可编辑且未解析完成:不挂 Upload(占位),避免 initData 把 recordId 冲成附件 id。
3913
- * 解析后:wps → 编辑正文;非 wps → Upload 只读样式。
3910
+ /**
3911
+ * 解析正文类型,决定是否显示「编辑正文」。
3912
+ * 可编辑且未解析完成:不挂 Upload(占位),避免 initData 把 recordId 冲成附件 id。
3913
+ * 解析后:wps → 编辑正文;非 wps → Upload 只读样式。
3914
3914
  */
3915
3915
 
3916
3916
  }, {
@@ -4337,7 +4337,10 @@ var PageHome = function (_React$Component) {
4337
4337
  )
4338
4338
  )
4339
4339
  )
4340
- ) : this.state.itemParam.dataAttr && this.state.itemParam.dataAttr.textLineFeed == 'yes' ? _react2.default.createElement(
4340
+ ) :
4341
+
4342
+ // 单行文本:未配置 textLineFeed 时默认自动换行(与 PC 属性设置默认「是」一致)
4343
+ !this.state.itemParam.dataAttr || this.state.itemParam.dataAttr.textLineFeed == null || this.state.itemParam.dataAttr.textLineFeed === '' || this.state.itemParam.dataAttr.textLineFeed == 'yes' ? _react2.default.createElement(
4341
4344
  'div',
4342
4345
  { className: t.state.itemParam.fieldId, style: t.state.itemParam.formStyleObj.contentStyle == null ? {} : t.state.itemParam.formStyleObj.contentStyle },
4343
4346
  _react2.default.createElement(
@@ -4401,7 +4404,7 @@ var PageHome = function (_React$Component) {
4401
4404
  )
4402
4405
  )
4403
4406
  ),
4404
- _react2.default.createElement('div', { className: 't-FBH t-PL16 t-fw', dangerouslySetInnerHTML: { __html: t.state.itemParam.value } }),
4407
+ _react2.default.createElement('div', { className: 't-FBH t-PL16 t-fw ueditor-content', dangerouslySetInnerHTML: { __html: t.state.itemParam.value } }),
4405
4408
  t.state.itemParam.isVerifySing == "1" ? _react2.default.createElement('i', { className: 'iconfont icon-checked t-PT10', style: { color: 'green' } }) : t.state.itemParam.isVerifySing == "2" ? _react2.default.createElement('i', { className: 'iconfont icon-close t-PT10', style: { color: 'red' } }) : ""
4406
4409
  ) : _react2.default.createElement(
4407
4410
  'div',
@@ -5040,6 +5043,7 @@ var PageHome = function (_React$Component) {
5040
5043
  required: false,
5041
5044
  canAdd: false,
5042
5045
  canDel: false,
5046
+ canDownload: true,
5043
5047
  initIds: t.state.itemParam.noteFileIds,
5044
5048
  limitNo: '5',
5045
5049
  fileSizeLimit: '10',
@@ -342,28 +342,28 @@ var PageHome = function (_React$Component) {
342
342
  var data = this.props.data;
343
343
  var subTblList = data.subTbl; //子表
344
344
  var relatedTbl = data.relatedTbl; //关联表
345
- /* var calculateExpList = data.calculateExpList;//计算公式列表
346
- var calculateExpList1 = value.calculateExpList;//计算公式列表
347
- if(calculateExpList1){
348
- for(var key in calculateExpList1){
349
- var calculateExpValue;
350
- if(calculateExpList){
351
- calculateExpValue = calculateExpList[key];
352
- if(!calculateExpValue){
353
- calculateExpValue = [];
354
- }
355
- }else{
356
- calculateExpList = {};
357
- calculateExpValue = [];
358
- }
359
- for(var j=0;j<calculateExpList1[key].length;j++){
360
- calculateExpValue.push(calculateExpList1[key][j]);
361
- }
362
- calculateExpList[key] = calculateExpValue;
363
-
364
- }
365
-
366
- data.calculateExpList = calculateExpList;
345
+ /* var calculateExpList = data.calculateExpList;//计算公式列表
346
+ var calculateExpList1 = value.calculateExpList;//计算公式列表
347
+ if(calculateExpList1){
348
+ for(var key in calculateExpList1){
349
+ var calculateExpValue;
350
+ if(calculateExpList){
351
+ calculateExpValue = calculateExpList[key];
352
+ if(!calculateExpValue){
353
+ calculateExpValue = [];
354
+ }
355
+ }else{
356
+ calculateExpList = {};
357
+ calculateExpValue = [];
358
+ }
359
+ for(var j=0;j<calculateExpList1[key].length;j++){
360
+ calculateExpValue.push(calculateExpList1[key][j]);
361
+ }
362
+ calculateExpList[key] = calculateExpValue;
363
+
364
+ }
365
+
366
+ data.calculateExpList = calculateExpList;
367
367
  }*/
368
368
 
369
369
  this.dealwithSubData(subTblList, subTblNo, value, relatedTbl);
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var _nvoice = require('./nvoice');
8
+
9
+ Object.defineProperty(exports, 'default', {
10
+ enumerable: true,
11
+ get: function get() {
12
+ return _interopRequireDefault(_nvoice).default;
13
+ }
14
+ });
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -0,0 +1,177 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = undefined;
7
+
8
+ 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; }; }();
9
+
10
+ var _react = require('react');
11
+
12
+ var _react2 = _interopRequireDefault(_react);
13
+
14
+ var _Group = require('saltui/lib/Group');
15
+
16
+ var _Group2 = _interopRequireDefault(_Group);
17
+
18
+ var _Field = require('saltui/lib/Field');
19
+
20
+ var _Field2 = _interopRequireDefault(_Field);
21
+
22
+ var _upload = require('../upload/upload');
23
+
24
+ var _upload2 = _interopRequireDefault(_upload);
25
+
26
+ var _Boxs = require('saltui/lib/Boxs');
27
+
28
+ var _Boxs2 = _interopRequireDefault(_Boxs);
29
+
30
+ var _db = require('../db/db');
31
+
32
+ var _db2 = _interopRequireDefault(_db);
33
+
34
+ require('./nvoice.less');
35
+
36
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
37
+
38
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
39
+
40
+ 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; }
41
+
42
+ 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; }
43
+
44
+ var HBox = _Boxs2.default.HBox,
45
+ Box = _Boxs2.default.Box,
46
+ VBox = _Boxs2.default.VBox;
47
+
48
+ var Nvoice = function (_React$Component) {
49
+ _inherits(Nvoice, _React$Component);
50
+
51
+ function Nvoice(props) {
52
+ _classCallCheck(this, Nvoice);
53
+
54
+ // 传入的props参数
55
+ var _this = _possibleConstructorReturn(this, (Nvoice.__proto__ || Object.getPrototypeOf(Nvoice)).call(this, props));
56
+
57
+ _this.initFn = function (id) {
58
+
59
+ // 初始发票详情数据
60
+ _db2.default.form.getNoInvoiceList({
61
+ invoicedataid: id
62
+ }).then(function (content) {
63
+ _this.setState({
64
+ invoicedata: content
65
+ });
66
+ }).catch(function (error) {
67
+ console.error('获取详情数据失败', error);
68
+ });
69
+ };
70
+
71
+ var invoicedataid = _this.props.id;
72
+ var title = _this.props.label || '发票详情';
73
+ var required = _this.props.required || false;
74
+
75
+ _this.state = {
76
+ invoicedataid: invoicedataid,
77
+ invoicedata: [],
78
+ title: title,
79
+ required: required
80
+ };
81
+
82
+ return _this;
83
+ }
84
+
85
+ _createClass(Nvoice, [{
86
+ key: 'componentDidMount',
87
+ value: function componentDidMount() {
88
+ this.initFn(this.state.invoicedataid);
89
+ }
90
+ }, {
91
+ key: 'downloadFile',
92
+
93
+
94
+ // 下载函数
95
+ value: function (_downloadFile) {
96
+ function downloadFile(_x) {
97
+ return _downloadFile.apply(this, arguments);
98
+ }
99
+
100
+ downloadFile.toString = function () {
101
+ return _downloadFile.toString();
102
+ };
103
+
104
+ return downloadFile;
105
+ }(function (file) {
106
+ downloadFile(file.relaObjId);
107
+ })
108
+ }, {
109
+ key: 'render',
110
+ value: function render() {
111
+ return _react2.default.createElement(
112
+ _Group2.default.List,
113
+ { borderTopNone: true },
114
+ _react2.default.createElement(
115
+ _Field2.default,
116
+ { required: this.state.required, label: this.state.title, layout: 'h', multiLine: true },
117
+ _react2.default.createElement(
118
+ 'div',
119
+ null,
120
+ this.state.invoicedata.map(function (item, index) {
121
+ var fileList = [];
122
+ try {
123
+ if (item.invoicefileInfo) {
124
+ fileList = JSON.parse(item.invoicefileInfo);
125
+ }
126
+ } catch (e) {
127
+ console.error('发票附件解析失败', e);
128
+ }
129
+
130
+ return _react2.default.createElement(
131
+ 'div',
132
+ { key: item.id, className: 't-MT2' },
133
+ _react2.default.createElement(
134
+ VBox,
135
+ { className: 'nvoice-filetitle', hAlign: 'start' },
136
+ _react2.default.createElement(
137
+ Box,
138
+ null,
139
+ item.invoicename
140
+ ),
141
+ _react2.default.createElement(
142
+ HBox,
143
+ { vAlign: 'center' },
144
+ _react2.default.createElement(
145
+ Box,
146
+ { className: 'label label-primary' },
147
+ item.invoicetype
148
+ ),
149
+ _react2.default.createElement(
150
+ Box,
151
+ null,
152
+ '\uFFE5',
153
+ item.invoiceamount
154
+ )
155
+ )
156
+ ),
157
+ _react2.default.createElement(_upload2.default, {
158
+ required: false,
159
+ canDel: false,
160
+ canPreview: true,
161
+ canDownload: true,
162
+ initList: fileList,
163
+ dir: 'form_invoice',
164
+ ref: 'upload_invoice'
165
+ })
166
+ );
167
+ })
168
+ )
169
+ )
170
+ );
171
+ }
172
+ }]);
173
+
174
+ return Nvoice;
175
+ }(_react2.default.Component);
176
+
177
+ exports.default = Nvoice;
File without changes
@@ -356,9 +356,15 @@ var ListItem = function (_React$Component) {
356
356
  var checkIsNotComplete = true;
357
357
  var urgencyTag = false;
358
358
  var tagClass = '';
359
- if (data.type == 0) {
360
- //待办
361
- checkIsNotComplete = true;
359
+ if (data.type == 0 || data.type == 2) {
360
+ //待办 / 已办:缓急角标
361
+ if (data.type == 0) {
362
+ checkIsNotComplete = true;
363
+ } else if (data.status == 2) {
364
+ checkIsNotComplete = false;
365
+ } else {
366
+ checkIsNotComplete = true;
367
+ }
362
368
  if (data.urgency == '90') {
363
369
  urgencyTag = true;
364
370
  tagClass = 'label label-danger';
@@ -381,13 +387,6 @@ var ListItem = function (_React$Component) {
381
387
  } else {
382
388
  checkIsNotComplete = true;
383
389
  }
384
- } else if (data.type == 2) {
385
- //已办
386
- if (data.status == 2) {
387
- checkIsNotComplete = false;
388
- } else {
389
- checkIsNotComplete = true;
390
- }
391
390
  } else if (data.type == 3) {
392
391
  //已阅
393
392
  if (data.status == 2) {
@@ -1,87 +1,87 @@
1
- .dd-select-input-field {
2
- width: 100%;
3
- }
4
-
5
- .dd-select-input-option {
6
- display: flex;
7
- align-items: center;
8
- margin: 8px 0;
9
- cursor: pointer;
10
- }
11
-
12
- .dd-select-input-native {
13
- position: absolute;
14
- opacity: 0;
15
- pointer-events: none;
16
- }
17
-
18
- .dd-select-input-icon {
19
- position: relative;
20
- flex: 0 0 18px;
21
- width: 18px;
22
- height: 18px;
23
- margin-right: 8px;
24
- border: 1px solid #c7ced9;
25
- background: #fff;
26
- transition: all .2s ease;
27
- box-sizing: border-box;
28
- }
29
-
30
- .dd-select-input-icon.radio {
31
- border-radius: 50%;
32
- }
33
-
34
- .dd-select-input-icon.checkbox {
35
- border-radius: 4px;
36
- }
37
-
38
- .dd-select-input-option.checked .dd-select-input-icon {
39
- border-color: #3480fb;
40
- background: #3480fb;
41
- }
42
-
43
- .dd-select-input-option.checked .dd-select-input-icon.radio::after {
44
- content: '';
45
- position: absolute;
46
- top: 50%;
47
- left: 50%;
48
- width: 8px;
49
- height: 8px;
50
- border-radius: 50%;
51
- background: #fff;
52
- transform: translate(-50%, -50%);
53
- }
54
-
55
- .dd-select-input-option.checked .dd-select-input-icon.checkbox::after {
56
- content: '';
57
- position: absolute;
58
- left: 5px;
59
- top: 1px;
60
- width: 5px;
61
- height: 10px;
62
- border: solid #fff;
63
- border-width: 0 2px 2px 0;
64
- transform: rotate(45deg);
65
- }
66
-
67
- .dd-select-input-option-text {
68
- margin-right: 8px;
69
- min-width: 32px;
70
- }
71
-
72
- .dd-select-input-text {
73
- flex: 1;
74
- min-width: 120px;
75
- border: none;
76
- border-bottom: 1px solid #ddd;
77
- outline: none;
78
- padding: 4px 2px;
79
- font-size: 14px;
80
- background-color: transparent;
81
- }
82
-
83
- .dd-select-input-text:disabled {
84
- color: #333;
85
- border-bottom-color: #eee;
86
- cursor: not-allowed;
1
+ .dd-select-input-field {
2
+ width: 100%;
3
+ }
4
+
5
+ .dd-select-input-option {
6
+ display: flex;
7
+ align-items: center;
8
+ margin: 8px 0;
9
+ cursor: pointer;
10
+ }
11
+
12
+ .dd-select-input-native {
13
+ position: absolute;
14
+ opacity: 0;
15
+ pointer-events: none;
16
+ }
17
+
18
+ .dd-select-input-icon {
19
+ position: relative;
20
+ flex: 0 0 18px;
21
+ width: 18px;
22
+ height: 18px;
23
+ margin-right: 8px;
24
+ border: 1px solid #c7ced9;
25
+ background: #fff;
26
+ transition: all .2s ease;
27
+ box-sizing: border-box;
28
+ }
29
+
30
+ .dd-select-input-icon.radio {
31
+ border-radius: 50%;
32
+ }
33
+
34
+ .dd-select-input-icon.checkbox {
35
+ border-radius: 4px;
36
+ }
37
+
38
+ .dd-select-input-option.checked .dd-select-input-icon {
39
+ border-color: #3480fb;
40
+ background: #3480fb;
41
+ }
42
+
43
+ .dd-select-input-option.checked .dd-select-input-icon.radio::after {
44
+ content: '';
45
+ position: absolute;
46
+ top: 50%;
47
+ left: 50%;
48
+ width: 8px;
49
+ height: 8px;
50
+ border-radius: 50%;
51
+ background: #fff;
52
+ transform: translate(-50%, -50%);
53
+ }
54
+
55
+ .dd-select-input-option.checked .dd-select-input-icon.checkbox::after {
56
+ content: '';
57
+ position: absolute;
58
+ left: 5px;
59
+ top: 1px;
60
+ width: 5px;
61
+ height: 10px;
62
+ border: solid #fff;
63
+ border-width: 0 2px 2px 0;
64
+ transform: rotate(45deg);
65
+ }
66
+
67
+ .dd-select-input-option-text {
68
+ margin-right: 8px;
69
+ min-width: 32px;
70
+ }
71
+
72
+ .dd-select-input-text {
73
+ flex: 1;
74
+ min-width: 120px;
75
+ border: none;
76
+ border-bottom: 1px solid #ddd;
77
+ outline: none;
78
+ padding: 4px 2px;
79
+ font-size: 14px;
80
+ background-color: transparent;
81
+ }
82
+
83
+ .dd-select-input-text:disabled {
84
+ color: #333;
85
+ border-bottom-color: #eee;
86
+ cursor: not-allowed;
87
87
  }
@@ -49,8 +49,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
49
49
 
50
50
  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; }
51
51
 
52
- 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; } /**
53
- * 流程批示意见区块(默认意见、退回意见等),与 TblForm 纯表单分离使用
52
+ 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; } /**
53
+ * 流程批示意见区块(默认意见、退回意见等),与 TblForm 纯表单分离使用
54
54
  */
55
55
 
56
56
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.3.35",
3
+ "version": "2.3.37",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",