fmui-base 2.2.92 → 2.2.94

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.
Files changed (32) hide show
  1. package/README.md +2 -0
  2. package/lib/form/table.js +9 -4
  3. package/lib/nvoice/nvoice.js +15 -24
  4. package/lib/process_info/processInfo.js +38 -9
  5. package/lib/tblform/FlowCommentPane.js +2 -2
  6. package/package.json +1 -1
  7. package/lib/css/processList.css +0 -8
  8. package/lib/css/react_grid.css +0 -1013
  9. package/lib/css/selectInput.css +0 -76
  10. package/lib/css/workItem.css +0 -59
  11. package/lib/form_details/formDetails.js +0 -162
  12. package/lib/form_details/formDetails.less +0 -0
  13. package/lib/form_details/form_details.js +0 -146
  14. package/lib/form_details/form_details.less +0 -0
  15. package/lib/form_details/index.js +0 -16
  16. package/lib/react_grid/react_grid copy 1.js +0 -1670
  17. package/lib/react_grid/react_grid copy 2.js +0 -722
  18. package/lib/react_grid/react_grid copy 3.js +0 -1502
  19. package/lib/react_grid/react_grid copy 4.js +0 -1421
  20. package/lib/react_grid/react_grid copy 5.js +0 -1670
  21. package/lib/react_grid/react_grid copy.js +0 -1811
  22. package/lib/rela_obj/relaObj copy.js +0 -144
  23. package/lib/select_input/selectInputField.js +0 -424
  24. package/lib/select_input/selectInputField.less +0 -39
  25. /package/lib/{scrollList → ScrollList}/BottomTip.js +0 -0
  26. /package/lib/{scrollList → ScrollList}/EmptyContent.js +0 -0
  27. /package/lib/{scrollList → ScrollList}/Item.js +0 -0
  28. /package/lib/{scrollList/scrollList.js → ScrollList/ScrollList.js} +0 -0
  29. /package/lib/{scrollList → ScrollList}/ScrollList.styl +0 -0
  30. /package/lib/{scrollList → ScrollList}/TagList.js +0 -0
  31. /package/lib/{scrollList → ScrollList}/index.js +0 -0
  32. /package/lib/{scrollList → ScrollList}/style.js +0 -0
package/README.md CHANGED
@@ -3,6 +3,8 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.2.94:流程办理回调时的type不准确问题修复
7
+ - 2.2.93:表单关联字段重构兼容老版本接口
6
8
  - 2.2.92:选人组件页签用户改成组织
7
9
  - 2.2.91:流程办理按钮名称要与办理弹窗标题同步
8
10
  - 2.2.90:表单时间字段偶发保存成时间戳
