code4eat пре 2 година
родитељ
комит
6817f86c5d

+ 37 - 6
src/pages/Home/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-14 14:14:32
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-07-24 10:27:31
+ * @LastEditTime: 2023-07-24 13:49:17
  * @FilePath: /BudgetManaSystem/src/pages/Home/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 
@@ -23,7 +23,7 @@ import img6 from '../../../static/wenzichatu6.png';
 import img7 from '../../../static/wenzichatu7.png';
 
 import './style.less';
-import { getComputeDate, getIndexData } from './service';
+import { getComputeDate, getIndexData, getReportPath } from './service';
 import { createFromIconfontCN } from '@ant-design/icons';
 import { useAccess } from '@umijs/max';
 
@@ -117,7 +117,7 @@ const HomePage: React.FC = () => {
     set_currentComputeDate(resp);
   }
 
-  const goPageHandle = (num: number) => {
+  const goPageHandle = async (num: number) => {
     let flag = true;
     if (num == 1) {
       let path = '/budgetMana/monthlySet';
@@ -184,7 +184,14 @@ const HomePage: React.FC = () => {
       }
     }
     if (num == 9) {
-      let path = '/secondaryDistribute/secondaryDitriCheck';
+      let path = '/undefined';
+      
+      const resp = await getReportPath({pageSize:500,current:1});
+      if(resp){
+        const result = resp.list.filter((a:any)=>a.code == '1663015052728475648');
+        if(result.length>0)path = result[0].value
+      }
+      
       if(access.canIReadThisPage(path)){
            history.push(path);
       }else{
@@ -192,10 +199,34 @@ const HomePage: React.FC = () => {
       }
     }
     if (num == 10) {
-      //history.push('/secondaryDistribute/secondaryDitriCheck');
+      let path = '/undefined';
+      
+      const resp = await getReportPath({pageSize:500,current:1});
+      if(resp){
+        const result = resp.list.filter((a:any)=>a.code == '1663015712702210048');
+        if(result.length>0)path = result[0].value
+      }
+      
+      if(access.canIReadThisPage(path)){
+           history.push(path);
+      }else{
+        flag = false
+      }
     }
     if (num == 11) {
-      //history.push('/secondaryDistribute/secondaryDitriCheck');
+      let path = '/undefined';
+      
+      const resp = await getReportPath({pageSize:500,current:1});
+      if(resp){
+        const result = resp.list.filter((a:any)=>a.code == '1663015814632185856');
+        if(result.length>0)path = result[0].value
+      }
+      
+      if(access.canIReadThisPage(path)){
+           history.push(path);
+      }else{
+        flag = false
+      }
     }
     if (num == 12) {
       //history.push('/secondaryDistribute/secondaryDitriCheck');

+ 13 - 1
src/pages/Home/service.ts

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-15 15:14:12
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-01-05 15:07:56
+ * @LastEditTime: 2023-07-24 13:44:24
  * @FilePath: /BudgetManaSystem/src/pages/Home/service.ts
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -45,4 +45,16 @@ export const getComputeDate = ()=>{
 }
 
 
+//获取动态报表的path
+
+export const getReportPath = (params:any)=>{
+       
+   return request('/performance/parameter/getList', {
+         method: 'GET',
+         params:{...params}
+    });
+}
+
+
+
 

+ 2 - 2
src/pages/budgetMana/monthlyInfoCheck/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-07-24 09:30:42
+ * @LastEditTime: 2023-07-24 13:27:14
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -777,7 +777,7 @@ const MonthlyInfoCheck: React.FC = () => {
             <div className='rightContent'>
                 <BMSPagecontainer title={`核算年月:${currentComputeDate}`} ghost>
                     {
-                        !ifBanAllAction && (
+                        !ifBanAllAction||auditType == '0' && (
                             <>
                                 <div className={auditType == '0' ? 'importBtn disabled' : 'importBtn '} onClick={() => importHandle()} style={{ right: auditType == '0' ? '64px' : '93px' }}>绩效数据导入</div>
                                 <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>

+ 64 - 60
src/pages/budgetMana/oneBatch/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2023-01-04 14:12:31
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-07-24 09:31:58
+ * @LastEditTime: 2023-07-24 13:30:07
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/oneBatch/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -309,70 +309,74 @@ const OneBatch = () => {
       const columnsForExcel = convertToColumnsFunc(title, false);
 
 
-      set_tableColumn([{
-        title: '核算单元',
-        dataIndex: 'unitName',
-        key: 'unitName',
-        width: 140,
-        fixed: 'left',
-        ellipsis: true,
-        sorter: (a, b) => {
-          return b.unitName.localeCompare(a.unitName)
+      set_tableColumn([
+        {
+          title: '核算单元代码',
+          dataIndex: 'unitCode',
+          key: 'unitCode',
+          width: 140,
+          fixed: 'left',
+          ellipsis: true,
+          sorter: (a, b) => {
+            return b.unitCode.localeCompare(a.unitCode)
+          },
         },
+        {
+          title: '核算单元',
+          dataIndex: 'unitName',
+          key: 'unitName',
+          width: 140,
+          fixed: 'left',
+          ellipsis: true,
+          sorter: (a, b) => {
+            return b.unitName.localeCompare(a.unitName)
+          },
 
-      },
-      {
-        title: '核算单元代码',
-        dataIndex: 'unitCode',
-        key: 'unitCode',
-        width: 140,
-        fixed: 'left',
-        ellipsis: true,
-        sorter: (a, b) => {
-          return b.unitCode.localeCompare(a.unitCode)
         },
-      }, ...columns, {
-        title: '总奖金',
-        dataIndex: 'totalScore',
-        key: 'totalScore',
-        width: 140,
-        fixed: 'right',
-        ellipsis: true
-
-      }]);
-
-
-      set_columnsForExcel([{
-        title: '核算单元',
-        dataIndex: 'unitName',
-        key: 'unitName',
-        width: 140,
-        fixed: 'left',
-        ellipsis: true,
-        sorter: (a, b) => {
-          return b.unitName.localeCompare(a.unitName)
+        ...columns, {
+          title: '总奖金',
+          dataIndex: 'totalScore',
+          key: 'totalScore',
+          width: 140,
+          fixed: 'right',
+          ellipsis: true
+
+        }]);
+
+
+      set_columnsForExcel([
+        {
+          title: '核算单元代码',
+          dataIndex: 'unitCode',
+          key: 'unitCode',
+          width: 140,
+          fixed: 'left',
+          ellipsis: true,
+          sorter: (a, b) => {
+            return b.unitCode.localeCompare(a.unitCode)
+          },
+
         },
-      },
-      {
-        title: '核算单元代码',
-        dataIndex: 'unitCode',
-        key: 'unitCode',
-        width: 140,
-        fixed: 'left',
-        ellipsis: true,
-        sorter: (a, b) => {
-          return b.unitCode.localeCompare(a.unitCode)
+        {
+          title: '核算单元',
+          dataIndex: 'unitName',
+          key: 'unitName',
+          width: 140,
+          fixed: 'left',
+          ellipsis: true,
+          sorter: (a, b) => {
+            return b.unitName.localeCompare(a.unitName)
+          },
         },
+        ...columnsForExcel, {
+          title: '总奖金',
+          dataIndex: 'totalScore',
+          key: 'totalScore',
+          width: 140,
+          fixed: 'right',
+          ellipsis: true
 
-      }, ...columnsForExcel, {
-        title: '总奖金',
-        dataIndex: 'totalScore',
-        key: 'totalScore',
-        width: 140,
-        fixed: 'right',
-        ellipsis: true
-
-      }]);
+        }]);
 
       // set_tableColumn([...mockColumns]);
       // set_columnsForExcel([...mockColumns]);
@@ -592,7 +596,7 @@ const OneBatch = () => {
           )
         }
 
-        {!ifBanAllAction&&<div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>}
+        {!ifBanAllAction && <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>}
       </div>
       <div className='content'>
         <Tabs

+ 2 - 2
src/pages/budgetMana/specialDataImport/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-07-21 17:25:37
+ * @LastEditTime: 2023-07-24 13:51:10
  * @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
  */
@@ -115,7 +115,7 @@ export default function DicClassfication() {
 
     const getTableData = async (params: any) => {
         const { computeDate } = params;
-        const resp = await getData({ ...params, computeDate: computeDate ? computeDate : currentComputeDate });
+        const resp = await getData({ ...params, computeDate: computeDate });
         if (resp) {
             return {
                 data: resp.list,

+ 2 - 6
src/pages/setting/projectSetting/checkUnitProjectSet/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-07-24 10:32:48
+ * @LastEditTime: 2023-07-24 13:53:10
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -111,11 +111,8 @@ const CheckUnitProjectSet: React.FC = () => {
     const [tableSelecterColumn, set_tableSelecterColumn] = useState<ProColumns[]>([]);
     const [isCopy, set_isCopy] = useState(false);
 
-
-
     const tableRef = useRef<ActionType>();
 
-
     const billingTableColumn: ProColumns[] = [
         {
             title: '项目代码',
@@ -207,8 +204,7 @@ const CheckUnitProjectSet: React.FC = () => {
                 if (ifEdit && currentEditRow?.id == record.id) {
                     return <ProFormDigit min={-99999} noStyle fieldProps={{
                         defaultValue: text, onChange(value) {
-                            console.log({ value, currentEditRow });
-                            if (value && currentEditRow) {
+                            if (currentEditRow) {
                                 set_currentEditRow({ ...currentEditRow, orderPointValue: value })
                             }
                         },