修复了一些问题

hmxc
张萌 4 years ago
parent 89f199c3f2
commit a7bb48424a

@ -104,7 +104,7 @@ class _PersonalDrawState extends State<PersonalDraw> {
children: [ children: [
Icon(Icons.location_on_outlined, size: 33.w), Icon(Icons.location_on_outlined, size: 33.w),
Text( Text(
'深圳华悦茂峰', '人才公寓',
style: TextStyle( style: TextStyle(
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,
fontSize: 24.sp), fontSize: 24.sp),

@ -132,7 +132,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
_reportModel.workOrderTyoe != null && _reportModel.workOrderTyoe != null &&
_reportModel.workOrderTimeLimit != null _reportModel.workOrderTimeLimit != null
? () { ? () {
Get.to(FixerDepartmentPage(model: _reportModel)); Get.to(FixerDepartmentPage(model: _reportModel,dispatchId: _detailModel.repairDetail.dispatchId,));
} }
: null, : null,
child: Text( child: Text(
@ -381,7 +381,7 @@ class _BusinessAndFixDetailPageState extends State<BusinessAndFixDetailPage> {
canTap, canTap,
helpContent: '请选择工单子类', helpContent: '请选择工单子类',
onTap: () async { onTap: () async {
List models = await ManageFunc.workOrderTypeDetail(widget.model.id); List models = await ManageFunc.workOrderTypeDetail(1);
_workTypeModels = _workTypeModels =
models.map((e) => WorkOrderTypeModel.fromJson(e)).toList(); models.map((e) => WorkOrderTypeModel.fromJson(e)).toList();
showItemSheet( showItemSheet(

@ -35,10 +35,12 @@ class _BusinessAndFixPageState extends State<BusinessAndFixPage>
// return ['待接单', '处理中', '已处理', '全部']; // return ['待接单', '处理中', '已处理', '全部'];
// break; // break;
// } // }
if (userProvider.infoModel.canOperation) { if (userProvider.infoModel.canSendTicket) {
return ['待派单', '已派单', '处理中', '已处理', '全部']; return ['待派单', '已派单', '处理中', '已处理', '全部'];
} else { } else if (userProvider.infoModel.canPickUpTicket) {
return ['待接单', '处理中', '已处理', '全部']; return ['待接单', '处理中', '已处理', '全部'];
} else {
return ['未处理', '处理中', '已处理', '全部'];
} }
} }
@ -68,27 +70,12 @@ class _BusinessAndFixPageState extends State<BusinessAndFixPage>
), ),
body: TabBarView( body: TabBarView(
controller: _tabController, controller: _tabController,
children: [ children:
...userProvider.infoModel.canOperation List.generate(
? [ _tabs.length,
BussinessAndFixView( (index) => BussinessAndFixView(
status: 1, status: index == _tabs.length - 1 ? null : index + 1,
) )),
]
: [],
BussinessAndFixView(
status: 2,
),
BussinessAndFixView(
status: 3,
),
BussinessAndFixView(
status: 4,
),
BussinessAndFixView(
status: null,
),
],
), ),
); );
} }

@ -5,6 +5,8 @@ import 'package:aku_community_manager/models/user/user_info_model.dart';
import 'package:aku_community_manager/provider/user_provider.dart'; import 'package:aku_community_manager/provider/user_provider.dart';
import 'package:aku_community_manager/tools/aku_map.dart'; import 'package:aku_community_manager/tools/aku_map.dart';
import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_and_fix_detail_page.dart'; import 'package:aku_community_manager/ui/sub_pages/business_and_fix/business_and_fix_detail_page.dart';
import 'package:aku_community_manager/ui/sub_pages/business_and_fix/fix_more_time_page.dart';
import 'package:aku_community_manager/ui/sub_pages/business_and_fix/fix_work_finish_page.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
// Package imports: // Package imports:
@ -179,7 +181,8 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
), ),
), ),
onPressed: () { onPressed: () {
// Get.to(FixMoreTimePage(model: widget.model)); Get.to(FixMoreTimePage(
dispatchId: widget.model.dispatchId));
}, },
) )
: SizedBox(), : SizedBox(),
@ -187,7 +190,9 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
widget.model.status == 3 widget.model.status == 3
? AkuMaterialButton( ? AkuMaterialButton(
onPressed: () { onPressed: () {
// Get.to(FixWorkFinishPage(model: widget.model)); Get.to(() => BusinessAndFixDetailPage(
model: widget.model,
));
}, },
radius: 4.w, radius: 4.w,
color: AppStyle.primaryColor, color: AppStyle.primaryColor,
@ -202,7 +207,7 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
), ),
) )
: SizedBox(), : SizedBox(),
widget.model.status == 2 (widget.model.status == 2) && (!userInfoModel.canSendTicket)
? AkuMaterialButton( ? AkuMaterialButton(
onPressed: () { onPressed: () {
// final userProvider = // final userProvider =

@ -50,8 +50,8 @@ class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
TextEditingController _humanController = TextEditingController(); TextEditingController _humanController = TextEditingController();
TextEditingController _materialPriceController = TextEditingController(); TextEditingController _materialPriceController = TextEditingController();
double humanPrice; double humanPrice = 0;
double materialPrice; double materialPrice = 0;
@override @override
void dispose() { void dispose() {
_descriptionController?.dispose(); _descriptionController?.dispose();
@ -344,10 +344,6 @@ class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
Spacer(), Spacer(),
Builder( Builder(
builder: (context) { builder: (context) {
humanPrice = double.tryParse(_humanController.text);
materialPrice =
double.tryParse(_materialPriceController.text);
if (TextUtil.isEmpty(_humanController.text) || if (TextUtil.isEmpty(_humanController.text) ||
TextUtil.isEmpty( TextUtil.isEmpty(
_materialPriceController.text)) { _materialPriceController.text)) {
@ -356,6 +352,11 @@ class _FixWorkFinishPageState extends State<FixWorkFinishPage> {
materialPrice == null) materialPrice == null)
return Text('输入有误'); return Text('输入有误');
else else
humanPrice =
double.tryParse(_humanController.text);
materialPrice =
double.tryParse(_materialPriceController.text);
return Text( return Text(
'¥${(humanPrice + materialPrice).toStringAsFixed(2)}'); '¥${(humanPrice + materialPrice).toStringAsFixed(2)}');
}, },

@ -24,7 +24,8 @@ import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
class FixerDepartmentPage extends StatefulWidget { class FixerDepartmentPage extends StatefulWidget {
final DispatchReportModel model; final DispatchReportModel model;
final bool changeType; final bool changeType;
FixerDepartmentPage({Key key, @required this.model, this.changeType = false}) final int dispatchId;
FixerDepartmentPage({Key key, @required this.model, this.changeType = false, this.dispatchId})
: super(key: key); : super(key: key);
@override @override
@ -91,7 +92,7 @@ class _FixerDepartmentPageState extends State<FixerDepartmentPage> {
} }
} else { } else {
BaseModel baseModel = BaseModel baseModel =
await ManageFunc.repairDispatch(_reportModel); await ManageFunc.repairDispatch(_reportModel,widget.dispatchId);
if (baseModel.status) { if (baseModel.status) {
Get.back(); Get.back();
Get.back(); Get.back();

@ -81,7 +81,7 @@ class _WarningSubPageState extends State<WarningSubPage> {
], ],
), ),
Text( Text(
'深圳华悦茂峰', '人才公寓',
style: TextStyle( style: TextStyle(
fontSize: 44.w, fontSize: 44.w,
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,

@ -52,7 +52,7 @@ class _WarningSuccessState extends State<WarningSuccess> {
width: 420.w, width: 420.w,
), ),
Text( Text(
'深圳华悦茂峰', '人才公寓',
style: TextStyle( style: TextStyle(
fontSize: 44.w, fontSize: 44.w,
color: AppStyle.primaryTextColor, color: AppStyle.primaryTextColor,

@ -39,10 +39,10 @@ class ManageFunc {
} }
/// ///
static Future repairDispatch(DispatchReportModel model) async { static Future repairDispatch(DispatchReportModel model,int dispatchId) async {
BaseModel baseModel = BaseModel baseModel =
await NetUtil().post(API.manage.repairDispatch, params: { await NetUtil().post(API.manage.repairDispatch, params: {
'dispatchListId': model.dispatchListId, 'dispatchListId': dispatchId,
'workOrderType': model.workOrderTyoe, 'workOrderType': model.workOrderTyoe,
'workOrderTypeDetail': model.workOrderTypeDetail, 'workOrderTypeDetail': model.workOrderTypeDetail,
'workOrderTimeLimit': model.workOrderTimeLimit, 'workOrderTimeLimit': model.workOrderTimeLimit,

Loading…
Cancel
Save