package com.wd.workoffice.ui.activity.bat.work;

import android.widget.TextView;
import com.alibaba.fastjson.JSON;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.WarehouseStockBean;
import com.wd.workoffice.app.WorkToolBarActivity;
import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 工作台 - 仓库 -数量
 * author : flexible
 * email : lgd19940421@163.com
 * github: https://github.com/FlexibleXd
 **/
public class WorkWarehouseStockNumActivity extends WorkToolBarActivity {
    @BindView(R.id.tv_name)
    TextView tvName;
    @BindView(R.id.tv_img_code)
    TextView tvImgCode;
    @BindView(R.id.tv_code)
    TextView tvCode;
    @BindView(R.id.tv_spec)
    TextView tvSpec;
    @BindView(R.id.tv_stock)
    TextView tvStock;
    @BindView(R.id.tv_freeze)
    TextView tvFreeze;
    private WarehouseStockBean.RecordsBean dataBean;

    @Override
    protected void initView() {
        ButterKnife.bind(this);
        dataBean = JSON.parseObject(getIntent().getStringExtra("detail"), WarehouseStockBean.RecordsBean.class);
        tvName.setText( dataBean.getProductName());
        tvCode.setText(dataBean.getProductSoleCode());
        tvImgCode.setText(dataBean.getProductSimpleCode());
        tvStock.setText(String.valueOf(dataBean.getQuantity()));
        tvFreeze.setText(String.valueOf(dataBean.getLockQuantity()));
        tvSpec.setText(dataBean.getProductSpec());
    }

    @Override
    protected void initData() {
    }


    @Override
    protected void initEvent() {
    }

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

}
