package com.wd.workoffice.ui.adapter;


import android.graphics.Color;
import android.text.TextUtils;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.SendApplyBean;
import com.wd.workoffice.bean.mesBean.MesOrderBean;

import java.util.List;

import androidx.annotation.Nullable;
import flexible.xd.android_base.utils.TimeUtils;

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

public class MesOrderAdapter extends BaseQuickAdapter<MesOrderBean, BaseViewHolder> {
    public MesOrderAdapter(int layoutResId, List data) {
        super(layoutResId, data);
    }


    @Override
    protected void convert(BaseViewHolder helper, MesOrderBean item) {
//        if (TextUtils.equals(item.getScheduleStatus(),"")||TextUtils.equals(item.getScheduleStatus(),"0") ) {
//            helper.setTextColor(R.id.tv_status, Color.parseColor("#FFD16A6A"));
//            helper.setText(R.id.tv_status,"未排程");
//        } else if (TextUtils.equals(item.getScheduleStatus(),"-")){
//            helper.setTextColor(R.id.tv_status, Color.parseColor("#FF34AA68"));
//            helper.setText(R.id.tv_status,"");
//        }else {
//            helper.setTextColor(R.id.tv_status, Color.parseColor("#FF34AA68"));
//            helper.setText(R.id.tv_status,"已排程");
//        }
        helper.setText(R.id.tv_no,String.format("指令单号:%s", item.getManufactureOrderNumber()));
        helper.setText(R.id.tv_client, item.getCustomerName());
        helper.setText(R.id.tv_img_code, item.getDrawingNumber());
        helper.setText(R.id.tv_order_num, item.getPlanCount()+"");
        helper.setText(R.id.tv_road,item.getProcessCode());
    }

}

