产品薪资账套-薪资账套中的薪资项目bug修改

This commit is contained in:
黎永顺 2023-04-10 15:53:53 +08:00
parent 43d00a4232
commit 7ea5936829
8 changed files with 36 additions and 18 deletions

View File

@ -53,6 +53,7 @@ class Index extends Component {
slideDataSource: []
},
exportPayloadUrl: "",
exportPayloadType: false,
advanceCondition: null
};
this.tableRef = null;
@ -162,8 +163,9 @@ class Index extends Component {
*/
handleExportAll = () => {
const { cumDeductStore: { form } } = this.props;
const { declareMonth, taxAgentId } = this.state;
const { declareMonth, taxAgentId, exportPayloadType } = this.state;
this.setState({
exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
});
};
@ -175,12 +177,13 @@ class Index extends Component {
*/
handleExportSelect = () => {
const { selectedRowKeys: ids } = this.tableRef.state;
const { declareMonth, taxAgentId } = this.state;
const { declareMonth, taxAgentId, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
return;
}
this.setState({
exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
});
};
@ -499,7 +502,7 @@ class Index extends Component {
const { taxAgentStore: { showOperateBtn }, cumDeductStore: { form } } = this.props;
const {
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
importPayload
importPayload, exportPayloadType
} = this.state;
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
return (
@ -507,6 +510,7 @@ class Index extends Component {
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
exportPayloadType={exportPayloadType}
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
importPayload={importPayload} onImportFile={this.handleImportFile}

View File

@ -60,6 +60,7 @@ class Index extends Component {
slideDataSource: []
},
exportPayloadUrl: "",
exportPayloadType: false,
advanceCondition: null
};
this.tableRef = null;
@ -279,8 +280,9 @@ class Index extends Component {
*/
handleExportAll = () => {
const { cumSituationStore: { form } } = this.props;
const { declareMonth, taxAgentId, year } = this.state;
const { declareMonth, taxAgentId, year, exportPayloadType } = this.state;
this.setState({
exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
});
};
@ -292,12 +294,13 @@ class Index extends Component {
*/
handleExportSelect = () => {
const { selectedRowKeys: ids } = this.tableRef.state;
const { declareMonth, taxAgentId, year } = this.state;
const { declareMonth, taxAgentId, year, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
return;
}
this.setState({
exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/addUpSituation/export?ids=${ids.join(",")}&year=${year}&taxYearMonth=${year}-${declareMonth}&taxAgentId=${taxAgentId}`
});
};
@ -513,7 +516,7 @@ class Index extends Component {
const { taxAgentStore: { showOperateBtn }, cumSituationStore: { form } } = this.props;
const {
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
importPayload, year
importPayload, year, exportPayloadType
} = this.state;
const tablePayload = { taxYearMonth: `${year}-${declareMonth}`, year, taxAgentId };
return (
@ -521,6 +524,7 @@ class Index extends Component {
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
exportPayloadType={exportPayloadType}
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
importPayload={{ ...importPayload, importOpts: { taxYearMonth: importPayload.importOpts.declareMonth } }}

View File

@ -30,7 +30,7 @@ class Layout extends Component {
}
componentWillReceiveProps(nextProps, nextContext) {
if (nextProps.exportPayloadUrl !== this.props.exportPayloadUrl) {
if (nextProps.exportPayloadType !== this.props.exportPayloadType) {
/*
* Author: 黎永顺
* Description:导出数据采集数据

View File

@ -60,6 +60,7 @@ class Index extends Component {
slideDataSource: []
},
exportPayloadUrl: "",
exportPayloadType: false,
advanceCondition: null
};
this.tableRef = null;
@ -252,8 +253,9 @@ class Index extends Component {
*/
handleExportAll = () => {
const { otherDeductStore: { form } } = this.props;
const { declareMonth, taxAgentId } = this.state;
const { declareMonth, taxAgentId, exportPayloadType } = this.state;
this.setState({
exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}&${convertToUrlString(form.getFormParams())}`
});
};
@ -265,12 +267,13 @@ class Index extends Component {
*/
handleExportSelect = () => {
const { selectedRowKeys: ids } = this.tableRef.state;
const { declareMonth, taxAgentId } = this.state;
const { declareMonth, taxAgentId, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
return;
}
this.setState({
exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/otherDeduction/export?ids=${ids.join(",")}&declareMonth=${declareMonth}&taxAgentId=${taxAgentId}`
});
};
@ -506,7 +509,7 @@ class Index extends Component {
const { taxAgentStore: { showOperateBtn }, otherDeductStore: { form } } = this.props;
const {
declareMonth, taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition,
importPayload
importPayload, exportPayloadType
} = this.state;
const tablePayload = { declareMonth: [declareMonth], taxAgentId };
return (
@ -514,6 +517,7 @@ class Index extends Component {
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
exportPayloadType={exportPayloadType}
form={form} condition={advanceCondition} onAdSearch={this.handleAdSearch}
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
importPayload={importPayload} onImportFile={this.handleImportFile}

View File

@ -50,6 +50,7 @@ class Index extends Component {
slideDataSource: []
},
exportPayloadUrl: "",
exportPayloadType: false,
advanceCondition: null
};
this.tableRef = null;
@ -209,8 +210,9 @@ class Index extends Component {
*/
handleExportAll = () => {
const { specialAddStore: { advanceForm } } = this.props;
const { taxAgentId } = this.state;
const { taxAgentId, exportPayloadType } = this.state;
this.setState({
exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=&taxAgentId=${taxAgentId}&${convertToUrlString(advanceForm.getFormParams())}`
});
};
@ -222,12 +224,13 @@ class Index extends Component {
*/
handleExportSelect = () => {
const { selectedRowKeys: ids } = this.tableRef.state;
const { taxAgentId } = this.state;
const { taxAgentId, exportPayloadType } = this.state;
if (ids.length === 0) {
message.warning("请选择需要导出的数据");
return;
}
this.setState({
exportPayloadType: !exportPayloadType,
exportPayloadUrl: `${window.location.origin}/api/bs/hrmsalary/specialAddDeduction/export?ids=${ids.join(",")}&taxAgentId=${taxAgentId}`
});
};
@ -416,7 +419,8 @@ class Index extends Component {
render() {
const { taxAgentStore: { showOperateBtn }, specialAddStore: { advanceForm } } = this.props;
const {
taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload
taxAgentId, slidePayload, saveLoading, exportPayloadUrl, advanceCondition, importPayload,
exportPayloadType
} = this.state;
const tablePayload = { taxAgentId };
return (
@ -424,6 +428,7 @@ class Index extends Component {
onResizeWindowInnerWidth={this.handleResize} slidePayload={slidePayload}
onClose={this.handleCloseSlide} onSave={this.handleSaveData}
slideLoading={saveLoading} exportPayloadUrl={exportPayloadUrl}
exportPayloadType={exportPayloadType}
form={advanceForm} condition={advanceCondition} onAdSearch={this.handleAdSearch}
onImportSetStep={this.handleImportSetStep} onCancel={this.handleCloseImport}
importPayload={importPayload} onImportFile={this.handleImportFile}

View File

@ -301,10 +301,10 @@ class LedgerSalaryItem extends Component {
* Params:
* Date: 2023/3/8
*/
handleMoveSalaryItem = (moveToItemId, items) => {
handleMoveSalaryItem = (moveToItemId, items, titleName) => {
const { itemGroups } = this.state;
const { salaryItemGroupId: deleteItemId, id, key } = items;
if (moveToItemId === deleteItemId) return;
if (moveToItemId === deleteItemId || (deleteItemId === "0" && titleName === "未分类")) return;
this.setState({
itemGroups: _.map(itemGroups, it => {
if (moveToItemId === it.uuid) {

View File

@ -175,11 +175,11 @@ class LedgerSalaryItemNormal extends Component {
});
};
handleSubmitMoveTo = () => {
const { onMoveSalaryItem } = this.props;
const { onMoveSalaryItem, dataSource } = this.props;
const { moveModalPayload } = this.state;
const { record, value } = moveModalPayload;
this.handleCancelMove();
onMoveSalaryItem(value, record);
onMoveSalaryItem(value, record, _.find(dataSource, it => (it.id === value || it.uuid === value)).name);
};
render() {

View File

@ -24,7 +24,8 @@ export default class MobilePayroll extends React.Component {
const type = getQueryString("type");
this.id = getQueryString("id");
const { mySalaryStore: { init } } = this.props;
type !== "phone" && init(false);
// type !== "phone" && init(false);
init(false);
this.getMySalaryBill(this.id);
}