fmui-base 2.0.3 → 2.0.5

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.0.5: 流程功能优化
7
+ - 2.0.4: 表单组件错误优化;政治面貌全选问题修改
6
8
  - 2.0.3: 增加流程图;表单按钮功能扩展
7
9
  - 2.0.2: 时间字段增加“xxxx年xx月xx日”中文显示
8
10
  - 2.0.1: 流程表单选人组件联动开发
@@ -97,33 +97,35 @@ var PageHome = function (_React$Component) {
97
97
  key: 'casigin',
98
98
  value: function casigin() {
99
99
  var commentList = this.props.list;
100
- commentList.map(function (item) {
101
- var param = {};
102
- param.bizSn = item.id;
103
- param.relationId = getLoginUserInfo().mobile;
104
- param.msg = item.fullMessage;
105
- // setTimeout(function(){
106
- // $("#"+item.id+"_sucess").show();
107
- // },1000)
108
- _db2.default.FlowApproval.verifySign(param).then(function (content) {
109
- var result = content.verifySignRes;
110
- if (result == 'success') {
111
- $("#commentSign-" + item.id).removeClass('t-PR16');
112
- $("#" + item.id + "_sucess").show();
113
- }
114
- }).catch(function (error) {
115
- if (error.errorMsg == "签名值与原文不匹配") {
116
- $("#commentSign-" + item.id).removeClass('t-PR16');
117
- $("#" + item.id + "_fail").show();
118
- }
119
- // else{
120
- // Toast.show({
121
- // type: 'error',
122
- // content: error.errorMsg,
123
- // });
124
- // }
100
+ if (commentList) {
101
+ commentList.map(function (item) {
102
+ var param = {};
103
+ param.bizSn = item.id;
104
+ param.relationId = getLoginUserInfo().mobile;
105
+ param.msg = item.fullMessage;
106
+ // setTimeout(function(){
107
+ // $("#"+item.id+"_sucess").show();
108
+ // },1000)
109
+ _db2.default.FlowApproval.verifySign(param).then(function (content) {
110
+ var result = content.verifySignRes;
111
+ if (result == 'success') {
112
+ $("#commentSign-" + item.id).removeClass('t-PR16');
113
+ $("#" + item.id + "_sucess").show();
114
+ }
115
+ }).catch(function (error) {
116
+ if (error.errorMsg == "签名值与原文不匹配") {
117
+ $("#commentSign-" + item.id).removeClass('t-PR16');
118
+ $("#" + item.id + "_fail").show();
119
+ }
120
+ // else{
121
+ // Toast.show({
122
+ // type: 'error',
123
+ // content: error.errorMsg,
124
+ // });
125
+ // }
126
+ });
125
127
  });
126
- });
128
+ }
127
129
  }
128
130
 
129
131
  //初始化ids
package/lib/form/form.js CHANGED
@@ -1044,6 +1044,11 @@ var PageHome = function (_React$Component) {
1044
1044
  itemParam.queryLimit = 5;
1045
1045
  itemParam.limitData = form.popuserMap.chooseScope;
1046
1046
  }
1047
+ // else if(form.popuserMap.chooseScope == "4"){//查上级
1048
+ // itemParam.queryLimit = "3";
1049
+ // itemParam.limitData = form.popuserMap.chooseScopeVal;
1050
+ // }
1051
+
1047
1052
  }
1048
1053
  scopeTable = form.popuserMap.scopeTable;
1049
1054
  } else {
package/lib/form/table.js CHANGED
@@ -86,8 +86,8 @@ var PageHome = function (_React$Component) {
86
86
  var defaultValue = props.defaultValue;
87
87
  var status = props.status;
88
88
  var formRelaField = props.formRelaField; //关联字段
89
- var linkFields = props.allForm.linkFields; //级联字段
90
- var formId = props.data.formId; //表单id
89
+ var linkFields = props.allForm ? props.allForm.linkFields : ""; //级联字段
90
+ var formId = props.data ? props.data.formId : ""; //表单id
91
91
 
92
92
  //关联字段
93
93
  var formRelaFieldMapsNew = {};
@@ -230,7 +230,9 @@ var PageHome = function (_React$Component) {
230
230
  };
231
231
 
232
232
  var module = props.module && props.module != "undefined" ? props.module : "approve";
233
- FlowCommon = require('pages/flow_common/' + module).default ? require('pages/flow_common/' + module).default : require('pages/flow_common/' + module);
233
+ try {
234
+ FlowCommon = require('pages/flow_common/' + module).default ? require('pages/flow_common/' + module).default : require('pages/flow_common/' + module);
235
+ } catch (error) {}
234
236
 
235
237
  // DB.form.getRelaFieldsMap({
236
238
  // formId: formId,
@@ -302,8 +304,8 @@ var PageHome = function (_React$Component) {
302
304
  value: function change(data, itemParam) {
303
305
  var t = this;
304
306
  var module = t.props.module;
305
- var formKey = t.props.allForm.formcode;
306
- var formTblId = t.props.allForm.formTblId;
307
+ var formKey = t.props.allForm ? t.props.allForm.formcode : "";
308
+ var formTblId = t.props.allForm ? t.props.allForm.formTblId : "";
307
309
  if (itemParam && itemParam.key) {
308
310
  //修改事件的时候
309
311
 
@@ -1472,15 +1474,19 @@ var PageHome = function (_React$Component) {
1472
1474
 
1473
1475
  var t = this;
1474
1476
  var allForm = this.props.allForm;
1475
- var tabCodes = allForm.tabCodes;
1476
- var tabNames = allForm.tabNames;
1477
+ var tabCodes = [];
1478
+ var tabNames = [];
1479
+ if (allForm) {
1480
+ tabCodes = allForm.tabCodes;
1481
+ tabNames = allForm.tabNames;
1482
+ }
1477
1483
  return _react2.default.createElement(
1478
1484
  'div',
1479
1485
  null,
1480
1486
  _react2.default.createElement(
1481
1487
  'div',
1482
1488
  null,
1483
- tabCodes == null || tabCodes.length < 2 ? this.props.form.map(function (item, i) {
1489
+ tabCodes == null || tabCodes.length < 2 ? this.props.form ? this.props.form.map(function (item, i) {
1484
1490
  return item.itemType == 'twocolumns' || item.itemType == 'threecolumns' ? item.children.map(function (item2, j) {
1485
1491
  return _react2.default.createElement(
1486
1492
  'div',
@@ -1496,7 +1502,7 @@ var PageHome = function (_React$Component) {
1496
1502
  null,
1497
1503
  _react2.default.createElement(_form2.default, { ref: item.uniqueName, keyNo: i, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item, allForm: t.props.allForm, formStyle: t.props.formStyleObj, commentList: t.props.commentFieldList, defaultValue: t.props.defaultValue, data: t.props.data, fieldControll: t.props.fieldControll, caIsPrd: t.props.caIsPrd, preCaFields: t.props.preCaFields, formRelaFieldMaps: t.state.formRelaFieldMaps, linkFields: t.state.linkFields, onChange: this.change.bind(this) })
1498
1504
  );
1499
- }.bind(this)) : _react2.default.createElement(
1505
+ }.bind(this)) : "" : _react2.default.createElement(
1500
1506
  'div',
1501
1507
  null,
1502
1508
  _react2.default.createElement(
@@ -1536,10 +1542,10 @@ var PageHome = function (_React$Component) {
1536
1542
  )
1537
1543
  )
1538
1544
  ),
1539
- _react2.default.createElement('div', { className: t.props.commentBackList.length > 0 ? "t-H10 t-BCf7" : 't-DN' }),
1545
+ _react2.default.createElement('div', { className: t.props.commentBackList && t.props.commentBackList.length > 0 ? "t-H10 t-BCf7" : 't-DN' }),
1540
1546
  _react2.default.createElement(
1541
1547
  'div',
1542
- { className: t.props.commentBackList.length > 0 ? '' : 't-DN' },
1548
+ { className: t.props.commentBackList && t.props.commentBackList.length > 0 ? '' : 't-DN' },
1543
1549
  _react2.default.createElement(
1544
1550
  HBox,
1545
1551
  { className: 't-field-box' },
@@ -1555,10 +1561,10 @@ var PageHome = function (_React$Component) {
1555
1561
  )
1556
1562
  )
1557
1563
  ),
1558
- _react2.default.createElement('div', { className: t.props.commentDefaultList.length > 0 ? "t-H10 t-BCf7" : 't-DN' }),
1564
+ _react2.default.createElement('div', { className: t.props.commentDefaultList && t.props.commentDefaultList.length > 0 ? "t-H10 t-BCf7" : 't-DN' }),
1559
1565
  _react2.default.createElement(
1560
1566
  'div',
1561
- { className: t.props.commentDefaultList.length > 0 ? '' : 't-DN' },
1567
+ { className: t.props.commentDefaultList && t.props.commentDefaultList.length > 0 ? '' : 't-DN' },
1562
1568
  _react2.default.createElement(
1563
1569
  HBox,
1564
1570
  { className: 'flex-comment t-field-box' },
@@ -1615,10 +1621,10 @@ var PageHome = function (_React$Component) {
1615
1621
  )
1616
1622
  )
1617
1623
  ),
1618
- _react2.default.createElement('div', { className: t.props.commentDefaultList.length == 0 ? "t-H10 t-BCf7" : 't-DN' }),
1624
+ _react2.default.createElement('div', { className: t.props.commentDefaultList && t.props.commentDefaultList.length == 0 ? "t-H10 t-BCf7" : 't-DN' }),
1619
1625
  _react2.default.createElement(
1620
1626
  'div',
1621
- { className: t.props.commentDefaultList.length == 0 && t.props.commentField == "default" ? '' : 't-DN' },
1627
+ { className: t.props.commentDefaultList && t.props.commentDefaultList.length == 0 && t.props.commentField == "default" ? '' : 't-DN' },
1622
1628
  _react2.default.createElement(
1623
1629
  HBox,
1624
1630
  { className: 't-field-box' },
@@ -422,7 +422,8 @@ var PageHome = function (_React$Component) {
422
422
  preCaFields: "", //上一个办理节点ca验签字段
423
423
  formRelaField: "", //流程关联字段
424
424
  commentBackAlert: [], //退回批示意见弹出
425
- showCommentBackAlert: true //显示退回批示意见弹出
425
+ showCommentBackAlert: true, //显示退回批示意见弹出
426
+ endSelect: false
426
427
  };
427
428
  FlowCommon = require('pages/flow_common/' + module).default ? require('pages/flow_common/' + module).default : require('pages/flow_common/' + module);
428
429
 
@@ -2122,10 +2123,11 @@ var PageHome = function (_React$Component) {
2122
2123
  //后继活动
2123
2124
  var urgentSelectList = [];
2124
2125
  var urgentList = [];
2126
+ var endSelect = false;
2125
2127
  if (nextList.length == 1 && nextList[0]['end']) {
2126
2128
  //结束
2127
2129
  //urgentHidden = true;
2128
-
2130
+ endSelect = true;
2129
2131
  var endItem = nextList[0];
2130
2132
  var checkedItem = {};
2131
2133
  checkedItem.value = endItem.id;
@@ -2424,7 +2426,8 @@ var PageHome = function (_React$Component) {
2424
2426
  urgentList: urgentList,
2425
2427
  urgentHidden: urgentHidden,
2426
2428
  isEnd: isEnd,
2427
- nextActivityName: nextActivityName
2429
+ nextActivityName: nextActivityName,
2430
+ endSelect: endSelect
2428
2431
  }, function () {
2429
2432
  for (var i = 0; i < nextActivityList.length; i++) {
2430
2433
  if (nextActivityList[i].personValue.length > 0 || nextActivityList[i].commonUsedData.length > 0) {
@@ -6014,11 +6017,13 @@ var PageHome = function (_React$Component) {
6014
6017
  var isRadio = item.isRadio;
6015
6018
  if (item.end && !checked) {
6016
6019
  this.setState({
6017
- urgentHidden: true
6020
+ urgentHidden: true,
6021
+ endSelect: false
6018
6022
  });
6019
6023
  } else {
6020
6024
  this.setState({
6021
- urgentHidden: false
6025
+ urgentHidden: false,
6026
+ endSelect: true
6022
6027
  });
6023
6028
  }
6024
6029
  var maxOutgoing = item.maxOutgoing; //1代表是排他单选,0代表多选
@@ -6785,7 +6790,7 @@ var PageHome = function (_React$Component) {
6785
6790
  }.bind(this)),
6786
6791
  _react2.default.createElement(_CheckboxField2.default, {
6787
6792
  data: this.state.shortMessageList,
6788
- className: this.state.nextActivityList.length == 0 ? 't-DN' : '',
6793
+ className: this.state.nextActivityList.length == 0 || this.state.endSelect ? 't-DN' : '',
6789
6794
  mode: 'list',
6790
6795
  onChange: this.changeSendShortMessage.bind(this),
6791
6796
  required: false }),
@@ -1517,15 +1517,28 @@ var Page = function (_React$Component) {
1517
1517
 
1518
1518
  for (var i = 0; i < politicalOutlookUserList.length; i++) {
1519
1519
  if (politicalOutlookUserList[i].isSameOrg == "1") {
1520
- if (!politicalOutlookUserList[i].checked) {
1521
- politicalOutlookUserList[i].checked = true;
1522
- total++;
1523
- selectPoliticalOutlookUserNum++;
1520
+ if (navList[index].checkThisOrg) {
1521
+ if (!politicalOutlookUserList[i].checked) {
1522
+ politicalOutlookUserList[i].checked = true;
1523
+ total++;
1524
+ selectPoliticalOutlookUserNum++;
1525
+ }
1524
1526
  } else {
1525
- politicalOutlookUserList[i].checked = false;
1526
- total--;
1527
- selectPoliticalOutlookUserNum--;
1527
+ if (politicalOutlookUserList[i].checked) {
1528
+ politicalOutlookUserList[i].checked = false;
1529
+ total--;
1530
+ selectPoliticalOutlookUserNum--;
1531
+ }
1528
1532
  }
1533
+ // if (!politicalOutlookUserList[i].checked) {
1534
+ // politicalOutlookUserList[i].checked = true;
1535
+ // total++;
1536
+ // selectPoliticalOutlookUserNum++;
1537
+ // }else{
1538
+ // politicalOutlookUserList[i].checked = false;
1539
+ // total--;
1540
+ // selectPoliticalOutlookUserNum--;
1541
+ // }
1529
1542
 
1530
1543
  var flag = true;
1531
1544
  for (var j = 0; j < selectUsers.length; j++) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.0.3",
3
+ "version": "2.0.5",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",