|
@@ -3,10 +3,15 @@ package com.pan_american.android.ui.group_visa.visa_payment_insert
|
|
|
import android.os.Bundle
|
|
|
import android.text.Editable
|
|
|
import android.text.TextWatcher
|
|
|
+import android.view.Gravity
|
|
|
import android.view.View
|
|
|
+import android.view.ViewGroup
|
|
|
+import android.widget.EditText
|
|
|
+import android.widget.PopupWindow
|
|
|
import android.widget.TextView
|
|
|
import androidx.core.content.res.ResourcesCompat
|
|
|
import androidx.recyclerview.widget.LinearLayoutManager
|
|
|
+import androidx.recyclerview.widget.RecyclerView
|
|
|
import com.pan_american.android.OASystem
|
|
|
import com.pan_american.android.R
|
|
|
import com.pan_american.android.base.BaseActivity
|
|
@@ -80,6 +85,12 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
|
|
|
private var isAuditGM = -1
|
|
|
|
|
|
+ private var agencyFeeTypeId = -1
|
|
|
+
|
|
|
+ private val agencyFeeTypeList = ArrayList<Selector>()
|
|
|
+
|
|
|
+ private val countryFeeList = ArrayList<Selector>()
|
|
|
+
|
|
|
override fun getViewBinding() = ActivityAddVisaPaymentBinding.inflate(layoutInflater)
|
|
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
@@ -138,6 +149,9 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
if (!canBeEdit()) {
|
|
|
binding.apply {
|
|
|
|
|
|
+ visaDescription.isEnabled(false)
|
|
|
+ area.isEnabled = false
|
|
|
+ agencyFeeType.isEnabled = false
|
|
|
addCustomer.visibility = View.GONE
|
|
|
visaPrice.isEnabled = false
|
|
|
priceUnit.isEnabled = false
|
|
@@ -179,6 +193,7 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
for (item in priceUnitList) {
|
|
|
if (item.currencyCode == "CNY") {
|
|
|
binding.priceUnit.text = item.currencyCode
|
|
|
+ binding.sumUnit.text = item.currencyCode
|
|
|
priceUnit = item.currencyId
|
|
|
}
|
|
|
}
|
|
@@ -187,6 +202,155 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
|
|
|
override fun initEvents() {
|
|
|
|
|
|
+ binding.area.setOnClickListener {
|
|
|
+
|
|
|
+ val selectDataSource = ArrayList<Selector>()
|
|
|
+
|
|
|
+ for (item in countryFeeList) {
|
|
|
+ selectDataSource.add(item)
|
|
|
+ }
|
|
|
+
|
|
|
+ val searchSelectorView =
|
|
|
+ View.inflate(OASystem.context, R.layout.popup_list_selector_with_search, null)
|
|
|
+ popupWindow = PopupWindow(
|
|
|
+ searchSelectorView,
|
|
|
+ ViewGroup.LayoutParams.MATCH_PARENT,
|
|
|
+ binding.root.height * 3 / 4
|
|
|
+ )
|
|
|
+
|
|
|
+ showPopupWindow {
|
|
|
+
|
|
|
+ val searchTextView = searchSelectorView.findViewById<EditText>(R.id.search_text)
|
|
|
+ val selectorView = searchSelectorView.findViewById<RecyclerView>(R.id.recycler_view)
|
|
|
+
|
|
|
+ val layoutManager = LinearLayoutManager(OASystem.context)
|
|
|
+ selectorView.layoutManager = layoutManager
|
|
|
+
|
|
|
+ val adapter = ListAdapter.Builder<Selector>().apply {
|
|
|
+ setData(selectDataSource)
|
|
|
+ setLayoutId(R.layout.item_selector)
|
|
|
+ addBindView { itemView, data ->
|
|
|
+ itemView.findViewById<TextView>(R.id.selector_item_name).apply {
|
|
|
+ if (binding.area.text == data.country) {
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color_blue,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
+ text = data.country
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }.create()
|
|
|
+
|
|
|
+ selectorView.adapter = adapter
|
|
|
+
|
|
|
+ adapter.onRecyclerViewItemClick =
|
|
|
+ object : ListAdapter.OnRecyclerViewItemClick<Selector> {
|
|
|
+ override fun onItemClick(position: Int) {
|
|
|
+
|
|
|
+ binding.area.text = selectDataSource[position].country
|
|
|
+
|
|
|
+ popupWindow.dismiss()
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ searchTextView.addTextChangedListener(object : TextWatcher {
|
|
|
+ override fun beforeTextChanged(
|
|
|
+ s: CharSequence?,
|
|
|
+ start: Int,
|
|
|
+ count: Int,
|
|
|
+ after: Int
|
|
|
+ ) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ override fun onTextChanged(
|
|
|
+ s: CharSequence?,
|
|
|
+ start: Int,
|
|
|
+ before: Int,
|
|
|
+ count: Int
|
|
|
+ ) {
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ override fun afterTextChanged(s: Editable?) {
|
|
|
+ adapter.notifyItemRangeRemoved(0, selectDataSource.size)
|
|
|
+
|
|
|
+ selectDataSource.clear()
|
|
|
+
|
|
|
+ for (item in countryFeeList) {
|
|
|
+ if (item.country.contains(s.toString())) {
|
|
|
+ selectDataSource.add(item)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ adapter.notifyItemRangeInserted(0, selectDataSource.size)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ popupWindow.showAtLocation(binding.root, Gravity.BOTTOM, 0, 0)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ binding.agencyFeeType.setOnClickListener {
|
|
|
+ showSelector {
|
|
|
+ val adapter = ListAdapter.Builder<Selector>().apply {
|
|
|
+ setData(agencyFeeTypeList)
|
|
|
+ setLayoutId(R.layout.item_selector)
|
|
|
+ addBindView { itemView, data ->
|
|
|
+ itemView.findViewById<TextView>(R.id.selector_item_name).apply {
|
|
|
+ if (data.id == agencyFeeTypeId) {
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color_blue,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
+ } else {
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
+ }
|
|
|
+
|
|
|
+ text = data.text
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }.create()
|
|
|
+
|
|
|
+ selector.adapter = adapter
|
|
|
+
|
|
|
+ adapter.onRecyclerViewItemClick =
|
|
|
+ object : ListAdapter.OnRecyclerViewItemClick<Selector> {
|
|
|
+ override fun onItemClick(position: Int) {
|
|
|
+ agencyFeeTypeList[position].apply {
|
|
|
+ agencyFeeTypeId = id
|
|
|
+
|
|
|
+ binding.agencyFeeType.text = text
|
|
|
+
|
|
|
+ popupWindow.dismiss()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
binding.addCustomer.setOnClickListener {
|
|
|
showSelector {
|
|
|
val adapter = ListAdapter.Builder<Selector>().apply {
|
|
@@ -270,9 +434,21 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
)
|
|
|
|
|
|
if (priceUnit == data.id) {
|
|
|
- setTextColor(ResourcesCompat.getColor(resources, R.color.text_color_blue, null))
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color_blue,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
} else {
|
|
|
- setTextColor(ResourcesCompat.getColor(resources, R.color.text_color, null))
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -303,9 +479,21 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
text = data.name
|
|
|
|
|
|
if (updateVisaPaymentRequest.passengerType == data.id) {
|
|
|
- setTextColor(ResourcesCompat.getColor(resources, R.color.text_color_blue, null))
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color_blue,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
} else {
|
|
|
- setTextColor(ResourcesCompat.getColor(resources, R.color.text_color, null))
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -336,9 +524,21 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
text = data.name
|
|
|
|
|
|
if (paymentWayId == data.id) {
|
|
|
- setTextColor(ResourcesCompat.getColor(resources, R.color.text_color_blue, null))
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color_blue,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
} else {
|
|
|
- setTextColor(ResourcesCompat.getColor(resources, R.color.text_color, null))
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -388,7 +588,10 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
}
|
|
|
|
|
|
binding.consumeDate.setOnClickListener {
|
|
|
- showDatePicker(resources.getString(R.string.consume_date_select_hint), binding.consumeDate)
|
|
|
+ showDatePicker(
|
|
|
+ resources.getString(R.string.consume_date_select_hint),
|
|
|
+ binding.consumeDate
|
|
|
+ )
|
|
|
}
|
|
|
|
|
|
binding.cardType.setOnClickListener {
|
|
@@ -401,9 +604,21 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
text = data.name
|
|
|
|
|
|
if (cardTypeId == data.id) {
|
|
|
- setTextColor(ResourcesCompat.getColor(resources, R.color.text_color_blue, null))
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color_blue,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
} else {
|
|
|
- setTextColor(ResourcesCompat.getColor(resources, R.color.text_color, null))
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -436,9 +651,21 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
text = data.name
|
|
|
|
|
|
if (paymentMarkId == data.id) {
|
|
|
- setTextColor(ResourcesCompat.getColor(resources, R.color.text_color_blue, null))
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color_blue,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
} else {
|
|
|
- setTextColor(ResourcesCompat.getColor(resources, R.color.text_color, null))
|
|
|
+ setTextColor(
|
|
|
+ ResourcesCompat.getColor(
|
|
|
+ resources,
|
|
|
+ R.color.text_color,
|
|
|
+ null
|
|
|
+ )
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -471,6 +698,20 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
updateVisaPaymentRequest.visaDescription = binding.visaDescription.getText()
|
|
|
}
|
|
|
|
|
|
+ if (agencyFeeTypeId == -1) {
|
|
|
+ showMessage(resources.getString(R.string.agency_fee_type_select_hint))
|
|
|
+ return@setOnClickListener
|
|
|
+ } else {
|
|
|
+ updateVisaPaymentRequest.agencyFeeType = agencyFeeTypeId
|
|
|
+ }
|
|
|
+
|
|
|
+ if (binding.area.text.isNullOrBlank()) {
|
|
|
+ showMessage(resources.getString(R.string.area_select_hint))
|
|
|
+ return@setOnClickListener
|
|
|
+ } else {
|
|
|
+ updateVisaPaymentRequest.area = binding.area.text.toString()
|
|
|
+ }
|
|
|
+
|
|
|
if (customerSelectList.size == 0) {
|
|
|
showMessage(resources.getString(R.string.customer_select_hint))
|
|
|
return@setOnClickListener
|
|
@@ -542,7 +783,10 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
binding.visaExemptionNumber.text.toString().toInt()
|
|
|
}
|
|
|
|
|
|
- if (binding.visaHandleNumber.text.toString().toInt() + binding.visaExemptionNumber.text.toString().toInt() != customerSelectList.size) {
|
|
|
+ if (binding.visaHandleNumber.text.toString()
|
|
|
+ .toInt() + binding.visaExemptionNumber.text.toString()
|
|
|
+ .toInt() != customerSelectList.size
|
|
|
+ ) {
|
|
|
showMessage(resources.getString(R.string.customer_number_input_hint))
|
|
|
return@setOnClickListener
|
|
|
}
|
|
@@ -695,6 +939,14 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
cardTypeList.add(item)
|
|
|
}
|
|
|
|
|
|
+ for (item in selectorResponse.data.agencyFeeType) {
|
|
|
+ agencyFeeTypeList.add(item)
|
|
|
+ }
|
|
|
+
|
|
|
+ for (item in selectorResponse.data.countryFeeData) {
|
|
|
+ countryFeeList.add(item)
|
|
|
+ }
|
|
|
+
|
|
|
getCustomerList()
|
|
|
|
|
|
} else {
|
|
@@ -801,7 +1053,10 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
|
|
|
customerSelectList.removeAt(position)
|
|
|
binding.customerList.adapter!!.notifyItemRemoved(position)
|
|
|
- binding.customerList.adapter!!.notifyItemRangeChanged(position, customerSelectList.size - position)
|
|
|
+ binding.customerList.adapter!!.notifyItemRangeChanged(
|
|
|
+ position,
|
|
|
+ customerSelectList.size - position
|
|
|
+ )
|
|
|
|
|
|
}
|
|
|
}
|
|
@@ -819,136 +1074,147 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
if (visaPaymentDetailResponse != null) {
|
|
|
if (visaPaymentDetailResponse.code == 200) {
|
|
|
|
|
|
- binding.visaDescription.setText(visaPaymentDetailResponse.data.visaInfo.visaDescription)
|
|
|
+ visaPaymentDetailResponse.data.visaInfo.apply {
|
|
|
+ binding.visaDescription.setText(visaDescription)
|
|
|
+
|
|
|
+ binding.area.text = area
|
|
|
+
|
|
|
+ for (item in agencyFeeTypeList) {
|
|
|
+ if (item.id == agencyFeeType) {
|
|
|
+ binding.agencyFeeType.text = item.text
|
|
|
+
|
|
|
+ agencyFeeTypeId = item.id
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
- val customer =
|
|
|
- visaPaymentDetailResponse.data.visaInfo.visaClient.split(",")
|
|
|
+ val customer = visaClient.split(",")
|
|
|
|
|
|
- for (selectedItem in customer) {
|
|
|
- for (item in customerList) {
|
|
|
- if (selectedItem.matches(Regex("[0-9]*\$"))) {
|
|
|
- if (selectedItem.toInt() == item.id) {
|
|
|
- customerSelectList.add(item)
|
|
|
+ for (selectedItem in customer) {
|
|
|
+ for (item in customerList) {
|
|
|
+ if (selectedItem.matches(Regex("[0-9]*\$"))) {
|
|
|
+ if (selectedItem.toInt() == item.id) {
|
|
|
+ customerSelectList.add(item)
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- initCustomerList()
|
|
|
+ initCustomerList()
|
|
|
|
|
|
- binding.visaPrice.setText(visaPaymentDetailResponse.data.visaInfo.visaPrice.toString())
|
|
|
+ binding.visaPrice.setText(visaPrice.toString())
|
|
|
|
|
|
- priceUnit = visaPaymentDetailResponse.data.visaInfo.visaCurrency
|
|
|
+ priceUnit = visaCurrency
|
|
|
|
|
|
- when (visaPaymentDetailResponse.data.visaInfo.isThird) {
|
|
|
- 0 -> {
|
|
|
- binding.isAgentNo.isChecked = true
|
|
|
- }
|
|
|
+ when (isThird) {
|
|
|
+ 0 -> {
|
|
|
+ binding.isAgentNo.isChecked = true
|
|
|
+ }
|
|
|
|
|
|
- 1 -> {
|
|
|
- binding.isAgentYes.isChecked = true
|
|
|
+ 1 -> {
|
|
|
+ binding.isAgentYes.isChecked = true
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- run {
|
|
|
- for (item in customerTypeList) {
|
|
|
- if (item.id == visaPaymentDetailResponse.data.visaInfo.passengerType) {
|
|
|
- binding.customerType.text = item.name
|
|
|
- updateVisaPaymentRequest.passengerType = item.id
|
|
|
- customerTypeSelect = true
|
|
|
- return@run
|
|
|
+ run {
|
|
|
+ for (item in customerTypeList) {
|
|
|
+ if (item.id == passengerType) {
|
|
|
+ binding.customerType.text = item.name
|
|
|
+ updateVisaPaymentRequest.passengerType = item.id
|
|
|
+ customerTypeSelect = true
|
|
|
+ return@run
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- binding.visaHandleNumber.setText(visaPaymentDetailResponse.data.visaInfo.visaNumber.toString())
|
|
|
- binding.visaExemptionNumber.setText(visaPaymentDetailResponse.data.visaInfo.visaFreeNumber.toString())
|
|
|
+ binding.visaHandleNumber.setText(visaNumber.toString())
|
|
|
+ binding.visaExemptionNumber.setText(visaFreeNumber.toString())
|
|
|
|
|
|
- binding.notes.setText(visaPaymentDetailResponse.data.visaInfo.remark)
|
|
|
+ binding.notes.setText(remark)
|
|
|
+ }
|
|
|
|
|
|
- run {
|
|
|
- for (item in paymentWayList) {
|
|
|
- if (item.id == visaPaymentDetailResponse.data.creditCardPayment.payDId) {
|
|
|
- binding.paymentWay.text = item.name
|
|
|
- paymentWayId = item.id
|
|
|
- paymentWaySelect = true
|
|
|
+ visaPaymentDetailResponse.data.creditCardPayment.apply {
|
|
|
+ run {
|
|
|
+ for (item in paymentWayList) {
|
|
|
+ if (item.id == payDId) {
|
|
|
+ binding.paymentWay.text = item.name
|
|
|
+ paymentWayId = item.id
|
|
|
+ paymentWaySelect = true
|
|
|
|
|
|
- return@run
|
|
|
+ return@run
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
-
|
|
|
- binding.consumeWay.setText(visaPaymentDetailResponse.data.creditCardPayment.consumptionPatterns)
|
|
|
- binding.consumeDate.text =
|
|
|
- visaPaymentDetailResponse.data.creditCardPayment.consumptionDate
|
|
|
-
|
|
|
- when (paymentWayId) {
|
|
|
- //刷卡
|
|
|
- 72 -> {
|
|
|
- binding.swipe.visibility = View.VISIBLE
|
|
|
- binding.transfer.visibility = View.GONE
|
|
|
- binding.remit.visibility = View.GONE
|
|
|
-
|
|
|
- run {
|
|
|
- for (item in cardTypeList) {
|
|
|
- if (item.id == visaPaymentDetailResponse.data.creditCardPayment.ctdId) {
|
|
|
- binding.cardType.text = item.name
|
|
|
- binding.bankCardNumber.text = item.remark
|
|
|
- cardTypeId = item.id
|
|
|
- bankNo = item.remark
|
|
|
- cardTypeSelect = true
|
|
|
|
|
|
- return@run
|
|
|
+ binding.consumeWay.setText(consumptionPatterns)
|
|
|
+ binding.consumeDate.text = consumptionDate
|
|
|
+
|
|
|
+ when (paymentWayId) {
|
|
|
+ //刷卡
|
|
|
+ 72 -> {
|
|
|
+ binding.swipe.visibility = View.VISIBLE
|
|
|
+ binding.transfer.visibility = View.GONE
|
|
|
+ binding.remit.visibility = View.GONE
|
|
|
+
|
|
|
+ run {
|
|
|
+ for (item in cardTypeList) {
|
|
|
+ if (item.id == ctdId) {
|
|
|
+ binding.cardType.text = item.name
|
|
|
+ binding.bankCardNumber.text = item.remark
|
|
|
+ cardTypeId = item.id
|
|
|
+ bankNo = item.remark
|
|
|
+ cardTypeSelect = true
|
|
|
+
|
|
|
+ return@run
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- //转账
|
|
|
- 73 -> {
|
|
|
- binding.swipe.visibility = View.GONE
|
|
|
- binding.transfer.visibility = View.VISIBLE
|
|
|
- binding.remit.visibility = View.GONE
|
|
|
+ //转账
|
|
|
+ 73 -> {
|
|
|
+ binding.swipe.visibility = View.GONE
|
|
|
+ binding.transfer.visibility = View.VISIBLE
|
|
|
+ binding.remit.visibility = View.GONE
|
|
|
|
|
|
- binding.companyBankNo.setText(visaPaymentDetailResponse.data.creditCardPayment.companyBankNo)
|
|
|
+ binding.companyBankNo.setText(companyBankNo)
|
|
|
|
|
|
- binding.transferOtherBankName.setText(visaPaymentDetailResponse.data.creditCardPayment.otherBankName)
|
|
|
+ binding.transferOtherBankName.setText(otherBankName)
|
|
|
|
|
|
- binding.transferOtherSideNo.setText(visaPaymentDetailResponse.data.creditCardPayment.otherSideNo)
|
|
|
+ binding.transferOtherSideNo.setText(otherSideNo)
|
|
|
|
|
|
- binding.transferOtherSideName.setText(visaPaymentDetailResponse.data.creditCardPayment.otherSideName)
|
|
|
- }
|
|
|
+ binding.transferOtherSideName.setText(otherSideName)
|
|
|
+ }
|
|
|
|
|
|
- //汇款
|
|
|
- 83 -> {
|
|
|
- binding.swipe.visibility = View.GONE
|
|
|
- binding.transfer.visibility = View.GONE
|
|
|
- binding.remit.visibility = View.VISIBLE
|
|
|
+ //汇款
|
|
|
+ 83 -> {
|
|
|
+ binding.swipe.visibility = View.GONE
|
|
|
+ binding.transfer.visibility = View.GONE
|
|
|
+ binding.remit.visibility = View.VISIBLE
|
|
|
|
|
|
- binding.otherBankName.setText(visaPaymentDetailResponse.data.creditCardPayment.otherBankName)
|
|
|
+ binding.otherBankName.setText(otherBankName)
|
|
|
|
|
|
- binding.otherSideNo.setText(visaPaymentDetailResponse.data.creditCardPayment.otherSideNo)
|
|
|
+ binding.otherSideNo.setText(otherSideNo)
|
|
|
|
|
|
- binding.otherSideName.setText(visaPaymentDetailResponse.data.creditCardPayment.otherSideName)
|
|
|
- }
|
|
|
+ binding.otherSideName.setText(otherSideName)
|
|
|
+ }
|
|
|
|
|
|
- else -> {
|
|
|
- binding.swipe.visibility = View.GONE
|
|
|
- binding.transfer.visibility = View.GONE
|
|
|
- binding.remit.visibility = View.GONE
|
|
|
+ else -> {
|
|
|
+ binding.swipe.visibility = View.GONE
|
|
|
+ binding.transfer.visibility = View.GONE
|
|
|
+ binding.remit.visibility = View.GONE
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
- binding.payee.setText(visaPaymentDetailResponse.data.creditCardPayment.payee)
|
|
|
+ binding.payee.setText(payee)
|
|
|
|
|
|
- binding.paymentMark.text =
|
|
|
- OASystem.paymentMark[visaPaymentDetailResponse.data.creditCardPayment.orbitalPrivateTransfer].name
|
|
|
- paymentMarkId =
|
|
|
- visaPaymentDetailResponse.data.creditCardPayment.orbitalPrivateTransfer
|
|
|
- paymentMarkSelect = true
|
|
|
+ binding.paymentMark.text =
|
|
|
+ OASystem.paymentMark[orbitalPrivateTransfer].name
|
|
|
+ paymentMarkId = orbitalPrivateTransfer
|
|
|
+ paymentMarkSelect = true
|
|
|
|
|
|
- if (visaPaymentDetailResponse.data.creditCardPayment.remark.isNotBlank()) {
|
|
|
- binding.paymentApplyNotes.setText(visaPaymentDetailResponse.data.creditCardPayment.remark)
|
|
|
+ if (visaPaymentDetailResponse.data.creditCardPayment.remark.isNotBlank()) {
|
|
|
+ binding.paymentApplyNotes.setText(remark)
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
} else {
|
|
@@ -1006,6 +1272,9 @@ class AddVisaPaymentActivity : BaseActivity<ActivityAddVisaPaymentBinding>() {
|
|
|
}
|
|
|
|
|
|
private fun canBeEdit(): Boolean {
|
|
|
- return OASystem.authorization(OASystem.VISA_PAYMENT_INSERT, OASystem.EDIT) and (isAuditGM == 0)
|
|
|
+ return OASystem.authorization(
|
|
|
+ OASystem.VISA_PAYMENT_INSERT,
|
|
|
+ OASystem.EDIT
|
|
|
+ ) and (isAuditGM == 0)
|
|
|
}
|
|
|
}
|