+
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)
From 9517e97badf9a106b8bd0dbe38ea5c0665979444 Mon Sep 17 00:00:00 2001
From: MustangDeng <670124965@qq.com>
Date: Mon, 9 May 2022 14:23:43 +0800
Subject: [PATCH 2/2] =?UTF-8?q?=E7=A6=8F=E5=88=A9=E6=A1=A3=E6=A1=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pc4mobx/hrmSalary/apis/welfareArchive.js | 11 ++++++++--
.../components/importModal/modalStep2.js | 3 +--
.../calculateDetail/placeOnFileDetail.js | 21 ++++++++++++++++---
.../pages/salaryItem/customSalaryItemSlide.js | 7 +++----
.../pages/salaryItem/formalFormModal.js | 3 ++-
pc4mobx/hrmSalary/pages/salaryItem/index.js | 4 ++--
pc4mobx/hrmSalary/pages/salaryItem/options.js | 10 ++++-----
.../pages/salaryItem/systemSalaryItemModal.js | 2 +-
.../archives/accumulationFundForm.js | 5 +++--
.../socialSecurityBenefits/archives/index.js | 9 +++++---
.../archives/index.less | 2 ++
.../archives/otherForm.js | 7 ++++---
.../archives/socialSecurityForm.js | 3 ++-
pc4mobx/hrmSalary/stores/archives.js | 10 ++++-----
pc4mobx/hrmSalary/stores/salaryItem.js | 4 ++--
15 files changed, 65 insertions(+), 36 deletions(-)
diff --git a/pc4mobx/hrmSalary/apis/welfareArchive.js b/pc4mobx/hrmSalary/apis/welfareArchive.js
index c8ba59f9..8e6bdea7 100644
--- a/pc4mobx/hrmSalary/apis/welfareArchive.js
+++ b/pc4mobx/hrmSalary/apis/welfareArchive.js
@@ -50,8 +50,15 @@ export const getImportDocumentParams = params => {
};
// 导入档案- 导出现有数据
-export const exportCurData = ids => {
- fetch('/api/bs/hrmsalary/scheme/template/export?ids=' + ids).then(res => res.blob().then(blob => {
+export const exportCurData = params => {
+ 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);
diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep2.js b/pc4mobx/hrmSalary/components/importModal/modalStep2.js
index 7fd80249..d6b343a6 100644
--- a/pc4mobx/hrmSalary/components/importModal/modalStep2.js
+++ b/pc4mobx/hrmSalary/components/importModal/modalStep2.js
@@ -12,13 +12,12 @@ export default class ModalStep2 extends React.Component {
return (
)
}
diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js
index 12e09285..88dcf357 100644
--- a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js
+++ b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js
@@ -24,6 +24,7 @@ export default class PlaceOnFileDetail extends React.Component {
slideVisiable: false,
}
}
+
componentWillMount() {
let id = getQueryString("id");
const { calculateStore: { getSalarySobCycle, acctResultList } } = this.props;
@@ -34,9 +35,22 @@ export default class PlaceOnFileDetail extends React.Component {
// 获取列表的列
getColumns() {
- const { calculateStore: {acctResultListTableStore }} = this.props;
- let columns = acctResultListTableStore.columns ? [...acctResultListTableStore.columns] : [];
- columns = columns.filter(item => 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 = (