Merge branch 'release/2.9.42308.02-个税' into custom-艾志工业-合并个税
This commit is contained in:
commit
0fb31ede50
|
|
@ -17,3 +17,39 @@ export const apiflowBillingConfigSave = (params) => {
|
|||
export const apiflowBillingConfigEnable = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/billing/config/enable", params);
|
||||
};
|
||||
//智能算薪-流量不足提醒初始化表单
|
||||
export const apiflowWarnConfigGetForm = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/config/getForm", "GET", params);
|
||||
};
|
||||
//智能算薪-接口流量使用记录
|
||||
export const apiflowRecordList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/record/list", params);
|
||||
};
|
||||
//智能算薪-接口流量使用记录
|
||||
export const apiflowStatisticsInfo = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/statistics/info", params);
|
||||
};
|
||||
//智能算薪-接口流量使用明细
|
||||
export const apiflowStatisticsList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/statistics/list", params);
|
||||
};
|
||||
//智能算薪-流量不足提醒编辑或保存
|
||||
export const apiflowWarnConfigSave = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/config/save", params);
|
||||
};
|
||||
//智能算薪-流量不足提醒对象列表
|
||||
export const apiflowWarnReceiverList = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/receiver/list", "GET", params);
|
||||
};
|
||||
//智能算薪-编辑保存流量不足提醒对象
|
||||
export const apiflowWarnReceiverSave = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/receiver/save", params);
|
||||
};
|
||||
//智能算薪-编辑保存流量不足提醒对象
|
||||
export const apiflowWarnReceiverGetForm = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/receiver/getForm", params);
|
||||
};
|
||||
//智能算薪-流量不足提醒对象-删除
|
||||
export const apiflowWarnReceiverDelete = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxdeclaration/apiflow/warn/receiver/delete", "GET", params);
|
||||
};
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 6.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
|
|
@ -139,16 +139,8 @@ const Routes = (
|
|||
</Route>
|
||||
<Route key="ledger" path="ledger" component={Ledger}/>
|
||||
<Route key="calculate" path="calculate" component={Calculate}/>
|
||||
<Route
|
||||
key="calculateDetail"
|
||||
path="calculateDetail"
|
||||
component={CalculateDetail}
|
||||
/>
|
||||
<Route
|
||||
key="placeOnFileDetail"
|
||||
path="placeOnFileDetail"
|
||||
component={PlaceOnFileDetail}
|
||||
/>
|
||||
<Route key="calculateDetail" path="calculateDetail" component={CalculateDetail}/>
|
||||
<Route key="placeOnFileDetail" path="placeOnFileDetail" component={PlaceOnFileDetail}/>
|
||||
<Route key="compareDetail" path="compareDetail" component={CompareDetail}/>
|
||||
<Route key="payroll" path="payroll" component={Payroll}/>
|
||||
<Route key="watermarkPreview" path="payroll/watermark/preview" component={WatermarkPreview}/>
|
||||
|
|
|
|||
|
|
@ -353,18 +353,10 @@ export default class CalculateDetail extends React.Component {
|
|||
onClick={() => this.downloadTxtfile(accountExceptInfo)}/>);
|
||||
return buttons;
|
||||
};
|
||||
|
||||
const topTab = [
|
||||
{
|
||||
title: "人员确认",
|
||||
viewcondition: "0"
|
||||
},
|
||||
{
|
||||
title: "薪资核算",
|
||||
viewcondition: "1"
|
||||
}
|
||||
{ title: "人员确认", viewcondition: "0" },
|
||||
{ title: "薪资核算", viewcondition: "1" }
|
||||
];
|
||||
|
||||
const adBtn = [
|
||||
// 高级搜索内部按钮
|
||||
<Button type="primary" onClick={() => {
|
||||
|
|
@ -407,19 +399,19 @@ export default class CalculateDetail extends React.Component {
|
|||
return (
|
||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||
store={{ loading: false, hasRight: payrollPermission && calculateAuth }}>
|
||||
<div style={{ overflowY: "hidden", height: "100%" }}>
|
||||
<div className="calculate-layout">
|
||||
<WeaTab
|
||||
datas={topTab}
|
||||
selectedKey={selectedKey}
|
||||
keyParam="viewcondition"
|
||||
onChange={v => this.setState({ selectedKey: v })}
|
||||
searchType={selectedKey == 1 ? ["base", "advanced"] : []} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
searchType={selectedKey === "1" ? ["base", "advanced"] : []} // base:基础搜索框 advanced:显示高级搜索按钮
|
||||
showSearchAd={showSearchAd} // 是否展开高级搜索面板
|
||||
setShowSearchAd={(bool) => this.setState({ showSearchAd: bool })} //高级搜索面板受控
|
||||
searchsAd={renderSearch()} // 高级搜索内部数据getSearchs(form, toJS(condition), 2)
|
||||
buttonsAd={adBtn} // 高级搜索内部按钮
|
||||
onSearch={() => this.handleSearch(this.state.searchItemsValue)} // 点搜索按钮时的回调
|
||||
buttons={selectedKey == 1 ? renderRightOperation() : []}
|
||||
buttons={selectedKey === "1" ? renderRightOperation() : []}
|
||||
searchsBasePlaceHolder={"请输入姓名"}
|
||||
onSearchChange={(v) =>
|
||||
this.setState({
|
||||
|
|
@ -431,9 +423,9 @@ export default class CalculateDetail extends React.Component {
|
|||
} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值form.updateFields({ username: v })
|
||||
searchsBaseValue={this.state.searchItemsValue.employeeName} // 外部input搜索值受控: 这里和高级搜索的requestname同步form.getFormParams().username
|
||||
/>
|
||||
{selectedKey == 0 && <UserSure/>}
|
||||
{selectedKey == 1 && <SalaryDetail onChangeAccountIds={(ids) => this.setState({ accountIds: ids })}
|
||||
employeeName={this.state.searchItemsValue}/>}
|
||||
{selectedKey === "0" && <UserSure/>}
|
||||
{selectedKey === "1" && <SalaryDetail onChangeAccountIds={(ids) => this.setState({ accountIds: ids })}
|
||||
employeeName={this.state.searchItemsValue}/>}
|
||||
{acctResultImportVisiable &&
|
||||
<AcctResultImportModal
|
||||
visiable={acctResultImportVisiable}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,17 @@
|
|||
.calculate-layout {
|
||||
height: 100%;
|
||||
overflow-y: hidden;
|
||||
background: #f6f6f6;
|
||||
|
||||
.wea-tab .wea-tab-right {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.wea-input-focus {
|
||||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.userSure {
|
||||
padding: 20px;
|
||||
|
||||
|
|
@ -9,6 +23,7 @@
|
|||
.formWrapper {
|
||||
line-height: 40px;
|
||||
border: 1px solid #eee;
|
||||
background: #fff;
|
||||
|
||||
.ant-col-12 {
|
||||
padding: 0 16px;
|
||||
|
|
@ -71,8 +86,8 @@
|
|||
}
|
||||
|
||||
.salaryDetail {
|
||||
padding: 10px 20px;
|
||||
overflow-y: scroll;
|
||||
padding: 10px;
|
||||
overflow-y: auto;
|
||||
|
||||
.salaryBarWrapper {
|
||||
padding: 10px;
|
||||
|
|
@ -152,7 +167,8 @@
|
|||
|
||||
.placeOnFileDetail {
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-y: hidden;
|
||||
background: #f6f6f6;
|
||||
|
||||
.tabWrapper {
|
||||
height: 47px;
|
||||
|
|
@ -254,3 +270,9 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.salaryMonthTip-layout{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ class IssuedAndReissueTable extends Component {
|
|||
/>
|
||||
</span>,
|
||||
render: (text, record) => {
|
||||
const { canEdit } = record;
|
||||
const { canEdit, pattern } = record;
|
||||
return <WeaInputNumber
|
||||
disabled={!canEdit}
|
||||
min={0}
|
||||
precision={2}
|
||||
precision={pattern || 2}
|
||||
value={text || 0}
|
||||
onChange={(value) => onChangeIssueReissueValue(record.salaryItemName, value, "issuedAndReissueItems")}
|
||||
/>;
|
||||
|
|
|
|||
|
|
@ -37,10 +37,10 @@ class PayrollItemsTable extends Component {
|
|||
</span>,
|
||||
width: "20%",
|
||||
render: (text, record) => {
|
||||
const { canEdit, dataType } = record;
|
||||
const { canEdit, dataType, pattern } = record;
|
||||
return dataType === "number" ? <WeaInputNumber
|
||||
disabled={!canEdit}
|
||||
precision={2}
|
||||
precision={pattern || 2}
|
||||
value={text || 0}
|
||||
onChange={(value) => onChangeIssueReissueValue(record.salaryItemId, value, "itemsByGroup", salarySobItemGroupId)}
|
||||
/> : <WeaInput
|
||||
|
|
|
|||
|
|
@ -162,7 +162,6 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
};
|
||||
|
||||
return (
|
||||
|
||||
<div className="placeOnFileDetail">
|
||||
<CustomTab
|
||||
searchOperationItem={
|
||||
|
|
@ -170,7 +169,7 @@ export default class PlaceOnFileDetail extends React.Component {
|
|||
}
|
||||
/>
|
||||
<div className="tabWrapper" style={{ borderBottom: "none" }}>
|
||||
<span>薪资所属月:{baseSalarySobCycle.salaryMonth}</span>
|
||||
<span style={{ marginRight: 10 }}>薪资所属月:{baseSalarySobCycle.salaryMonth}</span>
|
||||
<WeaHelpfulTip
|
||||
width={100}
|
||||
title={`薪资周期\n
|
||||
|
|
|
|||
|
|
@ -6,9 +6,10 @@ import EditSalaryDetail from "./editSalaryDetail";
|
|||
import SlideModalTitle from "../../components/slideModalTitle";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
import { SalaryMonthTip } from "./userSure";
|
||||
import { toJS } from "mobx";
|
||||
import "./index.less";
|
||||
import ProgressModal from "../../components/progressModal";
|
||||
|
||||
@inject("calculateStore", "taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -151,6 +152,7 @@ export default class SalaryDetail extends React.Component {
|
|||
progressVisible: false,
|
||||
progress: 0
|
||||
}, () => {
|
||||
const { current, pageSize } = this.pageInfo;
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const payload = {
|
||||
type: "PR",
|
||||
|
|
@ -158,7 +160,8 @@ export default class SalaryDetail extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
...this.props.employeeName
|
||||
...this.props.employeeName,
|
||||
current, pageSize
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
@ -186,13 +189,15 @@ export default class SalaryDetail extends React.Component {
|
|||
this.setState({ loading: false });
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
const salaryAcctRecordId = getQueryString("id");
|
||||
const { current, pageSize } = this.pageInfo;
|
||||
const payload = {
|
||||
type: "PR",
|
||||
listType: "",
|
||||
url: "/api/bs/hrmsalary/salaryacct/acctresult/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
...this.props.employeeName
|
||||
...this.props.employeeName,
|
||||
current, pageSize
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
@ -211,17 +216,9 @@ export default class SalaryDetail extends React.Component {
|
|||
<div className="salaryBarWrapper">
|
||||
<span>薪资所属月:{baseSalarySobCycle.salaryMonth}</span>
|
||||
<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title={
|
||||
`薪资周期\n
|
||||
${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.fromDate}至${baseSalarySobCycle.salaryCycle && baseSalarySobCycle.salaryCycle.endDate}\n
|
||||
税款所属期\n
|
||||
${baseSalarySobCycle.taxCycle}\n
|
||||
考勤取值周期\n
|
||||
${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.fromDate}至${baseSalarySobCycle.attendCycle && baseSalarySobCycle.attendCycle.endDate}\n
|
||||
福利台账月份\n
|
||||
引用${baseSalarySobCycle.socialSecurityCycle}的福利台账数据`}
|
||||
style={{ marginLeft: 10 }}
|
||||
title={!_.isEmpty(baseSalarySobCycle) ?
|
||||
<SalaryMonthTip baseSalarySobCycle={baseSalarySobCycle}/> : ""}
|
||||
placement="topLeft"
|
||||
/>
|
||||
{/*暂时隐藏*/}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,20 @@
|
|||
import React from "react";
|
||||
import { Button, Col, Icon, message, Modal, Row } from "antd";
|
||||
import { WeaBrowser, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSearchGroup, WeaSelect, WeaTab } from "ecCom";
|
||||
import {
|
||||
WeaBrowser,
|
||||
WeaFormItem,
|
||||
WeaHelpfulTip,
|
||||
WeaInput,
|
||||
WeaLocaleProvider,
|
||||
WeaSearchGroup,
|
||||
WeaSelect,
|
||||
WeaTab
|
||||
} from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import "./index.less";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
@inject("calculateStore", "salaryFileStore")
|
||||
@observer
|
||||
export default class UserSure extends React.Component {
|
||||
|
|
@ -120,7 +130,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
...this.state.searchItemsValue,
|
||||
...this.state.searchItemsValue
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage
|
||||
|
|
@ -375,12 +385,8 @@ export default class UserSure extends React.Component {
|
|||
<Row>
|
||||
<Col span={6}>
|
||||
薪资所属月:<WeaHelpfulTip
|
||||
width={100}
|
||||
title={`薪资周期\n${baseSalarySobCycle.salaryCycle &&
|
||||
baseSalarySobCycle.salaryCycle.fromDate}至${baseSalarySobCycle.salaryCycle &&
|
||||
baseSalarySobCycle.salaryCycle.endDate}\n税款所属期\n${baseSalarySobCycle.taxCycle}\n考勤取值周期\n${baseSalarySobCycle.attendCycle &&
|
||||
baseSalarySobCycle.attendCycle.fromDate}至${baseSalarySobCycle.attendCycle &&
|
||||
baseSalarySobCycle.attendCycle.endDate}\n福利台账月份\n引用${baseSalarySobCycle.socialSecurityCycle}的福利台账数据`}
|
||||
title={!_.isEmpty(baseSalarySobCycle) ?
|
||||
<SalaryMonthTip baseSalarySobCycle={baseSalarySobCycle}/> : ""}
|
||||
placement="topLeft"
|
||||
/>
|
||||
</Col>
|
||||
|
|
@ -430,7 +436,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/acctemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
...this.state.searchItemsValue,
|
||||
...this.state.searchItemsValue
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*"); //window.postMessage
|
||||
|
|
@ -460,7 +466,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/reducedemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
...this.state.searchItemsValue,
|
||||
...this.state.searchItemsValue
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
@ -490,7 +496,7 @@ export default class UserSure extends React.Component {
|
|||
url: "/api/bs/hrmsalary/salaryacct/addedemployee/list",
|
||||
queryParams: {
|
||||
salaryAcctRecordId,
|
||||
...this.state.searchItemsValue,
|
||||
...this.state.searchItemsValue
|
||||
}
|
||||
};
|
||||
childFrameObj.contentWindow.postMessage(JSON.stringify(payload), "*");
|
||||
|
|
@ -587,3 +593,32 @@ export default class UserSure extends React.Component {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
export const SalaryMonthTip = (props) => {
|
||||
const { baseSalarySobCycle } = props;
|
||||
const { salaryCycle, taxCycle, attendCycle, socialSecurityCycle } = baseSalarySobCycle;
|
||||
const { fromDate: salaryCycleFromDate, endDate: salaryCycleEndDate } = salaryCycle;
|
||||
const { fromDate: attendCycleFromDate, endDate: attendCycleEndDate } = attendCycle;
|
||||
return (
|
||||
<div className="salaryMonthTip-layout">
|
||||
<div className="salaryMonthTipItem">
|
||||
<div className="label">{getLabel(543375, "薪资周期")}</div>
|
||||
<div className="value">{`${salaryCycleFromDate}${getLabel(15322, "至")}${salaryCycleEndDate}`}</div>
|
||||
</div>
|
||||
<div className="salaryMonthTipItem">
|
||||
<div className="label">{getLabel(542240, "税款所属期")}</div>
|
||||
<div className="value">{taxCycle}</div>
|
||||
</div>
|
||||
<div className="salaryMonthTipItem">
|
||||
<div className="label">{getLabel(543475, "考勤取值周期")}</div>
|
||||
<div className="value">{`${attendCycleFromDate}${getLabel(15322, "至")}${attendCycleEndDate}`}</div>
|
||||
</div>
|
||||
<div className="salaryMonthTipItem">
|
||||
<div className="label">{getLabel(543466, "福利台账月份")}</div>
|
||||
<div className="value">
|
||||
{`${getLabel(19422, "引用")}${socialSecurityCycle}${getLabel(543476, "的福利台账数据")}`}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -22,12 +22,15 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
loading: false,
|
||||
eConditions: []
|
||||
eConditions: [],
|
||||
employeeInfo: {}
|
||||
};
|
||||
this.employeeChangeInfo = {};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.employeedeclareGetForm(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.employeeChangeInfo = {};
|
||||
}
|
||||
|
||||
employeedeclareGetForm = (props) => {
|
||||
|
|
@ -86,7 +89,8 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
return { ...child };
|
||||
})
|
||||
};
|
||||
})
|
||||
}),
|
||||
employeeInfo: data.data
|
||||
}, () => {
|
||||
const { data: result, columns } = data;
|
||||
const { employeeDeclareStore: { declareForm } } = this.props;
|
||||
|
|
@ -129,7 +133,12 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
const { employeeDeclareStore: { declareForm } } = this.props;
|
||||
const key = Object.keys(res)[0];
|
||||
const value = res[key].value;
|
||||
console.log(132, res, declareForm.getFormParams());
|
||||
if (key === "employeeType") {
|
||||
const [v1, v2] = value;
|
||||
this.employeeChangeInfo = {
|
||||
employee: [{ _entityType: v1, name: v2[1], id: v2[0] }]
|
||||
};
|
||||
}
|
||||
switch (key) {
|
||||
case "employmentStatus":
|
||||
this.setState({
|
||||
|
|
@ -148,8 +157,17 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
};
|
||||
})
|
||||
}, () => {
|
||||
console.log(150, this.state.eConditions);
|
||||
declareForm.initFormFields(this.state.eConditions);
|
||||
const [employeeData] = this.state.employeeInfo["employee"] || this.employeeChangeInfo["employee"] || [];
|
||||
!_.isEmpty(employeeData) && declareForm.updateFields({
|
||||
employeeType: {
|
||||
value: [employeeData._entityType, [employeeData.id, employeeData.name, [{
|
||||
id: employeeData.id,
|
||||
lastname: employeeData.name
|
||||
}]]],
|
||||
valueSpan: ["employeeId"]
|
||||
}
|
||||
});
|
||||
});
|
||||
break;
|
||||
case "employmentType":
|
||||
|
|
@ -170,6 +188,16 @@ class EmployeeDeclareDetailSchemaEditDialog extends Component {
|
|||
})
|
||||
}, () => {
|
||||
declareForm.initFormFields(this.state.eConditions);
|
||||
const [employeeData] = this.state.employeeInfo["employee"] || this.employeeChangeInfo["employee"] || [];
|
||||
!_.isEmpty(employeeData) && declareForm.updateFields({
|
||||
employeeType: {
|
||||
value: [employeeData._entityType, [employeeData.id, employeeData.name, [{
|
||||
id: employeeData.id,
|
||||
lastname: employeeData.name
|
||||
}]]],
|
||||
valueSpan: ["employeeId"]
|
||||
}
|
||||
});
|
||||
});
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ class Index extends Component {
|
|||
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
}, () => {
|
||||
const payload = {
|
||||
dataSource, selectedRowKeys,
|
||||
dataSource, selectedRowKeys, selectedKey,
|
||||
pageInfo: this.state.pageInfo,
|
||||
columns: _.map(columns, it => {
|
||||
if (it.dataIndex === "employeeName" || it.dataIndex === "subCompanyName") {
|
||||
|
|
@ -208,7 +208,6 @@ class Index extends Component {
|
|||
};
|
||||
this.setState({ loading: { ...this.state.loading, refresh: true } });
|
||||
employeedeclareRefresh(payload).then(async ({ status, data, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, refresh: false } });
|
||||
if (status) {
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "刷新中..."), 0);
|
||||
|
|
@ -217,12 +216,14 @@ class Index extends Component {
|
|||
const { status: rateStatus, finish, msg } = result;
|
||||
if (resStatus && rateStatus) {
|
||||
if (finish) {
|
||||
this.setState({ loading: { ...this.state.loading, refresh: false } });
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.success(getLabel(111, "刷新成功!"));
|
||||
this.queryEmployeeList();
|
||||
}
|
||||
} else {
|
||||
this.setState({ loading: { ...this.state.loading, refresh: false } });
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.warning(msg || getLabel(111, "刷新失败!"));
|
||||
|
|
@ -230,6 +231,7 @@ class Index extends Component {
|
|||
}
|
||||
}, 1000);
|
||||
} else {
|
||||
this.setState({ loading: { ...this.state.loading, refresh: false } });
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.error(errormsg);
|
||||
|
|
@ -253,7 +255,6 @@ class Index extends Component {
|
|||
};
|
||||
this.setState({ loading: { ...this.state.loading, feedback: true } });
|
||||
getDeclareFeedback(payload).then(async ({ status, data, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, feedback: false } });
|
||||
if (status) {
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "获取报送中..."), 0);
|
||||
|
|
@ -262,12 +263,14 @@ class Index extends Component {
|
|||
const { status: rateStatus, finish, msg } = result;
|
||||
if (resStatus && rateStatus) {
|
||||
if (finish) {
|
||||
this.setState({ loading: { ...this.state.loading, feedback: false } });
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.success(getLabel(111, "获取报送结果成功!"));
|
||||
this.queryEmployeeList();
|
||||
}
|
||||
} else {
|
||||
this.setState({ loading: { ...this.state.loading, feedback: false } });
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.warning(msg || getLabel(111, "获取失败!"));
|
||||
|
|
@ -275,6 +278,7 @@ class Index extends Component {
|
|||
}
|
||||
}, 1000);
|
||||
} else {
|
||||
this.setState({ loading: { ...this.state.loading, feedback: false } });
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.error(errormsg);
|
||||
|
|
@ -324,7 +328,6 @@ class Index extends Component {
|
|||
};
|
||||
this.setState({ loading: { ...this.state.loading, declare: true } });
|
||||
employeedeclareDeclare(payload).then(async ({ status, data, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, declare: false } });
|
||||
if (status) {
|
||||
message.destroy();
|
||||
message.loading(getLabel(111, "报送中..."), 0);
|
||||
|
|
@ -333,12 +336,14 @@ class Index extends Component {
|
|||
const { status: rateStatus, finish, msg } = result;
|
||||
if (resStatus && rateStatus) {
|
||||
if (finish) {
|
||||
this.setState({ loading: { ...this.state.loading, declare: false } });
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.success(getLabel(111, "全部报送成功!"));
|
||||
this.queryEmployeeList();
|
||||
}
|
||||
} else {
|
||||
this.setState({ loading: { ...this.state.loading, declare: false } });
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.warning(msg || getLabel(111, "报送失败!"));
|
||||
|
|
@ -346,6 +351,7 @@ class Index extends Component {
|
|||
}
|
||||
}, 1000);
|
||||
} else {
|
||||
this.setState({ loading: { ...this.state.loading, declare: false } });
|
||||
clearInterval(this.timer);
|
||||
message.destroy();
|
||||
message.error(errormsg);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,94 @@
|
|||
export const trafficUsageConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "RANGEPICKER",
|
||||
domkey: ["startDate", "endDate"],
|
||||
fieldcol: 22,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentId"],
|
||||
fieldcol: 22,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
options: []
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["businessType"],
|
||||
fieldcol: 22,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
options: [
|
||||
{ key: "", showname: "全部(接口业务)", lanId: 111 },
|
||||
{ key: "1", showname: "累计专项附加扣除", lanId: 538006 },
|
||||
{ key: "2", showname: "人员信息报送", lanId: 544289 },
|
||||
{ key: "3", showname: "个税申报", lanId: 543353 }
|
||||
]
|
||||
},
|
||||
{
|
||||
colSpan: 1,
|
||||
conditionType: "SELECT",
|
||||
domkey: ["result"],
|
||||
fieldcol: 22,
|
||||
label: "",
|
||||
labelcol: 0,
|
||||
value: "",
|
||||
options: [
|
||||
{ key: "", showname: "全部(结果)", lanId: 111 },
|
||||
{ key: "20", showname: "成功", lanId: 111 },
|
||||
{ key: "30", showname: "失败", lanId: 25009 }
|
||||
]
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const remindObjConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: true,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: true,
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "1",
|
||||
viewAttr: 3,
|
||||
rules: "required"
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
rules: "required|string",
|
||||
domkey: ["employeeId"],
|
||||
fieldcol: 12,
|
||||
label: "提醒对象",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -0,0 +1,94 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 智能算薪-添加提醒对象
|
||||
* Description:
|
||||
* Date: 2023/8/29
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../util";
|
||||
import { remindObjConditions } from "./constants";
|
||||
import { apiflowWarnReceiverGetForm, apiflowWarnReceiverSave } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("intelligentStore")
|
||||
@observer
|
||||
class EditBeRemindObjDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
const { intelligentStore: { remindObjform }, id } = nextProps;
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
remindObjform.initFormFields(remindObjConditions);
|
||||
id && this.apiflowWarnReceiverGetForm(nextProps);
|
||||
}
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
remindObjform.resetForm();
|
||||
}
|
||||
}
|
||||
|
||||
apiflowWarnReceiverGetForm = (props) => {
|
||||
const { intelligentStore: { remindObjform } } = this.props;
|
||||
const { id } = props;
|
||||
apiflowWarnReceiverGetForm({ id }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { employee } = data;
|
||||
remindObjform.updateFields({
|
||||
"employeeId": {
|
||||
value: employee[0].id,
|
||||
valueSpan: employee[0].content,
|
||||
valueObj: [{ id: employee[0].id, name: employee[0].content }]
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
save = () => {
|
||||
const { intelligentStore: { remindObjform }, warnConfigId, id } = this.props;
|
||||
remindObjform.validateForm().then(f => {
|
||||
const { employeeId } = remindObjform.getFormParams();
|
||||
if (f.isValid) {
|
||||
this.setState({ loading: true });
|
||||
apiflowWarnReceiverSave({ employeeId, warnConfigId, id }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
this.props.updateWarnList();
|
||||
this.props.onCancel();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { intelligentStore: { remindObjform } } = this.props;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} className="paymentDialog" initLoadCss
|
||||
style={{ width: 550 }}
|
||||
buttons={[<Button type="primary" onClick={this.save}
|
||||
loading={this.state.loading}>{getLabel(537558, "保存")}</Button>]}
|
||||
>
|
||||
<div className="paymentDialogContent">
|
||||
{getSearchs(remindObjform, remindObjConditions, 1)}
|
||||
</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default EditBeRemindObjDialog;
|
||||
|
|
@ -13,7 +13,6 @@ import {
|
|||
apiflowBillingConfigGet,
|
||||
apiflowBillingConfigSave
|
||||
} from "../../../apis/intelligentCalculateSalarySettings";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
.enable-settings {
|
||||
.swith-area, .userinfo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 16px;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
height: 80px;
|
||||
border: 2px solid #e5e5e5;
|
||||
border-left-color: #5d9cec;
|
||||
|
||||
.left {
|
||||
padding: 10px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.info {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.userinfo {
|
||||
margin-top: 16px;
|
||||
|
||||
.left {
|
||||
flex: 1 !important;
|
||||
|
||||
.wea-search-group, .wea-form-cell {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.insufficientAlertWrapper {
|
||||
background: #fff;
|
||||
padding: 0;
|
||||
border: 1px solid #f2f2f2;
|
||||
border-bottom: none;
|
||||
|
||||
.wea-content {
|
||||
padding: 0;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 5px 12px;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5,8 +5,22 @@
|
|||
* Date: 2023/7/19
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSearchGroup } from "ecCom";
|
||||
import "./index.less";
|
||||
import {
|
||||
WeaButtonIcon,
|
||||
WeaCheckbox,
|
||||
WeaFormItem,
|
||||
WeaInputNumber,
|
||||
WeaLocaleProvider,
|
||||
WeaSearchGroup,
|
||||
WeaTable
|
||||
} from "ecCom";
|
||||
import { message, Modal, Spin } from "antd";
|
||||
import EditBeRemindObjDialog from "./editBeRemindObjDialog";
|
||||
import {
|
||||
apiflowWarnConfigGetForm,
|
||||
apiflowWarnReceiverDelete,
|
||||
apiflowWarnReceiverList
|
||||
} from "../../../apis/intelligentCalculateSalarySettings";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -14,44 +28,237 @@ class InsufficientTrafficAlert extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
remind: "0"
|
||||
enable: "0",
|
||||
remindEvent: { businessId: "", eventId: "", moduleId: "", id: "" },
|
||||
threshold: null, channelList: [
|
||||
{ label: "EMobile", type: "IM", channel: "1", value: "1", config: {} },
|
||||
{ label: "邮件", type: "email", channel: "3", value: "1", config: {} },
|
||||
{ label: "短信", type: "message", channel: "4", value: "1", config: {} }
|
||||
], columns: [], dataSource: [],
|
||||
loading: false, remindObjDialog: { visible: false, title: "", warnConfigId: "", id: "" }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.apiflowWarnConfigGetForm();
|
||||
}
|
||||
|
||||
apiflowWarnConfigGetForm = () => {
|
||||
const { remindEvent } = this.state;
|
||||
apiflowWarnConfigGetForm().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { enable, businessId, eventId, moduleId, id, threshold } = data;
|
||||
this.setState({
|
||||
enable: enable ? "1" : "0",
|
||||
remindEvent: { ...remindEvent, businessId, eventId, moduleId, id },
|
||||
threshold
|
||||
}, () => {
|
||||
this.state.enable === "1" && this.apiflowWarnReceiverList();
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
apiflowWarnReceiverList = () => {
|
||||
const { remindEvent } = this.state;
|
||||
const { id } = remindEvent;
|
||||
const payload = {
|
||||
warnConfigId: id || this.props.warnConfigId
|
||||
};
|
||||
apiflowWarnReceiverList(payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { columns, list: dataSource } = data;
|
||||
this.setState({
|
||||
dataSource,
|
||||
columns: _.map(columns, item => {
|
||||
const { dataIndex } = item;
|
||||
let width = "";
|
||||
switch (dataIndex) {
|
||||
case "employeeName":
|
||||
case "mobile":
|
||||
width = "30%";
|
||||
break;
|
||||
case "email":
|
||||
width = "40%";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return { ...item, width };
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
apiflowWarnReceiverDelete = (id) => {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确定删除吗?删除后数据不可找回"),
|
||||
onOk: () => {
|
||||
apiflowWarnReceiverDelete({ id }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(502230, "删除成功!"));
|
||||
this.apiflowWarnReceiverList();
|
||||
} else {
|
||||
message.error(errormsg || getLabel(20462, "删除失败!"));
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleEnale = (enable) => {
|
||||
if (enable === "1") {
|
||||
this.setState({ enable }, () => this.apiflowWarnReceiverList());
|
||||
} else {
|
||||
Modal.confirm({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(111, "确认关闭提醒吗?关闭并保存后,流量不足时将无法及时提醒。"),
|
||||
onOk: () => {
|
||||
this.setState({ enable });
|
||||
},
|
||||
onCancel: () => {
|
||||
this.setState({ enable: this.state.enable });
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
handleChangeChannel = (o) => {
|
||||
const { channelList } = this.state;
|
||||
this.setState({
|
||||
channelList: _.map(channelList, item => {
|
||||
if (item.type === o.type) {
|
||||
return { ...item, ...o };
|
||||
}
|
||||
return { ...item };
|
||||
})
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { remind } = this.state;
|
||||
const {
|
||||
remindEvent, enable, channelList, threshold,
|
||||
loading, columns, dataSource, remindObjDialog
|
||||
} = this.state;
|
||||
const { id } = remindEvent;
|
||||
return (
|
||||
<WeaSearchGroup showGroup needTigger={false} className="insufficientAlertWrapper">
|
||||
<WeaFormItem label={getLabel(501480, "提醒")} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}>
|
||||
<WeaCheckbox display="switch" value={remind} onChange={remind => this.setState({ remind })}/>
|
||||
<WeaCheckbox display="switch" value={enable} onChange={this.handleEnale}/>
|
||||
</WeaFormItem>
|
||||
{
|
||||
remind === "1" &&
|
||||
enable === "1" &&
|
||||
<React.Fragment>
|
||||
<WeaFormItem
|
||||
label={getLabel(544288, "提醒规则")}
|
||||
labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}
|
||||
>
|
||||
<WeaCheckbox display="switch"/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem
|
||||
label={getLabel(544287, "提醒推送方式")}
|
||||
labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}
|
||||
>
|
||||
<WeaCheckbox display="switch"/>
|
||||
<WeaHelpfulTip
|
||||
width={200} style={{ marginLeft: 10 }}
|
||||
title={getLabel(544286, "使用云桥之前,请先确认企业微信是否绑定云桥。\n" +
|
||||
"使用邮箱之前,请先确认是否设置邮件提醒账号。\n" +
|
||||
"使用短信之前,请先确认是否新建签名。")}
|
||||
placement="topLeft"
|
||||
/>
|
||||
<ReminderRules value={threshold} onChange={o => this.setState({ threshold: o })}/>
|
||||
</WeaFormItem>
|
||||
{/*<WeaFormItem*/}
|
||||
{/* colon={false} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}*/}
|
||||
{/* label={*/}
|
||||
{/* <div className="flex items-center">*/}
|
||||
{/* <span>{getLabel(544287, "提醒推送方式")}:</span>*/}
|
||||
{/* <WeaHelpfulTip*/}
|
||||
{/* width={200} style={{ marginLeft: 10 }}*/}
|
||||
{/* title={getLabel(111, "使用邮箱之前,请先确认是否设置邮件提醒账号。\n" + "使用短信之前,请先确认是否新建签名。")}*/}
|
||||
{/* placement="topLeft"*/}
|
||||
{/* />*/}
|
||||
{/* </div>*/}
|
||||
{/* }*/}
|
||||
{/*>*/}
|
||||
{/* <Pushmethod channelList={channelList} onChange={this.handleChangeChannel}/>*/}
|
||||
{/*</WeaFormItem>*/}
|
||||
</React.Fragment>
|
||||
}
|
||||
{
|
||||
enable === "1" &&
|
||||
<div className="table">
|
||||
<div className="title flex items-center">
|
||||
<span className="titleLeft">{getLabel(111, "提醒对象设置")}</span>
|
||||
<WeaButtonIcon
|
||||
buttonType="add" type="primary"
|
||||
onClick={() => this.setState({
|
||||
remindObjDialog: {
|
||||
...remindObjDialog, visible: true, title: getLabel(111, "添加提醒对象"),
|
||||
warnConfigId: id || this.props.warnConfigId
|
||||
}
|
||||
})}
|
||||
/>
|
||||
{/* 添加提醒对象*/}
|
||||
<EditBeRemindObjDialog
|
||||
{...remindObjDialog}
|
||||
updateWarnList={this.apiflowWarnReceiverList}
|
||||
onCancel={() => this.setState({
|
||||
remindObjDialog: {
|
||||
...remindObjDialog, visible: false, title: "", warnConfigId: "", id: ""
|
||||
}
|
||||
})}
|
||||
/>
|
||||
</div>
|
||||
{
|
||||
loading ? <div className="loading-layout">
|
||||
<Spin spinning={loading}/>
|
||||
</div> : <WeaTable
|
||||
dataSource={dataSource} loading={loading}
|
||||
columns={[
|
||||
...columns,
|
||||
{
|
||||
title: getLabel(30585, "操作"), dataIndex: "operate", width: 120,
|
||||
render: (__, record) => (<div className="space">
|
||||
<a
|
||||
href="javascript:void(0);" className="mr10"
|
||||
onClick={() => this.setState({
|
||||
remindObjDialog: {
|
||||
...remindObjDialog, visible: true, title: getLabel(111, "添加提醒对象"),
|
||||
warnConfigId: id || this.props.warnConfigId, id: record.id
|
||||
}
|
||||
})}>{getLabel(501169, "编辑")}</a>
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.apiflowWarnReceiverDelete(record.id)}>{getLabel(535052, "删除")}</a>
|
||||
</div>)
|
||||
}
|
||||
]} pagination={false}
|
||||
scroll={{ y: `calc(100vh - 190px)` }}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</WeaSearchGroup>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default InsufficientTrafficAlert;
|
||||
|
||||
|
||||
const ReminderRules = (props) => {
|
||||
const { onChange, value } = props;
|
||||
return (
|
||||
<div className="threshold">
|
||||
<span className="before">{getLabel(111, "流量不足")}</span>
|
||||
<WeaInputNumber value={value} onChange={onChange} style={{ width: 180 }} viewAttr={3} precision={3}/>
|
||||
<span className="after">{getLabel(111, "时提醒")}</span>
|
||||
<span
|
||||
className="tip">{getLabel(111, "为确保智能算薪正常使用,设置建议:若每个月消耗流量10,000,则不足10,000时提醒,以此预留一个月时间续流量")}</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
const Pushmethod = (props) => {
|
||||
const { onChange, channelList } = props;
|
||||
return <div className="channel-list">
|
||||
{
|
||||
_.map(channelList, item => {
|
||||
const { label, type, value } = item;
|
||||
return (
|
||||
<div className="channel-item">
|
||||
<WeaCheckbox value={value} content={label} onChange={o => onChange({ ...item, value: o })}/>
|
||||
{(type !== "email" && value === "1") && <i className="icon-coms-Flow-setting"/>}
|
||||
</div>
|
||||
);
|
||||
})
|
||||
}
|
||||
</div>;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,162 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 智能算薪-接口流量统计
|
||||
* Description:
|
||||
* Date: 2023/8/29
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { Button, message, Spin } from "antd";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { apiflowStatisticsInfo, apiflowStatisticsList } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class InterfaceFlowStatistics extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
statisticsInfo: {
|
||||
lastUpdateTime: "",
|
||||
staticData: [
|
||||
{
|
||||
key: "total",
|
||||
label: getLabel(111, "购买接口总流量"),
|
||||
value: "",
|
||||
icon: require("../../../common/purchased.png")
|
||||
},
|
||||
{
|
||||
key: "remain", label: getLabel(111, "剩余总流量"), value: "", icon: require("../../../common/remaining.png")
|
||||
},
|
||||
{
|
||||
key: "used", label: getLabel(111, "已使用总流量"), value: "", icon: require("../../../common/traffic.png")
|
||||
}
|
||||
]
|
||||
},
|
||||
columns: [], dataSource: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.apiflowStatisticsInfo();
|
||||
this.apiflowStatisticsList();
|
||||
}
|
||||
|
||||
apiflowStatisticsInfo = () => {
|
||||
const { statisticsInfo } = this.state;
|
||||
apiflowStatisticsInfo().then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { lastUpdateTime, ...extraData } = data;
|
||||
this.setState({
|
||||
statisticsInfo: {
|
||||
...statisticsInfo,
|
||||
lastUpdateTime,
|
||||
staticData: _.map(statisticsInfo.staticData, item => ({
|
||||
...item,
|
||||
value: extraData[item["key"]]
|
||||
}))
|
||||
}
|
||||
}, () => this.props.updateTime(this.state.statisticsInfo));
|
||||
}
|
||||
});
|
||||
};
|
||||
apiflowStatisticsList = () => {
|
||||
const { pageInfo } = this.state;
|
||||
const payload = { ...pageInfo };
|
||||
this.setState({ loading: true });
|
||||
apiflowStatisticsList(payload).then(({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
columns: _.map(columns, item => {
|
||||
const { dataIndex } = item;
|
||||
let width = "";
|
||||
switch (dataIndex) {
|
||||
case "taxAgentName":
|
||||
case "used":
|
||||
width = "40%";
|
||||
break;
|
||||
default:
|
||||
width = "10%";
|
||||
break;
|
||||
}
|
||||
return { ...item, width };
|
||||
})
|
||||
});
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
handleExport = () => {
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/taxdeclaration/apiflow/statistics/export`, "_blank");
|
||||
};
|
||||
|
||||
render() {
|
||||
const { statisticsInfo, pageInfo, loading, dataSource, columns } = this.state;
|
||||
const { staticData } = statisticsInfo;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.apiflowStatisticsList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.apiflowStatisticsList());
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div className="statisticsInfo-layout">
|
||||
<div className="static-data">
|
||||
{
|
||||
_.map(staticData, item => {
|
||||
const { label, icon, value } = item;
|
||||
return (
|
||||
<div className="item">
|
||||
<div className="left"><img src={icon} alt=""/></div>
|
||||
<div className="right">
|
||||
<div className="data">{value}</div>
|
||||
<div className="title">{label}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
})
|
||||
}
|
||||
</div>
|
||||
<div className="detail-area">
|
||||
<div className="title">
|
||||
<div className="text">{getLabel(111, "使用明细")}</div>
|
||||
<Button type="primary" onClick={this.handleExport}>{getLabel(81272, "导出全部")}</Button>
|
||||
</div>
|
||||
{
|
||||
loading ? <div className="loading-layout">
|
||||
<Spin spinning={loading}/>
|
||||
</div> : <WeaTable
|
||||
dataSource={dataSource} pagination={pagination} loading={loading}
|
||||
columns={[
|
||||
...columns,
|
||||
{
|
||||
title: getLabel(30585, "操作"), dataIndex: "operate",
|
||||
render: () => (<a href="">{getLabel(111, "月统计详情")}</a>)
|
||||
}
|
||||
]}
|
||||
scroll={{ y: `calc(100vh - 190px)` }}
|
||||
/>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default InterfaceFlowStatistics;
|
||||
|
|
@ -0,0 +1,136 @@
|
|||
/*
|
||||
* Author: 黎永顺
|
||||
* name: 智能算薪-流量使用记录
|
||||
* Description:
|
||||
* Date: 2023/8/28
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import { trafficUsageConditions } from "./constants";
|
||||
import { getSearchs } from "../../../util";
|
||||
import moment from "moment";
|
||||
import { apiflowRecordList } from "../../../apis/intelligentCalculateSalarySettings";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore", "intelligentStore")
|
||||
@observer
|
||||
class TrafficUsageRecords extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
conditions: [], columns: [], dataSource: [],
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { taxAgentStore: { fetchTaxAgentOption }, intelligentStore: { form } } = this.props;
|
||||
fetchTaxAgentOption().then(({ data }) => {
|
||||
this.setState({
|
||||
conditions: _.map(trafficUsageConditions, item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.map(item.items, o => {
|
||||
if (o.conditionType === "SELECT" && o.domkey[0] === "taxAgentId") {
|
||||
return {
|
||||
...o,
|
||||
options: [
|
||||
{ key: "", showname: getLabel(111, "全部(个税扣缴义务人)") },
|
||||
..._.map(data, (i) => ({ key: i.id, showname: i.content }))
|
||||
]
|
||||
};
|
||||
} else if (o.conditionType === "SELECT" && o.domkey[0] !== "taxAgentId") {
|
||||
return {
|
||||
...o,
|
||||
options: _.map(o.options, it => ({ ...it, showname: getLabel(it.lanId, it.showname) }))
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
};
|
||||
})
|
||||
}, () => {
|
||||
form.initFormFields(this.state.conditions);
|
||||
form.updateFields({
|
||||
["startDate__endDate"]: {
|
||||
value: [moment().startOf("month").format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")]
|
||||
}
|
||||
});
|
||||
this.apiflowRecordList();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
apiflowRecordList = () => {
|
||||
const { pageInfo } = this.state;
|
||||
const { intelligentStore: { form } } = this.props;
|
||||
const payload = { ...form.getFormParams(), ...pageInfo };
|
||||
this.setState({ loading: true });
|
||||
apiflowRecordList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
columns: _.map(columns, item => {
|
||||
const { dataIndex } = item;
|
||||
let width = "";
|
||||
switch (dataIndex) {
|
||||
case "indexNum":
|
||||
case "taxAgentName":
|
||||
case "employeeName":
|
||||
case "businessTypeName":
|
||||
case "creator":
|
||||
case "result":
|
||||
width = "10%";
|
||||
break;
|
||||
case "idCardNo":
|
||||
width = "20%";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return { ...item, width };
|
||||
})
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { intelligentStore: { form } } = this.props;
|
||||
const { conditions, loading, pageInfo, dataSource, columns } = this.state;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `${getLabel(18609, "共")} ${total} ${getLabel(18256, "条")}`,
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],
|
||||
onShowSizeChange: (current, pageSize) => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize }
|
||||
}, () => this.apiflowRecordList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current }
|
||||
}, () => this.apiflowRecordList());
|
||||
}
|
||||
};
|
||||
return (
|
||||
<div className="trafficUsageRecords-layout">
|
||||
<div className="head">{getSearchs(form, conditions, 4, false, this.apiflowRecordList)}</div>
|
||||
<WeaTable
|
||||
columns={columns} dataSource={dataSource}
|
||||
pagination={pagination} loading={loading}
|
||||
scroll={{ y: `calc(100vh - 226px)` }}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default TrafficUsageRecords;
|
||||
|
|
@ -1,33 +1,86 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import EnableSettings from "./components/enableSettings";
|
||||
import InsufficientTrafficAlert from "./components/insufficientTrafficAlert";
|
||||
import TrafficUsageRecords from "./components/trafficUsageRecords";
|
||||
import InterfaceFlowStatistics from "./components/interfaceFlowStatistics";
|
||||
import { apiflowWarnConfigSave } from "../../apis/intelligentCalculateSalarySettings";
|
||||
import "./index.less";
|
||||
import { convertToUrlString } from "../../util/url";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const tabs = [
|
||||
{ key: "ENABLE_SETTINGS", title: getLabel(111, "启用设置") },
|
||||
// { key: "INTERFACE_FLOW_STATISTICS", title: getLabel(111, "接口流量统计") },
|
||||
// { key: "INSUFFICIENT_TRAFFIC_ALERT", title: getLabel(111, "流量不足提醒") },
|
||||
// { key: "TRAFFIC_USAGE_RECORD", title: getLabel(111, "流量使用记录") }
|
||||
{ key: "INTERFACE_FLOW_STATISTICS", title: getLabel(111, "接口流量统计") },
|
||||
{ key: "INSUFFICIENT_TRAFFIC_ALERT", title: getLabel(111, "流量不足提醒") },
|
||||
{ key: "TRAFFIC_USAGE_RECORD", title: getLabel(111, "流量使用记录") }
|
||||
];
|
||||
|
||||
@inject("intelligentStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "ENABLE_SETTINGS"
|
||||
selectedKey: "ENABLE_SETTINGS", lastUpdateTime: "",
|
||||
loading: false, warnConfigId: ""
|
||||
};
|
||||
this.alertRef = null;
|
||||
}
|
||||
|
||||
/*
|
||||
* Author: 黎永顺
|
||||
* Description:流量不足提醒 - 基础信息保存
|
||||
* Params:
|
||||
* Date: 2023/8/29
|
||||
*/
|
||||
saveItaBaseInfo = () => {
|
||||
const { channelList, enable, threshold, remindEvent } = this.alertRef.state;
|
||||
const validateError = (enable === "1") && (_.every(channelList, o => o.channel !== "1") || _.isNil(threshold));
|
||||
if (validateError) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
});
|
||||
return;
|
||||
}
|
||||
const { businessId, id } = remindEvent;
|
||||
const config = _.map(_.filter(channelList, p => p.value === "1"), o => ({ channel: o.channel, config: o.config }));
|
||||
const payload = {
|
||||
id, businessId, threshold,
|
||||
enable: enable === "1",
|
||||
config: JSON.stringify(config)
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
apiflowWarnConfigSave(payload).then(({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(22619, "保存成功!"));
|
||||
this.setState({ warnConfigId: data });
|
||||
payload.enable && this.alertRef.apiflowWarnReceiverList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
renderChildren = () => {
|
||||
const { selectedKey } = this.state;
|
||||
const { selectedKey, warnConfigId } = this.state;
|
||||
let CurrentDom = null;
|
||||
switch (selectedKey) {
|
||||
case "ENABLE_SETTINGS":
|
||||
CurrentDom = <EnableSettings/>;
|
||||
break;
|
||||
case "INTERFACE_FLOW_STATISTICS":
|
||||
CurrentDom =
|
||||
<InterfaceFlowStatistics updateTime={(data) => this.setState({ lastUpdateTime: data.lastUpdateTime })}/>;
|
||||
break;
|
||||
case "INSUFFICIENT_TRAFFIC_ALERT":
|
||||
CurrentDom = <InsufficientTrafficAlert/>;
|
||||
CurrentDom = <InsufficientTrafficAlert ref={dom => this.alertRef = dom} warnConfigId={warnConfigId}/>;
|
||||
break;
|
||||
case "TRAFFIC_USAGE_RECORD":
|
||||
CurrentDom = <TrafficUsageRecords/>;
|
||||
break;
|
||||
default:
|
||||
CurrentDom = null;
|
||||
|
|
@ -35,14 +88,29 @@ class Index extends Component {
|
|||
}
|
||||
return CurrentDom;
|
||||
};
|
||||
handleExport = () => {
|
||||
const { intelligentStore: { form } } = this.props;
|
||||
window.open(`${window.ecologyContentPath || ""}/api/bs/hrmsalary/taxdeclaration/apiflow/record/export?${convertToUrlString(form.getFormParams())}`, "_blank");
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey } = this.state;
|
||||
const { selectedKey, lastUpdateTime, loading } = this.state;
|
||||
const buttons = selectedKey === "INSUFFICIENT_TRAFFIC_ALERT" ?
|
||||
[<Button type="primary" onClick={this.saveItaBaseInfo} loading={loading}>{getLabel(537558, "保存")}</Button>] :
|
||||
selectedKey === "TRAFFIC_USAGE_RECORD" ?
|
||||
[<Button type="primary" onClick={this.handleExport}>{getLabel(17416, "导出")}</Button>] :
|
||||
selectedKey === "INTERFACE_FLOW_STATISTICS" ? [
|
||||
<span className="statistic-time">
|
||||
<span className="label">{getLabel(111, "最后统计时间:")}</span>
|
||||
<span className="value">{lastUpdateTime}</span>
|
||||
</span>
|
||||
] : [];
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "智能算薪")} selectedKey={selectedKey}
|
||||
icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
tabDatas={tabs} onChange={selectedKey => this.setState({ selectedKey })}
|
||||
buttons={buttons} className="intelligentSetting-layout"
|
||||
>
|
||||
<div style={{ height: "100%", background: "#f6f6f6", padding: 16 }}>{this.renderChildren()}</div>
|
||||
</WeaReqTop>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,224 @@
|
|||
.intelligentSetting-layout {
|
||||
.wea-new-top-req-title > div:last-child {
|
||||
right: 16px !important;
|
||||
}
|
||||
|
||||
.statistic-time {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.space {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.mr10 {
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.enable-settings {
|
||||
.swith-area, .userinfo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 16px;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
height: 80px;
|
||||
border: 2px solid #e5e5e5;
|
||||
border-left-color: #5d9cec;
|
||||
|
||||
.left {
|
||||
padding: 10px 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.info {
|
||||
font-size: 12px;
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.userinfo {
|
||||
margin-top: 16px;
|
||||
|
||||
.left {
|
||||
flex: 1 !important;
|
||||
|
||||
.wea-search-group, .wea-form-cell {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.insufficientAlertWrapper {
|
||||
background: #fff;
|
||||
padding: 0;
|
||||
border: 1px solid #f2f2f2;
|
||||
border-bottom: none;
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.items-center {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.wea-content {
|
||||
padding: 0;
|
||||
|
||||
.wea-form-item {
|
||||
padding: 5px 12px;
|
||||
border-bottom: 1px solid #f2f2f2;
|
||||
}
|
||||
}
|
||||
|
||||
.threshold {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.before {
|
||||
margin-right: 6px;
|
||||
}
|
||||
|
||||
.after {
|
||||
margin-left: 16px;
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.tip {
|
||||
display: inline-block;
|
||||
color: #999;
|
||||
padding: 6px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.channel-list {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
& > .channel-item:not(:first-child) {
|
||||
margin-left: 16px;
|
||||
}
|
||||
|
||||
.channel-item {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.icon-coms-Flow-setting {
|
||||
font-size: 16px;
|
||||
cursor: pointer;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.table {
|
||||
.title {
|
||||
height: 40px;
|
||||
justify-content: space-between;
|
||||
background: #f6f6f6;
|
||||
|
||||
.titleLeft {
|
||||
font-size: 14px;
|
||||
color: #111;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.trafficUsageRecords-layout {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
|
||||
.head {
|
||||
margin-bottom: 16px;
|
||||
|
||||
.wea-search-group {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.wea-search-group, .wea-content, .wea-form-cell, .wea-form-item {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.statisticsInfo-layout {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.static-data {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
height: 80px;
|
||||
background-color: #fff;
|
||||
border: 2px solid #e5e5e5;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
|
||||
.left {
|
||||
width: 65px;
|
||||
height: 65px;
|
||||
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%
|
||||
}
|
||||
}
|
||||
|
||||
.right {
|
||||
margin-left: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
|
||||
.data {
|
||||
color: #111;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.title {
|
||||
margin-top: 8px;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.detail-area {
|
||||
margin-top: 8px;
|
||||
|
||||
.title {
|
||||
height: 40px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
|
||||
.text {
|
||||
font-size: 14px;
|
||||
color: #111;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -23,7 +23,7 @@ class LedgerSalaryItemEditSlide extends Component {
|
|||
const key = Object.keys(params)[0];
|
||||
this.props.onUpdateRequest(request, key);
|
||||
};
|
||||
handleShowFormal = () => this.props.onEditFormnul();
|
||||
handleShowFormal = (salaryItemName) => this.props.onEditFormnul(salaryItemName);
|
||||
|
||||
render() {
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -147,7 +147,7 @@ class LedgerSalaryItemNormal extends Component {
|
|||
const newDateSource = _.map(dataSource, item => {
|
||||
return {
|
||||
...item,
|
||||
items: _.filter(item.items || [], child => child.name.indexOf(salaryItemKeywords) !== -1)
|
||||
items: _.filter(item.items || [], child => (child.name.indexOf(salaryItemKeywords) !== -1 || child.formulaContent.indexOf(salaryItemKeywords) !== -1))
|
||||
};
|
||||
});
|
||||
return (
|
||||
|
|
@ -262,7 +262,7 @@ const TitleComp = (props) => {
|
|||
<Button type="ghost" onClick={() => onAddCategory()} style={{ marginRight: 10 }}>新增分类</Button>
|
||||
}
|
||||
<WeaInputSearch value={salaryItemKeywords} onChange={onChange}
|
||||
placeholder={getLabel(111, "请输入薪资项目名称")}
|
||||
placeholder={getLabel(111, "请输入薪资项目名称或者公式名称")}
|
||||
/>
|
||||
</div>
|
||||
</div>;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@ class LedgerSalaryItemTable extends Component {
|
|||
visible: false,
|
||||
formulaId: "",
|
||||
valueType: "",
|
||||
dataType: ""
|
||||
dataType: "",
|
||||
name: ""
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
@ -163,13 +164,13 @@ class LedgerSalaryItemTable extends Component {
|
|||
originSqlContent: ((valueType.toString() === "2" && (!originFormulaContent || originFormulaContent === " ")) || (valueType.toString() === "1") || (valueType.toString() === "2" && originFormulaContent)) ? " " : originSqlContent
|
||||
}, salaryItemId);
|
||||
};
|
||||
handleEditFormnul = () => {
|
||||
handleEditFormnul = (salaryItemName) => {
|
||||
const { salaryItemPayload, editFormulModal } = this.state;
|
||||
const { record } = salaryItemPayload;
|
||||
const { valueType, formulaId, dataType, originFormulaContent, originSqlContent } = record;
|
||||
this.setState({
|
||||
editFormulModal: {
|
||||
...editFormulModal, visible: true, valueType, dataType,
|
||||
...editFormulModal, visible: true, valueType, dataType, name: salaryItemName,
|
||||
formulaId: ((valueType.toString() === "2" && (originFormulaContent || originFormulaContent !== " ")) || valueType.toString() === "3" && (originSqlContent || originSqlContent === " ")) ? formulaId : ""
|
||||
}
|
||||
});
|
||||
|
|
@ -180,7 +181,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
editFormulModal: {
|
||||
...editFormulModal,
|
||||
visible: false,
|
||||
formulaId: "",
|
||||
formulaId: "", name: "",
|
||||
valueType: "", dataType: ""
|
||||
}
|
||||
});
|
||||
|
|
@ -255,9 +256,9 @@ class LedgerSalaryItemTable extends Component {
|
|||
dataIndex: "valueType",
|
||||
key: "valueType",
|
||||
render: (e, record) => {
|
||||
const { valueType } = record;
|
||||
const { valueType, formulaContent } = record;
|
||||
const key = !_.isNil(valueType) ? valueType : "";
|
||||
return <span> {key.toString() === "1" ? "输入" : key.toString() === "2" ? "自定义公式" : key.toString() === "3" ? "SQL" : ""} </span>;
|
||||
return <span> {key.toString() === "1" ? "输入" : key.toString() === "2" ? formulaContent : key.toString() === "3" ? formulaContent : ""} </span>;
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ export default class MobilePayroll extends React.Component {
|
|||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
||||
>
|
||||
{
|
||||
(_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") &&
|
||||
(!_.isEmpty(salaryGroups) && (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0")) &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
|
|
@ -210,7 +210,7 @@ export default class MobilePayroll extends React.Component {
|
|||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : JSON.stringify([])}
|
||||
>
|
||||
{
|
||||
(_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0") &&
|
||||
(!_.isEmpty(salaryGroups) && (_.isNil(mySalaryBillData.confirmStatus) || mySalaryBillData.confirmStatus === "0")) &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ class MySalaryView extends Component {
|
|||
salaryItemSet={!_.isEmpty(salaryGroups) ? JSON.stringify([employeeInformation, ...salaryGroups]) : []}
|
||||
>
|
||||
{
|
||||
(_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0") &&
|
||||
(!_.isEmpty(salaryGroups) && (_.isNil(mySalaryStore.confirmStatus) || mySalaryStore.confirmStatus === "0")) &&
|
||||
<ConfirmBtns
|
||||
confirmSalaryBill={this.confirmSalaryBill}
|
||||
goFeedback={this.handleGoFeedback}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import ImportModal from "../../../components/importModal";
|
|||
import * as API from "../../../apis/payrollFiles";
|
||||
import { Menu, Modal } from "antd";
|
||||
import "../index.less";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
|
||||
class ImportMenu extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -114,7 +115,7 @@ class ImportMenu extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { importType, refreshList, isExtEmp } = this.props;
|
||||
const { importType, refreshList, isExtEmp, searchItemsValue = {} } = this.props;
|
||||
const { importParams, previewColumns, previewDataSource } = this.state;
|
||||
let params = "";
|
||||
if (importParams.importType === "init" || importParams.importType === "salaryItemAdjust") {
|
||||
|
|
@ -153,8 +154,7 @@ class ImportMenu extends Component {
|
|||
}}
|
||||
previewImport={(params) => this.salaryArchivePreview(params)}
|
||||
importFile={(params) => this.handleImportFile(params)}
|
||||
templateLink={
|
||||
"/api/bs/hrmsalary/salaryArchive/downloadTemplate?importType=" + params
|
||||
templateLink={`/api/bs/hrmsalary/salaryArchive/downloadTemplate?importType=${params}&${convertToUrlString(searchItemsValue)}`
|
||||
}
|
||||
visiable={importParams.visible}
|
||||
onCancel={() => {
|
||||
|
|
|
|||
|
|
@ -433,6 +433,7 @@ class Index extends Component {
|
|||
<Dropdown overlay={
|
||||
<ImportMenu
|
||||
importType={importType}
|
||||
searchItemsValue={searchItemsValue}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.setState({ selectedRowKeys: [] });
|
||||
|
|
@ -523,6 +524,7 @@ class Index extends Component {
|
|||
<Dropdown overlay={
|
||||
<ImportMenu
|
||||
isExtEmp importType={importType}
|
||||
searchItemsValue={searchItemsValue}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.setState({ selectedRowKeys: [] });
|
||||
|
|
@ -834,6 +836,7 @@ class Index extends Component {
|
|||
<div style={{ display: "none" }}>
|
||||
<ImportMenu
|
||||
ref={(dom) => this.importRef = dom}
|
||||
searchItemsValue={this.state.searchItemsValue}
|
||||
refreshList={() => {
|
||||
this.query();
|
||||
this.setState({ selectedRowKeys: [] });
|
||||
|
|
|
|||
|
|
@ -162,7 +162,7 @@ export default class SalaryFileViewSlide extends React.Component {
|
|||
item.dataType === "number" ?
|
||||
<WeaInputNumber
|
||||
value={!_.isNil(item.value) ? item.value : 0}
|
||||
precision={2}
|
||||
precision={item.pattern || 2}
|
||||
viewAttr={selectedKey === "pending" ? 2 : 1}
|
||||
onChange={value => {
|
||||
item.value = value;
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
showForm: false,
|
||||
formalModalVisible: false
|
||||
formalModalVisible: false,
|
||||
salaryItemName: ""
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -16,9 +17,10 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
this.props.onChange({ ...this.props.request, ...params });
|
||||
};
|
||||
|
||||
handleShowFormal = () => {
|
||||
handleShowFormal = (salaryItemName) => {
|
||||
this.setState({
|
||||
formalModalVisible: true
|
||||
formalModalVisible: true,
|
||||
salaryItemName
|
||||
});
|
||||
};
|
||||
|
||||
|
|
@ -34,12 +36,13 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
render() {
|
||||
const { request } = this.props;
|
||||
const { valueType, dataType, formulaId } = request;
|
||||
const { formalModalVisible } = this.state;
|
||||
const { formalModalVisible, salaryItemName } = this.state;
|
||||
return (
|
||||
<div className="customSalaryItemSlide">
|
||||
<SalaryItemForm {...this.props} onChangeFieldsItem={this.handleChange} onShowFormal={this.handleShowFormal}/>
|
||||
{formalModalVisible &&
|
||||
<FormalFormModal
|
||||
name={salaryItemName}
|
||||
formulaId={formulaId}
|
||||
visible={formalModalVisible}
|
||||
valueType={valueType}
|
||||
|
|
@ -49,7 +52,8 @@ export default class CustomSalaryItemSlide extends React.Component {
|
|||
}}
|
||||
onCancel={() =>
|
||||
this.setState({
|
||||
formalModalVisible: false
|
||||
formalModalVisible: false,
|
||||
salaryItemName: ""
|
||||
})}
|
||||
/>}
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -208,7 +208,7 @@ export default class FormalFormModal extends React.Component {
|
|||
});
|
||||
this.parameters = result;
|
||||
let params = {
|
||||
name: "公式1",
|
||||
name: this.props.name || "公式1",
|
||||
description: "备注",
|
||||
module: "salary",
|
||||
useFor: "salaryitem",
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ class SalaryItemForm extends Component {
|
|||
(type === "INPUT" && display) ?
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
<WeaInput viewAttr={viewAttr} value={value}
|
||||
onClick={() => (key === "originSqlContent" || key === "originFormulaContent") && onShowFormal()}
|
||||
onClick={() => (key === "originSqlContent" || key === "originFormulaContent") && onShowFormal(request["name"])}
|
||||
onChange={v => this.handleChangeSalaryFiledItems(key, v)}/></WeaFormItem> :
|
||||
(type === "SWITCH" && display) ?
|
||||
<WeaFormItem label={label} labelCol={{ span: 6 }} wrapperCol={{ span: 12 }}>
|
||||
|
|
|
|||
|
|
@ -293,8 +293,10 @@ export default class Archives extends React.Component {
|
|||
|
||||
// 模板点击
|
||||
handleTemplateLinkClick = (exportData) => {
|
||||
const { archivesStore: { form } } = this.props;
|
||||
const formParams = form.getFormParams() || {};
|
||||
const { selectedKey } = this.state;
|
||||
let url = `/api/bs/hrmsalary/scheme/template/export?exportData=${exportData}&runStatuses=${selectedKey === "pending" ? "1" : "2,3"}`;
|
||||
let url = `/api/bs/hrmsalary/scheme/template/export?exportData=${exportData}&runStatuses=${selectedKey === "pending" ? "1" : "2,3"}&${convertToUrlString(formParams)}`;
|
||||
window.open(`${window.location.origin}${url}`);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ export default class DefaultSlideForm extends React.Component {
|
|||
return (
|
||||
<WeaInputNumber
|
||||
min={0}
|
||||
precision={3}
|
||||
precision={4}
|
||||
value={text}
|
||||
onChange={v => {
|
||||
this.updateDataSource(record, v, "paymentProportion");
|
||||
|
|
|
|||
|
|
@ -2,12 +2,26 @@
|
|||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
background: #f6f6f6;
|
||||
|
||||
.wea-new-top-req-wapper .wea-new-top-req-main {
|
||||
background: #f6f6f6 !important;
|
||||
}
|
||||
|
||||
.wea-new-top-req-wapper .wea-new-top-req {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
.wea-search-tab, .wea-input-focus {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.normalWapper {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
padding: 0 16px;
|
||||
|
||||
.tableWrapper {
|
||||
flex: 1;
|
||||
|
|
@ -16,12 +30,18 @@
|
|||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.topContent {
|
||||
padding: 8px 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
margin-top: 16px;
|
||||
|
||||
.month {
|
||||
margin-right: 26px;
|
||||
|
|
@ -69,14 +89,16 @@
|
|||
|
||||
//退差;补差
|
||||
.regressionWrapper, .differenceWrapper {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 16px;
|
||||
|
||||
.tableWrapper {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,13 +6,15 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaTab } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||
import NormalIndex from "./components/normal";
|
||||
import OverViewIndex from "./components/overView";
|
||||
import AbnormalListIndex from "./components/abnormalList";
|
||||
import Regression from "./components/regression";
|
||||
import MakeupDifference from "./components/makeupDifference";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("standingBookStore")
|
||||
@observer
|
||||
class StandingBookDetail extends Component {
|
||||
|
|
@ -43,7 +45,7 @@ class StandingBookDetail extends Component {
|
|||
newTabList.push(newTabList.splice(_.findIndex(newTabList, it => it.id === "4"), 1)[0]);
|
||||
this.setState({
|
||||
selectedKey: newTabList[0].id,
|
||||
tabList: _.map(newTabList, it => ({ title: it.content, viewcondition: it.id })),
|
||||
tabList: _.map(newTabList, it => ({ title: it.content, key: it.id })),
|
||||
remarks, billMonth
|
||||
});
|
||||
});
|
||||
|
|
@ -53,33 +55,31 @@ class StandingBookDetail extends Component {
|
|||
const { selectedKey, tabList, remarks, billMonth } = this.state;
|
||||
return (
|
||||
<div className="standingBookDetailWapper">
|
||||
<WeaTab
|
||||
datas={tabList}
|
||||
keyParam="viewcondition" //主键
|
||||
selectedKey={selectedKey}
|
||||
onChange={(selectedKey) => {
|
||||
this.setState({ selectedKey });
|
||||
}}
|
||||
/>
|
||||
{
|
||||
(selectedKey === "1" || selectedKey === "3") &&
|
||||
<NormalIndex selectedKey={selectedKey} remarks={remarks} billMonth={billMonth} type={this.type}
|
||||
paymentOrganization={this.paymentOrganization} location={this.props.location}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "2" &&
|
||||
<AbnormalListIndex billMonth={billMonth} type={this.type} paymentOrganization={this.paymentOrganization}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "4" &&
|
||||
<OverViewIndex billMonth={billMonth} type={this.type} paymentOrganization={this.paymentOrganization}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "5" && <Regression/>
|
||||
}
|
||||
{
|
||||
selectedKey === "6" && <MakeupDifference/>
|
||||
}
|
||||
<WeaReqTop
|
||||
title={getLabel(538002, "社保福利台账")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" showDropIcon={false} tabDatas={tabList} selectedKey={selectedKey}
|
||||
onChange={selectedKey => this.setState({ selectedKey })}
|
||||
>
|
||||
{
|
||||
(selectedKey === "1" || selectedKey === "3") &&
|
||||
<NormalIndex selectedKey={selectedKey} remarks={remarks} billMonth={billMonth} type={this.type}
|
||||
paymentOrganization={this.paymentOrganization} location={this.props.location}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "2" &&
|
||||
<AbnormalListIndex billMonth={billMonth} type={this.type} paymentOrganization={this.paymentOrganization}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "4" &&
|
||||
<OverViewIndex billMonth={billMonth} type={this.type} paymentOrganization={this.paymentOrganization}/>
|
||||
}
|
||||
{
|
||||
selectedKey === "5" && <Regression/>
|
||||
}
|
||||
{
|
||||
selectedKey === "6" && <MakeupDifference/>
|
||||
}
|
||||
</WeaReqTop>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import { PayrollFilesStore } from "./payrollFiles";
|
|||
import { SpecialAddStore } from "./specialAdd";
|
||||
import { ExternalPersonManageStore } from "./externalPersonManage";
|
||||
import { EmployeeDeclareStore } from "./employeeDeclare";
|
||||
import { IntelligentStore } from "./intelligent";
|
||||
|
||||
module.exports = {
|
||||
baseFormStore: new BaseFormStore(),
|
||||
|
|
@ -43,5 +44,6 @@ module.exports = {
|
|||
payrollFilesStore: new PayrollFilesStore(),
|
||||
specialAddStore: new SpecialAddStore(),
|
||||
externalPersonManageStore: new ExternalPersonManageStore(),
|
||||
employeeDeclareStore: new EmployeeDeclareStore()
|
||||
employeeDeclareStore: new EmployeeDeclareStore(),
|
||||
intelligentStore: new IntelligentStore(),
|
||||
};
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
import { action, observable } from "mobx";
|
||||
import { WeaForm, WeaTableNew } from "comsMobx";
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
export class IntelligentStore {
|
||||
@observable form = new WeaForm(); //流量使用记录查询form实例
|
||||
@observable remindObjform = new WeaForm(); //流量使用记录查询form实例
|
||||
@observable tableStore = new TableStore();
|
||||
|
||||
@action("...")
|
||||
Init = () => {
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue