diff --git a/pc4mobx/hrmSalary/pages/calculate/index.js b/pc4mobx/hrmSalary/pages/calculate/index.js
index 39eab4e9..916f6417 100644
--- a/pc4mobx/hrmSalary/pages/calculate/index.js
+++ b/pc4mobx/hrmSalary/pages/calculate/index.js
@@ -2,7 +2,7 @@ import React from 'react';
import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx';
-import { Button, Table, DatePicker, Dropdown, Menu } from 'antd';
+import { Button, Table, DatePicker, Dropdown, Menu, Modal } from 'antd';
import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable, WeaDatePicker, WeaInputSearch } from 'ecCom';
@@ -26,6 +26,8 @@ export default class Calculate extends React.Component {
value: "",
selectedKey: "0",
searchValue: "",
+ startDate: moment(new Date()).format("YYYY-MM"),
+ endDate: moment(new Date()).format("YYYY-MM"),
columns: columns.map(item => {
if(item.dataIndex == 'cz') {
item.render = () => (
@@ -66,6 +68,10 @@ export default class Calculate extends React.Component {
handleRangePickerChange(value) {
let range = value.map(item => moment(item).format("YYYY-MM"))
const { calculateStore: {getSalaryAcctList} } = this.props;
+ this.setState({
+ startDate: range[0],
+ endDate: range[1]
+ })
getSalaryAcctList({
name: this.state.searchValue,
startMonthStr: range[0],
@@ -80,10 +86,18 @@ export default class Calculate extends React.Component {
// 列表项删除回调
handleDeleteItem(record) {
- const { calculateStore: {deleteSalaryacct}} = this.props;
- deleteSalaryacct([record.id]).then(() => {
- this.handleSearch(this.state.searchValue)
- })
+ Modal.confirm({
+ title: '信息确认',
+ content: '确认删除',
+ onOk:() => {
+ const { calculateStore: {deleteSalaryacct}} = this.props;
+ deleteSalaryacct([record.id]).then(() => {
+ this.handleSearch(this.state.searchValue)
+ })
+ },
+ onCancel: () => {
+ },
+ });
}
// 列表项归档回调
@@ -229,7 +243,6 @@ export default class Calculate extends React.Component {
/>
-
{
this.state.baseFormVisible && {
this.setState({modalParam: {...modalParam, salaryYearMonth: value}})
+ this.handleLoadCycle(value, this.state.modalParam.salarySobId)
}}
/>
@@ -283,6 +296,7 @@ export default class Attendance extends React.Component {
)
}
diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js
index d4258378..173a5724 100644
--- a/pc4mobx/hrmSalary/stores/archives.js
+++ b/pc4mobx/hrmSalary/stores/archives.js
@@ -32,6 +32,12 @@ export class ArchivesStore {
@observable otherPaymentForm = {}; // 其他福利表单
@observable pageInfo = {};
+ // 导入预览
+ @observable previewCurDataList = {}
+ @observable previewCurDataColumns = []
+ @observable previewCurDataDataSource = []
+ @observable importResult = {}
+
// 社保表单
@action
@@ -165,4 +171,49 @@ export class ArchivesStore {
})
}
+ // 导入模板下载
+ @action
+ exportTempateDownload = (ids = "") => {
+ API.exportCurData(ids)
+ }
+
+ // 导入预览
+ @action
+ previewCurData = (params) => {
+ API.previewCurData(params).then(res => {
+ if(res.status) {
+ this.previewCurDataList = res.data
+ this.previewCurDataColumns = res.data.headers.map((item, index) => {
+ let column = {}
+ column.title = item;
+ column.dataIndex = "" + index;
+ column.key = index + ""
+ return column
+ })
+
+ this.previewCurDataDataSource = res.data.list.map((item) => {
+ let data = {}
+ item.map((i, index) => {
+ data[index + ''] = i
+ })
+ return data
+ })
+
+ } else {
+ message.error(res.errormsg || "获取失败");
+ }
+ })
+ }
+
+ // 导入
+ @action
+ importBatch = (params) => {
+ API.importBatch(params).then(res => {
+ if(res.status) {
+ this.importResult = res.data
+ } else {
+ message.error(res.errormsg || "导入失败")
+ }
+ })
+ }
}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/stores/attendanceStore.js b/pc4mobx/hrmSalary/stores/attendanceStore.js
index ba0ca649..7d624060 100644
--- a/pc4mobx/hrmSalary/stores/attendanceStore.js
+++ b/pc4mobx/hrmSalary/stores/attendanceStore.js
@@ -46,6 +46,8 @@ export class AttendanceStore {
@observable attendQuoteDetailPageInfo = {}; // 详情列表分页数据
@observable attendQuoteDetailTableStore = new TableStore(); // 详情列表表头数据
+ @observable cycle = {};
+
@action
searchFieldSettingList = (value) => {
if(value != "") {
@@ -413,6 +415,18 @@ export class AttendanceStore {
}
})
})
-
+ }
+
+ // 根据所属月和账套获取周期
+ @action
+ getSalaryCycleAndAttendCycle = (salaryYearMonthStr, salarySobId) => {
+ API.getSalaryCycleAndAttendCycle({salaryYearMonthStr, salarySobId}).then(res => {
+ if(res.status) {
+ this.cycle = res.data
+ } else {
+ message.error(res.errormsg || "获取失败")
+ }
+
+ })
}
}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/stores/ledger.js b/pc4mobx/hrmSalary/stores/ledger.js
index c12886b4..ff4411ed 100644
--- a/pc4mobx/hrmSalary/stores/ledger.js
+++ b/pc4mobx/hrmSalary/stores/ledger.js
@@ -102,7 +102,8 @@ export class LedgerStore {
}
let item = {
fieldId,
- sortedIndex
+ sortedIndex,
+ canDelete: true
}
let result = [...this.empFields]
result.push(item)