package com.lukouguoji.gjj.viewModel

import android.content.Intent
import androidx.lifecycle.MutableLiveData
import com.lukouguoji.module_base.base.BaseViewModel
import com.lukouguoji.module_base.bean.GjjImportTally
import com.lukouguoji.module_base.common.Constant

/**
 * 国际进港理货报告详情 ViewModel
 */
class IntImpTallyDetailsViewModel : BaseViewModel() {

    // 理货数据
    val dataBean = MutableLiveData(GjjImportTally())

    /**
     * 初始化数据（从列表项携带的数据）
     */
    fun initOnCreated(intent: Intent) {
        val tally = intent.getSerializableExtra(Constant.Key.DATA) as? GjjImportTally
        if (tally != null) {
            dataBean.value = tally
        }
    }
}
