diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 52bb065c..95141435 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -538,7 +538,8 @@ export default class PayrollGrant extends React.Component { grantListCondition, setGrantListShowSearchAd, salaryGrantPageInfo, - getInfoList + getInfoList, + loading } = payrollStore; const { selectedRowKeys, selectedKey, currentId, payrollPartModalParams } = this.state; const rowSelection = { @@ -569,35 +570,19 @@ export default class PayrollGrant extends React.Component { ]; return (
- } // 左侧图标 - iconBgcolor="#F14A2D" // 左侧图标背景色 - showDropIcon={true} // 是否显示下拉按钮 - buttons={this.getSearchsAdQuick()} - /> - + } iconBgcolor="#F14A2D" + showDropIcon={true} buttons={this.getSearchsAdQuick()}/> - this.setState({ selectedKey: v }, () => { - getInfoList({ - salarySendId: currentId, - isGranted: v !== "0" - }); - }) - } - searchType={["base", "advanced"]} // base:基础搜索框 advanced:显示高级搜索按钮 - searchsBasePlaceHolder="请输入姓名" - showSearchAd={grantListShowSearchAd} // 是否展开高级搜索面板 - setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控 - searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)} // 高级搜索内部数据 - buttonsAd={adBtn} // 高级搜索内部按钮 - onSearch={() => this.handleSearch()} // 点搜索按钮时的回调 - onSearchChange={v => grantListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值 - searchsBaseValue={grantListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步 + datas={topTab} keyParam="viewcondition" selectedKey={selectedKey} searchType={["base", "advanced"]} + onChange={v => this.setState({ selectedKey: v }, () => { + getInfoList({ salarySendId: currentId, isGranted: v !== "0" }); + })} + searchsBasePlaceHolder="请输入姓名" showSearchAd={grantListShowSearchAd} buttonsAd={adBtn} + setShowSearchAd={bool => setGrantListShowSearchAd(bool)} + searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)} + onSearch={() => this.handleSearch()} + onSearchChange={v => grantListConditionForm.updateFields({ username: v })} + searchsBaseValue={grantListConditionForm.getFormParams().username} />
@@ -626,7 +611,7 @@ export default class PayrollGrant extends React.Component {
{ - !_.isEmpty(this.getColumns()) ? + !loading ? { + this.loading = false; if (res.status) { this.salaryGrantTableStore = res.data.columns; this.salaryGrantDataSource = res.data.list; @@ -470,7 +472,7 @@ export class payrollStore { } else { message.error(res.errormsg || "获取失败"); } - }); + }).catch(() => this.loading = false); }; // 工资单-工资单发放详情列表