// 服务中心
import { ref,computed } from "vue";
export default (proxy) => {

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

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

    return {
        tableColumn:ref([
            {
                label: '订单号',
                prop: 'outTradeNo',
                type: 'input',
                isSearch: true,
                width:'180px',
            },
            {
                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
            },
            {
                label: '抽成金额',
                prop: 'serviceCentreDistributionAmount',
                width:'150px'
            },
            {
                label: '结算状态',
                prop: 'serviceCentreSettlementStatus',
                type: 'dict',
                dict: service_centre_settlement_stauts,
                width:'150px',
            },
            {
                label: '结算时间',
                prop: 'serviceCentreSettlementTime',
                 width:'150px'
            },
        ]),
     
        tabList,
        tabKey:''
    }
}