parent
27fd4e306c
commit
5fa0586230
@ -1,55 +0,0 @@
|
|||||||
// Flutter imports:
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
// Package imports:
|
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
|
|
||||||
// Project imports:
|
|
||||||
import 'package:aku_community_manager/mock_models/decoration/decoration_data.dart';
|
|
||||||
import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
|
||||||
import 'package:aku_community_manager/mock_models/fix/fix_model.dart';
|
|
||||||
import 'package:aku_community_manager/provider/fix_provider.dart';
|
|
||||||
|
|
||||||
@Deprecated('this mock model should be removed')
|
|
||||||
class AllModel {
|
|
||||||
BuildContext context;
|
|
||||||
AllModel(this.context);
|
|
||||||
|
|
||||||
List get allThings {
|
|
||||||
final fixProvider = Provider.of<FixProvider>(context, listen: false);
|
|
||||||
return [
|
|
||||||
...fixProvider.fixModels,
|
|
||||||
...DecorationData.allModels,
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
List get waitThings {
|
|
||||||
final fixProvider = Provider.of<FixProvider>(context, listen: false);
|
|
||||||
return [
|
|
||||||
...fixProvider.fixModels.where((element) {
|
|
||||||
return element.type == FIX_ENUM.WAIT_PICKUP;
|
|
||||||
}).toList(),
|
|
||||||
...DecorationData.getModels(DecorationType.WAIT_HAND_OUT),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
List get processingThings {
|
|
||||||
final fixProvider = Provider.of<FixProvider>(context, listen: false);
|
|
||||||
return [
|
|
||||||
...fixProvider.fixModels.where((element) {
|
|
||||||
return element.type == FIX_ENUM.PROCESSING;
|
|
||||||
}).toList(),
|
|
||||||
...DecorationData.getModels(DecorationType.HAND_OUT),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
List get doneThings {
|
|
||||||
final fixProvider = Provider.of<FixProvider>(context, listen: false);
|
|
||||||
return [
|
|
||||||
...fixProvider.fixModels.where((element) {
|
|
||||||
return element.type == FIX_ENUM.DONE;
|
|
||||||
}).toList(),
|
|
||||||
...DecorationData.getModels(DecorationType.DONE),
|
|
||||||
];
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,95 +0,0 @@
|
|||||||
// Project imports:
|
|
||||||
import 'package:aku_community_manager/const/resource.dart';
|
|
||||||
import 'package:aku_community_manager/mock_models/borrow/borrow_model.dart';
|
|
||||||
|
|
||||||
//TODO CLEAN BOTTOM CODES.
|
|
||||||
@Deprecated("borrow_data need to be cleaned.")
|
|
||||||
class BorrowData {
|
|
||||||
static List<BorrowModel> get checkModels => models.where((e) {
|
|
||||||
return e.borrowGoods.status == BORROW_STATUS.WAIT_CHECK;
|
|
||||||
}).toList();
|
|
||||||
static List<BorrowModel> get borrowModels => models.where((e) {
|
|
||||||
return e.borrowGoods.status == BORROW_STATUS.BORROWING;
|
|
||||||
}).toList();
|
|
||||||
|
|
||||||
static List<BorrowModel> get doneModels => models.where((e) {
|
|
||||||
return e.borrowGoods.status == BORROW_STATUS.DONE;
|
|
||||||
}).toList();
|
|
||||||
|
|
||||||
static List<BorrowModel> models = [
|
|
||||||
BorrowModel(
|
|
||||||
title: '归还梯子一个',
|
|
||||||
borrowPerson: '李慧珍',
|
|
||||||
borrowTime: 5,
|
|
||||||
goodsStatus: GOODS_STATUS.BROKEN,
|
|
||||||
phone: '19981712931',
|
|
||||||
borrowGoods: SingleBorrowGoods(
|
|
||||||
name: '梯子',
|
|
||||||
assetpath: R.ASSETS_STATIC_TEMP_LADDER_PNG,
|
|
||||||
code: '3193713894',
|
|
||||||
status: BORROW_STATUS.WAIT_CHECK,
|
|
||||||
),
|
|
||||||
date: DateTime(2020, 5, 5, 12, 35, 45),
|
|
||||||
),
|
|
||||||
BorrowModel(
|
|
||||||
title: '归还梯子一个',
|
|
||||||
borrowPerson: '李慧珍',
|
|
||||||
borrowTime: 5,
|
|
||||||
goodsStatus: GOODS_STATUS.BROKEN,
|
|
||||||
phone: '19981712931',
|
|
||||||
borrowGoods: SingleBorrowGoods(
|
|
||||||
name: '梯子',
|
|
||||||
assetpath: R.ASSETS_STATIC_TEMP_LADDER_PNG,
|
|
||||||
code: '3193713894',
|
|
||||||
status: BORROW_STATUS.DONE,
|
|
||||||
),
|
|
||||||
date: DateTime(2020, 5, 5, 12, 35, 45),
|
|
||||||
),
|
|
||||||
BorrowModel(
|
|
||||||
title: '借用电钻一把',
|
|
||||||
borrowPerson: '刘虎门',
|
|
||||||
borrowTime: 12,
|
|
||||||
goodsStatus: GOODS_STATUS.NORMAL,
|
|
||||||
phone: '19981738879',
|
|
||||||
borrowGoods: SingleBorrowGoods(
|
|
||||||
name: '电钻',
|
|
||||||
assetpath: R.ASSETS_STATIC_TEMP_DRILL_PNG,
|
|
||||||
code: '31937293841',
|
|
||||||
status: BORROW_STATUS.BORROWING,
|
|
||||||
),
|
|
||||||
date: DateTime(2020, 4, 5, 12, 35, 45),
|
|
||||||
),
|
|
||||||
BorrowModel(
|
|
||||||
borrowPerson: '刘海保',
|
|
||||||
borrowTime: 5,
|
|
||||||
title: '借用榔头一把',
|
|
||||||
goodsStatus: GOODS_STATUS.NORMAL,
|
|
||||||
phone: '19981738879',
|
|
||||||
borrowGoods: SingleBorrowGoods(
|
|
||||||
name: '榔头',
|
|
||||||
assetpath: R.ASSETS_STATIC_TEMP_HAMMER_PNG,
|
|
||||||
code: '3193794102481',
|
|
||||||
status: BORROW_STATUS.BORROWING,
|
|
||||||
),
|
|
||||||
date: DateTime(2020, 3, 5, 12, 35, 45),
|
|
||||||
),
|
|
||||||
];
|
|
||||||
|
|
||||||
static List<BorrowObject> borrowObjects = [
|
|
||||||
BorrowObject.init(
|
|
||||||
name: '电钻',
|
|
||||||
assetPath: R.ASSETS_STATIC_TEMP_DRILL_PNG,
|
|
||||||
allNumber: 5,
|
|
||||||
),
|
|
||||||
BorrowObject.init(
|
|
||||||
name: '梯子',
|
|
||||||
assetPath: R.ASSETS_STATIC_TEMP_LADDER_PNG,
|
|
||||||
allNumber: 3,
|
|
||||||
),
|
|
||||||
BorrowObject.init(
|
|
||||||
name: '三角榔头',
|
|
||||||
assetPath: R.ASSETS_STATIC_TEMP_HAMMER_PNG,
|
|
||||||
allNumber: 8,
|
|
||||||
),
|
|
||||||
];
|
|
||||||
}
|
|
@ -1,92 +0,0 @@
|
|||||||
// Dart imports:
|
|
||||||
import 'dart:math';
|
|
||||||
|
|
||||||
// Package imports:
|
|
||||||
import 'package:meta/meta.dart';
|
|
||||||
|
|
||||||
enum BORROW_STATUS {
|
|
||||||
///出借中
|
|
||||||
BORROWING,
|
|
||||||
|
|
||||||
///待检查
|
|
||||||
WAIT_CHECK,
|
|
||||||
|
|
||||||
///未出借
|
|
||||||
NOT_BORROW,
|
|
||||||
|
|
||||||
///已归还
|
|
||||||
DONE,
|
|
||||||
}
|
|
||||||
|
|
||||||
enum GOODS_STATUS {
|
|
||||||
NORMAL,
|
|
||||||
BROKEN,
|
|
||||||
LOST,
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO CLEAN BOTTOM CODES.
|
|
||||||
@Deprecated(" borrow_model need to be cleaned.")
|
|
||||||
class BorrowModel {
|
|
||||||
String borrowPerson;
|
|
||||||
String phone;
|
|
||||||
int borrowTime;
|
|
||||||
GOODS_STATUS goodsStatus;
|
|
||||||
String title;
|
|
||||||
SingleBorrowGoods borrowGoods;
|
|
||||||
DateTime date;
|
|
||||||
|
|
||||||
BorrowModel({
|
|
||||||
@required this.borrowPerson,
|
|
||||||
@required this.phone,
|
|
||||||
@required this.borrowTime,
|
|
||||||
@required this.goodsStatus,
|
|
||||||
@required this.borrowGoods,
|
|
||||||
@required this.title,
|
|
||||||
@required this.date,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
class BorrowObject {
|
|
||||||
String name;
|
|
||||||
int allNumber;
|
|
||||||
dynamic assetPath;
|
|
||||||
int borrowNumber;
|
|
||||||
int get restNumber => allNumber - borrowNumber;
|
|
||||||
List<SingleBorrowGoods> items;
|
|
||||||
|
|
||||||
BorrowObject.init({
|
|
||||||
this.name,
|
|
||||||
this.allNumber,
|
|
||||||
this.assetPath,
|
|
||||||
}) {
|
|
||||||
this.borrowNumber = 0;
|
|
||||||
items = List.generate(
|
|
||||||
this.allNumber,
|
|
||||||
(index) => SingleBorrowGoods(
|
|
||||||
name: '${this.name}${index + 1}',
|
|
||||||
code: (179264234 + Random().nextInt(999999)).toString(),
|
|
||||||
status: BORROW_STATUS.NOT_BORROW,
|
|
||||||
assetpath: this.assetPath,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class SingleBorrowGoods {
|
|
||||||
String name;
|
|
||||||
String code;
|
|
||||||
dynamic assetpath;
|
|
||||||
BORROW_STATUS status;
|
|
||||||
String get borrowValue => {
|
|
||||||
BORROW_STATUS.BORROWING: '出借中',
|
|
||||||
BORROW_STATUS.DONE: '已归还',
|
|
||||||
BORROW_STATUS.NOT_BORROW: '未出借',
|
|
||||||
BORROW_STATUS.WAIT_CHECK: '待检查',
|
|
||||||
}[status];
|
|
||||||
SingleBorrowGoods({
|
|
||||||
this.name,
|
|
||||||
this.code,
|
|
||||||
this.assetpath,
|
|
||||||
this.status,
|
|
||||||
});
|
|
||||||
}
|
|
@ -1,230 +0,0 @@
|
|||||||
// Project imports:
|
|
||||||
import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
|
||||||
import 'package:aku_community_manager/mock_models/fix/fixer_model.dart';
|
|
||||||
|
|
||||||
@Deprecated('this should be removed')
|
|
||||||
class DecorationData {
|
|
||||||
static List<DecorationModel> allModels = [
|
|
||||||
DecorationModel(
|
|
||||||
type: DecorationType.WAIT_HAND_OUT,
|
|
||||||
statusType: DecorationStatusType.PROGRESS,
|
|
||||||
decorationDate: DateTime(2020, 1, 23, 12, 23, 0),
|
|
||||||
userHomeModel: UserHomeModel(
|
|
||||||
userName: '林居明',
|
|
||||||
plot: '深圳华茂悦峰',
|
|
||||||
detailAddr: '2幢-2单元-501室',
|
|
||||||
phone: '19995430126',
|
|
||||||
),
|
|
||||||
decorationTeamModel: DecorationTeamModel(
|
|
||||||
name: '深圳莫川装修有限公司',
|
|
||||||
userName: '李惠政',
|
|
||||||
phone: '19298540192',
|
|
||||||
),
|
|
||||||
cycleCheck: CycleCheck(),
|
|
||||||
),
|
|
||||||
DecorationModel(
|
|
||||||
decorationDate: DateTime(2020, 1, 23, 12, 23, 0),
|
|
||||||
type: DecorationType.HAND_OUT,
|
|
||||||
statusType: DecorationStatusType.DONE,
|
|
||||||
userHomeModel: UserHomeModel(
|
|
||||||
userName: '李慧珍',
|
|
||||||
plot: '深圳华茂悦峰',
|
|
||||||
detailAddr: '1幢-1单元-302室',
|
|
||||||
phone: '18201939840',
|
|
||||||
),
|
|
||||||
decorationTeamModel: DecorationTeamModel(
|
|
||||||
name: '深圳莫川装修有限公司',
|
|
||||||
userName: '李惠政',
|
|
||||||
phone: '19298540192',
|
|
||||||
),
|
|
||||||
cycleCheck: CycleCheck(
|
|
||||||
authPerson: FixerModel(name: '林鸿章', phone: '18294859301'),
|
|
||||||
startDate: DateTime(2020, 1, 23, 20, 23, 0),
|
|
||||||
checkCycle: 7,
|
|
||||||
checkDetails: [
|
|
||||||
CHECK_TYPE.ELECTRIC,
|
|
||||||
CHECK_TYPE.WATER,
|
|
||||||
CHECK_TYPE.WALL,
|
|
||||||
CHECK_TYPE.DOOR_AND_WINDOWS,
|
|
||||||
],
|
|
||||||
),
|
|
||||||
workFinishCheck: WorkFinishCheck(
|
|
||||||
authPerson: FixerModel(name: '林鸿章', phone: '18294859301'),
|
|
||||||
startDate: DateTime(2020, 1, 23, 20, 23, 0),
|
|
||||||
checkDetails: [
|
|
||||||
CHECK_TYPE.ELECTRIC,
|
|
||||||
CHECK_TYPE.WATER,
|
|
||||||
CHECK_TYPE.WALL,
|
|
||||||
CHECK_TYPE.DOOR_AND_WINDOWS,
|
|
||||||
CHECK_TYPE.SECURITY,
|
|
||||||
],
|
|
||||||
),
|
|
||||||
checkInfomations: [
|
|
||||||
CheckInfomation(
|
|
||||||
checkDate: DateTime(2020, 3, 20, 12, 00),
|
|
||||||
info: '正常',
|
|
||||||
checkType: '完工检查',
|
|
||||||
details: [
|
|
||||||
CheckDetail(type: CHECK_TYPE.ELECTRIC),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WATER),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WALL),
|
|
||||||
CheckDetail(type: CHECK_TYPE.DOOR_AND_WINDOWS),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
CheckInfomation(
|
|
||||||
checkDate: DateTime(2020, 2, 14, 12, 00),
|
|
||||||
info: '正常',
|
|
||||||
checkType: '周期检查',
|
|
||||||
details: [
|
|
||||||
CheckDetail(type: CHECK_TYPE.ELECTRIC),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WATER),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WALL),
|
|
||||||
CheckDetail(type: CHECK_TYPE.DOOR_AND_WINDOWS),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
CheckInfomation(
|
|
||||||
checkDate: DateTime(2020, 2, 7, 12, 00),
|
|
||||||
info: '厨房水路异常',
|
|
||||||
checkType: '周期检查',
|
|
||||||
details: [
|
|
||||||
CheckDetail(type: CHECK_TYPE.ELECTRIC),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WATER, status: false),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WALL),
|
|
||||||
CheckDetail(type: CHECK_TYPE.DOOR_AND_WINDOWS),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
CheckInfomation(
|
|
||||||
checkDate: DateTime(2020, 1, 30, 12, 00),
|
|
||||||
info: '正常',
|
|
||||||
checkType: '周期检查',
|
|
||||||
details: [
|
|
||||||
CheckDetail(type: CHECK_TYPE.ELECTRIC),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WATER),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WALL),
|
|
||||||
CheckDetail(type: CHECK_TYPE.DOOR_AND_WINDOWS),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
CheckInfomation(
|
|
||||||
checkDate: DateTime(2020, 1, 23, 12, 00),
|
|
||||||
info: '正常',
|
|
||||||
checkType: '周期检查',
|
|
||||||
details: [
|
|
||||||
CheckDetail(type: CHECK_TYPE.ELECTRIC),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WATER),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WALL),
|
|
||||||
CheckDetail(type: CHECK_TYPE.DOOR_AND_WINDOWS),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
DecorationModel(
|
|
||||||
decorationDate: DateTime(2020, 1, 23, 12, 23, 0),
|
|
||||||
type: DecorationType.DONE,
|
|
||||||
statusType: DecorationStatusType.DONE,
|
|
||||||
userHomeModel: UserHomeModel(
|
|
||||||
userName: '李慧珍',
|
|
||||||
plot: '深圳华茂悦峰',
|
|
||||||
detailAddr: '1幢-1单元-302室',
|
|
||||||
phone: '18201939840',
|
|
||||||
),
|
|
||||||
decorationTeamModel: DecorationTeamModel(
|
|
||||||
name: '深圳莫川装修有限公司',
|
|
||||||
userName: '李惠政',
|
|
||||||
phone: '19298540192',
|
|
||||||
),
|
|
||||||
cycleCheck: CycleCheck(
|
|
||||||
authPerson: FixerModel(name: '林鸿章', phone: '18294859301'),
|
|
||||||
startDate: DateTime(2020, 1, 23, 20, 23, 0),
|
|
||||||
checkCycle: 7,
|
|
||||||
checkDetails: [
|
|
||||||
CHECK_TYPE.ELECTRIC,
|
|
||||||
CHECK_TYPE.WATER,
|
|
||||||
CHECK_TYPE.WALL,
|
|
||||||
CHECK_TYPE.DOOR_AND_WINDOWS,
|
|
||||||
],
|
|
||||||
),
|
|
||||||
workFinishCheck: WorkFinishCheck(
|
|
||||||
authPerson: FixerModel(name: '林鸿章', phone: '18294859301'),
|
|
||||||
startDate: DateTime(2020, 1, 23, 20, 23, 0),
|
|
||||||
checkDetails: [
|
|
||||||
CHECK_TYPE.ELECTRIC,
|
|
||||||
CHECK_TYPE.WATER,
|
|
||||||
CHECK_TYPE.WALL,
|
|
||||||
CHECK_TYPE.DOOR_AND_WINDOWS,
|
|
||||||
CHECK_TYPE.SECURITY,
|
|
||||||
],
|
|
||||||
),
|
|
||||||
checkInfomations: [
|
|
||||||
CheckInfomation(
|
|
||||||
checkDate: DateTime(2020, 3, 20, 12, 00),
|
|
||||||
info: '正常',
|
|
||||||
checkType: '完工检查',
|
|
||||||
details: [
|
|
||||||
CheckDetail(type: CHECK_TYPE.ELECTRIC),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WATER),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WALL),
|
|
||||||
CheckDetail(type: CHECK_TYPE.DOOR_AND_WINDOWS),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
CheckInfomation(
|
|
||||||
checkDate: DateTime(2020, 2, 14, 12, 00),
|
|
||||||
info: '正常',
|
|
||||||
checkType: '周期检查',
|
|
||||||
details: [
|
|
||||||
CheckDetail(type: CHECK_TYPE.ELECTRIC),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WATER),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WALL),
|
|
||||||
CheckDetail(type: CHECK_TYPE.DOOR_AND_WINDOWS),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
CheckInfomation(
|
|
||||||
checkDate: DateTime(2020, 2, 7, 12, 00),
|
|
||||||
info: '厨房水路异常',
|
|
||||||
checkType: '周期检查',
|
|
||||||
details: [
|
|
||||||
CheckDetail(type: CHECK_TYPE.ELECTRIC),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WATER, status: false),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WALL),
|
|
||||||
CheckDetail(type: CHECK_TYPE.DOOR_AND_WINDOWS),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
CheckInfomation(
|
|
||||||
checkDate: DateTime(2020, 1, 30, 12, 00),
|
|
||||||
info: '正常',
|
|
||||||
checkType: '周期检查',
|
|
||||||
details: [
|
|
||||||
CheckDetail(type: CHECK_TYPE.ELECTRIC),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WATER),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WALL),
|
|
||||||
CheckDetail(type: CHECK_TYPE.DOOR_AND_WINDOWS),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
CheckInfomation(
|
|
||||||
checkDate: DateTime(2020, 1, 23, 12, 00),
|
|
||||||
info: '正常',
|
|
||||||
checkType: '周期检查',
|
|
||||||
details: [
|
|
||||||
CheckDetail(type: CHECK_TYPE.ELECTRIC),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WATER),
|
|
||||||
CheckDetail(type: CHECK_TYPE.WALL),
|
|
||||||
CheckDetail(type: CHECK_TYPE.DOOR_AND_WINDOWS),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
];
|
|
||||||
|
|
||||||
static List<DecorationModel> getModels(DecorationType type) {
|
|
||||||
return allModels.where((element) => element.type == type).toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<DecorationModel> getTypeModels(DecorationStatusType type) {
|
|
||||||
return allModels.where((element) => element.statusType == type).toList();
|
|
||||||
}
|
|
||||||
|
|
||||||
static List<DecorationModel> get allPropertyModels {
|
|
||||||
return allModels
|
|
||||||
.where((element) => element.type != DecorationType.WAIT_HAND_OUT)
|
|
||||||
.toList();
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,186 +1,185 @@
|
|||||||
// Flutter imports:
|
// // Flutter imports:
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// Project imports:
|
// // Project imports:
|
||||||
import 'package:aku_community_manager/const/resource.dart';
|
// import 'package:aku_community_manager/const/resource.dart';
|
||||||
import 'package:aku_community_manager/mock_models/fix/fixer_model.dart';
|
|
||||||
|
// enum DecorationType {
|
||||||
enum DecorationType {
|
// ///待指派
|
||||||
///待指派
|
// WAIT_HAND_OUT,
|
||||||
WAIT_HAND_OUT,
|
|
||||||
|
// ///已指派&待执行
|
||||||
///已指派&待执行
|
// HAND_OUT,
|
||||||
HAND_OUT,
|
|
||||||
|
// ///已执行
|
||||||
///已执行
|
// DONE,
|
||||||
DONE,
|
// }
|
||||||
}
|
|
||||||
|
// enum DecorationStatusType {
|
||||||
enum DecorationStatusType {
|
// PROGRESS,
|
||||||
PROGRESS,
|
// DONE,
|
||||||
DONE,
|
// }
|
||||||
}
|
|
||||||
|
// enum CHECK_TYPE {
|
||||||
enum CHECK_TYPE {
|
// ELECTRIC,
|
||||||
ELECTRIC,
|
// WATER,
|
||||||
WATER,
|
// WALL,
|
||||||
WALL,
|
// DOOR_AND_WINDOWS,
|
||||||
DOOR_AND_WINDOWS,
|
// SECURITY,
|
||||||
SECURITY,
|
// }
|
||||||
}
|
|
||||||
|
// Map<CHECK_TYPE, String> checkTypeMap = {
|
||||||
Map<CHECK_TYPE, String> checkTypeMap = {
|
// CHECK_TYPE.ELECTRIC: '电路',
|
||||||
CHECK_TYPE.ELECTRIC: '电路',
|
// CHECK_TYPE.WATER: '水路',
|
||||||
CHECK_TYPE.WATER: '水路',
|
// CHECK_TYPE.WALL: '墙面',
|
||||||
CHECK_TYPE.WALL: '墙面',
|
// CHECK_TYPE.DOOR_AND_WINDOWS: '门窗',
|
||||||
CHECK_TYPE.DOOR_AND_WINDOWS: '门窗',
|
// CHECK_TYPE.SECURITY: '安防',
|
||||||
CHECK_TYPE.SECURITY: '安防',
|
// };
|
||||||
};
|
|
||||||
|
// Map<String, CHECK_TYPE> checkTypeStringMap = {
|
||||||
Map<String, CHECK_TYPE> checkTypeStringMap = {
|
// '电路': CHECK_TYPE.ELECTRIC,
|
||||||
'电路': CHECK_TYPE.ELECTRIC,
|
// '水路': CHECK_TYPE.WATER,
|
||||||
'水路': CHECK_TYPE.WATER,
|
// '墙面': CHECK_TYPE.WALL,
|
||||||
'墙面': CHECK_TYPE.WALL,
|
// '门窗': CHECK_TYPE.DOOR_AND_WINDOWS,
|
||||||
'门窗': CHECK_TYPE.DOOR_AND_WINDOWS,
|
// '安防': CHECK_TYPE.SECURITY,
|
||||||
'安防': CHECK_TYPE.SECURITY,
|
// };
|
||||||
};
|
|
||||||
|
// Map<CHECK_TYPE, String> checkAssetMap = {
|
||||||
Map<CHECK_TYPE, String> checkAssetMap = {
|
// CHECK_TYPE.ELECTRIC: R.ASSETS_MANAGE_CIRCUIT_PNG,
|
||||||
CHECK_TYPE.ELECTRIC: R.ASSETS_MANAGE_CIRCUIT_PNG,
|
// CHECK_TYPE.WATER: R.ASSETS_MANAGE_WATERWAY_PNG,
|
||||||
CHECK_TYPE.WATER: R.ASSETS_MANAGE_WATERWAY_PNG,
|
// CHECK_TYPE.WALL: R.ASSETS_MANAGE_WALL_PNG,
|
||||||
CHECK_TYPE.WALL: R.ASSETS_MANAGE_WALL_PNG,
|
// CHECK_TYPE.DOOR_AND_WINDOWS: R.ASSETS_MANAGE_WINDOW_PNG,
|
||||||
CHECK_TYPE.DOOR_AND_WINDOWS: R.ASSETS_MANAGE_WINDOW_PNG,
|
// CHECK_TYPE.SECURITY: R.ASSETS_MANAGE_SECURITY_PNG,
|
||||||
CHECK_TYPE.SECURITY: R.ASSETS_MANAGE_SECURITY_PNG,
|
// };
|
||||||
};
|
|
||||||
|
// @Deprecated('under should be removed')
|
||||||
@Deprecated('under should be removed')
|
// class DecorationModel {
|
||||||
class DecorationModel {
|
// DecorationType type;
|
||||||
DecorationType type;
|
// DecorationStatusType statusType;
|
||||||
DecorationStatusType statusType;
|
// DateTime decorationDate;
|
||||||
DateTime decorationDate;
|
// UserHomeModel userHomeModel;
|
||||||
UserHomeModel userHomeModel;
|
// DecorationTeamModel decorationTeamModel;
|
||||||
DecorationTeamModel decorationTeamModel;
|
// CycleCheck cycleCheck;
|
||||||
CycleCheck cycleCheck;
|
// WorkFinishCheck workFinishCheck;
|
||||||
WorkFinishCheck workFinishCheck;
|
// List<CheckInfomation> checkInfomations;
|
||||||
List<CheckInfomation> checkInfomations;
|
|
||||||
|
// String get statusTypeValue {
|
||||||
String get statusTypeValue {
|
// if (statusType == DecorationStatusType.PROGRESS)
|
||||||
if (statusType == DecorationStatusType.PROGRESS)
|
// return '装修中';
|
||||||
return '装修中';
|
// else
|
||||||
else
|
// return '装修完成';
|
||||||
return '装修完成';
|
// }
|
||||||
}
|
|
||||||
|
// DecorationModel({
|
||||||
DecorationModel({
|
// @required this.type,
|
||||||
@required this.type,
|
// @required this.statusType,
|
||||||
@required this.statusType,
|
// @required this.userHomeModel,
|
||||||
@required this.userHomeModel,
|
// @required this.decorationTeamModel,
|
||||||
@required this.decorationTeamModel,
|
// @required this.decorationDate,
|
||||||
@required this.decorationDate,
|
// this.cycleCheck,
|
||||||
this.cycleCheck,
|
// this.workFinishCheck,
|
||||||
this.workFinishCheck,
|
// this.checkInfomations,
|
||||||
this.checkInfomations,
|
// });
|
||||||
});
|
// }
|
||||||
}
|
|
||||||
|
// @Deprecated('under should be removed')
|
||||||
@Deprecated('under should be removed')
|
|
||||||
|
// ///用户家庭信息
|
||||||
///用户家庭信息
|
// class UserHomeModel {
|
||||||
class UserHomeModel {
|
// String plot;
|
||||||
String plot;
|
// String detailAddr;
|
||||||
String detailAddr;
|
// String userName;
|
||||||
String userName;
|
// String phone;
|
||||||
String phone;
|
// UserHomeModel({
|
||||||
UserHomeModel({
|
// this.plot,
|
||||||
this.plot,
|
// this.detailAddr,
|
||||||
this.detailAddr,
|
// this.userName,
|
||||||
this.userName,
|
// this.phone,
|
||||||
this.phone,
|
// });
|
||||||
});
|
// }
|
||||||
}
|
|
||||||
|
// @Deprecated('under should be removed')
|
||||||
@Deprecated('under should be removed')
|
|
||||||
|
// ///装修队伍信息
|
||||||
///装修队伍信息
|
// class DecorationTeamModel {
|
||||||
class DecorationTeamModel {
|
// String name;
|
||||||
String name;
|
// String userName;
|
||||||
String userName;
|
// String phone;
|
||||||
String phone;
|
// DecorationTeamModel({
|
||||||
DecorationTeamModel({
|
// this.name,
|
||||||
this.name,
|
// this.userName,
|
||||||
this.userName,
|
// this.phone,
|
||||||
this.phone,
|
// });
|
||||||
});
|
// }
|
||||||
}
|
|
||||||
|
// @Deprecated('under should be removed')
|
||||||
@Deprecated('under should be removed')
|
|
||||||
|
// ///周期检查
|
||||||
///周期检查
|
// class CycleCheck {
|
||||||
class CycleCheck {
|
// FixerModel authPerson;
|
||||||
FixerModel authPerson;
|
// DateTime startDate;
|
||||||
DateTime startDate;
|
|
||||||
|
// ///check cycle in days
|
||||||
///check cycle in days
|
// int checkCycle;
|
||||||
int checkCycle;
|
// List<CHECK_TYPE> checkDetails = [
|
||||||
List<CHECK_TYPE> checkDetails = [
|
// CHECK_TYPE.ELECTRIC,
|
||||||
CHECK_TYPE.ELECTRIC,
|
// CHECK_TYPE.WATER,
|
||||||
CHECK_TYPE.WATER,
|
// CHECK_TYPE.WALL,
|
||||||
CHECK_TYPE.WALL,
|
// CHECK_TYPE.DOOR_AND_WINDOWS,
|
||||||
CHECK_TYPE.DOOR_AND_WINDOWS,
|
// CHECK_TYPE.SECURITY,
|
||||||
CHECK_TYPE.SECURITY,
|
// ];
|
||||||
];
|
// CycleCheck({
|
||||||
CycleCheck({
|
// this.authPerson,
|
||||||
this.authPerson,
|
// this.startDate,
|
||||||
this.startDate,
|
// this.checkCycle,
|
||||||
this.checkCycle,
|
// this.checkDetails,
|
||||||
this.checkDetails,
|
// });
|
||||||
});
|
// }
|
||||||
}
|
|
||||||
|
// @Deprecated('under should be removed')
|
||||||
@Deprecated('under should be removed')
|
// class WorkFinishCheck {
|
||||||
class WorkFinishCheck {
|
// FixerModel authPerson;
|
||||||
FixerModel authPerson;
|
// DateTime startDate;
|
||||||
DateTime startDate;
|
// List<CHECK_TYPE> checkDetails;
|
||||||
List<CHECK_TYPE> checkDetails;
|
// WorkFinishCheck({
|
||||||
WorkFinishCheck({
|
// this.authPerson,
|
||||||
this.authPerson,
|
// this.startDate,
|
||||||
this.startDate,
|
// this.checkDetails,
|
||||||
this.checkDetails,
|
// });
|
||||||
});
|
// }
|
||||||
}
|
|
||||||
|
// @Deprecated('under should be removed')
|
||||||
@Deprecated('under should be removed')
|
|
||||||
|
// ///周期检查细节
|
||||||
///周期检查细节
|
// class CheckInfomation {
|
||||||
class CheckInfomation {
|
// DateTime checkDate;
|
||||||
DateTime checkDate;
|
// List<CheckDetail> details;
|
||||||
List<CheckDetail> details;
|
// String info;
|
||||||
String info;
|
// String checkType;
|
||||||
String checkType;
|
// CheckInfomation({
|
||||||
CheckInfomation({
|
// this.checkDate,
|
||||||
this.checkDate,
|
// this.info,
|
||||||
this.info,
|
// this.details,
|
||||||
this.details,
|
// this.checkType,
|
||||||
this.checkType,
|
// });
|
||||||
});
|
|
||||||
|
// ///检查结果
|
||||||
///检查结果
|
// bool get checkAllResult {
|
||||||
bool get checkAllResult {
|
// for (var item in details) {
|
||||||
for (var item in details) {
|
// if (!item.status) return false;
|
||||||
if (!item.status) return false;
|
// }
|
||||||
}
|
// return true;
|
||||||
return true;
|
// }
|
||||||
}
|
// }
|
||||||
}
|
|
||||||
|
// @Deprecated('under should be removed')
|
||||||
@Deprecated('under should be removed')
|
// class CheckDetail {
|
||||||
class CheckDetail {
|
// CHECK_TYPE type;
|
||||||
CHECK_TYPE type;
|
// bool status;
|
||||||
bool status;
|
// String get assetpath => checkAssetMap[type];
|
||||||
String get assetpath => checkAssetMap[type];
|
// CheckDetail({
|
||||||
CheckDetail({
|
// @required this.type,
|
||||||
@required this.type,
|
// this.status = true,
|
||||||
this.status = true,
|
// });
|
||||||
});
|
// String get typeValue => checkTypeMap[type];
|
||||||
String get typeValue => checkTypeMap[type];
|
// }
|
||||||
}
|
|
||||||
|
@ -1,71 +0,0 @@
|
|||||||
// Flutter imports:
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
// Package imports:
|
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
|
|
||||||
// Project imports:
|
|
||||||
import 'package:aku_community_manager/mock_models/fix/fix_model.dart';
|
|
||||||
import 'package:aku_community_manager/mock_models/fix/fixer_model.dart';
|
|
||||||
import 'package:aku_community_manager/mock_models/users/user_info_model.dart';
|
|
||||||
import 'package:aku_community_manager/provider/user_provider.dart';
|
|
||||||
|
|
||||||
//TODO CLEAN BOTTOM CODES.
|
|
||||||
@Deprecated("fix_provider need to be cleaned.")
|
|
||||||
class FixProvider extends ChangeNotifier {
|
|
||||||
List<FixModel> _fixModels = FixModel.initList();
|
|
||||||
List<FixModel> get fixModels => _fixModels;
|
|
||||||
addFixModel(FixModel model) {
|
|
||||||
_fixModels.insert(0, model);
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
List<FixModel> getFixModel(int index, BuildContext context) {
|
|
||||||
final userProvider = Provider.of<UserProvider>(context, listen: false);
|
|
||||||
USER_ROLE role = userProvider.userInfoModel.role;
|
|
||||||
List<FixModel> _doneModels =
|
|
||||||
_fixModels.where((element) => element.type == FIX_ENUM.DONE).toList();
|
|
||||||
|
|
||||||
List<FixModel> _processingModels = _fixModels
|
|
||||||
.where((element) => element.type == FIX_ENUM.PROCESSING)
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
List<FixModel> _handOutModels = _fixModels
|
|
||||||
.where((element) => element.type == FIX_ENUM.HAND_OUT)
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
List<FixModel> _waitPickUpModels = _fixModels
|
|
||||||
.where((element) => element.type == FIX_ENUM.WAIT_PICKUP)
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
List<FixModel> _fixerModels = _fixModels
|
|
||||||
.where((element) => element.type != FIX_ENUM.HAND_OUT)
|
|
||||||
.toList();
|
|
||||||
|
|
||||||
switch (role) {
|
|
||||||
case USER_ROLE.MANAGER:
|
|
||||||
return [
|
|
||||||
_handOutModels,
|
|
||||||
_waitPickUpModels,
|
|
||||||
_processingModels,
|
|
||||||
_doneModels,
|
|
||||||
_fixModels,
|
|
||||||
][index];
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
return [
|
|
||||||
_waitPickUpModels,
|
|
||||||
_processingModels,
|
|
||||||
_doneModels,
|
|
||||||
_fixerModels,
|
|
||||||
][index];
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
List<FixerTypedModel> _fixerModels = FixerTypedModel.models;
|
|
||||||
List<FixerTypedModel> _propertyModels = FixerTypedModel.propertyModels;
|
|
||||||
List<FixerTypedModel> get fixerModels => _fixerModels;
|
|
||||||
List<FixerTypedModel> get propertyModels => _propertyModels;
|
|
||||||
}
|
|
@ -1,20 +0,0 @@
|
|||||||
// Flutter imports:
|
|
||||||
import 'package:flutter/material.dart';
|
|
||||||
|
|
||||||
// Project imports:
|
|
||||||
import 'package:aku_community_manager/mock_models/manage_models/manage_model.dart';
|
|
||||||
|
|
||||||
class GreenManageProvider extends ChangeNotifier {
|
|
||||||
List<GreenManageCardModel> _greenManageModel =
|
|
||||||
GreenManageCardModel.initList();
|
|
||||||
List<GreenManageCardModel> get greenManageModels => _greenManageModel;
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
class InspectionManageProvider extends ChangeNotifier {
|
|
||||||
List<InspectionManageCardModel> _inspectionManageModel =
|
|
||||||
InspectionManageCardModel.initList();
|
|
||||||
List<InspectionManageCardModel> get inspectionManageModels =>
|
|
||||||
_inspectionManageModel;
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
@ -1,50 +1,49 @@
|
|||||||
// Flutter imports:
|
// // Flutter imports:
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// Project imports:
|
// // Project imports:
|
||||||
import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
// import 'package:aku_community_manager/style/app_style.dart';
|
||||||
import 'package:aku_community_manager/style/app_style.dart';
|
// import 'package:aku_community_manager/tools/screen_tool.dart';
|
||||||
import 'package:aku_community_manager/tools/screen_tool.dart';
|
// import 'package:aku_community_manager/tools/widget_tool.dart';
|
||||||
import 'package:aku_community_manager/tools/widget_tool.dart';
|
|
||||||
|
|
||||||
class DecorationCheckCardWidget extends StatelessWidget {
|
// class DecorationCheckCardWidget extends StatelessWidget {
|
||||||
final CHECK_TYPE type;
|
// final CHECK_TYPE type;
|
||||||
final bool checked;
|
// final bool checked;
|
||||||
const DecorationCheckCardWidget(
|
// const DecorationCheckCardWidget(
|
||||||
{Key key, @required this.type, this.checked = false})
|
// {Key key, @required this.type, this.checked = false})
|
||||||
: super(key: key);
|
// : super(key: key);
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return Container(
|
// return Container(
|
||||||
height: 160.w,
|
// height: 160.w,
|
||||||
width: 124.w,
|
// width: 124.w,
|
||||||
child: Column(
|
// child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
// mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
// children: [
|
||||||
Image.asset(
|
// Image.asset(
|
||||||
checkAssetMap[type],
|
// checkAssetMap[type],
|
||||||
height: 56.w,
|
// height: 56.w,
|
||||||
width: 56.w,
|
// width: 56.w,
|
||||||
),
|
// ),
|
||||||
AkuBox.h(4),
|
// AkuBox.h(4),
|
||||||
Text(
|
// Text(
|
||||||
checkTypeMap[type],
|
// checkTypeMap[type],
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: AppStyle.primaryTextColor,
|
// color: AppStyle.primaryTextColor,
|
||||||
fontSize: 24.sp,
|
// fontSize: 24.sp,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
border: Border.all(
|
// border: Border.all(
|
||||||
color: checked ? AppStyle.primaryTextColor : Color(0xFFE8E8E8),
|
// color: checked ? AppStyle.primaryTextColor : Color(0xFFE8E8E8),
|
||||||
width: 3.w,
|
// width: 3.w,
|
||||||
),
|
// ),
|
||||||
borderRadius: BorderRadius.circular(8.w),
|
// borderRadius: BorderRadius.circular(8.w),
|
||||||
color: checked ? Color(0xFFFFF3CC) : Colors.white,
|
// color: checked ? Color(0xFFFFF3CC) : Colors.white,
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
@ -1,70 +1,70 @@
|
|||||||
// Flutter imports:
|
// // Flutter imports:
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// Project imports:
|
// // Project imports:
|
||||||
import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
// import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
||||||
import 'package:aku_community_manager/tools/screen_tool.dart';
|
// import 'package:aku_community_manager/tools/screen_tool.dart';
|
||||||
import 'package:aku_community_manager/tools/widget_tool.dart';
|
// import 'package:aku_community_manager/tools/widget_tool.dart';
|
||||||
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_check_card_widget.dart';
|
// import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_check_card_widget.dart';
|
||||||
|
|
||||||
class DecorationCheckRow extends StatefulWidget {
|
// class DecorationCheckRow extends StatefulWidget {
|
||||||
final List<CHECK_TYPE> details;
|
// final List<CHECK_TYPE> details;
|
||||||
final Function(List<CHECK_TYPE> details) onChange;
|
// final Function(List<CHECK_TYPE> details) onChange;
|
||||||
final bool canTap;
|
// final bool canTap;
|
||||||
DecorationCheckRow(
|
// DecorationCheckRow(
|
||||||
{Key key, @required this.details, this.onChange, this.canTap = false})
|
// {Key key, @required this.details, this.onChange, this.canTap = false})
|
||||||
: super(key: key);
|
// : super(key: key);
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
_DecorationCheckRowState createState() => _DecorationCheckRowState();
|
// _DecorationCheckRowState createState() => _DecorationCheckRowState();
|
||||||
}
|
// }
|
||||||
|
|
||||||
class _DecorationCheckRowState extends State<DecorationCheckRow> {
|
// class _DecorationCheckRowState extends State<DecorationCheckRow> {
|
||||||
List<CHECK_TYPE> _tempCheckDetails = [];
|
// List<CHECK_TYPE> _tempCheckDetails = [];
|
||||||
List<CHECK_TYPE> _checkedDetails = [];
|
// List<CHECK_TYPE> _checkedDetails = [];
|
||||||
@override
|
// @override
|
||||||
void initState() {
|
// void initState() {
|
||||||
super.initState();
|
// super.initState();
|
||||||
_tempCheckDetails = widget.details;
|
// _tempCheckDetails = widget.details;
|
||||||
widget.details.forEach((element) {
|
// widget.details.forEach((element) {
|
||||||
_checkedDetails.add(element);
|
// _checkedDetails.add(element);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return SizedBox(
|
// return SizedBox(
|
||||||
height: 160.w,
|
// height: 160.w,
|
||||||
child: ListView.separated(
|
// child: ListView.separated(
|
||||||
scrollDirection: Axis.horizontal,
|
// scrollDirection: Axis.horizontal,
|
||||||
itemBuilder: (context, index) {
|
// itemBuilder: (context, index) {
|
||||||
return GestureDetector(
|
// return GestureDetector(
|
||||||
onTap: !widget.canTap
|
// onTap: !widget.canTap
|
||||||
? null
|
// ? null
|
||||||
: () {
|
// : () {
|
||||||
widget.onChange(_checkedDetails);
|
// widget.onChange(_checkedDetails);
|
||||||
setState(() {
|
// setState(() {
|
||||||
_checkedDetails.indexOf(_tempCheckDetails[index]) != -1
|
// _checkedDetails.indexOf(_tempCheckDetails[index]) != -1
|
||||||
? _checkedDetails.remove(_tempCheckDetails[index])
|
// ? _checkedDetails.remove(_tempCheckDetails[index])
|
||||||
: _checkedDetails.add(_tempCheckDetails[index]);
|
// : _checkedDetails.add(_tempCheckDetails[index]);
|
||||||
});
|
// });
|
||||||
},
|
// },
|
||||||
child: Material(
|
// child: Material(
|
||||||
color: Colors.transparent,
|
// color: Colors.transparent,
|
||||||
child: DecorationCheckCardWidget(
|
// child: DecorationCheckCardWidget(
|
||||||
type: _tempCheckDetails[index],
|
// type: _tempCheckDetails[index],
|
||||||
checked: !widget.canTap
|
// checked: !widget.canTap
|
||||||
? false
|
// ? false
|
||||||
: _checkedDetails.indexOf(_tempCheckDetails[index]) != -1,
|
// : _checkedDetails.indexOf(_tempCheckDetails[index]) != -1,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
},
|
// },
|
||||||
itemCount: _tempCheckDetails.length,
|
// itemCount: _tempCheckDetails.length,
|
||||||
separatorBuilder: (context, index) {
|
// separatorBuilder: (context, index) {
|
||||||
return AkuBox.w(16);
|
// return AkuBox.w(16);
|
||||||
},
|
// },
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
@ -1,192 +1,190 @@
|
|||||||
// Flutter imports:
|
// // Flutter imports:
|
||||||
import 'package:aku_community_manager/ui/widgets/common/aku_material_button.dart';
|
// import 'package:aku_community_manager/ui/widgets/common/aku_material_button.dart';
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// Package imports:
|
// // Package imports:
|
||||||
import 'package:expandable/expandable.dart';
|
// import 'package:expandable/expandable.dart';
|
||||||
import 'package:get/get.dart';
|
// import 'package:get/get.dart';
|
||||||
import 'package:provider/provider.dart';
|
|
||||||
|
|
||||||
// Project imports:
|
// // Project imports:
|
||||||
import 'package:aku_community_manager/const/resource.dart';
|
// import 'package:aku_community_manager/const/resource.dart';
|
||||||
import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
// import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
||||||
import 'package:aku_community_manager/mock_models/fix/fixer_model.dart';
|
// import 'package:aku_community_manager/mock_models/fix/fixer_model.dart';
|
||||||
import 'package:aku_community_manager/provider/fix_provider.dart';
|
// import 'package:aku_community_manager/style/app_style.dart';
|
||||||
import 'package:aku_community_manager/style/app_style.dart';
|
// import 'package:aku_community_manager/tools/screen_tool.dart';
|
||||||
import 'package:aku_community_manager/tools/screen_tool.dart';
|
// import 'package:aku_community_manager/tools/widget_tool.dart';
|
||||||
import 'package:aku_community_manager/tools/widget_tool.dart';
|
// import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
||||||
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
|
||||||
|
|
||||||
class DecorationDepartmentPage extends StatefulWidget {
|
// class DecorationDepartmentPage extends StatefulWidget {
|
||||||
final DecorationModel model;
|
// final DecorationModel model;
|
||||||
DecorationDepartmentPage({Key key, @required this.model}) : super(key: key);
|
// DecorationDepartmentPage({Key key, @required this.model}) : super(key: key);
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
_DecorationDepartmentPageState createState() =>
|
// _DecorationDepartmentPageState createState() =>
|
||||||
_DecorationDepartmentPageState();
|
// _DecorationDepartmentPageState();
|
||||||
}
|
// }
|
||||||
|
|
||||||
class _DecorationDepartmentPageState extends State<DecorationDepartmentPage> {
|
// class _DecorationDepartmentPageState extends State<DecorationDepartmentPage> {
|
||||||
FixerModel _pickedFixer;
|
// FixerModel _pickedFixer;
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
final fixProvider = Provider.of<FixProvider>(context);
|
// // final fixProvider = Provider.of<FixProvider>(context);
|
||||||
|
|
||||||
return AkuScaffold(
|
// return AkuScaffold(
|
||||||
title: '装修指派',
|
// title: '装修指派',
|
||||||
body: ListView.builder(
|
// // body: ListView.builder(
|
||||||
padding: EdgeInsets.symmetric(vertical: 16.w),
|
// // padding: EdgeInsets.symmetric(vertical: 16.w),
|
||||||
itemBuilder: (context, index) {
|
// // itemBuilder: (context, index) {
|
||||||
return _buildItem(fixProvider.propertyModels[index], index);
|
// // return _buildItem(fixProvider.propertyModels[index], index);
|
||||||
},
|
// // },
|
||||||
itemCount: fixProvider.propertyModels.length,
|
// // itemCount: fixProvider.propertyModels.length,
|
||||||
),
|
// // ),
|
||||||
bottom: AkuMaterialButton(
|
// bottom: AkuMaterialButton(
|
||||||
height: 96.w,
|
// height: 96.w,
|
||||||
onPressed: _pickedFixer == null
|
// onPressed: _pickedFixer == null
|
||||||
? null
|
// ? null
|
||||||
: () {
|
// : () {
|
||||||
widget.model.cycleCheck.authPerson = _pickedFixer;
|
// widget.model.cycleCheck.authPerson = _pickedFixer;
|
||||||
Get.back();
|
// Get.back();
|
||||||
},
|
// },
|
||||||
color: AppStyle.primaryColor,
|
// color: AppStyle.primaryColor,
|
||||||
nullColor: AppStyle.primaryColor.withOpacity(0.5),
|
// nullColor: AppStyle.primaryColor.withOpacity(0.5),
|
||||||
child: Text(
|
// child: Text(
|
||||||
'选择完成',
|
// '选择完成',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: _pickedFixer == null
|
// color: _pickedFixer == null
|
||||||
? AppStyle.minorTextColor
|
// ? AppStyle.minorTextColor
|
||||||
: AppStyle.primaryTextColor,
|
// : AppStyle.primaryTextColor,
|
||||||
fontSize: 32.w,
|
// fontSize: 32.w,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
_buildItem(FixerTypedModel model, int index) {
|
// _buildItem(FixerTypedModel model, int index) {
|
||||||
return Container(
|
// return Container(
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
border: Border(
|
// border: Border(
|
||||||
top: index == 0
|
// top: index == 0
|
||||||
? BorderSide.none
|
// ? BorderSide.none
|
||||||
: BorderSide(color: Color(0xFFE8E8E8), width: 1.w),
|
// : BorderSide(color: Color(0xFFE8E8E8), width: 1.w),
|
||||||
bottom: BorderSide(color: Color(0xFFE8E8E8), width: 1.w),
|
// bottom: BorderSide(color: Color(0xFFE8E8E8), width: 1.w),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
child: Material(
|
// child: Material(
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
child: ExpandablePanel(
|
// child: ExpandablePanel(
|
||||||
controller: ExpandableController(initialExpanded: true),
|
// controller: ExpandableController(initialExpanded: true),
|
||||||
header: Container(
|
// header: Container(
|
||||||
height: 96.w,
|
// height: 96.w,
|
||||||
alignment: Alignment.centerLeft,
|
// alignment: Alignment.centerLeft,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
// padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||||
child: Text(
|
// child: Text(
|
||||||
model.typeName,
|
// model.typeName,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: AppStyle.primaryTextColor,
|
// color: AppStyle.primaryTextColor,
|
||||||
fontSize: 32.sp,
|
// fontSize: 32.sp,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
collapsed: SizedBox(),
|
// collapsed: SizedBox(),
|
||||||
expanded: Column(
|
// expanded: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
// mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
// children: [
|
||||||
Divider(
|
// Divider(
|
||||||
color: Color(0xFFE8E8E8),
|
// color: Color(0xFFE8E8E8),
|
||||||
height: 1.w,
|
// height: 1.w,
|
||||||
thickness: 1.w,
|
// thickness: 1.w,
|
||||||
),
|
// ),
|
||||||
...model.fixers.map((e) {
|
// ...model.fixers.map((e) {
|
||||||
return Column(
|
// return Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
// mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
// children: [
|
||||||
AkuMaterialButton(
|
// AkuMaterialButton(
|
||||||
height: 96.w,
|
// height: 96.w,
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
if (_pickedFixer?.name != e.name) {
|
// if (_pickedFixer?.name != e.name) {
|
||||||
_pickedFixer = e;
|
// _pickedFixer = e;
|
||||||
} else {
|
// } else {
|
||||||
_pickedFixer = null;
|
// _pickedFixer = null;
|
||||||
}
|
// }
|
||||||
setState(() {});
|
// setState(() {});
|
||||||
},
|
// },
|
||||||
child: Row(
|
// child: Row(
|
||||||
children: [
|
// children: [
|
||||||
AkuBox.w(72),
|
// AkuBox.w(72),
|
||||||
Checkbox(
|
// Checkbox(
|
||||||
checkColor: AppStyle.primaryTextColor,
|
// checkColor: AppStyle.primaryTextColor,
|
||||||
activeColor: AppStyle.primaryColor,
|
// activeColor: AppStyle.primaryColor,
|
||||||
value: _pickedFixer?.name == e.name,
|
// value: _pickedFixer?.name == e.name,
|
||||||
onChanged: (state) {
|
// onChanged: (state) {
|
||||||
if (_pickedFixer == null) {
|
// if (_pickedFixer == null) {
|
||||||
_pickedFixer = e;
|
// _pickedFixer = e;
|
||||||
} else {
|
// } else {
|
||||||
_pickedFixer = null;
|
// _pickedFixer = null;
|
||||||
}
|
// }
|
||||||
setState(() {});
|
// setState(() {});
|
||||||
},
|
// },
|
||||||
materialTapTargetSize:
|
// materialTapTargetSize:
|
||||||
MaterialTapTargetSize.shrinkWrap,
|
// MaterialTapTargetSize.shrinkWrap,
|
||||||
),
|
// ),
|
||||||
Image.asset(
|
// Image.asset(
|
||||||
R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
|
// R.ASSETS_MESSAGE_IC_PEOPLE_PNG,
|
||||||
height: 40.w,
|
// height: 40.w,
|
||||||
width: 40.w,
|
// width: 40.w,
|
||||||
),
|
// ),
|
||||||
Text(
|
// Text(
|
||||||
e.name,
|
// e.name,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: AppStyle.primaryTextColor,
|
// color: AppStyle.primaryTextColor,
|
||||||
fontSize: 28.w,
|
// fontSize: 28.w,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Spacer(),
|
// Spacer(),
|
||||||
Image.asset(
|
// Image.asset(
|
||||||
R.ASSETS_MESSAGE_IC_PHONE_PNG,
|
// R.ASSETS_MESSAGE_IC_PHONE_PNG,
|
||||||
height: 40.w,
|
// height: 40.w,
|
||||||
width: 40.w,
|
// width: 40.w,
|
||||||
),
|
// ),
|
||||||
Text(
|
// Text(
|
||||||
e.phone,
|
// e.phone,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: AppStyle.primaryTextColor,
|
// color: AppStyle.primaryTextColor,
|
||||||
fontSize: 28.w,
|
// fontSize: 28.w,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
AkuBox.w(101),
|
// AkuBox.w(101),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
model.fixers.last == e
|
// model.fixers.last == e
|
||||||
? SizedBox()
|
// ? SizedBox()
|
||||||
: Divider(
|
// : Divider(
|
||||||
indent: 32.w,
|
// indent: 32.w,
|
||||||
endIndent: 32.w,
|
// endIndent: 32.w,
|
||||||
height: 1.w,
|
// height: 1.w,
|
||||||
thickness: 1.w,
|
// thickness: 1.w,
|
||||||
color: Color(0xFFE8E8E8),
|
// color: Color(0xFFE8E8E8),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
}).toList()
|
// }).toList()
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
theme: ExpandableThemeData(
|
// theme: ExpandableThemeData(
|
||||||
tapHeaderToExpand: true,
|
// tapHeaderToExpand: true,
|
||||||
iconPlacement: ExpandablePanelIconPlacement.right,
|
// iconPlacement: ExpandablePanelIconPlacement.right,
|
||||||
iconPadding: EdgeInsets.only(top: 32.w, right: 32.w),
|
// iconPadding: EdgeInsets.only(top: 32.w, right: 32.w),
|
||||||
iconSize: 32.w,
|
// iconSize: 32.w,
|
||||||
iconColor: AppStyle.minorTextColor,
|
// iconColor: AppStyle.minorTextColor,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
@ -1,275 +1,275 @@
|
|||||||
// Flutter imports:
|
// // Flutter imports:
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// Package imports:
|
// // Package imports:
|
||||||
import 'package:common_utils/common_utils.dart';
|
// import 'package:common_utils/common_utils.dart';
|
||||||
import 'package:get/get.dart';
|
// import 'package:get/get.dart';
|
||||||
|
|
||||||
// Project imports:
|
// // Project imports:
|
||||||
import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
// import 'package:aku_community_manager/mock_models/decoration/decoration_model.dart';
|
||||||
import 'package:aku_community_manager/style/app_style.dart';
|
// import 'package:aku_community_manager/style/app_style.dart';
|
||||||
import 'package:aku_community_manager/tools/widget_tool.dart';
|
// import 'package:aku_community_manager/tools/widget_tool.dart';
|
||||||
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_checkbox.dart';
|
// import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_checkbox.dart';
|
||||||
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_success_page.dart';
|
// import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_success_page.dart';
|
||||||
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
// import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
||||||
import 'package:aku_community_manager/ui/widgets/inner/aku_bottom_button.dart';
|
// import 'package:aku_community_manager/ui/widgets/inner/aku_bottom_button.dart';
|
||||||
|
|
||||||
class DecorationFollowCheck extends StatefulWidget {
|
// class DecorationFollowCheck extends StatefulWidget {
|
||||||
final DecorationModel model;
|
// final DecorationModel model;
|
||||||
DecorationFollowCheck({Key key, @required this.model}) : super(key: key);
|
// DecorationFollowCheck({Key key, @required this.model}) : super(key: key);
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
_DecorationFollowCheckState createState() => _DecorationFollowCheckState();
|
// _DecorationFollowCheckState createState() => _DecorationFollowCheckState();
|
||||||
}
|
// }
|
||||||
|
|
||||||
class _DecorationFollowCheckState extends State<DecorationFollowCheck> {
|
// class _DecorationFollowCheckState extends State<DecorationFollowCheck> {
|
||||||
Map<CHECK_TYPE, bool> checkStatus = {
|
// Map<CHECK_TYPE, bool> checkStatus = {
|
||||||
CHECK_TYPE.ELECTRIC: true,
|
// CHECK_TYPE.ELECTRIC: true,
|
||||||
CHECK_TYPE.WATER: true,
|
// CHECK_TYPE.WATER: true,
|
||||||
CHECK_TYPE.WALL: true,
|
// CHECK_TYPE.WALL: true,
|
||||||
CHECK_TYPE.DOOR_AND_WINDOWS: true,
|
// CHECK_TYPE.DOOR_AND_WINDOWS: true,
|
||||||
CHECK_TYPE.SECURITY: true,
|
// CHECK_TYPE.SECURITY: true,
|
||||||
};
|
// };
|
||||||
|
|
||||||
bool get success {
|
// bool get success {
|
||||||
for (var item in checkStatus.keys) {
|
// for (var item in checkStatus.keys) {
|
||||||
if (checkStatus[item] == false) return false;
|
// if (checkStatus[item] == false) return false;
|
||||||
}
|
// }
|
||||||
return true;
|
// return true;
|
||||||
}
|
// }
|
||||||
|
|
||||||
TextEditingController _textEditingController = TextEditingController();
|
// TextEditingController _textEditingController = TextEditingController();
|
||||||
@override
|
// @override
|
||||||
void dispose() {
|
// void dispose() {
|
||||||
_textEditingController?.dispose();
|
// _textEditingController?.dispose();
|
||||||
super.dispose();
|
// super.dispose();
|
||||||
}
|
// }
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return AkuScaffold(
|
// return AkuScaffold(
|
||||||
title: '跟踪检查',
|
// title: '跟踪检查',
|
||||||
body: ListView(
|
// body: ListView(
|
||||||
padding: EdgeInsets.symmetric(vertical: 16.w),
|
// padding: EdgeInsets.symmetric(vertical: 16.w),
|
||||||
children: [
|
// children: [
|
||||||
Container(
|
// Container(
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
padding: EdgeInsets.symmetric(
|
// padding: EdgeInsets.symmetric(
|
||||||
horizontal: 32.w,
|
// horizontal: 32.w,
|
||||||
vertical: 16.w,
|
// vertical: 16.w,
|
||||||
),
|
// ),
|
||||||
child: Column(
|
// child: Column(
|
||||||
mainAxisSize: MainAxisSize.min,
|
// mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
// children: [
|
||||||
Container(
|
// Container(
|
||||||
child: Row(
|
// child: Row(
|
||||||
children: [
|
// children: [
|
||||||
Container(
|
// Container(
|
||||||
height: 56.w,
|
// height: 56.w,
|
||||||
width: 56.w,
|
// width: 56.w,
|
||||||
alignment: Alignment.center,
|
// alignment: Alignment.center,
|
||||||
child: Text(
|
// child: Text(
|
||||||
'家',
|
// '家',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: AppStyle.secondaryColor,
|
// color: AppStyle.secondaryColor,
|
||||||
fontSize: 24.sp,
|
// fontSize: 24.sp,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(28.w),
|
// borderRadius: BorderRadius.circular(28.w),
|
||||||
color: Color(0xFFE9F2FF),
|
// color: Color(0xFFE9F2FF),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
AkuBox.w(30),
|
// AkuBox.w(30),
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Column(
|
// child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
widget.model.userHomeModel.plot,
|
// widget.model.userHomeModel.plot,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
color: AppStyle.primaryTextColor,
|
// color: AppStyle.primaryTextColor,
|
||||||
fontSize: 24.sp,
|
// fontSize: 24.sp,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Text(
|
// Text(
|
||||||
widget.model.userHomeModel.detailAddr,
|
// widget.model.userHomeModel.detailAddr,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
color: AppStyle.primaryTextColor,
|
// color: AppStyle.primaryTextColor,
|
||||||
fontSize: 24.sp,
|
// fontSize: 24.sp,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
padding: EdgeInsets.symmetric(
|
// padding: EdgeInsets.symmetric(
|
||||||
vertical: 26.w,
|
// vertical: 26.w,
|
||||||
horizontal: 32.w,
|
// horizontal: 32.w,
|
||||||
),
|
// ),
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(8.w),
|
// borderRadius: BorderRadius.circular(8.w),
|
||||||
color: Color(0xFFF9F9F9),
|
// color: Color(0xFFF9F9F9),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
AkuBox.h(16),
|
// AkuBox.h(16),
|
||||||
Container(
|
// Container(
|
||||||
child: Row(
|
// child: Row(
|
||||||
children: [
|
// children: [
|
||||||
Container(
|
// Container(
|
||||||
height: 56.w,
|
// height: 56.w,
|
||||||
width: 56.w,
|
// width: 56.w,
|
||||||
alignment: Alignment.center,
|
// alignment: Alignment.center,
|
||||||
child: Text(
|
// child: Text(
|
||||||
'装',
|
// '装',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: AppStyle.secondaryColor,
|
// color: AppStyle.secondaryColor,
|
||||||
fontSize: 24.sp,
|
// fontSize: 24.sp,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(28.w),
|
// borderRadius: BorderRadius.circular(28.w),
|
||||||
color: Color(0xFFE9F2FF),
|
// color: Color(0xFFE9F2FF),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
AkuBox.w(30),
|
// AkuBox.w(30),
|
||||||
Expanded(
|
// Expanded(
|
||||||
child: Text(
|
// child: Text(
|
||||||
widget.model.decorationTeamModel.name,
|
// widget.model.decorationTeamModel.name,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
color: AppStyle.primaryTextColor,
|
// color: AppStyle.primaryTextColor,
|
||||||
fontSize: 24.sp,
|
// fontSize: 24.sp,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
padding: EdgeInsets.symmetric(
|
// padding: EdgeInsets.symmetric(
|
||||||
vertical: 26.w,
|
// vertical: 26.w,
|
||||||
horizontal: 32.w,
|
// horizontal: 32.w,
|
||||||
),
|
// ),
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
borderRadius: BorderRadius.circular(8.w),
|
// borderRadius: BorderRadius.circular(8.w),
|
||||||
color: Color(0xFFF9F9F9),
|
// color: Color(0xFFF9F9F9),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
AkuBox.h(16),
|
// AkuBox.h(16),
|
||||||
Row(
|
// Row(
|
||||||
children: [
|
// children: [
|
||||||
Text(
|
// Text(
|
||||||
'${DateUtil.formatDate(
|
// '${DateUtil.formatDate(
|
||||||
DateTime.now(),
|
// DateTime.now(),
|
||||||
format: 'yyyy-MM-dd',
|
// format: 'yyyy-MM-dd',
|
||||||
)} 周期检查',
|
// )} 周期检查',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: AppStyle.primaryTextColor,
|
// color: AppStyle.primaryTextColor,
|
||||||
fontSize: 28.w,
|
// fontSize: 28.w,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Spacer(),
|
// Spacer(),
|
||||||
AkuBox.h(96),
|
// AkuBox.h(96),
|
||||||
Text(
|
// Text(
|
||||||
success ? '正常' : '异常',
|
// success ? '正常' : '异常',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: success
|
// color: success
|
||||||
? AppStyle.successColor
|
// ? AppStyle.successColor
|
||||||
: AppStyle.failColor,
|
// : AppStyle.failColor,
|
||||||
fontSize: 28.w,
|
// fontSize: 28.w,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
_buildRow(CHECK_TYPE.ELECTRIC),
|
// _buildRow(CHECK_TYPE.ELECTRIC),
|
||||||
_buildRow(CHECK_TYPE.WATER),
|
// _buildRow(CHECK_TYPE.WATER),
|
||||||
_buildRow(CHECK_TYPE.WALL),
|
// _buildRow(CHECK_TYPE.WALL),
|
||||||
_buildRow(CHECK_TYPE.DOOR_AND_WINDOWS),
|
// _buildRow(CHECK_TYPE.DOOR_AND_WINDOWS),
|
||||||
_buildRow(CHECK_TYPE.SECURITY),
|
// _buildRow(CHECK_TYPE.SECURITY),
|
||||||
TextField(
|
// TextField(
|
||||||
minLines: 3,
|
// minLines: 3,
|
||||||
maxLines: 99,
|
// maxLines: 99,
|
||||||
controller: _textEditingController,
|
// controller: _textEditingController,
|
||||||
decoration: InputDecoration(
|
// decoration: InputDecoration(
|
||||||
contentPadding: EdgeInsets.symmetric(
|
// contentPadding: EdgeInsets.symmetric(
|
||||||
vertical: 16.w,
|
// vertical: 16.w,
|
||||||
horizontal: 24.w,
|
// horizontal: 24.w,
|
||||||
),
|
// ),
|
||||||
hintText: '请输入检查描述',
|
// hintText: '请输入检查描述',
|
||||||
border: OutlineInputBorder(
|
// border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(8.w),
|
// borderRadius: BorderRadius.circular(8.w),
|
||||||
borderSide: BorderSide(
|
// borderSide: BorderSide(
|
||||||
width: 2.w,
|
// width: 2.w,
|
||||||
color: Color(0xFFE8E8E8),
|
// color: Color(0xFFE8E8E8),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
focusedBorder: OutlineInputBorder(
|
// focusedBorder: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(8.w),
|
// borderRadius: BorderRadius.circular(8.w),
|
||||||
borderSide: BorderSide(
|
// borderSide: BorderSide(
|
||||||
width: 2.w,
|
// width: 2.w,
|
||||||
color: Color(0xFFE8E8E8),
|
// color: Color(0xFFE8E8E8),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
bottom: AkuBottomButton(
|
// bottom: AkuBottomButton(
|
||||||
onTap: () {
|
// onTap: () {
|
||||||
widget.model.checkInfomations.add(
|
// widget.model.checkInfomations.add(
|
||||||
CheckInfomation(
|
// CheckInfomation(
|
||||||
checkDate: DateTime.now(),
|
// checkDate: DateTime.now(),
|
||||||
checkType: '周期检查',
|
// checkType: '周期检查',
|
||||||
info: _textEditingController.text,
|
// info: _textEditingController.text,
|
||||||
details: checkStatus.entries.map((e) {
|
// details: checkStatus.entries.map((e) {
|
||||||
return CheckDetail(type: e.key, status: e.value);
|
// return CheckDetail(type: e.key, status: e.value);
|
||||||
}).toList(),
|
// }).toList(),
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
widget.model.type = DecorationType.DONE;
|
// widget.model.type = DecorationType.DONE;
|
||||||
Get.off(DecorationSuccessPage());
|
// Get.off(DecorationSuccessPage());
|
||||||
},
|
// },
|
||||||
title: '确认提交',
|
// title: '确认提交',
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
_buildRow(
|
// _buildRow(
|
||||||
CHECK_TYPE type,
|
// CHECK_TYPE type,
|
||||||
) {
|
// ) {
|
||||||
return Row(
|
// return Row(
|
||||||
children: [
|
// children: [
|
||||||
Image.asset(
|
// Image.asset(
|
||||||
checkAssetMap[type],
|
// checkAssetMap[type],
|
||||||
height: 40.w,
|
// height: 40.w,
|
||||||
width: 40.w,
|
// width: 40.w,
|
||||||
),
|
// ),
|
||||||
Text(
|
// Text(
|
||||||
checkTypeMap[type],
|
// checkTypeMap[type],
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
fontSize: 28.w,
|
// fontSize: 28.w,
|
||||||
color: AppStyle.primaryTextColor,
|
// color: AppStyle.primaryTextColor,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Spacer(),
|
// Spacer(),
|
||||||
DecorationCheckBox(
|
// DecorationCheckBox(
|
||||||
initValue: checkStatus[type],
|
// initValue: checkStatus[type],
|
||||||
onChange: (state) {
|
// onChange: (state) {
|
||||||
checkStatus[type] = state;
|
// checkStatus[type] = state;
|
||||||
setState(() {});
|
// setState(() {});
|
||||||
},
|
// },
|
||||||
),
|
// ),
|
||||||
Spacer(),
|
// Spacer(),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
@ -1,140 +1,140 @@
|
|||||||
// Flutter imports:
|
// // Flutter imports:
|
||||||
import 'package:aku_community_manager/ui/widgets/common/aku_material_button.dart';
|
// import 'package:aku_community_manager/ui/widgets/common/aku_material_button.dart';
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// Package imports:
|
// // Package imports:
|
||||||
import 'package:common_utils/common_utils.dart';
|
// import 'package:common_utils/common_utils.dart';
|
||||||
import 'package:get/get.dart';
|
// import 'package:get/get.dart';
|
||||||
|
|
||||||
// Project imports:
|
// // Project imports:
|
||||||
import 'package:aku_community_manager/const/resource.dart';
|
// import 'package:aku_community_manager/const/resource.dart';
|
||||||
import 'package:aku_community_manager/models/manager/decoration/decoration_list_model.dart';
|
// import 'package:aku_community_manager/models/manager/decoration/decoration_list_model.dart';
|
||||||
import 'package:aku_community_manager/style/app_style.dart';
|
// import 'package:aku_community_manager/style/app_style.dart';
|
||||||
import 'package:aku_community_manager/tools/screen_tool.dart';
|
// import 'package:aku_community_manager/tools/screen_tool.dart';
|
||||||
import 'package:aku_community_manager/tools/widget_tool.dart';
|
// import 'package:aku_community_manager/tools/widget_tool.dart';
|
||||||
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_manager_detail_page.dart';
|
// import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_manager_detail_page.dart';
|
||||||
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_util.dart';
|
// import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_util.dart';
|
||||||
import 'package:aku_community_manager/ui/widgets/inner/aku_chip_box.dart';
|
// import 'package:aku_community_manager/ui/widgets/inner/aku_chip_box.dart';
|
||||||
|
|
||||||
class DecorationManagerCard extends StatefulWidget {
|
// class DecorationManagerCard extends StatefulWidget {
|
||||||
final DecorationListModel model;
|
// final DecorationListModel model;
|
||||||
DecorationManagerCard({Key key, @required this.model}) : super(key: key);
|
// DecorationManagerCard({Key key, @required this.model}) : super(key: key);
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
_DecorationManagerCardState createState() => _DecorationManagerCardState();
|
// _DecorationManagerCardState createState() => _DecorationManagerCardState();
|
||||||
}
|
// }
|
||||||
|
|
||||||
class _DecorationManagerCardState extends State<DecorationManagerCard> {
|
// class _DecorationManagerCardState extends State<DecorationManagerCard> {
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return Container(
|
// return Container(
|
||||||
margin: EdgeInsets.only(top: 16.w),
|
// margin: EdgeInsets.only(top: 16.w),
|
||||||
padding: EdgeInsets.all(24.w),
|
// padding: EdgeInsets.all(24.w),
|
||||||
child: Column(
|
// child: Column(
|
||||||
children: [
|
// children: [
|
||||||
Row(
|
// Row(
|
||||||
children: [
|
// children: [
|
||||||
AkuChipBox(title: '装修管理'),
|
// AkuChipBox(title: '装修管理'),
|
||||||
AkuBox.w(16),
|
// AkuBox.w(16),
|
||||||
Text(
|
// Text(
|
||||||
DateUtil.formatDateStr(widget.model.applicationDate,
|
// DateUtil.formatDateStr(widget.model.applicationDate,
|
||||||
format: 'yyyy-MM-dd HH:mm:ss'),
|
// format: 'yyyy-MM-dd HH:mm:ss'),
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: AppStyle.minorTextColor,
|
// color: AppStyle.minorTextColor,
|
||||||
fontSize: 22.w,
|
// fontSize: 22.w,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Spacer(),
|
// Spacer(),
|
||||||
Text(
|
// Text(
|
||||||
DecorationUIUtil(context).getTagName(
|
// DecorationUIUtil(context).getTagName(
|
||||||
widget.model.operationStatus, widget.model.status,
|
// widget.model.operationStatus, widget.model.status,
|
||||||
tracker: widget.model.tracker),
|
// tracker: widget.model.tracker),
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: DecorationUIUtil(context)
|
// color: DecorationUIUtil(context)
|
||||||
.getTagColor(widget.model.operationStatus),
|
// .getTagColor(widget.model.operationStatus),
|
||||||
fontSize: 24.w,
|
// fontSize: 24.w,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
AkuBox.h(24),
|
// AkuBox.h(24),
|
||||||
_buildTile(R.ASSETS_MANAGE_HOME_PNG, '小区名称', kEstateName),
|
// _buildTile(R.ASSETS_MANAGE_HOME_PNG, '小区名称', kEstateName),
|
||||||
AkuBox.h(12),
|
// AkuBox.h(12),
|
||||||
_buildTile(
|
// _buildTile(
|
||||||
R.ASSETS_MANAGE_ADDRESS_PNG,
|
// R.ASSETS_MANAGE_ADDRESS_PNG,
|
||||||
'详细地址',
|
// '详细地址',
|
||||||
widget.model.roomName,
|
// widget.model.roomName,
|
||||||
),
|
// ),
|
||||||
AkuBox.h(12),
|
// AkuBox.h(12),
|
||||||
_buildTile(
|
// _buildTile(
|
||||||
R.ASSETS_MANAGE_DECORATION_PNG,
|
// R.ASSETS_MANAGE_DECORATION_PNG,
|
||||||
'装修公司',
|
// '装修公司',
|
||||||
widget.model.constructionUnit,
|
// widget.model.constructionUnit,
|
||||||
),
|
// ),
|
||||||
AkuBox.h(12),
|
// AkuBox.h(12),
|
||||||
_buildTile(
|
// _buildTile(
|
||||||
R.ASSETS_MANAGE_STATUS_PNG,
|
// R.ASSETS_MANAGE_STATUS_PNG,
|
||||||
'装修状态',
|
// '装修状态',
|
||||||
DecorationUIUtil(context).getDecorationStatus(widget.model.status),
|
// DecorationUIUtil(context).getDecorationStatus(widget.model.status),
|
||||||
),
|
// ),
|
||||||
Divider(
|
// Divider(
|
||||||
height: 48.w,
|
// height: 48.w,
|
||||||
),
|
// ),
|
||||||
Align(
|
// Align(
|
||||||
alignment: Alignment.centerRight,
|
// alignment: Alignment.centerRight,
|
||||||
child: AkuMaterialButton(
|
// child: AkuMaterialButton(
|
||||||
onPressed: () {
|
// onPressed: () {
|
||||||
Get.to(
|
// Get.to(
|
||||||
DecorationManagerDetailPage(id: widget.model.id,status: widget.model.status,operationStatus: widget.model.operationStatus,));
|
// DecorationManagerDetailPage(id: widget.model.id,status: widget.model.status,operationStatus: widget.model.operationStatus,));
|
||||||
},
|
// },
|
||||||
height: 64.w,
|
// height: 64.w,
|
||||||
minWidth: 160.w,
|
// minWidth: 160.w,
|
||||||
color: AppStyle.primaryColor,
|
// color: AppStyle.primaryColor,
|
||||||
child: Text(
|
// child: Text(
|
||||||
'查看详情',
|
// '查看详情',
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: AppStyle.primaryTextColor,
|
// color: AppStyle.primaryTextColor,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
fontSize: 28.w,
|
// fontSize: 28.w,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
radius: 4.w,
|
// radius: 4.w,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
),
|
// ),
|
||||||
decoration: BoxDecoration(
|
// decoration: BoxDecoration(
|
||||||
color: Colors.white,
|
// color: Colors.white,
|
||||||
borderRadius: BorderRadius.circular(8.w),
|
// borderRadius: BorderRadius.circular(8.w),
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
_buildTile(String path, String title, String subTitle) {
|
// _buildTile(String path, String title, String subTitle) {
|
||||||
return Row(
|
// return Row(
|
||||||
children: [
|
// children: [
|
||||||
Image.asset(
|
// Image.asset(
|
||||||
path,
|
// path,
|
||||||
height: 40.w,
|
// height: 40.w,
|
||||||
width: 40.w,
|
// width: 40.w,
|
||||||
),
|
// ),
|
||||||
Text(
|
// Text(
|
||||||
title,
|
// title,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: AppStyle.minorTextColor,
|
// color: AppStyle.minorTextColor,
|
||||||
fontSize: 28.sp,
|
// fontSize: 28.sp,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Spacer(),
|
// Spacer(),
|
||||||
Text(
|
// Text(
|
||||||
subTitle,
|
// subTitle,
|
||||||
style: TextStyle(
|
// style: TextStyle(
|
||||||
color: AppStyle.primaryTextColor,
|
// color: AppStyle.primaryTextColor,
|
||||||
fontSize: 28.sp,
|
// fontSize: 28.sp,
|
||||||
fontWeight: FontWeight.bold,
|
// fontWeight: FontWeight.bold,
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
],
|
// ],
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,128 +1,128 @@
|
|||||||
// Flutter imports:
|
// // Flutter imports:
|
||||||
import 'package:flutter/material.dart';
|
// import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// Package imports:
|
// // Package imports:
|
||||||
import 'package:flutter_easyrefresh/easy_refresh.dart';
|
// import 'package:flutter_easyrefresh/easy_refresh.dart';
|
||||||
import 'package:provider/provider.dart';
|
// import 'package:provider/provider.dart';
|
||||||
|
|
||||||
// Project imports:
|
// // Project imports:
|
||||||
import 'package:aku_community_manager/const/api.dart';
|
// import 'package:aku_community_manager/const/api.dart';
|
||||||
import 'package:aku_community_manager/models/manager/decoration/decoration_list_model.dart';
|
// import 'package:aku_community_manager/models/manager/decoration/decoration_list_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/screen_tool.dart';
|
// import 'package:aku_community_manager/tools/screen_tool.dart';
|
||||||
import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_manager_card.dart';
|
// import 'package:aku_community_manager/ui/sub_pages/decoration_manager/decoration_manager_card.dart';
|
||||||
import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
// import 'package:aku_community_manager/ui/widgets/common/aku_scaffold.dart';
|
||||||
import 'package:aku_community_manager/ui/widgets/common/bee_list_view.dart';
|
// import 'package:aku_community_manager/ui/widgets/common/bee_list_view.dart';
|
||||||
import 'package:aku_community_manager/ui/widgets/inner/aku_tab_bar.dart';
|
// import 'package:aku_community_manager/ui/widgets/inner/aku_tab_bar.dart';
|
||||||
|
|
||||||
class DecorationManagerPage extends StatefulWidget {
|
// class DecorationManagerPage extends StatefulWidget {
|
||||||
DecorationManagerPage({Key key}) : super(key: key);
|
// DecorationManagerPage({Key key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
_DecorationManagerPageState createState() => _DecorationManagerPageState();
|
// _DecorationManagerPageState createState() => _DecorationManagerPageState();
|
||||||
}
|
// }
|
||||||
|
|
||||||
class _DecorationManagerPageState extends State<DecorationManagerPage>
|
// class _DecorationManagerPageState extends State<DecorationManagerPage>
|
||||||
with TickerProviderStateMixin {
|
// with TickerProviderStateMixin {
|
||||||
TabController _tabController;
|
// TabController _tabController;
|
||||||
EasyRefreshController _refreshController;
|
// EasyRefreshController _refreshController;
|
||||||
|
|
||||||
List<String> get tabs {
|
// List<String> get tabs {
|
||||||
final userProvider = Provider.of<UserProvider>(context, listen: false);
|
// final userProvider = Provider.of<UserProvider>(context, listen: false);
|
||||||
if (userProvider?.infoModel?.canSendTicket != null &&
|
// if (userProvider?.infoModel?.canSendTicket != null &&
|
||||||
userProvider.infoModel.canSendTicket) {
|
// userProvider.infoModel.canSendTicket) {
|
||||||
return ['待指派', '已指派', '已执行', '全部'];
|
// return ['待指派', '已指派', '已执行', '全部'];
|
||||||
} else {
|
// } else {
|
||||||
return ['待执行', '已执行', '全部'];
|
// return ['待执行', '已执行', '全部'];
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
void initState() {
|
// void initState() {
|
||||||
super.initState();
|
// super.initState();
|
||||||
|
|
||||||
_tabController = TabController(length: tabs.length, vsync: this);
|
// _tabController = TabController(length: tabs.length, vsync: this);
|
||||||
_refreshController = EasyRefreshController();
|
// _refreshController = EasyRefreshController();
|
||||||
}
|
// }
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
void dispose() {
|
// void dispose() {
|
||||||
_refreshController?.dispose();
|
// _refreshController?.dispose();
|
||||||
super.dispose();
|
// super.dispose();
|
||||||
}
|
// }
|
||||||
|
|
||||||
@override
|
// @override
|
||||||
Widget build(BuildContext context) {
|
// Widget build(BuildContext context) {
|
||||||
return AkuScaffold(
|
// return AkuScaffold(
|
||||||
title: '装修管理',
|
// title: '装修管理',
|
||||||
appBarBottom: PreferredSize(
|
// appBarBottom: PreferredSize(
|
||||||
child: AkuTabBar(
|
// child: AkuTabBar(
|
||||||
controller: _tabController,
|
// controller: _tabController,
|
||||||
tabs: tabs,
|
// tabs: tabs,
|
||||||
),
|
// ),
|
||||||
preferredSize: Size.fromHeight(96.w),
|
// preferredSize: Size.fromHeight(96.w),
|
||||||
),
|
// ),
|
||||||
body: TabBarView(
|
// body: TabBarView(
|
||||||
controller: _tabController,
|
// controller: _tabController,
|
||||||
children: _getViews(),
|
// children: _getViews(),
|
||||||
),
|
// ),
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
|
|
||||||
List<Widget> _getViews() {
|
// List<Widget> _getViews() {
|
||||||
final userProvider = Provider.of<UserProvider>(context);
|
// final userProvider = Provider.of<UserProvider>(context);
|
||||||
if (userProvider?.infoModel?.canSendTicket != null &&
|
// if (userProvider?.infoModel?.canSendTicket != null &&
|
||||||
userProvider.infoModel.canSendTicket) {
|
// userProvider.infoModel.canSendTicket) {
|
||||||
return [...List.generate(4, (index) => _getSingleListView(index))];
|
// return [...List.generate(4, (index) => _getSingleListView(index))];
|
||||||
} else {
|
// } else {
|
||||||
return [...List.generate(3, (index) => _getSingleListView(index))];
|
// return [...List.generate(3, (index) => _getSingleListView(index))];
|
||||||
}
|
// }
|
||||||
// switch (role) {
|
// // switch (role) {
|
||||||
// case USER_ROLE.MANAGER:
|
// // case USER_ROLE.MANAGER:
|
||||||
// return [
|
// // return [
|
||||||
// _getSingleListView(
|
// // _getSingleListView(
|
||||||
// DecorationData.getModels(DecorationType.WAIT_HAND_OUT)),
|
// // DecorationData.getModels(DecorationType.WAIT_HAND_OUT)),
|
||||||
// _getSingleListView(DecorationData.getModels(DecorationType.HAND_OUT)),
|
// // _getSingleListView(DecorationData.getModels(DecorationType.HAND_OUT)),
|
||||||
// _getSingleListView(DecorationData.getModels(DecorationType.DONE)),
|
// // _getSingleListView(DecorationData.getModels(DecorationType.DONE)),
|
||||||
// _getSingleListView(DecorationData.allModels),
|
// // _getSingleListView(DecorationData.allModels),
|
||||||
// ];
|
// // ];
|
||||||
// break;
|
// // break;
|
||||||
// case USER_ROLE.PROPERTY:
|
// // case USER_ROLE.PROPERTY:
|
||||||
// return [
|
// // return [
|
||||||
// _getSingleListView(DecorationData.getModels(DecorationType.HAND_OUT)),
|
// // _getSingleListView(DecorationData.getModels(DecorationType.HAND_OUT)),
|
||||||
// _getSingleListView(DecorationData.getModels(DecorationType.DONE)),
|
// // _getSingleListView(DecorationData.getModels(DecorationType.DONE)),
|
||||||
// _getSingleListView(DecorationData.allPropertyModels),
|
// // _getSingleListView(DecorationData.allPropertyModels),
|
||||||
// ];
|
// // ];
|
||||||
// default:
|
// // default:
|
||||||
// return [
|
// // return [
|
||||||
// _getSingleListView(
|
// // _getSingleListView(
|
||||||
// DecorationData.getTypeModels(DecorationStatusType.PROGRESS)),
|
// // DecorationData.getTypeModels(DecorationStatusType.PROGRESS)),
|
||||||
// _getSingleListView(
|
// // _getSingleListView(
|
||||||
// DecorationData.getTypeModels(DecorationStatusType.DONE)),
|
// // DecorationData.getTypeModels(DecorationStatusType.DONE)),
|
||||||
// _getSingleListView(DecorationData.allPropertyModels),
|
// // _getSingleListView(DecorationData.allPropertyModels),
|
||||||
// ];
|
// // ];
|
||||||
// break;
|
// // break;
|
||||||
// }
|
// // }
|
||||||
}
|
// }
|
||||||
|
|
||||||
_getSingleListView(int index) {
|
// _getSingleListView(int index) {
|
||||||
return BeeListView(
|
// return BeeListView(
|
||||||
extraParams: {'operationStatus': index},
|
// extraParams: {'operationStatus': index},
|
||||||
path: API.manage.decorationList,
|
// path: API.manage.decorationList,
|
||||||
controller: _refreshController,
|
// controller: _refreshController,
|
||||||
convert: (models) {
|
// convert: (models) {
|
||||||
return models.tableList
|
// return models.tableList
|
||||||
.map((e) => DecorationListModel.fromJson(e))
|
// .map((e) => DecorationListModel.fromJson(e))
|
||||||
.toList();
|
// .toList();
|
||||||
},
|
// },
|
||||||
builder: (items) {
|
// builder: (items) {
|
||||||
return ListView.builder(
|
// return ListView.builder(
|
||||||
itemBuilder: (context, index) {
|
// itemBuilder: (context, index) {
|
||||||
return DecorationManagerCard(model: items[index]);
|
// return DecorationManagerCard(model: items[index]);
|
||||||
},
|
// },
|
||||||
itemCount: items.length,
|
// itemCount: items.length,
|
||||||
padding: EdgeInsets.symmetric(horizontal: 32.w),
|
// padding: EdgeInsets.symmetric(horizontal: 32.w),
|
||||||
);
|
// );
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
Loading…
Reference in new issue