refs #6390
This commit is contained in:
parent
f8272a4df2
commit
9ee06e52b0
|
@ -208,10 +208,10 @@ class UbicadorFragment(
|
||||||
iconReset.drawable -> {
|
iconReset.drawable -> {
|
||||||
customDialog.setTitle(getString(R.string.checkItemShelvingDescrip))
|
customDialog.setTitle(getString(R.string.checkItemShelvingDescrip))
|
||||||
.setDescription(getString(R.string.checkItemShelving))
|
.setDescription(getString(R.string.checkItemShelving))
|
||||||
.setOkButton(getString(R.string.cancel)) {
|
.setOkButton(getString(R.string.ok)) {
|
||||||
customDialog.dismiss()
|
// viewModel.itemShelvingDelete()
|
||||||
}
|
}
|
||||||
.setKoButton(getString(R.string.ok)) {
|
.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -312,6 +312,7 @@ class UbicadorFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.parkingImg.setOnClickListener {
|
binding.parkingImg.setOnClickListener {
|
||||||
|
if (!shelvingFk.isNullOrBlank()) {
|
||||||
customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("")
|
customDialogInput.setTitle(getString(R.string.parkingShelving)).setValue("")
|
||||||
.setOkButton(
|
.setOkButton(
|
||||||
getString(
|
getString(
|
||||||
|
@ -331,7 +332,12 @@ class UbicadorFragment(
|
||||||
}.setKoButton(getString(R.string.cancel)) {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
} else {
|
||||||
|
|
||||||
|
getString(R.string.errorShelving).toast(
|
||||||
|
requireContext()
|
||||||
|
)
|
||||||
|
}
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
ma.hideKeyboard(customDialogInput.getEditText())
|
ma.hideKeyboard(customDialogInput.getEditText())
|
||||||
|
|
||||||
|
@ -357,8 +363,11 @@ class UbicadorFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.editImg.setOnClickListener {
|
binding.editImg.setOnClickListener {
|
||||||
|
if (!shelvingFk.isNullOrBlank()
|
||||||
|
) {
|
||||||
customDialogInput.setTitle(getString(R.string.changeShelving)).setValue("")
|
customDialogInput.setTitle(getString(R.string.changeShelving)).setValue("")
|
||||||
.setOkButton(getString(R.string.save)) {
|
.setOkButton(getString(R.string.save)) {
|
||||||
|
if (!customDialogInput.getValue().isNullOrBlank()) {
|
||||||
viewModel.shelvingChangeSalix(
|
viewModel.shelvingChangeSalix(
|
||||||
shelvingFk, customDialogInput.getValue()
|
shelvingFk, customDialogInput.getValue()
|
||||||
)
|
)
|
||||||
|
@ -367,17 +376,26 @@ class UbicadorFragment(
|
||||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
|
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
|
||||||
R.string.label
|
R.string.label
|
||||||
) + etiquetas
|
) + etiquetas
|
||||||
// if (mpok != null) mpok!!.start()
|
} else {
|
||||||
|
getString(R.string.errorShelving).toast(
|
||||||
|
requireContext()
|
||||||
|
)
|
||||||
|
}
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.setKoButton(getString(R.string.cancel)) {
|
}.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
} else {
|
||||||
|
getString(R.string.errorShelving).toast(
|
||||||
|
requireContext()
|
||||||
|
)
|
||||||
|
}
|
||||||
customDialogInput.getEditText().requestFocus()
|
customDialogInput.getEditText().requestFocus()
|
||||||
ma.hideKeyboard(customDialogInput.getEditText())
|
ma.hideKeyboard(customDialogInput.getEditText())
|
||||||
|
|
||||||
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
|
customDialogInput.getEditText().setOnEditorActionListener { v, actionId, event ->
|
||||||
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0) {
|
||||||
|
|
||||||
viewModel.shelvingChangeSalix(
|
viewModel.shelvingChangeSalix(
|
||||||
shelvingFk,
|
shelvingFk,
|
||||||
customDialogInput.getValue()
|
customDialogInput.getValue()
|
||||||
|
@ -387,7 +405,7 @@ class UbicadorFragment(
|
||||||
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
|
shelvingFk.uppercase() + getString(R.string.pUppercase) + parking + getString(
|
||||||
R.string.label
|
R.string.label
|
||||||
) + etiquetas
|
) + etiquetas
|
||||||
// if (mpok != null) mpok!!.start()
|
|
||||||
customDialogInput.dismiss()
|
customDialogInput.dismiss()
|
||||||
return@setOnEditorActionListener true
|
return@setOnEditorActionListener true
|
||||||
}
|
}
|
||||||
|
@ -397,9 +415,11 @@ class UbicadorFragment(
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.deleteImg.setOnClickListener {
|
binding.deleteImg.setOnClickListener {
|
||||||
|
if (!shelvingFk.isNullOrBlank()) {
|
||||||
customDialog.setTitle(getString(R.string.empty))
|
customDialog.setTitle(getString(R.string.empty))
|
||||||
.setDescription(getString(R.string.operationNoReturn))
|
.setDescription(getString(R.string.operationNoReturn))
|
||||||
.setOkButton(getString(R.string.empty)) {
|
.setOkButton(getString(R.string.empty)) {
|
||||||
|
|
||||||
viewModel.clearShelvingList(
|
viewModel.clearShelvingList(
|
||||||
shelvingFk
|
shelvingFk
|
||||||
)
|
)
|
||||||
|
@ -411,14 +431,20 @@ class UbicadorFragment(
|
||||||
adapter!!.notifyDataSetChanged()
|
adapter!!.notifyDataSetChanged()
|
||||||
}
|
}
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.setKoButton(getString(R.string.cancel)) {
|
}
|
||||||
|
|
||||||
|
customDialog.setKoButton(getString(R.string.cancel)) {
|
||||||
customDialog.dismiss()
|
customDialog.dismiss()
|
||||||
}.show()
|
}.show()
|
||||||
|
} else {
|
||||||
|
getString(R.string.errorShelving).toast(
|
||||||
|
requireContext()
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun checkUbications(itemScanned: Int) {
|
private fun checkUbications(itemScanned: Int) {
|
||||||
itemScannedScreen = itemScanned
|
itemScannedScreen = itemScanned
|
||||||
|
@ -686,7 +712,9 @@ class UbicadorFragment(
|
||||||
if (customDialogInput.getValue().toInt() > 0) {
|
if (customDialogInput.getValue().toInt() > 0) {
|
||||||
binding.splashProgress.visibility = VISIBLE
|
binding.splashProgress.visibility = VISIBLE
|
||||||
var quantity =
|
var quantity =
|
||||||
if (item.visible.toInt() - customDialogInput.getValue().toInt() > 0) {
|
if (item.visible.toInt() - customDialogInput.getValue()
|
||||||
|
.toInt() > 0
|
||||||
|
) {
|
||||||
item.visible.toInt() - customDialogInput.getValue().toInt()
|
item.visible.toInt() - customDialogInput.getValue().toInt()
|
||||||
} else {
|
} else {
|
||||||
0
|
0
|
||||||
|
|
|
@ -268,7 +268,7 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
vShelvingFk: String
|
vShelvingFk: String
|
||||||
|
|
||||||
) {
|
) {
|
||||||
salix.itemShelvingsUpdate(id= """{"id":$vShelf}""", params= hashMapOf("shelvingFk" to vShelvingFk))
|
salix.itemShelvingsUpdate(where = """{"id":$vShelf}""", params= hashMapOf("shelvingFk" to vShelvingFk))
|
||||||
.enqueue(object : SilexCallback<Any>(context) {
|
.enqueue(object : SilexCallback<Any>(context) {
|
||||||
override fun onError(t: Throwable) {
|
override fun onError(t: Throwable) {
|
||||||
_response.value = ResponseItemVO(
|
_response.value = ResponseItemVO(
|
||||||
|
@ -377,7 +377,7 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
) {
|
) {
|
||||||
|
|
||||||
salix.itemShelvingsUpdate(
|
salix.itemShelvingsUpdate(
|
||||||
id = JsonObject().apply { addProperty("shelvingFk", shelvingFk) },
|
where = JsonObject().apply { addProperty("shelvingFk", shelvingFk) },
|
||||||
hashMapOf("visible" to 0)
|
hashMapOf("visible" to 0)
|
||||||
)
|
)
|
||||||
.enqueue(object : SalixCallback<Any>(context) {
|
.enqueue(object : SalixCallback<Any>(context) {
|
||||||
|
@ -402,7 +402,7 @@ class UbicadorViewModel(val context: Context) : BaseViewModel(context) {
|
||||||
) {
|
) {
|
||||||
|
|
||||||
salix.itemShelvingsUpdate(
|
salix.itemShelvingsUpdate(
|
||||||
id = JsonObject().apply { addProperty("shelvingFk", shelvingFkIn) },
|
where = JsonObject().apply { addProperty("shelvingFk", shelvingFkIn) },
|
||||||
hashMapOf("shelvingFk" to shelvingFkOut)
|
hashMapOf("shelvingFk" to shelvingFkOut)
|
||||||
)
|
)
|
||||||
.enqueue(object : SalixCallback<Any>(context) {
|
.enqueue(object : SalixCallback<Any>(context) {
|
||||||
|
|
Loading…
Reference in New Issue