|
|
@@ -8,6 +8,7 @@ import android.widget.TextView
|
|
|
import androidx.lifecycle.Observer
|
|
|
import cn.muchinfo.rma.R
|
|
|
import cn.muchinfo.rma.view.base.BaseActivity
|
|
|
+import cn.muchinfo.rma.view.base.chart.old.timeCharts.TimeChartView
|
|
|
import org.jetbrains.anko.verticalLayout
|
|
|
|
|
|
/**
|
|
|
@@ -15,6 +16,8 @@ import org.jetbrains.anko.verticalLayout
|
|
|
*/
|
|
|
class ChartActivity : BaseActivity<ChartViewModel>() {
|
|
|
|
|
|
+ lateinit var timeChartView: TimeChartView
|
|
|
+
|
|
|
companion object {
|
|
|
// 启动页面
|
|
|
fun start(goodsCode: String?, outGoodsCode: String?, context: Context) {
|
|
|
@@ -30,8 +33,6 @@ class ChartActivity : BaseActivity<ChartViewModel>() {
|
|
|
super.onCreate(savedInstanceState)
|
|
|
setContentView(R.layout.activity_chart)
|
|
|
initView()
|
|
|
-
|
|
|
-
|
|
|
viewModel.initData(intent)
|
|
|
viewModel.initRequest()
|
|
|
}
|
|
|
@@ -41,10 +42,17 @@ class ChartActivity : BaseActivity<ChartViewModel>() {
|
|
|
finish()
|
|
|
}
|
|
|
|
|
|
+ timeChartView = findViewById(R.id.time_chart_view)
|
|
|
+ timeChartView = TimeChartView(this)
|
|
|
+
|
|
|
viewModel.goodsInfo.observe(this, Observer {
|
|
|
findViewById<TextView>(R.id.goods_name_tv).text = it?.goodsname
|
|
|
findViewById<TextView>(R.id.goods_code_tv).text = it?.goodscode
|
|
|
})
|
|
|
+
|
|
|
+ viewModel.tsData.observe(this, Observer {
|
|
|
+ timeChartView.setData(it)
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
|