diff --git a/pc4mobx/hrmSalary/apis/calculate.js b/pc4mobx/hrmSalary/apis/calculate.js
index 009a9bd8..6d2cb948 100644
--- a/pc4mobx/hrmSalary/apis/calculate.js
+++ b/pc4mobx/hrmSalary/apis/calculate.js
@@ -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);
+};
+
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js
index 4f4944c7..50a77df6 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js
@@ -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 {
);
reqBtns = [
+ ,
this.doCacl("ALL")} overlay={menu} type="primary">
{getLabel(543545, "核算所有人")}
,
@@ -180,7 +204,7 @@ class Index extends Component {
this.calc.openAdvanceSearch()}
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
];
- !canEdit && reqBtns.splice(0, 1);
+ !canEdit && reqBtns.splice(0, 2);
isOpenApproval && reqBtns.unshift();
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
index 65912404..10f633b2 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
@@ -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
};
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
index 7830fbe5..ab3f28f8 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
@@ -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);
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js
index 1ce016da..b8124fa9 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemPreviewModal.js
@@ -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,
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
index 76808a84..8104804a 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
@@ -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:
+ this.handleChangeAllItem("quote", value)}
+ />
+ {getLabel(111, "次月同步")}
+ ,
+ dataIndex: "quote",
+ key: "quote",
+ width: 140,
+ render: (text, record) => {
+ this.handleChangeItem("quote", value, record.id || record.key);
+ }}
+ />
+ },
{
title:
this.handleChangeAllItem(value)}
+ onChange={value => this.handleChangeAllItem("itemHide", value)}
/>
隐藏
,
@@ -291,7 +311,7 @@ class LedgerSalaryItemTable extends Component {
render: (text, record) => {
- 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