package/lib/form/table.js CHANGED
@@ -198,12 +198,16 @@ var PageHome = function (_React$Component) {
198
198
  success: function success(data) {
199
199
  if (data.code == "0") {
200
200
  var responseData = data.data || {};
201
- // 移动端新结构:triggerFieldsMap 按触发字段分组;relaFieldsMap 按关联字段分组且保留全局优先级
201
+ // 兼容新老接口:新结构 {triggerFieldsMap,relaFieldsMap};老结构直接为按触发字段分组的 Map
202
202
  if (responseData.triggerFieldsMap) {
203
203
  formRelaFieldMaps = responseData.triggerFieldsMap;
204
- formRelaFieldMapsNew = responseData.relaFieldsMap || {};
204
+ formRelaFieldMapsNew = responseData.relaFieldsMap;
205
205
  } else {
206
206
  formRelaFieldMaps = responseData;
207
+ formRelaFieldMapsNew = null;
208
+ }
209
+ // 老接口或新接口未返回 relaFieldsMap 时,前端按 sortNo 本地转换,保证联动逻辑一致
210
+ if (!formRelaFieldMapsNew || Object.keys(formRelaFieldMapsNew).length === 0) {
207
211
  formRelaFieldMapsNew = buildFormRelaFieldMapsByRelaField(formRelaFieldMaps);
208
212
  }
209
213
  }
@@ -818,7 +822,8 @@ var PageHome = function (_React$Component) {
818
822
  }
819
823
 
820
824
  //关联字段刷新(silent 模式,不向上触发 onChange)
821
- if (t.state.formRelaFieldMaps) {
825
+ var hasRelaFieldsMap = t.state.formRelaFieldMaps && Object.keys(t.state.formRelaFieldMaps).length > 0;
826
+ if (hasRelaFieldsMap) {
822
827
  var isSubTrigger = typeof subTblNo != 'undefined' && itemParam.tableName != data.mainTblName;
823
828
  t._isRelaFieldRefreshing = true;
824
829
  try {
@@ -910,7 +915,7 @@ var PageHome = function (_React$Component) {
910
915
  var data = t.props.data;
911
916
  t._isRelaFieldRefreshing = true;
912
917
  try {
913
- if (t.state.formRelaFieldMaps) {
918
+ if (t.state.formRelaFieldMaps && Object.keys(t.state.formRelaFieldMaps).length > 0) {
914
919
  t.refreshAllRelaFieldsByRelaMap(data);
915
920
  } else if (formRelaFieldMaps) {
916
921
  var _iteratorNormalCompletion2 = true;
@@ -55,29 +55,13 @@ var Nvoice = function (_React$Component) {
55
55
  var _this = _possibleConstructorReturn(this, (Nvoice.__proto__ || Object.getPrototypeOf(Nvoice)).call(this, props));
56
56
 
57
57
  _this.initFn = function (id) {
58
- var invoicedata = [{
59
- "invoicestatus": "1",
60
- "invoicename": "天津增值税普通发票",
61
- "invoicestate": "已验真",
62
- "invoicefileInfo": "[{\"id\":\"2c93ab0c9a8164f2019a81a3717b0556\",\"dingSpaceId\":\"null\",\"url\":\"/attachment/download?fid=2c93ab0c9a8164f2019a81a3717b0556&chksum=75a39c299a3498218beae0c3d0a6acc1.2c93ab0c92888ecb019288cc7b59060c\",\"name\":\"房租发票.jpg\",\"checksum\":\"75a39c299a3498218beae0c3d0a6acc1.2c93ab0c92888ecb019288cc7b59060c\",\"fileExt\":\".jpg\",\"fileName\":\"a998196929944e97b33300ede8ad1fad.jpg\",\"relativePath\":\"form_invoice/202511\",\"secretLevel\":\"0\",\"size\":\"289801\"}]",
63
- "invoicetype": "增值税普通发票",
64
- "id": "2c93ab0c9a8164f2019a81a396880559",
65
- "invoiceno": "01200200010500221591",
66
- "invoicefileid": "2c93ab0c9a8164f2019a81a3717b0556",
67
- "invoicedate": "20240308",
68
- "invoiceamount": "16500.00"
69
- }];
70
- _this.setState({
71
- invoicedata: invoicedata
72
- });
73
58
 
74
59
  // 初始发票详情数据
75
60
  _db2.default.form.getNoInvoiceList({
76
61
  invoicedataid: id
77
62
  }).then(function (content) {
78
- var invoicedata = content;
79
63
  _this.setState({
80
- invoicedata: invoicedata
64
+ invoicedata: content
81
65
  });
82
66
  }).catch(function (error) {
83
67
  console.error('获取详情数据失败', error);
@@ -135,11 +119,17 @@ var Nvoice = function (_React$Component) {
135
119
  null,
136
120
  this.state.invoicedata.map(function (item, index) {
137
121
  var fileList = [];
138
- fileList = JSON.parse(item.invoicefileInfo);
122
+ try {
123
+ if (item.invoicefileInfo) {
124
+ fileList = JSON.parse(item.invoicefileInfo);
125
+ }
126
+ } catch (e) {
127
+ console.error('发票附件解析失败', e);
128
+ }
139
129
 
140
130
  return _react2.default.createElement(
141
131
  'div',
142
- { key: item.id },
132
+ { key: item.id, className: 't-MT2' },
143
133
  _react2.default.createElement(
144
134
  VBox,
145
135
  { className: 'nvoice-filetitle', hAlign: 'start' },
@@ -165,12 +155,13 @@ var Nvoice = function (_React$Component) {
165
155
  )
166
156
  ),
167
157
  _react2.default.createElement(_upload2.default, {
168
- required: true,
169
- canDel: true,
158
+ required: false,
159
+ canDel: false,
160
+ canPreview: true,
161
+ canDownload: true,
170
162
  initList: fileList,
171
- dir: 'document',
172
- limitNo: '0',
173
- ref: 'upload'
163
+ dir: 'form_invoice',
164
+ ref: 'upload_invoice'
174
165
  })
175
166
  );
176
167
  })
@@ -2803,9 +2803,6 @@ var PageHome = function (_React$Component) {
2803
2803
  checkedItem.end = item.end;
2804
2804
  checkedItem.must = item.must;
2805
2805
  checkedItem.participants = participants;
2806
- if (item.end == true) {
2807
- isEnd = true;
2808
- }
2809
2806
  checkedItem.level = item.level;
2810
2807
  checkedItem.maxOutgoing = maxOutgoing;
2811
2808
  if (item.must == true && (maxOutgoing == 1 && checkActi == 0 || maxOutgoing == 0)) {
@@ -2849,6 +2846,7 @@ var PageHome = function (_React$Component) {
2849
2846
  //nextSelectType = 'radom';
2850
2847
  }
2851
2848
  }
2849
+ isEnd = t.getSelectedIsEnd(nextActivityList, nextRadomList);
2852
2850
 
2853
2851
  //紧急
2854
2852
  var _urgent = t.state.urgent;
@@ -4874,6 +4872,33 @@ var PageHome = function (_React$Component) {
4874
4872
  t.saveForm(1);
4875
4873
  }, saveTime * 60 * 1000);
4876
4874
  }
4875
+ //根据当前选中的后继/随机节点判断是否结束
4876
+
4877
+ }, {
4878
+ key: 'getSelectedIsEnd',
4879
+ value: function getSelectedIsEnd(nextActivityList, nextRadomList) {
4880
+ var t = this;
4881
+ var activityList = nextActivityList != null ? nextActivityList : t.state.nextActivityList || [];
4882
+ var radomList = nextRadomList != null ? nextRadomList : t.state.nextRadomList || [];
4883
+ for (var i = 0; i < activityList.length; i++) {
4884
+ if (activityList[i].checked && activityList[i].end === true) {
4885
+ return true;
4886
+ }
4887
+ }
4888
+ for (var j = 0; j < radomList.length; j++) {
4889
+ var subList = radomList[j].subRandomList || [];
4890
+ for (var k = 0; k < subList.length; k++) {
4891
+ if (subList[k].checked && subList[k].end === true) {
4892
+ return true;
4893
+ }
4894
+ }
4895
+ }
4896
+ if (activityList.length === 0 && radomList.length === 0) {
4897
+ return t.state.isEnd;
4898
+ }
4899
+ return false;
4900
+ }
4901
+
4877
4902
  //提交发送流程
4878
4903
 
4879
4904
  }, {
@@ -5017,8 +5042,8 @@ var PageHome = function (_React$Component) {
5017
5042
  //是不是起始节点 或再次发起
5018
5043
  type = 4;
5019
5044
  }
5020
- if (t.state.isEnd) {
5021
- //是不是结束节点
5045
+ if (t.getSelectedIsEnd()) {
5046
+ //是不是结束节点(以实际选中节点为准)
5022
5047
  type = 1;
5023
5048
  }
5024
5049
  var dataId = t.state.dataId;
@@ -7312,7 +7337,8 @@ var PageHome = function (_React$Component) {
7312
7337
 
7313
7338
  this.setState({
7314
7339
  nextActivityList: nextActivityList,
7315
- nextRadomList: nextRadomListMain
7340
+ nextRadomList: nextRadomListMain,
7341
+ isEnd: this.getSelectedIsEnd(nextActivityList, nextRadomListMain)
7316
7342
  //nextSelectType:type
7317
7343
  });
7318
7344
  } else {
@@ -7337,7 +7363,8 @@ var PageHome = function (_React$Component) {
7337
7363
  }
7338
7364
  this.setState({
7339
7365
  nextActivityList: nextActivity,
7340
- nextRadomList: nextRadomListMain
7366
+ nextRadomList: nextRadomListMain,
7367
+ isEnd: this.getSelectedIsEnd(nextActivity, nextRadomListMain)
7341
7368
  //nextSelectType:type
7342
7369
  });
7343
7370
  }
@@ -7345,7 +7372,8 @@ var PageHome = function (_React$Component) {
7345
7372
  if (type == 'next') {
7346
7373
  //选的是后继节点
7347
7374
  this.setState({
7348
- nextActivityList: nextActivityList
7375
+ nextActivityList: nextActivityList,
7376
+ isEnd: this.getSelectedIsEnd(nextActivityList, this.state.nextRadomList)
7349
7377
  //nextSelectType:type
7350
7378
  });
7351
7379
  } else {
@@ -7353,7 +7381,8 @@ var PageHome = function (_React$Component) {
7353
7381
  var nextRadomListMain = this.state.nextRadomList;
7354
7382
  nextRadomListMain[n].subRandomList = nextActivityList;
7355
7383
  this.setState({
7356
- nextRadomList: nextRadomListMain
7384
+ nextRadomList: nextRadomListMain,
7385
+ isEnd: this.getSelectedIsEnd(this.state.nextActivityList, nextRadomListMain)
7357
7386
  //nextSelectType:type
7358
7387
  });
7359
7388
  }
@@ -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.2.92",
3
+ "version": "2.2.94",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",
@@ -1,8 +0,0 @@
1
- .searchActive .t-search-bar-holder {
2
- left: 0;
3
- -webkit-transform: translate3d(0, 0, 0);
4
- transform: translate3d(0, 0, 0);
5
- }
6
- .t-mask {
7
- display: none;
8
- }