Browse Source

Merge branch 'refs/heads/wr_2024_invoice' into wr_2023_new_business_new

# Conflicts:
#	pubspec.lock
#	pubspec.yaml
wr_2024_invoice
wurong 5 months ago
parent
commit
21d1d59db3
  1. 4
      android/app/build.gradle
  2. 4
      android/gradle.properties
  3. BIN
      assets/image/2x/disenable_seletor_tow.webp
  4. BIN
      assets/image/2x/invoice_history.webp
  5. BIN
      assets/image/2x/invoice_title.webp
  6. BIN
      assets/image/2x/tip_info.webp
  7. BIN
      assets/image/2x/title_del.webp
  8. BIN
      assets/image/2x/title_info_edit.webp
  9. BIN
      assets/image/3x/disenable_seletor_tow.webp
  10. BIN
      assets/image/3x/invoice_history.webp
  11. BIN
      assets/image/3x/invoice_title.webp
  12. BIN
      assets/image/3x/tip_info.webp
  13. BIN
      assets/image/3x/title_del.webp
  14. BIN
      assets/image/3x/title_info_edit.webp
  15. BIN
      assets/image/disenable_seletor_tow.webp
  16. BIN
      assets/image/invoice_history.webp
  17. BIN
      assets/image/invoice_title.webp
  18. BIN
      assets/image/tip_info.webp
  19. BIN
      assets/image/title_del.webp
  20. BIN
      assets/image/title_info_edit.webp
  21. 12
      ios/Podfile.lock
  22. 6
      ios/Runner.xcodeproj/project.pbxproj
  23. 2
      ios/Runner/Info.plist
  24. 6
      lib/generated/intl/messages_en.dart
  25. 6
      lib/generated/intl/messages_en_US.dart
  26. 6
      lib/generated/intl/messages_zh_CN.dart
  27. 6
      lib/generated/intl/messages_zh_Hans_CN.dart
  28. 6
      lib/generated/intl/messages_zh_Hant_CN.dart
  29. 6
      lib/generated/intl/messages_zh_TW.dart
  30. 12
      lib/generated/l10n.dart
  31. 197
      lib/home/help_farmers/help_farmers_page.dart
  32. 4
      lib/home/home_page.dart
  33. 6
      lib/l10n/intl_en.arb
  34. 6
      lib/l10n/intl_en_US.arb
  35. 6
      lib/l10n/intl_zh_CN.arb
  36. 6
      lib/l10n/intl_zh_Hans_CN.arb
  37. 6
      lib/l10n/intl_zh_Hant_CN.arb
  38. 6
      lib/l10n/intl_zh_TW.arb
  39. 20
      lib/main.dart
  40. 57
      lib/mine/coupon_page.dart
  41. 2
      lib/mine/mine_page.dart
  42. 12
      lib/mine/mine_view/mine_item.dart
  43. 857
      lib/order/invoices_manage/add_invoices_title.dart
  44. 600
      lib/order/invoices_manage/edit_invoices_info.dart
  45. 820
      lib/order/invoices_manage/invoices_detail_page.dart
  46. 463
      lib/order/invoices_manage/invoices_history.dart
  47. 679
      lib/order/invoices_manage/invoices_manage_page.dart
  48. 577
      lib/order/invoices_manage/invoices_title_info.dart
  49. 195
      lib/order/invoices_manage/pdf_screen.dart
  50. 2
      lib/order/order_history_page.dart
  51. 1212
      lib/retrofit/data/invoice_list.dart
  52. 1515
      lib/retrofit/data/invoices_detail_info.dart
  53. 385
      lib/retrofit/data/invoices_history_list.dart
  54. 286
      lib/retrofit/data/title_info_list.dart
  55. 39
      lib/retrofit/retrofit_api.dart
  56. 202
      lib/retrofit/retrofit_api.g.dart
  57. 41
      lib/store/store_view/product_sku.dart
  58. 17
      lib/store/store_view/store_info.dart
  59. 19
      lib/union/union_list.dart
  60. 2
      lib/utils/location.dart
  61. 28
      lib/utils/status_utils.dart
  62. 122
      pubspec.lock
  63. 8
      pubspec.yaml

4
android/app/build.gradle

@ -168,6 +168,10 @@ android {
exclude 'assets/main_icon_zoomin.png'
exclude 'assets/cfg/a/mode_1/reduct.sty'
exclude 'assets/SDK_Default_Traffic_Texture_SevereCongestion.png'
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
}
aaptOptions {
additionalParameters '--auto-add-overlay'

4
android/gradle.properties

@ -1,10 +1,10 @@
#org.gradle.jvmargs=-Xmx1536M
org.gradle.jvmargs=-Xmx1536M
#org.gradle.jvmargs=-Xmx4096m
android.useAndroidX=true
android.enableJetifier=true
MobSDK.mobEnv=x
MobSDK.spEdition=FP
android.injected.testOnly=false
org.gradle.jvmargs=-Xmx1536M --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED
#org.gradle.jvmargs=-Xmx1536M --add-exports=java.base/sun.nio.ch=ALL-UNNAMED --add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED

BIN
assets/image/2x/disenable_seletor_tow.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

BIN
assets/image/2x/invoice_history.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 739 B

After

Width:  |  Height:  |  Size: 486 B

BIN
assets/image/2x/invoice_title.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 457 B

After

Width:  |  Height:  |  Size: 388 B

BIN
assets/image/2x/tip_info.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

BIN
assets/image/2x/title_del.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

BIN
assets/image/2x/title_info_edit.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

BIN
assets/image/3x/disenable_seletor_tow.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 478 B

BIN
assets/image/3x/invoice_history.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 636 B

BIN
assets/image/3x/invoice_title.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 552 B

After

Width:  |  Height:  |  Size: 450 B

BIN
assets/image/3x/tip_info.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 582 B

BIN
assets/image/3x/title_del.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

BIN
assets/image/3x/title_info_edit.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

BIN
assets/image/disenable_seletor_tow.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

BIN
assets/image/invoice_history.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 400 B

After

Width:  |  Height:  |  Size: 256 B

BIN
assets/image/invoice_title.webp

Binary file not shown.

Before

Width:  |  Height:  |  Size: 294 B

After

Width:  |  Height:  |  Size: 260 B

BIN
assets/image/tip_info.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

BIN
assets/image/title_del.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

BIN
assets/image/title_info_edit.webp

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

12
ios/Podfile.lock

@ -17,12 +17,14 @@ PODS:
- emoji_picker_flutter (0.0.1):
- Flutter
- Flutter (1.0.0)
- flutter_pdfview (1.0.2):
- Flutter
- fluwx (0.0.1):
- Flutter
- "OpenWeChatSDK (~> 1.9.2+1)"
- geolocator (6.2.0):
- Flutter
- image_gallery_saver (1.5.0):
- image_gallery_saver (2.0.2):
- Flutter
- image_pickers (0.0.1):
- AFNetworking
@ -102,6 +104,7 @@ PODS:
DEPENDENCIES:
- emoji_picker_flutter (from `.symlinks/plugins/emoji_picker_flutter/ios`)
- Flutter (from `Flutter`)
- flutter_pdfview (from `.symlinks/plugins/flutter_pdfview/ios`)
- fluwx (from `.symlinks/plugins/fluwx/ios`)
- geolocator (from `.symlinks/plugins/geolocator/ios`)
- image_gallery_saver (from `.symlinks/plugins/image_gallery_saver/ios`)
@ -140,6 +143,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/emoji_picker_flutter/ios"
Flutter:
:path: Flutter
flutter_pdfview:
:path: ".symlinks/plugins/flutter_pdfview/ios"
fluwx:
:path: ".symlinks/plugins/fluwx/ios"
geolocator:
@ -181,9 +186,10 @@ SPEC CHECKSUMS:
AFNetworking: 3bd23d814e976cd148d7d44c3ab78017b744cd58
emoji_picker_flutter: df19dac03a2b39ac667dc8d1da939ef3a9e21347
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
flutter_pdfview: 25f53dd6097661e6395b17de506e6060585946bd
fluwx: 79c66b6d795ab8208262ada215d9e60388cfe492
geolocator: f5e3de65e241caba7ce3e8a618803387bda73384
image_gallery_saver: 259eab68fb271cfd57d599904f7acdc7832e7ef2
image_gallery_saver: cb43cc43141711190510e92c460eb1655cd343cb
image_pickers: 25c8916d358bc9d2707cb470ba3d57497f105773
mob_sharesdk: 0698d60b3c1549a5b0bcfdec6f407439dd2960c0
MOBFoundation: 6df2684b4db4f0f5bd71b0623f82e11271bf7ac8
@ -203,7 +209,7 @@ SPEC CHECKSUMS:
UMCommon: 47e0b53f6a36568e958a5abd005ed7577fcac9ad
UMDevice: 9ef8045b59e0479cff7062915c879a1af46fa094
umeng_common_sdk: a8abd7f86dfd013dbbeeae587ee143760c6582f2
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
url_launcher: a1c0cc845906122c4784c542523d8cacbded5626
video_player_avfoundation: 6d971a232d72e6ee25368378d48a079dea01f1cf
wakelock: d0fc7c864128eac40eba1617cb5264d9c940b46f
webview_flutter: 5fb4def2bbd4339889ee14d045b605cefc5bc232

6
ios/Runner.xcodeproj/project.pbxproj

@ -602,7 +602,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -806,7 +806,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@ -896,7 +896,7 @@
CLANG_ALLOW_NON_MODULAR_INCLUDES_IN_FRAMEWORK_MODULES = NO;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = YF3Q8DVP52;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (

2
ios/Runner/Info.plist

@ -71,7 +71,7 @@
<string>alipay</string>
<key>CFBundleURLSchemes</key>
<array>
<string>alipay2021003156646403</string>
<string>alipay2021003156646404</string>
</array>
</dict>
</array>

6
lib/generated/intl/messages_en.dart

@ -618,7 +618,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tixian" : MessageLookupByLibrary.simpleMessage("提现"),
"tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意并继续"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("通知"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用海峡姐妹App时打开通知的接收"),
"toushuxuzhi" : MessageLookupByLibrary.simpleMessage("投书须知"),
"touxiang" : MessageLookupByLibrary.simpleMessage("头像"),
"tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"),
@ -647,7 +647,7 @@ class MessageLookup extends MessageLookupByLibrary {
"weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"),
"weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用海峡姐妹App时让我们使用位置信息"),
"wentijian" : MessageLookupByLibrary.simpleMessage("问题件"),
"wenzhang" : MessageLookupByLibrary.simpleMessage("文章"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"),
@ -679,7 +679,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"),
"xiangce" : MessageLookupByLibrary.simpleMessage("相册"),
"xiangji" : MessageLookupByLibrary.simpleMessage("相机"),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用海峡姐妹App时让我们使用相机功能"),
"xiangqing" : MessageLookupByLibrary.simpleMessage("详情"),
"xiangxidizhi" : MessageLookupByLibrary.simpleMessage("详细地址"),
"xianshangfafang" : MessageLookupByLibrary.simpleMessage("线上发放"),

6
lib/generated/intl/messages_en_US.dart

@ -618,7 +618,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tixian" : MessageLookupByLibrary.simpleMessage("Withdrawal"),
"tongyibingjixu" : MessageLookupByLibrary.simpleMessage("Agree and Continue"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("Notification"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("In order that you can receive our activity information in time, it is recommended that you open the receipt of notifications when using HISAPP"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("In order that you can receive our activity information in time, it is recommended that you open the receipt of notifications when using Channel sisters App"),
"toushuxuzhi" : MessageLookupByLibrary.simpleMessage("Instructions for Submission"),
"touxiang" : MessageLookupByLibrary.simpleMessage("avatar"),
"tuichudenglu" : MessageLookupByLibrary.simpleMessage("Log out"),
@ -647,7 +647,7 @@ class MessageLookup extends MessageLookupByLibrary {
"weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("It is recommended that you open the storage permission during use in order to obtain photo usage, caching and other functions"),
"weiwancheng" : MessageLookupByLibrary.simpleMessage("Incomplete"),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("WeChat payment"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("In order to recommend the nearby store information to you, we recommend that you let us use the location information when using HISAPP"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("In order to recommend the nearby store information to you, we recommend that you let us use the location information when using Channel sisters App"),
"wentijian" : MessageLookupByLibrary.simpleMessage("Problem piece"),
"wenzhang" : MessageLookupByLibrary.simpleMessage("Article"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("Article Details"),
@ -679,7 +679,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xialashuaxin" : MessageLookupByLibrary.simpleMessage("Pull down Refresh"),
"xiangce" : MessageLookupByLibrary.simpleMessage("album"),
"xiangji" : MessageLookupByLibrary.simpleMessage("camera"),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("For you to share in the process of using, I hope you can let us use the camera function when using HISAPP"),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("For you to share in the process of using, I hope you can let us use the camera function when using Channel sisters App"),
"xiangqing" : MessageLookupByLibrary.simpleMessage("universal"),
"xiangxidizhi" : MessageLookupByLibrary.simpleMessage("Detailed Address"),
"xianshangfafang" : MessageLookupByLibrary.simpleMessage("online distribution"),

6
lib/generated/intl/messages_zh_CN.dart

@ -618,7 +618,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tixian" : MessageLookupByLibrary.simpleMessage("提现"),
"tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意并继续"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("通知"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用海峡姐妹App时打开通知的接收"),
"toushuxuzhi" : MessageLookupByLibrary.simpleMessage("投书须知"),
"touxiang" : MessageLookupByLibrary.simpleMessage("头像"),
"tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"),
@ -647,7 +647,7 @@ class MessageLookup extends MessageLookupByLibrary {
"weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"),
"weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用海峡姐妹App时让我们使用位置信息"),
"wentijian" : MessageLookupByLibrary.simpleMessage("问题件"),
"wenzhang" : MessageLookupByLibrary.simpleMessage("文章"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"),
@ -679,7 +679,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"),
"xiangce" : MessageLookupByLibrary.simpleMessage("相册"),
"xiangji" : MessageLookupByLibrary.simpleMessage("相机"),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用海峡姐妹App时让我们使用相机功能"),
"xiangqing" : MessageLookupByLibrary.simpleMessage("详情"),
"xiangxidizhi" : MessageLookupByLibrary.simpleMessage("详细地址"),
"xianshangfafang" : MessageLookupByLibrary.simpleMessage("线上发放"),

6
lib/generated/intl/messages_zh_Hans_CN.dart

@ -618,7 +618,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tixian" : MessageLookupByLibrary.simpleMessage("提现"),
"tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意并继续"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("通知"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用海峡姐妹App时打开通知的接收"),
"toushuxuzhi" : MessageLookupByLibrary.simpleMessage("投书须知"),
"touxiang" : MessageLookupByLibrary.simpleMessage("头像"),
"tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登录"),
@ -647,7 +647,7 @@ class MessageLookup extends MessageLookupByLibrary {
"weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"),
"weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用海峡姐妹App时让我们使用位置信息"),
"wentijian" : MessageLookupByLibrary.simpleMessage("问题件"),
"wenzhang" : MessageLookupByLibrary.simpleMessage("文章"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章详情"),
@ -679,7 +679,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"),
"xiangce" : MessageLookupByLibrary.simpleMessage("相册"),
"xiangji" : MessageLookupByLibrary.simpleMessage("相机"),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用海峡姐妹App时让我们使用相机功能"),
"xiangqing" : MessageLookupByLibrary.simpleMessage("详情"),
"xiangxidizhi" : MessageLookupByLibrary.simpleMessage("详细地址"),
"xianshangfafang" : MessageLookupByLibrary.simpleMessage("线上发放"),

6
lib/generated/intl/messages_zh_Hant_CN.dart

@ -612,7 +612,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tixian" : MessageLookupByLibrary.simpleMessage("提現"),
"tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意並繼續"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("通知"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用海峡姐妹App時打開通知的接收 "),
"toushuxuzhi" : MessageLookupByLibrary.simpleMessage("投書須知"),
"touxiang" : MessageLookupByLibrary.simpleMessage("頭像"),
"tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登錄"),
@ -641,7 +641,7 @@ class MessageLookup extends MessageLookupByLibrary {
"weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"),
"weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店資訊,推薦您在使用海峡姐妹App時讓我們使用位置資訊"),
"wentijian" : MessageLookupByLibrary.simpleMessage("問題件"),
"wenzhang" : MessageLookupByLibrary.simpleMessage("文章"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章詳情"),
@ -673,7 +673,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"),
"xiangce" : MessageLookupByLibrary.simpleMessage("相冊"),
"xiangji" : MessageLookupByLibrary.simpleMessage("相機"),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以在使用過程中進行分享,希望您使用HISAPP時讓我們使用相機功能 "),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以在使用過程中進行分享,希望您使用海峡姐妹App時讓我們使用相機功能 "),
"xiangqing" : MessageLookupByLibrary.simpleMessage("詳情"),
"xiangxidizhi" : MessageLookupByLibrary.simpleMessage("詳細地址"),
"xianshangfafang" : MessageLookupByLibrary.simpleMessage("綫上發放"),

6
lib/generated/intl/messages_zh_TW.dart

@ -615,7 +615,7 @@ class MessageLookup extends MessageLookupByLibrary {
"tixian" : MessageLookupByLibrary.simpleMessage("提現"),
"tongyibingjixu" : MessageLookupByLibrary.simpleMessage("同意並繼續"),
"tongzhi" : MessageLookupByLibrary.simpleMessage("通知"),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "),
"tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用海峡姐妹App時打開通知的接收 "),
"toushuxuzhi" : MessageLookupByLibrary.simpleMessage("投書須知"),
"touxiang" : MessageLookupByLibrary.simpleMessage("頭像"),
"tuichudenglu" : MessageLookupByLibrary.simpleMessage("退出登錄"),
@ -644,7 +644,7 @@ class MessageLookup extends MessageLookupByLibrary {
"weilexuanzhezhaopianhuancun" : MessageLookupByLibrary.simpleMessage("为了获得照片使用,缓存等功能,推荐您在使用期间打开存储权限"),
"weiwancheng" : MessageLookupByLibrary.simpleMessage(" 未完成 "),
"weixinzhifu" : MessageLookupByLibrary.simpleMessage("微信支付"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊"),
"weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店資訊,推薦您在使用海峡姐妹App時讓我們使用位置資訊"),
"wentijian" : MessageLookupByLibrary.simpleMessage("問題件"),
"wenzhang" : MessageLookupByLibrary.simpleMessage("文章"),
"wenzhangxiangqing" : MessageLookupByLibrary.simpleMessage("文章詳情"),
@ -676,7 +676,7 @@ class MessageLookup extends MessageLookupByLibrary {
"xialashuaxin" : MessageLookupByLibrary.simpleMessage("下拉刷新"),
"xiangce" : MessageLookupByLibrary.simpleMessage("相冊"),
"xiangji" : MessageLookupByLibrary.simpleMessage("相機"),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以在使用過程中進行分享,希望您使用HISAPP時讓我們使用相機功能 "),
"xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以在使用過程中進行分享,希望您使用海峡姐妹App時讓我們使用相機功能 "),
"xiangqing" : MessageLookupByLibrary.simpleMessage("詳情"),
"xiangxidizhi" : MessageLookupByLibrary.simpleMessage("詳細地址"),
"xianshangfafang" : MessageLookupByLibrary.simpleMessage("綫上發放"),

12
lib/generated/l10n.dart

@ -1155,30 +1155,30 @@ class S {
);
}
/// `使HISAPP时让我们使用位置信息`
/// `使App时让我们使用位置信息`
String get weizhitishixinxi {
return Intl.message(
'为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息',
'为了向您推荐附近的门店信息,推荐您在使用海峡姐妹App时让我们使用位置信息',
name: 'weizhitishixinxi',
desc: '',
args: [],
);
}
/// `使HISAPP时打开通知的接收`
/// `使App时打开通知的接收`
String get tongzhitishixinxi {
return Intl.message(
'为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收',
'为了您可以及时收到我们的活动信息,推荐您在使用海峡姐妹App时打开通知的接收',
name: 'tongzhitishixinxi',
desc: '',
args: [],
);
}
/// `使使HISAPP时让我们使用相机功能`
/// `使使App时让我们使用相机功能`
String get xiangjitishixinxi {
return Intl.message(
'为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能',
'为了您可以在使用过程中进行分享,希望您使用海峡姐妹App时让我们使用相机功能',
name: 'xiangjitishixinxi',
desc: '',
args: [],

197
lib/home/help_farmers/help_farmers_page.dart

@ -11,6 +11,7 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/view_widget/my_footer.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart';
import '../../generated/l10n.dart';
import '../../retrofit/data/base_data.dart';
@ -33,6 +34,8 @@ class _HelpFarmersPage extends State<HelpFarmersPage> {
final RefreshController refreshController = RefreshController();
List<FarmersList> farmersList = [];
int tabIndex = 0;
int networkStatus = 0;
String dataErrorText = "";
@override
void initState() {
@ -42,7 +45,7 @@ class _HelpFarmersPage extends State<HelpFarmersPage> {
Dio(),
context: context,
token: value.getString('token'),
// showLoading: true
showLoading: true
),
queryConfig(),
});
@ -63,14 +66,18 @@ class _HelpFarmersPage extends State<HelpFarmersPage> {
await apiService.getConfig().catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
networkStatus = -1;
refreshController.refreshFailed();
});
if (baseData != null && baseData.isSuccess) {
farmersList.clear();
farmersList.addAll(baseData.data);
refreshController.refreshCompleted();
networkStatus= 1;
} else {
refreshController.refreshFailed();
dataErrorText = baseData.msg ?? "";
networkStatus=2;
}
}finally{
setState(() {});
@ -84,7 +91,17 @@ class _HelpFarmersPage extends State<HelpFarmersPage> {
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.transparent,
body: NestedScrollView(
body: networkStatus == 0 ?recommendSm():
(networkStatus == 2 ?Container(
color: Colors.white,
child: NoDataView(
src: "assets/image/xiao_fei.webp",
isShowBtn: false,
text: dataErrorText,
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h, left: 60.w, right: 60.w),
)
):NestedScrollView(
headerSliverBuilder: (context, inner) {
return [
SliverAppBar(
@ -127,8 +144,8 @@ class _HelpFarmersPage extends State<HelpFarmersPage> {
alignment: Alignment.center,
decoration: BoxDecoration(
borderRadius: BorderRadius.vertical(
top: Radius.circular(16),
),
top: Radius.circular(16),
),
color: Color(0xFF32A060),
),
padding: EdgeInsets.only(top:7.h,bottom: 7.h),
@ -170,7 +187,7 @@ class _HelpFarmersPage extends State<HelpFarmersPage> {
];
},
body: recommend(),
),
)),
);
}
@ -302,4 +319,174 @@ class _HelpFarmersPage extends State<HelpFarmersPage> {
),
);
}
Widget recommendSm() {
return Container(
width: double.infinity,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(6)),
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(25),
offset: Offset(0, 1),
blurRadius: 12,
spreadRadius: 0,
)
]),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
color: Color(0XFFD8D8D8),
width: double.infinity,
height:289.h,
),
),
Row(
children: [
Padding(
padding: EdgeInsets.only(left: 6.w, bottom: 5.h, top: 12.h),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width:64.w,
height: 20.h,
),
),
),
Padding(
padding: EdgeInsets.only(left: 12.w, bottom: 5.h, top: 12.h),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 64.w,
height: 20.h,
),
),
),
Padding(
padding: EdgeInsets.only(left: 12.w, bottom: 5.h, top: 12.h),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 64.w,
height: 20.h,
),
),
),
Padding(
padding: EdgeInsets.only(left: 12.w, bottom: 5.h, top: 12.h),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 64.w,
height: 20.h,
),
),
),
],
),
Expanded(child: ListView.builder(
itemCount: 10,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
onTap: () {},
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin:EdgeInsets.symmetric(horizontal:6.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
height: 174.h,
),
),
Padding(
padding: EdgeInsets.only(top: 7.h, left: 10.w, bottom: 8.h),
child: Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width:106.w,
height: 20.h,
),
),
),
Padding(
padding: EdgeInsets.only(left: 10.w, bottom: 12.h),
child:Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 166.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(100),
),
width: 86.w,
height: 25.h,
),
),
],
),
),
],
),
);
},
)),
],
),
);
}
}

4
lib/home/home_page.dart

@ -582,7 +582,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
),
autoplay: true,
duration: 1000,
autoplayDelay: 2000,
autoplayDelay: 17000,
physics: BouncingScrollPhysics(),
itemBuilder: (context, position) {
return InkWell(
@ -675,7 +675,7 @@ class HomePageState extends State<HomePage> with AutomaticKeepAliveClientMixin {
),
autoplay: true,
duration: 1000,
autoplayDelay: 2000,
autoplayDelay: 10000,
itemBuilder: (context, position) {
return InkWell(
onTap: () {

6
lib/l10n/intl_en.arb

@ -111,9 +111,9 @@
"tongzhi": "通知",
"xiangji": "相机",
"quanxianshezhi": "权限设置",
"weizhitishixinxi": "为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息",
"tongzhitishixinxi": "为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收",
"xiangjitishixinxi": "为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能",
"weizhitishixinxi": "为了向您推荐附近的门店信息,推荐您在使用海峡姐妹App时让我们使用位置信息",
"tongzhitishixinxi": "为了您可以及时收到我们的活动信息,推荐您在使用海峡姐妹App时打开通知的接收",
"xiangjitishixinxi": "为了您可以在使用过程中进行分享,希望您使用海峡姐妹App时让我们使用相机功能",
"cunchutishixinxi": "为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限",
"cunchu": "存储",
"wodejifenzhi": "我的积分值",

6
lib/l10n/intl_en_US.arb

@ -111,9 +111,9 @@
"tongzhi": "Notification",
"xiangji": "camera",
"quanxianshezhi": "Permission Settings",
"weizhitishixinxi": "In order to recommend the nearby store information to you, we recommend that you let us use the location information when using HISAPP",
"tongzhitishixinxi": "In order that you can receive our activity information in time, it is recommended that you open the receipt of notifications when using HISAPP",
"xiangjitishixinxi": "For you to share in the process of using, I hope you can let us use the camera function when using HISAPP",
"weizhitishixinxi": "In order to recommend the nearby store information to you, we recommend that you let us use the location information when using Channel sisters App",
"tongzhitishixinxi": "In order that you can receive our activity information in time, it is recommended that you open the receipt of notifications when using Channel sisters App",
"xiangjitishixinxi": "For you to share in the process of using, I hope you can let us use the camera function when using Channel sisters App",
"cunchutishixinxi": "It is recommended that you open the storage permission during use in order to obtain photo usage, caching and other functions",
"cunchu": "Storage",
"wodejifenzhi": "My integral value",

6
lib/l10n/intl_zh_CN.arb

@ -111,9 +111,9 @@
"tongzhi": "通知",
"xiangji": "相机",
"quanxianshezhi": "权限设置",
"weizhitishixinxi": "为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息",
"tongzhitishixinxi": "为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收",
"xiangjitishixinxi": "为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能",
"weizhitishixinxi": "为了向您推荐附近的门店信息,推荐您在使用海峡姐妹App时让我们使用位置信息",
"tongzhitishixinxi": "为了您可以及时收到我们的活动信息,推荐您在使用海峡姐妹App时打开通知的接收",
"xiangjitishixinxi": "为了您可以在使用过程中进行分享,希望您使用海峡姐妹App时让我们使用相机功能",
"cunchutishixinxi": "为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限",
"cunchu": "存储",
"wodejifenzhi": "我的积分值",

6
lib/l10n/intl_zh_Hans_CN.arb

@ -111,9 +111,9 @@
"tongzhi": "通知",
"xiangji": "相机",
"quanxianshezhi": "权限设置",
"weizhitishixinxi": "为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息",
"tongzhitishixinxi": "为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收",
"xiangjitishixinxi": "为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能",
"weizhitishixinxi": "为了向您推荐附近的门店信息,推荐您在使用海峡姐妹App时让我们使用位置信息",
"tongzhitishixinxi": "为了您可以及时收到我们的活动信息,推荐您在使用海峡姐妹App时打开通知的接收",
"xiangjitishixinxi": "为了您可以在使用过程中进行分享,希望您使用海峡姐妹App时让我们使用相机功能",
"cunchutishixinxi": "为了获得照片使用、缓存等功能,推荐您在使用期间打开存储权限",
"cunchu": "存储",
"wodejifenzhi": "我的积分值",

6
lib/l10n/intl_zh_Hant_CN.arb

@ -114,9 +114,9 @@
"tongzhi": "通知",
"xiangji": "相機",
"quanxianshezhi": "權限設置",
"weizhitishixinxi": "為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊",
"tongzhitishixinxi": "為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 ",
"xiangjitishixinxi": "為了您可以在使用過程中進行分享,希望您使用HISAPP時讓我們使用相機功能 ",
"weizhitishixinxi": "為了向您推薦附近的門店資訊,推薦您在使用海峡姐妹App時讓我們使用位置資訊",
"tongzhitishixinxi": "為了您可以及時收到我們的活動資訊,推薦您在使用海峡姐妹App時打開通知的接收 ",
"xiangjitishixinxi": "為了您可以在使用過程中進行分享,希望您使用海峡姐妹App時讓我們使用相機功能 ",
"cunchutishixinxi": "為了獲得照片使用、緩存等功能,推薦您使用期間打開存儲權限",
"cunchu": "存儲",
"wodejifenzhi": "我的積分值",

6
lib/l10n/intl_zh_TW.arb

@ -114,9 +114,9 @@
"tongzhi": "通知",
"xiangji": "相機",
"quanxianshezhi": "權限設置",
"weizhitishixinxi": "為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊",
"tongzhitishixinxi": "為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 ",
"xiangjitishixinxi": "為了您可以在使用過程中進行分享,希望您使用HISAPP時讓我們使用相機功能 ",
"weizhitishixinxi": "為了向您推薦附近的門店資訊,推薦您在使用海峡姐妹App時讓我們使用位置資訊",
"tongzhitishixinxi": "為了您可以及時收到我們的活動資訊,推薦您在使用海峡姐妹App時打開通知的接收 ",
"xiangjitishixinxi": "為了您可以在使用過程中進行分享,希望您使用海峡姐妹App時讓我們使用相機功能 ",
"cunchutishixinxi": "為了獲得照片使用、緩存等功能,推薦您使用期間打開存儲權限",
"cunchu": "存儲",
"wodejifenzhi": "我的積分值",

20
lib/main.dart

@ -169,6 +169,13 @@ import 'mine/personal_page.dart';
import 'order/exchange_write_off_page.dart';
import 'mine/release_page.dart';
import 'mine/roll_center_page.dart';
import 'order/invoices_manage/add_invoices_title.dart';
import 'order/invoices_manage/edit_invoices_info.dart';
import 'order/invoices_manage/invoices_detail_page.dart';
import 'order/invoices_manage/invoices_history.dart';
import 'order/invoices_manage/invoices_manage_page.dart';
import 'order/invoices_manage/invoices_title_info.dart';
void main() async {
if (Platform.isAndroid) {
@ -577,4 +584,17 @@ Map<String, WidgetBuilder> routers = <String, WidgetBuilder>{
ServicePurchaseRecord(arguments:arguments),
'/router/set_goods_specs_value': (context, {arguments}) =>
SetGoodsSpecsValue(arguments:arguments),
'/router/invoices_manage_page': (context, {arguments}) =>
InvoicesManagePage(),
'/router/invoices_title_info': (context, {arguments}) =>
InvoicesTitleInfo(arguments:arguments),
'/router/add_invoices_title': (context, {arguments}) =>
AddInvoicesTitle(arguments:arguments),
'/router/invoices_history': (context, {arguments}) =>
InvoicesHistory(),
'/router/edit_invoices_info': (context, {arguments}) =>
EditInvoicesInfo(arguments:arguments),
'/router/invoices_detail_page': (context, {arguments}) =>
InvoicesDetailPage(arguments:arguments),
};

57
lib/mine/coupon_page.dart

@ -22,6 +22,8 @@ import 'package:shared_preferences/shared_preferences.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:shimmer/shimmer.dart';
import '../utils/flutter_utils.dart';
class CouponPage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
@ -33,6 +35,7 @@ class _CouponPage extends State<CouponPage> {
ApiService apiService;
RefreshController _refreshController;
int networkStatus = 0;
String networkError = "";
@override
void dispose() {
@ -69,7 +72,9 @@ class _CouponPage extends State<CouponPage> {
"searchKey": "",
"state": state
}).catchError((error) {
networkError = AppUtils.dioErrorTypeToString(error.type);
networkStatus = -1;
setState(() {});
_refreshController.loadFailed();
_refreshController.refreshFailed();
});
@ -231,7 +236,7 @@ class _CouponPage extends State<CouponPage> {
),
onRefresh: _onRefresh,
onLoading: queryCard,
child: networkStatus == 0 ? ListView.builder(
child: networkStatus == -1?noNetwork():(networkStatus == 0 ? ListView.builder(
itemCount: 10,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
@ -291,7 +296,7 @@ class _CouponPage extends State<CouponPage> {
text: state == 1 ? "目前暂无优惠券,请到领劵中心领取哦~" :(state == 2 ? "目前暂无已使用的优惠券哦~" :"目前暂无失效的优惠券哦~"),
fontSize: 16.sp,
margin: EdgeInsets.only(top: 120.h, left: 60, right: 60),
)),
))),
),
),
],
@ -436,4 +441,52 @@ class _CouponPage extends State<CouponPage> {
);
}
Widget noNetwork() {
return Container(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
// "无法连接到网络",
networkError.substring(0, networkError.indexOf(",")),
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.bold),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 10.h),
child: Text(
"请检查网络设置或稍后重试",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF7A797F),
fontWeight: MyFontWeight.regular),
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
_onRefresh();
},
child: Container(
decoration: BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h),
child: Text(
"重试",
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: MyFontWeight.regular),
)),
)
],
),
);
}
}

