Merge branch 'release/3.0.1.2504.01-合并业务线' into release/2.19.1.2503.01-业务线个税

This commit is contained in:
lys 2025-12-24 17:37:43 +08:00
commit c942b52bff
4 changed files with 34 additions and 17 deletions

View File

@ -21,7 +21,7 @@ const { getLabel } = WeaLocaleProvider;
class Index extends Component { class Index extends Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { captcha: "", time: 60 }; this.state = { captcha: "", time: 60, loading: false };
this.timeRef = null; this.timeRef = null;
} }
@ -31,10 +31,11 @@ class Index extends Component {
componentWillUnmount() { componentWillUnmount() {
clearInterval(this.timeRef); clearInterval(this.timeRef);
this.setState({ captcha: "", time: 60 }); this.setState({ captcha: "", time: 60, loading: false });
} }
handleSendCaptcha = () => { handleSendCaptcha = () => {
this.setState({ loading: true });
sendMobileCode({ id: this.props.id }).then(({ status, data }) => { sendMobileCode({ id: this.props.id }).then(({ status, data }) => {
if (status) { if (status) {
this.timeRef = setInterval(() => { this.timeRef = setInterval(() => {
@ -42,12 +43,14 @@ class Index extends Component {
this.setState({ time: time - 1 }, () => { this.setState({ time: time - 1 }, () => {
if (this.state.time === -1) { if (this.state.time === -1) {
clearInterval(this.timeRef); clearInterval(this.timeRef);
this.setState({ time: 60 }); this.setState({ time: 60, loading: false });
} }
}); });
}, 1000); }, 1000);
} else {
this.setState({ loading: false });
} }
}); }).catch(() => this.setState({ loading: false }));
}; };
handleConfirm = async () => { handleConfirm = async () => {
const type = getQueryString("type"), f = await form.validateForm(); const type = getQueryString("type"), f = await form.validateForm();
@ -69,13 +72,13 @@ class Index extends Component {
}; };
render() { render() {
const { captcha, time } = this.state, type = getQueryString("type"); const { captcha, time, loading } = this.state, type = getQueryString("type");
const itemRender = { const itemRender = {
mobileCode: (field, textAreaProps, form, formParams) => { mobileCode: (field, textAreaProps, form, formParams) => {
return (<div className="captchaInputBox"> return (<div className="captchaInputBox">
<WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams} <WeaSwitch fieldConfig={{ ...field, ...textAreaProps }} form={form} formParams={formParams}
onChange={() => this.setState({ captcha: form.getFormParams().mobileCode })}/> onChange={() => this.setState({ captcha: form.getFormParams().mobileCode })}/>
<Button type="primary" onClick={this.handleSendCaptcha} disabled={time !== 60}> <Button type="primary" onClick={this.handleSendCaptcha} disabled={loading}>
{ {
time === 60 ? getLabel(111, "发送验证码") : `${time}S` time === 60 ? getLabel(111, "发送验证码") : `${time}S`
} }
@ -104,7 +107,7 @@ class Index extends Component {
<WeaError tipPosition="bottom" ref="weaError" error={getLabel(111, "验证码未填写")}> <WeaError tipPosition="bottom" ref="weaError" error={getLabel(111, "验证码未填写")}>
<div className="captchaInputBox"> <div className="captchaInputBox">
<WeaInput value={captcha} onChange={captcha => this.setState({ captcha })}/> <WeaInput value={captcha} onChange={captcha => this.setState({ captcha })}/>
<Button type="primary" onClick={this.handleSendCaptcha} disabled={time !== 60}> <Button type="primary" onClick={this.handleSendCaptcha} disabled={loading}>
{ {
time === 60 ? getLabel(111, "发送验证码") : `${time}S` time === 60 ? getLabel(111, "发送验证码") : `${time}S`
} }

View File

@ -448,7 +448,9 @@ export const MonthRangePicker = (props) => {
<WeaDatePicker <WeaDatePicker
value={startDate} disabled={disabled} value={startDate} disabled={disabled}
disabledDate={(current) => { disabledDate={(current) => {
return current && endDate && current.getTime() > new Date(endDate).getTime(); // 20251212前版本(问题时不能选到当月)
// return current && endDate && current.getTime() > new Date(endDate).getTime();
return current && endDate && moment(`${new Date(current.getTime()).getFullYear()}-${new Date(current.getTime()).getMonth() + 1}`).isAfter(moment(endDate));
}} }}
format="YYYY-MM" format="YYYY-MM"
onChange={(val) => onChange([val, endDate])} onChange={(val) => onChange([val, endDate])}

View File

@ -245,13 +245,19 @@ export default class NormalIndex extends Component {
}); });
}; };
handleExport = () => { handleExport = () => {
const { selectedKey } = this.props; const { selectedKey } = this.props, { formParams } = this.state;
const { departmentIds, subCompanyIds } = formParams;
const urlObj = { const urlObj = {
"1": "/api/bs/hrmsalary/welfare/common/export", "1": "/api/bs/hrmsalary/welfare/common/export",
"3": "/api/bs/hrmsalary/welfare/supplementary/export" "3": "/api/bs/hrmsalary/welfare/supplementary/export"
}; };
const extraParams = {
...formParams,
departmentIds: departmentIds.join(","),
subCompanyIds: subCompanyIds.join(",")
};
const url = `${window.location const url = `${window.location
.origin}${urlObj[selectedKey]}?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization"]))}`; .origin}${urlObj[selectedKey]}?${convertToUrlString({ ..._.pick(this.props, ["billMonth", "paymentOrganization"]), ...extraParams })}`;
window.open(url, "_blank"); window.open(url, "_blank");
}; };
handleEditNormalStandingBook = (record) => { handleEditNormalStandingBook = (record) => {
@ -279,12 +285,12 @@ export default class NormalIndex extends Component {
<Col span={12}><WeaFormItem label={getLabel(27511, "部门")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}> <Col span={12}><WeaFormItem label={getLabel(27511, "部门")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<WeaBrowser <WeaBrowser
isSingle={false} value={departmentIds.join(",")} type={57} isSingle={false} value={departmentIds.join(",")} type={57}
onChange={v => this.setState({ formParams: { ...formParams, departmentIds: v.split(",") } })}/> onChange={v => this.setState({ formParams: { ...formParams, departmentIds: v ? v.split(",") : [] } })}/>
</WeaFormItem></Col> </WeaFormItem></Col>
<Col span={12}><WeaFormItem label={getLabel(33553, "分部")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}> <Col span={12}><WeaFormItem label={getLabel(33553, "分部")} labelCol={{ span: 4 }} wrapperCol={{ span: 18 }}>
<WeaBrowser <WeaBrowser
isSingle={false} value={subCompanyIds.join(",")} type={164} isSingle={false} value={subCompanyIds.join(",")} type={164}
onChange={v => this.setState({ formParams: { ...formParams, subCompanyIds: v.split(",") } })}/> onChange={v => this.setState({ formParams: { ...formParams, subCompanyIds: v ? v.split(",") : [] } })}/>
</WeaFormItem></Col> </WeaFormItem></Col>
</Row> </Row>
</WeaSearchGroup>; </WeaSearchGroup>;

View File

@ -88,7 +88,13 @@ class Regression extends Component {
}); });
break; break;
case "export": case "export":
const url = `/api/bs/hrmsalary/welfare/recession/export?${convertToUrlString(_.pick(this.props, ["billMonth", "paymentOrganization", "creator"]))}`; const extraParams = {
name,
workcode,
departmentIds: this.regTopRef.state.departmentIds,
subCompanyIds: this.regTopRef.state.subCompanyIds
};
const url = `/api/bs/hrmsalary/welfare/recession/export?${convertToUrlString({ ..._.pick(this.props, ["billMonth", "paymentOrganization", "creator"]), ...extraParams })}`;
window.open(url, "_blank"); window.open(url, "_blank");
break; break;
case "search": case "search":