fmui-base 2.3.43 → 2.3.45
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 +2 -0
- package/lib/process_info/processInfo.js +130 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -487,6 +487,7 @@ var PageHome = function (_React$Component) {
|
|
|
487
487
|
errorMsg: '',
|
|
488
488
|
buttonCodeList: '',
|
|
489
489
|
tableStatus: '0',
|
|
490
|
+
formTableKey: 0,
|
|
490
491
|
finalButtons: finalButtons,
|
|
491
492
|
backReasonText: '', //驳回原因
|
|
492
493
|
recoverReasonText: '', //收回原因
|
|
@@ -1541,9 +1542,14 @@ var PageHome = function (_React$Component) {
|
|
|
1541
1542
|
// urgentSelectList = urgentList;
|
|
1542
1543
|
// }
|
|
1543
1544
|
// }
|
|
1545
|
+
var resolvedOptlock = formData && formData.optlock !== undefined && formData.optlock !== null && formData.optlock !== '' ? String(formData.optlock) : content.optlock !== undefined && content.optlock !== null && content.optlock !== '' ? String(content.optlock) : '';
|
|
1546
|
+
if (t._pendingForceOptlock) {
|
|
1547
|
+
resolvedOptlock = String(t._pendingForceOptlock);
|
|
1548
|
+
t._pendingForceOptlock = null;
|
|
1549
|
+
}
|
|
1544
1550
|
t.setState({
|
|
1545
1551
|
editFormData: formData,
|
|
1546
|
-
formDataOptlock:
|
|
1552
|
+
formDataOptlock: resolvedOptlock,
|
|
1547
1553
|
//formDataNew:content.formDataNew,
|
|
1548
1554
|
// formData: formData,
|
|
1549
1555
|
// fileContent: fileContent,
|
|
@@ -1624,6 +1630,14 @@ var PageHome = function (_React$Component) {
|
|
|
1624
1630
|
startUserOrgId: content.startUserOrgId || content.startUserGroupId || '',
|
|
1625
1631
|
taskAssignOrgId: content.taskAssignOrgId || ''
|
|
1626
1632
|
}, function () {
|
|
1633
|
+
if (t._pendingCommentRestore != null && t._pendingCommentRestore !== '') {
|
|
1634
|
+
var restoredComment = t._pendingCommentRestore;
|
|
1635
|
+
t._pendingCommentRestore = null;
|
|
1636
|
+
t.setState({
|
|
1637
|
+
spyj: restoredComment,
|
|
1638
|
+
newspyj: Object.assign({}, t.state.newspyj, { content: restoredComment })
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1627
1641
|
t.initApproveOrgSwitcher();
|
|
1628
1642
|
t.refs["selectMember_circulate"].initSelectData();
|
|
1629
1643
|
t.refs["selectMember_circulate1"].initSelectData();
|
|
@@ -5271,6 +5285,116 @@ var PageHome = function (_React$Component) {
|
|
|
5271
5285
|
|
|
5272
5286
|
//发送流程function
|
|
5273
5287
|
|
|
5288
|
+
}, {
|
|
5289
|
+
key: 'refreshFormAfterOptlockConflict',
|
|
5290
|
+
value: function refreshFormAfterOptlockConflict() {
|
|
5291
|
+
var t = this;
|
|
5292
|
+
var savedComment = t.state.spyj || t.state.newspyj && t.state.newspyj.content || '';
|
|
5293
|
+
t._pendingCommentRestore = savedComment;
|
|
5294
|
+
t._pendingFormDataRestore = null;
|
|
5295
|
+
try {
|
|
5296
|
+
_Popup2.default.hide();
|
|
5297
|
+
} catch (e) {}
|
|
5298
|
+
try {
|
|
5299
|
+
if (typeof _Dialog2.default !== 'undefined' && _Dialog2.default.hide) {
|
|
5300
|
+
_Dialog2.default.hide();
|
|
5301
|
+
}
|
|
5302
|
+
} catch (e2) {}
|
|
5303
|
+
// 办理页是 pageStatus=1,冲突后必须先回到表单页(与取消办理一致)
|
|
5304
|
+
try {
|
|
5305
|
+
if (typeof t.handleCancelClick === 'function') {
|
|
5306
|
+
t.handleCancelClick();
|
|
5307
|
+
} else {
|
|
5308
|
+
t.setState({ pageStatus: '0', operate: 0 });
|
|
5309
|
+
}
|
|
5310
|
+
} catch (e3) {
|
|
5311
|
+
try {
|
|
5312
|
+
t.setState({ pageStatus: '0', operate: 0 });
|
|
5313
|
+
} catch (e4) {}
|
|
5314
|
+
}
|
|
5315
|
+
var param = {
|
|
5316
|
+
formId: t.state.formId,
|
|
5317
|
+
dataId: t.state.dataId,
|
|
5318
|
+
permissionCode: t.state.permissionCode,
|
|
5319
|
+
taskId: t.state.taskId,
|
|
5320
|
+
processInstanceId: t.state.processInstanceId,
|
|
5321
|
+
type: t.state.listType,
|
|
5322
|
+
module: t.state.module,
|
|
5323
|
+
isSub: isSub
|
|
5324
|
+
};
|
|
5325
|
+
_db2.default.FlowModuleAPI.getUndoTaskInfo({
|
|
5326
|
+
taskId: t.state.taskId,
|
|
5327
|
+
processInstanceId: t.state.processInstanceId,
|
|
5328
|
+
module: t.state.module,
|
|
5329
|
+
permissionCode: t.state.permissionCode,
|
|
5330
|
+
dataId: t.state.dataId,
|
|
5331
|
+
formId: t.state.formId
|
|
5332
|
+
}).then(function (content) {
|
|
5333
|
+
if (!content || content.message === 'delete' || content.message === 'view' || content.buttons === '') {
|
|
5334
|
+
_Toast2.default.show({ type: 'error', content: '流程已被他人办理' });
|
|
5335
|
+
setTimeout(function () {
|
|
5336
|
+
if (t.state.isPush == '1') {
|
|
5337
|
+
closePage();
|
|
5338
|
+
} else {
|
|
5339
|
+
backPage();
|
|
5340
|
+
}
|
|
5341
|
+
}, 1500);
|
|
5342
|
+
t._pendingCommentRestore = null;
|
|
5343
|
+
t._pendingForceOptlock = null;
|
|
5344
|
+
return;
|
|
5345
|
+
}
|
|
5346
|
+
var optlock = '';
|
|
5347
|
+
if (content.optlock !== undefined && content.optlock !== null && content.optlock !== '') {
|
|
5348
|
+
optlock = String(content.optlock);
|
|
5349
|
+
} else if (content.formData && content.formData.optlock !== undefined && content.formData.optlock !== null && content.formData.optlock !== '') {
|
|
5350
|
+
optlock = String(content.formData.optlock);
|
|
5351
|
+
}
|
|
5352
|
+
// 注意:content.lock 是流程锁,与主表 optlock 无关;精简 getUndoTaskInfo 可能未带 optlock
|
|
5353
|
+
var afterBackToForm = function afterBackToForm() {
|
|
5354
|
+
// 再次确保仍在表单页(loadPage 异步后办理态可能残留)
|
|
5355
|
+
if (t.state.pageStatus !== '0') {
|
|
5356
|
+
t.setState({ pageStatus: '0', operate: 0 });
|
|
5357
|
+
}
|
|
5358
|
+
try {
|
|
5359
|
+
$(window).scrollTop(0);
|
|
5360
|
+
} catch (e5) {}
|
|
5361
|
+
_Toast2.default.show({
|
|
5362
|
+
type: 'error',
|
|
5363
|
+
content: '该表单已经被别人修改过,已刷新为最新版本,请核对后重新填写并提交',
|
|
5364
|
+
duration: 6000
|
|
5365
|
+
});
|
|
5366
|
+
};
|
|
5367
|
+
// 表单控件只在挂载时读展示值,必须先卸载再 loadPage,否则界面仍是旧显示值
|
|
5368
|
+
var remountAndReload = function remountAndReload(optlockVal) {
|
|
5369
|
+
if (optlockVal) {
|
|
5370
|
+
t._pendingForceOptlock = optlockVal;
|
|
5371
|
+
} else {
|
|
5372
|
+
t._pendingForceOptlock = null;
|
|
5373
|
+
}
|
|
5374
|
+
t.setState({
|
|
5375
|
+
formDataOptlock: optlockVal || '',
|
|
5376
|
+
pageStatus: '0',
|
|
5377
|
+
operate: 0,
|
|
5378
|
+
tableStatus: '0',
|
|
5379
|
+
formTableKey: (t.state.formTableKey || 0) + 1,
|
|
5380
|
+
loadSuccess: false
|
|
5381
|
+
}, function () {
|
|
5382
|
+
setTimeout(function () {
|
|
5383
|
+
t.loadPage(param);
|
|
5384
|
+
afterBackToForm();
|
|
5385
|
+
}, 50);
|
|
5386
|
+
});
|
|
5387
|
+
};
|
|
5388
|
+
remountAndReload(optlock);
|
|
5389
|
+
}).catch(function () {
|
|
5390
|
+
t._pendingCommentRestore = null;
|
|
5391
|
+
t._pendingForceOptlock = null;
|
|
5392
|
+
try {
|
|
5393
|
+
t.setState({ pageStatus: '0', operate: 0 });
|
|
5394
|
+
} catch (e6) {}
|
|
5395
|
+
_Toast2.default.show({ type: 'error', content: '刷新表单失败,请手动刷新页面' });
|
|
5396
|
+
});
|
|
5397
|
+
}
|
|
5274
5398
|
}, {
|
|
5275
5399
|
key: 'sendFlowFuc',
|
|
5276
5400
|
value: function sendFlowFuc(param) {
|
|
@@ -5461,6 +5585,10 @@ var PageHome = function (_React$Component) {
|
|
|
5461
5585
|
if (message.indexOf('已经办理') != -1) {
|
|
5462
5586
|
message = "流程已办理!";
|
|
5463
5587
|
}
|
|
5588
|
+
if (message.indexOf('数据已被他人修改') >= 0 || message.indexOf('请刷新后重试') >= 0) {
|
|
5589
|
+
t.refreshFormAfterOptlockConflict();
|
|
5590
|
+
return;
|
|
5591
|
+
}
|
|
5464
5592
|
setTimeout(function () {
|
|
5465
5593
|
_Toast2.default.show({
|
|
5466
5594
|
type: 'error',
|
|
@@ -8700,7 +8828,7 @@ var PageHome = function (_React$Component) {
|
|
|
8700
8828
|
_react2.default.createElement(
|
|
8701
8829
|
_Group2.default.List,
|
|
8702
8830
|
null,
|
|
8703
|
-
this.state.tableStatus == '0' ? "" : _react2.default.createElement(_table2.default, { ref: 'approveFormTable', module: this.state.module, operate: this.state.operate, editType: this.state.editType, dataId: this.state.dataId, hasCommentField: t.state.hasCommentField, newspyj: t.state.newspyj, commentField: t.state.commentField, commentAttitude: t.state.commentAttitude, status: t.state.status, form: t.state.formItem, formStyleObj: t.state.formStyleObj, subColumnCount: t.state.subColumnCount, allForm: t.state.form, data: t.state.editFormData, commentFieldList: t.state.commentFieldList, defaultValue: t.state.defaultValue, commentDefaultList: t.state.commentDefaultList, commentBackList: t.state.commentBackList, fieldControll: t.state.fieldControll, caIsPrd: t.state.caIsPrd, preCaFields: t.state.preCaFields, formRelaField: t.state.formRelaField, isRemoveCommentFormHtml: t.state.isRemoveCommentFormHtml, commentUpload: t.state.commentUpload, isCaUser: t.state.isCaUser, caFirm: t.state.caFirm, caESignatureName: t.state.caESignatureName, caFormSign: t.state.caFormSign, inscriptionShow: t.state.inscriptionShow, onChange: this.change.bind(this) })
|
|
8831
|
+
this.state.tableStatus == '0' ? "" : _react2.default.createElement(_table2.default, { key: 'approveFormTable_' + this.state.formTableKey, ref: 'approveFormTable', module: this.state.module, operate: this.state.operate, editType: this.state.editType, dataId: this.state.dataId, hasCommentField: t.state.hasCommentField, newspyj: t.state.newspyj, commentField: t.state.commentField, commentAttitude: t.state.commentAttitude, status: t.state.status, form: t.state.formItem, formStyleObj: t.state.formStyleObj, subColumnCount: t.state.subColumnCount, allForm: t.state.form, data: t.state.editFormData, commentFieldList: t.state.commentFieldList, defaultValue: t.state.defaultValue, commentDefaultList: t.state.commentDefaultList, commentBackList: t.state.commentBackList, fieldControll: t.state.fieldControll, caIsPrd: t.state.caIsPrd, preCaFields: t.state.preCaFields, formRelaField: t.state.formRelaField, isRemoveCommentFormHtml: t.state.isRemoveCommentFormHtml, commentUpload: t.state.commentUpload, isCaUser: t.state.isCaUser, caFirm: t.state.caFirm, caESignatureName: t.state.caESignatureName, caFormSign: t.state.caFormSign, inscriptionShow: t.state.inscriptionShow, onChange: this.change.bind(this) })
|
|
8704
8832
|
)
|
|
8705
8833
|
)
|
|
8706
8834
|
)
|