diff --git a/pc4mobx/hrmSalary/apis/attendance.js b/pc4mobx/hrmSalary/apis/attendance.js
index bd61c9a3..710233df 100644
--- a/pc4mobx/hrmSalary/apis/attendance.js
+++ b/pc4mobx/hrmSalary/apis/attendance.js
@@ -228,3 +228,9 @@ export const viewAttendQuote = (ids) => {
body: JSON.stringify(ids)
}).then(res => res.json())
}
+
+// 根据所属月和账套获取周期
+export const getSalaryCycleAndAttendCycle = (params) => {
+ return WeaTools.callApi('/api/bs/hrmsalary/attendQuote/getSalaryCycleAndAttendCycle', 'get', params);
+
+}
diff --git a/pc4mobx/hrmSalary/apis/welfareArchive.js b/pc4mobx/hrmSalary/apis/welfareArchive.js
index 8d3d13f6..8e6bdea7 100644
--- a/pc4mobx/hrmSalary/apis/welfareArchive.js
+++ b/pc4mobx/hrmSalary/apis/welfareArchive.js
@@ -51,5 +51,46 @@ export const getImportDocumentParams = params => {
// 导入档案- 导出现有数据
export const exportCurData = params => {
- return WeaTools.callApi('/api/bs/hrmsalary/exportTemplate', 'get', params);
-};
\ No newline at end of file
+ fetch('/api/bs/hrmsalary/scheme/template/export',{
+ method: 'POST',
+ mode: 'cors',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.blob().then(blob => {
+ var filename=`福利档案模板.xlsx`
+ var a = document.createElement('a');
+ var url = window.URL.createObjectURL(blob);
+ a.href = url;
+ a.download = filename;
+ a.click();
+ window.URL.revokeObjectURL(url);
+ }))
+};
+
+// 导入档案-预览
+export const previewCurData = (params) => {
+ return fetch('/api/bs/hrmsalary/scheme/preview', {
+ method: 'POST',
+ mode: 'cors',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json())
+}
+
+// 档案导入
+export const importBatch = (params) => {
+ return fetch('/api/bs/hrmsalary/scheme/importBatch', {
+ method: 'POST',
+ mode: 'cors',
+ headers: {
+ 'Content-Type': 'application/json'
+ },
+ body: JSON.stringify(params)
+ }).then(res => res.json())
+}
+
+
diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep2.js b/pc4mobx/hrmSalary/components/importModal/modalStep2.js
index dc3589f9..d6b343a6 100644
--- a/pc4mobx/hrmSalary/components/importModal/modalStep2.js
+++ b/pc4mobx/hrmSalary/components/importModal/modalStep2.js
@@ -11,14 +11,13 @@ export default class ModalStep2 extends React.Component {
const {dataSource, columns} = this.props;
return (
-
)
}
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 && item.hide == "false")
+ const { calculateStore: {acctResultListTableStore, acctResultListColumns }} = this.props;
+ let columns = acctResultListColumns ? acctResultListColumns : []
+ columns = columns.filter(item => item.hide == "FALSE").map(item => {
+ let result = {...item}
+ result.title = item.text;
+ result.dataIndex = item.column
+ result.oldWidth = result.width;
+ result.width = null;
+ if(result.children) {
+ result.children.map(child => {
+ child.title = child.text
+ child.dataIndex = child.column
+ })
+ }
+ return result;
+ })
columns.push({
title: '操作',
key: "cz",
@@ -55,6 +69,7 @@ export default class PlaceOnFileDetail extends React.Component {
const { calculateStore } = this.props;
const { baseSalarySobCycle, acctResultListDateSource, acctResultListColumns } = calculateStore
+
const menu = (