master
张萌 3 years ago
parent 87cc037d52
commit 700ea282a1

@ -3,12 +3,12 @@ import 'package:aku_new_community_manager/const/api.dart';
// Project imports:
import 'package:aku_new_community_manager/const/resource.dart';
import 'package:aku_new_community_manager/provider/message_provider.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/home/messages/comment_message.dart';
import 'package:aku_new_community_manager/ui/home/messages/system/system_message.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
// Package imports:
import 'package:dio/dio.dart';
@ -162,7 +162,7 @@ class _MessageState extends State<Message> {
onpressed: () async {
BaseModel baseModel =
await NetUtil().get(API.message.allReadSysMes);
if (baseModel.success ?? false) {
if (baseModel.success) {
messageProvider.updateMessage();
Get.to(() => SystemMessage());
}
@ -180,7 +180,7 @@ class _MessageState extends State<Message> {
onpressed: () async {
BaseModel baseModel =
await NetUtil().get(API.message.allReadCommentMes);
if (baseModel.success ?? false) {
if (baseModel.success) {
messageProvider.updateMessage();
Get.to(() => CommentMessage());
}

@ -57,7 +57,7 @@ class _SystemMessageGreenCardState extends State<SystemMessageGreenCard> {
await NetUtil().get(API.message.getSysGreenMessageById, params: {
"greenTaskId": repairId,
});
if (baseModel.success ?? false) {
if (baseModel.success) {
return SystemMessageGreenModel.fromJson(baseModel.data);
} else {
return SystemMessageGreenModel.fail();

@ -1,10 +1,10 @@
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/json_models/message/system_message_house_keeping_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/home/messages/message_map.dart';
import 'package:aku_new_community_manager/ui/manage_pages/house_keeping/house_keeping_page.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';
@ -51,7 +51,7 @@ class _SystemMessageHouseKeepingCardState
await NetUtil().get(API.message.getSysHygienceMessageById, params: {
"housekeepingServiceId": relationId,
});
if (baseModel.success ?? false) {
if (baseModel.success) {
return SystemMessageHouseKeepingModel.fromJson(baseModel.data);
}
}

@ -58,7 +58,7 @@ class _SystemMessageHygienceCardState extends State<SystemMessageHygienceCard> {
await NetUtil().get(API.message.getSysHygienceMessageById, params: {
"hygieneTaskId": repairId,
});
if (baseModel.success ?? false) {
if (baseModel.success) {
return SystemMessageHygineceModel.fromJson(baseModel.data);
}
}

@ -1,7 +1,7 @@
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/json_models/clock_in_out/today_clock_record_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
@ -10,7 +10,7 @@ import 'package:flutter/material.dart';
class ClockFunc {
static Future initClockInfo() async {
BaseModel baseModel = await NetUtil().get(API.manage.todayClockRecord);
if (baseModel.success! && baseModel.data != null) {
if (baseModel.success && baseModel.data != null) {
return TodayClockRecordModel.fromJson(baseModel.data);
} else {
BotToast.showText(text: baseModel.msg);

@ -4,6 +4,7 @@ import 'dart:io';
// Flutter imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/facilities/facilities_check_list_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
// Project imports:
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/widgets/app_widgets/aku_pick_image_widget.dart';
@ -11,7 +12,6 @@ import 'package:aku_new_community_manager/ui/widgets/app_widgets/aku_single_chec
import 'package:aku_new_community_manager/ui/widgets/app_widgets/bee_grid_image_view.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
@ -51,11 +51,10 @@ class _FacilitiesInspectReportDetailPageState
void initState() {
// TODO: implement initState
super.initState();
if(!editEnable){
if(widget.model!.situation==1){
if (!editEnable) {
if (widget.model!.situation == 1) {
_scene = 1;
}
else if(widget.model!.situation==2){
} else if (widget.model!.situation == 2) {
_scene = 2;
}
}
@ -79,9 +78,7 @@ class _FacilitiesInspectReportDetailPageState
width: double.infinity,
),
_descriptionCard(
widget.facilitiesType == 1 ? '设施情况' : '设备情况',
widget.model
),
widget.facilitiesType == 1 ? '设施情况' : '设备情况', widget.model),
_scenePhotoCard(widget.model),
],
),
@ -104,7 +101,7 @@ class _FacilitiesInspectReportDetailPageState
"detail": _describtion,
"imgUrls": _scenePhotoUrl,
});
if (baseModel.success!) {
if (baseModel.success) {
Get.back();
}
BotToast.showText(text: baseModel.msg);
@ -136,9 +133,10 @@ class _FacilitiesInspectReportDetailPageState
// 12.w.heightBox,
// _buildTile(R.ASSETS_MESSAGE_IC_PHONE_PNG, '联系电话', model!.??''),
// 12.w.heightBox,
_buildTile(R.ASSETS_MANAGE_ADDRESS_PNG, '检查场地', model?.facilitiesName??''),
_buildTile(
R.ASSETS_MANAGE_ADDRESS_PNG, '检查场地', model?.facilitiesName ?? ''),
12.w.heightBox,
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间', model?.beginDate??''),
_buildTile(R.ASSETS_MANAGE_CLOCK_PNG, '规定任务时间', model?.beginDate ?? ''),
],
)
.box
@ -166,37 +164,32 @@ class _FacilitiesInspectReportDetailPageState
}
Widget _descriptionCard(
String title, FacilitiesCheckListModel? model,
String title,
FacilitiesCheckListModel? model,
// int index,
) {
return Column(
children: [
Row(
children: ['$title'.text.color(kTextPrimaryColor).size(32.sp).bold.make()],
children: [
'$title'.text.color(kTextPrimaryColor).size(32.sp).bold.make()
],
),
16.w.heightBox,
Row(
children: [
AkuSingleCheckButton(
text: '正常',
value: 1,
gropValue: _scene,
onPressed: () {}
),
text: '正常', value: 1, gropValue: _scene, onPressed: () {}),
16.w.widthBox,
AkuSingleCheckButton(
text: '异常',
value: 2,
gropValue: _scene,
onPressed: () {}
),
text: '异常', value: 2, gropValue: _scene, onPressed: () {}),
],
),
32.w.heightBox,
Row(
children: ['补充说明'.text.color(kTextPrimaryColor).size(32.sp).bold.make()],
children: [
'补充说明'.text.color(kTextPrimaryColor).size(32.sp).bold.make()
],
),
16.w.heightBox,
Container(

@ -4,6 +4,7 @@ import 'dart:io';
// Flutter imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/facilities/facilities_check_list_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
// Project imports:
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/ui/widgets/app_widgets/aku_pick_image_widget.dart';
@ -11,7 +12,6 @@ import 'package:aku_new_community_manager/ui/widgets/app_widgets/aku_single_chec
import 'package:aku_new_community_manager/ui/widgets/app_widgets/bee_grid_image_view.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
@ -78,7 +78,7 @@ class _FacilitiesInspectReportPageState
"detail": _describtion,
"imgUrls": _scenePhotoUrl,
});
if (baseModel.success!) {
if (baseModel.success) {
Get.back();
}
BotToast.showText(text: baseModel.msg);

@ -163,7 +163,7 @@ class _GreenManageCardState extends State<GreenManageCard> {
.post(API.manage.greenManageComplete, params: {
"id": widget.model.id,
});
if (baseModel.success!) {
if (baseModel.success) {
widget.callRefresh!();
}
BotToast.showText(text: baseModel.msg);

@ -95,7 +95,7 @@ class _HouseKeepingAddPageState extends State<HouseKeepingAddPage> {
},
showMessage: true,
);
if (baseModel.success!) {
if (baseModel.success) {
Get.back();
}
}

@ -13,7 +13,7 @@ class HouseKeepingFunc {
int id) async {
BaseModel baseModel = await NetUtil().get(API.manage.newHouseKeepingProcess,
params: {"housekeepingServiceId": id});
if (baseModel.success ?? false) {
if (baseModel.success) {
return (baseModel.data as List)
.map((e) => HouseKeepingProcessModel.fromJson(e))
.toList();
@ -28,7 +28,7 @@ class HouseKeepingFunc {
await NetUtil().get(API.manage.newHouseKeepingUrgeWork, params: {
"housekeepingServiceId": id,
});
if (baseModel.success ?? false) {
if (baseModel.success) {
BotToast.showText(text: '已成功催单,请耐心等候');
return true;
} else {
@ -42,7 +42,7 @@ class HouseKeepingFunc {
await NetUtil().post(API.manage.newHouseKeepingOrderReceive, params: {
"id": id,
});
if (baseModel.success ?? false) {
if (baseModel.success) {
BotToast.showText(text: '接单成功');
return true;
} else {
@ -54,7 +54,7 @@ class HouseKeepingFunc {
static Future newHouseKeepingPickStaffList() async {
BaseModel baseModel =
await NetUtil().get(API.manage.newHouseKeepingPickStaffList);
if (baseModel.success ?? false) {
if (baseModel.success) {
return (baseModel.data as List)
.map((e) => HouseKeepingPickStaffModel.fromJson(e))
.toList();
@ -70,7 +70,7 @@ class HouseKeepingFunc {
"id": id,
"handler": handlerId,
});
if (baseModel.success ?? false) {
if (baseModel.success) {
BotToast.showText(text: '派单成功');
return true;
} else {
@ -108,7 +108,7 @@ class HouseKeepingFunc {
"payFee": payFee,
"handlerImgUrls": urls,
});
if (baseModel.success ?? false) {
if (baseModel.success) {
BotToast.showText(text: '提交成功');
return true;
} else {

@ -1,6 +1,7 @@
// Flutter imports:
import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/models/manager/hygience_manage/heygience_list_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
// Project imports:
import 'package:aku_new_community_manager/style/app_style.dart';
import 'package:aku_new_community_manager/tools/aku_divider.dart';
@ -9,7 +10,6 @@ import 'package:aku_new_community_manager/tools/widget_tool.dart';
import 'package:aku_new_community_manager/ui/manage_pages/hygience_manage/hygience_manage_detail_page.dart';
import 'package:aku_new_community_manager/ui/manage_pages/hygience_manage/hygience_manage_map.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart';
@ -161,7 +161,7 @@ class _HyginecManageCardState extends State<HyginecManageCard> {
.post(API.manage.hygienceComplete, params: {
"id": widget.model.id,
});
if (baseModel.success!) {
if (baseModel.success) {
widget.callRefresh!();
}
BotToast.showText(text: baseModel.msg);

@ -168,7 +168,7 @@ class _InspectionManageDetailsPageState
BaseModel _baseModel = await NetUtil().get(
SAASAPI.inspection.startInspection,
params: {"executeId": widget.executeId});
if (_baseModel.success!) {
if (_baseModel.success) {
BotToast.showText(text: _baseModel.msg);
_refreshController!.callRefresh();
_startTimer(5000);
@ -182,7 +182,7 @@ class _InspectionManageDetailsPageState
BaseModel baseModel =
await ManageFunc.getInspectionFindCheckDetailByQr(
_detailModel!.id!, result.code);
if (baseModel.success!) {
if (baseModel.success) {
Get.to(() => InspectionPointInputPage(
inspectionName: _detailModel!.name,
qrModel: InspectionQRCodeModel.fromJson(
@ -525,7 +525,7 @@ class _InspectionManageDetailsPageState
if (_canUploadLocation) {
BaseModel baseModel = await (_uploadLocation(widget.executeId,
argument.latLng.longitude, argument.latLng.latitude));
if (!baseModel.success!) {
if (!baseModel.success) {
BotToast.showText(text: baseModel.msg);
} else {
_canUploadLocation = false;

@ -99,7 +99,7 @@ class _InspectionPointInputPageState extends State<InspectionPointInputPage> {
_scenePhots!, API.upload.uploadInspectionSpace);
BaseModel baseModel =
await (ManageFunc.getSubmitPoint(_submitModel));
if (baseModel.success!) {
if (baseModel.success) {
BotToast.showText(text: baseModel.msg);
Get.to(() => InspectionPointSubmitPage());
} else {

@ -57,7 +57,7 @@ class _InterviewFeedBackPageState extends State<InterviewFeedBackPage> {
},
showMessage: true,
);
if (baseModel.success!) {
if (baseModel.success) {
Get.back();
}
},

@ -137,7 +137,7 @@ class _AddPackagePageState extends State<AddPackagePage> {
},
);
if (!baseModel.success!) {
if (!baseModel.success) {
BotToast.showText(text: baseModel.msg);
return;
}

@ -128,7 +128,7 @@ class _PackageManageCardState extends State<PackageManageCard> {
Future _remindPackage(int packageCollectionId) async {
BaseModel baseModel = await NetUtil().get(API.manage.packageManageRemind,
params: {"packageCollectionId": packageCollectionId});
if (!baseModel.success!) {
if (!baseModel.success) {
BotToast.showText(text: baseModel.msg);
} else {
BotToast.showText(text: '已成功提醒领取');

@ -88,7 +88,7 @@ class _SettingFeedBackPageState extends State<SettingFeedBackPage> {
"content": _content,
"fileUrls": _imgeUrls,
});
if (baseModel.success!) {
if (baseModel.success) {
BotToast.showText(text: baseModel.msg);
Get.back();
} else {

@ -1,24 +1,22 @@
// Dart imports:
import 'dart:async';
// Flutter imports:
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
// Project imports:
import 'package:aku_new_community_manager/provider/user_provider.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
import 'package:aku_new_community_manager/ui/settings/update_userinfo_func.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
// Package imports:
import 'package:bot_toast/bot_toast.dart';
import 'package:common_utils/common_utils.dart';
// Flutter imports:
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:aku_new_community_manager/provider/user_provider.dart';
import 'package:aku_new_community_manager/ui/settings/update_userinfo_func.dart';
import 'package:aku_new_community_manager/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_model.dart';
class TelChangePage extends StatefulWidget {
TelChangePage({Key? key}) : super(key: key);
@ -112,7 +110,7 @@ class _TelChangePageState extends State<TelChangePage> {
BaseModel baseModel =
await UpdateUserInfoFunc.sendTelUpdateCode(
_newTelController!.text);
if (baseModel.success!) {
if (baseModel.success) {
startTick();
} else {}
}
@ -187,7 +185,7 @@ class _TelChangePageState extends State<TelChangePage> {
_oldTelController!.text,
_newTelController!.text,
_codeController!.text);
if (baseModel.success!) {
if (baseModel.success) {
userProvider.setTel(_newTelController!.text);
Get.back();
} else {

@ -423,7 +423,7 @@ class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
humanPrice! + materialPrice!,
1,
urls));
if (baseModel.success!) {
if (baseModel.success) {
FixSubmitFinishPage(
model: widget.fixModel,
).to();

@ -87,7 +87,7 @@ class _FixerDepartmentPageState extends State<FixerDepartmentPage> {
if (widget.changeType) {
BaseModel baseModel = await (ManageFunc.repairReassignment(
_reportModel!.dispatchListId!, _reportModel!.operato));
if (baseModel.success!) {
if (baseModel.success) {
BotToast.showText(text: '改派成功');
Get.back();
} else {

@ -80,7 +80,7 @@ class _NewRenovationFinishSubmitPageState
"isQualified": _isQualified,
},
showMessage: true);
if (baseModel.success ?? false) {
if (baseModel.success) {
Get.back();
}
},

Loading…
Cancel
Save