import { ref,computed } from "vue";
// 平台
export default (proxy) => {

    const { 
        lrr_service_status,
        area_settlement_status
     } = proxy.useDict("lrr_service_status","area_settlement_status");

     const tabList =computed(() => {
        let data = []
        data = area_settlement_status.value.map(item => {
            return {
                title: item.label,
                name: item.value
            }
        })
        return data || [];
    })

    return {
        tableColumn:ref(
            [
                {
                    label: '订单号',
                    prop: 'outTradeNo',
                    type: 'input',
                    isSearch: true,
                    width:'200px',
                },
                {
                    label: '订单开始时间',
                    prop: 'orderTime',
                    width:'160px',
                    isSearch: true,
                    type: 'date',
                    keys: ['orderTimeStart', 'orderTimeEnd'],
                },
                {
                    label: '订单完成时间',
                    prop: 'serviceEndTime',
                    width:'160px',
                    isSearch: true,
                    type: 'date',
                    keys: ['serviceEndTimeStart', 'serviceEndTimeEnd'],
                },
                {
                    label: '用户名称',
                    prop: 'userNickName',
                    width:'140px',
                    type: 'input',
                    isSearch: true
                },
                {
                    label: '志愿者名称',
                    prop: 'volunteerName',
                    width:'140px',
                    type: 'input',
                    isSearch: true
                },
                {
                    label: '服务项目',
                    prop: 'businessTierName',
                    width:'170px'
                },
                {
                    label: '订单总金额（元）',
                    prop: 'orderTotalPrice',
                    width:'140px'
                },
                {
                    label: '订单状态',
                    prop: 'orderStatus',
                    type: 'dict',
                    dict: lrr_service_status,
                    isSearch: true,
                    width:'150px'
                },
                {
                    label: '区域公司',
                    prop: 'areaName',
                    type: 'input',
                    isSearch: true,
                    width:'150px'
                },
                {
                    label: '区域公司抽成金额',
                    prop: 'areaDistributionAmount',
                     width:'150px'
                },
                {
                    label: '区域公司结算状态',
                    prop: 'areaSettlementStatus',
                    type: 'dict',
                    dict: area_settlement_status,
                    width:'150px',
                },
                {
                    label: '区域公司结算时间',
                    prop: 'areaSettlementTime',
                    width:'160px'
                }
            ]
            ),
      
        tabList,
        tabKey:'areaSettlementStatus'
      
    }
}