Version 8.8Beta precio coste artículo, modificar tallos, mensajes error para items sin buyFk y ticket eliminado o viejo
This commit is contained in:
parent
e41a12e7a9
commit
6841dd28be
|
@ -66,6 +66,7 @@
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_chevron_right_black_24dp.xml" value="0.1775" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_chevron_right_black_24dp.xml" value="0.1775" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_claim_ui.xml" value="0.186" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_claim_ui.xml" value="0.186" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_claims.xml" value="0.2425" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_claims.xml" value="0.2425" />
|
||||||
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_cmr.xml" value="0.267" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_controller_ui.xml" value="0.212" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_controller_ui.xml" value="0.212" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_controller_ui_selected.xml" value="0.212" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_controller_ui_selected.xml" value="0.212" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_corridor_ui.xml" value="0.186" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/drawable/ic_corridor_ui.xml" value="0.186" />
|
||||||
|
@ -172,7 +173,7 @@
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_expeditionscan_sorter.xml" value="0.196875" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_expeditionscan_sorter.xml" value="0.196875" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_expeditionstate.xml" value="0.1" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_expeditionstate.xml" value="0.1" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_faltas.xml" value="0.1793478260869565" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_faltas.xml" value="0.1793478260869565" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_general_black.xml" value="0.20878623188405798" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_general_black.xml" value="0.264" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_historico.xml" value="0.1734375" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_historico.xml" value="0.1734375" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_historicovehiculo.xml" value="0.23052536231884058" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_historicovehiculo.xml" value="0.23052536231884058" />
|
||||||
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_inventary.xml" value="0.1" />
|
<entry key="..\:/Users/sergiodt/AndroidStudioProjects/vn-warehouseManager/app/src/main/res/layout/fragment_inventary.xml" value="0.1" />
|
||||||
|
|
|
@ -13,17 +13,9 @@ android {
|
||||||
applicationId "es.verdnatura"
|
applicationId "es.verdnatura"
|
||||||
minSdkVersion 21 //21
|
minSdkVersion 21 //21
|
||||||
targetSdkVersion 30
|
targetSdkVersion 30
|
||||||
versionCode 127
|
versionCode 128
|
||||||
versionName = "8.7Beta"
|
versionName = "8.8Beta"
|
||||||
//versionName = "8.6.1Beta" versionCode 126
|
//versionName = "8.7Beta" versionCode 127
|
||||||
//versionName = "8.5.1Beta" versionCode 122
|
|
||||||
//versionName = "8.5Beta" //versionCode 121
|
|
||||||
//versionName = "8.4"// versionCode 120
|
|
||||||
//versionName "8.4.2Beta" versioncode 119
|
|
||||||
//versionName "8.4.1Beta" //versionCode 118: arreglat rocket a Alex i llevat callFunction,strings ok
|
|
||||||
//versionName "8.4Beta" //versionCode 117: return i workerAppTester
|
|
||||||
//versionName "8.3" //versionCode 116: versionCode 116: cambios finales en return, diseño grafico...
|
|
||||||
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,8 @@
|
||||||
"type": "SINGLE",
|
"type": "SINGLE",
|
||||||
"filters": [],
|
"filters": [],
|
||||||
"attributes": [],
|
"attributes": [],
|
||||||
"versionCode": 127,
|
"versionCode": 128,
|
||||||
"versionName": "8.7Beta",
|
"versionName": "8.8Beta",
|
||||||
"outputFile": "app-release.apk"
|
"outputFile": "app-release.apk"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Binary file not shown.
|
@ -112,6 +112,11 @@ val viewModelModule = module {
|
||||||
ExpeditionScanSorterViewModel(androidContext())
|
ExpeditionScanSorterViewModel(androidContext())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
viewModel {
|
||||||
|
CmrExpeditionPalletViewModel(androidContext())
|
||||||
|
}
|
||||||
|
|
||||||
viewModel {
|
viewModel {
|
||||||
BufferFragmentViewModel(androidContext())
|
BufferFragmentViewModel(androidContext())
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ object ConstAndValues {
|
||||||
const val PRECHECKER = "PRECHECKER"
|
const val PRECHECKER = "PRECHECKER"
|
||||||
const val MAINACTIVITY = "MAIN"
|
const val MAINACTIVITY = "MAIN"
|
||||||
const val VERTICKET = "SHOWTICKET"
|
const val VERTICKET = "SHOWTICKET"
|
||||||
const val SECTORFKDEFAULT=37
|
const val SECTORFKDEFAULT=0
|
||||||
const val WAREHOUSEFKDEFAULT=1
|
const val WAREHOUSEFKDEFAULT=60
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -220,7 +220,7 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
|
||||||
params = params
|
params = params
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
fun itemSaveMin(
|
fun item_saveStems(
|
||||||
usuario: String,
|
usuario: String,
|
||||||
password: String,
|
password: String,
|
||||||
itemFk: String,
|
itemFk: String,
|
||||||
|
@ -229,7 +229,7 @@ class GetItemCardUserCase(context: Context) : RestClient(context) {
|
||||||
val params: ArrayList<String> = ArrayList()
|
val params: ArrayList<String> = ArrayList()
|
||||||
params.add(itemFk)
|
params.add(itemFk)
|
||||||
params.add(value)
|
params.add(value)
|
||||||
return restClient!!.itemSaveMin(
|
return restClient!!.item_saveStems(
|
||||||
"json",
|
"json",
|
||||||
"1",
|
"1",
|
||||||
usuario,
|
usuario,
|
||||||
|
|
|
@ -41,6 +41,26 @@ class GetPaletizadoresUserCase(context: Context) : RestClient(context) {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//informar cmr paletizadores
|
||||||
|
fun cmrExpeditionPallet_add(
|
||||||
|
usuario: String,
|
||||||
|
password: String,
|
||||||
|
vExpeditionPallet: String,
|
||||||
|
vCmrId: String
|
||||||
|
): Call<Void> {
|
||||||
|
val params: ArrayList<String> = ArrayList()
|
||||||
|
params.add(vExpeditionPallet)
|
||||||
|
params.add(vCmrId)
|
||||||
|
|
||||||
|
return restClient!!.cmrExpeditionPallet_add(
|
||||||
|
"json",
|
||||||
|
"1",
|
||||||
|
usuario,
|
||||||
|
password,
|
||||||
|
"application/json",
|
||||||
|
params
|
||||||
|
)
|
||||||
|
}
|
||||||
//expedition
|
//expedition
|
||||||
|
|
||||||
fun expedition_getState(
|
fun expedition_getState(
|
||||||
|
|
|
@ -750,8 +750,8 @@ interface VerdnaturaService {
|
||||||
):
|
):
|
||||||
Call<Boolean>*/
|
Call<Boolean>*/
|
||||||
|
|
||||||
@POST("almacennew/itemSaveMin")//REVISADA
|
@POST("almacennew/item_saveStems")//REVISADA
|
||||||
fun itemSaveMin(
|
fun item_saveStems(
|
||||||
@Header("aplicacion") aplicacion: String,
|
@Header("aplicacion") aplicacion: String,
|
||||||
@Header("version") version: String,
|
@Header("version") version: String,
|
||||||
@Header("user") user: String,
|
@Header("user") user: String,
|
||||||
|
@ -1131,6 +1131,17 @@ interface VerdnaturaService {
|
||||||
):
|
):
|
||||||
Call<Void>
|
Call<Void>
|
||||||
|
|
||||||
|
@POST("almacennew/cmrExpeditionPallet_add")//REVISADA
|
||||||
|
fun cmrExpeditionPallet_add(
|
||||||
|
@Header("aplicacion") aplicacion: String,
|
||||||
|
@Header("version") version: String,
|
||||||
|
@Header("user") user: String,
|
||||||
|
@Header("pass") pass: String,
|
||||||
|
@Header("Content-Type") content_type: String,
|
||||||
|
@Body params: List<String>
|
||||||
|
):
|
||||||
|
Call<Void>
|
||||||
|
|
||||||
@POST("almacennew/expedition_getState")//REVISADA
|
@POST("almacennew/expedition_getState")//REVISADA
|
||||||
fun expedition_getState(
|
fun expedition_getState(
|
||||||
@Header("aplicacion") aplicacion: String,
|
@Header("aplicacion") aplicacion: String,
|
||||||
|
|
|
@ -31,6 +31,7 @@ import es.verdnatura.R
|
||||||
import es.verdnatura.databinding.ToolbarFragmentBinding
|
import es.verdnatura.databinding.ToolbarFragmentBinding
|
||||||
import es.verdnatura.domain.ConstAndValues
|
import es.verdnatura.domain.ConstAndValues
|
||||||
import es.verdnatura.domain.ConstAndValues.SECTORFKDEFAULT
|
import es.verdnatura.domain.ConstAndValues.SECTORFKDEFAULT
|
||||||
|
import es.verdnatura.domain.ConstAndValues.WAREHOUSEFKDEFAULT
|
||||||
import es.verdnatura.domain.toast
|
import es.verdnatura.domain.toast
|
||||||
import es.verdnatura.presentation.common.mediaCurrentVolume
|
import es.verdnatura.presentation.common.mediaCurrentVolume
|
||||||
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
import es.verdnatura.presentation.view.feature.main.activity.MainActivity
|
||||||
|
@ -524,7 +525,7 @@ override fun onViewCreated(view: View, savedInstanceState: Bundle?)
|
||||||
USER->prefs.getString(USER, "").toString()
|
USER->prefs.getString(USER, "").toString()
|
||||||
PASSWORD -> prefs.getString(PASSWORD, "").toString()
|
PASSWORD -> prefs.getString(PASSWORD, "").toString()
|
||||||
SECTORFK->prefs.getInt(name, SECTORFKDEFAULT).toString()
|
SECTORFK->prefs.getInt(name, SECTORFKDEFAULT).toString()
|
||||||
WAREHOUSEFK->prefs.getInt(name, ConstAndValues.WAREHOUSEFKDEFAULT).toString()
|
WAREHOUSEFK->prefs.getInt(name, WAREHOUSEFKDEFAULT).toString()
|
||||||
//VOZ->prefs.getString(name, "NO").toString()
|
//VOZ->prefs.getString(name, "NO").toString()
|
||||||
WAGON->prefs.getInt(name, 2).toString()
|
WAGON->prefs.getInt(name, 2).toString()
|
||||||
TAGSTYPE-> prefs.getString(name, getString(R.string.stickers)).toString()
|
TAGSTYPE-> prefs.getString(name, getString(R.string.stickers)).toString()
|
||||||
|
|
|
@ -65,7 +65,13 @@ class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.Dia
|
||||||
|
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
fun setEnableValue(isEnabled: Boolean): CustomDialogInputTwoValues {
|
||||||
|
|
||||||
|
binding.customDialogValue.isEnabled=isEnabled
|
||||||
|
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
fun setTitle(title: String): CustomDialogInputTwoValues {
|
fun setTitle(title: String): CustomDialogInputTwoValues {
|
||||||
|
|
||||||
binding.customDialogTitle.visibility = View.VISIBLE
|
binding.customDialogTitle.visibility = View.VISIBLE
|
||||||
|
@ -109,14 +115,25 @@ class CustomDialogInputTwoValues(context: Context) : Dialog(context, R.style.Dia
|
||||||
fun setInputTextTwo() {
|
fun setInputTextTwo() {
|
||||||
binding.customDialogValueTwo.inputType = InputType.TYPE_CLASS_NUMBER
|
binding.customDialogValueTwo.inputType = InputType.TYPE_CLASS_NUMBER
|
||||||
}
|
}
|
||||||
|
fun setInfoTex(text:String){
|
||||||
|
binding.textinputlayoutUsername.hint = text
|
||||||
|
}
|
||||||
|
|
||||||
|
fun setInfoTextTwo(text:String){
|
||||||
|
binding.textinputlayoutTwo.hint = text
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
fun setInputTextTwoVisibility() {
|
fun setInputTextTwoVisibility() {
|
||||||
binding.textinputlayoutTwo.visibility = View.VISIBLE
|
binding.textinputlayoutTwo.visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
fun setInputTextVisibility(visibility:Int) {
|
||||||
|
binding.textinputlayoutTwo.visibility = visibility
|
||||||
|
}
|
||||||
|
|
||||||
/* fun setFocusText() {
|
fun setFocusText() {
|
||||||
binding.customDialogValue.requestFocus()
|
binding.customDialogValue.requestFocus()
|
||||||
}*/
|
}
|
||||||
|
|
||||||
fun setFocusTextTwo() {
|
fun setFocusTextTwo() {
|
||||||
binding.customDialogValueTwo.requestFocus()
|
binding.customDialogValueTwo.requestFocus()
|
||||||
|
|
|
@ -65,10 +65,7 @@ class ItemCardFragment(
|
||||||
ma.hideBottomNavigation(GONE)
|
ma.hideBottomNavigation(GONE)
|
||||||
|
|
||||||
setEvents()
|
setEvents()
|
||||||
//toolbar_title.text = getString(R.string.ConsultarArticulo)
|
|
||||||
binding.mainToolbar.toolbarTitle.text = getString(R.string.titleItemConsult)
|
binding.mainToolbar.toolbarTitle.text = getString(R.string.titleItemConsult)
|
||||||
|
|
||||||
//customDialog = CustomDialog(requireContext())
|
|
||||||
customDialogInput = CustomDialogInput(requireContext())
|
customDialogInput = CustomDialogInput(requireContext())
|
||||||
customDialogList = CustomDialogList(requireContext())
|
customDialogList = CustomDialogList(requireContext())
|
||||||
customDialogTwo = CustomDialogTwoButtons(requireContext())
|
customDialogTwo = CustomDialogTwoButtons(requireContext())
|
||||||
|
@ -214,7 +211,7 @@ class ItemCardFragment(
|
||||||
ma.messageWithSound(it.errorMessage, true, false)
|
ma.messageWithSound(it.errorMessage, true, false)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (it.id != "0") {
|
if (!it.id.isNullOrEmpty()) {
|
||||||
binding.itemcardLayout.visibility = View.VISIBLE
|
binding.itemcardLayout.visibility = View.VISIBLE
|
||||||
setItemCard(it)
|
setItemCard(it)
|
||||||
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
|
binding.mainToolbar.toolbarIcons.visibility = View.VISIBLE
|
||||||
|
@ -270,7 +267,6 @@ class ItemCardFragment(
|
||||||
itemInfoG = itemInfo
|
itemInfoG = itemInfo
|
||||||
binding.mainToolbar.toolbarTitle.text = itemInfo.id + "-" + itemInfo.longName
|
binding.mainToolbar.toolbarTitle.text = itemInfo.id + "-" + itemInfo.longName
|
||||||
titleImage = itemInfo.id + "-" + itemInfo.longName
|
titleImage = itemInfo.id + "-" + itemInfo.longName
|
||||||
// binding.itemcardImage.setImageDrawable(resources.getDrawable(R.drawable.loadphoto,resources.newTheme()))
|
|
||||||
binding.itemcardImage.loadUrl(itemInfo.urlImage200)
|
binding.itemcardImage.loadUrl(itemInfo.urlImage200)
|
||||||
urlLarge = itemInfo.urlImage
|
urlLarge = itemInfo.urlImage
|
||||||
binding.itemcardTag1.text = itemInfo.size
|
binding.itemcardTag1.text = itemInfo.size
|
||||||
|
@ -337,6 +333,14 @@ class ItemCardFragment(
|
||||||
action = "itemStockUpdate"
|
action = "itemStockUpdate"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
listItemsRow.add(
|
||||||
|
ItemCardRowVO(
|
||||||
|
title = getString(R.string.itemCost),
|
||||||
|
value = itemInfo.itemCost,
|
||||||
|
isEditable = false,
|
||||||
|
action = ""
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
//EDITABLES
|
//EDITABLES
|
||||||
|
|
||||||
|
@ -389,15 +393,15 @@ class ItemCardFragment(
|
||||||
action = "updatePacking"
|
action = "updatePacking"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
/* sergio: quitar de back cuando ya tengan la app actualizada todos
|
//sergio: quitar de back cuando ya tengan la app actualizada todos
|
||||||
listItemsRow.add(
|
listItemsRow.add(
|
||||||
ItemCardRowVO(
|
ItemCardRowVO(
|
||||||
title = getString(R.string.MINIMO),
|
title = getString(R.string.stems),
|
||||||
value = itemInfo.min,
|
value = itemInfo.stems,
|
||||||
isEditable = true,
|
isEditable = true,
|
||||||
action = "itemSaveMin"
|
action = "itemSaveStem"
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)*/
|
|
||||||
listItemsRow.add(
|
listItemsRow.add(
|
||||||
ItemCardRowVO(
|
ItemCardRowVO(
|
||||||
title = getString(R.string.Referencia),
|
title = getString(R.string.Referencia),
|
||||||
|
@ -446,7 +450,7 @@ class ItemCardFragment(
|
||||||
} else {
|
} else {
|
||||||
if (item.action != "toBarcode" && item.action != "buscarItem" && item.action != "itemStockUpdateAdd" && item.action != "itemStockUpdateRemove") {
|
if (item.action != "toBarcode" && item.action != "buscarItem" && item.action != "itemStockUpdateAdd" && item.action != "itemStockUpdateRemove") {
|
||||||
customDialogInput.setTitle(item.title!!)
|
customDialogInput.setTitle(item.title!!)
|
||||||
.setDescription(getString(R.string.currentVAlue) + item.value!!)
|
.setDescription(getString(R.string.currentVAlue) + if(item.value.isNullOrEmpty()) "" else{item.value})
|
||||||
.setOkButton(getString(R.string.save)) {
|
.setOkButton(getString(R.string.save)) {
|
||||||
ma.hideKeyboard(customDialogInput.getEditText())
|
ma.hideKeyboard(customDialogInput.getEditText())
|
||||||
editItemCardRow(item, customDialogInput.getValue())
|
editItemCardRow(item, customDialogInput.getValue())
|
||||||
|
@ -576,7 +580,7 @@ class ItemCardFragment(
|
||||||
value = value,
|
value = value,
|
||||||
warehouseFk = warehouseFk
|
warehouseFk = warehouseFk
|
||||||
)
|
)
|
||||||
"itemSaveMin" -> viewModel.itemSaveMin(
|
"itemSaveStem" -> viewModel.item_saveStems(
|
||||||
itemFk = itemFk,
|
itemFk = itemFk,
|
||||||
user = user,
|
user = user,
|
||||||
password = password,
|
password = password,
|
||||||
|
|
|
@ -48,8 +48,9 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||||
override fun onFailure(call: Call<ItemCardVO>, t: Throwable) {
|
override fun onFailure(call: Call<ItemCardVO>, t: Throwable) {
|
||||||
_itemcard.value = ItemCardVO(
|
_itemcard.value = ItemCardVO(
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!),
|
||||||
)
|
stems = ""
|
||||||
|
, itemCost = "")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +58,7 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||||
|
|
||||||
|
|
||||||
if (response.body() != null ) {
|
if (response.body() != null ) {
|
||||||
|
|
||||||
_itemcard.value = response.body()!!
|
_itemcard.value = response.body()!!
|
||||||
} else {
|
} else {
|
||||||
_itemcard.value = ItemCardVO(
|
_itemcard.value = ItemCardVO(
|
||||||
|
@ -64,7 +66,9 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||||
errorMessage = getMessageFromAllResponse(
|
errorMessage = getMessageFromAllResponse(
|
||||||
nameofFunction(this),
|
nameofFunction(this),
|
||||||
response.message()
|
response.message()
|
||||||
)
|
),
|
||||||
|
stems = "",
|
||||||
|
itemCost = ""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -346,14 +350,14 @@ class ItemCardViewModel(context: Context) : BaseViewModel() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
fun itemSaveMin(
|
fun item_saveStems(
|
||||||
itemFk: String,
|
itemFk: String,
|
||||||
user: String,
|
user: String,
|
||||||
password: String,
|
password: String,
|
||||||
value: String
|
value: String
|
||||||
|
|
||||||
) {
|
) {
|
||||||
getItemCardUserCase.itemSaveMin(user, password, itemFk, value)
|
getItemCardUserCase.item_saveStems(user, password, itemFk, value)
|
||||||
.enqueue(object : Callback<Any> {
|
.enqueue(object : Callback<Any> {
|
||||||
override fun onFailure(call: Call<Any>, t: Throwable) {
|
override fun onFailure(call: Call<Any>, t: Throwable) {
|
||||||
_response.value = ResponseItemVO(
|
_response.value = ResponseItemVO(
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
package es.verdnatura.presentation.view.feature.articulo.model
|
package es.verdnatura.presentation.view.feature.articulo.model
|
||||||
|
|
||||||
class ItemCardVO (
|
class ItemCardVO (
|
||||||
var id:String = "0",
|
var id:String = "",
|
||||||
var longName:String = "0",
|
var longName:String = "0",
|
||||||
var value5:String = "",
|
var value5:String = "",
|
||||||
var value6:String = "0",
|
var value6:String = "0",
|
||||||
var value7:String = "0",
|
var value7:String = "0",
|
||||||
var image:String = "0",
|
var image:String = "0",
|
||||||
var size:String = "0",
|
var size:String = "0",
|
||||||
var stems:String = "0",
|
var stems:String?,
|
||||||
|
var itemCost:String?,
|
||||||
var category:String = "0",
|
var category:String = "0",
|
||||||
var producer:String = "0",
|
var producer:String = "0",
|
||||||
var origin:String = "0",
|
var origin:String = "0",
|
||||||
|
|
|
@ -887,7 +887,7 @@ class CollectionFragment(
|
||||||
for (s in sales) {
|
for (s in sales) {
|
||||||
Log.d(
|
Log.d(
|
||||||
"VERDNATURA::",
|
"VERDNATURA::",
|
||||||
"El item es ${s.itemFk} y su picked ${s.picked} y saleorder ${s.saleOrder}"
|
"La sale es ${s.saleFk} El item es ${s.itemFk} y su picked ${s.picked} y saleorder ${s.saleOrder}"
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ import android.content.Context
|
||||||
import android.graphics.drawable.Drawable
|
import android.graphics.drawable.Drawable
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
|
import android.util.Log
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import android.view.View.GONE
|
import android.view.View.GONE
|
||||||
import android.view.View.VISIBLE
|
import android.view.View.VISIBLE
|
||||||
|
@ -222,6 +223,7 @@ class CollectionShowTicketFragment(
|
||||||
}
|
}
|
||||||
sales = salesList.sortedWith(compareBy({ it.saleOrder }))
|
sales = salesList.sortedWith(compareBy({ it.saleOrder }))
|
||||||
|
|
||||||
|
|
||||||
saleAdapter =
|
saleAdapter =
|
||||||
SaleAdapter(sales, pasillerosItemClickListener!!, object : OnQuantityClickListener {
|
SaleAdapter(sales, pasillerosItemClickListener!!, object : OnQuantityClickListener {
|
||||||
|
|
||||||
|
|
|
@ -70,8 +70,8 @@ fun CollectionVO.map(context: Context): CollectionVO {
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
this.isError = true
|
this.isError = true
|
||||||
if (this.tickets.isEmpty()) {
|
if (this.tickets.isNullOrEmpty()) {
|
||||||
this.errorMessage = context.getString(R.string.collectionNoTickets)
|
this.errorMessage = context.getString(R.string.collectionNoTicketsError)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
this.errorMessage =
|
this.errorMessage =
|
||||||
|
|
|
@ -70,13 +70,18 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
saveData(
|
saveData(
|
||||||
"base_urlSalix",
|
"base_urlSalix",
|
||||||
"https://test-salix.verdnatura.es/api/"
|
"https://test-salix.verdnatura.es/api/"
|
||||||
|
// "https://test-salix.verdnatura.es/" //localhost desde emulador 10.0.2.2:3000
|
||||||
|
// "http://localhost:3000/api/"
|
||||||
|
//"http://10.0.2.2:3000/api/" //-> desde emulador 10.0.2.2:3000
|
||||||
)
|
)
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
saveData(
|
saveData(
|
||||||
"base_urlSalix",
|
"base_urlSalix",
|
||||||
/*working_in_test*/
|
|
||||||
"https://salix.verdnatura.es/api/"
|
"https://salix.verdnatura.es/api/"
|
||||||
|
/*working_in_test*/
|
||||||
|
// "http://localhost:3000/api/"
|
||||||
|
//"http://10.0.2.2:3000/api/" //-> desde emulador 10.0.2.2:3000
|
||||||
)
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -154,10 +159,7 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
) {
|
) {
|
||||||
val openURL = Intent(Intent.ACTION_VIEW)
|
val openURL = Intent(Intent.ACTION_VIEW)
|
||||||
openURL.data =
|
openURL.data =
|
||||||
// sergio Redmine Tarea #3730
|
|
||||||
//Uri.parse("https://app.verdnatura.es/bin/vn-picking.apk")
|
|
||||||
Uri.parse(it.url)
|
Uri.parse(it.url)
|
||||||
//Log.d("VERDNATURA::","Datos"+ openURL.data)
|
|
||||||
startActivity(openURL)
|
startActivity(openURL)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -294,12 +296,11 @@ class LoginFragment : BaseFragment<FragmentLoginBinding, LoginViewModel>(LoginVi
|
||||||
|
|
||||||
if (it.isError) {
|
if (it.isError) {
|
||||||
removeSector()
|
removeSector()
|
||||||
//Log.d("VERDNATURA::",getString(R.string.error))
|
|
||||||
} else {
|
} else {
|
||||||
if (it.id != 0) {
|
if (it.id != 0) {
|
||||||
saveDataInt(SECTORFK, it.id)
|
saveDataInt(SECTORFK, it.id)
|
||||||
saveData(SECTORDESCRIP, it.description)
|
saveData(SECTORDESCRIP, it.description)
|
||||||
it.warehouseFk?.let { it1 -> saveDataInt("warehouseFk", it1) }
|
it.warehouseFk?.let { it1 -> saveDataInt(WAREHOUSEFK, it1) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -411,14 +411,12 @@ class LoginViewModel(context: Context) : BaseViewModel()
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if (!response.isSuccessful){
|
if (!response.isSuccessful){
|
||||||
d("El sector is not successfull")
|
|
||||||
_workergetSector.value= SectorItemVO(0,"",0,
|
_workergetSector.value= SectorItemVO(0,"",0,
|
||||||
isError = true,
|
isError = true,
|
||||||
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
errorMessage = getMessageFromAllResponse(nameofFunction(this),response.message())
|
||||||
)
|
)
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
d("El sector is successfull")
|
|
||||||
_workergetSector.value = response.body()?.let { SectorItemVO(it.id,it.description,it.warehouseFk,isError = false) }
|
_workergetSector.value = response.body()?.let { SectorItemVO(it.id,it.description,it.warehouseFk,isError = false) }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,7 @@ package es.verdnatura.presentation.view.feature.main.activity
|
||||||
|
|
||||||
import android.content.SharedPreferences
|
import android.content.SharedPreferences
|
||||||
import android.media.MediaPlayer
|
import android.media.MediaPlayer
|
||||||
|
import android.util.Log
|
||||||
import android.view.Menu
|
import android.view.Menu
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
@ -504,6 +505,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
||||||
getString(R.string.titleReUbicator) -> {
|
getString(R.string.titleReUbicator) -> {
|
||||||
addFragmentOnTop(ReubicationFragment.newInstance(item.title))
|
addFragmentOnTop(ReubicationFragment.newInstance(item.title))
|
||||||
}
|
}
|
||||||
|
getString(R.string.titleCMRState) -> {
|
||||||
|
addFragmentOnTop(CmrExpeditionPalletFragment.newInstance(item.title))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -548,6 +552,8 @@ class MainActivity : BaseActivity<ActivityMainBinding>(), OnPasillerosItemClickL
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onPalletClickListener(itemTruck: ItemExpeditionTruckVO, itemPallet: ItemPalletVO) {
|
override fun onPalletClickListener(itemTruck: ItemExpeditionTruckVO, itemPallet: ItemPalletVO) {
|
||||||
|
//Tarea #4125
|
||||||
|
//Log.d("VERDNATURA::","Entrando en pallet2")
|
||||||
addFragmentOnTop(ExpeditionScanFragment.newInstance(itemTruck, itemPallet))
|
addFragmentOnTop(ExpeditionScanFragment.newInstance(itemTruck, itemPallet))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package es.verdnatura.presentation.view.feature.paletizador.adapter
|
package es.verdnatura.presentation.view.feature.paletizador.adapter
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.util.Log
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.core.content.ContextCompat
|
import androidx.core.content.ContextCompat
|
||||||
|
@ -11,6 +12,7 @@ import es.verdnatura.presentation.common.OnComprobarPalletViewClickListener
|
||||||
import es.verdnatura.presentation.common.OnPalletClickListener
|
import es.verdnatura.presentation.common.OnPalletClickListener
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemExpeditionTruckVO
|
||||||
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
|
import es.verdnatura.presentation.view.feature.paletizador.model.ItemPalletVO
|
||||||
|
import timber.log.Timber.d
|
||||||
|
|
||||||
class ExpeditionPalletAdapter (
|
class ExpeditionPalletAdapter (
|
||||||
private val items: List<ItemPalletVO>,
|
private val items: List<ItemPalletVO>,
|
||||||
|
@ -32,6 +34,8 @@ class ExpeditionPalletAdapter (
|
||||||
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
||||||
holder.bind(items[position])
|
holder.bind(items[position])
|
||||||
holder.binding.root.setOnClickListener {
|
holder.binding.root.setOnClickListener {
|
||||||
|
//Tarea #4125
|
||||||
|
Log.d("VERDNATURA::","Entrando en el pallet")
|
||||||
onPalletClickListener.onPalletClickListener(itemExpeditionTruckVO,items[position])
|
onPalletClickListener.onPalletClickListener(itemExpeditionTruckVO,items[position])
|
||||||
}
|
}
|
||||||
holder.binding.root.setOnLongClickListener {
|
holder.binding.root.setOnLongClickListener {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package es.verdnatura.presentation.view.feature.paletizador.adapter
|
package es.verdnatura.presentation.view.feature.paletizador.adapter
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
|
import android.util.Log
|
||||||
import android.view.LayoutInflater
|
import android.view.LayoutInflater
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import androidx.recyclerview.widget.RecyclerView
|
import androidx.recyclerview.widget.RecyclerView
|
||||||
|
@ -26,6 +27,8 @@ class ExpeditionScanAdapter (
|
||||||
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
override fun onBindViewHolder(holder: ItemHolder, position: Int) {
|
||||||
holder.bind(items[position])
|
holder.bind(items[position])
|
||||||
holder.binding.root.setOnClickListener {
|
holder.binding.root.setOnClickListener {
|
||||||
|
//Tarea #4125
|
||||||
|
Log.d("VERDNATURA::","ENtranado en las expediciones del pallet")
|
||||||
onScanLongClickListener.onScanLongClickListener(items[position])
|
onScanLongClickListener.onScanLongClickListener(items[position])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,140 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.paletizador.fragment
|
||||||
|
|
||||||
|
import android.view.View
|
||||||
|
import android.view.inputmethod.EditorInfo
|
||||||
|
import es.verdnatura.R
|
||||||
|
import es.verdnatura.databinding.FragmentExpeditionscanSorterBinding
|
||||||
|
import es.verdnatura.presentation.base.BaseFragment
|
||||||
|
import es.verdnatura.presentation.view.component.CustomDialogInputTwoValues
|
||||||
|
|
||||||
|
class CmrExpeditionPalletFragment(
|
||||||
|
var title: String = ""
|
||||||
|
) : BaseFragment<FragmentExpeditionscanSorterBinding, CmrExpeditionPalletViewModel>(
|
||||||
|
CmrExpeditionPalletViewModel::class
|
||||||
|
) {
|
||||||
|
|
||||||
|
override fun getLayoutId(): Int = R.layout.fragment_expeditionscan_sorter
|
||||||
|
private lateinit var customDialogList: CustomDialogInputTwoValues
|
||||||
|
private var itemScaned: String = ""
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
fun newInstance(title: String) = CmrExpeditionPalletFragment(title)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun init() {
|
||||||
|
|
||||||
|
customDialogList = CustomDialogInputTwoValues(requireContext())
|
||||||
|
ma.hideBottomNavigation(View.GONE)
|
||||||
|
binding.splashProgress.visibility = View.GONE
|
||||||
|
setEvents()
|
||||||
|
setToolBar()
|
||||||
|
showExpeditionPalletScan()
|
||||||
|
super.init()
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setToolBar() {
|
||||||
|
binding.mainToolbar.toolbarTitle.text = title
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun cmrExpeditionPallet_add(vExpeditionPallet: String, vCmrId: String) {
|
||||||
|
|
||||||
|
customDialogList.dismiss()
|
||||||
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
|
viewModel.cmrExpeditionPallet_add(
|
||||||
|
getData(USER),
|
||||||
|
getData(PASSWORD),
|
||||||
|
vExpeditionPallet,
|
||||||
|
vCmrId
|
||||||
|
)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun setEvents() {
|
||||||
|
|
||||||
|
binding.mainToolbar.backButton.setOnClickListener {
|
||||||
|
requireActivity().onBackPressed()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun observeViewModel() {
|
||||||
|
|
||||||
|
with(viewModel) {
|
||||||
|
binding.splashProgress.visibility = View.GONE
|
||||||
|
responsescan.observe(viewLifecycleOwner) {
|
||||||
|
|
||||||
|
if (it.isError) {
|
||||||
|
|
||||||
|
ma.messageWithSound(getString(R.string.cmrError)+it.errorMessage, true, true, isToasted =true)
|
||||||
|
showExpeditionPalletScan()
|
||||||
|
|
||||||
|
} else {
|
||||||
|
binding.splashProgress.visibility = View.GONE
|
||||||
|
ma.messageWithSound(getString(R.string.added), false, true)
|
||||||
|
showExpeditionPalletScan()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun showExpeditionPalletScan() {
|
||||||
|
|
||||||
|
customDialogList.setInfoTex(getString(R.string.pallet))
|
||||||
|
customDialogList.setInfoTextTwo(getString(R.string.cmr))
|
||||||
|
customDialogList.setInputTextVisibility(View.GONE)
|
||||||
|
|
||||||
|
customDialogList.setTitle(getString(R.string.expeditionPalletScan))
|
||||||
|
.setOkButton(getString(R.string.end)) {
|
||||||
|
|
||||||
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
customDialogList.dismiss()
|
||||||
|
binding.mainToolbar.backButton.performClick()
|
||||||
|
|
||||||
|
|
||||||
|
}.setValue("").show()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
customDialogList.setFocusText()
|
||||||
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
customDialogList.getEditText().setOnEditorActionListener { _, actionId, _ ->
|
||||||
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
|
||||||
|
|
||||||
|
if (customDialogList.getValue().isNotEmpty()) {
|
||||||
|
customDialogList.setInputTextVisibility(View.VISIBLE)
|
||||||
|
customDialogList.setTitle(getString(R.string.cmrScan))
|
||||||
|
customDialogList.setFocusTextTwo()
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return@setOnEditorActionListener false
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
customDialogList.getEditTextTwo().setOnEditorActionListener { _, actionId, _ ->
|
||||||
|
if (actionId == EditorInfo.IME_ACTION_SEARCH || actionId == EditorInfo.IME_ACTION_DONE || actionId == 0 || actionId == 5 || actionId == 6) {
|
||||||
|
|
||||||
|
if (customDialogList.getValue().isNotEmpty() && customDialogList.getValueTwo()
|
||||||
|
.isNotEmpty()
|
||||||
|
) {
|
||||||
|
ma.hideKeyboard(customDialogList.getEditText())
|
||||||
|
customDialogList.setValueTwo("")
|
||||||
|
cmrExpeditionPallet_add(
|
||||||
|
customDialogList.getValue(),
|
||||||
|
customDialogList.getValueTwo()
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
return@setOnEditorActionListener true
|
||||||
|
}
|
||||||
|
false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
package es.verdnatura.presentation.view.feature.paletizador.fragment
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import androidx.lifecycle.LiveData
|
||||||
|
import androidx.lifecycle.MutableLiveData
|
||||||
|
import es.verdnatura.domain.GetPaletizadoresUserCase
|
||||||
|
import es.verdnatura.presentation.base.BaseViewModel
|
||||||
|
import es.verdnatura.presentation.base.getMessageFromAllResponse
|
||||||
|
import es.verdnatura.presentation.base.nameofFunction
|
||||||
|
import es.verdnatura.presentation.common.ResponseItemVO
|
||||||
|
import retrofit2.Call
|
||||||
|
import retrofit2.Callback
|
||||||
|
import retrofit2.Response
|
||||||
|
|
||||||
|
|
||||||
|
class CmrExpeditionPalletViewModel(context: Context) : BaseViewModel() {
|
||||||
|
|
||||||
|
private val GetPaletizadoresUserCase: GetPaletizadoresUserCase =
|
||||||
|
GetPaletizadoresUserCase(context)
|
||||||
|
|
||||||
|
private val _responsescan by lazy { MutableLiveData<ResponseItemVO>() }
|
||||||
|
val responsescan: LiveData<ResponseItemVO>
|
||||||
|
get() = _responsescan
|
||||||
|
|
||||||
|
|
||||||
|
fun cmrExpeditionPallet_add(usuario: String, password: String, vExpeditionPallet: String,vCmrId:String) {
|
||||||
|
GetPaletizadoresUserCase.cmrExpeditionPallet_add(usuario, password, vExpeditionPallet, vCmrId)
|
||||||
|
.enqueue(object : Callback<Void> {
|
||||||
|
override fun onFailure(call: Call<Void>, t: Throwable) {
|
||||||
|
|
||||||
|
_responsescan.value = ResponseItemVO(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(nameofFunction(this), t.message!!)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onResponse(call: Call<Void>, response: Response<Void>) {
|
||||||
|
|
||||||
|
if (!response.isSuccessful) {
|
||||||
|
_responsescan.value = ResponseItemVO(
|
||||||
|
isError = true,
|
||||||
|
errorMessage = getMessageFromAllResponse(
|
||||||
|
nameofFunction(this),
|
||||||
|
response.message()
|
||||||
|
)
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
_responsescan.value =
|
||||||
|
ResponseItemVO(isError = false, response = response.message()!!)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -73,14 +73,13 @@ class ExpeditionPalletFragment(
|
||||||
customDialog = CustomDialog(requireContext())
|
customDialog = CustomDialog(requireContext())
|
||||||
customDialogList = CustomDialogList(requireContext())
|
customDialogList = CustomDialogList(requireContext())
|
||||||
binding.splashProgress.visibility = View.VISIBLE
|
binding.splashProgress.visibility = View.VISIBLE
|
||||||
//requireActivity().main_bottom_navigation.visibility = View.GONE
|
|
||||||
ma.hideBottomNavigation(View.GONE)
|
ma.hideBottomNavigation(View.GONE)
|
||||||
binding.mainToolbar.toolbarTitle.text = getCURDATE(itemExpeditionTruckVO!!.ETD) + " " + itemExpeditionTruckVO!!.Destino
|
binding.mainToolbar.toolbarTitle.text = getCURDATE(itemExpeditionTruckVO!!.ETD) + " " + itemExpeditionTruckVO!!.Destino
|
||||||
setToolBar()
|
setToolBar()
|
||||||
setEvents()
|
setEvents()
|
||||||
viewModel.expeditionPallet_List(getData(USER),
|
viewModel.expeditionPallet_List(getData(USER),
|
||||||
getData(PASSWORD),itemExpeditionTruckVO!!.truckFk)
|
getData(PASSWORD),itemExpeditionTruckVO!!.truckFk)
|
||||||
////Log.i("VERDNATURA:","4-listamos listado de pallets para la expedicion")
|
|
||||||
super.init()
|
super.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -153,11 +153,11 @@ class ExpeditionStateViewModel(context: Context) : BaseViewModel() {
|
||||||
|
|
||||||
// val mapType = object : TypeToken<Map<String, Any>>() {}.type
|
// val mapType = object : TypeToken<Map<String, Any>>() {}.type
|
||||||
|
|
||||||
var expeditionState: Map<String, Any> =
|
var expeditionState: Map<String, String?> =
|
||||||
gson.fromJson(json, object : TypeToken<Map<String, Any>>() {}.type)
|
gson.fromJson(json, object : TypeToken<Map<String, String?>>() {}.type)
|
||||||
expeditionState.forEach {
|
expeditionState.forEach {
|
||||||
|
|
||||||
list.add(itemsExpeditionDynamics(key=it.key, it.value.toString()))
|
list.add(itemsExpeditionDynamics(key=it.key, it.value?:""))
|
||||||
|
|
||||||
}
|
}
|
||||||
return list
|
return list
|
||||||
|
|
|
@ -264,16 +264,25 @@ class PasilleroViewModel(context: Context) : BaseViewModel() {
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
_pasillerositem.add(
|
_pasillerositem.add(
|
||||||
PasillerosItemVO(
|
PasillerosItemVO(
|
||||||
31,
|
50,
|
||||||
R.drawable.ic_visibility_black_24dp,
|
R.drawable.ic_visibility_black_24dp,
|
||||||
contextApp.getString(R.string.titleExpeditionState),
|
contextApp.getString(R.string.titleExpeditionState),
|
||||||
R.string.titleExpeditionState,
|
R.string.titleExpeditionState,
|
||||||
contextApp.getString(R.string.titleExpeditionDescrip)
|
contextApp.getString(R.string.titleExpeditionDescrip)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
/*
|
||||||
|
_pasillerositem.add(
|
||||||
|
PasillerosItemVO(
|
||||||
|
31,
|
||||||
|
R.drawable.ic_cmr,
|
||||||
|
contextApp.getString(R.string.titleCMRState),
|
||||||
|
R.string.titleCMRState,
|
||||||
|
contextApp.getString(R.string.titleCMRDescrip)
|
||||||
|
)
|
||||||
|
)*/
|
||||||
_pasillerositem.add(
|
_pasillerositem.add(
|
||||||
PasillerosItemVO(
|
PasillerosItemVO(
|
||||||
40,
|
40,
|
||||||
|
|
|
@ -169,6 +169,8 @@ class ReubicationCollectionFragment(
|
||||||
val messageDescrip =
|
val messageDescrip =
|
||||||
getString(R.string.scanPlateToLeave) + itemReubication.itemFk + "-" + itemReubication.longName
|
getString(R.string.scanPlateToLeave) + itemReubication.itemFk + "-" + itemReubication.longName
|
||||||
|
|
||||||
|
customDialogInputTwoValues.setEnableValue(false)
|
||||||
|
|
||||||
customDialogInputTwoValues.setDescription(messageDescrip)
|
customDialogInputTwoValues.setDescription(messageDescrip)
|
||||||
.setValue(itemReubication.quantity)
|
.setValue(itemReubication.quantity)
|
||||||
.setOkButton(getString(R.string.leaveItem)) {
|
.setOkButton(getString(R.string.leaveItem)) {
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
<!-- drawable/truck.xml -->
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:height="24dp"
|
||||||
|
android:width="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path android:fillColor="#F7931E" android:pathData="M18,18.5A1.5,1.5 0 0,1 16.5,17A1.5,1.5 0 0,1 18,15.5A1.5,1.5 0 0,1 19.5,17A1.5,1.5 0 0,1 18,18.5M19.5,9.5L21.46,12H17V9.5M6,18.5A1.5,1.5 0 0,1 4.5,17A1.5,1.5 0 0,1 6,15.5A1.5,1.5 0 0,1 7.5,17A1.5,1.5 0 0,1 6,18.5M20,8H17V4H3C1.89,4 1,4.89 1,6V17H3A3,3 0 0,0 6,20A3,3 0 0,0 9,17H15A3,3 0 0,0 18,20A3,3 0 0,0 21,17H23V12L20,8Z" />
|
||||||
|
</vector>
|
|
@ -53,14 +53,14 @@
|
||||||
style="@style/DefaultButton.NormalButton"
|
style="@style/DefaultButton.NormalButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:background="@drawable/background_round"
|
android:background="@drawable/background_round"
|
||||||
android:enabled="false"
|
android:enabled="true"
|
||||||
android:hint="@string/quantity"
|
android:hint="@string/quantity"
|
||||||
android:inputType="number"
|
android:inputType="number"
|
||||||
android:lines="1"
|
android:lines="1"
|
||||||
android:maxLines="1"
|
android:maxLines="1"
|
||||||
android:textColor="@color/verdnatura_white"
|
android:textColor="@color/verdnatura_white"
|
||||||
android:textColorHint="@android:color/darker_gray"
|
android:textColorHint="@android:color/darker_gray"
|
||||||
android:visibility="gone" />
|
android:visibility="visible" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
|
|
|
@ -75,6 +75,7 @@
|
||||||
<string name="Coleccióncompleta">Colección completa</string>
|
<string name="Coleccióncompleta">Colección completa</string>
|
||||||
<string name="Parking">Parking</string>
|
<string name="Parking">Parking</string>
|
||||||
<string name="Reject">Rechazar</string>
|
<string name="Reject">Rechazar</string>
|
||||||
|
<string name="cmrError">No se ha podido guardar.Revisa el código del Pallet y del CMR.</string>
|
||||||
<string name="updatemng">Existe una versión nueva, es recomendable actualizar.</string>
|
<string name="updatemng">Existe una versión nueva, es recomendable actualizar.</string>
|
||||||
<string name="Actualizar">Actualizar</string>
|
<string name="Actualizar">Actualizar</string>
|
||||||
<string name="reposicion">Reposición</string>
|
<string name="reposicion">Reposición</string>
|
||||||
|
@ -224,7 +225,7 @@
|
||||||
<string name="closeOdrder">¿Estás seguro de cerrar el pedido?</string>
|
<string name="closeOdrder">¿Estás seguro de cerrar el pedido?</string>
|
||||||
<string name="confirm">Confirmar</string>
|
<string name="confirm">Confirmar</string>
|
||||||
<string name="scanItem">Escanea un item</string>
|
<string name="scanItem">Escanea un item</string>
|
||||||
<string name="itemNotFound">No hemos podido encontrar el articulo. Revisa el sector.</string>
|
<string name="itemNotFound">No hemos podido encontrar el artículo. Revisa el sector.</string>
|
||||||
<string name="errorOperation">Error al realizar la operación</string>
|
<string name="errorOperation">Error al realizar la operación</string>
|
||||||
<string name="scanLabelExpedition">Escanea etiqueta de la expedición.</string>
|
<string name="scanLabelExpedition">Escanea etiqueta de la expedición.</string>
|
||||||
<string name="buffer">Buffer:</string>
|
<string name="buffer">Buffer:</string>
|
||||||
|
@ -382,7 +383,7 @@
|
||||||
<string name="labelType">Tipo etiqueta</string>
|
<string name="labelType">Tipo etiqueta</string>
|
||||||
<string name="vehicleControl">Control de vehículos</string>
|
<string name="vehicleControl">Control de vehículos</string>
|
||||||
<string name="userNotPermission">Usuario sin permisos para realizar la acción</string>
|
<string name="userNotPermission">Usuario sin permisos para realizar la acción</string>
|
||||||
<string name="messageUserError">Revisa tu usuario y contraseña. En caso de no poder acceder contacta co Informática</string>
|
<string name="messageUserError">Revisa tu usuario y contraseña. En caso de no poder acceder contacta con Informática</string>
|
||||||
<string name="ok">Ok</string>
|
<string name="ok">Ok</string>
|
||||||
<string name="ticket">Ticket: </string>
|
<string name="ticket">Ticket: </string>
|
||||||
<string name="expedit">Expedición: </string>
|
<string name="expedit">Expedición: </string>
|
||||||
|
@ -452,4 +453,12 @@
|
||||||
<string name="in_shelve">En balda:</string>
|
<string name="in_shelve">En balda:</string>
|
||||||
<string name="pendingReviewParking">No es posible aparcar el ticket porque hay un ticket pendiente:</string>
|
<string name="pendingReviewParking">No es posible aparcar el ticket porque hay un ticket pendiente:</string>
|
||||||
<string name="sectorALGEMESINEW">SACADOR V</string>
|
<string name="sectorALGEMESINEW">SACADOR V</string>
|
||||||
|
<string name="titleCMRState">Informar CMR</string>
|
||||||
|
<string name="titleCMRDescrip">Permite infomar de un CMR</string>
|
||||||
|
<string name="expeditionPalletScan">Escanea el Pallet</string>
|
||||||
|
<string name="cmrScan">Escanea CMR</string>
|
||||||
|
<string name="cmr">CMR</string>
|
||||||
|
<string name="collectionNoTicketsError">Colección no tiene tickets, el ticket no es de ahora o ticket eliminado</string>
|
||||||
|
<string name="stems">Tallos</string>
|
||||||
|
<string name="itemCost">Precio coste</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
<string name="Salida">Departure</string>
|
<string name="Salida">Departure</string>
|
||||||
<string name="Balance">Balance</string>
|
<string name="Balance">Balance</string>
|
||||||
<string name="Pallet">Pallet</string>
|
<string name="Pallet">Pallet</string>
|
||||||
|
<string name="cmr">CMR</string>
|
||||||
<string name="Ruta">Route</string>
|
<string name="Ruta">Route</string>
|
||||||
<string name="Cajas">Boxes</string>
|
<string name="Cajas">Boxes</string>
|
||||||
<string name="Nivel">Level:</string>
|
<string name="Nivel">Level:</string>
|
||||||
|
@ -57,7 +58,9 @@
|
||||||
<string name="Disponible">Available</string>
|
<string name="Disponible">Available</string>
|
||||||
<string name="Ubicado">Located</string>
|
<string name="Ubicado">Located</string>
|
||||||
<string name="SINUBICAR">Unlocated</string>
|
<string name="SINUBICAR">Unlocated</string>
|
||||||
|
<string name="itemCost">Item cost</string>
|
||||||
<string name="MINIMO">Minimun</string>
|
<string name="MINIMO">Minimun</string>
|
||||||
|
<string name="stems">Steams</string>
|
||||||
<string name="txtparking">First scan as many cars or tickets as you want to park and finally scan the parking to finish the process</string>
|
<string name="txtparking">First scan as many cars or tickets as you want to park and finally scan the parking to finish the process</string>
|
||||||
<string name="Ticketaparcado">Parked ticket</string>
|
<string name="Ticketaparcado">Parked ticket</string>
|
||||||
<string name="Imprimiendo">Printing by </string>
|
<string name="Imprimiendo">Printing by </string>
|
||||||
|
@ -128,6 +131,7 @@
|
||||||
<string name="assigned_user">User assigned to device name</string>
|
<string name="assigned_user">User assigned to device name</string>
|
||||||
<string name="ScanPlateOrSmarttag">Scan plate or smartag</string>
|
<string name="ScanPlateOrSmarttag">Scan plate or smartag</string>
|
||||||
<string name="titleExpeditionState">Expedition state</string>
|
<string name="titleExpeditionState">Expedition state</string>
|
||||||
|
<string name="titleCMRState">Report CMR</string>
|
||||||
<string name="BuffersManegement">Buffer Management</string>
|
<string name="BuffersManegement">Buffer Management</string>
|
||||||
<string name="PalletMake">Pallet make</string>
|
<string name="PalletMake">Pallet make</string>
|
||||||
<string name="scanPallet">Scan pallet</string>
|
<string name="scanPallet">Scan pallet</string>
|
||||||
|
@ -299,6 +303,7 @@
|
||||||
<string name="scanBuffer">Scan buffer</string>
|
<string name="scanBuffer">Scan buffer</string>
|
||||||
<string name="barcodes">Barcodes</string>
|
<string name="barcodes">Barcodes</string>
|
||||||
<string name="collectionNoTickets">Collection has no ticket</string>
|
<string name="collectionNoTickets">Collection has no ticket</string>
|
||||||
|
<string name="collectionNoTicketsError">Collection has no ticket or ticket is old</string>
|
||||||
<string name="reviewCAllhistorical">Check vehicle registration call</string>
|
<string name="reviewCAllhistorical">Check vehicle registration call</string>
|
||||||
<string name="takeVehicle">Pick up vehicle</string>
|
<string name="takeVehicle">Pick up vehicle</string>
|
||||||
<string name="noVehicle">Without vehicle</string>
|
<string name="noVehicle">Without vehicle</string>
|
||||||
|
@ -327,6 +332,8 @@
|
||||||
<string name="test">Check</string>
|
<string name="test">Check</string>
|
||||||
<string name="expeditionsError">You have not scanned expeditions</string>
|
<string name="expeditionsError">You have not scanned expeditions</string>
|
||||||
<string name="expeditionNoSorter">Scan expeditions that have not passed through the Sorter</string>
|
<string name="expeditionNoSorter">Scan expeditions that have not passed through the Sorter</string>
|
||||||
|
<string name="expeditionPalletScan">Scan pallet expedition </string>
|
||||||
|
<string name="cmrScan">Scan CMR</string>
|
||||||
<string name="added">Added</string>
|
<string name="added">Added</string>
|
||||||
<string name="registerAdded">Added log</string>
|
<string name="registerAdded">Added log</string>
|
||||||
<string name="keepPlate">" saved with registration plate "</string>
|
<string name="keepPlate">" saved with registration plate "</string>
|
||||||
|
@ -419,6 +426,7 @@
|
||||||
<string name="titleQualityDescrip">It allows to know the quality of some products by buyer</string>
|
<string name="titleQualityDescrip">It allows to know the quality of some products by buyer</string>
|
||||||
<string name="titlePalletDescrip">Allows scanning pallet to incorporate it into the system</string>
|
<string name="titlePalletDescrip">Allows scanning pallet to incorporate it into the system</string>
|
||||||
<string name="titleExpeditionDescrip">Allows you to know the status of an expedition</string>
|
<string name="titleExpeditionDescrip">Allows you to know the status of an expedition</string>
|
||||||
|
<string name="titleCMRDescrip">Allows you to report a CMR</string>
|
||||||
<string name="titleExpScanDescrip">Allows scanning shipments that have not passed through the sorter</string>
|
<string name="titleExpScanDescrip">Allows scanning shipments that have not passed through the sorter</string>
|
||||||
<string name="titleBufferMangDescrip">Access to the operations menu with the sorter buffers</string>
|
<string name="titleBufferMangDescrip">Access to the operations menu with the sorter buffers</string>
|
||||||
<string name="titleQrDescrip">Allows you to read information in a qr</string>
|
<string name="titleQrDescrip">Allows you to read information in a qr</string>
|
||||||
|
@ -452,6 +460,7 @@
|
||||||
<string name="scanPlateToLeave">Scan the plate where you want to leave the item :</string>
|
<string name="scanPlateToLeave">Scan the plate where you want to leave the item :</string>
|
||||||
<string name="in_shelve">In shelve:</string>
|
<string name="in_shelve">In shelve:</string>
|
||||||
<string name="successReubication">Reubication ended</string>
|
<string name="successReubication">Reubication ended</string>
|
||||||
|
<string name="cmrError">It\'s not saved. Please review pallet and CMR</string>
|
||||||
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|
Loading…
Reference in New Issue