From 32d0578be2a94b198f57cbe6a255663cadbda334 Mon Sep 17 00:00:00 2001 From: MustangDeng <670124965@qq.com> Date: Sat, 2 Apr 2022 17:34:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=96=AA=E8=B5=84=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pc4mobx/hrmSalary/apis/archive.js | 17 ++- pc4mobx/hrmSalary/apis/welfareArchive.js | 9 +- .../hrmSalary/components/groupCard/index.js | 34 ++++++ .../hrmSalary/components/groupCard/index.less | 25 +++++ pc4mobx/hrmSalary/pages/ledger/index.js | 15 +-- .../pages/salaryFile/adjustReason.js | 8 ++ .../pages/salaryFile/editAgentModal.js | 81 +++++++++++-- pc4mobx/hrmSalary/pages/salaryFile/index.js | 106 +++++++++++++++--- .../pages/salaryFile/saralyFileViewSlide.js | 90 +++++++++++++++ .../archives/baseForm.js | 42 +++++++ .../socialSecurityBenefits/archives/index.js | 81 ++++++++++++- pc4mobx/hrmSalary/stores/archives.js | 21 +++- pc4mobx/hrmSalary/stores/salaryFile.js | 43 +++++-- pc4mobx/hrmSalary/stores/taxAgent.js | 17 ++- pc4mobx/hrmSalary/style/index.less | 14 ++- 15 files changed, 540 insertions(+), 63 deletions(-) create mode 100644 pc4mobx/hrmSalary/components/groupCard/index.js create mode 100644 pc4mobx/hrmSalary/components/groupCard/index.less create mode 100644 pc4mobx/hrmSalary/pages/salaryFile/adjustReason.js create mode 100644 pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js create mode 100644 pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js diff --git a/pc4mobx/hrmSalary/apis/archive.js b/pc4mobx/hrmSalary/apis/archive.js index c02e8e68..5140cc40 100644 --- a/pc4mobx/hrmSalary/apis/archive.js +++ b/pc4mobx/hrmSalary/apis/archive.js @@ -7,7 +7,7 @@ import { WeaTools } from 'ecCom'; //薪资档案-薪资档案列表 export const getArchiveList = params => { - return fetch('/api/bs/hrmsalary/archives/getTable', { + return fetch('/api/bs/hrmsalary/salaryArchive/list', { method: 'POST', mode: 'cors', headers: { @@ -36,7 +36,7 @@ export const getImportArchiveParam = params => { //薪资档案-获取薪资档案详情表单 export const getArchiveForm = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/getForm', 'GET', params); + return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/getForm', 'get', params); } @@ -57,7 +57,14 @@ export const getTaxAgentForm = params => { //薪资档案-保存个税扣缴义务人调整 export const saveTaxAgent = params => { - return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/saveTaxAgent', 'POST', params); + return fetch('/api/bs/hrmsalary/salaryArchive/saveTaxAgent', { + method: 'POST', + mode: 'cors', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(params) + }).then(res => res.json()) } //薪资档案-删除个税扣缴义务人调整 @@ -65,8 +72,6 @@ export const deleteTaxAgent = params => { return WeaTools.callApi('/api/bs/hrmsalary/salaryArchive/deleteTaxAgent', 'POST', params); } - - //薪资档案操作记录-薪资项目操作记录列表 export const getItemAdjustList = params => { return WeaTools.callApi('/api/bs/hrmsalary/salaryArchiveOperateLog/salaryItemList', 'POST', params); @@ -159,4 +164,4 @@ export const exportSalaryArchive = (ids = "") => { a.click(); window.URL.revokeObjectURL(url); })) -} \ No newline at end of file +} diff --git a/pc4mobx/hrmSalary/apis/welfareArchive.js b/pc4mobx/hrmSalary/apis/welfareArchive.js index e392241c..4c5cc31b 100644 --- a/pc4mobx/hrmSalary/apis/welfareArchive.js +++ b/pc4mobx/hrmSalary/apis/welfareArchive.js @@ -9,7 +9,14 @@ export const getCondition = params => { }; export const getTable = params => { - return WeaTools.callApi('/api/bs/hrmsalary/archives/getTable', 'post', params); + return fetch('/api/bs/hrmsalary/archives/getTable', { + method: 'POST', + mode: 'cors', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(params) + }).then(res => res.json()) }; export const getBaseForm = params => { diff --git a/pc4mobx/hrmSalary/components/groupCard/index.js b/pc4mobx/hrmSalary/components/groupCard/index.js new file mode 100644 index 00000000..1d870b43 --- /dev/null +++ b/pc4mobx/hrmSalary/components/groupCard/index.js @@ -0,0 +1,34 @@ +import React from 'react' +import { Icon } from 'antd' +import "./index.less" + +export default class GroupCard extends React.Component { + constructor(props) { + super(props) + this.state = { + showContent: true + } + } + + render() { + return ( +
+
+ {this.props.title} +
{this.props.tips}
+
{this.setState({showContent: !this.state.showContent})}}> + { + this.state.showContent ? : + } +
+
+ { + this.state.showContent &&
+ {this.props.children} +
+ } +
+ + ) + } +} \ No newline at end of file diff --git a/pc4mobx/hrmSalary/components/groupCard/index.less b/pc4mobx/hrmSalary/components/groupCard/index.less new file mode 100644 index 00000000..f8003ceb --- /dev/null +++ b/pc4mobx/hrmSalary/components/groupCard/index.less @@ -0,0 +1,25 @@ +.groupCard { + margin: 10px 20px; + .titleWrapper { + overflow: hidden; + .tipWrapper { + margin-left: 10px; + display: inline-block; + } + .operateIconWrapper { + font-size: 12px; + text-align: center; + color: #999; + display: inline-block; + float: right; + width: 20px; + height: 16px; + line-height: 16px; + border-radius: 5px; + background-color: #eee; + } + } + .contentWrapper { + margin-top: 10px; + } +} \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/ledger/index.js b/pc4mobx/hrmSalary/pages/ledger/index.js index eddcf968..2339ccad 100644 --- a/pc4mobx/hrmSalary/pages/ledger/index.js +++ b/pc4mobx/hrmSalary/pages/ledger/index.js @@ -325,20 +325,9 @@ export default class Ledger extends React.Component { content={
{ - currentStep == 0 && - } - { - currentStep == 1 && - } - { - currentStep == 2 && - } - { - currentStep == 3 && - } - { - currentStep == 4 && + currentStep == 0 && } +
} diff --git a/pc4mobx/hrmSalary/pages/salaryFile/adjustReason.js b/pc4mobx/hrmSalary/pages/salaryFile/adjustReason.js new file mode 100644 index 00000000..566579fc --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salaryFile/adjustReason.js @@ -0,0 +1,8 @@ +export const adjustResion = { + "ADJUSTMENT": "调动", + "CHANGE": "变更", + "ONBOARD": "入职", + "DIMISSION": "离职", + "OTHER": "其他", + "INIT": "初始化", +} \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/salaryFile/editAgentModal.js b/pc4mobx/hrmSalary/pages/salaryFile/editAgentModal.js index a6ad154e..c3148047 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/editAgentModal.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/editAgentModal.js @@ -1,34 +1,101 @@ import React from 'react' -import { Modal, Row, Col } from "antd" +import { Modal, Row, Col, Button } from "antd" import { WeaDatePicker, WeaSelect } from "ecCom" +import { adjustResion } from './adjustReason' +import { inject, observer } from 'mobx-react'; +import moment from 'moment' +@inject('taxAgentStore', "salaryFileStore") +@observer export default class EditAgentModal extends React.Component { + constructor(props) { + super(props) + this.state = { + initSelected: false, + request: { + salaryArchiveId: this.props.currentId, + effectiveTime: moment(new Date()).format("YYYY-MM-DD"), + adjustReason: 'INIT', + taxAgentId: "" + } + + } + } + + componentWillMount() { + const { taxAgentStore: {fetchTaxAgentOption}} = this.props; + fetchTaxAgentOption().then(() => { + this.setState({initSelected: true}) + }) + } + + getResionOptions() { + return Object.keys(adjustResion).map(key => { + let item = {} + item.showname = adjustResion[key] + item.key = key + item.selected = false + return item + }) + } + + handleSave() { + const { salaryFileStore: {saveTaxAgent}} = this.props; + saveTaxAgent(this.state.request) + } + + handleChange(params) { + const {request} = this.state; + params = {...request, ...params} + this.setState({ + request: params + }) + } + render() { + const { taxAgentStore } = this.props; + const { taxAgentOption } = taxAgentStore + const { request } = this.state; + const { + salaryArchiveId, + effectiveTime, + adjustReason, + taxAgentId + } = request; return ( - -
+ {this.handleSave()}}>保存 + } + > +
生效日期 - + {this.handleChange({effectiveTime: value})}}/> 调整原因 - + { + this.handleChange({adjustReason: value}) + }}/> 调整前 - 义务人一 调整后 - + { + this.state.initSelected && { + this.handleChange({taxAgentId: value}) + }} /> + }
diff --git a/pc4mobx/hrmSalary/pages/salaryFile/index.js b/pc4mobx/hrmSalary/pages/salaryFile/index.js index 26028179..e4b7121f 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/index.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/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, message } from 'antd'; import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable, WeaInputSearch, WeaSlideModal, WeaCheckbox, WeaHelpfulTip } from 'ecCom'; @@ -19,7 +19,7 @@ import SlideModalTitle from '../../components/slideModalTitle' import SlideSalaryItem from './slideSalaryItem' import SlideAgent from './slideAgent' import ImportModal from '../../components/importModal' - +import SalaryFileViewSlide from './saralyFileViewSlide' const { MonthPicker } = DatePicker; @@ -37,13 +37,16 @@ export default class SalaryFile extends React.Component { editSlideVisible: false, importType: "", modalVisiable: false, - step: 0 + step: 0, + recordSlideVisible: false, + currentId: "", + selectedRowKeys: [] } } componentWillMount() { - const { salaryFileStore: {getImportTypes} } = this.props; - getImportTypes(); + const { salaryFileStore: {doInit} } = this.props; + doInit(); } // 设置导入步数 @@ -92,12 +95,51 @@ export default class SalaryFile extends React.Component { exportSalaryArchive(); } + // 定制列 + getColumns() { + const { salaryFileStore: {tableStore}} = this.props; + return tableStore.columns.filter(item => item.hide == "false").map(item => { + if(item.dataIndex == "operate") { + item.render = (text, record) => ( + this.handleEdit(record)}>编辑 + ) + } + return item + }) + } + + // 编辑行 + handleEdit(record) { + this.setState({editSlideVisible: true, currentId: record.id}) + } + + // 显示调整个税扣缴义务人表单 + handSildeOptionMenuClick(e) { + this.setState({editAgentVisible: true}) + } + + // 查看 Slide 头部操作按钮 + renderEditSlideOperate() { + return
+ + 调整个税扣缴义务人 + + } onClick={() => {this.setState({changeSalaryVisible: true})}}>调薪 +
+ } + + // table选中条目 + onSelectChange = selectedRowKeys => { + this.setState({ selectedRowKeys }); + }; + render() { const { salaryFileStore } = this.props; const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = salaryFileStore; - const { importType, previewColumns, previewDataSource } = salaryFileStore; - const { selectedTab, step } = this.state; + const { importType, previewColumns, previewDataSource, dataSource } = salaryFileStore; + const { selectedTab, step, selectedRowKeys } = this.state; if (!hasRight && !loading) { // 无权限处理 return renderNoright(); } @@ -127,7 +169,6 @@ export default class SalaryFile extends React.Component { ]; const renderSearchOperationItem = () => { - return
} @@ -136,7 +177,13 @@ export default class SalaryFile extends React.Component { } const handleMenuClick2 = () => { - + const { electedRowKeys } = this.state; + if(selectedRowKeys.length == 0) { + message.warning("未选择条目") + return + } + const { salaryFileStore: {exportSalaryArchive}} = this.props; + exportSalaryArchive(selectedRowKeys.join(",")) } const menu = ( @@ -173,7 +220,7 @@ export default class SalaryFile extends React.Component { /> 导入 {this.handleExportAll()}}>导出全部 - +
) @@ -198,6 +245,12 @@ export default class SalaryFile extends React.Component { ) } + const rowSelection = { + selectedRowKeys, + onChange: this.onSelectChange, + }; + + return (
- + @@ -253,14 +310,15 @@ export default class SalaryFile extends React.Component { { this.state.editAgentVisible && {this.setState({editAgentVisible: false})}} /> } { - this.state.editSlideVisible && - }
} + onClose={() => this.setState({recordSlideVisible: false})} + showMask={true} + closeMaskOnClick={() => this.setState({recordSlideVisible: false})} /> + } + + { + this.state.editSlideVisible && + + } + content={} onClose={() => this.setState({editSlideVisible: false})} showMask={true} closeMaskOnClick={() => this.setState({editSlideVisible: false})} /> - } diff --git a/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js new file mode 100644 index 00000000..e2ac6dc4 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/salaryFile/saralyFileViewSlide.js @@ -0,0 +1,90 @@ +import React from "react" +import { Row, Col } from 'antd' +import { WeaHelpfulTip } from 'ecCom' +import GroupCard from "../../components/groupCard" +import { inject, observer } from 'mobx-react'; + +@inject('salaryFileStore') +@observer +export default class SalaryFileViewSlide extends React.Component { + componentWillMount() { + const { salaryFileStore: {getArchiveForm} } = this.props; + getArchiveForm(this.props.id) + } + + render() { + const { salaryFileStore: {detailForm} } = this.props; + const { baseInfo, adjustSalaryItems } = detailForm; + return ( +
+ + + + + 姓名 + {baseInfo && baseInfo.employee && baseInfo.employee.username} + + + + + 部门 + {baseInfo && baseInfo.employee && baseInfo.employee.department} + + + + + 岗位 + {baseInfo && baseInfo.employee && baseInfo.employee.position} + + + + + + + + 入职时间 + {baseInfo && baseInfo.employee && baseInfo.employee.hiredate} + + + + + 手机号 + {baseInfo && baseInfo.employee && baseInfo.employee.mobile} + + + + + 个税扣缴义务人 + {baseInfo && baseInfo.employee && baseInfo.employee.taxAgent} + + + + + + + }> +
+ { + + adjustSalaryItems && adjustSalaryItems.map(item => ( +
+
{item.name}
+
{item.value}
+
+ )) + } +
+
+ +
+ +
+
+ ) + } +} \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js new file mode 100644 index 00000000..0714c975 --- /dev/null +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/baseForm.js @@ -0,0 +1,42 @@ +import React from 'react' +import GroupCard from '../../../components/groupCard' +import { Row, Col } from 'antd' +import { inject, observer } from 'mobx-react'; + +@inject('archivesStore') +@observer +export default class BaseForm extends React.Component { + + componentWillMount() { + const {archivesStore: {getBaseForm}} = this.props; + getBaseForm(this.props.employeeId) + } + + render() { + const { archivesStore: {baseFormData}} = this.props; + return ( +
+ + + 姓名 + {baseFormData.username} + 部门 + {baseFormData.department} + 岗位 + {baseFormData.position} + + + + 入职日期 + {baseFormData.hiredate} + 手机号 + {baseFormData.telephone} + 离职时间 + {baseFormData.dimissionDate} + + + +
+ ) + } +} \ No newline at end of file diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js index 231fbe95..db354d34 100644 --- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js +++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/archives/index.js @@ -2,16 +2,17 @@ import React from 'react'; import { inject, observer } from 'mobx-react'; import { toJS } from 'mobx'; -import { Button, Table, DatePicker } from 'antd'; +import { Button, Table, DatePicker, Dropdown, Menu } from 'antd'; -import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable } from 'ecCom'; +import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaTable, WeaSlideModal } from 'ecCom'; // import { WeaTableNew } from "comsMobx" // const WeaTable = WeaTableNew.WeaTable; import { renderNoright, getSearchs } from '../../../util'; // 渲染form数据的方法:因为多个页面都会使用,所以抽的公共方法在util中 import CustomTab from '../../../components/customTab'; import ContentWrapper from '../../../components/contentWrapper'; - +import BaseForm from './baseForm' +import SlideModalTitle from '../../../components/slideModalTitle' const { MonthPicker } = DatePicker; @@ -22,7 +23,10 @@ export default class Archives extends React.Component { super(props); this.state = { value: "", - selectedKey: "0" + selectedKey: "0", + selectedTab: 0, + editSlideVisible: false, + employeeId: "" } } @@ -31,8 +35,27 @@ export default class Archives extends React.Component { doInit() } + handleEdit(record) { + this.setState({employeeId: record.employeeId, editSlideVisible: true}) + } + + getColumns() { + const { archivesStore: {tableStore}} = this.props; + let columns = [...tableStore.columns] + columns = columns.filter(item => item.hide == "false") + columns.push({ + title: "操作", + dataIndex: "operate", + render: (text, record) => { + return ( {this.handleEdit(record)}}>编辑) + } + }) + return columns; + } + render() { const { archivesStore } = this.props; + const { selectedTab } = this.state; const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = archivesStore; const { dataSource } = archivesStore if (!hasRight && !loading) { // 无权限处理 @@ -63,6 +86,21 @@ export default class Archives extends React.Component { const topTab = [ ]; + const handleButtonClick = () => {} + const handleMenuClick = () => {} + + const btns = [ + , + + 导出选中 + + } type="ghost"> + 导出全部 + + ] + + const renderSearchOperationItem = () => { return
@@ -81,6 +119,7 @@ export default class Archives extends React.Component { showDropIcon={true} // 是否显示下拉按钮 dropMenuDatas={rightMenu} // 下拉菜单(和页面的右键菜单相同) dropMenuProps={{ collectParams }} // 收藏功能: 配置之后显示 收藏、帮助、显示页面地址 这3个功能 + buttons={btns} > */} item.hide == "false")} + columns={this.getColumns()} dataSource={dataSource} - /> + + { + this.state.editSlideVisible && + this.handleEditSlideSave()} + subItemChange={ + (item) => {this.setState({selectedTab: item.key})} + } + /> + } + content={
+ { + selectedTab == 0 && + } + +
} + onClose={() => this.setState({editSlideVisible: false})} + showMask={true} + closeMaskOnClick={() => this.setState({editSlideVisible: false})} /> + } ) } diff --git a/pc4mobx/hrmSalary/stores/archives.js b/pc4mobx/hrmSalary/stores/archives.js index c89f5c3d..0d62769f 100644 --- a/pc4mobx/hrmSalary/stores/archives.js +++ b/pc4mobx/hrmSalary/stores/archives.js @@ -2,7 +2,7 @@ import { observable, action, toJS } from 'mobx'; import { message } from 'antd'; import { WeaForm, WeaTableNew } from 'comsMobx'; -import * as API from '../apis/archive'; // 引入API接口文件 +import * as API from '../apis/welfareArchive'; // 引入API接口文件 const { TableStore } = WeaTableNew; @@ -20,10 +20,13 @@ export class ArchivesStore { @observable dataSource = []; + @observable baseFormData = {} + + // 初始化操作 @action doInit = () => { - this.getCondition(); + // this.getCondition(); this.getTableDatas(); } @@ -46,7 +49,7 @@ export class ArchivesStore { this.loading = true; const formParams = this.form.getFormParams() || {}; params = params || formParams; - API.getArchiveList(params).then(action(res => { + API.getTable(params).then(action(res => { if (res.status) { // 接口请求成功/失败处理 this.dataSource = res.data.datas; // this.columns = res.data.columns; @@ -67,4 +70,16 @@ export class ArchivesStore { this.showSearchAd = false; } + // 查询档案基本信息表单 + @action + getBaseForm = (employeeId) => { + API.getBaseForm({employeeId}).then(res => { + if(res.status) { + this.baseFormData = res.data.data + } else { + message.error(res.errormsg || "获取失败") + } + }) + } + } \ No newline at end of file diff --git a/pc4mobx/hrmSalary/stores/salaryFile.js b/pc4mobx/hrmSalary/stores/salaryFile.js index a7dbbd1c..904b4fd8 100644 --- a/pc4mobx/hrmSalary/stores/salaryFile.js +++ b/pc4mobx/hrmSalary/stores/salaryFile.js @@ -17,13 +17,15 @@ export class salaryFileStore { @observable importType = []; @observable previewColumns = []; @observable previewDataSource = []; + @observable dataSource = []; + @observable detailForm= {} // 初始化操作 @action doInit = () => { // this.getCondition(); - // this.getTableDatas(); + this.getTableDatas(); this.getImportTypes(); } @@ -52,18 +54,21 @@ export class salaryFileStore { })); } - // 渲染table数据 + // 渲染table数据1 @action getTableDatas = (params) => { this.loading = true; const formParams = this.form.getFormParams() || {}; params = params || formParams; - API.getTableDatas(params).then(action(res => { - if (res.api_status) { // 接口请求成功/失败处理 - this.tableStore.getDatas(res.datas); // table 请求数据 - this.hasRight = res.hasRight; + API.getArchiveList(params).then(action(res => { + if (res.status) { // 接口请求成功/失败处理 + this.tableStore.getDatas(res.data.dataKey.datas); // table 请求数据 + this.dataSource = res.data.pageInfo.list.map(item => { + item.key = item.id + return item; + }) } else { - message.error(res.msg || '接口调用失败!') + message.error(res.errormsg || '接口调用失败!') } this.loading = false; })); @@ -125,4 +130,28 @@ export class salaryFileStore { API.exportSalaryArchive(ids) } + // 获取详情 + @action + getArchiveForm = (salaryArchiveId) => { + API.getArchiveForm({salaryArchiveId}).then(res => { + if(res.status) { + this.detailForm = res.data + } else { + message.error(res.errormsg || "获取失败") + } + }) + } + + // 薪资档案-保存个税扣缴义务人调整 + @action + saveTaxAgent = (params) => { + API.saveTaxAgent(params).then(res => { + if(res.status) { + message.success("保存成功"); + } else { + message.error(res.errormsg || "保存失败") + } + }) + } + } \ No newline at end of file diff --git a/pc4mobx/hrmSalary/stores/taxAgent.js b/pc4mobx/hrmSalary/stores/taxAgent.js index efd1adb9..d1bde52f 100644 --- a/pc4mobx/hrmSalary/stores/taxAgent.js +++ b/pc4mobx/hrmSalary/stores/taxAgent.js @@ -120,11 +120,18 @@ export class TaxAgentStore { } @action fetchTaxAgentOption = () => { - API.getTaxAgentSelectList().then(action(res => { - if(res.status) { - this.taxAgentOption = res.data.list.map(item => {return {key: item.id, showname: item.content}}) - } - })) + return new Promise((resolve, reject) => { + API.getTaxAgentSelectList().then(action(res => { + if(res.status) { + resolve() + this.taxAgentOption = res.data.list.map(item => {return {key: item.id, showname: item.content}}) + } else { + reject() + message.error(res.errormsg || "获取失败") + } + })) + }) + } } \ No newline at end of file diff --git a/pc4mobx/hrmSalary/style/index.less b/pc4mobx/hrmSalary/style/index.less index d8ed85d8..7e0ea59f 100644 --- a/pc4mobx/hrmSalary/style/index.less +++ b/pc4mobx/hrmSalary/style/index.less @@ -13,6 +13,18 @@ } +// 表单 .formItem { margin-bottom: 10px; -} \ No newline at end of file +} + + +.formRow { + line-height: 40px; +} + +.formTitle { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +}