Compare commits

...

2 Commits

Author SHA1 Message Date
lys 9f2d341a76 custom/钱智 2025-12-29 16:09:22 +08:00
lys c53a7d5451 custom/钱智 2025-12-23 15:04:40 +08:00
8 changed files with 58 additions and 26 deletions

View File

@ -5,6 +5,10 @@ import { postFetch } from "../util/request";
export const getTaxAgentList = (params) => {
return postFetch("/api/bs/hrmsalary/taxAgent/list", params);
};
//钱智-同步管理员角色
export const syncAdminRoles = (params) => {
return postFetch("/api/bs/hrmsalary/taxAgent/syncAdminRoles", params);
};
//同步人员范围
export const taxAgentRangeSync = (params) => {
return postFetch("/api/bs/hrmsalary/taxAgent/range/sync", params);
@ -188,4 +192,4 @@ export const authMemberDetail = (params) => {
//数据明细列表
export const authDataDetail = (params) => {
return postFetch("/api/bs/hrmsalary/auth/data/detail", params);
};
};

View File

@ -38,8 +38,8 @@ class Index extends Component {
keyword: "",
year: moment().format("YYYY"),
dateRange: [
moment(new Date()).subtract(6, "months").format("YYYY-MM"),
moment(new Date()).format("YYYY-MM")
moment(new Date()).subtract(1, "months").format("YYYY-MM"),
moment(new Date()).subtract(1, "months").format("YYYY-MM")
],
showSearchAd: false,
isQuery: false,
@ -379,4 +379,4 @@ class Index extends Component {
}
}
export default Index;
export default Index;

View File

@ -43,8 +43,8 @@ class Calculate extends Component {
queryParams: {
name: "", lastOperates: [],
dateRange: [
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
moment(new Date()).endOf("year").format("YYYY-MM")
moment(new Date()).subtract(1, "month").format("YYYY-MM"),
moment(new Date()).subtract(1, "month").format("YYYY-MM")
]
}, isRefresh: false, logDialogVisible: false, conditions: [],
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
@ -296,9 +296,9 @@ class Calculate extends Component {
<Button type="primary" onClick={() => this.setState({
calcDaialog: {
visible: true,
title: getLabel(538780, "核算")
title: getLabel(111, "账套生成")
}
})}>{getLabel(538780, "核算")}</Button>
})}>{getLabel(111, "账套生成")}</Button>
<Button type="ghost" loading={loading.acct} disabled={_.isEmpty(selectedRowKeys)}
onClick={this.handleBatAccounting}>{getLabel(111, "批量计算薪资")}</Button>
<Button type="ghost" loading={loading.tax} disabled={_.isEmpty(selectedRowKeys)}

View File

@ -448,7 +448,9 @@ export const MonthRangePicker = (props) => {
<WeaDatePicker
value={startDate} disabled={disabled}
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"
onChange={(val) => onChange([val, endDate])}
@ -510,4 +512,4 @@ export const getSalaryMonthValue = (dateType) => {
break;
}
return [start, end];
};
};

View File

