修复派单问题

hmxc
张萌 4 years ago
parent a7bb48424a
commit 07be710c86

@ -124,7 +124,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
builder: (context) {
final userProvider =
Provider.of<UserProvider>(context, listen: false);
if (userProvider.infoModel.canOperation && widget.model.status < 2) {
if (userProvider.infoModel.canSendTicket && widget.model.status < 2) {
return AkuMaterialButton(
color: AppStyle.primaryColor,
nullColor: AppStyle.minorColor,
@ -143,7 +143,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
),
);
} else if (widget.model.status == 2) {
if (userProvider.infoModel.canOperation) {
if (userProvider.infoModel.canSendTicket){
return AkuMaterialButton(
color: AppStyle.primaryColor,
nullColor: AppStyle.minorColor,

@ -24,7 +24,12 @@ import 'package:aku_community_manager/ui/widgets/inner/aku_chip_box.dart';
class BusinessFixCard extends StatefulWidget {
final BussinessAndFixModel model;
final bool homeDisplay;
BusinessFixCard({Key key, @required this.model, this.homeDisplay = false})
final bool canSeeBottomButton;
BusinessFixCard(
{Key key,
@required this.model,
this.homeDisplay = false,
this.canSeeBottomButton = true})
: super(key: key);
@override
@ -88,7 +93,7 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
),
),
Text(
AkuMap.fixStatus(userInfoModel.canOperation,
AkuMap.fixStatus(userInfoModel.canSendTicket,
userInfoModel.canPickUpTicket, widget.model.status),
style: TextStyle(
color: widget.model.status < 4
@ -113,7 +118,7 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
),
AkuBox.h(16),
_buildImgs(),
_buildBottomCard(),
!widget.canSeeBottomButton ? SizedBox() : _buildBottomCard(),
],
),
margin: EdgeInsets.only(top: 16.w),

@ -5,6 +5,7 @@ import 'package:flutter/material.dart';
import 'package:aku_community_manager/const/resource.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
class FixSubmitFinishPage extends StatelessWidget {
final BussinessAndFixModel model;
const FixSubmitFinishPage({Key key, this.model}) : super(key: key);
@ -13,14 +14,18 @@ class FixSubmitFinishPage extends StatelessWidget {
Widget build(BuildContext context) {
return AkuScaffold(
title: '处理完成',
body:Container(
width:double.infinity,
body: Container(
width: double.infinity,
child: Column(
children: [
Image.asset(R.ASSETS_MANAGE_SUBMIT_SUCCESS_PNG,width:587.w,height:350.w),
Image.asset(R.ASSETS_MANAGE_SUBMIT_SUCCESS_PNG,
width: 587.w, height: 350.w),
'您已处理完成该报修'.text.black.size(40.sp).bold.make(),
120.w.heightBox,
BusinessFixCard(model: this.model),
BusinessFixCard(
model: this.model,
canSeeBottomButton: false,
),
],
),
),

@ -348,15 +348,12 @@ class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
TextUtil.isEmpty(
_materialPriceController.text)) {
return Text('人工费或材料费不能为空');
} else if (humanPrice == null ||
materialPrice == null)
return Text('输入有误');
}
else
humanPrice =
double.tryParse(_humanController.text);
materialPrice =
double.tryParse(_materialPriceController.text);
return Text(
'¥${(humanPrice + materialPrice).toStringAsFixed(2)}');
},

@ -25,7 +25,8 @@ class FixerDepartmentPage extends StatefulWidget {
final DispatchReportModel model;
final bool changeType;
final int dispatchId;
FixerDepartmentPage({Key key, @required this.model, this.changeType = false, this.dispatchId})
FixerDepartmentPage(
{Key key, @required this.model, this.changeType = false, this.dispatchId})
: super(key: key);
@override
@ -91,8 +92,9 @@ class _FixerDepartmentPageState extends State<FixerDepartmentPage> {
BotToast.showText(text: baseModel.message);
}
} else {
BaseModel baseModel =
await ManageFunc.repairDispatch(_reportModel,widget.dispatchId);
BaseModel baseModel = await ManageFunc.repairDispatch(
_reportModel,
dispatchId: widget.dispatchId);
if (baseModel.status) {
Get.back();
Get.back();

@ -4,6 +4,7 @@ import 'package:aku_community_manager/models/manager/bussiness_and_fix/fixed_det
import 'package:aku_community_manager/utils/network/base_model.dart';
import 'package:aku_community_manager/utils/network/net_util.dart';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
class ManageFunc {
///
@ -39,7 +40,9 @@ class ManageFunc {
}
///
static Future repairDispatch(DispatchReportModel model,int dispatchId) async {
static Future repairDispatch(DispatchReportModel model,
{@required int dispatchId}) async {
print(dispatchId);
BaseModel baseModel =
await NetUtil().post(API.manage.repairDispatch, params: {
'dispatchListId': dispatchId,

Loading…
Cancel
Save