添加成本中心跳转连接
This commit is contained in:
parent
957a4f4746
commit
0bb52e145a
|
|
@ -52,6 +52,8 @@ export default class SalaryDetail extends React.Component {
|
|||
if (type === "PR") {
|
||||
if (id === "EDIT") {
|
||||
this.handleEdit(record);
|
||||
} else if (id === "COSTCENTER") {
|
||||
window.open(record ? record.url : "", "_blank");
|
||||
} else if (id === "COLUMNINDEX") {
|
||||
if (!extraId) {
|
||||
this.setState({ columnIndex: record });
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaSe
|
|||
import { inject, observer } from "mobx-react";
|
||||
import "./index.less";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { calcPageNo } from "../../util";
|
||||
|
||||
@inject("calculateStore", "salaryFileStore")
|
||||
@observer
|
||||
|
|
@ -87,8 +86,8 @@ export default class UserSure extends React.Component {
|
|||
<WeaSelect
|
||||
value={String(status)}
|
||||
options={[
|
||||
{ key: "", showname: "" }, {key: "ALL", showname: "全部"},
|
||||
{ key: "NORMAL", showname: "在职" }, {key: "UNAVAILABLE", showname: "离职"}
|
||||
{ key: "", showname: "" }, { key: "ALL", showname: "全部" },
|
||||
{ key: "NORMAL", showname: "在职" }, { key: "UNAVAILABLE", showname: "离职" }
|
||||
]}
|
||||
onChange={(val) => this.setState({ searchItemsValue: { ...this.state.searchItemsValue, [key]: val } })}/>
|
||||
</WeaFormItem>
|
||||
|
|
@ -122,6 +121,8 @@ export default class UserSure extends React.Component {
|
|||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage
|
||||
} else if (id === "DELETE") {
|
||||
this.handleDeleteItem(record);
|
||||
} else if (id === "COSTCENTER") {
|
||||
window.open(record.url, "_blank");
|
||||
} else if (id === "BATCHDELETE") {
|
||||
this.onSelectChange(record);
|
||||
} else if (id === "PAGEINFO") {
|
||||
|
|
@ -144,7 +145,7 @@ export default class UserSure extends React.Component {
|
|||
const payload = {
|
||||
type: "PC",
|
||||
listType: "MA",
|
||||
url: this.state.selectedKey === '1'?"/api/bs/hrmsalary/salaryacct/reducedemployee/list":"/api/bs/hrmsalary/salaryacct/addedemployee/list",
|
||||
url: this.state.selectedKey === "1" ? "/api/bs/hrmsalary/salaryacct/reducedemployee/list" : "/api/bs/hrmsalary/salaryacct/addedemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
|
|
@ -223,7 +224,7 @@ export default class UserSure extends React.Component {
|
|||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.pageInfo,
|
||||
current: 1,
|
||||
current: 1
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
@ -253,7 +254,7 @@ export default class UserSure extends React.Component {
|
|||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
employeeName: this.state.userListSearchValue,
|
||||
...this.pageInfo,
|
||||
...this.pageInfo
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
@ -570,6 +571,7 @@ export default class UserSure extends React.Component {
|
|||
<div style={{ width: "100%", height: "calc(100vh - 261px)" }}>
|
||||
<iframe
|
||||
style={{ border: 0, width: "100%", height: "100%" }}
|
||||
// src="http://localhost:7607/#/atdTable"
|
||||
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/atdTable"
|
||||
id="atdTable"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -216,7 +216,8 @@ export default class PayrollGrant extends React.Component {
|
|||
|
||||
getColumns = () => {
|
||||
const { payrollStore } = this.props;
|
||||
const { salaryGrantTableStore: columns } = payrollStore;
|
||||
const { salaryGrantTableStore: columns,salarySendDetailBaseInfo } = payrollStore;
|
||||
const notShowGrantOrWithdraw = salarySendDetailBaseInfo.haveBackCalc === 1 && salarySendDetailBaseInfo.salaryAcctType === "0";
|
||||
return [
|
||||
...toJS(columns),
|
||||
{
|
||||
|
|
@ -225,7 +226,7 @@ export default class PayrollGrant extends React.Component {
|
|||
dataIndex: "",
|
||||
display: true,
|
||||
render: (text, record) => {
|
||||
if (record.sendStatus === "已发放") {
|
||||
if (record.sendStatus === "已发放" && !notShowGrantOrWithdraw) {
|
||||
return (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
|
|
@ -233,7 +234,7 @@ export default class PayrollGrant extends React.Component {
|
|||
撤回
|
||||
</a>
|
||||
);
|
||||
} else {
|
||||
} else if(!notShowGrantOrWithdraw) {
|
||||
return (
|
||||
<a
|
||||
href="javascript:void(0);"
|
||||
|
|
|
|||
|
|
@ -435,12 +435,12 @@ export default class NormalIndex extends Component {
|
|||
returnEditPersonSlide: { ...returnEditPersonSlide, visible: true, title: userName, editId }
|
||||
});
|
||||
};
|
||||
handleCloseNormalStandingBookModal = () => {
|
||||
handleCloseNormalStandingBookModal = (refreshList = false) => {
|
||||
const { returnEditPersonSlide } = this.state;
|
||||
this.setState({
|
||||
returnEditPersonSlide: { ...returnEditPersonSlide, visible: false, title: "", editId: "" }
|
||||
}, () => {
|
||||
this.getNormalList();
|
||||
refreshList && this.getNormalList();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -489,6 +489,14 @@ export default class NormalIndex extends Component {
|
|||
columns = _.map(toJS(columns), item => {
|
||||
if (item.dataIndex === "employeeId") {
|
||||
return { ...item };
|
||||
} else if (item.dataIndex === "costCenter") {
|
||||
return {
|
||||
...item,
|
||||
render: (text, record) => {
|
||||
const { costCenter } = record;
|
||||
return <a href={costCenter.url} className="tdEllipsis">{costCenter.name || ""}</a>;
|
||||
}
|
||||
};
|
||||
}
|
||||
return {
|
||||
...item,
|
||||
|
|
|
|||
|
|
@ -110,16 +110,28 @@ class RegEditDetial extends Component {
|
|||
otherComJson: {}
|
||||
};
|
||||
_.forEach(socialData.dataSource, item => {
|
||||
payload["socialPerJson"][item["insuranceId"]] = item.personalPaymentAmount || "0";
|
||||
payload["socialComJson"][item["insuranceId"]] = item.companyPaymentAmount || "0";
|
||||
if (item.personalPaymentAmount) {
|
||||
payload["socialPerJson"][item["insuranceId"]] = item.personalPaymentAmount;
|
||||
}
|
||||
if (item.companyPaymentAmount) {
|
||||
payload["socialComJson"][item["insuranceId"]] = item.companyPaymentAmount;
|
||||
}
|
||||
});
|
||||
_.forEach(foundData.dataSource, item => {
|
||||
payload["fundPerJson"][item["insuranceId"]] = item.personalPaymentAmount || "0";
|
||||
payload["fundComJson"][item["insuranceId"]] = item.companyPaymentAmount || "0";
|
||||
if (item.personalPaymentAmount) {
|
||||
payload["fundPerJson"][item["insuranceId"]] = item.personalPaymentAmount;
|
||||
}
|
||||
if (item.companyPaymentAmount) {
|
||||
payload["fundComJson"][item["insuranceId"]] = item.companyPaymentAmount;
|
||||
}
|
||||
});
|
||||
_.forEach(otherData.dataSource, item => {
|
||||
payload["otherPerJson"][item["insuranceId"]] = item.personalPaymentAmount || "0";
|
||||
payload["otherComJson"][item["insuranceId"]] = item.companyPaymentAmount || "0";
|
||||
if (item.personalPaymentAmount) {
|
||||
payload["otherPerJson"][item["insuranceId"]] = item.personalPaymentAmount;
|
||||
}
|
||||
if (item.companyPaymentAmount) {
|
||||
payload["otherComJson"][item["insuranceId"]] = item.companyPaymentAmount;
|
||||
}
|
||||
});
|
||||
_.forEach(Object.keys(payload), item => {
|
||||
payload[item] = JSON.stringify(payload[item]);
|
||||
|
|
@ -142,7 +154,7 @@ class RegEditDetial extends Component {
|
|||
case "social":
|
||||
const sociallist = _.map(socialData.dataSource, item => {
|
||||
if (item.insuranceId === record.insuranceId) {
|
||||
return { ...item, [dataIndex]: !_.isNil(value) ? String(value): "0" };
|
||||
return { ...item, [dataIndex]: !_.isNil(value) ? String(value) : "0" };
|
||||
}
|
||||
return { ...item };
|
||||
});
|
||||
|
|
@ -153,7 +165,7 @@ class RegEditDetial extends Component {
|
|||
case "fund":
|
||||
const fundlist = _.map(foundData.dataSource, item => {
|
||||
if (item.insuranceId === record.insuranceId) {
|
||||
return { ...item, [dataIndex]: !_.isNil(value) ? String(value): "0" };
|
||||
return { ...item, [dataIndex]: !_.isNil(value) ? String(value) : "0" };
|
||||
}
|
||||
return { ...item };
|
||||
});
|
||||
|
|
@ -164,7 +176,7 @@ class RegEditDetial extends Component {
|
|||
case "other":
|
||||
const otherlist = _.map(otherData.dataSource, item => {
|
||||
if (item.insuranceId === record.insuranceId) {
|
||||
return { ...item, [dataIndex]: !_.isNil(value) ? String(value): "0" };
|
||||
return { ...item, [dataIndex]: !_.isNil(value) ? String(value) : "0" };
|
||||
}
|
||||
return { ...item };
|
||||
});
|
||||
|
|
|
|||
|
|
@ -74,7 +74,6 @@ class RegList extends Component {
|
|||
...items,
|
||||
width: 110,
|
||||
title: "姓名",
|
||||
fixed: "left",
|
||||
render: (text, r) => {
|
||||
const { userName } = r;
|
||||
return (
|
||||
|
|
@ -82,6 +81,17 @@ class RegList extends Component {
|
|||
);
|
||||
}
|
||||
};
|
||||
} else if (items.dataIndex === "costCenter") {
|
||||
return {
|
||||
...items,
|
||||
width: 110,
|
||||
render: (text, r) => {
|
||||
const { costCenter } = r;
|
||||
return (
|
||||
<a href={costCenter.url} className="tdEllipsis">{costCenter.name || ""}</a>
|
||||
);
|
||||
}
|
||||
};
|
||||
}
|
||||
return {
|
||||
...items,
|
||||
|
|
|
|||
|
|
@ -102,14 +102,14 @@ class Regression extends Component {
|
|||
break;
|
||||
}
|
||||
};
|
||||
handleCloseModal = () => {
|
||||
handleCloseModal = (refreshList = false) => {
|
||||
const { returnPersonModal, returnEditPersonSlide } = this.state;
|
||||
this.setState({
|
||||
returnPersonModal: { ...returnPersonModal, visible: false, title: "添加退差人员" },
|
||||
returnEditPersonSlide: { ...returnEditPersonSlide, visible: false, title: "", editId: "" }
|
||||
}, () => {
|
||||
this.regEmmployeeRef.handleReset();
|
||||
this.regListRef.recessionList();
|
||||
refreshList && this.regListRef.recessionList();
|
||||
});
|
||||
};
|
||||
handleEdit = (record) => {
|
||||
|
|
|
|||
Loading…
Reference in New Issue