master
张萌 2 years ago
parent 7738795115
commit e444c1fedf

@ -2,3 +2,4 @@ org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
android.enableR8=true android.enableR8=true
systemProp.https.protocols=TLSv1.3

@ -27,11 +27,16 @@ class SAASAPI {
static _WorkOrder workOrder = _WorkOrder(); static _WorkOrder workOrder = _WorkOrder();
static _HouseHoldAudit householdAudit = _HouseHoldAudit(); static _HouseHoldAudit householdAudit = _HouseHoldAudit();
static _Home home = _Home(); static _Home home = _Home();
static _Upload upload = _Upload();
/// ///
static _OtherApi other = _OtherApi(); static _OtherApi other = _OtherApi();
} }
class _Upload {
String get uploadImg => '/butlerApp/user/upload/uploadImg';
}
class _Home { class _Home {
/// ///
String get todoList => '/butlerApp/user/frontPage/pendingList'; String get todoList => '/butlerApp/user/frontPage/pendingList';

@ -7,7 +7,7 @@ class InspectionCheckDetialModel {
String? code; String? code;
String? name; String? name;
int? type; int? type;
String? completeDate; int? completeDate;
List<CheckFBIVoList>? checkList; List<CheckFBIVoList>? checkList;
List<ImgModel>? faceImgList; List<ImgModel>? faceImgList;
List<ImgModel>? spaceImgList; List<ImgModel>? spaceImgList;

@ -3,8 +3,8 @@ class InspectionPointModel {
String? name; String? name;
int? checkNum; int? checkNum;
String? completeDate; String? completeDate;
int? longitude; num? longitude;
int? latitude; num? latitude;
InspectionPointModel( InspectionPointModel(
{required this.id, this.name, this.checkNum, this.completeDate}); {required this.id, this.name, this.checkNum, this.completeDate});

@ -15,7 +15,7 @@ class InspectionQRCodeModel {
type = json['type']; type = json['type'];
if (json['checkList'] != null) { if (json['checkList'] != null) {
checkList = <CheckVoList>[]; checkList = <CheckVoList>[];
json['checkVoList'].forEach((v) { json['checkList'].forEach((v) {
checkList!.add(new CheckVoList.fromJson(v)); checkList!.add(new CheckVoList.fromJson(v));
}); });
} }

@ -13,6 +13,7 @@ import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/insp
import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/qr_scanner_page.dart'; import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/qr_scanner_page.dart';
import 'package:aku_new_community_manager/ui/sub_pages/manage_func.dart'; import 'package:aku_new_community_manager/ui/sub_pages/manage_func.dart';
import 'package:aku_new_community_manager/ui/tool_pages/warning/warning_page.dart'; import 'package:aku_new_community_manager/ui/tool_pages/warning/warning_page.dart';
// Flutter imports: // Flutter imports:
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.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/ui/widgets/common/aku_scaffold.dart';
@ -186,11 +187,12 @@ class _InspectionManageDetailsPageState
await ManageFunc.getInspectionFindCheckDetailByQr( await ManageFunc.getInspectionFindCheckDetailByQr(
_detailModel!.id!, result.code); _detailModel!.id!, result.code);
if (baseModel.success) { if (baseModel.success) {
Get.to(() => InspectionPointInputPage( await Get.to(() => InspectionPointInputPage(
inspectionName: _detailModel!.name, inspectionName: _detailModel!.name,
qrModel: InspectionQRCodeModel.fromJson( qrModel: InspectionQRCodeModel.fromJson(
baseModel.data), baseModel.data),
)); ));
_refreshController?.callRefresh();
} else { } else {
showCupertinoDialog( showCupertinoDialog(
context: context, context: context,
@ -532,7 +534,7 @@ class _InspectionManageDetailsPageState
BaseModel baseModel = await (_uploadLocation(widget.executeId, BaseModel baseModel = await (_uploadLocation(widget.executeId,
argument.latLng.longitude, argument.latLng.latitude)); argument.latLng.longitude, argument.latLng.latitude));
if (!baseModel.success) { if (!baseModel.success) {
BotToast.showText(text: baseModel.msg); // BotToast.showText(text: baseModel.msg);
} else { } else {
_canUploadLocation = false; _canUploadLocation = false;
//线 //线
@ -583,12 +585,14 @@ class _InspectionManageDetailsPageState
Future _uploadLocation( Future _uploadLocation(
int executeId, double longitude, double latitude) async { int executeId, double longitude, double latitude) async {
BaseModel baseModel = await NetUtil() BaseModel baseModel = await NetUtil().post(
.post(SAASAPI.inspection.uploadLocation, params: { SAASAPI.inspection.uploadLocation,
"executeId": executeId, params: {
"longitude": longitude, "executeId": executeId,
"latitude": latitude "longitude": longitude,
}); "latitude": latitude
},
showMessage: false);
return baseModel; return baseModel;
} }
} }

@ -232,14 +232,14 @@ class _InspectionPointDetailPageState extends State<InspectionPointDetailPage> {
color: Color(0xFFFFF8E0), color: Color(0xFFFFF8E0),
border: Border.all(color: Color(0xFFFFC40C), width: 3.w), border: Border.all(color: Color(0xFFFFC40C), width: 3.w),
), ),
child: model.status == 1 child: model.status == 2
? '' ? ''
.text .text
.color(kTextPrimaryColor) .color(kTextPrimaryColor)
.size(32.sp) .size(32.sp)
.bold .bold
.make() .make()
: '' : ''
.text .text
.color(kTextPrimaryColor) .color(kTextPrimaryColor)
.size(32.sp) .size(32.sp)
@ -460,7 +460,7 @@ class _InspectionPointDetailPageState extends State<InspectionPointDetailPage> {
), ),
Spacer(), Spacer(),
Text( Text(
'${DateUtil.formatDateStr(model.completeDate!, format: "yyyy-MM-dd HH:mm")}', '${DateUtil.formatDateMs(model.completeDate!, format: "yyyy-MM-dd HH:mm")}',
style: AppStyle().primaryStyle, style: AppStyle().primaryStyle,
), ),
], ],

@ -3,10 +3,12 @@ import 'dart:io';
// Project imports: // Project imports:
import 'package:aku_new_community_manager/const/api.dart'; import 'package:aku_new_community_manager/const/api.dart';
import 'package:aku_new_community_manager/const/saas_api.dart';
import 'package:aku_new_community_manager/models/manager/inspection/inspection_point_submit_model.dart'; import 'package:aku_new_community_manager/models/manager/inspection/inspection_point_submit_model.dart';
import 'package:aku_new_community_manager/models/manager/inspection/inspection_qrcode_model.dart'; import 'package:aku_new_community_manager/models/manager/inspection/inspection_qrcode_model.dart';
import 'package:aku_new_community_manager/saas_models/net_model/base_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/style/app_style.dart';
// Flutter imports: // Flutter imports:
import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/inspection_point_submit_page.dart'; import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/inspection_point_submit_page.dart';
import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/inspection_utils.dart'; import 'package:aku_new_community_manager/ui/manage_pages/inspection_manage/inspection_utils.dart';
@ -16,6 +18,7 @@ import 'package:aku_new_community_manager/ui/widgets/app_widgets/aku_single_chec
import 'package:aku_new_community_manager/ui/widgets/common/aku_button.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/ui/widgets/common/aku_scaffold.dart';
import 'package:aku_new_community_manager/utils/network/net_util.dart'; import 'package:aku_new_community_manager/utils/network/net_util.dart';
// Package imports: // Package imports:
import 'package:bot_toast/bot_toast.dart'; import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -29,6 +32,7 @@ import 'package:velocity_x/src/flutter/widgets.dart';
class InspectionPointInputPage extends StatefulWidget { class InspectionPointInputPage extends StatefulWidget {
final InspectionQRCodeModel? qrModel; final InspectionQRCodeModel? qrModel;
final String? inspectionName; final String? inspectionName;
InspectionPointInputPage({Key? key, this.qrModel, this.inspectionName}) InspectionPointInputPage({Key? key, this.qrModel, this.inspectionName})
: super(key: key); : super(key: key);
@ -42,6 +46,7 @@ class _InspectionPointInputPageState extends State<InspectionPointInputPage> {
InspectionQRCodeModel? _model; InspectionQRCodeModel? _model;
List<File>? _selfPhotos; List<File>? _selfPhotos;
List<File>? _scenePhots; List<File>? _scenePhots;
bool get canSubmit { bool get canSubmit {
if (_selfPhotos == null && _scenePhots == null) { if (_selfPhotos == null && _scenePhots == null) {
return false; return false;
@ -92,11 +97,12 @@ class _InspectionPointInputPageState extends State<InspectionPointInputPage> {
bottom: AkuButton( bottom: AkuButton(
onPressed: canSubmit onPressed: canSubmit
? () async { ? () async {
_submitModel.inspectionFaceImg = await NetUtil() // _submitModel.inspectionFaceImg = await NetUtil()
.uploadFiles(_selfPhotos!, API.upload.uploadInspectionFace); // .uploadFiles(_selfPhotos!, SAASAPI.upload.uploadImg);
_submitModel.inspectionFaceImg = [];
_submitModel.inspectionSpaceImg = await NetUtil().uploadFiles( // _submitModel.inspectionSpaceImg = await NetUtil()
_scenePhots!, API.upload.uploadInspectionSpace); // .uploadFiles(_scenePhots!, SAASAPI.upload.uploadImg);
_submitModel.inspectionSpaceImg = [];
BaseModel baseModel = BaseModel baseModel =
await (ManageFunc.getSubmitPoint(_submitModel)); await (ManageFunc.getSubmitPoint(_submitModel));
if (baseModel.success) { if (baseModel.success) {

@ -618,13 +618,6 @@ packages:
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.12.11" version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
meta: meta:
dependency: transitive dependency: transitive
description: description:
@ -972,7 +965,7 @@ packages:
name: test_api name: test_api
url: "https://pub.dartlang.org" url: "https://pub.dartlang.org"
source: hosted source: hosted
version: "0.4.8" version: "0.4.3"
time: time:
dependency: transitive dependency: transitive
description: description:

Loading…
Cancel
Save