Merge branch 'dev' into merge_liys_dev
This commit is contained in:
commit
519ddd732b
|
|
@ -6,7 +6,7 @@ export default class CustomTab extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: ""
|
||||
selectedKey: "0"
|
||||
}
|
||||
}
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -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() {
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ const DataAcquisition = (props) => props.children;
|
|||
// placeOnFileDetail 核算归档详情
|
||||
// compareDetail 线下线上对比
|
||||
// payroll 工资单发放
|
||||
// declare 个税申请表
|
||||
// declare 个税申报表
|
||||
// generateDeclarationDetail 个税单详情
|
||||
// taxRate 个税税率表
|
||||
// taxAgent 个税扣缴义务人
|
||||
|
|
|
|||
|
|
@ -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})}}
|
||||
>核算</Button>
|
||||
<div style={{display: "inline-block"}}>
|
||||
<RangePicker defaultValue={[moment(new Date()).format("YYYY-MM"), moment(new Date()).format("YYYY-MM")]} picker="month" format="yyyy-MM"
|
||||
<RangePicker defaultValue={[this.state.startDate, this.state.endDate]} picker="month" format="yyyy-MM"
|
||||
onChange={(value) => this.handleRangePickerChange(value)}
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -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} 条`,
|
||||
}}
|
||||
/>
|
||||
</WeaTop>
|
||||
|
|
|
|||
|
|
@ -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} 条`,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<div style={{display: "inline-block"}}>
|
||||
<Dropdown.Button overlay={menu} type="primary">导出</Dropdown.Button>
|
||||
<Button type="default" style={{marginLeft: "10px", marginRight: "10px"}}>自定义列</Button>
|
||||
<WeaInputSearch
|
||||
placeholder="请输入姓名/部门/工号/手机号"
|
||||
onChange={(v) => {this.setState({searchValue: v})}}
|
||||
onSearch={(v) => {this.handleSearch({keyword: v})}}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
|
|
@ -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()}}
|
||||
/>
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
|||
<WeaSelect
|
||||
showSearch // 设置select可搜索
|
||||
style={{ width: 200 }}
|
||||
options={taxAgentOption}
|
||||
options={optionAddAll(taxAgentOption)}
|
||||
value={taxAgentId}
|
||||
onChange={(v) => {
|
||||
this.setState({ taxAgentId: v });
|
||||
|
|
|
|||
|
|
@ -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 {
|
|||
<WeaSelect
|
||||
showSearch // 设置select可搜索
|
||||
style={{ width: 200 }}
|
||||
options={taxAgentOption}
|
||||
options={optionAddAll(taxAgentOption)}
|
||||
value={taxAgentId}
|
||||
onChange={(v) => {
|
||||
this.setState({ taxAgentId: v });
|
||||
|
|
|
|||
|
|
@ -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 {
|
|||
<WeaSelect
|
||||
showSearch // 设置select可搜索
|
||||
style={{ width: 200 }}
|
||||
options={taxAgentOption}
|
||||
options={optionAddAll(taxAgentOption)}
|
||||
value={taxAgentId}
|
||||
onChange={(v) => {
|
||||
this.setState({ taxAgentId: v });
|
||||
|
|
|
|||
|
|
@ -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 <div style={{display: "inline-block"}}>
|
||||
|
|
@ -140,6 +147,7 @@ export default class Declare extends React.Component {
|
|||
defaultValue={[this.state.startDate, this.state.endDate]}
|
||||
onChange={(value) => this.handleRangePickerChange(value)}
|
||||
/>
|
||||
|
||||
<Button type="primary" style={{marginLeft: "10px"}} onClick={() => {
|
||||
this.setState({declarationModalVisible: true})
|
||||
}}>生成申报单</Button>
|
||||
|
|
@ -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
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -93,9 +93,9 @@ export default class SalaryItemForm extends React.Component {
|
|||
<Button type="default" onClick={() => {setAddCategoryVisible(true)}} disabled={canEdit !== 'true'}>新增分类</Button>
|
||||
<Button type="default" style={{marginLeft: "10px"}} onClick={() => {this.handlePreview()}} disabled={canEdit !== "true"}>预览</Button>
|
||||
</div>
|
||||
<div className="searchInputWrapper">
|
||||
{/* <div className="searchInputWrapper">
|
||||
<WeaInputSearch style={{width: "150px"}} />
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
|
||||
<div className="userInfoWrapper">
|
||||
|
|
@ -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 (
|
||||
<CanMoveItem disabled={canEdit !== "true"} dataSource={item.items} onDataSourceChange={(dataSource) => {this.handleItemDataSourceChange(dataSource, item)}} title={item.name} onGroupDelete={() => {this.handleGroupDelete(item)}} onTitleChange={(value) => {this.handleItemTitleChange(item, value)}} onChange={(dataSource) => {this.handleCanMoveItemChange(dataSource, item)}}/>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -86,6 +86,7 @@ export default class SlideRefereUser extends React.Component {
|
|||
<div>
|
||||
<Table rowSelection={rowSelection} dataSource={list} columns={columns} pagination={{
|
||||
total: userTableStore.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: userTableStore.pageNum
|
||||
}}/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -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 {
|
|||
</span>
|
||||
</div>
|
||||
{
|
||||
this.state.showContent && <WeaTable rowSelection={rowSelection} dataSource={this.props.dataSource} columns={this.state.columns} pagination={false}/>
|
||||
this.state.showContent && <WeaTable
|
||||
rowSelection={rowSelection}
|
||||
dataSource={this.props.dataSource}
|
||||
columns={this.state.columns}
|
||||
pagination={false}
|
||||
onDrop={(datas) => this.handleTableDrop(datas)}
|
||||
draggable={true}/>
|
||||
}
|
||||
{
|
||||
this.state.addItemVisible && <AddSalaryItemModal
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ export default class ValidRulesForm extends React.Component {
|
|||
{
|
||||
ledgerRuleList.list && <Table rowSelection={rowSelection} dataSource={ledgerRuleList.list} columns={columns} pagination={{
|
||||
total: ledgerRuleList.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: ledgerRuleList.pageNum
|
||||
}}/>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ export default class Payroll extends React.Component {
|
|||
this.state.editSlideVisible &&
|
||||
<WeaSlideModal visible={this.state.editSlideVisible}
|
||||
top={0}
|
||||
width={40}
|
||||
width={50}
|
||||
height={100}
|
||||
direction={'right'}
|
||||
measure={'%'}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ export default class PayrollDetail extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
currentId: ""
|
||||
currentId: "",
|
||||
current: 1
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -111,11 +112,25 @@ export default class PayrollDetail extends React.Component {
|
|||
return (
|
||||
<Dropdown.Button type="primary" style={{marginRight: "10px"}} overlay={menu} onClick={() => {this.handleExportAll()}}>导出全部</Dropdown.Button>
|
||||
)
|
||||
// return (<div></div>)
|
||||
}
|
||||
|
||||
|
||||
// 分页
|
||||
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 (
|
||||
<div className="payrollGrant">
|
||||
<WeaTop
|
||||
|
|
@ -131,7 +146,7 @@ export default class PayrollDetail extends React.Component {
|
|||
setShowSearchAd={bool => 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 {
|
|||
</div>
|
||||
|
||||
<div className="tableWrapper">
|
||||
<WeaTable dataSource={salarySendDetailDataSource} columns={this.getColumns()}/>
|
||||
<WeaTable
|
||||
dataSource={salarySendDetailDataSource}
|
||||
columns={this.getColumns()}
|
||||
scroll={{x: this.getColumns().length * 150}}
|
||||
pagination={{
|
||||
onChange: (value) => {
|
||||
this.handleDataPageChange(value)},
|
||||
total: salarySendDetailPageInfo.total,
|
||||
current: salarySendDetailPageInfo.pageNum,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
<div className="payrollGrant">
|
||||
|
|
@ -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 {
|
|||
</div>
|
||||
|
||||
<div className="tableWrapper">
|
||||
<WeaTable dataSource={salaryGrantDataSource} columns={this.getColumns()}/>
|
||||
<WeaTable dataSource={salaryGrantDataSource} columns={this.getColumns()}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleDataPageChange(value)},
|
||||
total: salaryGrantPageInfo.total,
|
||||
current: salaryGrantPageInfo.pageNum,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
{
|
||||
this.state.payrollGrantVisible && <PayrollGrantModal
|
||||
|
|
|
|||
|
|
@ -1,12 +1,20 @@
|
|||
import React from 'react'
|
||||
import { WeaInputSearch, WeaHelpfulTip, WeaTable } from "ecCom"
|
||||
import { payrollGrantColumns, dataSource } from "../columns"
|
||||
import { Menu, Button,Table, Modal, Dropdown } from "antd"
|
||||
import { Menu, Button,Table, Modal, Dropdown,message } from "antd"
|
||||
import { inject, observer } from 'mobx-react';
|
||||
|
||||
@inject('payrollStore')
|
||||
@observer
|
||||
export default class payrollGrantModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedRowKeys: [],
|
||||
current: 1,
|
||||
searchValue: ""
|
||||
}
|
||||
}
|
||||
// 撤回
|
||||
handleWithdraw(record) {
|
||||
const { payrollStore } = this.props;
|
||||
|
|
@ -66,24 +74,76 @@ export default class payrollGrantModal extends React.Component {
|
|||
return result;
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
onSelectChange = (value) => {
|
||||
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 = (
|
||||
<Menu>
|
||||
<Menu onClick={(e) => this.handleMenuClick(e)}>
|
||||
<Menu.Item key="1">发放所选</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
|
||||
const {payrollStore} = this.props;
|
||||
const { salarySendDetailBaseInfo, canGrantDataSource } = payrollStore;
|
||||
const { salarySendDetailBaseInfo, canGrantDataSource, canGrantPageInfo } = payrollStore;
|
||||
const { selectedRowKeys } = this.state;
|
||||
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: this.onSelectChange.bind(this),
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal width={800} visible={this.props.visible} onCancel={() => {this.props.onCancel()}}>
|
||||
<div style={{padding: "0px 10px", height: "47px", lineHeight: "47px"}}>
|
||||
<span style={{fontSize: "14px", color: '#666'}}>批量发放</span>
|
||||
<div style={{float: "right", marginRight: "40px"}}>
|
||||
<Dropdown.Button type="primary" style={{marginRight: "10px"}} overlay={menu}>全部发放</Dropdown.Button>
|
||||
<WeaInputSearch />
|
||||
<Dropdown.Button type="primary" style={{marginRight: "10px"}} overlay={menu} onClick={() => {this.handleGrantAll()}}>全部发放</Dropdown.Button>
|
||||
<WeaInputSearch value={this.state.searchValue} onChange={(value) => {this.setState({searchValue: value})}} onSearch={(value) => {this.handleSearch(value)}}/>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{height: "40px", lineHeight: "40px"}}>
|
||||
|
|
@ -105,8 +165,15 @@ export default class payrollGrantModal extends React.Component {
|
|||
<span>工资单模板:{salarySendDetailBaseInfo.template}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{marginTop: "10px"}}>
|
||||
<WeaTable dataSource={canGrantDataSource} columns={this.getColumns()}/>
|
||||
<div style={{marginTop: "10px", height: "500px", overflowY: "scroll"}}>
|
||||
<WeaTable rowSelection={rowSelection} dataSource={canGrantDataSource} columns={this.getColumns()}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleDataPageChange(value)},
|
||||
total: canGrantPageInfo.total,
|
||||
current: canGrantPageInfo.pageNum,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,14 @@ import { inject, observer } from 'mobx-react';
|
|||
@inject('payrollStore')
|
||||
@observer
|
||||
export default class PayrollWithdrawModal extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedRowKeys: [],
|
||||
current: 1,
|
||||
}
|
||||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { payrollStore } = this.props
|
||||
const { batchWithdrawInfoList } = payrollStore
|
||||
|
|
@ -69,21 +77,77 @@ export default class PayrollWithdrawModal extends React.Component {
|
|||
})
|
||||
}
|
||||
|
||||
onSelectChange = (value) => {
|
||||
this.setState({
|
||||
selectedRowKeys: value
|
||||
})
|
||||
}
|
||||
|
||||
// 撤回
|
||||
fetchWithdrawPayroll(payload) {
|
||||
const { payrollStore: { grantPayroll, withdrawPayroll }} = this.props;
|
||||
withdrawPayroll(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.fetchWithdrawPayroll({ids: selectedRowKeys, salarySendId: this.props.sendId})
|
||||
}
|
||||
|
||||
|
||||
handleWithdrawAll() {
|
||||
this.fetchWithdrawPayroll({salarySendId: this.props.sendId})
|
||||
}
|
||||
|
||||
// 分页
|
||||
handleDataPageChange(value) {
|
||||
this.setState({current: value})
|
||||
const { payrollStore } = this.props
|
||||
const { batchWithdrawInfoList } = payrollStore
|
||||
batchWithdrawInfoList({salarySendId:this.props.sendId, current: value})
|
||||
}
|
||||
|
||||
|
||||
|
||||
handleSearch(value) {
|
||||
const { payrollStore: { batchWithdrawInfoList } } = this.props;
|
||||
batchWithdrawInfoList({salarySendId: this.props.sendId, keyword: value, current: this.state.current})
|
||||
}
|
||||
|
||||
render() {
|
||||
const menu = (
|
||||
<Menu>
|
||||
<Menu onClick={(e) => this.handleMenuClick(e)}>
|
||||
<Menu.Item key="1">撤回所选</Menu.Item>
|
||||
</Menu>
|
||||
);
|
||||
const {payrollStore} = this.props;
|
||||
const { salarySendDetailBaseInfo, canWidthdrawColumns, canWithdrawDataSource } = payrollStore;
|
||||
const { salarySendDetailBaseInfo, canWidthdrawColumns, canWithdrawDataSource, canWithdrawPageInfo } = payrollStore;
|
||||
const { selectedRowKeys } = this.state;
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: this.onSelectChange.bind(this),
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<Modal width={800} visible={this.props.visible} onCancel={() => {this.props.onCancel()}}>
|
||||
<div style={{padding: "0px 10px", height: "47px", lineHeight: "47px"}}>
|
||||
<span style={{fontSize: "14px", color: '#666'}}>批量撤回</span>
|
||||
<div style={{float: "right", marginRight: "40px"}}>
|
||||
<Dropdown.Button style={{marginRight: "10px"}} overlay={menu}>全部撤回</Dropdown.Button>
|
||||
<WeaInputSearch />
|
||||
<Dropdown.Button style={{marginRight: "10px"}} overlay={menu} onClick={() => {this.handleWithdrawAll()}}>全部撤回</Dropdown.Button>
|
||||
<WeaInputSearch value={this.state.searchValue} onChange={(value) => {this.setState({searchValue: value})}} onSearch={(value) => {this.handleSearch(value)}}/>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{height: "40px", lineHeight: "40px"}}>
|
||||
|
|
@ -105,8 +169,18 @@ export default class PayrollWithdrawModal extends React.Component {
|
|||
<span>工资单模板:{salarySendDetailBaseInfo.template}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style={{marginTop: "10px"}}>
|
||||
<WeaTable dataSource={canWithdrawDataSource} columns={this.getColumns()}/>
|
||||
<div style={{marginTop: "10px", height: "500px", scrollY: "scroll"}}>
|
||||
<WeaTable
|
||||
rowSelection={rowSelection}
|
||||
dataSource={canWithdrawDataSource}
|
||||
columns={this.getColumns()}
|
||||
pagination={{
|
||||
onChange: (value) => {this.handleDataPageChange(value)},
|
||||
total: canWithdrawPageInfo.total,
|
||||
current: canWithdrawPageInfo.pageNum,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Modal>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
.templatePreview {
|
||||
|
||||
.contentWrapper {
|
||||
height: 90vh;
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
.headerWrapper {
|
||||
background-color: #0270c1;
|
||||
height: 55px;
|
||||
|
|
@ -29,7 +34,6 @@
|
|||
.computerTemplate {
|
||||
background-color: rgb(246, 246, 246);
|
||||
width: 900px;
|
||||
min-height: 1200px;
|
||||
padding-top: 30px;
|
||||
padding-bottom: 20px;
|
||||
margin: 20px auto;
|
||||
|
|
|
|||
|
|
@ -59,10 +59,10 @@ export default class PhoneTemplate extends React.Component {
|
|||
<Row className="contentRow">
|
||||
{
|
||||
group.items && group.items.map(item => (
|
||||
<Col span={12}>
|
||||
<Col span={24}>
|
||||
<Row>
|
||||
<Col span={ 6 } className="contentItem">{item.name}</Col>
|
||||
<Col span={ 6 } className="contentItem">{index == 0 ? item.salaryItemValue : 10000}</Col>
|
||||
<Col span={ 12 } className="contentItem">{item.name}</Col>
|
||||
<Col span={ 12 } className="contentItem">{index == 0 ? item.salaryItemValue : 10000}</Col>
|
||||
</Row>
|
||||
</Col>
|
||||
))
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ export default class ChangeSalaryModal extends React.Component {
|
|||
item.title = <span>{item.title}<RequiredLabelTip /></span>
|
||||
item.render = (text, record) => {
|
||||
return (
|
||||
<WeaInput type={"number"} style={{width: '150px'}} value={text} onChange={(value) => {
|
||||
<WeaInput style={{width: '150px'}} value={text} onChange={(value) => {
|
||||
this.handleSalaryAfterItemChange(record, value)
|
||||
}}/>
|
||||
)
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ export default class EditAgentModal extends React.Component {
|
|||
request: {
|
||||
salaryArchiveId: this.props.currentId,
|
||||
effectiveTime: moment(new Date()).format("YYYY-MM-DD"),
|
||||
adjustReason: 'INIT',
|
||||
adjustReason: '',
|
||||
taxAgentId: ""
|
||||
}
|
||||
}
|
||||
|
|
@ -34,6 +34,7 @@ export default class EditAgentModal extends React.Component {
|
|||
item.selected = false
|
||||
return item;
|
||||
})
|
||||
console.log("adjustReasonList:", adjustReasonList);
|
||||
return adjustReasonList
|
||||
}
|
||||
|
||||
|
|
@ -98,6 +99,7 @@ export default class EditAgentModal extends React.Component {
|
|||
taxAgentId
|
||||
} = request;
|
||||
|
||||
|
||||
return (
|
||||
<Modal title="个税扣缴义务人调整" width={800} visible={this.props.visible} onClose={this.props.onCancel}
|
||||
footer={
|
||||
|
|
|
|||
|
|
@ -167,8 +167,7 @@ export default class SalaryFile extends React.Component {
|
|||
// 搜索
|
||||
handleSearch(value) {
|
||||
const { salaryFileStore: {getTableDatas, form}} = this.props;
|
||||
form.updateFields({username: value})
|
||||
getTableDatas()
|
||||
getTableDatas({username: value})
|
||||
}
|
||||
|
||||
// 初始化导入参数
|
||||
|
|
@ -326,6 +325,7 @@ export default class SalaryFile extends React.Component {
|
|||
pagination={{
|
||||
onChange: (value) => {this.handlePageChange(value)},
|
||||
total: pageInfo.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: pageInfo.pageNum
|
||||
}}
|
||||
scroll={{x: 2300}}
|
||||
|
|
|
|||
|
|
@ -39,18 +39,6 @@ export default class SalaryItemChangeList extends React.Component {
|
|||
if(singleSalaryItemList.columns) {
|
||||
columns = [...singleSalaryItemList.columns]
|
||||
}
|
||||
if(columns.length > 0) {
|
||||
columns.push({
|
||||
title: '操作',
|
||||
key: "cz",
|
||||
dataIndex: "cz",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<a onClick={() => {this.handleEdit(record)}}>编辑</a>
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
return columns
|
||||
}
|
||||
|
||||
|
|
@ -70,6 +58,7 @@ export default class SalaryItemChangeList extends React.Component {
|
|||
pagination={{
|
||||
onChange: (value) => {this.handlePageChange(value)},
|
||||
total: singleSalaryItemList.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: singleSalaryItemList.pageNum
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ export default class SlideAgent extends React.Component {
|
|||
pagination={{
|
||||
onChange: (value) => {this.handlePageChange(value)},
|
||||
total: taxAgentList.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: taxAgentList.pageNum
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ export default class SlideSalaryItem extends React.Component {
|
|||
pagination={{
|
||||
onChange: (value) => {this.handlePageChange(value)},
|
||||
total: salaryItemList.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: salaryItemList.pageNum
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -38,18 +38,6 @@ export default class TaxAgentChangeList extends React.Component {
|
|||
if(singleTaxAgentList.columns) {
|
||||
columns = [...singleTaxAgentList.columns]
|
||||
}
|
||||
if(columns.length > 0) {
|
||||
columns.push({
|
||||
title: '操作',
|
||||
key: "cz",
|
||||
dataIndex: "cz",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<a onClick={() => {this.handleEdit(record)}}>编辑</a>
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
return columns
|
||||
}
|
||||
|
||||
|
|
@ -71,6 +59,7 @@ export default class TaxAgentChangeList extends React.Component {
|
|||
pagination={{
|
||||
onChange: (value) => {this.handlePageChange(value)},
|
||||
total: singleTaxAgentList.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: singleTaxAgentList.pageNum
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -85,6 +85,7 @@ export default class DeleteSalaryItemModal extends React.Component {
|
|||
pagination={{
|
||||
onChange: (value) => {this.handleDataPageChange(value)},
|
||||
total: canDeleteList.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: canDeleteList.pageNum
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -309,6 +309,7 @@ export default class SalaryItem extends React.Component {
|
|||
pagination={{
|
||||
onChange: (value) => {this.handlePageChnage(value)},
|
||||
total: pageInfo.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: pageInfo.pageNum
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -113,14 +113,16 @@ export default class Archives extends React.Component {
|
|||
|
||||
// 导入
|
||||
handleImport(params) {
|
||||
const { archivesStore: {importBatch}} = this.props;
|
||||
const { archivesStore: {importBatch, initImportParams}} = this.props;
|
||||
importBatch(params)
|
||||
|
||||
}
|
||||
|
||||
// 导入完成
|
||||
handleFinish() {
|
||||
const { archivesStore: {getTableDatas}} = this.props;
|
||||
this.setState({importVisible: false})
|
||||
const { archivesStore: {getTableDatas, initImportParams}} = this.props;
|
||||
initImportParams()
|
||||
this.setState({importVisible: false, step: 0})
|
||||
getTableDatas()
|
||||
}
|
||||
|
||||
|
|
@ -137,11 +139,22 @@ export default class Archives extends React.Component {
|
|||
this.setState({ selectedRowKeys });
|
||||
}
|
||||
|
||||
// 关闭导入框
|
||||
handleImportCancel() {
|
||||
const { archivesStore: {initImportParams, getTableDatas }} = this.props;
|
||||
|
||||
initImportParams()
|
||||
if(this.state.step == 2) {
|
||||
getTableDatas()
|
||||
}
|
||||
this.setState({importVisible: false, step: 0});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { archivesStore } = this.props;
|
||||
const { selectedTab, selectedRowKeys } = this.state;
|
||||
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd,
|
||||
previewCurDataColumns, previewCurDataDataSource, importResult
|
||||
previewCurDataColumns, previewCurDataDataSource, importResult, initImportParams
|
||||
} = archivesStore;
|
||||
const { dataSource, pageInfo } = archivesStore
|
||||
if (!hasRight && !loading) { // 无权限处理
|
||||
|
|
@ -183,7 +196,7 @@ export default class Archives extends React.Component {
|
|||
const { selectedRowKeys } = this.state;
|
||||
console.log("selectedRowKeys:", selectedRowKeys);
|
||||
if(selectedRowKeys.length == 0) {
|
||||
message.warning("未选择任何条目");
|
||||
message.warning("未选择任何条目", 1);
|
||||
return
|
||||
}
|
||||
let ids = selectedRowKeys.join(",")
|
||||
|
|
@ -255,6 +268,7 @@ export default class Archives extends React.Component {
|
|||
pagination={{
|
||||
onChange: (value) => {this.handlePageChnage(value)},
|
||||
total: pageInfo.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: pageInfo.pageNum
|
||||
}}
|
||||
/>
|
||||
|
|
@ -320,10 +334,13 @@ export default class Archives extends React.Component {
|
|||
importResult={importResult}
|
||||
onFinish={() => {this.handleFinish()}}
|
||||
previewImport={(params) => {this.handlePreviewImport(params)}}
|
||||
importFile={(params) => {this.handleImport(params)}}
|
||||
importFile={(params) => {this.handleImport(params);}}
|
||||
templateLink={() => {this.handleTemplateLinkClick()}}
|
||||
visiable={this.state.importVisible}
|
||||
onCancel={() => { this.setState({importVisible: false})}}
|
||||
onCancel={() => {
|
||||
this.handleImportCancel()
|
||||
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -274,30 +274,10 @@ export default class Programme extends React.Component {
|
|||
|
||||
}
|
||||
|
||||
const renderSearchOperationItem = () => {
|
||||
return <div>
|
||||
<Button type="primary" style={{ marginRight: '10px' }} onClick={() => {
|
||||
if(selectedKey == "custom") {
|
||||
handleCustomNewClick()
|
||||
} else {
|
||||
handleNewClick()
|
||||
}
|
||||
|
||||
}}>新建</Button>
|
||||
|
||||
{
|
||||
selectedKey == "custom" && <WeaSelect
|
||||
options={options}
|
||||
value={customSelectkey}
|
||||
style={{width: "150px"}}
|
||||
onChange={(v, showname) => {
|
||||
setCustomSelectkey(v)
|
||||
getCustomCategoryList(v)
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
// const renderSearchOperationItem = () => {
|
||||
// const { programmeStore: {setCustomSelectkey, getCustomCategoryList}} = this.props;
|
||||
// return
|
||||
// }
|
||||
|
||||
const handleOnSave = () => {
|
||||
const { programmeStore } = this.props
|
||||
|
|
@ -362,7 +342,29 @@ export default class Programme extends React.Component {
|
|||
>
|
||||
<CustomTab topTab={topTab}
|
||||
searchOperationItem={
|
||||
renderSearchOperationItem()
|
||||
<div>
|
||||
<Button type="primary" style={{ marginRight: '10px' }} onClick={() => {
|
||||
if(selectedKey == "custom") {
|
||||
handleCustomNewClick()
|
||||
} else {
|
||||
handleNewClick()
|
||||
}
|
||||
|
||||
}}>新建</Button>
|
||||
|
||||
{
|
||||
selectedKey == "custom" && <WeaSelect
|
||||
options={options}
|
||||
value={customSelectkey}
|
||||
style={{width: "150px"}}
|
||||
onChange={(v) => {
|
||||
setCustomSelectkey(v)
|
||||
getCustomCategoryList(v)
|
||||
console.log("v:", v)
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
onChange={(v) => {
|
||||
setSelectedKey(v)
|
||||
|
|
@ -396,6 +398,7 @@ export default class Programme extends React.Component {
|
|||
pagination={{
|
||||
onChange: (value) => {this.handlePageChange(value)},
|
||||
total: tablePageInfo.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
current: tablePageInfo.pageNum
|
||||
}}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -62,7 +62,8 @@ export default class AbnormalDrawer extends Component {
|
|||
loading={loading}
|
||||
pagination={{
|
||||
onChange: (value) => {this.props.onPageChange(value)},
|
||||
total: this.props.total
|
||||
total: this.props.total,
|
||||
showTotal: (total) => `共 ${total} 条`,
|
||||
}}
|
||||
rowSelection={rowSelection}
|
||||
scroll={{ x: 1200 }}
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ export default class StandingBook extends React.Component {
|
|||
value: "",
|
||||
selectedKey: "0",
|
||||
tableParams: {
|
||||
startTime: moment(new Date()).format("YYYY-MM"),
|
||||
endTime: moment(new Date()).format("YYYY-MM"),
|
||||
startTime: moment(new Date()).subtract(3,'months').startOf('month').format('YYYY-MM'),
|
||||
endTime: moment(new Date()).subtract(-3,'months').startOf('month').format('YYYY-MM')
|
||||
},
|
||||
current: 1,
|
||||
dialogProps: {
|
||||
|
|
@ -191,7 +191,8 @@ export default class StandingBook extends React.Component {
|
|||
content: "确认要归档吗?",
|
||||
onOk: () => {
|
||||
siaccountFile({ billMonth }).then((res) => {
|
||||
console.log("res", res);
|
||||
const { current } = this.state;
|
||||
this.getCommonList({ ...this.state.tableParams, current });
|
||||
});
|
||||
},
|
||||
onCancel: () => {},
|
||||
|
|
|
|||
|
|
@ -133,20 +133,15 @@ export default class NormalIndex extends Component {
|
|||
...it,
|
||||
width: 150,
|
||||
fixed: "left",
|
||||
|
||||
render: (text, r) => {
|
||||
const { userName, employeeId } = r;
|
||||
return (
|
||||
<WeaPopoverHrm>
|
||||
<a
|
||||
href={`javaScript:openhrm(${employeeId});`}
|
||||
onClick={(e) => window.pointerXY(e)}
|
||||
title={userName}>
|
||||
{userName}
|
||||
</a>
|
||||
</WeaPopoverHrm>
|
||||
<span>{userName}</span>
|
||||
);
|
||||
},
|
||||
};
|
||||
it.title = "姓名"
|
||||
}
|
||||
return {
|
||||
...it,
|
||||
|
|
@ -179,17 +174,11 @@ export default class NormalIndex extends Component {
|
|||
render: (text, r) => {
|
||||
const { userName, employeeId } = r;
|
||||
return (
|
||||
<WeaPopoverHrm>
|
||||
<a
|
||||
href={`javaScript:openhrm(${employeeId});`}
|
||||
onClick={(e) => window.pointerXY(e)}
|
||||
title={userName}>
|
||||
{userName}
|
||||
</a>
|
||||
</WeaPopoverHrm>
|
||||
<span>{userName}</span>
|
||||
);
|
||||
},
|
||||
};
|
||||
it.title = "姓名"
|
||||
}
|
||||
return {
|
||||
...it,
|
||||
|
|
|
|||
|
|
@ -27,17 +27,24 @@ const history = syncHistoryWithStore(browserHistory, allStore.routing);
|
|||
|
||||
const Home = props => props.children;
|
||||
|
||||
const Root = () => (
|
||||
<Provider {...allStore}>
|
||||
<Router history={history}>
|
||||
<Route name='root' breadcrumbName='根路由' path='/' component={Home}>
|
||||
<IndexRedirect to='main/hrmSalary/index' />
|
||||
<Route name='main' breadcrumbName='入口' path='/main' component={Home}>
|
||||
{ Module.Route }
|
||||
</Route>
|
||||
</Route>
|
||||
</Router>
|
||||
</Provider>
|
||||
);
|
||||
class Root extends React.Component {
|
||||
componentWillMount() {
|
||||
top.$(".ant-message").remove()
|
||||
}
|
||||
render() {
|
||||
return (
|
||||
<Provider {...allStore}>
|
||||
<Router history={history}>
|
||||
<Route name='root' breadcrumbName='根路由' path='/' component={Home}>
|
||||
<IndexRedirect to='main/hrmSalary/index' />
|
||||
<Route name='main' breadcrumbName='入口' path='/main' component={Home}>
|
||||
{ Module.Route }
|
||||
</Route>
|
||||
</Route>
|
||||
</Router>
|
||||
</Provider>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
ReactDOM.render(<Root />, document.getElementById('container'));
|
||||
|
|
|
|||
|
|
@ -39,6 +39,14 @@ export class ArchivesStore {
|
|||
@observable previewCurDataDataSource = []
|
||||
@observable importResult = {}
|
||||
|
||||
@action
|
||||
initImportParams = () => {
|
||||
this.previewCurDataList = {};
|
||||
this.previewCurDataColumns = [];
|
||||
this.previewCurDataDataSource = [];
|
||||
this.importResult = {}
|
||||
}
|
||||
|
||||
|
||||
// ** 设置导入参数 start **
|
||||
@action
|
||||
|
|
@ -187,10 +195,10 @@ export class ArchivesStore {
|
|||
}
|
||||
API.save({welfareType, baseForm, paymentForm}).then(res => {
|
||||
if(res.status) {
|
||||
message.success("保存成功")
|
||||
message.success("保存成功", 1)
|
||||
this.getTableDatas()
|
||||
} else {
|
||||
message.error(res.errormsg || "保存失败")
|
||||
message.error(res.errormsg || "保存失败", 1)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -224,7 +232,7 @@ export class ArchivesStore {
|
|||
})
|
||||
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败");
|
||||
message.error(res.errormsg || "获取失败", 1);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -232,13 +240,18 @@ export class ArchivesStore {
|
|||
// 导入
|
||||
@action
|
||||
importBatch = (params) => {
|
||||
API.importBatch(params).then(res => {
|
||||
if(res.status) {
|
||||
this.importResult = res.data
|
||||
} else {
|
||||
message.error(res.errormsg || "导入失败")
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
API.importBatch(params).then(res => {
|
||||
if(res.status) {
|
||||
this.importResult = res.data
|
||||
resolve();
|
||||
} else {
|
||||
message.error(res.errormsg || "导入失败", 1)
|
||||
reject();
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 导出档案
|
||||
|
|
|
|||
|
|
@ -408,8 +408,8 @@ export class AttendanceStore {
|
|||
|
||||
// 考勤数据详情
|
||||
@action
|
||||
viewAttendQuote = (ids) => {
|
||||
API.viewAttendQuote(ids).then(res => {
|
||||
viewAttendQuote = (params = {}) => {
|
||||
API.viewAttendQuote(params).then(res => {
|
||||
if(res.status) {
|
||||
this.attendQuoteDetailPageInfo = res.data.pageInfo
|
||||
this.attendQuoteDetailTableStore.getDatas(res.data.dataKey.datas)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import { WeaForm, WeaTableNew } from 'comsMobx';
|
|||
|
||||
import * as API from '../apis/payroll'; // 引入API接口文件
|
||||
import { notNull } from '../util/validate';
|
||||
import { removePropertyCondition } from '../util/response';
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
|
|
@ -37,17 +38,21 @@ export class payrollStore {
|
|||
@observable detailListConditionForm = new WeaForm(); // 详情页搜索条件
|
||||
@observable detailListShowSearchAd = false; // 详情页是否展开搜索面板
|
||||
@observable detailListCondition = []; // 详情页搜索条件
|
||||
@observable salarySendDetailPageInfo ={}
|
||||
|
||||
// **** 工资单发放页 ****
|
||||
@observable salaryGrantDataSource = [];
|
||||
@observable salaryGrantPageInfo ={};
|
||||
@observable salaryGrantTableStore = new TableStore();
|
||||
@observable grantListConditionForm = new WeaForm(); // 详情页搜索条件
|
||||
@observable grantListShowSearchAd = false; // 详情页是否展开搜索面板
|
||||
@observable grantListCondition = []; // 详情页搜索条件
|
||||
@observable canGrantDataSource = []; // 可以发送的列表
|
||||
@observable canGrantColumns = []; // 可以发送的列名
|
||||
@observable canGrantPageInfo = {}; // 可以发送列表分页对象
|
||||
@observable canWithdrawDataSource = []; // 可以撤回的列表
|
||||
@observable canWidthdrawColumns = []; // 可以撤回的列表列名
|
||||
@observable canWithdrawPageInfo = {}; // 可以撤回列表分页对象
|
||||
|
||||
@action
|
||||
setGrantListShowSearchAd = (grantListShowSearchAd) => this.grantListShowSearchAd = grantListShowSearchAd
|
||||
|
|
@ -76,8 +81,8 @@ export class payrollStore {
|
|||
getCondition = () => {
|
||||
API.getCondition().then(action(res => {
|
||||
if (res.api_status) { // 接口请求成功/失败处理
|
||||
this.condition = res.condition;
|
||||
this.form.initFormFields(res.condition); // 渲染高级搜索form表单
|
||||
let condition = removePropertyCondition(res.condition);
|
||||
this.form.initFormFields(condition); // 渲染高级搜索form表单
|
||||
} else {
|
||||
message.error(res.msg || '接口调用失败!')
|
||||
}
|
||||
|
|
@ -375,10 +380,13 @@ export class payrollStore {
|
|||
// 工资单发放-工资单发放信息列表
|
||||
@action
|
||||
getInfoList = (params = {}) => {
|
||||
let form = this.grantListConditionForm.getFormParams();
|
||||
params = {...form, ...params}
|
||||
API.getInfoList(params).then(res => {
|
||||
if(res.status) {
|
||||
this.salaryGrantTableStore.getDatas(res.data.dataKey.datas)
|
||||
this.salaryGrantDataSource = res.data.datas
|
||||
this.salaryGrantPageInfo = res.data.pageInfo
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
}
|
||||
|
|
@ -388,10 +396,13 @@ export class payrollStore {
|
|||
// 工资单-工资单发放详情列表
|
||||
@action
|
||||
getPayrollDetailList = (params) => {
|
||||
let form = this.detailListConditionForm.getFormParams() || {}
|
||||
params = {...form, ...params}
|
||||
API.getPayrollDetailList(params).then(res => {
|
||||
if(res.status) {
|
||||
this.salarySendDetailTableStore.getDatas(res.data.dataKey.datas)
|
||||
this.salarySendDetailDataSource = res.data.datas
|
||||
this.salarySendDetailPageInfo = res.data.pageInfo
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
}
|
||||
|
|
@ -404,8 +415,9 @@ export class payrollStore {
|
|||
getPayrollDetailSa = (params = {}) => {
|
||||
API.getPayrollDetailSa(params).then(res => {
|
||||
if (res.status) { // 接口请求成功/失败处理
|
||||
this.detailListCondition = res.data.condition;
|
||||
this.detailListConditionForm.initFormFields(res.data.condition); // 渲染高级搜索form表单
|
||||
let condition = removePropertyCondition(res.data.condition);
|
||||
this.detailListCondition = condition
|
||||
this.detailListConditionForm.initFormFields(condition); // 渲染高级搜索form表单
|
||||
} else {
|
||||
message.error(res.errormsg || '接口调用失败!')
|
||||
}
|
||||
|
|
@ -423,8 +435,9 @@ export class payrollStore {
|
|||
getPaySa = (params = {}) => {
|
||||
API.getPaySa(params).then(res => {
|
||||
if(res.status) {
|
||||
this.grantListCondition = res.data.condition;
|
||||
this.grantListConditionForm.initFormFields(res.data.condition);
|
||||
let condition = removePropertyCondition(res.data.condition)
|
||||
this.grantListCondition = condition;
|
||||
this.grantListConditionForm.initFormFields(condition);
|
||||
} else {
|
||||
message.error(res.errormsg || "接口调用失败")
|
||||
}
|
||||
|
|
@ -436,8 +449,13 @@ export class payrollStore {
|
|||
batchSendInfoList = (params = {}) => {
|
||||
API.batchSendInfoList(params).then(res => {
|
||||
if(res.status) {
|
||||
this.canGrantDataSource = res.data.datas;
|
||||
let datas = res.data.datas || [];
|
||||
datas.map(item => {
|
||||
item.key = item.id
|
||||
})
|
||||
this.canGrantDataSource = datas
|
||||
this.canGrantColumns = res.data.columns;
|
||||
this.canGrantPageInfo = res.data.pageInfo
|
||||
// alert("this.canGrantColumns:" + JSON.stringify(this.canGrantColumns))
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败")
|
||||
|
|
@ -450,8 +468,13 @@ export class payrollStore {
|
|||
batchWithdrawInfoList = (params = {}) => {
|
||||
API.batchWithdrawInfoList(params).then(res => {
|
||||
if(res.status) {
|
||||
this.canWithdrawDataSource = res.data.datas
|
||||
let datas = res.data.datas || [];
|
||||
datas.map(item => {
|
||||
item.key = item.id
|
||||
})
|
||||
this.canWithdrawDataSource = datas
|
||||
this.canWidthdrawColumns = res.data.columns
|
||||
this.canWithdrawPageInfo = res.data.pageInfo
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,10 @@ export class ProgrammeStore {
|
|||
@observable tableColumns = [];
|
||||
@observable tablePageInfo = {};
|
||||
|
||||
|
||||
@action
|
||||
setCustomSelectkey = customSelectkey => this.customSelectkey = customSelectkey
|
||||
|
||||
@action
|
||||
setCustomRequest = customRequest => this.customRequest = customRequest
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
// 添加全部选项
|
||||
export const optionAddAll = (options) => {
|
||||
let results = [...options];
|
||||
results.unshift({
|
||||
key: "All",
|
||||
showname: "全部",
|
||||
selected: false
|
||||
})
|
||||
return results;
|
||||
}
|
||||
Loading…
Reference in New Issue