|
@@ -193,8 +193,8 @@ function CommitAuditModal(props) {
|
|
setAuditId(node?.node_id);
|
|
setAuditId(node?.node_id);
|
|
};
|
|
};
|
|
|
|
|
|
- const getFromData = idList => {
|
|
|
|
- const data = JSON.parse(JSON.stringify(formComponentValues));
|
|
|
|
|
|
+ const getFromData = (idList, newFormValues) => {
|
|
|
|
+ const data = JSON.parse(JSON.stringify(newFormValues));
|
|
const result = [];
|
|
const result = [];
|
|
// 获取流转节点的层级关系
|
|
// 获取流转节点的层级关系
|
|
let len = 0;
|
|
let len = 0;
|
|
@@ -242,7 +242,7 @@ function CommitAuditModal(props) {
|
|
};
|
|
};
|
|
|
|
|
|
// 填写表单实时计算审批流程
|
|
// 填写表单实时计算审批流程
|
|
- const advanceSubmit = async () => {
|
|
|
|
|
|
+ const advanceSubmit = async newFormValues => {
|
|
// console.log('重重新计算审批流程');
|
|
// console.log('重重新计算审批流程');
|
|
const fieldsValue = await form.validateFields();
|
|
const fieldsValue = await form.validateFields();
|
|
let hasFlowId = true; //是否都绑定审批节点
|
|
let hasFlowId = true; //是否都绑定审批节点
|
|
@@ -252,7 +252,7 @@ function CommitAuditModal(props) {
|
|
if (item && Array.isArray(item)) return item;
|
|
if (item && Array.isArray(item)) return item;
|
|
})
|
|
})
|
|
.filter(item => item);
|
|
.filter(item => item);
|
|
- const formList = await getFromData(result);
|
|
|
|
|
|
+ const formList = await getFromData(result, newFormValues);
|
|
let params = {
|
|
let params = {
|
|
desc: fieldsValue.desc,
|
|
desc: fieldsValue.desc,
|
|
// 审核流程id
|
|
// 审核流程id
|
|
@@ -327,7 +327,7 @@ function CommitAuditModal(props) {
|
|
setFormComponentValues([]);
|
|
setFormComponentValues([]);
|
|
});
|
|
});
|
|
setAuditList(addAuditList);
|
|
setAuditList(addAuditList);
|
|
- advanceSubmit();
|
|
|
|
|
|
+ // advanceSubmit();
|
|
};
|
|
};
|
|
|
|
|
|
const onChange = async (value, approvalProcess) => {
|
|
const onChange = async (value, approvalProcess) => {
|
|
@@ -621,12 +621,14 @@ function CommitAuditModal(props) {
|
|
value: [changedFields[currentFieldID]],
|
|
value: [changedFields[currentFieldID]],
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- setFormComponentValues({
|
|
|
|
|
|
+ let newFormValues = {
|
|
...formComponentValues,
|
|
...formComponentValues,
|
|
[currentNodeID]: componentValue,
|
|
[currentNodeID]: componentValue,
|
|
- });
|
|
|
|
|
|
+ }
|
|
|
|
+ setFormComponentValues(newFormValues);
|
|
|
|
+ console.log(formComponentValues);
|
|
formValueRef.current.form[currentNodeID] = [...componentValue];
|
|
formValueRef.current.form[currentNodeID] = [...componentValue];
|
|
- advanceSubmit();
|
|
|
|
|
|
+ advanceSubmit(newFormValues);
|
|
};
|
|
};
|
|
|
|
|
|
// const getFlowPath = node => {
|
|
// const getFlowPath = node => {
|