fmui-base 2.1.46 → 2.1.48

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.1.48:表单子表数据丢失处理,子表与关联表子表冲突
7
+ - 2.1.47:流程支持发起子流程
6
8
  - 2.1.46:流程支持发起子流程
7
9
  - 2.1.44:流程转交批示意见必填校验
8
10
  - 2.1.43:选人支持自定义扩展
@@ -291,13 +291,19 @@ var PageHome = function (_React$Component) {
291
291
  subFormList.push(subForm3);
292
292
  itemParam.subForm = subFormList;
293
293
  value.push({ mainTblData: [], mainTblName: itemCode });
294
+ var relatedFlag = false;
294
295
  for (var i = 0; i < relatedTbl.length; i++) {
295
296
  var relateditem = relatedTbl[i];
296
297
  if (relateditem.relatedMainTblName == itemParam.parentTblName) {
297
298
  relatedTbl[i].relatedSubTblData.push({ subTblData: [], subTblName: itemCode });
299
+ relatedFlag = true;
298
300
  break;
299
301
  }
300
302
  }
303
+ if (!relatedFlag) {
304
+ value.push({ mainTblData: [], mainTblName: itemCode });
305
+ subTbl.push({ subTblData: [], subTblName: itemCode });
306
+ }
301
307
  } else {
302
308
  var subForm3 = { show: true, form: subForm };
303
309
  subFormList.push(subForm3);
@@ -188,9 +188,6 @@ var PageHome = function (_React$Component) {
188
188
  // if(fxUserId!=loginUserId){
189
189
  // Toast.show({
190
190
  // type: 'error',
191
- // content:"您无权查看此流程!"
192
- // });
193
- // return false;
194
191
  // }
195
192
  }
196
193
 
@@ -201,6 +198,9 @@ var PageHome = function (_React$Component) {
201
198
  var dataId = props.dataId;
202
199
  var editType = '';
203
200
  isSub = props.isSub ? props.isSub : '';
201
+ // if(isSub!=''){
202
+ // window.location.reload();
203
+ // }
204
204
  if (dataId && dataId != '-1') {
205
205
  //非新增
206
206
  setPageTitle("流程详情");
@@ -648,6 +648,7 @@ var PageHome = function (_React$Component) {
648
648
  if (ActionSheetButton) {
649
649
  ActionSheetButton.close();
650
650
  }
651
+ console.log("componentWillUnmount");
651
652
  }
652
653
  }, {
653
654
  key: 'imageView',
@@ -728,6 +729,9 @@ var PageHome = function (_React$Component) {
728
729
  } else {
729
730
  t.loadPage(param);
730
731
  }
732
+ if (isSub != '') {
733
+ t.insertBatchRelation(t.state.processInstanceId, isSub, t.state.activityId, '');
734
+ }
731
735
  } else {
732
736
  t.loadPage(param);
733
737
  }
@@ -1645,6 +1649,7 @@ var PageHome = function (_React$Component) {
1645
1649
  key: 'change',
1646
1650
  value: function change(data, itemParam) {
1647
1651
  console.log("数据回调" + itemParam.key);
1652
+ debugger;
1648
1653
  //子流程去除id字段
1649
1654
  if (isSub != '' && data) {
1650
1655
  var mainTblData = data.mainTblData;
@@ -1655,6 +1660,24 @@ var PageHome = function (_React$Component) {
1655
1660
  }
1656
1661
  }
1657
1662
  }
1663
+ var subTbl = data.subTbl;
1664
+ if (subTbl && subTbl.length > 0) {
1665
+ for (var i = 0; i < subTbl.length; i++) {
1666
+ var subTblData = subTbl[i].subTblData;
1667
+ if (subTblData && subTblData.length > 0) {
1668
+ for (var j = 0; j < subTblData.length; j++) {
1669
+ var subTblDataItem = subTblData[j];
1670
+ if (subTblDataItem && subTblDataItem.length > 0) {
1671
+ for (var k = 0; k < subTblDataItem.length; k++) {
1672
+ if (subTblDataItem[k].key == 'id') {
1673
+ subTblDataItem[k].value = "";
1674
+ }
1675
+ }
1676
+ }
1677
+ }
1678
+ }
1679
+ }
1680
+ }
1658
1681
  }
1659
1682
  this.setState({
1660
1683
  editFormData: data
@@ -3924,14 +3947,17 @@ var PageHome = function (_React$Component) {
3924
3947
  if (dataInherit && dataInherit == '1') {
3925
3948
  jumppath = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/' + parentDataId + '/0/0/' + list[j].processInstanceId + '/approve/' + userId + '/undefined/' + parentProcessInstanceId;
3926
3949
  }
3927
- if (isPush == '1') {
3928
- closePage();
3929
- } else {
3930
- backPage();
3931
- }
3932
- setTimeout(function () {
3933
- location.hash = jumppath;
3934
- }, 100);
3950
+ // if (isPush == '1') {
3951
+ // closePage();
3952
+ // } else {
3953
+ // backPage();
3954
+ // }
3955
+ // setTimeout(function(){
3956
+ // location.hash = jumppath;
3957
+ // },100);
3958
+ // location.hash = jumppath;
3959
+ location.hash = jumppath;
3960
+ // location.href =window.location.href.split("#")+ jumppath;
3935
3961
  }
3936
3962
  }
3937
3963
  }
@@ -3973,14 +3999,16 @@ var PageHome = function (_React$Component) {
3973
3999
  if (dataInherit && dataInherit == '1') {
3974
4000
  jumppath = '#/process/processDetails/' + openTaskId + '/' + list[j].formKey + '/' + parentDataId + '/0/0/' + list[j].processInstanceId + '/approve/' + userId + '/undefined/' + parentProcessInstanceId;
3975
4001
  }
3976
- if (isPush == '1') {
3977
- closePage();
3978
- } else {
3979
- backPage();
3980
- }
3981
- setTimeout(function () {
3982
- location.hash = jumppath;
3983
- }, 100);
4002
+ // if (isPush == '1') {
4003
+ // closePage();
4004
+ // } else {
4005
+ // backPage();
4006
+ // }
4007
+ // setTimeout(function(){
4008
+ // location.hash = jumppath;
4009
+ // },100);
4010
+ // location.hash = jumppath;
4011
+ location.href = window.location.href.split("#") + jumppath;
3984
4012
  }
3985
4013
  }
3986
4014
  }