@ -57,12 +57,12 @@ class TaxAgentSlide extends Component {
const { taxAgentStore: { salarytaxAgentForm } } = this.props;
API.getTaxAgentForm({ id: taxAgentId }).then(({ status, data }) => {
if (status) {
const { name, description, adminUserIds, sortedIndex } = data;
const { name, description, roleId, sortedIndex } = data;
salarytaxAgentForm.updateFields({
name: { value: name },
adminUserIds: {
value: _.map(adminUserIds, it => it.id.toString()).join(","),
valueSpan: _.map(adminUserIds, it => it.content).join(",")
roleId: {
value: _.map(roleId, it => it.id.toString()).join(","),
valueSpan: _.map(roleId, it => it.content).join(",")
},
sortedIndex: { value: sortedIndex },
description: { value: description }
@ -121,7 +121,7 @@ class TaxAgentSlide extends Component {
const formData = salarytaxAgentForm.getFormParams();
const payload = {
...formData,
adminUserIds: formData.adminUserIds ? formData.adminUserIds.split(",") : []
// adminUserIds: formData.adminUserIds ? formData.adminUserIds.split(",") : []
};
taxAgentId ? this.updateTaxAgent({ ...payload, id: taxAgentId }) : this.saveTaxAgent(payload);
} else {
@ -362,4 +362,4 @@ class TaxAgentSlide extends Component {
}
}
export default TaxAgentSlide;
export default TaxAgentSlide;

View File

@ -18,6 +18,7 @@ class TaxAgent extends Component {
constructor(props) {
super(props);
this.state = {
roleLoading: false, //钱智同步管理员角色loading
syncLoading: false, //同步人员范围loading
searchValue: "",
decentralization: "0", //启用分权
@ -94,6 +95,25 @@ class TaxAgent extends Component {
}
});
};
/*
* Author: 黎永顺
* Description:钱智同步管理员角色
* Params:
* Date: 2025/12/25
*/
syncAdminRoles = () => {
const { taxAgentStore } = this.props, { syncAdminRoles } = taxAgentStore;
this.setState({ roleLoading: true });
syncAdminRoles({}).then(({ status, data, errormsg }) => {
this.setState({ roleLoading: false });
if (status) {
message.success(data || getLabel(30700, "操作成功"));
this.taxAgentTableRef.getTaxAgentList();
} else {
message.error(data || errormsg || getLabel(30651, "操作失败"));
}
})
};
/*
* Author: 黎永顺
* Description:启用分权
@ -172,9 +192,11 @@ class TaxAgent extends Component {
render() {
const { taxAgentStore: { PageAndOptAuth: permission } } = this.props;
const {
searchValue, decentralization, taxAgentSlideProps, syncLoading, logDialogVisible, filterConditions
searchValue, decentralization, taxAgentSlideProps, syncLoading, logDialogVisible, filterConditions, roleLoading
} = this.state;
const btns = [
<Button type="primary" onClick={this.syncAdminRoles}
loading={roleLoading}>{getLabel(111, "同步管理员角色")}</Button>,
<Button type="primary" onClick={this.taxAgentRangeSync}
loading={syncLoading}>{getLabel(543633, "同步人员范围")}</Button>,
<WeaInputSearch
@ -201,7 +223,7 @@ class TaxAgent extends Component {
title={getLabel(537996, "个税扣缴义务人")}
icon={<i className="icon-coms-fa"/>}
iconBgcolor="#F14A2D"
buttons={showOperateBtn ? btns : btns.slice(1)}
buttons={showOperateBtn ? btns : btns.slice(2)}
showDropIcon onDropMenuClick={key => this.handleOperate(key)}
dropMenuDatas={[
{
@ -242,4 +264,4 @@ class TaxAgent extends Component {
}
}
export default TaxAgent;
export default TaxAgent;

View File

@ -31,21 +31,21 @@ export const editConditions = [
isDetail: 0,
isMultCheckbox: false,
isSingle: false,
linkUrl: "/hrm/resource/HrmResource.jsp?id=",
linkUrl: "/spa/hrm/engine.html#/hrmengine/roleInfo/info?id=",
pageSize: 10,
quickSearchName: "",
replaceDatas: [],
title: "人力资源",
type: "1",
title: "角色",
type: "65",
viewAttr: 3,
rules: "required",
},
colSpan: 1,
conditionType: "BROWSER",
rules: "required|string",
domkey: ["adminUserIds"],
domkey: ["roleId"],
fieldcol: 14,
label: "管理员",
label: "角色",
labelcol: 6,
viewAttr: 3,
},
@ -110,4 +110,4 @@ export const decentralizationConditions = [
],
defaultshow: true,
},
];
];

View File

@ -105,6 +105,10 @@ export class TaxAgentStore {
@action setShowSearchAd = bool => (this.showSearchAd = bool);
@action("钱智-同步管理员角色")
syncAdminRoles = params => {
return API.syncAdminRoles(params);
};
@action("同步人员范围")
taxAgentRangeSync = params => {
return API.taxAgentRangeSync(params);
@ -274,4 +278,4 @@ export class TaxAgentStore {
);
});
};
}
}