+
+ {
+ this.state.editAgentVisible &&
{this.setState({editAgentVisible: false})}}
+ />
+ }
+
+ )
+ }
+}
\ No newline at end of file
diff --git a/pc4mobx/hrmSalary/stores/salaryFile.js b/pc4mobx/hrmSalary/stores/salaryFile.js
index 13250a8c..93760bf5 100644
--- a/pc4mobx/hrmSalary/stores/salaryFile.js
+++ b/pc4mobx/hrmSalary/stores/salaryFile.js
@@ -1,6 +1,7 @@
import { observable, action, toJS } from 'mobx';
import { message } from 'antd';
import { WeaForm, WeaTableNew } from 'comsMobx';
+import moment from 'moment'
import * as API from '../apis/archive'; // 引入API接口文件
import { notNull } from '../util/validate'
@@ -27,6 +28,11 @@ export class salaryFileStore {
@observable singleSalaryItemList = []
@observable singleTaxAgentList = []
+ @observable currentId = ""
+ @observable editAgentVisible = false
+
+
+
// 初始化操作
@action
@@ -295,15 +301,38 @@ export class salaryFileStore {
API.singleTaxAgentList(params).then(res => {
if(res.status) {
this.singleTaxAgentList = res.data
+
} else {
message.error(res.errormsg || "获取失败")
}
})
}
-
-
+ // 设置当前查看的数据id
+ @action
+ setCurrentId = (id) => this.currentId = id
+ // 设置编辑个税义务人修改表modal
+ @action
+ setEditAgentVisible = editAgentVisible => this.editAgentVisible = editAgentVisible;
+ // 通过个税义务人编辑进入列表
+ @action
+ getTaxAgentFormByTaxAgentId = (id) => {
+ return new Promise((resolve, reject) => {
+ API.getTaxAgentFormBySalaryArchiveTaxAgentId({salaryArchiveTaxAgentId: id}).then(res => {
+ if(res.status) {
+ let form = res.data.salaryArchiveTaxAgentForm
+ form.effectiveTime = moment(new Date(form.effectiveTime)).format("YYYY-MM-DD")
+ this.salaryArchiveTaxAgentForm = form
+ resolve()
+ } else {
+ message.error(res.errormsg || "获取失败")
+ reject()
+ }
+ })
+ })
+
+ }
}
\ No newline at end of file