bug 处理
This commit is contained in:
parent
9940be40ed
commit
c9cda1fdfc
|
|
@ -6,7 +6,7 @@ export default class CustomTab extends React.Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: ""
|
||||
selectedKey: "0"
|
||||
}
|
||||
}
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export default class CumDeduct extends React.Component {
|
|||
value: "",
|
||||
selectedKey: "0",
|
||||
visiable: false,
|
||||
monthValue: moment(new Date()).format("YYYY-MM"),
|
||||
monthValue: "",
|
||||
taxAgentId: "",
|
||||
datetime: "",
|
||||
inited: false,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export default class CumSituation extends React.Component {
|
|||
selectedKey: "0",
|
||||
visiable: false,
|
||||
inited: false,
|
||||
monthValue: moment(new Date()).format("YYYY-MM"),
|
||||
monthValue: "",
|
||||
taxAgentId: "",
|
||||
modalParam: {
|
||||
taxYearMonth: "",
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ export default class OtherDeduct extends React.Component {
|
|||
value: "",
|
||||
selectedKey: "0",
|
||||
visiable: false,
|
||||
monthValue: moment(new Date()).format("YYYY-MM"),
|
||||
monthValue: "",
|
||||
taxAgentId: "",
|
||||
inited: false,
|
||||
modalParam: {
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -92,9 +92,9 @@ export default class SalaryItemForm extends React.Component {
|
|||
<Button type="default" onClick={() => {setAddCategoryVisible(true)}}>新增分类</Button>
|
||||
<Button type="default" style={{marginLeft: "10px"}} onClick={() => {this.handlePreview()}}>预览</Button>
|
||||
</div>
|
||||
<div className="searchInputWrapper">
|
||||
{/* <div className="searchInputWrapper">
|
||||
<WeaInputSearch style={{width: "150px"}} />
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
|
||||
<div className="userInfoWrapper">
|
||||
|
|
|
|||
|
|
@ -164,7 +164,7 @@ export default class CanMoveItem extends React.Component {
|
|||
dataSource={this.props.dataSource}
|
||||
columns={this.state.columns}
|
||||
pagination={false}
|
||||
onDrop={this.handleTableDrop}
|
||||
onDrop={(datas) => this.handleTableDrop(datas)}
|
||||
draggable={true}/>
|
||||
}
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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,6 +149,7 @@ export default class Archives extends React.Component {
|
|||
}
|
||||
this.setState({importVisible: false, step: 0});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { archivesStore } = this.props;
|
||||
const { selectedTab, selectedRowKeys } = this.state;
|
||||
|
|
@ -195,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(",")
|
||||
|
|
|
|||
|
|
@ -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: {
|
||||
|
|
|
|||
|
|
@ -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'));
|
||||
|
|
|
|||
|
|
@ -195,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)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -232,7 +232,7 @@ export class ArchivesStore {
|
|||
})
|
||||
|
||||
} else {
|
||||
message.error(res.errormsg || "获取失败");
|
||||
message.error(res.errormsg || "获取失败", 1);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
@ -246,7 +246,7 @@ export class ArchivesStore {
|
|||
this.importResult = res.data
|
||||
resolve();
|
||||
} else {
|
||||
message.error(res.errormsg || "导入失败")
|
||||
message.error(res.errormsg || "导入失败", 1)
|
||||
reject();
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ export class payrollStore {
|
|||
@observable detailListConditionForm = new WeaForm(); // 详情页搜索条件
|
||||
@observable detailListShowSearchAd = false; // 详情页是否展开搜索面板
|
||||
@observable detailListCondition = []; // 详情页搜索条件
|
||||
@observable salarySendDetailPageInfo ={}
|
||||
|
||||
// **** 工资单发放页 ****
|
||||
@observable salaryGrantDataSource = [];
|
||||
|
|
@ -395,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 || "获取失败")
|
||||
}
|
||||
|
|
@ -411,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 || '接口调用失败!')
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue