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.app.WorkToolBarActivity;
import com.wd.workoffice.bean.StockFlowBean;
import com.wd.workoffice.util.MathUtils;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * 工作台 - 仓库 -详情 - 流水 -流水详情
 * author : flexible
 * email : lgd19940421@163.com
 * github: https://github.com/FlexibleXd
 **/
public class WorkWarehouseStockDetailFlowDetailActivity extends WorkToolBarActivity {
    @BindView(R.id.tv_no)
    TextView tvNo;
    @BindView(R.id.tv_flow_type)
    TextView tvFlowType;
    @BindView(R.id.tv_process_event)
    TextView tvProcessEvent;
    @BindView(R.id.tv_move_num)
    TextView tvMoveNum;
    @BindView(R.id.tv_balance)
    TextView tvBalance;
    @BindView(R.id.tv_operating)
    TextView tvOperating;
    @BindView(R.id.tv_time)
    TextView tvTime;
    @BindView(R.id.tv_remark)
    TextView tvRemark;
    @BindView(R.id.tv_desc)
    TextView tvDesc;
    private StockFlowBean.RecordsBean dataBean;

    @Override
    protected void initView() {
        ButterKnife.bind(this);
        dataBean = JSON.parseObject(getIntent().getStringExtra("detail"), StockFlowBean.RecordsBean.class);
        tvNo.setText(dataBean.getLinkSerialNumber());
        tvFlowType.setText(dataBean.getTypeName());
        tvMoveNum.setText(MathUtils.converData(dataBean.getQuantity(), 3));
        tvBalance.setText(MathUtils.converData(dataBean.getAfterOver(), 3));
        tvRemark.setText(dataBean.getOptComment());
        tvOperating.setText(dataBean.getOptUserName());
        tvTime.setText(dataBean.getCreatedTime());
        tvDesc.setText(dataBean.getRemark());
        tvProcessEvent.setText(dataBean.getOrderEventName());
    }

    @Override
    protected void initData() {
    }


    @Override
    protected void initEvent() {
    }

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

}
