+ content={
+ {/*锚点*/}
+
this.setState({ baseInfo })}/>
{
selectedKey === "0" && _.map(itemsByGroup, item => {
- return ;
+ return ;
})
}
{
selectedKey === "1" &&
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
index e2d8ce9b..ff3ef53f 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
@@ -142,6 +142,7 @@
height: 100%;
.salary-calculate-esf-area {
+ position: relative;
background: #f6f6f6;
height: 100%;
overflow-y: auto;
@@ -149,6 +150,10 @@
.esf-base-info-form, .wea-title, .wea-content {
padding: 0;
+
+ .ant-row {
+ height: 100%;
+ }
}
.esf-form-content {
@@ -191,6 +196,109 @@
.wea-search-group {
padding: 0;
}
+
+ //锚点按钮
+ .anchor-list-collapsed {
+ padding: 0 !important;
+ }
+
+ .anchor-list-wrapper {
+ position: absolute;
+ right: 0;
+ margin: 10px 15px 20px;
+ padding: 8px 10px;
+ overflow: auto;
+ background-color: #fff;
+ box-shadow: 0 3px 12px 0 rgba(0, 0, 0, .12);
+ border-radius: 3px;
+ cursor: pointer;
+
+ .anchor-list-collapsed-btn {
+ opacity: .5;
+ background: #000;
+ color: #fff;
+ border-radius: 3px;
+ width: 30px;
+ height: 30px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-size: 16px;
+ }
+
+ .anchor-list-header {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ min-width: 130px;
+ padding: 5px;
+ }
+
+ .anchor-list {
+ padding: 0 10px;
+ position: relative;
+ margin-top: 10px;
+ transition: margin-top .3s;
+
+ .anchor-list-ink {
+ position: absolute;
+ top: 0;
+ left: 5px;
+ height: 100%;
+
+ .anchor-list-ink-ball.visible {
+ display: inline-block;
+ }
+
+ .anchor-list-ink-ball {
+ position: absolute;
+ left: 50%;
+ display: none;
+ width: 3px;
+ height: 8px;
+ background-color: #5d9cec;
+ border: 1.5px solid #5d9cec;
+ border-radius: 8px;
+ transform: translateX(-50%);
+ transition: top .3s ease-in-out;
+ }
+ }
+
+ .anchor-list-ink:before {
+ position: relative;
+ display: block;
+ width: 1px;
+ height: 100%;
+ margin: 0 auto;
+ background-color: #f0f0f0;
+ content: " ";
+ }
+
+ .anchor-list-link {
+ padding: 7px 0 7px 10px;
+ line-height: 1.143;
+
+ .anchor-list-link-title {
+ position: relative;
+ display: block;
+ overflow: hidden;
+ color: #666;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ transition: all .3s;
+ cursor: pointer;
+ outline: none;
+ text-decoration: none;
+ background-color: transparent;
+ }
+ }
+
+ .anchor-list-link-active > .anchor-list-link-title {
+ color: #5d9cec;
+ }
+ }
+ }
+
}
}
}
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js
index ce58c616..901cb803 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalcImport/index.js
@@ -156,7 +156,7 @@ class Index extends Component {
}
}, () => {
const { selectItems: salaryItems } = this.state.headerFieldsDialog;
- cacheImportField({ salaryItems: salaryItems ? salaryItems.split(",") : [] })
+ cacheImportField({ salaryAcctRecordId, salaryItemIds: salaryItems ? salaryItems.split(",") : [] })
.then(({ status, errormsg }) => {
if (status) {
const payload = {
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryMonthTip/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryMonthTip/index.js
index a230b83e..e9eb34c9 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryMonthTip/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryMonthTip/index.js
@@ -12,7 +12,7 @@ const getLabel = WeaLocaleProvider.getLabel;
class Index extends Component {
render() {
- const { attendCycle, salaryCycle, salaryMonth, socialSecurityCycle } = this.props;
+ const { attendCycle, salaryCycle, taxCycle, salaryMonth, socialSecurityCycle } = this.props;
const { fromDate: attendFromDate, endDate: attendEndDate } = attendCycle,
{ fromDate: salaryFromDate, endDate: salaryEndDate } = salaryCycle;
return (
@@ -23,7 +23,7 @@ class Index extends Component {
{getLabel(542240, "税款所属期")}
-
{salaryMonth}
+
{taxCycle || salaryMonth}
{getLabel(543475, "考勤取值周期")}
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js
index 0d1c87fc..4f4944c7 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/index.js
@@ -9,7 +9,12 @@ import { WeaLocaleProvider, WeaReqTop } from "ecCom";
import { Button, Dropdown, Menu, message, Modal } from "antd";
import { inject, observer } from "mobx-react";
import Layout from "./layout";
-import { acctresultAccounting, getCalculateProgress, getExportField } from "../../../apis/calculate";
+import {
+ acctresultAccounting,
+ getApprovalInfoByRecordId,
+ getCalculateProgress,
+ getExportField
+} from "../../../apis/calculate";
import AdvanceInputBtn from "./components/advanceInputBtn";
import SalaryCalcPersonConfirm from "./components/salaryCalcPersonConfirm";
import SalaryEditCalc from "./components/salaryEditCalc";
@@ -30,6 +35,7 @@ class Index extends Component {
selectedKey: "person", progressVisible: false, progress: 0,
customExpDialog: { visible: false, salaryAcctRecordId: "", checkItems: [], itemsByGroup: [] },
salaryImpDialog: { visible: false, title: "", salaryAcctRecordId: "" },
+ approvalInfo: {},//审批信息,
accountExceptInfo: "" //核算报错信息,
};
@@ -37,6 +43,12 @@ class Index extends Component {
this.timer = null;
}
+ init = () => {
+ const { routeParams: { salaryAcctRecordId } } = this.props;
+ getApprovalInfoByRecordId({ salaryAcctRecordId }).then(({ status, data: approvalInfo }) => {
+ if (status) this.setState({ approvalInfo });
+ });
+ };
handleMenuClick = ({ key }) => {
switch (key) {
case "calc_selected":
@@ -125,12 +137,23 @@ class Index extends Component {
case "offlineCompare":
window.open(`/spa/hrmSalary/static/index.html#/main/hrmSalary/calcOc/${salaryAcctRecordId}`, "_blank");
break;
+ case "LOCK":
+ case "UNLOCK":
+ const { selectedRowKeys } = this.calc.calcTableRef.wrappedInstance.state;
+ if (_.isEmpty(selectedRowKeys)) {
+ message.warning(getLabel(543303, "请选择表格数据!"));
+ return;
+ }
+ this.calc.calcTableRef.wrappedInstance.updateEmpLockStatus({ lockStatus: key, acctEmpIds: selectedRowKeys });
+ break;
default:
break;
}
};
renderReqBtns = () => {
- const { selectedKey, accountExceptInfo } = this.state;
+ const { routeParams: { salaryAcctRecordId } } = this.props;
+ const { selectedKey, accountExceptInfo, approvalInfo } = this.state;
+ const { isOpenApproval, approvalWorkflowUrl, canEdit } = approvalInfo;
let reqBtns = [];
switch (selectedKey) {
case "calc":
@@ -141,10 +164,12 @@ class Index extends Component {
);
const moreMenu = (
);
reqBtns = [
@@ -155,6 +180,10 @@ class Index extends Component {
this.calc.openAdvanceSearch()}
onAdvanceSearch={() => this.calc.onAdSearch(false)}/>
];
+ !canEdit && reqBtns.splice(0, 1);
+ isOpenApproval && reqBtns.unshift();
accountExceptInfo && reqBtns.unshift( this.downloadTxtfile(accountExceptInfo)}/>);
@@ -173,14 +202,15 @@ class Index extends Component {
element.click();
};
renderContent = () => {
- const { selectedKey } = this.state;
+ const { selectedKey, approvalInfo } = this.state;
+ const { canEdit } = approvalInfo;
let dom = null;
switch (selectedKey) {
case "person":
- dom = ;
+ dom = ;
break;
case "calc":
- dom = this.calc = dom}/>;
+ dom = this.calc = dom}/>;
break;
default:
break;
@@ -196,7 +226,7 @@ class Index extends Component {
const { calculateStore: { setOtherConditions } } = this.props;
const { selectedKey, progressVisible, progress, customExpDialog, salaryImpDialog } = this.state;
return (
-
+
,
render: (text, record) => {
- const { canEdit, pattern } = record;
+ const { canEdit, pattern } = record, { viewAttr } = this.props;
return
onChangeIssueReissueValue(record.salaryItemName, value, "issuedAndReissueItems")}
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/payrollItemsTable.js b/pc4mobx/hrmSalary/pages/calculateDetail/payrollItemsTable.js
index 9d2ddfce..9f196d5f 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/payrollItemsTable.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/payrollItemsTable.js
@@ -37,8 +37,9 @@ class PayrollItemsTable extends Component {
,
width: "20%",
render: (text, record) => {
- const { canEdit, dataType, pattern } = record;
+ const { canEdit, dataType, pattern } = record, { viewAttr } = this.props;
return dataType === "number" ? : onChangeIssueReissueValue(record.salaryItemId, value, "itemsByGroup", salarySobItemGroupId)}
/>;
}
@@ -66,7 +68,7 @@ class PayrollItemsTable extends Component {
}
];
return (
-
+
- {getSearchs(form, condition)}
+
+ {getSearchs(form, condition, 2, false)}
若此员工数据已存在在同期列表中,则当前数据保存后会覆盖列表数据
);
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js
index f1e9b4fd..be64c8e8 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js
@@ -41,8 +41,7 @@ class AttendanceDataViewSlide extends Component {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
- // o.dataIndex === "username" ? "left" :
- columns: _.map(columns, o => ({ ...o, width: 150, fixed: null }))
+ columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : null }))
});
}
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
@@ -103,7 +102,7 @@ class AttendanceDataViewSlide extends Component {
+ loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 240px)` }}/>
}
/>
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less
index fafbff7c..b8713b71 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.less
@@ -4,7 +4,15 @@
flex-direction: column;
.wea-form-item {
- padding: 8px 16px 0 16px;
+ height: 46px;
+ line-height: 46px;
+ background: #FFF;
+ margin: 8px 16px 0 16px;
+
+ .wea-form-item-label {
+ line-height: 46px !important;
+ padding-left: 8px !important;
+ }
.to {
padding: 0 10px
@@ -15,7 +23,7 @@
flex: 1;
overflow: hidden;
background: #FFF;
- margin: 16px;
+ margin: 8px 16px;
}
.linkWapper {
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/components/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/components/index.less
index 4d16b78a..94ab3cad 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/components/index.less
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/components/index.less
@@ -1,13 +1,41 @@
.tableRecordWrapper {
+ padding: 0 16px;
+
+ .form-dialog-layout {
+ padding: 0 !important;
+
+ .wea-search-group {
+ padding: 16px 0 !important;
+ }
+ }
+
+ .wea-form-cell-wrapper {
+ & > div:first-child {
+ height: 47px !important;
+ line-height: 47px;
+ }
+
+ & > div:last-child {
+
+ .wea-form-item-wrapper {
+ display: flex !important;
+ align-items: center;
+
+ .to {
+ padding: 0 10px;
+ }
+ }
+ }
+ }
+
.accumulated {
.wea-form-cell-wrapper {
& > div:first-child {
- height: 46px !important;
- line-height: 46px;
+ height: 47px !important;
+ line-height: 47px;
}
& > div:nth-child(2) {
- //width: 40% !important;
.wea-form-item-wrapper {
display: flex !important;
@@ -18,10 +46,6 @@
}
}
}
-
- & > div:last-child {
- //width: 40% !important;
- }
}
}
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js b/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js
index 9db08fac..9c36b02a 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/components/tableRecord.js
@@ -5,12 +5,13 @@
* Date: 2023/2/20
*/
import React, { Component } from "react";
-import { WeaSearchGroup } from "ecCom";
-import UnifiedTable from "../../../components/UnifiedTable";
+import { WeaLocaleProvider, WeaSearchGroup, WeaTable } from "ecCom";
import { getTableRecordDate } from "../../../apis/cumDeduct";
import { DataCollectionDateRangePick, DataCollectionSelect, Input } from "../cumDeduct";
import "./index.less";
+const getLabel = WeaLocaleProvider.getLabel;
+
class TableRecord extends Component {
constructor(props) {
super(props);
@@ -87,9 +88,22 @@ class TableRecord extends Component {
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
- pageInfo: { ...pageInfo, current, pageSize, total },
- dataSource,
- columns
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
+ columns: _.map(columns, (o, i) => {
+ let col = {
+ ...o, width: 110,
+ render: text => (
{text})
+ };
+ switch (o.dataIndex) {
+ case "taxAgentName":
+ col = { ...col, width: 180 };
+ break;
+ default:
+ col = { ...col };
+ break;
+ }
+ return i === 0 ? { ...col, fixed: "left" } : col;
+ })
});
}
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
@@ -155,19 +169,11 @@ class TableRecord extends Component {
};
const items = screenParams.length === 1 ? [
{
- com: Input({ value: record.username })
+ com: Input({ label: getLabel(111, "姓名"), value: record.username })
}
] : [
{
- com: Input({ value: record.username })
- },
- {
- com: DataCollectionDateRangePick({
- label: "税款所属期",
- range: recordPayload[screenParams[screenParams.length - 1]] || [],
- onChange: this.handleTablerecordScreen,
- key: screenParams[screenParams.length - 1]
- })
+ com: Input({ label: getLabel(111, "姓名"), value: record.username })
},
{
com: DataCollectionSelect({
@@ -177,28 +183,26 @@ class TableRecord extends Component {
onChange: this.handleTablerecordScreen,
key: "taxAgentId"
})
+ },
+ {
+ com: DataCollectionDateRangePick({
+ label: "税款所属期",
+ range: recordPayload[screenParams[screenParams.length - 1]] || [],
+ onChange: this.handleTablerecordScreen,
+ key: screenParams[screenParams.length - 1]
+ })
}
];
return (
{
!_.isEmpty(screenParams) &&
-
1280 ? 3 : 2}/>
+
+
+
}
- ({
- ...item,
- render: (text) => {
- return {text} ;
- }
- }))}
- dataSource={dataSource}
- pagination={pagination}
- loading={loading.query}
- xWidth={columns.length * 180}
- />
+
);
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js
index 742d1573..fb50fd4c 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/columns.js
@@ -1,400 +1,3 @@
-export const columns = [
- {
- title: "姓名",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "个税扣缴义务人",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "部门",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "手机号",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "工号",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "证件号码",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "入职日期",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计子女教育",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计继续教育",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计住房贷款利息",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计住房租金",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计赡养老人",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "操作",
- dataIndex: "title",
- key: "title"
- }
-];
-
-
-export const modalColumns = [
- {
- title: "姓名",
- dataIndex: "username",
- key: "username"
- },
- {
- title: "个税扣缴义务人",
- dataIndex: "taxAgentName",
- key: "taxAgentName"
- },
- {
- title: "部门",
- dataIndex: "departmentName",
- key: "departmentName"
- },
- {
- title: "手机号",
- dataIndex: "mobile",
- key: "mobile"
- },
- {
- title: "工号",
- dataIndex: "jobNum",
- key: "jobNum"
- },
- {
- title: "证件号码",
- dataIndex: "idNo",
- key: "idNo"
- },
- {
- title: "入职日期",
- dataIndex: "hiredate",
- key: "hiredate"
- },
- {
- title: "累计子女教育",
- dataIndex: "addUpChildEducation",
- key: "addUpChildEducation"
- },
- {
- title: "累计继续教育",
- dataIndex: "addUpContinuingEducation",
- key: "addUpContinuingEducation"
- },
- {
- title: "累计住房贷款利息",
- dataIndex: "addUpHousingLoanInterest",
- key: "addUpHousingLoanInterest"
- },
- {
- title: "累计住房租金",
- dataIndex: "addUpHousingRent",
- key: "addUpHousingRent"
- },
- {
- title: "累计赡养老人",
- dataIndex: "addUpSupportElderly",
- key: "addUpSupportElderly"
- },
- {
- title: "累计婴幼儿照护",
- dataIndex: "addUpInfantCare",
- key: "addUpInfantCare"
- },
- {
- title: "累计大病医疗",
- dataIndex: "addUpIllnessMedical",
- key: "addUpIllnessMedical"
- }
-];
-export const specialModalColumns = [
- {
- title: "姓名",
- dataIndex: "username",
- key: "username"
- },
- {
- title: "个税扣缴义务人",
- dataIndex: "taxAgentName",
- key: "taxAgentName"
- },
- {
- title: "部门",
- dataIndex: "departmentName",
- key: "departmentName"
- },
- {
- title: "手机号",
- dataIndex: "mobile",
- key: "mobile"
- },
- {
- title: "工号",
- dataIndex: "jobNum",
- key: "jobNum"
- },
- {
- title: "证件号码",
- dataIndex: "idNo",
- key: "idNo"
- },
- {
- title: "入职日期",
- dataIndex: "hiredate",
- key: "hiredate"
- },
- {
- title: "子女教育",
- dataIndex: "childrenEducation",
- key: "childrenEducation"
- },
- {
- title: "继续教育",
- dataIndex: "continuingEducation",
- key: "continuingEducation"
- },
- {
- title: "住房贷款利息",
- dataIndex: "housingLoanInterest",
- key: "housingLoanInterest"
- },
- {
- title: "住房租金",
- dataIndex: "housingRent",
- key: "housingRent"
- },
- {
- title: "赡养老人",
- dataIndex: "supportingElder",
- key: "supportingElder"
- },
- {
- title: "婴幼儿照护",
- dataIndex: "infantCare",
- key: "infantCare"
- },
- {
- title: "大病医疗",
- dataIndex: "seriousIllnessTreatment",
- key: "seriousIllnessTreatment"
- }
-];
-export const otherModalColumns = [
- {
- title: "姓名",
- dataIndex: "username",
- key: "username"
- },
- {
- title: "个税扣缴义务人",
- dataIndex: "taxAgentName",
- key: "taxAgentName"
- },
- {
- title: "部门",
- dataIndex: "departmentName",
- key: "departmentName"
- },
- {
- title: "手机号",
- dataIndex: "mobile",
- key: "mobile"
- },
- {
- title: "工号",
- dataIndex: "jobNum",
- key: "jobNum"
- },
- {
- title: "证件号码",
- dataIndex: "idNo",
- key: "idNo"
- },
- {
- title: "入职日期",
- dataIndex: "hiredate",
- key: "hiredate"
- },
- {
- title: "商业健康保险",
- dataIndex: "businessHealthyInsurance",
- key: "businessHealthyInsurance"
- },
- {
- title: "税延养老保险",
- dataIndex: "taxDelayEndowmentInsurance",
- key: "taxDelayEndowmentInsurance"
- },
- {
- title: "其他",
- dataIndex: "otherDeduction",
- key: "otherDeduction"
- },
- {
- title: "准予扣除的捐赠额",
- dataIndex: "deductionAllowedDonation",
- key: "deductionAllowedDonation"
- }
-];
-export const situationModalColumns = [
- {
- title: "姓名",
- dataIndex: "username",
- key: "username"
- },
- {
- title: "个税扣缴义务人",
- dataIndex: "taxAgentName",
- key: "taxAgentName"
- },
- {
- title: "部门",
- dataIndex: "departmentName",
- key: "departmentName"
- },
- {
- title: "手机号",
- dataIndex: "mobile",
- key: "mobile"
- },
- {
- title: "工号",
- dataIndex: "jobNum",
- key: "jobNum"
- },
- {
- title: "证件号码",
- dataIndex: "idNo",
- key: "idNo"
- },
- {
- title: "入职日期",
- dataIndex: "hiredate",
- key: "hiredate"
- },
- {
- title: "累计收入额",
- dataIndex: "addUpIncome",
- key: "addUpIncome"
- },
- {
- title: "累计减除费用",
- dataIndex: "addUpSubtraction",
- key: "addUpSubtraction"
- },
- {
- title: "累计社保个人合计",
- dataIndex: "addUpSocialSecurityTotal",
- key: "addUpSocialSecurityTotal"
- },
- {
- title: "累计公积金个人合计",
- dataIndex: "addUpAccumulationFundTotal",
- key: "addUpAccumulationFundTotal"
- },
- {
- title: "累计子女教育",
- dataIndex: "addUpChildEducation",
- key: "addUpChildEducation"
- },
- {
- title: "累计继续教育",
- dataIndex: "addUpContinuingEducation",
- key: "addUpContinuingEducation"
- },
- {
- title: "累计住房贷款利息",
- dataIndex: "addUpHousingLoanInterest",
- key: "addUpHousingLoanInterest"
- },
- {
- title: "累计住房租金",
- dataIndex: "addUpHousingRent",
- key: "addUpHousingRent"
- },
- {
- title: "累计赡养老人",
- dataIndex: "addUpSupportElderly",
- key: "addUpSupportElderly"
- },
- {
- title: "累计企业(职业)年金及其他福利",
- dataIndex: "addUpEnterpriseAndOther",
- key: "addUpEnterpriseAndOther"
- },
- {
- title: "累计其他免税扣除",
- dataIndex: "addUpOtherDeduction",
- key: "addUpOtherDeduction"
- },
- {
- title: "累计免税收入",
- dataIndex: "addUpTaxExemptIncome",
- key: "addUpTaxExemptIncome"
- },
- {
- title: "累计准予扣除的捐赠额",
- dataIndex: "addUpAllowedDonation",
- key: "addUpAllowedDonation"
- },
- {
- title: "累计减免税额",
- dataIndex: "addUpTaxSavings",
- key: "addUpTaxSavings"
- },
- {
- title: "累计已预扣预缴税额",
- dataIndex: "addUpAdvanceTax",
- key: "addUpAdvanceTax"
- },
- {
- title: "累计婴幼儿照护",
- dataIndex: "addUpInfantCare",
- key: "addUpInfantCare"
- },
- {
- title: "累计大病医疗",
- dataIndex: "addUpIllnessMedical",
- key: "addUpIllnessMedical"
- }
-
-];
-
-
-export const dataSource = [];
-
export const dataCollectCondition = [
{
items: [
@@ -404,7 +7,7 @@ export const dataCollectCondition = [
fieldcol: 12,
label: "税款所属期",
lanId: 542240,
- labelcol: 4,
+ labelcol: 8,
value: "",
rules: "required|string",
viewAttr: 3
@@ -414,7 +17,7 @@ export const dataCollectCondition = [
domkey: ["taxAgentId"],
fieldcol: 12,
label: "个税扣缴义务人",
- labelcol: 4,
+ labelcol: 8,
lanId: 537996,
value: "",
options: [],
@@ -448,7 +51,7 @@ export const dataCollectCondition = [
isQuickSearch: false,
label: "人员",
lanId: 30042,
- labelcol: 4,
+ labelcol: 8,
rules: "required",
viewAttr: 3
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
index 9f1e481f..d7d92744 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
@@ -28,6 +28,7 @@ import TableRecord from "../components/tableRecord";
import { dataCollectCondition } from "./columns";
import { removePropertyCondition } from "../../../util/response";
import { convertToUrlString } from "../../../util/url";
+import { getDomkes } from "../../../util";
import Layout from "../layout";
import moment from "moment";
@@ -239,6 +240,7 @@ class Index extends Component {
addForm.validateForm().then(f => {
if (f.isValid) {
const payload = {
+ ..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
...addForm.getFormParams(),
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
};
@@ -332,7 +334,7 @@ class Index extends Component {
...slidePayload,
visible: false,
title: "",
- chidren: null,
+ children: null,
data: {}
}
});
@@ -555,8 +557,10 @@ export const DataCollectionSelect = (props) => {
};
export const Input = (props) => {
- const { value } = props;
- return (
);
+ const { value, label } = props;
+ return (
+
+ );
};
export const DataCollectionDateRangePick = (props) => {
const { range, label, onChange, format = "YYYY-MM", key } = props;
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js
index 197463bb..4fb2d80f 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/columns.js
@@ -1,70 +1,3 @@
-export const columns = [
- {
- title: "姓名",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "个税扣缴义务人",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "部门",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "手机号",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "工号",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "证件号码",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "入职日期",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计子女教育",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计继续教育",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计住房贷款利息",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计住房租金",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计赡养老人",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "操作",
- dataIndex: "title",
- key: "title"
- }
-];
export const dataCollectCondition = [
{
items: [
@@ -74,7 +7,7 @@ export const dataCollectCondition = [
fieldcol: 12,
label: "税款所属期",
lanId: 542240,
- labelcol: 4,
+ labelcol: 8,
value: "",
rules: "required|string",
viewAttr: 3
@@ -84,7 +17,7 @@ export const dataCollectCondition = [
domkey: ["taxAgentId"],
fieldcol: 12,
label: "个税扣缴义务人",
- labelcol: 4,
+ labelcol: 8,
lanId: 537996,
value: "",
options: [],
@@ -133,7 +66,7 @@ export const dataCollectCondition = [
isQuickSearch: false,
label: "人员",
lanId: 30042,
- labelcol: 4,
+ labelcol: 8,
rules: "required",
viewAttr: 3
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
index dd32ab7c..64cdd59e 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
@@ -27,6 +27,7 @@ import { dataCollectCondition, taxOptions } from "./columns";
import AddItems from "../addItems";
import TableRecord from "../components/tableRecord";
import { convertToUrlString } from "../../../util/url";
+import { getDomkes } from "../../../util";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -379,7 +380,7 @@ class Index extends Component {
...slidePayload,
visible: false,
title: "",
- chidren: null,
+ children: null,
data: {}
}
});
@@ -392,6 +393,7 @@ class Index extends Component {
addForm.validateForm().then(f => {
if (f.isValid) {
const payload = {
+ ..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
...addForm.getFormParams(),
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
};
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
index e677d531..dc5d395d 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/dataTables.js
@@ -5,9 +5,8 @@
* Date: 2023/2/17
*/
import React, { Component } from "react";
-import UnifiedTable from "../../components/UnifiedTable";
import { getTableDate } from "../../apis/cumDeduct";
-import { Menu, Popover } from "antd";
+import { Spin } from "antd";
import { WeaLocaleProvider } from "ecCom";
const getLabel = WeaLocaleProvider.getLabel;
@@ -16,25 +15,53 @@ class DataTables extends Component {
constructor(props) {
super(props);
this.state = {
- loading: {
- query: false
- },
- dataSource: [],
- columns: [],
- selectedRowKeys: [],
- pageInfo: {
- current: 1, pageSize: 10, total: 0
- }
+ loading: { query: false }, dataSource: [], columns: [], selectedRowKeys: [],
+ pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
componentDidMount() {
- this.getTableDate();
+ window.addEventListener("message", this.handleReceive, false);
}
+ componentWillUnmount() {
+ window.removeEventListener("message", this.handleReceive, false);
+ }
+
+ handleReceive = async ({ data }) => {
+ const { type, payload: { id, params } = {} } = data;
+ if (type === "init") {
+ this.getTableDate();
+ } else if (type === "turn") {
+ switch (id) {
+ case "PAGEINFO":
+ this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.getTableDate());
+ break;
+ case "CHECKBOX":
+ const { selectedRowKeys } = params;
+ this.setState({ selectedRowKeys });
+ break;
+ case "DEL":
+ this.props.onTableOperate({ key: "deleteSelectAddUpDeduction" }, params);
+ break;
+ case "EDIT":
+ this.props.onTableOperate({ key: "handleAddData" }, params);
+ break;
+ case "VIEW":
+ this.props.onViewDetails(params);
+ break;
+ case "log":
+ this.props.onTableOperate({ key: "log" }, params);
+ break;
+ default:
+ break;
+ }
+ }
+ };
+
getTableDate = (extraPayload = {}) => {
- const { loading, pageInfo } = this.state;
- const { url, payload } = this.props;
+ const { loading, pageInfo, selectedRowKeys } = this.state;
+ const { url, payload, isSpecial } = this.props;
const module = {
...pageInfo, url, ...payload, ...extraPayload,
departmentIds: extraPayload.departmentIds ? extraPayload.departmentIds.split(",") : []
@@ -45,10 +72,12 @@ class DataTables extends Component {
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
- pageInfo: { ...pageInfo, current, pageSize, total },
- dataSource,
- columns
- });
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource, columns
+ }, () => this.postMessageToChild({
+ dataSource: this.state.dataSource, scrollHeight: 103, selectedRowKeys, isSpecial,
+ pageInfo: this.state.pageInfo, unitTableType: "dataAcquisition",
+ columns: this.state.columns
+ }));
}
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
};
@@ -59,124 +88,34 @@ class DataTables extends Component {
* Date: 2023/2/20
*/
handleClearRows = () => this.setState({ selectedRowKeys: [] });
+ postMessageToChild = (payload = {}) => {
+ const i18n = {
+ "操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"), "共": getLabel(18609, "共"),
+ "条": getLabel(18256, "条"), "删除": getLabel(111, "删除"), "查看明细": getLabel(111, "查看明细"),
+ "操作日志": getLabel(545781, "操作日志")
+ };
+ const childFrameObj = document.getElementById("unitTable");
+ childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
+ };
render() {
- const { columns, dataSource, loading, selectedRowKeys, pageInfo } = this.state;
- const { showOperateBtn, onTableOperate, onViewDetails, isSpecial = false, form } = this.props;
- const rowSelection = {
- selectedRowKeys,
- onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
- };
- const pagination = {
- ...pageInfo,
- showTotal: (total) => `共 ${total} 条`,
- pageSizeOptions: ["10", "20", "50", "100"],
- showSizeChanger: true,
- showQuickJumper: true,
- onShowSizeChange: (current, pageSize) => {
- this.setState({
- pageInfo: { ...pageInfo, current, pageSize }
- }, () => {
- this.getTableDate({ ...form.getFormParams() });
- });
- },
- onChange: (current) => {
- this.setState({
- pageInfo: { ...pageInfo, current }
- }, () => {
- this.getTableDate({ ...form.getFormParams() });
- });
- }
- };
- const getColumns = _.map(columns, item => {
- const { dataIndex } = item;
- if (dataIndex === "username") {
- return {
- ...item,
- render: (text, record) => {
- return window.pointerXY(e)}
- title={text}
- >
- {text}
- ;
- }
- };
- } else if (dataIndex === "operate") {
- return {
- ...item,
- width: 150,
- render: (text, record) => (
-
- )
- };
- } else {
- return {
- ...item,
- render: (text) => {
- return {text} ;
- }
- };
- }
- });
- return ;
+ const { dataSource, loading } = this.state;
+ const dom = document.querySelector(".dataContent");
+ let height = 280;
+ if (dataSource.length > 0 && dom) {
+ const tableHeight = dataSource.length * 46 + 124;
+ height = dom.offsetHeight > tableHeight ? tableHeight : dom.offsetHeight;
+ }
+ return (
+
+
+
+
);
}
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/index.less b/pc4mobx/hrmSalary/pages/dataAcquisition/index.less
index f5272aed..8b4093da 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/index.less
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/index.less
@@ -23,33 +23,17 @@
}
.addItemsWrapper {
+ padding-bottom: 8px;
+
.baseForm {
.wea-form-cell {
padding-right: 20% !important;
}
}
- .wea-search-group {
- .wea-form-cell-wrapper {
- border: 1px solid #e5e5e5;
-
- & > div:last-child {
- border-bottom: none
- }
-
- .wea-form-cell {
- padding: 4px 16px;
- border-bottom: 1px solid #e5e5e5;
-
- .wea-form-item-wrapper {
- line-height: 30px;
- }
-
- .wea-form-item {
- padding: 0;
- }
- }
- }
+ .tipWrapper {
+ background: #FFF;
+ margin: 0 16px;
}
}
@@ -57,6 +41,15 @@
height: 100%;
display: flex;
flex-direction: column;
+ background: #F6F6F6;
+
+ .wea-new-top-wapper, .wea-tab {
+ background: #FFF;
+ }
+
+ .wea-tab {
+ margin: 8px 16px;
+ }
.wea-tab-left {
min-width: 600px !important;
@@ -114,6 +107,68 @@
.dataContent {
flex: 1;
overflow: hidden;
+ padding: 0 16px;
+
+ .wea-new-table {
+ background: #FFF;
+
+ .dataAc-ellipsis {
+ display: inline-block;
+ width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ }
+
+ .wea-slide-modal .wea-slide-modal-content {
+ background: #f6f6f6;
+ height: 100%;
+ }
+
+ .ant-spin-nested-loading, .ant-spin-container {
+ height: 100% !important;
+ }
+
+ .titleDialog {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ padding: 8px 46px 8px 16px;
+ background: #fff;
+
+ .titleCol {
+ flex: 1;
+ display: flex;
+ align-items: center;
+ }
+
+ .titleLeftBox {
+ .titleIcon {
+ color: #fff;
+ margin: 0;
+ width: 40px;
+ height: 40px;
+ line-height: 40px;
+ font-size: 22px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: #F14A2D;
+ border-radius: 50%;
+ }
+
+ .title {
+ font-size: 14px;
+ color: #333;
+ padding-left: 6px;
+ }
+ }
+
+ .titleRightBox {
+ justify-content: flex-end;
+ }
+ }
}
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js
index 9337f5f9..a36aa418 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/layout.js
@@ -7,10 +7,10 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { toJS } from "mobx";
-import { WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
+import { WeaLocaleProvider, WeaSlideModal, WeaTab, WeaTop } from "ecCom";
+import { Button } from "antd";
import ImportModal from "./importDialog";
import LogDialog from "../../components/logViewModal";
-import SlideModalTitle from "../../components/slideModalTitle";
import { getSearchs } from "../../util";
import "./index.less";
@@ -73,15 +73,29 @@ class Layout extends Component {
break;
}
};
+ renderTitle = () => {
+ const { slidePayload, slideLoading, detailOptBtns, onSave } = this.props;
+ const { title } = slidePayload;
+ return
+
+
+ {(slidePayload.children && slidePayload.children.props.className) ? [...detailOptBtns] :
+ }
+
+
;
+ };
render() {
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
const {
title, btns, leftComp, children, taxAgentStore: { showOperateBtn },
- slidePayload, onClose, onSave, slideLoading, form, condition, onImportFile,
- onAdSearch, onCancel, importPayload, detailOptBtns, logFunction, onClearTargrtid
+ slidePayload, onClose, form, condition, onImportFile,
+ onAdSearch, onCancel, importPayload, logFunction, onClearTargrtid
} = this.props;
- const { visible, title: subtitle, children: slideChildren } = slidePayload;
+ const { visible, children: slideChildren } = slidePayload;
const {
visible: importVisiable, importFormComponent, importOpts,
importResult, templateLink, previewUrl
@@ -99,6 +113,7 @@ class Layout extends Component {
]}
/>
-
{children}
+ {children}
{/*导入弹框*/}
- }
+ title={this.renderTitle()}
content={slideChildren}
onClose={onClose}
/>
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js
index e693c017..92237ee8 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/columns.js
@@ -1,70 +1,3 @@
-export const columns = [
- {
- title: "姓名",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "个税扣缴义务人",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "部门",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "手机号",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "工号",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "证件号码",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "入职日期",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计子女教育",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计继续教育",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计住房贷款利息",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计住房租金",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "累计赡养老人",
- dataIndex: "title",
- key: "title"
- },
- {
- title: "操作",
- dataIndex: "title",
- key: "title"
- }
-];
export const dataCollectCondition = [
{
items: [
@@ -74,7 +7,7 @@ export const dataCollectCondition = [
fieldcol: 12,
label: "税款所属期",
lanId: 542240,
- labelcol: 4,
+ labelcol: 8,
value: "",
rules: "required|string",
viewAttr: 3
@@ -84,7 +17,7 @@ export const dataCollectCondition = [
domkey: ["taxAgentId"],
fieldcol: 12,
label: "个税扣缴义务人",
- labelcol: 4,
+ labelcol: 8,
lanId: 537996,
value: "",
options: [],
@@ -118,7 +51,7 @@ export const dataCollectCondition = [
isQuickSearch: false,
label: "人员",
lanId: 30042,
- labelcol: 4,
+ labelcol: 8,
rules: "required",
viewAttr: 3
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
index e9e61438..8f786982 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
@@ -29,6 +29,7 @@ import { dataCollectCondition } from "./columns";
import AddItems from "../addItems";
import TableRecord from "../components/tableRecord";
import { convertToUrlString } from "../../../util/url";
+import { getDomkes } from "../../../util";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -394,7 +395,7 @@ class Index extends Component {
...slidePayload,
visible: false,
title: "",
- chidren: null,
+ children: null,
data: {}
}
});
@@ -407,6 +408,7 @@ class Index extends Component {
addForm.validateForm().then(f => {
if (f.isValid) {
const payload = {
+ ..._.reduce(getDomkes(dataCollectCondition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
...addForm.getFormParams(),
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
};
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js
index 241efd93..1e009b70 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/components/condition.js
@@ -7,7 +7,7 @@ export const condition = [
fieldcol: 12,
label: "个税扣缴义务人",
lanId: 537996,
- labelcol: 4,
+ labelcol: 8,
value: "",
options: [],
rules: "required|string",
@@ -40,7 +40,7 @@ export const condition = [
isQuickSearch: false,
label: "人员",
lanId: 30042,
- labelcol: 4,
+ labelcol: 8,
rules: "required",
viewAttr: 3
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js
index fe79d45f..5986baae 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/specialAddDeduction/index.js
@@ -20,6 +20,7 @@ import { condition } from "./components/condition";
import AddItems from "../addItems";
import TableRecord from "../components/tableRecord";
import { convertToUrlString } from "../../../util/url";
+import { getDomkes } from "../../../util";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -332,7 +333,7 @@ class Index extends Component {
...slidePayload,
visible: false,
title: "",
- chidren: null,
+ children: null,
data: {}
}
});
@@ -345,6 +346,7 @@ class Index extends Component {
addForm.validateForm().then(f => {
if (f.isValid) {
const payload = {
+ ..._.reduce(getDomkes(condition), (pre, cur) => ({ ...pre, [cur]: "" }), {}),
...addForm.getFormParams(),
taxAgentName: _.find(taxAgentOption, it => it.key === addForm.getFormParams().taxAgentId).showname
};
diff --git a/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js
index 28bda271..36ef34ea 100644
--- a/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/components/declareDialog/index.js
@@ -12,6 +12,7 @@ import { getSearchs } from "../../../../util";
import { getTaxAgentSelectListAsAdmin } from "../../../../apis/taxAgent";
import { saveDeclare } from "../../../../apis/declare";
import { declareConditions } from "./condition";
+import * as API from "../../../../apis/ruleconfig";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@@ -31,7 +32,8 @@ class Index extends Component {
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.declareStore.initDeclareForm();
}
- getTaxAgentSelectListAsAdmin = (props) => {
+ getTaxAgentSelectListAsAdmin = async (props) => {
+ const { data: sysinfo } = await API.sysinfo();
const { declareStore: { declareForm } } = props;
getTaxAgentSelectListAsAdmin().then(({ status, data }) => {
if (status) {
@@ -44,6 +46,11 @@ class Index extends Component {
...o, options: _.map(data, g => ({ key: g.id, showname: g.content }))
// helpfulTitle: getLabel(563420, "提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;")
};
+ } else if (getKey(o) === "salaryMonthStr") {
+ return {
+ ...o,
+ label: sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月")
+ };
}
return { ...o };
})
@@ -58,7 +65,9 @@ class Index extends Component {
if (f.isValid) {
const payload = declareForm.getFormParams();
this.setState({ loading: true });
- saveDeclare({ ...payload }).then(({ status, errormsg }) => {
+ saveDeclare({
+ ...payload, taxCycle: `${payload.salaryMonthStr}-01`, salaryDate: `${payload.salaryMonthStr}-01`
+ }).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success(getLabel(30700, "操作成功"));
diff --git a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
index cdfe5a73..91a1a88f 100644
--- a/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
+++ b/pc4mobx/hrmSalary/pages/declare/generateDeclarationDetail.js
@@ -1,27 +1,24 @@
import React from "react";
-import CustomTab from "../../components/customTab";
import { inject, observer } from "mobx-react";
+import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
import { getQueryString } from "../../util/url";
import * as API from "../../apis/declare";
import { Button } from "antd";
-import UnifiedTable from "../../components/UnifiedTable";
import "./index.less";
+const { getLabel } = WeaLocaleProvider;
@inject("taxAgentStore")
@observer
export default class GenerateDeclarationDetail extends React.Component {
constructor(props) {
super(props);
this.state = {
- loading: false,
- dataSource: [],
- columns: [],
- pageInfo: { current: 1, pageSize: 10, total: 0 },
- declareInfo: {}
+ loading: false, dataSource: [], columns: [], declareInfo: {},
+ pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
- componentWillMount() {
+ componentDidMount() {
this.getDetailList();
this.getDeclareInfo();
}
@@ -37,31 +34,19 @@ export default class GenerateDeclarationDetail extends React.Component {
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
this.setState({
- dataSource,
- pageInfo: {
- ...pageInfo,
- current, pageSize, total
- },
+ dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
columns: _.map(_.filter(columns, it => it.dataIndex !== "jobNum"), item => {
if (item.dataIndex === "username") {
return {
- ...item,
- render: (text, record) => {
- return
window.pointerXY(e)}
- title={text}
- >
- {text}
- ;
- }
+ ...item, width: 180,
+ render: (text, record) => (
window.pointerXY(e)}
+ title={text}>{text})
};
}
return {
- ...item,
- render: (text) => {
- return
{text};
- }
+ ...item, width: (item.dataIndex === "cardType" || item.dataIndex === "cardNum") ? 180 : 100,
+ render: (text) => (
{text})
};
})
});
@@ -78,26 +63,19 @@ export default class GenerateDeclarationDetail extends React.Component {
const url = `${window.location.origin}/api/bs/hrmsalary/taxdeclaration/export?taxDeclarationId=${getQueryString("id")}`;
window.open(url, "_self");
};
+ renderTitle = () => {
+ const { declareInfo } = this.state;
+ return (
+ {getLabel(111, "薪资所属月")}:{declareInfo.salaryMonth}
+ {getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}
+ );
+ };
render() {
- const { declareInfo, loading, pageInfo, columns, dataSource } = this.state;
+ const { loading, pageInfo, columns, dataSource } = this.state;
const { taxAgentStore: { showOperateBtn } } = this.props;
-
- const renderRightOperation = () => {
- return (
-
-
-
- );
- };
- const renderLeftOperation = () => {
- return (
-
- 薪资所属月:{declareInfo.salaryMonth}
- 个税扣缴义务人:{declareInfo.taxAgentName}
-
- );
- };
+ const buttons = showOperateBtn ? [
] : [];
const pagination = {
...pageInfo,
showTotal: (total) => `共 ${total} 条`,
@@ -115,23 +93,12 @@ export default class GenerateDeclarationDetail extends React.Component {
}, () => this.getDetailList());
}
};
- return (
-
-
-
-
-
+ return (
} iconBgcolor="#F14A2D"
+ buttons={buttons}>
+
+
- );
+ );
}
}
diff --git a/pc4mobx/hrmSalary/pages/declare/index.less b/pc4mobx/hrmSalary/pages/declare/index.less
index 52564e0a..01b8fd58 100644
--- a/pc4mobx/hrmSalary/pages/declare/index.less
+++ b/pc4mobx/hrmSalary/pages/declare/index.less
@@ -1,10 +1,10 @@
-.generateDeclarationDetail {
- .tabWrapper{
- padding-left: 10px
- }
- .tableWrapper {
- height: calc(100vh - 48px);
- overflow: auto;
+.declare-detail-table-container {
+ height: 100%;
+ background: #f6f6f6;
+ padding: 8px 16px;
+
+ .wea-new-table {
+ background: #FFF;
}
}
@@ -34,7 +34,8 @@
.declare-body {
height: 100%;
width: 100%;
- padding: 16px;
+ padding: 8px 16px 0 16px;
+ background: #F6F6F6;
overflow-y: auto;
.wea-new-table {
diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js
index ad3cd14a..840da963 100644
--- a/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js
+++ b/pc4mobx/hrmSalary/pages/fieldManagement/components/fieldTable.js
@@ -127,7 +127,7 @@ class FieldTable extends Component {
pagination={pagination}
loading={loading}
columns={this.getColumns()}
- scroll={{ y: "calc(100vh - 152px)" }}
+ scroll={{ y: "calc(100vh - 175px)" }}
/>
);
}
diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/index.js b/pc4mobx/hrmSalary/pages/fieldManagement/index.js
index 65da711e..b0d483c9 100644
--- a/pc4mobx/hrmSalary/pages/fieldManagement/index.js
+++ b/pc4mobx/hrmSalary/pages/fieldManagement/index.js
@@ -99,7 +99,7 @@ class FieldManagement extends Component {
];
return (
} iconBgcolor="#F14A2D"
+ title="字段管理" icon={
} iconBgcolor="#F14A2D" className="fieldManageWrapper"
buttons={(showSalaryItemBtn || showOperateBtn) ? btns : btns.slice(-1)}
showDropIcon onDropMenuClick={this.onDropMenuClick}
dropMenuDatas={[
@@ -109,26 +109,23 @@ class FieldManagement extends Component {
}
]}
>
-
- this.handleDeleteField([record.id])}
- onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
- />
- this.setState({
- slideparams: {
- ...slideparams,
- record: { ...slideparams.record, ...record }
- }
- })}
- onCancel={this.handleResetField}
- onRefreshList={() => this.setState({ doSearch: !doSearch })}
- />
- {/*操作日志*/}
- this.setState({ logDialogVisible: false })}/>
-
+
this.handleDeleteField([record.id])}
+ onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
+ this.setState({
+ slideparams: {
+ ...slideparams,
+ record: { ...slideparams.record, ...record }
+ }
+ })}
+ onCancel={this.handleResetField}
+ onRefreshList={() => this.setState({ doSearch: !doSearch })}
+ />
+ {/*操作日志*/}
+ this.setState({ logDialogVisible: false })}/>
);
}
diff --git a/pc4mobx/hrmSalary/pages/fieldManagement/index.less b/pc4mobx/hrmSalary/pages/fieldManagement/index.less
index 4053721e..3fefa7cc 100644
--- a/pc4mobx/hrmSalary/pages/fieldManagement/index.less
+++ b/pc4mobx/hrmSalary/pages/fieldManagement/index.less
@@ -1,3 +1,15 @@
+
+.fieldManageWrapper {
+ .wea-new-top-content {
+ background: #F6F6F6;
+ padding: 8px 16px 0 16px;
+ }
+
+ .wea-new-table {
+ background: #FFF;
+ }
+}
+
.slideOuterWrapper {
.wea-form-item-group {
margin: 16px;
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
index ba7c1af7..83b19a8e 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/index.less
@@ -41,6 +41,10 @@
.baseSettingWrapper {
padding: 12px 12px 12px 20px;
+ .wea-form-item-wrapper {
+ display: inline-block !important;
+ }
+
.baseSettingLeft {
border: 1px solid #ebedf0;
padding: 0 !important;
@@ -249,7 +253,7 @@
padding: 0;
background: transparent;
border: none;
- font-size: 20px;
+ font-size: 20px !important;
line-height: 20px;
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAccountApprRule.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAccountApprRule.js
new file mode 100644
index 00000000..1a19b304
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAccountApprRule.js
@@ -0,0 +1,162 @@
+/*
+ * Author: 黎永顺
+ * name: 薪资核算规则配置
+ * Description:
+ * Date: 2024/4/24
+ */
+import React, { Component } from "react";
+import { WeaSwitch } from "comsMobx";
+import { inject, observer } from "mobx-react";
+import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
+import LedgerAccountSalaryItemsSet from "./ledgerAccountSalaryItemsSet";
+import * as API from "../../../apis/ledger";
+import { acctApprRulesConditions } from "../config";
+
+const getLabel = WeaLocaleProvider.getLabel;
+const getKey = WeaTools.getKey;
+
+@inject("ledgerStore")
+@observer
+class LedgerAccountApprRule extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ conditions: [], approvalId: "", approvalItemGroup: []
+ };
+ }
+
+ componentDidMount() {
+ this.init();
+ }
+
+ init = () => {
+ const { saveSalarySobId, editId } = this.props;
+ API.getSalaryApprovalForm({ salarySobId: editId || saveSalarySobId }).then(({ status, data }) => {
+ if (status) {
+ this.setState({
+ approvalId: data.id,
+ approvalItemGroup: _.map(data.approvalItemGroup, item => ({
+ ...item, id: String(item.sorted),
+ approvalItems: _.map(item.approvalItems, o => ({ ...o, id: `${String(item.sorted)}-${String(o.sorted)}` }))
+ })),
+ conditions: _.map(acctApprRulesConditions, item => ({
+ ...item, items: _.map(item.items, o => ({
+ ...o, value: getKey(o) === "isOpenApproval" ? (data[getKey(o)] ? "1" : "0") : data[getKey(o)],
+ viewAttr: getKey(o) === "approvalWorkflowUrl" ? (data["isOpenApproval"] ? 3 : 2) : o.viewAttr,
+ hide: getKey(o) !== "isOpenApproval" ? !data["isOpenApproval"] : false,
+ label: getLabel(o.lanId, o.label)
+ }))
+ }))
+ }, () => {
+ const { ledgerStore: { AARForm } } = this.props;
+ AARForm.initFormFields(this.state.conditions);
+ });
+ }
+ });
+ };
+
+ componentWillUnmount() {
+ const { ledgerStore: { initAARForm } } = this.props;
+ initAARForm();
+ }
+
+ renderForm = (form, conditions) => {
+ const { saveSalarySobId, editId } = this.props;
+ const { approvalItemGroup } = this.state;
+ const { isFormInit } = form;
+ const formParams = form.getFormParams();
+ let group = [];
+ isFormInit && conditions && conditions.map(c => {
+ let items = [];
+ c.items.map(fields => {
+ if (getKey(fields) !== "approvalItemGroup") {
+ items.push({
+ com: (
+
+
+ ),
+ hide: fields.hide
+ });
+ } else {
+ items.push({
+ com: (
+
+ this.setState({
+ approvalItemGroup: _.map(approvalItemGroup, o => ({
+ ...o,
+ approvalItems: (groupId === o.id && !_.isEmpty(items)) ? [...o.approvalItems, ..._.map(items, (k, ki) => ({
+ salaryItemId: k.id, salaryItemName: k.name,
+ id: `${String(o.sorted)}-${String(o.approvalItems.length + ki)}`
+ }))] : o.approvalItems
+ }))
+ }, () => form.updateFields({ approvalItemGroup: { value: this.state.approvalItemGroup } }))}
+ onEdit={(groupName, groupId) => this.setState({
+ approvalItemGroup: groupId ? _.map(approvalItemGroup, o => ({
+ ...o, groupName: groupId === o.id ? groupName : o.groupName
+ })) : [{
+ approvalItems: [], groupName, id: String(approvalItemGroup.length)
+ }, ...approvalItemGroup]
+ }, () => form.updateFields({ approvalItemGroup: { value: this.state.approvalItemGroup } }))}
+ onDelete={(group, item) => this.setState({
+ approvalItemGroup: _.isEmpty(item) ? _.filter(approvalItemGroup, o => o.id !== group.id) :
+ _.map(approvalItemGroup, o => ({
+ ...o,
+ approvalItems: _.filter(o.approvalItems, oo => oo.id !== item.id)
+ }))
+ }, () => form.updateFields({ approvalItemGroup: { value: this.state.approvalItemGroup } }))}
+ onChange={datas => this.setState({
+ approvalItemGroup: datas
+ }, () => form.updateFields({ approvalItemGroup: { value: datas } }))}/>
+ ),
+ hide: fields.hide
+ });
+ }
+ });
+ group.push();
+ });
+ return group;
+ };
+ convertFormItemViewAttr = (viewAttr) => {
+ const { ledgerStore: { AARForm } } = this.props;
+ const { isOpenApproval } = AARForm.getFormParams();
+ this.setState({
+ conditions: _.map(this.state.conditions, item => ({
+ ...item, items: _.map(item.items, o => {
+ if (getKey(o) === "approvalWorkflowUrl") {
+ return { ...o, viewAttr, hide: isOpenApproval === "0" };
+ } else if (getKey(o) === "approvalItemGroup") {
+ return { ...o, viewAttr, hide: isOpenApproval === "0" };
+ }
+ return { ...o };
+ })
+ }))
+ });
+ };
+ handleFormItemChange = (value) => {
+ const { ledgerStore: { AARForm } } = this.props;
+ const { isOpenApproval } = AARForm.getFormParams();
+ if (_.keys(value)[0] === "isOpenApproval") {
+ this.convertFormItemViewAttr(isOpenApproval === "1" ? 3 : 2);
+ }
+ };
+
+ render() {
+ const { conditions } = this.state;
+ const { ledgerStore: { AARForm } } = this.props;
+ return (
+
+ {this.renderForm(AARForm, conditions)}
+
+ );
+ }
+}
+
+export default LedgerAccountApprRule;
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAccountApprRuleClassifyNameEditDialog.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAccountApprRuleClassifyNameEditDialog.js
new file mode 100644
index 00000000..9958b727
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAccountApprRuleClassifyNameEditDialog.js
@@ -0,0 +1,70 @@
+/*
+ * Author: 黎永顺
+ * name:审批规则分类编辑
+ * Description:
+ * Date: 2024/4/25
+ */
+import React, { Component } from "react";
+import { inject, observer } from "mobx-react";
+import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
+import { Button } from "antd";
+import { getSearchs } from "../../../util";
+import { classifyConditions } from "../config";
+
+const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
+
+@inject("ledgerStore")
+@observer
+class LedgerAccountApprRuleClassifyNameEditDialog extends Component {
+ constructor(props) {
+ super(props);
+ this.state = { conditions: [] };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) this.init(nextProps);
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.ledgerStore.initAARClassifyForm();
+ }
+
+ init = (props) => {
+ const { ledgerStore: { AARClassifyForm }, groupName, groupId } = props;
+ this.setState({
+ conditions: _.map(classifyConditions, item => ({
+ ...item,
+ items: _.map(item.items, o => ({ ...o, label: getLabel(o.lanId, o.label) }))
+ }))
+ }, () => {
+ AARClassifyForm.initFormFields(this.state.conditions);
+ groupId && AARClassifyForm.updateFields({ groupName });
+ });
+ };
+ save = () => {
+ const { ledgerStore: { AARClassifyForm }, groupId } = this.props;
+ AARClassifyForm.validateForm().then(f => {
+ if (f.isValid) {
+ this.props.onCancel();
+ this.props.onEdit(AARClassifyForm.getFormParams().groupName, groupId);
+ } else {
+ f.showErrors();
+ }
+ });
+ };
+
+ render() {
+ const { conditions } = this.state;
+ const { ledgerStore: { AARClassifyForm } } = this.props;
+ return (
+ {getLabel(537558, "保存")}
+ ]}
+ >
+ {getSearchs(AARClassifyForm, conditions, 1, false)}
+
+ );
+ }
+}
+
+export default LedgerAccountApprRuleClassifyNameEditDialog;
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAccountSalaryItemsSet.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAccountSalaryItemsSet.js
new file mode 100644
index 00000000..1f53c37b
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAccountSalaryItemsSet.js
@@ -0,0 +1,147 @@
+/*
+ * Author: 黎永顺
+ * name: 薪资核算规则配置-审批薪资项目
+ * Description:
+ * Date: 2024/4/24
+ */
+import React, { Component } from "react";
+import { WeaButtonIcon, WeaLocaleProvider, WeaSortable, WeaTransfer } from "ecCom";
+import LedgerAccountApprRuleClassifyNameEditDialog from "./ledgerAccountApprRuleClassifyNameEditDialog";
+import * as API from "../../../apis/ledger";
+import { Icon, Modal } from "antd";
+import cs from "classnames";
+import SalaryItemModal from "../../payroll/stepForm/salaryItemModal";
+
+const getLabel = WeaLocaleProvider.getLabel;
+
+class LedgerAccountSalaryItemsSet extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ editDialog: { visible: false, groupName: "", groupId: "", title: "" },
+ salaryItemDialog: { visible: false, title: getLabel(111, "薪资项目项"), options: [], groupId: "" }
+ };
+ }
+
+ handleDeleteClick = (group, item = {}) => {
+ Modal.confirm({
+ title: getLabel(131329, "信息确认"),
+ content: getLabel(543231, "确认删除本条数据吗?"),
+ onOk: () => this.props.onDelete(group, item)
+ });
+ };
+ handleAddSalaryItems = (group) => {
+ const { salaryItemDialog } = this.state;
+ const { salarySobId, datas } = this.props;
+ const payload = {
+ salarySobId, excludeIds: _.reduce(datas, (pre, cur) => {
+ return pre.concat(_.map(cur.approvalItems, o => o.salaryItemId));
+ }, [])
+ };
+ API.getListSalaryItem(payload).then(({ status, data }) => {
+ if (status) this.setState({
+ salaryItemDialog: {
+ ...salaryItemDialog, visible: true, options: data, groupId: group.id
+ }
+ });
+ });
+ };
+ handleConfirm = () => {
+ const { salaryItemDialog } = this.state;
+ this.setState({
+ salaryItemDialog: { ...salaryItemDialog, visible: false }
+ }, () => this.props.onAddItems(salaryItemDialog.groupId, _.filter(this.state.salaryItemDialog.options, g => g.checkedSalaryItem)));
+ };
+
+ render() {
+ const { editDialog, salaryItemDialog } = this.state;
+ const { datas } = this.props;
+ return (
+
+
+ this.setState({
+ editDialog: { visible: true, title: getLabel(111, "添加分类") }
+ })}/>
+
+
+
+
this.props.onChange(list)}
+ renderNodeItem={(item) => {
+ return
+
+
+ {item.groupName}
+
+ this.setState({
+ editDialog: {
+ visible: true, groupName: item.groupName, groupId: item.id, title: getLabel(111, "分类名称编辑")
+ }
+ })}/>
+ this.handleDeleteClick(item)}/>
+
+
+ this.handleAddSalaryItems(item)}/>
+
+
+ {
+ !_.isEmpty(item.approvalItems) ?
+
this.props.onChange(
+ _.map(datas, child => {
+ if (child.id === item.id) {
+ return { ...child, approvalItems: items };
+ }
+ return { ...child };
+ })
+ )}
+ renderNodeItem={(filed) => {
+ return
+
+
{filed.salaryItemName}
+
this.handleDeleteClick(item, filed)}/>
+
+
;
+ }}
+ className="wea-sortable-salary-item"
+ /> :
+ 暂无数据
+ }
+
+
;
+ }}
+ className="wea-sortable-salary-item"
+ />
+ this.setState({
+ editDialog: { ...editDialog, visible: false }
+ })}/>
+ this.setState({
+ salaryItemDialog: { ...salaryItemDialog, visible: false }
+ })} onConfirm={this.handleConfirm}>
+
+ g.checkedSalaryItem), o => o.id)}
+ onChange={v => {
+ this.setState({
+ salaryItemDialog: {
+ ...salaryItemDialog,
+ options: _.map(salaryItemDialog.options, o => ({ ...o, checkedSalaryItem: _.includes(v, o.id) }))
+ }
+ });
+ }}
+ />
+
+
+
+
+ );
+ }
+}
+
+export default LedgerAccountSalaryItemsSet;
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js
index 8b7af5a4..905c2f3b 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerAssociatedPersonnel.js
@@ -13,6 +13,7 @@ import PersonalScopeModal from "../../../components/PersonalScopeModal";
import {
deleteLedgerPersonExtRange,
deleteLedgerPersonRange,
+ editLedgerPersonRange,
getLedgerPersonRangeExclude,
getLedgerPersonRangeExtList,
getLedgerPersonRangeInclude,
@@ -32,7 +33,8 @@ const APIFox = {
externalList: getLedgerPersonRangeExtList
};
const APISaveFox = {
- save: saveLedgerPersonRange
+ save: saveLedgerPersonRange,
+ edit: editLedgerPersonRange
};
@inject("taxAgentStore")
@@ -55,7 +57,8 @@ class LedgerAssociatedPersonnel extends Component {
personalAddModal: {
visible: false,
title: "关联人员",
- includeType: ""
+ includeType: "",
+ record: {}
},
extEmpsWitch: "1" //非系统人员开关, 1: 开启, 0:关闭
};
@@ -157,7 +160,7 @@ class LedgerAssociatedPersonnel extends Component {
* Params:
* Date: 2022/11/30
*/
- handleAddPersonal = () => {
+ handleAddPersonal = (record = {}) => {
const { personalAddModal, selectedKey } = this.state;
if (selectedKey === "externalList") {
this.setState({ externalPersonModalVisible: true });
@@ -165,7 +168,7 @@ class LedgerAssociatedPersonnel extends Component {
this.setState({
personalAddModal: {
...personalAddModal,
- visible: true,
+ visible: true, record,
includeType: selectedKey === "listInclude" ? 1 : 0
}
});
@@ -256,7 +259,7 @@ class LedgerAssociatedPersonnel extends Component {
disabled={_.isEmpty(rowKeys)}
onClick={this.taxAgentRangeDelete}
/>,
- ,
+ this.handleAddPersonal()}/>,
this.setState({ rowKeys })}
+ onEditScope={this.handleAddPersonal}
/>
{/*关联人员范围导入*/}
{importParams.visible && (
@@ -336,9 +341,7 @@ class LedgerAssociatedPersonnel extends Component {
onCancel={() =>
this.setState({
personalAddModal: {
- ...personalAddModal,
- visible: false,
- includeType: ""
+ ...personalAddModal, record: {}, includeType: "", visible: false
}
})
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js
index af75ac82..8a333ea5 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerMovoTo.js
@@ -18,10 +18,8 @@ class LedgerMovoTo extends Component {
];
return (
+ {...extraProps} buttons={buttons} hasScroll initLoadCss className="moveModalWrapper"
+ style={{ width: 440, height: Math.ceil((dataList.length - 1) / 3) * 25 + 41 }}>
item.showname === "未分类")}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
index 66134f24..65912404 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItem.js
@@ -254,20 +254,19 @@ class LedgerSalaryItem extends Component {
* Params:
* Date: 2022/12/14
*/
- handleAddSalaryItems = (id, items) => {
+ handleAddSalaryItems = (id, items, insertId) => {
const { itemGroups } = this.state;
this.setState({
itemGroups: _.map(itemGroups, it => {
if (id === it.uuid) {
+ items = _.map(items, child => {
+ const { id: itemsId, ...extraItems } = child;
+ return { ...extraItems, salaryItemGroupId: it.uuid };
+ });
+ if (insertId) it.items.splice(_.findIndex(it.items, k => (k.id === insertId) || (k.key === insertId)) + 1, 0, ...items);
return {
- ...it, items: _.map([..._.map(items, child => {
- const { id: itemsId, ...extraItems } = child;
- return { ...extraItems, salaryItemGroupId: it.uuid };
- }), ...it.items], (childItem, childItemIndex) => {
- return {
- ...childItem,
- sortedIndex: childItemIndex
- };
+ ...it, items: _.map(insertId ? it.items : [...items, ...it.items], (childItem, childItemIndex) => {
+ return { ...childItem, sortedIndex: childItemIndex };
})
};
}
@@ -319,7 +318,7 @@ class LedgerSalaryItem extends Component {
items: [...it.items, {
...extraItems,
salaryItemGroupId: moveToItemId,
- key: moveId,
+ key: moveId ? moveId : items.key,
sortedIndex: !_.isEmpty(it.items) ? it.items[it.items.length - 1].sortedIndex + 1 : 0
}]
};
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
index 774269f5..7830fbe5 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemAddModal.js
@@ -1,25 +1,15 @@
import React from "react";
-import { Button, Switch } from "antd";
-import { WeaDialog, WeaInputSearch, WeaTable } from "ecCom";
+import { Button, Spin } from "antd";
+import { WeaCheckbox, WeaDialog, WeaInputSearch, WeaLocaleProvider, WeaTable } from "ecCom";
import { listSalaryItem } from "../../../apis/ledger";
+const getLabel = WeaLocaleProvider.getLabel;
export default class LedgerSalaryItemAddModal extends React.Component {
constructor(props) {
super(props);
this.state = {
- loading: {
- query: false
- },
- name: "",
- selectedRowKeys: [],
- dataSource: [],
- dataSourceCopy: [],
- columns: [],
- pageInfo: {
- current: 1,
- pageSize: 10,
- total: 0
- }
+ loading: { query: false }, name: "", selectedRowKeys: [], dataSource: [],
+ dataSourceCopy: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
@@ -42,12 +32,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
excludeIds.push(i.salaryItemId);
});
});
- const payload = {
- excludeIds,
- name,
- ...pageInfo,
- ...extra
- };
+ const payload = { excludeIds, name, ...pageInfo, ...extra };
this.setState({ loading: { ...loading, query: true } });
listSalaryItem(payload).then(({ status, data }) => {
this.setState({ loading: { ...loading, query: false } });
@@ -56,9 +41,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
const tmpV = !_.isEmpty(dataSource) ? dataSource : [];
this.setState({
dataSourceCopy: [...dataSourceCopy, ...tmpV],
- pageInfo: { ...pageInfo, current, pageSize, total },
- dataSource: tmpV,
- columns
+ pageInfo: { ...pageInfo, current, pageSize, total }, dataSource: tmpV, columns
});
}
}).catch(() => {
@@ -76,7 +59,7 @@ export default class LedgerSalaryItemAddModal extends React.Component {
case "useDefault":
case "hideDefault":
case "useInEmployeeSalary":
- return ;
+ return ;
default:
return ;
}
@@ -85,10 +68,9 @@ export default class LedgerSalaryItemAddModal extends React.Component {
});
return newColumns;
};
-
handleAdd = () => {
const { dataSourceCopy, selectedRowKeys } = this.state;
- const { onAddSalaryItems, id, onCancel, itemGroups } = this.props;
+ const { onAddSalaryItems, id, onCancel, itemGroups, record } = this.props;
const arrItems = _.find(itemGroups, it => it.uuid === id).items || [];
let selectItems = [];
_.uniqWith(dataSourceCopy, _.isEqual).map((item) => {
@@ -104,54 +86,53 @@ export default class LedgerSalaryItemAddModal extends React.Component {
});
});
onCancel();
- onAddSalaryItems(id, selectItems);
+ onAddSalaryItems(id, selectItems, record.id || record.key);
+ };
+ renderTitle = () => {
+ const { name, pageInfo } = this.state;
+ return
+ {getLabel(111, "添加薪资项目")}
+ this.setState({ name: val })} style={{ width: 200 }}
+ placeholder={getLabel(111, "请输入薪资项目名称")} onSearch={() => this.setState({
+ pageInfo: { ...pageInfo, current: 1 }
+ }, () => this.listSalaryItem())}/>
+
;
};
render() {
- const { onCancel, visible } = this.props;
- const { name, selectedRowKeys, pageInfo, dataSource, loading } = this.state;
+ const { selectedRowKeys, pageInfo, dataSource, loading } = this.state;
const pagination = {
...pageInfo,
showTotal: total => `共 ${total} 条`,
showQuickJumper: true,
+ showSizeChanger: true,
pageSizeOptions: ["10", "20", "50", "100"],
+ onShowSizeChange: (current, pageSize) => {
+ this.setState({ pageInfo: { ...pageInfo, current: 1, pageSize } }, () => this.listSalaryItem());
+ },
onChange: current => {
- this.setState({
- pageInfo: { ...pageInfo, current }
- }, () => {
- this.listSalaryItem();
- });
+ this.setState({ pageInfo: { ...pageInfo, current } }, () => this.listSalaryItem());
}
};
const rowSelection = {
- selectedRowKeys,
- onChange: (selectedRowKeys) => {
- this.setState({ selectedRowKeys }, () => {
- });
- }
+ selectedRowKeys, onChange: (selectedRowKeys) => this.setState({ selectedRowKeys })
};
return (
- 添加]}
- >
-
-
this.setState({ name })}
- onSearch={() => this.listSalaryItem({ current: 1 })}
- />
+ this.sysItemRef = dom}
+ title={this.renderTitle()}
+ buttons={[]}
+ style={{
+ width: "60vw", height: 600, minHeight: 200, minWidth: 380,
+ maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
+ }}>
+
+
+ record.id || record.key} rowSelection={rowSelection}/>
+
- record.id || record.key}
- rowSelection={rowSelection}
- dataSource={dataSource}
- pagination={pagination}
- loading={loading.query}
- columns={this.getSalaryItemAddColumns()}
- />
);
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js
index e2b191ae..6db6e575 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemBaseInfo.js
@@ -46,7 +46,7 @@ class LedgerSalaryItemBaseInfo extends Component {
};
handleDeleteEmplist = (item) => {
const { dataSource, onChangeSortableList } = this.props;
- onChangeSortableList(_.xorWith(dataSource, [item], _.isEqual));
+ onChangeSortableList(_.filter(dataSource, o => o.id !== item.id));
};
render() {
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
index 2e48ba54..af8cd59d 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemNormal.js
@@ -22,7 +22,7 @@ class LedgerSalaryItemNormal extends Component {
constructor(props) {
super(props);
this.state = {
- addCategoryItemsVisible: false,
+ addCategoryItemsVisible: { visible: false, id: "", record: {} },
categoryModal: {
visible: false,
title: "新增分类",
@@ -170,7 +170,11 @@ class LedgerSalaryItemNormal extends Component {
onEditCategory={this.handleAddCategory}
onDeleteCategory={this.handleDeleteCategory}
onDeleteCategoryItems={this.handleDeleteCategoryItems}
- onAddCategoryItems={(id) => this.setState({ addCategoryItemsVisible: { visible: true, id } })}
+ onAddCategoryItems={(id) => this.setState({
+ addCategoryItemsVisible: {
+ ...addCategoryItemsVisible, visible: true, id
+ }
+ })}
onUpgo={this.handleUpgo}
onDowngo={this.handleDowngo}
/>
@@ -178,13 +182,16 @@ class LedgerSalaryItemNormal extends Component {
>
childItem.id === id || childItem.uuid === uuid).items}
+ dataSource={_.find(dataSource, childItem => childItem.uuid === uuid).items}
salarySobId={editId || saveSalarySobId}
selectedRowKeys={field.selectedRowKeys || []}
onDropCategoryItem={(data) => onDropCategoryItem(field, data)}
onHandleItemhide={(data) => onHandleItemhide(field, data)}
onChangeSelectedRowKeys={(data) => onChangeSelectedRowKeys(field, data)}
onMoveTo={this.handleMoveTo}
+ onAddCategoryItems={(record) => this.setState({
+ addCategoryItemsVisible: { visible: true, record, id: uuid }
+ })}
/>
;
})
@@ -198,7 +205,7 @@ class LedgerSalaryItemNormal extends Component {
this.setState({ addCategoryItemsVisible: { visible: false, id: "" } })}
+ onCancel={() => this.setState({ addCategoryItemsVisible: { visible: false, id: "", record: {} } })}
onAddSalaryItems={onAddSalaryItems}
/>
{
onDeleteCategory(uuid)}/>
}
{
- sortedIndex !== 0 && showOperateBtn &&
+ name !== getLabel(111, "未分类") && sortedIndex !== 0 && showOperateBtn &&
onUpgo(sortedIndex)}/>
}
{
- sortedIndex !== dataSourceLen - 1 && showOperateBtn &&
+ name !== getLabel(111, "未分类") && sortedIndex !== dataSourceLen - 2 && showOperateBtn &&
onDowngo(sortedIndex)}/>
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
index 838f44a0..4f126ef9 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSalaryItemTable.js
@@ -128,8 +128,10 @@ class LedgerSalaryItemTable extends Component {
formulaContent, formulaId, name,
hideDefault: _.isNil(hideDefault) ? "0" : hideDefault,
valueType, roundingMode, pattern,
- originFormulaContent, originSqlContent,
- useInEmployeeSalary: !_.isNil(useInEmployeeSalary) ? useInEmployeeSalary : "0"
+ useInEmployeeSalary: !_.isNil(useInEmployeeSalary) ? useInEmployeeSalary : "0",
+ //不能改成其他空值
+ originFormulaContent: _.isNil(originFormulaContent) ? formulaContent : originFormulaContent,
+ originSqlContent: _.isNil(originSqlContent) ? formulaContent : originSqlContent
},
record,
userStatusList: _.map(userStatusList, it => ({ key: it.value.toString(), showname: it.defaultLabel }))
@@ -173,7 +175,7 @@ class LedgerSalaryItemTable extends Component {
this.setState({
editFormulModal: {
...editFormulModal, visible: true, valueType, dataType, name: salaryItemName,
- formulaId: ((valueType.toString() === "2" && (originFormulaContent || originFormulaContent !== " ")) || valueType.toString() === "3" && (originSqlContent || originSqlContent === " ")) ? formulaId : ""
+ formulaId: ((valueType.toString() === "2" && (originFormulaContent || originFormulaContent !== " ")) || valueType.toString() === "3" && (originSqlContent || originSqlContent !== " ")) ? formulaId : ""
}
});
};
@@ -288,18 +290,22 @@ class LedgerSalaryItemTable extends Component {
width: 80,
render: (text, record) => this.handleChangeItem(value, record.id || record.key)}
+ onChange={value => {
+ this.handleChangeItem(value, record.id || record.key);
+ }}
/>
},
{
title: "操作",
dataIndex: "operate",
key: "operate",
- width: 120,
+ width: 180,
render: (_, record) => (
this.handleEditSalaryItem(record)}
style={{ marginRight: 10 }}>编辑
+ this.props.onAddCategoryItems(record)}
+ style={{ marginRight: 10 }}>{getLabel(111, "插入")}
onMoveTo(record)}>移动到
)
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSearchComp.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSearchComp.js
index a95d9048..821ba416 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSearchComp.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSearchComp.js
@@ -15,8 +15,7 @@ import { getTaxAgentSelectList } from "../../../apis/taxAgent";
const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
-@inject("ledgerStore")
-@observer
+@inject("ledgerStore") @observer
class LedgerSearchComp extends Component {
constructor(props) {
super(props);
@@ -36,14 +35,11 @@ class LedgerSearchComp extends Component {
this.setState({
conditions: _.map(searchConditions, o => {
return {
- ...o,
- items: _.map(o.items, j => {
+ ...o, items: _.map(o.items, j => {
if (getKey(j) === "taxAgentId") {
return {
- ...j,
- options: [{ key: "", showname: getLabel(332, "全部") }, ..._.map(data, g => ({
- key: g.id,
- showname: g.content
+ ...j, options: [{ key: "", showname: getLabel(332, "全部") }, ..._.map(data, g => ({
+ key: g.id, showname: g.content
}))]
};
}
@@ -62,19 +58,16 @@ class LedgerSearchComp extends Component {
let items = [];
c.items.map(fields => {
items.push({
- com: (
-
-
- ),
- colSpan: 2
+ com: (
+
+ ), colSpan: 2
});
});
- group.push(
- );
+ group.push();
});
return group;
};
@@ -82,12 +75,7 @@ class LedgerSearchComp extends Component {
render() {
const { conditions } = this.state;
const { ledgerStore: { searchForm } } = this.props;
- return (
-
- {this.formRender(searchForm, conditions)}
-
-
- );
+ return ({this.formRender(searchForm, conditions)}
);
}
}
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
index ab4af5ba..c5ead666 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/components/ledgerSlide.js
@@ -13,9 +13,11 @@ import LedgerAssociatedPersonnel from "./ledgerAssociatedPersonnel";
import LedgerSalaryAdjustmentRules from "./ledgerSalaryAdjustmentRules";
import LedgerBackCalculatedSalaryItem from "./ledgerBackCalculatedSalaryItem";
import LedgerSalaryItem from "./ledgerSalaryItem";
+import LedgerAccountApprRule from "./ledgerAccountApprRule";
import WeaTopTitle from "../../../components/custom-title/weaTopTitle";
import WeaReqTitle from "../../../components/custom-title/weaReqTitle";
-import { saveAdjustmentRule, saveLedgerBasic, saveLedgerItem } from "../../../apis/ledger";
+import { salaryApprovalSaveForm, saveAdjustmentRule, saveLedgerBasic, saveLedgerItem } from "../../../apis/ledger";
+import { sysConfCodeRule } from "../../../apis/ruleconfig";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
@@ -28,10 +30,18 @@ class LedgerSlide extends Component {
super(props);
this.state = {
current: 0, loading: false, baseSettingInfo: {}, adjustRules: [],
- empFields: [], itemGroups: [], saveSalarySobId: ""
+ empFields: [], itemGroups: [], saveSalarySobId: "",
+ salaryApprovalStatus: false
};
}
+ async componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) {
+ const { data } = await sysConfCodeRule({ code: "SALARY_APPROVAL_STATUS" });
+ this.setState({ salaryApprovalStatus: data === "1" });
+ }
+ }
+
componentWillUnmount() {
this.setState({
saveSalarySobId: ""
@@ -76,7 +86,7 @@ class LedgerSlide extends Component {
* Date: 2022/12/12
*/
saveLedgerAdjustRule = () => {
- const { adjustRules, saveSalarySobId } = this.state;
+ const { adjustRules, saveSalarySobId, salaryApprovalStatus } = this.state;
const payload = {
salarySobId: this.props.editId || saveSalarySobId,
ruleParams: adjustRules
@@ -86,7 +96,7 @@ class LedgerSlide extends Component {
this.setState({ loading: false });
if (status) {
message.success("保存成功");
- this.handleClose();
+ !salaryApprovalStatus && this.handleClose();
} else {
message.success(errormsg || "保存失败");
}
@@ -106,9 +116,9 @@ class LedgerSlide extends Component {
if (!it.salarySobId) delete it.id;
return { ...it };
}),
- itemGroups: _.map(_.filter(itemGroups, it => it.name !== "未分类"), item => {
+ itemGroups: _.map(_.filter(itemGroups, it => it.name !== "未分类"), (item, index) => {
return {
- ...item,
+ ...item, sortedIndex: index,
items: _.map(item.items, it => {
delete it.originFormulaContent;
delete it.originSqlContent;
@@ -151,9 +161,45 @@ class LedgerSlide extends Component {
*/
handleSaveSalaryItemParams = (empFields, itemGroups) => this.setState({ empFields, itemGroups });
+ handleDefaultSave = () => {
+ const { saveSalarySobId } = this.state;
+ const { state: { approvalId } } = this.approRef.wrappedInstance;
+ const { ledgerStore: { AARForm } } = this.props;
+ const { approvalItemGroup, isOpenApproval, ...extra } = AARForm.getFormParams();
+ const group = _.map(approvalItemGroup, (item, index) => ({
+ groupName: item.groupName, sorted: index,
+ approvalItems: _.map(item.approvalItems, (o, oi) => ({
+ salaryItemId: o.salaryItemId, sorted: oi,
+ salaryItemName: o.salaryItemName
+ }))
+ }));
+ if (isOpenApproval === "1" && _.isEmpty(extra.approvalWorkflowUrl)) {
+ AARForm.showError("approvalWorkflowUrl", getLabel(111, "\"审批流程地址\"未填写"));
+ return;
+ } else if (isOpenApproval === "1" && _.isEmpty(group)) {
+ AARForm.showError("approvalItemGroup", getLabel(111, "\"审批薪资项目\"未填写"));
+ return;
+ }
+ const payload = {
+ ...extra, isOpenApproval: isOpenApproval === "1", id: approvalId,
+ salarySobId: this.props.editId || saveSalarySobId,
+ approvalItemGroup: group
+ };
+ this.setState({ loading: true });
+ salaryApprovalSaveForm(payload).then(({ status, errormsg }) => {
+ this.setState({ loading: false });
+ if (status) {
+ message.success(getLabel(111, "保存成功!"));
+ saveSalarySobId && this.handleClose();
+ } else {
+ message.error(errormsg);
+ }
+ });
+ };
+
render() {
const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
- const { current, saveSalarySobId, loading } = this.state;
+ const { current, saveSalarySobId, loading, salaryApprovalStatus } = this.state;
let tabs = [
{
key: 0, title: getLabel(82751, "基础设置"),
@@ -210,9 +256,11 @@ class LedgerSlide extends Component {
{
key: 4, title: getLabel(543469, "调薪计薪规则"),
createBtns: [
+ ,
,
-
+
],
editBtns: [
,
+ this.setState({ slideparams: { ...slideparams, visible: true } })}>
+ {getLabel(111, "新建")}
+ ,
this.setState({ doSearch: !doSearch })}/>
];
return (
diff --git a/pc4mobx/hrmSalary/pages/ledgerPage/index.less b/pc4mobx/hrmSalary/pages/ledgerPage/index.less
index 182042bf..6ad92082 100644
--- a/pc4mobx/hrmSalary/pages/ledgerPage/index.less
+++ b/pc4mobx/hrmSalary/pages/ledgerPage/index.less
@@ -1,5 +1,11 @@
.ledgerWrapper {
height: 100%;
+ padding: 8px 16px 0 16px;
+ background: #F6F6F6;
+
+ .wea-new-table {
+ background: #FFF;
+ }
.tdEllipsis {
display: inline-block;
@@ -12,8 +18,6 @@
.ledgerSearch-Wrapper {
min-width: 350px;
- margin-top: 5px;
- margin-right: 70px;
position: relative;
& > button {
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/checkSecondaryVerifyDialog.js b/pc4mobx/hrmSalary/pages/mobilePayroll/checkSecondaryVerifyDialog.js
new file mode 100644
index 00000000..b7a492b5
--- /dev/null
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/checkSecondaryVerifyDialog.js
@@ -0,0 +1,93 @@
+/*
+ * 工资单查看启用二次验证弹框
+ * @Author: 黎永顺
+ * @Date: 2025/4/15
+ * @Wechat:
+ * @Email: 971387674@qq.com
+ * @description:
+*/
+import React, { Component } from "react";
+import { WeaDialog, WeaLocaleProvider } from "ecCom";
+import { WeaForm, WeaSwitch } from "comsMobx";
+import { Button, message } from "antd";
+import * as API from "../../apis/mySalaryBenefits";
+import FormInfo from "../../components/FormInfo";
+
+const getLabel = WeaLocaleProvider.getLabel;
+const form = new WeaForm();
+
+class CheckSecondaryVerifyDialog extends Component {
+ constructor(props) {
+ super(props);
+ this.state = {
+ loading: false, conditions: [], notSetting: false
+ };
+ }
+
+ componentWillReceiveProps(nextProps, nextContext) {
+ if (nextProps.visible !== this.props.visible && nextProps.visible) this.initForm();
+ if (nextProps.visible !== this.props.visible && !nextProps.visible) form.initSecVerifyform();
+ }
+
+ initForm = () => {
+ const { salaryBillToken } = this.props;
+ API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, salaryBillToken)
+ .then(({ conditions, notSetting }) => {
+ this.setState({ conditions: [{ title: "", items: conditions }], notSetting }, () => {
+ form.initFormFields(this.state.conditions);
+ });
+ });
+ };
+ save = () => {
+ const { salaryBillToken } = this.props;
+ form.validateForm().then(f => {
+ if (f.isValid) {
+ const payload = { ...form.getFormParams() };
+ API.doSecondAuth({ ...payload, mouldCode: "HRM", itemCode: "SALARY" }, salaryBillToken)
+ .then(({ status, checkStatus, checkMsg }) => {
+ if (status && checkStatus === "1") {
+ message.success(checkMsg);
+ this.props.onCancel(this.props.onSuccess);
+ } else {
+ message.error(checkMsg);
+ }
+ });
+ } else {
+ f.showErrors();
+ }
+ }).catch(() => this.setState({ loading: false }));
+ };
+
+ render() {
+ const { conditions, loading, notSetting } = this.state;
+ const itemRender = {
+ authCode: (field, textAreaProps, form, formParams) => {
+ return (
+
+ {
+ notSetting &&
+ }
+ );
+ }
+ };
+ return (
+ {getLabel(111, "确认")}
+ ]}>
+
+
+
+
+ );
+ }
+}
+
+export default CheckSecondaryVerifyDialog;
+
diff --git a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
index c6b7572a..2b1f2102 100644
--- a/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
+++ b/pc4mobx/hrmSalary/pages/mobilePayroll/index.js
@@ -11,10 +11,10 @@ import { salaryBillGetToken } from "../../apis/mySalaryBenefits";
import { confirmSalaryBill, feedBackSalaryBill } from "../../apis/payroll";
import CaptchaModal from "../../components/captchaModal";
import PassSetDialog from "./passSetDialog";
-import PCInterfaceTokenDialog from "./PCInterfaceTokenDialog";
import { ConfirmBtns } from "../mySalary/mySalaryView";
import Content from "../../components/pcTemplate/content";
import MobileTemplate from "../../components/mobileTemplate";
+import CheckSecondaryVerifyDialog from "./checkSecondaryVerifyDialog";
import "../mySalary/index.less";
const getLabel = WeaLocaleProvider.getLabel;
@@ -34,7 +34,9 @@ export default class MobilePayroll extends React.Component {
employeeInformation: {},
salaryTemplate: []
},
- salaryBillToken: {}
+ salaryBillToken: {},
+ // 统一二次验证
+ checkSecVerify: false
};
this.id = "";
}
@@ -44,17 +46,37 @@ export default class MobilePayroll extends React.Component {
this.id = getQueryString("id");
const { mySalaryStore: { init, setMySalaryBill } } = this.props;
setMySalaryBill({});
- // if (type !== "phone") {
- // const { data, status } = await payrollCheckType();
- // if (status && data === "PWD") {
- // init(false, () => this.getMySalaryBill(this.id));
- // } else {
- // this.setState({ captchaVisible: true });
- // }
- // }
+ //统一调用token
+ type !== "phone" && await this.initPC();
type === "phone" && await this.initMobile();
}
+ initPC = async () => {
+ const { mySalaryStore: { setInitEmVerify } } = this.props;
+ const params = this.getUrlkey();
+ const { data } = await salaryBillGetToken({
+ id: _.pick(params, ["id"]).id,
+ recipient: _.pick(params, ["recipient"]).recipient,
+ salaryCode: _.pick(params, ["salaryCode"]).salaryCode
+ });
+ this.setState({ salaryBillToken: data }, () => {
+ payrollCheckType(this.state.salaryBillToken).then(({ data, status }) => {
+ if (status && data === "PWD") {
+ API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
+ .then(({ status, isNeedSecondAuth }) => {
+ if (status && isNeedSecondAuth) {
+ this.setState({ checkSecVerify: true });
+ } else {
+ this.getMySalaryBill(getQueryString("id"));
+ setInitEmVerify();
+ }
+ });
+ } else {
+ this.setState({ captchaVisible: true });
+ }
+ });
+ });
+ };
initMobile = async () => {
const { mySalaryStore: { setInitEmVerify } } = this.props;
if (window.em) {
@@ -74,7 +96,11 @@ export default class MobilePayroll extends React.Component {
});
} else {
const params = this.getUrlkey();
- const { data } = await salaryBillGetToken({ uid: _.pick(params, ["recipient"]).recipient });
+ const { data } = await salaryBillGetToken({
+ id: _.pick(params, ["id"]).id,
+ recipient: _.pick(params, ["recipient"]).recipient,
+ salaryCode: _.pick(params, ["salaryCode"]).salaryCode
+ });
this.setState({ salaryBillToken: data }, () => {
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
.then(({ status, isNeedSecondAuth }) => {
@@ -177,7 +203,7 @@ export default class MobilePayroll extends React.Component {
render() {
const { mySalaryStore: { clearLoading, pwdForm, setInitEmVerify } } = this.props;
- const { salaryBillToken, visible, captchaVisible, notSetting, pwdSetVisible } = this.state;
+ const { salaryBillToken, visible, captchaVisible, notSetting, pwdSetVisible, checkSecVerify } = this.state;
const type = getQueryString("type");
if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return
this.setState({ pwdSetVisible: false })}/>
- {/* PC端接口token验证*/}
- {type !== "phone" &&
- this.setState({ salaryBillToken })}
- onCaptcha={() => this.setState({ captchaVisible: true })}
- init={() => {
- setInitEmVerify();
- this.getMySalaryBill(getQueryString("id"));
- }}/>}
+ {/*统一外部调用token*/}
+ this.setState({ checkSecVerify: false }, () => callback && callback())}
+ onSuccess={() => {
+ this.getMySalaryBill(getQueryString("id"));
+ setInitEmVerify();
+ }}/>
+ {/*发送验证码*/}
+ this.setState({ captchaVisible: false })}
+ onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
+ />
;
const {
salaryTemplate, salaryGroups, employeeInformation,
@@ -249,11 +279,6 @@ export default class MobilePayroll extends React.Component {
}
-
this.setState({ captchaVisible: false })}
- onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
- />
);
}
diff --git a/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js b/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js
index 4e746a70..16f992b3 100644
--- a/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js
+++ b/pc4mobx/hrmSalary/pages/mySalaryBenefits/components/payrollTable/index.js
@@ -46,7 +46,7 @@ class Index extends Component {
if (it.column === "salaryYearMonth" || it.column === "sendTime") {
return {
dataIndex: it.column, title: it.text, width: it.width,
- render: (__, record) => ({moment(record[it["column"]]).format("YYYY-MM")})
+ render: (__, record) => ({record[it["column"]]})
};
}
return {
diff --git a/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.less b/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.less
index 52e92374..721202f8 100644
--- a/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.less
+++ b/pc4mobx/hrmSalary/pages/mySalaryBenefits/index.less
@@ -1,4 +1,8 @@
.mySalary_wrapper {
+ .wea-new-top-req-content {
+ padding: 8px 16px;
+ }
+
.wea-transfer-list-wrapper {
border: none;
}
diff --git a/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js b/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js
index 69bac121..78a2c045 100644
--- a/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js
+++ b/pc4mobx/hrmSalary/pages/mySalaryMobile/components/payrollList/index.js
@@ -28,7 +28,7 @@ class Index extends Component {
{moment(it.sendTime).format("YYYY-MM")}
{`${getLabel(33564, "查看")}>`}
diff --git a/pc4mobx/hrmSalary/pages/payroll/index.less b/pc4mobx/hrmSalary/pages/payroll/index.less
index e0f417dd..f3809e53 100644
--- a/pc4mobx/hrmSalary/pages/payroll/index.less
+++ b/pc4mobx/hrmSalary/pages/payroll/index.less
@@ -26,6 +26,11 @@
padding: 5px 16px;
border-bottom: 1px solid #e5e5e5;
+ .wea-select {
+ width: 120px !important;
+ margin-left: 10px;
+ }
+
.wea-input-number {
width: 80px !important;
margin: 0 10px;
diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
index 8cde7da5..f140ab79 100644
--- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js
@@ -599,6 +599,7 @@ export default class PayrollGrant extends React.Component {
this.setState({ selectedKey: v }, () => {
+ this.pageInfo = { current: 1, pageSize: 10 };
getInfoList({ salarySendId: currentId, isGranted: v !== "0" });
})}
searchsBasePlaceHolder="请输入姓名" showSearchAd={grantListShowSearchAd} buttonsAd={adBtn}
@@ -652,7 +653,7 @@ export default class PayrollGrant extends React.Component {
this.pageInfo = { current, pageSize };
this.handleShowSizeChange(this.pageInfo);
}}
- scroll={{ y: `calc(100vh - 236px)` }}
+ scroll={{ y: `calc(100vh - 255px)` }}
/> : renderLoading()
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less b/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less
index ebcbbe4c..ad636d55 100644
--- a/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less
+++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/index.less
@@ -96,6 +96,10 @@
& > ul {
border: 1px solid #e5e5e5;
+ .sortable-handle {
+ display: none;
+ }
+
.wea-sortable-salary-item {
padding: 0;
margin: 0;
diff --git a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js
index 9eaa2ece..7d2edc9c 100644
--- a/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js
+++ b/pc4mobx/hrmSalary/pages/payroll/templateBaseSettings.js
@@ -106,7 +106,7 @@ class TemplateBaseSettings extends Component {
render() {
const { watermarkStatus, watermark, watermarkSet, ackFeedbackSetting, salaryBillViewingLimitSetting } = this.state;
const { ackStatus, feedbackStatus, autoAckDays, feedBackUrl, mobileFeedbackUrl } = ackFeedbackSetting;
- const { limitMonth, burningAfterReadingMin } = salaryBillViewingLimitSetting;
+ const { monthType = "SALARY_DATE", limitMonth, burningAfterReadingMin } = salaryBillViewingLimitSetting;
return (
@@ -156,7 +160,11 @@ class Index extends Component {
this.setState({ current: current - 1 })}>{getLabel(1876, "上一步")}
- {getLabel(537558, "保存")}
+ {
+ !detail &&
+ {getLabel(537558, "保存")}
+ }
}
@@ -185,8 +193,29 @@ class Index extends Component {
payrollStore: {
initPayrollTempForm, initPayrollTempFeedbackForm, setSalaryBillItemNameSetting,
initPayrollTempNormalForm, setTmplDataSource, hasBeenModify
- }, onClose
+ }, onClose, detail
} = this.props;
+ if (detail) {
+ initPayrollTempForm();
+ initPayrollTempFeedbackForm();
+ initPayrollTempNormalForm();
+ setTmplDataSource({});
+ setSalaryBillItemNameSetting([
+ {
+ salaryTemplateId: "",
+ salaryBillType: 0,
+ itemShowNameSetting: []
+ },
+ {
+ salaryTemplateId: "",
+ salaryBillType: 1,
+ itemShowNameSetting: []
+ }
+ ]);
+ this.setState({ current: 0 });
+ onClose(type);
+ return;
+ }
if (hasBeenModify) {
Modal.confirm({
title: getLabel(131329, "信息确认"),
diff --git a/pc4mobx/hrmSalary/pages/payrollRelease/index.less b/pc4mobx/hrmSalary/pages/payrollRelease/index.less
index 245c991f..b9966438 100644
--- a/pc4mobx/hrmSalary/pages/payrollRelease/index.less
+++ b/pc4mobx/hrmSalary/pages/payrollRelease/index.less
@@ -20,6 +20,10 @@
}
}
+ .wea-new-top-req {
+ z-index: 0 !important;
+ }
+
.wea-new-top-req-wapper .wea-new-top-req-title > div:last-child {
right: 16px;
}
@@ -27,6 +31,7 @@
.salary-payroll-content {
padding: 8px 16px;
height: 100%;
+ overflow-y: auto;
& > .wea-search-group {
background: #FFF;
@@ -157,7 +162,7 @@
margin-left: 10px;
position: absolute;
top: 25%;
- right: -208px;
+ right: -262px;
margin-top: -2px;
.sftv-item {
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
index c04384b0..43fd37fa 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/conditions.js
@@ -1,16 +1,29 @@
-import React from "react";
-import { WeaLocaleProvider } from "ecCom";
-
-const getLabel = WeaLocaleProvider.getLabel;
-
export const conditions = [
+ {
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["rule"],
+ fieldcol: 10,
+ label: "人员字段",
+ lanId: 543352,
+ labelcol: 8,
+ options: [],
+ viewAttr: 2
+ }
+ ],
+ title: "人员校验规则",
+ lanId: 543357,
+ defaultshow: true
+ },
{
items: [
{
conditionType: "SELECT",
domkey: ["orderRule"],
fieldcol: 10,
- label: getLabel(15512, "排序字段"),
+ label: "排序字段",
+ lanId: 15512,
labelcol: 8,
options: [],
viewAttr: 2
@@ -19,28 +32,15 @@ export const conditions = [
conditionType: "SELECT",
domkey: ["ascOrDesc"],
fieldcol: 10,
- label: getLabel(543351, "正序/倒序"),
+ label: "正序/倒序",
+ lanId: 543351,
labelcol: 8,
options: [],
viewAttr: 2
}
],
- title: getLabel(543356, "排序规则"),
- defaultshow: true
- },
- {
- items: [
- {
- conditionType: "SELECT",
- domkey: ["rule"],
- fieldcol: 10,
- label: getLabel(543352, "人员字段"),
- labelcol: 8,
- options: [],
- viewAttr: 2
- }
- ],
- title: getLabel(543357, "人员校验规则"),
+ title: "排序规则",
+ lanId: 543356,
defaultshow: true
},
{
@@ -49,113 +49,32 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["OPEN_APPLICATION_ENCRYPT"],
fieldcol: 10,
- label: getLabel(526997, "加密设置"),
+ label: "加密设置",
+ lanId: 526997,
labelcol: 8,
viewAttr: 2
}
],
- title: getLabel(543358, "加密规则"),
+ title: "加密规则",
+ lanId: 543358,
defaultshow: true
},
{
items: [
{
conditionType: "SWITCH",
- domkey: ["taxDeclarationFunction"],
+ domkey: ["openSecondaryAccount"],
fieldcol: 10,
- label: getLabel(111, "系统算税"),
- labelcol: 8,
- viewAttr: 1
- },
- {
- conditionType: "SWITCH",
- domkey: ["WITHDRAW_TAX_DECLARATION"],
- fieldcol: 10,
- label: getLabel(111, "撤回申报表"),
+ label: "启用主次账号",
+ tip: "启用后,若有次账号相关档案,则此功能不能关闭。",
+ tipLanId: 111,
+ lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
- title: getLabel(111, "算税规则"),
- defaultshow: true
- },
- {
- items: [
- {
- conditionType: "SWITCH",
- domkey: ["salaryArchiveDelete"],
- fieldcol: 10,
- label: getLabel(111, "允许删除档案"),
- labelcol: 8,
- viewAttr: 2
- }
- ],
- title: getLabel(538004, "薪资档案"),
- defaultshow: true
- },
- {
- items: [
- {
- conditionType: "SWITCH",
- domkey: ["welBaseDiffByPerAndCom"],
- fieldcol: 10,
- label: getLabel(111, "区分个人和公司"),
- labelcol: 8,
- viewAttr: 2
- },
- {
- conditionType: "SWITCH",
- domkey: ["welBaseAutoAdjust"],
- fieldcol: 10,
- label: getLabel(111, "导入基数自动调整上/下限"),
- labelcol: 8,
- viewAttr: 2
- }
- ],
- title: getLabel(111, "福利档案基数"),
- defaultshow: true
- },
- {
- items: [
- {
- conditionType: "SELECT",
- domkey: ["matchRule"],
- fieldcol: 10,
- label: getLabel(111, "匹配规则"),
- options: [],
- labelcol: 8,
- viewAttr: 2
- }
- ],
- title: getLabel(111, "薪资核算人员匹配规则"),
- defaultshow: true
- },
- {
- items: [
- {
- conditionType: "INPUTNUMBER",
- domkey: ["salaryAcctFixedColumns"],
- fieldcol: 10,
- label: getLabel(111, "固定数"),
- labelcol: 8,
- viewAttr: 2
- }
- ],
- title: getLabel(111, "薪资核算固定列头数"),
- defaultshow: true
- },
- {
- items: [
- {
- conditionType: "SWITCH",
- domkey: ["extEmpsWitch"],
- fieldcol: 10,
- label: getLabel(111, "开启非系统人员"),
- labelcol: 8,
- viewAttr: 2
- }
- ],
- title: getLabel(111, "非系统人员"),
+ title: "主次身份",
+ lanId: 111,
defaultshow: true
},
{
@@ -164,7 +83,8 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["salaryShowStatus"],
fieldcol: 10,
- label: getLabel(111, "显示工资单页签"),
+ label: "显示工资单页签",
+ lanId: 111,
labelcol: 8,
viewAttr: 2
},
@@ -172,7 +92,8 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["adjustShowStatus"],
fieldcol: 10,
- label: getLabel(111, "显示调薪记录页签"),
+ label: "显示调薪记录页签",
+ lanId: 111,
labelcol: 8,
viewAttr: 2
},
@@ -180,12 +101,238 @@ export const conditions = [
conditionType: "SWITCH",
domkey: ["taxAgentShowStatus"],
fieldcol: 10,
- label: getLabel(111, "显示【个税扣缴义务人】信息"),
+ label: "显示【个税扣缴义务人】信息",
+ lanId: 111,
labelcol: 8,
viewAttr: 2
}
],
- title: getLabel(111, "我的薪资福利设置"),
+ title: "我的薪资福利设置",
+ lanId: 111,
+ defaultshow: true
+ },
+ {
+ items: [
+ {
+ conditionType: "SWITCH",
+ domkey: ["welBaseDiffByPerAndCom"],
+ fieldcol: 10,
+ label: "区分个人和公司",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "SWITCH",
+ domkey: ["welBaseAutoAdjust"],
+ fieldcol: 10,
+ label: "导入基数自动调整上/下限",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ }
+ ],
+ title: "福利档案基数",
+ lanId: 111,
+ defaultshow: true
+ },
+ {
+ items: [
+ {
+ conditionType: "SWITCH",
+ domkey: ["salaryArchiveDelete"],
+ fieldcol: 10,
+ label: "允许删除档案",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ }
+ ],
+ title: "薪资档案",
+ lanId: 538004,
+ defaultshow: true
+ },
+ {
+ items: [
+ {
+ conditionType: "SWITCH",
+ domkey: ["ATTENDANCE_SERIAL_COLLECTION_BTN"],
+ fieldcol: 10,
+ label: "考勤引用是否采集班次数据",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ }
+ ],
+ title: "数据采集",
+ lanId: 111,
+ defaultshow: true
+ },
+ {
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["matchRule"],
+ fieldcol: 10,
+ label: "匹配规则",
+ lanId: 111,
+ options: [],
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "INPUTNUMBER",
+ domkey: ["salaryAcctFixedColumns"],
+ fieldcol: 10,
+ label: "固定数",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "SWITCH",
+ domkey: ["SHOT_EMP_BTN"],
+ fieldcol: 10,
+ label: "启用人事信息快照",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "SWITCH",
+ domkey: ["SALARY_ACCT_SYNC_TYPE"],
+ fieldcol: 10,
+ label: "是否采用线程池",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ }
+ ],
+ title: "薪资核算",
+ lanId: 111,
+ defaultshow: true
+ },
+ {
+ items: [
+ {
+ conditionType: "SWITCH",
+ domkey: ["taxDeclarationFunction"],
+ fieldcol: 10,
+ label: "系统算税",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 1
+ },
+ {
+ conditionType: "SWITCH",
+ domkey: ["WITHDRAW_TAX_DECLARATION"],
+ fieldcol: 10,
+ label: "撤回申报表",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "SELECT",
+ domkey: ["TAX_DECLARATION_DATE_TYPE"],
+ fieldcol: 10,
+ label: "申报日期类型",
+ lanId: 111,
+ labelcol: 8,
+ options: [],
+ viewAttr: 2
+ }
+ ],
+ title: "算税规则",
+ lanId: 111,
+ defaultshow: true
+ },
+ {
+ items: [
+ {
+ conditionType: "SELECT",
+ domkey: ["REPORT_ORGANIZATIN_TYPE"],
+ fieldcol: 10,
+ label: "组织信息",
+ lanId: 111,
+ options: [],
+ labelcol: 8,
+ viewAttr: 2
+ },
+ // {
+ // conditionType: "SELECT",
+ // domkey: ["SALARY_DETAILS_REPORT_SHOW_TYPE"],
+ // fieldcol: 10,
+ // label: "薪资明细显示模式",
+ // lanId: 111,
+ // options: [],
+ // labelcol: 8,
+ // viewAttr: 2
+ // }
+ ],
+ title: "薪资报表",
+ lanId: 111,
+ defaultshow: true
+ }
+ // {
+ // items: [
+ // {
+ // conditionType: "SWITCH",
+ // domkey: ["extEmpsWitch"],
+ // fieldcol: 10,
+ // label: "开启非系统人员",
+ // lanId: 111,
+ // labelcol: 8,
+ // viewAttr: 2
+ // }
+ // ],
+ // title: "非系统人员",
+ // lanId: 111,
+ // defaultshow: true
+ // },
+];
+export const salaryApprovalConditions = [
+ {
+ items: [
+ {
+ conditionType: "SWITCH",
+ domkey: ["SALARY_APPROVAL_STATUS"],
+ fieldcol: 10,
+ label: "薪资审批",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "SWITCH",
+ domkey: ["APPROVAL_CAN_MANUAL_FILE_STATUS"],
+ fieldcol: 10,
+ label: "开启审批的核算记录允许手动归档",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "SWITCH",
+ domkey: ["APPROVAL_CAN_RE_CALC_STATUS"],
+ fieldcol: 10,
+ label: "开启审批的核算记录允许重新核算",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ },
+ {
+ conditionType: "SWITCH",
+ domkey: ["APPROVAL_CAN_EDIT_RESULT_STATUS"],
+ fieldcol: 10,
+ label: "审批流程发起后允许修改核算数据",
+ lanId: 111,
+ labelcol: 8,
+ viewAttr: 2
+ }
+ ],
+ title: "薪资审批设置",
+ lanId: 111,
defaultshow: true
}
];
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/form.js b/pc4mobx/hrmSalary/pages/ruleConfig/form.js
index 9b17f248..29b4d01b 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/form.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/form.js
@@ -1,8 +1,9 @@
import React from "react";
-import { WeaFormItem, WeaSearchGroup, WeaTools } from "ecCom";
+import { WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
import { WeaSwitch } from "comsMobx";
const getKey = WeaTools.getKey;
+const getLabel = WeaLocaleProvider.getLabel;
export const renderRuleForm = (form, condition, onChange) => {
const { isFormInit } = form;
@@ -14,13 +15,18 @@ export const renderRuleForm = (form, condition, onChange) => {
items.push({
com: (
+ {fields.label}
+ {fields.tip && }
+ }
+ labelCol={{ span: `${fields.labelcol}` }}
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
tipPosition="bottom">