pull/1/head
张萌 3 years ago
parent 7f6d97c230
commit b5dc06731c

@ -1297,6 +1297,10 @@ class $AssetsImagesGen {
AssetGenImage get wxpay => const AssetGenImage('assets/images/wxpay.png'); AssetGenImage get wxpay => const AssetGenImage('assets/images/wxpay.png');
} }
class $AssetsJsonGen {
const $AssetsJsonGen();
}
class $AssetsNewIconGen { class $AssetsNewIconGen {
const $AssetsNewIconGen(); const $AssetsNewIconGen();
@ -1529,6 +1533,7 @@ class Assets {
static const $AssetsHomeGen home = $AssetsHomeGen(); static const $AssetsHomeGen home = $AssetsHomeGen();
static const $AssetsIconsGen icons = $AssetsIconsGen(); static const $AssetsIconsGen icons = $AssetsIconsGen();
static const $AssetsImagesGen images = $AssetsImagesGen(); static const $AssetsImagesGen images = $AssetsImagesGen();
static const $AssetsJsonGen json = $AssetsJsonGen();
static const $AssetsNewIconGen newIcon = $AssetsNewIconGen(); static const $AssetsNewIconGen newIcon = $AssetsNewIconGen();
static const $AssetsStaticGen static = $AssetsStaticGen(); static const $AssetsStaticGen static = $AssetsStaticGen();
static const $AssetsTabGen tab = $AssetsTabGen(); static const $AssetsTabGen tab = $AssetsTabGen();

@ -11,7 +11,7 @@ ReplyListModel _$ReplyListModelFromJson(Map<String, dynamic> json) =>
id: json['id'] as int, id: json['id'] as int,
type: json['type'] as int, type: json['type'] as int,
status: json['status'] as int, status: json['status'] as int,
content: json['content'] !=null? json['content'] as String:'', content: json['content'] as String?,
sendId: json['sendId'] as int, sendId: json['sendId'] as int,
sendName: json['sendName'] as String, sendName: json['sendName'] as String,
sendDate: json['sendDate'] as String, sendDate: json['sendDate'] as String,

@ -84,65 +84,6 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
BotToast.showText(text: '请先选择您的房屋'); BotToast.showText(text: '请先选择您的房屋');
} }
}); });
_models = [
LifePayModel(
id: 1,
createDate: '2022-02-11 00:00:01',
payPrincipal: 100,
billDateStart: '2022-02-11 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-03-11 00:00:01'),
LifePayModel(
id: 2,
createDate: '2022-02-12 00:00:01',
payPrincipal: 100,
billDateStart: '2022-02-11 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-03-12 00:00:01'),
LifePayModel(
id: 3,
createDate: '2022-03-11 00:00:01',
payPrincipal: 100,
billDateStart: '2022-03-11 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-04-11 00:00:01'),
LifePayModel(
id: 4,
createDate: '2022-04-11 00:00:01',
payPrincipal: 100,
billDateStart: '2022-04-11 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-05-11 00:00:01'),
LifePayModel(
id: 5,
createDate: '2022-02-15 00:00:01',
payPrincipal: 100,
billDateStart: '2022-02-15 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-03-15 00:00:01'),
LifePayModel(
id: 6,
createDate: '2022-02-16 00:00:01',
payPrincipal: 100,
billDateStart: '2022-02-16 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-03-16 00:00:01'),
LifePayModel(
id: 7,
createDate: '2022-03-18 00:00:01',
payPrincipal: 100,
billDateStart: '2022-03-11 00:00:01',
chargesName: '物业费',
defaultAmount: 50,
billDateEnd: '2022-04-19 00:00:01'),
];
} }
@override @override

@ -1,5 +1,4 @@
import 'package:aku_new_community/base/base_style.dart'; import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/api.dart';
import 'package:aku_new_community/constants/saas_api.dart'; import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart'; import 'package:aku_new_community/pages/life_pay/pay_finish_page.dart';
import 'package:aku_new_community/pages/life_pay/pay_util.dart'; import 'package:aku_new_community/pages/life_pay/pay_util.dart';
@ -68,16 +67,15 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
16.w.widthBox, 16.w.widthBox,
TextField( TextField(
controller: _editingController, controller: _editingController,
onChanged: (String value){ onChanged: (String value) {
if(value.isEmpty){ if (value.isEmpty) {
amount = 0; amount = 0;
}else{ } else {
amount = double.parse(value); amount = double.parse(value);
} }
}, },
decoration: InputDecoration( decoration: InputDecoration(
hintText: '0.0', hintText: '0.00',
hintStyle: TextStyle( hintStyle: TextStyle(
fontSize: 56.sp, fontSize: 56.sp,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
@ -165,11 +163,11 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
onPressed: () async { onPressed: () async {
Function cancel = BotToast.showLoading(); Function cancel = BotToast.showLoading();
try { try {
BaseModel baseModel = BaseModel baseModel = await NetUtil().post(
await NetUtil().post(SAASAPI.pay.createPrepaymentOrder, SAASAPI.pay.createPrepaymentOrder,
params: { params: {
'estateId': UserTool.userProvider.defaultHouse!.id, 'estateId': UserTool.userProvider.defaultHouse!.id,
'payAmount':amount 'payAmount': amount
}, },
showMessage: true); showMessage: true);
if (baseModel.success) { if (baseModel.success) {
@ -188,7 +186,6 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
cancel(); cancel();
LoggerData.addData(e); LoggerData.addData(e);
} }
}, },
child: '立即充值'.text.size(32.sp).bold.black.make()), child: '立即充值'.text.size(32.sp).bold.black.make()),
); );

@ -4,6 +4,7 @@ import 'package:aku_new_community/pages/sign/widget/login_button_widget.dart';
import 'package:aku_new_community/pages/sign/widget/psd_text_field.dart'; import 'package:aku_new_community/pages/sign/widget/psd_text_field.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/others/user_tool.dart'; import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:bot_toast/bot_toast.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
@ -44,7 +45,12 @@ class _SetPsdPageState extends State<SetPsdPage> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return BeeScaffold( return WillPopScope(
onWillPop: () async {
BotToast.showText(text: '请设置密码');
return false;
},
child: BeeScaffold(
title: '', title: '',
bodyColor: Colors.white, bodyColor: Colors.white,
body: Column( body: Column(
@ -78,7 +84,8 @@ class _SetPsdPageState extends State<SetPsdPage> {
144.w.heightBox, 144.w.heightBox,
PsdTextField(controller: _psdController, hintText: '请输入密码'), PsdTextField(controller: _psdController, hintText: '请输入密码'),
24.w.heightBox, 24.w.heightBox,
PsdTextField(controller: _confirmPsdController, hintText: '请再次输入密码'), PsdTextField(
controller: _confirmPsdController, hintText: '请再次输入密码'),
16.w.heightBox, 16.w.heightBox,
PsdVerify.checkString(psdCheck) PsdVerify.checkString(psdCheck)
.text .text
@ -100,6 +107,7 @@ class _SetPsdPageState extends State<SetPsdPage> {
text: '确认'), text: '确认'),
], ],
), ),
),
); );
} }
} }

@ -17,8 +17,8 @@ class MyTakeTaskListModel {
final String? accessAddress; final String? accessAddress;
final String? accessAddressDetail; final String? accessAddressDetail;
final int? serviceTime; final int? serviceTime;
final String remarks; final String? remarks;
final String voiceUrl; final String? voiceUrl;
final List<ImgModel>? imgList; final List<ImgModel>? imgList;
final int rewardType; final int rewardType;
final int reward; final int reward;

@ -19,8 +19,8 @@ MyTakeTaskListModel _$MyTakeTaskListModelFromJson(Map<String, dynamic> json) =>
accessAddress: json['accessAddress'] as String?, accessAddress: json['accessAddress'] as String?,
accessAddressDetail: json['accessAddressDetail'] as String?, accessAddressDetail: json['accessAddressDetail'] as String?,
serviceTime: json['serviceTime'] as int?, serviceTime: json['serviceTime'] as int?,
remarks: json['remarks'] as String, remarks: json['remarks'] as String?,
voiceUrl: json['voiceUrl'] as String, voiceUrl: json['voiceUrl'] as String?,
imgList: (json['imgList'] as List<dynamic>?) imgList: (json['imgList'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>)) ?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(), .toList(),

@ -17,8 +17,8 @@ class MyTaskListModel {
final String? accessAddress; final String? accessAddress;
final String? accessAddressDetail; final String? accessAddressDetail;
final int? serviceTime; final int? serviceTime;
final String remarks; final String? remarks;
final String voiceUrl; final String? voiceUrl;
final List<ImgModel>? imgList; final List<ImgModel>? imgList;
final int rewardType; final int rewardType;
final int reward; final int reward;

@ -19,8 +19,8 @@ MyTaskListModel _$MyTaskListModelFromJson(Map<String, dynamic> json) =>
accessAddress: json['accessAddress'] as String?, accessAddress: json['accessAddress'] as String?,
accessAddressDetail: json['accessAddressDetail'] as String?, accessAddressDetail: json['accessAddressDetail'] as String?,
serviceTime: json['serviceTime'] as int?, serviceTime: json['serviceTime'] as int?,
remarks: json['remarks'] as String, remarks: json['remarks'] as String?,
voiceUrl: json['voiceUrl'] as String, voiceUrl: json['voiceUrl'] as String?,
imgList: (json['imgList'] as List<dynamic>?) imgList: (json['imgList'] as List<dynamic>?)
?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>)) ?.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(), .toList(),

@ -6,7 +6,11 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
class AddAppointmentAddressPage extends StatefulWidget { class AddAppointmentAddressPage extends StatefulWidget {
const AddAppointmentAddressPage({Key? key}) : super(key: key); final String? address;
final String? addressDetail;
const AddAppointmentAddressPage({Key? key, this.address, this.addressDetail})
: super(key: key);
@override @override
_AddAppointmentAddressPageState createState() => _AddAppointmentAddressPageState createState() =>
@ -17,6 +21,17 @@ class _AddAppointmentAddressPageState extends State<AddAppointmentAddressPage> {
TextEditingController _controller = TextEditingController(); TextEditingController _controller = TextEditingController();
TextEditingController _tagController = TextEditingController(); TextEditingController _tagController = TextEditingController();
@override
void initState() {
if (widget.address != null) {
_tagController.text = widget.address!;
}
if (widget.addressDetail != null) {
_controller.text = widget.addressDetail!;
}
super.initState();
}
@override @override
void dispose() { void dispose() {
_controller.dispose(); _controller.dispose();

@ -164,72 +164,83 @@ class HallCard extends StatelessWidget {
), ),
24.w.heightBox, 24.w.heightBox,
BeeDivider.horizontal(), BeeDivider.horizontal(),
Column( _cardBottom()
crossAxisAlignment: CrossAxisAlignment.end, ],
children: [ ),
40.w.heightBox, ),
Row( );
children: [ }
Spacer(),
Offstage( Widget _cardBottom() {
offstage: !myself, switch (model.status) {
child: CardBottomButton.white( case 1:
text: '取消发布', return myself
? CardBottomButton.white(
text: '取消订单',
onPressed: () async { onPressed: () async {
var re = await TaskFunc.cancel(taskId: model.id); var re = await TaskFunc.cancel(taskId: model.id);
if (re) { if (re) {
refresh(); refresh();
} }
}), })
), : CardBottomButton.yellow(
Offstage(
offstage: myself,
child: CardBottomButton.yellow(
text: '领取任务', text: '领取任务',
onPressed: () async { onPressed: () async {
var re = await TaskFunc.take(taskId: model.id); var re = await TaskFunc.take(taskId: model.id);
if (re) { if (re) {
refresh(); refresh();
} }
}), });
),
],
),
],
),
],
),
),
);
}
Widget _cardBottom(int) {
switch (int) {
case 1:
case 2: case 2:
return Column( return myself
crossAxisAlignment: CrossAxisAlignment.end, ? CardBottomButton.white(
children: [
40.w.heightBox,
CardBottomButton.white(
text: '取消订单', text: '取消订单',
onPressed: () async { onPressed: () async {
var re = await TaskFunc.cancel(taskId: model.id); var re = await TaskFunc.cancel(taskId: model.id);
if (re) { if (re) {
refresh(); refresh();
} }
}), })
CardBottomButton.yellow( : CardBottomButton.yellow(
text: '确认完成', text: '开始服务',
onPressed: () async {
var re = await TaskFunc.start(taskId: model.id);
if (re) {
refresh();
}
});
case 3:
return myself
? CardBottomButton.white(
text: '催促服务',
onPressed: () async {
var re = await TaskFunc.urge(taskId: model.id);
if (re) {
refresh();
}
})
: CardBottomButton.yellow(
text: '完成任务',
onPressed: () async { onPressed: () async {
var re = await TaskFunc.finish(taskId: model.id); var re = await TaskFunc.finish(taskId: model.id);
if (re) { if (re) {
refresh(); refresh();
} }
}), });
],
);
case 4: case 4:
return myself
? CardBottomButton.white(
text: '确认完成',
onPressed: () async {
var re = await TaskFunc.urge(taskId: model.id);
if (re) {
refresh();
}
})
: SizedBox.shrink();
case 9:
return Column( return Column(
children: [ children: [
32.w.heightBox, 32.w.heightBox,

@ -47,8 +47,9 @@ class MyTakeTaskCard extends StatelessWidget {
], ],
); );
return GestureDetector( return GestureDetector(
onTap: () { onTap: () async {
Get.to(() => MyTakeTaskDetailPage(model: model)); await Get.to(() => MyTakeTaskDetailPage(model: model));
refresh();
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
@ -116,7 +117,8 @@ class MyTakeTaskCard extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
model.remarks.text (model.remarks ?? "")
.text
.size(28.sp) .size(28.sp)
.color(Colors.black.withOpacity(0.65)) .color(Colors.black.withOpacity(0.65))
.make(), .make(),
@ -170,17 +172,25 @@ class MyTakeTaskCard extends StatelessWidget {
) )
], ],
), ),
_cardBottom(model.status), _cardBottom(),
], ],
), ),
), ),
); );
} }
Widget _cardBottom(int) { Widget _cardBottom() {
switch (int) { switch (model.status) {
case 1:
case 2: case 2:
return CardBottomButton.yellow(
text: '开始服务',
onPressed: () async {
var re = await TaskFunc.start(taskId: model.id);
if (re) {
refresh();
}
});
case 3:
return Column( return Column(
children: [ children: [
40.w.heightBox, 40.w.heightBox,
@ -196,7 +206,7 @@ class MyTakeTaskCard extends StatelessWidget {
// } // }
// }), // }),
CardBottomButton.yellow( CardBottomButton.yellow(
text: '确认完成', text: '完成任务',
onPressed: () async { onPressed: () async {
var re = await TaskFunc.finish(taskId: model.id); var re = await TaskFunc.finish(taskId: model.id);
if (re) { if (re) {
@ -207,7 +217,7 @@ class MyTakeTaskCard extends StatelessWidget {
) )
], ],
); );
case 4: case 9:
return Column( return Column(
children: [ children: [
32.w.heightBox, 32.w.heightBox,

@ -1,7 +1,5 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/saas_model/task/my_take_task_list_model.dart'; import 'package:aku_new_community/saas_model/task/my_take_task_list_model.dart';
import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_cancel_dialog.dart';
import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_long_button.dart'; import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
@ -31,18 +29,20 @@ class _MyTakeTaskDetailPageState extends State<MyTakeTaskDetailPage> {
String get detailStatusToString { String get detailStatusToString {
switch (widget.model.status) { switch (widget.model.status) {
case 1: case 1:
return '服务'; return '领取';
case 2: case 2:
return '待服务';
case 3:
if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) { if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) {
return '已超时(原预计${DateUtil.formatDate(widget.model.endTime, format: DateFormats.h_m)}'; return '已超时(原预计${DateUtil.formatDate(widget.model.endTime, format: DateFormats.h_m)}';
} else { } else {
return '服务中'; return '服务中';
} }
case 3:
return '等待用户确认';
case 4: case 4:
return '已完成'; return '等待用户确认';
case 5: case 5:
return '已完成';
case 6:
return '已评价'; return '已评价';
case 9: case 9:
return '已取消'; return '已取消';
@ -54,18 +54,20 @@ class _MyTakeTaskDetailPageState extends State<MyTakeTaskDetailPage> {
String get subStatusString { String get subStatusString {
switch (widget.model.status) { switch (widget.model.status) {
case 1: case 1:
return '请与发布人确认后开始服务'; return '等待接单';
case 2: case 2:
return '请与发布人确认后开始服务';
case 3:
if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) { if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) {
return '请及时提醒帮手完成任务'; return '请及时提醒帮手完成任务';
} else { } else {
return '帮手正在为您服务中'; return '帮手正在为您服务中';
} }
case 3:
return '请注意及时确认帮手的工作内容';
case 4: case 4:
return '欢迎对骑手及本次任务进行评价'; return '请注意及时确认帮手的工作内容';
case 5: case 5:
return '欢迎对骑手及本次任务进行评价';
case 6:
return '感谢信任与支持,欢迎再次光临'; return '感谢信任与支持,欢迎再次光临';
case 9: case 9:
return '请及时提醒帮手完成任务'; return '请及时提醒帮手完成任务';
@ -140,37 +142,13 @@ class _MyTakeTaskDetailPageState extends State<MyTakeTaskDetailPage> {
), ),
], ],
), ),
bottomNavi: Container( bottomNavi: Offstage(
offstage: widget.model.status > 3,
child: Container(
width: double.infinity, width: double.infinity,
color: Colors.white, color: Colors.white,
padding: EdgeInsets.all(32.w), padding: EdgeInsets.all(32.w),
child: Row( child: buttonByStatus,
children: [
MaterialButton(
onPressed: () async {
var re = await Get.bottomSheet(
TaskCancelDialog(taskId: widget.model.id));
if (re) {
Get.back();
}
},
minWidth: 330.w,
height: 80.w,
elevation: 0,
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.w),
side: BorderSide(color: Colors.black.withOpacity(0.25)),
),
child: Text(
'取消订单',
style: TextStyle(
fontSize: 28.sp, color: Colors.black.withOpacity(0.65)),
),
),
Spacer(),
buttonByStatus,
],
), ),
), ),
); );
@ -179,47 +157,25 @@ class _MyTakeTaskDetailPageState extends State<MyTakeTaskDetailPage> {
Widget get buttonByStatus { Widget get buttonByStatus {
switch (widget.model.status) { switch (widget.model.status) {
case 1: case 1:
return MaterialButton( return SizedBox.shrink();
case 2:
return BeeLongButton(
onPressed: () async { onPressed: () async {
var re = await TaskFunc.start(taskId: widget.model.id); var re = await TaskFunc.start(taskId: widget.model.id);
if (re) { if (re) {
Get.back(); Get.back();
} }
}, },
minWidth: 330.w, text: '开始服务');
height: 80.w,
elevation: 0,
color: kPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.w),
),
child: Text(
'开始服务',
style: TextStyle(
fontSize: 28.sp, color: Colors.black.withOpacity(0.85)),
),
);
case 2:
return MaterialButton(
onPressed: () {},
minWidth: 330.w,
height: 80.w,
elevation: 0,
color: kPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.w),
),
child: Text(
'完成任务',
style: TextStyle(
fontSize: 28.sp, color: Colors.black.withOpacity(0.85)),
),
);
case 3: case 3:
return BeeLongButton( return BeeLongButton(
onPressed: () async {}, onPressed: () async {
text: '提醒用户', var re = await TaskFunc.finish(taskId: widget.model.id);
); if (re) {
Get.back();
}
},
text: '完成任务');
case 4: case 4:
case 5: case 5:
case 9: case 9:
@ -360,7 +316,8 @@ class _MyTakeTaskDetailPageState extends State<MyTakeTaskDetailPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
widget.model.remarks.text (widget.model.remarks ?? '')
.text
.size(28.sp) .size(28.sp)
.color(Colors.black.withOpacity(0.65)) .color(Colors.black.withOpacity(0.65))
.make(), .make(),

@ -1,3 +1,4 @@
import 'package:aku_new_community/extensions/num_ext.dart';
import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/saas_model/task/my_task_list_model.dart'; import 'package:aku_new_community/saas_model/task/my_task_list_model.dart';
import 'package:aku_new_community/widget/buttons/card_bottom_button.dart'; import 'package:aku_new_community/widget/buttons/card_bottom_button.dart';
@ -72,6 +73,7 @@ class MyTaskCard extends StatelessWidget {
return GestureDetector( return GestureDetector(
onTap: () async { onTap: () async {
await Get.to(() => MyTaskDetailPage(model: model)); await Get.to(() => MyTaskDetailPage(model: model));
refresh();
}, },
child: Container( child: Container(
width: double.infinity, width: double.infinity,
@ -81,6 +83,7 @@ class MyTaskCard extends StatelessWidget {
), ),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w), padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
head, head,
24.w.heightBox, 24.w.heightBox,
@ -122,7 +125,8 @@ class MyTaskCard extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
model.remarks.text (model.remarks ?? '')
.text
.size(28.sp) .size(28.sp)
.color(Colors.black.withOpacity(0.65)) .color(Colors.black.withOpacity(0.65))
.make(), .make(),
@ -176,50 +180,57 @@ class MyTaskCard extends StatelessWidget {
) )
], ],
), ),
Column( 48.hb,
crossAxisAlignment: CrossAxisAlignment.end, _cardBottom(),
children: [
40.w.heightBox,
Row(
children: [
Spacer(),
CardBottomButton.yellow(
text: '取消订单',
onPressed: () async {
var re = await TaskFunc.cancel(taskId: model.id);
if (re) {
refresh();
}
}),
],
),
],
),
], ],
), ),
), ),
); );
} }
Widget _cardBottom(int) { Widget _cardBottom() {
switch (int) { switch (model.status) {
case 1: case 1:
case 2: case 2:
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.end, crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
40.w.heightBox, 40.w.heightBox,
CardBottomButton.white(text: '取消订单', onPressed: () {}), CardBottomButton.white(
CardBottomButton.yellow(text: '确认完成', onPressed: () {}), text: '取消订单',
onPressed: () async {
var re = await TaskFunc.cancel(taskId: model.id);
if (re) {
refresh();
}
}),
], ],
); );
case 3:
return CardBottomButton.yellow(
text: '催促服务',
onPressed: () async {
var re = await TaskFunc.urge(taskId: model.id);
if (re) {
refresh();
}
});
case 4: case 4:
return CardBottomButton.yellow(
text: '确认完成',
onPressed: () async {
var re = await TaskFunc.confirm(taskId: model.id);
if (re) {
refresh();
}
});
case 9:
return Column( return Column(
children: [ children: [
32.w.heightBox, 32.w.heightBox,
Row( Row(
children: [ children: [
'客户取消:暂不需要该服务'.text.size(24.sp).color(Colors.red).make(), '取消:暂不需要该服务'.text.size(24.sp).color(Colors.red).make(),
Spacer(), Spacer(),
], ],
), ),

@ -1,10 +1,7 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/constants/saas_api.dart';
import 'package:aku_new_community/gen/assets.gen.dart'; import 'package:aku_new_community/gen/assets.gen.dart';
import 'package:aku_new_community/saas_model/task/my_task_list_model.dart'; import 'package:aku_new_community/saas_model/task/my_task_list_model.dart';
import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_cancel_dialog.dart'; import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_cancel_dialog.dart';
import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_evaluation_dialog.dart'; import 'package:aku_new_community/ui/function_and_service/task/dialogs/task_evaluation_dialog.dart';
import 'package:aku_new_community/utils/network/net_util.dart';
import 'package:aku_new_community/widget/bee_divider.dart'; import 'package:aku_new_community/widget/bee_divider.dart';
import 'package:aku_new_community/widget/bee_scaffold.dart'; import 'package:aku_new_community/widget/bee_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_long_button.dart'; import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
@ -36,16 +33,18 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
case 1: case 1:
return '已发布'; return '已发布';
case 2: case 2:
return '已接单';
case 3:
if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) { if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) {
return '已超时(原预计${DateUtil.formatDate(widget.model.endTime, format: DateFormats.h_m)}'; return '已超时(原预计${DateUtil.formatDate(widget.model.endTime, format: DateFormats.h_m)}';
} else { } else {
return '服务中'; return '服务中';
} }
case 3:
return '待确认';
case 4: case 4:
return '已完成'; return '待确认';
case 5: case 5:
return '已完成';
case 6:
return '已评价'; return '已评价';
case 9: case 9:
return '已取消'; return '已取消';
@ -57,18 +56,20 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
String get subStatusString { String get subStatusString {
switch (widget.model.status) { switch (widget.model.status) {
case 1: case 1:
return '请与发布人确认后开始服务'; return '等待开始服务';
case 2: case 2:
return '等待接单';
case 3:
if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) { if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) {
return '请及时提醒帮手完成任务'; return '请及时提醒帮手完成任务';
} else { } else {
return '帮手正在为您服务中'; return '帮手正在为您服务中';
} }
case 3:
return '请注意及时确认帮手的工作内容';
case 4: case 4:
return '欢迎对骑手及本次任务进行评价'; return '请注意及时确认帮手的工作内容';
case 5: case 5:
return '欢迎对骑手及本次任务进行评价';
case 6:
return '感谢信任与支持,欢迎再次光临'; return '感谢信任与支持,欢迎再次光临';
case 9: case 9:
return '请及时提醒帮手完成任务'; return '请及时提醒帮手完成任务';
@ -143,40 +144,13 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
), ),
], ],
), ),
bottomNavi: Container( bottomNavi: Offstage(
offstage: widget.model.status > 5,
child: Container(
width: double.infinity, width: double.infinity,
color: Colors.white, color: Colors.white,
padding: EdgeInsets.all(32.w), padding: EdgeInsets.all(32.w),
child: Row( child: buttonByStatus,
children: [
Offstage(
offstage: widget.model.status > 3,
child: MaterialButton(
onPressed: () async {
var re = await Get.bottomSheet(
TaskCancelDialog(taskId: widget.model.id));
if (re) {
Get.back();
}
},
minWidth: 330.w,
height: 80.w,
elevation: 0,
color: Colors.white,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.w),
side: BorderSide(color: Colors.black.withOpacity(0.25)),
),
child: Text(
'取消订单',
style: TextStyle(
fontSize: 28.sp, color: Colors.black.withOpacity(0.65)),
),
),
),
Spacer(),
buttonByStatus,
],
), ),
), ),
); );
@ -185,63 +159,36 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
Widget get buttonByStatus { Widget get buttonByStatus {
switch (widget.model.status) { switch (widget.model.status) {
case 1: case 1:
return MaterialButton( return BeeLongButton(
onPressed: () async {}, onPressed: () async {
minWidth: 330.w, var re = await Get.bottomSheet(
height: 80.w, TaskCancelDialog(taskId: widget.model.id));
elevation: 0, if (re) {
color: kPrimaryColor, Get.back();
shape: RoundedRectangleBorder( }
borderRadius: BorderRadius.circular(40.w), },
), text: '取消服务',
child: Text(
'修改任务',
style: TextStyle(
fontSize: 28.sp, color: Colors.black.withOpacity(0.85)),
),
); );
case 2: case 2:
return MaterialButton( return BeeLongButton(
onPressed: () async { onPressed: () async {
var base = await NetUtil().get(SAASAPI.task.urgeService, var re = await Get.bottomSheet(
params: {'taskId': widget.model.id}, showMessage: true); TaskCancelDialog(taskId: widget.model.id));
if (base.success) { if (re) {
Get.back(); Get.back();
} }
}, },
minWidth: 330.w, text: '取消服务',
height: 80.w,
elevation: 0,
color: kPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.w),
),
child: Text(
'催促服务',
style: TextStyle(
fontSize: 28.sp, color: Colors.black.withOpacity(0.85)),
),
); );
case 3: case 3:
return MaterialButton( return BeeLongButton(
onPressed: () async { onPressed: () async {
var re = await TaskFunc.confirm(taskId: widget.model.id); var re = await TaskFunc.urge(taskId: widget.model.id);
if (re) { if (re) {
Get.back(); Get.back();
} }
}, },
minWidth: 330.w, text: '催促服务',
height: 80.w,
elevation: 0,
color: kPrimaryColor,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(40.w),
),
child: Text(
'确认完成',
style: TextStyle(
fontSize: 28.sp, color: Colors.black.withOpacity(0.85)),
),
); );
case 4: case 4:
return BeeLongButton( return BeeLongButton(
@ -253,18 +200,25 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
}, },
)); ));
}, },
text: '点击评价', text: '确认完成',
); );
case 5: case 5:
return BeeLongButton.white( return BeeLongButton(
onPressed: () async {}, onPressed: () async {
text: '再次发布', var re = await Get.bottomSheet(TaskEvaluationDialog(
evaluate: (star, content) async {
return await TaskFunc.evaluate(
taskId: widget.model.id, star: star, evaluation: content);
},
));
},
text: '点击评价',
); );
case 9: case 9:
return BeeLongButton.white( // return BeeLongButton.white(
onPressed: () async {}, // onPressed: () async {},
text: '再次发布', // text: '再次发布',
); // );
default: default:
return SizedBox.shrink(); return SizedBox.shrink();
} }
@ -402,7 +356,8 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
widget.model.remarks.text (widget.model.remarks ?? '')
.text
.size(28.sp) .size(28.sp)
.color(Colors.black.withOpacity(0.65)) .color(Colors.black.withOpacity(0.65))
.make(), .make(),

