Compare commits

...

29 Commits

Author SHA1 Message Date
lys 7d5e03c44f custom-旭化成 2025-05-29 10:48:32 +08:00
lys e8ca321a13 Merge branch 'release/3.0.1.2504.01-合并业务线' into custom-旭化成 2025-05-28 18:40:44 +08:00
lys 693c436d4a Merge branch 'release/2.19.1.2501.01' into release/3.0.1.2504.01-合并业务线 2025-05-20 16:50:29 +08:00
lys 07c40750da release/2.19.1.2501.01 2025-05-19 16:04:11 +08:00
lys a4c08b937b release/2.19.1.2501.01 2025-05-13 13:53:35 +08:00
lys 9e26192aa2 release/2.19.1.2501.01 2025-05-09 19:14:38 +08:00
lys 2e832e3aa9 Merge branch 'release/2.19.1.2501.01' into release/3.0.1.2504.01-合并业务线 2025-04-30 10:24:00 +08:00
lys d540698c57 release/2.19.1.2501.01 2025-04-30 10:23:36 +08:00
lys 82322ade91 Merge branch 'feature/2.19.1.2501.01-验证码验证' into release/3.0.1.2504.01-合并业务线 2025-04-25 15:58:21 +08:00
lys abbf593c99 feature/2.19.1.2501.01-验证码验证 2025-04-25 15:58:01 +08:00
lys 0d766a1513 Merge branch 'feature/2.19.1.2501.01-验证码验证' into release/3.0.1.2504.01-合并业务线 2025-04-25 15:47:43 +08:00
lys 04b3415353 release/2.19.1.2501.01 2025-04-25 13:38:43 +08:00
lys 6201978987 Merge branch 'release/2.19.1.2501.01' into release/3.0.1.2504.01-合并业务线 2025-04-25 09:51:41 +08:00
lys e539f7b040 release/2.19.1.2501.01 2025-04-25 09:51:19 +08:00
lys 334a7660a9 Merge branch 'release/2.19.1.2501.01' into release/3.0.1.2504.01-合并业务线 2025-04-24 16:59:41 +08:00
lys e9d301927f release/2.19.1.2501.01 2025-04-24 16:50:18 +08:00
lys dee1059ca7 release/2.19.1.2501.01 2025-04-24 16:38:36 +08:00
lys 4ecde5921e release/3.0.1.2504.01-合并业务线 2025-04-24 15:50:23 +08:00
lys 5c02dc876c release/3.0.1.2504.01-合并业务线 2025-04-24 14:37:36 +08:00
lys 4ca0a4b756 Merge branch 'release/2.19.1.2501.01' into release/3.0.1.2504.01-合并业务线 2025-04-23 17:41:18 +08:00
lys 9a50947d8a release/2.19.1.2501.01 2025-04-23 17:34:46 +08:00
lys d652b2cdc6 release/2.19.1.2501.01 2025-04-23 16:13:49 +08:00
lys cafe21b3fe Merge branch 'release/2.19.1.2501.01' into release/3.0.1.2504.01-合并业务线 2025-04-22 09:37:31 +08:00
lys 51ac08d6fc release/2.19.1.2501.01 2025-04-22 09:35:04 +08:00
lys 1b1ac94c15 custom-旭化成 2025-01-07 17:35:31 +08:00
lys 7d49e19bd9 custom-旭化成 2025-01-07 17:24:47 +08:00
lys b17bf10327 custom-旭化成 2025-01-06 17:23:12 +08:00
lys c3ea99d974 custom-旭化成 2025-01-06 16:09:02 +08:00
lys 4c147d79dd custom-旭化成 2025-01-06 15:45:25 +08:00
27 changed files with 516 additions and 131 deletions

View File

@ -0,0 +1,15 @@
import { postExportFetch, postFetch } from "../../util/request";
// 旭化成-报表查询
export const getxhcDepartmentReport = (params) => {
return postFetch("/api/bs/hrmsalary/salaryacct/xhcDepartmentReport/list", params);
};
// 旭化成-报表合计行
export const getxhcDepartmentReportSum = (params) => {
return postFetch("/api/bs/hrmsalary/salaryacct/xhcDepartmentReport/sum", params);
};
// 旭化成-报表导出
export const exportXhcDepartmentReport = (params) => {
return postExportFetch("/api/bs/hrmsalary/salaryacct/xhcDepartmentReport/export", params);
};

View File

@ -202,8 +202,12 @@ export const salaryBillSendSum = (params) => {
return postFetch("/api/bs/hrmsalary/salaryBill/send/sum", params);
};
//工资单发放-发送短信验证码
export const sendMobileCode = (params) => {
return postFetch("/api/bs/hrmsalary/salaryBill/sendMobileCode", params);
export const sendMobileCode = (params, header = {}) => {
return postFetch("/api/bs/hrmsalary/salaryBill/sendMobileCode", params, header);
};
//工资单发放-发送短信验证码
export const checkMobileCode = (params, header = {}) => {
return postFetch("/api/bs/hrmsalary/salaryBill/checkMobileCode", params, header);
};
//工资单-验证方式
export const payrollCheckType = params => {

View File

@ -6,31 +6,32 @@
*/
import React, { Component } from "react";
import { WeaDialog, WeaError, WeaFormItem, WeaInput, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
import { sendMobileCode } from "../../apis/payroll";
import { Button } from "antd";
import { WeaForm, WeaSwitch } from "comsMobx";
import { checkMobileCode, sendMobileCode } from "../../apis/payroll";
import { getQueryString } from "../../util/url";
import FormInfo from "../FormInfo";
import { captchaCondition } from "../../pages/mobilePayroll/pwdCondtion";
import MobileModal from "../../pages/mobilePayroll/mobileModal";
import { Button, message } from "antd";
import "./index.less";
const form = new WeaForm();
const { getLabel } = WeaLocaleProvider;
class Index extends Component {
constructor(props) {
super(props);
this.state = {
captcha: "",
time: 60
};
this.state = { captcha: "", time: 60 };
this.timeRef = null;
}
componentDidMount() {
form.initFormFields(captchaCondition);
}
componentWillUnmount() {
clearInterval(this.timeRef);
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
clearInterval(this.timeRef);
this.setState({ captcha: "", time: 60 });
}
this.setState({ captcha: "", time: 60 });
}
handleSendCaptcha = () => {
@ -48,44 +49,73 @@ class Index extends Component {
}
});
};
handleConfirm = () => {
if (!this.state.captcha) {
handleConfirm = async () => {
const type = getQueryString("type"), f = await form.validateForm();
if (!this.state.captcha && type !== "phone") {
this.refs.weaError.showError();
// return
return;
} else if (!f.isValid && type === "phone") {
f.showErrors();
return;
}
this.props.onCancel();
this.props.onConfirm();
checkMobileCode({ id: this.props.id, mobileCode: this.state.captcha }).then(({ status, errormsg }) => {
if (status) {
this.props.onCancel();
this.props.onConfirm();
} else {
message.error(errormsg);
}
});
};
render() {
const { captcha, time } = this.state;
return (
<WeaDialog
initLoadCss {...this.props} style={{ width: 550 }}
className="captchaWrapper" title={getLabel(111, "验证码验证")}
buttons={[
<Button type="primary" onClick={this.handleConfirm}>{getLabel(826, "确定")}</Button>
]}
>
<WeaSearchGroup needTigger={false} title="" showGroup>
<WeaFormItem
label={getLabel(111, "验证码")}
labelCol={{ span: 8 }}
wrapperCol={{ span: 16 }}
>
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(826, "验证码未填写")}>
<div className="captchaInputBox">
<WeaInput value={captcha} onChange={captcha => this.setState({ captcha })}/>
<Button type="primary" onClick={this.handleSendCaptcha} disabled={time !== 60}>
{
time === 60 ? getLabel(111, "发送验证码") : `${time}S`
}
</Button>
</div>
</WeaError>
</WeaFormItem>
</WeaSearchGroup>
</WeaDialog>
const { captcha, time } = this.state, type = getQueryString("type");
const itemRender = {
mobileCode: (field, textAreaProps, form, formParams) => {
return (<div className="captchaInputBox">
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}
onChange={() => this.setState({ captcha: form.getFormParams().mobileCode })}/>
<Button type="primary" onClick={this.handleSendCaptcha} disabled={time !== 60}>
{
time === 60 ? getLabel(111, "发送验证码") : `${time}S`
}
</Button>
</div>);
}
};
return (<React.Fragment>
{
type === "phone" ? <MobileModal title={getLabel(111, "验证码验证")} onConfirm={this.handleConfirm}>
<FormInfo center={false} itemRender={itemRender} form={form} formFields={captchaCondition}/>
</MobileModal> :
<WeaDialog
initLoadCss {...this.props} style={{ width: 550 }}
className="captchaWrapper" title={getLabel(111, "验证码验证")}
buttons={[
<Button type="primary" onClick={this.handleConfirm}>{getLabel(826, "确定")}</Button>
]}
>
<WeaSearchGroup needTigger={false} title="" showGroup>
<WeaFormItem
label={getLabel(111, "验证码")}
labelCol={{ span: 8 }}
wrapperCol={{ span: 16 }}
>
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(111, "验证码未填写")}>
<div className="captchaInputBox">
<WeaInput value={captcha} onChange={captcha => this.setState({ captcha })}/>
<Button type="primary" onClick={this.handleSendCaptcha} disabled={time !== 60}>
{
time === 60 ? getLabel(111, "发送验证码") : `${time}S`
}
</Button>
</div>
</WeaError>
</WeaFormItem>
</WeaSearchGroup>
</WeaDialog>
}
</React.Fragment>
);
}
}

