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.FlowBean;
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 WorkAccountFlowDetailActivity extends WorkToolBarActivity {
    @BindView(R.id.tv_show_type)
    TextView tvShowType;
    @BindView(R.id.tv_dep)
    TextView tvDep;
    @BindView(R.id.tv_price)
    TextView tvPrice;
    @BindView(R.id.tv_start_price)
    TextView tvStartPrice;
    @BindView(R.id.tv_end_price)
    TextView tvEndPrice;
    @BindView(R.id.tv_from_dep)
    TextView tvFromDep;
    @BindView(R.id.tv_order_type)
    TextView tvOrderType;
    @BindView(R.id.tv_order_no)
    TextView tvOrderNo;
    @BindView(R.id.tv_order_dep)
    TextView tvOrderDep;
    @BindView(R.id.tv_receive_order_dep)
    TextView tvReceiveOrderDep;
    @BindView(R.id.tv_client)
    TextView tvClient;
    @BindView(R.id.tv_supplier)
    TextView tvSupplier;
    @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 FlowBean.RecordsBean dataBean;

    @Override
    protected void initView() {
        ButterKnife.bind(this);
        dataBean= JSON.parseObject(getIntent().getStringExtra("detail"),FlowBean.RecordsBean.class);
        tvShowType.setText(dataBean.getDisplayTypeName());
        tvDep.setText(dataBean.getDeptName());
        tvPrice.setText(MathUtils.converData(String.valueOf(dataBean.getMoney()),2));
        tvEndPrice.setText(MathUtils.converData(String.valueOf(dataBean.getAfterOver()),2));
        tvStartPrice.setText(MathUtils.converData(String.valueOf(dataBean.getEarlyOver()),2));
        tvFromDep.setText(dataBean.getFlowAccountName());
        tvOrderType.setText(dataBean.getRelOrderTypeName());
        tvOrderNo.setText(dataBean.getOrderId());
        tvOrderDep.setText(dataBean.getLaunchDeptName());
        tvReceiveOrderDep.setText(dataBean.getReceiveDeptName());
        tvClient.setText(dataBean.getCustomerName());
        tvSupplier.setText(dataBean.getSupplierName());
        tvRemark.setText(dataBean.getComments());
        tvDesc.setText(dataBean.getRemark());
        tvOperating.setText(dataBean.getCreatedName());
        tvTime.setText(dataBean.getCreatedTime());
    }

    @Override
    protected void initData() {
    }


    @Override
    protected void initEvent() {
    }

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

}
