code4eat 2 lat temu
rodzic
commit
2b5e0e7183

+ 1 - 1
src/components/BMSPageContainer/style.less

@@ -1,5 +1,5 @@
 .bms-ant-pro-page-container .bms-ant-pro-page-container-warp-page-header~.bms-ant-pro-grid-content .bms-ant-pro-page-container-children-content {
-    padding-block: 0;
+    padding-block: 0 !important;
 }
 
 .bms-ant-pro-page-container-children-content {

+ 1 - 0
src/global.less

@@ -49,6 +49,7 @@ textarea {
     margin-block:0 !important;
 }
 
+
 .bms-ant-pro .bms-ant-pro-layout .bms-ant-pro-sider-fixed {
     position: absolute !important;
     // min-width:230px !important;

+ 30 - 4
src/pages/budgetMana/monthlyDataCheck/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-03-01 16:35:45
+ * @LastEditTime: 2023-03-02 16:07:41
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -90,6 +90,8 @@ const MonthlyDataCheck: React.FC = () => {
 
     const [totalNum, set_totalNum] = useState(0);  //收入和成本数据的总和数值
 
+    const [tableH,set_tableH] = useState(0);
+
     const [manaIndexGroups, set_manaIndexGroups] = useState<{ id: number, groupCode: string, groupName: string, hospId: number }[]>([]); //管理指标分组
     const [currentSelectedManaGroup, set_currentSelectedManaGroup] = useState<{ id: number, groupCode: string, groupName: string, hospId: number }>();
 
@@ -981,6 +983,20 @@ const MonthlyDataCheck: React.FC = () => {
 
     }
 
+    
+    const handleResize = (e:any)=>{
+        const wH = e.target.innerHeight;
+        const tableHeight = wH - 320;
+        set_tableH(tableHeight);
+    }
+
+    function doResize(){
+        setTimeout(() => {
+            const ev: any = new Event('resize');
+            window.dispatchEvent(ev);
+        },0)
+    }
+
 
 
     useEffect(() => {
@@ -988,7 +1004,7 @@ const MonthlyDataCheck: React.FC = () => {
             ...tableDataFilterParams,
             groupId: currentSelectedManaGroup?.groupCode,
         });
-    }, [currentSelectedManaGroup])
+    }, [currentSelectedManaGroup]);
 
     useEffect(() => {
         tableRef.current?.reloadAndRest && tableRef.current?.reloadAndRest();
@@ -1020,6 +1036,7 @@ const MonthlyDataCheck: React.FC = () => {
         if (currentSelectedTabKey == '6') {
             set_tableColumn(tableColumnFive as ProColumns[]);
         }
+
     }, [currentSelectedTabKey]);
 
 
@@ -1034,7 +1051,9 @@ const MonthlyDataCheck: React.FC = () => {
                 set_currentSelectedTreeNode(node);
                 setExpandedKeys([nodeParent.code]);
             }
+
         }
+
     }, [treeData]);
 
 
@@ -1043,6 +1062,7 @@ const MonthlyDataCheck: React.FC = () => {
         if (currentComputeDate) {
             pageCheckStatusFunc(currentComputeDate);  //获取页面查核状态
         }
+
     }, [currentComputeDate]);
 
 
@@ -1051,6 +1071,13 @@ const MonthlyDataCheck: React.FC = () => {
         getCurrentComputeDate();
         set_tableColumn(tableColumnOne as ProColumns[]);
 
+        window.addEventListener('resize',(e)=>handleResize(e)) //监听窗口大小改变
+        doResize();
+
+        return ()=>{
+            window.removeEventListener('resize',(e)=>handleResize(e))
+        }
+
     }, [])
 
     return (
@@ -1372,7 +1399,6 @@ const MonthlyDataCheck: React.FC = () => {
                                     )
                                 }
 
