From a2b17d6f00e58b0633e359eb1267df6a42c4372a Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Wed, 24 Feb 2021 15:38:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=89=A9=E5=93=81=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E7=85=A7=E7=89=87=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/const/api.dart | 14 +++++++++++--- .../business_and_fix/fix_work_finish_page.dart | 10 +++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) 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);