|
@@ -2,7 +2,6 @@ package com.pan_american.android.ui.resource_management.guide_resource
|
|
|
|
|
|
import android.os.Bundle
|
|
|
import android.text.InputType
|
|
|
-import android.view.View
|
|
|
import android.widget.RadioButton
|
|
|
import android.widget.TextView
|
|
|
import androidx.core.content.res.ResourcesCompat
|
|
@@ -68,7 +67,7 @@ class AddGuideResourceActivity : BaseActivity<ActivityAddGuideResourceBinding>()
|
|
|
|
|
|
guideResource = intent.getSerializableExtra("guideResource", GuideResource::class.java) as GuideResource
|
|
|
|
|
|
- initGuideResourceInfo()
|
|
|
+ initGuideResourceDetail()
|
|
|
|
|
|
binding.commit.setText(resources.getString(R.string.update))
|
|
|
|
|
@@ -241,14 +240,23 @@ class AddGuideResourceActivity : BaseActivity<ActivityAddGuideResourceBinding>()
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- private fun initGuideResourceInfo() {
|
|
|
+ private fun initGuideResourceDetail() {
|
|
|
binding.apply {
|
|
|
for (item in OASystem.guideType) {
|
|
|
if (item.id == guideResource.staffType) {
|
|
|
guideType.text = item.name
|
|
|
+ guideTypeId = item.id
|
|
|
}
|
|
|
}
|
|
|
- serviceScore.text = guideResource.score.toString()
|
|
|
+
|
|
|
+ //老数据没有选择评分,更新数据时需要选择评分
|
|
|
+ for (item in OASystem.score) {
|
|
|
+ if (guideResource.score.toString() == item) {
|
|
|
+ serviceScore.text = item
|
|
|
+ isChose = true
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
unitArea.setText(guideResource.unitArea)
|
|
|
departmentName.setText(guideResource.unitName)
|
|
|
supplierLocation.setText(guideResource.address)
|
|
@@ -360,9 +368,10 @@ class AddGuideResourceActivity : BaseActivity<ActivityAddGuideResourceBinding>()
|
|
|
back()
|
|
|
|
|
|
} else {
|
|
|
- showMessage(baseResponse.msg)
|
|
|
|
|
|
binding.commit.setButtonStatus(0)
|
|
|
+
|
|
|
+ showMessage(baseResponse.msg)
|
|
|
}
|
|
|
}
|
|
|
}
|