Merge branch 'release/3.0.1.2504.01-合并业务线' into custom-旭化成
This commit is contained in:
commit
e8ca321a13
|
|
@ -0,0 +1,46 @@
|
|||
import { WeaTools } from "ecCom";
|
||||
import { postFetch } from "../util/request";
|
||||
// 推送配置列表
|
||||
export const getPushSettingList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/push/setting/list", params);
|
||||
};
|
||||
// 保存推送配置
|
||||
export const savePushSetting = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/push/setting/save", params);
|
||||
};
|
||||
// 删除推送配置
|
||||
export const deletePushSetting = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/push/setting/delete", "GET", params);
|
||||
};
|
||||
// 推送配置明细列表
|
||||
export const getPushItemList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/push/item/list", params);
|
||||
};
|
||||
// 保存推送配置明细
|
||||
export const savePushItemList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/push/item/save", params);
|
||||
};
|
||||
// 删除推送配置明细
|
||||
export const deletePushItemList = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/push/item/delete", "GET", params);
|
||||
};
|
||||
// 推送记录列表
|
||||
export const getPushRecordList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/push/record/list", params);
|
||||
};
|
||||
// 推送记录详细列表
|
||||
export const getPushRecordDetail = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/push/record/detail", params);
|
||||
};
|
||||
// 推送记录-推送
|
||||
export const pushRecords = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/push/record/push", params);
|
||||
};
|
||||
// 推送记录-撤回
|
||||
export const withdrawRecords = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/push/record/withdraw", params);
|
||||
};
|
||||
//创建推送记录
|
||||
export const createPushRecords = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/push/record/create", params);
|
||||
};
|
||||
|
|
@ -45,11 +45,13 @@ export const doSecondAuth = (params, headers) => {
|
|||
export const getPasswordForm = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/getPasswordForm", "GET", params);
|
||||
};
|
||||
export const checkPassword = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
|
||||
export const checkPassword = (params, headers) => {
|
||||
return formHeaderPost("/api/hrm/secondarypwd/checkPassword", "POST", params, headers);
|
||||
// return WeaTools.callApi("/api/hrm/secondarypwd/checkPassword", "POST", params);
|
||||
};
|
||||
export const saveSecondaryPwd = params => {
|
||||
return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
|
||||
export const saveSecondaryPwd = (params, headers) => {
|
||||
return formHeaderPost("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params, headers);
|
||||
// return WeaTools.callApi("/api/hrm/secondarypwd/saveSecondaryPwd", "POST", params);
|
||||
};
|
||||
export const salaryBillGetToken = params => {
|
||||
return postFetch("/api/bs/hrmsalary/salaryBill/getToken", params);
|
||||
|
|
|
|||
|
|
@ -202,26 +202,38 @@ 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 => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/payrollCheckType", "GET", params);
|
||||
};
|
||||
//工资单-反馈验证
|
||||
export const feedBackSalaryBill = params => {
|
||||
export const feedBackSalaryBill = async params => {
|
||||
const { header, ...payload } = params;
|
||||
return fetch(`/api/bs/hrmsalary/salaryBill/feedBackSalaryBill?${convertToUrlString(payload)}`, {
|
||||
const res = await fetch(`/api/bs/hrmsalary/salaryBill/feedBackSalaryBill?${convertToUrlString(payload)}`, {
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
headers: { "Content-Type": "application/json", ...header }
|
||||
}).then(res => res.json());
|
||||
});
|
||||
return await res.json();
|
||||
// return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/feedBackSalaryBill", "GET", params);
|
||||
};
|
||||
//工资单-确认
|
||||
export const confirmSalaryBill = params => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params);
|
||||
export const confirmSalaryBill = async params => {
|
||||
const { header, ...payload } = params;
|
||||
const res = await fetch(`/api/bs/hrmsalary/salaryBill/confirmSalaryBill?${convertToUrlString(payload)}`, {
|
||||
method: "GET",
|
||||
mode: "cors",
|
||||
headers: { "Content-Type": "application/json", ...header }
|
||||
});
|
||||
return await res.json();
|
||||
// return WeaTools.callApi("/api/bs/hrmsalary/salaryBill/confirmSalaryBill", "GET", params);
|
||||
};
|
||||
|
||||
// 工资单基础设置-获取设置列表
|
||||
|
|
|
|||
|
|
@ -15,10 +15,18 @@ export const getTabList = (params) => {
|
|||
export const getNormalList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/common/list", params);
|
||||
};
|
||||
//社会福利台账-获取正常缴纳列表合计行
|
||||
export const getNormalListSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/common/list/sum", params);
|
||||
};
|
||||
//社会福利台账-获取补缴列表
|
||||
export const getSupplementaryList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list", params);
|
||||
};
|
||||
//社会福利台账-获取补缴列表合计
|
||||
export const getSupplementaryListSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/supplementary/list/sum", params);
|
||||
};
|
||||
|
||||
//社会福利台账-获取总览列表
|
||||
export const getOverViewList = (params) => {
|
||||
|
|
@ -122,10 +130,18 @@ export const saveRecession = (params) => {
|
|||
export const recessionList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list", params);
|
||||
};
|
||||
//查询退差列表合计行
|
||||
export const recessionListSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/recession/list/sum", params);
|
||||
};
|
||||
//查询补差列表
|
||||
export const balanceList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list", params);
|
||||
};
|
||||
//查询补差列表合计行
|
||||
export const balanceListSum = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/detail/balance/list/sum", params);
|
||||
};
|
||||
//删除退差数据
|
||||
export const delRecession = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/delRecession", params);
|
||||
|
|
@ -205,3 +221,11 @@ export const cacheWelfareListField = (params) => {
|
|||
export const cacheBalanceWelfareList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/cacheBalanceWelfareList", params);
|
||||
};
|
||||
// 社保福利台账正常缴纳-增加人员并核算
|
||||
export const addSocialAcctEmp = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/addSocialAcctEmp", params);
|
||||
};
|
||||
// 社保福利台账正常缴纳-增加人员并核算
|
||||
export const deleteSocialAcctEmp = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/siaccount/deleteSocialAcctEmp", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -142,6 +142,10 @@ export const savePageListSetting = (params) => {
|
|||
export const savePageListTemplate = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/common/pageList/template/save", params);
|
||||
};
|
||||
// 薪酬统计报表-导出模板示例下载
|
||||
export const downloadPageListTemplate = (params) => {
|
||||
return postExportFetch("/api/bs/hrmsalary/common/pageList/template/file/download", params);
|
||||
};
|
||||
//薪酬统计报表-获取页面模板
|
||||
export const getPageListTemplatelist = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/common/pageList/template/list", params);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export const taxAgentRangeSync = (params) => {
|
|||
|
||||
// 系统管理员权限
|
||||
export const getPermission = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/taxAgent/permission", "GET", params);
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/auth/permission", "GET", params);
|
||||
};
|
||||
|
||||
//获取个税扣缴义务人表单
|
||||
|
|
@ -102,3 +102,73 @@ export const getTaxAgentSelectListAsAdmin = (params) => {
|
|||
export const hasIconInTax = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/sys/conf/code?code=hideIconInTax", "GET", params);
|
||||
};
|
||||
|
||||
/**权限-角色相关*/
|
||||
//同步业务线
|
||||
export const syncAuth = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/sync", params);
|
||||
};
|
||||
//角色列表
|
||||
export const getRoleList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/role/list", params);
|
||||
};
|
||||
//保存角色
|
||||
export const saveAuthRole = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/role/save", params);
|
||||
};
|
||||
//删除角色
|
||||
export const deleteAuthRole = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/role/delete", params);
|
||||
};
|
||||
//成员列表
|
||||
export const authMemberList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/member/list", params);
|
||||
};
|
||||
//保存成员
|
||||
export const saveAuthMember = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/member/save", params);
|
||||
};
|
||||
//数据列表
|
||||
export const authDataList = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/data/list", params);
|
||||
};
|
||||
//删除成员
|
||||
export const deleteAuthMember = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/member/delete", params);
|
||||
};
|
||||
//删除数据
|
||||
export const deleteAuthData = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/data/delete", params);
|
||||
};
|
||||
//保存数据
|
||||
export const saveAuthData = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/data/save", params);
|
||||
};
|
||||
//同步数据
|
||||
export const syncAuthData = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/data/sync", params);
|
||||
};
|
||||
//同步成员
|
||||
export const syncAuthMember = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/member/sync", params);
|
||||
};
|
||||
//保存权限
|
||||
export const saveAuthOpt = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/opt/save", params);
|
||||
};
|
||||
//权限项
|
||||
export const getAuthOptTree = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/auth/opt/tree", "GET", params);
|
||||
};
|
||||
//业务线详情
|
||||
export const getRole = (params) => {
|
||||
return WeaTools.callApi("/api/bs/hrmsalary/auth/role/getRole", "GET", params);
|
||||
};
|
||||
//成员明细列表
|
||||
export const authMemberDetail = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/member/detail", params);
|
||||
};
|
||||
//数据明细列表
|
||||
export const authDataDetail = (params) => {
|
||||
return postFetch("/api/bs/hrmsalary/auth/data/detail", params);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -33,18 +33,17 @@ class AssociativeSearchMult extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
handleSearch = (value) => {
|
||||
this.setState({ loading: true });
|
||||
this.getData(value);
|
||||
};
|
||||
handleSearch = (value) => this.getData(value);
|
||||
getData = (name = "") => {
|
||||
const { browserConditionParam } = this.props;
|
||||
const { browserConditionParam, tags } = this.props;
|
||||
if (tags) return;
|
||||
const {
|
||||
completeURL, filterByName, searchParamsKey, convertDatasource, dataParams = {}
|
||||
} = browserConditionParam;
|
||||
if (_.trim(name)) {
|
||||
let payload = { ...dataParams };
|
||||
searchParamsKey && (payload = { ...payload, [searchParamsKey]: name, current: 1, pageSize: 9999 });
|
||||
this.setState({ loading: true });
|
||||
postFetch(completeURL, payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status && data.list) {
|
||||
|
|
@ -105,7 +104,7 @@ class AssociativeSearchMult extends Component {
|
|||
|
||||
render() {
|
||||
const { data, dropdownWidth } = this.state;
|
||||
const { viewAttr, selectedValues, datas, isSingle, browserConditionParam = {} } = this.props;
|
||||
const { viewAttr, selectedValues, datas, isSingle, browserConditionParam = {}, tags } = this.props;
|
||||
const clsname = classNames({
|
||||
"required": (viewAttr === 3 || viewAttr === "3") && _.isEmpty(selectedValues),
|
||||
"mr12": viewAttr === "3" && _.isEmpty(selectedValues),
|
||||
|
|
@ -127,7 +126,7 @@ class AssociativeSearchMult extends Component {
|
|||
);
|
||||
}
|
||||
let options = data.map(d => <Option key={d.id} title={d.name}>{d.name}</Option>);
|
||||
selectedValues && selectedValues.map((v) => {
|
||||
!tags && selectedValues && selectedValues.map((v) => {
|
||||
v && options.unshift(<Option key={v} title={datas[v].name}>{datas[v].name}</Option>);
|
||||
});
|
||||
const select = <Select
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ class CustomBrowserDialog extends Component {
|
|||
listDatas: convertDatasource ? convertDatasource(data.list) : data.list,
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }
|
||||
});
|
||||
} else if (status && data.modeList) {
|
||||
this.setState({ listDatas: _.map(data.modeList, o => ({ ...o, id: o.name })) });
|
||||
} else {
|
||||
this.setState({ listDatas: _.map(data, o => ({ ...o, id: String(o.id) })) });
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,17 +97,11 @@ class Index extends Component {
|
|||
}, () => {
|
||||
this.props.onChange && this.props.onChange(values.join(","));
|
||||
this.props.onCustomChange && this.props.onCustomChange(this.state.selectedData);
|
||||
if (form) {
|
||||
form.updateFields({
|
||||
[getKey(fieldConfig)]: { value: this.state.searchKeys.join(",") }
|
||||
});
|
||||
}
|
||||
if (form) form.updateFields({ [getKey(fieldConfig)]: { value: this.state.searchKeys.join(",") } });
|
||||
});
|
||||
};
|
||||
onBrowerClick = (keys, selectedObj) => {
|
||||
if (_.isEmpty(keys)) {
|
||||
this.setState({ searchKeys: [], selectedData: {}, rightDatas: [] });
|
||||
}
|
||||
if (_.isEmpty(keys)) this.setState({ searchKeys: [], selectedData: {}, rightDatas: [] });
|
||||
this.setState({ browserDialog: { visible: true } });
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ export default class FormInfo extends Component {
|
|||
}
|
||||
}
|
||||
coms != null && formItems.push({
|
||||
com: (<WeaFormItem {...itemProps}>{coms}</WeaFormItem>),
|
||||
com: (<WeaFormItem {...itemProps}>{coms}</WeaFormItem>), hide: field.hide,
|
||||
col
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class PersonalScopeTable extends Component {
|
|||
|
||||
render() {
|
||||
const { dataSource, columns, pageInfo, loading, selectedRowKeys } = this.state;
|
||||
const { onChangeSelectKey } = this.props;
|
||||
const { onChangeSelectKey, showOperateBtn } = this.props;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
|
|
@ -128,7 +128,7 @@ class PersonalScopeTable extends Component {
|
|||
return (
|
||||
<WeaTable
|
||||
rowKey="id"
|
||||
rowSelection={rowSelection}
|
||||
rowSelection={showOperateBtn ? rowSelection : null}
|
||||
dataSource={dataSource}
|
||||
pagination={pagination}
|
||||
loading={loading.query}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ class Index extends Component {
|
|||
} else if (index === 1) {
|
||||
return { ...item, fixed: "left", width: 176 };
|
||||
}
|
||||
if (item.dataIndex === "operate") {
|
||||
if (item.dataIndex === "operate" || item.dataIndex === "opts") {
|
||||
return { ...item, fixed: "right", width: item.width || "120px" };
|
||||
}
|
||||
return { ...item, width: "33%" };
|
||||
|
|
|
|||
|
|
@ -6,32 +6,33 @@
|
|||
*/
|
||||
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 });
|
||||
}
|
||||
}
|
||||
|
||||
handleSendCaptcha = () => {
|
||||
sendMobileCode({ id: this.props.id }).then(({ status, data }) => {
|
||||
|
|
@ -48,18 +49,45 @@ 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;
|
||||
}
|
||||
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 (
|
||||
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, "验证码验证")}
|
||||
|
|
@ -73,7 +101,7 @@ class Index extends Component {
|
|||
labelCol={{ span: 8 }}
|
||||
wrapperCol={{ span: 16 }}
|
||||
>
|
||||
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(826, "验证码未填写")}>
|
||||
<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}>
|
||||
|
|
@ -86,6 +114,8 @@ class Index extends Component {
|
|||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
</WeaDialog>
|
||||
}
|
||||
</React.Fragment>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,8 +5,12 @@
|
|||
.wea-form-item-wrapper {
|
||||
.wea-error {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.captchaInputBox {
|
||||
.captchaInputBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
|
@ -22,8 +26,4 @@
|
|||
height: 30px;
|
||||
line-height: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ class Index extends Component {
|
|||
render() {
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "编辑账套")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
title={this.props.title || getLabel(111, "编辑账套")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
showDropIcon={false} tabDatas={this.props.tabDatas} {...this.props}
|
||||
/>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const getLabel = WeaLocaleProvider.getLabel;
|
|||
class Index extends Component {
|
||||
render() {
|
||||
return (
|
||||
<WeaTop title={getLabel(111, "新建账套")} icon={<i className="icon-coms-fa"/>}
|
||||
<WeaTop title={this.props.title || getLabel(111, "新建账套")} icon={<i className="icon-coms-fa"/>}
|
||||
iconBgcolor="#F14A2D" {...this.props}/>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,111 +0,0 @@
|
|||
import React from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
|
||||
import { Button } from "antd";
|
||||
import { WeaLogView } from "comsMobx";
|
||||
import { WeaLocaleProvider, WeaNewScroll, WeaTop } from "ecCom";
|
||||
|
||||
import { getSearchs, renderLoading, renderNoright } from "../util"; // 从util文件引入公共的方法
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const WeaLogViewComp = WeaLogView.Component;
|
||||
|
||||
@inject("baseFormStore")
|
||||
@observer
|
||||
export default class BaseForm extends React.Component {
|
||||
componentWillMount() { // 初始化渲染页面
|
||||
const { baseFormStore: { doInit } } = this.props;
|
||||
doInit();
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const { baseFormStore: { doInit } } = this.props;
|
||||
if (this.props.location.key !== nextProps.location.key) { // 手动刷新、切换菜单 重新初始化
|
||||
doInit();
|
||||
}
|
||||
}
|
||||
|
||||
// 渲染右键菜单和顶部下拉菜单
|
||||
getRightMenu() {
|
||||
const { baseFormStore: { setLogVisible, saveForm } } = this.props;
|
||||
let btnArr = [
|
||||
{
|
||||
key: "BTN_SAVE",
|
||||
icon: <i className="icon-coms-Preservation"/>,
|
||||
content: `${getLabel(86, "保存")}`,
|
||||
onClick: () => saveForm()
|
||||
},
|
||||
{
|
||||
key: "log",
|
||||
content: getLabel(83, "日志"),
|
||||
icon: <i className="icon-coms-Print-log"/>,
|
||||
onClick: () => setLogVisible(true)
|
||||
}];
|
||||
return btnArr;
|
||||
}
|
||||
|
||||
render() {
|
||||
/* 页面渲染说明:
|
||||
1、判断是否无权限: 是显示无权限页面
|
||||
2、渲染form页面:
|
||||
2-1: WeaRightMenu 右键菜单
|
||||
2-2: WeaTop: 顶部: 包括下拉菜单
|
||||
2-3: renderLoading: 加载数据中的loading效果(统一封装在util中)
|
||||
2-4: WeaNewScroll 顶部以下超长滚动处理
|
||||
2-5: 通过getSearchs方法渲染form
|
||||
*/
|
||||
const { baseFormStore } = this.props;
|
||||
const {
|
||||
loading,
|
||||
hasRight,
|
||||
form,
|
||||
condition,
|
||||
logVisible,
|
||||
logStore,
|
||||
saveLoading,
|
||||
setLogVisible,
|
||||
saveForm
|
||||
} = baseFormStore; // 从后台取数据 和 方法
|
||||
|
||||
if (!hasRight && !loading) { // 无权限处理
|
||||
return renderNoright();
|
||||
}
|
||||
|
||||
const btns = [ // 顶部按钮
|
||||
<Button type="primary" loading={saveLoading} onClick={() => saveForm()}>保存</Button>
|
||||
];
|
||||
const collectParams = { // 收藏功能配置
|
||||
favname: "基础表单",
|
||||
favouritetype: 1,
|
||||
objid: 0,
|
||||
link: "wui/index.html#/ns_demo01/index",
|
||||
importantlevel: 1
|
||||
};
|
||||
return (
|
||||
<WeaTop
|
||||
title="基础表单" // title
|
||||
icon={<i className="icon-coms-fa"/>} // 左侧图标
|
||||
iconBgcolor="#F14A2D" // 左侧图标背景色
|
||||
buttons={btns} // 顶部按钮: 这里是保存按钮,不需要可以不显示
|
||||
buttonSpace={10} // 按钮之间的间隔
|
||||
showDropIcon={true} // 是否显示右侧下拉按钮
|
||||
dropMenuDatas={this.getRightMenu()} // 下拉菜单(和页面的右键菜单相同)
|
||||
dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能
|
||||
>
|
||||
{loading ? renderLoading() :
|
||||
<WeaNewScroll height="100%">
|
||||
{getSearchs(form, toJS(condition), 1)}
|
||||
</WeaNewScroll>
|
||||
}
|
||||
<WeaLogViewComp // 日志功能(一般后端的应用设置是需要的)
|
||||
visible={logVisible} // 日志弹框的显示隐藏
|
||||
onCancel={() => setLogVisible(false)} // 关闭日志弹框时的操作:设置logVisible属性为false
|
||||
logStore={logStore} // 日志的store
|
||||
logType="1" // 模块编码: 该参数要根据模块来给
|
||||
logSmallType="1" // 细分模块编码: 该参数要根据模块来给
|
||||
/>
|
||||
</WeaTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ class Content extends Component {
|
|||
const { onlyOneGrup, showData } = dealTemplate(_.filter(itemTypeList, o => !!o), "pc");
|
||||
return (
|
||||
<div className="salary-preview-container">
|
||||
<div style={{ border: "10px solid #F3F9FF" }}>
|
||||
<div style={{ border: "10px solid #F3F9FF", width: "100%" }}>
|
||||
<div className="edition-center">
|
||||
<div className="header">
|
||||
<div className="header-title">{theme || ""}</div>
|
||||
|
|
|
|||
|
|
@ -155,13 +155,14 @@
|
|||
.item-count {
|
||||
//flex-basis: 328px;
|
||||
flex: 1;
|
||||
padding-left: 16px;
|
||||
padding: 12px 16px;
|
||||
height: 100%;
|
||||
line-height: 40px;
|
||||
background: #fff;
|
||||
font-size: 12px;
|
||||
color: #5F5F5F;
|
||||
word-break: break-all;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
export const PAGE = {
|
||||
"salaryArchive": ["/hrmSalary/salaryFile"], //薪资档案
|
||||
"salarySob": ["/hrmSalary/ledger"], //薪资账套
|
||||
"salaryAcct": ["/hrmSalary/calculate", "/hrmSalary/calcView"], //薪资核算
|
||||
"salaryBill": ["/hrmSalary/payroll", "/hrmSalary/payrollGrant", "/hrmSalary/payrollDetail"], //工资单
|
||||
"taxDeclaration": ["/hrmSalary/declare", "/hrmSalary/generateDeclarationDetail"], //个税
|
||||
"addUpDeduction": ["/dataAcquisition/cumDeduct"], //累计专项附加扣除
|
||||
"specialAddDeduction": ["/dataAcquisition/specialAddDeduction"], //专项附加扣除
|
||||
"otherDeduction": ["/dataAcquisition/otherDeduct"], //其他免税扣除
|
||||
"addUpSituation": ["/dataAcquisition/cumSituation"], //往期累计情况
|
||||
"attendQuote": ["/dataAcquisition/attendance"], //考勤引用
|
||||
"myBill": ["/hrmSalary/mySalary", "/hrmSalary/mySalaryMobile"], //薪资福利
|
||||
"taxAgent": ["/hrmSalary/taxAgent"], //个税扣缴义务人
|
||||
"auth": ["/hrmSalary/roleManagement"], //业务管理线
|
||||
"variableArchive": ["/hrmSalary/variableSalary"], //浮动薪酬
|
||||
"siAccount": ["/socialSecurityBenefits/standingBook", "/socialSecurityBenefits/standingBookDetail", "/socialSecurityBenefits/sbofflineComparison"], //社保福利台账
|
||||
"siArchive": ["/socialSecurityBenefits/archives"], //社保档案
|
||||
"salaryField": ["/hrmSalary/fieldManagement"], //字段管理
|
||||
"salaryItem": ["/hrmSalary/salaryItem"], //薪资项目管理
|
||||
"siScheme": ["/socialSecurityBenefits/programme"], //社保福利方案
|
||||
"report": ["/hrmSalary/analysisOfSalaryStatistics", "/hrmSalary/reportView"], //报表
|
||||
"dataPush": ["/hrmSalary/datapush"], //数据推送
|
||||
"adjustRecord": ["/hrmSalary/adjustSalaryManage"] //调薪管理
|
||||
};
|
||||
export const EXCLUDE_PAGE = ["mobilepayroll"];
|
||||
|
|
@ -28,7 +28,7 @@ import PayrollDetail from "./pages/payroll/payrollDetail/payrollDetail";
|
|||
// import Declare from "./pages/declare";
|
||||
import Declare from "./pages/declare/declare"; //重构的个税申报表
|
||||
import TaxRate from "./pages/taxRate";
|
||||
import TaxAgent from "./pages/taxAgent";
|
||||
import TaxAgent from "./pages/salary/taxAgent";
|
||||
import CalculateDetail from "./pages/calculateDetail";
|
||||
import PlaceOnFileDetail from "./pages/calculateDetail/placeOnFileDetail";
|
||||
import CompareDetail from "./pages/calculateDetail/compareDetail";
|
||||
|
|
@ -42,6 +42,7 @@ import MobilePayroll from "./pages/mobilePayroll";
|
|||
import SysConfig from "./pages/sysConfig";
|
||||
import RuleConfig from "./pages/ruleConfig/ruleConfig";
|
||||
import Appconfig from "./pages/appConfig";
|
||||
import RoleManagement from "./pages/roleManagement";
|
||||
import FieldManagement from "./pages/fieldManagement";
|
||||
import AnalysisOfSalaryStatistics from "./pages/analysisOfSalaryStatistics";
|
||||
import EmployeeList from "./pages/employeeView";
|
||||
|
|
@ -53,6 +54,7 @@ import AdjustSalaryManage from "./pages/adjustSalaryManage";
|
|||
import TopologyMap from "./pages/topologyMap";
|
||||
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";
|
||||
|
|
@ -66,6 +68,7 @@ getLocaleLabel = function (nextState, replace, callback) {
|
|||
};
|
||||
const SocialSecurityBenefits = (props) => props.children;
|
||||
const DataAcquisition = (props) => props.children;
|
||||
|
||||
const Routes = (
|
||||
<Route key="hrmSalary" path="hrmSalary" onEnter={getLocaleLabel} component={Layout}>
|
||||
<Route key="historicalPayroll" path="historicalPayroll" component={HistoricalPayroll}/>
|
||||
|
|
@ -112,9 +115,11 @@ const Routes = (
|
|||
<Route key="sysconfig" path="sysconfig" component={SysConfig}/>
|
||||
<Route key="sysconfig-1" path="sysconfig-1" component={RuleConfig}/>
|
||||
<Route key="appconfig" path="appconfig" component={Appconfig}/>
|
||||
<Route key="roleManagement" path="roleManagement" component={RoleManagement}/>
|
||||
<Route key="fieldManagement" path="fieldManagement" component={FieldManagement}/>
|
||||
<Route key="analysisOfSalaryStatistics" path="analysisOfSalaryStatistics" component={AnalysisOfSalaryStatistics}/>
|
||||
<Route key="analysisOfSalaryStatisticsId" path="analysisOfSalaryStatistics/:employeeId" component={EmployeeList}/>
|
||||
<Route key="datapush" path="datapush" component={Datapush}/>
|
||||
<Route key="reportView" path="reportView" component={ReportView}/>
|
||||
<Route key="externalPersonManage" path="externalPersonManage" component={ExternalPersonManage}/>
|
||||
<Route key="topologyView" path="topologyView/:salarySobId/:salaryItemId" component={TopologyMap}/>
|
||||
|
|
|
|||
|
|
@ -8,12 +8,17 @@
|
|||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import Authority from "./pages/mySalary/authority";
|
||||
import { EXCLUDE_PAGE } from "./config";
|
||||
import stores from "./stores";
|
||||
|
||||
const { ls } = WeaTools;
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class Layout extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -22,6 +27,8 @@ class Layout extends Component {
|
|||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (window.e9LibsConfigCustomF && _.some(window.e9LibsConfigCustomF, o => (_.some(o, k => k === "h_hrmSalary")))) {
|
||||
stores.baseFormStore.initForm();
|
||||
stores.baseFormStore.initFormExtra();
|
||||
if (window.location.hash.indexOf("payroll") !== -1) {
|
||||
window.localStorage.removeItem("template-basedata");
|
||||
window.localStorage.removeItem("salary-showset");
|
||||
|
|
@ -40,7 +47,11 @@ class Layout extends Component {
|
|||
let header = document.getElementById("container");
|
||||
header.appendChild(link);
|
||||
top.$(".ant-message").remove();
|
||||
window.location.hash.indexOf("mobilepayroll") === -1 && stores.taxAgentStore.getPermission();
|
||||
if (_.every(EXCLUDE_PAGE, page => window.location.hash.indexOf(page) === -1)) {
|
||||
stores.taxAgentStore.getPermission();
|
||||
} else {
|
||||
stores.taxAgentStore.initPageAndOptAuth();
|
||||
}
|
||||
}
|
||||
window.addEventListener("storage", this.setFontSize);
|
||||
}
|
||||
|
|
@ -68,9 +79,10 @@ class Layout extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<WeaLocaleProvider>{this.props.children}</WeaLocaleProvider>
|
||||
);
|
||||
const { taxAgentStore: { PageAndOptAuth, loading } } = this.props;
|
||||
return (<WeaLocaleProvider>
|
||||
<Authority store={{ loading, hasRight: PageAndOptAuth.able }}>{this.props.children}</Authority>
|
||||
</WeaLocaleProvider>);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -153,6 +153,36 @@ export const salaryDetailSearchConditions = [
|
|||
multiple: true,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
conditionDataParams: {},
|
||||
dataParams: {},
|
||||
destDataParams: {},
|
||||
hasAddBtn: false,
|
||||
hasAdvanceSerach: false,
|
||||
idSeparator: ",",
|
||||
isAutoComplete: 1,
|
||||
isDetail: 0,
|
||||
isMultCheckbox: false,
|
||||
isSingle: false,
|
||||
icon: "icon-coms-hrm",
|
||||
linkUrl: "",
|
||||
pageSize: 10,
|
||||
quickSearchName: "",
|
||||
replaceDatas: [],
|
||||
title: "",
|
||||
type: "17",
|
||||
viewAttr: 2
|
||||
},
|
||||
colSpan: 1,
|
||||
conditionType: "BROWSER",
|
||||
domkey: ["employeeIds"],
|
||||
fieldcol: 16,
|
||||
label: getLabel(111, "人员"),
|
||||
labelcol: 8,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeParams: {},
|
||||
|
|
@ -232,6 +262,25 @@ export const tempCondition = [
|
|||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "UPLOAD",
|
||||
domkey: ["fileId"],
|
||||
fieldcol: 14,
|
||||
label: "导出模板",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
datas: [],
|
||||
multiSelection: false,
|
||||
showClearAll: false,
|
||||
showListBottom: true,
|
||||
showListTop: true,
|
||||
maxFilesNumber: 1,
|
||||
limitType: "xlsx",
|
||||
uploadUrl: "/api/doc/upload/uploadFile",
|
||||
category: "111",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["sharedType"],
|
||||
|
|
|
|||
|
|
@ -32,7 +32,8 @@ class SalaryDetails extends Component {
|
|||
this.state = {
|
||||
loading: false, dataSource: [], columns: [], selectedRowKeys: [], tempPageList: [], sumRow: {},
|
||||
pageInfo: { current: 1, pageSize: 10, total: 0 }, payload: {}, templateId: "", tempManageQuery: false,
|
||||
showTotalCell: false, updateSum: true, tempDialog: { visible: false, setting: [], id: "", template: {} },
|
||||
showTotalCell: false, updateSum: true,
|
||||
tempDialog: { visible: false, setting: [], heads: [], id: "", template: {} },
|
||||
transferDialog: {
|
||||
visible: false, searchParamsKey: "name", saveLoading: false,
|
||||
dataParams: { page: "salary_details_report" },
|
||||
|
|
@ -108,12 +109,13 @@ class SalaryDetails extends Component {
|
|||
getSalaryList = (props) => {
|
||||
const { attendanceStore: { salaryDetailSearchForm, tableStore }, dateRange } = props || this.props;
|
||||
const [startDateStr, endDateStr] = dateRange;
|
||||
const { taxAgentIds, subcompanyIds, departmentIds, ...extra } = salaryDetailSearchForm.getFormParams();
|
||||
const { taxAgentIds, subcompanyIds, departmentIds, employeeIds, ...extra } = salaryDetailSearchForm.getFormParams();
|
||||
const { pageInfo, transferDialog, updateSum } = this.state;
|
||||
const payload = {
|
||||
taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : [],
|
||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
|
||||
employeeIds: employeeIds ? employeeIds.split(",") : [],
|
||||
...extra, ...pageInfo, startDateStr, endDateStr
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
|
|
@ -164,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
|
||||
|
|
@ -200,9 +202,14 @@ class SalaryDetails extends Component {
|
|||
};
|
||||
handelAddTemp = (templateId = "") => {
|
||||
const { tempDialog, tempPageList } = this.state;
|
||||
if (_.isEmpty(this.transferRef.state.rightDatas)) {
|
||||
message.warning(getLabel(111, "请选择设置!"));
|
||||
return;
|
||||
}
|
||||
this.setState({
|
||||
tempDialog: {
|
||||
...tempDialog, visible: true, setting: _.map(this.transferRef.state.rightDatas, o => o.id)
|
||||
...tempDialog, visible: true, setting: _.map(this.transferRef.state.rightDatas, o => o.id),
|
||||
heads: _.map(this.transferRef.state.rightDatas, o => o.name)
|
||||
// template: _.find(tempPageList, o => o.key === templateId)
|
||||
}
|
||||
});
|
||||
|
|
@ -303,7 +310,7 @@ class SalaryDetails extends Component {
|
|||
{/*薪资明细模板设置*/}
|
||||
<SalaryDetailsTempDialog {...tempDialog}
|
||||
onCancel={callback => this.setState({
|
||||
tempDialog: { ...tempDialog, visible: false, setting: [] }
|
||||
tempDialog: { ...tempDialog, visible: false, setting: [], heads: [] }
|
||||
}, () => callback && callback())}
|
||||
onSuccess={this.getPageListTemplatelist}/>
|
||||
{/*薪资明细自定义列模板管理*/}
|
||||
|
|
|
|||
|
|
@ -9,10 +9,11 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { WeaDialog, WeaLoadingGlobal, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { tempCondition } from "./conditions";
|
||||
import { getTaxAgentSelectList } from "../../../apis/taxAgent";
|
||||
import * as API from "../../../apis/statistics";
|
||||
import { downloadPageListTemplate } from "../../../apis/statistics";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../util";
|
||||
|
||||
|
|
@ -57,6 +58,13 @@ class SalaryDetailTempDialog extends Component {
|
|||
value: id ? template["limitIds"].join(",") : "",
|
||||
options: _.map(data, o => ({ key: o.id, showname: o.content }))
|
||||
};
|
||||
} else if (getKey(o) === "fileId") {
|
||||
return {
|
||||
...o, label: getLabel(o.lanId, o.label), value: id ? template[getKey(o)] : "",
|
||||
datas: id && template[getKey(o)] ? [
|
||||
{ fileid: template[getKey(o)], filename: template["fileName"], showDelete: true }
|
||||
] : [], labelExtra: getLabel(111, "下载示例"), labelType: "download"
|
||||
};
|
||||
}
|
||||
return { ...o, label: getLabel(o.lanId, o.label), value: id ? template[getKey(o)] : "" };
|
||||
})
|
||||
|
|
@ -73,12 +81,13 @@ class SalaryDetailTempDialog extends Component {
|
|||
tempForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
this.setState({ loading: true });
|
||||
const { limitIds, ...formVal } = tempForm.getFormParams();
|
||||
const { limitIds, fileId, ...formVal } = tempForm.getFormParams();
|
||||
const payload = {
|
||||
page: "salary_details_report", setting, id, ...formVal,
|
||||
limitIds: !_.isEmpty(limitIds) ? limitIds.split(",") : []
|
||||
};
|
||||
API.savePageListTemplate(payload).then(({ status, errormsg }) => {
|
||||
API.savePageListTemplate(_.assign(payload, fileId ? { fileId } : {})).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.props.onCancel(this.props.onSuccess());
|
||||
|
|
@ -92,6 +101,12 @@ class SalaryDetailTempDialog extends Component {
|
|||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
formFieldChange = (field) => {
|
||||
if (field === "download") {
|
||||
const { setting, heads } = this.props;
|
||||
WeaLoadingGlobal.start();
|
||||
const promise = downloadPageListTemplate({ setting, heads });
|
||||
return;
|
||||
}
|
||||
const key = Object.keys(field)[0], value = field[key].value;
|
||||
this.setState({
|
||||
conditions: _.map(this.state.conditions, item => ({
|
||||
|
|
@ -101,6 +116,12 @@ class SalaryDetailTempDialog extends Component {
|
|||
...o, hide: value !== "0", viewAttr: value === "0" ? 3 : 1,
|
||||
rules: value === "0" ? "required|string" : ""
|
||||
};
|
||||
} else if (key === "fileId" && getKey(o) === "fileId") {
|
||||
return {
|
||||
...o, value, datas: value ? _.map(field[key].valueSpan, o => ({
|
||||
fileid: o.fileid, filename: o.filename, showDelete: true
|
||||
})) : []
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
|
|
@ -118,7 +139,8 @@ class SalaryDetailTempDialog extends Component {
|
|||
<WeaDialog
|
||||
{...this.props} style={{ width: 480, height: 127 }} initLoadCss title={getLabel(111, "模板保存")}
|
||||
buttons={[<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>]}>
|
||||
<div className="form-dialog-layout">{getSearchs(tempForm, conditions, 1, false, this.formFieldChange)}</div>
|
||||
<div
|
||||
className="form-dialog-layout tempDialog">{getSearchs(tempForm, conditions, 1, false, this.formFieldChange)}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,6 +40,11 @@ class SalaryTempAdminDialog extends Component {
|
|||
|
||||
render() {
|
||||
const { dataSource, selectedKeys } = this.state, { dataParams } = this.props;
|
||||
const heads = _.reduce(selectedKeys, (pre, cur) => {
|
||||
const item = dataSource.find(data => data.id === cur);
|
||||
if (item) pre.push(item.name);
|
||||
return pre;
|
||||
}, []);
|
||||
return (<WeaDialog
|
||||
{...this.props} initLoadCss ref={dom => this.dialog = dom} title={getLabel(111, "模板管理")}
|
||||
className="temp_admin_dialog" style={{
|
||||
|
|
@ -47,7 +52,7 @@ class SalaryTempAdminDialog extends Component {
|
|||
maxHeight: "90%", maxWidth: "90%", overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}} buttons={[
|
||||
<Button type="primary"
|
||||
onClick={() => this.props.onAddTemp(dataParams.id, selectedKeys)}>{getLabel(111, "确 定")}</Button>,
|
||||
onClick={() => this.props.onAddTemp(dataParams.id, selectedKeys, heads)}>{getLabel(111, "确 定")}</Button>,
|
||||
<Button type="ghost" onClick={this.props.onCancel}>{getLabel(111, "取 消")}</Button>
|
||||
]}>
|
||||
<WeaTransfer data={dataSource} selectedKeys={selectedKeys} onChange={v => this.setState({ selectedKeys: v })}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ class SalaryTempMangerDialog extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
selectedRowKeys: [], tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } },
|
||||
tempDialog: { visible: false, setting: [], id: "", template: {} }
|
||||
tempDialog: { visible: false, setting: [], heads: [], id: "", template: {} }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -31,10 +31,10 @@ class SalaryTempMangerDialog extends Component {
|
|||
handleTempAdminCols = (params = {}) => this.setState({
|
||||
tempAdminDialog: { visible: true, dataParams: { ...this.state.tempAdminDialog.dataParams, ...params } }
|
||||
});
|
||||
handelAddTemp = (id = "", setting = []) => {
|
||||
handelAddTemp = (id = "", setting = [], heads = []) => {
|
||||
this.setState({
|
||||
tempDialog: {
|
||||
visible: true, setting, id, template: _.find(this.tempManageRef.state.listDatas, o => o.id === id)
|
||||
visible: true, setting, heads, id, template: _.find(this.tempManageRef.state.listDatas, o => o.id === id)
|
||||
}
|
||||
});
|
||||
};
|
||||
|
|
@ -76,7 +76,7 @@ class SalaryTempMangerDialog extends Component {
|
|||
{/*薪资明细模板设置*/}
|
||||
<SalaryDetailsTempDialog {...tempDialog}
|
||||
onCancel={callback => this.setState({
|
||||
tempDialog: { ...tempDialog, visible: false, setting: [] }
|
||||
tempDialog: { ...tempDialog, visible: false, setting: [], heads: [] }
|
||||
}, () => callback && callback())}
|
||||
onSuccess={() => this.setState({
|
||||
tempAdminDialog: { visible: false, dataParams: { page: "salary_details_report" } }
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const {
|
||||
taxAgentStore: { statisticsReportBtn, PageAndOptAuth },
|
||||
taxAgentStore: { PageAndOptAuth },
|
||||
attendanceStore: { statisticsForm, reportForm, tableStore }
|
||||
} = this.props;
|
||||
const {
|
||||
|
|
@ -279,6 +279,7 @@ class Index extends Component {
|
|||
reportName, keyword, year, logDialogVisible, filterConditions,
|
||||
dateRange, showSearchAd, isQuery
|
||||
} = this.state;
|
||||
const statisticsReportBtn = PageAndOptAuth.opts.includes("admin");
|
||||
const buttons = selectedKey === "statistics" ? [
|
||||
<Button type="primary" onClick={() => this.handleReqBtnsClick("addReport")}>{getLabel(111, "新建报表")}</Button>,
|
||||
<Button type="ghost"
|
||||
|
|
@ -289,7 +290,7 @@ class Index extends Component {
|
|||
onSearch={() => this.handleReqBtnsClick("search")}/>
|
||||
] : selectedKey === "detail" ? [
|
||||
<span className="employeeYearWrapper">
|
||||
<span>{getLabel(111, "年薪资核算人员明细:")}</span>
|
||||
<span>{getLabel(111, "年度:")}</span>
|
||||
<WeaDatePicker value={year} format="YYYY" onChange={year => this.setState({ year })}/>
|
||||
</span>,
|
||||
<WeaInputSearch placeholder={getLabel(111, "请输入姓名、工号、身份证号")} className="search"
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@
|
|||
}
|
||||
|
||||
.wea-advanced-searchsAd {
|
||||
height: 155px;
|
||||
height: 200px;
|
||||
overflow: hidden auto;
|
||||
|
||||
.formItem-delete {
|
||||
|
|
@ -382,3 +382,17 @@
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
.tempDialog {
|
||||
.wea-form-item-label {
|
||||
min-height: 50px;
|
||||
}
|
||||
|
||||
.wea-form-item-label-extra {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
cursor: pointer;
|
||||
color: #4d7ad8;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,8 +94,8 @@ class AppConfig extends Component {
|
|||
} = this.state;
|
||||
const btns = [
|
||||
<Button type="primary" loading={loading} onClick={this.appSettingSave}>保存</Button>,
|
||||
// <Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "迁入")}</Button>,
|
||||
// <Button type="ghost" onClick={() => this.handleOperate("export")}>{getLabel(111, "迁出")}</Button>
|
||||
<Button type="ghost" onClick={() => this.handleOperate("import")}>{getLabel(111, "迁入")}</Button>,
|
||||
<Button type="ghost" onClick={() => this.handleOperate("export")}>{getLabel(111, "迁出")}</Button>
|
||||
];
|
||||
const items = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaTools, WeaTop } from "ecCom";
|
||||
import { WeaForm } from "comsMobx";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import moment from "moment";
|
||||
import CalculateQuery from "./components/calculateQuery";
|
||||
|
|
@ -15,9 +16,15 @@ import CalculateDialog from "./components/calculateDialog";
|
|||
import ProgressModal from "../../components/progressModal";
|
||||
import LogDialog from "../../components/logViewModal";
|
||||
import { backCalculate, deleteSalaryacct, fileSalaryAcct, reAccounting } from "../../apis/calculate";
|
||||
import FormInfo from "../../components/FormInfo";
|
||||
import { queryConditions } from "./config";
|
||||
import { postFetch } from "../../util/request";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const form = new WeaForm();
|
||||
|
||||
@inject("calculateStore", "taxAgentStore")
|
||||
@observer
|
||||
|
|
@ -31,17 +38,33 @@ class Calculate extends Component {
|
|||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
]
|
||||
}, isRefresh: false, logDialogVisible: false,
|
||||
}, isRefresh: false, logDialogVisible: false, conditions: [],
|
||||
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
|
||||
calcDaialog: { visible: false, title: "" }
|
||||
calcDaialog: { visible: false, title: "" }, showAdvance: false
|
||||
};
|
||||
this.timer = null;
|
||||
this.handleDebounce = null;
|
||||
}
|
||||
|
||||
async componentDidMount() {
|
||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
||||
this.setState({
|
||||
conditions: _.map(queryConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
||||
if (getKey(o) === "taxAgentIds") {
|
||||
return { ...o, options: _.map(data, k => ({ key: k.id + "", showname: k.name })) };
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
}))
|
||||
}, () => form.initFormFields(this.state.conditions));
|
||||
}
|
||||
|
||||
renderCalculateOpts = () => {
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { queryParams, isRefresh } = this.state;
|
||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||
const { queryParams, isRefresh, showAdvance } = this.state;
|
||||
const admin = PageAndOptAuth.opts.includes("admin");
|
||||
let calculateOpts = [
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
calcDaialog: {
|
||||
|
|
@ -49,12 +72,13 @@ class Calculate extends Component {
|
|||
title: getLabel(538780, "核算")
|
||||
}
|
||||
})}>{getLabel(538780, "核算")}</Button>,
|
||||
<CalculateQuery queryParams={queryParams} onChange={v => this.setState({
|
||||
<CalculateQuery queryParams={queryParams} onAdvance={() => this.setState({ showAdvance: !showAdvance })}
|
||||
onChange={v => this.setState({
|
||||
isRefresh: _.keys(v)[0] === "name" ? isRefresh : !isRefresh,
|
||||
queryParams: { ...queryParams, ...v }
|
||||
})} onSearch={() => this.setState({ isRefresh: !isRefresh })}/>
|
||||
];
|
||||
return !showOperateBtn ? calculateOpts.slice(1) : calculateOpts;
|
||||
return !admin ? calculateOpts.slice(1) : calculateOpts;
|
||||
};
|
||||
handleCalcOpts = ({ key }, record) => {
|
||||
const { isRefresh, progressModule } = this.state, { id } = record;
|
||||
|
|
@ -188,7 +212,9 @@ class Calculate extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions } = this.state;
|
||||
const {
|
||||
queryParams, isRefresh, calcDaialog, progressModule, logDialogVisible, filterConditions, conditions, showAdvance
|
||||
} = this.state;
|
||||
return (
|
||||
<WeaTop title={getLabel(538011, "薪资核算")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={this.renderCalculateOpts()} className="calculate-main-layout" showDropIcon
|
||||
|
|
@ -198,10 +224,20 @@ class Calculate extends Component {
|
|||
key: "log", icon: <i className="iconfont icon-caozuorizhi32"/>,
|
||||
content: getLabel(545781, "操作日志")
|
||||
}
|
||||
]}
|
||||
>
|
||||
]}>
|
||||
<div className="calculate-body">
|
||||
<CalculateTablelist queryParams={queryParams} isRefresh={isRefresh} onCalcOpts={this.handleCalcOpts}/>
|
||||
<div className={cs("advance-calc", { "show-advance-calc": showAdvance })}>
|
||||
<FormInfo center={false} itemRender={{}} form={form} formFields={conditions} colCount={2}/>
|
||||
<div className="advance-calc-btns">
|
||||
<Button type="primary"
|
||||
onClick={() => this.setState({ isRefresh: !isRefresh })}>{getLabel(111, "搜索")}</Button>
|
||||
<Button type="ghost" onClick={() => form.resetForm()}>{getLabel(111, "重置")}</Button>
|
||||
<Button type="ghost"
|
||||
onClick={() => this.setState({ showAdvance: !showAdvance })}>{getLabel(111, "取消")}</Button>
|
||||
</div>
|
||||
</div>
|
||||
<CalculateTablelist form={form} queryParams={queryParams} isRefresh={isRefresh}
|
||||
onCalcOpts={this.handleCalcOpts}/>
|
||||
<CalculateDialog {...calcDaialog}
|
||||
onCancel={(bool, id) => this.setState({
|
||||
calcDaialog: { ...calcDaialog, visible: false },
|
||||
|
|
|
|||
|
|
@ -21,11 +21,14 @@ class Index extends Component {
|
|||
<MonthRangePicker dateRange={dateRange} viewAttr={2}
|
||||
onChange={v => this.props.onChange({ dateRange: v })}/>
|
||||
</div>
|
||||
<div className="advance-custom">
|
||||
<WeaInputSearch value={name}
|
||||
placeholder={getLabel(543431, "请输入薪资账套名称")}
|
||||
onChange={v => this.props.onChange({ name: v })}
|
||||
onSearch={this.props.onSearch}
|
||||
/>
|
||||
<a href="javascript:void(0);" onClick={this.props.onAdvance}>{getLabel(111, "高级搜索")}</a>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,12 +29,14 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
getSalaryAcctList = (props) => {
|
||||
const { pageInfo } = this.state;
|
||||
const { queryParams } = props;
|
||||
const { pageInfo } = this.state, { queryParams, form } = props;
|
||||
const { taxAgentIds } = form.getFormParams();
|
||||
const { dateRange, ...extra } = queryParams;
|
||||
const [startMonthStr, endMonthStr] = dateRange || [];
|
||||
const params = { startMonthStr, endMonthStr, ...extra };
|
||||
const payload = { ...pageInfo, ...params };
|
||||
const payload = {
|
||||
...pageInfo, ...params, taxAgentIds: taxAgentIds ? taxAgentIds.split(",") : []
|
||||
};
|
||||
this.setState({ loading: true });
|
||||
getSalaryAcctList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
|
|
@ -73,7 +75,12 @@ class Index extends Component {
|
|||
</span>,
|
||||
render: (__, record) => {
|
||||
const { operate: opts = [] } = record;
|
||||
const operate = [...opts, { index: "log", text: getLabel(30586, "查看日志") }];
|
||||
const admin = record.opts.includes("admin");
|
||||
const operate = admin ? [...opts, { index: "log", text: getLabel(30586, "查看日志") }] : [
|
||||
{ index: "3", text: getLabel(111, "查看") },
|
||||
{ index: "null", text: "" },
|
||||
{ index: "log", text: getLabel(30586, "查看日志") }
|
||||
];
|
||||
return <React.Fragment>
|
||||
{
|
||||
_.map(operate.slice(0, 2), f => (
|
||||
|
|
|
|||
|
|
@ -0,0 +1,19 @@
|
|||
export const queryConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["taxAgentIds"],
|
||||
fieldcol: 14,
|
||||
label: "个税扣缴义务人",
|
||||
lanI: 111,
|
||||
multiple: true,
|
||||
options: [],
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -46,7 +46,8 @@ class EditSalaryBaseInfo extends Component {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
return <WeaBrowser {...browserType} viewAttr={3} value={value} valueSpan={valueSpan} inputStyle={{ width: 200 }}
|
||||
return <WeaBrowser {...browserType} viewAttr={this.props.viewAttr === 1 ? 1 : 3}
|
||||
value={value} valueSpan={valueSpan} inputStyle={{ width: 200 }}
|
||||
onChange={(value, valueSpan) => this.props.onChange(_.map(this.props.baseInfo, it => {
|
||||
if (fieldCode === it.fieldCode) {
|
||||
return { ...it, fieldValue: value, fieldValueObj: { id: value, name: valueSpan } };
|
||||
|
|
|
|||
|
|
@ -0,0 +1,110 @@
|
|||
/*
|
||||
* 核算编辑
|
||||
* 数据查看锚点
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/2/10
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import classnames from "classnames";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class CalcAnchorList extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
collapsed: false, currentIndex: 0
|
||||
};
|
||||
this.isClickRef = null;
|
||||
this.timerRef = null;
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
document.getElementById("salary_anchor_area").addEventListener("scroll", this.handlerScroll);
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
collapsed: false,
|
||||
currentIndex: 0
|
||||
});
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
document.getElementById("salary_anchor_area").removeEventListener("scroll", this.handlerScroll);
|
||||
}
|
||||
|
||||
handlerScroll = () => {
|
||||
// 点击锚点时,不执行滚动函数
|
||||
if (this.isClickRef) return;
|
||||
// 获取滚动容器的滚动高度(这里相对于#salary_anchor_area滚动的)
|
||||
const scrollTop = document.getElementById("salary_anchor_area").scrollTop;
|
||||
// 获取所有wea-search-group anchor_开头的元素集合
|
||||
const contentList = document.querySelectorAll("[class^='wea-search-group anchor_']");
|
||||
const offsetTopArr = [];
|
||||
contentList.forEach((item) => {
|
||||
// 获取每个wea-search-group anchor_开头的元素的offsetTop
|
||||
offsetTopArr.push(item.offsetTop);
|
||||
});
|
||||
for (let i = 0; i < offsetTopArr.length; i++) {
|
||||
// 当滚动条高度达到对应wea-search-group anchor_开头的元素的滚动高度、则将锚点设置为高亮状态
|
||||
if (scrollTop + 190 >= offsetTopArr[i]) this.setState({ currentIndex: i });
|
||||
}
|
||||
};
|
||||
onClickAnchor = (item, index) => {
|
||||
const anchorElement = document.getElementById("salary_anchor_area");
|
||||
const el = document.querySelector(`.anchor_${item.salarySobItemGroupId}`);
|
||||
if (el) {
|
||||
anchorElement.scroll({ top: el.offsetTop, behavior: "smooth" });
|
||||
}
|
||||
this.setState({ currentIndex: index });
|
||||
// 点击时设置为true,为了防止同时执行滚动事件
|
||||
this.isClickRef = true;
|
||||
// 清除定时器,防止滚动事件触发、出现走马灯闪烁问题
|
||||
if (this.timerRef) clearTimeout(this.timerRef);
|
||||
this.timerRef = setTimeout(() => {
|
||||
this.isClickRef = false;
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
render() {
|
||||
const { collapsed, currentIndex } = this.state, { datas } = this.props;
|
||||
return (
|
||||
<div id="anchorList-contianer" style={{ position: "sticky", top: 8, zIndex: 10086 }}>
|
||||
<div className={classnames("anchor-list-wrapper", { "anchor-list-collapsed": collapsed })}>
|
||||
{
|
||||
collapsed ?
|
||||
<div className="anchor-list-collapsed-btn">
|
||||
<i className="icon-coms02-Initialize-template"
|
||||
onClick={() => this.setState({ collapsed: !collapsed })}/>
|
||||
</div> :
|
||||
<React.Fragment>
|
||||
<div className="anchor-list-header">
|
||||
<i className="icon-coms-right" onClick={() => this.setState({ collapsed: !collapsed })}/>
|
||||
</div>
|
||||
<div className="anchor-list">
|
||||
<div className="anchor-list-ink">
|
||||
<span className="anchor-list-ink-ball visible"
|
||||
style={{ top: `${2.5 + currentIndex * 27.7}px`, height: 23 }}/>
|
||||
</div>
|
||||
{_.map(datas, (o, i) => (
|
||||
<div className={classnames("anchor-list-link", { "anchor-list-link-active": currentIndex === i })}
|
||||
onClick={() => this.onClickAnchor(o, i)}>
|
||||
<span
|
||||
className={classnames("anchor-list-link-title", { "anchor-list-link-title-active": currentIndex === i })}>{o.salarySobItemGroupName}</span>
|
||||
</div>)
|
||||
)}
|
||||
</div>
|
||||
</React.Fragment>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CalcAnchorList;
|
||||
|
|
@ -30,7 +30,7 @@ class EditCalcTable extends Component {
|
|||
this.state = {
|
||||
loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
selectedRowKeys: [], progressVisible: false, progress: 0,
|
||||
salaryCalcSlide: { visible: false, id: "" }, originPayloadData: {},
|
||||
salaryCalcSlide: { visible: false, id: "", viewAttr: 2 }, originPayloadData: {},
|
||||
batchUpdateDialog: {
|
||||
visible: false, salaryAcctRecordId: "", idList: [], salaryItemId: "",
|
||||
conditions: [], pattern: 0, dataType: ""
|
||||
|
|
@ -73,9 +73,9 @@ class EditCalcTable extends Component {
|
|||
this.updateEmpLockStatus({ ...params });
|
||||
break;
|
||||
case "EDIT":
|
||||
const { id: salaryCalcId } = params;
|
||||
const { id: salaryCalcId, showSee } = params;
|
||||
this.setState({
|
||||
salaryCalcSlide: { visible: true, id: salaryCalcId }
|
||||
salaryCalcSlide: { visible: true, id: salaryCalcId, viewAttr: showSee ? 1 : 2 }
|
||||
});
|
||||
break;
|
||||
case "DIAGRAM":
|
||||
|
|
@ -238,7 +238,7 @@ class EditCalcTable extends Component {
|
|||
"总计": getLabel(523, "总计"), "批量解锁": getLabel(111, "批量解锁"),
|
||||
"批量锁定": getLabel(111, "批量锁定"), "批量更新": getLabel(111, "批量更新"),
|
||||
"查看拓扑图": getLabel(111, "查看拓扑图"), "锁定": getLabel(111, "锁定"),
|
||||
"解锁": getLabel(111, "解锁")
|
||||
"解锁": getLabel(111, "解锁"), "查看": getLabel(111, "查看")
|
||||
};
|
||||
this.setState({ originPayloadData: { ...payload, i18n } });
|
||||
const childFrameObj = document.getElementById("atdTable");
|
||||
|
|
@ -269,7 +269,7 @@ class EditCalcTable extends Component {
|
|||
const sumRowlistUrl = this.props.showTotalCell ? "/api/bs/hrmsalary/salaryacct/acctresult/sum" : "";
|
||||
this.postMessageToChild({
|
||||
dataSource, pageInfo, selectedRowKeys, showTotalCell: this.props.showTotalCell, sumRowlistUrl, payload,
|
||||
calcDetail,
|
||||
calcDetail, showSee: calcDetail,
|
||||
columns: _.every(traverse(columns, calcDetail), (it, idx) => !it.fixed) ? _.map(traverse(columns, calcDetail), (it, idx) => ({
|
||||
...it,
|
||||
fixed: idx < 2 ? "left" : false
|
||||
|
|
@ -304,10 +304,7 @@ class EditCalcTable extends Component {
|
|||
/>
|
||||
<EditSalaryCalcSlide {...salaryCalcSlide}
|
||||
onClose={(isFresh) => this.setState({
|
||||
salaryCalcSlide: {
|
||||
visible: false,
|
||||
id: ""
|
||||
}
|
||||
salaryCalcSlide: { visible: false, id: "", viewAttr: 2 }
|
||||
}, () => isFresh === "true" && this.queryCalcResultList())}/>
|
||||
{
|
||||
progressVisible &&
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ import PayrollItemsTable from "../../../../calculateDetail/payrollItemsTable";
|
|||
import IssuedAndReissueTable from "../../../../calculateDetail/issuedAndReissueTable";
|
||||
import { acctresultDetail, saveAcctResult } from "../../../../../apis/calculate";
|
||||
import { toDecimal_n } from "../../../../../util";
|
||||
import CalcAnchorList from "./calcAnchorList";
|
||||
import "./index.less";
|
||||
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class EditSalaryCalcSlide extends Component {
|
||||
|
|
@ -29,7 +29,7 @@ class EditSalaryCalcSlide extends Component {
|
|||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.acctresultDetail(nextProps.id);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ selectedKey: "0" });
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({ selectedKey: "0" }, () => document.getElementById("salary_anchor_area").scrollTop = 0);
|
||||
}
|
||||
|
||||
acctresultDetail = (id) => {
|
||||
|
|
@ -43,14 +43,17 @@ class EditSalaryCalcSlide extends Component {
|
|||
});
|
||||
};
|
||||
renderTitle = () => {
|
||||
const { loading } = this.state;
|
||||
const { loading } = this.state, { viewAttr } = this.props;
|
||||
return <div className="titleDialog">
|
||||
<div className="titleCol titleLeftBox">
|
||||
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||
<div className="title">{getLabel(543559, "编辑薪资")}</div>
|
||||
<div className="title">{viewAttr === 2 ? getLabel(543559, "编辑薪资") : getLabel(111, "查看薪资")}</div>
|
||||
</div>
|
||||
<div className="titleCol titleRightBox">
|
||||
{
|
||||
viewAttr === 2 &&
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(537558, "保存")}</Button>
|
||||
}
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
|
|
@ -88,7 +91,7 @@ class EditSalaryCalcSlide extends Component {
|
|||
save = () => {
|
||||
const { id: salaryAcctEmpId } = this.props;
|
||||
const { issuedAndReissueItems, itemsByGroup, baseInfo } = this.state;
|
||||
if (_.every(baseInfo, it => !it.canEdit || (it.canEdit && !it.fieldValue))) {
|
||||
if (!_.every(baseInfo, (item) => (!item.canEdit || !!item.fieldValue))) {
|
||||
Modal.warning({
|
||||
title: getLabel(131329, "信息确认"),
|
||||
content: getLabel(518702, "必要信息不完整,红色*为必填项!")
|
||||
|
|
@ -96,7 +99,8 @@ class EditSalaryCalcSlide extends Component {
|
|||
return;
|
||||
}
|
||||
const payload = {
|
||||
salaryAcctEmpId, employeeInfos: baseInfo,
|
||||
salaryAcctEmpId,
|
||||
employeeInfos: _.map(baseInfo, o => ({ ...o, fieldValue: o.fieldValue.id || o.fieldValue })),
|
||||
items: [
|
||||
..._.reduce(itemsByGroup, (pre, cur) => {
|
||||
return [
|
||||
|
|
@ -139,7 +143,9 @@ class EditSalaryCalcSlide extends Component {
|
|||
className="salary-calculate-esf-layout" {...this.props}
|
||||
top={0} width={60} height={100} measure={"%"}
|
||||
direction={"right"} title={this.renderTitle()}
|
||||
content={<div className="salary-calculate-esf-area">
|
||||
content={<div className="salary-calculate-esf-area" id="salary_anchor_area">
|
||||
{/*锚点*/}
|
||||
<CalcAnchorList datas={itemsByGroup} visible={this.props.visible}/>
|
||||
<EditSalaryBaseInfo {...this.props} baseInfo={baseInfo}
|
||||
onChange={baseInfo => this.setState({ baseInfo })}/>
|
||||
<WeaTab keyParam="viewcondition" className="calc-esf-tab"
|
||||
|
|
@ -148,12 +154,14 @@ class EditSalaryCalcSlide extends Component {
|
|||
/>
|
||||
{
|
||||
selectedKey === "0" && _.map(itemsByGroup, item => {
|
||||
return <PayrollItemsTable {...item} onChangeIssueReissueValue={this.handleItemValueChange}/>;
|
||||
return <PayrollItemsTable {...this.props} {...item}
|
||||
onChangeIssueReissueValue={this.handleItemValueChange}/>;
|
||||
})
|
||||
}
|
||||
{
|
||||
selectedKey === "1" &&
|
||||
<IssuedAndReissueTable
|
||||
{...this.props}
|
||||
dataSource={issuedAndReissueItems}
|
||||
onChangeIssueReissueValue={this.handleItemValueChange}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -142,6 +142,7 @@
|
|||
height: 100%;
|
||||
|
||||
.salary-calculate-esf-area {
|
||||
position: relative;
|
||||
background: #f6f6f6;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
|
|
@ -149,6 +150,10 @@
|
|||
|
||||
.esf-base-info-form, .wea-title, .wea-content {
|
||||
padding: 0;
|
||||
|
||||
.ant-row {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.esf-form-content {
|
||||
|
|
@ -191,6 +196,111 @@
|
|||
.wea-search-group {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
//锚点按钮
|
||||
.anchor-list-collapsed {
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.anchor-list-wrapper {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
margin: 10px 15px 20px;
|
||||
padding: 8px 10px;
|
||||
overflow: auto;
|
||||
background-color: #fff;
|
||||
box-shadow: 0 3px 12px 0 rgba(0, 0, 0, .12);
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
|
||||
.anchor-list-collapsed-btn {
|
||||
opacity: .5;
|
||||
background: #000;
|
||||
color: #fff;
|
||||
border-radius: 3px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.anchor-list-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
min-width: 130px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.anchor-list {
|
||||
padding: 0 10px;
|
||||
position: relative;
|
||||
margin-top: 10px;
|
||||
transition: margin-top .3s;
|
||||
max-height: 80vh;
|
||||
overflow: auto;
|
||||
|
||||
.anchor-list-ink {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 5px;
|
||||
height: 100%;
|
||||
|
||||
.anchor-list-ink-ball.visible {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.anchor-list-ink-ball {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
display: none;
|
||||
width: 3px;
|
||||
height: 8px;
|
||||
background-color: #5d9cec;
|
||||
border: 1.5px solid #5d9cec;
|
||||
border-radius: 8px;
|
||||
transform: translateX(-50%);
|
||||
transition: top .3s ease-in-out;
|
||||
}
|
||||
}
|
||||
|
||||
.anchor-list-ink:before {
|
||||
position: relative;
|
||||
display: block;
|
||||
width: 1px;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
background-color: #f0f0f0;
|
||||
content: " ";
|
||||
}
|
||||
|
||||
.anchor-list-link {
|
||||
padding: 7px 0 7px 10px;
|
||||
line-height: 1.143;
|
||||
|
||||
.anchor-list-link-title {
|
||||
position: relative;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
color: #666;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
transition: all .3s;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
.anchor-list-link-active > .anchor-list-link-title {
|
||||
color: #5d9cec;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,12 +18,11 @@ class Layout extends Component {
|
|||
}
|
||||
|
||||
salaryacctAcctresultCheckAuth = () => {
|
||||
const { taxAgentStore: { getPermission } } = this.props;
|
||||
this.setState({ store: { ...this.state.store, loading: true } });
|
||||
getPermission().then(({ data }) => {
|
||||
const { isOpenDevolution } = data;
|
||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||
const { isOpenDevolution } = PageAndOptAuth;
|
||||
if (isOpenDevolution) {
|
||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||
this.setState({ store: { ...this.state.store, loading: true } });
|
||||
salaryacctAcctresultCheckAuth({ salaryAcctRecordId }).then(({ status, data }) => {
|
||||
this.setState({ store: { ...this.state.store, loading: false, hasRight: status && data } }, () => {
|
||||
this.state.store.hasRight && this.props.init && this.props.init();
|
||||
|
|
@ -34,7 +33,6 @@ class Layout extends Component {
|
|||
this.props.init && this.props.init();
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ store: { ...this.state.store, loading: false } }));
|
||||
};
|
||||
|
||||
render() {
|
||||
|
|
|
|||
|
|
@ -62,6 +62,24 @@
|
|||
}
|
||||
}
|
||||
|
||||
.advance-custom {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
& > a {
|
||||
border-radius: 0;
|
||||
height: 28px;
|
||||
position: relative;
|
||||
color: #474747;
|
||||
padding: 4px 15px;
|
||||
background-color: transparent;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-left: none
|
||||
}
|
||||
}
|
||||
|
||||
.wea-input-focus {
|
||||
margin-top: -4px;
|
||||
}
|
||||
|
|
@ -72,6 +90,32 @@
|
|||
overflow-y: hidden;
|
||||
}
|
||||
|
||||
.advance-calc {
|
||||
display: none;
|
||||
background: #FFF;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.advance-calc-btns {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 15px 0;
|
||||
border-top: 1px solid #dadada;
|
||||
|
||||
button {
|
||||
margin-right: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-search-group, .wea-content {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.show-advance-calc {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.calculate-body {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
|
|
|||
|
|
@ -36,13 +36,12 @@ export default class CompareDetail extends React.Component {
|
|||
current: 1
|
||||
};
|
||||
fetchComparisonResultList(params);
|
||||
this.salaryacctAcctresultCheckAuth({ salaryAcctRecordId: getQueryString("id") })
|
||||
this.salaryacctAcctresultCheckAuth({ salaryAcctRecordId: getQueryString("id") });
|
||||
}
|
||||
|
||||
salaryacctAcctresultCheckAuth = (params) => {
|
||||
const { taxAgentStore: { getPermission } } = this.props;
|
||||
getPermission().then(({ data }) => {
|
||||
const { isOpenDevolution } = data;
|
||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||
const { isOpenDevolution } = PageAndOptAuth;
|
||||
if (isOpenDevolution) {
|
||||
salaryacctAcctresultCheckAuth(params).then(({ status, data }) => {
|
||||
this.setState({ calculateAuth: data && status });
|
||||
|
|
@ -50,7 +49,6 @@ export default class CompareDetail extends React.Component {
|
|||
} else {
|
||||
this.setState({ calculateAuth: true });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
getColumns = (columns) => {
|
||||
|
|
|
|||
|
|
@ -69,9 +69,8 @@ export default class CalculateDetail extends React.Component {
|
|||
}
|
||||
|
||||
salaryacctAcctresultCheckAuth = (params) => {
|
||||
const { taxAgentStore: { getPermission } } = this.props;
|
||||
getPermission().then(({ data }) => {
|
||||
const { isOpenDevolution } = data;
|
||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||
const { isOpenDevolution } = PageAndOptAuth;
|
||||
if (isOpenDevolution) {
|
||||
salaryacctAcctresultCheckAuth(params).then(({ status, data }) => {
|
||||
this.setState({ calculateAuth: data && status });
|
||||
|
|
@ -79,7 +78,6 @@ export default class CalculateDetail extends React.Component {
|
|||
} else {
|
||||
this.setState({ calculateAuth: true });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
Input = (value, key) => {
|
||||
|
|
|
|||
|
|
@ -29,10 +29,11 @@ class IssuedAndReissueTable extends Component {
|
|||
/>
|
||||
</span>,
|
||||
render: (text, record) => {
|
||||
const { canEdit, pattern } = record;
|
||||
const { canEdit, pattern } = record, { viewAttr } = this.props;
|
||||
return <WeaInputNumber
|
||||
disabled={!canEdit}
|
||||
min={0}
|
||||
viewAttr={viewAttr}
|
||||
precision={pattern || 2}
|
||||
value={text || 0}
|
||||
onChange={(value) => onChangeIssueReissueValue(record.salaryItemName, value, "issuedAndReissueItems")}
|
||||
|
|
|
|||
|
|
@ -37,8 +37,9 @@ class PayrollItemsTable extends Component {
|
|||
</span>,
|
||||
width: "20%",
|
||||
render: (text, record) => {
|
||||
const { canEdit, dataType, pattern } = record;
|
||||
const { canEdit, dataType, pattern } = record, { viewAttr } = this.props;
|
||||
return dataType === "number" ? <WeaInputNumber
|
||||
viewAttr={viewAttr}
|
||||
disabled={!canEdit}
|
||||
precision={!_.isNil(pattern) ? pattern : 0}
|
||||
value={text || 0}
|
||||
|
|
@ -46,6 +47,7 @@ class PayrollItemsTable extends Component {
|
|||
/> : <WeaInput
|
||||
disabled={!canEdit}
|
||||
value={text}
|
||||
viewAttr={viewAttr}
|
||||
onChange={(value) => onChangeIssueReissueValue(record.salaryItemId, value, "itemsByGroup", salarySobItemGroupId)}
|
||||
/>;
|
||||
}
|
||||
|
|
@ -66,7 +68,7 @@ class PayrollItemsTable extends Component {
|
|||
}
|
||||
];
|
||||
return (
|
||||
<WeaSearchGroup title={salarySobItemGroupName} showGroup needTigger>
|
||||
<WeaSearchGroup title={salarySobItemGroupName} showGroup needTigger className={`anchor_${salarySobItemGroupId}`}>
|
||||
<WeaTable
|
||||
rowKey="salaryItemId"
|
||||
dataSource={dataSource}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import {
|
|||
deleteAttendance,
|
||||
getAttendanceFieldSettingList,
|
||||
getAttendanceList,
|
||||
getLedgerList,
|
||||
getSalaryCycleAndAttendCycle,
|
||||
importAttendQuoteData,
|
||||
returnToAttendanceFieldSettingDefault,
|
||||
|
|
@ -26,6 +25,7 @@ import moment from "moment";
|
|||
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
|
||||
import AttendanceRefrenceDataModal from "./attendanceRefrenceDataModal";
|
||||
import AttendanceDataViewSlide from "./attendanceDataViewSlide";
|
||||
import { postFetch } from "../../../../util/request";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ class AttendanceDataComp extends Component {
|
|||
},
|
||||
fieldSetPayload: { visible: false, title: "", children: null },
|
||||
attendanceReferencePayload: { visible: false, title: "" },
|
||||
attendanceViewPayload: { visible: false, attendQuoteId: "", salaryYearMonth: "" }
|
||||
attendanceViewPayload: { visible: false, attendQuoteId: "", salaryYearMonth: "", showOperateBtn: false }
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -85,12 +85,13 @@ class AttendanceDataComp extends Component {
|
|||
};
|
||||
getLedgerList = (importData) => {
|
||||
const { importFormPayload } = this.state;
|
||||
getLedgerList().then(({ status, data }) => {
|
||||
postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "ADMIN_DATA" })
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
importFormPayload: {
|
||||
...importFormPayload, salarySobId: _.head(data).id,
|
||||
salarySobList: _.map(data, it => ({ key: it.id, showname: it.content }))
|
||||
...importFormPayload, salarySobId: String(_.head(data).id),
|
||||
salarySobList: _.map(data, it => ({ key: String(it.id), showname: it.name }))
|
||||
}
|
||||
}, async () => {
|
||||
const { importFormPayload } = this.state;
|
||||
|
|
@ -149,11 +150,11 @@ class AttendanceDataComp extends Component {
|
|||
}
|
||||
});
|
||||
};
|
||||
handleViewAttendanceData = ({ id, attendCycle }) => {
|
||||
handleViewAttendanceData = ({ id, attendCycle, opts = [] }) => {
|
||||
const { attendanceViewPayload } = this.state;
|
||||
this.setState({
|
||||
attendanceViewPayload: {
|
||||
...attendanceViewPayload,
|
||||
...attendanceViewPayload, showOperateBtn: opts.includes("admin"),
|
||||
visible: true, attendQuoteId: id,
|
||||
salaryYearMonth: attendCycle
|
||||
}
|
||||
|
|
@ -287,7 +288,7 @@ class AttendanceDataComp extends Component {
|
|||
dataSource, columns, pageInfo, loading, importData, importFormPayload, fieldSetPayload,
|
||||
attendanceReferencePayload, attendanceViewPayload
|
||||
} = this.state;
|
||||
const { showOperateBtn, salaryYearMonth } = this.props;
|
||||
const { salaryYearMonth } = this.props;
|
||||
const pagination = {
|
||||
...pageInfo,
|
||||
showTotal: total => `共 ${total} 条`,
|
||||
|
|
@ -315,10 +316,11 @@ class AttendanceDataComp extends Component {
|
|||
width: 120,
|
||||
dataIndex: "operate",
|
||||
render: (_, record) => {
|
||||
const { opts = [] } = record;
|
||||
return (
|
||||
<div className="linkWapper">
|
||||
<a href="javascript: void(0);" onClick={() => this.handleViewAttendanceData(record)}>查看</a>
|
||||
{showOperateBtn &&
|
||||
{opts.includes("admin") &&
|
||||
<React.Fragment>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleDeleteAttendanceData(record)}>删除</a>
|
||||
|
|
@ -336,9 +338,18 @@ class AttendanceDataComp extends Component {
|
|||
</React.Fragment>
|
||||
}
|
||||
{
|
||||
!showOperateBtn &&
|
||||
!opts.includes("admin") &&
|
||||
<Dropdown
|
||||
overlay={
|
||||
<Menu>
|
||||
<Menu.Item>
|
||||
<a href="javascript:void(0)"
|
||||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
</Menu.Item>
|
||||
</Menu>
|
||||
}>
|
||||
<a href="javascript:void(0)"><i className="icon-coms-more"/></a>
|
||||
</Dropdown>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
|
|
@ -361,8 +372,7 @@ class AttendanceDataComp extends Component {
|
|||
{/* 考勤数据引用 */}
|
||||
<AttendanceRefrenceDataModal {...attendanceReferencePayload} onCancel={this.handleCloseQuoteModal}/>
|
||||
{/* 考勤数据查看 */}
|
||||
<AttendanceDataViewSlide {...attendanceViewPayload} showOperateBtn={showOperateBtn}
|
||||
onClose={() => this.setState({
|
||||
<AttendanceDataViewSlide {...attendanceViewPayload} onClose={() => this.setState({
|
||||
attendanceViewPayload: {
|
||||
...attendanceViewPayload,
|
||||
visible: false,
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import { getSearchs } from "../../../../util";
|
|||
import {
|
||||
checkOperation,
|
||||
getAttendanceFieldSettingList,
|
||||
getLedgerList,
|
||||
returnToAttendanceFieldSettingDefault,
|
||||
saveAttendanceFieldSetting,
|
||||
saveAttendanceFieldSettingAsDefault,
|
||||
|
|
@ -21,6 +20,7 @@ import {
|
|||
} from "../../../../apis/attendance";
|
||||
import SelectItemModal from "../../../../components/selectItemsModal";
|
||||
import SelectItemsWrapper from "../../../../components/selectItemsModal/selectItemsWrapper";
|
||||
import { postFetch } from "../../../../util/request";
|
||||
import "./index.less";
|
||||
|
||||
@inject("attendanceStore")
|
||||
|
|
@ -46,7 +46,8 @@ class AttendanceRefrenceDataModal extends Component {
|
|||
|
||||
getLedgerList = () => {
|
||||
const { attendanceStore: { refenceform } } = this.props;
|
||||
getLedgerList().then(({ status, data }) => {
|
||||
postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "ADMIN_DATA" })
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
condition: _.map(reFrenceConditions, (item) => {
|
||||
|
|
@ -56,7 +57,7 @@ class AttendanceRefrenceDataModal extends Component {
|
|||
items: _.map(items, child => {
|
||||
const { domkey } = child;
|
||||
if (domkey[0] === "salarySobIds") {
|
||||
return { ...child, options: _.map(data, it => ({ key: it.id, showname: it.content })) };
|
||||
return { ...child, options: _.map(data, it => ({ key: String(it.id), showname: it.name })) };
|
||||
}
|
||||
return { ...child };
|
||||
})
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@
|
|||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,8 @@ class Index extends Component {
|
|||
|
||||
render() {
|
||||
const { selectedKey, salaryMonth, fieldName, logDialogVisible, filterConditions } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
||||
const topTab = [
|
||||
{ title: "考勤数据", key: "DATA" },
|
||||
{ title: "字段管理", key: "FIELD" }
|
||||
|
|
@ -115,7 +116,6 @@ class Index extends Component {
|
|||
selectedKey === "DATA" ?
|
||||
<AttendanceDataComp
|
||||
ref={dom => this.attendanceTableRef = dom}
|
||||
showOperateBtn={showOperateBtn}
|
||||
salaryYearMonth={salaryMonth}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}
|
||||
/> :
|
||||
|
|
|
|||
|
|
@ -5,11 +5,13 @@
|
|||
* Date: 2023/2/20
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaSearchGroup, WeaTable } from "ecCom";
|
||||
import { WeaLocaleProvider, WeaSearchGroup, WeaTable } from "ecCom";
|
||||
import { getTableRecordDate } from "../../../apis/cumDeduct";
|
||||
import { DataCollectionDateRangePick, DataCollectionSelect, Input } from "../cumDeduct";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class TableRecord extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -167,11 +169,11 @@ class TableRecord extends Component {
|
|||
};
|
||||
const items = screenParams.length === 1 ? [
|
||||
{
|
||||
com: Input({ value: record.username })
|
||||
com: Input({ label: getLabel(111, "姓名"), value: record.username })
|
||||
}
|
||||
] : [
|
||||
{
|
||||
com: Input({ value: record.username })
|
||||
com: Input({ label: getLabel(111, "姓名"), value: record.username })
|
||||
},
|
||||
{
|
||||
com: DataCollectionSelect({
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ import TableRecord from "../components/tableRecord";
|
|||
import { dataCollectCondition } from "./columns";
|
||||
import { removePropertyCondition } from "../../../util/response";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import { getDomkes } from "../../../util";
|
||||
import Layout from "../layout";
|
||||
import moment from "moment";
|
||||
|
|
@ -66,7 +67,8 @@ class Index extends Component {
|
|||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
targetid: ""
|
||||
targetid: "",
|
||||
taxAgentOption: []
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -103,11 +105,15 @@ class Index extends Component {
|
|||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
getAdvanceCondition = () => {
|
||||
getAdvanceCondition = async () => {
|
||||
const { cumDeductStore: { form } } = this.props;
|
||||
const { data: authTaxAgent } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
||||
getCumDeductSaCondition().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({ advanceCondition: removePropertyCondition(data.condition) });
|
||||
this.setState({
|
||||
advanceCondition: removePropertyCondition(data.condition),
|
||||
taxAgentOption: _.map(authTaxAgent, g => ({ key: String(g.id), showname: g.name }))
|
||||
});
|
||||
form.initFormFields(removePropertyCondition(data.condition));
|
||||
}
|
||||
});
|
||||
|
|
@ -236,7 +242,8 @@ class Index extends Component {
|
|||
}
|
||||
};
|
||||
handleSaveData = () => {
|
||||
const { cumDeductStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const { cumDeductStore: { addForm } } = this.props, { slidePayload } = this.state;
|
||||
const taxAgentOption = slidePayload.children.props.taxAgentOption;
|
||||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
|
|
@ -260,10 +267,11 @@ class Index extends Component {
|
|||
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleAddData = (title = "新建", editId = {}) => {
|
||||
const { taxAgentStore, cumDeductStore: { addForm } } = this.props;
|
||||
handleAddData = async (title = "新建", editId = {}) => {
|
||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
||||
const { cumDeductStore: { addForm } } = this.props;
|
||||
const { slidePayload } = this.state;
|
||||
const { taxAgentOption } = taxAgentStore;
|
||||
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
||||
if (idx === 0) {
|
||||
return {
|
||||
|
|
@ -349,8 +357,7 @@ class Index extends Component {
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
getScreen = () => {
|
||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const { declareMonth, taxAgentId, innerWidth } = this.state;
|
||||
const { declareMonth, taxAgentId, innerWidth, taxAgentOption } = this.state;
|
||||
const items = [
|
||||
{
|
||||
com: DataCollectionDatePicker({
|
||||
|
|
@ -463,10 +470,11 @@ class Index extends Component {
|
|||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleOpenImport = () => {
|
||||
handleOpenImport = async () => {
|
||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
||||
const { importPayload } = this.state;
|
||||
const { importOpts } = importPayload;
|
||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||
this.setState({
|
||||
importPayload: {
|
||||
...importPayload,
|
||||
|
|
@ -498,7 +506,7 @@ class Index extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { showOperateBtn }, cumDeductStore: { form } } = this.props;
|
||||
const { cumDeductStore: { form } } = this.props;
|
||||
const {
|
||||
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
|
||||
importPayload, exportPayloadType, targetid
|
||||
|
|
@ -519,7 +527,6 @@ class Index extends Component {
|
|||
ref={dom => this.tableRef = dom}
|
||||
url="/api/bs/hrmsalary/addUpDeduction/list"
|
||||
payload={tablePayload}
|
||||
showOperateBtn={showOperateBtn}
|
||||
onTableOperate={this.handleTableOperate}
|
||||
onViewDetails={(record) => this.handleAddData("累计专项附加扣除记录", record)}
|
||||
form={form}
|
||||
|
|
@ -557,8 +564,10 @@ export const DataCollectionSelect = (props) => {
|
|||
};
|
||||
|
||||
export const Input = (props) => {
|
||||
const { value } = props;
|
||||
return (<WeaInput value={value} viewAttr={1}/>);
|
||||
const { value, label } = props;
|
||||
return (<WeaFormItem label={label} labelCol={{ span: 8 }} wrapperCol={{ span: 16 }}>
|
||||
<WeaInput value={value} viewAttr={1}/>
|
||||
</WeaFormItem>);
|
||||
};
|
||||
export const DataCollectionDateRangePick = (props) => {
|
||||
const { range, label, onChange, format = "YYYY-MM", key } = props;
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import { dataCollectCondition, taxOptions } from "./columns";
|
|||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import { getDomkes } from "../../../util";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -63,7 +64,8 @@ class Index extends Component {
|
|||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
targetid: ""
|
||||
targetid: "",
|
||||
taxAgentOption: []
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -80,11 +82,15 @@ class Index extends Component {
|
|||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
getAdvanceCondition = () => {
|
||||
getAdvanceCondition = async () => {
|
||||
const { data: authTaxAgent } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
||||
const { cumSituationStore: { form } } = this.props;
|
||||
getCumSituationSaCondition().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({ advanceCondition: removePropertyCondition(data.condition) });
|
||||
this.setState({
|
||||
advanceCondition: removePropertyCondition(data.condition),
|
||||
taxAgentOption: _.map(authTaxAgent, g => ({ key: String(g.id), showname: g.name }))
|
||||
});
|
||||
form.initFormFields(removePropertyCondition(data.condition));
|
||||
}
|
||||
});
|
||||
|
|
@ -142,10 +148,11 @@ class Index extends Component {
|
|||
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleAddData = (title = "新建", editId = {}) => {
|
||||
const { taxAgentStore, cumSituationStore: { addForm } } = this.props;
|
||||
handleAddData = async (title = "新建", editId = {}) => {
|
||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
||||
const { cumSituationStore: { addForm } } = this.props;
|
||||
const { slidePayload } = this.state;
|
||||
const { taxAgentOption } = taxAgentStore;
|
||||
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
||||
if (idx === 0) {
|
||||
return {
|
||||
|
|
@ -324,8 +331,7 @@ class Index extends Component {
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
getScreen = () => {
|
||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const { declareMonth, year, taxAgentId, innerWidth } = this.state;
|
||||
const { declareMonth, year, taxAgentId, innerWidth, taxAgentOption } = this.state;
|
||||
const items = [
|
||||
{
|
||||
com: DataCollectionDatePicker({
|
||||
|
|
@ -389,7 +395,8 @@ class Index extends Component {
|
|||
this.props.cumSituationStore.initAddForm();
|
||||
};
|
||||
handleSaveData = () => {
|
||||
const { cumSituationStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const { cumSituationStore: { addForm } } = this.props, { slidePayload } = this.state;
|
||||
const taxAgentOption = slidePayload.children.props.taxAgentOption;
|
||||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ class Layout extends Component {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { taxAgentStore: { fetchTaxAgentOption } } = this.props;
|
||||
fetchTaxAgentOption();
|
||||
window.addEventListener("resize", this.resizeUpdate);
|
||||
}
|
||||
|
||||
|
|
@ -91,7 +89,7 @@ class Layout extends Component {
|
|||
render() {
|
||||
const { showSearchAd, logDialogVisible, filterConditions } = this.state;
|
||||
const {
|
||||
title, btns, leftComp, children, taxAgentStore: { showOperateBtn },
|
||||
title, btns, leftComp, children, taxAgentStore: { PageAndOptAuth },
|
||||
slidePayload, onClose, form, condition, onImportFile,
|
||||
onAdSearch, onCancel, importPayload, logFunction, onClearTargrtid
|
||||
} = this.props;
|
||||
|
|
@ -100,6 +98,7 @@ class Layout extends Component {
|
|||
visible: importVisiable, importFormComponent, importOpts,
|
||||
importResult, templateLink, previewUrl
|
||||
} = importPayload;
|
||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
||||
return (
|
||||
<div className="layoutWrapper">
|
||||
<WeaTop title={title} buttons={showOperateBtn ? btns : []}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ import { dataCollectCondition } from "./columns";
|
|||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import { getDomkes } from "../../../util";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -64,7 +65,8 @@ class Index extends Component {
|
|||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
targetid: ""
|
||||
targetid: "",
|
||||
taxAgentOption: []
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -81,11 +83,15 @@ class Index extends Component {
|
|||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
getAdvanceCondition = () => {
|
||||
getAdvanceCondition = async () => {
|
||||
const { data: authTaxAgent } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
||||
const { otherDeductStore: { form } } = this.props;
|
||||
getOtherDeductSaCondition().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({ advanceCondition: removePropertyCondition(data.condition) });
|
||||
this.setState({
|
||||
advanceCondition: removePropertyCondition(data.condition),
|
||||
taxAgentOption: _.map(authTaxAgent, g => ({ key: String(g.id), showname: g.name }))
|
||||
});
|
||||
form.initFormFields(removePropertyCondition(data.condition));
|
||||
}
|
||||
});
|
||||
|
|
@ -270,10 +276,11 @@ class Index extends Component {
|
|||
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleAddData = (title = "新建", editId = {}) => {
|
||||
const { taxAgentStore, otherDeductStore: { addForm } } = this.props;
|
||||
handleAddData = async (title = "新建", editId = {}) => {
|
||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
||||
const { otherDeductStore: { addForm } } = this.props;
|
||||
const { slidePayload } = this.state;
|
||||
const { taxAgentOption } = taxAgentStore;
|
||||
const conditions = _.map(dataCollectCondition, (it, idx) => {
|
||||
if (idx === 0) {
|
||||
return {
|
||||
|
|
@ -359,8 +366,7 @@ class Index extends Component {
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
getScreen = () => {
|
||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const { declareMonth, taxAgentId, innerWidth } = this.state;
|
||||
const { declareMonth, taxAgentId, innerWidth, taxAgentOption } = this.state;
|
||||
const items = [
|
||||
{
|
||||
com: DataCollectionDatePicker({
|
||||
|
|
@ -404,7 +410,8 @@ class Index extends Component {
|
|||
this.props.otherDeductStore.initAddForm();
|
||||
};
|
||||
handleSaveData = () => {
|
||||
const { otherDeductStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const { otherDeductStore: { addForm } } = this.props, { slidePayload } = this.state;
|
||||
const taxAgentOption = slidePayload.children.props.taxAgentOption;
|
||||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import { condition } from "./components/condition";
|
|||
import AddItems from "../addItems";
|
||||
import TableRecord from "../components/tableRecord";
|
||||
import { convertToUrlString } from "../../../util/url";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import { getDomkes } from "../../../util";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
|
|
@ -53,7 +54,8 @@ class Index extends Component {
|
|||
exportPayloadUrl: "",
|
||||
exportPayloadType: false,
|
||||
advanceCondition: null,
|
||||
targetid: ""
|
||||
targetid: "",
|
||||
taxAgentOption: []
|
||||
};
|
||||
this.tableRef = null;
|
||||
this.addItemRef = null;
|
||||
|
|
@ -105,11 +107,15 @@ class Index extends Component {
|
|||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
getAdvanceCondition = () => {
|
||||
getAdvanceCondition = async () => {
|
||||
const { data: authTaxAgent } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" });
|
||||
const { specialAddStore: { advanceForm } } = this.props;
|
||||
getSearchCondition().then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({ advanceCondition: removePropertyCondition(data.condition) });
|
||||
this.setState({
|
||||
advanceCondition: removePropertyCondition(data.condition),
|
||||
taxAgentOption: _.map(authTaxAgent, g => ({ key: String(g.id), showname: g.name }))
|
||||
});
|
||||
advanceForm.initFormFields(removePropertyCondition(data.condition));
|
||||
}
|
||||
});
|
||||
|
|
@ -208,8 +214,7 @@ class Index extends Component {
|
|||
* Date: 2023/2/17
|
||||
*/
|
||||
getScreen = () => {
|
||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const { taxAgentId } = this.state;
|
||||
const { taxAgentId, taxAgentOption } = this.state;
|
||||
const items = [
|
||||
{
|
||||
com: DataCollectionSelect({
|
||||
|
|
@ -258,10 +263,11 @@ class Index extends Component {
|
|||
* Params: screenParams规则:日期必须放在数组最后一位,人员信息必须第一位
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleAddData = (title = "新建", editId = {}) => {
|
||||
const { taxAgentStore, specialAddStore: { addForm } } = this.props;
|
||||
handleAddData = async (title = "新建", editId = {}) => {
|
||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
||||
const { specialAddStore: { addForm } } = this.props;
|
||||
const { slidePayload } = this.state;
|
||||
const { taxAgentOption } = taxAgentStore;
|
||||
const conditions = _.map(condition, (it, idx) => {
|
||||
if (idx === 0) {
|
||||
return {
|
||||
|
|
@ -342,7 +348,8 @@ class Index extends Component {
|
|||
this.props.specialAddStore.initAddForm();
|
||||
};
|
||||
handleSaveData = () => {
|
||||
const { specialAddStore: { addForm }, taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const { specialAddStore: { addForm } } = this.props, { slidePayload } = this.state;
|
||||
const taxAgentOption = slidePayload.children.props.taxAgentOption;
|
||||
addForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = {
|
||||
|
|
@ -371,10 +378,11 @@ class Index extends Component {
|
|||
* Params:
|
||||
* Date: 2023/2/20
|
||||
*/
|
||||
handleOpenImport = () => {
|
||||
handleOpenImport = async () => {
|
||||
const { data } = await postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" });
|
||||
const taxAgentOption = _.map(data, o => ({ key: String(o.id), showname: o.name }));
|
||||
const { importPayload } = this.state;
|
||||
const { importOpts } = importPayload;
|
||||
const { taxAgentStore: { taxAgentOption } } = this.props;
|
||||
this.setState({
|
||||
importPayload: {
|
||||
...importPayload,
|
||||
|
|
@ -405,7 +413,7 @@ class Index extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props;
|
||||
const { specialAddStore: { advanceForm } } = this.props;
|
||||
const {
|
||||
taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload,
|
||||
exportPayloadType, targetid
|
||||
|
|
@ -427,7 +435,6 @@ class Index extends Component {
|
|||
url="/api/bs/hrmsalary/specialAddDeduction/list"
|
||||
payload={tablePayload}
|
||||
isSpecial
|
||||
showOperateBtn={showOperateBtn}
|
||||
onTableOperate={this.handleTableOperate}
|
||||
onViewDetails={(record) => this.handleAddData("专项附加扣除记录", record)}
|
||||
form={advanceForm}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,171 @@
|
|||
/*
|
||||
* 数据推送
|
||||
* 新增编辑
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/11/19
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaButtonIcon, WeaLocaleProvider, WeaSearchGroup, WeaSlideModal, WeaTable, WeaTools } from "ecCom";
|
||||
import PDetailDialog from "../PDDialog";
|
||||
import { postFetch } from "../../../../util/request";
|
||||
import * as API from "../../../../apis/datapush";
|
||||
import { conditions } from "../../conditions";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { formRender } from "../../formRender";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("baseFormStore") @observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
conditions: [], loading: false, columns: [], dataSource: [],
|
||||
PDDialog: { visible: false, title: "", settingId: "", detail: {} } //推送明细弹框
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
document.querySelector(".datapush_wrapper").classList.add("zIndex0-weaslide-title");
|
||||
this.initForm(nextProps);
|
||||
}
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) {
|
||||
document.querySelector(".datapush_wrapper").classList.remove("zIndex0-weaslide-title");
|
||||
this.props.baseFormStore.initForm();
|
||||
}
|
||||
}
|
||||
|
||||
initForm = async (props) => {
|
||||
const { detail } = props;
|
||||
const { data: salarySobList } = await postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "ADMIN_DATA" });
|
||||
this.setState({
|
||||
conditions: _.map(conditions, item => ({
|
||||
...item, title: getLabel(item.lanId, item.title), items: _.map(item.items, o => {
|
||||
o = { ...o, label: getLabel(o.lanId, o.label), value: detail[getKey(o)] || "" };
|
||||
if (getKey(o) === "salarySobIds") {
|
||||
return {
|
||||
...o, value: detail[getKey(o)] ? detail[getKey(o)] : "",
|
||||
options: _.map(salarySobList, o => ({ key: String(o.id), showname: o.name }))
|
||||
};
|
||||
} else if (getKey(o) === "able") {
|
||||
return { ...o, value: !_.isEmpty(detail) ? String(detail[getKey(o)]) : o.value };
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
}))
|
||||
}, () => {
|
||||
props.baseFormStore.form.initFormFields(this.state.conditions);
|
||||
!_.isEmpty(detail) && this.getPushItemList(props);
|
||||
});
|
||||
};
|
||||
getPushItemList = (props) => {
|
||||
const { detail } = props || this.props;
|
||||
const { id: settingId } = detail;
|
||||
API.getPushItemList({ settingId }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
const { columns, list: dataSource } = data;
|
||||
this.setState({
|
||||
dataSource, columns: [...columns, {
|
||||
title: getLabel(111, "操作"), width: 120, render: (__, record) => (<React.Fragment>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleOpts("edit", record)}>{getLabel(111, "编辑")}</a>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.handleOpts("del", record.id)}>{getLabel(111, "删除")}</a>
|
||||
</React.Fragment>)
|
||||
}],
|
||||
PDDialog: { ...this.state.PDDialog, settingId }
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
handleOpts = (type, detail = {}) => {
|
||||
switch (type) {
|
||||
case "edit":
|
||||
const { PDDialog } = this.state;
|
||||
this.setState({ PDDialog: { ...PDDialog, visible: true, title: getLabel(111, "编辑"), detail } });
|
||||
break;
|
||||
case "del":
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "信息确认"),
|
||||
content: getLabel(111, "确认要删除吗?"),
|
||||
onOk: () => {
|
||||
API.deletePushItemList({ id: detail }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "删除成功"));
|
||||
this.getPushItemList();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
save = () => {
|
||||
const { baseFormStore: { form }, detail } = this.props;
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const { salarySobIds, ...payload } = form.getFormParams();
|
||||
this.setState({ loading: true });
|
||||
API.savePushSetting({ ...payload, salarySobIds: salarySobIds.split(","), id: detail.id })
|
||||
.then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功"));
|
||||
this.props.onClose(this.props.onSearch());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
renderTitle = () => {
|
||||
const { loading } = this.state, { title } = this.props;
|
||||
return <div className="titleDialog">
|
||||
<div className="titleCol titleLeftBox">
|
||||
<div className="titleIcon"><i className="icon-coms-fa"/></div>
|
||||
<div className="title">{title}</div>
|
||||
</div>
|
||||
<div className="titleCol titleRightBox">
|
||||
<Button type="primary" loading={loading} onClick={this.save}>{getLabel(537558, "保存")}</Button>
|
||||
</div>
|
||||
</div>;
|
||||
};
|
||||
|
||||
render() {
|
||||
const { baseFormStore: { form }, detail } = this.props, { conditions, columns, dataSource, PDDialog } = this.state;
|
||||
return (<WeaSlideModal
|
||||
className="pushdata_create_dialog" {...this.props} direction="right"
|
||||
top={0} width={800} height={100} measureT="%" measureX="px" measureY="%" title={this.renderTitle()}
|
||||
content={<div className="form-dialog-layout">
|
||||
{formRender(form, conditions)}
|
||||
{!_.isEmpty(detail) &&
|
||||
<WeaSearchGroup title={getLabel(111, "推送明细")} showGroup needTigger className="pushdata_detail">
|
||||
<div className="opts">
|
||||
<WeaButtonIcon buttonType="add" type="primary" title={getLabel(111, "添加")}
|
||||
onClick={() => this.setState({
|
||||
PDDialog: { ...PDDialog, visible: true, title: getLabel(111, "新建") }
|
||||
})}/>
|
||||
</div>
|
||||
<WeaTable pagination={false} columns={columns} dataSource={dataSource} bordered/>
|
||||
<PDetailDialog {...PDDialog} onSearch={this.getPushItemList}
|
||||
onCancel={() => this.setState({ PDDialog: { ...PDDialog, visible: false, detail: {} } })}/>
|
||||
</WeaSearchGroup>}
|
||||
</div>}
|
||||
/>);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,95 @@
|
|||
/*
|
||||
* 数据推送
|
||||
* 自定义薪资项目选择树
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/11/20
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { TreeSelect } from "antd";
|
||||
import { formualSearchField, formualSearchGroup } from "../../../../apis/item";
|
||||
import cs from "classnames";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const TreeNode = TreeSelect.TreeNode;
|
||||
|
||||
class CustomTreeSelect extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { sourceList: [] };
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
formualSearchGroup({ referenceType: "sql" }).then(({ status, data }) => {
|
||||
if (status) this.setState({ sourceList: _.map(data, o => ({ ...o, isLeaf: true })) });
|
||||
});
|
||||
}
|
||||
|
||||
getSourceItem = (sourceId) => {
|
||||
formualSearchField({ sourceId, extendParam: { referenceType: "sql" } }).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
sourceList: _.map(this.state.sourceList, o => {
|
||||
if (o.key === sourceId) return {
|
||||
...o,
|
||||
children: _.map(data, k => ({ key: k.fieldId, value: k.name, fieldType: k.fieldType, isLeaf: false }))
|
||||
};
|
||||
return { ...o };
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
generateTreeNodes = (data) => {
|
||||
const treeNodes = [], showData = [...data];
|
||||
showData.map((item) => {
|
||||
let title = (
|
||||
<div className="weapp-excel-code-action-list-variable">
|
||||
<span className="weapp-excel-code-action-list-variable-name">{item.value}</span>
|
||||
{
|
||||
item.fieldType ?
|
||||
<span
|
||||
className={cs("weapp-excel-code-action-list-variable-tip", { "danger": item.fieldType === "string" })}>{item.fieldType === "number" ? getLabel(111, "数字") : getLabel(111, "文本")}</span> :
|
||||
<span></span>
|
||||
}
|
||||
</div>
|
||||
);
|
||||
treeNodes.push(<TreeNode className="no-child-item" title={title} key={item.key} value={item.key}/>);
|
||||
});
|
||||
return treeNodes;
|
||||
};
|
||||
handleSelect = (nodeValue) => {
|
||||
const { form } = this.props, { sourceList } = this.state;
|
||||
const [source, __] = nodeValue.split("_");
|
||||
const itemName = _.find(_.find(sourceList, o => o.key === source).children, k => k.key === nodeValue).value;
|
||||
form.updateFields({ item: nodeValue, itemName, source });
|
||||
};
|
||||
|
||||
render() {
|
||||
const { sourceList } = this.state, { detail } = this.props;
|
||||
const { itemName } = detail;
|
||||
return (
|
||||
<TreeSelect dropdownStyle={{ maxHeight: 320, overflow: "auto" }} defaultValue={itemName}
|
||||
dropdownMatchSelectWidth className="custom_item_treeselect" showSearch
|
||||
loadData={(node) => this.getSourceItem(node.props.value)}
|
||||
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}>
|
||||
{this.generateTreeNodes(o.children || [])}
|
||||
</TreeNode>))
|
||||
}
|
||||
</TreeSelect>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default CustomTreeSelect;
|
||||
|
|
@ -0,0 +1,96 @@
|
|||
/*
|
||||
* 数据推送
|
||||
* 推送明细新增编辑
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/11/20
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { commonEnumList } from "../../../../apis/ruleconfig";
|
||||
import * as API from "../../../../apis/datapush";
|
||||
import { PDConditions } from "../../conditions";
|
||||
import { Button, message } from "antd";
|
||||
import { formRender } from "../../formRender";
|
||||
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("baseFormStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
conditions: [], loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.initForm(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) nextProps.baseFormStore.initFormExtra();
|
||||
}
|
||||
|
||||
initForm = async (props) => {
|
||||
const { detail = {} } = props;
|
||||
const { data: fieldType } = await commonEnumList({ enumClass: "com.engine.salary.enums.push.PushItemFieldEnum" });
|
||||
this.setState({
|
||||
conditions: _.map(PDConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
o = { ...o, label: getLabel(o.lanId, o.label), value: detail[getKey(o)] || "" };
|
||||
if (getKey(o) === "fieldType") {
|
||||
return {
|
||||
...o, value: detail[getKey(o)] ? String(detail[getKey(o)]) : "",
|
||||
options: _.map(fieldType, o => ({ key: o.enum, showname: o.defaultLabel }))
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
})
|
||||
}))
|
||||
}, () => {
|
||||
props.baseFormStore.formExtra.initFormFields(this.state.conditions);
|
||||
});
|
||||
};
|
||||
save = () => {
|
||||
const { baseFormStore: { formExtra }, detail: { id }, settingId } = this.props;
|
||||
formExtra.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = formExtra.getFormParams();
|
||||
this.setState({ loading: true });
|
||||
API.savePushItemList({ ...payload, settingId, id })
|
||||
.then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功"));
|
||||
this.props.onCancel(this.props.onSearch());
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { baseFormStore: { formExtra }, detail } = this.props, { loading, conditions } = this.state;
|
||||
return (
|
||||
<WeaDialog
|
||||
{...this.props} style={{ width: 480, height: 174 }} initLoadCss className="Pdetail_dialog"
|
||||
buttons={[
|
||||
<Button onClick={this.props.onCancel}>{getLabel(111, "取消")}</Button>,
|
||||
<Button type="primary" onClick={this.save} loading={loading}>{getLabel(111, "保存")}</Button>
|
||||
]}
|
||||
>
|
||||
<div className="form-dialog-layout">{formRender(formExtra, conditions, detail)}</div>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* 数据推送列表
|
||||
*
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/11/19
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import * as API from "../../../../apis/datapush";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
columns: [], dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getPushSettingList();
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
||||
pageInfo: { ...this.state.pageInfo, current: 1 }
|
||||
}, () => this.getPushSettingList(nextProps));
|
||||
}
|
||||
|
||||
getPushSettingList = (props) => {
|
||||
const { pageInfo } = this.state, { query } = props || this.props;
|
||||
const payload = { ...pageInfo, ...query };
|
||||
this.setState({ loading: true });
|
||||
API.getPushSettingList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total },
|
||||
dataSource: _.map(dataSource, o => ({
|
||||
...o, salarySobs: _.map(o.salarySobs, k => k.name).join(","),
|
||||
salarySobIds: _.map(o.salarySobs, k => k.id).join(",")
|
||||
})),
|
||||
columns: [..._.map(columns, o => {
|
||||
if (o.dataIndex === "able") return {
|
||||
...o, render: v => (<WeaCheckbox value={String(v)} disabled display="switch"/>)
|
||||
};
|
||||
return { ...o };
|
||||
}), {
|
||||
title: getLabel(111, "操作"), dataIndex: "opts", width: 120, render: (__, record) => (<React.Fragment>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.props.onChange("edit", record)}>{getLabel(111, "编辑")}</a>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={() => this.props.onChange("del", record.id)}>{getLabel(111, "删除")}</a>
|
||||
</React.Fragment>)
|
||||
}]
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { columns, dataSource, loading, pageInfo } = 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.getPushSettingList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushSettingList());
|
||||
}
|
||||
};
|
||||
return (<WeaTable loading={loading} dataSource={dataSource} columns={columns} pagination={pagination}
|
||||
scroll={{ y: `calc(100vh - 182px)` }}/>);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,149 @@
|
|||
/*
|
||||
* 数据推送记录
|
||||
* 创建
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/4/15
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaFormItem, WeaLocaleProvider, WeaTable, WeaTools } from "ecCom";
|
||||
import FormInfo from "../../../../components/FormInfo";
|
||||
import { RQconditions } from "../../conditions";
|
||||
import { MonthRangePicker } from "../../../reportView/components/statisticalMicroSettingsSlide";
|
||||
import { getSalaryAcctList } from "../../../../apis/calculate";
|
||||
import { createPushRecords } from "../../../../apis/datapush";
|
||||
import { WeaForm, WeaSwitch } from "comsMobx";
|
||||
import { Button, message } from "antd";
|
||||
import moment from "moment";
|
||||
|
||||
const form = new WeaForm();
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class CreatePushRecordDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
dataSource: [], columns: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
conditions: []
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
this.setState({
|
||||
conditions: _.map(RQconditions, item => ({
|
||||
...item,
|
||||
items: _.map(item.items, o => {
|
||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
||||
if (getKey(o) === "startMonthStr") {
|
||||
return {
|
||||
...o, value: moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM")
|
||||
};
|
||||
} else if (getKey(o) === "endMonthStr") {
|
||||
return {
|
||||
...o, value: moment(new Date()).endOf("year").format("YYYY-MM")
|
||||
};
|
||||
}
|
||||
return o;
|
||||
})
|
||||
}))
|
||||
}, () => {
|
||||
form.initFormFields(this.state.conditions);
|
||||
this.getSalaryAcctList();
|
||||
});
|
||||
} else {
|
||||
form.resetForm();
|
||||
}
|
||||
}
|
||||
|
||||
getSalaryAcctList = () => {
|
||||
const { pageInfo } = this.state, payload = { ...pageInfo, ...form.getFormParams() };
|
||||
this.setState({ loading: true });
|
||||
getSalaryAcctList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
dataSource, pageInfo: { current, pageSize, total },
|
||||
columns: _.filter(columns, it => (it.dataIndex !== "backCalcStatus" && it.dataIndex !== "acctTimes" && it.dataIndex !== "operate"))
|
||||
});
|
||||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
save = (record) => {
|
||||
this.setState({ loading: true });
|
||||
createPushRecords({ salaryAcctRecordIds: [record.id] }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(111, "操作成功!"));
|
||||
this.props.onCancel(this.props.onSuccess);
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { loading, conditions, dataSource, columns, pageInfo } = 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.getSalaryAcctList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getSalaryAcctList());
|
||||
}
|
||||
};
|
||||
const itemRender = {
|
||||
name: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}
|
||||
onChange={_.debounce(() => this.getSalaryAcctList(), 500)}/>);
|
||||
},
|
||||
startMonthStr: () => null,
|
||||
endMonthStr: () => null
|
||||
};
|
||||
const childrenComponents = {
|
||||
startMonthStr: () => {
|
||||
const { startMonthStr, endMonthStr } = form.getFormParams();
|
||||
const coms = [], { fieldMap } = form;
|
||||
const dateRange = [startMonthStr, endMonthStr];
|
||||
coms.push(
|
||||
<WeaFormItem label={<span>{fieldMap["startMonthStr"].label}</span>} labelCol={{ span: 6 }}
|
||||
wrapperCol={{ span: 14 }}>
|
||||
<MonthRangePicker dateRange={dateRange} viewAttr={2} onChange={v => {
|
||||
const [v1, v2] = v;
|
||||
form.updateFields({ startMonthStr: v1, endMonthStr: v2 });
|
||||
this.getSalaryAcctList();
|
||||
}}/>
|
||||
</WeaFormItem>
|
||||
);
|
||||
return [{ com: coms, col: 2 }];
|
||||
}
|
||||
};
|
||||
const scrollHeight = this.refs.recordRef ? this.refs.recordRef.state.height - 162 : 606;
|
||||
|
||||
return (<WeaDialog {...this.props} initLoadCss className="record-dialog" title={getLabel(111, "创建推送记录")}
|
||||
ref="recordRef"
|
||||
style={{
|
||||
width: 1000, height: 580, minHeight: 200, minWidth: 380, maxHeight: "70%", maxWidth: "90%",
|
||||
overflow: "hidden", transform: "translate(0px, 0px)"
|
||||
}} buttons={[
|
||||
<Button onClick={() => this.props.onCancel()}>{getLabel(111, "取消")}</Button>
|
||||
]}>
|
||||
<FormInfo className="record-form" center={false} itemRender={itemRender} colCount={2}
|
||||
form={form} formFields={conditions} childrenComponents={childrenComponents}/>
|
||||
<WeaTable className="wea-browser-table-cursor" rowKey="id" scroll={{ y: scrollHeight + "px" }}
|
||||
dataSource={dataSource} loading={loading} pagination={pagination} columns={columns}
|
||||
onRowClick={this.save}/>
|
||||
</WeaDialog>);
|
||||
}
|
||||
}
|
||||
|
||||
export default CreatePushRecordDialog;
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
/*
|
||||
* 数据推送
|
||||
* 推送记录
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/4/1
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider, WeaTable } from "ecCom";
|
||||
import * as API from "../../../../apis/datapush";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
columns: [], dataSource: [], loading: false, pageInfo: { current: 1, pageSize: 10, total: 0 },
|
||||
selectedRowKeys: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.getPushRecordList();
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.setState({ selectedRowKeys: [] }, () => this.props.onChange("rowKey", []));
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.isQuery !== this.props.isQuery) this.setState({
|
||||
pageInfo: { ...this.state.pageInfo, current: 1 }
|
||||
}, () => this.getPushRecordList(nextProps));
|
||||
}
|
||||
|
||||
getPushRecordList = (props) => {
|
||||
const { pageInfo } = this.state, { query } = props || this.props;
|
||||
const payload = { ...pageInfo, ...query };
|
||||
this.setState({ loading: true });
|
||||
API.getPushRecordList(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({
|
||||
pageInfo: { ...pageInfo, current, pageSize, total }, dataSource,
|
||||
columns: [...columns, {
|
||||
title: getLabel(111, "操作"), dataIndex: "opts", width: 140, render: (__, record) => (<React.Fragment>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={_.debounce(() => this.props.onChange("push", record), 300)}>{getLabel(111, "推送")}</a>
|
||||
<a href="javascript: void(0);" style={{ marginRight: 10 }}
|
||||
onClick={_.debounce(() => this.props.onChange("withdraw", record), 300)}>{getLabel(111, "撤回")}</a>
|
||||
<a href="javascript: void(0);"
|
||||
onClick={() => this.props.onChange("view", record)}>{getLabel(111, "查看详情")}</a>
|
||||
</React.Fragment>)
|
||||
}]
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { columns, dataSource, loading, pageInfo, selectedRowKeys } = 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.getPushRecordList());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushRecordList());
|
||||
}
|
||||
};
|
||||
const rowSelection = {
|
||||
selectedRowKeys,
|
||||
onChange: v => this.setState({ selectedRowKeys: v }, () => this.props.onChange("rowKey", v))
|
||||
};
|
||||
return (<WeaTable rowKey="id" loading={loading} dataSource={dataSource} columns={columns} pagination={pagination}
|
||||
rowSelection={rowSelection} scroll={{ y: `calc(100vh - 182px)` }}/>);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
/*
|
||||
* 推送记录
|
||||
* 查看详情
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/4/2
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaSlideModal, WeaTable, WeaTop } from "ecCom";
|
||||
import { getPushRecordDetail } from "../../../../apis/datapush";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class PushDetailDialog extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
query: { name: "" }, dataSource: [], columns: [], pageInfo: { current: 1, pageSize: 10, total: 0 }, loading: false
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.getPushRecordDetail(nextProps);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.setState({
|
||||
query: { name: "" }, pageInfo: { current: 1, pageSize: 10, total: 0 }
|
||||
});
|
||||
}
|
||||
|
||||
getPushRecordDetail = (props) => {
|
||||
const { recordId } = props || this.props, { pageInfo, query } = this.state;
|
||||
const payload = { ...query, ...pageInfo, recordId };
|
||||
this.setState({ loading: true });
|
||||
getPushRecordDetail(payload).then(({ status, data }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { columns, list: dataSource, pageNum: current, pageSize, total } = data;
|
||||
this.setState({ columns, dataSource, pageInfo: { current, pageSize, total } });
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { query, loading, dataSource, columns, pageInfo } = 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.getPushRecordDetail());
|
||||
},
|
||||
onChange: current => {
|
||||
this.setState({ pageInfo: { ...pageInfo, current } }, () => this.getPushRecordDetail());
|
||||
}
|
||||
};
|
||||
return (<WeaSlideModal
|
||||
{...this.props} className="pushDetailDialog"
|
||||
title={<WeaTop title={getLabel(111, "推送详情")} icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={[<WeaInputSearch value={query.name} onSearch={() => this.setState({
|
||||
pageInfo: { ...pageInfo, current: 1 }
|
||||
}, () => this.getPushRecordDetail())}
|
||||
onChange={v => this.setState({ query: { ...query, name: v } })}/>]}/>
|
||||
}
|
||||
direction="right" top={0} width={800} height={100}
|
||||
measureT="%" measureX="px" measureY="%"
|
||||
content={<div className="pushDetail_content">
|
||||
<WeaTable loading={loading} dataSource={dataSource} columns={columns} pagination={pagination}
|
||||
scroll={{ y: `calc(100vh - 182px)` }}/>
|
||||
</div>}
|
||||
/>);
|
||||
}
|
||||
}
|
||||
|
||||
export default PushDetailDialog;
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
// 推送配置表单
|
||||
export const conditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["name"],
|
||||
fieldcol: 14,
|
||||
label: "任务名称",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "SWITCH",
|
||||
domkey: ["able"],
|
||||
fieldcol: 14,
|
||||
label: "是否启用",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "0",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["salarySobIds"],
|
||||
fieldcol: 14,
|
||||
label: "薪资账套",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
multiple: true,
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
browserConditionParam: {
|
||||
completeURL: "/api/bs/hrmsalary/push/mode/list",
|
||||
dataParams: {},
|
||||
filterByName: true,
|
||||
tableProps: {},
|
||||
isSingle: true,
|
||||
searchParamsKey: "name",
|
||||
replaceDatas: [{}]
|
||||
},
|
||||
tags: true,
|
||||
conditionType: "INPUT",
|
||||
domkey: ["modeName"],
|
||||
fieldcol: 14,
|
||||
label: "建模名称",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["tableName"],
|
||||
fieldcol: 14,
|
||||
label: "数据表名",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["modeId"],
|
||||
fieldcol: 14,
|
||||
label: "建模ID",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: "基础信息",
|
||||
lanId: 111,
|
||||
col: 2,
|
||||
defaultshow: true
|
||||
}
|
||||
];// 推送配置表单
|
||||
export const PDConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["item"],
|
||||
fieldcol: 14,
|
||||
label: "薪资项目",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["itemName"],
|
||||
fieldcol: 14,
|
||||
label: "薪资名称",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 2,
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["source"],
|
||||
fieldcol: 14,
|
||||
label: "薪资资源",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
viewAttr: 2,
|
||||
hide: true
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["fieldName"],
|
||||
fieldcol: 14,
|
||||
label: "字段名称",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["fieldType"],
|
||||
fieldcol: 14,
|
||||
label: "字段类型",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
options: [],
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];// 推送详细配置表单
|
||||
|
||||
|
||||
export const RQconditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "MONTHPICKER",
|
||||
domkey: ["startMonthStr"],
|
||||
fieldcol: 14,
|
||||
label: "薪资所属月",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "MONTHPICKER",
|
||||
domkey: ["endMonthStr"],
|
||||
fieldcol: 14,
|
||||
label: "薪资所属月",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["name"],
|
||||
fieldcol: 14,
|
||||
label: "薪资账套",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];// 推送记录查询表单
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
import React from "react";
|
||||
import { WeaFormItem, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import CustomTreeSelect from "./components/PDDialog/customTreeSelect";
|
||||
import CustomBrowser from "../../components/CustomBrowser";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
export const formRender = (form, conditions, params) => {
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
let group = [];
|
||||
isFormInit && conditions && conditions.map(c => {
|
||||
let items = [];
|
||||
c.items.map(fields => {
|
||||
items.push({
|
||||
com: (
|
||||
<WeaFormItem label={fields.label} labelCol={{ span: `${fields.labelcol}` }}
|
||||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||
tipPosition="bottom">
|
||||
{
|
||||
getKey(fields) === "item" ?
|
||||
<React.Fragment>
|
||||
<CustomTreeSelect
|
||||
detail={params} fieldConfig={fields} form={form} formParams={formParams}/>
|
||||
{
|
||||
_.isEmpty(formParams.item) &&
|
||||
<span className="wea-required-e9" style={{ verticalAlign: "middle" }}>
|
||||
<img src="/images/BacoError_wev9.png" alt=""/>
|
||||
</span>
|
||||
}
|
||||
</React.Fragment>
|
||||
:
|
||||
getKey(fields) === "modeName" ?
|
||||
<CustomBrowser fieldConfig={fields} form={form} formParams={formParams}
|
||||
onCustomChange={(v) => !!_.values(v)[0] && form.updateFields({
|
||||
tableName: _.values(v)[0].subname,
|
||||
modeId: _.values(v)[0].domid
|
||||
})}/>
|
||||
: <WeaSwitch fieldConfig={fields} form={form} formParams={formParams}/>
|
||||
}
|
||||
</WeaFormItem>),
|
||||
colSpan: 1,
|
||||
hide: fields.hide
|
||||
});
|
||||
});
|
||||
!_.isEmpty(items) && group.push(
|
||||
<WeaSearchGroup col={c.col || 1} needTigger={true} showGroup={c.defaultshow} items={items} center={false}
|
||||
title={c.title}/>);
|
||||
});
|
||||
return group;
|
||||
};
|
||||
|
|
@ -0,0 +1,175 @@
|
|||
/*
|
||||
* 数据推送
|
||||
*
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2024/11/19
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaInputSearch, WeaLocaleProvider, WeaReqTop } from "ecCom";
|
||||
import * as API from "../../apis/datapush";
|
||||
import DatapushList from "./components/datapushList";
|
||||
import PushRecord from "./components/pushRecord";
|
||||
import DatapushDialog from "./components/DPDialog";
|
||||
import PushDetailDialog from "./components/pushRecord/pushDetailDialog";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import cs from "classnames";
|
||||
import "./index.less";
|
||||
import CreatePushRecordDialog from "./components/pushRecord/createPushRecordDialog";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("taxAgentStore", "baseFormStore")
|
||||
@observer
|
||||
class Index extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
selectedKey: "pushRecord", isQuery: false, query: { name: "" }, selectedRowKeys: [],
|
||||
loading: { push: false, withdraw: false }, visible: false,
|
||||
DPDialog: { visible: false, title: "", detail: {} }, //数据推送弹框
|
||||
pushDetailDialog: { visible: false, recordId: "" } //数据推送记录查看推送详情弹框
|
||||
};
|
||||
}
|
||||
|
||||
handleAdvanceSearch = () => this.setState({ isQuery: !this.state.isQuery });
|
||||
handleOperate = (type, detail = {}) => {
|
||||
switch (type) {
|
||||
case "create":
|
||||
case "edit":
|
||||
const title = type === "create" ? getLabel(111, "新建") : getLabel(111, "编辑");
|
||||
this.setState({ DPDialog: { visible: true, title, detail } });
|
||||
break;
|
||||
case "del":
|
||||
Modal.confirm({
|
||||
title: getLabel(111, "信息确认"),
|
||||
content: getLabel(111, "确认要删除吗?"),
|
||||
onOk: () => {
|
||||
API.deletePushSetting({ id: detail }).then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(111, "删除成功"));
|
||||
this.handleAdvanceSearch();
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "view":
|
||||
this.setState({ pushDetailDialog: { visible: true, recordId: detail.id } });
|
||||
break;
|
||||
case "rowKey":
|
||||
this.setState({ selectedRowKeys: detail });
|
||||
break;
|
||||
case "addRecord":
|
||||
this.setState({ visible: true });
|
||||
break;
|
||||
case "push":
|
||||
case "batchpush":
|
||||
if (type === "batchpush" && _.isEmpty(this.state.selectedRowKeys)) {
|
||||
message.warning(getLabel(111, "请选择数据"));
|
||||
return;
|
||||
}
|
||||
this.pushRecords(type === "push" ? [detail.id] : this.state.selectedRowKeys);
|
||||
break;
|
||||
case "withdraw":
|
||||
case "batchwithdraw":
|
||||
if (type === "batchwithdraw" && _.isEmpty(this.state.selectedRowKeys)) {
|
||||
message.warning(getLabel(111, "请选择数据"));
|
||||
return;
|
||||
}
|
||||
this.withdrawRecords(type === "withdraw" ? [detail.id] : this.state.selectedRowKeys);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
};
|
||||
pushRecords = (ids) => {
|
||||
this.setState({ loading: { ...this.state.loading, push: true } });
|
||||
API.pushRecords({ ids }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, push: false } });
|
||||
if (status) {
|
||||
this.handleAdvanceSearch();
|
||||
message.success(getLabel(111, "推送成功!"));
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
withdrawRecords = (ids) => {
|
||||
this.setState({ loading: { ...this.state.loading, withdraw: true } });
|
||||
API.withdrawRecords({ ids }).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: { ...this.state.loading, withdraw: false } });
|
||||
if (status) {
|
||||
this.handleAdvanceSearch();
|
||||
message.success(getLabel(111, "撤回成功!"));
|
||||
} else {
|
||||
message.error(errormsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { selectedKey, DPDialog, isQuery, query, pushDetailDialog, loading, visible } = this.state;
|
||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
||||
const tabs = [
|
||||
{
|
||||
title: getLabel(111, "推送记录"), key: "pushRecord", showDropIcon: false, dropMenuDatas: [],
|
||||
buttons: showOperateBtn ? [
|
||||
<Button type="primary" onClick={() => this.handleOperate("addRecord")}
|
||||
loading={loading.add}>{getLabel(111, "创建")}</Button>,
|
||||
<Button type="primary" onClick={() => this.handleOperate("batchpush")}
|
||||
loading={loading.push}>{getLabel(111, "批量推送")}</Button>,
|
||||
<Button type="ghost" loading={loading.withdraw}
|
||||
onClick={() => this.handleOperate("batchwithdraw")}>{getLabel(111, "批量撤回")}</Button>,
|
||||
<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
||||
onChange={v => this.setState({ query: { ...query, name: v } })}/>
|
||||
] : [<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
||||
onChange={v => this.setState({ query: { ...query, name: v } })}/>],
|
||||
children: <PushRecord isQuery={isQuery} query={query} onChange={this.handleOperate}/>
|
||||
},
|
||||
{
|
||||
title: getLabel(111, "数据推送"), key: "datapush", showDropIcon: false, dropMenuDatas: [],
|
||||
buttons: showOperateBtn ? [
|
||||
<Button type="primary" onClick={() => this.handleOperate("create")}>{getLabel(111, "新建")}</Button>,
|
||||
<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
||||
onChange={v => this.setState({ query: { ...query, name: v } })}/>
|
||||
] : [<WeaInputSearch style={{ top: -3 }} value={query.name} onSearch={this.handleAdvanceSearch}
|
||||
onChange={v => this.setState({ query: { ...query, name: v } })}/>],
|
||||
children: <DatapushList isQuery={isQuery} query={query} onChange={this.handleOperate}/>
|
||||
}
|
||||
];
|
||||
return (
|
||||
<WeaReqTop
|
||||
title={getLabel(111, "数据推送")} icon={<i className="icon-coms-fa"/>} selectedKey={selectedKey}
|
||||
iconBgcolor="#F14A2D" tabDatas={tabs}
|
||||
className={cs("datapush_wrapper", { "reqZindex0": pushDetailDialog.visible })}
|
||||
buttonSpace={10} buttons={_.find(tabs, o => selectedKey === o.key).buttons}
|
||||
onChange={selectedKey => this.setState({
|
||||
selectedKey, pushDetailDialog: { ...pushDetailDialog, visible: false },
|
||||
DPDialog: { ...DPDialog, visible: false }
|
||||
})}
|
||||
showDropIcon={_.find(tabs, o => selectedKey === o.key).showDropIcon} onDropMenuClick={this.handleOperate}
|
||||
dropMenuDatas={_.find(tabs, o => selectedKey === o.key).dropMenuDatas}
|
||||
>
|
||||
{_.find(tabs, o => selectedKey === o.key).children}
|
||||
{/*数据推送框*/}
|
||||
<DatapushDialog {...DPDialog} onClose={() => this.setState({ DPDialog: { ...DPDialog, visible: false } })}
|
||||
onSearch={this.handleAdvanceSearch}/>
|
||||
{/*推送记录查看详情*/}
|
||||
<PushDetailDialog {...pushDetailDialog} onClose={() => this.setState({
|
||||
pushDetailDialog: { ...pushDetailDialog, visible: false }
|
||||
})}/>
|
||||
<CreatePushRecordDialog visible={visible} onSuccess={this.handleAdvanceSearch}
|
||||
onCancel={(callback) => this.setState({ visible: false }, () => callback && callback())}/>
|
||||
</WeaReqTop>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Index;
|
||||
|
|
@ -0,0 +1,194 @@
|
|||
.datapush_wrapper {
|
||||
.wea-new-top-req-title > div:last-child {
|
||||
right: 16px !important;
|
||||
}
|
||||
|
||||
.wea-new-top-req-content {
|
||||
padding: 8px 16px 0 16px;
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.ant-spin-nested-loading, .ant-spin-container {
|
||||
height: 100% !important;
|
||||
}
|
||||
|
||||
.pushdata_create_dialog {
|
||||
.scroller {
|
||||
background: #f6f6f6;
|
||||
}
|
||||
|
||||
.pushdata_detail {
|
||||
.opts {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-slide-modal-title {
|
||||
border-bottom: 1px solid #ebebeb;
|
||||
}
|
||||
|
||||
.titleDialog {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 46px 0 16px;
|
||||
|
||||
.titleCol {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.titleLeftBox {
|
||||
.titleIcon {
|
||||
color: #fff;
|
||||
margin: 0;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
font-size: 22px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #F14A2D;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
padding-left: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
.titleRightBox {
|
||||
justify-content: flex-end;
|
||||
|
||||
button:last-child {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pushDetailDialog {
|
||||
.wea-slide-modal-content {
|
||||
height: 100%;
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
|
||||
.pushDetail_content {
|
||||
height: 100%;
|
||||
background: #F6F6F6;
|
||||
padding: 8px 16px;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-slide-modal-title {
|
||||
background: #FFF;
|
||||
text-align: left;
|
||||
height: 44px;
|
||||
}
|
||||
|
||||
.wea-new-top {
|
||||
background: #FFF;
|
||||
|
||||
.ant-col-10 {
|
||||
padding-right: 50px !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.reqZindex0 {
|
||||
.wea-new-top-req {
|
||||
z-index: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.custom_item_treeselect {
|
||||
.weapp-excel-code-action-list-variable-tip {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.no-child-item {
|
||||
.ant-select-tree-switcher {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.ant-select-tree-node-content-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.weapp-excel-code-action-list-variable {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.weapp-excel-code-action-list-variable-name {
|
||||
height: 20px;
|
||||
line-height: 18px;
|
||||
-webkit-flex: 1 1;
|
||||
flex: 1 1;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.danger {
|
||||
color: rgb(255, 102, 106) !important;
|
||||
border: 1px solid rgb(255, 193, 195) !important;
|
||||
background-color: rgb(255, 223, 224) !important;
|
||||
}
|
||||
|
||||
.weapp-excel-code-action-list-variable-tip {
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
line-height: 18px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
color: rgb(255, 205, 80);
|
||||
border: 1px solid rgb(255, 222, 138);
|
||||
background-color: rgb(255, 245, 219);
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.record-dialog {
|
||||
.wea-dialog-body {
|
||||
background: #f6f6f6;
|
||||
padding: 8px 16px;
|
||||
|
||||
.record-form {
|
||||
background: #FFF;
|
||||
margin-bottom: 8px;
|
||||
|
||||
.wea-search-group, .wea-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.rangePickerBox {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-table {
|
||||
background: #FFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -9,9 +9,10 @@ import { inject, observer } from "mobx-react";
|
|||
import { WeaDialog, WeaLocaleProvider, WeaTools } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../../util";
|
||||
import { getTaxAgentSelectListAsAdmin } from "../../../../apis/taxAgent";
|
||||
import { saveDeclare } from "../../../../apis/declare";
|
||||
import { declareConditions } from "./condition";
|
||||
import { postFetch } from "../../../../util/request";
|
||||
import * as API from "../../../../apis/ruleconfig";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
|
@ -31,9 +32,11 @@ class Index extends Component {
|
|||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.declareStore.initDeclareForm();
|
||||
}
|
||||
|
||||
getTaxAgentSelectListAsAdmin = (props) => {
|
||||
getTaxAgentSelectListAsAdmin = async (props) => {
|
||||
const { data: sysinfo } = await API.sysinfo();
|
||||
const { declareStore: { declareForm } } = props;
|
||||
getTaxAgentSelectListAsAdmin().then(({ status, data }) => {
|
||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" })
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
conditions: _.map(declareConditions, item => ({
|
||||
|
|
@ -41,11 +44,17 @@ class Index extends Component {
|
|||
items: _.map(item.items, o => {
|
||||
if (getKey(o) === "taxAgentId") {
|
||||
return {
|
||||
...o, options: _.map(data, g => ({ key: g.id, showname: g.content }))
|
||||
...o, label: getLabel(o.lanId, o.label),
|
||||
options: _.map(data, g => ({ key: String(g.id), showname: g.name }))
|
||||
// helpfulTitle: getLabel(563420, "提示:可选择单个个税扣缴义务人进行申报,若不选择,则批量对管理下的所有个税扣缴义务人进行申报;")
|
||||
};
|
||||
} else if (getKey(o) === "salaryMonthStr") {
|
||||
return {
|
||||
...o,
|
||||
label: sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月")
|
||||
};
|
||||
}
|
||||
return { ...o };
|
||||
return { ...o, label: getLabel(o.lanId, o.label) };
|
||||
})
|
||||
}))
|
||||
}, () => declareForm.initFormFields(this.state.conditions));
|
||||
|
|
@ -58,7 +67,9 @@ class Index extends Component {
|
|||
if (f.isValid) {
|
||||
const payload = declareForm.getFormParams();
|
||||
this.setState({ loading: true });
|
||||
saveDeclare({ ...payload }).then(({ status, errormsg }) => {
|
||||
saveDeclare({
|
||||
...payload, taxCycle: `${payload.salaryMonthStr}-01`, salaryDate: `${payload.salaryMonthStr}-01`
|
||||
}).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功"));
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 => {
|
||||
|
|
@ -109,7 +110,7 @@ class Index extends Component {
|
|||
{
|
||||
dataIndex: "operate", title: getLabel(30585, "操作"),
|
||||
width: 170, render: (__, record) => {
|
||||
const { id } = record;
|
||||
const { id, opts = [] } = record;
|
||||
return <React.Fragment>
|
||||
<a
|
||||
href={`${window.ecologyContentPath || ""}/spa/hrmSalary/static/index.html#/main/hrmSalary/generateDeclarationDetail?id=${id}`}
|
||||
|
|
@ -122,7 +123,7 @@ class Index extends Component {
|
|||
onClick={() => this.props.onFilterLog("log", record.id)}>{getLabel(545781, "操作日志")}</a>
|
||||
}
|
||||
{
|
||||
showWithDrawBtn &&
|
||||
showWithDrawBtn && opts.includes("admin") &&
|
||||
<a
|
||||
href="javascript:void(0);" style={{ marginLeft: 10 }}
|
||||
onClick={() => {
|
||||
|
|
|
|||
|
|
@ -37,7 +37,8 @@ class Calculate extends Component {
|
|||
}
|
||||
|
||||
renderCalculateOpts = () => {
|
||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
||||
const { queryParams, isRefresh } = this.state;
|
||||
let calculateOpts = [
|
||||
<Button type="primary" onClick={() => this.setState({
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import { Spin } from "antd";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { MonthRangePicker } from "../reportView/components/statisticalMicroSettingsSlide";
|
||||
import { optionAddWhole } from "../../util/options";
|
||||
import { postFetch } from "../../util/request";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
|
||||
|
|
@ -24,11 +25,8 @@ class Index extends Component {
|
|||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
loading: false,
|
||||
taxAgentId: "",
|
||||
countResult: {},
|
||||
loading: false, taxAgentId: "", countResult: {}, dataSource: [], taxAgentOption: [],
|
||||
salaryMonth: [moment().startOf("year").format("YYYY-MM"), moment().format("YYYY-MM")],
|
||||
dataSource: [],
|
||||
pageInfo: {
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
|
|
@ -38,8 +36,10 @@ class Index extends Component {
|
|||
}
|
||||
|
||||
componentWillMount() {
|
||||
const { taxAgentStore: { fetchTaxAgentOption } } = this.props;
|
||||
fetchTaxAgentOption();
|
||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
||||
.then(({ status, data }) => {
|
||||
if (status) this.setState({ taxAgentOption: _.map(data, o => ({ key: String(o.id), showname: o.name })) });
|
||||
});
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
|
|
@ -76,7 +76,6 @@ class Index extends Component {
|
|||
dataSource, columns, showSum, pageInfo, countResult
|
||||
}), "*");
|
||||
};
|
||||
|
||||
statisticsEmployeeDetailList = () => {
|
||||
const { params: { employeeId }, payrollFilesStore: { statisticsEmployeeDetailList } } = this.props;
|
||||
const { taxAgentId, salaryMonth, pageInfo } = this.state;
|
||||
|
|
@ -104,7 +103,6 @@ class Index extends Component {
|
|||
}
|
||||
}).catch(() => this.setState({ loading: false }));
|
||||
};
|
||||
|
||||
getColumns = () => {
|
||||
const { dataSource, pageInfo, countResult } = this.state;
|
||||
const { payrollFilesStore: { employeeTableStore } } = this.props;
|
||||
|
|
@ -121,13 +119,10 @@ class Index extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
location,
|
||||
taxAgentStore: { showOperateBtn, taxAgentOption },
|
||||
payrollFilesStore: { employeeTableStore }
|
||||
} = this.props;
|
||||
const { salaryMonth, taxAgentId, loading } = this.state;
|
||||
const { location, taxAgentStore: { PageAndOptAuth }, payrollFilesStore: { employeeTableStore } } = this.props;
|
||||
const { salaryMonth, taxAgentId, loading, taxAgentOption } = this.state;
|
||||
const { query: { dept, name } } = location;
|
||||
const showOperateBtn = PageAndOptAuth.opts.includes("admin");
|
||||
const btns = [
|
||||
<MonthRangePicker viewAttr={2} dateRange={salaryMonth}
|
||||
onChange={v => this.setState({ salaryMonth: v }, () => this.statisticsEmployeeDetailList())}/>,
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ import SlideModalTitle from "../../../components/slideModalTitle";
|
|||
import { getSalaryFieldForm, saveSalaryField } from "../../../apis/fieldManage";
|
||||
import { commonEnumList } from "../../../apis/payrollFiles";
|
||||
import { dataTypeOptions, patternOptions, roundingModeOptions } from "../../salaryItem/options";
|
||||
import { postFetch } from "../../../util/request";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
|
|
@ -44,15 +45,17 @@ class FieldSlide extends Component {
|
|||
pattern: "2",
|
||||
sortedIndex: "",
|
||||
width: "",
|
||||
description: ""
|
||||
description: "",
|
||||
taxAgentOption: []
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { taxAgentStore } = this.props;
|
||||
this.commonEnumList();
|
||||
const { fetchTaxAgentOption } = taxAgentStore;
|
||||
fetchTaxAgentOption();
|
||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "ADMIN_DATA" })
|
||||
.then(({ status, data }) => {
|
||||
if (status) this.setState({ taxAgentOption: _.map(data, o => ({ key: String(o.id), showname: o.name })) });
|
||||
});
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
|
|
@ -203,13 +206,8 @@ class FieldSlide extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const {
|
||||
title,
|
||||
visible,
|
||||
record: { id: editId },
|
||||
taxAgentStore: { taxAgentOption, showSalaryItemBtn, showOperateBtn },
|
||||
onCancel
|
||||
} = this.props;
|
||||
const { title, visible, record: { id: editId }, onCancel, taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||
const admin = PageAndOptAuth.opts.includes("admin");
|
||||
const {
|
||||
loading,
|
||||
name,
|
||||
|
|
@ -224,7 +222,8 @@ class FieldSlide extends Component {
|
|||
pattern,
|
||||
sortedIndex,
|
||||
width,
|
||||
description
|
||||
description,
|
||||
taxAgentOption
|
||||
} = this.state;
|
||||
return (
|
||||
<WeaSlideModal
|
||||
|
|
@ -241,7 +240,7 @@ class FieldSlide extends Component {
|
|||
tabs={[]}
|
||||
loading={loading}
|
||||
showOperateBtn={true}
|
||||
editable={(showSalaryItemBtn || showOperateBtn)}
|
||||
editable={admin}
|
||||
onSave={this.saveFieldInfo}
|
||||
/>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -57,7 +57,8 @@ class FieldTable extends Component {
|
|||
getColumns = () => {
|
||||
const { columns } = this.state;
|
||||
const { taxAgentStore, onEditLedger, onDeleteLedger } = this.props;
|
||||
const { showSalaryItemBtn, showOperateBtn } = taxAgentStore;
|
||||
const { PageAndOptAuth } = taxAgentStore;
|
||||
const admin = PageAndOptAuth.opts.includes("admin");
|
||||
return _.map([...columns, {
|
||||
dataIndex: "operate",
|
||||
display: true,
|
||||
|
|
@ -72,9 +73,9 @@ class FieldTable extends Component {
|
|||
item.render = (text, record) => {
|
||||
return <div className="optWrapper">
|
||||
<a href="javascript:void(0);" className="mr10"
|
||||
onClick={() => onEditLedger(record)}>{(showSalaryItemBtn || showOperateBtn) ? "编辑" : "查看"}</a>
|
||||
onClick={() => onEditLedger(record)}>{admin ? "编辑" : "查看"}</a>
|
||||
{
|
||||
record.canDelete && (showSalaryItemBtn || showOperateBtn) &&
|
||||
record.canDelete && admin &&
|
||||
<a href="javascript:void(0);" className="mr10" onClick={() => onDeleteLedger(record)}>删除</a>
|
||||
}
|
||||
<Dropdown
|
||||
|
|
|
|||
|
|
@ -85,7 +85,8 @@ class FieldManagement extends Component {
|
|||
render() {
|
||||
const { searchVal, doSearch, slideparams, logDialogVisible, filterConditions } = this.state;
|
||||
const { taxAgentStore } = this.props;
|
||||
const { showSalaryItemBtn, showOperateBtn } = taxAgentStore;
|
||||
const { PageAndOptAuth } = taxAgentStore;
|
||||
const admin = PageAndOptAuth.opts.includes("admin");
|
||||
const btns = [
|
||||
<Button
|
||||
type="primary"
|
||||
|
|
@ -100,7 +101,7 @@ class FieldManagement extends Component {
|
|||
return (
|
||||
<WeaTop
|
||||
title="字段管理" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D" className="fieldManageWrapper"
|
||||
buttons={(showSalaryItemBtn || showOperateBtn) ? btns : btns.slice(-1)}
|
||||
buttons={admin ? btns : btns.slice(-1)}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,11 +6,8 @@
|
|||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaTable } from "ecCom";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import LedgerBackCalcEditSlide from "./ledgerBackCalcEditSlide";
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class LedgerBackCalculatedSalaryItemTable extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -56,7 +53,8 @@ class LedgerBackCalculatedSalaryItemTable extends Component {
|
|||
|
||||
render() {
|
||||
const { backCalcEditSlide } = this.state;
|
||||
const { taxAgentStore: { showOperateBtn }, dataSource, editId, saveSalarySobId, key } = this.props;
|
||||
const { record, dataSource, editId, saveSalarySobId, key } = this.props;
|
||||
const showOperateBtn = editId ? record.opts.includes("admin") : true;
|
||||
const columns = [
|
||||
{
|
||||
dataIndex: "name",
|
||||
|
|
@ -78,7 +76,7 @@ class LedgerBackCalculatedSalaryItemTable extends Component {
|
|||
width: 80,
|
||||
render: (text, record, index) => {
|
||||
const { canEdit } = record;
|
||||
return (showOperateBtn && canEdit) ?
|
||||
return showOperateBtn ?
|
||||
<a href="javascript: void(0);" onClick={() => this.handleEditBackCalc(record)}>编辑</a> :
|
||||
<span></span>;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,9 +11,10 @@ import { duplicateLedger } from "../../../apis/ledger";
|
|||
import { WeaDialog } from "ecCom";
|
||||
import { Button, message } from "antd";
|
||||
import { getSearchs } from "../../../util";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import "./index.less";
|
||||
|
||||
@inject("ledgerStore", "taxAgentStore")
|
||||
@inject("ledgerStore")
|
||||
@observer
|
||||
class CopyLedgerModal extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -31,25 +32,21 @@ class CopyLedgerModal extends Component {
|
|||
if (nextProps.visible !== this.props.visible && nextProps.visible) {
|
||||
const { ledgerStore, name, taxAgentId } = nextProps;
|
||||
const { copyForm: form } = ledgerStore;
|
||||
form.updateFields({
|
||||
name: { value: name },
|
||||
taxAgentId: { value: taxAgentId.toString() }
|
||||
});
|
||||
form.updateFields({ name: { value: name }, taxAgentId: { value: taxAgentId } });
|
||||
}
|
||||
}
|
||||
|
||||
getTaxAgentSelectListAsAdmin = () => {
|
||||
const { taxAgentStore, ledgerStore } = this.props;
|
||||
const { ledgerStore } = this.props;
|
||||
const { copyForm: form } = ledgerStore;
|
||||
const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
|
||||
getTaxAgentSelectListAsAdmin().then(({ status, data }) => {
|
||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
const conditions = _.map(copyConditions, it => {
|
||||
it.items = _.map(it.items, child => {
|
||||
if (child.domkey[0] === "taxAgentId") {
|
||||
return {
|
||||
...child,
|
||||
options: _.map(data, it => ({ key: it.id, showname: it.content }))
|
||||
...child, options: _.map(data, it => ({ key: String(it.id), showname: it.name }))
|
||||
};
|
||||
} else {
|
||||
return { ...child };
|
||||
|
|
@ -66,7 +63,8 @@ class CopyLedgerModal extends Component {
|
|||
const { copyForm: form } = ledgerStore;
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const payload = { id, ...form.getFormParams() };
|
||||
const { taxAgentId, ...formParams } = form.getFormParams();
|
||||
const payload = { id, ...formParams, taxAgentIds: taxAgentId.split(",") };
|
||||
this.setState({ loading: true });
|
||||
duplicateLedger(payload).then(({ status, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
|
|
@ -84,7 +82,6 @@ class CopyLedgerModal extends Component {
|
|||
});
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const { onCancel, ledgerStore, ...extra } = this.props;
|
||||
const { loading } = this.state;
|
||||
|
|
|
|||
|
|
@ -41,6 +41,10 @@
|
|||
.baseSettingWrapper {
|
||||
padding: 12px 12px 12px 20px;
|
||||
|
||||
.wea-form-item-wrapper {
|
||||
display: inline-block !important;
|
||||
}
|
||||
|
||||
.baseSettingLeft {
|
||||
border: 1px solid #ebedf0;
|
||||
padding: 0 !important;
|
||||
|
|
@ -91,39 +95,14 @@
|
|||
|
||||
//调薪计薪规则弹框
|
||||
.adjustRuleModalWrapper {
|
||||
.titleTipWrapper {
|
||||
.calcRules .cust {
|
||||
line-height: 30px;
|
||||
|
||||
.child {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.title {
|
||||
margin-right: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.adjustRuleDetailWrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.adjustSalaryFlex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.wea-select, .ant-select-selection, .ant-select {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wea-select {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.ant-select-selection {
|
||||
height: 30px;
|
||||
border-radius: 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 回算薪资项目
|
||||
|
|
@ -172,6 +151,10 @@
|
|||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
.wea-ignore-node i {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.wea-sortable-grid-item {
|
||||
display: inline-block;
|
||||
border: none;
|
||||
|
|
@ -215,6 +198,10 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wea-new-table.wea-new-table-draggable table {
|
||||
table-layout: fixed
|
||||
}
|
||||
}
|
||||
|
||||
.titleWrapper {
|
||||
|
|
@ -249,7 +236,7 @@
|
|||
padding: 0;
|
||||
background: transparent;
|
||||
border: none;
|
||||
font-size: 20px!important;
|
||||
font-size: 20px !important;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,10 +61,11 @@ class LedgerAccountApprRule extends Component {
|
|||
}
|
||||
|
||||
renderForm = (form, conditions) => {
|
||||
const { saveSalarySobId, editId } = this.props;
|
||||
const { saveSalarySobId, editId, record } = this.props;
|
||||
const { approvalItemGroup } = this.state;
|
||||
const { isFormInit } = form;
|
||||
const formParams = form.getFormParams();
|
||||
const showOperateBtn = editId ? record.opts.includes("admin") : true;
|
||||
let group = [];
|
||||
isFormInit && conditions && conditions.map(c => {
|
||||
let items = [];
|
||||
|
|
@ -76,8 +77,8 @@ class LedgerAccountApprRule extends Component {
|
|||
wrapperCol={{ span: `${fields.fieldcol}` }} error={form.getError(fields)}
|
||||
tipPosition="bottom"
|
||||
>
|
||||
<WeaSwitch fieldConfig={fields} form={form} formParams={formParams}
|
||||
onChange={this.handleFormItemChange}/>
|
||||
<WeaSwitch fieldConfig={{ ...fields, viewAttr: showOperateBtn ? fields.viewAttr : 1 }} form={form}
|
||||
formParams={formParams} onChange={this.handleFormItemChange}/>
|
||||
</WeaFormItem>),
|
||||
hide: fields.hide
|
||||
});
|
||||
|
|
@ -89,6 +90,7 @@ class LedgerAccountApprRule extends Component {
|
|||
tipPosition="bottom"
|
||||
>
|
||||
<LedgerAccountSalaryItemsSet datas={approvalItemGroup} salarySobId={editId || saveSalarySobId}
|
||||
showOperateBtn={showOperateBtn}
|
||||
onAddItems={(groupId, items) => this.setState({
|
||||
approvalItemGroup: _.map(approvalItemGroup, o => ({
|
||||
...o,
|
||||
|
|
|
|||
|
|
@ -55,25 +55,28 @@ class LedgerAccountSalaryItemsSet extends Component {
|
|||
|
||||
render() {
|
||||
const { editDialog, salaryItemDialog } = this.state;
|
||||
const { datas } = this.props;
|
||||
const { datas, showOperateBtn = true } = this.props;
|
||||
return (
|
||||
<div>
|
||||
<div style={{ textAlign: "right", padding: "10px 0" }}>
|
||||
<WeaButtonIcon buttonType="add" type="primary"
|
||||
{
|
||||
showOperateBtn && <WeaButtonIcon buttonType="add" type="primary"
|
||||
onClick={() => this.setState({
|
||||
editDialog: { visible: true, title: getLabel(111, "添加分类") }
|
||||
})}/>
|
||||
|
||||
}
|
||||
</div>
|
||||
<div className={cs("salaryItemSettingWrapper", { required: _.isEmpty(datas) })}>
|
||||
<WeaSortable
|
||||
datas={datas}
|
||||
datas={_.map(datas, o => ({ ...o, filter: !showOperateBtn }))}
|
||||
onChange={list => this.props.onChange(list)}
|
||||
renderNodeItem={(item) => {
|
||||
return <div className="salaryItemWrapper">
|
||||
<div className="salaryItemHeader">
|
||||
<span className="titleWrapper">
|
||||
<span className="salaryClassTitle">{item.groupName}</span>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<span className="iconWrapper">
|
||||
<i className="icon-coms-edit" onClick={() => this.setState({
|
||||
editDialog: {
|
||||
|
|
@ -82,14 +85,17 @@ class LedgerAccountSalaryItemsSet extends Component {
|
|||
})}/>
|
||||
<i className="icon-coms-Delete" onClick={() => this.handleDeleteClick(item)}/>
|
||||
</span>
|
||||
}
|
||||
</span>
|
||||
<i className="icon-coms-Add-to" onClick={() => this.handleAddSalaryItems(item)}/>
|
||||
{
|
||||
showOperateBtn && <i className="icon-coms-Add-to" onClick={() => this.handleAddSalaryItems(item)}/>
|
||||
}
|
||||
</div>
|
||||
<div className="salaryItemContent">
|
||||
{
|
||||
!_.isEmpty(item.approvalItems) ?
|
||||
<WeaSortable
|
||||
datas={item.approvalItems}
|
||||
datas={_.map(item.approvalItems, o => ({ ...o, filter: !showOperateBtn }))}
|
||||
onChange={(items) => this.props.onChange(
|
||||
_.map(datas, child => {
|
||||
if (child.id === item.id) {
|
||||
|
|
@ -102,7 +108,10 @@ class LedgerAccountSalaryItemsSet extends Component {
|
|||
return <div className="salaryItemList">
|
||||
<div className="salaryItem" title={filed.salaryItemName}>
|
||||
<div className="salaryItemName">{filed.salaryItemName}</div>
|
||||
{
|
||||
showOperateBtn &&
|
||||
<Icon type="cross" onClick={() => this.handleDeleteClick(item, filed)}/>
|
||||
}
|
||||
</div>
|
||||
</div>;
|
||||
}}
|
||||
|
|
|
|||
|
|
@ -5,170 +5,139 @@
|
|||
* Date: 2022/12/12
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaSearchGroup, WeaSelect } from "ecCom";
|
||||
import { Button, Modal, Radio } from "antd";
|
||||
import { monthDays } from "../config";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaDialog, WeaFormItem, WeaHelpfulTip, WeaLocaleProvider, WeaSelect, WeaTools } from "ecCom";
|
||||
import FormInfo from "../../../components/FormInfo";
|
||||
import { WeaSwitch } from "comsMobx";
|
||||
import { Button } from "antd";
|
||||
import { listSalarySobItem } from "../../../apis/ledger";
|
||||
import { monthDays, ruleConditions } from "../config";
|
||||
import "./index.less";
|
||||
|
||||
const { getLabel } = WeaLocaleProvider;
|
||||
const getKey = WeaTools.getKey;
|
||||
|
||||
@inject("ledgerStore")
|
||||
@observer
|
||||
class LedgerAdjustRuleAddModal extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
beforeAdjustmentType: 2,
|
||||
afterAdjustmentType: 1,
|
||||
salaryItemId: "",
|
||||
salaryItemName: "",
|
||||
dayOfMonth: "1",
|
||||
salaryItemOptions: []
|
||||
};
|
||||
this.state = { conditions: [] };
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps, nextContext) {
|
||||
if (nextProps.visible !== this.props.visible && nextProps.salarySobId) this.listSalarySobItem(nextProps.salarySobId);
|
||||
if (nextProps.visible !== this.props.visible && nextProps.visible) this.listSalarySobItem(nextProps.salarySobId);
|
||||
if (nextProps.visible !== this.props.visible && !nextProps.visible) this.props.ledgerStore.initRuleForm();
|
||||
}
|
||||
|
||||
listSalarySobItem = (salarySobId) => {
|
||||
const { salaryRuleItemsList } = this.props;
|
||||
const payload = {
|
||||
excludeSalaryItemIds: _.map(salaryRuleItemsList, item => item.salaryItemId),
|
||||
salarySobId
|
||||
excludeSalaryItemIds: _.map(salaryRuleItemsList, item => item.salaryItemId), salarySobId
|
||||
};
|
||||
listSalarySobItem(payload).then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
salaryItemOptions: _.map(data, it => ({ key: it.salaryItemId.toString(), showname: it.salaryItemName }))
|
||||
});
|
||||
conditions: _.map(ruleConditions, item => ({
|
||||
...item, items: _.map(item.items, o => {
|
||||
o = { ...o, label: getLabel(o.lanId, o.label) };
|
||||
if (getKey(o) === "salaryItemId") {
|
||||
return {
|
||||
...o, options: _.map(data, it => ({ key: it.salaryItemId.toString(), showname: it.salaryItemName }))
|
||||
};
|
||||
} else if (getKey(o) === "dayOfMonth") {
|
||||
return { ...o, options: monthDays };
|
||||
} else if (getKey(o) === "beforeAdjustmentType" || getKey(o) === "afterAdjustmentType") {
|
||||
return {
|
||||
...o,
|
||||
options: _.map(o.options, k => ({
|
||||
...k,
|
||||
showname: !k.helpfultip ? getLabel(k.lanId, k.showname) : <span>
|
||||
<span style={{ marginRight: 4 }}>{getLabel(k.lanId, k.showname)}</span>
|
||||
<WeaHelpfulTip title={`=${getLabel(k.helpfultiplanId, k.helpfultip)}`}/>
|
||||
</span>
|
||||
}))
|
||||
};
|
||||
}
|
||||
return o;
|
||||
})
|
||||
}))
|
||||
}, () => this.props.ledgerStore.ruleForm.initFormFields(this.state.conditions));
|
||||
}
|
||||
});
|
||||
};
|
||||
handleSave = () => {
|
||||
const { salaryRuleItemsList, onSave } = this.props;
|
||||
const { salaryItemOptions, ...extraItems } = this.state;
|
||||
if (_.isEmpty(extraItems.salaryItemId)) {
|
||||
Modal.warning({
|
||||
title: "信息确认",
|
||||
content: "必要信息不完整,红色*为必填项!"
|
||||
});
|
||||
return;
|
||||
const { salaryRuleItemsList, onSave, ledgerStore: { ruleForm } } = this.props;
|
||||
ruleForm.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const { salaryItemId } = ruleForm.getFormParams(), { fieldMap } = ruleForm;
|
||||
const fields = _.map(salaryItemId.split(","), o => ({
|
||||
...ruleForm.getFormParams(),
|
||||
salaryItemId: o,
|
||||
salaryItemName: _.find(fieldMap["salaryItemId"]["options"], k => k.key === o).showname
|
||||
}));
|
||||
this.props.onCancel(onSave([...salaryRuleItemsList, ...fields]));
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
const items = { ...extraItems, salaryItemName: this.state.salaryItemName };
|
||||
const { salaryItemName, salaryItemId, ...extraFileds } = items;
|
||||
const salaryItemNameFiled = salaryItemName.split(","), salaryItemIdFiled = salaryItemId.split(",");
|
||||
const fields = _.map(salaryItemNameFiled, (item, index) => {
|
||||
return {
|
||||
...extraFileds,
|
||||
salaryItemName: item,
|
||||
salaryItemId: salaryItemIdFiled[index]
|
||||
};
|
||||
});
|
||||
this.handleReset();
|
||||
onSave([...salaryRuleItemsList, ...fields]);
|
||||
};
|
||||
handleReset = () => {
|
||||
this.setState({
|
||||
beforeAdjustmentType: 2,
|
||||
afterAdjustmentType: 1,
|
||||
salaryItemId: "",
|
||||
salaryItemName: "",
|
||||
dayOfMonth: "1",
|
||||
salaryItemOptions: []
|
||||
}, () => {
|
||||
const { onCancel } = this.props;
|
||||
onCancel();
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
render() {
|
||||
const {
|
||||
salaryItemId,
|
||||
salaryItemOptions,
|
||||
dayOfMonth,
|
||||
beforeAdjustmentType,
|
||||
afterAdjustmentType
|
||||
} = this.state;
|
||||
const { title, visible } = this.props;
|
||||
const buttons = [<Button type="primary" onClick={this.handleSave}>保存</Button>];
|
||||
const { ledgerStore: { ruleForm } } = this.props, { conditions } = this.state;
|
||||
const buttons = [<Button type="primary" onClick={this.handleSave}>{getLabel(111, "保存")}</Button>];
|
||||
const itemRender = {
|
||||
salaryItemId: (field, textAreaProps, form, formParams) => {
|
||||
return (<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}/>);
|
||||
},
|
||||
dayOfMonth: () => null,
|
||||
beforeAdjustmentType: () => null,
|
||||
afterAdjustmentType: () => null
|
||||
};
|
||||
const childrenComponents = {
|
||||
salaryItemId: () => {
|
||||
const { dayOfMonth, beforeAdjustmentType, afterAdjustmentType } = ruleForm.getFormParams();
|
||||
const coms = [], { fieldMap } = ruleForm;
|
||||
coms.push(
|
||||
<WeaFormItem label={<span>
|
||||
<span className="title">{getLabel(111, "计薪规则")}</span>
|
||||
<WeaHelpfulTip
|
||||
title={getLabel(111, "该规则适用于一个薪资核算周期内只调整一次薪资或个税扣缴义务人的情况,其他情况默认按照分段计薪规则核算")}/>
|
||||
</span>} labelCol={{ span: 6 }} wrapperCol={{ span: 18 }}>
|
||||
<div className="cust">
|
||||
<div className="child">
|
||||
<div className="lbl">{fieldMap["dayOfMonth"].label}</div>
|
||||
<WeaSelect value={dayOfMonth} options={monthDays} style={{ width: 100 }}
|
||||
onChange={v => ruleForm.updateFields({ dayOfMonth: { value: v } })}/>
|
||||
<div className="rbl">{getLabel(111, "(含)之前")}</div>
|
||||
</div>
|
||||
<div className="child">
|
||||
<div className="lbl">{fieldMap["beforeAdjustmentType"].label}</div>
|
||||
<WeaSelect value={beforeAdjustmentType} detailtype={fieldMap["beforeAdjustmentType"]["detailtype"]}
|
||||
options={fieldMap["beforeAdjustmentType"]["options"]} style={{ flex: 1 }}
|
||||
onChange={v => ruleForm.updateFields({ beforeAdjustmentType: { value: v } })}/>
|
||||
</div>
|
||||
<div className="child">
|
||||
<div className="lbl">{getLabel(111, "否则:调薪生效日期在10号之后")}</div>
|
||||
</div>
|
||||
<div className="child">
|
||||
<div className="lbl">{fieldMap["afterAdjustmentType"].label}</div>
|
||||
<WeaSelect value={afterAdjustmentType} detailtype={fieldMap["afterAdjustmentType"]["detailtype"]}
|
||||
options={fieldMap["afterAdjustmentType"]["options"]} style={{ flex: 1 }}
|
||||
onChange={v => ruleForm.updateFields({ afterAdjustmentType: { value: v } })}/>
|
||||
</div>
|
||||
</div>
|
||||
</WeaFormItem>
|
||||
);
|
||||
return [{ com: <div className="calcRules">{coms}</div>, col: 1 }];
|
||||
}
|
||||
};
|
||||
return (
|
||||
<WeaDialog
|
||||
initLoadCss
|
||||
className="adjustRuleModalWrapper"
|
||||
title={title}
|
||||
visible={visible}
|
||||
style={{ width: 750 }}
|
||||
buttons={buttons}
|
||||
onCancel={this.handleReset}
|
||||
>
|
||||
<WeaSearchGroup col={1} needTigger title="" showGroup center>
|
||||
<WeaFormItem label="薪资项目" labelCol={{ span: 4 }} wrapperCol={{ span: 20 }}
|
||||
style={{ tableLayout: "fixed" }}>
|
||||
<WeaSelect
|
||||
multiple
|
||||
viewAttr={3}
|
||||
style={{ width: "350px" }}
|
||||
options={salaryItemOptions}
|
||||
value={salaryItemId}
|
||||
onChange={(salaryItemId, salaryItemName) => this.setState({ salaryItemId, salaryItemName })}
|
||||
/>
|
||||
</WeaFormItem>
|
||||
<WeaFormItem label={<AdjustTitle/>} labelCol={{ span: 4 }} wrapperCol={{ span: 20 }} colon={false}>
|
||||
<div className="adjustRuleDetailWrapper">
|
||||
<div className="adjustSalaryFlex">
|
||||
<span>如果:调薪生效日期在</span>
|
||||
<WeaSelect
|
||||
viewAttr={3}
|
||||
style={{ width: 60, margin: "0 6px" }}
|
||||
value={dayOfMonth}
|
||||
options={monthDays}
|
||||
onChange={(dayOfMonth) => this.setState({ dayOfMonth })}
|
||||
/>
|
||||
<span>(含)之前</span>
|
||||
</div>
|
||||
<div className="adjustSalaryFlex">
|
||||
<span>计薪规则为:</span>
|
||||
<Radio.Group onChange={(e) => this.setState({ beforeAdjustmentType: e.target.value })}
|
||||
value={beforeAdjustmentType}>
|
||||
<Radio value={2}>取调整后薪资</Radio>
|
||||
<Radio value={4}>分段计薪<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||
placement="topLeft"
|
||||
/></Radio>
|
||||
<Radio value={3}>取平均<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="=(调整前薪资+调整后薪资)/2"
|
||||
placement="topLeft"
|
||||
/>
|
||||
</Radio>
|
||||
</Radio.Group>
|
||||
</div>
|
||||
<div style={{ marginBottom: 10 }}>否则:调薪生效日期在{dayOfMonth}号之后</div>
|
||||
<div className="adjustSalaryFlex">
|
||||
<span>计薪规则为:</span>
|
||||
<Radio.Group onChange={(e) => this.setState({ afterAdjustmentType: e.target.value })}
|
||||
value={afterAdjustmentType}>
|
||||
<Radio value={1}>取调整前薪资</Radio>
|
||||
<Radio value={4}>分段计薪<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="=调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||
placement="topLeft"
|
||||
/></Radio>
|
||||
<Radio value={3}>取平均<WeaHelpfulTip
|
||||
style={{ marginLeft: "10px" }}
|
||||
width={200}
|
||||
title="=(调整前薪资+调整后薪资)/2"
|
||||
placement="topLeft"
|
||||
/>
|
||||
</Radio>
|
||||
</Radio.Group>
|
||||
</div>
|
||||
</div>
|
||||
</WeaFormItem>
|
||||
</WeaSearchGroup>
|
||||
<WeaDialog {...this.props} initLoadCss style={{ width: 750, height: 236 }} buttons={buttons}
|
||||
className="adjustRuleModalWrapper">
|
||||
<FormInfo className="form-dialog-layout" center={false} itemRender={itemRender}
|
||||
childrenComponents={childrenComponents} form={ruleForm} formFields={conditions}/>
|
||||
</WeaDialog>
|
||||
);
|
||||
}
|
||||
|
|
@ -176,14 +145,3 @@ class LedgerAdjustRuleAddModal extends Component {
|
|||
|
||||
export default LedgerAdjustRuleAddModal;
|
||||
|
||||
const AdjustTitle = () => {
|
||||
return <div className="titleTipWrapper">
|
||||
<span className="title">计薪规则</span>
|
||||
<WeaHelpfulTip
|
||||
width={200}
|
||||
title="该规则适用于一个薪资核算周期内只调整一次薪资或个税扣缴义务人的情况,其他情况默认按照分段计薪规则核算"
|
||||
placement="topLeft"
|
||||
/>
|
||||
<span className="title">:</span>
|
||||
</div>;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
* Date: 2022/12/12
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaButtonIcon, WeaInputSearch, WeaTab } from "ecCom";
|
||||
import PersonalScopeTable from "../../../components/PersonalScopeTable";
|
||||
|
|
@ -37,8 +36,6 @@ const APISaveFox = {
|
|||
edit: editLedgerPersonRange
|
||||
};
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class LedgerAssociatedPersonnel extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -224,7 +221,8 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
externalPersonModalVisible,
|
||||
loading, extEmpsWitch
|
||||
} = this.state;
|
||||
const { taxAgentStore: { showOperateBtn }, editId, saveSalarySobId } = this.props;
|
||||
const { record, editId, saveSalarySobId } = this.props;
|
||||
const admin = editId ? record.opts.includes("admin") : true;
|
||||
const topTab = [
|
||||
{
|
||||
title: "关联人员范围",
|
||||
|
|
@ -239,7 +237,7 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
viewcondition: "externalList"
|
||||
}
|
||||
];
|
||||
const btns = showOperateBtn ? [
|
||||
const btns = admin ? [
|
||||
<Button
|
||||
className="icon-coms-leading-in-btn"
|
||||
type="primary"
|
||||
|
|
@ -280,7 +278,7 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
datas={(extEmpsWitch === "0" || !extEmpsWitch) ? _.dropRight(topTab) : topTab}
|
||||
keyParam="viewcondition" //主键
|
||||
selectedKey={selectedKey}
|
||||
buttons={showOperateBtn && selectedKey === "listInclude" ? btns : btns.slice(1)}
|
||||
buttons={admin && selectedKey === "listInclude" ? btns : btns.slice(1)}
|
||||
onChange={selectedKey => this.setState({ selectedKey })}
|
||||
/>
|
||||
<PersonalScopeTable
|
||||
|
|
@ -289,7 +287,7 @@ class LedgerAssociatedPersonnel extends Component {
|
|||
APIFox={APIFox}
|
||||
tabActive={selectedKey}
|
||||
searchValue={searchValue}
|
||||
showOperateBtn={showOperateBtn}
|
||||
showOperateBtn={admin}
|
||||
onChangeSelectKey={rowKeys => this.setState({ rowKeys })}
|
||||
onEditScope={this.handleAddPersonal}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -67,14 +67,8 @@ class LedgerBackCalculatedSalaryItem extends Component {
|
|||
_.map(backCalcItems, item => {
|
||||
const { key, label, helpContent, dataSource } = item;
|
||||
return (
|
||||
<WeaSearchGroup
|
||||
key={key}
|
||||
needTigger
|
||||
title={
|
||||
<TitleComp title={label} helpContent={helpContent}/>
|
||||
}
|
||||
showGroup
|
||||
>
|
||||
<WeaSearchGroup key={key} needTigger showGroup
|
||||
title={<TitleComp title={label} helpContent={helpContent}/>}>
|
||||
<LedgerBackCalculatedSalaryItemTable
|
||||
{...this.props} dataSource={dataSource}
|
||||
key={key} onRefresh={this.getAggregate}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
import React, { Component } from "react";
|
||||
import { WeaCheckbox, WeaFormItem, WeaHelpfulTip, WeaInput, WeaSelect, WeaTextarea } from "ecCom";
|
||||
import { Col, Row } from "antd";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { baseSettingFormItem } from "../config";
|
||||
import { getLedgerBasicForm } from "../../../apis/ledger";
|
||||
import {
|
||||
|
|
@ -19,11 +18,10 @@ import {
|
|||
prefixAddZero
|
||||
} from "../../../util/date";
|
||||
import { commonEnumList } from "../../../apis/ruleconfig";
|
||||
import { postFetch } from "../../../util/request";
|
||||
import moment from "moment";
|
||||
import "./index.less";
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class LedgerBaseSetting extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -90,7 +88,11 @@ class LedgerBaseSetting extends Component {
|
|||
const { settingBaseInfo } = this.state;
|
||||
let tmpV = {};
|
||||
_.map(Object.keys(settingBaseInfo), key => {
|
||||
if (key === "taxAgentId") {
|
||||
tmpV[key] = _.map(basicForm["taxAgentIds"], it => it.toString()).join(",");
|
||||
} else {
|
||||
tmpV[key] = !_.isNil(basicForm[key]) ? basicForm[key].toString() : "";
|
||||
}
|
||||
});
|
||||
this.setState({
|
||||
settingBaseInfo: {
|
||||
|
|
@ -104,16 +106,14 @@ class LedgerBaseSetting extends Component {
|
|||
});
|
||||
};
|
||||
getTaxAgentSelectListAsAdmin = () => {
|
||||
const { taxAgentStore } = this.props;
|
||||
const { getTaxAgentSelectListAsAdmin } = taxAgentStore;
|
||||
getTaxAgentSelectListAsAdmin().then(({ status, data }) => {
|
||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
baseForm: _.map(baseSettingFormItem, it => {
|
||||
if (it.key === "taxAgentId") {
|
||||
return {
|
||||
...it,
|
||||
options: _.map(data, it => ({ key: it.id, showname: it.content }))
|
||||
...it, options: _.map(data, o => ({ key: String(o.id), showname: o.name }))
|
||||
};
|
||||
}
|
||||
return { ...it };
|
||||
|
|
@ -157,18 +157,19 @@ class LedgerBaseSetting extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { editId, taxAgentStore: { taxAgentOption } } = this.props;
|
||||
const { editId, record, PageAndOptAuth } = this.props;
|
||||
const { baseForm, settingBaseInfo } = this.state;
|
||||
const { canEdit, taxAgentId } = settingBaseInfo;
|
||||
let taxAgentIdDisabled = false, taxableItemsDisabled = false;
|
||||
const admin = editId ? record.opts.includes("admin") : true;
|
||||
return (
|
||||
<div className="baseSettingWrapper">
|
||||
<Row gutter={20}>
|
||||
<Col span={18} className="baseSettingLeft">
|
||||
{
|
||||
_.map(baseForm, item => {
|
||||
const { key, label, type, options = [], children = [] } = item;
|
||||
taxAgentIdDisabled = key === "taxAgentId" && editId && taxAgentId;
|
||||
const { key, label, type, options = [], children = [], multiple = false } = item;
|
||||
taxAgentIdDisabled = key === "taxAgentId" && editId && !PageAndOptAuth.isChief;
|
||||
taxableItemsDisabled = key === "taxableItems" && editId;
|
||||
return <WeaFormItem
|
||||
key={key} label={label}
|
||||
|
|
@ -176,10 +177,10 @@ class LedgerBaseSetting extends Component {
|
|||
>
|
||||
{
|
||||
type === "INPUT" ?
|
||||
<WeaInput value={settingBaseInfo[key]} viewAttr={3} disabled={canEdit !== "true"}
|
||||
<WeaInput value={settingBaseInfo[key]} viewAttr={3} disabled={!admin}
|
||||
onChange={(v) => this.handleChangeField(key, v)}/> :
|
||||
type === "TEXTAREA" ?
|
||||
<WeaTextarea value={settingBaseInfo[key]} disabled={canEdit !== "true"}
|
||||
<WeaTextarea value={settingBaseInfo[key]} disabled={!admin}
|
||||
onChange={(v) => this.handleChangeField(key, v)}/> :
|
||||
type === "CHECKBOX" ?
|
||||
<React.Fragment>
|
||||
|
|
@ -189,12 +190,11 @@ class LedgerBaseSetting extends Component {
|
|||
</React.Fragment> :
|
||||
type === "SELECT" ?
|
||||
<WeaSelect value={settingBaseInfo[key]}
|
||||
options={((canEdit !== "true" || taxAgentIdDisabled || taxableItemsDisabled) && key === "taxAgentId") ? taxAgentOption : options}
|
||||
viewAttr={3}
|
||||
disabled={canEdit !== "true" || taxAgentIdDisabled || taxableItemsDisabled}
|
||||
options={options} viewAttr={taxAgentIdDisabled ? 1 : 3} multiple={multiple}
|
||||
disabled={!admin || taxableItemsDisabled}
|
||||
onChange={(v) => this.handleChangeField(key, v)}/> :
|
||||
type === "CUSTOM" ?
|
||||
<CustomSelect list={children} baseInfo={settingBaseInfo} inputStr={key}
|
||||
<CustomSelect list={children} baseInfo={settingBaseInfo} inputStr={key} admin={admin}
|
||||
onChange={(key, v) => this.handleChangeField(key, v)}/> : null
|
||||
}
|
||||
</WeaFormItem>;
|
||||
|
|
@ -211,8 +211,7 @@ class LedgerBaseSetting extends Component {
|
|||
export default LedgerBaseSetting;
|
||||
|
||||
const CustomSelect = (props) => {
|
||||
const { list, baseInfo, onChange, inputStr } = props;
|
||||
const { canEdit } = baseInfo;
|
||||
const { list, baseInfo, onChange, inputStr, admin } = props;
|
||||
const selectInfo = buildEditBasicInfo(baseInfo);
|
||||
return <Row gutter={10} key={inputStr}>
|
||||
{
|
||||
|
|
@ -220,8 +219,7 @@ const CustomSelect = (props) => {
|
|||
const { key, options = [] } = item;
|
||||
return <Col span={6}>
|
||||
<WeaSelect value={baseInfo[key]} options={options} viewAttr={3}
|
||||
disabled={canEdit !== "true"}
|
||||
onChange={(v) => onChange(key, v)}/>
|
||||
disabled={!admin} onChange={(v) => onChange(key, v)}/>
|
||||
</Col>;
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,14 +5,11 @@
|
|||
* Date: 2022/12/12
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaButtonIcon, WeaTab, WeaTable } from "ecCom";
|
||||
import { Modal } from "antd";
|
||||
import LedgerAdjustRuleAddModal from "./ledgerAdjustRuleAddModal";
|
||||
import { listAdjustmentRule } from "../../../apis/ledger";
|
||||
|
||||
@inject("taxAgentStore")
|
||||
@observer
|
||||
class LedgerSalaryAdjustmentRules extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -92,9 +89,10 @@ class LedgerSalaryAdjustmentRules extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { taxAgentStore: { showOperateBtn }, editId, onSaveParams } = this.props;
|
||||
const { record, editId, onSaveParams } = this.props;
|
||||
const { adjustRuleAddModal } = this.state;
|
||||
const { dataSource } = this.state;
|
||||
const showOperateBtn = editId ? record.opts.includes("admin") : true;
|
||||
const btns = showOperateBtn ? [
|
||||
<WeaButtonIcon buttonType="add" type="primary" onClick={this.handleAddAdjustRule}/>
|
||||
] : [];
|
||||
|
|
|
|||
|
|
@ -46,11 +46,12 @@ class LedgerSalaryItemBaseInfo extends Component {
|
|||
};
|
||||
handleDeleteEmplist = (item) => {
|
||||
const { dataSource, onChangeSortableList } = this.props;
|
||||
onChangeSortableList(_.xorWith(dataSource, [item], _.isEqual));
|
||||
onChangeSortableList(_.filter(dataSource, o => o.id !== item.id));
|
||||
};
|
||||
|
||||
render() {
|
||||
const { dataSource, onChangeSortableList, onPreview } = this.props;
|
||||
const { dataSource, onChangeSortableList, onPreview, editId, record } = this.props;
|
||||
const admin = editId ? record.opts.includes("admin") : true;
|
||||
const { empFieldListOptions } = this.state;
|
||||
const options = _.map(empFieldListOptions, o => ({
|
||||
...o, disabled: _.map(dataSource, g => g.fieldId).includes(o.key)
|
||||
|
|
@ -60,7 +61,7 @@ class LedgerSalaryItemBaseInfo extends Component {
|
|||
<WeaSearchGroup needTigger={false} showGroup title={<TitleComp onPreview={onPreview}/>}>
|
||||
<div className="userInfoWrapper">
|
||||
<WeaSortable
|
||||
datas={dataSource}
|
||||
datas={_.map(dataSource, o => ({ ...o, filter: !admin }))}
|
||||
draggableType="icon"
|
||||
onChange={onChangeSortableList}
|
||||
renderNodeItem={(item) => {
|
||||
|
|
@ -80,6 +81,7 @@ class LedgerSalaryItemBaseInfo extends Component {
|
|||
className="wea-sortable-grid-item"
|
||||
/>
|
||||
<WeaSelect
|
||||
disabled={!admin}
|
||||
showSearch
|
||||
options={options}
|
||||
style={{ width: 150 }}
|
||||
|
|
|
|||
|
|
@ -140,9 +140,9 @@ class LedgerSalaryItemNormal extends Component {
|
|||
onChangeSelectedRowKeys,
|
||||
onAddSalaryItems,
|
||||
incomeCategoriesTitleName,
|
||||
taxAgentStore
|
||||
record
|
||||
} = this.props;
|
||||
const { showOperateBtn } = taxAgentStore;
|
||||
const showOperateBtn = editId ? record.opts.includes("admin") : true;
|
||||
const { categoryModal, addCategoryItemsVisible, moveModalPayload, salaryItemKeywords } = this.state;
|
||||
const newDateSource = _.map(dataSource, item => {
|
||||
return {
|
||||
|
|
@ -182,7 +182,8 @@ class LedgerSalaryItemNormal extends Component {
|
|||
>
|
||||
<LedgerSalaryItemTable
|
||||
tableData={items}
|
||||
dataSource={_.find(newDateSource, childItem => childItem.uuid === uuid).items}
|
||||
showOperateBtn={showOperateBtn}
|
||||
dataSource={_.find(dataSource, childItem => childItem.uuid === uuid).items}
|
||||
salarySobId={editId || saveSalarySobId}
|
||||
selectedRowKeys={field.selectedRowKeys || []}
|
||||
onDropCategoryItem={(data) => onDropCategoryItem(field, data)}
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ class LedgerSalaryItemTable extends Component {
|
|||
|
||||
render() {
|
||||
const { salaryItemPayload, editFormulModal, originRecord } = this.state;
|
||||
const { onHandleItemhide } = this.props;
|
||||
const { onHandleItemhide, showOperateBtn } = this.props;
|
||||
const {
|
||||
tableData, dataSource, onDropCategoryItem,
|
||||
onChangeSelectedRowKeys, selectedRowKeys, onMoveTo
|
||||
|
|
@ -315,16 +315,16 @@ class LedgerSalaryItemTable extends Component {
|
|||
<React.Fragment>
|
||||
<WeaTable
|
||||
rowKey={record => record.id || record.key}
|
||||
rowSelection={rowSelection}
|
||||
rowSelection={showOperateBtn ? rowSelection : null}
|
||||
dataSource={tableData}
|
||||
columns={columns}
|
||||
columns={showOperateBtn ? columns : _.filter(columns, o => (o.dataIndex !== "operate" && o.dataIndex !== "itemHide"))}
|
||||
onRow={(record, index) => ({
|
||||
index,
|
||||
moveRow: record
|
||||
})}
|
||||
pagination={false}
|
||||
onDrop={onDropCategoryItem}
|
||||
draggable={dataSource.length === tableData.length}
|
||||
draggable={dataSource.length === tableData.length && showOperateBtn}
|
||||
/>
|
||||
<LedgerSalaryItemEditSlide
|
||||
{...salaryItemPayload}
|
||||
|
|
|
|||
|
|
@ -10,12 +10,13 @@ import { Button } from "antd";
|
|||
import { WeaSwitch } from "comsMobx";
|
||||
import { WeaFormItem, WeaLocaleProvider, WeaSearchGroup, WeaTools } from "ecCom";
|
||||
import { searchConditions } from "../config";
|
||||
import { getTaxAgentSelectList } from "../../../apis/taxAgent";
|
||||
import { postFetch } from "../../../util/request";
|
||||
|
||||
const getKey = WeaTools.getKey;
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("ledgerStore") @observer
|
||||
@inject("ledgerStore")
|
||||
@observer
|
||||
class LedgerSearchComp extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
|
@ -30,16 +31,18 @@ class LedgerSearchComp extends Component {
|
|||
|
||||
getTaxAgentSelectList = () => {
|
||||
const { ledgerStore: { searchForm } } = this.props;
|
||||
getTaxAgentSelectList().then(({ status, data }) => {
|
||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
||||
.then(({ status, data }) => {
|
||||
if (status) {
|
||||
this.setState({
|
||||
conditions: _.map(searchConditions, o => {
|
||||
return {
|
||||
...o, items: _.map(o.items, j => {
|
||||
...o,
|
||||
items: _.map(o.items, j => {
|
||||
if (getKey(j) === "taxAgentId") {
|
||||
return {
|
||||
...j, options: [{ key: "", showname: getLabel(332, "全部") }, ..._.map(data, g => ({
|
||||
key: g.id, showname: g.content
|
||||
key: String(g.id), showname: g.name
|
||||
}))]
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import "./index.less";
|
|||
const { getLabel } = WeaLocaleProvider;
|
||||
const Step = WeaSteps.Step;
|
||||
|
||||
@inject("taxAgentStore", "ledgerStore")
|
||||
@inject("ledgerStore")
|
||||
@observer
|
||||
class LedgerSlide extends Component {
|
||||
constructor(props) {
|
||||
|
|
@ -67,7 +67,8 @@ class LedgerSlide extends Component {
|
|||
return false;
|
||||
}
|
||||
this.setState({ loading: true });
|
||||
saveLedgerBasic({ ...extra, description, id: editId }).then(({ status, data, errormsg }) => {
|
||||
saveLedgerBasic({ ...extra, description, id: editId, taxAgentIds: extra.taxAgentId.split(",") })
|
||||
.then(({ status, data, errormsg }) => {
|
||||
this.setState({ loading: false });
|
||||
if (status) {
|
||||
const { onRefreshList } = this.props;
|
||||
|
|
@ -198,7 +199,7 @@ class LedgerSlide extends Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { visible, editId, taxAgentStore: { showOperateBtn } } = this.props;
|
||||
const { visible, editId, record } = this.props;
|
||||
const { current, saveSalarySobId, loading, salaryApprovalStatus } = this.state;
|
||||
let tabs = [
|
||||
{
|
||||
|
|
@ -296,7 +297,7 @@ class LedgerSlide extends Component {
|
|||
measure="%"
|
||||
title={
|
||||
!editId ? <WeaTopTitle buttons={_.find(tabs, o => current === o.key).createBtns}/> :
|
||||
<WeaReqTitle buttons={showOperateBtn ? _.find(tabs, o => current === o.key).editBtns : []}
|
||||
<WeaReqTitle buttons={record.opts.includes("admin") ? _.find(tabs, o => current === o.key).editBtns : []}
|
||||
tabDatas={tabs} selectedKey={String(current)}
|
||||
onChange={cur => this.setState({ current: parseInt(cur) })}/>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class LedgerTable extends Component {
|
|||
return <WeaCheckbox
|
||||
value={text === 0 ? "1" : "0"}
|
||||
display="switch"
|
||||
disabled={!showOperateBtn}
|
||||
disabled={!record.opts.includes("admin")}
|
||||
onChange={(disable) => this.changeLedgerStatus({ id: record.id, disable: disable === "0" ? 1 : 0 })}
|
||||
/>;
|
||||
};
|
||||
|
|
@ -80,14 +80,14 @@ class LedgerTable extends Component {
|
|||
item.render = (text, record) => {
|
||||
return <div className="optWrapper">
|
||||
<a href="javascript:void(0);" className="mr10"
|
||||
onClick={() => onEditLedger(record)}>{showOperateBtn ? "编辑" : "查看"}</a>
|
||||
onClick={() => onEditLedger(record)}>{record.opts.includes("admin") ? "编辑" : "查看"}</a>
|
||||
{
|
||||
showOperateBtn &&
|
||||
record.opts.includes("admin") &&
|
||||
<a href="javascript:void(0);" className="mr10"
|
||||
onClick={() => this.handleMenuClick({ key: "copy" }, record)}>复制</a>
|
||||
}
|
||||
{
|
||||
showOperateBtn &&
|
||||
record.opts.includes("admin") &&
|
||||
<Popover
|
||||
overlayClassName="moreIconWrapper"
|
||||
placement="bottomRight"
|
||||
|
|
@ -148,11 +148,15 @@ class LedgerTable extends Component {
|
|||
};
|
||||
handleMenuClick = ({ key }, record) => {
|
||||
const { copyLedgerModal } = this.state;
|
||||
const { id, name, taxAgentId } = record;
|
||||
const { id, name, taxAgentIds } = record;
|
||||
switch (key) {
|
||||
case "copy":
|
||||
this.setState({
|
||||
copyLedgerModal: { ...copyLedgerModal, visible: true, id, name, taxAgentId }
|
||||
copyLedgerModal: {
|
||||
...copyLedgerModal,
|
||||
visible: true, id, name,
|
||||
taxAgentId: _.map(taxAgentIds, o => String(o)).join(",")
|
||||
}
|
||||
});
|
||||
break;
|
||||
case "delete":
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ export const copyConditions = [
|
|||
fieldcol: 14,
|
||||
rules: "required|string",
|
||||
label: "个税扣缴义务人",
|
||||
multiple: true,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
viewAttr: 3
|
||||
|
|
@ -86,6 +87,7 @@ export const baseSettingFormItem = [
|
|||
key: "taxAgentId",
|
||||
label: "个税扣缴义务人",
|
||||
type: "SELECT",
|
||||
multiple: true,
|
||||
options: []
|
||||
},
|
||||
{
|
||||
|
|
@ -857,3 +859,76 @@ export const classifyConditions = [
|
|||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const ruleConditions = [//调薪计薪规则项表单
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["salaryItemId"],
|
||||
fieldcol: 8,
|
||||
rules: "required|string",
|
||||
label: "薪资项目",
|
||||
lanId: 111,
|
||||
labelcol: 6,
|
||||
value: "",
|
||||
multiple: true,
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["dayOfMonth"],
|
||||
fieldcol: 6,
|
||||
label: "如果:调薪生效日期在",
|
||||
lanId: 111,
|
||||
labelcol: 0,
|
||||
value: "1",
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["beforeAdjustmentType"],
|
||||
fieldcol: 6,
|
||||
label: "计薪规则为:",
|
||||
lanId: 111,
|
||||
labelcol: 0,
|
||||
value: "2",
|
||||
options: [
|
||||
{ key: "2", showname: "取调整后薪资", lanId: 111 },
|
||||
{
|
||||
key: "4", showname: "分段计薪", lanId: 111, helpfultiplanId: 111,
|
||||
helpfultip: "调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||
},
|
||||
{
|
||||
key: "3", showname: "取平均", lanId: 111,
|
||||
helpfultip: "(调整前薪资+调整后薪资)/2", helpfultiplanId: 111
|
||||
}
|
||||
],
|
||||
detailtype: 3,
|
||||
viewAttr: 2
|
||||
},
|
||||
{
|
||||
conditionType: "SELECT",
|
||||
domkey: ["afterAdjustmentType"],
|
||||
fieldcol: 6,
|
||||
label: "计薪规则为:",
|
||||
lanId: 111,
|
||||
labelcol: 0,
|
||||
value: "1",
|
||||
options: [
|
||||
{ key: "1", showname: "取调整前薪资", lanId: 111 },
|
||||
{
|
||||
key: "4", showname: "分段计薪", lanId: 111, helpfultiplanId: 111,
|
||||
helpfultip: "调整前薪资/当月自然日天数*调整前自然日天数+调整后薪资/当月自然日天数*调整后自然日天数"
|
||||
},
|
||||
{
|
||||
key: "3", showname: "取平均", lanId: 111,
|
||||
helpfultip: "(调整前薪资+调整后薪资)/2", helpfultiplanId: 111
|
||||
}
|
||||
],
|
||||
detailtype: 3,
|
||||
viewAttr: 2
|
||||
}
|
||||
],
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
import React, { Component } from "react";
|
||||
import { inject, observer } from "mobx-react";
|
||||
import { WeaLocaleProvider, WeaTop } from "ecCom";
|
||||
import { Button } from "antd";
|
||||
import { Button, Modal } from "antd";
|
||||
import LedgerTable from "./components/ledgerTable";
|
||||
import LedgerSlide from "./components/ledgerSlide";
|
||||
import LedgerSearchComp from "./components/ledgerSearchComp";
|
||||
|
|
@ -23,34 +23,19 @@ class Index extends Component {
|
|||
super(props);
|
||||
this.state = {
|
||||
searchVal: "", doSearch: false, logDialogVisible: false, filterConditions: "[]",
|
||||
slideparams: {
|
||||
visible: false,
|
||||
title: "新建账套",
|
||||
editId: ""
|
||||
}
|
||||
slideparams: { visible: false, title: "新建账套", editId: "", record: {} }
|
||||
};
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
const { taxAgentStore } = this.props;
|
||||
const { fetchTaxAgentOption } = taxAgentStore;
|
||||
fetchTaxAgentOption();
|
||||
}
|
||||
|
||||
handleEditLedger = (record) => {
|
||||
const { slideparams } = this.state;
|
||||
const { id } = record;
|
||||
this.setState({ slideparams: { ...slideparams, visible: true, title: "编辑账套", editId: id } });
|
||||
this.setState({ slideparams: { ...slideparams, visible: true, title: "编辑账套", editId: id, record } });
|
||||
};
|
||||
handleResetLedger = () => {
|
||||
const { slideparams } = this.state;
|
||||
this.setState({
|
||||
slideparams: {
|
||||
...slideparams,
|
||||
visible: false,
|
||||
title: "新建账套",
|
||||
editId: ""
|
||||
}
|
||||
slideparams: { ...slideparams, visible: false, title: "新建账套", editId: "", record: {} }
|
||||
});
|
||||
};
|
||||
onDropMenuClick = (key, targetid = "") => {
|
||||
|
|
@ -65,21 +50,33 @@ class Index extends Component {
|
|||
break;
|
||||
}
|
||||
};
|
||||
handleNewBuild = () => {
|
||||
const { taxAgentStore } = this.props;
|
||||
const { PageAndOptAuth } = taxAgentStore;
|
||||
if (!PageAndOptAuth.isAdminEnable && !PageAndOptAuth.isChief) {
|
||||
Modal.info({
|
||||
title: getLabel(111, "提示"),
|
||||
content: getLabel(111, "业务线人员新建账套后,需联系总管理员,将该账套加入所属业务线。"),
|
||||
onOk: () => this.setState({ slideparams: { ...this.state.slideparams, visible: true } })
|
||||
});
|
||||
} else {
|
||||
this.setState({ slideparams: { ...this.state.slideparams, visible: true } });
|
||||
}
|
||||
};
|
||||
|
||||
render() {
|
||||
const { logDialogVisible, filterConditions, doSearch, slideparams } = this.state;
|
||||
const { taxAgentStore } = this.props;
|
||||
const { showOperateBtn } = taxAgentStore;
|
||||
const { PageAndOptAuth } = taxAgentStore;
|
||||
const admin = PageAndOptAuth.opts.includes("admin");
|
||||
const btns = [
|
||||
<Button type="primary" onClick={() => this.setState({ slideparams: { ...slideparams, visible: true } })}>
|
||||
{getLabel(111, "新建")}
|
||||
</Button>,
|
||||
<Button type="primary" onClick={this.handleNewBuild}>{getLabel(111, "新建")}</Button>,
|
||||
<LedgerSearchComp onSearch={() => this.setState({ doSearch: !doSearch })}/>
|
||||
];
|
||||
return (
|
||||
<WeaTop
|
||||
title="薪资账套" className="ledgerOuter" icon={<i className="icon-coms-fa"/>} iconBgcolor="#F14A2D"
|
||||
buttons={showOperateBtn ? btns : btns.slice(-1)}
|
||||
buttons={admin ? btns : btns.slice(-1)}
|
||||
showDropIcon onDropMenuClick={this.onDropMenuClick}
|
||||
dropMenuDatas={[
|
||||
{
|
||||
|
|
@ -92,7 +89,7 @@ class Index extends Component {
|
|||
<LedgerTable doSearch={doSearch} onEditLedger={this.handleEditLedger}
|
||||
onFilterLog={(type, targetid) => this.onDropMenuClick(type, targetid)}/>
|
||||
<LedgerSlide
|
||||
{...slideparams}
|
||||
{...slideparams} PageAndOptAuth={PageAndOptAuth}
|
||||
onCancel={this.handleResetLedger}
|
||||
onRefreshList={() => this.setState({ doSearch: !doSearch })}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,87 @@
|
|||
export const secondaryVerifyConditions = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["authCode"],
|
||||
fieldcol: 14,
|
||||
label: "二次验证密码",
|
||||
labelcol: 10,
|
||||
value: "",
|
||||
otherParams: {
|
||||
type: "password"
|
||||
},
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const loginCondition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["password"],
|
||||
fieldcol: 14,
|
||||
label: "登录密码",
|
||||
labelcol: 10,
|
||||
value: "",
|
||||
otherParams: {
|
||||
type: "password"
|
||||
},
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
export const secondarypwdCondition = [
|
||||
{
|
||||
items: [
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["secondaryPwd1"],
|
||||
fieldcol: 14,
|
||||
label: "密码",
|
||||
labelcol: 10,
|
||||
value: "",
|
||||
otherParams: {
|
||||
type: "password",
|
||||
passwordStrength: true
|
||||
},
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["secondaryPwd2"],
|
||||
fieldcol: 14,
|
||||
label: "确认密码",
|
||||
labelcol: 10,
|
||||
value: "",
|
||||
otherParams: {
|
||||
type: "password"
|
||||
},
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
},
|
||||
{
|
||||
conditionType: "INPUT",
|
||||
domkey: ["validatecode"],
|
||||
fieldcol: 14,
|
||||
label: "验证码",
|
||||
labelcol: 10,
|
||||
value: "",
|
||||
rules: "required|string",
|
||||
viewAttr: 3
|
||||
}
|
||||
],
|
||||
title: "",
|
||||
defaultshow: true
|
||||
}
|
||||
];
|
||||
|
|
@ -2,37 +2,31 @@ import React from "react";
|
|||
import { inject, observer } from "mobx-react";
|
||||
import { toJS } from "mobx";
|
||||
import { getQueryString } from "../../util/url";
|
||||
import { WeaDialog, WeaError, WeaInput, WeaLocaleProvider } from "ecCom";
|
||||
import { Button, message, Modal } from "antd";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { message, Modal } from "antd";
|
||||
import Authority from "../mySalary/authority";
|
||||
import "../payroll/templatePreview/index.less";
|
||||
import * as API from "../../apis/mySalaryBenefits";
|
||||
import { salaryBillGetToken } from "../../apis/mySalaryBenefits";
|
||||
import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../apis/payroll";
|
||||
import CaptchaModal from "../../components/captchaModal";
|
||||
import PassSetDialog from "./passSetDialog";
|
||||
import { ConfirmBtns } from "../mySalary/mySalaryView";
|
||||
import Content from "../../components/pcTemplate/content";
|
||||
import MobileTemplate from "../../components/mobileTemplate";
|
||||
import SecondaryVerify from "./secondaryVerify";
|
||||
import LoginVerify from "./loginVerify";
|
||||
import SecondarypwdVerify from "./secondarypwdVerify";
|
||||
import "../mySalary/index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
@inject("mySalaryStore")
|
||||
@observer
|
||||
@inject("mySalaryStore") @observer
|
||||
export default class MobilePayroll extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = {
|
||||
pwdSetVisible: false,
|
||||
visible: false,
|
||||
captchaVisible: false,
|
||||
authCode: "",
|
||||
notSetting: false,
|
||||
mySalaryBillData: {
|
||||
employeeInformation: {},
|
||||
salaryTemplate: []
|
||||
},
|
||||
visible: false, captchaVisible: false, loginVisible: false, pwdSetVisible: false,
|
||||
mySalaryBillData: { employeeInformation: {}, salaryTemplate: [] },
|
||||
salaryBillToken: {}
|
||||
};
|
||||
this.id = "";
|
||||
|
|
@ -43,16 +37,13 @@ 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));
|
||||
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;
|
||||
|
|
@ -60,12 +51,7 @@ export default class MobilePayroll extends React.Component {
|
|||
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
||||
.then(({ status, isNeedSecondAuth }) => {
|
||||
if (status && isNeedSecondAuth) {
|
||||
this.setState({ visible: true }, () => {
|
||||
API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
||||
.then(({ status, notSetting }) => {
|
||||
this.setState({ notSetting });
|
||||
});
|
||||
});
|
||||
this.setState({ visible: true });
|
||||
} else {
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
setInitEmVerify();
|
||||
|
|
@ -82,12 +68,7 @@ export default class MobilePayroll extends React.Component {
|
|||
API.isNeedSecondPwdVerify({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
||||
.then(({ status, isNeedSecondAuth }) => {
|
||||
if (status && isNeedSecondAuth) {
|
||||
this.setState({ visible: true }, () => {
|
||||
API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.state.salaryBillToken)
|
||||
.then(({ status, notSetting }) => {
|
||||
this.setState({ notSetting });
|
||||
});
|
||||
});
|
||||
this.setState({ visible: true });
|
||||
} else {
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
setInitEmVerify();
|
||||
|
|
@ -96,33 +77,12 @@ export default class MobilePayroll extends React.Component {
|
|||
});
|
||||
}
|
||||
};
|
||||
doSecondAuth = () => {
|
||||
const { salaryBillToken } = this.state;
|
||||
const { mySalaryStore: { setInitEmVerify } } = this.props;
|
||||
if (!this.state.authCode) {
|
||||
this.refs.weaError.showError();
|
||||
return;
|
||||
}
|
||||
API.doSecondAuth({
|
||||
authCode: this.state.authCode, mouldCode: "HRM", itemCode: "SALARY"
|
||||
}, salaryBillToken).then(({ status, checkStatus, checkMsg }) => {
|
||||
if (status && checkStatus === "1") {
|
||||
message.success(checkMsg);
|
||||
setInitEmVerify();
|
||||
this.setState({ visible: false });
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
} else {
|
||||
message.error(checkMsg);
|
||||
}
|
||||
});
|
||||
};
|
||||
getMySalaryBill = (salaryInfoId) => {
|
||||
const { salaryBillToken } = this.state;
|
||||
const { mySalaryStore: { getMySalaryBill } } = this.props;
|
||||
const params = this.getUrlkey();
|
||||
const payload = {
|
||||
salaryInfoId, header: salaryBillToken,
|
||||
..._.pick(params, ["recipient"])
|
||||
salaryInfoId, header: salaryBillToken, ..._.pick(params, ["recipient"])
|
||||
};
|
||||
getMySalaryBill(payload).then(result => {
|
||||
this.setState({
|
||||
|
|
@ -132,10 +92,8 @@ export default class MobilePayroll extends React.Component {
|
|||
};
|
||||
getUrlkey = () => {
|
||||
let url = window.location.href;
|
||||
let params = {},
|
||||
arr = url.split("?");
|
||||
if (arr.length <= 1)
|
||||
return params;
|
||||
let params = {}, arr = url.split("?");
|
||||
if (arr.length <= 1) return params;
|
||||
arr = arr[1].split("&");
|
||||
for (var i = 0, l = arr.length; i < l; i++) {
|
||||
var a = arr[i].split("=");
|
||||
|
|
@ -144,7 +102,9 @@ export default class MobilePayroll extends React.Component {
|
|||
return params;
|
||||
};
|
||||
confirmSalaryBill = () => {
|
||||
confirmSalaryBill({ salaryInfoId: getQueryString("id") }).then(({ status, errormsg }) => {
|
||||
const { salaryBillToken } = this.state;
|
||||
confirmSalaryBill({ salaryInfoId: getQueryString("id"), header: salaryBillToken })
|
||||
.then(({ status, errormsg }) => {
|
||||
if (status) {
|
||||
message.success(getLabel(30700, "操作成功"));
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
|
|
@ -156,7 +116,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 })
|
||||
|
|
@ -177,47 +137,47 @@ export default class MobilePayroll extends React.Component {
|
|||
};
|
||||
|
||||
render() {
|
||||
const { mySalaryStore: { clearLoading, pwdForm } } = this.props;
|
||||
const { mySalaryBillData, visible, captchaVisible, notSetting, pwdSetVisible } = this.state;
|
||||
const { mySalaryStore: { setInitEmVerify } } = this.props, {
|
||||
captchaVisible, visible, loginVisible, pwdSetVisible
|
||||
} = this.state;
|
||||
const type = getQueryString("type");
|
||||
if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return <div>
|
||||
<WeaDialog
|
||||
onCancel={() => this.setState({ visible: false }, () => clearLoading())}
|
||||
title="请输入二次验证密码" visible={visible} initLoadCss
|
||||
className="verifyWrapper"
|
||||
hasScroll buttons={[
|
||||
<Button type="primary" size="small" onClick={this.doSecondAuth}>确定</Button>
|
||||
]}
|
||||
>
|
||||
<WeaError tipPosition="bottom" ref="weaError" error="此项必填">
|
||||
<WeaInput value={this.state.authCode} type="password" viewAttr={3}
|
||||
onChange={authCode => this.setState({ authCode })}/>
|
||||
</WeaError>
|
||||
if (_.isEmpty(toJS(this.props.mySalaryStore.mySalaryBill))) return <React.Fragment>
|
||||
{visible && <SecondaryVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
|
||||
onSetLogin={() => this.setState({ visible: false, loginVisible: true })}
|
||||
onSuccess={() => {
|
||||
setInitEmVerify();
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
}}/>}
|
||||
{loginVisible && <LoginVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
|
||||
onSetPwdSet={() => this.setState({ loginVisible: false, pwdSetVisible: true })}/>}
|
||||
{pwdSetVisible && <SecondarypwdVerify {...this.props} salaryBillToken={this.state.salaryBillToken}
|
||||
onSuccess={() => this.setState({ pwdSetVisible: false }, () => this.initMobile())}/>}
|
||||
{/*发送验证码*/}
|
||||
{
|
||||
notSetting &&
|
||||
<div style={{ clear: "both", paddingTop: 10 }}>
|
||||
{getLabel("514970", "您还未设置二次验证密码,点击")}
|
||||
<a href="javascript:void(0);"
|
||||
onClick={() => this.setState({ pwdSetVisible: true })}>{getLabel("30747", "设置")}</a>
|
||||
</div>
|
||||
captchaVisible &&
|
||||
<CaptchaModal
|
||||
visible={captchaVisible} id={getQueryString("id")}
|
||||
onCancel={() => this.setState({ captchaVisible: false })}
|
||||
onConfirm={() => {
|
||||
setInitEmVerify();
|
||||
this.getMySalaryBill(getQueryString("id"));
|
||||
}}
|
||||
/>
|
||||
}
|
||||
</WeaDialog>
|
||||
<PassSetDialog form={pwdForm} visible={pwdSetVisible} onCancel={() => this.setState({ pwdSetVisible: false })}/>
|
||||
</div>;
|
||||
</React.Fragment>;
|
||||
const {
|
||||
salaryTemplate, salaryGroups, employeeInformation,
|
||||
sendTime, confirmStatus, showAck, showFeedback
|
||||
salaryTemplate, salaryGroups, employeeInformation, sendTime, confirmStatus, showAck, showFeedback
|
||||
} = toJS(this.props.mySalaryStore.mySalaryBill);
|
||||
const salaryProps = {
|
||||
theme: salaryTemplate.theme, tip: salaryTemplate.textContent, sendTime,
|
||||
background: salaryTemplate.background, tipPosi: salaryTemplate.textContentPosition || "",
|
||||
theme: salaryTemplate.theme,
|
||||
tip: salaryTemplate.textContent,
|
||||
sendTime,
|
||||
background: salaryTemplate.background,
|
||||
tipPosi: salaryTemplate.textContentPosition || "",
|
||||
itemTypeList: [employeeInformation, ...salaryGroups]
|
||||
};
|
||||
return (
|
||||
<React.Fragment>
|
||||
{
|
||||
type === "phone" ?
|
||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||
return (<React.Fragment>
|
||||
{type === "phone" ? <Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||
store={this.props.mySalaryStore}>
|
||||
<MobileTemplate {...salaryProps} title={getLabel(111, "工资单查看")}>
|
||||
<ConfirmBtns
|
||||
|
|
@ -226,9 +186,7 @@ export default class MobilePayroll extends React.Component {
|
|||
goFeedback={this.handleGoFeedback}
|
||||
/>
|
||||
</MobileTemplate>
|
||||
</Authority>
|
||||
:
|
||||
<Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||
</Authority> : <Authority ecId={`${this && this.props && this.props.ecId || ""}_Authority@lulowc`}
|
||||
store={this.props.mySalaryStore}>
|
||||
<div className="weapp-salary-my-salary-view-payroll">
|
||||
<Content {...salaryProps}>
|
||||
|
|
@ -239,14 +197,7 @@ export default class MobilePayroll extends React.Component {
|
|||
/>
|
||||
</Content>
|
||||
</div>
|
||||
</Authority>
|
||||
}
|
||||
<CaptchaModal
|
||||
visible={captchaVisible} id={getQueryString("id")}
|
||||
onCancel={() => this.setState({ captchaVisible: false })}
|
||||
onConfirm={() => this.props.mySalaryStore.setInitEmVerify()}
|
||||
/>
|
||||
</React.Fragment>
|
||||
);
|
||||
</Authority>}
|
||||
</React.Fragment>);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,3 +39,132 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.am-modal-mask {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
height: 100%;
|
||||
z-index: 999;
|
||||
background-color: rgba(0, 0, 0, .4);
|
||||
}
|
||||
|
||||
.am-modal-transparent {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.am-modal-transparent .am-modal-content {
|
||||
border-radius: 7px;
|
||||
padding-top: 15px;
|
||||
}
|
||||
|
||||
.am-modal-content {
|
||||
position: relative;
|
||||
background-color: #fff;
|
||||
border: 0;
|
||||
background-clip: padding-box;
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.am-modal-header {
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.am-modal-title {
|
||||
margin: 0;
|
||||
letter-spacing: -.1px;
|
||||
color: #333;
|
||||
font-size: 14px;
|
||||
line-height: 20px;
|
||||
text-align: center;
|
||||
height: auto;
|
||||
max-height: 150px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.am-modal-body {
|
||||
font-size: 14px;
|
||||
color: #868686;
|
||||
height: 100%;
|
||||
line-height: 1.5;
|
||||
overflow: auto;
|
||||
padding: 0 15px 30px;
|
||||
|
||||
.wea-search-group, .wea-content, .wea-form-cell {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.secondarypwd-form {
|
||||
.wea-form-cell-wrapper {
|
||||
& > div:last-child {
|
||||
.ant-col-16 {
|
||||
width: 37.5% !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.am-modal-wrap {
|
||||
position: fixed;
|
||||
overflow: auto;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
z-index: 999;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
outline: 0;
|
||||
display: -webkit-box;
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-box-align: center;
|
||||
-webkit-align-items: center;
|
||||
-ms-flex-align: center;
|
||||
align-items: center;
|
||||
-webkit-box-pack: center;
|
||||
-webkit-justify-content: center;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
-webkit-transform: translateZ(1px);
|
||||
transform: translateZ(1px);
|
||||
}
|
||||
|
||||
.am-modal-button-group-h {
|
||||
position: relative;
|
||||
border-top: 1px solid #ddd;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.am-modal-button-group-h .am-modal-button {
|
||||
-webkit-touch-callout: none;
|
||||
flex: 1 1;
|
||||
box-sizing: border-box;
|
||||
text-align: center;
|
||||
text-decoration: none;
|
||||
outline: none;
|
||||
color: #55b1f9;
|
||||
height: 50px;
|
||||
line-height: 50px;
|
||||
display: block;
|
||||
width: auto;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.am-modal-button-group-h .am-modal-button:first-child {
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.am-modal-button-group-h .am-modal-button:last-child {
|
||||
position: relative;
|
||||
border-left: 1px solid #ddd;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* 登录密码验证
|
||||
*
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/4/17
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { WeaForm } from "comsMobx";
|
||||
import FormInfo from "../../components/FormInfo";
|
||||
import { loginCondition } from "./conditions";
|
||||
import MobileModal from "./mobileModal";
|
||||
import * as API from "../../apis/mySalaryBenefits";
|
||||
import { RSAEcrypt } from "../../util/RSAUtil";
|
||||
|
||||
const form = new WeaForm();
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class LoginVerify extends Component {
|
||||
|
||||
componentDidMount() {
|
||||
form.initFormFields(loginCondition);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
form.resetForm();
|
||||
}
|
||||
|
||||
save = async () => {
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
RSAEcrypt("1", { ...form.getFormParams() }, this.props.salaryBillToken)
|
||||
.then(RSAParam => {
|
||||
API.checkPassword({ ...RSAParam }).then(({ result }) => {
|
||||
if (result) {
|
||||
this.props.onSetPwdSet();
|
||||
} else {
|
||||
form.showError("password", getLabel(504343, "登录密码错误"));
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const itemRender = {};
|
||||
return (<MobileModal title={getLabel(111, "请先输入登录密码")} onConfirm={this.save}>
|
||||
<FormInfo center={false} itemRender={itemRender} form={form} formFields={loginCondition}/>
|
||||
</MobileModal>);
|
||||
}
|
||||
}
|
||||
|
||||
export default LoginVerify;
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
* 自定义移动端弹框组件
|
||||
*
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/4/16
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { removeElementById } from "../../util";
|
||||
import "./index.less";
|
||||
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class MobileModal extends Component {
|
||||
componentDidMount() {
|
||||
this.setMetaViewport();
|
||||
}
|
||||
|
||||
setMetaViewport = () => {
|
||||
// 检查是否已存在 viewport meta 标签
|
||||
let viewportMeta = document.querySelector("meta[name=\"viewport\"]");
|
||||
if (!viewportMeta) {
|
||||
// 如果不存在,创建一个新的 meta 标签
|
||||
viewportMeta = document.createElement("meta");
|
||||
viewportMeta.setAttribute("name", "viewport");
|
||||
document.head.appendChild(viewportMeta);
|
||||
}
|
||||
// 设置或更新 viewport 的 content 属性
|
||||
const content = "width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover";
|
||||
viewportMeta.setAttribute("content", content);
|
||||
};
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div id="am-modal-container">
|
||||
<div>
|
||||
<div className="am-modal-mask"></div>
|
||||
<div className="am-modal-wrap">
|
||||
<div className="am-modal am-modal-transparent">
|
||||
<div className="am-modal-content">
|
||||
<div className="am-modal-header">
|
||||
<div className="am-modal-title">{this.props.title}</div>
|
||||
</div>
|
||||
<div className="am-modal-body">{this.props.children}</div>
|
||||
<div className="am-modal-footer">
|
||||
<div className="am-modal-button-group-h">
|
||||
<a href="javascript:void(0);" className="am-modal-button"
|
||||
onClick={() => removeElementById("am-modal-container")}>{getLabel(111, "取消")}</a>
|
||||
<a href="javascript:void(0);" className="am-modal-button"
|
||||
onClick={this.props.onConfirm}>{getLabel(111, "确定")}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default MobileModal;
|
||||
|
|
@ -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: [
|
||||
|
|
|
|||
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* 二次验证密码
|
||||
*
|
||||
* @Author: 黎永顺
|
||||
* @Date: 2025/4/16
|
||||
* @Wechat:
|
||||
* @Email: 971387674@qq.com
|
||||
* @description:
|
||||
*/
|
||||
import React, { Component } from "react";
|
||||
import { WeaLocaleProvider } from "ecCom";
|
||||
import { WeaForm, WeaSwitch } from "comsMobx";
|
||||
import { message } from "antd";
|
||||
import FormInfo from "../../components/FormInfo";
|
||||
import { secondaryVerifyConditions } from "./conditions";
|
||||
import * as API from "../../apis/mySalaryBenefits";
|
||||
import MobileModal from "./mobileModal";
|
||||
|
||||
const form = new WeaForm();
|
||||
const getLabel = WeaLocaleProvider.getLabel;
|
||||
|
||||
class SecondaryVerify extends Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
this.state = { notSetting: false };
|
||||
}
|
||||
|
||||
componentDidMount() {
|
||||
API.getSecondAuthForm({ mouldCode: "HRM", itemCode: "SALARY" }, this.props.salaryBillToken)
|
||||
.then(({ notSetting }) => {
|
||||
this.setState({ notSetting });
|
||||
});
|
||||
form.initFormFields(secondaryVerifyConditions);
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
this.setState({ notSetting: false }, () => form.resetForm());
|
||||
}
|
||||
|
||||
doSecondAuth = () => {
|
||||
form.validateForm().then(f => {
|
||||
if (f.isValid) {
|
||||
const { salaryBillToken } = this.props;
|
||||
API.doSecondAuth({ mouldCode: "HRM", itemCode: "SALARY", ...form.getFormParams() }, salaryBillToken)
|
||||
.then(({ status, checkStatus, checkMsg }) => {
|
||||
if (status && checkStatus === "1") {
|
||||
message.success(checkMsg);
|
||||
this.props.onSuccess();
|
||||
} else {
|
||||
form.showError("authCode", checkMsg);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
f.showErrors();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
render() {
|
||||
const { notSetting } = this.state;
|
||||
const itemRender = {
|
||||
authCode: (field, textAreaProps, form, formParams) => {
|
||||
return (<React.Fragment>
|
||||
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}/>
|
||||
{
|
||||
notSetting &&
|
||||
<div style={{ clear: "both", paddingTop: 10 }}>
|
||||
{getLabel(111, "您还未设置二次验证密码,点击")}
|
||||
<a href="javascript:void(0);" onClick={this.props.onSetLogin}>{getLabel(111, "设置")}</a>
|
||||
</div>
|
||||
}
|
||||
</React.Fragment>);
|
||||
}
|
||||
};
|
||||
return (<MobileModal title={getLabel(111, "身份验证")} onConfirm={this.doSecondAuth}>
|
||||
<FormInfo center={false} custLabelCol={9} itemRender={itemRender} form={form}
|
||||
formFields={secondaryVerifyConditions}/>
|
||||
</MobileModal>);
|
||||
}
|
||||
}
|
||||
|
||||
export default SecondaryVerify;
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue