修复物品信息照片上传

hmxc
张萌 4 years ago
parent 8c8fdb6aae
commit a2b17d6f00

@ -68,7 +68,8 @@ class _Manage {
String get repairDetail => '/user/repair/findById'; String get repairDetail => '/user/repair/findById';
///- ///-
String get dispatchListDetailType => '/manage/dataDictionary/findSysDispatchListDetailType'; String get dispatchListDetailType =>
'/manage/dataDictionary/findSysDispatchListDetailType';
///(id and name) ///(id and name)
String get workOrderTimeLimit => '/user/repair/findWorkOrderTimeLimit'; String get workOrderTimeLimit => '/user/repair/findWorkOrderTimeLimit';
@ -88,8 +89,9 @@ class _Manage {
/// ///
String get applyDelayed => '/user/repair/applyDelayed'; String get applyDelayed => '/user/repair/applyDelayed';
/// ///
String get handleResult => '/user/repair/handleResult'; String get handleResult => '/user/repair/handleResult';
/// ///
String get borrowList => '/user/borrow/articleList'; String get borrowList => '/user/borrow/articleList';
@ -130,4 +132,10 @@ String get handleResult => '/user/repair/handleResult';
class _Upload { class _Upload {
/// ///
String get avatar => '/user/upload/butlerAppHeadSculpture'; String get avatar => '/user/upload/butlerAppHeadSculpture';
///
String get uploadArticleDetail => '/user/upload/uploadArticleDetail';
///
String get uploadArtical => '/user/upload/uploadArticle';
} }

@ -2,11 +2,13 @@
import 'dart:io'; import 'dart:io';
// Flutter imports: // 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/bussiness_and_fix_model.dart';
import 'package:aku_community_manager/models/manager/bussiness_and_fix/fixed_detail_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/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/base_model.dart';
import 'package:aku_community_manager/utils/network/manage_func.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:bot_toast/bot_toast.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
@ -387,7 +389,8 @@ class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
// materialPrice: double.parse(_materialController.text), // materialPrice: double.parse(_materialController.text),
// ); // );
// Get.back(); // Get.back();
List<String> urls = await NetUtil()
.uploadFiles(_imgs, API.upload.uploadArtical);
BaseModel baseModel = await ManageFunc.handleResult( BaseModel baseModel = await ManageFunc.handleResult(
widget.model.repairDetail.dispatchId, widget.model.repairDetail.dispatchId,
_descriptionController.text, _descriptionController.text,
@ -395,10 +398,11 @@ class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
humanPrice, humanPrice,
materialPrice, materialPrice,
humanPrice + materialPrice, humanPrice + materialPrice,
1, []); 1,
urls);
if (baseModel.status) { if (baseModel.status) {
FixSubmitFinishPage( FixSubmitFinishPage(
model:widget.fixModel, model: widget.fixModel,
).to(); ).to();
} else { } else {
BotToast.showText(text: baseModel.message); BotToast.showText(text: baseModel.message);

Loading…
Cancel
Save