fmui-base 2.3.47 → 2.3.49
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/comment_list/List.js +51 -7
- package/lib/form/form.js +1 -1
- package/lib/form/table.js +84 -49
- package/lib/form_info/formInfo.js +27 -10
- package/lib/process_info/processInfo.js +90 -26
- package/lib/tblform/FlowCommentPane.js +4 -2
- package/lib/tblform/README.md +12 -7
- package/lib/tblform/TblForm.js +17 -4
- package/package.json +1 -1
package/README.md
CHANGED
package/lib/comment_list/List.js
CHANGED
|
@@ -244,6 +244,28 @@ var PageHome = function (_React$Component) {
|
|
|
244
244
|
}
|
|
245
245
|
return String(attachId).replace(/\|/g, ',');
|
|
246
246
|
}
|
|
247
|
+
|
|
248
|
+
/** 与 PC FormUtils 一致:按 bpm_process_button 按钮名显示,缺省再回退默认文案 */
|
|
249
|
+
|
|
250
|
+
}, {
|
|
251
|
+
key: 'getAddlotsActionLabel',
|
|
252
|
+
value: function getAddlotsActionLabel(isAddlots) {
|
|
253
|
+
var codeMap = { '1': 'HELP_ADDLOTS', '2': 'BACK', '3': 'BASE_TRANSFER' };
|
|
254
|
+
var defaultMap = { '1': '加签', '2': '退回', '3': '转交' };
|
|
255
|
+
if (!isAddlots || !codeMap[isAddlots]) {
|
|
256
|
+
return '';
|
|
257
|
+
}
|
|
258
|
+
var actionName = defaultMap[isAddlots];
|
|
259
|
+
var buttons = this.props.finalButtons;
|
|
260
|
+
if (buttons) {
|
|
261
|
+
var fromBtn = typeof buttons.get === 'function' ? buttons.get(codeMap[isAddlots]) : buttons[codeMap[isAddlots]];
|
|
262
|
+
if (fromBtn) {
|
|
263
|
+
actionName = fromBtn;
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
// 意见上若已带解析好的名称则优先(兼容接口/上层预处理)
|
|
267
|
+
return '(' + actionName + ')';
|
|
268
|
+
}
|
|
247
269
|
}, {
|
|
248
270
|
key: 'getCommentSign',
|
|
249
271
|
value: function getCommentSign(item) {
|
|
@@ -251,17 +273,26 @@ var PageHome = function (_React$Component) {
|
|
|
251
273
|
var returnHtml;
|
|
252
274
|
if (item.inscriptionShow) {
|
|
253
275
|
var userName = item.userName;
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
276
|
+
var addlotsLabel = '';
|
|
277
|
+
//是否加签/退回/转交:优先用按钮配置名称(如「加签1」),与 PC 落款一致
|
|
278
|
+
if (item.addlotsActionName) {
|
|
279
|
+
addlotsLabel = '(' + item.addlotsActionName + ')';
|
|
280
|
+
} else if (item.isAddlots) {
|
|
281
|
+
addlotsLabel = t.getAddlotsActionLabel(item.isAddlots);
|
|
282
|
+
}
|
|
283
|
+
if (addlotsLabel && userName) {
|
|
284
|
+
userName = userName + addlotsLabel;
|
|
259
285
|
}
|
|
260
286
|
var userNameHtml = _react2.default.createElement(
|
|
261
287
|
'span',
|
|
262
288
|
{ className: 't-PR5 userName' },
|
|
263
289
|
item.replacename && item.replacename != "" ? item.replacename : userName
|
|
264
290
|
);
|
|
291
|
+
var addlotsOnlyHtml = addlotsLabel ? _react2.default.createElement(
|
|
292
|
+
'span',
|
|
293
|
+
{ className: 't-PR5 userName' },
|
|
294
|
+
addlotsLabel
|
|
295
|
+
) : null;
|
|
265
296
|
|
|
266
297
|
var dateHtml = _react2.default.createElement(
|
|
267
298
|
'span',
|
|
@@ -288,9 +319,10 @@ var PageHome = function (_React$Component) {
|
|
|
288
319
|
);
|
|
289
320
|
var sealHtml = item.sealFileId && item.sealFileId !== "" ? _react2.default.createElement('img', { className: 't-PR5', src: t.state.loadImg + item.sealFileId, style: { 'position': 'absolute', 'top': '-35px', 'right': '10px', 'height': '64px', 'opacity': 0.8 } }) : "";
|
|
290
321
|
var inscriptionShowArray = item.inscriptionShow.split(",");
|
|
322
|
+
var showUserName = inscriptionShowArray.indexOf("userName") >= 0 && (item.inscriptionShow.indexOf("signImg") < 0 || item.inscriptionShow.indexOf("signImg") >= 0 && !hasSignImg);
|
|
291
323
|
var _returnHtml = inscriptionShowArray.map(function (inscriptionItem) {
|
|
292
324
|
if (inscriptionItem) {
|
|
293
|
-
if (inscriptionItem == "userName" &&
|
|
325
|
+
if (inscriptionItem == "userName" && showUserName) {
|
|
294
326
|
return userNameHtml;
|
|
295
327
|
} else if (inscriptionItem == "date") {
|
|
296
328
|
return dateHtml;
|
|
@@ -299,6 +331,15 @@ var PageHome = function (_React$Component) {
|
|
|
299
331
|
} else if (inscriptionItem == "org") {
|
|
300
332
|
return orgNameHtml;
|
|
301
333
|
} else if (inscriptionItem == "signImg") {
|
|
334
|
+
// 签名图顶替姓名时,标识跟在签名图后
|
|
335
|
+
if (hasSignImg && addlotsLabel && !showUserName) {
|
|
336
|
+
return _react2.default.createElement(
|
|
337
|
+
'span',
|
|
338
|
+
{ key: 'signWithAddlots' },
|
|
339
|
+
signPicHtml,
|
|
340
|
+
addlotsOnlyHtml
|
|
341
|
+
);
|
|
342
|
+
}
|
|
302
343
|
return signPicHtml;
|
|
303
344
|
} else if (inscriptionItem == "taskName") {
|
|
304
345
|
return taskNameHtml;
|
|
@@ -307,11 +348,14 @@ var PageHome = function (_React$Component) {
|
|
|
307
348
|
}
|
|
308
349
|
}
|
|
309
350
|
});
|
|
310
|
-
|
|
351
|
+
// 落款无姓名且无签名图可挂靠时,单独补标识
|
|
352
|
+
var needTrailingAddlots = addlotsLabel && !showUserName && !(hasSignImg && item.inscriptionShow.indexOf("signImg") >= 0);
|
|
353
|
+
var replaceHtml = item.replacename && item.replacename != "" ? "(代" + (item.userName || "") + "办理)" : "";
|
|
311
354
|
return _react2.default.createElement(
|
|
312
355
|
Box,
|
|
313
356
|
{ className: 'comment-html', style: { marginLeft: "auto", "text-align": "right", width: '100%', 'position': 'relative' } },
|
|
314
357
|
_returnHtml,
|
|
358
|
+
needTrailingAddlots ? addlotsOnlyHtml : null,
|
|
315
359
|
replaceHtml
|
|
316
360
|
);
|
|
317
361
|
} else {
|
package/lib/form/form.js
CHANGED
|
@@ -4910,7 +4910,7 @@ var PageHome = function (_React$Component) {
|
|
|
4910
4910
|
_react2.default.createElement(
|
|
4911
4911
|
'div',
|
|
4912
4912
|
{ className: 't-PT10 t-FB1' },
|
|
4913
|
-
_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 }),
|
|
4913
|
+
_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 }),
|
|
4914
4914
|
_react2.default.createElement(
|
|
4915
4915
|
'div',
|
|
4916
4916
|
{ className: t.state.commentField == this.state.itemParam.uniqueName ? 't-PL10 t-PR10' : 't-DN' },
|
package/lib/form/table.js
CHANGED
|
@@ -165,6 +165,63 @@ function buildFormRelaFieldMapsByRelaField(triggerFieldsMap) {
|
|
|
165
165
|
return relaFieldsMap;
|
|
166
166
|
}
|
|
167
167
|
|
|
168
|
+
/**
|
|
169
|
+
* 解析 getRelaFieldsMap 接口返回,写入模块级 triggerFieldsMap,并返回按关联字段分组的 relaFieldsMap
|
|
170
|
+
*/
|
|
171
|
+
function parseRelaFieldsMapResponse(responseData) {
|
|
172
|
+
var formRelaFieldMapsNew = {};
|
|
173
|
+
if (!responseData) {
|
|
174
|
+
formRelaFieldMaps = null;
|
|
175
|
+
return formRelaFieldMapsNew;
|
|
176
|
+
}
|
|
177
|
+
// 兼容新老接口:新结构 {triggerFieldsMap,relaFieldsMap};老结构直接为按触发字段分组的 Map
|
|
178
|
+
if (responseData.triggerFieldsMap) {
|
|
179
|
+
formRelaFieldMaps = responseData.triggerFieldsMap;
|
|
180
|
+
formRelaFieldMapsNew = responseData.relaFieldsMap;
|
|
181
|
+
} else {
|
|
182
|
+
formRelaFieldMaps = responseData;
|
|
183
|
+
formRelaFieldMapsNew = null;
|
|
184
|
+
}
|
|
185
|
+
// 老接口或新接口未返回 relaFieldsMap 时,前端按 sortNo 本地转换,保证联动逻辑一致
|
|
186
|
+
if (!formRelaFieldMapsNew || Object.keys(formRelaFieldMapsNew).length === 0) {
|
|
187
|
+
formRelaFieldMapsNew = buildFormRelaFieldMapsByRelaField(formRelaFieldMaps);
|
|
188
|
+
}
|
|
189
|
+
return formRelaFieldMapsNew || {};
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
/**
|
|
193
|
+
* 同步拉取关联字段配置(setId = formRelaField)
|
|
194
|
+
*/
|
|
195
|
+
function fetchFormRelaFieldMapsSync(formId, formRelaField) {
|
|
196
|
+
var formRelaFieldMapsNew = {};
|
|
197
|
+
if (!formRelaField) {
|
|
198
|
+
formRelaFieldMaps = null;
|
|
199
|
+
return formRelaFieldMapsNew;
|
|
200
|
+
}
|
|
201
|
+
$.ajax({
|
|
202
|
+
type: 'GET',
|
|
203
|
+
url: getLoginUserInfo().context + "/api/m/model/formmgr/relafield/getRelaFieldsMap",
|
|
204
|
+
data: {
|
|
205
|
+
formId: formId,
|
|
206
|
+
setId: formRelaField
|
|
207
|
+
},
|
|
208
|
+
headers: {
|
|
209
|
+
Authorization: 'Bearer ' + getLoginUserInfo().token
|
|
210
|
+
},
|
|
211
|
+
dataType: "json",
|
|
212
|
+
async: false,
|
|
213
|
+
success: function success(data) {
|
|
214
|
+
if (data.code == "0") {
|
|
215
|
+
formRelaFieldMapsNew = parseRelaFieldsMapResponse(data.data || {});
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
error: function error() {
|
|
219
|
+
console.log("异常");
|
|
220
|
+
}
|
|
221
|
+
});
|
|
222
|
+
return formRelaFieldMapsNew;
|
|
223
|
+
}
|
|
224
|
+
|
|
168
225
|
// 构建联动下拉选项(对齐 PC:从联动结果 + 已保存 multiItemsLinkField 取显示文本)
|
|
169
226
|
function buildLinkageSelectOptions(contentValue, relateItemParam, fieldDataItem) {
|
|
170
227
|
var selectOptions = [];
|
|
@@ -242,47 +299,12 @@ var PageHome = function (_React$Component) {
|
|
|
242
299
|
|
|
243
300
|
var defaultValue = props.defaultValue;
|
|
244
301
|
var status = props.status;
|
|
245
|
-
var formRelaField = props.formRelaField; //关联字段
|
|
302
|
+
var formRelaField = props.formRelaField; //关联字段 setId(流程从表单接口带出;纯表单由 props 直接传入)
|
|
246
303
|
var linkFields = props.allForm ? props.allForm.linkFields : ""; //级联字段
|
|
247
304
|
var formId = props.data ? props.data.formId : ""; //表单id
|
|
248
305
|
|
|
249
306
|
//关联字段
|
|
250
|
-
var formRelaFieldMapsNew =
|
|
251
|
-
if (formRelaField) {
|
|
252
|
-
$.ajax({
|
|
253
|
-
type: 'GET',
|
|
254
|
-
url: getLoginUserInfo().context + "/api/m/model/formmgr/relafield/getRelaFieldsMap",
|
|
255
|
-
data: {
|
|
256
|
-
formId: formId,
|
|
257
|
-
setId: formRelaField
|
|
258
|
-
},
|
|
259
|
-
headers: {
|
|
260
|
-
Authorization: 'Bearer ' + getLoginUserInfo().token
|
|
261
|
-
},
|
|
262
|
-
dataType: "json",
|
|
263
|
-
async: false,
|
|
264
|
-
success: function success(data) {
|
|
265
|
-
if (data.code == "0") {
|
|
266
|
-
var responseData = data.data || {};
|
|
267
|
-
// 兼容新老接口:新结构 {triggerFieldsMap,relaFieldsMap};老结构直接为按触发字段分组的 Map
|
|
268
|
-
if (responseData.triggerFieldsMap) {
|
|
269
|
-
formRelaFieldMaps = responseData.triggerFieldsMap;
|
|
270
|
-
formRelaFieldMapsNew = responseData.relaFieldsMap;
|
|
271
|
-
} else {
|
|
272
|
-
formRelaFieldMaps = responseData;
|
|
273
|
-
formRelaFieldMapsNew = null;
|
|
274
|
-
}
|
|
275
|
-
// 老接口或新接口未返回 relaFieldsMap 时,前端按 sortNo 本地转换,保证联动逻辑一致
|
|
276
|
-
if (!formRelaFieldMapsNew || Object.keys(formRelaFieldMapsNew).length === 0) {
|
|
277
|
-
formRelaFieldMapsNew = buildFormRelaFieldMapsByRelaField(formRelaFieldMaps);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
},
|
|
281
|
-
error: function error() {
|
|
282
|
-
console.log("异常");
|
|
283
|
-
}
|
|
284
|
-
});
|
|
285
|
-
}
|
|
307
|
+
var formRelaFieldMapsNew = fetchFormRelaFieldMapsSync(formId, formRelaField);
|
|
286
308
|
|
|
287
309
|
var linkFieldsNew = {};
|
|
288
310
|
// if(linkFields){
|
|
@@ -420,7 +442,19 @@ var PageHome = function (_React$Component) {
|
|
|
420
442
|
return _this;
|
|
421
443
|
}
|
|
422
444
|
|
|
445
|
+
/**
|
|
446
|
+
* 按 formId + formRelaField(setId) 重新拉取关联字段配置(纯表单 formId/setId 变更时可调用)
|
|
447
|
+
*/
|
|
448
|
+
|
|
449
|
+
|
|
423
450
|
_createClass(PageHome, [{
|
|
451
|
+
key: 'reloadFormRelaFieldMaps',
|
|
452
|
+
value: function reloadFormRelaFieldMaps(formId, formRelaField) {
|
|
453
|
+
var formRelaFieldMapsNew = fetchFormRelaFieldMapsSync(formId, formRelaField);
|
|
454
|
+
this.setState({ formRelaFieldMaps: formRelaFieldMapsNew });
|
|
455
|
+
return formRelaFieldMapsNew;
|
|
456
|
+
}
|
|
457
|
+
}, {
|
|
424
458
|
key: 'componentDidMount',
|
|
425
459
|
value: function componentDidMount() {
|
|
426
460
|
var t = this;
|
|
@@ -436,7 +470,8 @@ var PageHome = function (_React$Component) {
|
|
|
436
470
|
key: 'initFormLinkageAndRelaFields',
|
|
437
471
|
value: function initFormLinkageAndRelaFields() {
|
|
438
472
|
var t = this;
|
|
439
|
-
|
|
473
|
+
// 流程 Table 用 props.data;纯表单 TblForm 用 state.editFormData
|
|
474
|
+
var data = t.props.data || t.state.editFormData;
|
|
440
475
|
if (!data) {
|
|
441
476
|
t._isFormInitialLoading = false;
|
|
442
477
|
return;
|
|
@@ -907,7 +942,7 @@ var PageHome = function (_React$Component) {
|
|
|
907
942
|
key: 'reloadFormRelaField',
|
|
908
943
|
value: function reloadFormRelaField(options) {
|
|
909
944
|
var t = this;
|
|
910
|
-
var data = t.props.data;
|
|
945
|
+
var data = t.props.data || t.state.editFormData;
|
|
911
946
|
var initFlag = options && options.initFlag === true;
|
|
912
947
|
t._isRelaFieldRefreshing = true;
|
|
913
948
|
try {
|
|
@@ -1340,7 +1375,7 @@ var PageHome = function (_React$Component) {
|
|
|
1340
1375
|
if (!relaFieldsMap) {
|
|
1341
1376
|
return;
|
|
1342
1377
|
}
|
|
1343
|
-
var fieldControll = t.props.fieldControll || {};
|
|
1378
|
+
var fieldControll = t.props.fieldControll || t.state.fieldControll || {};
|
|
1344
1379
|
var defaulthideFields = [];
|
|
1345
1380
|
var defaultmustFields = [];
|
|
1346
1381
|
var defaultshowFields = [];
|
|
@@ -1426,7 +1461,7 @@ var PageHome = function (_React$Component) {
|
|
|
1426
1461
|
var defaulthideFields = [];
|
|
1427
1462
|
var defaultshowFields = [];
|
|
1428
1463
|
|
|
1429
|
-
var fieldControll = this.props.fieldControll;
|
|
1464
|
+
var fieldControll = this.props.fieldControll || this.state.fieldControll || {};
|
|
1430
1465
|
var hiddenFields = fieldControll.hiddenFields;
|
|
1431
1466
|
var mustFieldsStr = fieldControll.mustFields;
|
|
1432
1467
|
var showFieldsStr = fieldControll.showFields;
|
|
@@ -2572,16 +2607,16 @@ var PageHome = function (_React$Component) {
|
|
|
2572
2607
|
return _react2.default.createElement(
|
|
2573
2608
|
'div',
|
|
2574
2609
|
{ className: "form_" + item2.uniqueName },
|
|
2575
|
-
_react2.default.createElement(_form2.default, { keyNo: j, ref: item2.uniqueName, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentField: t.props.commentField, commentAttitude: t.props.commentAttitude, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item2, allForm: t.props.allForm, formStyle: t.props.formStyleObj, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, 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, isRemoveCommentFormHtml: t.props.isRemoveCommentFormHtml, inscriptionShow: t.props.inscriptionShow, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
|
|
2610
|
+
_react2.default.createElement(_form2.default, { keyNo: j, ref: item2.uniqueName, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentField: t.props.commentField, commentAttitude: t.props.commentAttitude, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item2, allForm: t.props.allForm, formStyle: t.props.formStyleObj, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, finalButtons: t.props.finalButtons, 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, isRemoveCommentFormHtml: t.props.isRemoveCommentFormHtml, inscriptionShow: t.props.inscriptionShow, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
|
|
2576
2611
|
);
|
|
2577
2612
|
}.bind(this)) : item.itemType == 'detail' ? _react2.default.createElement(
|
|
2578
2613
|
'div',
|
|
2579
2614
|
{ className: "subform_" + item.itemCode },
|
|
2580
|
-
_react2.default.createElement(_subForm2.default, { keyNo: i, ref: 'sub_' + item.itemCode, subColumnCount: t.getSubColumnCount(item), mobileSubTblDefault: t.props.mobileSubTblDefault, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentField: t.props.commentField, commentAttitude: t.props.commentAttitude, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item, allForm: t.props.allForm, formStyle: t.props.formStyleObj, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, 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, isRemoveCommentFormHtml: t.props.isRemoveCommentFormHtml, inscriptionShow: t.props.inscriptionShow, onChange: this.change.bind(this) })
|
|
2615
|
+
_react2.default.createElement(_subForm2.default, { keyNo: i, ref: 'sub_' + item.itemCode, subColumnCount: t.getSubColumnCount(item), mobileSubTblDefault: t.props.mobileSubTblDefault, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentField: t.props.commentField, commentAttitude: t.props.commentAttitude, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item, allForm: t.props.allForm, formStyle: t.props.formStyleObj, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, finalButtons: t.props.finalButtons, 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, isRemoveCommentFormHtml: t.props.isRemoveCommentFormHtml, inscriptionShow: t.props.inscriptionShow, onChange: this.change.bind(this) })
|
|
2581
2616
|
) : _react2.default.createElement(
|
|
2582
2617
|
'div',
|
|
2583
2618
|
{ className: "form_" + item.uniqueName },
|
|
2584
|
-
_react2.default.createElement(_form2.default, { ref: item.uniqueName, keyNo: i, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentField: t.props.commentField, commentAttitude: t.props.commentAttitude, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item, allForm: t.props.allForm, formStyle: t.props.formStyleObj, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, 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, isRemoveCommentFormHtml: t.props.isRemoveCommentFormHtml, inscriptionShow: t.props.inscriptionShow, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
|
|
2619
|
+
_react2.default.createElement(_form2.default, { ref: item.uniqueName, keyNo: i, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentField: t.props.commentField, commentAttitude: t.props.commentAttitude, module: t.props.module, formKey: t.props.allForm.formcode, status: t.props.status, form: item, allForm: t.props.allForm, formStyle: t.props.formStyleObj, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, finalButtons: t.props.finalButtons, 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, isRemoveCommentFormHtml: t.props.isRemoveCommentFormHtml, inscriptionShow: t.props.inscriptionShow, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
|
|
2585
2620
|
);
|
|
2586
2621
|
}.bind(this)) : "" : _react2.default.createElement(
|
|
2587
2622
|
'div',
|
|
@@ -2608,16 +2643,16 @@ var PageHome = function (_React$Component) {
|
|
|
2608
2643
|
return _react2.default.createElement(
|
|
2609
2644
|
'div',
|
|
2610
2645
|
{ className: t.state.active == item.tabCode ? "" : "t-DN" },
|
|
2611
|
-
_react2.default.createElement(_form2.default, { className: "form_" + item.uniqueName, keyNo: j, ref: item.uniqueName, operate: t.props.operate, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentAttitude: t.props.commentAttitude, newspyj: t.props.newspyj, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, status: t.props.status, form: item2, allForm: t.props.allForm, formStyle: t.props.formStyleObj, commentList: t.props.commentFieldList, inscriptionShow: t.props.inscriptionShow, data: t.props.data, fieldControll: t.props.fieldControll, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
|
|
2646
|
+
_react2.default.createElement(_form2.default, { className: "form_" + item.uniqueName, keyNo: j, ref: item.uniqueName, operate: t.props.operate, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentAttitude: t.props.commentAttitude, newspyj: t.props.newspyj, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, finalButtons: t.props.finalButtons, status: t.props.status, form: item2, allForm: t.props.allForm, formStyle: t.props.formStyleObj, commentList: t.props.commentFieldList, inscriptionShow: t.props.inscriptionShow, data: t.props.data, fieldControll: t.props.fieldControll, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
|
|
2612
2647
|
);
|
|
2613
2648
|
}.bind(this)) : item.itemType == 'detail' ? _react2.default.createElement(
|
|
2614
2649
|
'div',
|
|
2615
2650
|
{ className: t.state.active == item.tabCode ? "" : "t-DN" },
|
|
2616
|
-
_react2.default.createElement(_subForm2.default, { className: "subform_" + item.itemCode, keyNo: i, ref: 'sub_' + item.itemCode, subColumnCount: t.getSubColumnCount(item), mobileSubTblDefault: t.props.mobileSubTblDefault, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentAttitude: t.props.commentAttitude, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, status: t.props.status, form: item, allForm: t.props.allForm, formStyle: t.props.formStyleObj, commentList: t.props.commentFieldList, inscriptionShow: t.props.inscriptionShow, data: t.props.data, fieldControll: t.props.fieldControll, onChange: this.change.bind(this) })
|
|
2651
|
+
_react2.default.createElement(_subForm2.default, { className: "subform_" + item.itemCode, keyNo: i, ref: 'sub_' + item.itemCode, subColumnCount: t.getSubColumnCount(item), mobileSubTblDefault: t.props.mobileSubTblDefault, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentAttitude: t.props.commentAttitude, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, finalButtons: t.props.finalButtons, status: t.props.status, form: item, allForm: t.props.allForm, formStyle: t.props.formStyleObj, commentList: t.props.commentFieldList, inscriptionShow: t.props.inscriptionShow, data: t.props.data, fieldControll: t.props.fieldControll, onChange: this.change.bind(this) })
|
|
2617
2652
|
) : _react2.default.createElement(
|
|
2618
2653
|
'div',
|
|
2619
2654
|
{ className: t.state.active == item.tabCode ? "" : "t-DN" },
|
|
2620
|
-
_react2.default.createElement(_form2.default, { className: "form_" + item.uniqueName, ref: item.uniqueName, keyNo: i, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentAttitude: t.props.commentAttitude, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, status: t.props.status, form: item, allForm: t.props.allForm, formStyle: t.props.formStyleObj, commentList: t.props.commentFieldList, inscriptionShow: t.props.inscriptionShow, data: t.props.data, fieldControll: t.props.fieldControll, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
|
|
2655
|
+
_react2.default.createElement(_form2.default, { className: "form_" + item.uniqueName, ref: item.uniqueName, keyNo: i, operate: t.props.operate, newspyj: t.props.newspyj, hasCommentField: t.props.hasCommentField, commentUpload: t.props.commentUpload, commentAttitude: t.props.commentAttitude, commentField: t.props.commentField, module: t.props.module, formKey: t.props.allForm.formcode, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, finalButtons: t.props.finalButtons, status: t.props.status, form: item, allForm: t.props.allForm, formStyle: t.props.formStyleObj, commentList: t.props.commentFieldList, inscriptionShow: t.props.inscriptionShow, data: t.props.data, fieldControll: t.props.fieldControll, onChange: this.change.bind(this), reloadItemParam: this.reloadItemParam.bind(this) })
|
|
2621
2656
|
);
|
|
2622
2657
|
}.bind(this))
|
|
2623
2658
|
)
|
|
@@ -2638,7 +2673,7 @@ var PageHome = function (_React$Component) {
|
|
|
2638
2673
|
_react2.default.createElement(
|
|
2639
2674
|
'div',
|
|
2640
2675
|
{ className: 't-PT10 t-FB1' },
|
|
2641
|
-
_react2.default.createElement(_List2.default, { list: t.props.commentBackList, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign })
|
|
2676
|
+
_react2.default.createElement(_List2.default, { list: t.props.commentBackList, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, finalButtons: t.props.finalButtons })
|
|
2642
2677
|
)
|
|
2643
2678
|
)
|
|
2644
2679
|
),
|
|
@@ -2661,7 +2696,7 @@ var PageHome = function (_React$Component) {
|
|
|
2661
2696
|
_react2.default.createElement(
|
|
2662
2697
|
'div',
|
|
2663
2698
|
{ className: 't-PT10 t-FB1' },
|
|
2664
|
-
t.props.commentDefaultList && t.props.commentDefaultList.length > 0 ? _react2.default.createElement(_List2.default, { list: t.props.commentDefaultList, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign }) : "",
|
|
2699
|
+
t.props.commentDefaultList && t.props.commentDefaultList.length > 0 ? _react2.default.createElement(_List2.default, { list: t.props.commentDefaultList, isCaUser: t.props.isCaUser, caFirm: t.props.caFirm, caESignatureName: t.props.caESignatureName, caFormSign: t.props.caFormSign, finalButtons: t.props.finalButtons }) : "",
|
|
2665
2700
|
_react2.default.createElement(
|
|
2666
2701
|
'div',
|
|
2667
2702
|
{ className: t.props.commentField == "default" ? 't-PL10 t-PR10' : 't-DN' },
|
|
@@ -528,17 +528,34 @@ var PageHome = function (_React$Component) {
|
|
|
528
528
|
});
|
|
529
529
|
}
|
|
530
530
|
|
|
531
|
+
// 办结状态弹窗:仅待办 type=0 或推送 isPush=1
|
|
532
|
+
var showDoneStatusAlert = String(t.state.listType) === '0' || String(t.state.isPush) === '1';
|
|
533
|
+
if (showDoneStatusAlert) {
|
|
534
|
+
if (content['buttons'] == '' && content['message']) {
|
|
535
|
+
var doneMsgMap = {
|
|
536
|
+
'delete': '此文件已删除',
|
|
537
|
+
'transfer': '此文件已转交',
|
|
538
|
+
'jump': '此文件已跳转',
|
|
539
|
+
'zf': '此文件已作废',
|
|
540
|
+
'end': '此文件已结束',
|
|
541
|
+
'withdraw': '此文件已撤回',
|
|
542
|
+
'back': '此文件已退回',
|
|
543
|
+
'view': '此文件已办理'
|
|
544
|
+
};
|
|
545
|
+
var doneAlert = doneMsgMap[content['message']];
|
|
546
|
+
if (doneAlert) {
|
|
547
|
+
t.setState({
|
|
548
|
+
status: '2'
|
|
549
|
+
});
|
|
550
|
+
_Dialog2.default.alert({
|
|
551
|
+
title: '',
|
|
552
|
+
content: doneAlert
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
531
557
|
if (t.state.listType == '0') {
|
|
532
558
|
var tipsTitle = content['tipsTitle'];
|
|
533
|
-
if (content['buttons'] == '' && content['message'] == 'view') {
|
|
534
|
-
t.setState({
|
|
535
|
-
status: '2'
|
|
536
|
-
});
|
|
537
|
-
_Dialog2.default.alert({
|
|
538
|
-
title: '',
|
|
539
|
-
content: '此文件已办理'
|
|
540
|
-
});
|
|
541
|
-
}
|
|
542
559
|
if (t.state.operationDetails != null && t.state.operationDetails != '') {
|
|
543
560
|
if (tipsTitle != null && tipsTitle != '' && tipsTitle != 'undefined') {
|
|
544
561
|
var tipsContent = content['tipsContent'];
|
|
@@ -5360,7 +5377,7 @@ var PageHome = function (_React$Component) {
|
|
|
5360
5377
|
_react2.default.createElement(
|
|
5361
5378
|
_Group2.default.List,
|
|
5362
5379
|
null,
|
|
5363
|
-
this.state.tableStatus == '0' ? "" : _react2.default.createElement(_table2.default, { module: this.state.module, operate: this.state.operate, hasCommentField: t.state.hasCommentField, newspyj: t.state.newspyj, commentField: t.state.commentField, status: t.state.status, form: t.state.formItem, 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, onChange: this.change.bind(this) })
|
|
5380
|
+
this.state.tableStatus == '0' ? "" : _react2.default.createElement(_table2.default, { module: this.state.module, operate: this.state.operate, hasCommentField: t.state.hasCommentField, newspyj: t.state.newspyj, commentField: t.state.commentField, status: t.state.status, form: t.state.formItem, 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, finalButtons: t.state.finalButtons, onChange: this.change.bind(this) })
|
|
5364
5381
|
)
|
|
5365
5382
|
)
|
|
5366
5383
|
)
|
|
@@ -355,6 +355,8 @@ var PageHome = function (_React$Component) {
|
|
|
355
355
|
}
|
|
356
356
|
finalButtons.set('BASE_SUMBIT', '通过');
|
|
357
357
|
finalButtons.set('PAGE_SAVE', '保存草稿');
|
|
358
|
+
// 触发重渲染,批示意见落款可按按钮名称显示(如「加签1」)
|
|
359
|
+
_this.setState({ finalButtons: finalButtons });
|
|
358
360
|
}).catch(function (error) {
|
|
359
361
|
console.error(error);
|
|
360
362
|
});
|
|
@@ -541,6 +543,9 @@ var PageHome = function (_React$Component) {
|
|
|
541
543
|
param.nextTaskId = '';
|
|
542
544
|
param.autoSendFlag = false; //是否是自动通过选人界面
|
|
543
545
|
param.autoSendText = ''; //自动通过选人界面标题
|
|
546
|
+
param.autoPassCommentSynced = false; //Hold 路径是否已按设置同步意见
|
|
547
|
+
param.autoPassCommentContent = ''; //同步出的源意见原文
|
|
548
|
+
param.autoPassCommentId = '';
|
|
544
549
|
param.nextActivityName = '';
|
|
545
550
|
param.backAttachId = ""; //退回增加附件
|
|
546
551
|
param.backInitList = [];
|
|
@@ -841,9 +846,14 @@ var PageHome = function (_React$Component) {
|
|
|
841
846
|
var shortMessageList1=[];
|
|
842
847
|
var readShortMessageList1=[];*/
|
|
843
848
|
if (!content.code) {
|
|
849
|
+
var failMsg = (content.message || content.msg || '') + '';
|
|
850
|
+
var alertContent = '此文件已作废';
|
|
851
|
+
if (failMsg.indexOf('删除') >= 0) {
|
|
852
|
+
alertContent = '此文件已删除';
|
|
853
|
+
}
|
|
844
854
|
_Dialog2.default.alert({
|
|
845
855
|
title: '',
|
|
846
|
-
content:
|
|
856
|
+
content: alertContent
|
|
847
857
|
});
|
|
848
858
|
if (isPush == '1') {
|
|
849
859
|
closePage();
|
|
@@ -1151,25 +1161,34 @@ var PageHome = function (_React$Component) {
|
|
|
1151
1161
|
});
|
|
1152
1162
|
}
|
|
1153
1163
|
|
|
1164
|
+
// 办结状态弹窗:仅待办 type=0 或推送 isPush=1(推送待办 listType 仍为 0)
|
|
1165
|
+
var showDoneStatusAlert = String(t.state.listType) === '0' || String(t.state.isPush) === '1';
|
|
1166
|
+
if (showDoneStatusAlert) {
|
|
1167
|
+
if (content['buttons'] == '' && content['message']) {
|
|
1168
|
+
var doneMsgMap = {
|
|
1169
|
+
'delete': '此文件已删除',
|
|
1170
|
+
'transfer': '此文件已转交',
|
|
1171
|
+
'jump': '此文件已跳转',
|
|
1172
|
+
'zf': '此文件已作废',
|
|
1173
|
+
'end': '此文件已结束',
|
|
1174
|
+
'withdraw': '此文件已撤回',
|
|
1175
|
+
'back': '此文件已退回',
|
|
1176
|
+
'view': '此文件已办理'
|
|
1177
|
+
};
|
|
1178
|
+
var doneAlert = doneMsgMap[content['message']];
|
|
1179
|
+
if (doneAlert) {
|
|
1180
|
+
t.setState({
|
|
1181
|
+
status: '2'
|
|
1182
|
+
});
|
|
1183
|
+
_Dialog2.default.alert({
|
|
1184
|
+
title: '',
|
|
1185
|
+
content: doneAlert
|
|
1186
|
+
});
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1154
1190
|
if (t.state.listType == '0') {
|
|
1155
1191
|
var tipsTitle = content['tipsTitle'];
|
|
1156
|
-
if (content['buttons'] == '' && content['message'] == 'delete') {
|
|
1157
|
-
t.setState({
|
|
1158
|
-
status: '2'
|
|
1159
|
-
});
|
|
1160
|
-
_Dialog2.default.alert({
|
|
1161
|
-
title: '',
|
|
1162
|
-
content: '该流程已被删除'
|
|
1163
|
-
});
|
|
1164
|
-
} else if (content['buttons'] == '' && content['message'] == 'view') {
|
|
1165
|
-
t.setState({
|
|
1166
|
-
status: '2'
|
|
1167
|
-
});
|
|
1168
|
-
_Dialog2.default.alert({
|
|
1169
|
-
title: '',
|
|
1170
|
-
content: '此文件已办理'
|
|
1171
|
-
});
|
|
1172
|
-
}
|
|
1173
1192
|
if (t.state.operationDetails != null && t.state.operationDetails != '') {
|
|
1174
1193
|
if (tipsTitle != null && tipsTitle != '' && tipsTitle != 'undefined') {
|
|
1175
1194
|
var tipsContent = content['tipsContent'];
|
|
@@ -1418,7 +1437,10 @@ var PageHome = function (_React$Component) {
|
|
|
1418
1437
|
//当批示意见类型是无,且批示意见内容为空时过滤掉
|
|
1419
1438
|
continue;
|
|
1420
1439
|
}
|
|
1421
|
-
|
|
1440
|
+
// 抢占加签/转交自动返回后,被加签人意见与加签人待办共用同一 taskId。
|
|
1441
|
+
// 必须同时校验办理人,否则会把他人意见回填进当前编辑框并挤出历史列表。
|
|
1442
|
+
var commentOwnerId = commentList[_i].userId || commentList[_i].createdBy || '';
|
|
1443
|
+
if (commentField == commentList[_i].field && commentList[_i].taskId == param.taskId && commentOwnerId && commentOwnerId == param.userId) {
|
|
1422
1444
|
newspyj = commentList[_i];
|
|
1423
1445
|
commentId = commentList[_i].id;
|
|
1424
1446
|
defaultValue = commentList[_i].content;
|
|
@@ -2304,6 +2326,18 @@ var PageHome = function (_React$Component) {
|
|
|
2304
2326
|
if (operate == 3) {
|
|
2305
2327
|
commentRequired = commentRequired && isSysTransferCommentRequired();
|
|
2306
2328
|
}
|
|
2329
|
+
// 自动通过继续办理:有同步则预填;查不到也不拦截弹窗
|
|
2330
|
+
if (t.state.autoSendFlag) {
|
|
2331
|
+
commentRequired = false;
|
|
2332
|
+
if (t.state.autoPassCommentSynced && t.state.autoPassCommentContent) {
|
|
2333
|
+
newComment = t.state.autoPassCommentContent;
|
|
2334
|
+
t.setState({
|
|
2335
|
+
spyj: newComment,
|
|
2336
|
+
defaultValue: newComment,
|
|
2337
|
+
newspyj: Object.assign({}, t.state.newspyj, { content: newComment })
|
|
2338
|
+
});
|
|
2339
|
+
}
|
|
2340
|
+
}
|
|
2307
2341
|
if (commentRequired) {
|
|
2308
2342
|
//不可为空
|
|
2309
2343
|
var documentId = t.state.newspyj.documentId;
|
|
@@ -4007,7 +4041,17 @@ var PageHome = function (_React$Component) {
|
|
|
4007
4041
|
return false;
|
|
4008
4042
|
}
|
|
4009
4043
|
} else if (hasCommentField == '1' && defaultComValue == '') {
|
|
4010
|
-
if (
|
|
4044
|
+
if (t.state.autoSendFlag) {
|
|
4045
|
+
// 自动通过继续办理:查不到同步意见也不拦截
|
|
4046
|
+
if (t.state.autoPassCommentSynced && t.state.autoPassCommentContent) {
|
|
4047
|
+
newComment = t.state.autoPassCommentContent;
|
|
4048
|
+
t.setState({
|
|
4049
|
+
spyj: newComment,
|
|
4050
|
+
defaultValue: newComment,
|
|
4051
|
+
newspyj: Object.assign({}, t.state.newspyj, { content: newComment })
|
|
4052
|
+
});
|
|
4053
|
+
}
|
|
4054
|
+
} else if (commentIsNull == '1' || commentIsNotNull == '1') {
|
|
4011
4055
|
//不可为空
|
|
4012
4056
|
_Toast2.default.show({
|
|
4013
4057
|
type: 'error',
|
|
@@ -5334,7 +5378,7 @@ var PageHome = function (_React$Component) {
|
|
|
5334
5378
|
dataId: t.state.dataId,
|
|
5335
5379
|
formId: t.state.formId
|
|
5336
5380
|
}).then(function (content) {
|
|
5337
|
-
if (!content || content.message === 'delete' || content.message === 'view' || content.buttons === '') {
|
|
5381
|
+
if (!content || content.message === 'delete' || content.message === 'view' || content.message === 'transfer' || content.message === 'jump' || content.message === 'zf' || content.message === 'end' || content.message === 'withdraw' || content.message === 'back' || content.buttons === '') {
|
|
5338
5382
|
_Toast2.default.show({ type: 'error', content: '流程已被他人办理' });
|
|
5339
5383
|
setTimeout(function () {
|
|
5340
5384
|
if (t.state.isPush == '1') {
|
|
@@ -5547,20 +5591,40 @@ var PageHome = function (_React$Component) {
|
|
|
5547
5591
|
nextTaskId = content.nextTaskId;
|
|
5548
5592
|
autoSendText = content.nextTaskName;
|
|
5549
5593
|
newdataId = content.dataId;
|
|
5594
|
+
var synced = content.autoPassCommentSynced === true || content.autoPassCommentSynced === 'true' || content.autoPassCommentSynced === 1 || content.autoPassCommentSynced === '1';
|
|
5595
|
+
var syncedContent = content.autoPassCommentContent || '';
|
|
5596
|
+
var syncedId = content.autoPassCommentId || '';
|
|
5550
5597
|
try {
|
|
5551
5598
|
t.handleCancelClick();
|
|
5552
5599
|
} catch (e) {}
|
|
5553
|
-
|
|
5600
|
+
var nextState = {
|
|
5554
5601
|
autoSendFlag: true,
|
|
5555
5602
|
taskId: nextTaskId,
|
|
5556
5603
|
nextTaskId: nextTaskId,
|
|
5557
5604
|
operate: 1,
|
|
5558
5605
|
autoSendText: autoSendText,
|
|
5559
|
-
dataId: newdataId
|
|
5560
|
-
|
|
5606
|
+
dataId: newdataId,
|
|
5607
|
+
autoPassCommentSynced: !!synced,
|
|
5608
|
+
autoPassCommentContent: syncedContent,
|
|
5609
|
+
autoPassCommentId: syncedId
|
|
5610
|
+
};
|
|
5611
|
+
if (synced && syncedContent) {
|
|
5612
|
+
nextState.defaultValue = syncedContent;
|
|
5613
|
+
nextState.spyj = syncedContent;
|
|
5614
|
+
nextState.newspyj = Object.assign({}, t.state.newspyj, { content: syncedContent });
|
|
5615
|
+
}
|
|
5616
|
+
if (synced && syncedId) {
|
|
5617
|
+
nextState.commentId = syncedId;
|
|
5618
|
+
}
|
|
5619
|
+
t.setState(nextState, function () {
|
|
5561
5620
|
t.handleSubmit(1);
|
|
5562
5621
|
});
|
|
5563
5622
|
} else {
|
|
5623
|
+
t.setState({
|
|
5624
|
+
autoPassCommentSynced: false,
|
|
5625
|
+
autoPassCommentContent: '',
|
|
5626
|
+
autoPassCommentId: ''
|
|
5627
|
+
});
|
|
5564
5628
|
if (isSub == '1') {
|
|
5565
5629
|
backPage(2);
|
|
5566
5630
|
}
|
|
@@ -8781,7 +8845,7 @@ var PageHome = function (_React$Component) {
|
|
|
8781
8845
|
_react2.default.createElement(
|
|
8782
8846
|
'div',
|
|
8783
8847
|
{ style: { "text-align": "left" } },
|
|
8784
|
-
_react2.default.createElement(_List2.default, { list: t.state.commentBackAlert })
|
|
8848
|
+
_react2.default.createElement(_List2.default, { list: t.state.commentBackAlert, finalButtons: t.state.finalButtons })
|
|
8785
8849
|
)
|
|
8786
8850
|
) : "",
|
|
8787
8851
|
_react2.default.createElement(
|
|
@@ -8832,7 +8896,7 @@ var PageHome = function (_React$Component) {
|
|
|
8832
8896
|
_react2.default.createElement(
|
|
8833
8897
|
_Group2.default.List,
|
|
8834
8898
|
null,
|
|
8835
|
-
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, mobileSubTblDefault: t.state.mobileSubTblDefault, 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) })
|
|
8899
|
+
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, mobileSubTblDefault: t.state.mobileSubTblDefault, 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, finalButtons: t.state.finalButtons, onChange: this.change.bind(this) })
|
|
8836
8900
|
)
|
|
8837
8901
|
)
|
|
8838
8902
|
)
|
|
@@ -94,7 +94,8 @@ var FlowCommentPane = function (_BaseTable) {
|
|
|
94
94
|
isCaUser: t.props.isCaUser,
|
|
95
95
|
caFirm: t.props.caFirm,
|
|
96
96
|
caESignatureName: t.props.caESignatureName,
|
|
97
|
-
caFormSign: t.props.caFormSign
|
|
97
|
+
caFormSign: t.props.caFormSign,
|
|
98
|
+
finalButtons: t.props.finalButtons
|
|
98
99
|
})
|
|
99
100
|
)
|
|
100
101
|
)
|
|
@@ -123,7 +124,8 @@ var FlowCommentPane = function (_BaseTable) {
|
|
|
123
124
|
isCaUser: t.props.isCaUser,
|
|
124
125
|
caFirm: t.props.caFirm,
|
|
125
126
|
caESignatureName: t.props.caESignatureName,
|
|
126
|
-
caFormSign: t.props.caFormSign
|
|
127
|
+
caFormSign: t.props.caFormSign,
|
|
128
|
+
finalButtons: t.props.finalButtons
|
|
127
129
|
}) : '',
|
|
128
130
|
_react2.default.createElement(
|
|
129
131
|
'div',
|
package/lib/tblform/README.md
CHANGED
|
@@ -30,7 +30,7 @@ src/tblform/
|
|
|
30
30
|
|
|
31
31
|
| 能力 | `form/table`(流程) | `tblform/TblForm`(纯表单) |
|
|
32
32
|
|------|----------------------|------------------------------|
|
|
33
|
-
| 入参 | 大量流程参数(批示意见、commentField 等) |
|
|
33
|
+
| 入参 | 大量流程参数(批示意见、commentField 等) | **formId、editType、dataId**;可选 **formRelaField**(关联设置 setId,直接入参) |
|
|
34
34
|
| 数据加载 | 流程接口 `getMobileForm` | `getPureMobileForm` |
|
|
35
35
|
| 数据保存 | `saveForm`(流程草稿) | `runtimeDataSave` |
|
|
36
36
|
| 批示意见 UI | 内置 | 无(可用 `FlowCommentPane` 单独挂载) |
|
|
@@ -142,14 +142,18 @@ export default class PureFormPage extends React.Component {
|
|
|
142
142
|
| `editType` | string | `'add'` | 编辑类型,见下表 |
|
|
143
143
|
| `dataId` | string | `''` | 数据 ID |
|
|
144
144
|
| `formCode` | string | `''` | 扩展编码;不传则使用接口返回的 `form.formcode` |
|
|
145
|
+
| `formRelaField` | string | `''` | 关联字段设置 setId;**直接入参**,无需从流程/表单加载接口获取。有值时内部请求 `getRelaFieldsMap` 启用字段关联(显隐/必填等) |
|
|
145
146
|
|
|
146
|
-
|
|
147
|
+
```jsx
|
|
148
|
+
<TblForm
|
|
149
|
+
formId="4028b28a9cf4442a019cf45667820020"
|
|
150
|
+
editType="add"
|
|
151
|
+
dataId=""
|
|
152
|
+
formRelaField="4028b2c6a03bd3a401a03d9421b00bfb"
|
|
153
|
+
/>
|
|
154
|
+
```
|
|
147
155
|
|
|
148
|
-
|
|
149
|
-
|----------|--------|----------|
|
|
150
|
-
| `add` | `0` | 可编辑(新增) |
|
|
151
|
-
| `edit` | `1` | 可编辑(修改) |
|
|
152
|
-
| `view` | `2` | 只读(查看) |
|
|
156
|
+
> 流程场景下 `formRelaField` 由 `getMobileForm` 等接口返回;纯表单场景不依赖该接口,由业务页直接传入关联设置 ID 即可。
|
|
153
157
|
|
|
154
158
|
### 回调参数(可选)
|
|
155
159
|
|
|
@@ -489,4 +493,5 @@ onSaveSuccess={(result) => {
|
|
|
489
493
|
|
|
490
494
|
| 版本 | 说明 |
|
|
491
495
|
|------|------|
|
|
496
|
+
| 1.0.1 | 支持 props 直接传入 `formRelaField`(关联设置 setId),启用字段关联 |
|
|
492
497
|
| 1.0.0 | 初始版本:纯表单加载/保存、form_common 扩展、FlowCommentPane 分离 |
|
package/lib/tblform/TblForm.js
CHANGED
|
@@ -54,7 +54,8 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
|
|
|
54
54
|
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
|
55
55
|
|
|
56
56
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } /**
|
|
57
|
-
*
|
|
57
|
+
* 纯表单容器:接收 formId、editType、dataId,可选 formRelaField(关联设置 setId,直接入参,无需从流程接口获取)
|
|
58
|
+
* 内部请求 getPureMobileForm 并渲染表单
|
|
58
59
|
*/
|
|
59
60
|
|
|
60
61
|
|
|
@@ -66,7 +67,7 @@ var TblForm = function (_BaseTable) {
|
|
|
66
67
|
|
|
67
68
|
var _this = _possibleConstructorReturn(this, (TblForm.__proto__ || Object.getPrototypeOf(TblForm)).call(this, {
|
|
68
69
|
module: '',
|
|
69
|
-
formRelaField: '',
|
|
70
|
+
formRelaField: props.formRelaField || '',
|
|
70
71
|
defaultValue: '',
|
|
71
72
|
data: { formId: props.formId },
|
|
72
73
|
allForm: {}
|
|
@@ -100,7 +101,7 @@ var TblForm = function (_BaseTable) {
|
|
|
100
101
|
}, {
|
|
101
102
|
key: 'componentDidUpdate',
|
|
102
103
|
value: function componentDidUpdate(prevProps) {
|
|
103
|
-
if (prevProps.formId !== this.props.formId || prevProps.editType !== this.props.editType || prevProps.dataId !== this.props.dataId) {
|
|
104
|
+
if (prevProps.formId !== this.props.formId || prevProps.editType !== this.props.editType || prevProps.dataId !== this.props.dataId || prevProps.formRelaField !== this.props.formRelaField) {
|
|
104
105
|
this.loadPureForm();
|
|
105
106
|
}
|
|
106
107
|
}
|
|
@@ -111,7 +112,8 @@ var TblForm = function (_BaseTable) {
|
|
|
111
112
|
var _props = this.props,
|
|
112
113
|
formId = _props.formId,
|
|
113
114
|
editType = _props.editType,
|
|
114
|
-
dataId = _props.dataId
|
|
115
|
+
dataId = _props.dataId,
|
|
116
|
+
formRelaField = _props.formRelaField;
|
|
115
117
|
|
|
116
118
|
if (!formId) {
|
|
117
119
|
t.setState({ loading: false, loadError: '缺少 formId' });
|
|
@@ -120,6 +122,13 @@ var TblForm = function (_BaseTable) {
|
|
|
120
122
|
|
|
121
123
|
t.setState({ loading: true, loadError: '' });
|
|
122
124
|
|
|
125
|
+
// formId / formRelaField 变更时刷新关联字段配置(构造时已按入参拉过一次)
|
|
126
|
+
if (formRelaField) {
|
|
127
|
+
t.reloadFormRelaFieldMaps(formId, formRelaField);
|
|
128
|
+
} else {
|
|
129
|
+
t.reloadFormRelaFieldMaps(formId, '');
|
|
130
|
+
}
|
|
131
|
+
|
|
123
132
|
_db2.default.form.getPureMobileForm({
|
|
124
133
|
formId: formId,
|
|
125
134
|
editType: editType || 'add',
|
|
@@ -143,6 +152,10 @@ var TblForm = function (_BaseTable) {
|
|
|
143
152
|
savedDataId: loadedDataId,
|
|
144
153
|
formCode: formCode
|
|
145
154
|
}, function () {
|
|
155
|
+
// 表单数据就绪后再跑一遍关联初始化,与流程 Table.componentDidMount 对齐
|
|
156
|
+
setTimeout(function () {
|
|
157
|
+
t.initFormLinkageAndRelaFields();
|
|
158
|
+
}, 500);
|
|
146
159
|
if (typeof t.props.onLoad === 'function') {
|
|
147
160
|
t.props.onLoad(normalized.editFormData, normalized);
|
|
148
161
|
}
|