|
@@ -73,6 +73,7 @@ function CommitAuditModal(props) {
|
|
|
const [auditList, setAuditList] = useState([]); //用于创建Tabs表单
|
|
|
const [formComponentValues, setFormComponentValues] = useState({}); //用于创建Tabs表单
|
|
|
const [form] = Form.useForm();
|
|
|
+ const [aduitDetailForm] = Form.useForm();
|
|
|
const [approvalProcess, setApprovalProcess] = useState({});
|
|
|
const [selectUserList, setSelectUserList] = useState([]);
|
|
|
const [curNodeIdx, setCurNodeIdx] = useState(-1);
|
|
@@ -351,8 +352,7 @@ function CommitAuditModal(props) {
|
|
|
|
|
|
const onDIYTableChange = (value, id, label) => {
|
|
|
const currentNodeID = auditList[currentTab].nodeId;
|
|
|
- const oldData = [...formComponentValues[currentNodeID]] || [];
|
|
|
- console.log(oldData);
|
|
|
+ const oldData = formComponentValues[currentNodeID] || [];
|
|
|
|
|
|
const ids = id.split(';');
|
|
|
const [rowIndex, colIndex] = ids[0].split(',').map(item => Number(item));
|
|
@@ -373,10 +373,8 @@ function CommitAuditModal(props) {
|
|
|
|
|
|
if (oldData && oldData.length) {
|
|
|
const table = oldData.find(item => item.id === tableID);
|
|
|
- console.log(table);
|
|
|
if (table) {
|
|
|
const oldRows = table.value;
|
|
|
- debugger;
|
|
|
if (oldRows) {
|
|
|
const oldCols = oldRows[rowIndex];
|
|
|
if (oldCols) {
|
|
@@ -468,8 +466,8 @@ function CommitAuditModal(props) {
|
|
|
value: [changedFields[currentFieldID]],
|
|
|
});
|
|
|
}
|
|
|
- console.log(formComponentValues);
|
|
|
setFormComponentValues({ ...formComponentValues, [currentNodeID]: componentValue });
|
|
|
+ advanceSubmit();
|
|
|
};
|
|
|
|
|
|
// 处理tabs页
|
|
@@ -850,13 +848,13 @@ function CommitAuditModal(props) {
|
|
|
<AuditDetailed
|
|
|
allValues={formValueRef.current.form}
|
|
|
items={item.items}
|
|
|
- form={form}
|
|
|
+ form={aduitDetailForm}
|
|
|
onValuesChange={onFormValueChange}
|
|
|
onTableValChange={onDIYTableChange}
|
|
|
/>
|
|
|
</Col>
|
|
|
<Col offset={1} span={6}>
|
|
|
- {!approvalProcess[item.nodeId] ? ( //!formComponentValues[item.nodeId] ||
|
|
|
+ {!approvalProcess[item.nodeId] ? ( // !formComponentValues[item.nodeId] ||
|
|
|
<Empty description="请先填写表单" />
|
|
|
) : (
|
|
|
<ApprovalProcess
|