薪资账套报错bug
This commit is contained in:
parent
1acb46788b
commit
8fd6579dfd
|
|
@ -9,7 +9,6 @@ import BaseFormModal from "./baseFormModal";
|
|||
import CustomPaginationTable from "../../components/customPaginationTable";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
import "./index.less";
|
||||
import { deleteLedgerPersonRange } from "../../apis/ledger";
|
||||
|
||||
const MonthPicker = DatePicker.MonthPicker;
|
||||
|
||||
|
|
@ -42,16 +41,17 @@ export default class Calculate extends React.Component {
|
|||
}
|
||||
|
||||
// 搜索
|
||||
handleSearch(value) {
|
||||
handleSearch = (value, extra = {}) => {
|
||||
const { calculateStore } = this.props;
|
||||
const { getSalaryAcctList } = calculateStore;
|
||||
getSalaryAcctList({
|
||||
name: value,
|
||||
startMonthStr: this.state.startDate,
|
||||
endMonthStr: this.state.endDate,
|
||||
current: this.state.current
|
||||
current: this.state.current,
|
||||
...extra
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
handleRangePickerChange(type, value) {
|
||||
const { calculateStore: { getSalaryAcctList } } = this.props;
|
||||
|
|
@ -382,7 +382,7 @@ export default class Calculate extends React.Component {
|
|||
this.setState({ searchValue: value });
|
||||
}}
|
||||
onSearch={value => {
|
||||
this.handleSearch(value);
|
||||
this.handleSearch(value, { current: 1 });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ export default class CumDeduct extends React.Component {
|
|||
if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") {
|
||||
params.taxAgentId = taxAgentId;
|
||||
}
|
||||
getTableDatas(params);
|
||||
getTableDatas({ ...params, current: 1 });
|
||||
};
|
||||
|
||||
//新功能
|
||||
|
|
|
|||
|
|
@ -258,7 +258,7 @@ export default class CumSituation extends React.Component {
|
|||
if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") {
|
||||
params.taxAgentId = taxAgentId;
|
||||
}
|
||||
getTableDatas({ ...params, taxYearMonth: monthValue + "-" + taxYearMonth });
|
||||
getTableDatas({ ...params, taxYearMonth: monthValue + "-" + taxYearMonth, current: 1 });
|
||||
};
|
||||
//新功能
|
||||
handleCreateUpSituation = (payload) => {
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ export default class OtherDeduct extends React.Component {
|
|||
if (taxAgentId != null && taxAgentId !== "" && taxAgentId !== "All") {
|
||||
params.taxAgentId = taxAgentId;
|
||||
}
|
||||
getTableDatas(params);
|
||||
getTableDatas({...params, current: 1});
|
||||
};
|
||||
|
||||
//新功能
|
||||
|
|
|
|||
|
|
@ -518,8 +518,8 @@ class SpecialAddDeduction extends Component {
|
|||
searchsBaseValue={advanceForm.getFormParams().username}
|
||||
onSearchChange={(v) => advanceForm.updateFields({ username: v })}
|
||||
onAdReset={() => advanceForm.reset()}
|
||||
onAdSearch={() => this.specialAddDeductionList()}
|
||||
onSearch={() => this.specialAddDeductionList()}
|
||||
onAdSearch={() => this.specialAddDeductionList({ current: 1 })}
|
||||
onSearch={() => this.specialAddDeductionList({ current: 1 })}
|
||||
searchsAdQuick={this.getSearchsAdQuick()}
|
||||
searchsAd={this.getSearchsAdQuick(true)}
|
||||
setShowSearchAd={bool => this.setState({ advanceParams: { ...advanceParams, visible: bool } })}
|
||||
|
|
|
|||
|
|
@ -52,12 +52,18 @@ class LedgerAdjustRuleAddModal extends Component {
|
|||
});
|
||||
return;
|
||||
}
|
||||
const items = {
|
||||
...extraItems,
|
||||
salaryItemName: this.state.salaryItemName
|
||||
};
|
||||
const items = { ...extraItems, salaryItemName: this.state.salaryItemName };
|
||||
const { salaryItemName, salaryItemId, ...extraFileds } = items;
|
||||
const salaryItemNameFiled = salaryItemName.split(","), salaryItemIdFiled = salaryItemId.split(",");
|
||||
const fields = _.map(salaryItemNameFiled, (item, index) => {
|
||||
return {
|
||||
...extraFileds,
|
||||
salaryItemName: item,
|
||||
salaryItemId: salaryItemIdFiled[index]
|
||||
};
|
||||
});
|
||||
this.handleReset();
|
||||
onSave([...salaryRuleItemsList, items]);
|
||||
onSave([...salaryRuleItemsList, ...fields]);
|
||||
};
|
||||
handleReset = () => {
|
||||
this.setState({
|
||||
|
|
@ -100,7 +106,7 @@ class LedgerAdjustRuleAddModal extends Component {
|
|||
<WeaSelect
|
||||
multiple
|
||||
viewAttr={3}
|
||||
style={{ width: "100%" }}
|
||||
style={{ width: "350px" }}
|
||||
options={salaryItemOptions}
|
||||
value={salaryItemId}
|
||||
onChange={(salaryItemId, salaryItemName) => this.setState({ salaryItemId, salaryItemName })}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class LedgerSalaryItem extends Component {
|
|||
});
|
||||
} else {
|
||||
const obj = {
|
||||
id: itemGroups.length,
|
||||
id: new Date().getTime(),
|
||||
itemHide: null,
|
||||
items: [],
|
||||
name: payload.name
|
||||
|
|
|
|||
|
|
@ -38,13 +38,13 @@ class LedgerTable extends Component {
|
|||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList();
|
||||
if (nextProps.doSearch !== this.props.doSearch) this.getLedgerList({current: 1});
|
||||
}
|
||||
|
||||
getLedgerList = () => {
|
||||
getLedgerList = (extra={}) => {
|
||||
const { name } = this.props;
|
||||
const { pageInfo } = this.state;
|
||||
const payload = { name, ...pageInfo };
|
||||
const payload = { name, ...pageInfo, ...extra };
|
||||
this.setState({ loading: true });
|
||||
getLedgerList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ export default class Payroll extends React.Component {
|
|||
// 模板搜索
|
||||
handleTemplateSearch() {
|
||||
const { templateSearchValue, templateSelect } = this.state;
|
||||
let params = { name: templateSearchValue, salarySobId: templateSelect };
|
||||
let params = { name: templateSearchValue, salarySobId: templateSelect,current: 1 };
|
||||
const { payrollStore: { getPayrollTemplateList } } = this.props;
|
||||
getPayrollTemplateList(params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -355,7 +355,8 @@ export default class PayrollGrant extends React.Component {
|
|||
getInfoList({
|
||||
salarySendId: currentId,
|
||||
isGranted: selectedKey !== "0",
|
||||
...this.pageInfo
|
||||
...this.pageInfo,
|
||||
current: 1
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -614,7 +614,7 @@ class Index extends Component {
|
|||
});
|
||||
if (!this.handleChangeDebounce) {
|
||||
this.handleChangeDebounce = _.debounce(() => {
|
||||
this.query()
|
||||
this.query();
|
||||
}, 500);
|
||||
}
|
||||
this.handleChangeDebounce();
|
||||
|
|
@ -724,7 +724,14 @@ class Index extends Component {
|
|||
const adBtn = [
|
||||
// 高级搜索内部按钮
|
||||
<Button type="primary" onClick={() => {
|
||||
this.setState({ showSearchAd: false }, () => this.query());
|
||||
this.setState({
|
||||
showSearchAd: false,
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
current: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
}, () => this.query());
|
||||
}}> 搜索 </Button>,
|
||||
<Button type="ghost" onClick={() => this.setState({
|
||||
searchItemsValue: {
|
||||
|
|
@ -777,7 +784,17 @@ class Index extends Component {
|
|||
setShowSearchAd={(bool) => this.setState({ showSearchAd: bool })} //高级搜索面板受控
|
||||
searchsAd={renderSearch()} // 高级搜索内部数据g1etSearchs(form, toJS(condition), 2)
|
||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
onSearch={this.query} // 点搜索按钮时的回调this.handleSearch()
|
||||
onSearch={() => {
|
||||
this.setState({
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
current: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
}, () => {
|
||||
this.query();
|
||||
});
|
||||
}} // 点搜索按钮时的回调this.handleSearch()
|
||||
searchsBasePlaceHolder={"请输入姓名"}
|
||||
onSearchChange={(v) => this.setState({
|
||||
searchItemsValue: {
|
||||
|
|
|
|||
|
|
@ -65,6 +65,26 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="formItem">
|
||||
<Col span={4}>薪资档案引用</Col>
|
||||
<Col span={20}>
|
||||
<Switch
|
||||
disabled={
|
||||
!((editable && this.props.record.canEdit) || isAdd)
|
||||
}
|
||||
checked={useInEmployeeSalary == 1}
|
||||
onChange={value => {
|
||||
this.handleChange({ useInEmployeeSalary: value ? 1 : 0 });
|
||||
}}
|
||||
/>
|
||||
<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="提示:开启后,该薪资项目不可删除或设为无效,取值方式会默认置为输入"
|
||||
placement="topLeft"
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row className="formItem">
|
||||
<Col span={4}>默认使用</Col>
|
||||
<Col span={20}>
|
||||
|
|
@ -86,26 +106,6 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
</Col>
|
||||
</Row>
|
||||
|
||||
<Row className="formItem">
|
||||
<Col span={4}>薪资档案引用</Col>
|
||||
<Col span={20}>
|
||||
<Switch
|
||||
disabled={
|
||||
!((editable && this.props.record.canEdit) || isAdd)
|
||||
}
|
||||
checked={useInEmployeeSalary == 1}
|
||||
onChange={value => {
|
||||
this.handleChange({ useInEmployeeSalary: value ? 1 : 0 });
|
||||
}}
|
||||
/>
|
||||
<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="提示:开启后,该薪资项目不可删除或设为无效,取值方式会默认置为输入"
|
||||
placement="topLeft"
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
{
|
||||
(systemType == 0 || isAdd) &&
|
||||
<Row className="formItem">
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ export default class SalaryItem extends React.Component {
|
|||
|
||||
handleSearch(value) {
|
||||
const { salaryItemStore: { getTableDatas } } = this.props;
|
||||
getTableDatas({ ...this.state.searchParams, name: value }).then(res => {
|
||||
getTableDatas({ ...this.state.searchParams,current: 1, name: value }).then(res => {
|
||||
this.setState({
|
||||
searchParams: {
|
||||
...this.state.searchParams,
|
||||
|
|
|
|||
|
|
@ -557,7 +557,15 @@ export default class Archives extends React.Component {
|
|||
const adBtn = [ // 高级搜索内部按钮
|
||||
<Button type="primary" onClick={() => {
|
||||
setShowSearchAd(false);
|
||||
this.query();
|
||||
this.setState({
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
current: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
}, () => {
|
||||
this.query();
|
||||
});
|
||||
}}>搜索</Button>,
|
||||
<Button type="ghost" onClick={() => form.resetForm()}>重置</Button>,
|
||||
<Button type="ghost" onClick={() => setShowSearchAd(false)}>取消</Button>
|
||||
|
|
@ -738,7 +746,17 @@ export default class Archives extends React.Component {
|
|||
searchsAd={getSearchs(form, toJS(condition), 2)} // 高级搜索内部数据
|
||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
searchsBasePlaceHolder={"请输入姓名"}
|
||||
onSearch={this.query} // 点搜索按钮时的回调
|
||||
onSearch={() => {
|
||||
this.setState({
|
||||
pageInfo: {
|
||||
...pageInfo,
|
||||
current: 1,
|
||||
pageSize: 10
|
||||
}
|
||||
}, () => {
|
||||
this.query();
|
||||
});
|
||||
}} // 点搜索按钮时的回调
|
||||
onSearchChange={v => form.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
|
||||
searchsBaseValue={form.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ export default class AbnormalListIndex extends Component {
|
|||
|
||||
handleSearch(value) {
|
||||
const { billMonth } = this.props;
|
||||
const { current } = this.state;
|
||||
this.getChangeList({ billMonth, current, userName: value });
|
||||
this.getChangeList({ billMonth, current: 1, userName: value });
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class MakeupDifference extends Component {
|
|||
window.open(url, "_self");
|
||||
break;
|
||||
case "search":
|
||||
this.diffListRef.recessionList({ userName: name });
|
||||
this.diffListRef.recessionList({ userName: name, current: 1 });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ class Regression extends Component {
|
|||
window.open(url, "_self");
|
||||
break;
|
||||
case "search":
|
||||
this.regListRef.recessionList({ userName: name });
|
||||
this.regListRef.recessionList({ userName: name, current: 1 });
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -318,7 +318,7 @@ export default class TaxAgent extends React.Component {
|
|||
style={{ width: 250 }}
|
||||
placeholder="请输入个税扣缴义务人名称"
|
||||
onChange={name => this.setState({ name })}
|
||||
onSearch={() => getTaxAgentList({ name })}
|
||||
onSearch={() => getTaxAgentList({ name, current: 1 })}
|
||||
/>
|
||||
];
|
||||
const renderTipsLabel = () => {
|
||||
|
|
|
|||
|
|
@ -106,9 +106,9 @@ export class CumDeductStore {
|
|||
let requestParams = this.form.getFormParams() || {};
|
||||
requestParams = {
|
||||
...requestParams,
|
||||
...params,
|
||||
current: this.pageObj.current,
|
||||
pageSize: this.pageObj.pageSize
|
||||
pageSize: this.pageObj.pageSize,
|
||||
...params,
|
||||
};
|
||||
API.getCumDeductList(requestParams).then(
|
||||
action(({ status, data, errormsg }) => {
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ export class ProgrammeStore {
|
|||
params.welfareTypeEnum = selectKey
|
||||
API.getCustomCategoryList(params).then(action(res => {
|
||||
if (res.status) { // 接口请求成功/失败处理
|
||||
this.tableStore.getDatas(res.data.datas); // table 请求数据
|
||||
this.tableStore.getDatas(res.data.datas, 1); // table 请求数据
|
||||
} else {
|
||||
message.error(res.errormsg || '接口调用失败!')
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue