package com.wd.workoffice.ui.adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.ContactsBean;
import com.wd.workoffice.bean.MoneyOutBean;
import com.wd.workoffice.util.MathUtils;
import com.wd.workoffice.util.WorkUtils;

import java.util.List;

/**
 * Created by flexible on 2018/8/13.
 */

public class WorkFinancialOutAdapter extends BaseQuickAdapter<MoneyOutBean.RecordsBean, BaseViewHolder> {

    public WorkFinancialOutAdapter(int layoutResId, List data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper,MoneyOutBean.RecordsBean item) {
        helper.setText(R.id.tv_name,item.getSerialNumber());
        helper.setText(R.id.tv_dep,item.getApplyDeptName());
        helper.setText(R.id.tv_client,item.getCustomerName());

        helper.setText(R.id.tv_process,item.getProcessName());
        helper.setText(R.id.tv_order_type,item.getOrderTypeName());
        helper.setText(R.id.tv_price,String.valueOf(item.getApplyAmount()));
        helper.setText(R.id.tv_status, WorkUtils.getFinancialStatus(Integer.valueOf(item.getStatus())));
    }
}

