Merge branch 'release/2.19.1.2503.01-业务线个税' into custom-联特
This commit is contained in:
commit
ebdc58b6b9
|
|
@ -0,0 +1,127 @@
|
||||||
|
/*
|
||||||
|
* 自定义多选下拉框
|
||||||
|
* 支持搜索
|
||||||
|
* @Author: 黎永顺
|
||||||
|
* @Date: 2024/9/13
|
||||||
|
* @Wechat:
|
||||||
|
* @Email: 971387674@qq.com
|
||||||
|
* @description:
|
||||||
|
*/
|
||||||
|
import React, { Component } from "react";
|
||||||
|
import { WeaCheckbox, WeaInput, WeaLocaleProvider, WeaNewScroll } from "ecCom";
|
||||||
|
import classNames from "classnames";
|
||||||
|
import { Dropdown } from "antd";
|
||||||
|
import "./index.less";
|
||||||
|
|
||||||
|
const getLabel = WeaLocaleProvider.getLabel;
|
||||||
|
|
||||||
|
class Index extends Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = {
|
||||||
|
visible: false, value: props.value ? props.value.split(",") : [],
|
||||||
|
keywords: ""
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
isAllChecked = () => {
|
||||||
|
const { options } = this.props, { value, keywords } = this.state;
|
||||||
|
let v = "0";
|
||||||
|
if (_.uniq(value).length === options.filter(k => k.showname.indexOf(keywords) >= 0).length) v = "1";
|
||||||
|
return v;
|
||||||
|
};
|
||||||
|
|
||||||
|
isChecked = (v) => {
|
||||||
|
const { value } = this.state;
|
||||||
|
return value.indexOf(v) > -1 ? "1" : "0";
|
||||||
|
};
|
||||||
|
onAllChange = (v) => {
|
||||||
|
const { options, onChange } = this.props, { keywords } = this.state;
|
||||||
|
let values = [], shownames = [];
|
||||||
|
if (v == 1) {
|
||||||
|
options.filter(k => k.showname.indexOf(keywords) >= 0).forEach(o => {
|
||||||
|
values.push(o.key);
|
||||||
|
shownames.push(o.showname);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
this.setState({ value: values });
|
||||||
|
onChange && onChange(values.join(","), shownames.join(","));
|
||||||
|
};
|
||||||
|
|
||||||
|
onItemChange = (v, id) => {
|
||||||
|
const { onChange, options } = this.props, { value } = this.state;
|
||||||
|
let values = !_.isEmpty(value) ? value : [], shownames = [];
|
||||||
|
if (v == "1") {
|
||||||
|
values.push(id);
|
||||||
|
} else {
|
||||||
|
values = values.filter(val => val !== id);
|
||||||
|
}
|
||||||
|
values.forEach(val => {
|
||||||
|
let target = options.filter((data) => data.key == val)[0];
|
||||||
|
if (target) shownames.push(target.showname);
|
||||||
|
});
|
||||||
|
this.setState({ value: values });
|
||||||
|
onChange && onChange(values.join(","), shownames.join(","));
|
||||||
|
};
|
||||||
|
|
||||||
|
getList = () => {
|
||||||
|
const { options } = this.props, { keywords } = this.state;
|
||||||
|
let style = {};
|
||||||
|
if (options.length > 5) style = { height: 200 };
|
||||||
|
return <div className="wea-select-panel" style={style}>
|
||||||
|
<WeaNewScroll className="wea-select-scroll" height="100%">
|
||||||
|
<div className="wea-select-panel-item">
|
||||||
|
<WeaInput value={keywords} onChange={keywords => this.setState({ keywords })}/>
|
||||||
|
</div>
|
||||||
|
<div className="wea-select-panel-item">
|
||||||
|
<WeaCheckbox
|
||||||
|
content={"全选"}
|
||||||
|
value={this.isAllChecked()}
|
||||||
|
onChange={this.onAllChange}
|
||||||
|
>
|
||||||
|
</WeaCheckbox>
|
||||||
|
</div>
|
||||||
|
{options && options.filter(k => k.showname.indexOf(keywords) >= 0).map(o => {
|
||||||
|
return <div className="wea-select-panel-item">
|
||||||
|
<WeaCheckbox
|
||||||
|
content={o.showname}
|
||||||
|
value={this.isChecked(o.key)}
|
||||||
|
onChange={(v) => this.onItemChange(v, o.key)}
|
||||||
|
>
|
||||||
|
</WeaCheckbox>
|
||||||
|
</div>;
|
||||||
|
})}
|
||||||
|
</WeaNewScroll>
|
||||||
|
</div>;
|
||||||
|
};
|
||||||
|
|
||||||
|
getShownames = () => {
|
||||||
|
const { options } = this.props;
|
||||||
|
let { value } = this.state;
|
||||||
|
let shownames = [];
|
||||||
|
value.forEach(val => {
|
||||||
|
let target = options.filter((data) => data.key == val)[0];
|
||||||
|
if (target) shownames.push(target.showname);
|
||||||
|
});
|
||||||
|
return shownames.join(",");
|
||||||
|
};
|
||||||
|
|
||||||
|
render() {
|
||||||
|
const { visible } = this.state, { layout } = this.props;
|
||||||
|
const clsname = classNames({
|
||||||
|
"wea-associative-search-mult": true
|
||||||
|
});
|
||||||
|
return (<div className={`customMuiSelect wea-associative-search ${clsname}`} ref="customSelectMui">
|
||||||
|
<Dropdown trigger={["click"]} overlay={this.getList()}
|
||||||
|
onVisibleChange={visible => this.setState({ visible })} visible={visible}
|
||||||
|
getPopupContainer={() => (layout || document.body)}>
|
||||||
|
<div className="wea-select-input wdb cursor-pointer" ref="selectInput">
|
||||||
|
<span className="wdb">{this.getShownames()}</span>
|
||||||
|
{!this.state.visible ? <i className="icon-coms-down2 arrow"/> : <i className="icon-coms-up2 arrow"/>}
|
||||||
|
</div>
|
||||||
|
</Dropdown>
|
||||||
|
</div>);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default Index;
|
||||||
|
|
@ -0,0 +1,60 @@
|
||||||
|
.customMuiSelect {
|
||||||
|
border: none;
|
||||||
|
padding: 0;
|
||||||
|
|
||||||
|
.wea-select-input {
|
||||||
|
min-width: 100px;
|
||||||
|
width: 100%;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 4px 17px 4px 4px;
|
||||||
|
position: relative;
|
||||||
|
min-height: 30px;
|
||||||
|
border: 1px solid #d9d9d9;
|
||||||
|
user-select: none;
|
||||||
|
height: 30px;
|
||||||
|
white-space: nowrap;
|
||||||
|
-webkit-user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
-o-text-overflow: ellipsis;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.wdb {
|
||||||
|
word-break: break-all !important;
|
||||||
|
word-wrap: break-word !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cursor-pointer {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover, &:focus {
|
||||||
|
border-color: #57c5f7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.arrow {
|
||||||
|
position: absolute;
|
||||||
|
right: 4px;
|
||||||
|
top: 8px;
|
||||||
|
color: #979797;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.wea-select-panel {
|
||||||
|
padding: 5px 0;
|
||||||
|
max-height: 200px;
|
||||||
|
border-radius: 3px;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
|
||||||
|
.wea-select-panel-item {
|
||||||
|
padding: 5px 10px;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background-color: #e9f7ff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -62,7 +62,7 @@ class Index extends Component {
|
||||||
if (o.dataIndex === "username") {
|
if (o.dataIndex === "username") {
|
||||||
return { ...o, width: 150, fixed: "left" };
|
return { ...o, width: 150, fixed: "left" };
|
||||||
}
|
}
|
||||||
return { ...o, width: 150 };
|
return { ...o, width: 150, render: (v) => (<span title={v}>{v}</span>) };
|
||||||
}), {
|
}), {
|
||||||
dataIndex: "options", title: getLabel(30585, "操作"),
|
dataIndex: "options", title: getLabel(30585, "操作"),
|
||||||
width: 120, render: (_, record) => (
|
width: 120, render: (_, record) => (
|
||||||
|
|
|
||||||
|
|
@ -43,5 +43,15 @@
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wea-new-table {
|
||||||
|
.ant-table-tbody > tr > td,
|
||||||
|
.ant-table-thead > tr > th {
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -125,17 +125,18 @@ class EditCalcTable extends Component {
|
||||||
}, 500);
|
}, 500);
|
||||||
});
|
});
|
||||||
const { routeParams: { salaryAcctRecordId } } = this.props;
|
const { routeParams: { salaryAcctRecordId } } = this.props;
|
||||||
updateLockStatus({ ...payload, salaryAcctRecordId }).then(({ status, errormsg }) => {
|
updateLockStatus({ ...payload, salaryAcctRecordId, acctEmpIds: this.state.selectedRowKeys })
|
||||||
if (status) {
|
.then(({ status, errormsg }) => {
|
||||||
clearInterval(this.timerLock);
|
if (status) {
|
||||||
this.setState({
|
clearInterval(this.timerLock);
|
||||||
progressVisible: false,
|
this.setState({
|
||||||
progress: 0
|
progressVisible: false,
|
||||||
}, () => this.queryCalcResultList());
|
progress: 0
|
||||||
} else {
|
}, () => this.queryCalcResultList());
|
||||||
message.error(errormsg);
|
} else {
|
||||||
}
|
message.error(errormsg);
|
||||||
});
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ import React from "react";
|
||||||
import { inject, observer } from "mobx-react";
|
import { inject, observer } from "mobx-react";
|
||||||
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
import { WeaLocaleProvider, WeaTable, WeaTop } from "ecCom";
|
||||||
import { getQueryString } from "../../util/url";
|
import { getQueryString } from "../../util/url";
|
||||||
|
import { sysinfo } from "../../apis/ruleconfig";
|
||||||
import * as API from "../../apis/declare";
|
import * as API from "../../apis/declare";
|
||||||
import { Button } from "antd";
|
import { Button } from "antd";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
@ -14,15 +15,21 @@ export default class GenerateDeclarationDetail extends React.Component {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
loading: false, dataSource: [], columns: [], declareInfo: {},
|
loading: false, dataSource: [], columns: [], declareInfo: {},
|
||||||
pageInfo: { current: 1, pageSize: 10, total: 0 }
|
pageInfo: { current: 1, pageSize: 10, total: 0 }, sysinfo: {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.getDetailList();
|
this.getDetailList();
|
||||||
this.getDeclareInfo();
|
this.getDeclareInfo();
|
||||||
|
this.getSysinfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSysinfo = () => {
|
||||||
|
sysinfo().then(({ status, data: sysinfo }) => {
|
||||||
|
if (status) this.setState({ sysinfo });
|
||||||
|
});
|
||||||
|
};
|
||||||
getDetailList = () => {
|
getDetailList = () => {
|
||||||
const { pageInfo } = this.state;
|
const { pageInfo } = this.state;
|
||||||
const payload = {
|
const payload = {
|
||||||
|
|
@ -64,9 +71,10 @@ export default class GenerateDeclarationDetail extends React.Component {
|
||||||
window.open(url, "_self");
|
window.open(url, "_self");
|
||||||
};
|
};
|
||||||
renderTitle = () => {
|
renderTitle = () => {
|
||||||
const { declareInfo } = this.state;
|
const { declareInfo, sysinfo } = this.state;
|
||||||
|
const title = sysinfo["TAX_DECLARATION_DATE_TYPE"] === "1" ? getLabel(111, "税款所属期") : getLabel(111, "薪资所属月");
|
||||||
return (<React.Fragment>
|
return (<React.Fragment>
|
||||||
<span>{getLabel(111, "薪资所属月")}:{declareInfo.salaryMonth}</span>
|
<span>{title}:{declareInfo.salaryMonth}</span>
|
||||||
<span style={{ marginLeft: "10px" }}>{getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}</span>
|
<span style={{ marginLeft: "10px" }}>{getLabel(111, "个税扣缴义务人")}:{declareInfo.taxAgentName}</span>
|
||||||
</React.Fragment>);
|
</React.Fragment>);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ import { confirmSalaryBill, feedBackSalaryBill, payrollCheckType } from "../../a
|
||||||
import CaptchaModal from "../../components/captchaModal";
|
import CaptchaModal from "../../components/captchaModal";
|
||||||
import "./index.less";
|
import "./index.less";
|
||||||
|
|
||||||
const isIPhone = new RegExp("\\biPhone\\b|\\biPod\\b", "i").test(window.navigator.userAgent);
|
const isPhone = /(iPhone|iPad|iPod|iOS|Android)/i.test(window.navigator.userAgent);
|
||||||
const isEm = window.navigator.userAgent.indexOf("E-Mobile7") >= 0;
|
const isEm = window.navigator.userAgent.indexOf("E-Mobile7") >= 0;
|
||||||
const { getLabel } = WeaLocaleProvider;
|
const { getLabel } = WeaLocaleProvider;
|
||||||
|
|
||||||
|
|
@ -84,7 +84,18 @@ class MySalaryView extends Component {
|
||||||
const { captchaVisible, mySalaryStore } = this.state;
|
const { captchaVisible, mySalaryStore } = this.state;
|
||||||
const { params: { salaryInfoId } } = this.props;
|
const { params: { salaryInfoId } } = this.props;
|
||||||
if (_.isEmpty(mySalaryStore)) {
|
if (_.isEmpty(mySalaryStore)) {
|
||||||
return <div></div>;
|
return <div>
|
||||||
|
<CaptchaModal
|
||||||
|
visible={captchaVisible} id={salaryInfoId}
|
||||||
|
onCancel={() => this.setState({ captchaVisible: false })}
|
||||||
|
onConfirm={() => {
|
||||||
|
this.props.mySalaryStore.setInitEmVerify();
|
||||||
|
this.props.mySalaryStore.getMySalaryBill(Number(salaryInfoId)).then(data => {
|
||||||
|
this.setState({ mySalaryStore: data });
|
||||||
|
});
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>;
|
||||||
}
|
}
|
||||||
const { salaryTemplate, salaryGroups, employeeInformation, sendTime } = mySalaryStore;
|
const { salaryTemplate, salaryGroups, employeeInformation, sendTime } = mySalaryStore;
|
||||||
const salaryProps = {
|
const salaryProps = {
|
||||||
|
|
@ -106,11 +117,6 @@ class MySalaryView extends Component {
|
||||||
</Content>
|
</Content>
|
||||||
</div>
|
</div>
|
||||||
</Authority>
|
</Authority>
|
||||||
<CaptchaModal
|
|
||||||
visible={captchaVisible} id={salaryInfoId}
|
|
||||||
onCancel={() => this.setState({ captchaVisible: false })}
|
|
||||||
onConfirm={() => mySalaryStore.setInitEmVerify()}
|
|
||||||
/>
|
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
@ -125,7 +131,7 @@ export const ConfirmBtns = (props) => {
|
||||||
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
<Button type="primary" onClick={props.confirmSalaryBill}>{getLabel(111, "确认")}</Button>
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
((props.showFeedback === "1" && !isIPhone) || (props.showFeedback === "1" && isIPhone && isEm)) &&
|
((props.showFeedback === "1" && !isPhone) || (props.showFeedback === "1" && isEm)) &&
|
||||||
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
<Button type="ghost" onClick={props.goFeedback}>{getLabel(111, "反馈")}</Button>
|
||||||
}
|
}
|
||||||
</div>;
|
</div>;
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,8 @@ class PayrollDetail extends Component {
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { salarySendDetailBaseInfo, showSearchAd, conditions, isQuery, showTotalCell } = this.state;
|
const { salarySendDetailBaseInfo, showSearchAd, conditions, isQuery, showTotalCell } = this.state;
|
||||||
const { taxAgentStore: { showOperateBtn } } = this.props;
|
const { taxAgentStore: { PageAndOptAuth } } = this.props;
|
||||||
|
const showOperateBtn = PageAndOptAuth.opts.length;
|
||||||
const { salaryMonth, template } = salarySendDetailBaseInfo;
|
const { salaryMonth, template } = salarySendDetailBaseInfo;
|
||||||
const dropMenuDatas = [
|
const dropMenuDatas = [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -70,10 +70,10 @@ class StatisticalMicroSettingsSlide extends Component {
|
||||||
|
|
||||||
getTaxAgentSelectList = async (props) => {
|
getTaxAgentSelectList = async (props) => {
|
||||||
const [salarySobList, empStatusList] = await Promise.all([
|
const [salarySobList, empStatusList] = await Promise.all([
|
||||||
postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "QUERY_DATA" }),
|
postFetch("/api/bs/hrmsalary/salarysob/listAuth", { filterType: "QUERY_DATA", isShare: props.isShare }),
|
||||||
commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })
|
commonEnumList({ enumClass: "com.engine.salary.enums.salarysob.SalaryEmployeeStatusEnum" })
|
||||||
]);
|
]);
|
||||||
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA" })
|
postFetch("/api/bs/hrmsalary/taxAgent/listAuth", { filterType: "QUERY_DATA", isShare: props.isShare })
|
||||||
.then(({ status, data }) => {
|
.then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
const conditions = _.map(condition, item => {
|
const conditions = _.map(condition, item => {
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,9 @@ export const socialAccountConditions = [
|
||||||
lanId: 537996,
|
lanId: 537996,
|
||||||
labelcol: 6,
|
labelcol: 6,
|
||||||
options: [],
|
options: [],
|
||||||
|
otherParams: {
|
||||||
|
showSearch: true, optionFilterProp: "children"
|
||||||
|
},
|
||||||
rules: "required|string",
|
rules: "required|string",
|
||||||
viewAttr: 3
|
viewAttr: 3
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ class MakeupDifference extends Component {
|
||||||
tmpUrl: "exportSiaccountWelfarebalanceimporttemplatetetemplate",
|
tmpUrl: "exportSiaccountWelfarebalanceimporttemplatetetemplate",
|
||||||
cacheUrl: "cacheBalanceWelfareList",
|
cacheUrl: "cacheBalanceWelfareList",
|
||||||
importUrl: "importBalanceInsuranceDetail",
|
importUrl: "importBalanceInsuranceDetail",
|
||||||
importparams: {}
|
importparams: {}, ..._.pick(this.props, ["billMonth", "paymentOrganization"])
|
||||||
},
|
},
|
||||||
returnEditPersonSlide: {
|
returnEditPersonSlide: {
|
||||||
title: "", editId: "", visible: false
|
title: "", editId: "", visible: false
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue