diff --git a/pc4mobx/hrmSalary/apis/item.js b/pc4mobx/hrmSalary/apis/item.js index d63c0334..c8648ad5 100644 --- a/pc4mobx/hrmSalary/apis/item.js +++ b/pc4mobx/hrmSalary/apis/item.js @@ -154,3 +154,18 @@ export const detailFormual = params => { // *** 公式 end *** + + +// 列出可以删除的薪资项目 +export const listCanDelete = params => { + return fetch('/api/bs/hrmsalary/salaryitem/listCanDelete', { + method: 'POST', + mode: 'cors', + headers: { + 'Content-Type': 'application/json' + }, + body: JSON.stringify(params) + }).then(res => res.json()) +} + + diff --git a/pc4mobx/hrmSalary/components/importModal/modalStep3.js b/pc4mobx/hrmSalary/components/importModal/modalStep3.js index b77eb3ca..238d09e6 100644 --- a/pc4mobx/hrmSalary/components/importModal/modalStep3.js +++ b/pc4mobx/hrmSalary/components/importModal/modalStep3.js @@ -1,6 +1,6 @@ import React from "react" import successImg from "./success.svg" -import { Button, Table } from "antd" +import { Button, Table, Spin } from "antd" import { WeaTable } from 'ecCom' export default class ModalStep3 extends React.Component { @@ -20,11 +20,18 @@ export default class ModalStep3 extends React.Component { return (
-
- -
数据导入完成
-
已导入 {importResult.successCount} 条数据,失败 {importResult.errorCount} 条数据
-
+ { + importResult.successCount === undefined ? +
+ + 正在导入请稍后... +
+ :
+ +
数据导入完成
+
已导入 {importResult.successCount} 条数据,失败 {importResult.errorCount} 条数据
+
+ }
{ diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js index 88dcf357..b7f417c9 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/placeOnFileDetail.js @@ -64,11 +64,17 @@ export default class PlaceOnFileDetail extends React.Component { onDetail() { this.setState({slideVisiable: true}) } + + // 分页 + handleDataPageChange(value) { + const { calculateStore: {acctResultList}} = this.props; + acctResultList(this.id, this.props.employeeName, value) + } render() { const { calculateStore } = this.props; - const { baseSalarySobCycle, acctResultListDateSource, acctResultListColumns } = calculateStore + const { baseSalarySobCycle, acctResultListDateSource, acctResultListColumns, acctResultListPageInfo } = calculateStore const menu = ( @@ -111,7 +117,15 @@ export default class PlaceOnFileDetail extends React.Component { />
- + {this.handleDataPageChange(value)}, + total: acctResultListPageInfo.total, + current: acctResultListPageInfo.pageNum + }} + />
{ diff --git a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js index d1618c57..557c5561 100644 --- a/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js +++ b/pc4mobx/hrmSalary/pages/calculateDetail/salaryDetail.js @@ -138,6 +138,7 @@ export default class SalaryDetail extends React.Component { {this.handleDataPageChange(value)}, total: acctResultListPageInfo.total, diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.js index ab1caf24..8a4c5f5d 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumDeduct/editSlideContent.js @@ -128,6 +128,7 @@ export default class EditSlideContent extends React.Component { comsWeaTableStore={slideTableStore} // table store hasOrder={true} // 是否启用排序 needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度 + scroll={{x: slideTableStore.columns.length * 100}} />
diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/editSlideContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/editSlideContent.js index ed75036f..d7e4987b 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/editSlideContent.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/editSlideContent.js @@ -128,6 +128,7 @@ export default class EditSlideContent extends React.Component { comsWeaTableStore={slideTableStore} // table store hasOrder={true} // 是否启用排序 needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度 + scroll={{x: slideTableStore.columns.length * 100}} /> diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js index a2cacf13..428c3c78 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/cumSituation/index.js @@ -125,7 +125,10 @@ export default class CumSituation extends React.Component { // 增加编辑功能,重写columns绑定事件 getColumns = (columns) => { - let newColumns = ''; + let newColumns = []; + if(!columns) { + return [] + } newColumns = columns.map(column => { let newColumn = column; newColumn.render = (text, record, index) => { //前端元素转义 @@ -142,9 +145,11 @@ export default class CumSituation extends React.Component { } return newColumn; }); + console.log("newColumns: ", newColumns); return newColumns; } + handleCancel() { const { cumSituationStore } = this.props; const { modalVisiable, setModalVisiable, setStep } = cumSituationStore @@ -300,6 +305,7 @@ export default class CumSituation extends React.Component { hasOrder={true} // 是否启用排序 needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度 getColumns={this.getColumns} + scroll={{x: this.getColumns(tableStore.columns).length * 100}} onOperatesClick={this.onOperatesClick.bind(this)} /> diff --git a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js index 953b508f..5027c019 100644 --- a/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js +++ b/pc4mobx/hrmSalary/pages/dataAcquisition/otherDeduct/editSlideContent.js @@ -128,6 +128,7 @@ export default class EditSlideContent extends React.Component { comsWeaTableStore={slideTableStore} // table store hasOrder={true} // 是否启用排序 needScroll={true} // 是否启用table内部列表滚动,将自适应到父级高度 + scroll={{x: slideTableStore.columns.length * 100}} /> diff --git a/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js index b3554303..d07b937c 100644 --- a/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js +++ b/pc4mobx/hrmSalary/pages/ledger/salaryItemForm.js @@ -96,10 +96,13 @@ export default class SalaryItemForm extends React.Component { { itemGroups && itemGroups.map(item => { - item.items.map(i => {i.key = i.id}) - return ( - {this.handleItemDataSourceChange(dataSource, item)}}title={item.name} onChange={(dataSource) => {this.handleCanMoveItemChange(dataSource, item)}}/> - ) + if(item.items) { + item.items.map(i => {i.key = i.id}) + return ( + {this.handleItemDataSourceChange(dataSource, item)}}title={item.name} onChange={(dataSource) => {this.handleCanMoveItemChange(dataSource, item)}}/> + ) + } + return "" } ) } diff --git a/pc4mobx/hrmSalary/pages/mySalary/index.js b/pc4mobx/hrmSalary/pages/mySalary/index.js index d4b4b9c0..f4ca89b9 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/index.js +++ b/pc4mobx/hrmSalary/pages/mySalary/index.js @@ -80,10 +80,18 @@ export default class MySalary extends React.Component { mySalaryBillList(range.map(item => moment(item).format("YYYY-MM"))) } + + handleTabChange(selectedKey) { + if(selectedKey == "2") { + const { mySalaryStore: {getRecordList}} = this.props; + getRecordList() + } + } + render() { const { mySalaryStore } = this.props; const { loading, hasRight, form, condition, tableStore, showSearchAd, getTableDatas, doSearch, setShowSearchAd } = mySalaryStore; - const { tabIndex, myBillTableStore, myBillDataSource } = mySalaryStore + const { tabIndex, myBillTableStore, myBillDataSource, recordListColumns, recordListDataSource, recordListPageInfo } = mySalaryStore const { salaryBillVisible } = this.state; if (!hasRight && !loading) { // 无权限处理 return renderNoright(); @@ -115,10 +123,10 @@ export default class MySalary extends React.Component { title: "工资单", viewcondition: "0" }, - { - title: "社保福利", - viewcondition: "1" - }, + // { + // title: "社保福利", + // viewcondition: "1" + // }, { title: "薪酬记录", viewcondition: "2" @@ -152,6 +160,8 @@ export default class MySalary extends React.Component { } + + return (
{ + this.handleTabChange(v) this.setState({selectedKey: v}) }} /> @@ -179,11 +190,11 @@ export default class MySalary extends React.Component { this.state.selectedKey == '0' && } - { + {/* { this.state.selectedKey == '1' && - } + } */} { - this.state.selectedKey == '2' && + this.state.selectedKey == '2' && } diff --git a/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js b/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js index 7be4d891..1e96c868 100644 --- a/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js +++ b/pc4mobx/hrmSalary/pages/mySalary/payrollModal.js @@ -75,14 +75,16 @@ export default class PayrollModal extends React.Component { borderRight: "1px solid #f2f2f2", overflow: "hidden", textOverflow: "ellipsis", - whiteSpace: "nowrap" + whiteSpace: "nowrap", + height: "35px" }}>{item.name} {item.salaryItemValue} @@ -126,7 +128,8 @@ export default class PayrollModal extends React.Component { borderBottom: (index + 1) > 3 ? "1px solid #f2f2f2" : "none", overflow: "hidden", textOverflow: "ellipsis", - whiteSpace: "nowrap" + whiteSpace: "nowrap", + height: "35px" }}>{item.name} 3 ? "1px solid #f2f2f2" : "none", overflow: "hidden", textOverflow: "ellipsis", - whiteSpace: "nowrap" + whiteSpace: "nowrap", + height: "35px" }} >{item.salaryItemValue} diff --git a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js index 305fbb67..77ac81a6 100644 --- a/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js +++ b/pc4mobx/hrmSalary/pages/payroll/SalarySendList.js @@ -1,6 +1,6 @@ import React from 'react' import { inject, observer } from 'mobx-react'; -import { Table, Menu, Dropdown } from 'antd' +import { Table, Menu, Dropdown, message } from 'antd' import { WeaTable } from 'ecCom' import moment from 'moment' @@ -33,8 +33,13 @@ export default class SalarySendList extends React.Component { // 更新模板 handleUpdateTemplate(record) { - window.open("") - + let templateRecord = {} + templateRecord.id = record.templateId; + if(!record.templateId) { + message.warning("请设置默认模板") + return + } + this.props.onEditTemplate && this.props.onEditTemplate(templateRecord) } // 页面跳转 diff --git a/pc4mobx/hrmSalary/pages/payroll/index.js b/pc4mobx/hrmSalary/pages/payroll/index.js index b49608a5..c1026b60 100644 --- a/pc4mobx/hrmSalary/pages/payroll/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/index.js @@ -217,12 +217,12 @@ export default class Payroll extends React.Component { } const rightMenu = [// 右键菜单 - { - key: 'BTN_COLUMN', - icon: , - content: '显示列定制', - onClick: this.showColumn - }, + // { + // key: 'BTN_COLUMN', + // icon: , + // content: '显示列定制', + // onClick: this.showColumn + // }, ]; const collectParams = { // 收藏功能配置 favname: '工资单发放', @@ -332,7 +332,11 @@ export default class Payroll extends React.Component { /> { this.state.selectedKey == 0 && - + { + this.handleTemplateListEdit(record) + }} + /> // } @@ -345,6 +349,7 @@ export default class Payroll extends React.Component { onCopy={(record) => { this.handleTemplateListCopy(record) }} + onDelete={(record)=> this.handleTemplateListDelete(record)} /> } diff --git a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js index 2f287ff1..f3c62f58 100644 --- a/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/payrollGrant/index.js @@ -137,7 +137,7 @@ export default class PayrollGrant extends React.Component { 批量撤回 全部导出 导出选中 - 自定义列 + {/* 自定义列 */} ); return ( diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js index 89629c82..e374f3ae 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/computerTemplate/index.js @@ -31,9 +31,11 @@ export default class ComputerTemplate extends React.Component {
{this.salaryTemplateShowSet.theme.replace("${companyName}", "上海泛微").replace("${salaryMonth}", moment(new Date()).format("YYYY-MM"))}
-
- -
+ { + this.salaryTemplateShowSet.background &&
+ +
+ }
{ diff --git a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js index 61971ebb..7852cbcb 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js +++ b/pc4mobx/hrmSalary/pages/payroll/templatePreview/phoneTemplate/index.js @@ -34,10 +34,12 @@ export default class PhoneTemplate extends React.Component {
{this.salaryTemplateShowSet.theme.replace("${companyName}", "上海泛微").replace("${salaryMonth}", moment(new Date()).format("YYYY-MM"))}
-
- -
+ { + this.salaryTemplateShowSet.background &&
+ +
+ }
{ diff --git a/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js b/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js index 94444ec3..cbd384c1 100644 --- a/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js +++ b/pc4mobx/hrmSalary/pages/payroll/templateSettingList.js @@ -1,6 +1,6 @@ import React from 'react' import { inject, observer } from 'mobx-react'; -import { Radio } from 'antd' +import { Radio, Spin } from 'antd' import { WeaTableNew } from 'comsMobx'; const WeaTable = WeaTableNew.WeaTable; @@ -46,8 +46,10 @@ export default class TemplateSettingList extends React.Component { // 默认使用配置 recordItemChange(record) { const { payrollStore } = this.props; - const { changePayrollDefaultUse } = payrollStore; - changePayrollDefaultUse(record.id) + const { changePayrollDefaultUse, getPayrollTemplateList } = payrollStore; + changePayrollDefaultUse(record.id).then(() => { + getPayrollTemplateList() + }) } // 增加编辑功能,重写columns绑定事件 @@ -71,9 +73,14 @@ export default class TemplateSettingList extends React.Component { render() { const { payrollStore } = this.props; - const { templateStore } = payrollStore; + const { templateStore, loading } = payrollStore; return (
+ { loading ? +
+ +
+ : + } +
) } diff --git a/pc4mobx/hrmSalary/pages/salaryFile/index.js b/pc4mobx/hrmSalary/pages/salaryFile/index.js index 591ed051..388c93cf 100644 --- a/pc4mobx/hrmSalary/pages/salaryFile/index.js +++ b/pc4mobx/hrmSalary/pages/salaryFile/index.js @@ -44,7 +44,8 @@ export default class SalaryFile extends React.Component { recordSlideVisible: false, selectedRowKeys: [], showSearchBar: false, - importResult: {} + importResult: {}, + searchValue: "" } } @@ -163,6 +164,13 @@ export default class SalaryFile extends React.Component { form.updateFields({ current: value }) getTableDatas() } + + // 搜索 + handleSearch(value) { + const { salaryFileStore: {getTableDatas, form}} = this.props; + form.updateFields({username: value}) + getTableDatas() + } render() { const { salaryFileStore } = this.props; @@ -251,8 +259,10 @@ export default class SalaryFile extends React.Component { 导入 {this.handleExportAll()}}>导出全部 - - + {this.setState({ + searchValue: value + })}} onSearch={(value) => {this.handleSearch(value)}}/> + {/* */}
) } diff --git a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js index b07dd086..26139000 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/customSalaryItemSlide.js @@ -106,7 +106,8 @@ export default class CustomSalaryItemSlide extends React.Component { 取值方式 { - this.handleChange({valueType: e.target.value}) + this.handleChange({valueType: e.target.value, formulaId: null, formulaContent: ""}) + }}> 输入 公式 @@ -116,7 +117,7 @@ export default class CustomSalaryItemSlide extends React.Component { { ( valueType == 2 || valueType == 3 ) && - 公式 + 公式
this.handleShowFormal()} diff --git a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js index 402a1851..8e03cba4 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/formalFormModal.js @@ -220,7 +220,7 @@ export default class FormalFormModal extends React.Component { searchGroup && searchGroup.map(item => { return
{this.handleItemClick(item)}}> {item.value} - + {item.value} 的字段
}) diff --git a/pc4mobx/hrmSalary/pages/salaryItem/index.js b/pc4mobx/hrmSalary/pages/salaryItem/index.js index bb01fe07..9b295e46 100644 --- a/pc4mobx/hrmSalary/pages/salaryItem/index.js +++ b/pc4mobx/hrmSalary/pages/salaryItem/index.js @@ -56,8 +56,10 @@ export default class SalaryItem extends React.Component { componentWillMount() { // 初始化渲染页面 - const { salaryItemStore: { doInit }} = this.props; + const { salaryItemStore: { doInit, listCanDelete }} = this.props; doInit(); + listCanDelete(); + } onEditItem(record, isedit) { @@ -117,7 +119,8 @@ export default class SalaryItem extends React.Component { key: "moreOperate", dataIndex: "moreOperate", render: (text, record) => { - return ( + if(record.canDelete) { + return ( { @@ -127,8 +130,10 @@ export default class SalaryItem extends React.Component { }> - - ); + ); + } else { + return "" + } } }) diff --git a/pc4mobx/hrmSalary/stores/ledger.js b/pc4mobx/hrmSalary/stores/ledger.js index ff4411ed..bd5954ee 100644 --- a/pc4mobx/hrmSalary/stores/ledger.js +++ b/pc4mobx/hrmSalary/stores/ledger.js @@ -451,11 +451,16 @@ export class LedgerStore { this.loading = true API.listSalaryItem({name:searchValue, excludeIds, current}).then(res => { if(res.status) { - this.addSalaryItemDataSource = res.data.list.map(item => { - item = {...item} - item.key = item.id - return item; - }); + if(res.data.list) { + this.addSalaryItemDataSource = res.data.list.map(item => { + item = {...item} + item.key = item.id + return item; + }); + } else { + this.addSalaryItemDataSource = [] + } + this.addSalaryItemColumns = res.data.columns; this.addSalaryItemPageInfo = res.data // this.salaryItemTableStore.getDatas(res.data.datas); @@ -482,15 +487,17 @@ export class LedgerStore { let itemGroups = [...this.itemGroups] itemGroups = itemGroups.map(item => { let result = {...item} - result.items = result.items.map((i,index) => ( - { - salaryItemId: i.salaryItemId, - sortedIndex: index + 1, - formulaId: i.formulaId - } - )) - return result; - }) + if(result.items) { + result.items = result.items.map((i,index) => ( + { + salaryItemId: i.salaryItemId, + sortedIndex: index + 1, + formulaId: i.formulaId + } + )) + return result; + } + }).filter(item => item) let params = { salarySobId: this.salarySobId, diff --git a/pc4mobx/hrmSalary/stores/mySalary.js b/pc4mobx/hrmSalary/stores/mySalary.js index 86df1e2a..b3f88575 100644 --- a/pc4mobx/hrmSalary/stores/mySalary.js +++ b/pc4mobx/hrmSalary/stores/mySalary.js @@ -27,6 +27,11 @@ export class MySalaryStore { // 工资单详情 @observable mySalaryBill = {}; + // 调薪记录 + @observable recordListColumns = []; + @observable recordListDataSource = []; + @observable recordListPageInfo = {} + @action initParams = () => { let month = moment().format("YYYY-MM") @@ -119,5 +124,16 @@ export class MySalaryStore { } }) } + + @action + getRecordList = (params = {}) => { + API.recordList(params).then(res => { + if(res.status) { + this.recordListColumns = res.data.columns + this.recordListDataSource = res.data.list ? res.data.list : [] + this.recordListPageInfo = res.data + } + }) + } } \ No newline at end of file diff --git a/pc4mobx/hrmSalary/stores/payroll.js b/pc4mobx/hrmSalary/stores/payroll.js index f6a26d89..234856b4 100644 --- a/pc4mobx/hrmSalary/stores/payroll.js +++ b/pc4mobx/hrmSalary/stores/payroll.js @@ -113,12 +113,14 @@ export class payrollStore { // 工资单模板-工资单模板列表 @action getPayrollTemplateList = (params = {}) => { + this.loading = true API.getPayrollTemplateList(params).then(res => { if(res.status) { this.templateStore.getDatas(res.data.datas); } else { message.error(res.errormsg || "获取失败"); } + this.loading = false; }) } @@ -296,12 +298,16 @@ export class payrollStore { let params = { id } - API.changePayrollDefaultUse(params).then(res => { - if(res.status) { - message.success("设置成功"); - } else { - message.success(res.errormsg || "设置失败") - } + return new Promise((resolve, reject) => { + API.changePayrollDefaultUse(params).then(res => { + if(res.status) { + message.success("设置成功"); + resolve() + } else { + message.success(res.errormsg || "设置失败") + reject() + } + }) }) } diff --git a/pc4mobx/hrmSalary/stores/salaryItem.js b/pc4mobx/hrmSalary/stores/salaryItem.js index 82569fb4..d7719f51 100644 --- a/pc4mobx/hrmSalary/stores/salaryItem.js +++ b/pc4mobx/hrmSalary/stores/salaryItem.js @@ -34,6 +34,9 @@ export class SalaryItemStore { @observable tableDataSource = []; // 主列表 @observable tableColumns = []; // 主列表列 @observable pageInfo = {}; // 分页数据 + + // 可以删除的项目 + @observable canDeleteList = [] // ** 公式 ** // 类型列表 @@ -229,6 +232,11 @@ export class SalaryItemStore { message.warning("取值方式不能为空") return false; } + + if((params.valueType == 2 || params.valueType == 3) && !notNull(params.formulaId)) { + message.warning("公式不能为空") + return false; + } return true } @@ -310,4 +318,17 @@ export class SalaryItemStore { }) } + + // + @action + listCanDelete = (params = {}) => { + API.listCanDelete(params).then(res => { + if(res.status) { + this.canDeleteList = res.data + console.log("this.canDeleteList: ", this.canDeleteList); + } else { + message.error(res.errormsg || "获取失败") + } + }) + } } \ No newline at end of file