fmui-base 2.3.65 → 2.3.67
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/form/form.js +4 -2
- package/lib/form/subForm.js +6 -6
- package/lib/form/table.js +13 -11
- package/lib/msg_list/msgList.js +8 -2
- package/lib/process_info/processInfo.js +168 -27
- package/lib/process_list/processList.js +8 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/form/form.js
CHANGED
|
@@ -2176,7 +2176,9 @@ var PageHome = function (_React$Component) {
|
|
|
2176
2176
|
var contentCss = this.buildFormCssDecls(cs, { important: true, withLineHeight: true });
|
|
2177
2177
|
cssParts.push([scope + ' .t-text-field-input', scope + ' .t-text-field-content-main', scope + ' .t-text-field-content-main span', scope + ' .t-field-content-box > .t-FB1', scope + ' .t-field-content-box > .t-FB1 span', scope + ' .t-field-multi', scope + ' .t-field-multi span', scope + ' .t-select-field-value', scope + ' .t-select-field-value span', scope + ' .t-radio-field-value', scope + ' .t-radio-field-value span', scope + ' .t-radio-field-value .t-FB1', scope + ' .t-radio-field-value .t-omit', scope + ' .t-datetime-field-value', scope + ' .t-datetime-field-value span', scope + ' .t-textarea-field-content', scope + ' .t-textarea-field-content textarea', scope + ' .t-checkbox-field-content', scope + ' .t-checkbox-field-label', scope + ' .t-checkbox-field-value-list', scope + ' .t-checkbox-field-value-list span', scope + ' .dd-select-input-option-text', scope + ' .t-popuser-value', scope + ' .t-popuser-value span', scope + ' .t-popuser-placeholder', scope + ' .t-poppage-value', scope + ' .t-poppage-value span', scope + ' .t-poppage-placeholder',
|
|
2178
2178
|
// 月日自定义、意见、html 等非 SaltUI 标准内容节点
|
|
2179
|
-
scope + ' .t-FL', scope + ' .flex-comment .t-PT10', scope + ' .flex-comment .t-textarea-field-content',
|
|
2179
|
+
scope + ' .t-FL', scope + ' .flex-comment .t-PT10', scope + ' .flex-comment .t-textarea-field-content',
|
|
2180
|
+
// 批示意见落款与内容字体颜色一致
|
|
2181
|
+
scope + ' .comment-html', scope + ' .comment-html span', scope + ' .ueditor-content', scope + ' .t-FB1.t-FAL', scope + ' .t-FB1.t-omit', scope + ' .t-omit', scope + ' .t-LH1_4', scope + ' .t-FS16', scope + ' .t-field-box.t-FS16', scope + ' .t-field-box.t-FS16 .t-FB1', scope + ' .section-content .t-FB1'].join(',') + '{' + contentCss + '}');
|
|
2180
2182
|
|
|
2181
2183
|
var placeholderCss = this.buildFormCssDecls(cs, { important: true, skipColor: true, withLineHeight: true });
|
|
2182
2184
|
cssParts.push([scope + ' .t-text-field-placeholder', scope + ' .t-select-field-placeholder', scope + ' .t-datetime-field-placeholder', scope + ' .t-checkbox-field-placeholder'].join(',') + '{' + placeholderCss + '}');
|
|
@@ -5005,7 +5007,7 @@ var PageHome = function (_React$Component) {
|
|
|
5005
5007
|
_react2.default.createElement(
|
|
5006
5008
|
'div',
|
|
5007
5009
|
{ className: 't-PT10 t-FB1' },
|
|
5008
|
-
_react2.default.createElement(_List2.default, { list: t.state.itemParam.value, isCaUser: t.state.isCaUser, caFirm: t.state.caFirm, caESignatureName: t.state.caESignatureName, caFormSign: t.state.caFormSign, finalButtons: t.props.finalButtons }),
|
|
5010
|
+
_react2.default.createElement(_List2.default, { list: t.state.itemParam.value, contentStyle: t.state.itemParam.formStyleObj && t.state.itemParam.formStyleObj.contentStyle, isCaUser: t.state.isCaUser, caFirm: t.state.caFirm, caESignatureName: t.state.caESignatureName, caFormSign: t.state.caFormSign, finalButtons: t.props.finalButtons }),
|
|
5009
5011
|
_react2.default.createElement(
|
|
5010
5012
|
'div',
|
|
5011
5013
|
{ className: t.state.commentField == this.state.itemParam.uniqueName ? 't-PL10 t-PR10' : 't-DN' },
|
package/lib/form/subForm.js
CHANGED
|
@@ -932,9 +932,9 @@ var PageHome = function (_React$Component) {
|
|
|
932
932
|
var title = itemPa.itemTitle;
|
|
933
933
|
var subTbl = itemParamList;
|
|
934
934
|
if ($('.' + t.replaceDollar(uniqueName)).length > 0) {
|
|
935
|
-
$('.' + t.
|
|
936
|
-
} else if ($('.hejidiv-' + t.
|
|
937
|
-
$('.hejidiv-' + t.
|
|
935
|
+
$('.' + t.replaceDollar(uniqueName)).html('');
|
|
936
|
+
} else if ($('.hejidiv-' + t.replaceDollar(subTableName)).html() == '') {
|
|
937
|
+
$('.hejidiv-' + t.replaceDollar(subTableName)).html('合计:');
|
|
938
938
|
}
|
|
939
939
|
var subValue = '';
|
|
940
940
|
if (subTbl != null && subTbl.length > 0) {
|
|
@@ -959,10 +959,10 @@ var PageHome = function (_React$Component) {
|
|
|
959
959
|
subValue = '';
|
|
960
960
|
}
|
|
961
961
|
if (subValue != '') {
|
|
962
|
-
if ($('.' + t.
|
|
963
|
-
$('.' + t.
|
|
962
|
+
if ($('.' + t.replaceDollar(uniqueName)).length > 0) {
|
|
963
|
+
$('.' + t.replaceDollar(uniqueName)).html(title + " " + subValue + "; ");
|
|
964
964
|
} else {
|
|
965
|
-
$('.hejidiv-' + t.
|
|
965
|
+
$('.hejidiv-' + t.replaceDollar(subTableName)).append('<span class="' + uniqueName + '">' + title + " " + subValue + "; " + "</span>");
|
|
966
966
|
}
|
|
967
967
|
}
|
|
968
968
|
}
|
package/lib/form/table.js
CHANGED
|
@@ -785,17 +785,19 @@ var PageHome = function (_React$Component) {
|
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
787
|
|
|
788
|
-
|
|
788
|
+
//子表合计(uniqueName/表名常含 $,jQuery 选择器需转义)
|
|
789
789
|
if (itemParam.itemType == 'text' && itemParam.dataAttr && itemParam.dataAttr.isSum == '1') {
|
|
790
790
|
var subTableName = itemParam.tableName;
|
|
791
791
|
var key = itemParam.key;
|
|
792
792
|
var title = itemParam.title;
|
|
793
793
|
var subTbl = data.subTbl;
|
|
794
794
|
var uniqueName = subTableName + "_" + key;
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
$('.
|
|
795
|
+
var uniqueNameSel = this.replaceDollar(uniqueName);
|
|
796
|
+
var subTableNameSel = this.replaceDollar(subTableName);
|
|
797
|
+
if ($('.' + uniqueNameSel).length > 0) {
|
|
798
|
+
$('.' + uniqueNameSel).html('');
|
|
799
|
+
} else if ($('.hejidiv-' + subTableNameSel).html() == '') {
|
|
800
|
+
$('.hejidiv-' + subTableNameSel).html('合计:');
|
|
799
801
|
}
|
|
800
802
|
var subValue = '';
|
|
801
803
|
if (subTbl != null && subTbl.length > 0) {
|
|
@@ -823,16 +825,16 @@ var PageHome = function (_React$Component) {
|
|
|
823
825
|
subValue = '';
|
|
824
826
|
}
|
|
825
827
|
if (subValue !== '') {
|
|
826
|
-
if ($('.' +
|
|
827
|
-
$('.' +
|
|
828
|
+
if ($('.' + uniqueNameSel).length > 0) {
|
|
829
|
+
$('.' + uniqueNameSel).html(title + " " + subValue + "; ");
|
|
828
830
|
} else {
|
|
829
|
-
$('.hejidiv-' +
|
|
831
|
+
$('.hejidiv-' + subTableNameSel).append('<span class="' + uniqueName + '">' + title + " " + subValue + "; " + "</span>");
|
|
830
832
|
}
|
|
831
833
|
}
|
|
832
|
-
var le = $('.hejidiv-' +
|
|
834
|
+
var le = $('.hejidiv-' + subTableNameSel).find('span').length;
|
|
833
835
|
if (le > 0) {
|
|
834
|
-
var tx = $('.hejidiv-' +
|
|
835
|
-
$('.hejidiv-' +
|
|
836
|
+
var tx = $('.hejidiv-' + subTableNameSel).find('span')[le - 1].innerText;
|
|
837
|
+
$('.hejidiv-' + subTableNameSel).find('span')[le - 1].innerText = tx.replace(';', '');
|
|
836
838
|
}
|
|
837
839
|
}
|
|
838
840
|
|
package/lib/msg_list/msgList.js
CHANGED
|
@@ -190,10 +190,16 @@ var ListItem = function (_React$Component) {
|
|
|
190
190
|
var checkIsNotComplete = true;
|
|
191
191
|
var urgencyTag = false;
|
|
192
192
|
var tagClass = '';
|
|
193
|
+
var urgencyStyle = null;
|
|
193
194
|
if (data.type == 0) {
|
|
194
195
|
//待办
|
|
195
196
|
checkIsNotComplete = true;
|
|
196
|
-
|
|
197
|
+
// 优先枚举 fieldColor;无配置时回退历史 60/70/80/90 样式
|
|
198
|
+
if (data.urgencyName && data.fieldColor) {
|
|
199
|
+
urgencyTag = true;
|
|
200
|
+
tagClass = 'label';
|
|
201
|
+
urgencyStyle = { backgroundColor: data.fieldColor, borderColor: data.fieldColor, color: '#fff' };
|
|
202
|
+
} else if (data.urgency == '90') {
|
|
197
203
|
urgencyTag = true;
|
|
198
204
|
tagClass = 'label label-danger';
|
|
199
205
|
} else if (data.urgency == '80') {
|
|
@@ -398,7 +404,7 @@ var ListItem = function (_React$Component) {
|
|
|
398
404
|
{ className: 'approveItem-title' },
|
|
399
405
|
_react2.default.createElement(
|
|
400
406
|
Box,
|
|
401
|
-
{ className: urgencyTag ? tagClass : 't-DN' },
|
|
407
|
+
{ className: urgencyTag ? tagClass : 't-DN', style: urgencyStyle || undefined },
|
|
402
408
|
this.props.urgencyName
|
|
403
409
|
),
|
|
404
410
|
_react2.default.createElement(
|
|
@@ -563,7 +563,7 @@ var PageHome = function (_React$Component) {
|
|
|
563
563
|
selectProcessCode: '', //选中的子流程
|
|
564
564
|
subProcessType: '', //子流程类型 0串行 1并行
|
|
565
565
|
urgencyList: [], //紧急程度列表
|
|
566
|
-
urgency: '' }, _defineProperty(_param, 'urgent', ''), _defineProperty(_param, 'backInitiatorEndFlow', '0'), _defineProperty(_param, 'oauthWindowURL', ''), _defineProperty(_param, 'signDataId', ''), _defineProperty(_param, 'isCaUser', '0'), _defineProperty(_param, 'caFirm', ''), _defineProperty(_param, 'caESignatureName', ''), _defineProperty(_param, 'caFormSign', ''), _defineProperty(_param, 'addlotsReturn', ''), _defineProperty(_param, 'inscriptionShow', ''), _defineProperty(_param, 'showOrgSwitcher', false), _defineProperty(_param, 'approveOrgOptions', []), _defineProperty(_param, 'approveOrgSelectValue', {}), _defineProperty(_param, 'approveOrgLocked', false), _defineProperty(_param, 'approveFormParttimeOrgEnabled', true), _defineProperty(_param, 'approveCurOrgId', ''), _defineProperty(_param, 'startUserOrgId', ''), _defineProperty(_param, 'taskAssignOrgId', ''), _defineProperty(_param, 'approveOrgApiUnavailable', false), _param);
|
|
566
|
+
urgency: '' }, _defineProperty(_param, 'urgent', ''), _defineProperty(_param, 'backInitiatorEndFlow', '0'), _defineProperty(_param, 'oauthWindowURL', ''), _defineProperty(_param, 'signDataId', ''), _defineProperty(_param, 'isCaUser', '0'), _defineProperty(_param, 'caFirm', ''), _defineProperty(_param, 'caESignatureName', ''), _defineProperty(_param, 'caFormSign', ''), _defineProperty(_param, 'addlotsReturn', ''), _defineProperty(_param, 'inscriptionShow', ''), _defineProperty(_param, 'showOrgSwitcher', false), _defineProperty(_param, 'approveOrgOptions', []), _defineProperty(_param, 'approveOrgSelectValue', {}), _defineProperty(_param, 'approveOrgLocked', false), _defineProperty(_param, 'approveFormParttimeOrgEnabled', true), _defineProperty(_param, 'approveProcessMailForwardEnabled', false), _defineProperty(_param, 'approveCurOrgId', ''), _defineProperty(_param, 'startUserOrgId', ''), _defineProperty(_param, 'taskAssignOrgId', ''), _defineProperty(_param, 'approveOrgApiUnavailable', false), _param);
|
|
567
567
|
FlowCommon = require('pages/flow_common/' + module).default ? require('pages/flow_common/' + module).default : require('pages/flow_common/' + module);
|
|
568
568
|
|
|
569
569
|
//处理特有参数
|
|
@@ -779,6 +779,44 @@ var PageHome = function (_React$Component) {
|
|
|
779
779
|
t.imageView(e.target.src);
|
|
780
780
|
}
|
|
781
781
|
});
|
|
782
|
+
// 流程设置「流程办理邮件转发」:默认禁用,仅明确为 1 时启用
|
|
783
|
+
_db2.default.FlowModuleAPI.getSysSettingByMark({ mark: 'approveProcessMailForward' }).then(function (content) {
|
|
784
|
+
var val = content;
|
|
785
|
+
if (content && (typeof content === 'undefined' ? 'undefined' : _typeof(content)) === 'object' && content.content != null) {
|
|
786
|
+
val = content.content;
|
|
787
|
+
}
|
|
788
|
+
var enabled = val == '1';
|
|
789
|
+
t.setState({ approveProcessMailForwardEnabled: enabled }, function () {
|
|
790
|
+
if (enabled) {
|
|
791
|
+
// 配置启用时,若按钮已拼完则补上邮件转发
|
|
792
|
+
var mailBtnState = t.applyMailForwardToButtonState(t.state.buttonList || [], t.state.actionSheetButtonOpt || [], t.state.actionSheetButtonOptName || [], !!t.state.buttonIsMore);
|
|
793
|
+
t.setState({
|
|
794
|
+
buttonList: mailBtnState.buttonList,
|
|
795
|
+
actionSheetButtonOpt: mailBtnState.actionSheetButtonOpt,
|
|
796
|
+
actionSheetButtonOptName: mailBtnState.actionSheetButtonOptName,
|
|
797
|
+
buttonIsMore: mailBtnState.buttonIsMore
|
|
798
|
+
});
|
|
799
|
+
} else {
|
|
800
|
+
var bl = (t.state.buttonList || []).filter(function (b) {
|
|
801
|
+
return !(b && (b.no == 18 || b.no === '18'));
|
|
802
|
+
});
|
|
803
|
+
var opt = [];
|
|
804
|
+
var optName = [];
|
|
805
|
+
var oldOpt = t.state.actionSheetButtonOpt || [];
|
|
806
|
+
var oldName = t.state.actionSheetButtonOptName || [];
|
|
807
|
+
for (var i = 0; i < oldOpt.length; i++) {
|
|
808
|
+
if (oldOpt[i] == 'MAILSEND' || oldOpt[i] == 18) {
|
|
809
|
+
continue;
|
|
810
|
+
}
|
|
811
|
+
opt.push(oldOpt[i]);
|
|
812
|
+
optName.push(oldName[i]);
|
|
813
|
+
}
|
|
814
|
+
t.setState({ buttonList: bl, actionSheetButtonOpt: opt, actionSheetButtonOptName: optName });
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
}).catch(function () {
|
|
818
|
+
t.setState({ approveProcessMailForwardEnabled: false });
|
|
819
|
+
});
|
|
782
820
|
|
|
783
821
|
var taskId = this.state.taskId;
|
|
784
822
|
var processInstanceId = this.state.processInstanceId;
|
|
@@ -1893,7 +1931,7 @@ var PageHome = function (_React$Component) {
|
|
|
1893
1931
|
}
|
|
1894
1932
|
//PAGE_SAVE保存按钮只有当新建时才有,HELP_ADDLOTS加签只有在会签和串签才有,RADOM_FINISH随机流程完成按钮去掉
|
|
1895
1933
|
// OTHER_RELATION 移动端已支持,不再跳过
|
|
1896
|
-
if (buttonCode == 'FLOW_REVOKE' || buttonCode == 'RADOM_FINISH' || buttonCode == 'FLOW_CANCEL' || buttonCode == 'FLOW_RECOVER' || buttonCode == 'PAGE_PRINT' || buttonCode == 'PAGE_URGE' || buttonCode == 'PAGE_REDSET' || buttonCode == 'PAGE_FEEDBACK' || buttonCode == 'RECORD' || buttonCode == 'HELP_ADDLOTS' && participantMode == '0') {
|
|
1934
|
+
if (buttonCode == 'FLOW_REVOKE' || buttonCode == 'RADOM_FINISH' || buttonCode == 'FLOW_CANCEL' || buttonCode == 'FLOW_RECOVER' || buttonCode == 'PAGE_PRINT' || buttonCode == 'PAGE_URGE' || buttonCode == 'PAGE_REDSET' || buttonCode == 'PAGE_FEEDBACK' || buttonCode == 'RECORD' || buttonCode == 'MAILSEND' || buttonCode == 'HELP_ADDLOTS' && participantMode == '0') {
|
|
1897
1935
|
continue;
|
|
1898
1936
|
} else {
|
|
1899
1937
|
if (isStart == true && permissionCode == 'start' || isDraft == '1') {
|
|
@@ -1938,9 +1976,11 @@ var PageHome = function (_React$Component) {
|
|
|
1938
1976
|
for (var d = 0; d < extensionButtonList.length; d++) {
|
|
1939
1977
|
buttonList.push(extensionButtonList[d]);
|
|
1940
1978
|
}
|
|
1979
|
+
buttonList = t.appendMailForwardButton(buttonList);
|
|
1941
1980
|
} else if (listType == "3") {
|
|
1942
1981
|
buttonList.push({ name: t.state.finalButtons.get("HELP_CIRCULATE"), type: 'secondary', display: 'inline', no: 4 });
|
|
1943
1982
|
buttonList.push({ name: t.state.finalButtons.get("HELP_FORWARD"), type: 'secondary', display: 'inline', no: 20 });
|
|
1983
|
+
buttonList = t.appendMailForwardButton(buttonList);
|
|
1944
1984
|
} else if (listType == "4") {
|
|
1945
1985
|
//我的
|
|
1946
1986
|
var processStatusNow = String(content.processStatus != null ? content.processStatus : content.status != null ? content.status : '');
|
|
@@ -1993,14 +2033,12 @@ var PageHome = function (_React$Component) {
|
|
|
1993
2033
|
//传阅
|
|
1994
2034
|
buttonList.push({ name: t.state.finalButtons.get("HELP_CIRCULATE"), type: 'secondary', display: 'inline', no: 4 });
|
|
1995
2035
|
}
|
|
1996
|
-
// 与 PC 一致:发起人节点配置了 MAILSEND 时显示邮件转发
|
|
1997
|
-
if (startButtons.indexOf('MAILSEND') >= 0) {
|
|
1998
|
-
buttonList.push({ name: t.state.finalButtons.get("MAILSEND") || '邮件转发', type: 'secondary', display: 'inline', no: 18 });
|
|
1999
|
-
}
|
|
2000
2036
|
}
|
|
2001
2037
|
for (var d = 0; d < extensionButtonList.length; d++) {
|
|
2002
2038
|
buttonList.push(extensionButtonList[d]);
|
|
2003
2039
|
}
|
|
2040
|
+
// 邮件转发改由流程设置总开关控制,忽略发起人节点 MAILSEND
|
|
2041
|
+
buttonList = t.appendMailForwardButton(buttonList);
|
|
2004
2042
|
} else if (listType == "5") {
|
|
2005
2043
|
for (var d = 0; d < extensionButtonList.length; d++) {
|
|
2006
2044
|
buttonArray.push(extensionButtonList[d].name);
|
|
@@ -2731,8 +2769,9 @@ var PageHome = function (_React$Component) {
|
|
|
2731
2769
|
processInstanceId: _this2.state.processInstanceId,
|
|
2732
2770
|
permissionCode: _this2.state.permissionCode
|
|
2733
2771
|
// 仅当提交 formData 有真实主键时带 optlock(勿用 state.dataId 兜底,新建易误传)
|
|
2772
|
+
// 自动通过继续办理不带:首轮已落库,本地 optlock 已过期
|
|
2734
2773
|
};if (t.state.module === 'approve') {
|
|
2735
|
-
if ((0, _filterEmptySubTblRows.isValidFormDataId)(sendData && sendData.dataId) && t.state.formDataOptlock !== '' && t.state.formDataOptlock != null) {
|
|
2774
|
+
if (!t.state.autoSendFlag && (0, _filterEmptySubTblRows.isValidFormDataId)(sendData && sendData.dataId) && t.state.formDataOptlock !== '' && t.state.formDataOptlock != null) {
|
|
2736
2775
|
param.optlock = t.state.formDataOptlock;
|
|
2737
2776
|
} else if (param.optlock !== undefined) {
|
|
2738
2777
|
delete param.optlock;
|
|
@@ -5778,6 +5817,7 @@ var PageHome = function (_React$Component) {
|
|
|
5778
5817
|
* - 以 formData.dataId 为准(再 slim 一次)
|
|
5779
5818
|
* - 无有效主键时删除顶栏 optlock,并去掉 formData 内 optlock
|
|
5780
5819
|
* - 勿用 state.dataId 兜底(新建场景易误传 0)
|
|
5820
|
+
* - 自动通过继续办理:首轮已落库,optlock 已过期且响应未回新版本,不传以避免乐观锁冲突
|
|
5781
5821
|
*/
|
|
5782
5822
|
|
|
5783
5823
|
}, {
|
|
@@ -5796,6 +5836,17 @@ var PageHome = function (_React$Component) {
|
|
|
5796
5836
|
} catch (e1) {
|
|
5797
5837
|
fd = null;
|
|
5798
5838
|
}
|
|
5839
|
+
// 自动通过二次办理:不传 optlock(首轮提交后版本已变,本地未刷新)
|
|
5840
|
+
if (t.state.autoSendFlag) {
|
|
5841
|
+
delete param.optlock;
|
|
5842
|
+
if (fd && fd.hasOwnProperty('optlock')) {
|
|
5843
|
+
delete fd.optlock;
|
|
5844
|
+
try {
|
|
5845
|
+
param.formData = JSON.stringify(fd);
|
|
5846
|
+
} catch (e0) {}
|
|
5847
|
+
}
|
|
5848
|
+
return;
|
|
5849
|
+
}
|
|
5799
5850
|
var payloadDataId = '';
|
|
5800
5851
|
if (fd && (0, _filterEmptySubTblRows.isValidFormDataId)(fd.dataId)) {
|
|
5801
5852
|
payloadDataId = fd.dataId;
|
|
@@ -5993,6 +6044,8 @@ var PageHome = function (_React$Component) {
|
|
|
5993
6044
|
operate: 1,
|
|
5994
6045
|
autoSendText: autoSendText,
|
|
5995
6046
|
dataId: newdataId,
|
|
6047
|
+
// 首轮 sendFlow 已更新主表版本,响应未带回新 optlock,清空以免二次办理乐观锁失败
|
|
6048
|
+
formDataOptlock: '',
|
|
5996
6049
|
autoPassCommentSynced: !!synced,
|
|
5997
6050
|
autoPassCommentContent: syncedContent,
|
|
5998
6051
|
autoPassCommentId: syncedId
|
|
@@ -7629,16 +7682,18 @@ var PageHome = function (_React$Component) {
|
|
|
7629
7682
|
var _this4 = this;
|
|
7630
7683
|
|
|
7631
7684
|
// buttonCodes=buttonCodes.replace('OTHER_RELATION','');
|
|
7632
|
-
//
|
|
7685
|
+
// 邮件转发改由流程设置总开关控制,忽略节点 MAILSEND
|
|
7686
|
+
if (buttonCodes != null && buttonCodes != '') {
|
|
7687
|
+
buttonCodes = (',' + buttonCodes + ',').replace(/,MAILSEND,/g, ',').replace(/^,|,$/g, '');
|
|
7688
|
+
}
|
|
7633
7689
|
if (buttonCodes == null || buttonCodes == '') {
|
|
7634
|
-
|
|
7635
|
-
|
|
7636
|
-
|
|
7637
|
-
|
|
7638
|
-
|
|
7639
|
-
|
|
7640
|
-
|
|
7641
|
-
|
|
7690
|
+
var emptyBtnState = this.applyMailForwardToButtonState(extensionButtonList ? extensionButtonList.slice() : [], [], [], false);
|
|
7691
|
+
this.setState({
|
|
7692
|
+
buttonList: emptyBtnState.buttonList,
|
|
7693
|
+
actionSheetButtonOpt: emptyBtnState.actionSheetButtonOpt,
|
|
7694
|
+
actionSheetButtonOptName: emptyBtnState.actionSheetButtonOptName,
|
|
7695
|
+
buttonIsMore: emptyBtnState.buttonIsMore
|
|
7696
|
+
});
|
|
7642
7697
|
} else {
|
|
7643
7698
|
_db2.default.FlowModuleAPI.getListButtonsByCodes({
|
|
7644
7699
|
buttonCodes: buttonCodes
|
|
@@ -7735,7 +7790,7 @@ var PageHome = function (_React$Component) {
|
|
|
7735
7790
|
} else if (buttonCode == 'HELP_DISTRIBUTE') {
|
|
7736
7791
|
buttonCodeListNew.push({ name: buttonName, type: 'secondary', display: 'inline', no: 'distributeFlow' });
|
|
7737
7792
|
} else if (buttonCode == 'MAILSEND') {
|
|
7738
|
-
|
|
7793
|
+
// 忽略节点 MAILSEND,改由总开关追加
|
|
7739
7794
|
} else if (buttonCode == 'OTHER_RELATION') {
|
|
7740
7795
|
buttonCodeListNew.push({ name: buttonName, type: 'secondary', display: 'inline', no: 'OTHER_RELATION' });
|
|
7741
7796
|
} else {
|
|
@@ -7806,7 +7861,7 @@ var PageHome = function (_React$Component) {
|
|
|
7806
7861
|
} else if (buttonCode == 'HELP_FORWARD') {
|
|
7807
7862
|
buttonList.push({ name: buttonName, type: 'secondary', display: 'inline', no: 20 });
|
|
7808
7863
|
} else if (buttonCode == 'MAILSEND') {
|
|
7809
|
-
|
|
7864
|
+
// 忽略节点 MAILSEND,改由总开关追加
|
|
7810
7865
|
} else if (buttonCode == 'OTHER_RELATION') {
|
|
7811
7866
|
buttonList.push({ name: buttonName, type: 'secondary', display: 'inline', no: 'OTHER_RELATION' });
|
|
7812
7867
|
} else {
|
|
@@ -7814,6 +7869,11 @@ var PageHome = function (_React$Component) {
|
|
|
7814
7869
|
}
|
|
7815
7870
|
}
|
|
7816
7871
|
}
|
|
7872
|
+
var mailBtnState = _this4.applyMailForwardToButtonState(buttonList, actionSheetButtonOpt, actionSheetButtonOptName, buttonIsMore);
|
|
7873
|
+
buttonList = mailBtnState.buttonList;
|
|
7874
|
+
actionSheetButtonOpt = mailBtnState.actionSheetButtonOpt;
|
|
7875
|
+
actionSheetButtonOptName = mailBtnState.actionSheetButtonOptName;
|
|
7876
|
+
buttonIsMore = mailBtnState.buttonIsMore;
|
|
7817
7877
|
|
|
7818
7878
|
_this4.setState({
|
|
7819
7879
|
buttonCodeList: content,
|
|
@@ -8771,6 +8831,84 @@ var PageHome = function (_React$Component) {
|
|
|
8771
8831
|
value: function isApproveFormParttimeOrgEnabled() {
|
|
8772
8832
|
return this.state.approveFormParttimeOrgEnabled !== false;
|
|
8773
8833
|
}
|
|
8834
|
+
|
|
8835
|
+
/** 流程设置「流程办理邮件转发」是否启用,默认禁用(仅明确为 1 时启用) */
|
|
8836
|
+
|
|
8837
|
+
}, {
|
|
8838
|
+
key: 'isApproveProcessMailForwardEnabled',
|
|
8839
|
+
value: function isApproveProcessMailForwardEnabled() {
|
|
8840
|
+
return this.state.approveProcessMailForwardEnabled === true;
|
|
8841
|
+
}
|
|
8842
|
+
|
|
8843
|
+
/** 待办/待阅/已办/已阅/我的等办理入口(含推送待办,以 listType 为准) */
|
|
8844
|
+
|
|
8845
|
+
}, {
|
|
8846
|
+
key: 'isMailForwardListType',
|
|
8847
|
+
value: function isMailForwardListType() {
|
|
8848
|
+
var lt = String(this.state.listType);
|
|
8849
|
+
return lt === '0' || lt === '1' || lt === '2' || lt === '3' || lt === '4';
|
|
8850
|
+
}
|
|
8851
|
+
|
|
8852
|
+
/** 按总开关追加邮件转发按钮,忽略节点 MAILSEND;避免重复 */
|
|
8853
|
+
|
|
8854
|
+
}, {
|
|
8855
|
+
key: 'appendMailForwardButton',
|
|
8856
|
+
value: function appendMailForwardButton(buttonList) {
|
|
8857
|
+
if (!buttonList) {
|
|
8858
|
+
buttonList = [];
|
|
8859
|
+
}
|
|
8860
|
+
if (!this.isApproveProcessMailForwardEnabled() || !this.isMailForwardListType()) {
|
|
8861
|
+
return buttonList;
|
|
8862
|
+
}
|
|
8863
|
+
for (var i = 0; i < buttonList.length; i++) {
|
|
8864
|
+
if (buttonList[i] && (buttonList[i].no == 18 || buttonList[i].no === '18')) {
|
|
8865
|
+
return buttonList;
|
|
8866
|
+
}
|
|
8867
|
+
}
|
|
8868
|
+
buttonList.push({
|
|
8869
|
+
name: this.state.finalButtons && this.state.finalButtons.get("MAILSEND") || '邮件转发',
|
|
8870
|
+
type: 'secondary',
|
|
8871
|
+
display: 'inline',
|
|
8872
|
+
no: 18
|
|
8873
|
+
});
|
|
8874
|
+
return buttonList;
|
|
8875
|
+
}
|
|
8876
|
+
|
|
8877
|
+
/** 待办「更多」面板时把邮件转发放入动作面板,否则追加到按钮条 */
|
|
8878
|
+
|
|
8879
|
+
}, {
|
|
8880
|
+
key: 'applyMailForwardToButtonState',
|
|
8881
|
+
value: function applyMailForwardToButtonState(buttonList, actionSheetButtonOpt, actionSheetButtonOptName, buttonIsMore) {
|
|
8882
|
+
if (!this.isApproveProcessMailForwardEnabled() || !this.isMailForwardListType()) {
|
|
8883
|
+
return {
|
|
8884
|
+
buttonList: buttonList || [],
|
|
8885
|
+
actionSheetButtonOpt: actionSheetButtonOpt || [],
|
|
8886
|
+
actionSheetButtonOptName: actionSheetButtonOptName || [],
|
|
8887
|
+
buttonIsMore: !!buttonIsMore
|
|
8888
|
+
};
|
|
8889
|
+
}
|
|
8890
|
+
buttonList = buttonList || [];
|
|
8891
|
+
actionSheetButtonOpt = actionSheetButtonOpt || [];
|
|
8892
|
+
actionSheetButtonOptName = actionSheetButtonOptName || [];
|
|
8893
|
+
var mailName = this.state.finalButtons && this.state.finalButtons.get("MAILSEND") || '邮件转发';
|
|
8894
|
+
for (var i = 0; i < buttonList.length; i++) {
|
|
8895
|
+
if (buttonList[i] && (buttonList[i].no == 18 || buttonList[i].no === '18')) {
|
|
8896
|
+
return { buttonList: buttonList, actionSheetButtonOpt: actionSheetButtonOpt, actionSheetButtonOptName: actionSheetButtonOptName, buttonIsMore: !!buttonIsMore };
|
|
8897
|
+
}
|
|
8898
|
+
}
|
|
8899
|
+
for (var j = 0; j < actionSheetButtonOpt.length; j++) {
|
|
8900
|
+
if (actionSheetButtonOpt[j] == 'MAILSEND' || actionSheetButtonOpt[j] == 18) {
|
|
8901
|
+
return { buttonList: buttonList, actionSheetButtonOpt: actionSheetButtonOpt, actionSheetButtonOptName: actionSheetButtonOptName, buttonIsMore: !!buttonIsMore };
|
|
8902
|
+
}
|
|
8903
|
+
}
|
|
8904
|
+
if (buttonIsMore) {
|
|
8905
|
+
actionSheetButtonOpt.push('MAILSEND');
|
|
8906
|
+
actionSheetButtonOptName.push(mailName);
|
|
8907
|
+
} else {
|
|
8908
|
+
buttonList = this.appendMailForwardButton(buttonList);
|
|
8909
|
+
}
|
|
8910
|
+
return { buttonList: buttonList, actionSheetButtonOpt: actionSheetButtonOpt, actionSheetButtonOptName: actionSheetButtonOptName, buttonIsMore: !!buttonIsMore };
|
|
8911
|
+
}
|
|
8774
8912
|
}, {
|
|
8775
8913
|
key: 'renderApproveOrgSwitcher',
|
|
8776
8914
|
value: function renderApproveOrgSwitcher(orgList, selectedOrgId, locked) {
|
|
@@ -10001,24 +10139,27 @@ var PageHome = function (_React$Component) {
|
|
|
10001
10139
|
onChange: this.changeTransferShortMessage.bind(this),
|
|
10002
10140
|
required: false })
|
|
10003
10141
|
),
|
|
10004
|
-
_react2.default.createElement(
|
|
10142
|
+
this.state.listType == 1 && this.state.readtype == "1" && this.state.loadSuccess ? _react2.default.createElement(
|
|
10005
10143
|
'div',
|
|
10006
|
-
{ className:
|
|
10144
|
+
{ className: 't-P0 t-bottom-fixed' },
|
|
10007
10145
|
_react2.default.createElement(
|
|
10008
10146
|
_Button2.default.Group,
|
|
10009
10147
|
null,
|
|
10010
|
-
_react2.default.createElement(
|
|
10148
|
+
[_react2.default.createElement(
|
|
10011
10149
|
_Button2.default,
|
|
10012
|
-
{ type: 'secondary', display: 'inline', onClick: t.handleSubmit.bind(t, 4) },
|
|
10150
|
+
{ key: 'circulate', type: 'secondary', display: 'inline', onClick: t.handleSubmit.bind(t, 4) },
|
|
10013
10151
|
this.state.finalButtons.get("HELP_CIRCULATE")
|
|
10014
|
-
),
|
|
10015
|
-
|
|
10152
|
+
), this.isApproveProcessMailForwardEnabled() ? _react2.default.createElement(
|
|
10153
|
+
_Button2.default,
|
|
10154
|
+
{ key: 'mail', type: 'secondary', display: 'inline', onClick: t.handleSubmit.bind(t, 18) },
|
|
10155
|
+
this.state.finalButtons.get("MAILSEND") || '邮件转发'
|
|
10156
|
+
) : null, _react2.default.createElement(
|
|
10016
10157
|
_Button2.default,
|
|
10017
|
-
{ type: 'primary', display: 'inline', onClick: t.clickRead.bind(t) },
|
|
10158
|
+
{ key: 'read', type: 'primary', display: 'inline', onClick: t.clickRead.bind(t) },
|
|
10018
10159
|
'\u5DF2\u9605'
|
|
10019
|
-
)
|
|
10160
|
+
)].filter(Boolean)
|
|
10020
10161
|
)
|
|
10021
|
-
),
|
|
10162
|
+
) : null,
|
|
10022
10163
|
_react2.default.createElement(
|
|
10023
10164
|
'div',
|
|
10024
10165
|
{ className: this.state.pageStatus == '1' ? "page-add" : 't-DN' },
|
|
@@ -385,6 +385,7 @@ var ListItem = function (_React$Component) {
|
|
|
385
385
|
var checkIsNotComplete = true;
|
|
386
386
|
var urgencyTag = false;
|
|
387
387
|
var tagClass = '';
|
|
388
|
+
var urgencyStyle = null;
|
|
388
389
|
if (data.listTabType == 0 || data.listTabType == 2) {
|
|
389
390
|
//待办 / 已办:缓急角标
|
|
390
391
|
if (data.listTabType == 0) {
|
|
@@ -394,7 +395,12 @@ var ListItem = function (_React$Component) {
|
|
|
394
395
|
} else {
|
|
395
396
|
checkIsNotComplete = true;
|
|
396
397
|
}
|
|
397
|
-
|
|
398
|
+
// 优先枚举 fieldColor;无配置时回退历史 60/70/80/90 样式
|
|
399
|
+
if (data.urgencyName && data.fieldColor) {
|
|
400
|
+
urgencyTag = true;
|
|
401
|
+
tagClass = 'label';
|
|
402
|
+
urgencyStyle = { backgroundColor: data.fieldColor, borderColor: data.fieldColor, color: '#fff' };
|
|
403
|
+
} else if (data.urgency == '90') {
|
|
398
404
|
urgencyTag = true;
|
|
399
405
|
tagClass = 'label label-danger';
|
|
400
406
|
} else if (data.urgency == '80') {
|
|
@@ -598,7 +604,7 @@ var ListItem = function (_React$Component) {
|
|
|
598
604
|
{ className: 'approveItem-title' },
|
|
599
605
|
_react2.default.createElement(
|
|
600
606
|
Box,
|
|
601
|
-
{ className: urgencyTag ? tagClass : 't-DN' },
|
|
607
|
+
{ className: urgencyTag ? tagClass : 't-DN', style: urgencyStyle || undefined },
|
|
602
608
|
this.props.urgencyName
|
|
603
609
|
),
|
|
604
610
|
_react2.default.createElement(
|