View File

@ -5,25 +5,25 @@
.wea-form-item-wrapper {
.wea-error {
width: 100%;
.captchaInputBox {
display: flex;
align-items: center;
.wea-input-normal {
flex: 1;
}
button {
padding: 8px 10px;
border-radius: 0;
min-width: 80px;
text-align: center;
height: 30px;
line-height: 15px;
}
}
}
}
}
}
.captchaInputBox {
display: flex;
align-items: center;
.wea-input-normal {
flex: 1;
}
button {
padding: 8px 10px;
border-radius: 0;
min-width: 80px;
text-align: center;
height: 30px;
line-height: 15px;
}
}

View File

@ -56,6 +56,8 @@ import SupplementaryCalc from "./pages/supplementaryCalc";
import VariableSalary from "./pages/variableSalary";
import Datapush from "./pages/datapush";
import Layout from "./layout";
import CustomRoutes from "./pages/custom-pages";
import stores from "./stores";
import "./style/index";
// 读取系统多语言配置
@ -123,6 +125,7 @@ const Routes = (
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
<Route key="supplementaryCalc" path="supplementaryCalc" component={SupplementaryCalc}/>
<Route key="variableSalary" path="variableSalary" component={VariableSalary}/>
{CustomRoutes}
</Route>
);

View File

