From 95166a65341366b80a9ff1b761da41aa8b71d611 Mon Sep 17 00:00:00 2001
From: MustangDeng <670124965@qq.com>
Date: Mon, 30 May 2022 17:30:53 +0800
Subject: [PATCH 1/6] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../hrmSalary/components/importModal/index.js | 9 +++-
pc4mobx/hrmSalary/pages/calculate/index.js | 3 +-
.../pages/calculateDetail/compareDetail.js | 3 +-
.../calculateDetail/placeOnFileDetail.js | 1 +
.../pages/calculateDetail/salaryDetail.js | 1 +
.../pages/calculateDetail/userSure.js | 20 +++++--
.../pages/dataAcquisition/attendance/index.js | 20 ++++++-
.../pages/dataAcquisition/cumDeduct/index.js | 2 +
pc4mobx/hrmSalary/pages/declare/index.js | 1 +
.../hrmSalary/pages/ledger/slideRefereUser.js | 1 +
.../pages/ledger/step3/AddSalaryItemModal.js | 1 +
.../hrmSalary/pages/ledger/validRulesForm.js | 1 +
.../hrmSalary/pages/payroll/SalarySendList.js | 1 +
pc4mobx/hrmSalary/pages/payroll/index.js | 2 +-
.../pages/salaryFile/changeSalaryModal.js | 2 +-
.../pages/salaryFile/editAgentModal.js | 4 +-
pc4mobx/hrmSalary/pages/salaryFile/index.js | 4 +-
.../pages/salaryFile/salaryItemChangeList.js | 13 +----
.../hrmSalary/pages/salaryFile/slideAgent.js | 1 +
.../pages/salaryFile/slideSalaryItem.js | 1 +
.../pages/salaryFile/taxAgentChangeList.js | 13 +----
.../pages/salaryItem/deleteSalaryItemModal.js | 1 +
pc4mobx/hrmSalary/pages/salaryItem/index.js | 1 +
.../socialSecurityBenefits/archives/index.js | 28 +++++++---
.../socialSecurityBenefits/programme/index.js | 53 ++++++++++---------
.../standingBook/components/abnormalDrawer.js | 3 +-
.../standingBookDetail/components/normal.js | 21 ++------
pc4mobx/hrmSalary/stores/archives.js | 25 ++++++---
pc4mobx/hrmSalary/stores/attendanceStore.js | 4 +-
pc4mobx/hrmSalary/stores/programme.js | 4 ++
pc4mobx/hrmSalary/stores/taxAgent.js | 3 +-
31 files changed, 150 insertions(+), 97 deletions(-)
diff --git a/pc4mobx/hrmSalary/components/importModal/index.js b/pc4mobx/hrmSalary/components/importModal/index.js
index de237445..e72c2608 100644
--- a/pc4mobx/hrmSalary/components/importModal/index.js
+++ b/pc4mobx/hrmSalary/components/importModal/index.js
@@ -1,6 +1,6 @@
import React from 'react';
import { WeaSteps, WeaDatePicker, WeaInput, WeaSelect } from 'ecCom';
-import { Upload, Icon, Modal, Row, Col, Button } from "antd";
+import { Upload, Icon, Modal, Row, Col, Button, message } from "antd";
import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx';
@@ -41,7 +41,12 @@ export default class ImportModal extends React.Component {
handleStep1Next() {
- this.props.setStep(1)
+ if(this.state.fileId) {
+ this.props.setStep(1)
+ } else {
+ message.warning("请上传文件")
+ }
+
}
handlePreviewDate() {
diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js
index bc738b9f..ea1d984c 100644
--- a/pc4mobx/hrmSalary/pages/calculate/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/index.js
@@ -260,7 +260,8 @@ export default class Calculate extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: salaryListPageInfo.total,
- current: salaryListPageInfo.pageNum
+ current: salaryListPageInfo.pageNum,
+ showTotal: (total) => `共 ${total} 条`,
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
index ce220c6d..d5afecde 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/compareDetail.js
@@ -206,7 +206,8 @@ export default class CompareDetail extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: comparisonResultPageInfo.total,
- current: comparisonResultPageInfo.pageNum
+ current: comparisonResultPageInfo.pageNum,
+ showTotal: (total) => `共 ${total} 条`,
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js
index e1581d95..13e31904 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js
@@ -154,6 +154,7 @@ export default class PlaceOnFileDetail extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: acctResultListPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: acctResultListPageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
index 97556ff7..fb470b84 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js
@@ -148,6 +148,7 @@ export default class SalaryDetail extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: acctResultListPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: acctResultListPageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js
index fcc6caf2..b8a084d1 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/userSure.js
@@ -18,6 +18,7 @@ export default class UserSure extends React.Component {
userListSearchValue: '',
}
this.id = ""
+ this.current = 1
}
componentWillMount() {
@@ -28,6 +29,7 @@ export default class UserSure extends React.Component {
salaryacctGetForm(id)
acctemployeeList({salaryAcctRecordId: id, employeeName: this.state.userListSearchValue, current: 1})
reducedemployeeList({salaryAcctRecordId: id, employeeName: this.state.userListSearchValue, current: 1})
+ this.current = 1
getSalarySobCycle(id)
}
@@ -39,6 +41,7 @@ export default class UserSure extends React.Component {
saveAcctemployee(this.id, idList).then(() => {
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
+ this.current = 1
checkTaxAgent(this.id)
})
}
@@ -67,8 +70,8 @@ export default class UserSure extends React.Component {
content: '确认删除',
onOk:() => {
deleteAcctemployee(this.id, selectedRowKeys).then(() => {
- reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
- acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
+ reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: this.current})
+ acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: this.current})
})
},
onCancel: () => {
@@ -102,14 +105,14 @@ export default class UserSure extends React.Component {
// 删除人员
handleDeleteItem = (record) => {
- const { calculateStore: {deleteAcctemployee}} = this.props;
+ const { calculateStore: {deleteAcctemployee, reducedemployeeList, acctemployeeList}} = this.props;
Modal.confirm({
title: '信息确认',
content: '确认删除',
onOk:() => {
deleteAcctemployee(this.id, [record.id]).then(() => {
- reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
- acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue,current: 1})
+ reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: this.current})
+ acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue,current: this.current})
})
},
onCancel: () => {
@@ -124,6 +127,7 @@ export default class UserSure extends React.Component {
refreshTaxAgent(this.id).then(() => {
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: 1})
acctemployeeList({salaryAcctRecordId: this.id , employeeName: this.state.userListSearchValue, current: 1})
+ this.current = 1
})
}
@@ -134,6 +138,7 @@ export default class UserSure extends React.Component {
// 核算人员范围分页
handleUserListPageChange(value) {
const { calculateStore: {acctemployeeList}} = this.props;
+ this.current = value;
acctemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: value})
}
@@ -141,6 +146,7 @@ export default class UserSure extends React.Component {
handleReducedemployeeListPageChange(value) {
const { calculateStore: { reducedemployeeList }} = this.props;
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: this.state.userListSearchValue, current: value})
+ this.current = value
}
// 搜索
@@ -148,8 +154,10 @@ export default class UserSure extends React.Component {
const { calculateStore: {acctemployeeList, reducedemployeeList}} = this.props;
if(this.state.selectedKey == 0) {
acctemployeeList({salaryAcctRecordId: this.id, employeeName: value, current: 1})
+ this.current = 1
} else {
reducedemployeeList({salaryAcctRecordId: this.id, employeeName: value, current: 1})
+ this.current = 1
}
}
@@ -265,6 +273,7 @@ export default class UserSure extends React.Component {
pagination={{
onChange: (value) => {this.handleUserListPageChange(value)},
total: acctemployeeListPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: acctemployeeListPageInfo.pageNum
}}
/>
@@ -276,6 +285,7 @@ export default class UserSure extends React.Component {
pagination={{
onChange: (value) => {this.handleReducedemployeeListPageChange(value)},
total: reducedemployeeListPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: reducedemployeeListPageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
index 738cd374..90226099 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/attendance/index.js
@@ -47,6 +47,7 @@ export default class Attendance extends React.Component {
this.state = {
value: "",
selectedKey: "0",
+ searchValue: "",
modalParam: {
salarySobId: "",
salaryYearMonth: moment(new Date()).format("YYYY-MM"), // 薪资所属月
@@ -146,6 +147,10 @@ export default class Attendance extends React.Component {
// 导入完成
handleFinish() {
this.setState({modalVisiable: false})
+ const { attendanceStore: { getAttendanceList, step }} = this.props;
+ if(step == 2) {
+ this.getAttendanceList({})
+ }
}
// 考情引用的列
@@ -198,6 +203,13 @@ export default class Attendance extends React.Component {
setImportResult({})
}
+ // 引用详情列表搜索
+ handleSearch(params) {
+ const { attendanceStore: {viewAttendQuote}} = this.props;
+ let request = {attendQuoteId: this.recordId, ...params}
+ viewAttendQuote(request)
+ }
+
render() {
const { attendanceStore } = this.props;
const { modalParam } = this.state;
@@ -333,9 +345,10 @@ export default class Attendance extends React.Component {
return (
导出
-
{this.setState({searchValue: v})}}
+ onSearch={(v) => {this.handleSearch({keyword: v})}}
/>
)
@@ -528,6 +541,7 @@ export default class Attendance extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: attendancePageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: attendancePageInfo.pageNum
}}
/>
@@ -562,6 +576,7 @@ export default class Attendance extends React.Component {
pagination={{
onChange: (value) => {this.handleFieldPageChange(value)},
total: fieldPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: fieldPageInfo.pageNum
}}
/>
@@ -598,7 +613,8 @@ export default class Attendance extends React.Component {
templateLink={() => {this.handleTemplateLinkClick()}}
renderFormComponent={() => renderFormComponent()}
visiable={this.state.modalVisiable}
- onCancel={() => { this.setState({modalVisiable: false})}}
+ onCancel={() => {
+ this.handleFinish()}}
/>
}
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
index f88551b2..f283ab35 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
@@ -104,6 +104,7 @@ export default class CumDeduct extends React.Component {
renderFormComponent() {
const { modalParam } = this.state
const { taxAgentStore: {taxAgentOption} } = this.props;
+ let options = [...taxAgentOption]
return (
@@ -121,6 +122,7 @@ export default class CumDeduct extends React.Component {
style={{ width: 200, display: "inline-block" }}
options={taxAgentOption}
value={modalParam.taxAgentId}
+ allowClear={true}
onChange={v => {
this.setState({ modalParam: {...modalParam, taxAgentId: v} });
}}
diff --git a/pc4mobx/hrmSalary/pages/declare/index.js b/pc4mobx/hrmSalary/pages/declare/index.js
index 20d6853b..cd86ec73 100644
--- a/pc4mobx/hrmSalary/pages/declare/index.js
+++ b/pc4mobx/hrmSalary/pages/declare/index.js
@@ -172,6 +172,7 @@ export default class Declare extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: pageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: pageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js b/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js
index f327b13b..7a015479 100644
--- a/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js
+++ b/pc4mobx/hrmSalary/pages/ledger/slideRefereUser.js
@@ -82,6 +82,7 @@ export default class SlideRefereUser extends React.Component {
`共 ${total} 条`,
current: userTableStore.pageNum
}}/>
diff --git a/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js b/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js
index 1ea1c48f..adc764a6 100644
--- a/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js
+++ b/pc4mobx/hrmSalary/pages/ledger/step3/AddSalaryItemModal.js
@@ -125,6 +125,7 @@ export default class AddSalaryItemModal extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: addSalaryItemPageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: addSalaryItemPageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/ledger/validRulesForm.js b/pc4mobx/hrmSalary/pages/ledger/validRulesForm.js
index aec1f23a..b3bcb7a3 100644
--- a/pc4mobx/hrmSalary/pages/ledger/validRulesForm.js
+++ b/pc4mobx/hrmSalary/pages/ledger/validRulesForm.js
@@ -98,6 +98,7 @@ export default class ValidRulesForm extends React.Component {
{
ledgerRuleList.list && `共 ${total} 条`,
current: ledgerRuleList.pageNum
}}/>
}
diff --git a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js
index 77ac81a6..abdd74c0 100644
--- a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js
+++ b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js
@@ -116,6 +116,7 @@ export default class SalarySendList extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: pageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: pageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js
index 6a98c505..e7146358 100644
--- a/pc4mobx/hrmSalary/pages/payroll/index.js
+++ b/pc4mobx/hrmSalary/pages/payroll/index.js
@@ -395,7 +395,7 @@ export default class Payroll extends React.Component {
this.state.editSlideVisible &&
{item.title}
item.render = (text, record) => {
return (
- {
+ {
this.handleSalaryAfterItemChange(record, value)
}}/>
)
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/editAgentModal.js b/pc4mobx/hrmSalary/pages/salaryFile/editAgentModal.js
index ea17b1f8..3b0765d2 100644
--- a/pc4mobx/hrmSalary/pages/salaryFile/editAgentModal.js
+++ b/pc4mobx/hrmSalary/pages/salaryFile/editAgentModal.js
@@ -17,7 +17,7 @@ export default class EditAgentModal extends React.Component {
request: {
salaryArchiveId: this.props.currentId,
effectiveTime: moment(new Date()).format("YYYY-MM-DD"),
- adjustReason: 'INIT',
+ adjustReason: '',
taxAgentId: ""
}
}
@@ -34,6 +34,7 @@ export default class EditAgentModal extends React.Component {
item.selected = false
return item;
})
+ console.log("adjustReasonList:", adjustReasonList);
return adjustReasonList
}
@@ -98,6 +99,7 @@ export default class EditAgentModal extends React.Component {
taxAgentId
} = request;
+
return (
{this.handlePageChange(value)},
total: pageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: pageInfo.pageNum
}}
scroll={{x: 2300}}
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js
index 8b399f57..7d5361d1 100644
--- a/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js
+++ b/pc4mobx/hrmSalary/pages/salaryFile/salaryItemChangeList.js
@@ -39,18 +39,6 @@ export default class SalaryItemChangeList extends React.Component {
if(singleSalaryItemList.columns) {
columns = [...singleSalaryItemList.columns]
}
- if(columns.length > 0) {
- columns.push({
- title: '操作',
- key: "cz",
- dataIndex: "cz",
- render: (text, record) => {
- return (
- {this.handleEdit(record)}}>编辑
- )
- }
- })
- }
return columns
}
@@ -70,6 +58,7 @@ export default class SalaryItemChangeList extends React.Component {
pagination={{
onChange: (value) => {this.handlePageChange(value)},
total: singleSalaryItemList.total,
+ showTotal: (total) => `共 ${total} 条`,
current: singleSalaryItemList.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/slideAgent.js b/pc4mobx/hrmSalary/pages/salaryFile/slideAgent.js
index a5400019..18ffede3 100644
--- a/pc4mobx/hrmSalary/pages/salaryFile/slideAgent.js
+++ b/pc4mobx/hrmSalary/pages/salaryFile/slideAgent.js
@@ -63,6 +63,7 @@ export default class SlideAgent extends React.Component {
pagination={{
onChange: (value) => {this.handlePageChange(value)},
total: taxAgentList.total,
+ showTotal: (total) => `共 ${total} 条`,
current: taxAgentList.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/slideSalaryItem.js b/pc4mobx/hrmSalary/pages/salaryFile/slideSalaryItem.js
index e7eb733b..244d1412 100644
--- a/pc4mobx/hrmSalary/pages/salaryFile/slideSalaryItem.js
+++ b/pc4mobx/hrmSalary/pages/salaryFile/slideSalaryItem.js
@@ -64,6 +64,7 @@ export default class SlideSalaryItem extends React.Component {
pagination={{
onChange: (value) => {this.handlePageChange(value)},
total: salaryItemList.total,
+ showTotal: (total) => `共 ${total} 条`,
current: salaryItemList.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js b/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js
index f3de5e25..c7ac48de 100644
--- a/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js
+++ b/pc4mobx/hrmSalary/pages/salaryFile/taxAgentChangeList.js
@@ -38,18 +38,6 @@ export default class TaxAgentChangeList extends React.Component {
if(singleTaxAgentList.columns) {
columns = [...singleTaxAgentList.columns]
}
- if(columns.length > 0) {
- columns.push({
- title: '操作',
- key: "cz",
- dataIndex: "cz",
- render: (text, record) => {
- return (
- {this.handleEdit(record)}}>编辑
- )
- }
- })
- }
return columns
}
@@ -71,6 +59,7 @@ export default class TaxAgentChangeList extends React.Component {
pagination={{
onChange: (value) => {this.handlePageChange(value)},
total: singleTaxAgentList.total,
+ showTotal: (total) => `共 ${total} 条`,
current: singleTaxAgentList.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/deleteSalaryItemModal.js b/pc4mobx/hrmSalary/pages/salaryItem/deleteSalaryItemModal.js
index b218f6de..2bc510b4 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/deleteSalaryItemModal.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/deleteSalaryItemModal.js
@@ -85,6 +85,7 @@ export default class DeleteSalaryItemModal extends React.Component {
pagination={{
onChange: (value) => {this.handleDataPageChange(value)},
total: canDeleteList.total,
+ showTotal: (total) => `共 ${total} 条`,
current: canDeleteList.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js
index 961a77da..3973f7f8 100644
--- a/pc4mobx/hrmSalary/pages/salaryItem/index.js
+++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js
@@ -309,6 +309,7 @@ export default class SalaryItem extends React.Component {
pagination={{
onChange: (value) => {this.handlePageChnage(value)},
total: pageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: pageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
index b09f48b2..821848aa 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js
@@ -113,14 +113,16 @@ export default class Archives extends React.Component {
// 导入
handleImport(params) {
- const { archivesStore: {importBatch}} = this.props;
+ const { archivesStore: {importBatch, initImportParams}} = this.props;
importBatch(params)
+
}
// 导入完成
handleFinish() {
- const { archivesStore: {getTableDatas}} = this.props;
- this.setState({importVisible: false})
+ const { archivesStore: {getTableDatas, initImportParams}} = this.props;
+ initImportParams()
+ this.setState({importVisible: false, step: 0})
getTableDatas()
}
@@ -137,11 +139,21 @@ export default class Archives extends React.Component {
this.setState({ selectedRowKeys });
}
+ // 关闭导入框
+ handleImportCancel() {
+ const { archivesStore: {initImportParams, getTableDatas }} = this.props;
+
+ initImportParams()
+ if(this.state.step == 2) {
+ getTableDatas()
+ }
+ this.setState({importVisible: false, step: 0});
+ }
render() {
const { archivesStore } = this.props;
const { selectedTab, selectedRowKeys } = this.state;
const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd,
- previewCurDataColumns, previewCurDataDataSource, importResult
+ previewCurDataColumns, previewCurDataDataSource, importResult, initImportParams
} = archivesStore;
const { dataSource, pageInfo } = archivesStore
if (!hasRight && !loading) { // 无权限处理
@@ -255,6 +267,7 @@ export default class Archives extends React.Component {
pagination={{
onChange: (value) => {this.handlePageChnage(value)},
total: pageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: pageInfo.pageNum
}}
/>
@@ -320,10 +333,13 @@ export default class Archives extends React.Component {
importResult={importResult}
onFinish={() => {this.handleFinish()}}
previewImport={(params) => {this.handlePreviewImport(params)}}
- importFile={(params) => {this.handleImport(params)}}
+ importFile={(params) => {this.handleImport(params);}}
templateLink={() => {this.handleTemplateLinkClick()}}
visiable={this.state.importVisible}
- onCancel={() => { this.setState({importVisible: false})}}
+ onCancel={() => {
+ this.handleImportCancel()
+
+ }}
/>
}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
index d9dbf5c6..d2b20c8c 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
@@ -274,30 +274,10 @@ export default class Programme extends React.Component {
}
- const renderSearchOperationItem = () => {
- return
-
-
- {
- selectedKey == "custom" && {
- setCustomSelectkey(v)
- getCustomCategoryList(v)
- }}
- />
- }
-
- }
+ // const renderSearchOperationItem = () => {
+ // const { programmeStore: {setCustomSelectkey, getCustomCategoryList}} = this.props;
+ // return
+ // }
const handleOnSave = () => {
const { programmeStore } = this.props
@@ -362,7 +342,29 @@ export default class Programme extends React.Component {
>
+
+
+ {
+ selectedKey == "custom" && {
+ setCustomSelectkey(v)
+ getCustomCategoryList(v)
+ console.log("v:", v)
+ }}
+ />
+ }
+
}
onChange={(v) => {
setSelectedKey(v)
@@ -396,6 +398,7 @@ export default class Programme extends React.Component {
pagination={{
onChange: (value) => {this.handlePageChange(value)},
total: tablePageInfo.total,
+ showTotal: (total) => `共 ${total} 条`,
current: tablePageInfo.pageNum
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/abnormalDrawer.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/abnormalDrawer.js
index 75c4fe50..226b4cf3 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/abnormalDrawer.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBook/components/abnormalDrawer.js
@@ -62,7 +62,8 @@ export default class AbnormalDrawer extends Component {
loading={loading}
pagination={{
onChange: (value) => {this.props.onPageChange(value)},
- total: this.props.total
+ total: this.props.total,
+ showTotal: (total) => `共 ${total} 条`,
}}
rowSelection={rowSelection}
scroll={{ x: 1200 }}
diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
index 251e02bf..750261a9 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/standingBookDetail/components/normal.js
@@ -133,20 +133,15 @@ export default class NormalIndex extends Component {
...it,
width: 150,
fixed: "left",
+
render: (text, r) => {
const { userName, employeeId } = r;
return (
-
- window.pointerXY(e)}
- title={userName}>
- {userName}
-
-
+ {userName}
);
},
};
+ it.title = "姓名"
}
return {
...it,
@@ -179,17 +174,11 @@ export default class NormalIndex extends Component {
render: (text, r) => {
const { userName, employeeId } = r;
return (
-
- window.pointerXY(e)}
- title={userName}>
- {userName}
-
-
+ {userName}
);
},
};
+ it.title = "姓名"
}
return {
...it,
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index 6ff15de0..0b764b7e 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -39,6 +39,14 @@ export class ArchivesStore {
@observable previewCurDataDataSource = []
@observable importResult = {}
+ @action
+ initImportParams = () => {
+ this.previewCurDataList = {};
+ this.previewCurDataColumns = [];
+ this.previewCurDataDataSource = [];
+ this.importResult = {}
+ }
+
// ** 设置导入参数 start **
@action
@@ -232,13 +240,18 @@ export class ArchivesStore {
// 导入
@action
importBatch = (params) => {
- API.importBatch(params).then(res => {
- if(res.status) {
- this.importResult = res.data
- } else {
- message.error(res.errormsg || "导入失败")
- }
+ return new Promise((resolve, reject) => {
+ API.importBatch(params).then(res => {
+ if(res.status) {
+ this.importResult = res.data
+ resolve();
+ } else {
+ message.error(res.errormsg || "导入失败")
+ reject();
+ }
+ })
})
+
}
// 导出档案
diff --git a/pc4mobx/hrmSalary/stores/attendanceStore.js b/pc4mobx/hrmSalary/stores/attendanceStore.js
index bd9f9427..b8609544 100644
--- a/pc4mobx/hrmSalary/stores/attendanceStore.js
+++ b/pc4mobx/hrmSalary/stores/attendanceStore.js
@@ -408,8 +408,8 @@ export class AttendanceStore {
// 考勤数据详情
@action
- viewAttendQuote = (ids) => {
- API.viewAttendQuote(ids).then(res => {
+ viewAttendQuote = (params = {}) => {
+ API.viewAttendQuote(params).then(res => {
if(res.status) {
this.attendQuoteDetailPageInfo = res.data.pageInfo
this.attendQuoteDetailTableStore.getDatas(res.data.dataKey.datas)
diff --git a/pc4mobx/hrmSalary/stores/programme.js b/pc4mobx/hrmSalary/stores/programme.js
index d69d4f2a..d8614d19 100644
--- a/pc4mobx/hrmSalary/stores/programme.js
+++ b/pc4mobx/hrmSalary/stores/programme.js
@@ -33,6 +33,10 @@ export class ProgrammeStore {
@observable tableColumns = [];
@observable tablePageInfo = {};
+
+ @action
+ setCustomSelectkey = customSelectkey => this.customSelectkey = customSelectkey
+
@action
setCustomRequest = customRequest => this.customRequest = customRequest
diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js
index ab00ab2d..a919cdab 100644
--- a/pc4mobx/hrmSalary/stores/taxAgent.js
+++ b/pc4mobx/hrmSalary/stores/taxAgent.js
@@ -123,7 +123,8 @@ export class TaxAgentStore {
return new Promise((resolve, reject) => {
API.getTaxAgentSelectList().then(action(res => {
if(res.status) {
- this.taxAgentOption = res.data.list.map(item => {return {key: item.id, showname: item.content}})
+ let options = res.data.list.map(item => {return {key: item.id, showname: item.content}})
+ this.taxAgentOption = options
resolve()
} else {
message.error(res.errormsg || "获取失败")
From c5b401f9f4f51b80be12223bde4a7ce3e7de2ede Mon Sep 17 00:00:00 2001
From: MustangDeng <670124965@qq.com>
Date: Tue, 31 May 2022 16:21:25 +0800
Subject: [PATCH 2/6] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pages/dataAcquisition/cumDeduct/index.js | 11 ++++++++---
.../pages/dataAcquisition/cumSituation/index.js | 7 ++++++-
.../pages/dataAcquisition/otherDeduct/index.js | 7 ++++++-
pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js | 2 +-
pc4mobx/hrmSalary/stores/ledger.js | 2 +-
pc4mobx/hrmSalary/util/options.js | 10 ++++++++++
6 files changed, 32 insertions(+), 7 deletions(-)
create mode 100644 pc4mobx/hrmSalary/util/options.js
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
index f283ab35..be624ed6 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/index.js
@@ -15,6 +15,7 @@ import CustomTab from '../../../components/customTab';
import ContentWrapper from '../../../components/contentWrapper';
import ImportModal from '../../../components/importModal'
import { columns, dataSource, modalColumns } from './columns';
+import { optionAddAll } from '../../../util/options'
const { MonthPicker } = DatePicker;
@@ -88,11 +89,16 @@ export default class CumDeduct extends React.Component {
this.state.inited && {
this.setState({taxAgentId: v})
- getTableDatas({taxAgentId: v, declareMonth: [monthValue]})
+ if(v == "All") {
+ getTableDatas({taxAgentId: "", declareMonth: [monthValue]})
+ } else {
+ getTableDatas({taxAgentId: v, declareMonth: [monthValue]})
+ }
+
}}
/>
}
@@ -104,7 +110,6 @@ export default class CumDeduct extends React.Component {
renderFormComponent() {
const { modalParam } = this.state
const { taxAgentStore: {taxAgentOption} } = this.props;
- let options = [...taxAgentOption]
return (
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
index 80fda3d4..e62b8156 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js
@@ -15,6 +15,7 @@ import CustomTab from '../../../components/customTab';
import ContentWrapper from '../../../components/contentWrapper';
import ImportModal from '../../../components/importModal'
import { columns, dataSource, modalColumns } from './columns';
+import { optionAddAll } from '../../../util/options';
const { MonthPicker } = DatePicker;
@@ -85,10 +86,14 @@ export default class CumSituation extends React.Component {
this.state.inited && {
this.setState({taxAgentId: v})
+ let taxAgentId = v;
+ if(v == "All") {
+ taxAgentId = ""
+ }
getTableDatas({ taxAgentId: v, taxYearMonth: [monthValue]})
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
index e1958e8c..79421de4 100644
--- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
+++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/index.js
@@ -23,6 +23,7 @@ import "./index.less"
import SlideModalTitle from '../../../components/slideModalTitle';
import EditSlideContent from './editSlideContent';
+import { optionAddAll } from '../../../util/options';
@inject('otherDeductStore', "taxAgentStore")
@@ -85,10 +86,14 @@ export default class OtherDeduct extends React.Component {
this.state.inited && {
this.setState({taxAgentId: v})
+ let taxAgentId = v
+ if(v == "All") {
+ taxAgentId = ""
+ }
getTableDatas({ taxAgentId: v, declareMonth: [monthValue]})
}}
/>
diff --git a/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js
index 3c7643a6..9414cef3 100644
--- a/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js
+++ b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js
@@ -118,7 +118,7 @@ export default class SalaryItemForm extends React.Component {
{
itemGroups && itemGroups.map(item => {
if(item.items) {
- item.items.map(i => {i.key = i.id})
+ item.items && item.items.map(i => {i.key = i.id})
return (
{this.handleItemDataSourceChange(dataSource, item)}} title={item.name} onGroupDelete={() => {this.handleGroupDelete(item)}} onTitleChange={(value) => {this.handleItemTitleChange(item, value)}} onChange={(dataSource) => {this.handleCanMoveItemChange(dataSource, item)}}/>
)
diff --git a/pc4mobx/hrmSalary/stores/ledger.js b/pc4mobx/hrmSalary/stores/ledger.js
index 33279240..3d269f48 100644
--- a/pc4mobx/hrmSalary/stores/ledger.js
+++ b/pc4mobx/hrmSalary/stores/ledger.js
@@ -449,7 +449,7 @@ export class LedgerStore {
listSalaryItem = (searchValue = "", current = 1) => {
let excludeIds = []
this.itemGroups.map(item => {
- item.items.map(i => {
+ item.items && item.items.map(i => {
excludeIds.push(i.salaryItemId)
})
})
diff --git a/pc4mobx/hrmSalary/util/options.js b/pc4mobx/hrmSalary/util/options.js
new file mode 100644
index 00000000..670d5dee
--- /dev/null
+++ b/pc4mobx/hrmSalary/util/options.js
@@ -0,0 +1,10 @@
+// 添加全部选项
+export const optionAddAll = (options) => {
+ let results = [...options];
+ results.unshift({
+ key: "All",
+ showname: "全部",
+ selected: false
+ })
+ return results;
+}
\ No newline at end of file
From 55f732c1fc8a2f2f5ace582272e15ba78590e392 Mon Sep 17 00:00:00 2001
From: MustangDeng <670124965@qq.com>
Date: Tue, 31 May 2022 16:37:35 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E5=8F=B0=E8=B4=A6=E5=BD=92=E6=A1=A3?=
=?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=88=B7=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js | 2 +-
.../pages/socialSecurityBenefits/standingBook/index.js | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js
index 4743dfb1..b1067402 100644
--- a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js
+++ b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js
@@ -156,7 +156,7 @@ export default class CanMoveItem extends React.Component {
{
- this.state.showContent &&
+ this.state.showContent &&
}
{
this.state.addItemVisible && {
siaccountFile({ billMonth }).then((res) => {
- console.log("res", res);
+ const { current } = this.state;
+ this.getCommonList({ ...this.state.tableParams, current });
});
},
onCancel: () => {},
From 936ac9bd3fa4104af36cd1be7d4c647fa9f7a92b Mon Sep 17 00:00:00 2001
From: MustangDeng <670124965@qq.com>
Date: Tue, 31 May 2022 18:51:23 +0800
Subject: [PATCH 4/6] =?UTF-8?q?=E5=B7=A5=E8=B5=84=E5=8D=95bug=E4=BF=AE?=
=?UTF-8?q?=E5=A4=8D?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../hrmSalary/pages/ledger/salaryItemForm.js | 5 +-
.../pages/ledger/step3/canMoveItem.js | 13 ++-
.../pages/payroll/payrollGrant/index.js | 31 ++++++-
.../payroll/payrollGrant/payrollGrantModal.js | 83 ++++++++++++++++--
.../payrollGrant/payrollWithdrawModal.js | 86 +++++++++++++++++--
pc4mobx/hrmSalary/stores/payroll.js | 30 +++++--
6 files changed, 222 insertions(+), 26 deletions(-)
diff --git a/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js
index 9414cef3..0b583f47 100644
--- a/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js
+++ b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js
@@ -120,7 +120,10 @@ export default class SalaryItemForm extends React.Component {
if(item.items) {
item.items && item.items.map(i => {i.key = i.id})
return (
- {this.handleItemDataSourceChange(dataSource, item)}} title={item.name} onGroupDelete={() => {this.handleGroupDelete(item)}} onTitleChange={(value) => {this.handleItemTitleChange(item, value)}} onChange={(dataSource) => {this.handleCanMoveItemChange(dataSource, item)}}/>
+ {this.handleItemDataSourceChange(dataSource, item)}} title={item.name}
+ onGroupDelete={() => {this.handleGroupDelete(item)}}
+ onTitleChange={(value) => {this.handleItemTitleChange(item, value)}} onChange={(dataSource) => {this.handleCanMoveItemChange(dataSource, item)}}/>
)
}
return ""
diff --git a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js
index b1067402..8513fb91 100644
--- a/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js
+++ b/pc4mobx/hrmSalary/pages/ledger/step3/canMoveItem.js
@@ -123,7 +123,10 @@ export default class CanMoveItem extends React.Component {
onCancel: () => {
},
});
-
+ }
+
+ handleTableDrop = (datas) => {
+ console.log("datas:", datas);
}
render() {
@@ -156,7 +159,13 @@ export default class CanMoveItem extends React.Component {
{
- this.state.showContent &&
+ this.state.showContent &&
}
{
this.state.addItemVisible &&
@@ -169,7 +187,7 @@ export default class PayrollGrant extends React.Component {
setShowSearchAd={bool => setGrantListShowSearchAd(bool)} //高级搜索面板受控
searchsAd={getSearchs(grantListConditionForm, toJS(grantListCondition), 2)} // 高级搜索内部数据
// buttonsAd={adBtn} // 高级搜索内部按钮
- onSearch={getInfoList} // 点搜索按钮时的回调
+ onSearch={() => this.handleSearch()} // 点搜索按钮时的回调
// searchsAdQuick={this.getSearchsAdQuick()}
onSearchChange={v => grantListConditionForm.updateFields({ username: v })} // 在搜索框中输入的文字改变时的回调: 这里需要同步高级搜索和外部搜索框的值
searchsBaseValue={grantListConditionForm.getFormParams().username} // 外部input搜索值受控: 这里和高级搜索的requestname同步
@@ -199,7 +217,14 @@ export default class PayrollGrant extends React.Component {
-
+ {this.handleDataPageChange(value)},
+ total: salaryGrantPageInfo.total,
+ current: salaryGrantPageInfo.pageNum,
+ showTotal: (total) => `共 ${total} 条`,
+ }}
+ />
{
this.state.payrollGrantVisible && {
+ this.setState({
+ selectedRowKeys: value
+ })
+ }
+
+
+ // 发放
+ fetchGrantPayRoll(payload) {
+ const { payrollStore: { grantPayroll }} = this.props;
+ grantPayroll(payload).then(() => {
+ const { payrollStore: {getInfoList}} = this.props;
+ getInfoList({
+ salarySendId:this.props.sendId
+ })
+ this.props.onCancel && this.props.onCancel()
+ })
+ }
+
+ handleMenuClick(e) {
+ const { selectedRowKeys } = this.state;
+ const { payrollStore: { grantPayroll }} = this.props;
+ if(selectedRowKeys.length == 0) {
+ message.warning("未选择条目");
+ return
+ }
+ this.fetchGrantPayRoll({ids: selectedRowKeys, salarySendId: this.props.sendId})
+ }
+
+ handleGrantAll() {
+ this.fetchGrantPayRoll({salarySendId: this.props.sendId})
+ }
+
+ handleSearch(value) {
+ const { payrollStore: { batchSendInfoList } } = this.props;
+ batchSendInfoList({salarySendId: this.props.sendId, keyword: value, current: this.state.current})
+ }
+
+
+ // 分页
+ handleDataPageChange(value) {
+ this.setState({current: value})
+ const { payrollStore: { batchSendInfoList } } = this.props;
+ batchSendInfoList({salarySendId: this.props.sendId, current: value})
+ }
+
render() {
const menu = (
-