|
@@ -4,7 +4,7 @@
|
|
|
* @Author: code4eat awesomedema@gmail.com
|
|
|
* @Date: 2022-12-16 09:42:52
|
|
|
* @LastEditors: code4eat awesomedema@gmail.com
|
|
|
- * @LastEditTime: 2023-08-11 11:30:07
|
|
|
+ * @LastEditTime: 2023-08-18 10:51:05
|
|
|
* @FilePath: /BudgetManaSystem/src/pages/budgetMana/monthlySet/index.tsx
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
*/
|
|
@@ -16,7 +16,7 @@ import BMSPagecontainer from '@/components/BMSPageContainer';
|
|
|
import { useEffect, useRef, useState } from 'react';
|
|
|
import './style.less';
|
|
|
|
|
|
-import { TreeProps, Input, Modal, message, Popover, Table, Switch, Tooltip } from 'antd';
|
|
|
+import { TreeProps, Input, Modal, message, Popover, DatePicker, Tooltip } from 'antd';
|
|
|
import { DataNode } from 'antd/es/tree';
|
|
|
|
|
|
import { TransferItem, TransferProps } from 'antd/es/transfer';
|
|
@@ -166,7 +166,8 @@ const UnitCheckProjectScore: React.FC = () => {
|
|
|
const resp = await getWorkData({
|
|
|
computeDate: currentComputeDate as string,
|
|
|
unitCode: currentSelectedTreeNode.code,
|
|
|
- empNo: currentComputeEmp.empNo
|
|
|
+ empNo: currentComputeEmp.empNo,
|
|
|
+ code: currentComputeEmp.colCode
|
|
|
});
|
|
|
if (resp) {
|
|
|
set_datasource(resp);
|
|
@@ -186,13 +187,13 @@ const UnitCheckProjectScore: React.FC = () => {
|
|
|
const total = needData.reduce((prev: number, cur: any) => prev + cur.indicatorValue, 0);
|
|
|
|
|
|
const value = total.toFixed(4);
|
|
|
-
|
|
|
+
|
|
|
const resp = await saveWorkLang({
|
|
|
computeDate: currentComputeDate as string,
|
|
|
unitCode: currentSelectedTreeNode.code,
|
|
|
- empNo:currentComputeEmp.empNo,
|
|
|
- code:currentComputeEmp.colCode,
|
|
|
- value:value
|
|
|
+ empNo: currentComputeEmp.empNo,
|
|
|
+ code: currentComputeEmp.colCode,
|
|
|
+ value: value
|
|
|
});
|
|
|
|
|
|
if (resp) {
|
|
@@ -232,7 +233,7 @@ const UnitCheckProjectScore: React.FC = () => {
|
|
|
},
|
|
|
}}
|
|
|
rowKey='id'
|
|
|
- scroll={{y:400}}
|
|
|
+ scroll={{ y: 400 }}
|
|
|
tableAlertRender={false}
|
|
|
rowSelection={{
|
|
|
// 自定义选择项参考: https://ant.design/components/table-cn/#components-table-demo-row-selection-custom
|
|
@@ -240,7 +241,7 @@ const UnitCheckProjectScore: React.FC = () => {
|
|
|
// selections: [Table.SELECTION_ALL, Table.SELECTION_INVERT],
|
|
|
onChange: onSelectChange,
|
|
|
}}
|
|
|
- pagination={{ showTitle: false,showSizeChanger:true }}
|
|
|
+ pagination={{ showTitle: false, showSizeChanger: true }}
|
|
|
dataSource={showList}
|
|
|
/>
|
|
|
<div className='footer'>
|
|
@@ -354,7 +355,7 @@ const UnitCheckProjectScore: React.FC = () => {
|
|
|
return {
|
|
|
title: <div>{item.name}{item.source == 2 && <span style={{ display: 'inline-flex', marginLeft: 5, justifyContent: 'center', alignItems: 'center', width: 14, height: 14, borderRadius: 4, background: '#80BFFF', color: '#fff' }}>A</span>}</div>,
|
|
|
dataIndex: `${item.code}`,
|
|
|
- width: 120,
|
|
|
+ width: 160,
|
|
|
renderText: (_: any, record: any) => {
|
|
|
if (ifEditMode) {
|
|
|
|
|
@@ -401,13 +402,13 @@ const UnitCheckProjectScore: React.FC = () => {
|
|
|
/>
|
|
|
}
|
|
|
|
|
|
- return <ProFormDigit noStyle min={-1000000000} fieldProps={{
|
|
|
+ return <ProFormDigit noStyle min={-1000000000} width={120} fieldProps={{
|
|
|
ref: ref => {
|
|
|
inputsRef.current[`${record.empNo}-${item.code}`] = ref;
|
|
|
inputsRefKeys?.push(`${record.empNo}-${item.code}`);
|
|
|
//console.log({ref});
|
|
|
},
|
|
|
-
|
|
|
+
|
|
|
onBlur: () => {
|
|
|
const updatedList = needSaveData.secondValueVos.map((a: any) => {
|
|
|
if (a.empNo == record.empNo) {
|
|
@@ -481,10 +482,10 @@ const UnitCheckProjectScore: React.FC = () => {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- onFocus: () => {set_currentInputRefKeys(`${record.empNo}-${item.code}`);currentComputeEmp = { ...record, colCode: item.code };},
|
|
|
+ onFocus: () => { set_currentInputRefKeys(`${record.empNo}-${item.code}`); currentComputeEmp = { ...record, colCode: item.code }; },
|
|
|
defaultValue: _,
|
|
|
|
|
|
- }} width={80} />
|
|
|
+ }} />
|
|
|
} else {
|
|
|
return <span style={{ display: 'block' }}>{_}{item.source == 3 && <img onClick={() => calcuHanle({ ...record, colCode: item.code })} style={{ width: 16, height: 16, cursor: 'pointer', marginLeft: 8 }} src={require('../../../../static/calcu.png')} />}</span>
|
|
|
}
|
|
@@ -951,26 +952,47 @@ const UnitCheckProjectScore: React.FC = () => {
|
|
|
</div>
|
|
|
{/* <div style={{width:16,height:'92vh',background:'#F5F7FA'}}></div> */}
|
|
|
<div className='rightContent'>
|
|
|
- <BMSPagecontainer title={`核算年月:${currentComputeDate}`} ghost>
|
|
|
+ <BMSPagecontainer title={false} ghost>
|
|
|
<div className='tabContent'>
|
|
|
<div className='tableToolbar'>
|
|
|
<div className='search'>
|
|
|
- <span className='label'>检索:</span>
|
|
|
- <Input placeholder={'请输入姓名'} allowClear
|
|
|
- suffix={
|
|
|
- <IconFont style={{ color: '#99A6BF' }} type="iconsousuo" />
|
|
|
- }
|
|
|
- onChange={(e) => {
|
|
|
- if (e.target.value.length > 0) {
|
|
|
- const result = tableData.filter((a: any) => a.Employee.indexOf(e.target.value) != -1);
|
|
|
- set_dataSource(result);
|
|
|
- } else {
|
|
|
- set_dataSource(tableData);
|
|
|
+ <div style={{ marginRight: 16 }}>
|
|
|
+ <span>核算年月:</span>
|
|
|
+ {currentComputeDate&&<DatePicker
|
|
|
+ onChange={(data, dateString) => {
|
|
|
+ if (dateString) {
|
|
|
+ set_currentComputeDate(dateString)
|
|
|
+ } else {
|
|
|
+ getCurrentComputeDate();
|
|
|
+ }
|
|
|
+
|
|
|
+ }}
|
|
|
+ allowClear={true}
|
|
|
+ picker='month'
|
|
|
+ defaultValue={moment(currentComputeDate,'YYYY-MM')}
|
|
|
+ locale={locale}
|
|
|
+ format='YYYY-MM' placeholder="请选择核算年月" />}
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <>
|
|
|
+ <span className='label'>检索:</span>
|
|
|
+ <Input placeholder={'请输入姓名'} allowClear
|
|
|
+ style={{ width: 160 }}
|
|
|
+ suffix={
|
|
|
+ <IconFont style={{ color: '#99A6BF' }} type="iconsousuo" />
|
|
|
}
|
|
|
+ onChange={(e) => {
|
|
|
+ if (e.target.value.length > 0) {
|
|
|
+ const result = tableData.filter((a: any) => a.Employee.indexOf(e.target.value) != -1);
|
|
|
+ set_dataSource(result);
|
|
|
+ } else {
|
|
|
+ set_dataSource(tableData);
|
|
|
+ }
|
|
|
|
|
|
- }}
|
|
|
+ }}
|
|
|
|
|
|
- />
|
|
|
+ />
|
|
|
+ </>
|
|
|
</div>
|
|
|
|
|
|
<div className='btnGroupWrap'>
|