@ -166,7 +166,7 @@ class SalaryDetails extends Component {
this.postMessageToChild({
dataSource, pageInfo, selectedRowKeys, showTotalCell, calcDetail: true, tableScrollHeight: 154, sumRow,
columns: _.map(columns, (it, idx) => ({
dataIndex: it.column || it.dataIndex, title: it.text || it.title, calcDetail: true,
dataIndex: it.column || it.dataIndex, title: it.text || it.title, calcDetail: true, showSee: false,
width: (it.dataIndex === "taxAgent" || it.dataIndex === "salarySob") ? 176 : (it.width || it.oldWidth),
fixed: (idx === 1 || idx === 0 || idx === 2) ? "left" : "",
ellipsis: true

View File

@ -239,6 +239,8 @@
position: relative;
margin-top: 10px;
transition: margin-top .3s;
max-height: 80vh;
overflow: auto;
.anchor-list-ink {
position: absolute;

View File

@ -0,0 +1,10 @@
import React from "react";
import Route from "react-router/lib/Route";
import DepartmentReport from "./xhc/departmentReport";
const CustomRoutes = [
<Route key="customPage_departmentReport_xhc" path="customPage_departmentReport_xhc"
component={DepartmentReport}/>
];
export default CustomRoutes;

View File

@ -0,0 +1,77 @@
export const xhcConditions = [
{
items: [
{
conditionType: "INPUT",
domkey: ["salaryMonth"],
fieldcol: 18,
label: "薪资所属月",
labelcol: 6,
value: "",
viewAttr: 2
},
{
browserConditionParam: {
completeParams: {},
conditionDataParams: {},
dataParams: {},
destDataParams: {},
hasAddBtn: false,
hasAdvanceSerach: true,
idSeparator: ",",
isAutoComplete: 1,
isDetail: 0,
isMultCheckbox: false,
isSingle: false,
linkUrl: "",
pageSize: 10,
quickSearchName: "",
replaceDatas: [],
title: "所属公司",
type: "164",
viewAttr: 2
},
colSpan: 2,
conditionType: "BROWSER",
domkey: ["subCompanyIds"],
fieldcol: 18,
isQuickSearch: false,
label: "所属公司",
labelcol: 6,
viewAttr: 2
},
{
browserConditionParam: {
completeParams: {},
conditionDataParams: {},
dataParams: {},
destDataParams: {},
hasAddBtn: false,
hasAdvanceSerach: true,
idSeparator: ",",
isAutoComplete: 1,
isDetail: 0,
isMultCheckbox: false,
isSingle: false,
linkUrl: "",
pageSize: 10,
quickSearchName: "",
replaceDatas: [],
title: "所属部门",
type: "57",
viewAttr: 2
},
colSpan: 2,
conditionType: "BROWSER",
domkey: ["departmentIds"],
fieldcol: 18,
isQuickSearch: false,
label: "所属部门",
labelcol: 6,
viewAttr: 2
}
],
title: "",
defaultshow: true
}
];

View File

@ -0,0 +1,155 @@
import React, { Component } from "react";
import { inject, observer } from "mobx-react";
import { WeaLoadingGlobal, WeaLocaleProvider, WeaTop } from "ecCom";
import FormInfo from "../../../components/FormInfo";
import { xhcConditions } from "./conditions";
import * as API from "../../../apis/custom-apis/xhc";
import { MonthRangePicker } from "../../reportView/components/statisticalMicroSettingsSlide";
import moment from "moment";
import { WeaSwitch } from "comsMobx";
import { Button, Spin } from "antd";
import "./index.less";
const getLabel = WeaLocaleProvider.getLabel;
@inject("XHCStore")
@observer
class DepartmentReport extends Component {
constructor(props) {
super(props);
this.state = {
dataSource: [], columns: [], loading: false, queryData: {
fromDate: moment(new Date()).startOf("month").format("YYYY-MM-DD"),
toDate: moment(new Date()).startOf("month").format("YYYY-MM-DD"),
subCompanyIds: [], departmentIds: []
}
};
}
componentDidMount() {
const { XHCStore: { form } } = this.props;
form.initFormFields(xhcConditions);
window.addEventListener("message", this.handleReceive, false);
}
componentWillUnmount() {
window.removeEventListener("message", this.handleReceive, false);
}
handleReceive = async ({ data }) => {
const { type } = data;
if (type === "init") this.getxhcDepartmentReport();
};
getxhcDepartmentReport = () => {
const { queryData } = this.state;
this.setState({ loading: true });
API.getxhcDepartmentReport({ ...queryData }).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { data: dataSource, column } = data;
this.setState({
dataSource: _.map(dataSource, (o, i) => ({ ...o, id: i + 1 })),
columns: [{ dataIndex: "id", title: getLabel(111, "序号"), width: 60 }, ..._.map(column, o => ({
dataIndex: o.column, title: o.text, width: o.width
}))]
}, () => {
this.postMessageToChild({
columns: this.state.columns, dataSource: this.state.dataSource, unitTableType: "-999",
scrollHeight: 95, showRowSelection: false, showTotalCell: true
});
});
this.getxhcDepartmentReportSum({
columns: this.state.columns, dataSource: this.state.dataSource, unitTableType: "-999",
scrollHeight: 95, showRowSelection: false, showTotalCell: true
});
}
});
};
getxhcDepartmentReportSum = (payload) => {
const { queryData } = this.state;
API.getxhcDepartmentReportSum(queryData).then(({ status, data }) => {
if (status) {
const { sumRow: sumDataSource } = data;
this.postMessageToChild({ ...payload, sumDataSource });
}
});
};
postMessageToChild = (payload = {}) => {
const i18n = { "总计": getLabel(523, "总计") };
const childFrameObj = document.getElementById("unitTable");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
};
handleExport = () => {
const { queryData } = this.state;
WeaLoadingGlobal.start();
const promise = API.exportXhcDepartmentReport(queryData);
};
render() {
const { XHCStore: { form } } = this.props, { queryData, dataSource, loading } = this.state, {
fromDate, toDate
} = queryData;
const dateRange = [moment(fromDate).format("YYYY-MM"), moment(toDate).format("YYYY-MM")];
const dom = document.querySelector(".wea-new-top-content");
let height = 280;
if (dom && dataSource.length > 0) height = parseFloat(dom.style.height) - 88;
const itemRender = {
salaryMonth: (field, textAreaProps, form, formParams) => {
return (<div className="mounth-range">
<MonthRangePicker dateRange={dateRange} viewAttr={2}
onChange={([start, end]) => {
if (!start || !end) return;
this.setState({
queryData: {
...queryData,
fromDate: moment(start).startOf("month").format("YYYY-MM-DD"),
toDate: moment(end).startOf("month").format("YYYY-MM-DD")
}
}, () => this.getxhcDepartmentReport());
}}/>
</div>);
},
subCompanyIds: (field, textAreaProps, form, formParams) => {
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}
onChange={() => {
const subCompanyIds = form.getFormParams().subCompanyIds;
this.setState({
queryData: {
...queryData, subCompanyIds: subCompanyIds ? subCompanyIds.split(",") : []
}
}, () => this.getxhcDepartmentReport());
}}/>);
},
departmentIds: (field, textAreaProps, form, formParams) => {
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}
onChange={() => {
const departmentIds = form.getFormParams().departmentIds;
this.setState({
queryData: {
...queryData, departmentIds: departmentIds ? departmentIds.split(",") : []
}
}, () => this.getxhcDepartmentReport());
}}/>);
}
};
return (<WeaTop
title={getLabel(111, "部门工资汇总表")} buttonSpace={10} className="xhc_report"
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
buttons={[<Button type="primary" onClick={this.handleExport}>{getLabel(17416, "导出")}</Button>]}>
<FormInfo center={false} form={form} formFields={xhcConditions} colCount={3} itemRender={itemRender}/>
<div style={{ height: height + "px" }}>
<Spin spinning={loading}>
<iframe
style={{ border: 0, width: "100%", height: "100%" }}
// src="http://localhost:7607/#/unitTable"
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
id="unitTable"
/>
</Spin>
</div>
</WeaTop>);
}
}
export default DepartmentReport;