-
                                 {
                                     currentSelectedTabKey == '2' && (
                                         <div className='tabContent'>
@@ -1626,7 +1652,7 @@ const MonthlyDataCheck: React.FC = () => {
                                                     </div>
                                                 </Popover>
                                             </div>
-                                            {currentComputeDate && tableColumn && <BMSTable className='BMS-ManaIndextable' rowClassName={() => 'BMS-ManaIndextable-row'} bordered actionRef={tableRef} scroll={{ x: (100 * (tableColumn.length - 2)) + 120 + 100, y: 500 }} rowKey='unitCode' columns={auditType == '0' ? [...tableColumn,
+                                            {currentComputeDate && tableColumn && <BMSTable className='BMS-ManaIndextable' rowClassName={() => 'BMS-ManaIndextable-row'} bordered actionRef={tableRef} scroll={{ x: (100 * (tableColumn.length - 2)) + 120 + 100,y:tableH}} rowKey='unitCode' columns={auditType == '0' ? [...tableColumn,
                                             {
                                                 title: '操作',
                                                 key: 'option',

+ 1 - 1
src/pages/budgetMana/monthlyDataCheck/style.less

@@ -2,7 +2,7 @@
     position: relative;
     display: flex;
     flex-direction: row;
-    min-height: calc(100vh - 80px);
+    // min-height: calc(100vh - 80px);
     border-radius: 4px;
     overflow: hidden;
     background-color: #FFF;

+ 0 - 2
src/pages/budgetMana/monthlyInfoCheck/style.less

@@ -83,8 +83,6 @@
         }
 
         .bms-ant-tabs-nav {
-            margin-top: -14px !important;
-
             &::before {
                 border-bottom: none !important;
             }

+ 2 - 1
src/pages/budgetMana/monthlySet/index.tsx

@@ -2,7 +2,7 @@
  * @Author: code4eat awesomedema@gmail.com
  * @Date: 2022-12-16 09:42:52
  * @LastEditors: code4eat awesomedema@gmail.com
- * @LastEditTime: 2023-02-23 14:27:51
+ * @LastEditTime: 2023-03-02 15:52:51
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -159,6 +159,7 @@ const MonthlySet: React.FC = () => {
 
     return (
         <BMSPagecontainer className='MonthlySet' title={`月度结转 ${currentComputeDate}`} ghost>
+            <div style={{height:16}}> </div>
             <div className='card'>
                 <div className='mark'>{getStatus(data?.lastCarry.status)}</div>
                 <div className='cardTitle'>{data?.lastCarry.computeDate}月<span>下一个核算月份</span></div>

+ 1 - 1
src/pages/budgetMana/monthlySet/style.less

@@ -9,9 +9,9 @@
         background: #F7F8FA;
         border-radius: 4px;
         border: 1px dashed #CFD6E6;
-        margin-top: 16px;
         padding: 24px;
         padding-bottom: 0;
+        overflow: hidden;
 
 
 

+ 35 - 18
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-03-02 12:01:10
+ * @LastEditTime: 2023-03-02 16:06:48
  * @FilePath: /BudgetManaSystem/src/pages/budgetMana/oneBatch/index.tsx
  * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
  */
@@ -22,9 +22,9 @@ import './style.less';
 
 import { create, all } from 'mathjs'
 
-const config = { 
+const config = {
   number: 'number',
-  precision:14
+  precision: 14
 }
 const math = create(all, config as any);
 
@@ -44,10 +44,12 @@ const OneBatch = () => {
 
   const [auditType, set_auditType] = useState('0');
 
-  const [ifShowTip,set_ifShowTip] = useState(false);
+  const [ifShowTip, set_ifShowTip] = useState(false);
 
   const tableRef = useRef<ActionType>();
 
+  const [tableH, set_tableH] = useState(0);
+
 
   const onTabChange = (activeKey: string) => {
     set_currentTabKey(activeKey);
@@ -147,10 +149,10 @@ const OneBatch = () => {
 
 
   const confirmCaculateHandle = async () => {
-        const resp = await caculate(currentComputeDate as string);
-        if(resp){
-          tableRef.current?.reload();
-        }
+    const resp = await caculate(currentComputeDate as string);
+    if (resp) {
+      tableRef.current?.reload();
+    }
   }
 
   const generateFunc = () => {
@@ -164,6 +166,19 @@ const OneBatch = () => {
     })
   }
 
+  const handleResize = (e: any) => {
+    const wH = e.target.innerHeight;
+    const tableHeight = wH - 320;
+    set_tableH(tableHeight);
+  }
+
+  function doResize() {
+    setTimeout(() => {
+      const ev: any = new Event('resize');
+      window.dispatchEvent(ev);
+    }, 0)
+  }
+
 
   useEffect(() => {
     if (currentComputeDate) {
@@ -174,18 +189,20 @@ const OneBatch = () => {
 
   useEffect(() => {
     getCurrentComputeDate();
+    window.addEventListener('resize',(e)=>handleResize(e)) //监听窗口大小改变
+    doResize();
   }, [])
 
 
   return (
     <BMSPagecontainer className='OneBatch' title={`核算年月:${currentComputeDate}`}>
       <div className='btnGroup'>
-      <Popover open={ifShowTip}  content={'当前处于审核中,无法操作!'} >
-        <div className={auditType == '0'?'caculateBtn':'caculateBtn disabled'} 
-        onMouseEnter={()=>auditType == '0'?set_ifShowTip(false):set_ifShowTip(true)} 
-        onMouseLeave={()=>set_ifShowTip(false)}
-        onClick={() => auditType == '0' ? generateFunc() : () => { }}>计算</div>
-      </Popover>
+        <Popover open={ifShowTip} content={'当前处于审核中,无法操作!'} >
+          <div className={auditType == '0' ? 'caculateBtn' : 'caculateBtn disabled'}
+            onMouseEnter={() => auditType == '0' ? set_ifShowTip(false) : set_ifShowTip(true)}
+            onMouseLeave={() => set_ifShowTip(false)}
+            onClick={() => auditType == '0' ? generateFunc() : () => { }}>计算</div>
+        </Popover>
         <div className='checkBtn' onClick={() => checkHandle(`${auditType}`)}>{auditType == '0' ? '审核' : '取消审核'}</div>
       </div>
       <div className='content'>
@@ -214,7 +231,7 @@ const OneBatch = () => {
         <div className='tabContent'>
           {currentComputeDate && <BMSTable actionRef={tableRef} rowKey='unitCode' pagination={false} columns={tableColumn as ProColumns[]}
             params={tableDataFilterParams}
-            scroll={{ x: 120 * 10, y: 500 }}
+            scroll={{ x: 120 * 10, y:tableH }}
             request={(params, sort, filter) => getTableData(params, sort, filter)}
 
             summary={(pageData) => {
@@ -224,14 +241,14 @@ const OneBatch = () => {
 
                 const total = pageData.reduce((prev, cur) => {
                   //return prev + cur[`${dataIndex}`]
-                  if(typeof cur[`${dataIndex}`] == 'number'){
-                    return math.add(prev,cur[`${dataIndex}`] as number);
+                  if (typeof cur[`${dataIndex}`] == 'number') {
+                    return math.add(prev, cur[`${dataIndex}`] as number);
                   }
                 }, 0);
 
                 return (
                   //<span>{typeof total == 'number'?math.format(total, {precision: 14}) : '合计'}</span>
-                  <span>{typeof total == 'number'? Number(total.toFixed(4)) : '合计'}</span>
+                  <span>{typeof total == 'number' ? Number(total.toFixed(4)) : '合计'}</span>
                 )
               }
 

+ 0 - 2
src/pages/budgetMana/oneBatch/style.less

@@ -57,8 +57,6 @@
         padding-top: 0;
 
         .bms-ant-tabs-nav {
-            margin-top: -14px !important;
-
             &::before {
                 border-bottom: none !important;
             }

+ 1 - 0
src/pages/budgetMana/personnelSalaryBudget/style.less

@@ -25,6 +25,7 @@
         padding: 16px;
         padding-bottom: 24px;
         margin-bottom: 16px;
+        margin-top: 16px;
         border: 1px solid #DAE2F2;
 
         .cardWrap {