package com.wd.workoffice.ui.activity.mes.user;

import android.widget.TextView;

import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.mesBean.MachineDetailBean;

import butterknife.BindView;
import butterknife.ButterKnife;
import flexible.xd.android_base.utils.TimeUtils;

/**
 * 用户数据采集，三大件供货记录
 * author : flexible
 * email : lgd19940421@163.com
 * github: https://github.com/FlexibleXd
 **/
public class MesSupplierActivity extends WorkToolBarActivity {
    @BindView(R.id.tv_code)
    TextView tvCode;
    @BindView(R.id.tv_name)
    TextView tvName;
    @BindView(R.id.tv_img_code)
    TextView tvImgCode;
    @BindView(R.id.tv_send_time)
    TextView tvSendTime;
    @BindView(R.id.tv_send_num)
    TextView tvSendNum;
    private MachineDetailBean.SupplyListBean data;

    @Override
    protected void initView() {
        ButterKnife.bind(this);
    }

    @Override
    protected void initData() {
        data = JSON.parseObject(getIntent().getStringExtra("data"), MachineDetailBean.SupplyListBean.class);
        tvCode.setText(data.getProductsCode());
        tvImgCode.setText(data.getFigureNumber ());
        tvName.setText(data.getProductsName());
        tvSendNum.setText(data.getDeliveryNumber());
        tvSendTime.setText(TimeUtils.millis2String(data.getDeliveryDateTime()/1000));
    }


    @Override
    protected void initEvent() {
    }

    @Override
    protected int layoutId() {
        return R.layout.activity_mes_user_data_supplier_detail;
    }

}
