fmui-base 2.2.98 → 2.2.99

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,7 @@
3
3
  ---npm publish
4
4
 
5
5
  ## 更新日志
6
+ - 2.2.99:移动端保存批示意见态度
6
7
  - 2.2.98:批示意见态度增加回调方法
7
8
  - 2.2.97:表单字段关联选人字段关联子表,没有触发关联时还原原来状态
8
9
  - 2.2.96:表单字段关联选人字段关联时可能会出现死循环问题修复
package/lib/form/form.js CHANGED
@@ -3695,6 +3695,9 @@ var PageHome = function (_React$Component) {
3695
3695
  value: function attitudeItemClick(item) {
3696
3696
  var attitudeValue = item && item.value != null ? item.value : '';
3697
3697
  this.phraseItemClick(attitudeValue);
3698
+ if (this.props.newspyj) {
3699
+ this.props.newspyj.commentAttitude = (0, _formExtHelper.mapCommentAttitudeSaveValue)(attitudeValue);
3700
+ }
3698
3701
  if (FlowCommon && typeof FlowCommon.dealwithAttitudeClick === 'function') {
3699
3702
  FlowCommon.dealwithAttitudeClick(item, this);
3700
3703
  }
@@ -9,6 +9,7 @@ exports.clampSubColumnCount = clampSubColumnCount;
9
9
  exports.buildDetailItemParam = buildDetailItemParam;
10
10
  exports.applyDealwithFormParamExt = applyDealwithFormParamExt;
11
11
  exports.resolveSubColumnCountFromConfig = resolveSubColumnCountFromConfig;
12
+ exports.mapCommentAttitudeSaveValue = mapCommentAttitudeSaveValue;
12
13
  /**
13
14
  * 表单扩展加载:流程 flow_common / 纯表单 form_common
14
15
  *
@@ -225,4 +226,19 @@ function resolveSubColumnCountFromConfig(options) {
225
226
  }
226
227
 
227
228
  return 1;
229
+ }
230
+
231
+ /** 批示意见态度显示值转存库值(与 PC comment_idea_radio 一致) */
232
+ function mapCommentAttitudeSaveValue(displayValue) {
233
+ var val = displayValue == null ? '' : String(displayValue);
234
+ if (val === '同意') {
235
+ return 'yes';
236
+ }
237
+ if (val === '不同意') {
238
+ return 'no';
239
+ }
240
+ if (val === '已阅') {
241
+ return 'read';
242
+ }
243
+ return val;
228
244
  }
package/lib/form/table.js CHANGED
@@ -2459,6 +2459,9 @@ var PageHome = function (_React$Component) {
2459
2459
  var t = this;
2460
2460
  var attitudeValue = item && item.value != null ? item.value : '';
2461
2461
  t.phraseItemClick(attitudeValue);
2462
+ if (t.props.newspyj) {
2463
+ t.props.newspyj.commentAttitude = (0, _formExtHelper.mapCommentAttitudeSaveValue)(attitudeValue);
2464
+ }
2462
2465
  var flowCommonRef = FlowCommon;
2463
2466
  if (!flowCommonRef) {
2464
2467
  var formCode = t.state.formCode || t.props.formCode || '';
@@ -82,6 +82,8 @@ var _table = require('../form/table');
82
82
 
83
83
  var _table2 = _interopRequireDefault(_table);
84
84
 
85
+ var _formExtHelper = require('../form/formExtHelper');
86
+
85
87
  var _FlowChart = require('./FlowChart');
86
88
 
87
89
  var _FlowChart2 = _interopRequireDefault(_FlowChart);
@@ -3637,7 +3639,8 @@ var PageHome = function (_React$Component) {
3637
3639
  editType: t.state.editType,
3638
3640
  formData: JSON.stringify(t.state.editFormData),
3639
3641
  module: t.state.module,
3640
- comment: newComment
3642
+ comment: newComment,
3643
+ commentAttitude: t.getSelectedCommentAttitude()
3641
3644
  }).then(function (content) {
3642
3645
  _Toast2.default.show({
3643
3646
  type: 'success',
@@ -4022,6 +4025,7 @@ var PageHome = function (_React$Component) {
4022
4025
  attachId: this.state.commentAttachId,
4023
4026
  sealId: this.state.commentSealId,
4024
4027
  commentId: t.state.commentId,
4028
+ commentAttitude: t.getSelectedCommentAttitude(),
4025
4029
  hasCommentField: t.state.hasCommentField,
4026
4030
  dataId: dataId,
4027
4031
  urgent: urgent,
@@ -4120,6 +4124,7 @@ var PageHome = function (_React$Component) {
4120
4124
  module: t.state.module,
4121
4125
  comment: newComment,
4122
4126
  commentId: this.state.commentId,
4127
+ commentAttitude: this.getSelectedCommentAttitude(),
4123
4128
  hasCommentField: t.state.hasCommentField,
4124
4129
  attachId: this.state.commentAttachId,
4125
4130
  sealId: this.state.commentSealId,
@@ -4622,7 +4627,7 @@ var PageHome = function (_React$Component) {
4622
4627
  formData: JSON.stringify(editFormData),
4623
4628
  formType: "4",
4624
4629
  editType: editType
4625
- }, _defineProperty(_param2, 'module', t.state.module), _defineProperty(_param2, 'comment', newComment), _defineProperty(_param2, 'commentType', 'text'), _defineProperty(_param2, 'commentId', t.state.commentId), _defineProperty(_param2, 'attachId', t.state.commentAttachId), _defineProperty(_param2, 'sealId', t.state.commentSealId), _defineProperty(_param2, 'permissionCode', t.state.permissionCode), _defineProperty(_param2, 'hasCommentField', t.state.hasCommentField), _defineProperty(_param2, 'dataId', dataId), _param2);
4630
+ }, _defineProperty(_param2, 'module', t.state.module), _defineProperty(_param2, 'comment', newComment), _defineProperty(_param2, 'commentType', 'text'), _defineProperty(_param2, 'commentId', t.state.commentId), _defineProperty(_param2, 'commentAttitude', t.getSelectedCommentAttitude()), _defineProperty(_param2, 'attachId', t.state.commentAttachId), _defineProperty(_param2, 'sealId', t.state.commentSealId), _defineProperty(_param2, 'permissionCode', t.state.permissionCode), _defineProperty(_param2, 'hasCommentField', t.state.hasCommentField), _defineProperty(_param2, 'dataId', dataId), _param2);
4626
4631
  var commentbizSn = t.guid2();
4627
4632
  if (param.commentId && param.commentId != "" && param.commentId != null && typeof param.commentId != "undefined") {
4628
4633
  commentbizSn = param.commentId;
@@ -5019,6 +5024,7 @@ var PageHome = function (_React$Component) {
5019
5024
  param.processInstanceId = t.state.processInstanceId;
5020
5025
  param.permissionCode = t.state.permissionCode;
5021
5026
  param.commentId = t.state.commentId;
5027
+ param.commentAttitude = t.getSelectedCommentAttitude();
5022
5028
  var commentbizSn = t.guid2();
5023
5029
  if (param.commentId && param.commentId != "" && param.commentId != null && typeof param.commentId != "undefined") {
5024
5030
  commentbizSn = param.commentId;
@@ -5217,6 +5223,21 @@ var PageHome = function (_React$Component) {
5217
5223
  return true;
5218
5224
  });
5219
5225
  }
5226
+ //获取当前选中的批示意见态度(yes/no/read,与 PC 一致)
5227
+
5228
+ }, {
5229
+ key: 'getSelectedCommentAttitude',
5230
+ value: function getSelectedCommentAttitude() {
5231
+ var newspyj = this.state.newspyj;
5232
+ if (!newspyj || newspyj.commentAttitude == null || newspyj.commentAttitude === '') {
5233
+ return '';
5234
+ }
5235
+ var val = String(newspyj.commentAttitude);
5236
+ if (val === 'yes' || val === 'no' || val === 'read') {
5237
+ return val;
5238
+ }
5239
+ return (0, _formExtHelper.mapCommentAttitudeSaveValue)(val);
5240
+ }
5220
5241
  //获取批示意见加签随机数
5221
5242
 
5222
5243
  }, {
@@ -5652,6 +5673,7 @@ var PageHome = function (_React$Component) {
5652
5673
  hasCommentField: t.state.hasCommentField,
5653
5674
  comment: newComment,
5654
5675
  commentId: t.state.commentId,
5676
+ commentAttitude: t.getSelectedCommentAttitude(),
5655
5677
  attachId: t.state.commentAttachId,
5656
5678
  sealId: t.state.commentSealId,
5657
5679
  module: t.state.module,
@@ -6286,6 +6308,7 @@ var PageHome = function (_React$Component) {
6286
6308
  shortMessage: shortMessage,
6287
6309
  comment: t.state.spyj,
6288
6310
  commentId: t.state.commentId,
6311
+ commentAttitude: t.getSelectedCommentAttitude(),
6289
6312
  attachId: t.state.commentAttachId,
6290
6313
  sealId: t.state.commentSealId
6291
6314
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fmui-base",
3
- "version": "2.2.98",
3
+ "version": "2.2.99",
4
4
  "title": "fmui-base",
5
5
  "description": "fmui移动端组件",
6
6
  "main": "lib/index.js",