Jelajahi Sumber

fix: 提交审批时不能正确处理DIYTable格式问题修复,项目ID格式修改为字符串

ZhaoJun 1 tahun lalu
induk
melakukan
4f4acdd7ef

+ 2 - 3
src/components/DDComponents/ProjectField/index.js

@@ -27,9 +27,8 @@ function DDProjectField(props) {
       loading={loading}
       style={{ width: '100%' }}
       disabled={disabled}
-      defaultValue={value}
+      defaultValue={`${value}`}
       onChange={val => {
-        const project = projectList.find(item => item.ID === val);
         onChange(`${val}`);
       }}
       filterOption={(input, option) =>
@@ -38,7 +37,7 @@ function DDProjectField(props) {
       options={projectList.map(item => {
         return {
           label: `${item.project_name}(${item.project_full_code})`,
-          value: item.id + '',
+          value: `${item.id}`,
         };
       })}
     />

+ 1 - 1
src/pages/Detail/CommitAuditModal.js

@@ -226,7 +226,7 @@ function CommitAuditModal(props) {
         : [];
       let values = data[approvalNode.Id] || prevValues || [];
       values.forEach(tempValue => {
-        if (tempValue.type === 'DIYTable') {
+        if (tempValue.id.includes('DIYTable')) {
           tempValue.value = tempValue.value.map(item => JSON.stringify(item));
         }
       });