2
lib/mine/mine_page.dart

@ -467,7 +467,7 @@ class MinePageState extends State<MinePage> with AutomaticKeepAliveClientMixin {
),
autoplay: true,
duration: 1000,
autoplayDelay: 2000,
autoplayDelay: 10000,
itemBuilder: (context, position) {
return InkWell(
onTap: () {

12
lib/mine/mine_view/mine_item.dart

@ -351,9 +351,17 @@ class _MineItem extends State<MineItem> {
),
),
///
///
Expanded(
child: Container(),
child: InkWell(
onTap: () {
Navigator.of(context).pushNamed('/router/invoices_manage_page');
},
child: mineItem(
S.of(context).fapiaozhushou,
"assets/image/bill_gl.webp",
),
),
),
Expanded(
child: Container(),

857
lib/order/invoices_manage/add_invoices_title.dart

@ -0,0 +1,857 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart';
import '../../retrofit/data/title_info_list.dart';
import '../../generated/l10n.dart';
import '../../retrofit/data/base_data.dart';
import '../../retrofit/retrofit_api.dart';
import '../../utils/flutter_utils.dart';
import '../../utils/font_weight.dart';
import '../../view_widget/border_text.dart';
import '../../view_widget/my_appbar.dart';
class AddInvoicesTitle extends StatefulWidget {
final Map<String, dynamic> arguments;
AddInvoicesTitle({this.arguments});
@override
State<StatefulWidget> createState() {
return _AddInvoicesTitle();
}
}
class _AddInvoicesTitle extends State<AddInvoicesTitle> {
bool isKeyBoardShow = false;
FocusNode _focusNode = FocusNode();
final TextEditingController editNameController = TextEditingController();
final TextEditingController editDutyCodeController = TextEditingController();
final TextEditingController editAddressController = TextEditingController();
final TextEditingController editPhoneController = TextEditingController();
final TextEditingController editBankController = TextEditingController();
final TextEditingController editAccountController = TextEditingController();
int titleType;
ApiService apiService;
String userId;
String titleName;
Records records;
@override
void initState() {
super.initState();
titleName = widget?.arguments["titleName"] ??"";
records = widget.arguments["records"];
titleType = ((widget.arguments["titleType"] == 1) ? 1 : 0) ?? 0;
WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() {
print("object: ${MediaQuery.of(context).viewInsets.bottom}");
if (MediaQuery.of(context).viewInsets.bottom == 0) {
if (isKeyBoardShow) {
isKeyBoardShow = false;
//
FocusScope.of(context).requestFocus(FocusNode());
}
} else {
isKeyBoardShow = true;
}
});
});
}
///
@override
void dispose() {
_focusNode.unfocus();
super.dispose();
}
///
addInvoiceHeaders() async {
try {
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
userId = value.getString('userId');
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
}
BaseData baseData = await apiService.invoiceHeader({
"bank": editBankController.text == "" ? (records?.bank??"") : editBankController.text, //
"bankNumber": editAccountController.text == "" ? (records?.bankNumber??"") : editAccountController.text, //
"companyAddr":editAddressController.text == "" ? (records?.companyAddr??"") : editAddressController.text, //
"companyPhone":editPhoneController.text == "" ? (records?.companyPhone??"") : editPhoneController.text, //
"id": "", //id
"isDefault": 1, //
"isDelete": 0, //
"name": editNameController.text == "" ? (records?.name??"") : editNameController.text, //
"taxId": editDutyCodeController.text == "" ? (records?.taxId??"") : editDutyCodeController.text, //
"type": titleType == 0 ? "PERSONAL" : "COMPANY", //
"userId": userId, //ID
}).catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
});
if (baseData != null && baseData.isSuccess) {
Navigator.of(context).pop();
Future.delayed(Duration(milliseconds: 500), () {
SmartDialog.showToast("添加抬头信息成功", alignment: Alignment.center);
});
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
} finally {
EasyLoading.dismiss();
}
}
///
editInvoiceHeaders() async {
try {
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
userId = value.getString('userId');
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
}
BaseData baseData = await apiService.invoiceHeaders({
"bank": editBankController.text == "" ? (records?.bank??"") : editBankController.text, //
"bankNumber": editAccountController.text == "" ? (records?.bankNumber??"") : editAccountController.text, //
"companyAddr":editAddressController.text == "" ? (records?.companyAddr??"") : editAddressController.text, //
"companyPhone":editPhoneController.text == "" ? (records?.companyPhone??"") : editPhoneController.text, //
"id": records?.id ?? "", //id
"isDefault": 1, //
"isDelete": 0, //
"name": editNameController.text == "" ? (records?.name??"") : editNameController.text, //
"taxId": editDutyCodeController.text == "" ? (records?.taxId??"") : editDutyCodeController.text, //
"type": titleType == 0 ? "PERSONAL" : "COMPANY", //
"userId": userId, //ID
}).catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);});
if (baseData != null && baseData.isSuccess) {
Navigator.of(context).pop(1);
Future.delayed(Duration(milliseconds: 500), () {
SmartDialog.showToast("编辑抬头信息成功", alignment: Alignment.center);
});
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
} finally {
EasyLoading.dismiss();
}
}
@override
Widget build(BuildContext context) {
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).unfocus();
},
child: Scaffold(
resizeToAvoidBottomInset: false,
appBar: MyAppBar(
title: titleName??"",
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
),
body: Container(
color: Colors.white,
margin: EdgeInsets.only(top: 12.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 17.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 16.h),
child: Text(
"请填写抬头信息",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 16.sp,
fontWeight: MyFontWeight.bold,
),
),
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(right: 13.w),
child: Text(
"抬头类型",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 16.sp,
fontWeight: MyFontWeight.bold,
),
),
),
Padding(
padding: EdgeInsets.only(right: 8.w),
child: InkWell(
child: BorderText(
text: "个人",
textColor: titleType == 0
? Color(0xff32A060)
: Color(0xff181818),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
borderColor: titleType == 0
? Color(0xff32A060)
: Color(0xffE6E6E6),
radius: 2,
padding: EdgeInsets.symmetric(
vertical: 6.h, horizontal: 13.w),
borderWidth: 1,
),
onTap: () {
setState(() {
titleType = 0;
});
},
),
),
InkWell(
child: BorderText(
text: "单位",
textColor: titleType == 1
? Color(0xff32A060)
: Color(0xff181818),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
borderColor: titleType == 1
? Color(0xff32A060)
: Color(0xffE6E6E6),
radius: 2,
padding: EdgeInsets.symmetric(
vertical: 6.h, horizontal: 13.w),
borderWidth: 1,
),
onTap: () {
setState(() {
titleType = 1;
});
},
)
],
),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 8.h, bottom: 16.h),
),
Row(
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "*",
style: TextStyle(
color: Color(0xFFBC161C),
fontSize: 14.sp,
fontWeight: FontWeight.w500,
),
),
TextSpan(
text: "名称 ",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: FontWeight.w800,
),
),
],
),
),
Expanded(
child: TextField(
controller: editNameController,
decoration: InputDecoration(
hintText: records?.name ?? (titleType == 0
? "建议填写个人姓名(必填)"
: "单位名称(必填)"),
hintStyle: TextStyle(
color: ((records?.name??"") == "") ? Color(0xFFACACAC) : Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
border: InputBorder.none,
contentPadding: EdgeInsets.only(left: 16.w),
),
style: TextStyle(
color:Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
),
)
],
),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 8.h, bottom: 16.h),
),
if (titleType == 1)
Column(
children: [
Row(
children: [
Text.rich(
TextSpan(
children: [
TextSpan(
text: "*",
style: TextStyle(
color: Color(0xFFBC161C),
fontSize: 14.sp,
fontWeight: FontWeight.w500,
),
),
TextSpan(
text: "税号 ",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: FontWeight.w800,
),
),
],
),
),
Expanded(
child: TextField(
controller: editDutyCodeController,
decoration: InputDecoration(
hintText: records?.taxId ?? "纳税人识别号(必填)",
hintStyle: TextStyle(
color: ((records?.taxId??"") == "") ? Color(0xFFACACAC) : Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
border: InputBorder.none,
contentPadding:
EdgeInsets.only(left: 16.w),
),
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
),
)
],
),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 8.h, bottom: 16.h),
),
Row(
children: [
Text(
"单位地址",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
),
Expanded(
child: TextField(
controller: editAddressController,
decoration: InputDecoration(
hintText: records?.companyAddr ?? "请输入单位地址",
hintStyle: TextStyle(
color: ((records?.companyAddr??"") == "") ? Color(0xFFACACAC) : Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
border: InputBorder.none,
contentPadding:
EdgeInsets.only(left: 16.w),
),
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
),
)
],
),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 8.h, bottom: 16.h),
),
Row(
children: [
Text(
"单位电话",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
),
Expanded(
child: TextField(
controller: editPhoneController,
decoration: InputDecoration(
hintText: records?.companyPhone ?? "请输入单位电话",
hintStyle: TextStyle(
color: ((records?.companyPhone??"") == "") ? Color(0xFFACACAC) : Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
border: InputBorder.none,
contentPadding:
EdgeInsets.only(left: 16.w),
),
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
),
)
],
),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 8.h, bottom: 16.h),
),
Row(
children: [
Text(
"开户银行",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
),
Expanded(
child: TextField(
controller: editBankController,
decoration: InputDecoration(
hintText: records?.bank ?? "请输入开户银行",
hintStyle: TextStyle(
color: ((records?.bank??"") == "") ? Color(0xFFACACAC) : Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
border: InputBorder.none,
contentPadding:
EdgeInsets.only(left: 16.w),
),
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
),
)
],
),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 8.h, bottom: 16.h),
),
Row(
children: [
Text(
"开户账号",
style: TextStyle(
color: Color(0xFF353535),
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
),
Expanded(
child: TextField(
controller: editAccountController,
decoration: InputDecoration(
hintText: records?.bankNumber ?? "请输入开户账号",
hintStyle: TextStyle(
color: ((records?.bankNumber??"") == "") ? Color(0xFFACACAC) : Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
border: InputBorder.none,
contentPadding:
EdgeInsets.only(left: 16.w),
),
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
),
)
],
),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 8.h, bottom: 16.h),
),
],
)
],
),
),
)),
GestureDetector(
onTap: () {
if (editNameController.text == "" && ((records?.name ??"") == "")) {
SmartDialog.showToast("请输入名称",
alignment: Alignment.center);
return;
} else if (titleType == 1 &&
editDutyCodeController.text == ""&& ((records?.taxId ??"") == "")) {
SmartDialog.showToast("请输入税号",
alignment: Alignment.center);
return;
} else {
if(titleName == "编辑抬头"){
editInvoiceHeaders();
}else{
addInvoiceHeaders();
}
}
},
child: Container(
margin: EdgeInsets.only(bottom:25.h,left:20.w,right: 20.w),
padding: EdgeInsets.symmetric(vertical:16.h),
width: double.infinity,
decoration: BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.circular(
45
),
),
alignment: Alignment.center,
child: Text(
S.of(context).baocun,
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
),
),
),
),
],
),
),
));
}
Widget addInvoiceTitleSm() {
return Column(
children: [
Expanded(
child: Container(
padding: EdgeInsets.only(top: 12, bottom: 12, left: 16),
margin: EdgeInsets.only(top: 12.h),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(bottom: 16),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 162,
height: 22,
),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 12),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 59,
height: 20,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 8.h),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 54,
height: 28,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 8.h),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 54,
height: 28,
),
),
]),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 8.h, bottom: 16.h),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 61,
height: 20,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 8.h),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 134,
height: 20,
),
),
]),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 12.h, bottom: 16.h),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 61,
height: 20,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 8.h),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 134,
height: 20,
),
),
]),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 12.h, bottom: 16.h),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 61,
height: 20,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 8.h),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 134,
height: 20,
),
),
]),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 12.h, bottom: 16.h),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 61,
height: 20,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 8.h),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 134,
height: 20,
),
),
]),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 12.h, bottom: 16.h),
),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 61,
height: 20,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 8.h),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 134,
height: 20,
),
),
]),
Container(
width: double.infinity,
height: 1.h,
color: Color(0xffF4F4F4),
margin: EdgeInsets.only(top: 12.h, bottom: 16.h),
),
],
))),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: double.infinity,
height: 54,
),
),
],
);
}
}

600
lib/order/invoices_manage/edit_invoices_info.dart

@ -0,0 +1,600 @@
import 'dart:convert';
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart';
import '../../generated/l10n.dart';
import '../../retrofit/data/base_data.dart';
import '../../retrofit/data/user_info.dart';
import '../../retrofit/retrofit_api.dart';
import '../../utils/flutter_utils.dart';
import '../../utils/font_weight.dart';
import '../../view_widget/my_appbar.dart';
class EditInvoicesInfo extends StatefulWidget {
final Map<String, dynamic> arguments;
EditInvoicesInfo({this.arguments});
@override
State<StatefulWidget> createState() {
return _EditInvoicesInfo();
}
}
class _EditInvoicesInfo extends State<EditInvoicesInfo> {
bool isKeyBoardShow = false;
FocusNode _focusNode = FocusNode();
String selectPrice;
String headerId = "";
String phone = "";
String name = "";
ApiService apiService;
Map invoicesInfo;
String mobile;
final TextEditingController editPhoneController = TextEditingController();
List<dynamic> ids;
@override
void initState() {
super.initState();
WidgetsBinding.instance.addPostFrameCallback((_) {
setState(() {
print("object: ${MediaQuery.of(context).viewInsets.bottom}");
if (MediaQuery.of(context).viewInsets.bottom == 0) {
if (isKeyBoardShow) {
isKeyBoardShow = false;
//
FocusScope.of(context).requestFocus(FocusNode());
}
} else {
isKeyBoardShow = true;
}
});
});
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(Dio(),
context: context, token: value.getString('token'),),
setState(() {
mobile = value.getString('mobile');
})
});
selectPrice = widget?.arguments["selectPrice"] ?? "";
ids = widget?.arguments["ids"] ?? [];
}
///
@override
void dispose() {
super.dispose();
_focusNode.unfocus();
}
///
submitInvoiceReview() async {
try {
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
BaseData baseData = await apiService.invoiceSubmit({
"headerId": headerId, //id
"isDelete": 0,
"money": selectPrice, //
"orderIds": ids, //id数组
"ossId": 0,
"phone": phone, //
"reason": "",
"reviewerBy": 0,
"reviewerTime": "",
"state": 0,
"type": 1,
"receivingPhone": editPhoneController.text == "" ? mobile :editPhoneController.text, //
}).catchError((error) {
SmartDialog.showToast(AppUtils.dioErrorTypeToString(error.type),
alignment: Alignment.center);
});
if (baseData != null && baseData.isSuccess) {
Navigator.of(context).pop(1);
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
} finally {
EasyLoading.dismiss();
}
}
@override
Widget build(BuildContext context) {
return GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
FocusScope.of(context).unfocus();
},
child: Scaffold(
resizeToAvoidBottomInset: false,
appBar: MyAppBar(
title: "填写发票信息",
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
),
body: // networkStatus == -1 ? noNetwork() :
Container(
margin: EdgeInsets.only(top: 12.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: SingleChildScrollView(
physics: BouncingScrollPhysics(),
child: Container(
padding: EdgeInsets.symmetric(horizontal: 17.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
///
// Container(
// padding: EdgeInsets.only(
// top: 12.h, bottom: 12.h, left: 12.w, right: 10.w),
// margin: EdgeInsets.only(bottom: 12.h),
// decoration: BoxDecoration(
// color: Colors.white,
// borderRadius: BorderRadius.circular(6),
// boxShadow: [
// BoxShadow(
// color: Color(0x0F06152E),
// offset: Offset(0, 2),
// blurRadius: 4,
// spreadRadius: 0,
// )
// ],
// ),
// child: Row(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// Padding(
// padding: EdgeInsets.only(top: 5.h),
// child: Image.asset(
// "assets/image/tip_info.webp",
// width: 17.h,
// height: 17.h,
// fit: BoxFit.fill,
// ),
// ),
// Padding(
// padding: EdgeInsets.only(left: 5.w),
// child: Text(
// "失败原因:已经开具过纸质发票,不能重复开具\n电子发票",
// style: TextStyle(
// letterSpacing: 0.5,
// height: 1.5,
// color: Color(0xFF32A060),
// fontSize: 14.sp,
// fontWeight: MyFontWeight.regular,
// ),
// ),
// )
// ],
// ),
// ),
Container(
padding:
EdgeInsets.only(top: 16.h, bottom: 16.h, left: 18.w),
margin: EdgeInsets.symmetric(vertical: 12.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"发票抬头",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 15.sp,
fontWeight: MyFontWeight.bold,
),
),
Padding(
padding: EdgeInsets.only(top: 16.h, bottom: 18.h),
child: Row(
children: [
Padding(
padding: EdgeInsets.only(right: 31.w),
child: Text(
"发票类型",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
Text(
"电子发票",
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
],
),
),
GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
Navigator.of(context)
.pushNamed('/router/invoices_title_info',arguments:{
"enterType":0,
})
.then((value) {
if(value != null){
invoicesInfo = value;
headerId = (value as Map)['id'];
phone = (value as Map)['phone'];
name = (value as Map)['name'];
setState(() {});
}
});
},
child: Row(
children: [
Padding(
padding: EdgeInsets.only(right: 31.w),
child: Text(
"发票抬头",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
Expanded(
child: Text(
name == "" ? "请选择" : name,
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
Padding(
padding: EdgeInsets.only(right: 21.w),
child: Icon(Icons.arrow_forward_ios,
color: Color(0xFF181818),
size: 14.sp))
],
))
],
),
),
Container(
padding: EdgeInsets.symmetric(
vertical: 16.h, horizontal: 17.w),
margin: EdgeInsets.symmetric(vertical: 12.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
"开票金额",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
Padding(
padding: EdgeInsets.only(right: 6.w),
child: Text(
"可开票金额",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
),
Text(
"${selectPrice ?? "0"}",
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)
],
),
),
Container(
padding: EdgeInsets.symmetric(horizontal: 17.w),
margin: EdgeInsets.symmetric(vertical: 12.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"发票接收",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
Expanded(
child: TextField(
controller: editPhoneController,
decoration: InputDecoration(
hintText: mobile,
hintStyle: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
hintTextDirection: TextDirection.rtl,
border: InputBorder.none,
contentPadding:
EdgeInsets.only(left: 16.w),
),
textAlign: TextAlign.right,
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular),
),
),
],
),
),
],
),
),
)),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap:(){
if(name == ""){
SmartDialog.showToast("请选择发票抬头",
alignment: Alignment.center);
}else{
submitInvoiceReview();
}
},
child: Container(
padding: EdgeInsets.symmetric(vertical:16.h),
margin: EdgeInsets.only(bottom:25.h,left:20.w,right: 20.w),
decoration: BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.circular(
45
),
),
width: double.infinity,
alignment: Alignment.center,
child: Text(
"确认提交",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
),
),
),
),
],
),
),
));
}
Widget editInvoicesInfoSm() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(top: 16.h, bottom: 16.h, left: 18.w),
margin: EdgeInsets.symmetric(vertical: 12.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 62,
height: 20,
),
),
Padding(
padding: EdgeInsets.only(top: 16.h, bottom: 18.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 31.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58,
height: 20,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58,
height: 20,
),
),
],
),
),
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 31.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58,
height: 20,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 140,
height: 20,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 21.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 14,
height: 14),
),
],
)
],
),
),
Container(
padding: EdgeInsets.symmetric(vertical: 16.h, horizontal: 17.w),
margin: EdgeInsets.symmetric(vertical: 12.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58,
height: 20,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 6.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 70,
height: 20,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 31,
height: 20,
),
),
],
),
),
],
);
}
}

820
lib/order/invoices_manage/invoices_detail_page.dart

@ -0,0 +1,820 @@
import 'dart:async';
import 'dart:io';
import 'package:dio/dio.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:huixiang/order/invoices_manage/pdf_screen.dart';
import 'package:path_provider/path_provider.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart';
import 'package:url_launcher/url_launcher.dart';
import '../../community/photo_view_gallery_screen.dart';
import '../../retrofit/data/base_data.dart';
import '../../retrofit/data/invoices_detail_info.dart';
import '../../retrofit/retrofit_api.dart';
import '../../utils/flutter_utils.dart';
import '../../utils/font_weight.dart';
import '../../view_widget/classic_header.dart';
import '../../view_widget/my_appbar.dart';
import '../../view_widget/my_footer.dart';
class InvoicesDetailPage extends StatefulWidget {
final Map<String, dynamic> arguments;
InvoicesDetailPage({this.arguments});
@override
State<StatefulWidget> createState() {
return _InvoicesDetailPage();
}
}
class _InvoicesDetailPage extends State<InvoicesDetailPage> {
ApiService apiService;
InvoicesDetailInfo invoicesDetailInfo;
String remotePDFpath = "";
String networkError = "";
int networkStatus = 0;
final RefreshController refreshController = RefreshController();
@override
void initState() {
super.initState();
SharedPreferences.getInstance().then((value) => {
apiService = ApiService(
Dio(),
context: context,
token: value.getString('token'),
),
queryInvoices(widget?.arguments["id"] ??""),
});
}
///
@override
void dispose() {
super.dispose();
refreshController.dispose();
}
///
queryInvoices(id) async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
}
BaseData<InvoicesDetailInfo> baseData =
await apiService.invoiceDetail(id).catchError((error) {
networkError = AppUtils.dioErrorTypeToString(error.type);
networkStatus = -1;
setState(() {});
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (baseData != null && baseData.isSuccess) {
invoicesDetailInfo = baseData.data;
createFileOfPdfUrl().then((f) {
setState(() {
remotePDFpath = f.path;
});
});
refreshController.refreshCompleted();
networkStatus = 1;
setState(() {});
} else {
refreshController.refreshFailed();
refreshController.loadFailed();
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
/// PDF
Future<File> createFileOfPdfUrl() async {
Completer<File> completer = Completer();
print("Start download file from internet!");
try {
final url = invoicesDetailInfo?.ossUrl ?? "";
final filename = url.substring(url.lastIndexOf("/") + 1);
var request = await HttpClient().getUrl(Uri.parse(url));
var response = await request.close();
var bytes = await consolidateHttpClientResponseBytes(response);
var dir = await getApplicationDocumentsDirectory();
print("Download files");
print("${dir.path}/$filename");
File file = File("${dir.path}/$filename");
await file.writeAsBytes(bytes, flush: true);
completer.complete(file);
} catch (e) {
throw Exception('Error parsing asset file!');
}
return completer.future;
}
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: MyAppBar(
title: "发票详情",
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
),
body: networkStatus == -1
? noNetwork()
: (networkStatus == 0
? invoicesSm()
: SmartRefresher(
controller: refreshController,
enablePullDown: true,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
queryInvoices(widget?.arguments["id"] ?? "");
},
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: Container(
margin: EdgeInsets.only(top: 12.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 17.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.symmetric(
vertical: 16.h, horizontal: 18.w),
margin: EdgeInsets.symmetric(vertical: 12.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"电子发票资讯",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 15.sp,
fontWeight: MyFontWeight.bold,
),
),
Padding(
padding: EdgeInsets.only(
top: 16.h, bottom: 18.h),
child: Row(
children: [
Expanded(
child: Text(
"发票状态",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
Text(
invoicesState(
invoicesDetailInfo?.state ??
""),
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
],
),
),
Padding(
padding: EdgeInsets.only(bottom: 18.h),
child: Row(
children: [
Expanded(
child: Text(
"发票抬头",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
Expanded(
child: Text(
invoicesDetailInfo
?.invoiceHeaderName ??
"",
maxLines: 1,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.end,
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
],
),
),
Padding(
padding: EdgeInsets.only(bottom: 18.h),
child: Row(
children: [
Expanded(
child: Text(
"申请时间",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
Text(
invoicesDetailInfo?.reviewerTime ??
"",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
],
),
),
Row(
children: [
Expanded(
child: Text(
"开票金额",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
Text(
invoicesDetailInfo?.money ?? "",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
],
)
],
),
),
GestureDetector(
onTap: () {
if ((invoicesDetailInfo?.ossUrl ?? "")
.endsWith("pdf")) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => PDFScreen(
path: remotePDFpath,
inlet: 0,
),
),
);
} else {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
PhotoViewGalleryScreen(
images: [
invoicesDetailInfo?.ossUrl ?? ""
], //list
index: 0, //index
),
));
}
},
child: Container(
padding: EdgeInsets.symmetric(
vertical: 16.h, horizontal: 17.w),
margin: EdgeInsets.symmetric(vertical: 12.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Row(
crossAxisAlignment:
CrossAxisAlignment.start,
children: [
Expanded(
child: Text(
"1张发票,含${invoicesDetailInfo?.orderList?.length ?? 0}个订单",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
Padding(
padding: EdgeInsets.only(right: 6.w),
child: Text(
"查看",
style: TextStyle(
color: Color(0xFF1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
),
Icon(Icons.arrow_forward_ios,
color: Color(0xFF181818), size: 14.sp)
],
),
),
),
],
),
)),
Row(
children: [
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if ((invoicesDetailInfo?.ossUrl ?? "")
.endsWith("pdf")) {
showPdfAlertDialog();
} else {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) =>
PhotoViewGalleryScreen(
images: [
invoicesDetailInfo?.ossUrl ?? ""
], //list
index: 0, //index
),
));
}
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 16.h),
margin: EdgeInsets.only(
bottom: 34.h, right: 9.5.w, left: 14.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(45),
border: Border.all(
color: Color(0xff32A060),
width: 1.w,
),
),
width: double.infinity,
alignment: Alignment.center,
child: Text(
"查看电子发票",
style: TextStyle(
color: Color(0xff32A060),
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
),
),
),
)),
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
launchBrowser();
},
child: Container(
padding: EdgeInsets.symmetric(vertical: 16.h),
margin: EdgeInsets.only(
bottom: 34.h, left: 9.5.w, right: 14.w),
decoration: BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.circular(45),
),
width: double.infinity,
alignment: Alignment.center,
child: Text(
"下载电子发票",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
),
),
),
)),
],
)
],
),
),
)),
);
}
///
String invoicesState(state) {
if (state == "UN_AUDIT") {
return "待审核";
} else if (state == "AUDIT_PASS") {
return "开票成功";
} else if (state == "AUDIT_VOID") {
return "已作废";
} else if (state == "AUDIT_FAIL") {
return "开票失败";
} else {
return "";
}
}
///
showPdfAlertDialog() {
//
showDialog(
context: context,
builder: (BuildContext context) {
return PDFScreen(path: remotePDFpath, inlet: 1);
},
);
}
///
launchBrowser() async {
String url = invoicesDetailInfo?.ossUrl ?? "";
if (await canLaunch(url)) {
await launch(url);
} else {
throw 'Could not launch $url';
}
}
Widget invoicesSm() {
return Container(
margin: EdgeInsets.only(top: 12.h),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Container(
padding: EdgeInsets.symmetric(horizontal: 17.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding:
EdgeInsets.symmetric(vertical: 16.h, horizontal: 18.w),
margin: EdgeInsets.symmetric(vertical: 12.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 90.w,
height: 20.h,
),
),
Padding(
padding: EdgeInsets.only(top: 16.h, bottom: 18.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58.w,
height: 20.h,
),
),
],
),
),
Padding(
padding: EdgeInsets.only(bottom: 18.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58.w,
height: 20.h,
),
),
],
),
),
Padding(
padding: EdgeInsets.only(bottom: 18.h),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58.w,
height: 20.h,
),
),
],
),
),
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 58.w,
height: 20.h,
),
),
],
)
],
),
),
Container(
padding:
EdgeInsets.symmetric(vertical: 16.h, horizontal: 17.w),
margin: EdgeInsets.symmetric(vertical: 12.h),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(6),
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 124.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 28.w,
height: 20.h,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 18.w,
height: 20.h,
),
),
],
),
),
],
),
)),
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
// padding: EdgeInsets.symmetric(vertical: 16.h),
margin:
EdgeInsets.only(bottom: 34.h, right: 9.5.w, left: 14.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(45),
),
width: 164.w,
height: 48.h,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
// padding: EdgeInsets.symmetric(vertical: 16.h),
margin:
EdgeInsets.only(bottom: 34.h, right: 9.5.w, left: 14.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(45),
),
width: 164.w,
height: 48.h,
),
),
],
),
],
),
);
}
Widget noNetwork() {
return Container(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
// "无法连接到网络",
networkError.substring(0, networkError.indexOf(",")),
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.bold),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 10.h),
child: Text(
"请检查网络设置或稍后重试",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF7A797F),
fontWeight: MyFontWeight.regular),
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
queryInvoices(widget?.arguments["id"] ?? "");
},
child: Container(
decoration: BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h),
child: Text(
"重试",
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: MyFontWeight.regular),
)),
)
],
),
);
}
}

463
lib/order/invoices_manage/invoices_history.dart

@ -0,0 +1,463 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:intl/intl.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart';
import '../../generated/l10n.dart';
import '../../retrofit/data/base_data.dart';
import '../../retrofit/data/invoices_history_list.dart';
import '../../retrofit/retrofit_api.dart';
import '../../utils/flutter_utils.dart';
import '../../utils/font_weight.dart';
import '../../view_widget/classic_header.dart';
import '../../view_widget/my_appbar.dart';
import '../../view_widget/my_footer.dart';
import '../../view_widget/no_data_view.dart';
class InvoicesHistory extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _InvoicesHistory();
}
}
class _InvoicesHistory extends State<InvoicesHistory> {
final RefreshController refreshController = RefreshController();
ApiService apiService;
String networkError = "";
int networkStatus = 0;
List<Records> records = [];
int _current = 1;
Map<String,List<Records>> _map = {};
String _timeList;
@override
void initState() {
super.initState();
_onRefresh();
}
///
@override
void dispose() {
super.dispose();
refreshController.dispose();
}
///
queryInvoiceList() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(Dio(),
context: context,
token: value.getString("token"),
showLoading: false);
}
BaseData<InvoicesHistoryList> baseData = await apiService.invoicePage({
"current": _current,
"size": 10,
"searchKey": "",
}).catchError((error) {
networkError = AppUtils.dioErrorTypeToString(error.type);
networkStatus = -1;
setState(() {});
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (!mounted) return;
if (baseData != null && baseData.isSuccess) {
records.addAll(baseData?.data?.records ?? []);
(baseData?.data?.records ?? []).forEach((element) {
if(_map.containsKey((element.reviewerTime ?? element.createTime).toString().substring(0,7))){
_map[(element.reviewerTime ?? element.createTime).toString().substring(0,7)].add(element);
}else{
_map[(element.reviewerTime ?? element.createTime).toString().substring(0,7)] = [element];
}
});
if(_map.isNotEmpty)
_timeList = _map.keys.toList().first;
if ((baseData?.data?.records ?? []).isEmpty ||
records.length.toString() == baseData.data.total)
refreshController.loadNoData();
else
refreshController.loadComplete();
networkStatus = 1;
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
_onRefresh({bool isShowLoad = true}) async {
if (isShowLoad)
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
await queryInvoiceList();
EasyLoading.dismiss();
if (!mounted) return;
if (refreshController.isRefresh) refreshController.refreshCompleted();
setState(() {});
}
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: MyAppBar(
title: "开票历史",
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
),
body:
networkStatus == -1 ? noNetwork() :
Container(
child: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp: records.length == 0 ? false : true,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
_current = 1;
records.clear();
_onRefresh(isShowLoad: false);
},
onLoading: () {
_current++;
_onRefresh(isShowLoad: false);
},
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: Container(
child: networkStatus == 0
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(bottom: 16.h,top: 16.h,left: 17.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 70.w,
height: 20.h,
),
),
Expanded(child: ListView.builder(
itemCount: 10,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {},
child: invoicesHistoryListSm(),
);
},
)),
],
)
:
((records == null || records.length == 0)
? NoDataView(
src: "assets/image/ding_dan.webp",
isShowBtn: false,
text: "暂无开票记录",
fontSize: 16,
margin: EdgeInsets.only(top: 120,left: 20,right: 20),
)
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(top: 16.h, bottom: 16.h, left: 17.w),
child: Text(
_timeList.toString(),
style: TextStyle(
color: Color(0xff1A1A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
Expanded(child: ListView.builder(
itemCount: records?.length ?? 0,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if(records[position].state == "AUDIT_PASS")
Navigator.of(context)
.pushNamed('/router/invoices_detail_page',arguments: {
"id":records[position].id ?? ""
});
},
child: invoicesHistoryList(records[position]),
);
},
))
],
)),),
),
),
);
}
Widget invoicesHistoryList(Records records) {
return Container(
padding: EdgeInsets.symmetric(vertical: 14.h, horizontal: 12.w),
margin: EdgeInsets.only(left: 12.w, right: 12.w, bottom: 12.h),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(bottom: 25.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Expanded(
child: Text(
records?.invoiceHeaderName ?? "",
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
)),
Text(
invoicesStatus(records?.state ?? ""),
style: TextStyle(
color: Color(0xff32A060),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)
],
),
),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(right: 16.w),
child: Text(
"¥${records?.money ?? ""}",
style: TextStyle(
color: Color(0xff32A060),
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
),
)),
Expanded(
child: Text(
"电子普票",
style: TextStyle(
color: Color(0xff32A060),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
Text(
records?.reviewerTime ?? records?.createTime ?? "",
style: TextStyle(
color: Color(0xff4D4D4D),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)
],
)
],
),
);
}
///
String invoicesStatus(state) {
if (state == "UN_AUDIT") {
return "待审核";
} else if (state =="AUDIT_PASS") {
return "开票成功";
} else if (state =="AUDIT_VOID") {
return "已作废";
}else if (state =="AUDIT_FAIL") {
return "开票失败";
}else {
return "";
}
}
Widget invoicesHistoryListSm() {
return Container(
padding: EdgeInsets.symmetric(vertical: 14.h, horizontal: 12.w),
margin: EdgeInsets.symmetric(horizontal: 14.w, vertical: 12.h),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
child: Column(
children: [
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 24),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 180.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 25),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 42.w,
height: 20.h,
),
),
],
),
SizedBox(
height: 25.h,
),
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 20),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 47.w,
height: 20.h,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 56.w,
height: 20.h,
),
),
Spacer(),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 25),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 80.w,
height: 20.h,
),
),
],
),
],
),
);
}
Widget noNetwork() {
return Container(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
// "无法连接到网络",
networkError.substring(0, networkError.indexOf(",")),
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.bold),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 10.h),
child: Text(
"请检查网络设置或稍后重试",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF7A797F),
fontWeight: MyFontWeight.regular),
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
_onRefresh();
},
child: Container(
decoration: BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h),
child: Text(
"重试",
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: MyFontWeight.regular),
)),
)
],
),
);
}
}

679
lib/order/invoices_manage/invoices_manage_page.dart

@ -0,0 +1,679 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart';
import '../../generated/l10n.dart';
import '../../retrofit/data/base_data.dart';
import '../../retrofit/data/invoice_list.dart';
import '../../retrofit/retrofit_api.dart';
import '../../utils/flutter_utils.dart';
import '../../utils/font_weight.dart';
import '../../view_widget/classic_header.dart';
import '../../view_widget/my_appbar.dart';
import '../../view_widget/my_footer.dart';
import '../../view_widget/no_data_view.dart';
import '../../view_widget/settlement_tips_dialog.dart';
class InvoicesManagePage extends StatefulWidget {
@override
State<StatefulWidget> createState() {
return _InvoicesManagePage();
}
}
class _InvoicesManagePage extends State<InvoicesManagePage> {
final RefreshController refreshController = RefreshController();
ApiService apiService;
String networkError = "";
int networkStatus = 0;
int _pageNum = 1;
var allCheckIndex = false;
List<Records> records = [];
List<Records> unRecords = [];
@override
void initState() {
super.initState();
_onRefresh();
}
///
@override
void dispose() {
super.dispose();
refreshController.dispose();
}
///
queryInvoiceList() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(Dio(),
context: context,
token: value.getString("token"),
showLoading: false);
}
BaseData<InvoiceList> baseData = await apiService.invoiceOrderList({
"current": _pageNum,
"size": 10,
"searchKey": "",
}).catchError((error) {
networkError = AppUtils.dioErrorTypeToString(error.type);
networkStatus = -1;
setState(() {});
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (!mounted) return;
if (baseData != null && baseData.isSuccess) {
records.addAll(baseData?.data?.records ?? []);
baseData.data.records.forEach((element) {
if (double.tryParse(element?.payedPrice ?? "") > 0)
unRecords.add(element);
});
if ((baseData?.data?.records ?? []).isEmpty ||
records.length.toString() == baseData.data.total)
refreshController.loadNoData();
else
refreshController.loadComplete();
networkStatus = 1;
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
_onRefresh({bool isShowLoad = true}) async {
if (isShowLoad)
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
await queryInvoiceList();
EasyLoading.dismiss();
if (!mounted) return;
if (refreshController.isRefresh) refreshController.refreshCompleted();
setState(() {});
}
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: MyAppBar(
title: "发票管理",
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
),
body: networkStatus == -1
? noNetwork()
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
color: Colors.white,
padding: EdgeInsets.only(top: 15.h, bottom: 10.h),
margin: EdgeInsets.only(bottom: 12.h),
child: Row(
children: [
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
Navigator.of(context)
.pushNamed('/router/invoices_title_info',arguments:{
"enterType":1,
});
},
child: Column(
children: [
Image.asset(
"assets/image/invoice_title.webp",
width: 26.h,
height: 26.h,
fit: BoxFit.fitWidth,
),
Padding(
padding: EdgeInsets.only(top: 7.6.h),
child: Text(
"抬头管理",
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
),
)
],
),
)),
Expanded(
child: GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
Navigator.of(context)
.pushNamed('/router/invoices_history');
},
child: Column(
children: [
Image.asset(
"assets/image/invoice_history.webp",
width: 26.h,
height: 26.h,
fit: BoxFit.fitWidth,
),
Padding(
padding: EdgeInsets.only(top: 7.6.h),
child: Text(
"开票历史",
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
),
)
],
))),
],
),
),
Padding(
padding: EdgeInsets.only(left: 14.w, bottom: 6.h),
child: Text(
"可开票订单",
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: FontWeight.bold,
),
textAlign: TextAlign.left,
),
),
Expanded(
child: Container(
child: SmartRefresher(
controller: refreshController,
enablePullDown: true,
enablePullUp:records.length == 0 ? false :true,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
_pageNum = 1;
records.clear();
unRecords.clear();
_onRefresh(isShowLoad: false);
},
onLoading: () {
_pageNum++;
_onRefresh(isShowLoad: false);
},
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: Container(
child: networkStatus == 0
? ListView.builder(
itemCount: 10,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {},
child: invoicesOrderItemSm(),
);
},
)
: ((records == null || records.length == 0)
? NoDataView(
src: "assets/image/ding_dan.webp",
isShowBtn: false,
text: "暂无可开票的订单",
fontSize: 16,
margin: EdgeInsets.only(top: 120,left: 20,right: 20),
)
: ListView.builder(
itemCount: records?.length ?? 0,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
setState(() {
records[position].isSelect =
!records[position].isSelect;
});
},
child:
invoicesOrderItem(records[position]),
);
},
)),
),
),
)),
if (records != null && records.length > 0)
Container(
decoration: BoxDecoration(
color: Colors.white,
),
width: double.infinity,
padding: EdgeInsets.only(
top: 16.h, bottom: 45.h, left: 14.w, right: 17.w),
child: Column(
children: [
Padding(
padding: EdgeInsets.only(bottom: 10.h),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Padding(
padding: EdgeInsets.only(right: 6.w),
child: Text(
"已选${selectNum()}个订单合计:",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),
),
),
Expanded(
child: Text(
"${selectPrice()}",
style: TextStyle(
color: Color(0xFF32A060),
fontSize: 20.sp,
fontWeight: MyFontWeight.medium,
),
)),
Text(
"开票金额以实际发票为准",
style: TextStyle(
color: Color(0xFF727272),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),
),
],
)),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
records.forEach((element) {
element.isSelect = !allCheckIndex;
});
allCheckIndex = !allCheckIndex;
setState(() {});
},
child: Container(
padding: EdgeInsets.only(right: 8.w),
child: Image.asset(
allCheckIndex
? "assets/image/icon_radio_selected.webp"
: "assets/image/icon_radio_unselected.webp",
width: 16.w,
height: 16.h,
)),
),
Expanded(
child: GestureDetector(
onTap: () {
records.forEach((element) {
element.isSelect = !allCheckIndex;
});
allCheckIndex = !allCheckIndex;
setState(() {});
},
child: Text(
"全选",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
)),
GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
List<dynamic> ids = [];
records.forEach((element) {
if (element.isSelect) ids.add(element.id);
});
if((double.tryParse(selectNum()) > 0))
Navigator.of(context)
.pushNamed('/router/edit_invoices_info',arguments:{
"selectPrice": selectPrice(),
"ids":ids ?? []
}).then((value) async{
if(value ==1){
_pageNum = 1;
records.clear();
unRecords.clear();
await _onRefresh();
Future.delayed(Duration(milliseconds: 500), () {
SmartDialog.show(
widget: SettlementTips(
() {},
text: "已成功提交发票信息",
),
);
});
}
});
},
child: Container(
decoration: BoxDecoration(
color: (double.tryParse(selectNum()) > 0)
? Color(0xFF32A060)
: Color(0xFFd6d6d6),
borderRadius: BorderRadius.circular(4),
),
alignment: Alignment.center,
padding: EdgeInsets.symmetric(
horizontal: 23.w, vertical: 8.h),
child: Text(
"去开票",
style: TextStyle(
color: Colors.white,
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
),
),
)
],
),
],
),
)
],
),
);
}
///
String selectNum() {
return unRecords.where((element) => element.isSelect).length.toString();
}
///
String selectPrice() {
return unRecords
.where((element) => element.isSelect)
.fold(
0.0,
(previousValue, element) =>
previousValue + double.tryParse(element.payedPrice ?? "0") ??
0.0)
.toStringAsFixed(2);
}
///list
Widget invoicesOrderItem(Records records) {
return Container(
padding: EdgeInsets.only(top: 12.h, bottom: 12.h, right: 20.w),
margin: EdgeInsets.symmetric(horizontal: 16.w, vertical: 6.h),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
((double.tryParse(records?.payedPrice ?? "0") ?? 0) > 0)
? GestureDetector(
behavior: HitTestBehavior.translucent,
onTap: () {
setState(() {
records.isSelect = !records.isSelect;
});
},
child: Container(
padding: EdgeInsets.only(
right: 15.w, left: 12.w, top: 5.h, bottom: 5.h),
alignment: Alignment.center,
child: Image.asset(
(records?.isSelect ?? false)
? "assets/image/icon_radio_selected.webp"
: "assets/image/icon_radio_unselected.webp",
width: 15.w,
height: 15.h,
),
),
)
: Container(
padding: EdgeInsets.only(
right: 15.w, left: 12.w, top: 5.h, bottom: 5.h),
alignment: Alignment.center,
child: Image.asset(
"assets/image/disenable_seletor_tow.webp",
width: 15.w,
height: 15.h,
)),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
records?.storeName ?? "",
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
color: Color(0xFF0D0D0D),
),
),
Padding(
padding: EdgeInsets.only(top: 8.h, bottom: 14.h),
child: Text(
"订单编号:${records?.id ?? ""}",
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
),
)),
Text(
"下单时间: ${records?.createTime ?? ""}",
style: TextStyle(
fontSize: 10.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF0D0D0D),
),
),
],
)),
Text.rich(
TextSpan(
children: [
TextSpan(
text: records?.finalPayPrice ?? "0.00",
style: TextStyle(
color: Color(0xFF000000),
fontSize: 16.sp,
fontWeight: MyFontWeight.bold,
),
),
TextSpan(
text: "",
style: TextStyle(
color: Color(0xFF4D4D4D),
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
),
),
],
),
),
],
),
);
}
Widget invoicesOrderItemSm() {
return Container(
padding: EdgeInsets.only(top: 12, bottom: 12, left: 16),
margin: EdgeInsets.symmetric(horizontal: 16, vertical: 6),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
child: Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 13.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 16,
height: 16,
),
),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 180,
height: 20,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(top: 8.h, bottom: 14.h),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 182,
height: 17,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 170,
height: 14,
),
)
],
)),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 13.w),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 49,
height: 20,
),
),
],
),
);
}
Widget noNetwork() {
return Container(
color: Colors.white,
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
networkError.substring(0, networkError.indexOf(",")),
style: TextStyle(
fontSize: 14,
color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.bold,
),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 10),
child: Text(
"请检查网络设置或稍后重试",
style: TextStyle(
fontSize: 12,
color: Color(0xFF7A797F),
fontWeight: MyFontWeight.regular,
),
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
_onRefresh();
},
child: Container(
decoration: BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 3),
child: Text(
"重试",
style: TextStyle(
fontSize: 14,
color: Colors.white,
fontWeight: MyFontWeight.regular,
),
),
),
),
],
),
);
}
}

577
lib/order/invoices_manage/invoices_title_info.dart

@ -0,0 +1,577 @@
import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:shimmer/shimmer.dart';
import '../../generated/l10n.dart';
import '../../retrofit/data/base_data.dart';
import '../../retrofit/data/title_info_list.dart';
import '../../retrofit/retrofit_api.dart';
import '../../utils/flutter_utils.dart';
import '../../utils/font_weight.dart';
import '../../view_widget/border_text.dart';
import '../../view_widget/classic_header.dart';
import '../../view_widget/my_appbar.dart';
import '../../view_widget/my_footer.dart';
import '../../view_widget/no_data_view.dart';
import '../../view_widget/round_button.dart';
class InvoicesTitleInfo extends StatefulWidget {
final Map<String, dynamic> arguments;
InvoicesTitleInfo({this.arguments});
@override
State<StatefulWidget> createState() {
return _InvoicesTitleInfo();
}
}
class _InvoicesTitleInfo extends State<InvoicesTitleInfo> {
final RefreshController refreshController = RefreshController();
String networkError = "";
int networkStatus = 0;
ApiService apiService;
List<Records> records = [];
int _current = 1;
@override
void initState() {
super.initState();
_onRefresh();
}
///
@override
void dispose() {
super.dispose();
refreshController.dispose();
}
_onRefresh({bool isShowLoad = true}) async {
if (isShowLoad)
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
await queryInvoiceHeadersList();
EasyLoading.dismiss();
if (!mounted) return;
if (refreshController.isRefresh) refreshController.refreshCompleted();
setState(() {});
}
///
queryInvoiceHeadersList() async {
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
}
BaseData<TitleInfoList> baseData = await apiService.invoiceHeaderList({
"current": _current,
"map": {},
"model": {},
"order": "descending",
"size": 50,
"sort": "id"
}).catchError((error) {
networkError = AppUtils.dioErrorTypeToString(error.type);
networkStatus = -1;
setState(() {});
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (!mounted) return;
if (baseData != null && baseData.isSuccess) {
records.addAll(baseData?.data?.records ?? []);
if ((baseData?.data?.records ?? []).isEmpty ||
records.length.toString() == baseData.data.total)
refreshController.loadNoData();
else
refreshController.loadComplete();
networkStatus = 1;
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
}
///
delTitleInfo(ids) async {
try {
EasyLoading.show(
status: S.current.zhengzaijiazai,
maskType: EasyLoadingMaskType.black);
if (apiService == null) {
SharedPreferences value = await SharedPreferences.getInstance();
apiService = ApiService(
Dio(),
context: context,
token: value.getString("token"),
);
}
BaseData baseData = await apiService.delInvoiceHeader(ids).catchError((error) {
networkError = AppUtils.dioErrorTypeToString(error.type);
networkStatus = -1;
setState(() {});
refreshController.refreshFailed();
refreshController.loadFailed();
});
if (baseData != null && baseData.isSuccess) {
await editOnRefresh();
Future.delayed(Duration(milliseconds: 500), () {
SmartDialog.showToast("删除信息成功", alignment: Alignment.center);
});
networkStatus = 1;
} else {
SmartDialog.showToast(baseData.msg, alignment: Alignment.center);
}
} finally {
EasyLoading.dismiss();
}
}
editOnRefresh() {
_current = 1;
records.clear();
_onRefresh(isShowLoad: false);
}
@override
Widget build(BuildContext context) {
return Scaffold(
resizeToAvoidBottomInset: false,
appBar: MyAppBar(
title: "抬头管理",
titleColor: Colors.black,
background: Colors.white,
leadingColor: Colors.black,
),
body: networkStatus == -1
? noNetwork()
: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expanded(
child: Container(
child: SmartRefresher(
controller: refreshController,
enablePullDown: true,
// enablePullUp: records.length == 0 ? false : true,
header: MyHeader(),
footer: CustomFooter(
builder: (context, mode) {
return MyFooter(mode);
},
),
onRefresh: () {
_current = 1;
records.clear();
_onRefresh(isShowLoad: false);
},
onLoading: () {
_current++;
_onRefresh(isShowLoad: false);
},
physics: BouncingScrollPhysics(),
scrollController: ScrollController(),
child: Container(
margin: EdgeInsets.only(bottom: 20.h),
child: networkStatus == 0
? ListView.builder(
itemCount: 10,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {},
child: titleInfoListSm(),
);
},
)
: ((records == null || records.length == 0)
? NoDataView(
src: "assets/image/guan_zhu.webp",
isShowBtn: false,
text: "暂无抬头信息",
fontSize: 16,
margin: EdgeInsets.only(top:120),
)
: ListView.builder(
itemCount: records?.length ?? 0,
physics: BouncingScrollPhysics(),
shrinkWrap: true,
itemBuilder: (context, position) {
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
if(widget.arguments["enterType"] == 0){
Navigator.of(context).pop({
"id":records[position]?.id ?? "",
"phone":records[position]?.companyPhone ?? "",
"name":records[position]?.name ?? ""
});
}},
child: titleInfoList(records[position]),
);
},
))),
),
)),
if (networkStatus == 1)
GestureDetector(
onTap: () {
Navigator.of(context)
.pushNamed('/router/add_invoices_title',arguments:{
"titleName":"添加抬头",
}).then((value) {
_current = 1;
records.clear();
_onRefresh(isShowLoad: false);
});
},
child: Container(
padding: EdgeInsets.symmetric(vertical:16.h),
margin: EdgeInsets.only(bottom:25.h,left:20.w,right: 20.w),
decoration: BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.circular(
45
),
),
width: double.infinity,
alignment: Alignment.center,
child: Text(
"添加抬头",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: MyFontWeight.medium,
),
),
),
),
],
),
);
}
Widget titleInfoList(Records records) {
return Container(
padding: EdgeInsets.only(
top: ((records?.type ?? "") == "PERSONAL") ? 30.h : 14.h,
bottom: ((records?.type ?? "") == "PERSONAL") ? 30.h : 14.h,
left: 12.w),
margin: EdgeInsets.only(top: 12.h, bottom: 4.h, right: 14.w, left: 14.w),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
records?.name ?? "",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: Colors.black,
fontSize: 14.sp,
fontWeight: MyFontWeight.bold,
),
),
if ((records?.type ?? "") == "COMPANY")
Padding(
padding: EdgeInsets.only(top: 20.h),
child: Text(
"税号:${records?.taxId ?? ""}",
style: TextStyle(
color: Color(0xff353535),
fontSize: 14.sp,
fontWeight: MyFontWeight.regular,
),
)),
],
)),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Navigator.of(context).pushNamed('/router/add_invoices_title',arguments: {
"titleName":"编辑抬头",
"titleType":records.type == "COMPANY" ? 1:0,
"records":records,
}).then((value){
if(value == 1)
editOnRefresh();
});
},
child: Padding(
padding: EdgeInsets.only(left:30.w,right: 12.w),
child: Image.asset(
"assets/image/title_info_edit.webp",
width: 16.h,
height: 16.h,
fit: BoxFit.fitWidth,
))),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
showTitleInfoDialog(records?.id ?? "");
},
child: Padding(
padding: EdgeInsets.only(left: 12.w, right: 31.w),
child: Image.asset(
"assets/image/title_del.webp",
width: 15.h,
height: 16.h,
fit: BoxFit.fitWidth,
)),
),
],
),
);
}
Widget titleInfoListSm() {
return Container(
padding: EdgeInsets.only(top: 12, bottom: 12, left: 16),
margin: EdgeInsets.symmetric(horizontal: 14, vertical: 6),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Color(0x0F06152E),
offset: Offset(0, 2),
blurRadius: 4,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(8),
),
child: Row(
children: [
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(bottom: 16),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 180.w,
height: 20.h,
),
),
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 10),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 40.w,
height: 20.h,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 120,
height: 20,
),
),
],
),
],
)),
Row(
children: [
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 24),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 16.w,
height: 16.h,
),
),
Shimmer.fromColors(
baseColor: Color(0XFFD8D8D8),
highlightColor: Color(0XFFD8D8D8),
child: Container(
margin: EdgeInsets.only(right: 25),
decoration: BoxDecoration(
color: Color(0XFFD8D8D8),
borderRadius: BorderRadius.circular(2),
),
width: 16,
height: 16,
),
),
],
),
],
),
);
}
Widget noNetwork() {
return Container(
width: double.infinity,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
// "无法连接到网络",
networkError.substring(0, networkError.indexOf(",")),
style: TextStyle(
fontSize: 14.sp,
color: Color(0xFF0D0D0D),
fontWeight: MyFontWeight.bold),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 10.h),
child: Text(
"请检查网络设置或稍后重试",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF7A797F),
fontWeight: MyFontWeight.regular),
),
),
GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
_onRefresh();
},
child: Container(
decoration: BoxDecoration(
color: Color(0xff32A060),
borderRadius: BorderRadius.circular(15),
),
padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h),
child: Text(
"重试",
style: TextStyle(
fontSize: 14.sp,
color: Colors.white,
fontWeight: MyFontWeight.regular),
)),
)
],
),
);
}
//
showTitleInfoDialog(id) {
showDialog(
context: context,
builder: (context) {
return AlertDialog(
content: Container(
width: MediaQuery.of(context).size.width - 84,
height: 139,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"确认要删除这条数据吗?",
style: TextStyle(
color: Colors.black,
fontSize: 16,
fontWeight: MyFontWeight.regular,
),
),
SizedBox(height: 35),
Row(
children: [
Expanded(
child: InkWell(
child: BorderText(
text: S.of(context).quxiao,
textColor: Color(0xff32A060),
fontSize: 16.sp,
fontWeight: FontWeight.bold,
borderColor: Color(0xff32A060),
radius: 4,
padding: EdgeInsets.all(12),
borderWidth: 1,
),
onTap: () {
Navigator.of(context).pop();
},
),
flex: 1,
),
SizedBox(
width: 16.w,
),
Expanded(
child: InkWell(
child: RoundButton(
text: S.of(context).shanchu,
textColor: Colors.white,
radius: 4,
padding: EdgeInsets.all(12),
backgroup: Color(0xff32A060),
fontSize: 16.sp,
fontWeight: FontWeight.bold,
),
onTap: () {
delTitleInfo(id);
Navigator.of(context).pop();
},
),
flex: 1,
),
],
)
],
),
),
);
},
);
}
}

195
lib/order/invoices_manage/pdf_screen.dart

@ -0,0 +1,195 @@
import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_pdfview/flutter_pdfview.dart';
class PDFScreen extends StatefulWidget {
final String path;
final int inlet;
PDFScreen({Key key, this.path, this.inlet}) : super(key: key);
_PDFScreenState createState() => _PDFScreenState();
}
class _PDFScreenState extends State<PDFScreen> with WidgetsBindingObserver {
final Completer<PDFViewController> _controller =
Completer<PDFViewController>();
int pages = 0;
int currentPage = 0;
int pageTotal = 0;
bool isReady = false;
String errorMessage = '';
@override
Widget build(BuildContext context) {
return widget.inlet == 1
? Material(
type: MaterialType.transparency,
child: Stack(
children: <Widget>[
Center(
child: Container(
height: 250,
decoration: BoxDecoration(
color: Colors.white,
),
child: PDFView(
filePath: widget.path,
enableSwipe: true,
swipeHorizontal: true,
autoSpacing: false,
pageFling: true,
pageSnap: true,
defaultPage: currentPage,
fitPolicy: FitPolicy.BOTH,
preventLinkNavigation: false,
// if set to true the link is handled in flutter
onRender: (_pages) {
setState(() {
pages = _pages;
isReady = true;
});
},
onError: (error) {
setState(() {
errorMessage = error.toString();
});
print(error.toString());
},
onPageError: (page, error) {
setState(() {
errorMessage = '$page: ${error.toString()}';
});
print('$page: ${error.toString()}');
},
onViewCreated: (PDFViewController pdfViewController) {
_controller.complete(pdfViewController);
},
onLinkHandler: (String uri) {
print('goto uri: $uri');
},
onPageChanged: (int page, int total) {
if (total > 0) {
print('page change: $page/$total');
setState(() {
currentPage = page;
pageTotal = total;
});
} else {
pageTotal = 1;
}
},
),
),
),
errorMessage.isEmpty
? !isReady
? Center(
child: CircularProgressIndicator(),
)
: Container()
: Center(
child: Text(errorMessage),
),
//pdfindex显示
Positioned(
width: MediaQuery.of(context).size.width,
bottom: 45,
child: Center(
child: Text("${currentPage + 1}/${(pageTotal > 0)?pageTotal:1}",
style: TextStyle(color: Colors.white, fontSize: 16)),
),
),
],
),
)
: Scaffold(
body: Stack(
children: <Widget>[
PDFView(
filePath: widget.path,
enableSwipe: true,
swipeHorizontal: true,
autoSpacing: false,
pageFling: true,
pageSnap: true,
defaultPage: currentPage,
fitPolicy: FitPolicy.BOTH,
preventLinkNavigation: false,
// if set to true the link is handled in flutter
onRender: (_pages) {
setState(() {
pages = _pages;
isReady = true;
});
},
onError: (error) {
setState(() {
errorMessage = error.toString();
});
print(error.toString());
},
onPageError: (page, error) {
setState(() {
errorMessage = '$page: ${error.toString()}';
});
print('$page: ${error.toString()}');
},
onViewCreated: (PDFViewController pdfViewController) {
_controller.complete(pdfViewController);
},
onLinkHandler: (String uri) {
print('goto uri: $uri');
},
onPageChanged: (int page, int total) {
if (total > 0) {
print('page change: $page/$total');
setState(() {
currentPage = page;
pageTotal = total;
});
} else {
pageTotal = 1;
}
},
),
errorMessage.isEmpty
? !isReady
? Center(
child: CircularProgressIndicator(),
)
: Container()
: Center(
child: Text(errorMessage),
),
//pdfindex显示
Positioned(
bottom: 45,
width: MediaQuery.of(context).size.width,
child: Center(
child: Text("${currentPage + 1}/${(pageTotal > 0)?pageTotal:1}",
style: TextStyle(color: Colors.black, fontSize: 16)),
),
),
Positioned(
//
right: 10,
top: MediaQuery.of(context).padding.top,
child: IconButton(
icon: Icon(
Icons.close,
size: 30,
color: Colors.black,
),
onPressed: () {
Navigator.of(context).pop();
},
),
),
],
),
);
}
}

2
lib/order/order_history_page.dart

@ -196,6 +196,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
} else {
if((baseData?.msg ?? "") != "")
SmartDialog.showToast(baseData.msg,alignment: Alignment.center);
networkStatus = 2;
refreshController.refreshFailed();
refreshController.loadFailed();
}}finally{
@ -632,6 +633,7 @@ class _OrderHistoryList extends State<OrderHistoryList>
? StatusUtils.statusBtn(
context,
orderInfo.payStatus,
orderInfo.payChannel,
orderInfo.orderStatus,
orderInfo.isTakeOut,
orderInfo.sendStatus,

1212
lib/retrofit/data/invoice_list.dart

File diff suppressed because one or more lines are too long

1515
lib/retrofit/data/invoices_detail_info.dart

File diff suppressed because it is too large Load Diff

385
lib/retrofit/data/invoices_history_list.dart

@ -0,0 +1,385 @@
/// records : [{"id":"1816408165248401408","createTime":"2024-07-25 17:40:28","createUser":"1379254113602109440","updateTime":"2024-07-25 17:40:28","updateUser":"1379254113602109440","phone":"","receivingPhone":"13052919193","mid":"1379254113602109440","orderIds":["1816397314357460992","1816396872328151040","1815299099583315968","1808758418991742976","1739531721478504448","1739529082455982080","1739528149030404096","1721749099142709248","1721748992578027520","1721748249640960000","1708069378165047296","1708069229195952128"],"money":"4.00","type":"ELECTRONIC","headerId":"1816011766241427456","state":"UN_AUDIT","reviewerTime":null,"reviewerBy":"0","ossUrl":null,"reason":"","isDelete":0,"invoiceHeaderName":"u我i","invoiceHeaderCode":"1233456","orderList":null,"headertype":null,"companyAddr":null,"companyPhone":null,"bank":null,"bankNumber":null},{"id":"1816394976490160128","createTime":"2024-07-25 16:48:04","createUser":"1379254113602109440","updateTime":"2024-07-25 16:48:04","updateUser":"1379254113602109440","phone":"","receivingPhone":"13052919193","mid":"1379254113602109440","orderIds":["1808763201462992896"],"money":"0.01","type":"ELECTRONIC","headerId":"1816011766241427456","state":"UN_AUDIT","reviewerTime":null,"reviewerBy":"0","ossUrl":null,"reason":"","isDelete":0,"invoiceHeaderName":"u我i","invoiceHeaderCode":"1233456","orderList":null,"headertype":null,"companyAddr":null,"companyPhone":null,"bank":null,"bankNumber":null},{"id":"1816394876095299584","createTime":"2024-07-25 16:47:40","createUser":"1379254113602109440","updateTime":"2024-07-25 16:47:40","updateUser":"1379254113602109440","phone":"","receivingPhone":"131789456123","mid":"1379254113602109440","orderIds":["1808763658105257984"],"money":"0.01","type":"ELECTRONIC","headerId":"1816011766241427456","state":"UN_AUDIT","reviewerTime":null,"reviewerBy":"0","ossUrl":null,"reason":"","isDelete":0,"invoiceHeaderName":"u我i","invoiceHeaderCode":"1233456","orderList":null,"headertype":null,"companyAddr":null,"companyPhone":null,"bank":null,"bankNumber":null},{"id":"1816393433175031808","createTime":"2024-07-25 16:41:56","createUser":"1379254113602109440","updateTime":"2024-07-25 16:41:56","updateUser":"1379254113602109440","phone":"","receivingPhone":"13052919193","mid":"1379254113602109440","orderIds":["1810210939736162304"],"money":"0.01","type":"ELECTRONIC","headerId":"1816011766241427456","state":"UN_AUDIT","reviewerTime":null,"reviewerBy":"0","ossUrl":null,"reason":"","isDelete":0,"invoiceHeaderName":"u我i","invoiceHeaderCode":"1233456","orderList":null,"headertype":null,"companyAddr":null,"companyPhone":null,"bank":null,"bankNumber":null}]
/// total : "4"
/// size : "10"
/// current : "1"
/// orders : [{"column":"id","asc":false}]
/// hitCount : false
/// searchCount : true
/// pages : "1"
class InvoicesHistoryList {
InvoicesHistoryList({
List<Records> records,
String total,
String size,
String current,
List<Orders> orders,
bool hitCount,
bool searchCount,
String pages,}){
_records = records;
_total = total;
_size = size;
_current = current;
_orders = orders;
_hitCount = hitCount;
_searchCount = searchCount;
_pages = pages;
}
InvoicesHistoryList.fromJson(dynamic json) {
if (json['records'] != null) {
_records = [];
json['records'].forEach((v) {
_records.add(Records.fromJson(v));
});
}
_total = json['total'];
_size = json['size'];
_current = json['current'];
if (json['orders'] != null) {
_orders = [];
json['orders'].forEach((v) {
_orders.add(Orders.fromJson(v));
});
}
_hitCount = json['hitCount'];
_searchCount = json['searchCount'];
_pages = json['pages'];
}
List<Records> _records;
String _total;
String _size;
String _current;
List<Orders> _orders;
bool _hitCount;
bool _searchCount;
String _pages;
InvoicesHistoryList copyWith({ List<Records> records,
String total,
String size,
String current,
List<Orders> orders,
bool hitCount,
bool searchCount,
String pages,
}) => InvoicesHistoryList( records: records ?? _records,
total: total ?? _total,
size: size ?? _size,
current: current ?? _current,
orders: orders ?? _orders,
hitCount: hitCount ?? _hitCount,
searchCount: searchCount ?? _searchCount,
pages: pages ?? _pages,
);
List<Records> get records => _records;
String get total => _total;
String get size => _size;
String get current => _current;
List<Orders> get orders => _orders;
bool get hitCount => _hitCount;
bool get searchCount => _searchCount;
String get pages => _pages;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_records != null) {
map['records'] = _records.map((v) => v.toJson()).toList();
}
map['total'] = _total;
map['size'] = _size;
map['current'] = _current;
if (_orders != null) {
map['orders'] = _orders.map((v) => v.toJson()).toList();
}
map['hitCount'] = _hitCount;
map['searchCount'] = _searchCount;
map['pages'] = _pages;
return map;
}
}
/// column : "id"
/// asc : false
class Orders {
Orders({
String column,
bool asc,}){
_column = column;
_asc = asc;
}
Orders.fromJson(dynamic json) {
_column = json['column'];
_asc = json['asc'];
}
String _column;
bool _asc;
Orders copyWith({ String column,
bool asc,
}) => Orders( column: column ?? _column,
asc: asc ?? _asc,
);
String get column => _column;
bool get asc => _asc;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['column'] = _column;
map['asc'] = _asc;
return map;
}
}
/// id : "1816408165248401408"
/// createTime : "2024-07-25 17:40:28"
/// createUser : "1379254113602109440"
/// updateTime : "2024-07-25 17:40:28"
/// updateUser : "1379254113602109440"
/// phone : ""
/// receivingPhone : "13052919193"
/// mid : "1379254113602109440"
/// orderIds : ["1816397314357460992","1816396872328151040","1815299099583315968","1808758418991742976","1739531721478504448","1739529082455982080","1739528149030404096","1721749099142709248","1721748992578027520","1721748249640960000","1708069378165047296","1708069229195952128"]
/// money : "4.00"
/// type : "ELECTRONIC"
/// headerId : "1816011766241427456"
/// state : "UN_AUDIT"
/// reviewerTime : null
/// reviewerBy : "0"
/// ossUrl : null
/// reason : ""
/// isDelete : 0
/// invoiceHeaderName : "u我i"
/// invoiceHeaderCode : "1233456"
/// orderList : null
/// headertype : null
/// companyAddr : null
/// companyPhone : null
/// bank : null
/// bankNumber : null
class Records {
Records({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String phone,
String receivingPhone,
String mid,
List<String> orderIds,
String money,
String type,
String headerId,
String state,
dynamic reviewerTime,
String reviewerBy,
dynamic ossUrl,
String reason,
num isDelete,
String invoiceHeaderName,
String invoiceHeaderCode,
dynamic orderList,
dynamic headertype,
dynamic companyAddr,
dynamic companyPhone,
dynamic bank,
dynamic bankNumber,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_phone = phone;
_receivingPhone = receivingPhone;
_mid = mid;
_orderIds = orderIds;
_money = money;
_type = type;
_headerId = headerId;
_state = state;
_reviewerTime = reviewerTime;
_reviewerBy = reviewerBy;
_ossUrl = ossUrl;
_reason = reason;
_isDelete = isDelete;
_invoiceHeaderName = invoiceHeaderName;
_invoiceHeaderCode = invoiceHeaderCode;
_orderList = orderList;
_headertype = headertype;
_companyAddr = companyAddr;
_companyPhone = companyPhone;
_bank = bank;
_bankNumber = bankNumber;
}
Records.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_phone = json['phone'];
_receivingPhone = json['receivingPhone'];
_mid = json['mid'];
_orderIds = json['orderIds'] != null ? json['orderIds'].cast<String>() : [];
_money = json['money'];
_type = json['type'];
_headerId = json['headerId'];
_state = json['state'];
_reviewerTime = json['reviewerTime'];
_reviewerBy = json['reviewerBy'];
_ossUrl = json['ossUrl'];
_reason = json['reason'];
_isDelete = json['isDelete'];
_invoiceHeaderName = json['invoiceHeaderName'];
_invoiceHeaderCode = json['invoiceHeaderCode'];
_orderList = json['orderList'];
_headertype = json['headertype'];
_companyAddr = json['companyAddr'];
_companyPhone = json['companyPhone'];
_bank = json['bank'];
_bankNumber = json['bankNumber'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _phone;
String _receivingPhone;
String _mid;
List<String> _orderIds;
String _money;
String _type;
String _headerId;
String _state;
dynamic _reviewerTime;
String _reviewerBy;
dynamic _ossUrl;
String _reason;
num _isDelete;
String _invoiceHeaderName;
String _invoiceHeaderCode;
dynamic _orderList;
dynamic _headertype;
dynamic _companyAddr;
dynamic _companyPhone;
dynamic _bank;
dynamic _bankNumber;
Records copyWith({ String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String phone,
String receivingPhone,
String mid,
List<String> orderIds,
String money,
String type,
String headerId,
String state,
dynamic reviewerTime,
String reviewerBy,
dynamic ossUrl,
String reason,
num isDelete,
String invoiceHeaderName,
String invoiceHeaderCode,
dynamic orderList,
dynamic headertype,
dynamic companyAddr,
dynamic companyPhone,
dynamic bank,
dynamic bankNumber,
}) => Records( id: id ?? _id,
createTime: createTime ?? _createTime,
createUser: createUser ?? _createUser,
updateTime: updateTime ?? _updateTime,
updateUser: updateUser ?? _updateUser,
phone: phone ?? _phone,
receivingPhone: receivingPhone ?? _receivingPhone,
mid: mid ?? _mid,
orderIds: orderIds ?? _orderIds,
money: money ?? _money,
type: type ?? _type,
headerId: headerId ?? _headerId,
state: state ?? _state,
reviewerTime: reviewerTime ?? _reviewerTime,
reviewerBy: reviewerBy ?? _reviewerBy,
ossUrl: ossUrl ?? _ossUrl,
reason: reason ?? _reason,
isDelete: isDelete ?? _isDelete,
invoiceHeaderName: invoiceHeaderName ?? _invoiceHeaderName,
invoiceHeaderCode: invoiceHeaderCode ?? _invoiceHeaderCode,
orderList: orderList ?? _orderList,
headertype: headertype ?? _headertype,
companyAddr: companyAddr ?? _companyAddr,
companyPhone: companyPhone ?? _companyPhone,
bank: bank ?? _bank,
bankNumber: bankNumber ?? _bankNumber,
);
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get phone => _phone;
String get receivingPhone => _receivingPhone;
String get mid => _mid;
List<String> get orderIds => _orderIds;
String get money => _money;
String get type => _type;
String get headerId => _headerId;
String get state => _state;
dynamic get reviewerTime => _reviewerTime;
String get reviewerBy => _reviewerBy;
dynamic get ossUrl => _ossUrl;
String get reason => _reason;
num get isDelete => _isDelete;
String get invoiceHeaderName => _invoiceHeaderName;
String get invoiceHeaderCode => _invoiceHeaderCode;
dynamic get orderList => _orderList;
dynamic get headertype => _headertype;
dynamic get companyAddr => _companyAddr;
dynamic get companyPhone => _companyPhone;
dynamic get bank => _bank;
dynamic get bankNumber => _bankNumber;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['phone'] = _phone;
map['receivingPhone'] = _receivingPhone;
map['mid'] = _mid;
map['orderIds'] = _orderIds;
map['money'] = _money;
map['type'] = _type;
map['headerId'] = _headerId;
map['state'] = _state;
map['reviewerTime'] = _reviewerTime;
map['reviewerBy'] = _reviewerBy;
map['ossUrl'] = _ossUrl;
map['reason'] = _reason;
map['isDelete'] = _isDelete;
map['invoiceHeaderName'] = _invoiceHeaderName;
map['invoiceHeaderCode'] = _invoiceHeaderCode;
map['orderList'] = _orderList;
map['headertype'] = _headertype;
map['companyAddr'] = _companyAddr;
map['companyPhone'] = _companyPhone;
map['bank'] = _bank;
map['bankNumber'] = _bankNumber;
return map;
}
}

286
lib/retrofit/data/title_info_list.dart

@ -0,0 +1,286 @@
/// records : [{"id":"1815947305409314816","createTime":"2024-07-24 11:09:11","createUser":"1379254113602109440","updateTime":"2024-07-24 11:09:11","updateUser":"1379254113602109440","userId":"1379254113602109440","isDefault":1,"type":"PERSONAL","name":"回乡信息","taxId":"202407027106","companyAddr":"中海中心","companyPhone":null,"bank":"中国银行","bankNumber":"4123456789987456123","isDelete":0}]
/// total : "1"
/// size : "50"
/// current : "1"
/// orders : [{"column":"id","asc":false}]
/// hitCount : false
/// searchCount : true
/// pages : "1"
class TitleInfoList {
TitleInfoList({
List<Records> records,
String total,
String size,
String current,
List<Orders> orders,
bool hitCount,
bool searchCount,
String pages,}){
_records = records;
_total = total;
_size = size;
_current = current;
_orders = orders;
_hitCount = hitCount;
_searchCount = searchCount;
_pages = pages;
}
TitleInfoList.fromJson(dynamic json) {
if (json['records'] != null) {
_records = [];
json['records'].forEach((v) {
_records.add(Records.fromJson(v));
});
}
_total = json['total'];
_size = json['size'];
_current = json['current'];
if (json['orders'] != null) {
_orders = [];
json['orders'].forEach((v) {
_orders.add(Orders.fromJson(v));
});
}
_hitCount = json['hitCount'];
_searchCount = json['searchCount'];
_pages = json['pages'];
}
List<Records> _records;
String _total;
String _size;
String _current;
List<Orders> _orders;
bool _hitCount;
bool _searchCount;
String _pages;
TitleInfoList copyWith({ List<Records> records,
String total,
String size,
String current,
List<Orders> orders,
bool hitCount,
bool searchCount,
String pages,
}) => TitleInfoList( records: records ?? _records,
total: total ?? _total,
size: size ?? _size,
current: current ?? _current,
orders: orders ?? _orders,
hitCount: hitCount ?? _hitCount,
searchCount: searchCount ?? _searchCount,
pages: pages ?? _pages,
);
List<Records> get records => _records;
String get total => _total;
String get size => _size;
String get current => _current;
List<Orders> get orders => _orders;
bool get hitCount => _hitCount;
bool get searchCount => _searchCount;
String get pages => _pages;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
if (_records != null) {
map['records'] = _records.map((v) => v.toJson()).toList();
}
map['total'] = _total;
map['size'] = _size;
map['current'] = _current;
if (_orders != null) {
map['orders'] = _orders.map((v) => v.toJson()).toList();
}
map['hitCount'] = _hitCount;
map['searchCount'] = _searchCount;
map['pages'] = _pages;
return map;
}
}
/// column : "id"
/// asc : false
class Orders {
Orders({
String column,
bool asc,}){
_column = column;
_asc = asc;
}
Orders.fromJson(dynamic json) {
_column = json['column'];
_asc = json['asc'];
}
String _column;
bool _asc;
Orders copyWith({ String column,
bool asc,
}) => Orders( column: column ?? _column,
asc: asc ?? _asc,
);
String get column => _column;
bool get asc => _asc;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['column'] = _column;
map['asc'] = _asc;
return map;
}
}
/// id : "1815947305409314816"
/// createTime : "2024-07-24 11:09:11"
/// createUser : "1379254113602109440"
/// updateTime : "2024-07-24 11:09:11"
/// updateUser : "1379254113602109440"
/// userId : "1379254113602109440"
/// isDefault : 1
/// type : "PERSONAL"
/// name : "回乡信息"
/// taxId : "202407027106"
/// companyAddr : "中海中心"
/// companyPhone : null
/// bank : "中国银行"
/// bankNumber : "4123456789987456123"
/// isDelete : 0
class Records {
Records({
String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String userId,
num isDefault,
String type,
String name,
String taxId,
String companyAddr,
dynamic companyPhone,
String bank,
String bankNumber,
num isDelete,}){
_id = id;
_createTime = createTime;
_createUser = createUser;
_updateTime = updateTime;
_updateUser = updateUser;
_userId = userId;
_isDefault = isDefault;
_type = type;
_name = name;
_taxId = taxId;
_companyAddr = companyAddr;
_companyPhone = companyPhone;
_bank = bank;
_bankNumber = bankNumber;
_isDelete = isDelete;
}
Records.fromJson(dynamic json) {
_id = json['id'];
_createTime = json['createTime'];
_createUser = json['createUser'];
_updateTime = json['updateTime'];
_updateUser = json['updateUser'];
_userId = json['userId'];
_isDefault = json['isDefault'];
_type = json['type'];
_name = json['name'];
_taxId = json['taxId'];
_companyAddr = json['companyAddr'];
_companyPhone = json['companyPhone'];
_bank = json['bank'];
_bankNumber = json['bankNumber'];
_isDelete = json['isDelete'];
}
String _id;
String _createTime;
String _createUser;
String _updateTime;
String _updateUser;
String _userId;
num _isDefault;
String _type;
String _name;
String _taxId;
String _companyAddr;
dynamic _companyPhone;
String _bank;
String _bankNumber;
num _isDelete;
Records copyWith({ String id,
String createTime,
String createUser,
String updateTime,
String updateUser,
String userId,
num isDefault,
String type,
String name,
String taxId,
String companyAddr,
dynamic companyPhone,
String bank,
String bankNumber,
num isDelete,
}) => Records( id: id ?? _id,
createTime: createTime ?? _createTime,
createUser: createUser ?? _createUser,
updateTime: updateTime ?? _updateTime,
updateUser: updateUser ?? _updateUser,
userId: userId ?? _userId,
isDefault: isDefault ?? _isDefault,
type: type ?? _type,
name: name ?? _name,
taxId: taxId ?? _taxId,
companyAddr: companyAddr ?? _companyAddr,
companyPhone: companyPhone ?? _companyPhone,
bank: bank ?? _bank,
bankNumber: bankNumber ?? _bankNumber,
isDelete: isDelete ?? _isDelete,
);
String get id => _id;
String get createTime => _createTime;
String get createUser => _createUser;
String get updateTime => _updateTime;
String get updateUser => _updateUser;
String get userId => _userId;
num get isDefault => _isDefault;
String get type => _type;
String get name => _name;
String get taxId => _taxId;
String get companyAddr => _companyAddr;
dynamic get companyPhone => _companyPhone;
String get bank => _bank;
String get bankNumber => _bankNumber;
num get isDelete => _isDelete;
Map<String, dynamic> toJson() {
final map = <String, dynamic>{};
map['id'] = _id;
map['createTime'] = _createTime;
map['createUser'] = _createUser;
map['updateTime'] = _updateTime;
map['updateUser'] = _updateUser;
map['userId'] = _userId;
map['isDefault'] = _isDefault;
map['type'] = _type;
map['name'] = _name;
map['taxId'] = _taxId;
map['companyAddr'] = _companyAddr;
map['companyPhone'] = _companyPhone;
map['bank'] = _bank;
map['bankNumber'] = _bankNumber;
map['isDelete'] = _isDelete;
return map;
}
}

39
lib/retrofit/retrofit_api.dart

