@@ -612,7 +635,7 @@ export default class PayrollGrant extends React.Component {
{
- !_.isEmpty(this.getColumns()) ?
+ !loading ?
}
+ {/*工资单预览*/}
+
this.setState({
+ payrollPreviewDialog: {
+ ...payrollPreviewDialog,
+ visible: false
+ }
+ })}/>
);
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js
index ba853f81..e1f85aca 100644
--- a/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js
+++ b/pc4mobx/hrmSalary/pages/payroll/stepForm/salaryItemSettings.js
@@ -290,6 +290,7 @@ class SalaryItemSettings extends Component {
render() {
const { onChangeSalaryItem, salaryBillItemNameSet } = this.props;
const { dataList, modalPayload, checkedValue } = this.state;
+ if (_.isEmpty(dataList)) return null;
return (
{
+ getSalaryFileList = (props, init = false) => {
const { pageInfo } = this.state;
const {
payrollFilesStore: { salaryFileQueryForm, queryList }, selectedKey, onChangeTopTabCount
@@ -166,7 +166,7 @@ class Index extends Component {
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
}, () => {
- onChangeTopTabCount(selectedKey, total);
+ onChangeTopTabCount(selectedKey, total, init);
});
}
}).catch(() => this.setState({ loading: false }));
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js
index d4eaf520..d93c4aba 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/components/salaryFilesEditSlide/index.js
@@ -62,7 +62,8 @@ class Index extends Component {
conditions: _.map(salaryFilesConditions, o => {
if (o.salaryFile) {
return {
- ...o, items: _.map(adjustSalaryItems, g => {
+ ...o, title: getLabel(o.lanId, o.title), titleHelpful: getLabel(o.titleHelpfulLanId, o.titleHelpful),
+ items: _.map(adjustSalaryItems, g => {
const otherParams = g.dataType === "number" ? { precision: g.pattern } : {};
return {
colSpan: 3, fieldcol: 14, label: g.name, labelcol: 10, ...otherParams,
@@ -73,7 +74,7 @@ class Index extends Component {
};
}
return {
- ...o, items: _.map(o.items, g => {
+ ...o, title: getLabel(o.lanId, o.title), items: _.map(o.items, g => {
if (getKey(g) === "payStartDate") {
return {
...g, label: getLabel(g.lanId, g.label),
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js
index ffd98075..25b815a0 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/config/index.js
@@ -43,11 +43,11 @@ export const tabCondition = [
}
];
export const tabList = [
- { viewcondition: "pending", title: getLabel(542689, "待定薪"), showcount: true, groupid: "PENDING" },
- { viewcondition: "fixed", title: getLabel(544638, "发薪员工"), showcount: true, groupid: "FIXED" },
- { viewcondition: "suspend", title: getLabel(542691, "待停薪"), showcount: true, groupid: "SUSPEND" },
- { viewcondition: "stop", title: getLabel(544637, "停薪员工"), showcount: true, groupid: "STOP" },
- { viewcondition: "ext", title: getLabel(542679, "非系统人员"), showcount: true, groupid: "EXT" }
+ { viewcondition: "pending", title: "待定薪", lanId: 542689, showcount: true, groupid: "PENDING" },
+ { viewcondition: "fixed", title: "发薪员工", lanId: 544638, showcount: true, groupid: "FIXED" },
+ { viewcondition: "suspend", title: "待停薪", lanId: 542691, showcount: true, groupid: "SUSPEND" },
+ { viewcondition: "stop", title: "停薪员工", lanId: 544637, showcount: true, groupid: "STOP" },
+ { viewcondition: "ext", title: "非系统人员", lanId: 542679, showcount: true, groupid: "EXT" }
];
export const renderReqBtns = (selectedKey, salaryImportTypes, onSalaryOpts, showOperateBtn) => {
let reqBtns = [
@@ -367,7 +367,7 @@ export const salaryFileSearchConditions = [
export const salaryFilesConditions = [
{
defaultshow: true, title: getLabel(1361, "基本信息"),
- col: 3,
+ col: 3, lanId: 1361,
items: [
{
colSpan: 3,
@@ -439,7 +439,7 @@ export const salaryFilesConditions = [
},
{
defaultshow: true, title: getLabel(543329, "发薪设置"),
- col: 1,
+ col: 1,lanId: 543329,
items: [
{
colSpan: 1,
@@ -469,7 +469,8 @@ export const salaryFilesConditions = [
{
defaultshow: true, title: getLabel(538004, "薪资档案"),
titleHelpful: getLabel(543330, "提示:显示已生效的最新数据"),
- col: 2, salaryFile: true,
+ titleHelpfulLanId: 543330,
+ col: 2, salaryFile: true,lanId: 538004,
items: []
}
];
@@ -483,6 +484,6 @@ const HelpfulDiv = () => {
{getLabel(544746, "c.返聘人员使用调薪功能调整薪资档案值或使用调整个税扣缴;")}
{getLabel(545755, "2.调薪:档案中已存在的人员批量调整薪资项目值(包括返聘人员的情况);")}
- {getLabel(545756, "3.调整个税扣缴义务人:档案中已存在的人员批量调整个税扣缴义务人(包括返聘人员的情况);")}
+ {/*{getLabel(545756, "3.调整个税扣缴义务人:档案中已存在的人员批量调整个税扣缴义务人(包括返聘人员的情况);")}*/}
;
};
diff --git a/pc4mobx/hrmSalary/pages/payrollFiles/salaryFiles.js b/pc4mobx/hrmSalary/pages/payrollFiles/salaryFiles.js
index 596b79c1..344a3284 100644
--- a/pc4mobx/hrmSalary/pages/payrollFiles/salaryFiles.js
+++ b/pc4mobx/hrmSalary/pages/payrollFiles/salaryFiles.js
@@ -85,15 +85,21 @@ class SalaryFiles extends Component {
break;
}
};
- queryInsuranceTabTotal = (active, total) => {
- API.queryTabTotal().then(({ status, data }) => {
- if (status) {
- const key = _.find(tabList, o => o.viewcondition === active).groupid;
- this.setState({
- topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
- });
- }
- });
+ queryInsuranceTabTotal = (active, total, init) => {
+ const key = _.find(tabList, o => o.viewcondition === active).groupid;
+ if (init) {
+ API.queryTabTotal().then(({ status, data }) => {
+ if (status) {
+ this.setState({
+ topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
+ });
+ }
+ });
+ } else {
+ this.setState({
+ topTabCount: { ...this.state.topTabCount, [key]: total }
+ });
+ }
};
handleReqBtnsCLick = (type, importType) => {
const { state, handleSalaryOpts } = this.salaryFileListRef.wrappedInstance || {};
@@ -242,6 +248,7 @@ class SalaryFiles extends Component {
salaryFileImpDialog, salaryImportTypes, logDialogVisible, filterConditions
} = this.state;
const { taxAgentStore: { showOperateBtn } } = this.props;
+ const tabs = _.map(tabList, o => ({ ...o, title: getLabel(o.lanId, o.title) }));
return (
this.setState({ selectedKey: key })}
/>
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/condition.js b/pc4mobx/hrmSalary/pages/reportView/components/condition.js
index f0c3b8e6..d6668459 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/condition.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/condition.js
@@ -403,8 +403,8 @@ export const mapBarOptions = (params) => ({
},
grid: {
top: "10%",
- right: "0%",
- left: "5%",
+ right: "2%",
+ left: "2%",
bottom: "10%",
containLabel: true
},
@@ -457,8 +457,9 @@ export const mapBarOptions = (params) => ({
series: _.map(params.data, (item, index) => {
return {
name: item.name,
- barWidth: "32",
- barGap: "0%",
+ barMaxWidth: 30,
+ barMinWidth: 10,
+ barGap: 0,
data: _.map(item.data, (it) => it.replace(/,/g, "")),
type: "bar",
itemStyle: {
@@ -484,6 +485,10 @@ export const mapBarOptions = (params) => ({
];
}
},
+ textStyle: {
+ textShadowColor: "transparent",
+ color: "#fff"
+ },
rich: {
a: {
fontWeight: "bold",
@@ -501,8 +506,9 @@ export const mapBarOptions = (params) => ({
}),
dataZoom: [
{
- type: "inside"
-
+ type: "inside",
+ start: params.xAxis.length <= 7 ? 0 : 25,
+ end: params.xAxis.length <= 7 ? 100 : 75,
},
{
type: "slider",
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/index.less b/pc4mobx/hrmSalary/pages/reportView/components/index.less
index 53e93a64..f4a8496f 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/index.less
+++ b/pc4mobx/hrmSalary/pages/reportView/components/index.less
@@ -106,6 +106,7 @@
.wea-select .wdb {
word-break: break-all !important;
word-wrap: break-word !important;
+ white-space: nowrap !important;
}
.wea-select .wea-select-input {
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js b/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js
index 9f9bddf7..6a80e8fb 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/povitpivotChartModal.js
@@ -77,7 +77,7 @@ class PovitpivotChartModal extends Component {
const childFrameObj = document.getElementById("commonTable");
const { dataSource, showSum = false, pageInfo, columns } = payload;
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({
- dataSource, columns, showSum, pageInfo
+ dataSource, showSum, pageInfo, columns: _.map(columns, o => ({ ...o, width: o.oldWidth, ellipsis: true }))
}), "*");
};
getDataPerspective = (payload) => {
diff --git a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
index 37700a22..a7808410 100644
--- a/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
+++ b/pc4mobx/hrmSalary/pages/reportView/components/reportContent.js
@@ -98,11 +98,11 @@ class ReportContent extends Component {
countResult,
columns: _.map(columns, it => ({
...it,
- dataIndex: it.column, width: 150,
+ dataIndex: it.column, width: it.width ? it.width + "px" : 150,
title: it.text, align: "center",
children: !_.isNil(it.children) ? _.map(it.children, child => ({
...child,
- dataIndex: child.column, width: 150,
+ dataIndex: child.column, width: child.width ? child.width + "px" : 150,
title: child.text, align: "center"
})) : []
})),
diff --git a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
index 3e50d8ad..efda13dd 100644
--- a/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
+++ b/pc4mobx/hrmSalary/pages/ruleConfig/ruleConfig.js
@@ -38,7 +38,8 @@ class RuleConfig extends Component {
const optionsList = { matchRule, orderRule, ascOrDesc, rule };
this.setState({
sysinfo, conditions: _.map(conditions, item => ({
- ...item, items: _.map(item.items, o => {
+ ...item,
+ items: _.map(item.items, o => {
if (getKey(o) === "matchRule" || getKey(o) === "orderRule" || getKey(o) === "ascOrDesc" || getKey(o) === "rule") {
return { ...o, options: _.map(optionsList[getKey(o)], g => ({ key: g.value, showname: g.defaultLabel })) };
} else if (getKey(o) === "OPEN_APPLICATION_ENCRYPT") {
@@ -70,6 +71,8 @@ class RuleConfig extends Component {
form.updateFields({ [item]: { value: sysinfo["taxDeclarationFunction"] === "0" ? "0" : "1" } });
} else if (item === "taxAgentShowStatus" || item === "salaryShowStatus" || item === "adjustShowStatus") {
form.updateFields({ [item]: { value: sysinfo[item] || "1" } });
+ } else if (item === "OPEN_APPLICATION_ENCRYPT") {
+ form.updateFields({ [item]: { value: _.isNil(sysinfo[item]) ? "1" : (sysinfo[item] || "") } });
} else {
form.updateFields({ [item]: { value: sysinfo[item] || "" } });
}
@@ -297,13 +300,15 @@ class RuleConfig extends Component {
render() {
const { baseFormStore: { form } } = this.props;
- const { conditions, progressVisible, progress } = this.state;
+ const { conditions, progressVisible, progress, sysinfo } = this.state;
+ const ruleConditions = sysinfo.showEncryptOperationButton === "true" ? conditions :
+ _.filter(conditions, o => o.title !== getLabel(543358, "加密规则"));
return (
{getLabel(543355, "规则配置")}} icon={}
iconBgcolor="#F14A2D" buttons={[]} className="ruleWrapper-layout"
>
- {renderRuleForm(form, conditions, this.handleChange)}
+ {renderRuleForm(form, ruleConditions, this.handleChange)}
{/*加解密进度条*/}
{
progressVisible &&
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/columns.js b/pc4mobx/hrmSalary/pages/salaryItem/columns.js
index d03e1dfc..b2cae4bd 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/columns.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/columns.js
@@ -128,6 +128,14 @@ export const salaryItemFields = [
viewAttr: 2,
tip: ""
},
+ {
+ key: "defaultValue",
+ label: "默认值",
+ type: "INPUT",
+ viewAttr: 2,
+ precision: 2,
+ tip: ""
+ },
{
key: "formulaContent",
label: "公式",
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js
index 4be1e225..09875add 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/index.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js
@@ -2,7 +2,7 @@ import React from "react";
import { inject, observer } from "mobx-react";
import { Button, Dropdown, Menu, message, Modal, Switch } from "antd";
import { WeaInputSearch, WeaLocaleProvider, WeaNewScroll, WeaSlideModal, WeaTop } from "ecCom";
-import { renderLoading } from "../../util";
+import { renderLoading, toDecimal_n } from "../../util";
import CustomTab from "../../components/customTab";
import SystemSalaryItemModal from "./systemSalaryItemModal";
import { columns } from "./columns";
@@ -314,16 +314,21 @@ export default class SalaryItem extends React.Component {
});
return;
}
- saveItem(payload, continueFlag).then(() => {
- getTableDatas({ ...this.state.searchParams }).then(res => {
- this.setState({
- searchParams: {
- ...this.state.searchParams,
- total: res.total
- }
+ const { pattern, defaultValue, dataType, ...extra } = payload;
+ saveItem({
+ ...extra, pattern, dataType,
+ defaultValue: dataType === "number" ? toDecimal_n(defaultValue, parseInt(pattern)) : defaultValue
+ }, continueFlag)
+ .then(() => {
+ getTableDatas({ ...this.state.searchParams }).then(res => {
+ this.setState({
+ searchParams: {
+ ...this.state.searchParams,
+ total: res.total
+ }
+ });
});
});
- });
};
const renderCustomOperate = () => {
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.less b/pc4mobx/hrmSalary/pages/salaryItem/index.less
index 90870f6c..1d28f1ca 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/index.less
+++ b/pc4mobx/hrmSalary/pages/salaryItem/index.less
@@ -139,6 +139,7 @@
.wea-select .wdb {
word-break: break-all !important;
word-wrap: break-word !important;
+ white-space: nowrap !important;
}
.wea-select .wea-select-input {
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/options.js b/pc4mobx/hrmSalary/pages/salaryItem/options.js
index 7dbd51b4..58e64e3e 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/options.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/options.js
@@ -71,6 +71,16 @@ export const patternOptions = [
key: "8",
showname: "8",
selected: false
+ },
+ {
+ key: "9",
+ showname: "9",
+ selected: false
+ },
+ {
+ key: "10",
+ showname: "10",
+ selected: false
}
];
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js
index 564c2ef8..12d0c7bf 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/salaryItemForm.js
@@ -51,7 +51,7 @@ class SalaryItemForm extends Component {
return {
...item,
label: getLabel(item.lanId, item.label),
- display: ((!isLedger && key === "width") || key === "sortedIndex")
+ display: !isLedger
};
case "useInEmployeeSalary":
return {
@@ -84,6 +84,13 @@ class SalaryItemForm extends Component {
...item,
viewAttr: (useInEmployeeSalary.toString() === "0" && ((isLedger && record.canEdit) || (editable && record.canEdit) || isAdd)) ? 2 : 1
};
+ case "defaultValue":
+ return {
+ ...item,
+ type: dataType === "number" ? "INPUTNUMBER" : "INPUT",
+ display: valueType && valueType.toString() === "1",
+ viewAttr: (isLedger && record.canEdit) || (editable && record.canEdit) || isAdd ? 2 : 1
+ };
case "formulaContent":
return {
...item,
@@ -111,6 +118,12 @@ class SalaryItemForm extends Component {
return { ...item, display: v === "1", viewAttr: 3 };
} else if (key === "dataType" && (item.key === "roundingMode" || item.key === "pattern")) {
return { ...item, display: v === "number" };
+ } else if (key === "dataType" && (item.key === "defaultValue")) {
+ return { ...item, type: v === "number" ? "INPUTNUMBER" : "INPUT" };
+ } else if (key === "valueType" && item.key === "defaultValue") {
+ return { ...item, display: v === "1" };
+ } else if (key === "pattern" && item.key === "defaultValue") {
+ return { ...item, precision: parseInt(v) };
} else if (key === "valueType" && (item.key === "originSqlContent" || item.key === "originFormulaContent")) {
return {
...item,
@@ -122,11 +135,11 @@ class SalaryItemForm extends Component {
return { ...item };
})
}, () => {
- // if (key === "valueType" && !this.props.isLedger) {
- // onChangeFieldsItem({ formulaContent: "", formulaId: 0, valueType: v });
- // } else {
- onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
- // }
+ if (key === "dataType") {
+ onChangeFieldsItem({ [key]: v, defaultValue: "" });
+ } else {
+ onChangeFieldsItem({ [key]: (key === "useDefault" || key === "useInEmployeeSalary" || key === "hideDefault") ? Number(v) : v });
+ }
});
};
@@ -137,7 +150,7 @@ class SalaryItemForm extends Component {
{
_.map(salaryItemFieldsList, item => {
- const { key, label, type, viewAttr, tip, options, display = true, multiple = false } = item;
+ const { key, label, type, viewAttr, tip, options, display = true, multiple = false, precision = 0 } = item;
const value = !_.isNil(request[key]) ? request[key].toString() : "";
return
{
@@ -170,9 +183,10 @@ class SalaryItemForm extends Component {
(type === "INPUTNUMBER" && display) ?
- this.handleChangeSalaryFiledItems(key, v)}/>
+ this.handleChangeSalaryFiledItems(key, v)}/>
{key === "width" && display &&
px}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less
index bd34d5bd..38dae0ed 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/index.less
@@ -104,6 +104,7 @@
.wea-select .wdb {
word-break: break-all !important;
word-wrap: break-word !important;
+ white-space: nowrap !important;
}
.wea-select .wea-select-input {
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/addCompensationPersonnelDialog.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/addCompensationPersonnelDialog.js
index 34b7edb4..33ee9267 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/addCompensationPersonnelDialog.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/addCompensationPersonnelDialog.js
@@ -101,7 +101,8 @@ class AddCompensationPersonnelDialog extends Component {
type: "custom",
key: "custom",
render: (text, record, index, onEdit) => (
- onEdit({
record: { ...record, [`${record.insuranceId}_per`]: v },
index, key: "per", value: v
@@ -122,7 +123,8 @@ class AddCompensationPersonnelDialog extends Component {
type: "custom",
key: "custom",
render: (text, record, index, onEdit) => (
- onEdit({
record: { ...record, [`${record.insuranceId}_com`]: v },
index, key: "com", value: v
@@ -166,10 +168,10 @@ class AddCompensationPersonnelDialog extends Component {
let perJson = {}, comJson = {};
_.forEach(list, o => {
if (!_.isNil(o.per)) {
- perJson = _.assign(perJson, { [o.insuranceId]: toDecimal_n(o.per, 2) });
+ perJson = _.assign(perJson, { [o.insuranceId]: toDecimal_n(o.per, o.perValidNum || 2) });
}
if (!_.isNil(o.com)) {
- comJson = _.assign(comJson, { [o.insuranceId]: toDecimal_n(o.com, 2) });
+ comJson = _.assign(comJson, { [o.insuranceId]: toDecimal_n(o.com, o.comValidNum ||2) });
}
});
return { [`${type}PerJson`]: JSON.stringify(perJson), [`${type}ComJson`]: JSON.stringify(comJson) };
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js
index 44eddfe0..d9a91166 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/inputPaymentAmount.js
@@ -20,7 +20,8 @@ class InputPaymentAmount extends Component {
return (
this.handleChangeBaseItem(record, val, type, "per")}
+ precision={parseFloat(record.perValidNum || 2)}
+ onChange={(val) => this.handleChangeBaseItem(record, val, type, "per")}
/>
);
}
@@ -31,7 +32,8 @@ class InputPaymentAmount extends Component {
return (
this.handleChangeBaseItem(record, val, type, "com")}
+ precision={parseFloat(record.comValidNum || 2)}
+ onChange={(val) => this.handleChangeBaseItem(record, val, type, "com")}
/>
);
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
index ef41880a..b1271972 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/regEditDetial.js
@@ -24,70 +24,19 @@ class RegEditDetial extends Component {
key: "social",
label: "社保",
dataSource: [],
- columns: _.map(regColumns, item => {
- if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
- return {
- ...item,
- render: (text, record) => {
- return (
- this.handleChange("social", item.dataIndex, v, record)}
- />
- );
- }
- };
- }
- return { ...item };
- })
+ columns: []
},
{
key: "fund",
label: "公积金",
dataSource: [],
- columns: _.map(regColumns, item => {
- if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
- return {
- ...item,
- render: (text, record) => {
- return (
- this.handleChange("fund", item.dataIndex, v, record)}
- />
- );
- }
- };
- }
- return { ...item };
- })
+ columns: []
},
{
key: "other",
label: "企业年金及其他福利",
dataSource: [],
- columns: _.map(regColumns, item => {
- if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
- return {
- ...item,
- render: (text, record) => {
- return (
- this.handleChange("other", item.dataIndex, v, record)}
- />
- );
- }
- };
- }
- return { ...item };
- })
+ columns: []
}
]
};
@@ -113,27 +62,28 @@ class RegEditDetial extends Component {
otherComJson: {}
};
_.forEach(socialData.dataSource, item => {
+ console.log(item)
if (item.personalPaymentAmount) {
- payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
+ payload["socialPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
}
if (item.companyPaymentAmount) {
- payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
+ payload["socialComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
}
});
_.forEach(foundData.dataSource, item => {
if (item.personalPaymentAmount) {
- payload["fundPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
+ payload["fundPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
}
if (item.companyPaymentAmount) {
- payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
+ payload["fundComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
}
});
_.forEach(otherData.dataSource, item => {
if (item.personalPaymentAmount) {
- payload["otherPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, 2);
+ payload["otherPerJson"][item["insuranceId"]] = toDecimal_n(item.personalPaymentAmount, item.personalPaymentAmountValidNum || 2);
}
if (item.companyPaymentAmount) {
- payload["otherComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, 2);
+ payload["otherComJson"][item["insuranceId"]] = toDecimal_n(item.companyPaymentAmount, item.companyPaymentAmountValidNum || 2);
}
});
_.forEach(Object.keys(payload), item => {
@@ -214,11 +164,70 @@ class RegEditDetial extends Component {
const social = this.combinedData(socialSecurity, result);
const fund = this.combinedData(accumulationFund, result);
const other = this.combinedData(otherBenefits, result);
+ console.log(social)
this.setState({
- listMap: [{ ...socialData, dataSource: social }, { ...foundData, dataSource: fund }, {
- ...otherData,
- dataSource: other
- }]
+ listMap: [
+ {
+ ...socialData, dataSource: social, columns: _.map(regColumns, item => {
+ if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
+ return {
+ ...item,
+ render: (text, record) => {
+ return (
+ this.handleChange("social", item.dataIndex, v, record)}
+ />
+ );
+ }
+ };
+ }
+ return { ...item };
+ })
+ },
+ {
+ ...foundData, dataSource: fund, columns: _.map(regColumns, item => {
+ if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
+ return {
+ ...item,
+ render: (text, record) => {
+ return (
+ this.handleChange("fund", item.dataIndex, v, record)}
+ />
+ );
+ }
+ };
+ }
+ return { ...item };
+ })
+ },
+ {
+ ...otherData, dataSource: other, columns: _.map(regColumns, item => {
+ if (item.dataIndex === "personalPaymentAmount" || item.dataIndex === "companyPaymentAmount") {
+ return {
+ ...item,
+ render: (text, record) => {
+ return (
+ this.handleChange("other", item.dataIndex, v, record)}
+ />
+ );
+ }
+ };
+ }
+ return { ...item };
+ })
+ }
+ ]
});
}
});
@@ -230,9 +239,15 @@ class RegEditDetial extends Component {
let obj = { benefits: item };
_.forEach(data, it => {
if (item === it.insuranceName && it.paymentScopeSign === "per") {
- obj = _.assign(obj, { ...it, personalPaymentAmount: it.insuranceValue });
+ obj = _.assign(obj, {
+ ...it, personalPaymentAmount: it.insuranceValue,
+ personalPaymentAmountValidNum: it.validNum
+ });
} else if (item === it.insuranceName && it.paymentScopeSign === "com") {
- obj = _.assign(obj, { ...it, companyPaymentAmount: it.insuranceValue });
+ obj = _.assign(obj, {
+ ...it, companyPaymentAmount: it.insuranceValue,
+ companyPaymentAmountValidNum: it.validNum
+ });
}
});
return obj;
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
index 8881cc39..3719461f 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/supplementarySlide.js
@@ -92,10 +92,10 @@ class SupplementarySlide extends Component {
const key = child.insuranceId, valuePer = child[`${child.insuranceId}_per`],
valueCom = child[`${child.insuranceId}_com`];
if (!child.perDisabled) {
- _.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, 2) || "0" });
+ _.assign(payload[`${item}PerString`], { [key]: toDecimal_n(valuePer, parseFloat(child.perValidNum || 2)) || "0" });
}
if (!child.comDisabled) {
- _.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, 2) || "0" });
+ _.assign(payload[`${item}ComString`], { [key]: toDecimal_n(valueCom, parseFloat(child.comValidNum || 2)) || "0" });
}
});
});
@@ -444,7 +444,9 @@ export const convertData = (dataSource) => {
[perKey]: "",
[comKey]: "",
perDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "per"),
- comDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "com")
+ perValidNum: !_.isEmpty(_.filter(itemList, i => i.paymentScopeSign === "per")) ? _.filter(itemList, i => i.paymentScopeSign === "per")[0].validNum : 2,
+ comDisabled: !_.includes(_.map(itemList, o => o.paymentScopeSign), "com"),
+ comValidNum: !_.isEmpty(_.filter(itemList, i => i.paymentScopeSign === "com")) ? _.filter(itemList, i => i.paymentScopeSign === "com")[0].validNum : 2,
});
});
return endList.push(data);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
index 03a89212..e2342e93 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareEditArchiveSlide/index.js
@@ -6,7 +6,7 @@
*/
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
-import { WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
+import { WeaDialog, WeaLocaleProvider, WeaSlideModal, WeaTools } from "ecCom";
import * as API from "../../../../../apis/welfareArchive";
import { getTaxAgentSelectList } from "../../../../../apis/taxAgent";
import { sysinfo } from "../../../../../apis/ruleconfig";
@@ -23,7 +23,7 @@ class Index extends Component {
constructor(props) {
super(props);
this.state = {
- loading: false, conditions: [], formData: {}
+ loading: false, conditions: [], formData: {}, errorDialog: { visible: false, errorMsg: "" }
};
}
@@ -180,7 +180,7 @@ class Index extends Component {
welfareType, validate: welfareData[`${underTakeType}SchemeId`] ? !!welfareData[`${underTakeType}StartTime`] : true
};
};
- save = async () => {
+ save = async (changeData = false) => {
const socailPayload = this.covertPayload("SOCIAL_SECURITY", "social", getConditionDomkeys(this.props.socialBase.items), getConditionDomkeys(this.props.socialBase.comItems || [])),
fundPayload = this.covertPayload("ACCUMULATION_FUND", "fund", getConditionDomkeys(this.props.fundBase.items), getConditionDomkeys(this.props.fundBase.comItems || [])),
otherPayload = this.covertPayload("OTHER", "other", getConditionDomkeys(this.props.otherBase.items), getConditionDomkeys(this.props.otherBase.comItems || []));
@@ -198,13 +198,18 @@ class Index extends Component {
}, {
status: otherStatus,
errormsg: otherErrorMsg = "!"
- }] = await Promise.all([API.save(socailPayload), API.save(fundPayload), API.save(otherPayload)]);
+ }] = await Promise.all([
+ API.save({ ...socailPayload, changeData }),
+ API.save({ ...fundPayload, changeData }),
+ API.save({ ...otherPayload, changeData })]);
this.setState({ loading: false });
if (socialStatus && fundStatus && otherStatus) {
message.success(getLabel(30700, "操作成功!"));
this.props.onClose(true);
} else {
- message.error(socialErrorMsg + fundErrorMsg + otherErrorMsg);
+ !changeData && this.setState({
+ errorDialog: { visible: true, errorMsg: socialErrorMsg + fundErrorMsg + otherErrorMsg }
+ });
}
};
updateFormData = (baseData) => this.setState({ formData: { ...this.state.formData, ...baseData } });
@@ -246,18 +251,19 @@ class Index extends Component {
};
handleExtraChange = (key, value) => this.setState({ formData: { ...this.state.formData, [key]: value } });
handleSameChange = (baseItems, value) => {
+ if (!value) return;
let newFormDatas = {}, hasCompromise = false;
baseItems.forEach((formLabel) => {
- const { min, max } = formLabel;
+ // const { min, max } = formLabel;
newFormDatas[getKey(formLabel)] = toDecimal_n(value, 2) || "";
- if (min !== "0.000" && value !== "" && Number(value) < Number(min)) {
- hasCompromise = true;
- newFormDatas[getKey(formLabel)] = toDecimal_n(Number(min), 2);
- }
- if (max !== "0.000" && value !== "" && Number(value) > Number(max)) {
- hasCompromise = true;
- newFormDatas[getKey(formLabel)] = toDecimal_n(Number(max), 2);
- }
+ // if (min !== "0.000" && value !== "" && Number(value) < Number(min)) {
+ // hasCompromise = true;
+ // newFormDatas[getKey(formLabel)] = toDecimal_n(Number(min), 2);
+ // }
+ // if (max !== "0.000" && value !== "" && Number(value) > Number(max)) {
+ // hasCompromise = true;
+ // newFormDatas[getKey(formLabel)] = toDecimal_n(Number(max), 2);
+ // }
});
if (hasCompromise) {
message.warning(getLabel("111", "超出所选缴纳方案设置的基数上下限范围,将自动按基数上下限填充。"));
@@ -278,7 +284,7 @@ class Index extends Component {
{
runStatuses !== "4,5" && showOperateBtn &&
-
+
}
;
@@ -300,7 +306,7 @@ class Index extends Component {
render() {
const { archivesStore: { welfareProfileForm }, showOperateBtn } = this.props;
- const { conditions, formData } = this.state;
+ const { conditions, formData, errorDialog } = this.state;
return (
{
+ this.setState({ errorDialog: { ...errorDialog, visible: false } }, () => {
+ const promise = this.save(true);
+ message.success(getLabel(30700, "操作成功!"));
+ this.props.onClose(true);
+ });
+ }}>{getLabel(111, "确认")}
+ ]}
+ onCancel={() => this.setState({ errorDialog: { ...errorDialog, visible: false } })}
+ bottomLeft={getLabel(111, "点击【确认】自动将不满足条件的基数值设置为对应的上限或下限值")}
+ >
+ }
/>
);
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
index 6d5e4468..a9029a86 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/components/welfareTableList/index.js
@@ -68,7 +68,7 @@ class Index extends Component {
handleReceive = async ({ data }) => {
const { type, payload: { id, params } = {} } = data;
if (type === "init") {
- this.getWelfareList(this.props);
+ this.getWelfareList(this.props, true);
} else if (type === "turn") {
const { record: { baseInfo, employeeId, paymentOrganization } = {}, interfaceParams = {} } = params;
const { runStatuses, showOperateBtn } = this.props;
@@ -154,7 +154,7 @@ class Index extends Component {
getPaymentForm = async (props) => {
return API.getPaymentForm({ ...props });
};
- getWelfareList = (props) => {
+ getWelfareList = (props, init = false) => {
const { pageInfo } = this.state;
const { archivesStore: { welfareForm }, runStatuses, onChangeTopTabCount, showOperateBtn } = props;
const params = { ...pageInfo, ...welfareForm.getFormParams() };
@@ -182,7 +182,7 @@ class Index extends Component {
})
}, () => {
const { pageInfo, selectedRowKeys, columns, dataSource } = this.state;
- onChangeTopTabCount(runStatuses, total);
+ onChangeTopTabCount(runStatuses, total, init);
this.postMessageToChild({
dataSource, pageInfo, selectedRowKeys, runStatuses,
columns, showOperateBtn
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
index 2c0a760d..cbec934f 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/config.js
@@ -54,11 +54,11 @@ export const optTypeEnum = [
}
];
export const tabList = [
- { viewcondition: "1", title: getLabel(542711, "待增员"), showcount: true, groupid: "stayAdd" },
- { viewcondition: "2,3", title: getLabel(542504, "在缴员工"), showcount: true, groupid: "paying" },
- { viewcondition: "3", title: getLabel(542713, "待减员"), showcount: true, groupid: "stayDel" },
- { viewcondition: "4,5", title: getLabel(542505, "停缴员工"), showcount: true, groupid: "stopPay" },
- { viewcondition: "ext", title: getLabel(542679, "非系统人员"), showcount: true, groupid: "ext" }
+ { viewcondition: "1", title: "待增员", lanId: 542711, showcount: true, groupid: "stayAdd" },
+ { viewcondition: "2,3", title: "在缴员工", lanId: 542504, showcount: true, groupid: "paying" },
+ { viewcondition: "3", title: "待减员", lanId: 542713, showcount: true, groupid: "stayDel" },
+ { viewcondition: "4,5", title: "停缴员工", lanId: 542505, showcount: true, groupid: "stopPay" },
+ { viewcondition: "ext", title: "非系统人员", lanId: 542679, showcount: true, groupid: "ext" }
];
export const welfareTipList = [
{
@@ -143,7 +143,7 @@ export const renderDropMenuDatas = (selectedKey, getLabel, showOperateBtn) => {
key: "record",
icon: ,
content: getLabel(111, "基数调整记录")
- },{
+ }, {
key: "log",
icon: ,
content: getLabel(545781, "操作日志")
@@ -815,8 +815,8 @@ const BenefitBaseComponent = (props) => {
com:
onChange(getKey(child), v)}
viewAttr={(runStatuses === "4,5" || !showOperateBtn) ? 1 : 2}
/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js
index f2844ef5..4da87e27 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfareArchive/index.js
@@ -46,15 +46,21 @@ class Index extends Component {
this.setState({ showExtEmpsWitch: extEmpsWitch === "1" });
}
- queryInsuranceTabTotal = (active, total) => {
- API.queryInsuranceTabTotal().then(({ status, data }) => {
- if (status) {
- const key = _.find(tabList, o => o.viewcondition === active).groupid;
- this.setState({
- topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
- });
- }
- });
+ queryInsuranceTabTotal = (active, total, init) => {
+ const key = _.find(tabList, o => o.viewcondition === active).groupid;
+ if (init) {
+ API.queryInsuranceTabTotal().then(({ status, data }) => {
+ if (status) {
+ this.setState({
+ topTabCount: { ...this.state.topTabCount, ...data, [key]: total }
+ });
+ }
+ });
+ } else {
+ this.setState({
+ topTabCount: { ...this.state.topTabCount, [key]: total }
+ });
+ }
};
handleOpenAdvanceSearch = () => this.setState({ showSearchAd: true });
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
@@ -147,6 +153,7 @@ class Index extends Component {
} = this.state;
const { taxAgentStore: { showOperateBtn } } = this.props;
const tipList = _.find(welfareTipList, o => o.viewcondition === selectedKey).list;
+ const tabs = _.map(tabList, o => ({ ...o, title: getLabel(o.lanId, o.title) }));
return (
this.setState({ selectedKey: key })}
/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js
index 0ea2dcc2..7e28cdbf 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanAdvanceSearchPannel/index.js
@@ -5,12 +5,13 @@
* Date: 2024/2/2
*/
import React, { Component } from "react";
-import { WeaLocaleProvider } from "ecCom";
+import { WeaLocaleProvider, WeaTools } from "ecCom";
import { Button } from "antd";
import { inject, observer } from "mobx-react";
import { getSearchs } from "../../../../../util";
import { searchConditons } from "../../config";
+const getKey = WeaTools.getKey;
const getLabel = WeaLocaleProvider.getLabel;
@inject("programmeStore")
@@ -27,7 +28,20 @@ class WelfarePlanAdvanceSearchPannel extends Component {
return (
- {getSearchs(planSearchForm, searchConditons, 2, false)}
+ {getSearchs(planSearchForm, _.map(searchConditons, item => ({
+ ...item, title: getLabel(item.lanId, item.title),
+ items: _.map(item.items, o => {
+ if (getKey(o) === "paymentTypeEnum") {
+ return {
+ ...o, label: getLabel(o.lanId, o.label),
+ options: _.map(o.options, k => ({ ...k, showname: getLabel(k.lanId, k.showname) }))
+ };
+ }
+ return {
+ ...o, label: getLabel(o.lanId, o.label)
+ };
+ })
+ })), 2, false)}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js
index 59af2d46..79685e74 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanCopyDialog/index.js
@@ -54,7 +54,7 @@ class Index extends Component {
const { programmeStore: { planCopyForm }, conditions } = this.props;
return (
{getLabel(537558, "保存")}
]}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
index a70da52f..d97654e6 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/index.js
@@ -48,15 +48,22 @@ class Index extends Component {
this.setState({
planDatas: schemeDetailList,
conditions: _.map(planConditons, item => ({
- ...item, items: _.map(item.items, o => {
+ ...item, title: getLabel(item.lanId, item.title),
+ items: _.map(item.items, o => {
if (getKey(o) === "taxAgentIds") {
return {
...o, hide: schemeBatch["sharedType"] === "0" || _.isNil(schemeBatch["sharedType"]),
viewAttr: (schemeBatch["sharedType"] === "1" && showOperateBtn) ? 3 : showOperateBtn ? o.viewAttr : 1,
- options: _.map(result, k => ({ key: k.id, showname: k.content }))
+ options: _.map(result, k => ({ key: k.id, showname: k.content })),
+ label: getLabel(o.lanId, o.label)
+ };
+ } else if (getKey(o) === "paymentType" || getKey(o) === "sharedType") {
+ return {
+ ...o, label: getLabel(o.lanId, o.label),
+ options: _.map(o.options, k => ({ ...k, showname: getLabel(k.lanId, k.showname) }))
};
}
- return { ...o, viewAttr: showOperateBtn ? o.viewAttr : 1 };
+ return { ...o, viewAttr: showOperateBtn ? o.viewAttr : 1, label: getLabel(o.lanId, o.label) };
})
}))
}, () => {
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
index 9447e487..10751d50 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanEditSlide/planSetTable.js
@@ -246,7 +246,9 @@ class PlanSetTable extends Component {
{ key: "5", showname: "5" },
{ key: "6", showname: "6" },
{ key: "7", showname: "7" },
- { key: "8", showname: "8" }
+ { key: "8", showname: "8" },
+ { key: "9", showname: "9" },
+ { key: "10", showname: "10" }
]} viewAttr={showOperateBtn ? 2 : 1}
onChange={validNum => onEdit({
record: { ...record, validNum },
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
index 8b661ed0..1035015a 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/components/welfarePlanList/index.js
@@ -178,12 +178,18 @@ class Index extends Component {
this.setState({
copyDialog: {
visible: true, copyId: id, copyName: `${schemeName}-${getLabel(77, "复制")}`,
- title: `${getLabel(77, "复制")}-${_.find(tabWelfarePlanList, o => o.key === selectedKey).title}`,
+ title: `${getLabel(77, "复制")}-${
+ getLabel(_.find(tabWelfarePlanList, o => o.key === selectedKey).lanId, _.find(tabWelfarePlanList, o => o.key === selectedKey).title)
+ }`,
conditions: welfarePlanCopyConditions[selectedKey]
}
}, () => {
const { copyDialog: { conditions, copyName } } = this.state;
- planCopyForm.initFormFields(conditions);
+ planCopyForm.initFormFields(_.map(conditions, item => ({
+ ...item, items: _.map(item.items, o => {
+ return { ...o, label: getLabel(o.lanId, o.label) };
+ })
+ })));
planCopyForm.updateFields({ [`${selectedKey}_schemeName`]: { value: copyName } });
});
break;
@@ -311,7 +317,9 @@ class Index extends Component {
{
selectedKey === "CUSTOM" &&
-
+
+ getLabel(o.lanId, o.title))}/>
+
}
{/*复制方案*/}
onSalaryOpts("SEARCH", v)}
value={customQuery}
options={[
- { key: "", showname: getLabel(111, "全部"), selected: true },
+ { key: "", showname: getLabel(332, "全部"), selected: true },
{ key: "SOCIAL_SECURITY", showname: getLabel(538967, "社保") },
{ key: "ACCUMULATION_FUND", showname: getLabel(538969, "公积金") },
{ key: "OTHER", showname: getLabel(542717, "企业年金及其他福利") }
@@ -63,6 +66,7 @@ export const searchConditons = [
fieldcol: 16,
isQuickSearch: true,
label: getLabel(33162, "方案名称"),
+ lanId: 33162,
labelcol: 8,
value: "",
viewAttr: 2
@@ -74,16 +78,18 @@ export const searchConditons = [
fieldcol: 16,
isQuickSearch: true,
label: getLabel(543163, "缴纳类型"),
+ lanId: 543163,
labelcol: 8,
value: "",
options: [
- { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
- { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
+ { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇"), lanId: 19702 },
+ { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村"), lanId: 19703 }
],
viewAttr: 2
}
],
title: getLabel(82743, "基础信息"),
+ lanId: 82743,
defaultshow: true
}
];
@@ -96,6 +102,7 @@ export const welfarePlanCopyConditions = {
domkey: ["SOCIAL_SECURITY_schemeName"],
fieldcol: 16,
label: getLabel(111, "社保名称"),
+ lanId: 111,
labelcol: 8,
value: "",
rules: "required|string",
@@ -115,6 +122,7 @@ export const welfarePlanCopyConditions = {
domkey: ["ACCUMULATION_FUND_schemeName"],
fieldcol: 16,
label: getLabel(111, "公积金名称"),
+ lanId: 111,
labelcol: 8,
value: "",
rules: "required|string",
@@ -134,6 +142,7 @@ export const welfarePlanCopyConditions = {
domkey: ["OTHER_schemeName"],
fieldcol: 16,
label: getLabel(111, "企业年金及其他福利名称"),
+ lanId: 111,
labelcol: 8,
value: "",
rules: "required|string",
@@ -154,10 +163,11 @@ export const planConditons = [
domkey: ["paymentType"],
fieldcol: 14,
label: getLabel(543163, "缴纳类型"),
+ lanId: 543163,
labelcol: 6,
options: [
- { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇") },
- { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村") }
+ { key: "SCHEME_TOWN", showname: getLabel(19702, "城镇"), lanId: 19702 },
+ { key: "SCHEME_VILLAGE", showname: getLabel(19703, "农村"), lanId: 19703 }
],
value: "SCHEME_TOWN",
rules: "required|string",
@@ -168,6 +178,7 @@ export const planConditons = [
domkey: ["schemeName"],
fieldcol: 14,
label: getLabel(33162, "方案名称"),
+ lanId: 33162,
labelcol: 6,
value: "",
rules: "required|string",
@@ -178,10 +189,11 @@ export const planConditons = [
domkey: ["sharedType"],
fieldcol: 14,
label: getLabel(543164, "可见性"),
+ lanId: 543164,
labelcol: 6,
options: [
- { key: "0", showname: getLabel(111, "公共") },
- { key: "1", showname: getLabel(111, "私有") }
+ { key: "0", showname: getLabel(111, "公共"), lanId: 111 },
+ { key: "1", showname: getLabel(111, "私有"), lanId: 111 }
],
value: "0",
rules: "required|string",
@@ -192,6 +204,7 @@ export const planConditons = [
domkey: ["taxAgentIds"],
fieldcol: 14,
label: getLabel(543165, "可见性范围"),
+ lanId: 543165,
labelcol: 6,
multiple: true,
options: [],
@@ -204,12 +217,14 @@ export const planConditons = [
domkey: ["remarks"],
fieldcol: 14,
label: getLabel(536726, "备注"),
+ lanId: 536726,
labelcol: 6,
value: "",
viewAttr: 2
}
],
title: getLabel(82743, "基础信息"),
+ lanId: 82743,
defaultshow: true
}
];
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
index d1bd4b81..20d50c88 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.js
@@ -13,6 +13,7 @@ import WelfarePlanList from "./components/welfarePlanList";
import LogDialog from "../../../components/logViewModal";
import cs from "classnames";
import "./index.less";
+import { tabList } from "../welfareArchive/config";
const getLabel = WeaLocaleProvider.getLabel;
@@ -64,12 +65,13 @@ class Index extends Component {
render() {
const { taxAgentStore: { showOperateBtn } } = this.props;
const { logDialogVisible, filterConditions, selectedKey, showSearchAd, isQuery, customQuery } = this.state;
+ const tabs = _.map(tabWelfarePlanList, o => ({ ...o, title: getLabel(o.lanId, o.title) }));
return (
}
iconBgcolor="#F14A2D" showDropIcon dropMenuDatas={renderDropMenuDatas(selectedKey, showOperateBtn)}
- onDropMenuClick={this.onDropMenuClick} tabDatas={tabWelfarePlanList} selectedKey={selectedKey}
+ onDropMenuClick={this.onDropMenuClick} tabDatas={tabs} selectedKey={selectedKey}
onChange={selectedKey => this.setState({ selectedKey, showSearchAd: false, customQuery: "" })}
buttons={renderReqBtns(selectedKey, this.handleReqBtnsCLick, showOperateBtn, customQuery)}
>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
index dc2ed68b..5a057203 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/welfarePlan/index.less
@@ -210,6 +210,7 @@
.wea-select .wdb {
word-break: break-all !important;
word-wrap: break-word !important;
+ white-space: nowrap !important;
}
.wea-select .wea-select-input {
diff --git a/pc4mobx/hrmSalary/stores/calculate.js b/pc4mobx/hrmSalary/stores/calculate.js
index 86d3b498..262488ad 100644
--- a/pc4mobx/hrmSalary/stores/calculate.js
+++ b/pc4mobx/hrmSalary/stores/calculate.js
@@ -14,6 +14,8 @@ export class calculateStore {
@observable calculateForm = new WeaForm(); //薪资核算重构-核算form
@observable batchUpdateForm = new WeaForm(); //批量更新薪资项目-批量更新form
@action initBatchUpdateForm = () => this.batchUpdateForm = new WeaForm();
+ @observable tempForm = new WeaForm(); //导出模板设置-模板form
+ @action initTempForm = () => this.tempForm = new WeaForm();
@observable tableStore = new TableStore(); // new table
@observable form = new WeaForm(); // nrew 一个form
diff --git a/pc4mobx/hrmSalary/stores/custom-stores/index.js b/pc4mobx/hrmSalary/stores/custom-stores/index.js
new file mode 100644
index 00000000..7be35b6b
--- /dev/null
+++ b/pc4mobx/hrmSalary/stores/custom-stores/index.js
@@ -0,0 +1,2 @@
+module.exports = {
+};
diff --git a/pc4mobx/hrmSalary/stores/employeeDeclare.js b/pc4mobx/hrmSalary/stores/employeeDeclare.js
index d4e9961e..bf969d11 100644
--- a/pc4mobx/hrmSalary/stores/employeeDeclare.js
+++ b/pc4mobx/hrmSalary/stores/employeeDeclare.js
@@ -6,6 +6,7 @@ const { TableStore } = WeaTableNew;
export class EmployeeDeclareStore {
@observable advanceForm = new WeaForm(); //人员信息报送详情页面,高级搜索form实例
@observable declareForm = new WeaForm(); //人员信息报送详情页面,新增编辑报送信息form实例
+ @action initDeclareForm = () => this.declareForm = new WeaForm();
@observable tableStore = new TableStore();
@action("...")
diff --git a/pc4mobx/hrmSalary/stores/index.js b/pc4mobx/hrmSalary/stores/index.js
index fdc926a3..f535bfc7 100644
--- a/pc4mobx/hrmSalary/stores/index.js
+++ b/pc4mobx/hrmSalary/stores/index.js
@@ -21,6 +21,7 @@ import { SpecialAddStore } from "./specialAdd";
import { ExternalPersonManageStore } from "./externalPersonManage";
import { EmployeeDeclareStore } from "./employeeDeclare";
import { IntelligentStore } from "./intelligent";
+import CustomModule from "./custom-stores";
module.exports = {
baseFormStore: new BaseFormStore(),
@@ -46,4 +47,5 @@ module.exports = {
externalPersonManageStore: new ExternalPersonManageStore(),
employeeDeclareStore: new EmployeeDeclareStore(),
intelligentStore: new IntelligentStore(),
+ ...CustomModule
};
diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js
index 4da841d0..ef1e46a1 100644
--- a/pc4mobx/hrmSalary/stores/payroll.js
+++ b/pc4mobx/hrmSalary/stores/payroll.js
@@ -458,7 +458,9 @@ export class payrollStore {
departmentIds: form.departmentIds ? form.departmentIds.split(",") : [],
subCompanyIds: form.subCompanyIds ? form.subCompanyIds.split(",") : []
};
+ this.loading = true;
API.getInfoList(params).then(res => {
+ this.loading = false;
if (res.status) {
this.salaryGrantTableStore = res.data.columns;
this.salaryGrantDataSource = res.data.list;
@@ -470,7 +472,7 @@ export class payrollStore {
} else {
message.error(res.errormsg || "获取失败");
}
- });
+ }).catch(() => this.loading = false);
};
// 工资单-工资单发放详情列表
diff --git a/pc4mobx/hrmSalary/stores/salaryItem.js b/pc4mobx/hrmSalary/stores/salaryItem.js
index 54a84562..cc3a0214 100644
--- a/pc4mobx/hrmSalary/stores/salaryItem.js
+++ b/pc4mobx/hrmSalary/stores/salaryItem.js
@@ -34,7 +34,8 @@ export class SalaryItemStore {
dataType: "number",
description: "",
sharedType: "0",
- taxAgentIds: ""
+ taxAgentIds: "",
+ defaultValue: ""
};
@observable tableDataSource = []; // 主列表
@@ -75,7 +76,8 @@ export class SalaryItemStore {
dataType: "number",
description: "",
sharedType: "0",
- taxAgentIds: ""
+ taxAgentIds: "",
+ defaultValue: ""
};
@action
diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less
index 0d181610..4ce6ef7a 100644
--- a/pc4mobx/hrmSalary/style/index.less
+++ b/pc4mobx/hrmSalary/style/index.less
@@ -71,3 +71,15 @@
}
}
}
+
+//公式编辑框样式
+.excel-codeBox {
+ .cm-variable {
+ }
+
+ .cm-string-2 {
+ color: inherit !important;
+ }
+
+}
+