feat: opt ui
This commit is contained in:
@@ -3,6 +3,7 @@ package com.lukouguoji.gjc.viewModel
|
||||
import android.content.Intent
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.alibaba.android.arouter.utils.TextUtils
|
||||
import com.lukouguoji.module_base.base.BaseViewModel
|
||||
import com.lukouguoji.module_base.bean.ComAttach
|
||||
import com.lukouguoji.module_base.bean.FileBean
|
||||
@@ -71,6 +72,10 @@ class GjcInspectionDetailsViewModel : BaseViewModel() {
|
||||
*/
|
||||
fun auditReject() {
|
||||
val bean = dataBean.value ?: return
|
||||
if (TextUtils.isEmpty(bean.remark)) {
|
||||
showToast("请在备注中输入退回原因")
|
||||
return
|
||||
}
|
||||
getTopActivity().showConfirmDialog("确定要退回该单证吗?") {
|
||||
performAudit(bean, false, "退回")
|
||||
}
|
||||
@@ -100,7 +105,7 @@ class GjcInspectionDetailsViewModel : BaseViewModel() {
|
||||
if (isPass) {
|
||||
NetApply.api.passGjcInspection(requestData)
|
||||
} else {
|
||||
NetApply.api.backGjcInspection(requestData)
|
||||
NetApply.api.backGjcInspection(bean.remark, requestData)
|
||||
}
|
||||
}) {
|
||||
onSuccess = {
|
||||
|
||||
@@ -200,7 +200,8 @@ class GjcInspectionViewModel : BasePageViewModel() {
|
||||
if (isPass) {
|
||||
NetApply.api.passGjcInspection(requestData)
|
||||
} else {
|
||||
NetApply.api.backGjcInspection(requestData)
|
||||
// TODO: impl reason dialog
|
||||
NetApply.api.backGjcInspection("test reason", requestData)
|
||||
}
|
||||
}) {
|
||||
onSuccess = {
|
||||
|
||||
Reference in New Issue
Block a user