package com.wd.workoffice.ui.adapter;


import android.text.Editable;
import android.text.TextUtils;
import android.text.TextWatcher;
import android.widget.EditText;

import com.alibaba.fastjson.JSON;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.DeviceBean;
import com.wd.workoffice.bean.event.ModifyCarEvent;
import com.wd.workoffice.util.MathUtils;
import com.wd.workoffice.widget.AddAndReduceView;

import org.greenrobot.eventbus.EventBus;

import java.util.List;

import flexible.xd.android_base.utils.ToastUtil;

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

public class DeviceConfirmAdapter extends BaseQuickAdapter<DeviceBean.RecordsBean, BaseViewHolder> {

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


    @Override
    protected void convert(BaseViewHolder helper, DeviceBean.RecordsBean item) {
        helper.setText(R.id.tv_name, item.getTitle());
        helper.setText(R.id.tv_spec, item.getSpecification());
        helper.setText(R.id.tv_price, item.getCarPrice());
        helper.setText(R.id.tv_num, item.getCarNum());
        helper.setText(R.id.tv_all_price, MathUtils.multiply(item.getCarNum(), item.getCarPrice() , 3));
    }
}

