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 = ( 导出所选 diff --git a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js index d185433a..b07dd086 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js @@ -32,11 +32,10 @@ export default class CustomSalaryItemSlide extends React.Component { } render() { - const { editable, request } = this.props; + const { editable, request, isAdd } = this.props; const { name, useDefault, useInEmployeeSalary, roundingMode, pattern, valueType, description, dataType, formulaContent, formulaId } = request; const { formalModalVisible } = this.state; - console.log("request: ", request); return (
@@ -78,7 +77,7 @@ export default class CustomSalaryItemSlide extends React.Component { 字段类型 - {this.handleChange({dataType: value})}} style={{width: "200px"}}/> + {this.handleChange({dataType: value})}} style={{width: "200px"}}/> @@ -106,7 +105,7 @@ export default class CustomSalaryItemSlide extends React.Component { 取值方式 - { + { this.handleChange({valueType: e.target.value}) }}> 输入 diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index 3fbb71b1..402a1851 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -67,7 +67,7 @@ export default class FormalFormModal extends React.Component { this.setState({ value }) - + console.log("value: ", value); } // 获取光标位置 @@ -160,6 +160,7 @@ export default class FormalFormModal extends React.Component { cursorPos += str.length; obj.selectionStart = obj.selectionEnd = cursorPos; obj.focus(); + this.setState({value: obj.value}) } else { obj.value += str; } diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index 3d8d9333..bb01fe07 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -330,7 +330,7 @@ export default class SalaryItem extends React.Component { title={ } - content={ {handleSaveSlideChange(value)}}/>} + content={ {handleSaveSlideChange(value)}}/>} onClose={() => setEditSlideVisible(false)} showMask={true} closeMaskOnClick={() => setEditSlideVisible(false)} /> diff --git a/pc4mobx/hrmSalary/pages/salaryItem/options.js b/pc4mobx/hrmSalary/pages/salaryItem/options.js index c8825781..64fed561 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/options.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/options.js @@ -55,14 +55,14 @@ export const patternOptions = [ ] export const dataTypeOptions = [ + { + key: "number", + showname: "数值", + selected: false + }, { key: "string", showname: "字符", selected: false }, - { - key: "number", - showname: "数值", - selected: false - } ] \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js index e6deb132..7146b8b8 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/systemSalaryItemModal.js @@ -49,7 +49,7 @@ export default class SystemSalaryItemModal extends React.Component { }}/>
-
+
公积金方案名称: - this.handleFormChange({fundName: value})}> { items && items[0].items &&items[0].items[0] && items[0].items[0].options.map(item => ( diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index 71c42dd3..65558437 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -37,6 +37,8 @@ export default class Archives extends React.Component { modalParam: {}, step: 0, } + + this.record = {} } componentWillMount() { @@ -45,6 +47,7 @@ export default class Archives extends React.Component { } handleEdit(record) { + this.record = record this.setState({employeeId: record.employeeId, editSlideVisible: true}) } @@ -248,13 +251,13 @@ export default class Archives extends React.Component { selectedTab == 0 && } { - selectedTab == 1 && + selectedTab == 1 && } { - selectedTab == 2 && + selectedTab == 2 && } { - selectedTab == 3 && + selectedTab == 3 && }
} diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less index 7a7ea16e..4179dfd5 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.less @@ -5,5 +5,7 @@ overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + margin-left: 10px; + margin-right: 10px; } } \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js index 612d2a58..27c42c9c 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/otherForm.js @@ -1,7 +1,7 @@ import React from 'react' import { inject, observer } from 'mobx-react'; import { Row, Col, Select } from 'antd' -import { WeaDatePicker } from "ecCom"; +import { WeaDatePicker, WeaInput } from "ecCom"; import GroupCard from '../../../components/groupCard' import "./index.less" const { Option } = Select @@ -17,8 +17,9 @@ export default class OtherForm extends React.Component { } componentWillMount() { - const { archivesStore: { getBaseForm }} = this.props; - getBaseForm(this.props.employeeId, "OTHER") + const { archivesStore: { getBaseForm, getPaymentForm}} = this.props; + getBaseForm(this.props.employeeId, "OTHER"); + getPaymentForm(this.props.employeeId, "OTHER", this.props.record.otherSchemeId) } // 表单变化 diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js index 3d542a1f..7438dc6b 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/socialSecurityForm.js @@ -13,8 +13,9 @@ const { Option } = Select export default class SocialSecurityForm extends React.Component { componentWillMount() { const { archivesStore } = this.props; - const { getBaseForm } = archivesStore + const { getBaseForm, getPaymentForm } = archivesStore getBaseForm(this.props.employeeId, "SOCIAL_SECURITY") + getPaymentForm(this.props.employeeId, "SOCIAL_SECURITY", this.props.record.siSchemeId) } // 表单变化 diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js index 173a5724..96ea65c9 100644 --- a/pc4mobx/hrmSalary/stores/archives.js +++ b/pc4mobx/hrmSalary/stores/archives.js @@ -124,9 +124,9 @@ export class ArchivesStore { } else if(welfareTypeEnum == "OTHER") { this.otherForm = res.data } - if(res.data && res.data.data && res.data.data.id) { - this.getPaymentForm(employeeId, welfareTypeEnum, res.data.data.id) - } + // if(res.data && res.data.data && res.data.data.id) { + // this.getPaymentForm(employeeId, welfareTypeEnum, res.data.data.id) + // } } else { message.error(res.errormsg || "获取失败") } @@ -173,8 +173,8 @@ export class ArchivesStore { // 导入模板下载 @action - exportTempateDownload = (ids = "") => { - API.exportCurData(ids) + exportTempateDownload = (params = {}) => { + API.exportCurData(params) } // 导入预览 diff --git a/pc4mobx/hrmSalary/stores/salaryItem.js b/pc4mobx/hrmSalary/stores/salaryItem.js index a0c2b899..82569fb4 100644 --- a/pc4mobx/hrmSalary/stores/salaryItem.js +++ b/pc4mobx/hrmSalary/stores/salaryItem.js @@ -27,7 +27,7 @@ export class SalaryItemStore { roundingMode: 0, pattern: 0, valueType: 1, - dataType: "string", + dataType: "number", description: "" } @@ -59,7 +59,7 @@ export class SalaryItemStore { roundingMode: 0, pattern: 0, valueType: "1", - dataType: "string", + dataType: "number", description: "" }