code4eat 2 лет назад
Родитель
Сommit
f5accae8b9

+ 21 - 5
src/pages/secondaryDistribute/employeeInfoCheck/index.tsx

@@ -4,7 +4,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-16 09:42:52
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-05-11 12:01:54
+ * @LastEditTime: 2023-05-11 17:07:09
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -36,6 +36,7 @@ import { getDeepestTreeData } from '@/utils/tooljs';
 import { ColumnsType } from 'antd/es/table';
 import { TableRowSelection } from 'antd/es/table/interface';
 import { difference } from 'lodash';
+import { getCurrentCheckStatus } from '@/services/auth';
 
 
 
@@ -65,7 +66,7 @@ const EmployeeInfoCheck: React.FC = () => {
 
     const [ifShowTip, set_ifShowTip] = useState(false);
 
-    const [commitStatus, set_commitStatus] = useState('0');
+    const [commitStatus, set_commitStatus] = useState('0'); //提交状态
 
     const [empInfoSearchKeywords, set_empInfoSearchKeywords] = useState('');
 
@@ -75,6 +76,8 @@ const EmployeeInfoCheck: React.FC = () => {
     const [searchValue, setSearchValue] = useState('');
     const [autoExpandParent, setAutoExpandParent] = useState(true);
 
+    const [auditType,set_auditType] = useState('0');  //审核状态
+
 
 
     const tableRef = useRef<ActionType>();
@@ -155,6 +158,13 @@ const EmployeeInfoCheck: React.FC = () => {
         set_currentComputeDate(resp);
     }
 
+    const getCheckStatus = async (computeDate: string) => {
+        const resp = await getCurrentCheckStatus(computeDate);
+        if (resp) {
+            set_auditType(`${resp}`);  //0 未审核 1 已审核
+        }
+    }
+
     const getCurrentCommitStatus = async () => {
         if (currentSelectedTreeNode) {
             const resp = await getCurrentCommitStatusReq({
@@ -391,6 +401,7 @@ const EmployeeInfoCheck: React.FC = () => {
                 });
                 if (resp) {
                     message.success('提交成功!');
+                    getTreeReqFunc(currentComputeDate as string);
                     getCurrentCommitStatus();
                 }
             }
@@ -470,6 +481,7 @@ const EmployeeInfoCheck: React.FC = () => {
 
         if (currentComputeDate) {
             getTreeReqFunc(currentComputeDate);
+            getCheckStatus(currentComputeDate);
         }
     }, [currentComputeDate]);
 
@@ -602,16 +614,20 @@ const EmployeeInfoCheck: React.FC = () => {
                             </div>
 
                             <div className='btnGroupWrap'>
-                                <Popover open={ifShowTip} content={'当前处于提交中,无法操作!'} >
+                                <Popover open={ifShowTip} content={auditType == '1'?'当前处于审核中,无法操作!':'当前处于提交中,无法操作!'} >
                                     <div className={commitStatus != '0' ? 'btnGroup disabled' : 'btnGroup'}
-                                        onMouseEnter={() => commitStatus == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
+                                        /**
+                                         * 当审核中,三个操作按钮都不可点击
+                                         * 当非审核中,生成和添加不可操作
+                                         */
+                                        onMouseEnter={() => auditType == '0' ? commitStatus == '1'?set_ifShowTip(true):set_ifShowTip(false)  : set_ifShowTip(true)}
                                         onMouseLeave={() => set_ifShowTip(false)}
                                     >
                                         <span key="2" onClick={commitStatus == '0' ? () => generateFunc() : () => { }}>生成</span>
                                         <span key="3" onClick={commitStatus == '0' ? () => addPersonFunc() : () => { }}>添加</span>
                                     </div>
                                 </Popover>
-                                <div key="4" className='commit' onClick={() => commitBtnhandle()}>{commitStatus == '1' ? '取消提交' : '提交'}</div>
+                                <div key="4" className={auditType == '1'?'commit disabled':'commit'} onClick={() => auditType == '0'?commitBtnhandle():()=>{}}>{commitStatus == '1' ? '取消提交' : '提交'}</div>
                             </div>
 
                         </div>

+ 2 - 2
src/pages/secondaryDistribute/employeeInfoCheck/service.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-21 11:13:51
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-05-11 10:59:43
+ * @LastEditTime: 2023-05-11 17:08:26
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlyInfoCheck/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -156,7 +156,7 @@ export const commitRequest = (data:CommitRequestParamsType) => {
 
 export const saveEmpsRequest = (data:any[]) => {
  
-    return request('/performance/check/addComputeEmployee', {
+    return request('/performance/secondSetting/addComputeEmployee', {
         method: 'POST',
         data:data
     })

+ 6 - 0
src/pages/secondaryDistribute/employeeInfoCheck/style.less

@@ -181,6 +181,12 @@
                         font-weight: 400;
                         margin-left: 8px;
                         color: #FFF;
+
+                        &.disabled {
+                            cursor: not-allowed;
+                            color: rgb(0 0 0 / 50%);
+                            background-color: #f0f2f5;
+                        }
                     }
                 }
         

+ 1 - 2
src/pages/setting/projectSetting/bilingProjectMana/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-05-11 13:30:28
+ * @LastEditTime: 2023-05-11 16:38:08
  * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -194,7 +194,6 @@ export default function BilingProjectMana() {
                     name="orderPointValue"
                     label="点值:"
                     placeholder="请输入"
-                    rules={[{ required: true, message: '点值不能为空!' }]}
                 />
                 <ProFormRadio.Group
                     name="coreFlag"

+ 1 - 2
src/pages/setting/projectSetting/indicProjectMana/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-05-05 09:23:11
+ * @LastEditTime: 2023-05-11 16:38:32
  * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -196,7 +196,6 @@ export default function BilingProjectMana() {
                     name="orderPointValue"
                     label="点值:"
                     placeholder="请输入"
-                    rules={[{ required: true, message: '点值不能为空!' }]}
                 />
                 <ProFormTextArea
                     name="sql"

+ 4 - 1
src/pages/setting/projectSetting/occupationsSecondaryDistriSet/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-05-11 14:34:32
+ * @LastEditTime: 2023-05-11 16:50:03
  * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -148,6 +148,7 @@ export default function OccupationsSecondaryDistriSet() {
 
         if (resp) {
             message.success('操作成功!');
+            set_ifAdjustment(false);
             getTableData();
         }
 
@@ -442,6 +443,8 @@ export default function OccupationsSecondaryDistriSet() {
                 className: 'drag-visible',
                 render: () => <DragHandle />,
             }, ...columns])
+        }else{
+            set_columns([...(columns.filter((a)=>a.title != '排序'))]);
         }
     }, [ifAdjustment]);
 

+ 3 - 3
src/pages/setting/projectSetting/secondaryProjectDistribute/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-03-03 11:30:33
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-05-11 14:04:48
+ * @LastEditTime: 2023-05-11 16:39:44
  * @FilePath: /KC-MiddlePlatform/src/pages/platform/setting/pubDicTypeMana/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -238,12 +238,12 @@ export default function BilingProjectMana() {
                 />
                 <ProFormDependency name={['source']}>
                      {
-                        ({source})=>(
+                        ({source})=> source == 2&&(
                             <ProFormTextArea
                             name="sql"
                             label="SQL:"
                             placeholder="请输入"
-                            rules={[{ required:source == 2?true:false, message: 'SQL不能为空!' }]}
+                            rules={[{ required:true, message: 'SQL不能为空!' }]}
                         />
                         )
                      }