薪资档案查询参数修改
This commit is contained in:
parent
5c6db20caa
commit
e24078ba1c
|
|
@ -1,23 +1,31 @@
|
|||
import { observable, action } from "mobx";
|
||||
import { action, observable } from "mobx";
|
||||
import { WeaTableNew } from "comsMobx";
|
||||
import * as API from '../apis/payrollFiles';
|
||||
import * as API from "../apis/payrollFiles";
|
||||
|
||||
const { TableStore } = WeaTableNew;
|
||||
|
||||
export class PayrollFilesStore {
|
||||
@observable tableStore = new TableStore();
|
||||
@action("列表查询")
|
||||
queryList= (payload={}, searchItemsValue={}, url='')=>{
|
||||
return new Promise((resolve, reject)=>{
|
||||
API.queryList({ ...payload, ...searchItemsValue, url }).then(res=>{
|
||||
const {data, status}= res;
|
||||
if(status){
|
||||
queryList = (payload = {}, searchItemsValue = {}, url = "") => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const { departmentIds, positionIds, subcompanyIds, ...extra } = searchItemsValue;
|
||||
API.queryList({
|
||||
departmentIds: departmentIds ? departmentIds.split(",") : [],
|
||||
positionIds: positionIds ? positionIds.split(",") : [],
|
||||
subcompanyIds: subcompanyIds ? subcompanyIds.split(",") : [],
|
||||
...payload, ...extra, url
|
||||
}).then(res => {
|
||||
const { data, status } = res;
|
||||
if (status) {
|
||||
const { dataKey } = data;
|
||||
const { datas } = dataKey;
|
||||
this.tableStore.getDatas(datas); // table 请求数据
|
||||
}
|
||||
resolve(res)
|
||||
}).catch(()=>{reject()})
|
||||
})
|
||||
}
|
||||
resolve(res);
|
||||
}).catch(() => {
|
||||
reject();
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue