fmui-base 2.2.92 → 2.2.93

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 (31) hide show
  1. package/README.md +1 -0
  2. package/lib/form/table.js +9 -4
  3. package/lib/nvoice/nvoice.js +15 -24
  4. package/lib/tblform/FlowCommentPane.js +2 -2
  5. package/package.json +1 -1
  6. package/lib/css/processList.css +0 -8
  7. package/lib/css/react_grid.css +0 -1013
  8. package/lib/css/selectInput.css +0 -76
  9. package/lib/css/workItem.css +0 -59
  10. package/lib/form_details/formDetails.js +0 -162
  11. package/lib/form_details/formDetails.less +0 -0
  12. package/lib/form_details/form_details.js +0 -146
  13. package/lib/form_details/form_details.less +0 -0
  14. package/lib/form_details/index.js +0 -16
  15. package/lib/react_grid/react_grid copy 1.js +0 -1670
  16. package/lib/react_grid/react_grid copy 2.js +0 -722
  17. package/lib/react_grid/react_grid copy 3.js +0 -1502
  18. package/lib/react_grid/react_grid copy 4.js +0 -1421
  19. package/lib/react_grid/react_grid copy 5.js +0 -1670
  20. package/lib/react_grid/react_grid copy.js +0 -1811
  21. package/lib/rela_obj/relaObj copy.js +0 -144
  22. package/lib/select_input/selectInputField.js +0 -424
  23. package/lib/select_input/selectInputField.less +0 -39
  24. /package/lib/{scrollList → ScrollList}/BottomTip.js +0 -0
  25. /package/lib/{scrollList → ScrollList}/EmptyContent.js +0 -0
  26. /package/lib/{scrollList → ScrollList}/Item.js +0 -0
  27. /package/lib/{scrollList/scrollList.js → ScrollList/ScrollList.js} +0 -0
  28. /package/lib/{scrollList → ScrollList}/ScrollList.styl +0 -0
  29. /package/lib/{scrollList → ScrollList}/TagList.js +0 -0
  30. /package/lib/{scrollList → ScrollList}/index.js +0 -0
  31. /package/lib/{scrollList → ScrollList}/style.js +0 -0
package/README.md CHANGED
@@ -3,6 +3,7 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.2.93:表单关联字段重构兼容老版本接口
6
7
  - 2.2.92:选人组件页签用户改成组织
7
8
  - 2.2.91:流程办理按钮名称要与办理弹窗标题同步
8
9
  - 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
  })
@@ -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.93",
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
- }