package com.sixin.module_p.ui.goods.transportLog.list

import android.content.Context
import android.content.Intent
import android.os.Bundle
import com.lukouguoji.module_base.ktx.getLifecycleOwner
import com.sixin.module_p.R
import com.sixin.module_p.base.BasePdaActivity
import com.sixin.module_p.databinding.ActivityPdaTransportLogListBinding

class PdaTransportLogActivity :
    BasePdaActivity<ActivityPdaTransportLogListBinding, PdaTransportLogViewModel>() {

    override fun layoutId(): Int {
        return R.layout.activity_pda_transport_log_list
    }

    override fun viewModelClass(): Class<PdaTransportLogViewModel> {
        return PdaTransportLogViewModel::class.java
    }

    override fun initOnCreate(savedInstanceState: Bundle?) {
        setBackArrow("转运记录")
        binding.viewModel = viewModel
        viewModel.pageModel.bindSmartRefreshLayout(
            binding.srl,
            binding.rv,
            viewModel,
            getLifecycleOwner()
        )
        viewModel.initOnCreated(intent)

        viewModel.getData()
    }

    companion object {
        @JvmStatic
        fun start(context: Context) {
            val starter = Intent(context, PdaTransportLogActivity::class.java)
            context.startActivity(starter)
        }
    }
}