Merge branch 'hotfix/feature-v2-1229' into develop
This commit is contained in:
commit
ded592b1eb
|
|
@ -6,8 +6,6 @@ import moment from "moment";
|
|||
import { WeaHelpfulTip, WeaInputSearch, WeaSelect, WeaSlideModal, WeaTop } from "ecCom";
|
||||
import { renderLoading } from "../../util"; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中
|
||||
import CustomTab from "../../components/customTab";
|
||||
|
||||
import { columns, tempateColumns } from "./columns";
|
||||
import StepSlide from "../../components/stepSlide";
|
||||
import BaseInformForm from "./stepForm/baseInformForm";
|
||||
import ShowSettingForm from "./stepForm/showSettingForm";
|
||||
|
|
@ -92,8 +90,8 @@ export default class Payroll extends React.Component {
|
|||
const { payrollStore } = this.props;
|
||||
const { fetchSavePayroll } = payrollStore;
|
||||
fetchSavePayroll().then(() => {
|
||||
window.localStorage.removeItem("templateBaseData");
|
||||
window.localStorage.removeItem("salaryTemplateShowSet");
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-template-showset");
|
||||
this.setState({ currentStep: 0, stepSlideVisible: false });
|
||||
});
|
||||
};
|
||||
|
|
@ -220,6 +218,9 @@ export default class Payroll extends React.Component {
|
|||
this.setState({
|
||||
editSlideVisible: false,
|
||||
selectedTab: 0
|
||||
}, () => {
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-template-showset");
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -245,14 +246,14 @@ export default class Payroll extends React.Component {
|
|||
if (_.every(validList, it => !!templateBaseData[it])) {
|
||||
window.localStorage.setItem("template-basedata", JSON.stringify(templateBaseData));
|
||||
} else {
|
||||
window.localStorage.removeItem("templateBaseData");
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
}
|
||||
return _.every(validList, it => !!templateBaseData[it]);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { payrollStore, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { loading, hasRight, templateStore, deletePayroll } = payrollStore;
|
||||
const { loading, hasRight, templateStore, deletePayroll, templateBaseData } = payrollStore;
|
||||
const { currentStep, selectedTab, templateSearchValue, templateSelect, startDate, endDate } = this.state;
|
||||
if (!hasRight && !loading) { // 无权限处理
|
||||
return renderLoading();
|
||||
|
|
@ -353,6 +354,10 @@ export default class Payroll extends React.Component {
|
|||
});
|
||||
return;
|
||||
}
|
||||
if(templateBaseData.replenishName === templateBaseData.name){
|
||||
message.error("工资单模板名称和补发工资单模板名称不可相同")
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
currentStep: this.state.currentStep + 1
|
||||
});
|
||||
|
|
@ -372,10 +377,12 @@ export default class Payroll extends React.Component {
|
|||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
showDropIcon={false} // 是否显示下拉按钮
|
||||
>
|
||||
<CustomTab topTab={topTab} searchOperationItem={renderRightOperation()}
|
||||
onChange={(v) => {
|
||||
this.setState({ selectedKey: v, stepSlideVisible: false, editSlideVisible: false });
|
||||
}}
|
||||
<CustomTab
|
||||
topTab={topTab}
|
||||
searchOperationItem={renderRightOperation()}
|
||||
onChange={(v) => {
|
||||
this.setState({ selectedKey: v, stepSlideVisible: false, editSlideVisible: false });
|
||||
}}
|
||||
/>
|
||||
{
|
||||
this.state.selectedKey === "0" &&
|
||||
|
|
@ -413,8 +420,8 @@ export default class Payroll extends React.Component {
|
|||
currentStep={currentStep}
|
||||
steps={steps}
|
||||
onCancel={() => {
|
||||
window.localStorage.removeItem("templateBaseData");
|
||||
window.localStorage.removeItem("salaryTemplateShowSet");
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-template-showset");
|
||||
this.setState({ stepSlideVisible: false });
|
||||
}}
|
||||
customOperate={
|
||||
|
|
@ -513,8 +520,8 @@ export default class Payroll extends React.Component {
|
|||
}
|
||||
</div>}
|
||||
onClose={() => this.setState({ editSlideVisible: false }, () => {
|
||||
window.localStorage.removeItem("templateBaseData");
|
||||
window.localStorage.removeItem("salaryTemplateShowSet");
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-template-showset");
|
||||
this.setState({ selectedTab: 0 });
|
||||
})}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,6 @@ export default class PhoneTemplate extends React.Component {
|
|||
const { salaryTemplateShowSet, salaryItemSet }= this.state;
|
||||
return (
|
||||
<div className="computerTemplate phoneTemplate">
|
||||
<div className="phoneBar">薪酬预览</div>
|
||||
<div className="titleWrapper">
|
||||
{salaryTemplateShowSet.theme.replace("${companyName}", "上海泛微").replace("${salaryMonth}", moment(new Date()).format("YYYY-MM"))}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ class Root extends React.Component {
|
|||
componentWillMount() {
|
||||
top.$(".ant-message").remove();
|
||||
allStore.taxAgentStore.getPermission();
|
||||
window.localStorage.removeItem("templateBaseData");
|
||||
window.localStorage.removeItem("salaryTemplateShowSet");
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-template-showset");
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -192,6 +192,7 @@ export class payrollStore {
|
|||
if (res.status) {
|
||||
if (id !== "") {
|
||||
this.salaryItemSet = res.data.salaryTemplateSalaryItemSet;
|
||||
this.replenishSalaryTemplateSalaryItemSet = res.data.salaryTemplateSalaryItemSet;
|
||||
}
|
||||
this.salaryTemplateShowSet = { ...res.data.salaryTemplateShowSet.data, ...JSON.parse(salaryTemplateShowSetStorage) };
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue