修复了一些问题

hmxc
张萌 4 years ago
parent 89f199c3f2
commit a7bb48424a

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

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

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

@ -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/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/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';
// Package imports:
@ -179,7 +181,8 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
),
),
onPressed: () {
// Get.to(FixMoreTimePage(model: widget.model));
Get.to(FixMoreTimePage(
dispatchId: widget.model.dispatchId));
},
)
: SizedBox(),
@ -187,7 +190,9 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
widget.model.status == 3
? AkuMaterialButton(
onPressed: () {
// Get.to(FixWorkFinishPage(model: widget.model));
Get.to(() => BusinessAndFixDetailPage(
model: widget.model,
));
},
radius: 4.w,
color: AppStyle.primaryColor,
@ -202,7 +207,7 @@ class _BusinessFixCardState extends State<BusinessFixCard> {
),
)
: SizedBox(),
widget.model.status == 2
(widget.model.status == 2) && (!userInfoModel.canSendTicket)
? AkuMaterialButton(
onPressed: () {
// final userProvider =

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

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

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

@ -52,7 +52,7 @@ class _WarningSuccessState extends State<WarningSuccess> {
width: 420.w,
),
Text(
'深圳华悦茂峰',
'人才公寓',
style: TextStyle(
fontSize: 44.w,
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 =
await NetUtil().post(API.manage.repairDispatch, params: {
'dispatchListId': model.dispatchListId,
'dispatchListId': dispatchId,
'workOrderType': model.workOrderTyoe,
'workOrderTypeDetail': model.workOrderTypeDetail,
'workOrderTimeLimit': model.workOrderTimeLimit,

Loading…
Cancel
Save