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.OrderDetail;
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 ProStockAdapter extends BaseQuickAdapter<OrderDetail.OrderItemsBean.StockQuantityDetailMapsBean, BaseViewHolder> {

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


    @Override
    protected void convert(BaseViewHolder helper, OrderDetail.OrderItemsBean.StockQuantityDetailMapsBean item) {
        helper.setText(R.id.tv_name, item.getStockName());
        helper.setText(R.id.tv_type, item.getStockTypeName());
        helper.setText(R.id.tv_stock, MathUtils.converData(item.getQuantity(),3));
        helper.setText(R.id.tv_stocking, MathUtils.converData(item.getApplyOut(),3));
        helper.setText(R.id.tv_stocked,MathUtils.converData(item.getApplyInto (),3));
    }
}

