custom-中航富士达最新
This commit is contained in:
parent
93b078f509
commit
e011fdfc82
|
|
@ -219,7 +219,7 @@ export const exportComparisonResult = (salaryAcctRecordId) => {
|
|||
|
||||
// 核算进度条
|
||||
export const getCalculateProgress = (id = "", paymentOrganization = "") => {
|
||||
const extra= paymentOrganization ? `_${paymentOrganization}` : paymentOrganization
|
||||
const extra = paymentOrganization ? `_${paymentOrganization}` : paymentOrganization;
|
||||
return WeaTools.callApi(`/api/bs/hrmsalary/progress/getRate?cacheKey=ACCT_PROGRESS_${id}${extra}`, "get", {});
|
||||
};
|
||||
|
||||
|
|
@ -291,4 +291,9 @@ export const updateSobConfig = params => {
|
|||
return WeaTools.callApi("/api/bs/hrmsalary/salaryacct/updateSobConfig", "GET", params);
|
||||
};
|
||||
|
||||
//中航富士达二开-薪资核算-薪资核算引用
|
||||
export const quoteSalaryacct = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryacct/acctresult/quote", params);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,8 @@ import {
|
|||
acctresultAccounting,
|
||||
getApprovalInfoByRecordId,
|
||||
getCalculateProgress,
|
||||
getExportField
|
||||
getExportField,
|
||||
quoteSalaryacct
|
||||
} from "../../../apis/calculate";
|
||||
import AdvanceInputBtn from "./components/advanceInputBtn";
|
||||
import SalaryCalcPersonConfirm from "./components/salaryCalcPersonConfirm";
|
||||
|
|
@ -36,8 +37,8 @@ class Index extends Component {
|
|||
customExpDialog: { visible: false, salaryAcctRecordId: "", checkItems: [], itemsByGroup: [] },
|
||||
salaryImpDialog: { visible: false, title: "", salaryAcctRecordId: "" },
|
||||
approvalInfo: {},//审批信息,
|
||||
accountExceptInfo: "" //核算报错信息,
|
||||
|
||||
accountExceptInfo: "", //核算报错信息,
|
||||
confirmLoading: false
|
||||
};
|
||||
this.calc = null;
|
||||
this.timer = null;
|
||||
|
|
@ -146,6 +147,27 @@ class Index extends Component {
|
|||
}
|
||||
this.calc.calcTableRef.wrappedInstance.updateEmpLockStatus({ lockStatus: key, acctEmpIds: selectedRowKeys });
|
||||
break;
|
||||
case "quote":
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "信息确认"),
|
||||
content: getLabel(111, "同步上月数据会覆盖本次核算中配置的同步项目值,请确认是否同步上月数据?"),
|
||||
confirmLoading: this.state.confirmLoading,
|
||||
onOk: () => {
|
||||
return new Promise((resolve) => {
|
||||
this.setState({ confirmLoading: true });
|
||||
quoteSalaryacct({ salaryAcctRecordId }).then(({ status, errormsg }) => {
|
||||
this.setState({ confirmLoading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
resolve();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -173,6 +195,8 @@ class Index extends Component {
|
|||
</Menu>
|
||||
);
|
||||
reqBtns = [
|
||||
<Button type="primary"
|
||||
onClick={() => this.handleMoreMenuClick({ key: "quote" })}>{getLabel(111, "上月数据同步")}</Button>,
|
||||
<Dropdown.Button onClick={() => this.doCacl("ALL")} overlay={menu} type="primary">
|
||||
{getLabel(543545, "核算所有人")}
|
||||
</Dropdown.Button>,
|
||||
|
|
@ -180,7 +204,7 @@ class Index extends Component {
|
|||
<AdvanceInputBtn onOpenAdvanceSearch={() => this.calc.openAdvanceSearch()}
|
||||
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
|
||||
];
|
||||
!canEdit && reqBtns.splice(0, 1);
|
||||
!canEdit && reqBtns.splice(0, 2);
|
||||
isOpenApproval && reqBtns.unshift(<Button type="ghost" onClick={() => {
|
||||
window.open(`${approvalWorkflowUrl}&salaryAcctRecordId=${salaryAcctRecordId}`, "_blank");
|
||||
}}>{getLabel(111, "发起审批")}</Button>);
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ class LedgerSalaryItem extends Component {
|
|||
const obj = {
|
||||
uuid: itemGroups.length.toString(),
|
||||
itemHide: null,
|
||||
quote: null,//中航富士达二开-次月同步勾选框
|
||||
items,
|
||||
name: "未分类",
|
||||
salarySobId,
|
||||
|
|
@ -95,6 +96,7 @@ class LedgerSalaryItem extends Component {
|
|||
const obj = {
|
||||
uuid: new Date().getTime().toString(),
|
||||
itemHide: null,
|
||||
quote: null,//中航富士达二开-次月同步勾选框
|
||||
items: [],
|
||||
name: payload.name
|
||||
};
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
|
|||
item.salaryItemId = item.id;
|
||||
item.key = item.id;
|
||||
item.itemHide = item.hideDefault;
|
||||
item.quote = null;
|
||||
item.sortedIndex = (!_.isEmpty(_.maxBy(arrItems, it => it.sortedIndex)) ? _.maxBy(arrItems, it => it.sortedIndex).sortedIndex : 0) + keyIdx + 1;
|
||||
selectItems.push(item);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export default class LedgerSalaryItemPreviewModal extends React.Component {
|
|||
_.map(_.filter(itemGroups, it => !_.isEmpty(it.items)), child => {
|
||||
let columnItem = {
|
||||
title: child.name,
|
||||
children: _.filter(child.items, t => t.itemHide !== "1").map(i => {
|
||||
children: _.filter(child.items, t => t.itemHide !== "1" && t.quote !== "1").map(i => {
|
||||
return {
|
||||
title: i.name,
|
||||
dataIndex: i.id,
|
||||
|
|
|
|||
|
|
@ -41,27 +41,27 @@ class LedgerSalaryItemTable extends Component {
|
|||
* Params:
|
||||
* Date: 2022/12/14
|
||||
*/
|
||||
handleChangeItem = (value, id) => {
|
||||
handleChangeItem = (key, value, id) => {
|
||||
const { dataSource, onHandleItemhide } = this.props;
|
||||
onHandleItemhide(
|
||||
_.map([...dataSource], item => {
|
||||
if (id === item.id || id === item.key) {
|
||||
return {
|
||||
...item,
|
||||
itemHide: String(value)
|
||||
[key]: String(value)
|
||||
};
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
);
|
||||
};
|
||||
handleChangeAllItem = (value) => {
|
||||
handleChangeAllItem = (key, value) => {
|
||||
const { dataSource, onHandleItemhide } = this.props;
|
||||
onHandleItemhide(
|
||||
_.map([...dataSource], item => {
|
||||
return {
|
||||
...item,
|
||||
itemHide: String(value)
|
||||
[key]: String(value)
|
||||
};
|
||||
})
|
||||
);
|
||||
|
|
@ -246,6 +246,8 @@ class LedgerSalaryItemTable extends Component {
|
|||
})
|
||||
};
|
||||
const checkValue = (!_.isEmpty(tableData) && _.every(tableData, it => it.itemHide && it.itemHide === "1")) ? "1" : "0";
|
||||
// 中航富士达二开-次月同步勾选框
|
||||
const quoteAlCheckValue = (!_.isEmpty(tableData) && _.every(tableData, it => it.quote && it.quote === "1")) ? "1" : "0";
|
||||
const columns = [
|
||||
{
|
||||
title: "名称",
|
||||
|
|
@ -277,11 +279,29 @@ class LedgerSalaryItemTable extends Component {
|
|||
dataIndex: "taxDeclarationColumn",
|
||||
key: "taxDeclarationColumn"
|
||||
},
|
||||
{
|
||||
title: <span>
|
||||
<WeaCheckbox
|
||||
value={quoteAlCheckValue}
|
||||
onChange={value => this.handleChangeAllItem("quote", value)}
|
||||
/>
|
||||
<span style={{ marginLeft: 8 }}>{getLabel(111, "次月同步")}</span>
|
||||
</span>,
|
||||
dataIndex: "quote",
|
||||
key: "quote",
|
||||
width: 140,
|
||||
render: (text, record) => <WeaCheckbox
|
||||
value={text ? String(text) : !text ? "0" : "1"}
|
||||
onChange={value => {
|
||||
this.handleChangeItem("quote", value, record.id || record.key);
|
||||
}}
|
||||
/>
|
||||
},
|
||||
{
|
||||
title: <span>
|
||||
<WeaCheckbox
|
||||
value={checkValue}
|
||||
onChange={value => this.handleChangeAllItem(value)}
|
||||
onChange={value => this.handleChangeAllItem("itemHide", value)}
|
||||
/>
|
||||
<span style={{ marginLeft: 8 }}>隐藏</span>
|
||||
</span>,
|
||||
|
|
@ -291,7 +311,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
render: (text, record) => <WeaCheckbox
|
||||
value={text ? String(text) : !text ? "0" : "1"}
|
||||
onChange={value => {
|
||||
this.handleChangeItem(value, record.id || record.key);
|
||||
this.handleChangeItem("itemHide", value, record.id || record.key);
|
||||
}}
|
||||
/>
|
||||
},
|
||||
|
|
@ -317,7 +337,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
rowKey={record => record.id || record.key}
|
||||
rowSelection={showOperateBtn ? rowSelection : null}
|
||||
dataSource={tableData}
|
||||
columns={showOperateBtn ? columns : _.filter(columns, o => (o.dataIndex !== "operate" && o.dataIndex !== "itemHide"))}
|
||||
columns={showOperateBtn ? columns : _.filter(columns, o => (o.dataIndex !== "operate" && o.dataIndex !== "itemHide" && o.dataIndex !== "quote"))}
|
||||
onRow={(record, index) => ({
|
||||
index,
|
||||
moveRow: record
|
||||
|
|
|
|||
Loading…
Reference in New Issue