diff --git a/lib/const/api.dart b/lib/const/api.dart index eca5e5e..66fc523 100644 --- a/lib/const/api.dart +++ b/lib/const/api.dart @@ -68,7 +68,8 @@ class _Manage { String get repairDetail => '/user/repair/findById'; ///报事报修:查询派工单详情表-派工类型 - String get dispatchListDetailType => '/manage/dataDictionary/findSysDispatchListDetailType'; + String get dispatchListDetailType => + '/manage/dataDictionary/findSysDispatchListDetailType'; ///报事报修:查询所有的工单时限信息(id and name) String get workOrderTimeLimit => '/user/repair/findWorkOrderTimeLimit'; @@ -88,8 +89,9 @@ class _Manage { ///报事报修:申请延时 String get applyDelayed => '/user/repair/applyDelayed'; -///报事报修:处理完成 -String get handleResult => '/user/repair/handleResult'; + ///报事报修:处理完成 + String get handleResult => '/user/repair/handleResult'; + ///借还管理:查询全部物品 String get borrowList => '/user/borrow/articleList'; @@ -130,4 +132,10 @@ String get handleResult => '/user/repair/handleResult'; class _Upload { ///上传个人资料头像照片 String get avatar => '/user/upload/butlerAppHeadSculpture'; + + ///上传物品信息详情照片 + String get uploadArticleDetail => '/user/upload/uploadArticleDetail'; + + ///上传物品信息照片 + String get uploadArtical => '/user/upload/uploadArticle'; } diff --git a/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart b/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart index 218b13d..c2440b6 100644 --- a/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart +++ b/lib/ui/sub_pages/business_and_fix/fix_work_finish_page.dart @@ -2,11 +2,13 @@ import 'dart:io'; // Flutter imports: +import 'package:aku_community_manager/const/api.dart'; import 'package:aku_community_manager/models/manager/bussiness_and_fix/bussiness_and_fix_model.dart'; import 'package:aku_community_manager/models/manager/bussiness_and_fix/fixed_detail_model.dart'; import 'package:aku_community_manager/ui/sub_pages/business_and_fix/fix_submit_finish_page.dart'; import 'package:aku_community_manager/utils/network/base_model.dart'; import 'package:aku_community_manager/utils/network/manage_func.dart'; +import 'package:aku_community_manager/utils/network/net_util.dart'; import 'package:bot_toast/bot_toast.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -387,7 +389,8 @@ class _FixWorkFinishPageState extends State { // materialPrice: double.parse(_materialController.text), // ); // Get.back(); - + List urls = await NetUtil() + .uploadFiles(_imgs, API.upload.uploadArtical); BaseModel baseModel = await ManageFunc.handleResult( widget.model.repairDetail.dispatchId, _descriptionController.text, @@ -395,10 +398,11 @@ class _FixWorkFinishPageState extends State { humanPrice, materialPrice, humanPrice + materialPrice, - 1, []); + 1, + urls); if (baseModel.status) { FixSubmitFinishPage( - model:widget.fixModel, + model: widget.fixModel, ).to(); } else { BotToast.showText(text: baseModel.message);