diff --git a/pc4mobx/hrmSalary/apis/index.js b/pc4mobx/hrmSalary/apis/index.js
index ccc70771..553733d0 100644
--- a/pc4mobx/hrmSalary/apis/index.js
+++ b/pc4mobx/hrmSalary/apis/index.js
@@ -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) => {
diff --git a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js
index b6fd6ffb..d0718a2f 100644
--- a/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js
+++ b/pc4mobx/hrmSalary/components/PersonalScopeModal/index.js
@@ -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
+ this.setState({ targetTypeIds: val, targetTypeIdsNames: val })}/>
+ }/>
+
;
default:
break;
}
@@ -259,3 +283,13 @@ class PersonalScopeModal extends Component {
}
export default PersonalScopeModal;
+
+export const SQLHelpTip = () => {
+ return
+
{getLabel(111, "注意事项:")}
+
{getLabel(111, "1、sql需返回人员id")}
+
{getLabel(111, "2、sql结尾不需要 ; go /等符号")}
+
{getLabel(111, "使用例子:定义获取岗位是开发的人员")}
+
{getLabel(111, "select id from hrmresource where JOBTITLE = 17")}
+
;
+};
diff --git a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
index 614973f1..0514dc38 100644
--- a/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
+++ b/pc4mobx/hrmSalary/pages/calculate/doCalc/components/salaryEditCalc/index.less
@@ -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;
+ }
}
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js
index dc082d76..658d0808 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/columns.js
@@ -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
},
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js
index 634d36fe..f1e9b4fd 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceDataViewSlide.js
@@ -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 } }));
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js
index 14de4956..c8fdb4b9 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/components/attendanceRefrenceDataModal.js
@@ -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 {
];
return (
-
+
- {getSearchs(refenceform, condition, 1)}
+ {getSearchs(refenceform, condition, 1, false, null, "", "multiple_select")}
{/* 表头设置 */}
{
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 {
diff --git a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
index 23d14a23..fae1b5c6 100644
--- a/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
+++ b/pc4mobx/hrmSalary/pages/taxAgent/addTaxAgentModal.js
@@ -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 {
/>
)}
+ {this.state.selectedKey === "SQL" && (
+
+
+ this.setState({ ids })}/>
+ }/>
+
+
+ )}
@@ -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: ""
});
}
}}/>
diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less
index 6296eac4..d238e695 100644
--- a/pc4mobx/hrmSalary/style/index.less
+++ b/pc4mobx/hrmSalary/style/index.less
@@ -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;
+ }
+ }
}
//公式编辑框样式
diff --git a/pc4mobx/hrmSalary/util/index.js b/pc4mobx/hrmSalary/util/index.js
index 3f5e47bd..cf13077a 100644
--- a/pc4mobx/hrmSalary/util/index.js
+++ b/pc4mobx/hrmSalary/util/index.js
@@ -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}
>