Compare commits
2 Commits
21731f0ca6
...
9f2d341a76
| Author | SHA1 | Date |
|---|---|---|
|
|
9f2d341a76 | |
|
|
c53a7d5451 |
|
|
@ -5,6 +5,10 @@ import { postFetch } from "../util/request";
|
||||||
export const getTaxAgentList = (params) => {
|
export const getTaxAgentList = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/taxAgent/list", 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) => {
|
export const taxAgentRangeSync = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/taxAgent/range/sync", params);
|
return postFetch("/api/bs/hrmsalary/taxAgent/range/sync", params);
|
||||||
|
|
@ -188,4 +192,4 @@ export const authMemberDetail = (params) => {
|
||||||
//数据明细列表
|
//数据明细列表
|
||||||
export const authDataDetail = (params) => {
|
export const authDataDetail = (params) => {
|
||||||
return postFetch("/api/bs/hrmsalary/auth/data/detail", params);
|
return postFetch("/api/bs/hrmsalary/auth/data/detail", params);
|
||||||
};
|
};
|
||||||
|
|
@ -38,8 +38,8 @@ class Index extends Component {
|
||||||
keyword: "",
|
keyword: "",
|
||||||
year: moment().format("YYYY"),
|
year: moment().format("YYYY"),
|
||||||
dateRange: [
|
dateRange: [
|
||||||
moment(new Date()).subtract(6, "months").format("YYYY-MM"),
|
moment(new Date()).subtract(1, "months").format("YYYY-MM"),
|
||||||
moment(new Date()).format("YYYY-MM")
|
moment(new Date()).subtract(1, "months").format("YYYY-MM")
|
||||||
],
|
],
|
||||||
showSearchAd: false,
|
showSearchAd: false,
|
||||||
isQuery: false,
|
isQuery: false,
|
||||||
|
|
@ -379,4 +379,4 @@ class Index extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default Index;
|
export default Index;
|
||||||
|
|
@ -43,8 +43,8 @@ class Calculate extends Component {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
name: "", lastOperates: [],
|
name: "", lastOperates: [],
|
||||||
dateRange: [
|
dateRange: [
|
||||||
moment(new Date()).subtract(1, "year").startOf("year").format("YYYY-MM"),
|
moment(new Date()).subtract(1, "month").format("YYYY-MM"),
|
||||||
moment(new Date()).endOf("year").format("YYYY-MM")
|
moment(new Date()).subtract(1, "month").format("YYYY-MM")
|
||||||
]
|
]
|
||||||
}, isRefresh: false, logDialogVisible: false, conditions: [],
|
}, isRefresh: false, logDialogVisible: false, conditions: [],
|
||||||
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
|
progressModule: { visible: false, progress: 0, title: getLabel(111, "正在归档中请稍后") },
|
||||||
|
|
@ -296,9 +296,9 @@ class Calculate extends Component {
|
||||||
<Button type="primary" onClick={() => this.setState({
|
<Button type="primary" onClick={() => this.setState({
|
||||||
calcDaialog: {
|
calcDaialog: {
|
||||||
visible: true,
|
visible: true,
|
||||||
title: getLabel(538780, "核算")
|
title: getLabel(111, "账套生成")
|
||||||
}
|
}
|
||||||
})}>{getLabel(538780, "核算")}</Button>
|
})}>{getLabel(111, "账套生成")}</Button>
|
||||||
<Button type="ghost" loading={loading.acct} disabled={_.isEmpty(selectedRowKeys)}
|
<Button type="ghost" loading={loading.acct} disabled={_.isEmpty(selectedRowKeys)}
|
||||||
onClick={this.handleBatAccounting}>{getLabel(111, "批量计算薪资")}</Button>
|
onClick={this.handleBatAccounting}>{getLabel(111, "批量计算薪资")}</Button>
|
||||||
<Button type="ghost" loading={loading.tax} disabled={_.isEmpty(selectedRowKeys)}
|
<Button type="ghost" loading={loading.tax} disabled={_.isEmpty(selectedRowKeys)}
|
||||||
|
|
|
||||||
|
|
@ -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])}
|
||||||
|
|
@ -510,4 +512,4 @@ export const getSalaryMonthValue = (dateType) => {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
return [start, end];
|
return [start, end];
|
||||||
};
|
};
|
||||||
|
|
@ -57,12 +57,12 @@ class TaxAgentSlide extends Component {
|
||||||
const { taxAgentStore: { salarytaxAgentForm } } = this.props;
|
const { taxAgentStore: { salarytaxAgentForm } } = this.props;
|
||||||
API.getTaxAgentForm({ id: taxAgentId }).then(({ status, data }) => {
|
API.getTaxAgentForm({ id: taxAgentId }).then(({ status, data }) => {
|
||||||
if (status) {
|
if (status) {
|
||||||
const { name, description, adminUserIds, sortedIndex } = data;
|
const { name, description, roleId, sortedIndex } = data;
|
||||||
salarytaxAgentForm.updateFields({
|
salarytaxAgentForm.updateFields({
|
||||||
name: { value: name },
|
name: { value: name },
|
||||||
adminUserIds: {
|
roleId: {
|
||||||
value: _.map(adminUserIds, it => it.id.toString()).join(","),
|
value: _.map(roleId, it => it.id.toString()).join(","),
|
||||||
valueSpan: _.map(adminUserIds, it => it.content).join(",")
|
valueSpan: _.map(roleId, it => it.content).join(",")
|
||||||
},
|
},
|
||||||
sortedIndex: { value: sortedIndex },
|
sortedIndex: { value: sortedIndex },
|
||||||
description: { value: description }
|
description: { value: description }
|
||||||
|
|
@ -121,7 +121,7 @@ class TaxAgentSlide extends Component {
|
||||||
const formData = salarytaxAgentForm.getFormParams();
|
const formData = salarytaxAgentForm.getFormParams();
|
||||||
const payload = {
|
const payload = {
|
||||||
...formData,
|
...formData,
|
||||||
adminUserIds: formData.adminUserIds ? formData.adminUserIds.split(",") : []
|
// adminUserIds: formData.adminUserIds ? formData.adminUserIds.split(",") : []
|
||||||
};
|
};
|
||||||
taxAgentId ? this.updateTaxAgent({ ...payload, id: taxAgentId }) : this.saveTaxAgent(payload);
|
taxAgentId ? this.updateTaxAgent({ ...payload, id: taxAgentId }) : this.saveTaxAgent(payload);
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -362,4 +362,4 @@ class TaxAgentSlide extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default TaxAgentSlide;
|
export default TaxAgentSlide;
|
||||||
|
|
@ -18,6 +18,7 @@ class TaxAgent extends Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
this.state = {
|
this.state = {
|
||||||
|
roleLoading: false, //钱智同步管理员角色loading
|
||||||
syncLoading: false, //同步人员范围loading
|
syncLoading: false, //同步人员范围loading
|
||||||
searchValue: "",
|
searchValue: "",
|
||||||
decentralization: "0", //启用分权
|
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: 黎永顺
|
* Author: 黎永顺
|
||||||
* Description:启用分权
|
* Description:启用分权
|
||||||
|
|
@ -172,9 +192,11 @@ class TaxAgent extends Component {
|
||||||
render() {
|
render() {
|
||||||
const { taxAgentStore: { PageAndOptAuth: permission } } = this.props;
|
const { taxAgentStore: { PageAndOptAuth: permission } } = this.props;
|
||||||
const {
|
const {
|
||||||
searchValue, decentralization, taxAgentSlideProps, syncLoading, logDialogVisible, filterConditions
|
searchValue, decentralization, taxAgentSlideProps, syncLoading, logDialogVisible, filterConditions, roleLoading
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const btns = [
|
const btns = [
|
||||||
|
<Button type="primary" onClick={this.syncAdminRoles}
|
||||||
|
loading={roleLoading}>{getLabel(111, "同步管理员角色")}</Button>,
|
||||||
<Button type="primary" onClick={this.taxAgentRangeSync}
|
<Button type="primary" onClick={this.taxAgentRangeSync}
|
||||||
loading={syncLoading}>{getLabel(543633, "同步人员范围")}</Button>,
|
loading={syncLoading}>{getLabel(543633, "同步人员范围")}</Button>,
|
||||||
<WeaInputSearch
|
<WeaInputSearch
|
||||||
|
|
@ -201,7 +223,7 @@ class TaxAgent extends Component {
|
||||||
title={getLabel(537996, "个税扣缴义务人")}
|
title={getLabel(537996, "个税扣缴义务人")}
|
||||||
icon={<i className="icon-coms-fa"/>}
|
icon={<i className="icon-coms-fa"/>}
|
||||||
iconBgcolor="#F14A2D"
|
iconBgcolor="#F14A2D"
|
||||||
buttons={showOperateBtn ? btns : btns.slice(1)}
|
buttons={showOperateBtn ? btns : btns.slice(2)}
|
||||||
showDropIcon onDropMenuClick={key => this.handleOperate(key)}
|
showDropIcon onDropMenuClick={key => this.handleOperate(key)}
|
||||||
dropMenuDatas={[
|
dropMenuDatas={[
|
||||||
{
|
{
|
||||||
|
|
@ -242,4 +264,4 @@ class TaxAgent extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default TaxAgent;
|
export default TaxAgent;
|
||||||
|
|
@ -31,21 +31,21 @@ export const editConditions = [
|
||||||
isDetail: 0,
|
isDetail: 0,
|
||||||
isMultCheckbox: false,
|
isMultCheckbox: false,
|
||||||
isSingle: false,
|
isSingle: false,
|
||||||
linkUrl: "/hrm/resource/HrmResource.jsp?id=",
|
linkUrl: "/spa/hrm/engine.html#/hrmengine/roleInfo/info?id=",
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
quickSearchName: "",
|
quickSearchName: "",
|
||||||
replaceDatas: [],
|
replaceDatas: [],
|
||||||
title: "人力资源",
|
title: "角色",
|
||||||
type: "1",
|
type: "65",
|
||||||
viewAttr: 3,
|
viewAttr: 3,
|
||||||
rules: "required",
|
rules: "required",
|
||||||
},
|
},
|
||||||
colSpan: 1,
|
colSpan: 1,
|
||||||
conditionType: "BROWSER",
|
conditionType: "BROWSER",
|
||||||
rules: "required|string",
|
rules: "required|string",
|
||||||
domkey: ["adminUserIds"],
|
domkey: ["roleId"],
|
||||||
fieldcol: 14,
|
fieldcol: 14,
|
||||||
label: "管理员",
|
label: "角色",
|
||||||
labelcol: 6,
|
labelcol: 6,
|
||||||
viewAttr: 3,
|
viewAttr: 3,
|
||||||
},
|
},
|
||||||
|
|
@ -110,4 +110,4 @@ export const decentralizationConditions = [
|
||||||
],
|
],
|
||||||
defaultshow: true,
|
defaultshow: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
@ -105,6 +105,10 @@ export class TaxAgentStore {
|
||||||
|
|
||||||
@action setShowSearchAd = bool => (this.showSearchAd = bool);
|
@action setShowSearchAd = bool => (this.showSearchAd = bool);
|
||||||
|
|
||||||
|
@action("钱智-同步管理员角色")
|
||||||
|
syncAdminRoles = params => {
|
||||||
|
return API.syncAdminRoles(params);
|
||||||
|
};
|
||||||
@action("同步人员范围")
|
@action("同步人员范围")
|
||||||
taxAgentRangeSync = params => {
|
taxAgentRangeSync = params => {
|
||||||
return API.taxAgentRangeSync(params);
|
return API.taxAgentRangeSync(params);
|
||||||
|
|
@ -274,4 +278,4 @@ export class TaxAgentStore {
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue