Merge branch 'hotfix/feature-v2-0112' into develop
This commit is contained in:
commit
b3eb3bd779
|
|
@ -66,11 +66,11 @@ export default class Payroll extends React.Component {
|
|||
if (!isEdit) {
|
||||
this.setState({ currentStep: this.state.currentStep + 1 }, () => {
|
||||
setReplenishSalaryTemplateSalaryItemSet(data.replenishSalaryTemplateSalaryItemSet);
|
||||
window.localStorage.setItem("salary-template-showset", JSON.stringify(salaryTemplateShowSet));
|
||||
window.localStorage.setItem("salary-showset", JSON.stringify(salaryTemplateShowSet));
|
||||
});
|
||||
} else {
|
||||
setReplenishSalaryTemplateSalaryItemSet(data.replenishSalaryTemplateSalaryItemSet);
|
||||
window.localStorage.setItem("salary-template-showset", JSON.stringify(salaryTemplateShowSet));
|
||||
window.localStorage.setItem("salary-showset", JSON.stringify(salaryTemplateShowSet));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -81,7 +81,7 @@ export default class Payroll extends React.Component {
|
|||
const { fetchSavePayroll } = payrollStore;
|
||||
fetchSavePayroll().then(() => {
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-template-showset");
|
||||
window.localStorage.removeItem("salary-showset");
|
||||
this.setState({ currentStep: 0, stepSlideVisible: false });
|
||||
});
|
||||
};
|
||||
|
|
@ -174,7 +174,7 @@ export default class Payroll extends React.Component {
|
|||
handlePreview = () => {
|
||||
const { payrollStore: { templateBaseData, salaryTemplateShowSet, salaryItemSet } } = this.props;
|
||||
window.localStorage.setItem("template-basedata", JSON.stringify(templateBaseData));
|
||||
window.localStorage.setItem("salary-template-showset", JSON.stringify(salaryTemplateShowSet));
|
||||
window.localStorage.setItem("salary-showset", JSON.stringify(salaryTemplateShowSet));
|
||||
window.localStorage.setItem("salaryItemSet", JSON.stringify(salaryItemSet));
|
||||
window.open("/spa/hrmSalary/static/index.html#/main/hrmSalary/templatePreview");
|
||||
};
|
||||
|
|
@ -210,7 +210,7 @@ export default class Payroll extends React.Component {
|
|||
selectedTab: 0
|
||||
}, () => {
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-template-showset");
|
||||
window.localStorage.removeItem("salary-showset");
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
@ -411,7 +411,7 @@ export default class Payroll extends React.Component {
|
|||
steps={steps}
|
||||
onCancel={() => {
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-template-showset");
|
||||
window.localStorage.removeItem("salary-showset");
|
||||
this.setState({ stepSlideVisible: false });
|
||||
}}
|
||||
customOperate={
|
||||
|
|
@ -511,7 +511,7 @@ export default class Payroll extends React.Component {
|
|||
</div>}
|
||||
onClose={() => this.setState({ editSlideVisible: false }, () => {
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-template-showset");
|
||||
window.localStorage.removeItem("salary-showset");
|
||||
this.setState({ selectedTab: 0 });
|
||||
})}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ export default class ShowSettingForm extends React.Component {
|
|||
|
||||
render() {
|
||||
const { payrollStore, id } = this.props;
|
||||
const salaryTemplateShowSetStorage = id ? "{}" : window.localStorage.getItem("salary-template-showset") || "{}";
|
||||
const salaryTemplateShowSetStorage = id ? "{}" : window.localStorage.getItem("salary-showset") || "{}";
|
||||
const { salaryTemplateShowSet } = payrollStore;
|
||||
const { salaryItemSet } = payrollStore;
|
||||
const {
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ export default class ComputerTemplate extends React.Component {
|
|||
|
||||
componentWillMount() {
|
||||
if (this.props.isPreview) return;
|
||||
let salaryTemplateShowSetStr = window.localStorage.getItem("salary-template-showset");
|
||||
let salaryItemSetStr = window.localStorage.getItem("salaryItemSet");
|
||||
let salaryTemplateShowSetStr = window.localStorage.getItem("salary-showset") || "{}";
|
||||
let salaryItemSetStr = window.localStorage.getItem("salaryItemSet") || "{}";
|
||||
this.setState({
|
||||
salaryItemSet: JSON.parse(salaryItemSetStr),
|
||||
salaryTemplateShowSet: JSON.parse(salaryTemplateShowSetStr)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ export default class PhoneTemplate extends React.Component {
|
|||
|
||||
componentWillMount() {
|
||||
if(this.props.isPreview) return;
|
||||
let salaryTemplateShowSetStr = window.localStorage.getItem("salary-template-showset");
|
||||
let salaryTemplateShowSetStr = window.localStorage.getItem("salary-showset");
|
||||
let salaryItemSetStr = window.localStorage.getItem("salaryItemSet");
|
||||
this.setState({
|
||||
salaryItemSet: JSON.parse(salaryItemSetStr),
|
||||
|
|
|
|||
|
|
@ -31,8 +31,10 @@ class Root extends React.Component {
|
|||
componentWillMount() {
|
||||
top.$(".ant-message").remove();
|
||||
allStore.taxAgentStore.getPermission();
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-template-showset");
|
||||
if(window.location.hash.indexOf("payroll")!== -1){
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-showset");
|
||||
}
|
||||
}
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ export class payrollStore {
|
|||
@action
|
||||
getPayrollShowForm = (id = "") => {
|
||||
const params = { id };
|
||||
const salaryTemplateShowSetStorage = window.localStorage.getItem("salary-template-showset") || "{}";
|
||||
const salaryTemplateShowSetStorage = window.localStorage.getItem("salary-showset") || "{}";
|
||||
API.getPayrollShowForm(params).then(res => {
|
||||
if (res.status) {
|
||||
if (id !== "") {
|
||||
|
|
|
|||
|
|
@ -1,23 +1,31 @@
|
|||
import { observable, action } from "mobx";
|
||||
import { action, observable } from "mobx";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import * as API from '../apis/payrollFiles';
|
||||
import * as API from "../apis/payrollFiles";
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
export class PayrollFilesStore {
|
||||
@observable tableStore = new TableStore();
|
||||
@action("列表查询")
|
||||
queryList= (payload={}, searchItemsValue={}, url='')=>{
|
||||
return new Promise((resolve, reject)=>{
|
||||
API.queryList({ ...payload, ...searchItemsValue, url }).then(res=>{
|
||||
const {data, status}= res;
|
||||
if(status){
|
||||
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const { departmentIds, positionIds, subcompanyIds, ...extra } = searchItemsValue;
|
||||
API.queryList({
|
||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
positionIds: positionIds ? positionIds.split(",") : [],
|
||||
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
|
||||
...payload, ...extra, url
|
||||
}).then(res => {
|
||||
const { data, status } = res;
|
||||
if (status) {
|
||||
const { dataKey } = data;
|
||||
const { datas } = dataKey;
|
||||
this.tableStore.getDatas(datas); // table 请求数据
|
||||
}
|
||||
resolve(res)
|
||||
}).catch(()=>{reject()})
|
||||
})
|
||||
}
|
||||
resolve(res);
|
||||
}).catch(() => {
|
||||
reject();
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue