Merge branch 'release/2.15.1.2407.01' into release/2.15.1.2407.01-个税

This commit is contained in:
黎永顺 2024-08-16 09:39:58 +08:00
commit 90ee27ba2e
10 changed files with 138 additions and 32 deletions

View File

@ -37,7 +37,7 @@ export const getDetailChanges = 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) => {

View File

@ -5,13 +5,24 @@
* Date: 2022/11/30
*/
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 { getTaxAgentRangeForm } from "../../apis/taxAgent";
import { commonEnumList } from "../../apis/ruleconfig";
import { SelectWithAll } from "../../pages/socialSecurityBenefits/standingBookDetail/components/regAddEmployee";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
class PersonalScopeModal extends Component {
constructor(props) {
super(props);
@ -91,6 +102,11 @@ class PersonalScopeModal extends Component {
key: "POSITION",
showname: "岗位",
selected: false
},
{
key: "SQL",
showname: "SQL",
selected: false
}
];
this.setState({
@ -124,7 +140,9 @@ class PersonalScopeModal extends Component {
const payload = {
employeeStatus: status.split(","),
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"]
};
this.setState({ loading: true });
@ -156,6 +174,12 @@ class PersonalScopeModal extends Component {
case "POSITION":
browserType = { ...browserType, type: 278, title: "岗位选择" };
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:
break;
}
@ -259,3 +283,13 @@ class PersonalScopeModal extends Component {
}
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>;
};

View File

@ -33,6 +33,15 @@
display: flex;
align-items: center;
width: 100%;
& > span:first-child {
display: inline-block;
min-width: 44px;
}
& > span:last-child {
flex: 1;
}
}
}

View File

@ -128,7 +128,7 @@ export const conditions = [
isQuickSearch: false,
label: "类型",
labelcol: 6,
valueList:[],
valueList: [],
options: [
{
key: "NUMBER",
@ -185,13 +185,14 @@ export const reFrenceConditions = [
{
colSpan: 1,
conditionType: "SELECT",
domkey: ["salarySobId"],
domkey: ["salarySobIds"],
fieldcol: 18,
isQuickSearch: false,
label: "薪资账套",
labelcol: 6,
valueList:[],
valueList: [],
options: [],
multiple: true,
rules: "required|string",
viewAttr: 3
},

View File

@ -27,6 +27,7 @@ class AttendanceDataViewSlide extends Component {
this.viewAttendQuote({}, nextProps);
} else if (nextProps.visible !== this.props.visible && !nextProps.visible) {
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({
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
// 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 } }));

View File

@ -55,7 +55,7 @@ class AttendanceRefrenceDataModal extends Component {
...item,
items: _.map(items, 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 };
@ -77,19 +77,23 @@ class AttendanceRefrenceDataModal extends Component {
refenceform.validateForm().then(f => {
if (f.isValid) {
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 });
checkOperation(checkPayload).then(({ status, errormsg: errormessage }) => {
if (status) {
syncAttendanceRefer(payload).then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("同步成功");
onCancel(true);
} else {
message.error(errormsg || "同步失败");
}
}).catch(() => this.setState({ loading: false }));
syncAttendanceRefer({ ...payload, salarySobIds: payload.salarySobIds.split(",") })
.then(({ status, errormsg }) => {
this.setState({ loading: false });
if (status) {
message.success("同步成功");
onCancel(true);
} else {
message.error(errormsg || "同步失败");
}
}).catch(() => this.setState({ loading: false }));
} else {
this.setState({ loading: false });
message.error(errormessage);
@ -212,9 +216,9 @@ class AttendanceRefrenceDataModal extends Component {
<Button type="ghost" onClick={this.handleHeaderSetting} loading={headerSetLoading}>表头设置</Button>
];
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">
{getSearchs(refenceform, condition, 1)}
{getSearchs(refenceform, condition, 1, false, null, "", "multiple_select")}
</div>
{/* 表头设置 */}
<SelectItemModal {...headerSetPayload}

View File

@ -71,7 +71,7 @@ class StatisticalMicroSettingsSlide extends Component {
getTaxAgentSelectList = async (props) => {
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) {
const conditions = _.map(condition, item => {
return {

View File

@ -1,8 +1,19 @@
import React from "react";
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";
const { getLabel } = WeaLocaleProvider;
export default class AddTaxAgentModal extends React.Component {
constructor(props) {
super(props);
@ -24,7 +35,7 @@ export default class AddTaxAgentModal extends React.Component {
this.setState({
checkAll: "1"
});
}else{
} else {
this.setState({
checkAll: "0"
});
@ -38,10 +49,10 @@ export default class AddTaxAgentModal extends React.Component {
const { checkboxValue, ids, selectedKey } = this.state;
const payload = {
employeeStatus: checkboxValue.split(","),
targetParams: _.map(ids.split(","), (it) => ({
targetType: selectedKey,
targetParams: selectedKey !== "SQL" ? _.map(ids.split(","), (it) => ({
targetType: selectedKey, target: "",
targetId: it
}))
})) : [{ targetType: selectedKey, targetId: "0", target: ids }]
};
if (_.isEmpty(ids) && _.isEmpty(checkboxValue)) {
this.refs.weaError.showError();
@ -64,7 +75,7 @@ export default class AddTaxAgentModal extends React.Component {
this.setState({
selectedKey: "EMPLOYEE",
checkboxValue: "",
checkAll: '0',
checkAll: "0",
ids: ""
});
};
@ -182,6 +193,18 @@ export default class AddTaxAgentModal extends React.Component {
/>
</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>
</Col>
</Row>
@ -197,13 +220,13 @@ export default class AddTaxAgentModal extends React.Component {
if (checkAll === "1") {
const checked = _.map(employeeStatus, it => it.id);
this.setState({
checkAll: '1',
checkAll: "1",
checkboxValue: checked.join(",")
});
} else {
this.setState({
checkAll: '0',
checkboxValue: ''
checkAll: "0",
checkboxValue: ""
});
}
}}/>

View File

@ -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;
}
}
}
//公式编辑框样式

View File

@ -26,7 +26,7 @@ export const getConditionFields = (condition) => {
};
// 渲染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 formParams = form.getFormParams();
let group = [];
@ -41,7 +41,7 @@ export const getSearchs = (form, condition, col, isCenter, onChange = () => void
wrapperCol={{ span: `${fields.fieldcol}` }} // 右侧控件占一行比例
error={form.getError(fields)} // 错误提示: 处理表单中有必填项,保存的校验
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
fieldConfig={fields}