24 lines
714 B
JavaScript
24 lines
714 B
JavaScript
import { observable, action } from "mobx";
|
|
import { WeaTableNew } from "comsMobx";
|
|
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){
|
|
const { dataKey } = data;
|
|
const { datas } = dataKey;
|
|
this.tableStore.getDatas(datas); // table 请求数据
|
|
}
|
|
resolve(res)
|
|
}).catch(()=>{reject()})
|
|
})
|
|
}
|
|
}
|