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');
}
class $AssetsJsonGen {
const $AssetsJsonGen();
}
class $AssetsNewIconGen {
const $AssetsNewIconGen();
@ -1529,6 +1533,7 @@ class Assets {
static const $AssetsHomeGen home = $AssetsHomeGen();
static const $AssetsIconsGen icons = $AssetsIconsGen();
static const $AssetsImagesGen images = $AssetsImagesGen();
static const $AssetsJsonGen json = $AssetsJsonGen();
static const $AssetsNewIconGen newIcon = $AssetsNewIconGen();
static const $AssetsStaticGen static = $AssetsStaticGen();
static const $AssetsTabGen tab = $AssetsTabGen();

@ -11,7 +11,7 @@ ReplyListModel _$ReplyListModelFromJson(Map<String, dynamic> json) =>
id: json['id'] as int,
type: json['type'] 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,
sendName: json['sendName'] as String,
sendDate: json['sendDate'] as String,

@ -84,65 +84,6 @@ class _LifePayPageNewState extends State<LifePayPageNew> {
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

@ -1,5 +1,4 @@
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/pages/life_pay/pay_finish_page.dart';
import 'package:aku_new_community/pages/life_pay/pay_util.dart';
@ -68,16 +67,15 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
16.w.widthBox,
TextField(
controller: _editingController,
onChanged: (String value){
if(value.isEmpty){
onChanged: (String value) {
if (value.isEmpty) {
amount = 0;
}else{
} else {
amount = double.parse(value);
}
},
decoration: InputDecoration(
hintText: '0.0',
hintText: '0.00',
hintStyle: TextStyle(
fontSize: 56.sp,
fontWeight: FontWeight.bold,
@ -165,11 +163,11 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
onPressed: () async {
Function cancel = BotToast.showLoading();
try {
BaseModel baseModel =
await NetUtil().post(SAASAPI.pay.createPrepaymentOrder,
BaseModel baseModel = await NetUtil().post(
SAASAPI.pay.createPrepaymentOrder,
params: {
'estateId': UserTool.userProvider.defaultHouse!.id,
'payAmount':amount
'payAmount': amount
},
showMessage: true);
if (baseModel.success) {
@ -180,7 +178,7 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
Get.off(() => PayFinishPage());
} else {
///
BotToast.showText(text: '充值失败');
BotToast.showText(text: '充值失败');
}
}
cancel();
@ -188,7 +186,6 @@ class _LifePrePayPageState extends State<LifePrePayPage> {
cancel();
LoggerData.addData(e);
}
},
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/widget/bee_scaffold.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_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
@ -44,61 +45,68 @@ class _SetPsdPageState extends State<SetPsdPage> {
@override
Widget build(BuildContext context) {
return BeeScaffold(
title: '',
bodyColor: Colors.white,
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
24.w.heightBox,
Row(
children: [
48.w.widthBox,
'首次登陆,请设置账号密码'
.text
.size(36.sp)
.bold
.color(Colors.black.withOpacity(0.65))
.make(),
Spacer(),
],
),
16.w.heightBox,
Row(
children: [
48.w.widthBox,
'密码需由6-20位数字、字母、或符号组成至少两种'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
],
),
144.w.heightBox,
PsdTextField(controller: _psdController, hintText: '请输入密码'),
24.w.heightBox,
PsdTextField(controller: _confirmPsdController, hintText: '请再次输入密码'),
16.w.heightBox,
PsdVerify.checkString(psdCheck)
.text
.size(28.sp)
.color(Color(0xFFCF1322).withOpacity(0.8))
.make(),
37.w.heightBox,
LoginButtonWidget(
onTap: psdCheck == PSDVERIFY.correct
? () async {
var result =
await SignFunc.settingPsd(_psdController.text);
if (result) {
await UserTool.userProvider.updateUserInfo();
await SignFunc.checkNameAndAccount();
return WillPopScope(
onWillPop: () async {
BotToast.showText(text: '请设置密码');
return false;
},
child: BeeScaffold(
title: '',
bodyColor: Colors.white,
body: Column(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
24.w.heightBox,
Row(
children: [
48.w.widthBox,
'首次登陆,请设置账号密码'
.text
.size(36.sp)
.bold
.color(Colors.black.withOpacity(0.65))
.make(),
Spacer(),
],
),
16.w.heightBox,
Row(
children: [
48.w.widthBox,
'密码需由6-20位数字、字母、或符号组成至少两种'
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
Spacer(),
],
),
144.w.heightBox,
PsdTextField(controller: _psdController, hintText: '请输入密码'),
24.w.heightBox,
PsdTextField(
controller: _confirmPsdController, hintText: '请再次输入密码'),
16.w.heightBox,
PsdVerify.checkString(psdCheck)
.text
.size(28.sp)
.color(Color(0xFFCF1322).withOpacity(0.8))
.make(),
37.w.heightBox,
LoginButtonWidget(
onTap: psdCheck == PSDVERIFY.correct
? () async {
var result =
await SignFunc.settingPsd(_psdController.text);
if (result) {
await UserTool.userProvider.updateUserInfo();
await SignFunc.checkNameAndAccount();
}
}
}
: null,
text: '确认'),
],
: null,
text: '确认'),
],
),
),
);
}

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

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

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

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

@ -6,7 +6,11 @@ import 'package:flutter/material.dart';
import 'package:get/get.dart';
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
_AddAppointmentAddressPageState createState() =>
@ -17,6 +21,17 @@ class _AddAppointmentAddressPageState extends State<AddAppointmentAddressPage> {
TextEditingController _controller = 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
void dispose() {
_controller.dispose();

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

@ -47,8 +47,9 @@ class MyTakeTaskCard extends StatelessWidget {
],
);
return GestureDetector(
onTap: () {
Get.to(() => MyTakeTaskDetailPage(model: model));
onTap: () async {
await Get.to(() => MyTakeTaskDetailPage(model: model));
refresh();
},
child: Container(
width: double.infinity,
@ -116,7 +117,8 @@ class MyTakeTaskCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
model.remarks.text
(model.remarks ?? "")
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
@ -170,17 +172,25 @@ class MyTakeTaskCard extends StatelessWidget {
)
],
),
_cardBottom(model.status),
_cardBottom(),
],
),
),
);
}
Widget _cardBottom(int) {
switch (int) {
case 1:
Widget _cardBottom() {
switch (model.status) {
case 2:
return CardBottomButton.yellow(
text: '开始服务',
onPressed: () async {
var re = await TaskFunc.start(taskId: model.id);
if (re) {
refresh();
}
});
case 3:
return Column(
children: [
40.w.heightBox,
@ -196,7 +206,7 @@ class MyTakeTaskCard extends StatelessWidget {
// }
// }),
CardBottomButton.yellow(
text: '确认完成',
text: '完成任务',
onPressed: () async {
var re = await TaskFunc.finish(taskId: model.id);
if (re) {
@ -207,7 +217,7 @@ class MyTakeTaskCard extends StatelessWidget {
)
],
);
case 4:
case 9:
return Column(
children: [
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/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_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
@ -31,18 +29,20 @@ class _MyTakeTaskDetailPageState extends State<MyTakeTaskDetailPage> {
String get detailStatusToString {
switch (widget.model.status) {
case 1:
return '服务';
return '领取';
case 2:
return '待服务';
case 3:
if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) {
return '已超时(原预计${DateUtil.formatDate(widget.model.endTime, format: DateFormats.h_m)}';
} else {
return '服务中';
}
case 3:
return '等待用户确认';
case 4:
return '已完成';
return '等待用户确认';
case 5:
return '已完成';
case 6:
return '已评价';
case 9:
return '已取消';
@ -54,18 +54,20 @@ class _MyTakeTaskDetailPageState extends State<MyTakeTaskDetailPage> {
String get subStatusString {
switch (widget.model.status) {
case 1:
return '请与发布人确认后开始服务';
return '等待接单';
case 2:
return '请与发布人确认后开始服务';
case 3:
if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) {
return '请及时提醒帮手完成任务';
} else {
return '帮手正在为您服务中';
}
case 3:
return '请注意及时确认帮手的工作内容';
case 4:
return '欢迎对骑手及本次任务进行评价';
return '请注意及时确认帮手的工作内容';
case 5:
return '欢迎对骑手及本次任务进行评价';
case 6:
return '感谢信任与支持,欢迎再次光临';
case 9:
return '请及时提醒帮手完成任务';
@ -140,37 +142,13 @@ class _MyTakeTaskDetailPageState extends State<MyTakeTaskDetailPage> {
),
],
),
bottomNavi: Container(
width: double.infinity,
color: Colors.white,
padding: EdgeInsets.all(32.w),
child: Row(
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,
],
bottomNavi: Offstage(
offstage: widget.model.status > 3,
child: Container(
width: double.infinity,
color: Colors.white,
padding: EdgeInsets.all(32.w),
child: buttonByStatus,
),
),
);
@ -179,47 +157,25 @@ class _MyTakeTaskDetailPageState extends State<MyTakeTaskDetailPage> {
Widget get buttonByStatus {
switch (widget.model.status) {
case 1:
return MaterialButton(
onPressed: () async {
var re = await TaskFunc.start(taskId: widget.model.id);
if (re) {
Get.back();
}
},
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)),
),
);
return SizedBox.shrink();
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)),
),
);
return BeeLongButton(
onPressed: () async {
var re = await TaskFunc.start(taskId: widget.model.id);
if (re) {
Get.back();
}
},
text: '开始服务');
case 3:
return BeeLongButton(
onPressed: () async {},
text: '提醒用户',
);
onPressed: () async {
var re = await TaskFunc.finish(taskId: widget.model.id);
if (re) {
Get.back();
}
},
text: '完成任务');
case 4:
case 5:
case 9:
@ -360,7 +316,8 @@ class _MyTakeTaskDetailPageState extends State<MyTakeTaskDetailPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
widget.model.remarks.text
(widget.model.remarks ?? '')
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.65))
.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/saas_model/task/my_task_list_model.dart';
import 'package:aku_new_community/widget/buttons/card_bottom_button.dart';
@ -72,6 +73,7 @@ class MyTaskCard extends StatelessWidget {
return GestureDetector(
onTap: () async {
await Get.to(() => MyTaskDetailPage(model: model));
refresh();
},
child: Container(
width: double.infinity,
@ -81,6 +83,7 @@ class MyTaskCard extends StatelessWidget {
),
padding: EdgeInsets.symmetric(horizontal: 24.w, vertical: 24.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
head,
24.w.heightBox,
@ -122,7 +125,8 @@ class MyTaskCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
model.remarks.text
(model.remarks ?? '')
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.65))
.make(),
@ -176,50 +180,57 @@ class MyTaskCard extends StatelessWidget {
)
],
),
Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
40.w.heightBox,
Row(
children: [
Spacer(),
CardBottomButton.yellow(
text: '取消订单',
onPressed: () async {
var re = await TaskFunc.cancel(taskId: model.id);
if (re) {
refresh();
}
}),
],
),
],
),
48.hb,
_cardBottom(),
],
),
),
);
}
Widget _cardBottom(int) {
switch (int) {
Widget _cardBottom() {
switch (model.status) {
case 1:
case 2:
return Column(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
40.w.heightBox,
CardBottomButton.white(text: '取消订单', onPressed: () {}),
CardBottomButton.yellow(text: '确认完成', onPressed: () {}),
CardBottomButton.white(
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:
return CardBottomButton.yellow(
text: '确认完成',
onPressed: () async {
var re = await TaskFunc.confirm(taskId: model.id);
if (re) {
refresh();
}
});
case 9:
return Column(
children: [
32.w.heightBox,
Row(
children: [
'客户取消:暂不需要该服务'.text.size(24.sp).color(Colors.red).make(),
'取消:暂不需要该服务'.text.size(24.sp).color(Colors.red).make(),
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/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_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_scaffold.dart';
import 'package:aku_new_community/widget/buttons/bee_long_button.dart';
@ -36,16 +33,18 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
case 1:
return '已发布';
case 2:
return '已接单';
case 3:
if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) {
return '已超时(原预计${DateUtil.formatDate(widget.model.endTime, format: DateFormats.h_m)}';
} else {
return '服务中';
}
case 3:
return '待确认';
case 4:
return '已完成';
return '待确认';
case 5:
return '已完成';
case 6:
return '已评价';
case 9:
return '已取消';
@ -57,18 +56,20 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
String get subStatusString {
switch (widget.model.status) {
case 1:
return '请与发布人确认后开始服务';
return '等待开始服务';
case 2:
return '等待接单';
case 3:
if (widget.model.endTime?.isBefore(DateTime.now()) ?? false) {
return '请及时提醒帮手完成任务';
} else {
return '帮手正在为您服务中';
}
case 3:
return '请注意及时确认帮手的工作内容';
case 4:
return '欢迎对骑手及本次任务进行评价';
return '请注意及时确认帮手的工作内容';
case 5:
return '欢迎对骑手及本次任务进行评价';
case 6:
return '感谢信任与支持,欢迎再次光临';
case 9:
return '请及时提醒帮手完成任务';
@ -143,40 +144,13 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
),
],
),
bottomNavi: Container(
width: double.infinity,
color: Colors.white,
padding: EdgeInsets.all(32.w),
child: Row(
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,
],
bottomNavi: Offstage(
offstage: widget.model.status > 5,
child: Container(
width: double.infinity,
color: Colors.white,
padding: EdgeInsets.all(32.w),
child: buttonByStatus,
),
),
);
@ -185,63 +159,36 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
Widget get buttonByStatus {
switch (widget.model.status) {
case 1:
return MaterialButton(
onPressed: () async {},
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)),
),
return BeeLongButton(
onPressed: () async {
var re = await Get.bottomSheet(
TaskCancelDialog(taskId: widget.model.id));
if (re) {
Get.back();
}
},
text: '取消服务',
);
case 2:
return MaterialButton(
return BeeLongButton(
onPressed: () async {
var base = await NetUtil().get(SAASAPI.task.urgeService,
params: {'taskId': widget.model.id}, showMessage: true);
if (base.success) {
var re = await Get.bottomSheet(
TaskCancelDialog(taskId: widget.model.id));
if (re) {
Get.back();
}
},
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)),
),
text: '取消服务',
);
case 3:
return MaterialButton(
return BeeLongButton(
onPressed: () async {
var re = await TaskFunc.confirm(taskId: widget.model.id);
var re = await TaskFunc.urge(taskId: widget.model.id);
if (re) {
Get.back();
}
},
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)),
),
text: '催促服务',
);
case 4:
return BeeLongButton(
@ -253,18 +200,25 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
},
));
},
text: '点击评价',
text: '确认完成',
);
case 5:
return BeeLongButton.white(
onPressed: () async {},
text: '再次发布',
return BeeLongButton(
onPressed: () async {
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:
return BeeLongButton.white(
onPressed: () async {},
text: '再次发布',
);
// return BeeLongButton.white(
// onPressed: () async {},
// text: '再次发布',
// );
default:
return SizedBox.shrink();
}
@ -402,7 +356,8 @@ class _MyTaskDetailPageState extends State<MyTaskDetailPage> {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
widget.model.remarks.text
(widget.model.remarks ?? '')
.text
.size(28.sp)
.color(Colors.black.withOpacity(0.65))
.make(),

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

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

@ -48,9 +48,11 @@ class TaskFunc {
static Future<bool> cancel({
required int taskId,
}) async {
var base = await NetUtil().get(SAASAPI.task.cancel, params: {
'taskId': taskId,
});
var base = await NetUtil().get(SAASAPI.task.cancel,
params: {
'taskId': taskId,
},
showMessage: true);
return base.success;
}
@ -72,9 +74,11 @@ class TaskFunc {
static Future<bool> finish({
required int taskId,
}) async {
var base = await NetUtil().get(SAASAPI.task.finish, params: {
'taskId': taskId,
});
var base = await NetUtil().get(SAASAPI.task.finish,
params: {
'taskId': taskId,
},
showMessage: true);
return base.success;
}
@ -82,9 +86,11 @@ class TaskFunc {
static Future<bool> confirm({
required int taskId,
}) async {
var base = await NetUtil().get(SAASAPI.task.confirm, params: {
'taskId': taskId,
});
var base = await NetUtil().get(SAASAPI.task.confirm,
params: {
'taskId': taskId,
},
showMessage: true);
return base.success;
}
@ -92,9 +98,11 @@ class TaskFunc {
static Future<bool> start({
required int taskId,
}) async {
var base = await NetUtil().get(SAASAPI.task.startService, params: {
'taskId': taskId,
});
var base = await NetUtil().get(SAASAPI.task.startService,
params: {
'taskId': taskId,
},
showMessage: true);
return base.success;
}
@ -108,4 +116,16 @@ class TaskFunc {
params: {'taskId': taskId, 'star': star, 'evaluation': evaluation});
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 = {
1: '已发布',
2: '服务中',
3: '待确认',
4: '已完成',
5: '已评价',
2: '已接取',
3: '服务中',
4: '待确认',
5: '已完成',
6: '已评价',
9: '已取消'
};

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

@ -313,8 +313,9 @@ class _MarketPageState extends State<MarketPage>
tabBarHeight +
ScreenUtil().statusBarHeight +
kToolbarHeight +
280.w +
172 * 2.w,
280.w,
//
// 172 * 2.w,
flexibleSpace: _flexibleSpaceBar(context),
bottom: PreferredSize(
preferredSize: Size.fromHeight(tabBarHeight),
@ -467,8 +468,8 @@ class _MarketPageState extends State<MarketPage>
_buttonTitle(),
20.hb,
_recommend(),
20.hb,
_integralMarket(),
// 20.hb,
// _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_easyrefresh/easy_refresh.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';
class GoodsListCard extends StatefulWidget {
@ -157,26 +155,26 @@ class GoodsListCardState extends State<GoodsListCard> {
],
),
Spacer(),
GestureDetector(
onTap: () async {
await CollectionFunc.collection(widget.model.id!);
if (widget.refreshController != null) {
widget.refreshController!.callRefresh();
}
},
child: (widget.model.isCollection ?? 0) != 0
? Image.asset(
R.ASSETS_ICONS_SHOP_FAVORFILL_PNG,
width: 42.w,
height: 42.w,
)
: Image.asset(
R.ASSETS_ICONS_ICON_FAVOR_CHOOSE_PNG,
width: 42.w,
height: 42.w,
),
),
// GestureDetector(
// onTap: () async {
// await CollectionFunc.collection(widget.model.id!);
//
// if (widget.refreshController != null) {
// widget.refreshController!.callRefresh();
// }
// },
// child: (widget.model.isCollection ?? 0) != 0
// ? Image.asset(
// R.ASSETS_ICONS_SHOP_FAVORFILL_PNG,
// width: 42.w,
// height: 42.w,
// )
// : Image.asset(
// R.ASSETS_ICONS_ICON_FAVOR_CHOOSE_PNG,
// width: 42.w,
// height: 42.w,
// ),
// ),
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/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/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:provider/provider.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 {
const HouseHeadCard({
Key? key,
@ -53,19 +50,22 @@ class HouseHeadCard extends StatelessWidget {
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
S
.of(context)!
.tempPlotName
.text
UserTool.userProvider.userInfoModel!.communityName.text
.black
.size(32.sp)
.bold
.make(),
10.w.heightBox,
(userProvider.defaultHouse!=null?(userProvider.defaultHouse!.buildingName+'栋-'
+userProvider.defaultHouse!.unitName+'单元-'+userProvider.defaultHouse!.estateName+''
):'').text.black
(userProvider.defaultHouse != null
? (userProvider.defaultHouse!.buildingName +
'栋-' +
userProvider.defaultHouse!.unitName +
'单元-' +
userProvider.defaultHouse!.estateName +
'')
: '')
.text
.black
.size(32.sp)
.bold
.make()

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