Merge branch 'release/2.15.1.2407.01' into release/2.15.1.2407.01-个税
This commit is contained in:
commit
90ee27ba2e
|
|
@ -37,7 +37,7 @@ export const getDetailChanges = params => {
|
||||||
};
|
};
|
||||||
//获取薪资账套全列表
|
//获取薪资账套全列表
|
||||||
export const getSalarysobListAll = params => {
|
export const getSalarysobListAll = params => {
|
||||||
return postFetch("/api/bs/hrmsalary/salarysob/listAll", params);
|
return postFetch("/api/bs/hrmsalary/salarysob/listAllByAuth", params);
|
||||||
};
|
};
|
||||||
//补算
|
//补算
|
||||||
export const supplementAcctRecord = (params) => {
|
export const supplementAcctRecord = (params) => {
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,24 @@
|
||||||
* Date: 2022/11/30
|
* Date: 2022/11/30
|
||||||
*/
|
*/
|
||||||
import React, { Component } from "react";
|
import React, { Component } from "react";
|
||||||
import { WeaBrowser, WeaDialog, WeaFormItem, WeaSearchGroup, WeaSelect } from "ecCom";
|
import {
|
||||||
|
WeaBrowser,
|
||||||
|
WeaDialog,
|
||||||
|
WeaFormItem,
|
||||||
|
WeaHelpfulTip,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaSearchGroup,
|
||||||
|
WeaSelect,
|
||||||
|
WeaTextarea
|
||||||
|
} from "ecCom";
|
||||||
import { Button, message, Modal } from "antd";
|
import { Button, message, Modal } from "antd";
|
||||||
import { getTaxAgentRangeForm } from "../../apis/taxAgent";
|
import { getTaxAgentRangeForm } from "../../apis/taxAgent";
|
||||||
import { commonEnumList } from "../../apis/ruleconfig";
|
import { commonEnumList } from "../../apis/ruleconfig";
|
||||||
import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee";
|
import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
class PersonalScopeModal extends Component {
|
class PersonalScopeModal extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -91,6 +102,11 @@ class PersonalScopeModal extends Component {
|
||||||
key: "POSITION",
|
key: "POSITION",
|
||||||
showname: "岗位",
|
showname: "岗位",
|
||||||
selected: false
|
selected: false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: "SQL",
|
||||||
|
showname: "SQL",
|
||||||
|
selected: false
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
this.setState({
|
this.setState({
|
||||||
|
|
@ -124,7 +140,9 @@ class PersonalScopeModal extends Component {
|
||||||
const payload = {
|
const payload = {
|
||||||
employeeStatus: status.split(","),
|
employeeStatus: status.split(","),
|
||||||
includeType,
|
includeType,
|
||||||
targetParams: _.map(targetTypeIds.split(","), it => ({ targetType, targetId: it })),
|
targetParams: targetType !== "SQL" ?
|
||||||
|
_.map(targetTypeIds.split(","), it => ({ targetType, targetId: it, target: "" })) :
|
||||||
|
[{ targetType, targetId: "0", target: targetTypeIds }],
|
||||||
[saveKeyVal["key"]]: saveKeyVal["value"]
|
[saveKeyVal["key"]]: saveKeyVal["value"]
|
||||||
};
|
};
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
|
|
@ -156,6 +174,12 @@ class PersonalScopeModal extends Component {
|
||||||
case "POSITION":
|
case "POSITION":
|
||||||
browserType = { ...browserType, type: 278, title: "岗位选择" };
|
browserType = { ...browserType, type: 278, title: "岗位选择" };
|
||||||
break;
|
break;
|
||||||
|
case "SQL":
|
||||||
|
return <div style={{ display: "flex", alignItems: "center" }}>
|
||||||
|
<WeaTextarea minRows={2} viewAttr={3} style={{ width: 270 }} value={targetTypeIds}
|
||||||
|
onChange={val => this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/>
|
||||||
|
<WeaHelpfulTip style={{ marginLeft: 10 }} width={200} placement="topLeft" title={<SQLHelpTip/>}/>
|
||||||
|
</div>;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -259,3 +283,13 @@ class PersonalScopeModal extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
export default PersonalScopeModal;
|
export default PersonalScopeModal;
|
||||||
|
|
||||||
|
export const SQLHelpTip = () => {
|
||||||
|
return <div>
|
||||||
|
<p>{getLabel(111, "注意事项:")}</p>
|
||||||
|
<p>{getLabel(111, "1、sql需返回人员id")}</p>
|
||||||
|
<p>{getLabel(111, "2、sql结尾不需要 ; go /等符号")}</p>
|
||||||
|
<p>{getLabel(111, "使用例子:定义获取岗位是开发的人员")}</p>
|
||||||
|
<p>{getLabel(111, "select id from hrmresource where JOBTITLE = 17")}</p>
|
||||||
|
</div>;
|
||||||
|
};
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,15 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
|
& > span:first-child {
|
||||||
|
display: inline-block;
|
||||||
|
min-width: 44px;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > span:last-child {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ export const conditions = [
|
||||||
isQuickSearch: false,
|
isQuickSearch: false,
|
||||||
label: "类型",
|
label: "类型",
|
||||||
labelcol: 6,
|
labelcol: 6,
|
||||||
valueList:[],
|
valueList: [],
|
||||||
options: [
|
options: [
|
||||||
{
|
{
|
||||||
key: "NUMBER",
|
key: "NUMBER",
|
||||||
|
|
@ -185,13 +185,14 @@ export const reFrenceConditions = [
|
||||||
{
|
{
|
||||||
colSpan: 1,
|
colSpan: 1,
|
||||||
conditionType: "SELECT",
|
conditionType: "SELECT",
|
||||||
domkey: ["salarySobId"],
|
domkey: ["salarySobIds"],
|
||||||
fieldcol: 18,
|
fieldcol: 18,
|
||||||
isQuickSearch: false,
|
isQuickSearch: false,
|
||||||
label: "薪资账套",
|
label: "薪资账套",
|
||||||
labelcol: 6,
|
labelcol: 6,
|
||||||
valueList:[],
|
valueList: [],
|
||||||
options: [],
|
options: [],
|
||||||
|
multiple: true,
|
||||||
rules: "required|string",
|
rules: "required|string",
|
||||||
viewAttr: 3
|
viewAttr: 3
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ class AttendanceDataViewSlide extends Component {
|
||||||
this.viewAttendQuote({}, nextProps);
|
this.viewAttendQuote({}, nextProps);
|
||||||
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||||
document.querySelector(".attendanceRefWrapper").classList.remove("zIndex0-attendance");
|
document.querySelector(".attendanceRefWrapper").classList.remove("zIndex0-attendance");
|
||||||
|
this.setState({ pageInfo: { current: 1, pageSize: 10, total: 0 } });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -41,7 +42,7 @@ class AttendanceDataViewSlide extends Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||||
// o.dataIndex === "username" ? "left" :
|
// o.dataIndex === "username" ? "left" :
|
||||||
columns: _.map(columns, o => ({ ...o, width: 150, fixed: null }))
|
columns: _.map(columns, o => ({ ...o, width: 150, fixed: null }))
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ class AttendanceRefrenceDataModal extends Component {
|
||||||
...item,
|
...item,
|
||||||
items: _.map(items, child => {
|
items: _.map(items, child => {
|
||||||
const { domkey } = child;
|
const { domkey } = child;
|
||||||
if (domkey[0] === "salarySobId") {
|
if (domkey[0] === "salarySobIds") {
|
||||||
return { ...child, options: _.map(data, it => ({ key: it.id, showname: it.content })) };
|
return { ...child, options: _.map(data, it => ({ key: it.id, showname: it.content })) };
|
||||||
}
|
}
|
||||||
return { ...child };
|
return { ...child };
|
||||||
|
|
@ -77,19 +77,23 @@ class AttendanceRefrenceDataModal extends Component {
|
||||||
refenceform.validateForm().then(f => {
|
refenceform.validateForm().then(f => {
|
||||||
if (f.isValid) {
|
if (f.isValid) {
|
||||||
const payload = refenceform.getFormParams();
|
const payload = refenceform.getFormParams();
|
||||||
const checkPayload = { salaryYearMonthStr: payload.salaryYearMonth, salarySobId: payload.salarySobId };
|
const checkPayload = {
|
||||||
|
salaryYearMonthStr: payload.salaryYearMonth,
|
||||||
|
salarySobIds: payload.salarySobIds.split(",")
|
||||||
|
};
|
||||||
this.setState({ loading: true });
|
this.setState({ loading: true });
|
||||||
checkOperation(checkPayload).then(({ status, errormsg: errormessage }) => {
|
checkOperation(checkPayload).then(({ status, errormsg: errormessage }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
syncAttendanceRefer(payload).then(({ status, errormsg }) => {
|
syncAttendanceRefer({ ...payload, salarySobIds: payload.salarySobIds.split(",") })
|
||||||
this.setState({ loading: false });
|
.then(({ status, errormsg }) => {
|
||||||
if (status) {
|
this.setState({ loading: false });
|
||||||
message.success("同步成功");
|
if (status) {
|
||||||
onCancel(true);
|
message.success("同步成功");
|
||||||
} else {
|
onCancel(true);
|
||||||
message.error(errormsg || "同步失败");
|
} else {
|
||||||
}
|
message.error(errormsg || "同步失败");
|
||||||
}).catch(() => this.setState({ loading: false }));
|
}
|
||||||
|
}).catch(() => this.setState({ loading: false }));
|
||||||
} else {
|
} else {
|
||||||
this.setState({ loading: false });
|
this.setState({ loading: false });
|
||||||
message.error(errormessage);
|
message.error(errormessage);
|
||||||
|
|
@ -212,9 +216,9 @@ class AttendanceRefrenceDataModal extends Component {
|
||||||
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>表头设置</Button>
|
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>表头设置</Button>
|
||||||
];
|
];
|
||||||
return (
|
return (
|
||||||
<WeaDialog {...this.props} style={{ width: 480, height: 174 }} buttons={buttons} initLoadCss>
|
<WeaDialog {...this.props} style={{ width: 535, height: 174 }} buttons={buttons} initLoadCss>
|
||||||
<div className="form-dialog-layout">
|
<div className="form-dialog-layout">
|
||||||
{getSearchs(refenceform, condition, 1)}
|
{getSearchs(refenceform, condition, 1, false, null, "", "multiple_select")}
|
||||||
</div>
|
</div>
|
||||||
{/* 表头设置 */}
|
{/* 表头设置 */}
|
||||||
<SelectItemModal {...headerSetPayload}
|
<SelectItemModal {...headerSetPayload}
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
|
|
||||||
getTaxAgentSelectList = async (props) => {
|
getTaxAgentSelectList = async (props) => {
|
||||||
const [salarySobList, empStatusList] = await Promise.all([getSalarysobListAll(), commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })]);
|
const [salarySobList, empStatusList] = await Promise.all([getSalarysobListAll(), commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })]);
|
||||||
getTaxAgentSelectList(true).then(({ status, data }) => {
|
getTaxAgentSelectList(props.isShare).then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
const conditions = _.map(condition, item => {
|
const conditions = _.map(condition, item => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,19 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Button, Col, Row } from "antd";
|
import { Button, Col, Row } from "antd";
|
||||||
import { WeaBrowser, WeaCheckbox, WeaDialog, WeaError, WeaSelect } from "ecCom";
|
import {
|
||||||
|
WeaBrowser,
|
||||||
|
WeaCheckbox,
|
||||||
|
WeaDialog,
|
||||||
|
WeaError,
|
||||||
|
WeaHelpfulTip,
|
||||||
|
WeaLocaleProvider,
|
||||||
|
WeaSelect,
|
||||||
|
WeaTextarea
|
||||||
|
} from "ecCom";
|
||||||
|
import { SQLHelpTip } from "../../components/PersonalScopeModal";
|
||||||
import "../ledger/index.less";
|
import "../ledger/index.less";
|
||||||
|
|
||||||
|
const { getLabel } = WeaLocaleProvider;
|
||||||
export default class AddTaxAgentModal extends React.Component {
|
export default class AddTaxAgentModal extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
|
|
@ -24,7 +35,7 @@ export default class AddTaxAgentModal extends React.Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
checkAll: "1"
|
checkAll: "1"
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
checkAll: "0"
|
checkAll: "0"
|
||||||
});
|
});
|
||||||
|
|
@ -38,10 +49,10 @@ export default class AddTaxAgentModal extends React.Component {
|
||||||
const { checkboxValue, ids, selectedKey } = this.state;
|
const { checkboxValue, ids, selectedKey } = this.state;
|
||||||
const payload = {
|
const payload = {
|
||||||
employeeStatus: checkboxValue.split(","),
|
employeeStatus: checkboxValue.split(","),
|
||||||
targetParams: _.map(ids.split(","), (it) => ({
|
targetParams: selectedKey !== "SQL" ? _.map(ids.split(","), (it) => ({
|
||||||
targetType: selectedKey,
|
targetType: selectedKey, target: "",
|
||||||
targetId: it
|
targetId: it
|
||||||
}))
|
})) : [{ targetType: selectedKey, targetId: "0", target: ids }]
|
||||||
};
|
};
|
||||||
if (_.isEmpty(ids) && _.isEmpty(checkboxValue)) {
|
if (_.isEmpty(ids) && _.isEmpty(checkboxValue)) {
|
||||||
this.refs.weaError.showError();
|
this.refs.weaError.showError();
|
||||||
|
|
@ -64,7 +75,7 @@ export default class AddTaxAgentModal extends React.Component {
|
||||||
this.setState({
|
this.setState({
|
||||||
selectedKey: "EMPLOYEE",
|
selectedKey: "EMPLOYEE",
|
||||||
checkboxValue: "",
|
checkboxValue: "",
|
||||||
checkAll: '0',
|
checkAll: "0",
|
||||||
ids: ""
|
ids: ""
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
@ -182,6 +193,18 @@ export default class AddTaxAgentModal extends React.Component {
|
||||||
/>
|
/>
|
||||||
</WeaError>
|
</WeaError>
|
||||||
)}
|
)}
|
||||||
|
{this.state.selectedKey === "SQL" && (
|
||||||
|
<WeaError tipPosition="bottom"
|
||||||
|
style={{ width: "100%" }}
|
||||||
|
ref="weaError"
|
||||||
|
error={getLabel(111, "请输入SQL")}>
|
||||||
|
<div style={{ display: "flex", alignItems: "center" }}>
|
||||||
|
<WeaTextarea minRows={2} viewAttr={3} style={{ width: 270 }} value={this.state.ids}
|
||||||
|
onChange={ids => this.setState({ ids })}/>
|
||||||
|
<WeaHelpfulTip style={{ marginLeft: 10 }} width={280} placement="topLeft" title={<SQLHelpTip/>}/>
|
||||||
|
</div>
|
||||||
|
</WeaError>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
@ -197,13 +220,13 @@ export default class AddTaxAgentModal extends React.Component {
|
||||||
if (checkAll === "1") {
|
if (checkAll === "1") {
|
||||||
const checked = _.map(employeeStatus, it => it.id);
|
const checked = _.map(employeeStatus, it => it.id);
|
||||||
this.setState({
|
this.setState({
|
||||||
checkAll: '1',
|
checkAll: "1",
|
||||||
checkboxValue: checked.join(",")
|
checkboxValue: checked.join(",")
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.setState({
|
this.setState({
|
||||||
checkAll: '0',
|
checkAll: "0",
|
||||||
checkboxValue: ''
|
checkboxValue: ""
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}}/>
|
}}/>
|
||||||
|
|
|
||||||
|
|
@ -70,6 +70,40 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.multiple_select {
|
||||||
|
.wea-select-input .arrow {
|
||||||
|
position: absolute;
|
||||||
|
right: 4px;
|
||||||
|
top: 8px;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wdb {
|
||||||
|
word-break: break-all !important;
|
||||||
|
word-wrap: break-word !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select-input {
|
||||||
|
height: 30px;
|
||||||
|
white-space: nowrap;
|
||||||
|
min-width: 100px;
|
||||||
|
max-width: 345px;
|
||||||
|
width: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px 17px 4px 4px;
|
||||||
|
position: relative;
|
||||||
|
min-height: 30px;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
user-select: none;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//公式编辑框样式
|
//公式编辑框样式
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ export const getConditionFields = (condition) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
// 渲染form表单: 一般对form的渲染都统一使用该方法
|
||||||
export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title) => {
|
export const getSearchs = (form, condition, col, isCenter, onChange = () => void (0), title, classnames = "") => {
|
||||||
const { isFormInit } = form;
|
const { isFormInit } = form;
|
||||||
const formParams = form.getFormParams();
|
const formParams = form.getFormParams();
|
||||||
let group = [];
|
let group = [];
|
||||||
|
|
@ -41,7 +41,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void
|
||||||
wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例
|
wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例
|
||||||
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
|
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
|
||||||
tipPosition="bottom" // 错误提示的显示位置: top/bottom
|
tipPosition="bottom" // 错误提示的显示位置: top/bottom
|
||||||
className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : ""}
|
className={(fields.domkey[0] === "subcompanyName" || fields.domkey[0] === "departmentName") ? "hideFormItem" : classnames}
|
||||||
>
|
>
|
||||||
<WeaSwitch
|
<WeaSwitch
|
||||||
fieldConfig={fields}
|
fieldConfig={fields}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue