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.mesBean.TaskMaterials;
import com.wd.workoffice.bean.mesBean.TaskPeopleBean;
import com.wd.workoffice.util.MathUtils;

import java.util.List;

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

public class WorkTaskMaterialsAdapter extends BaseQuickAdapter<TaskMaterials.ListBean, BaseViewHolder> {

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


    @Override
    protected void convert(BaseViewHolder helper, TaskMaterials.ListBean item) {
        helper.setText(R.id.tv_no, String.format("物料编码:%s", item.getItemCode()));
        helper.setText(R.id.tv_name, item.getItemName());
        helper.setText(R.id.tv_num, MathUtils.converData(item.getItemQty(),3));
        helper.setText(R.id.tv_stock, item.getLocationName());
        helper.setText(R.id.tv_grant, item.isDirectReq()?"是":"否");
    }
}

