社保福利档案退差功能
This commit is contained in:
parent
676a90bd51
commit
25e76718d2
|
|
@ -1,4 +1,5 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
|
||||
//社会福利台账-获取正常缴纳列表
|
||||
export const getCommonList = (params) => {
|
||||
|
|
@ -7,9 +8,9 @@ export const getCommonList = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
|
|
@ -25,9 +26,9 @@ export const getNormalList = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//社会福利台账-获取补缴列表
|
||||
|
|
@ -36,9 +37,9 @@ export const getSupplementaryList = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
|
|
@ -48,9 +49,9 @@ export const getOverViewList = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
|
|
@ -60,9 +61,9 @@ export const getChangeList = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//社会福利台账-保存并进入核算
|
||||
|
|
@ -71,9 +72,9 @@ export const save = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//社会福利台账-归档
|
||||
|
|
@ -82,9 +83,9 @@ export const siaccountFile = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//社会福利台账-核算异常列表
|
||||
|
|
@ -93,9 +94,9 @@ export const inspectList = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//社会福利台账-删除正常缴纳人员
|
||||
|
|
@ -104,9 +105,9 @@ export const siaccountCommonDelete = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//社会福利台账-添加正常缴纳人员
|
||||
|
|
@ -115,9 +116,9 @@ export const siaccountCommonSave = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//社会福利台账-添加补缴人员
|
||||
|
|
@ -126,9 +127,9 @@ export const siaccountSupplementarySave = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//社会福利台账-删除月份表单
|
||||
|
|
@ -137,9 +138,9 @@ export const siaccountDelete = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
//社会福利台账-正常缴纳添加缴纳人员表单
|
||||
|
|
@ -165,9 +166,9 @@ export const commonAccount = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
|
|
@ -177,9 +178,9 @@ export const socialSecurityBenefitsRecalculate = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
};
|
||||
|
||||
|
|
@ -191,7 +192,7 @@ export const getAdminTaxAgentList = () => {
|
|||
"get",
|
||||
{}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
// 表单字段对应的接口
|
||||
export const getWelfareList = () => {
|
||||
|
|
@ -200,7 +201,7 @@ export const getWelfareList = () => {
|
|||
"get",
|
||||
{}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
// 社保福利台账-导入预览
|
||||
export const welfarePreview = (params) => {
|
||||
|
|
@ -208,11 +209,11 @@ export const welfarePreview = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
}
|
||||
};
|
||||
|
||||
// 社保福利台账-核算数据导入
|
||||
export const importInsuranceAcctDetail = (params) => {
|
||||
|
|
@ -220,11 +221,11 @@ export const importInsuranceAcctDetail = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
}
|
||||
};
|
||||
|
||||
// 社保福利台账-线下对比数据导入
|
||||
export const importExcelInsuranceDetail = (params) => {
|
||||
|
|
@ -232,8 +233,35 @@ export const importExcelInsuranceDetail = (params) => {
|
|||
method: "post",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
body: JSON.stringify(params),
|
||||
body: JSON.stringify(params)
|
||||
}).then((res) => res.json());
|
||||
}
|
||||
};
|
||||
|
||||
//获取当前登录人所控制的人员范围
|
||||
export const getEmployeeListByTaxAgent = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/getEmployeeListByTaxAgent", params);
|
||||
};
|
||||
//新增退差数据
|
||||
export const saveRecession = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/saveRecession", params);
|
||||
};
|
||||
//查询退差列表
|
||||
export const recessionList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list", params);
|
||||
};
|
||||
//删除退差数据
|
||||
export const delRecession = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/delRecession", params);
|
||||
};
|
||||
//获取核算项个人和公司社保福利缴纳详情
|
||||
export const getPaymentById = ({ id }) => {
|
||||
return fetch(`/api/bs/hrmsalary/siaccount/getPaymentById?id=${id}`, {
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
headers: {
|
||||
"Content-Type": "application/json"
|
||||
},
|
||||
}).then(res => res.json());
|
||||
};
|
||||
|
|
|
|||
|
|
@ -36,17 +36,17 @@ class AddItems extends Component {
|
|||
taxAgentId: nextProps.editId.taxAgentId,
|
||||
taxAgentName: nextProps.editId.taxAgentName,
|
||||
employeeId: nextProps.editId.employeeId,
|
||||
employeeName: nextProps.editId.username,
|
||||
employeeName: nextProps.editId.username
|
||||
}
|
||||
});
|
||||
const fields= _.map(nextProps.condition[0].items, it =>{
|
||||
return it.domkey[0]
|
||||
})
|
||||
const fields = _.map(nextProps.condition[0].items, it => {
|
||||
return it.domkey[0];
|
||||
});
|
||||
fields.map(item => {
|
||||
nextProps.form.updateFields({
|
||||
[item]: nextProps.editId[item] || ''
|
||||
})
|
||||
})
|
||||
[item]: nextProps.editId[item] || ""
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -84,7 +84,7 @@ class AddItems extends Component {
|
|||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
value: baseInfo.employeeId,
|
||||
valueSpan: baseInfo.employeeName,
|
||||
onChange: ({ids, names}) => {
|
||||
onChange: ({ ids, names }) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } });
|
||||
}
|
||||
})
|
||||
|
|
@ -136,7 +136,7 @@ class AddItems extends Component {
|
|||
viewAttr: _.isEmpty(editId) ? 3 : 1,
|
||||
value: baseInfo.employeeId,
|
||||
valueSpan: baseInfo.employeeName,
|
||||
onChange: ({ids, names}) => {
|
||||
onChange: ({ ids, names }) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, employeeId: ids, employeeName: names } });
|
||||
}
|
||||
})
|
||||
|
|
@ -180,15 +180,16 @@ class AddItems extends Component {
|
|||
export default AddItems;
|
||||
|
||||
export const Browser = payload => {
|
||||
const { label, onChange, viewAttr = 3, value, valueSpan } = payload;
|
||||
const { label, onChange, viewAttr = 3, value, valueSpan, type = 1, isSingle = true } = payload;
|
||||
return (
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaBrowser
|
||||
viewAttr={viewAttr}
|
||||
type={1}
|
||||
type={type}
|
||||
isSingle={isSingle}
|
||||
value={value}
|
||||
valueSpan={valueSpan}
|
||||
onChange={(ids, names)=> onChange({ids, names})}/>
|
||||
onChange={(ids, names) => onChange({ ids, names })}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -339,10 +339,25 @@ class Index extends Component {
|
|||
export default Index;
|
||||
|
||||
export const Select = payload => {
|
||||
const { label, onChange, value, options = [], viewAttr = 3 } = payload;
|
||||
const {
|
||||
label,
|
||||
onChange,
|
||||
value,
|
||||
options = [],
|
||||
viewAttr = 3,
|
||||
detailtype = 1,
|
||||
multiple = false,
|
||||
showSearch = false
|
||||
} = payload;
|
||||
return (
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaSelect options={[{ key: "", showname: "" }, ...options]} viewAttr={viewAttr} value={value}
|
||||
<WeaSelect options={multiple ? options : [{ key: "", showname: "" }, ...options]} viewAttr={viewAttr}
|
||||
detailtype={detailtype}
|
||||
value={value}
|
||||
multiple={multiple}
|
||||
showSearch={showSearch}
|
||||
optionFilterProp="children"
|
||||
style={multiple ? { width: 600 } : {}}
|
||||
onChange={(selected, showName) => onChange({ type: label, selected, showName })}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -45,7 +45,12 @@ export default class StandingBook extends React.Component {
|
|||
list: [],
|
||||
total: 0
|
||||
},
|
||||
adminData: {},
|
||||
adminData: {
|
||||
isDefaultOpen: false,
|
||||
isAdminEnable: false,
|
||||
isChief: false,
|
||||
isOpenDevolution: false
|
||||
},
|
||||
progressVisible: false,
|
||||
progress: 0
|
||||
};
|
||||
|
|
@ -113,12 +118,12 @@ export default class StandingBook extends React.Component {
|
|||
it = {
|
||||
...it,
|
||||
render: (text, r) => {
|
||||
const { billMonth } = r;
|
||||
const { billMonth, creator } = r;
|
||||
return (
|
||||
<a
|
||||
href="javascript:;"
|
||||
href="javascript:void(0);"
|
||||
className="linkTo"
|
||||
onClick={() => this.handleGoDetail(billMonth, "detail", r.paymentOrganizationId)}>
|
||||
onClick={() => this.handleGoDetail(billMonth, "detail", r.paymentOrganizationId, creator)}>
|
||||
{text}
|
||||
</a>
|
||||
);
|
||||
|
|
@ -127,71 +132,73 @@ export default class StandingBook extends React.Component {
|
|||
}
|
||||
return { ...it };
|
||||
});
|
||||
if (!this.state.adminData.isDefaultOpen || (this.state.adminData.isDefaultOpen && this.state.adminData.isAdminEnable)) {
|
||||
columns = [
|
||||
...columns,
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "action",
|
||||
key: "action",
|
||||
fixed: "right",
|
||||
render: (text, r) => {
|
||||
const { billStatus, billMonth, creator } = r;
|
||||
return (
|
||||
<React.Fragment>
|
||||
{billStatus === "未归档" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
className="linkTo"
|
||||
onClick={() => this.handleGoDetail(billMonth, "", r.paymentOrganizationId, creator)}>
|
||||
核算
|
||||
</a>
|
||||
)}
|
||||
{billStatus === "已归档" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
className="linkTo"
|
||||
onClick={() => this.socialSecurityBenefitsRecalculate({ id: r.id })}>
|
||||
重新核算
|
||||
</a>
|
||||
)}
|
||||
{billStatus === "未归档" && (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu
|
||||
onClick={({ key }) =>
|
||||
this.handleOperate({ key, billMonth, paymentOrganizationId: r.paymentOrganizationId, creator })
|
||||
}>
|
||||
<Menu.Item key="archive">归档</Menu.Item>
|
||||
{/* <Menu.Item key="detail">异常详情</Menu.Item> */}
|
||||
<Menu.Item key="delete">删除</Menu.Item>
|
||||
{/* <Menu.Item key="operate">操作日志</Menu.Item> */}
|
||||
</Menu>
|
||||
}>
|
||||
<i className="icon-coms-more more"/>
|
||||
</Dropdown>
|
||||
)}
|
||||
{billStatus === "已归档" && (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu
|
||||
onClick={({ key }) =>
|
||||
this.handleOperate({ key, billMonth, paymentOrganizationId: r.paymentOrganizationId, creator })
|
||||
}>
|
||||
<Menu.Item key="view">查看</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<i className="icon-coms-more more"/>
|
||||
</Dropdown>
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
];
|
||||
}
|
||||
this.setState({
|
||||
tableData: {
|
||||
list,
|
||||
columns: [
|
||||
...columns,
|
||||
(!this.state.adminData.isDefaultOpen || (this.state.adminData.isDefaultOpen && this.state.adminData.isAdminEnable)) ? {
|
||||
title: "操作",
|
||||
dataIndex: "action",
|
||||
key: "action",
|
||||
fixed: "right",
|
||||
render: (text, r) => {
|
||||
const { billStatus, billMonth } = r;
|
||||
return (
|
||||
<React.Fragment>
|
||||
{billStatus === "未归档" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
className="linkTo"
|
||||
onClick={() => this.handleGoDetail(billMonth, "", r.paymentOrganizationId)}>
|
||||
核算
|
||||
</a>
|
||||
)}
|
||||
{billStatus === "已归档" && (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
className="linkTo"
|
||||
onClick={() => this.socialSecurityBenefitsRecalculate({ id: r.id })}>
|
||||
重新核算
|
||||
</a>
|
||||
)}
|
||||
{billStatus === "未归档" && (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu
|
||||
onClick={({ key }) =>
|
||||
this.handleOperate({ key, billMonth, paymentOrganizationId: r.paymentOrganizationId })
|
||||
}>
|
||||
<Menu.Item key="archive">归档</Menu.Item>
|
||||
{/* <Menu.Item key="detail">异常详情</Menu.Item> */}
|
||||
<Menu.Item key="delete">删除</Menu.Item>
|
||||
{/* <Menu.Item key="operate">操作日志</Menu.Item> */}
|
||||
</Menu>
|
||||
}>
|
||||
<i className="icon-coms-more more"/>
|
||||
</Dropdown>
|
||||
)}
|
||||
{billStatus === "已归档" && (
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu
|
||||
onClick={({ key }) =>
|
||||
this.handleOperate({ key, billMonth, paymentOrganizationId: r.paymentOrganizationId })
|
||||
}>
|
||||
<Menu.Item key="view">查看</Menu.Item>
|
||||
{/* <Menu.Item key="operate">操作日志</Menu.Item> */}
|
||||
</Menu>
|
||||
}>
|
||||
<i className="icon-coms-more more"/>
|
||||
</Dropdown>
|
||||
)}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
} : {}
|
||||
],
|
||||
columns,
|
||||
total
|
||||
},
|
||||
current: pageNum
|
||||
|
|
@ -236,21 +243,21 @@ export default class StandingBook extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
handleGoDetail = (billMonth, detail, paymentOrganization) => {
|
||||
handleGoDetail = (billMonth, detail, paymentOrganization, creator) => {
|
||||
if (detail) {
|
||||
window.open(
|
||||
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?type=${detail}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`
|
||||
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?type=${detail}&billMonth=${billMonth}&paymentOrganization=${paymentOrganization}&creator=${creator}`
|
||||
);
|
||||
} else {
|
||||
window.open(
|
||||
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}`
|
||||
`/spa/hrmSalary/static/index.html#/main/hrmSalary/socialSecurityBenefits/standingBookDetail?billMonth=${billMonth}&paymentOrganization=${paymentOrganization}&creator=${creator}`
|
||||
);
|
||||
}
|
||||
};
|
||||
handleOperate = (payload) => {
|
||||
const { siaccountFile, siaccountDelete, deleteLoading } =
|
||||
this.props.standingBookStore;
|
||||
const { key, billMonth, paymentOrganizationId } = payload;
|
||||
const { key, billMonth, paymentOrganizationId, creator } = payload;
|
||||
switch (key) {
|
||||
case "archive":
|
||||
Modal.confirm({
|
||||
|
|
@ -295,7 +302,7 @@ export default class StandingBook extends React.Component {
|
|||
});
|
||||
break;
|
||||
case "view":
|
||||
this.handleGoDetail(billMonth, "detail", paymentOrganizationId);
|
||||
this.handleGoDetail(billMonth, "detail", paymentOrganizationId, creator);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
@ -361,15 +368,6 @@ export default class StandingBook extends React.Component {
|
|||
});
|
||||
};
|
||||
|
||||
handlePageChange(value) {
|
||||
this.setState({ current: value });
|
||||
this.pageInfo.current = value;
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
...this.pageInfo
|
||||
});
|
||||
}
|
||||
|
||||
handleShowSizeChange(pageInfo) {
|
||||
this.getCommonList({
|
||||
...this.state.tableParams,
|
||||
|
|
@ -383,13 +381,7 @@ export default class StandingBook extends React.Component {
|
|||
inspectLoading,
|
||||
loading,
|
||||
hasRight,
|
||||
form,
|
||||
condition,
|
||||
tableStore,
|
||||
showSearchAd,
|
||||
getTableDatas,
|
||||
doSearch,
|
||||
setShowSearchAd
|
||||
} = standingBookStore;
|
||||
const { list, columns, total } = this.state.tableData;
|
||||
const { startTime, endTime } = this.state.tableParams;
|
||||
|
|
@ -448,9 +440,6 @@ export default class StandingBook extends React.Component {
|
|||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
buttons={showOperateBtn ? rightBtns : []}
|
||||
// showDropIcon={true} // 是否显示下拉按钮
|
||||
// dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同)
|
||||
// dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
||||
>
|
||||
<div className="billDateWrapper">
|
||||
<div>账单月份:</div>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
padding: 8px 20px;
|
||||
justify-content: flex-end;
|
||||
|
||||
i,button {
|
||||
i, button {
|
||||
cursor: pointer;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
|
@ -37,4 +37,56 @@
|
|||
margin-right: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//退差
|
||||
.regressionWrapper {
|
||||
.tdEllipsis {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.optWrapper {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
i {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-top-wapper .wea-new-top {
|
||||
background: #FFF;
|
||||
|
||||
.wea-new-top-title {
|
||||
font-size: 12px;
|
||||
|
||||
& > span:first-child {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-top {
|
||||
.ant-btn {
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.ant-btn.ant-btn-primary[disabled] {
|
||||
color: #d8d8d8;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.ant-btn.ant-btn-primary {
|
||||
color: #2db7f5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,227 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 添加退差人员弹框
|
||||
* Description:
|
||||
* Date: 2022/11/22
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDatePicker, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import { Button, Modal } from "antd";
|
||||
import { Select } from "../../../ruleConfig";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
|
||||
class RegAddEmployee extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
baseInfo: {
|
||||
billMonth: "",
|
||||
items: "",
|
||||
itemsAll: ""
|
||||
},
|
||||
returnPersonInfo: {
|
||||
employee: "",
|
||||
employeeOptions: []
|
||||
},
|
||||
selectPersonInfo: {
|
||||
employee: "",
|
||||
employeeOptions: []
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getEmployeeListByTaxAgent();
|
||||
}
|
||||
|
||||
getEmployeeListByTaxAgent = () => {
|
||||
const { returnPersonInfo, selectPersonInfo } = this.state;
|
||||
const payload = {
|
||||
pageNum: 1,
|
||||
pageSize: 10000,
|
||||
name: null
|
||||
};
|
||||
API.getEmployeeListByTaxAgent(payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { list } = data;
|
||||
this.setState({
|
||||
returnPersonInfo: {
|
||||
...returnPersonInfo,
|
||||
employeeOptions: _.map(list || [], it => ({ key: String(it.employeeId), showname: it.username }))
|
||||
},
|
||||
selectPersonInfo: {
|
||||
...selectPersonInfo,
|
||||
employeeOptions: _.map(list || [], it => ({ key: String(it.employeeId), showname: it.username }))
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleReset = () => {
|
||||
this.setState({
|
||||
baseInfo: {
|
||||
billMonth: "",
|
||||
items: "",
|
||||
itemsAll: ""
|
||||
},
|
||||
returnPersonInfo: {
|
||||
...this.state.returnPersonInfo,
|
||||
employee: ""
|
||||
},
|
||||
selectPersonInfo: {
|
||||
...this.state.selectPersonInfo,
|
||||
employee: ""
|
||||
}
|
||||
});
|
||||
};
|
||||
handleSave = () => {
|
||||
const { baseInfo, returnPersonInfo, selectPersonInfo } = this.state;
|
||||
const { onSave } = this.props;
|
||||
const payload = {
|
||||
recessionMonthList: baseInfo.billMonth.split(","),
|
||||
projects: baseInfo.itemsAll ? ["0"] : baseInfo.items.split(","),
|
||||
includes: returnPersonInfo.employee.split(","),
|
||||
excludes: selectPersonInfo.employee.split(",")
|
||||
};
|
||||
if (_.isEmpty(baseInfo.billMonth) || _.isEmpty(baseInfo.items) || _.isEmpty(returnPersonInfo.employee)) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
}
|
||||
onSave(payload);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { baseInfo, returnPersonInfo, selectPersonInfo } = this.state;
|
||||
const buttons = [
|
||||
<Button type="primary" onClick={this.handleSave}>保存</Button>,
|
||||
<Button type="ghost" onClick={this.handleReset}>重置</Button>
|
||||
];
|
||||
const baseItems = [
|
||||
{
|
||||
com: Picker({
|
||||
label: "退差月份",
|
||||
value: baseInfo.billMonth,
|
||||
onChange: (billMonth) => {
|
||||
this.setState({ baseInfo: { ...baseInfo, billMonth } });
|
||||
}
|
||||
})
|
||||
},
|
||||
{
|
||||
com: SelectWithAll({
|
||||
label: "退差项目",
|
||||
options: [
|
||||
{ key: "1", showname: "社保" },
|
||||
{ key: "2", showname: "公积金" },
|
||||
{ key: "3", showname: "企业年金及其他福利" }
|
||||
],
|
||||
detailtype: 2,
|
||||
valueAll: baseInfo.itemsAll,
|
||||
value: baseInfo.items,
|
||||
onChangeAll: ({ selected }) => {
|
||||
if (selected) {
|
||||
this.setState({ baseInfo: { ...baseInfo, itemsAll: selected, items: "1,2,3" } });
|
||||
} else {
|
||||
this.setState({ baseInfo: { ...baseInfo, itemsAll: selected, items: "" } });
|
||||
}
|
||||
},
|
||||
onChange: ({ selected }) => {
|
||||
const bool1 = selected.split(",").includes("1");
|
||||
const bool2 = selected.split(",").includes("2");
|
||||
const bool3 = selected.split(",").includes("3");
|
||||
if (bool1 && bool2 && bool3) {
|
||||
this.setState({ baseInfo: { ...baseInfo, itemsAll: "0", items: selected } });
|
||||
} else {
|
||||
this.setState({ baseInfo: { ...baseInfo, itemsAll: "", items: selected } });
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
];
|
||||
const returnPersonItems = [
|
||||
{
|
||||
com: Select({
|
||||
multiple: true,
|
||||
label: "对象",
|
||||
viewAttr: 3,
|
||||
showSearch: true,
|
||||
options: returnPersonInfo.employeeOptions,
|
||||
value: returnPersonInfo.employee,
|
||||
onChange: ({ selected }) => {
|
||||
this.setState({ returnPersonInfo: { ...returnPersonInfo, employee: selected } });
|
||||
}
|
||||
})
|
||||
}
|
||||
];
|
||||
const selectPersonItems = [
|
||||
{
|
||||
com: Select({
|
||||
multiple: true,
|
||||
label: "选择人员",
|
||||
viewAttr: 2,
|
||||
showSearch: true,
|
||||
options: selectPersonInfo.employeeOptions,
|
||||
value: selectPersonInfo.employee,
|
||||
onChange: ({ selected }) => {
|
||||
this.setState({ selectPersonInfo: { ...selectPersonInfo, employee: selected } });
|
||||
}
|
||||
})
|
||||
}
|
||||
];
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props}
|
||||
style={{ width: 900 }}
|
||||
hasScroll
|
||||
buttons={buttons}
|
||||
>
|
||||
<WeaSearchGroup title="基础信息" items={baseItems} showGroup col={1}/>
|
||||
<WeaSearchGroup title="退差人员" items={returnPersonItems} col={1} showGroup/>
|
||||
<WeaSearchGroup title="人员范围中排除" items={selectPersonItems} col={1} showGroup/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default RegAddEmployee;
|
||||
|
||||
|
||||
export const Picker = payload => {
|
||||
const { label, onChange, value, viewAttr = 3, format = "YYYY-MM" } = payload;
|
||||
return (
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<WeaDatePicker
|
||||
format={format}
|
||||
value={value}
|
||||
viewAttr={viewAttr}
|
||||
onChange={onChange}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
export const SelectWithAll = payload => {
|
||||
const { label, onChange, value, valueAll, onChangeAll, options = [], viewAttr = 3, detailtype = 1 } = payload;
|
||||
return (
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<div>
|
||||
<WeaSelect
|
||||
options={[{ key: "0", showname: "全部" }]}
|
||||
detailtype={detailtype}
|
||||
value={valueAll}
|
||||
onChange={(selected, showName) => onChangeAll({ selected, showName })}
|
||||
style={{ width: "inherit" }}
|
||||
/>
|
||||
<WeaSelect
|
||||
options={options}
|
||||
viewAttr={viewAttr}
|
||||
detailtype={detailtype}
|
||||
value={value}
|
||||
onChange={(selected, showName) => onChange({ type: label, selected, showName })}
|
||||
style={{ width: "inherit" }}
|
||||
/>
|
||||
</div>
|
||||
</WeaFormItem>
|
||||
);
|
||||
};
|
||||
|
|
@ -0,0 +1,53 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name:退差编辑页面
|
||||
* Description:
|
||||
* Date: 2022/11/23
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaSlideModal } from "ecCom";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import SlideModalTitle from "../../../../components/slideModalTitle";
|
||||
|
||||
class RegEditDetial extends Component {
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.editId !== this.props.editId && nextProps.editId) {
|
||||
this.getPaymentById(nextProps.editId);
|
||||
}
|
||||
}
|
||||
|
||||
getPaymentById = (id) => {
|
||||
const payload = { id };
|
||||
API.getPaymentById(payload).then(res => {
|
||||
console.log(res);
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { visible, title, onCancel } = this.props;
|
||||
return (
|
||||
<WeaSlideModal
|
||||
className="slideOuterWrapper"
|
||||
visible={visible}
|
||||
top={0}
|
||||
width={48}
|
||||
height={100}
|
||||
direction="right"
|
||||
measure="%"
|
||||
title={
|
||||
<SlideModalTitle
|
||||
subtitle={title}
|
||||
showOperateBtn={true}
|
||||
editable={true}
|
||||
/>
|
||||
}
|
||||
content={<div>123</div>}
|
||||
onClose={onCancel}
|
||||
showMask={true}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default RegEditDetial;
|
||||
|
|
@ -0,0 +1,153 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 退差列表
|
||||
* Description:
|
||||
* Date: 2022/11/23
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import "./index.less";
|
||||
|
||||
class RegList extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
columns: [],
|
||||
dataSource: [],
|
||||
selectedRowKeys: [],
|
||||
loading: {
|
||||
query: false
|
||||
},
|
||||
pageInfo: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.recessionList();
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible) {
|
||||
this.recessionList();
|
||||
}
|
||||
}
|
||||
|
||||
recessionList = (userName = "") => {
|
||||
const { loading, pageInfo } = this.state;
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const creator = Number(getQueryString("creator"));
|
||||
const paymentStatus = getQueryString("paymentOrganization");
|
||||
const payload = {
|
||||
billMonth, paymentStatus,
|
||||
creator, userName,
|
||||
...pageInfo
|
||||
};
|
||||
this.setState({ loading: { ...loading, query: true } });
|
||||
API.recessionList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
if (status) {
|
||||
const { pageInfo: list } = data;
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = list;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource,
|
||||
columns: _.map(_.filter(columns, it => it.dataIndex !== "id"), items => {
|
||||
if (items.dataIndex === "employeeId") {
|
||||
return {
|
||||
...items,
|
||||
width: 110,
|
||||
title: "姓名",
|
||||
fixed: "left",
|
||||
render: (text, r) => {
|
||||
const { userName } = r;
|
||||
return (
|
||||
<span>{userName}</span>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return {
|
||||
...items,
|
||||
title: <span dangerouslySetInnerHTML={{ __html: items.title }}/>,
|
||||
width: 120,
|
||||
render: (text) => {
|
||||
return <span className="tdEllipsis" title={text}>{text}</span>;
|
||||
}
|
||||
};
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(() => {
|
||||
this.setState({ loading: { ...loading, query: false } });
|
||||
});
|
||||
};
|
||||
handleChangeRow = (selectedRowKeys) => {
|
||||
const { onChangeRowkey } = this.props;
|
||||
this.setState({ selectedRowKeys });
|
||||
onChangeRowkey(selectedRowKeys);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, pageInfo, selectedRowKeys, dataSource, columns } = this.state;
|
||||
const { onEdit } = this.props;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current, pageSize } }, () => {
|
||||
this.recessionList();
|
||||
});
|
||||
},
|
||||
onChange: (current) => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => {
|
||||
this.recessionList();
|
||||
});
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: this.handleChangeRow
|
||||
};
|
||||
return (
|
||||
<WeaTable
|
||||
rowKey="id"
|
||||
columns={[
|
||||
...columns,
|
||||
{
|
||||
title: "操作",
|
||||
dataIndex: "operate",
|
||||
fixed: "right",
|
||||
width: "120px",
|
||||
render: (text, record) => {
|
||||
return (
|
||||
<div className="optWrapper">
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
className="mr10"
|
||||
onClick={() => onEdit(record)}
|
||||
>编辑</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
]}
|
||||
dataSource={dataSource}
|
||||
loading={loading.query}
|
||||
pagination={pagination}
|
||||
rowSelection={rowSelection}
|
||||
scroll={{ x: 900 }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default RegList;
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
import React, { Component } from "react";
|
||||
import { Button } from "antd";
|
||||
import { WeaHelpfulTip, WeaInputSearch, WeaTop } from "ecCom";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
|
||||
class RegTop extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
name: ""
|
||||
};
|
||||
}
|
||||
|
||||
renderTopBtns = () => {
|
||||
const { name } = this.state;
|
||||
const { onChange, selectKey } = this.props;
|
||||
const type = getQueryString("type");
|
||||
let dom = [
|
||||
<WeaHelpfulTip
|
||||
title={
|
||||
<div>
|
||||
<div>提示:</div>
|
||||
<div>个人合计=社保个人合计+公积金个人合计+其他福利个人合计</div>
|
||||
<div>单位合计=社保单位合计+公积金单位合计+其他福利单位合计</div>
|
||||
<div>社保合计=社保个人合计+社保单位合计</div>
|
||||
<div>公积金合计=公积金个人合计+公积金单位合计</div>
|
||||
<div>其他福利合计=其他福利个人合计+其他福利单位合计</div>
|
||||
<div>合计=社保合计+公积金合计+其他福利合计</div>
|
||||
</div>
|
||||
}
|
||||
placement="bottomRight"
|
||||
width={250}
|
||||
/>,
|
||||
<Button type="primary" size="small" onClick={() => onChange("export")}>
|
||||
<span className="icon-coms02-coms2-export" title="导出全部"></span>
|
||||
</Button>,
|
||||
<WeaInputSearch
|
||||
value={name}
|
||||
style={{ width: 250 }}
|
||||
placeholder="请输入员工姓名"
|
||||
onChange={name => this.setState({ name })}
|
||||
onSearch={() => onChange("search")}
|
||||
/>
|
||||
];
|
||||
if (!type) {
|
||||
const [dom1, ...extra] = dom;
|
||||
dom = [
|
||||
dom1,
|
||||
<Button type="primary" size="small" disabled={_.isEmpty(selectKey)} onClick={() => onChange("delete")}>
|
||||
<span className="icon-coms-form-delete-hot" title="删除"></span>
|
||||
</Button>,
|
||||
<Button type="primary" size="small" onClick={() => onChange("add")}>
|
||||
<span className="icon-coms-Add-to-hot" title="添加"></span>
|
||||
</Button>,
|
||||
...extra
|
||||
];
|
||||
}
|
||||
return dom;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { billMonth } = this.props;
|
||||
return (
|
||||
<WeaTop
|
||||
title={<span><span style={{ paddingRight: 10 }}>账单月份</span><span>{billMonth}</span></span>}
|
||||
buttons={this.renderTopBtns()}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default RegTop;
|
||||
|
|
@ -0,0 +1,145 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 退差组件
|
||||
* Description:
|
||||
* Date: 2022/11/22
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { message, Modal } from "antd";
|
||||
import RegTop from "./regTop";
|
||||
import RegList from "./regList";
|
||||
import RegAddEmployee from "./regAddEmployee";
|
||||
import RegEditDetial from "./regEditDetial";
|
||||
import { getQueryString } from "../../../../util/url";
|
||||
import * as API from "../../../../apis/standingBook";
|
||||
import "./index.less";
|
||||
|
||||
class Regression extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectKey: [],
|
||||
returnPersonModal: {
|
||||
title: "添加退差人员",
|
||||
visible: false
|
||||
},
|
||||
returnEditPersonSlide: {
|
||||
title: "",
|
||||
editId: "",
|
||||
visible: false
|
||||
}
|
||||
};
|
||||
this.regEmmployeeRef = null;
|
||||
this.regListRef = null;
|
||||
this.regTopRef = null;
|
||||
}
|
||||
|
||||
delRecession = () => {
|
||||
const { selectKey } = this.state;
|
||||
API.delRecession(selectKey).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("删除成功");
|
||||
this.regListRef.recessionList();
|
||||
this.setState({ selectKey: [] });
|
||||
} else {
|
||||
message.error(errormsg || "删除失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
handleSave = (params) => {
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const paymentOrganization = getQueryString("paymentOrganization");
|
||||
const payload = {
|
||||
...params,
|
||||
billMonth,
|
||||
paymentOrganization
|
||||
};
|
||||
API.saveRecession(payload).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success("操作成功。若退差月无核算明细,账单月则无法获取退差数据。");
|
||||
this.handleCloseModal();
|
||||
} else {
|
||||
message.error(errormsg || "操作失败");
|
||||
}
|
||||
});
|
||||
};
|
||||
handleChangeOpt = (key) => {
|
||||
const { returnPersonModal } = this.state;
|
||||
const name = this.regTopRef.state.name;
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const creator = Number(getQueryString("creator"));
|
||||
switch (key) {
|
||||
case "add":
|
||||
this.setState({ returnPersonModal: { ...returnPersonModal, visible: true } });
|
||||
break;
|
||||
case "delete":
|
||||
Modal.confirm({
|
||||
title: "信息确认",
|
||||
content: "删除人员本账单月将不包含该人员的退差数据!",
|
||||
onOk: () => {
|
||||
this.delRecession();
|
||||
},
|
||||
onCancel: () => {
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "export":
|
||||
const url = `${window.location.origin}/api/bs/hrmsalary/welfare/recession/export?creator=${creator}&billMonth=${billMonth}`;
|
||||
window.open(url, "_self");
|
||||
break;
|
||||
case "search":
|
||||
this.regListRef.recessionList(name);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
handleCloseModal = () => {
|
||||
const { returnPersonModal, returnEditPersonSlide } = this.state;
|
||||
this.setState({
|
||||
returnPersonModal: { ...returnPersonModal, visible: false, title: "添加退差人员" },
|
||||
returnEditPersonSlide: { ...returnEditPersonSlide, visible: false, title: "", editId: "" }
|
||||
}, () => {
|
||||
this.regEmmployeeRef.handleReset();
|
||||
});
|
||||
};
|
||||
handleEdit = (record) => {
|
||||
const { userName, id: editId } = record;
|
||||
const { returnEditPersonSlide } = this.state;
|
||||
this.setState({
|
||||
returnEditPersonSlide: { ...returnEditPersonSlide, visible: true, title: userName, editId }
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const billMonth = getQueryString("billMonth");
|
||||
const { returnPersonModal, returnEditPersonSlide, selectKey } = this.state;
|
||||
return (
|
||||
<div className="regressionWrapper">
|
||||
<RegTop
|
||||
ref={dom => this.regTopRef = dom}
|
||||
billMonth={billMonth}
|
||||
onChange={this.handleChangeOpt}
|
||||
selectKey={selectKey}
|
||||
/>
|
||||
<RegList
|
||||
ref={dom => this.regListRef = dom}
|
||||
visible={returnPersonModal.visible}
|
||||
onChangeRowkey={(selectKey) => this.setState({ selectKey })}
|
||||
onEdit={this.handleEdit}
|
||||
/>
|
||||
{/*编辑弹框*/}
|
||||
<RegEditDetial {...returnEditPersonSlide} onCancel={this.handleCloseModal}/>
|
||||
{/* 弹框 */}
|
||||
<RegAddEmployee
|
||||
ref={dom => this.regEmmployeeRef = dom}
|
||||
{...returnPersonModal}
|
||||
onCancel={this.handleCloseModal}
|
||||
onSave={this.handleSave}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Regression;
|
||||
|
|
@ -10,6 +10,7 @@ import { WeaTab } from "ecCom";
|
|||
import NormalIndex from "./components/normal";
|
||||
import OverViewIndex from "./components/overView";
|
||||
import AbnormalListIndex from "./components/abnormalList";
|
||||
import Regression from "./components/regression";
|
||||
|
||||
@inject("standingBookStore")
|
||||
@observer
|
||||
|
|
@ -27,7 +28,6 @@ class StandingBookDetail extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
||||
this.getTabList();
|
||||
}
|
||||
|
||||
|
|
@ -39,6 +39,7 @@ class StandingBookDetail extends Component {
|
|||
getTabList({ billMonth, paymentOrganization: this.paymentOrganization }).then(({ data }) => {
|
||||
const { tabList, remarks, billMonth } = data;
|
||||
let newTabList = tabList.filter(item => item.id != "2");
|
||||
newTabList[newTabList.length - 2] = newTabList.splice(newTabList.length - 1, 1, newTabList[newTabList.length - 2])[0]
|
||||
this.setState({
|
||||
selectedKey: newTabList[0].id,
|
||||
tabList: _.map(newTabList, it => ({ title: it.content, viewcondition: it.id })),
|
||||
|
|
@ -72,6 +73,9 @@ class StandingBookDetail extends Component {
|
|||
selectedKey === "4" &&
|
||||
<OverViewIndex billMonth={billMonth} type={this.type} paymentOrganization={this.paymentOrganization}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "5" && <Regression />
|
||||
}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue