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
                },
                {
                    label: '订单开始时间',
                    prop: 'orderTime',
                },
                {
                    label: '订单完成时间',
                    prop: 'serviceEndTime',
                },
                {
                    label: '用户名称',
                    prop: 'userName',
                },
                {
                    label: '志愿者名称',
                    prop: 'volunteerName',
                },
                {
                    label: '服务项目',
                    prop: 'businessDescribe',
                },
                {
                    label: '订单总金额（元）',
                    prop: 'orderTotalPrice',
                },
                {
                    label: '订单状态',
                    prop: 'orderStatus',
                    type: 'dict',
                    dict: lrr_service_status
                },
                {
                    label: '区域公司',
                    prop: 'areaName',
                    type: 'input',
                    isSearch: true
                },
                {
                    label: '区域公司抽成金额',
                    prop: 'areaDistributionAmount',
                },
                {
                    label: '区域公司结算状态',
                    prop: 'areaSettlementStatus',
                },
                {
                    label: '区域公司结算时间',
                    prop: 'areaSettlementTime',
                }
            ]
            ),
        dialogData: {
            title: '结算申请',
            column: [
                {
                    label: '收款方式',
                    prop: 'payerMethod',
                    type: 'select',
                    dictionary: 'settlement_application_payee_method',
                    rules: [
                        { required: true, message: '请选择收款方式', trigger: 'change' }
                    ],
                },
                {
                    label: '收款账号',
                    prop: 'payerAccount',
                    type: 'input',
                    rules: [
                        { required: true, message: '请输入收款账号', trigger: 'change' }
                    ],
        
                },
                {
                    label: '收款银行名称',
                    prop: 'payerBankName',
                    type: 'input',
                    rules: [
                        { required: true, message: '请输入收款银行名称', trigger: 'change' }
                    ],
        
                },
                {
                    label: '收款人',
                    prop: 'payerName',
                    type: 'input',
                    rules: [
                        { required: true, message: '请输入收款人', trigger: 'change' }
                    ],
                },
                {
                    label: '收款人备注',
                    prop: 'payerRemark',
                    type: 'textarea',
                },
            ]
        },
        tabList,
      
    }
}