|
|
|
@ -1,14 +1,4 @@
|
|
|
|
|
// Flutter imports:
|
|
|
|
|
import 'package:aku_new_community_manager/ui/widgets/common/aku_material_button.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
// Package imports:
|
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
|
import 'package:common_utils/common_utils.dart';
|
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
// Project imports:
|
|
|
|
|
import 'package:aku_new_community_manager/const/api.dart';
|
|
|
|
|
import 'package:aku_new_community_manager/models/manager/borrow/borrow_status_item_model.dart';
|
|
|
|
@ -16,8 +6,16 @@ import 'package:aku_new_community_manager/provider/user_provider.dart';
|
|
|
|
|
import 'package:aku_new_community_manager/style/app_style.dart';
|
|
|
|
|
import 'package:aku_new_community_manager/tools/widget_tool.dart';
|
|
|
|
|
import 'package:aku_new_community_manager/ui/sub_pages/borrow_manager/borrow_manager_check_page.dart';
|
|
|
|
|
import 'package:aku_new_community_manager/ui/widgets/common/aku_material_button.dart';
|
|
|
|
|
import 'package:aku_new_community_manager/ui/widgets/inner/aku_chip_box.dart';
|
|
|
|
|
import 'package:aku_new_community_manager/utils/network/net_util.dart';
|
|
|
|
|
// Package imports:
|
|
|
|
|
import 'package:bot_toast/bot_toast.dart';
|
|
|
|
|
import 'package:common_utils/common_utils.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:get/get.dart';
|
|
|
|
|
import 'package:provider/provider.dart';
|
|
|
|
|
import 'package:url_launcher/url_launcher.dart';
|
|
|
|
|
|
|
|
|
|
import 'borrow_manager_examine_page.dart';
|
|
|
|
|
|
|
|
|
@ -57,13 +55,19 @@ class _BorrowManagerCardState extends State<BorrowManagerCard> {
|
|
|
|
|
Text(
|
|
|
|
|
widget.model.borrowStatusValue,
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
color: widget.model.borrowStatus==-1?Color(0xFFFB7302):
|
|
|
|
|
widget.model.borrowStatus==0?Color(0xD9E60E0E):
|
|
|
|
|
widget.model.borrowStatus==1?Color(0xD9000000):
|
|
|
|
|
widget.model.borrowStatus==2?Color(0x73000000):
|
|
|
|
|
widget.model.borrowStatus==3?Color(0xD9FB7402):
|
|
|
|
|
widget.model.borrowStatus==4?Color(0xD9E60E0E):
|
|
|
|
|
AppStyle.failColor,
|
|
|
|
|
color: widget.model.borrowStatus == -1
|
|
|
|
|
? Color(0xFFFB7302)
|
|
|
|
|
: widget.model.borrowStatus == 0
|
|
|
|
|
? Color(0xD9E60E0E)
|
|
|
|
|
: widget.model.borrowStatus == 1
|
|
|
|
|
? Color(0xD9000000)
|
|
|
|
|
: widget.model.borrowStatus == 2
|
|
|
|
|
? Color(0x73000000)
|
|
|
|
|
: widget.model.borrowStatus == 3
|
|
|
|
|
? Color(0xD9FB7402)
|
|
|
|
|
: widget.model.borrowStatus == 4
|
|
|
|
|
? Color(0xD9E60E0E)
|
|
|
|
|
: AppStyle.failColor,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
fontSize: 24.sp,
|
|
|
|
|
),
|
|
|
|
@ -85,12 +89,17 @@ class _BorrowManagerCardState extends State<BorrowManagerCard> {
|
|
|
|
|
children: [
|
|
|
|
|
FadeInImage.assetNetwork(
|
|
|
|
|
placeholder: R.ASSETS_PLACEHOLDER_WEBP,
|
|
|
|
|
image: API.image(widget.model.imgUrls!.isEmpty?'':widget.model.imgUrls![0].url??''),
|
|
|
|
|
image: API.image(widget.model.imgUrls!.isEmpty
|
|
|
|
|
? ''
|
|
|
|
|
: widget.model.imgUrls![0].url ?? ''),
|
|
|
|
|
height: 184.w,
|
|
|
|
|
width: 184.w,
|
|
|
|
|
imageErrorBuilder: (context, error, stackTrace) {
|
|
|
|
|
return Image.asset(R.ASSETS_PLACEHOLDER_WEBP,height: 184.w,
|
|
|
|
|
width: 184.w,);
|
|
|
|
|
return Image.asset(
|
|
|
|
|
R.ASSETS_PLACEHOLDER_WEBP,
|
|
|
|
|
height: 184.w,
|
|
|
|
|
width: 184.w,
|
|
|
|
|
);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
AkuBox.w(24),
|
|
|
|
@ -122,7 +131,7 @@ class _BorrowManagerCardState extends State<BorrowManagerCard> {
|
|
|
|
|
|
|
|
|
|
List<Widget> _buildCard() {
|
|
|
|
|
final userProvider = Provider.of<UserProvider>(context);
|
|
|
|
|
if (!userProvider.infoModel!.canOperation)
|
|
|
|
|
if (!(userProvider.userInfoModel!.type == 1))
|
|
|
|
|
return [];
|
|
|
|
|
else if (widget.model.borrowStatus == 2) {
|
|
|
|
|
return [];
|
|
|
|
@ -190,7 +199,8 @@ class _BorrowManagerCardState extends State<BorrowManagerCard> {
|
|
|
|
|
color: AppStyle.primaryColor,
|
|
|
|
|
radius: 4.w,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await Get.to(BorrowManagerCheckPage(id: widget.model.id!));
|
|
|
|
|
await Get.to(
|
|
|
|
|
BorrowManagerCheckPage(id: widget.model.id!));
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
'检查信息',
|
|
|
|
@ -209,7 +219,11 @@ class _BorrowManagerCardState extends State<BorrowManagerCard> {
|
|
|
|
|
color: AppStyle.primaryColor,
|
|
|
|
|
radius: 4.w,
|
|
|
|
|
onPressed: () async {
|
|
|
|
|
await Get.to(BorrowManagerExaminePage(id: widget.model.id!, model: widget.model, type: 1,));
|
|
|
|
|
await Get.to(BorrowManagerExaminePage(
|
|
|
|
|
id: widget.model.id!,
|
|
|
|
|
model: widget.model,
|
|
|
|
|
type: 1,
|
|
|
|
|
));
|
|
|
|
|
},
|
|
|
|
|
child: Text(
|
|
|
|
|
'点击审核',
|
|
|
|
|