package com.gingersoft.supply_chain.mvp.ui.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.gingersoft.gsa.cloud.common.utils.time.TimeUtils;
import com.gingersoft.supply_chain.R;
import com.gingersoft.supply_chain.mvp.bean.PurchaseOrderDetailsBean;
import com.gingersoft.supply_chain.mvp.bean.WareHousingOrderBean;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

/**
 * @author 宇航.
 * User: admin
 * Date: 2020/12/2
 * Time: 17:36
 * Use: 庫存訂單列表
 * 最新 @{WarehousingQueryAdapter}
 */
@Deprecated
public class WareHousingAdapter extends BaseQuickAdapter<WareHousingOrderBean.WareHousingBean, BaseViewHolder> {
    public WareHousingAdapter() {
        super(R.layout.item_ware_housing);
//        addChildClickViewIds(R.id.iv_supplier_delete, R.id.btn_purchase_send, R.id.btn_purchase_buy_again, R.id.btn_receiver_goods);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder viewHolder, WareHousingOrderBean.WareHousingBean wareHousingBean) {
//        viewHolder.setText(R.id.tv_warehouse_supplier_name, "" + wareHousingBean.getOrderNo());
        viewHolder.setText(R.id.tv_warehouse_create_time, TimeUtils.getTime(wareHousingBean.getCreateTime(), TimeUtils.DEFAULT_DATE_FORMAT_YMDHM));
        viewHolder.setText(R.id.tv_warehouse_no, wareHousingBean.getWarehousingOrderNo()+"");
//        viewHolder.setText(R.id.tv_warehouse_order_no, purchaseOrderBean.getName());
        viewHolder.setText(R.id.tv_warehouse_goods_num, wareHousingBean.getName());
        viewHolder.setText(R.id.tv_warehouse_total_price, wareHousingBean.getTotalPrice()+"");

        viewHolder.setText(R.id.tv_warehouse_order_state, PurchaseOrderDetailsBean.getStringByOrderState(wareHousingBean.getStatus()));
    }
}