@@ -4348,6 +4376,7 @@ var PageHome = function (_React$Component) {
4348
4376
  dataId: dataId
4349
4377
  });
4350
4378
  } else {
4379
+
4351
4380
  if (isPush == '1') {
4352
4381
  closePage();
4353
4382
  } else {
@@ -4462,7 +4491,9 @@ var PageHome = function (_React$Component) {
4462
4491
  if (typeof mobileExt !== 'undefined' && typeof mobileExt["operateCallBack"] === "function") {
4463
4492
  mobileExt["operateCallBack"]({ type: 5, dataId: dataId, isBatch: 0 }, t.state);
4464
4493
  }
4465
-
4494
+ if (isSub != '') {
4495
+ backPage(2);
4496
+ }
4466
4497
  if (isPush == '1') {
4467
4498
  closePage();
4468
4499
  //alert("_thirdMenuType:"+_thirdMenuType);
@@ -4703,9 +4734,7 @@ var PageHome = function (_React$Component) {
4703
4734
  dataId = content.dataId;
4704
4735
  t.setState({ dataId: dataId });
4705
4736
  }
4706
- if (isSub != '') {
4707
- t.insertBatchRelation(t.state.processInstanceId, isSub, t.state.activityId, '');
4708
- }
4737
+
4709
4738
  if (typeof FlowCommon.operateCallBack === "function") {
4710
4739
  // var type = 6;
4711
4740
  // if(t.state.isStart && t.state.dataId==''){//是不是起始节点
@@ -4772,6 +4801,9 @@ var PageHome = function (_React$Component) {
4772
4801
  t.handleSubmit(1);
4773
4802
  });
4774
4803
  } else {
4804
+ if (isSub != '') {
4805
+ backPage(2);
4806
+ }
4775
4807
  if (isPush == '1') {
4776
4808
  closePage();
4777
4809
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.1.46",
3
+ "version": "2.1.48",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes