<?php
namespace App\ExcelTemp;

trait ExcelTemp
{
    public function getActions ()
    {
       $action = [
           ['action_name' => '订单列表', 'action_value' => 'WashOrderindex'],//订单管理
           // ['action_name' => '采购管理', 'action_value' => 'PurchaseOrderindex'],//采购管理
           // ['action_name' => '调拨单', 'action_value' => 'TransferringOrdersindex'],//调拨单
           ['action_name' => '绩效明细-工单', 'action_value' => 'OrderPerformance'],//工单绩效管理
           ['action_name' => '绩效明细-技师', 'action_value' => 'TechnicianPerformance'],//技师绩效管理
           ['action_name' => '绩效明细-详情', 'action_value' => 'DetailPerformance'],//详情绩效管理
           ['action_name' => '应收应付', 'action_value' => 'receivablePayindex'],//应收应付
           // ['action_name' => '商品列表', 'action_value' => 'GoodsListindex'],//商品
           ['action_name' => '会员客户', 'action_value' => 'MemberListindex'],//会员客户
           // ['action_name' => '销售员绩效', 'action_value' => 'ProPerformanceordersp'],//销售员绩效
           ['action_name' => '工单列表', 'action_value' => 'WashWork'],//工单列表
           // ['action_name' => '售后列表', 'action_value' => 'WashAfterSales'],//售后列表
           // ['action_name' => '罚单列表', 'action_value' => 'WashViolation'],//罚单列表
       ];
        return $action;
    }

    public function getField ($param)
    {
        $filed = [
            'WashOrderindex' => [//订单管理
                ['field_name' => '订单单号', 'field_value' => 'ord_order_number'],
                ['field_name' => '订单状态', 'field_value' => 'ord_wor_state'],
                ['field_name' => '下单金额', 'field_value' => 'ord_order_price'],
                ['field_name' => '订单金额', 'field_value' => 'ord_actual_price'],
                ['field_name' => '保险公司', 'field_value' => 'orcl_business_name'],
                ['field_name' => '定损员姓名', 'field_value' => 'orcl_buac_name'],
                ['field_name' => '定损员电话', 'field_value' => 'orcl_buac_phone'],
                ['field_name' => '4S店名称', 'field_value' => 'orcl_4sname'],
                ['field_name' => '4S店联系人', 'field_value' => 'orcl_name'],
                ['field_name' => '4S店联系电话', 'field_value' => 'orcl_phone'],
                ['field_name' => '车牌号', 'field_value' => 'orcl_car_num'],
                ['field_name' => '创建时间', 'field_value' => 'ord_create_time'],
                ['field_name' => '开票状态', 'field_value' => 'ord_openbill'],
                // ['field_name' => '会员姓名', 'field_value' => 'orcl_name'],
                // ['field_name' => '会员电话', 'field_value' => 'orcl_phone'],
                // ['field_name' => '车牌号', 'field_value' => 'orcl_car_num'],
                // ['field_name' => '品牌车系', 'field_value' => 'orcl_car_brand_series'],
                // ['field_name' => '客户类型', 'field_value' => 'ord_type'],//
                // ['field_name' => '客户来源', 'field_value' => 'orcl_mem_source'], //
                // ['field_name' => '车主姓名', 'field_value' => 'orcl_carowner_name'],//
                // ['field_name' => '车主电话', 'field_value' => 'orcl_carowner_phone'],//
                // ['field_name' => '销售人', 'field_value' => 'orcl_sales_adm_id'],//
                // ['field_name' => '录单人', 'field_value' => 'ord_create_id'],//
                // ['field_name' => '预约时间', 'field_value' => 'orcl_appoint_time'],//
                // ['field_name' => '创建时间', 'field_value' => 'ord_create_time'],//
                // ['field_name' => '施工门店', 'field_value' => 'ord_shop_id'],//

            ],
            /*'PurchaseOrderindex' => [//采购管理
                ['field_name' => '采购单号', 'field_value' => 'cg_number'],
                ['field_name' => '合同单号', 'field_value' => 'contract_number'],
                ['field_name' => '采购状态', 'field_value' => 'cg_state'],
                ['field_name' => '创建时间', 'field_value' => 'create_time'],
                ['field_name' => '供应商', 'field_value' => 'chun_unit_name'],
                ['field_name' => '商品名称', 'field_value' => 'goods_name'],
                ['field_name' => '商品编码', 'field_value' => 'goods_number'],
                ['field_name' => '数量', 'field_value' => 'goods_num'],
                ['field_name' => '采购单价', 'field_value' => 'univalence'],
                ['field_name' => '金额', 'field_value' => 'money'],
                ['field_name' => '付款方式', 'field_value' => 'cg_paymentype'],
                ['field_name' => '业务类型', 'field_value' => 'business_type'],
                /*['field_name' => '入库单号', 'field_value' => 'rk_number'],
                ['field_name' => '入库时间', 'field_value' => 'arrival_time'],
                ['field_name' => '仓库名称', 'field_value' => 'ware_name'],
                /*['field_name' => '入库状态', 'field_value' => 'rk_state'],
                ['field_name' => '入库类型', 'field_value' => 'rk_type'],//
                ['field_name' => '入库数量', 'field_value' => 'ruku_num'], //

            ],*/
            'PurchaseOrderindex' => [//采购管理
                ['field_name' => '采购单号', 'field_value' => 'cg_number'],
                ['field_name' => '供应商', 'field_value' => 'chun_unit_name'],
                ['field_name' => '仓库', 'field_value' => 'ware_name'],
                ['field_name' => '创建人', 'field_value' => 'cg_creator'],
                //['field_name' => '采购总数', 'field_value' => 'num'],
                ['field_name' => '采购总价', 'field_value' => 'cg_amount'],
                ['field_name' => '采购状态', 'field_value' => 'cg_state'],
                ['field_name' => '结算状态', 'field_value' => 'cg_settlementype'],
                ['field_name' => '采购日期', 'field_value' => 'cg_purchasetime'],
                ['field_name' => '创建日期', 'field_value' => 'create_time'],
                ['field_name' => '采购备注', 'field_value' => 'cg_remark'],
                ['field_name' => '联系人', 'field_value' => 'contact_name'],
                ['field_name' => '联系电话', 'field_value' => 'contact_phone'],
                ['field_name' => '交货方式', 'field_value' => 'cg_delivertype'],
                ['field_name' => '票据类型', 'field_value' => 'cg_invoicetype'],
                ['field_name' => '结算方式', 'field_value' => 'cg_paymentype'],
                ['field_name' => '审核人', 'field_value' => 'financial_user'],//

            ],
            'TransferringOrdersindex' => [//调拨单
                ['field_name' => '单号', 'field_value' => 'tror_number'],
                ['field_name' => '调出仓库', 'field_value' => 'tror_out_ware_id'],
                ['field_name' => '调入仓库', 'field_value' => 'tror_in_ware_id'],
                ['field_name' => '商品名称', 'field_value' => 'goo_name'],
                ['field_name' => '商品单位', 'field_value' => 'goo_unit'],
                ['field_name' => '检索编码', 'field_value' => 'goo_goods_encode'],
                ['field_name' => '商品类型', 'field_value' => 'goo_cate_name'],
                ['field_name' => '调拨数量', 'field_value' => 'trog_stock_number'],
                ['field_name' => '创建人', 'field_value' => 'tror_create_id'],
                ['field_name' => '送货人', 'field_value' => 'tror_service_adm_id'],
                ['field_name' => '创建时间', 'field_value' => 'tror_create_time'],
                ['field_name' => '状态', 'field_value' => 'tror_state'],
                ['field_name' => '备注', 'field_value' => 'tror_remark'],
                ['field_name' => '商品单价', 'field_value' => 'wago_goo_price'],
                ['field_name' => '商品总价', 'field_value' => 'all_price'],

            ],
            'receivablePayindex' => [//应收应付
                ['field_name' => '单号', 'field_value' => 'recpay_original_number'],
                ['field_name' => '类型', 'field_value' => 'recpay_type'],
                ['field_name' => '创建时间', 'field_value' => 'recpay_create_time'],
                ['field_name' => '会员类型', 'field_value' => 'recpay_client_type'],
                ['field_name' => '会员名称', 'field_value' => 'recpay_client_name'],
                ['field_name' => '应收金额', 'field_value' => 'recpay_receivable_price'],
                ['field_name' => '欠收金额', 'field_value' => 'recpay_arrears_price'],
                ['field_name' => '实收金额', 'field_value' => 'recpay_actual_price'],
                ['field_name' => '成本', 'field_value' => 'recpay_cost_price'],
                ['field_name' => '绩效', 'field_value' => 'recpay_receivable_pay'],
                ['field_name' => '抹零', 'field_value' => 'recpay_zero_price'],
                ['field_name' => '盈利', 'field_value' => 'recpay_profit'],
                ['field_name' => '状态', 'field_value' => 'recpay_state'],
                ['field_name' => '施工门店', 'field_value' => 'orcl_business_name'],
            ],
            'GoodsListindex' => [//商品
                ['field_name' => '序列号', 'field_value' => 'goo_id'],
                ['field_name' => '商品名称', 'field_value' => 'goo_name'],
                ['field_name' => '检索编号', 'field_value' => 'goo_goods_encode'],
                ['field_name' => '商品别名', 'field_value' => 'goaf_another_name'],
                ['field_name' => '商品品类', 'field_value' => 'goo_cate_name'],
                ['field_name' => '商品品牌', 'field_value' => 'goo_bra_name'],
                ['field_name' => '品牌系列', 'field_value' => 'goo_brse_id'],
                ['field_name' => '零售价', 'field_value' => 'goo_price'],
                ['field_name' => '批发价', 'field_value' => 'goo_wholesale_price'],
                ['field_name' => '采购价', 'field_value' => 'goo_purchase_price'],
                ['field_name' => '单位', 'field_value' => 'goo_unit'],
                ['field_name' => '商品属性', 'field_value' => 'goo_attribute'],
                ['field_name' => '单位长度', 'field_value' => 'goo_unit_conversion'],
            ],
            'OrderPerformance' => [//工单绩效管理
                ['field_name' => '工单单号', 'field_value' => 'pewo_wor_number'],
                ['field_name' => '订单单号', 'field_value' => 'pewo_ord_order_number'],
                ['field_name' => '服务名称', 'field_value' => 'pewo_sepr_name'],
                ['field_name' => '审核时间', 'field_value' => 'pewo_create_time'],
                ['field_name' => '商品名称', 'field_value' => 'pewo_goo_name'],
                ['field_name' => '订单金额', 'field_value' => 'ord_order_price'],
                ['field_name' => '服务技师', 'field_value' => 'pewo_service_adm_name'],
                ['field_name' => '车辆牌照', 'field_value' => 'wocl_car_num'],
                ['field_name' => '品牌车系', 'field_value' => 'pewo_car_brand_series'],
                ['field_name' => '综合得分', 'field_value' => 'pewo_score'],
                ['field_name' => '绩效金额', 'field_value' => 'pewo_performance_total_price'],

            ],
            'TechnicianPerformance' => [//技师绩效管理
                ['field_name' => '技师姓名', 'field_value' => 'pewo_service_adm_name'],
                ['field_name' => '联系电话', 'field_value' => 'adm_phone'],
                ['field_name' => '技师职级', 'field_value' => 'grle_name'],
                ['field_name' => '工单数量', 'field_value' => 'work_quantity'],
                ['field_name' => '绩效总金额', 'field_value' => 'performance_total_price'],

            ],
            'DetailPerformance' => [//详情绩效管理
                ['field_name' => '工单号', 'field_value' => 'pewo_wor_number'],
                ['field_name' => '订单号', 'field_value' => 'pewo_ord_order_number'],
                ['field_name' => '工单组长', 'field_value' => 'service_adm_name'],
                ['field_name' => '施工组员', 'field_value' => 'team_service_adm_name'],
                ['field_name' => '车辆牌照', 'field_value' => 'wocl_car_num'],
                ['field_name' => '施工车辆', 'field_value' => 'pewo_car_brand_series'],
                ['field_name' => '核算时间', 'field_value' => 'pewo_create_time'],
                ['field_name' => '施工项目', 'field_value' => 'pewo_sepr_name'],
                ['field_name' => '施工产品', 'field_value' => 'pewo_goo_name'],
                ['field_name' => '综合得分', 'field_value' => 'pewo_score'],
                ['field_name' => '绩效金额', 'field_value' => 'pewo_performance_total_price'],
                ['field_name' => '派单时间', 'field_value' => 'wor_create_time'],
                ['field_name' => '验车时间', 'field_value' => 'vaca_create_time'],
                ['field_name' => '施工完成时间', 'field_value' => 'wor_achieve_time'],
                ['field_name' => '完成工单耗时', 'field_value' => 'consuming'],
                ['field_name' => '售后订单商品', 'field_value' => 'afsi_goo_name'],
                ['field_name' => '客户姓名', 'field_value' => 'wocl_name'],
                ['field_name' => '客户电话', 'field_value' => 'wocl_phone'],
                ['field_name' => '省', 'field_value' => 'wocl_province'],
                ['field_name' => '市', 'field_value' => 'wocl_city'],
                ['field_name' => '县', 'field_value' => 'wocl_county'],
                ['field_name' => '详细地址', 'field_value' => 'wocl_address'],
                ['field_name' => '施工门店', 'field_value' => 'wor_address_name'],
                ['field_name' => '施工说明', 'field_value' => 'wor_explain'],
                ['field_name' => '销售人员', 'field_value' => 'wocl_sales_adm_name'],

            ],
            'MemberListindex' => [//会员客户
                ['field_name' => '4S店名称', 'field_value' => 'mem_4sname'],
                ['field_name' => '4S店联系人', 'field_value' => 'mem_name'],
                // ['field_name' => '性别', 'field_value' => 'mem_sex'],
                ['field_name' => '4S店联系电话', 'field_value' => 'mem_phone'],
                ['field_name' => '联系地址', 'field_value' => 'mem_address'],
                // ['field_name' => '车牌号', 'field_value' => 'mem_car_num'],
                // ['field_name' => '品牌车系', 'field_value' => 'mem_car_series'],
                // ['field_name' => '会员级别', 'field_value' => 'mem_bership'],
                // ['field_name' => '会员等级', 'field_value' => 'mem_level'],
                // ['field_name' => '生日', 'field_value' => 'mem_birthday'],
                // ['field_name' => '来源', 'field_value' => 'mem_source'],
                ['field_name' => '欠款金额', 'field_value' => 'mem_arrears'],
                // ['field_name' => '余额', 'field_value' => 'mem_rec_banlance'],
                // ['field_name' => '积分', 'field_value' => 'mem_points'],
                ['field_name' => '创建人', 'field_value' => 'mem_create_id'],
                // ['field_name' => '邀请人', 'field_value' => 'mem_fid'],

            ],
            'ProPerformanceordersp' => [//销售员绩效
                ['field_name' => '订单单号', 'field_value' => 'ord_order_number'],
                ['field_name' => '订单时间', 'field_value' => 'ord_create_time'],
                ['field_name' => '销售员', 'field_value' => 'orcl_sales_adm_name'],
                ['field_name' => '订单金额', 'field_value' => 'ord_order_price'],
                ['field_name' => '订单状态', 'field_value' => 'ord_wor_state_name'],
                ['field_name' => '结算状态', 'field_value' => 'ord_pay_state_name'],
                ['field_name' => '绩效金额', 'field_value' => 'performance'],
                ['field_name' => '绩效详情', 'field_value' => 'new_order_goods'],
                ['field_name' => '来源', 'field_value' => 'ord_source_name'],
                ['field_name' => '支付方式', 'field_value' => 'ord_payment_name'],
                ['field_name' => '计算方式', 'field_value' => 'ord_saleman_type'],
            ],
            'WashWork' => [//工单列表
                ['field_name' => '订单单号', 'field_value' => 'wor_order_number'],
                ['field_name' => '工单编号', 'field_value' => 'wor_number'],
                ['field_name' => '派单时间', 'field_value' => 'wor_create_time'],
                ['field_name' => '预约时间', 'field_value' => 'wor_appoint_time'],
                ['field_name' => '施工门店', 'field_value' => 'shop_store_name'],
                ['field_name' => '工单类型', 'field_value' => 'ord_new_type_name'],
                ['field_name' => '施工技师', 'field_value' => 'service_adm_name'],
                ['field_name' => '工单商品', 'field_value' => 'woek_good'],
                ['field_name' => '客户姓名', 'field_value' => 'wocl_name'],
                ['field_name' => '联系电话', 'field_value' => 'wocl_phone'],
                ['field_name' => '省份', 'field_value' => 'wocl_province'],
                ['field_name' => '城市', 'field_value' => 'wocl_city'],
                ['field_name' => '区县', 'field_value' => 'wocl_county'],
                ['field_name' => '详细地址', 'field_value' => 'wocl_address'],
                ['field_name' => '车牌号', 'field_value' => 'wocl_car_num'],
                ['field_name' => '车辆信息', 'field_value' => 'wocl_car_brand_series']
            ],
            'WashAfterSales' => [//售后列表
                ['field_name' => '订单单号', 'field_value' => 'afsl_order_number'],
                ['field_name' => '售后编号', 'field_value' => 'afsl_after_number'],
                ['field_name' => '创建时间', 'field_value' => 'afsl_create_time'],
                ['field_name' => '预约时间', 'field_value' => 'afsl_reservation_time'],
                ['field_name' => '订单项目', 'field_value' => 'wash_after_sale_items'],
                ['field_name' => '售后耗材', 'field_value' => 'afsl_goods'],
                ['field_name' => '售后标签', 'field_value' => 'afsl_lab_name'],
                ['field_name' => '售后备注', 'field_value' => 'afsl_remark'],
                ['field_name' => '总金额', 'field_value' => 'afsl_actual_price'],
                ['field_name' => '会员姓名', 'field_value' => 'afsc_name'],
                ['field_name' => '会员电话', 'field_value' => 'afsc_phone'],
                ['field_name' => '车主姓名', 'field_value' => 'afsc_carowner_name'],
                ['field_name' => '车主电话', 'field_value' => 'afsc_carowner_phone'],
                ['field_name' => '车牌号', 'field_value' => 'afsc_car_num'],
                ['field_name' => '车架号', 'field_value' => 'afsc_car_vin'],
                ['field_name' => '品牌车系', 'field_value' => 'afsc_car_brand_series'],
                ['field_name' => '售后状态', 'field_value' => 'state_name'],
                ['field_name' => '创建人', 'field_value' => 'create_name'],
                ['field_name' => '售后位置', 'field_value' => 'afsl_parts'],
                ['field_name' => '指派技师', 'field_value' => 'return_adm_data'],
            ],
            'WashViolation' => [//罚单列表
                ['field_name' => '订单单号', 'field_value' => 'viti_order_number'],
                ['field_name' => '处罚原因', 'field_value' => 'viti_reason'],
                ['field_name' => '处罚信息', 'field_value' => 'vtde_data'],
                ['field_name' => '创建人', 'field_value' => 'viti_create_name'],
                ['field_name' => '创建时间', 'field_value' => 'viti_create_time'],
                ['field_name' => '驳回原因', 'field_value' => 'viti_reject_reason'],
                ['field_name' => '状态', 'field_value' => 'viti_state'],
            ],
        ];

        return $filed[$param];
    }
}