@ -19,7 +19,6 @@ import 'package:huixiang/view_widget/login_tips_dialog.dart';
import 'package:retrofit/retrofit.dart';
import '../login/captcha/click_word_captcha.dart';
import '../utils/flutter_utils.dart';
import 'data/achievement_detail_list.dart';
import 'data/activity_pos.dart';
import 'data/address.dart';
@ -41,6 +40,9 @@ import 'data/headlines_list.dart';
import 'data/headlines_list_details.dart';
import 'data/home_rank.dart';
import 'data/invitation_list.dart';
import 'data/invoice_list.dart';
import 'data/invoices_detail_info.dart';
import 'data/invoices_history_list.dart';
import 'data/ip_data.dart';
import 'data/logistics.dart';
import 'data/member_Infor.dart';
@ -54,6 +56,7 @@ import 'data/second_card_list.dart';
import 'data/sign_info.dart';
import 'data/social_info.dart';
import 'data/store.dart';
import 'data/title_info_list.dart';
import 'data/upload_result.dart';
import 'data/user_bill.dart';
import 'data/user_info.dart';
@ -611,4 +614,38 @@ abstract class ApiService {
///APP门店推广渠道
@GET("/ipJson.jsp")
Future<IpData> getIpInfo();
Future<Uint8List> getUrlFile(String url);
///
@POST("order/invoiceOrderList")
Future<BaseData<InvoiceList>> invoiceOrderList(@Body() Map<String, dynamic> param);
///
@POST("invoiceHeader")
Future<BaseData> invoiceHeader(@Body() Map<String, dynamic> param);
///
@PUT("invoiceHeader")
Future<BaseData> invoiceHeaders(@Body() Map<String, dynamic> param);
///
@POST("invoiceHeader/page")
Future<BaseData<TitleInfoList>> invoiceHeaderList(@Body() Map<String, dynamic> param);
///
@DELETE("invoiceHeader?ids[]={ids}")
Future<BaseData> delInvoiceHeader(@Path("ids") String ids);
///
@POST("invoice")
Future<BaseData> invoiceSubmit(@Body() Map<String, dynamic> param);
///
@POST("invoice/page")
Future<BaseData<InvoicesHistoryList>> invoicePage(@Body() Map<String, dynamic> param);
///
@GET("invoice/detail{id}")
Future<BaseData<InvoicesDetailInfo>> invoiceDetail(@Path("id") String id);
}

202
lib/retrofit/retrofit_api.g.dart

@ -2190,6 +2190,22 @@ class _ApiService implements ApiService {
return value;
}
@override
Future<Uint8List> getUrlFile(String url) async {
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<List<int>>(url,
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
extra: _extra,
baseUrl: baseUrl,
responseType: ResponseType.bytes),
data: _data);
return _result.data;
}
@override
Future<BaseData<dynamic>> orderVip(param) async {
ArgumentError.checkNotNull(param, 'param');
@ -2228,7 +2244,9 @@ class _ApiService implements ApiService {
data: _data);
final value = BaseData<List<FarmersList>>.fromJson(
_result.data,
(json) => (json as List<dynamic>)
(json) => (json ?? "") == ""
? null
:(json as List<dynamic>)
.map<FarmersList>(
(i) => FarmersList.fromJson(i as Map<String, dynamic>))
.toList());
@ -2302,4 +2320,186 @@ class _ApiService implements ApiService {
.toList());
return value;
}
@override
Future<BaseData<InvoiceList>> invoiceOrderList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'order/invoiceOrderList',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<InvoiceList>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : InvoiceList.fromJson(json),
);
return value;
}
@override
Future<BaseData> invoiceHeader(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'invoiceHeader',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : json,
);
return value;
}
@override
Future<BaseData> invoiceHeaders(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'invoiceHeader',
queryParameters: queryParameters,
options: RequestOptions(
method: 'PUT',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : json,
);
return value;
}
@override
Future<BaseData<TitleInfoList>> invoiceHeaderList(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'invoiceHeader/page',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<TitleInfoList>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : TitleInfoList.fromJson(json),
);
return value;
}
@override
Future<BaseData<dynamic>> delInvoiceHeader(ids) async {
ArgumentError.checkNotNull(ids, 'ids');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'invoiceHeader?ids[]=$ids',
queryParameters: queryParameters,
options: RequestOptions(
method: 'DELETE',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<dynamic>.fromJson(
_result.data,
(json) => json as dynamic,
);
return value;
}
@override
Future<BaseData> invoiceSubmit(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'invoice',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : json,
);
return value;
}
@override
Future<BaseData<InvoicesHistoryList>> invoicePage(param) async {
ArgumentError.checkNotNull(param, 'param');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
_data.addAll(param ?? <String, dynamic>{});
final _result = await _dio.request<Map<String, dynamic>>(
'invoice/page',
queryParameters: queryParameters,
options: RequestOptions(
method: 'POST',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<InvoicesHistoryList>.fromJson(
_result.data,
(json) => (json ?? "") == "" ? null : InvoicesHistoryList.fromJson(json),
);
return value;
}
@override
Future<BaseData<InvoicesDetailInfo>> invoiceDetail(id) async {
ArgumentError.checkNotNull(id, 'id');
const _extra = <String, dynamic>{};
final queryParameters = <String, dynamic>{};
final _data = <String, dynamic>{};
final _result = await _dio.request<Map<String, dynamic>>(
'invoice/detail/$id',
queryParameters: queryParameters,
options: RequestOptions(
method: 'GET',
headers: <String, dynamic>{},
extra: _extra,
baseUrl: baseUrl),
data: _data);
final value = BaseData<InvoicesDetailInfo>.fromJson(
_result.data,
(json) => InvoicesDetailInfo.fromJson(json),
);
return value;
}
}

41
lib/store/store_view/product_sku.dart

@ -154,26 +154,27 @@ class _ProductSku extends State<ProductSku> {
),
),
),
Row(
children: [
Text(
S.of(context).huiyuanjia,
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 13.sp,
fontWeight: MyFontWeight.medium,
),
),
Text(
selectedPrice,
style: TextStyle(
color: Color(0xFFFF7A1A),
fontSize: 14.sp,
fontWeight: MyFontWeight.medium,
),
),
],
),
///
// Row(
// children: [
// Text(
// S.of(context).huiyuanjia,
// style: TextStyle(
// color: Color(0xFFFF7A1A),
// fontSize: 13.sp,
// fontWeight: MyFontWeight.medium,
// ),
// ),
// Text(
// selectedPrice,
// style: TextStyle(
// color: Color(0xFFFF7A1A),
// fontSize: 14.sp,
// fontWeight: MyFontWeight.medium,
// ),
// ),
// ],
// ),
],
)),
InkWell(

17
lib/store/store_view/store_info.dart

@ -112,22 +112,21 @@ class _StoreInfoView extends State<StoreInfoView> {
),
Row(
children: [
Text(
if(( widget.storeInfo?.perCapitaConsumption ?? "") != "0")
Padding(padding:EdgeInsets.only(right: 20.w),
child: Text(
S.of(context).ren(
widget.storeInfo != null
? widget.storeInfo.perCapitaConsumption
: "",
),
widget.storeInfo != null
? widget.storeInfo.perCapitaConsumption
: "",
),
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF353535),
),
),
SizedBox(
width: 20.w,
),
),),
]..addAll(itemServer(widget.storeInfo != null
? widget.storeInfo.businessService
: "")),

19
lib/union/union_list.dart

@ -5,7 +5,6 @@ import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
import 'package:geolocator/geolocator.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/latlng.dart';
import 'package:huixiang/retrofit/data/store.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart';
@ -298,17 +297,17 @@ class _UnionList extends State<UnionList> with AutomaticKeepAliveClientMixin {
SizedBox(height: 6.h),
Row(
children: [
Text(
S.of(context).ren(
if(store.perCapitaConsumption != null && (store?.perCapitaConsumption ?? "0") != "0")
Padding(padding: EdgeInsets.only(right: 22.w),child:Text(
S.of(context).ren(
store?.perCapitaConsumption ?? "",
),
style: TextStyle(
color: Color(0xFF4D4D4D),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),
),
SizedBox(width: 22.w),
style: TextStyle(
color: Color(0xFF4D4D4D),
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
),
),),
if (store.distance != null)
Image.asset(
"assets/image/icon_union_location_black.webp",

2
lib/utils/location.dart

@ -1,3 +1,5 @@
import 'dart:async';
import 'package:dio/dio.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

28
lib/utils/status_utils.dart

@ -89,6 +89,7 @@ class StatusUtils {
static List<Widget> statusBtn(
context,
payStatus,
payChannel,
orderStatus,
isTakeOut,
sendStatus,
@ -260,6 +261,33 @@ class StatusUtils {
SizedBox(
width: 10.w,
),
//
// if(payChannel == 0 || payChannel == 1 || payChannel == 2)
// Container(
// width: 72.w,
// height: 24.h,
// child: TextButton(
// onPressed: () {
// Navigator.of(context).pushNamed('/router/invoices_manage_page');
// },
// style: ButtonStyle(
// padding: MaterialStateProperty.all(EdgeInsets.zero),
// side: MaterialStateProperty.all(
// BorderSide(
// color: Color(0xff32A060),
// width: 0.5,
// ),
// ),
// ),
// child: Text(
// "开发票",
// style: TextStyle(
// color: Color(0xff32A060),
// fontSize: 12.sp,
// ),
// ),
// ),
// ),
];
}
}

122
pubspec.lock

@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: args
sha256: b003c3098049a51720352d219b0bb5f219b60fbfb68e7a4748139a06a5676515
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.3.1"
version: "2.4.2"
asn1lib:
dependency: transitive
description:
@ -141,10 +141,10 @@ packages:
dependency: transitive
description:
name: convert
sha256: "1be13198012c1d5bc042dc40ad1d7f16cbd522350984c0c1abf471d6d7e305c6"
sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.0"
version: "3.1.1"
crypto:
dependency: transitive
description:
@ -229,10 +229,10 @@ packages:
dependency: transitive
description:
name: ffi
sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99
sha256: "13a6ccf6a459a125b3fcdb6ec73bd5ff90822e071207c663bfd1f70062d51d18"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.2"
version: "1.2.1"
file:
dependency: transitive
description:
@ -315,6 +315,14 @@ packages:
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.0.3"
flutter_pdfview:
dependency: "direct main"
description:
name: flutter_pdfview
sha256: a9055bf920c7095bf08c2781db431ba23577aa5da5a056a7152dc89a18fbec6f
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.3.2"
flutter_screenutil:
dependency: "direct main"
description:
@ -401,50 +409,26 @@ packages:
dependency: "direct main"
description:
name: geolocator
sha256: "5c496b46e245d006760e643cedde7c9fa785a34391b5eca857a46358f9bde02b"
url: "https://pub.flutter-io.cn"
source: hosted
version: "8.2.1"
geolocator_android:
dependency: transitive
description:
name: geolocator_android
sha256: "3fa9215caf1e4463adbdf1f21b07fdcb9bc2af2ef1df3715a52376b87bebb087"
sha256: "01fed879aa87185efebfb1d23de619077bcc7d83ffdebd0aad6f74392f84fb40"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.2.1"
geolocator_apple:
dependency: transitive
description:
name: geolocator_apple
sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.3.7"
version: "6.2.1"
geolocator_platform_interface:
dependency: transitive
description:
name: geolocator_platform_interface
sha256: b8cc1d3be0ca039a3f2174b0b026feab8af3610e220b8532e42cff8ec6658535
sha256: aa11c4cb9eb31f096ffc62cf54858f869bd437de327cba660577ddd594a8f3fa
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.1.0"
version: "1.0.9"
geolocator_web:
dependency: transitive
description:
name: geolocator_web
sha256: "102e7da05b48ca6bf0a5bda0010f886b171d1a08059f01bfe02addd0175ebece"
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.2.1"
geolocator_windows:
dependency: transitive
description:
name: geolocator_windows
sha256: "4f4218f122a6978d0ad655fa3541eea74c67417440b09f0657238810d5af6bdc"
sha256: "9a7f3c5061fb8fb26103fc67e07343eebd4d3b15d18c6d75766e2a1a8b0618f8"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3"
version: "1.0.1"
gradient_widgets:
dependency: "direct main"
description:
@ -481,10 +465,10 @@ packages:
dependency: "direct main"
description:
name: image_gallery_saver
sha256: be812580c7a320d3bf583af89cac6b376f170d48000aca75215a73285a3223a0
sha256: "0aba74216a4d9b0561510cb968015d56b701ba1bd94aace26aacdd8ae5761816"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.7.1"
version: "2.0.3"
image_pickers:
dependency: "direct main"
description:
@ -585,10 +569,10 @@ packages:
dependency: "direct main"
description:
name: mqtt_client
sha256: e8347f8996c33b80a6764a1881e94a8ef5392c2d6e724b9daad65eafa202b0c7
sha256: ba10ec490ded55dc4e77bbc992529d823fb15d0d5ec68c2895f960312060c541
url: "https://pub.flutter-io.cn"
source: hosted
version: "9.6.8"
version: "9.8.1"
nested:
dependency: transitive
description:
@ -689,50 +673,26 @@ packages:
dependency: transitive
description:
name: path_provider_windows
sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6
sha256: a34ecd7fb548f8e57321fd8e50d865d266941b54e6c3b7758cf8f37c24116905
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.6"
version: "2.0.7"
permission_handler:
dependency: "direct main"
description:
name: permission_handler
sha256: "5749ebeb7ec0c3865ea17e3eb337174b87747be816dab582c551e1aff6f6bbf3"
url: "https://pub.flutter-io.cn"
source: hosted
version: "9.2.0"
permission_handler_android:
dependency: transitive
description:
name: permission_handler_android
sha256: a512e0fa8abcb0659d938ec2df93a70eb1df1fdea5fdc6d79a866bfd858a28fc
url: "https://pub.flutter-io.cn"
source: hosted
version: "9.0.2+1"
permission_handler_apple:
dependency: transitive
description:
name: permission_handler_apple
sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5"
sha256: fb4666087528b1cbf91d98771cf50b14f36f4d8756ec7e7a8629dd3cb55442b7
url: "https://pub.flutter-io.cn"
source: hosted
version: "9.1.4"
version: "5.1.0+2"
permission_handler_platform_interface:
dependency: transitive
description:
name: permission_handler_platform_interface
sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4"
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.12.0"
permission_handler_windows:
dependency: transitive
description:
name: permission_handler_windows
sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098
sha256: f7e3c798f7c4dd215e4ca8843695b3a63a5b79c9aa04f296d316f13a15d518ba
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.1.3"
version: "2.0.2"
petitparser:
dependency: transitive
description:
@ -753,10 +713,10 @@ packages:
dependency: "direct main"
description:
name: pin_input_text_field
sha256: "569861876d5c67994adc58ddd15e93bd0057c4f26d7e5599ccde880d05813463"
sha256: "8d6fc670aa673a4df5976086f0e8039972a5b2bcb783c8db8dd3b9b4b072ca90"
url: "https://pub.flutter-io.cn"
source: hosted
version: "4.4.1"
version: "4.5.1"
platform:
dependency: transitive
description:
@ -777,10 +737,10 @@ packages:
dependency: transitive
description:
name: plugin_platform_interface
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
sha256: c3ebbff365bfb1b5f7b690c9857d2dabea167f35b05eb7586186499b407efb37
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.1.6"
version: "1.0.3"
pointycastle:
dependency: transitive
description:
@ -1087,10 +1047,10 @@ packages:
dependency: "direct main"
description:
name: umeng_common_sdk
sha256: fce28065224b0839ffc16b5003d2295dae8aabee290bf639f978536b32ed601d
sha256: "60d7ac8093d42e236dbecb5fc8558b16644808a70d24514ad926be7ddf56d5e9"
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.6"
version: "1.2.7"
url_launcher:
dependency: "direct main"
description:
@ -1215,10 +1175,10 @@ packages:
dependency: transitive
description:
name: wakelock_windows
sha256: "857f77b3fe6ae82dd045455baa626bc4b93cb9bb6c86bf3f27c182167c3a5567"
sha256: "108b1b73711f1664ee462e73af34a9286ff496e27d4d8371e2fb4da8fde4cdac"
url: "https://pub.flutter-io.cn"
source: hosted
version: "0.2.1"
version: "0.2.0"
webview_flutter:
dependency: transitive
description:
@ -1239,10 +1199,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4
sha256: c0e3a4f7be7dae51d8f152230b86627e3397c1ba8c3fa58e63d44a9f3edc9cef
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.1.4"
version: "2.6.1"
xdg_directories:
dependency: transitive
description:
@ -1261,4 +1221,4 @@ packages:
version: "5.4.1"
sdks:
dart: ">=2.19.0 <3.0.0"
flutter: ">=3.0.0"
flutter: ">=3.7.0"

8
pubspec.yaml

@ -17,6 +17,8 @@ dependencies:
tobias: 2.4.1
#pdf展示
flutter_pdfview: ^1.3.2
gradient_widgets: ^0.6.0
@ -39,9 +41,9 @@ dependencies:
number_precision: ^2.0.2+1
permission_handler: ^9.0.2
permission_handler: ^5.0.1+1
geolocator: ^8.2.1
geolocator: ^6.2.1
# location: ^3.2.4
dio: ^3.0.10
@ -81,7 +83,7 @@ dependencies:
path_provider: ^2.0.4
network_to_file_image: ^4.0.1
image_gallery_saver: ^1.7.0
image_gallery_saver: ^2.0.3
flutter_html: ^2.1.5 #2.1.0
chewie_audio: ^1.1.2

Loading…
Cancel
Save