
import request from '@/utils/request';
import { tableList } from '@/utils/format';

// 获取交易流水订单表列表
export async function getYSSellMasterList(params: any) {
    const data = await request('/Revenue/GetYSSellMasterList', {
        method: 'POST',
        data: {SearchParameter : {...params},SortStr: params.SortStr, keyWord:params?.keyWord, pageindex: params.current,pagesize:9999},
    })
    
    if (data.Result_Code !== 100) {
        return {
            data: [],
            current:  1,
            pageSize:20,
            total: 0,
            success: true,
        };
    }
    return tableList(data.Result_Data)
}
// 获取交易流水明细表列表
export async function getYSSellDetailsList(params: any) {
    const data = await request('/Revenue/GetYSSellDetailsList', {
        method: 'POST',
        data: {QueryType: 1, SearchParameter : {...params}, SortStr: params.SortStr, keyWord:params?.keyWord, pageindex: params.current,pagesize:params.pageSize},
    })
    
    if (data.Result_Code !== 100) {
        return {
            data: [],
            current:  1,
            pageSize:20,
            total: 0,
            success: true,
        };
    }
    return tableList(data.Result_Data)
}

