diff --git a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
index 95d69883..21bf0e1a 100644
--- a/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
+++ b/pc4mobx/hrmSalary/pages/socialSecurityBenefits/programme/index.js
@@ -2,7 +2,7 @@ import React from 'react';
import { inject, observer } from 'mobx-react';
import { toJS } from 'mobx';
-import { Button, Table, DatePicker, Row, Col } from 'antd';
+import { Button, Table, DatePicker, Row, Col, Switch, Modal } from 'antd';
import { WeaTop, WeaTab, WeaRightMenu, WeaRangePicker, WeaInputSearch, WeaSlideModal, WeaSelect } from 'ecCom';
@@ -73,6 +73,20 @@ export default class Programme extends React.Component {
return newColumns;
}
+ handleCategoryStatusChange(record, value) {
+ const {programmeStore: { updateCustomCategoryStatus }} = this.props;
+ Modal.confirm({
+ title: '信息确认',
+ content: `确认要${value ? '启用' : '停用'}吗`,
+ onOk:() => {
+ updateCustomCategoryStatus(record.id, value)
+ },
+ onCancel: () => {
+
+ },
+ });
+ }
+
getCustomColumns = (columns) => {
let newColumns = '';
newColumns = columns.map(column => {
@@ -82,6 +96,8 @@ export default class Programme extends React.Component {
switch(newColumn.dataIndex) {
case "operate":
return {this.onCustomEdit(record)}}>编辑
+ case "is_use":
+ return {this.handleCategoryStatusChange(record, value)}}/>
default:
return
}
diff --git a/pc4mobx/hrmSalary/stores/programme.js b/pc4mobx/hrmSalary/stores/programme.js
index a60cc31e..f81a5652 100644
--- a/pc4mobx/hrmSalary/stores/programme.js
+++ b/pc4mobx/hrmSalary/stores/programme.js
@@ -203,7 +203,12 @@ export class ProgrammeStore {
// 自定义福利启用、停用
@action
- updateCustomCategoryStatus = (params) => {
+ updateCustomCategoryStatus = (id, isUse) => {
+
+ let params = {
+ id,
+ isUse: isUse ? 1 : 0
+ }
API.updateCustomCategoryStatus(params).then(res => {
if(res.status) {
message.success("修改成功")
@@ -214,7 +219,4 @@ export class ProgrammeStore {
})
}
-
-
-
}
\ No newline at end of file