|
|
@ -4,11 +4,20 @@ import androidx.appcompat.app.AppCompatActivity;
|
|
|
|
import androidx.databinding.DataBindingUtil;
|
|
|
|
import androidx.databinding.DataBindingUtil;
|
|
|
|
|
|
|
|
|
|
|
|
import android.os.Bundle;
|
|
|
|
import android.os.Bundle;
|
|
|
|
|
|
|
|
import android.view.View;
|
|
|
|
|
|
|
|
import android.widget.Toast;
|
|
|
|
|
|
|
|
|
|
|
|
import com.example.jingyuan_mes.R;
|
|
|
|
import com.example.jingyuan_mes.R;
|
|
|
|
import com.example.jingyuan_mes.base.BaseActivity;
|
|
|
|
import com.example.jingyuan_mes.base.BaseActivity;
|
|
|
|
|
|
|
|
import com.example.jingyuan_mes.base.MyRecultCall;
|
|
|
|
|
|
|
|
import com.example.jingyuan_mes.base.MyResult;
|
|
|
|
import com.example.jingyuan_mes.databinding.ActivityRelocationApplyBinding;
|
|
|
|
import com.example.jingyuan_mes.databinding.ActivityRelocationApplyBinding;
|
|
|
|
import com.example.jingyuan_mes.entity.store.RelocationApplyBeen;
|
|
|
|
import com.example.jingyuan_mes.entity.store.RelocationApplyBeen;
|
|
|
|
|
|
|
|
import com.example.jingyuan_mes.uitls.SharedPreferencesUtils;
|
|
|
|
|
|
|
|
import com.lzy.okgo.OkGo;
|
|
|
|
|
|
|
|
import com.lzy.okgo.model.Response;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import okhttp3.RequestBody;
|
|
|
|
|
|
|
|
|
|
|
|
public class RelocationApplyActivity extends BaseActivity {
|
|
|
|
public class RelocationApplyActivity extends BaseActivity {
|
|
|
|
private RelocationApplyBeen relocationApplyBeen;
|
|
|
|
private RelocationApplyBeen relocationApplyBeen;
|
|
|
@ -23,4 +32,21 @@ public class RelocationApplyActivity extends BaseActivity {
|
|
|
|
binding.setTitle(moveType.equals("1")?"移库申请":"合库申请");
|
|
|
|
binding.setTitle(moveType.equals("1")?"移库申请":"合库申请");
|
|
|
|
binding.setVm(relocationApplyBeen);
|
|
|
|
binding.setVm(relocationApplyBeen);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void relocationApplySubmit(View view){
|
|
|
|
|
|
|
|
OkGo.<MyResult>post(url+"/wms/mobile/applyMove")
|
|
|
|
|
|
|
|
.headers("Authorization", SharedPreferencesUtils.getstring("access_token", ""))
|
|
|
|
|
|
|
|
.upRequestBody(RequestBody.create(JSON,gson.toJson(relocationApplyBeen)))
|
|
|
|
|
|
|
|
.execute(new MyRecultCall(dialog,this){
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onSuccess(Response<MyResult> response) {
|
|
|
|
|
|
|
|
super.onSuccess(response);
|
|
|
|
|
|
|
|
var body = response.body();
|
|
|
|
|
|
|
|
if (body.getCode()==200){
|
|
|
|
|
|
|
|
relocationApplyBeen.clear();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Toast.makeText(context, body.getMsg(), Toast.LENGTH_SHORT).show();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|