diff --git a/pc4mobx/hrmSalary/components/customTab/index.js b/pc4mobx/hrmSalary/components/customTab/index.js
index a55d410a..07a742e2 100644
--- a/pc4mobx/hrmSalary/components/customTab/index.js
+++ b/pc4mobx/hrmSalary/components/customTab/index.js
@@ -6,7 +6,7 @@ export default class CustomTab extends React.Component {
constructor(props) {
super(props);
this.state = {
- selectedKey: ""
+ selectedKey: "0"
}
}
render() {
diff --git a/pc4mobx/hrmSalary/components/importModal/index.js b/pc4mobx/hrmSalary/components/importModal/index.js
index de237445..e72c2608 100644
--- a/pc4mobx/hrmSalary/components/importModal/index.js
+++ b/pc4mobx/hrmSalary/components/importModal/index.js
@@ -1,6 +1,6 @@
import React from 'react';
import { WeaSteps, WeaDatePicker, WeaInput, WeaSelect } from 'ecCom';
-import { Upload, Icon, Modal, Row, Col, Button } from "antd";
+import { Upload, Icon, Modal, Row, Col, Button, message } from "antd";
import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx';
@@ -41,7 +41,12 @@ export default class ImportModal extends React.Component {
handleStep1Next() {
- this.props.setStep(1)
+ if(this.state.fileId) {
+ this.props.setStep(1)
+ } else {
+ message.warning("请上传文件")
+ }
+
}
handlePreviewDate() {
diff --git a/pc4mobx/hrmSalary/index.js b/pc4mobx/hrmSalary/index.js
index 58b6124a..806319b1 100644
--- a/pc4mobx/hrmSalary/index.js
+++ b/pc4mobx/hrmSalary/index.js
@@ -61,7 +61,7 @@ const DataAcquisition = (props) => props.children;
// placeOnFileDetail 核算归档详情
// compareDetail 线下线上对比
// payroll 工资单发放
-// declare 个税申请表
+// declare 个税申报表
// generateDeclarationDetail 个税单详情
// taxRate 个税税率表
// taxAgent 个税扣缴义务人
diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js
index bc738b9f..a40a19da 100644
--- a/pc4mobx/hrmSalary/pages/calculate/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/index.js
@@ -26,8 +26,8 @@ export default class Calculate extends React.Component {
value: "",
selectedKey: "0",
searchValue: "",
- startDate: moment(new Date()).format("YYYY-MM"),
- endDate: moment(new Date()).format("YYYY-MM"),
+ startDate: moment(new Date()).subtract(3,'months').startOf('month').format('YYYY-MM'),
+ endDate: moment(new Date()).subtract(-3,'months').startOf('month').format('YYYY-MM'),
current: 1,
columns: columns.map(item => {
if(item.dataIndex == 'cz') {
@@ -49,8 +49,8 @@ export default class Calculate extends React.Component {
const { getSalaryAcctList } = calculateStore
getSalaryAcctList({
name: "",
- startMonthStr: moment(new Date()).format("YYYY-MM"),
- endMonthStr: moment(new Date()).format("YYYY-MM")
+ startMonthStr: this.state.startDate,
+ endMonthStr: this.state.endDate
})
}
@@ -170,6 +170,8 @@ export default class Calculate extends React.Component {
// 分页
handleDataPageChange(value) {
this.setState({current: value})
+ const { calculateStore } = this.props;
+ const { getSalaryAcctList } = calculateStore
getSalaryAcctList({
name: this.state.searchValue,
startMonthStr: this.state.startDate,
@@ -225,7 +227,7 @@ export default class Calculate extends React.Component {
onClick={() => {this.setState({baseFormVisible: true})}}
>核算
- this.handleRangePickerChange(value)}
/>
@@ -260,7 +262,8 @@ export default class Calculate extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: salaryListPageInfo.total,
- current: salaryListPageInfo.pageNum
+ current: salaryListPageInfo.pageNum,
+ showTotal: (total) => `共 ${total} 条`,
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
index ce220c6d..d5afecde 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
@@ -206,7 +206,8 @@ export default class CompareDetail extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: comparisonResultPageInfo.total,
- current: comparisonResultPageInfo.pageNum
+ current: comparisonResultPageInfo.pageNum,
+ showTotal: (total) => `共 ${total} 条`,
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js
index e1581d95..13e31904 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js
@@ -154,6 +154,7 @@ export default class PlaceOnFileDetail extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: acctResultListPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: acctResultListPageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
index 97556ff7..fb470b84 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
@@ -148,6 +148,7 @@ export default class SalaryDetail extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: acctResultListPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: acctResultListPageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js
index fcc6caf2..b8a084d1 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js
@@ -18,6 +18,7 @@ export default class UserSure extends React.Component {
userListSearchValue: '',
}
this.id = ""
+ this.current = 1
}
componentWillMount() {
@@ -28,6 +29,7 @@ export default class UserSure extends React.Component {
salaryacctGetForm(id)
acctemployeeList({salaryAcctRecordId: id, employeeName: this.state.userListSearchValue, current: 1})
reducedemployeeList({salaryAcctRecordId: id, employeeName: this.state.userListSearchValue, current: 1})
+ this.current = 1
getSalarySobCycle(id)
}
@@ -39,6 +41,7 @@ export default class UserSure extends React.Component {
saveAcctemployee(this.id, idList).then(() => {
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
+ this.current = 1
checkTaxAgent(this.id)
})
}
@@ -67,8 +70,8 @@ export default class UserSure extends React.Component {
content: '确认删除',
onOk:() => {
deleteAcctemployee(this.id, selectedRowKeys).then(() => {
- reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
- acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
+ reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: this.current})
+ acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: this.current})
})
},
onCancel: () => {
@@ -102,14 +105,14 @@ export default class UserSure extends React.Component {
// 删除人员
handleDeleteItem = (record) => {
- const { calculateStore: {deleteAcctemployee}} = this.props;
+ const { calculateStore: {deleteAcctemployee, reducedemployeeList, acctemployeeList}} = this.props;
Modal.confirm({
title: '信息确认',
content: '确认删除',
onOk:() => {
deleteAcctemployee(this.id, [record.id]).then(() => {
- reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
- acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue,current: 1})
+ reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: this.current})
+ acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue,current: this.current})
})
},
onCancel: () => {
@@ -124,6 +127,7 @@ export default class UserSure extends React.Component {
refreshTaxAgent(this.id).then(() => {
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
acctemployeeList({salaryAcctRecordId: this.id , employeeName: this.state.userListSearchValue, current: 1})
+ this.current = 1
})
}
@@ -134,6 +138,7 @@ export default class UserSure extends React.Component {
// 核算人员范围分页
handleUserListPageChange(value) {
const { calculateStore: {acctemployeeList}} = this.props;
+ this.current = value;
acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: value})
}
@@ -141,6 +146,7 @@ export default class UserSure extends React.Component {
handleReducedemployeeListPageChange(value) {
const { calculateStore: { reducedemployeeList }} = this.props;
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: value})
+ this.current = value
}
// 搜索
@@ -148,8 +154,10 @@ export default class UserSure extends React.Component {
const { calculateStore: {acctemployeeList, reducedemployeeList}} = this.props;
if(this.state.selectedKey == 0) {
acctemployeeList({salaryAcctRecordId: this.id, employeeName: value, current: 1})
+ this.current = 1
} else {
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: value, current: 1})
+ this.current = 1
}
}
@@ -265,6 +273,7 @@ export default class UserSure extends React.Component {
pagination={{
onChange: (value) => {this.handleUserListPageChange(value)},
total: acctemployeeListPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: acctemployeeListPageInfo.pageNum
}}
/>
@@ -276,6 +285,7 @@ export default class UserSure extends React.Component {
pagination={{
onChange: (value) => {this.handleReducedemployeeListPageChange(value)},
total: reducedemployeeListPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: reducedemployeeListPageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
index 738cd374..90226099 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
@@ -47,6 +47,7 @@ export default class Attendance extends React.Component {
this.state = {
value: "",
selectedKey: "0",
+ searchValue: "",
modalParam: {
salarySobId: "",
salaryYearMonth: moment(new Date()).format("YYYY-MM"), // 薪资所属月
@@ -146,6 +147,10 @@ export default class Attendance extends React.Component {
// 导入完成
handleFinish() {
this.setState({modalVisiable: false})
+ const { attendanceStore: { getAttendanceList, step }} = this.props;
+ if(step == 2) {
+ this.getAttendanceList({})
+ }
}
// 考情引用的列
@@ -198,6 +203,13 @@ export default class Attendance extends React.Component {
setImportResult({})
}
+ // 引用详情列表搜索
+ handleSearch(params) {
+ const { attendanceStore: {viewAttendQuote}} = this.props;
+ let request = {attendQuoteId: this.recordId, ...params}
+ viewAttendQuote(request)
+ }
+
render() {
const { attendanceStore } = this.props;
const { modalParam } = this.state;
@@ -333,9 +345,10 @@ export default class Attendance extends React.Component {
return (
导出
-
{this.setState({searchValue: v})}}
+ onSearch={(v) => {this.handleSearch({keyword: v})}}
/>
)
@@ -528,6 +541,7 @@ export default class Attendance extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: attendancePageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: attendancePageInfo.pageNum
}}
/>
@@ -562,6 +576,7 @@ export default class Attendance extends React.Component {
pagination={{
onChange: (value) => {this.handleFieldPageChange(value)},
total: fieldPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: fieldPageInfo.pageNum
}}
/>
@@ -598,7 +613,8 @@ export default class Attendance extends React.Component {
templateLink={() => {this.handleTemplateLinkClick()}}
renderFormComponent={() => renderFormComponent()}
visiable={this.state.modalVisiable}
- onCancel={() => { this.setState({modalVisiable: false})}}
+ onCancel={() => {
+ this.handleFinish()}}
/>
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
index c4afce66..994c1168 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
@@ -13,12 +13,12 @@ import {
WeaTable,
} from "ecCom";
import moment from "moment";
-
import { renderNoright, getSearchs } from "../../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
import CustomTab from "../../../components/customTab";
import ContentWrapper from "../../../components/contentWrapper";
import ImportModal from "../../../components/importModal";
import { modalColumns } from "./columns";
+import { optionAddAll } from "../../../util/options";
const { MonthPicker } = DatePicker;
@@ -98,7 +98,7 @@ export default class CumDeduct extends React.Component {
{
this.setState({ taxAgentId: v });
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
index 5a61ce1c..b3e6a754 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
@@ -32,6 +32,7 @@ import CustomTab from "../../../components/customTab";
import ContentWrapper from "../../../components/contentWrapper";
import ImportModal from "../../../components/importModal";
import { modalColumns } from "./columns";
+import { optionAddAll } from "../../../util/options";
const { MonthPicker } = DatePicker;
@@ -108,7 +109,7 @@ export default class CumSituation extends React.Component {
{
this.setState({ taxAgentId: v });
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
index b053cf46..b78e9c6e 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
@@ -36,6 +36,7 @@ import "./index.less";
import SlideModalTitle from "../../../components/slideModalTitle";
import EditSlideContent from "./editSlideContent";
+import { optionAddAll } from "../../../util/options";
@inject("otherDeductStore", "taxAgentStore")
@observer
@@ -105,7 +106,7 @@ export default class OtherDeduct extends React.Component {
{
this.setState({ taxAgentId: v });
diff --git a/pc4mobx/hrmSalary/pages/declare/index.js b/pc4mobx/hrmSalary/pages/declare/index.js
index 20d6853b..cc4559d8 100644
--- a/pc4mobx/hrmSalary/pages/declare/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/index.js
@@ -26,8 +26,8 @@ export default class Declare extends React.Component {
value: "",
selectedKey: "0",
declarationModalVisible: false,
- startDate: moment(new Date()).format("YYYY-MM"),
- endDate: moment(new Date()).format("YYYY-MM")
+ startDate: moment(new Date()).subtract(3,'months').startOf('month').format('YYYY-MM'),
+ endDate: moment(new Date()).subtract(-3,'months').startOf('month').format('YYYY-MM')
}
this.searchParams = {current: 1}
columns.map(item => {
@@ -61,7 +61,8 @@ export default class Declare extends React.Component {
})
getDeclareList({
fromSalaryMonthStr: range[0],
- endSalaryMonthStr: range[1]
+ endSalaryMonthStr: range[1],
+ current: 1
})
}
@@ -95,7 +96,13 @@ export default class Declare extends React.Component {
handleDataPageChange(value) {
-
+ const { declareStore : {getDeclareList} } = this.props;
+ this.searchParams = {
+ fromSalaryMonthStr: this.state.startDate,
+ endSalaryMonthStr: this.state.endDate,
+ current: value
+ }
+ getDeclareList(this.searchParams)
}
@@ -131,7 +138,7 @@ export default class Declare extends React.Component {
];
const topTab = [
- ];
+ ];
const renderRightOperation = () => {
return
@@ -140,6 +147,7 @@ export default class Declare extends React.Component {
defaultValue={[this.state.startDate, this.state.endDate]}
onChange={(value) => this.handleRangePickerChange(value)}
/>
+
@@ -172,6 +180,7 @@ export default class Declare extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: pageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: pageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js
index a92d7c90..e38424d2 100644
--- a/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js
+++ b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js
@@ -93,9 +93,9 @@ export default class SalaryItemForm extends React.Component {
- */}
@@ -119,7 +119,7 @@ export default class SalaryItemForm extends React.Component {
{
itemGroups && itemGroups.map(item => {
if(item.items) {
- item.items.map(i => {i.key = i.id})
+ item.items && item.items.map(i => {i.key = i.id})
return (
{this.handleItemDataSourceChange(dataSource, item)}} title={item.name} onGroupDelete={() => {this.handleGroupDelete(item)}} onTitleChange={(value) => {this.handleItemTitleChange(item, value)}} onChange={(dataSource) => {this.handleCanMoveItemChange(dataSource, item)}}/>
)
diff --git a/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js b/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js
index 2bf2c6a0..6d8e660c 100644
--- a/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js
+++ b/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js
@@ -86,6 +86,7 @@ export default class SlideRefereUser extends React.Component {
`共 ${total} 条`,
current: userTableStore.pageNum
}}/>
diff --git a/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js b/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js
index 1ea1c48f..adc764a6 100644
--- a/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js
+++ b/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js
@@ -125,6 +125,7 @@ export default class AddSalaryItemModal extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: addSalaryItemPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: addSalaryItemPageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js
index 3d640e6c..0f614101 100644
--- a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js
+++ b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js
@@ -123,7 +123,10 @@ export default class CanMoveItem extends React.Component {
onCancel: () => {
},
});
-
+ }
+
+ handleTableDrop = (datas) => {
+ console.log("datas:", datas);
}
render() {
@@ -166,7 +169,13 @@ export default class CanMoveItem extends React.Component {
{
- this.state.showContent &&
+ this.state.showContent && this.handleTableDrop(datas)}
+ draggable={true}/>
}
{
this.state.addItemVisible && `共 ${total} 条`,
current: ledgerRuleList.pageNum
}}/>
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js
index 77ac81a6..abdd74c0 100644
--- a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js
+++ b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js
@@ -116,6 +116,7 @@ export default class SalarySendList extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: pageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: pageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js
index 6a98c505..e7146358 100644
--- a/pc4mobx/hrmSalary/pages/payroll/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/index.js
@@ -395,7 +395,7 @@ export default class Payroll extends React.Component {
this.state.editSlideVisible &&
{this.handleExportAll()}}>导出全部
)
+ // return ()
}
+
+ // 分页
+ handleDataPageChange(value) {
+ this.setState({current: value})
+ const { payrollStore: {getPayrollInfo, getPayrollDetailList, getPayrollDetailSa} } = this.props;
+ getPayrollDetailList({salarySendId: this.state.currentId, current: value})
+ }
+
+
+ handleSearch() {
+ const { payrollStore: {getPayrollDetailList}} = this.props;
+ getPayrollDetailList({salarySendId: this.state.currentId, current: this.state.current})
+ }
render() {
const {payrollStore} = this.props;
- const { setDetailListShowSearchAd, detailListShowSearchAd, getPayrollDetailList, detailListCondition, detailListConditionForm, salarySendDetailBaseInfo, salarySendDetailTableStore, salarySendDetailDataSource } = payrollStore;
+ const { setDetailListShowSearchAd, detailListShowSearchAd, getPayrollDetailList, detailListCondition, detailListConditionForm, salarySendDetailBaseInfo, salarySendDetailTableStore, salarySendDetailDataSource, salarySendDetailPageInfo } = payrollStore;
return (
setDetailListShowSearchAd(bool)} //高级搜索面板受控
searchsAd={getSearchs(detailListConditionForm, toJS(detailListCondition), 2)} // 高级搜索内部数据
// buttonsAd={adBtn} // 高级搜索内部按钮
- onSearch={getPayrollDetailList} // 点搜索按钮时的回调
+ onSearch={() => {this.handleSearch()}} // 点搜索按钮时的回调
// searchsAdQuick={this.getSearchsAdQuick()}
onSearchChange={v => detailListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
searchsBaseValue={detailListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
@@ -161,7 +176,18 @@ export default class PayrollDetail extends React.Component {
-
+ {
+ this.handleDataPageChange(value)},
+ total: salarySendDetailPageInfo.total,
+ current: salarySendDetailPageInfo.pageNum,
+ showTotal: (total) => `共 ${total} 条`,
+ }}
+ />
)
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
index f3c62f58..56776d76 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
@@ -149,9 +149,27 @@ export default class PayrollGrant extends React.Component {
)
}
+ // 分页
+ handleDataPageChange(value) {
+ this.setState({current: value})
+ const { payrollStore: { getInfoList } } = this.props;
+ getInfoList({
+ salarySendId:this.state.currentId,
+ current: value
+ })
+ }
+
+ handleSearch() {
+ const { payrollStore: { getInfoList } } = this.props;
+ getInfoList({
+ salarySendId:this.state.currentId,
+ current: this.state.current
+ })
+ }
+
render() {
const {payrollStore} = this.props;
- const { salarySendDetailBaseInfo, salaryGrantDataSource, getInfoList, grantListShowSearchAd, grantListConditionForm, grantListCondition, setGrantListShowSearchAd } = payrollStore;
+ const { salarySendDetailBaseInfo, salaryGrantDataSource, getInfoList, grantListShowSearchAd, grantListConditionForm, grantListCondition, setGrantListShowSearchAd, salaryGrantPageInfo } = payrollStore;
return (
@@ -169,7 +187,7 @@ export default class PayrollGrant extends React.Component {
setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控
searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)} // 高级搜索内部数据
// buttonsAd={adBtn} // 高级搜索内部按钮
- onSearch={getInfoList} // 点搜索按钮时的回调
+ onSearch={() => this.handleSearch()} // 点搜索按钮时的回调
// searchsAdQuick={this.getSearchsAdQuick()}
onSearchChange={v => grantListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
searchsBaseValue={grantListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
@@ -199,7 +217,14 @@ export default class PayrollGrant extends React.Component {
-
+ {this.handleDataPageChange(value)},
+ total: salaryGrantPageInfo.total,
+ current: salaryGrantPageInfo.pageNum,
+ showTotal: (total) => `共 ${total} 条`,
+ }}
+ />
{
this.state.payrollGrantVisible && {
+ this.setState({
+ selectedRowKeys: value
+ })
+ }
+
+
+ // 发放
+ fetchGrantPayRoll(payload) {
+ const { payrollStore: { grantPayroll }} = this.props;
+ grantPayroll(payload).then(() => {
+ const { payrollStore: {getInfoList}} = this.props;
+ getInfoList({
+ salarySendId:this.props.sendId
+ })
+ this.props.onCancel && this.props.onCancel()
+ })
+ }
+
+ handleMenuClick(e) {
+ const { selectedRowKeys } = this.state;
+ const { payrollStore: { grantPayroll }} = this.props;
+ if(selectedRowKeys.length == 0) {
+ message.warning("未选择条目");
+ return
+ }
+ this.fetchGrantPayRoll({ids: selectedRowKeys, salarySendId: this.props.sendId})
+ }
+
+ handleGrantAll() {
+ this.fetchGrantPayRoll({salarySendId: this.props.sendId})
+ }
+
+ handleSearch(value) {
+ const { payrollStore: { batchSendInfoList } } = this.props;
+ batchSendInfoList({salarySendId: this.props.sendId, keyword: value, current: this.state.current})
+ }
+
+
+ // 分页
+ handleDataPageChange(value) {
+ this.setState({current: value})
+ const { payrollStore: { batchSendInfoList } } = this.props;
+ batchSendInfoList({salarySendId: this.props.sendId, current: value})
+ }
+
render() {
const menu = (
-