@ -31,7 +31,7 @@ class _MyTaskViewState extends State<MyTaskView> {
path: SAASAPI.task.list, path: SAASAPI.task.list,
controller: widget.refreshController, controller: widget.refreshController,
extraParams: { extraParams: {
'taskModel': 2, 'taskModel': 3,
'type': widget.type == 0 ? null : widget.type, 'type': widget.type == 0 ? null : widget.type,
}, },
convert: (json) => convert: (json) =>

@ -515,7 +515,10 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
children: [ children: [
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
var re = await Get.to(() => AddAppointmentAddressPage()); var re = await Get.to(() => AddAppointmentAddressPage(
address: _accessAddress,
addressDetail: _accessAddressDetail,
));
if (re != null) { if (re != null) {
_accessAddress = re['address']; _accessAddress = re['address'];
_accessAddressDetail = re['addressDetail']; _accessAddressDetail = re['addressDetail'];
@ -596,7 +599,10 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
), ),
GestureDetector( GestureDetector(
onTap: () async { onTap: () async {
var re = await Get.to(() => AddAppointmentAddressPage()); var re = await Get.to(() => AddAppointmentAddressPage(
address: _serviceAddress,
addressDetail: _serviceAddressDetail,
));
if (re != null) { if (re != null) {
_serviceAddress = re['address']; _serviceAddress = re['address'];
_serviceAddressDetail = re['addressDetail']; _serviceAddressDetail = re['addressDetail'];
@ -698,7 +704,10 @@ class _PublishTaskPageState extends State<PublishTaskPage> {
offstage: _type == 1, offstage: _type == 1,
child: GestureDetector( child: GestureDetector(
onTap: () async { onTap: () async {
var re = await Get.to(() => AddAppointmentAddressPage()); var re = await Get.to(() => AddAppointmentAddressPage(
address: _accessAddress,
addressDetail: _accessAddressDetail,
));
if (re != null) { if (re != null) {
_accessAddress = re['address']; _accessAddress = re['address'];
_accessAddressDetail = re['addressDetail']; _accessAddressDetail = re['addressDetail'];

@ -48,9 +48,11 @@ class TaskFunc {
static Future<bool> cancel({ static Future<bool> cancel({
required int taskId, required int taskId,
}) async { }) async {
var base = await NetUtil().get(SAASAPI.task.cancel, params: { var base = await NetUtil().get(SAASAPI.task.cancel,
params: {
'taskId': taskId, 'taskId': taskId,
}); },
showMessage: true);
return base.success; return base.success;
} }
@ -72,9 +74,11 @@ class TaskFunc {
static Future<bool> finish({ static Future<bool> finish({
required int taskId, required int taskId,
}) async { }) async {
var base = await NetUtil().get(SAASAPI.task.finish, params: { var base = await NetUtil().get(SAASAPI.task.finish,
params: {
'taskId': taskId, 'taskId': taskId,
}); },
showMessage: true);
return base.success; return base.success;
} }
@ -82,9 +86,11 @@ class TaskFunc {
static Future<bool> confirm({ static Future<bool> confirm({
required int taskId, required int taskId,
}) async { }) async {
var base = await NetUtil().get(SAASAPI.task.confirm, params: { var base = await NetUtil().get(SAASAPI.task.confirm,
params: {
'taskId': taskId, 'taskId': taskId,
}); },
showMessage: true);
return base.success; return base.success;
} }
@ -92,9 +98,11 @@ class TaskFunc {
static Future<bool> start({ static Future<bool> start({
required int taskId, required int taskId,
}) async { }) async {
var base = await NetUtil().get(SAASAPI.task.startService, params: { var base = await NetUtil().get(SAASAPI.task.startService,
params: {
'taskId': taskId, 'taskId': taskId,
}); },
showMessage: true);
return base.success; return base.success;
} }
@ -108,4 +116,16 @@ class TaskFunc {
params: {'taskId': taskId, 'star': star, 'evaluation': evaluation}); params: {'taskId': taskId, 'star': star, 'evaluation': evaluation});
return base.success; return base.success;
} }
///
static Future<bool> urge({
required int taskId,
}) async {
var base = await NetUtil().get(SAASAPI.task.urgeService,
params: {
'taskId': taskId,
},
showMessage: true);
return base.success;
}
} }

@ -9,10 +9,11 @@ class TaskMap {
}; };
static Map<int, String> statusToString = { static Map<int, String> statusToString = {
1: '已发布', 1: '已发布',
2: '服务中', 2: '已接取',
3: '待确认', 3: '服务中',
4: '已完成', 4: '待确认',
5: '已评价', 5: '已完成',
6: '已评价',
9: '已取消' 9: '已取消'
}; };

@ -24,7 +24,7 @@ class _WorkOrderPageState extends State<WorkOrderPage>
with SingleTickerProviderStateMixin { with SingleTickerProviderStateMixin {
List<String> _tabs = ['全部', '待分配', '已接单', '处理中', '待确认']; List<String> _tabs = ['全部', '待分配', '已接单', '处理中', '待确认'];
late TabController _tabController; late TabController _tabController;
EasyRefreshController _refreshController = EasyRefreshController(); List<EasyRefreshController> _refreshControllers = [];
int _page = 1; int _page = 1;
int _size = 10; int _size = 10;
List<WorkOrderListModel> _models = []; List<WorkOrderListModel> _models = [];
@ -32,12 +32,15 @@ class _WorkOrderPageState extends State<WorkOrderPage>
@override @override
void initState() { void initState() {
_tabController = TabController(length: _tabs.length, vsync: this); _tabController = TabController(length: _tabs.length, vsync: this);
_refreshControllers = List.filled(_tabs.length, EasyRefreshController());
super.initState(); super.initState();
} }
@override @override
void dispose() { void dispose() {
_refreshController.dispose(); _refreshControllers.forEach((element) {
element.dispose();
});
_tabController.dispose(); _tabController.dispose();
super.dispose(); super.dispose();
} }
@ -50,7 +53,7 @@ class _WorkOrderPageState extends State<WorkOrderPage>
IconButton( IconButton(
onPressed: () async { onPressed: () async {
await Get.to(() => PublishWorkOrderPage()); await Get.to(() => PublishWorkOrderPage());
_refreshController.callRefresh(); _refreshControllers[_tabController.index].callRefresh();
}, },
icon: Icon( icon: Icon(
CupertinoIcons.plus_circle, CupertinoIcons.plus_circle,
@ -59,6 +62,10 @@ class _WorkOrderPageState extends State<WorkOrderPage>
], ],
appBarBottom: BeeTabBar( appBarBottom: BeeTabBar(
tabs: _tabs, tabs: _tabs,
onTap: (index) {
_models.clear();
setState(() {});
},
controller: _tabController, controller: _tabController,
), ),
body: TabBarView( body: TabBarView(
@ -71,12 +78,11 @@ class _WorkOrderPageState extends State<WorkOrderPage>
Widget _getOrderView(int index) { Widget _getOrderView(int index) {
return EasyRefresh( return EasyRefresh(
firstRefresh: true, firstRefresh: true,
controller: _refreshController, controller: _refreshControllers[index],
header: MaterialHeader(), header: MaterialHeader(),
footer: MaterialFooter(), footer: MaterialFooter(),
onRefresh: () async { onRefresh: () async {
_page = 1; _page = 1;
_models.clear();
try { try {
var base = await NetUtil().getList(SAASAPI.workOrder.list, params: { var base = await NetUtil().getList(SAASAPI.workOrder.list, params: {
'pageNum': _page, 'pageNum': _page,
@ -102,15 +108,17 @@ class _WorkOrderPageState extends State<WorkOrderPage>
base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList()); base.rows.map((e) => WorkOrderListModel.fromJson(e)).toList());
setState(() {}); setState(() {});
} else { } else {
_refreshController.finishLoad(noMore: true); _refreshControllers[index].finishLoad(noMore: true);
} }
}, },
child: ListView.separated( child: _models.isEmpty
? Container()
: ListView.separated(
padding: EdgeInsets.all(24.w), padding: EdgeInsets.all(24.w),
itemBuilder: (context, index) { itemBuilder: (context, index) {
return WorkOrderCard( return WorkOrderCard(
model: _models[index], model: _models[index],
refresh: _refreshController.callRefresh, refresh: _refreshControllers[index].callRefresh,
); );
}, },
separatorBuilder: (context, index) { separatorBuilder: (context, index) {

@ -313,8 +313,9 @@ class _MarketPageState extends State<MarketPage>
tabBarHeight + tabBarHeight +
ScreenUtil().statusBarHeight + ScreenUtil().statusBarHeight +
kToolbarHeight + kToolbarHeight +
280.w + 280.w,
172 * 2.w, //
// 172 * 2.w,
flexibleSpace: _flexibleSpaceBar(context), flexibleSpace: _flexibleSpaceBar(context),
bottom: PreferredSize( bottom: PreferredSize(
preferredSize: Size.fromHeight(tabBarHeight), preferredSize: Size.fromHeight(tabBarHeight),
@ -467,8 +468,8 @@ class _MarketPageState extends State<MarketPage>
_buttonTitle(), _buttonTitle(),
20.hb, 20.hb,
_recommend(), _recommend(),
20.hb, // 20.hb,
_integralMarket(), // _integralMarket(),
], ],
), ),
], ],

@ -1,12 +1,10 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/models/search/search_goods_model.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart'; import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/models/search/search_goods_model.dart';
import 'package:aku_new_community/ui/market/collection/collection_func.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'good_detail_page.dart'; import 'good_detail_page.dart';
class GoodsListCard extends StatefulWidget { class GoodsListCard extends StatefulWidget {
@ -157,26 +155,26 @@ class GoodsListCardState extends State<GoodsListCard> {
], ],
), ),
Spacer(), Spacer(),
GestureDetector( // GestureDetector(
onTap: () async { // onTap: () async {
await CollectionFunc.collection(widget.model.id!); // await CollectionFunc.collection(widget.model.id!);
//
if (widget.refreshController != null) { // if (widget.refreshController != null) {
widget.refreshController!.callRefresh(); // widget.refreshController!.callRefresh();
} // }
}, // },
child: (widget.model.isCollection ?? 0) != 0 // child: (widget.model.isCollection ?? 0) != 0
? Image.asset( // ? Image.asset(
R.ASSETS_ICONS_SHOP_FAVORFILL_PNG, // R.ASSETS_ICONS_SHOP_FAVORFILL_PNG,
width: 42.w, // width: 42.w,
height: 42.w, // height: 42.w,
) // )
: Image.asset( // : Image.asset(
R.ASSETS_ICONS_ICON_FAVOR_CHOOSE_PNG, // R.ASSETS_ICONS_ICON_FAVOR_CHOOSE_PNG,
width: 42.w, // width: 42.w,
height: 42.w, // height: 42.w,
), // ),
), // ),
24.wb, 24.wb,
], ],
), ),

@ -1,19 +1,16 @@
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/const/resource.dart';
import 'package:aku_new_community/provider/user_provider.dart'; import 'package:aku_new_community/provider/user_provider.dart';
import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart'; import 'package:aku_new_community/ui/profile/new_house/my_house_page.dart';
import 'package:aku_new_community/utils/headers.dart';
import 'package:aku_new_community/widget/others/user_tool.dart';
import 'package:flutter/cupertino.dart'; import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
import 'package:provider/provider.dart'; import 'package:provider/provider.dart';
import 'package:velocity_x/velocity_x.dart'; import 'package:velocity_x/velocity_x.dart';
import 'package:aku_new_community/base/base_style.dart';
import 'package:aku_new_community/const/resource.dart';
import 'package:aku_new_community/provider/app_provider.dart';
import 'package:aku_new_community/ui/profile/house/pick_my_house_page.dart';
import 'package:aku_new_community/utils/headers.dart';
class HouseHeadCard extends StatelessWidget { class HouseHeadCard extends StatelessWidget {
const HouseHeadCard({ const HouseHeadCard({
Key? key, Key? key,
@ -53,19 +50,22 @@ class HouseHeadCard extends StatelessWidget {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
S UserTool.userProvider.userInfoModel!.communityName.text
.of(context)!
.tempPlotName
.text
.black .black
.size(32.sp) .size(32.sp)
.bold .bold
.make(), .make(),
10.w.heightBox, 10.w.heightBox,
(userProvider.defaultHouse != null
(userProvider.defaultHouse!=null?(userProvider.defaultHouse!.buildingName+'栋-' ? (userProvider.defaultHouse!.buildingName +
+userProvider.defaultHouse!.unitName+'单元-'+userProvider.defaultHouse!.estateName+'' '栋-' +
):'').text.black userProvider.defaultHouse!.unitName +
'单元-' +
userProvider.defaultHouse!.estateName +
'')
: '')
.text
.black
.size(32.sp) .size(32.sp)
.bold .bold
.make() .make()

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save