This commit is contained in:
parent
e9abaa26bb
commit
02b085c051
|
|
@ -23,7 +23,7 @@ class CustomBrowserDialog extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
loading: false, listDatas: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, selectedRowKeys: [],
|
||||
query: { [props.searchParamsKey]: "" },
|
||||
query: { [props.searchParamsKey]: "" }, singleFilterVal: "",
|
||||
leftListSelectedKeys: [], // 左侧table选择的keys
|
||||
leftListSelectedData: [], // 左侧table选择的数据
|
||||
rightCheckedKeys: [], //右侧选择的keys
|
||||
|
|
@ -157,7 +157,8 @@ class CustomBrowserDialog extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
loading, listDatas, pageInfo, selectedRowKeys, query, leftListSelectedKeys, rightDatas, rightCheckedKeys
|
||||
loading, listDatas, pageInfo, selectedRowKeys, query, leftListSelectedKeys, rightDatas, rightCheckedKeys,
|
||||
singleFilterVal
|
||||
} = this.state;
|
||||
const { dialogType, tableProps: { rowKey, columns }, isSingle, searchParamsKey } = this.props;
|
||||
const sheight = this.dialog ? this.dialog.state.height - 55 : 260;
|
||||
|
|
@ -214,9 +215,13 @@ class CustomBrowserDialog extends Component {
|
|||
/>
|
||||
</div>
|
||||
</React.Fragment> :
|
||||
<WeaTransferList data={listDatas} height={this.dialog ? this.dialog.state.height - 20 : 260}
|
||||
checkedCb={([id]) => this.handleRowClick(_.find(listDatas, item => item.id === id))}
|
||||
checkedKeys={[]}/>
|
||||
<React.Fragment>
|
||||
<WeaInputSearch value={singleFilterVal} style={{ width: "100%", marginBottom: 10 }}
|
||||
onChange={singleFilterVal => this.setState({ singleFilterVal })}/>
|
||||
<WeaTransferList height={this.dialog ? this.dialog.state.height - 65 : 260} checkedKeys={[]}
|
||||
checkedCb={([id]) => this.handleRowClick(_.find(listDatas, item => item.id === id))}
|
||||
data={listDatas.filter((item) => item.name.indexOf(_.trim(singleFilterVal)) > -1)}/>
|
||||
</React.Fragment>
|
||||
}
|
||||
</div>
|
||||
</Spin>;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class Index extends Component {
|
|||
} else if (index === 1) {
|
||||
return { ...item, fixed: "left", width: 176 };
|
||||
}
|
||||
if (item.dataIndex === "operate") {
|
||||
if (item.dataIndex === "operate" || item.dataIndex === "opts") {
|
||||
return { ...item, fixed: "right", width: item.width || "120px" };
|
||||
}
|
||||
return { ...item, width: "33%" };
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export const PAGE = {
|
|||
"otherDeduction": ["/dataAcquisition/otherDeduct"], //其他免税扣除
|
||||
"addUpSituation": ["/dataAcquisition/cumSituation"], //往期累计情况
|
||||
"attendQuote": ["/dataAcquisition/attendance"], //考勤引用
|
||||
"myBill": ["/hrmSalary/mySalary", "/hrmSalary/mySalaryMobile", "/hrmSalary/mobilepayroll"], //薪资福利
|
||||
"myBill": ["/hrmSalary/mySalary", "/hrmSalary/mySalaryMobile"], //薪资福利
|
||||
"taxAgent": ["/hrmSalary/taxAgent"], //个税扣缴义务人
|
||||
"auth": ["/hrmSalary/roleManagement"], //业务管理线
|
||||
"variableArchive": ["/hrmSalary/variableSalary"], //浮动薪酬
|
||||
|
|
@ -18,5 +18,5 @@ export const PAGE = {
|
|||
"salaryField": ["/hrmSalary/fieldManagement"], //字段管理
|
||||
"salaryItem": ["/hrmSalary/salaryItem"], //薪资项目管理
|
||||
"siScheme": ["/socialSecurityBenefits/programme"], //社保福利方案
|
||||
"report": ["/hrmSalary/analysisOfSalaryStatistics", "/hrmSalary/reportView"], //报表
|
||||
"report": ["/hrmSalary/analysisOfSalaryStatistics", "/hrmSalary/reportView"] //报表
|
||||
};
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ class Layout extends Component {
|
|||
header.appendChild(link);
|
||||
top.$(".ant-message").remove();
|
||||
window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission();
|
||||
window.location.hash.indexOf("mobilepayroll") !== -1 && stores.taxAgentStore.initPageAndOptAuth();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -294,7 +294,7 @@ class Index extends Component {
|
|||
onSearch={() => this.handleReqBtnsClick("search")}/>
|
||||
] : selectedKey === "detail" ? [
|
||||
<span className="employeeYearWrapper">
|
||||
<span>{getLabel(111, "年薪资核算人员明细:")}</span>
|
||||
<span>{getLabel(111, "年度:")}</span>
|
||||
<WeaDatePicker value={year} format="YYYY" onChange={year => this.setState({ year })}/>
|
||||
</span>,
|
||||
<WeaInputSearch placeholder={getLabel(111, "请输入姓名、工号、身份证号")} className="search"
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import React, { Component } from "react";
|
||||
import UnifiedTable from "../../components/UnifiedTable";
|
||||
import { getTableDate } from "../../apis/cumDeduct";
|
||||
import { Menu, Popover } from "antd";
|
||||
import { Menu, Popover, Spin } from "antd";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -104,7 +104,7 @@ class DataTables extends Component {
|
|||
</a>;
|
||||
}
|
||||
};
|
||||
} else if (dataIndex === "operate") {
|
||||
} else if (dataIndex === "operate" || dataIndex === "opts") {
|
||||
return {
|
||||
...item,
|
||||
width: 150,
|
||||
|
|
@ -169,15 +169,10 @@ class DataTables extends Component {
|
|||
};
|
||||
}
|
||||
});
|
||||
return <UnifiedTable
|
||||
rowKey="id"
|
||||
rowSelection={rowSelection}
|
||||
columns={getColumns}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
xWidth={getColumns.length * 160}
|
||||
/>;
|
||||
return (<Spin spinning={loading.query}>
|
||||
<UnifiedTable rowKey="id" rowSelection={rowSelection} columns={getColumns}
|
||||
dataSource={dataSource} pagination={pagination} loading={loading.query}
|
||||
xWidth={getColumns.length * 160}/> </Spin>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
import React, { Component } from "react";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import {
|
||||
WeaBrowser,
|
||||
WeaCheckbox,
|
||||
WeaDialog,
|
||||
WeaError,
|
||||
|
|
@ -19,6 +18,7 @@ import {
|
|||
WeaTable
|
||||
} from "ecCom";
|
||||
import { reportStatisticsItemSave, statisticsItemChangetab, statisticsItemGetform } from "../../../apis/statistics";
|
||||
import CustomBrowser from "../../../components/CustomBrowser";
|
||||
import "../index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
|
@ -263,23 +263,22 @@ class CustomStatisticsItemsModal extends Component {
|
|||
})
|
||||
});
|
||||
};
|
||||
handleChangeStatisticalItems = (itemValue, _names, datas) => {
|
||||
handleChangeStatisticalItems = (data) => {
|
||||
const itemValue = _.keys(data)[0], datas = _.values(data);
|
||||
const { formData } = this.state;
|
||||
this.setState({
|
||||
formData: {
|
||||
...formData,
|
||||
itemValue,
|
||||
itemValueSpan: _.map(datas, it => it.name).join(","),
|
||||
itemName: datas.length === 1 ? _.map(datas, it => it.names).join(",") : ""
|
||||
itemName: datas.length === 1 ? _.map(datas, it => it.name).join(",") : ""
|
||||
}
|
||||
}, () => {
|
||||
statisticsItemChangetab({ itemId: itemValue }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { ruleData } = data;
|
||||
const { columns, data: dataSource } = ruleData;
|
||||
this.setState({
|
||||
columns, dataSource
|
||||
});
|
||||
this.setState({ columns, dataSource });
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -368,52 +367,37 @@ class CustomStatisticsItemsModal extends Component {
|
|||
className="statisticItemsWrapper"
|
||||
>
|
||||
<div className="statisticItemsBox">
|
||||
<WeaFormItem label={getLabel(111, "统计项目")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaError tipPosition="bottom" ref="proError" error={getLabel(111, "此项必填")}>
|
||||
<WeaBrowser
|
||||
title={getLabel(111, "统计项目")} type={162} viewAttr={!isShare ? 3 : 1} isSingle
|
||||
value={itemValue}
|
||||
replaceDatas={itemValue ? _.map(itemValue.split(","), (it, idx) => ({
|
||||
id: it,
|
||||
name: itemValueSpan.split(",")[idx]
|
||||
})) : []}
|
||||
completeParams={{
|
||||
type: 162,
|
||||
fielddbtype: "browser.salaryItemBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
conditionDataParams={{
|
||||
type: "browser.salaryItemBrowser",
|
||||
fielddbtype: "browser.salaryItemBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
dataParams={{
|
||||
type: "browser.salaryItemBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
destDataParams={{
|
||||
type: "browser.salaryItemBrowser",
|
||||
f_weaver_belongto_usertype: "0"
|
||||
}}
|
||||
// isMultCheckbox
|
||||
inputStyle={{ width: "100%" }}
|
||||
onChange={this.handleChangeStatisticalItems}
|
||||
/>
|
||||
</WeaError>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={getLabel(111, "统计项名称")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaError tipPosition="bottom" ref="nameError" error={getLabel(111, "此项必填")}>
|
||||
<WeaInput value={itemName} viewAttr={!isShare ? 3 : 1}
|
||||
onChange={itemName => this.setState({ formData: { ...formData, itemName } })}/>
|
||||
</WeaError>
|
||||
</WeaFormItem>
|
||||
<div className="customRuleTableWrapper">
|
||||
<WeaTable
|
||||
dataSource={dataSource}
|
||||
columns={cols}
|
||||
pagination={false}
|
||||
/>
|
||||
</div>
|
||||
{
|
||||
!_.isEmpty(columns) && <React.Fragment>
|
||||
<WeaFormItem label={getLabel(111, "统计项目")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaError tipPosition="bottom" ref="proError" error={getLabel(111, "此项必填")}>
|
||||
<CustomBrowser
|
||||
fieldConfig={{
|
||||
viewAttr: !isShare ? 3 : 1,
|
||||
browserConditionParam: {
|
||||
isSingle: true, completeURL: "/api/bs/hrmsalary/salaryitem/listAuth", tableProps: {},
|
||||
replaceDatas: itemValue ? _.map(itemValue.split(","), (it, idx) => ({
|
||||
id: it, name: itemValueSpan.split(",")[idx]
|
||||
})) : [], dataParams: { filterType: "QUERY_DATA" }, searchParamsKey: "", filterByName: true
|
||||
}
|
||||
}} value={itemValue} onCustomChange={this.handleChangeStatisticalItems}/>
|
||||
</WeaError>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={getLabel(111, "统计项名称")} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaError tipPosition="bottom" ref="nameError" error={getLabel(111, "此项必填")}>
|
||||
<WeaInput value={itemName} viewAttr={!isShare ? 3 : 1}
|
||||
onChange={itemName => this.setState({ formData: { ...formData, itemName } })}/>
|
||||
</WeaError>
|
||||
</WeaFormItem>
|
||||
<div className="customRuleTableWrapper">
|
||||
<WeaTable
|
||||
dataSource={dataSource}
|
||||
columns={cols}
|
||||
pagination={false}
|
||||
/>
|
||||
</div>
|
||||
</React.Fragment>
|
||||
}
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ class Index extends Component {
|
|||
];
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "浮动薪酬")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
||||
title={getLabel(111, "浮动数据")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs} className="variable_salary_wrapper"
|
||||
buttons={_.find(tabs, o => selectedKey === o.key).buttons} buttonSpace={10}
|
||||
onChange={selectedKey => this.setState({ selectedKey, SFDialog: { ...SFDialog, visible: false } })}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
}
|
||||
|
||||
.wea-new-top-req-content {
|
||||
padding: 16px;
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import { RouterStore, syncHistoryWithStore } from "mobx-react-router";
|
|||
import { Provider } from "mobx-react";
|
||||
|
||||
import Module from "weaHrmSalary";
|
||||
import stores from "./stores";
|
||||
|
||||
const routing = new RouterStore();
|
||||
|
||||
|
|
@ -38,6 +39,7 @@ class Root extends React.Component {
|
|||
header.appendChild(link)
|
||||
top.$(".ant-message").remove();
|
||||
window.location.hash.indexOf("mobilepayroll") === -1 && allStore.taxAgentStore.getPermission();
|
||||
window.location.hash.indexOf("mobilepayroll") !== -1 && allStore.taxAgentStore.initPageAndOptAuth();
|
||||
if (window.location.hash.indexOf("payroll") !== -1) {
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-showset");
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ export class TaxAgentStore {
|
|||
@observable roleOperatorForm = new WeaForm(); //权限-角色操作者form表单
|
||||
@action initRoleOperatorForm = () => this.roleOperatorForm = new WeaForm();
|
||||
@observable PageAndOptAuth = { able: false, opts: [] }; // 业务线页面权限
|
||||
@action initPageAndOptAuth = () => this.PageAndOptAuth = { able: true, opts: ["query", "admin"] };// 设置业务线页面权限
|
||||
|
||||
|
||||
@observable tableStore = new TableStore(); // new table
|
||||
|
|
|
|||
Loading…
Reference in New Issue