View File

@ -0,0 +1,26 @@
.xhc_report {
.ant-spin-nested-loading, .ant-spin-container {
height: 100%;
}
.wea-new-top-content {
background: #f6f6f6;
padding: 8px 16px 0 16px;
}
.wea-search-group {
margin-bottom: 8px;
background: #FFF;
}
.mounth-range {
.rangePickerBox {
display: flex;
align-items: center;
}
.label {
color: #999;
}
}
}

View File

@ -5,9 +5,9 @@
* Date: 2023/3/7
*/
import React, { Component } from "react";
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
import { Button } from "antd";
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTop } from "ecCom";
import { viewAttendQuote } from "../../../../apis/attendance";
import { Button, Spin } from "antd";
import "./index.less";
const { getLabel } = WeaLocaleProvider;
@ -16,11 +16,31 @@ class AttendanceDataViewSlide extends Component {
constructor(props) {
super(props);
this.state = {
loading: { query: false }, keyword: "", dataSource: [], columns: [],
pageInfo: { current: 1, pageSize: 10, total: 0 }
loading: { query: false }, keyword: "", dataSource: [], pageInfo: { current: 1, pageSize: 10, total: 0 }
};
}
componentDidMount() {
window.addEventListener("message", this.handleReceive, false);
}
componentWillUnmount() {
window.removeEventListener("message", this.handleReceive, false);
}
handleReceive = async ({ data }) => {
const { type, payload: { id, params } = {} } = data;
if (type === "turn") {
switch (id) {
case "PAGEINFO":
this.setState({ pageInfo: { ...this.state.pageInfo, ...params } }, () => this.viewAttendQuote());
break;
default:
break;
}
}
};
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.visible !== this.props.visible && nextProps.visible) {
document.querySelector(".attendanceRefWrapper").classList.add("zIndex0-attendance");
@ -33,19 +53,29 @@ class AttendanceDataViewSlide extends Component {
viewAttendQuote = (extraPayload = {}, props) => {
const { loading, pageInfo, keyword } = this.state;
const { attendQuoteId } = props;
const { attendQuoteId } = props || this.props;
this.setState({ loading: { ...loading, query: true } });
viewAttendQuote({ ...pageInfo, attendQuoteId, keyword, ...extraPayload }).then(({ status, data }) => {
this.setState({ loading: { ...loading, query: false } });
if (status) {
const { columns, list: dataSource, pageNum: current, pageSize, total } = data.pageInfo;
this.setState({
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : null }))
});
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource
}, () => this.postMessageToChild({
pageInfo: this.state.pageInfo, dataSource, showRowSelection: false, unitTableType: "attendanceView",
columns: _.map(columns, (o, i) => ({ ...o, width: 150, fixed: i === 0 ? "left" : false }))
}));
}
}).catch(() => this.setState({ loading: { ...loading, query: false } }));
};
postMessageToChild = (payload = {}) => {
const i18n = {
"操作": getLabel(30585, "操作"), "编辑": getLabel(111, "编辑"), "共": getLabel(18609, "共"),
"条": getLabel(18256, "条")
};
const childFrameObj = document.getElementById("attendanceViewTable");
childFrameObj && childFrameObj.contentWindow.postMessage(JSON.stringify({ ...payload, i18n }), "*");
};
handleExportAttendQuote = () => {
if (!this.handleDebounce) {
this.handleDebounce = _.debounce(() => {
@ -60,24 +90,7 @@ class AttendanceDataViewSlide extends Component {
render() {
const { showOperateBtn, salaryYearMonth, ...extra } = this.props;
const { columns, dataSource, loading, pageInfo, keyword } = this.state;
const pagination = {
...pageInfo,
showTotal: (total) => `${total}`,
pageSizeOptions: ["10", "20", "50", "100"],
showSizeChanger: true,
showQuickJumper: true,
onShowSizeChange: (current, pageSize) => {
this.setState({
pageInfo: { ...pageInfo, current, pageSize }
}, () => this.viewAttendQuote({}, this.props));
},
onChange: (current) => {
this.setState({
pageInfo: { ...pageInfo, current }
}, () => this.viewAttendQuote({}, this.props));
}
};
const { loading, keyword } = this.state;
const btns = [
<Button type="primary" onClick={this.handleExportAttendQuote}>{getLabel(81272, "导出全部")}</Button>,
<WeaInputSearch
@ -100,9 +113,16 @@ class AttendanceDataViewSlide extends Component {
<div>{getLabel(543376, "考勤周期")}{salaryYearMonth}</div>
<div></div>
</div>
<WeaTable
columns={columns} dataSource={dataSource} bordered pagination={pagination}
loading={loading.query} scroll={{ x: 1200, y: `calc(100vh - 240px)` }}/>
<div style={{ height: `calc(100% - 40px)` }}>
<Spin spinning={loading.query}>
<iframe
style={{ border: 0, width: "100%", height: "100%" }}
// src="http://localhost:7607/#/unitTable"
src="/spa/hrmSalary/hrmSalaryCalculateDetail/index.html#/unitTable"
id="attendanceViewTable"
/>
</Spin>
</div>
</div>
}
/>

View File

@ -54,8 +54,8 @@
margin-bottom: 8px;
}
.wea-new-table {
background: #FFF;
.ant-spin-nested-loading, .ant-spin-container {
height: 100%;
}
}

View File

@ -73,9 +73,14 @@ class CustomTreeSelect extends Component {
const { itemName } = detail;
return (
<TreeSelect dropdownStyle={{ maxHeight: 320, overflow: "auto" }} defaultValue={itemName}
dropdownMatchSelectWidth className="custom_item_treeselect"
dropdownMatchSelectWidth className="custom_item_treeselect" showSearch
loadData={(node) => this.getSourceItem(node.props.value)}
onSelect={this.handleSelect}>
onSelect={this.handleSelect}
treeNodeFilterProp="title"
filterTreeNode={(inputValue, treeNode) => {
const title = treeNode.props.title.props ? treeNode.props.title.props.children[0].props.children : treeNode.props.title;
return title.toLowerCase().indexOf(inputValue.toLowerCase()) >= 0;
}}>
{
_.map(sourceList, o => (
<TreeNode title={o.value} key={o.key} value={o.key} isLeaf={o.isLeaf} selectable={false}>

View File

@ -17,7 +17,7 @@ class Index extends Component {
return (
<div className="salary-btn-flex">
<div className="mounth-range">
<span className="label">{getLabel(543549, "薪资所属月")}</span>
<span className="label">{getLabel(111, "税款所属期")}</span>
<MonthRangePicker dateRange={dateRange} viewAttr={2}
onChange={v => this.props.onChange({ dateRange: v })}/>
</div>

View File

@ -8,7 +8,7 @@ import React, { Component } from "react";
import { WeaLocaleProvider, WeaTable } from "ecCom";
import { Dropdown, Menu, message, Modal } from "antd";
import { getDeclareList, withDrawTaxDeclaration } from "../../../../apis/declare";
import { sysConfCodeRule } from "../../../../apis/ruleconfig";
import { sysConfCodeRule, sysinfo } from "../../../../apis/ruleconfig";
const getLabel = WeaLocaleProvider.getLabel;
@ -35,18 +35,19 @@ class Index extends Component {
if (status && data === "1") this.setState({ showWithDrawBtn: data === "1" });
});
};
getDeclareList = (props) => {
const { pageInfo } = this.state;
const { queryParams } = props;
getDeclareList = async (props) => {
const { data: sysData } = await sysinfo();
const { pageInfo } = this.state, { queryParams } = props;
const { dateRange, ...extra } = queryParams;
const [fromSalaryMonthStr, endSalaryMonthStr] = dateRange || [];
const params = { fromSalaryMonthStr, endSalaryMonthStr, ...extra };
const [fromSalaryMonth, endSalaryMonth] = dateRange || [];
const params = { fromSalaryMonth: fromSalaryMonth + "-01", endSalaryMonth: endSalaryMonth + "-01", ...extra };
const payload = { ...pageInfo, ...params };
this.setState({ loading: true });
getDeclareList(payload).then(({ status, data }) => {
this.setState({ loading: false });
if (status) {
const { columns, list: dataSource, pageNum, pageSize, total } = data;
let { columns, list: dataSource, pageNum, pageSize, total } = data;
sysData["TAX_DECLARATION_DATE_TYPE"] === "1" && (columns = _.filter(columns, o => o.dataIndex !== "salaryMonth"));
this.setState({
dataSource, pageInfo: { ...pageInfo, pageNum, pageSize, total },
columns: _.map(columns, o => {

View File

@ -37,19 +37,20 @@ export default class MobilePayroll extends React.Component {
this.id = getQueryString("id");
const { mySalaryStore: { init, setMySalaryBill } } = this.props;
setMySalaryBill({});
if (type !== "phone") {
const { data, status } = await payrollCheckType();
if (status && data === "PWD") {
init(false, () => this.getMySalaryBill(this.id));
} else {
this.setState({ captchaVisible: true });
}
const { data, status } = await payrollCheckType();
if (status && data === "PWD") {
type !== "phone" ? init(false, () => this.getMySalaryBill(this.id)) : await this.initMobile();
} else {
this.setState({ captchaVisible: true });
}
type === "phone" && await this.initMobile();
}
initMobile = async () => {
const { mySalaryStore: { setInitEmVerify } } = this.props;
// 旭化成直接移动端打开
this.getMySalaryBill(getQueryString("id"));
setInitEmVerify();
return
if (window.em) {
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
.then(({ status, isNeedSecondAuth }) => {
@ -119,7 +120,7 @@ export default class MobilePayroll extends React.Component {
handleGoFeedback = () => {
Modal.confirm({
title: getLabel(131329, "信息确认"),
content: getLabel(111, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
content: getLabel(111, "确认是否发起反馈流程?"),
onOk: () => {
const { salaryBillToken } = this.state;
feedBackSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
@ -156,11 +157,17 @@ export default class MobilePayroll extends React.Component {
{pwdSetVisible && <SecondarypwdVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
onSuccess={() => this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
{/*发送验证码*/}
<CaptchaModal
visible={captchaVisible} id={getQueryString("id")}
onCancel={() => this.setState({ captchaVisible: false })}
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
/>
{
captchaVisible &&
<CaptchaModal
visible={captchaVisible} id={getQueryString("id")}
onCancel={() => this.setState({ captchaVisible: false })}
onConfirm={() => {
setInitEmVerify();
this.getMySalaryBill(getQueryString("id"));
}}
/>
}
</React.Fragment>;
const {
salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback

View File

@ -1,6 +1,25 @@
import { WeaLocaleProvider } from "ecCom";
const { getLabel } = WeaLocaleProvider;
export const captchaCondition = [
{
items: [
{
colSpan: 1,
conditionType: "INPUT",
domkey: ["mobileCode"],
fieldcol: 18,
label: getLabel(111, "验证码"),
labelcol: 6,
detailtype: 1,
rules: "required|string",
viewAttr: 3
}
],
title: "",
defaultshow: true
}
];
export const loginCondition = [
{
items: [

View File

@ -14,6 +14,8 @@ import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../a
import CaptchaModal from "../../components/captchaModal";
import "./index.less";
const isIPhone = new RegExp("\\biPhone\\b|\\biPod\\b", "i").test(window.navigator.userAgent);
const isEm = window.navigator.userAgent.indexOf("E-Mobile7") >= 0;
const { getLabel } = WeaLocaleProvider;
@inject("mySalaryStore")
@ -57,7 +59,7 @@ class MySalaryView extends Component {
handleGoFeedback = () => {
Modal.confirm({
title: getLabel(131329, "信息确认"),
content: getLabel(544271, "请确认薪资信息是有误,进行反馈并发起反馈流程。"),
content: getLabel(544271, "确认是否发起反馈流程?"),
onOk: () => {
const { params: { salaryInfoId }, mySalaryStore: { getMySalaryBill } } = this.props;
feedBackSalaryBill({ salaryInfoId }).then(({ status, errorMsg }) => {
@ -123,7 +125,7 @@ export const ConfirmBtns = (props) => {
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
}
{
props.showFeedback === "1" &&
((props.showFeedback === "1" && !isIPhone) || (props.showFeedback === "1" && isIPhone && isEm)) &&
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
}
</div>;

View File

@ -31,6 +31,7 @@ class Index extends Component {
}
async componentDidMount() {
this.setState({ store: { ...this.state.store, loading: true } });
const { data: sysinfo } = await API.sysinfo();
const { adjustShowStatus, salaryShowStatus } = sysinfo;
let tabs = [
@ -39,7 +40,7 @@ class Index extends Component {
];
salaryShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "1"));
adjustShowStatus === "0" && (tabs = _.filter(tabs, o => o.key !== "2"));
this.setState({ sysinfo, tabs }, () => {
this.setState({ sysinfo, tabs, store: { ...this.state.store, loading: false } }, () => {
const { tabs, store } = this.state;
this.setState({
selectedKey: !_.isEmpty(tabs) ? _.head(tabs).key : "0",

View File

@ -53,7 +53,7 @@ class Index extends Component {
} = payrollTempForm.getFormParams(),
{ ackFeedbackStatus, feedbackStatus, autoAckDays, ...extraFb } = payrollTempFeedbackForm.getFormParams(),
{ formData, smsSettingDialog } = this.tmpBaseSetRef.state;
if (autoSendStatus !== "1" && emailStatus !== "1" && msgStatus !== "1" && smsStatus !== 1) {
if (autoSendStatus !== "1" && emailStatus !== "1" && msgStatus !== "1" && smsStatus !== "1") {
message.warning(getLabel(111, "工资单模板至少开启一个发送通道"));
return;
}

View File

@ -59,7 +59,6 @@ class PersonalScopeModal extends Component {
...scopeSelectLinkageDatas[cur],
browserConditionParam: {
...scopeSelectLinkageDatas[cur].browserConditionParam,
isSingle: true,
replaceDatas: !_.isEmpty(record) ? [{
id: String(record.targetId),
name: record.targetName

View File

@ -151,7 +151,7 @@ class StandingBook extends Component {
})} onOk={this.handleAccount}
/>
{/*操作日志*/}
<LogDialog visible={logDialogVisible} logFunction="siAccount" filterConditions={filterConditions}
<LogDialog visible={logDialogVisible} logFunction="siaccount" filterConditions={filterConditions}
onCancel={() => this.setState({ logDialogVisible: false })}/>
{/*核算进度条*/}
{

View File

@ -189,7 +189,7 @@ class Index extends Component {
{/*基数调整记录*/}
<RecordDialog visible={recordDialogVisible} onCancel={() => this.setState({ recordDialogVisible: false })}/>
{/*操作日志*/}
<LogDialog visible={logDialogVisible} logFunction="siArchives" filterConditions={filterConditions}
<LogDialog visible={logDialogVisible} logFunction="siarchives" filterConditions={filterConditions}
onCancel={() => this.setState({ logDialogVisible: false })}/>
{/* 导入*/}
<WelfareArchivesImportDialog {...welfareImpDialog}

View File

@ -1,2 +1,5 @@
import { XHCStore } from "./xhc";
module.exports = {
XHCStore: new XHCStore() //旭化成
};

View File

@ -0,0 +1,6 @@
import { observable } from "mobx";
import { WeaForm } from "comsMobx";
export class XHCStore {
@observable form = new WeaForm();
}

View File

@ -16,12 +16,12 @@ export const formHeaderPost = (url, method, params, header) => {
body: formdata
}).then(res => res.json());
};
export const postFetch = (url, params) => {
export const postFetch = (url, params, header = {}) => {
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {
params.access_token = localStorage.access_token;
}
url = server + url + "?__random__=" + (new Date()).valueOf();
return fetch(url, getFetchParams("POST", params)).then(res => res.json());
return fetch(url, getFetchParams("POST", params, header)).then(res => res.json());
};
export const headerRequestFetch = (url, method, params, header) => {
if (typeof localStorage.access_token === "string" && localStorage.access_token !== "") {