|
@@ -152,10 +152,12 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
|
|
void onReady() {
|
|
void onReady() {
|
|
super.onReady();
|
|
super.onReady();
|
|
fetchLabourRequestReViewList();
|
|
fetchLabourRequestReViewList();
|
|
|
|
+ registerEventBus();
|
|
}
|
|
}
|
|
|
|
|
|
@override
|
|
@override
|
|
void onClose() {
|
|
void onClose() {
|
|
|
|
+ unregisterEventBus();
|
|
state.datas.clear();
|
|
state.datas.clear();
|
|
super.onClose();
|
|
super.onClose();
|
|
}
|
|
}
|
|
@@ -165,6 +167,7 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
|
|
|
|
|
|
void registerEventBus() {
|
|
void registerEventBus() {
|
|
subscribe = bus.on(AppConstant.eventLabourRequestRefresh, (arg) {
|
|
subscribe = bus.on(AppConstant.eventLabourRequestRefresh, (arg) {
|
|
|
|
+ ToastEngine.show("77737 ${arg}");
|
|
var requestId = arg as String;
|
|
var requestId = arg as String;
|
|
if (Utils.isNotEmpty(requestId)) {
|
|
if (Utils.isNotEmpty(requestId)) {
|
|
// fetchItemByIdAndRefreshItem(requestId);
|
|
// fetchItemByIdAndRefreshItem(requestId);
|
|
@@ -332,6 +335,7 @@ class LabourReviewController extends GetxController with DioCancelableMixin {
|
|
/// 去编辑页面
|
|
/// 去编辑页面
|
|
void gotoEditPage(UkLabourRequestReviewListRows data) {
|
|
void gotoEditPage(UkLabourRequestReviewListRows data) {
|
|
UKLabourReviewEditPage.startInstance(1, data.requestId!.toString(), (result) {
|
|
UKLabourReviewEditPage.startInstance(1, data.requestId!.toString(), (result) {
|
|
|
|
+ ToastEngine.show("回调 ${result}");
|
|
if (Utils.isNotEmpty(result)) {
|
|
if (Utils.isNotEmpty(result)) {
|
|
// fetchItemByIdAndRefreshItem(data.requestId!.toString());
|
|
// fetchItemByIdAndRefreshItem(data.requestId!.toString());
|
|
refreshController.callRefresh();
|
|
refreshController.callRefresh();
|