From ef494f9b17c5eb7b4b00520426d5ca298c758718 Mon Sep 17 00:00:00 2001 From: zsw Date: Fri, 5 Jul 2024 16:36:15 +0800 Subject: [PATCH 01/23] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8A=AC=E5=A4=B4=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../invoices_manage/add_invoices_title.dart | 132 ++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 lib/order/invoices_manage/add_invoices_title.dart diff --git a/lib/order/invoices_manage/add_invoices_title.dart b/lib/order/invoices_manage/add_invoices_title.dart new file mode 100644 index 00000000..ec600fb4 --- /dev/null +++ b/lib/order/invoices_manage/add_invoices_title.dart @@ -0,0 +1,132 @@ +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:intl/intl.dart'; +import 'package:pull_to_refresh/pull_to_refresh.dart'; +import 'package:shimmer/shimmer.dart'; + +import '../../generated/l10n.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 InvoicesManagePage extends StatefulWidget { + @override + State createState() { + return _InvoicesManagePage(); + } +} + +class _InvoicesManagePage extends State { + + @override + void initState() { + super.initState(); + // _onRefresh(); + } + + ///离开页面记着销毁和清除 + @override + void dispose() { + super.dispose(); + } + + @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: [ + Text( + "请填写抬头信息:", + style: TextStyle( + color: Color(0xFF000000), + fontSize: 12.sp, + fontWeight: MyFontWeight.regular, + ), + ) + ], + ), + ); + } + + 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: 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: 149, + height: 20, + ), + ), + 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: 42, + height: 20, + ), + ), + Shimmer.fromColors( + baseColor: Color(0XFFD8D8D8), + highlightColor: Color(0XFFD8D8D8), + child: Container( + decoration: BoxDecoration( + color: Color(0XFFD8D8D8), + borderRadius: BorderRadius.circular(2), + ), + width: 60, + height: 20, + ), + ), + ], + ) + ], + ), + ); + } + +} From e23f6326740ff37e69c9745ea851b03684361351 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Fri, 26 Jul 2024 12:14:44 +0800 Subject: [PATCH 02/23] =?UTF-8?q?=E5=BC=80=E7=A5=A8=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2ui=E7=BB=98=E5=88=B6=E4=B8=8E=E4=BA=A4?= =?UTF-8?q?=E4=BA=92,=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=EF=BC=9B=20=E6=8A=AC=E5=A4=B4=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2ui=E7=BB=98=E5=88=B6=E4=B8=8E=E4=BA=A4?= =?UTF-8?q?=E4=BA=92=EF=BC=8C=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=EF=BC=9B=20=E5=A1=AB=E5=86=99=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2ui=E7=BB=98=E5=88=B6?= =?UTF-8?q?=E4=B8=8E=E4=BA=A4=E4=BA=92=EF=BC=8C=E6=8E=A5=E5=8F=A3=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AF=B9=E6=8E=A5=EF=BC=9B=20=E6=88=91=E7=9A=84?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=96=B0=E5=A2=9E=E5=8F=91=E7=A5=A8=E5=8A=A9?= =?UTF-8?q?=E6=89=8B=EF=BC=9B=20=E8=AE=A2=E5=8D=95=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=9B=A0app=E8=AE=A2=E5=8D=95=E5=8E=9F=E5=9B=A0=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E5=8D=95=E7=8B=AC=E6=98=BE=E7=A4=BA=E5=BC=80=E7=A5=A8?= =?UTF-8?q?=E9=80=89=E9=A1=B9=EF=BC=9B=20=E5=BC=80=E7=A5=A8=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=8E=A5=E5=8F=A3=E6=95=B0=E6=8D=AE=E5=AF=B9=E6=8E=A5?= =?UTF-8?q?=EF=BC=8C=E4=BA=A4=E4=BA=92=E6=B5=81=E7=A8=8B=E8=B0=83=E8=AF=95?= =?UTF-8?q?;=20=E5=BC=80=E7=A5=A8=E6=B5=81=E7=A8=8B=E4=BA=A4=E4=BA=92?= =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=9B=B4=E6=94=B9=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/image/2x/disenable_seletor_tow.webp | Bin 0 -> 320 bytes assets/image/2x/invoice_history.webp | Bin 739 -> 486 bytes assets/image/2x/invoice_title.webp | Bin 457 -> 388 bytes assets/image/2x/tip_info.webp | Bin 0 -> 434 bytes assets/image/2x/title_del.webp | Bin 0 -> 182 bytes assets/image/2x/title_info_edit.webp | Bin 0 -> 202 bytes assets/image/3x/disenable_seletor_tow.webp | Bin 0 -> 478 bytes assets/image/3x/invoice_history.webp | Bin 1074 -> 636 bytes assets/image/3x/invoice_title.webp | Bin 552 -> 450 bytes assets/image/3x/tip_info.webp | Bin 0 -> 582 bytes assets/image/3x/title_del.webp | Bin 0 -> 214 bytes assets/image/3x/title_info_edit.webp | Bin 0 -> 250 bytes assets/image/disenable_seletor_tow.webp | Bin 0 -> 196 bytes assets/image/invoice_history.webp | Bin 400 -> 256 bytes assets/image/invoice_title.webp | Bin 294 -> 260 bytes assets/image/tip_info.webp | Bin 0 -> 282 bytes assets/image/title_del.webp | Bin 0 -> 138 bytes assets/image/title_info_edit.webp | Bin 0 -> 148 bytes lib/home/home_page.dart | 2 +- lib/main.dart | 17 + lib/mine/mine_view/mine_item.dart | 12 +- .../invoices_manage/add_invoices_title.dart | 899 ++++++++++-- .../invoices_manage/edit_invoices_info.dart | 594 ++++++++ .../invoices_manage/invoices_history.dart | 454 ++++++ .../invoices_manage/invoices_manage_page.dart | 679 +++++++++ .../invoices_manage/invoices_title_info.dart | 571 ++++++++ lib/order/order_history_page.dart | 2 + lib/retrofit/data/invoice_list.dart | 1212 +++++++++++++++++ lib/retrofit/data/invoices_history_list.dart | 385 ++++++ lib/retrofit/data/title_info_list.dart | 286 ++++ lib/retrofit/retrofit_api.dart | 32 +- lib/retrofit/retrofit_api.g.dart | 160 +++ lib/utils/status_utils.dart | 28 + 33 files changed, 5239 insertions(+), 94 deletions(-) create mode 100644 assets/image/2x/disenable_seletor_tow.webp create mode 100644 assets/image/2x/tip_info.webp create mode 100644 assets/image/2x/title_del.webp create mode 100644 assets/image/2x/title_info_edit.webp create mode 100644 assets/image/3x/disenable_seletor_tow.webp create mode 100644 assets/image/3x/tip_info.webp create mode 100644 assets/image/3x/title_del.webp create mode 100644 assets/image/3x/title_info_edit.webp create mode 100644 assets/image/disenable_seletor_tow.webp create mode 100644 assets/image/tip_info.webp create mode 100644 assets/image/title_del.webp create mode 100644 assets/image/title_info_edit.webp create mode 100644 lib/order/invoices_manage/edit_invoices_info.dart create mode 100644 lib/order/invoices_manage/invoices_history.dart create mode 100644 lib/order/invoices_manage/invoices_manage_page.dart create mode 100644 lib/order/invoices_manage/invoices_title_info.dart create mode 100644 lib/retrofit/data/invoice_list.dart create mode 100644 lib/retrofit/data/invoices_history_list.dart create mode 100644 lib/retrofit/data/title_info_list.dart diff --git a/assets/image/2x/disenable_seletor_tow.webp b/assets/image/2x/disenable_seletor_tow.webp new file mode 100644 index 0000000000000000000000000000000000000000..8301d7981bb27628604dc1f85a2b3937f77d278b GIT binary patch literal 320 zcmV-G0l)rINk&FE0RRA3MM6+kP&il$0000G0000V0018V06|PpNb3Lq00CE^q>Usv zy7+#!x9F@~LHOr-=61LrT-```ue z0q#Xa4j>tb1s7709^QfU`KfY)6{hY#>X6K`V68c1Q$)kB<{e+g{zx*?nugRl%h9!e zT;&+pAl&8{BK6c38gxl@6S+;@J-B6=zo%v4L;fCPAL-=oc`6W1?j4q{{+$}UBW(2h z+f)LOoU+j1pJ=U!0j(b?e0Kl<09H^qASM6+0MG&eodGH!03ZN9kwTnGC8MIDs0aYC S5(#Ml06n9i0RHi{H2?rM)r6n` literal 0 HcmV?d00001 diff --git a/assets/image/2x/invoice_history.webp b/assets/image/2x/invoice_history.webp index da5b9a2e347a7f4eeccf70c92c169b0e4ec7e96b..09dc454bf6cd79bb3ca367e710e31502421b31a1 100644 GIT binary patch literal 486 zcmVMNk&HA0RRA3MM6+kP&il$0000G0000h001ih06|PpNV)(300Dqn+qP@v zH1Gp7lf$tn6qTTGo1{=*{zg!YaV+5tx_Awc-4gdcxbF~UL`;DFE4nh)L{hIsMu;Mi zCDdQ2r&}iM=!-{^J{CRQGGRww1hRx8zLrNIEGTa-4_2EwF?2#)zf(Re4%=9un!wCq3UbwdX7)?s0qX(&1JnldH=qYg2tqH1{$5!*pm+fO+#TnK zEmTnF-k`L+9ji{s>t5||PN=H|@>SM17lqvmui#Ea(^ptVb(&oEr|>FCKR)FHCQP>e z+xtylP~WVY(*r?_|HwsMP9nVtM`79MX10S>f9CwIkyEU_^yJ-Rhxj%zVF}WZslz_m zp>%ndz4NlHnl%FwkBaS59Smm|sc?(AdryxXB~5G;dznj5Z&Gchh8kGE`2{Nyq~00j=$yZ`_I literal 739 zcmV<90v!E`P)8P`6o9{Tg9Hfr0Pp}X*QwN{qK?FZ#LQT(`v6Q#9k3&T zm>76~*0(b&5+kls2~}#+y)VFqkdTlV>cbG*ZBllOX9!e)4AuId#|CPp`l?O zGI?Sxwtfo!5?p372wXIJTnKxyjS#|x8KtDkO^*IuFT4`fM1;1V)5a z*c3pNgUMl77PCg(EKBCHG{SY$2-i)~B?KO1U!Hm{xVJQ;F|-XMZjATgmF%;f-*}D4 z-NuA}WEc7%{e>&dMB6}{p&Kwdalom-eUy)bAdZ$`H$^sav=vVCbN_D9Rb?%qwRwCiVhEy9l>y? zmEy(r2+>}en#0?7P4COI-EUQYyR>ji>865TviiRR2qX$;zy@#=VI5@M7=8Kc=NX=R zexjJ3F?!hFav#cglun7`z$JP07ad~;UTh;pUjg*3>kO=WJh1K-$|FH`KtE9|W@J^+ z7pVDK)}vBN{uo4Mu0Hw`QJ+9JTg!z~M za{n{zzr>f(gHZ#}1NH;cBiXPODHTHL8grYl0092iNvo`&G~-OruR=e2I&46>{}3u- zM1Nzb#rHK%$j!OLOmg$d)G;0}H1ih>9|)!VWR&rA+!Ackk1Qq(&DC4+48=0zS z3JCQ%Y{0A=h!RJKfs7z6yvBoQ(Vs=-s%7I(!vNWybuZ`M z+Tw(Z=Hi5{hYpoi`{n+-0+%eBJ6Bsc@pK|IN;5hL!8gUrUlN{jTch{z2w{lwZekZV z!cMqooN&=tZwZAv|Fz$$LdHUp4hV>LOvn}%o)9fpEElsOl4}#OgatkozDjf2i#F4; zkR_}PmhQuGKAdpT*#E<8{CPM*xj8m*9L_ob{w!Pq=xR0icz9bJo6nFdyvF~hJ&!n5 zZj(B&IhA~2)fgC@-i1D%p5u>P;W(T>pQD3wBnbS}(NLAB(A!;08)1b=AlMvP z)qt#pzZLVR;YfvENj?YBP{wuHvN;?MM*;i*QI}lBL#oi900000NkvXXu0mjfl5fUA diff --git a/assets/image/2x/tip_info.webp b/assets/image/2x/tip_info.webp new file mode 100644 index 0000000000000000000000000000000000000000..658dd6e7b961f0d43193e7ec3caa080d4741f679 GIT binary patch literal 434 zcmV;j0Zsl=Nk&Gh0RRA3MM6+kP&il$0000G0000X001EX06|PpNSXiu00Ac;5J=%> z7ZDMIgV?qj=TQV~iGVE#NQN(f^8K6QmzgMt=>G&j{8g?GjN9b31ZA5n7p1dago~|l z8Kwf@;+5)LH~>xfpbH;hI0zd%I9w9dDWxVE^KgBn=Xr)iQvlE%Z#1y{(R9mn(I1rV zYp(ot#myBkl_3CP&gp!0000G z2LPP`Dk16of8ufZIYPoH@xXY-LwFP`4_6Qg?ny{byJ{k1oUmk0o z@9!&iggi=v|NT+K$?Em2H#g}OKsngM|J}Co;K(831Bt_);ie|EKp6~>^t;TJ`O^VY zc$vm=IsN(SvEX^-N7nOD1uuSS_dz|-{{&Y04`Fcs!4J$(bU=hIuWD5YXECYi)1B0VafJYLL$EdC#;PEg`Tu_jC^^I*) z=cqGoU^vf|z&LNtzoj$U50|_AS7*5GQ*_{*i_sgybCw&^^Pl}Yuvl$J$(bU=hIuWD5YXJQz9p1bCDJd5r1`0v-?3#03SLA8+eb@r>Th zIEPUrO{?i3%Z3$Y{{nq?$N%ns@t>vO#V_s&Q$I!3=3O^e2z}gmo2zxQ)}FA6m4~uh zrz02-cAk%7T%raS^%vFNcwqL_pY{^v@5{HDRfl95TI`W!0J=v(4QTrXCWg6;S_%vb j40aP;=6Wq%ylCMH4u%avoS6&^wu=`q{QGfU>Hq@(_^wNy literal 0 HcmV?d00001 diff --git a/assets/image/3x/disenable_seletor_tow.webp b/assets/image/3x/disenable_seletor_tow.webp new file mode 100644 index 0000000000000000000000000000000000000000..d6821d647203d007c91942e9a1efb5e7876bed73 GIT binary patch literal 478 zcmV<40U`cUNk&H20RRA3MM6+kP&il$0000G0000l001ul06|PpNP__Y00D2HsF5T! zw(vy(cn}c*Ho^HNo}M7cakfp7oL8gLa)+B?xOX5gXQl%%)4&CcAv)DU1LKSvW7VVAfs#9skV8h&aVxL#{l-xh&;%KXm( z1GO~jecSupURWsGyy-wL)0~gMTLrWPM>P&kuuz3~-+`hF>cTSxHPM`MR2lpWbE$dR z9MuR5im1by#(xT~#u(cra~3|wn1N!i>%!j{hoI;-{Eu-Pa$D?$GRB)WRgCuy%Ak(% z4Sp(}w3A^UN&ArNI-4?{4SDMLcYn&H%oob;$)wEhQH`u=JnjeIYucOQA181&#c%4u zy)=Jju$JcM5x+cQ{zrDWdRdbtTwiO2OmaOATfgMNSSx~A7lGI+WMj+BxgE2%^+>X2 zi1jBN&c_;}I(@&ek9KGY09H^qAS?g?05AgpodGH^05AYPkw~9RC8Q#vBZvU75(#Ml U02_h7zq$Yb{_(XfMC>2{0Bl9nQ~&?~ literal 0 HcmV?d00001 diff --git a/assets/image/3x/invoice_history.webp b/assets/image/3x/invoice_history.webp index 237560e236585e966d86937dbcad87e39011c752..d9896b77029180f31aea65d59037589bef3c7adc 100644 GIT binary patch literal 636 zcmV-?0)zchNk&F=0ssJ4MM6+kP&il$0000G0000%002P%06|PpND2V}00EF<+qP>d zr?RRxl&T`Ofw2jSHlT87Lf#6M9SX(3M$I?`MFTP_Dp2K6i}2q4e_Q;QKZyw*-2Wm2K=Hk<#;jL4JfhNEavAX}llaco^StQ^Q0mSIaK0o*Z zw>l7jt&kGHV?WOCI(4#xFwLo$aDoUoI3}GWWG9(Y)ai8=mCOcHctn*n6v{G=|CRw( zP&gn&0RR9n2>_h|DnbB406vL4lt-l_q9HRiTmYaE31|S&NO4UNTH%}cuS5syAL|Fa zub>Su4=o>L5L}jFCDNw&QVv7V;Bgxh){(xifV};{Sxcue0092-v_JpvOAeOaL+|_y z^gZ{>)x-aRETjf_e|4u<+2`dr`AO60MIA#owaclBtGkFVu`iTk9~fURiruIX!rNlFm}gm z|9UxsBKo?<5|kDqV-F+e5W)2wNZfVz{)A0n0+VkpqmcQ*Evu>J!)A0NlgZ3b;FEBc zVOkXq-;C>+nZ(N@{;JRXn7R5!Z8+52|Qmayc=5c*2*nfE<42s5qYj$F)^}qjdrHg zUn_jqaEyC|$e*Y_IV$KEz~`$sX{o#na@&3Wt6VWAgsT27@XV+n_lB|kcs2H|hA=fx zA>4-1yO!&G*Kl|t9Mfivg=x8Uf06MLh!iqWjsXJ5HZ9lDxJQJkNphi=3q65ITuMxe z?2vGj3%xKkNz=bwhsK0xr6$_5rZ;m2TsR7?(M=Jg5g`gMkWxZaAq$jFpmc`DN}zO5 zx>WO^!cl8V3T;(1Ge%UrpqeTNaODgjOwCvuH!O#;V`zz(Ae`m z6@h5oU8I%}t<*$g-Y{qSKTta7g*A7PT0)F%k|^C_Y?FD~4`Q3?n!7~7+5@WcCek{0 z+G+_=-Yp6?`DBs@tF0@8NYxITGJiCzLj#?fuh;0_8rdtG6?zGLN<46;! z1Y`H&^!=jv;+@xb9t8Qmh_r=#AEZ6$YZU!$7=QZXLNDQ{Jw^;;o9tP0Pz;)(HF{NW z^{69C)#tx{%vRvo*H{;xxOwMk0XY$O#E!&POu78?GEvjQ*q1{aPJBofhB(l|r^$Q#Oa{VcIbv2C>Zo srL!qnqouLvl22p_ec?2Ee@hGXaBfwC<~YzanA+@TclY(Oh!s=0Xb5=196plJpe@$v=nt zO_F4+(0wjlBe}sKNz(rqqLm~WD|DaB^&+{!AW71{RdwtQAR?-BaOcT`d>LhL0Hu_3 zD83=OHs?Z#MVCoi0!$PC%vMl1AQS-r0B{KaodGIB073vhi9D1?r6ZytG58Evpb-gV z0L*oaZX5bRqyx+c>CdfpnopnymS3~b5#5nr+=Ye`%Hvf#BKU0w&1nsX+r2mOBEyK^ zF^EA+fB^pR+86)(Z24;m@;~OPa%ouaxFz}a_hnE|i9*1I@x{DfUtz#YqyWKpoivY^ z`Pg!WmO={8@~`6U1R#MVekUwPSsz?r%;mp@J+Sx`G_cPd22T4)sPoFg);yM5T0JP7}UjP6A literal 552 zcmeAS@N?(olHy`uVBq!ia0vp^P9V&|1|%PcFuVX#EX7WqAsj$Z!;#X#z`%Il)5S5Q zV$R!Jwn2vt1Xv$zZ`@qK;Ow6vxnOzMB?D()&&Hjs_O4U38En_BP>5+{zHo7~NKQ}g znhBB zm>2Aj|E+Z8zj*3B*57Og=he44O0XqLv?K~Z8Jzn9Rz9%#{7yC1(6e)0`0R%Y4O@R) z{UbL=O3gxvp+aL`km#fq1^&`j@z}0Re(~7Kn*o(8z7=Mnnvy7>_QUC`R@IcBAL~vf zJ-Xa~I8{8h;msAh8^u6_Y?MUG1uFd_yqR{1zl!|gfBoa$*&>0jUV1#cdpzd(qSdm^ z20VuhI1VeES#)2=d#1cB!;Rk1BWHY1zd!fqMOEFJ15X#vjyt+5|7wuqp2>49RA2Z$ zw!5w2zAEn6&gbcKq|#mrDjtZOBedk^t{L*nV_xcr0`=FVdQ&MBb@05 z7ZDMIgW7i6=35DXE&w{N0CX5YB8xw%MB}ssBKki8@GqaQeLEq2dE0rV`v zx3~n@vgBz>oR{U7GcAx4wn{pvM_})9uo45nMFea`4?v3sVAYL(Z`sOLEqizZ034CJ zF`dz=%4}pT+G24^%(C$ZqIG-SR<^#%=<<8OED~TZS^*9$Ap#KE0sydka-E(W*bCDE zS|B)m6)b1al)&W_dC*B_yGs8i4b%S-l;;Mey| z0$3oN`tQOYS|vydo|&pYYybfM;IBCQb}R_$K5WGxdYGXg?UT!xMXvDm*8AX60ga9d zU%;Q~0sQQ;W?YIBG0>C|c~{b;f4H~cmj8MKJ*PMkU&j3#XEp23>-7cS|Mw-1%;5?h z@k`(QB5{X1|Ab9X`EvchiqCo-M>UT`GX+}T9F#j-e*V?i^X9hRev*j!m!QY@{~#A1 z!iTCdrl%I@{aW+mj7Y@3gkvMl1W3)18@RWhC|!RDB+9`Zcdz{OYh0NQ`ZaWKT78hs zZAVjA*NovO3-e5Rujt>Lr;**%Phm4eFNwdQZ9C#`=vtV+O;r#W6F0ImB7nE(I) literal 0 HcmV?d00001 diff --git a/assets/image/3x/title_del.webp b/assets/image/3x/title_del.webp new file mode 100644 index 0000000000000000000000000000000000000000..7e4ec00d4a83f6d858a9500c665cfa423ca0f05a GIT binary patch literal 214 zcmV;{04e`cNk&G_00012MM6+kP&il$0000G0000i001ul06|PpNPYkS00Ac;5J=%> z7ZDMItJ=1eYF`O}1<(LI32|UrUs8)be0Gukzy$G?6Epn+YuOdaTkkgp! zIU~wq9UDsiB8D;VCjbCeP&gne0000m0|1=?DlGso06vjOpG&2rBB7&*0I(7XX#fBl QfxSKs0092@&iyC=0QR&^bN~PV literal 0 HcmV?d00001 diff --git a/assets/image/3x/title_info_edit.webp b/assets/image/3x/title_info_edit.webp new file mode 100644 index 0000000000000000000000000000000000000000..be3d202233886cd47afa0380b197bdcf44658edc GIT binary patch literal 250 zcmWIYbaVT}z`zjh>J$(bU=hIuWD5YXJ{URr1b8e2@)*?>1Uw$5i39 z_A3Is;>{{td1=O*XI?*)owzk=>!U5twxn%I+;TC0_5EqrHH$u1<=xryzxz(rf3M|1 z%O|Z{w)$k*iKw`p^9-*y`xh|Q-#hw1;-~ct8RL54ol?y*ZnKmheX(KCxyQr+bi0BU y(4_{<409Q^3>XX;>?V55_g=b0Y2o4yh7CfTnG6iljeG6*7#RNjIQLhBfdK&L^I+5f literal 0 HcmV?d00001 diff --git a/assets/image/disenable_seletor_tow.webp b/assets/image/disenable_seletor_tow.webp new file mode 100644 index 0000000000000000000000000000000000000000..99ea086eb3073c0ce33c80b851cc381e5f13bb53 GIT binary patch literal 196 zcmWIYbaUIoz`zjh>J$(bU=hIuWD5W>KNvas1bEZ|d5rE07UW8sMX~8NZ5Es%CfI2D ze@mP6?QL_P9O_b?aatzI%G+p)0rO_Q#!GJ`Et)%C{Fm`Kxpk9@>-Wkp8<%XB{5Dl{ zla$1}weA1g%eI}(V%U9R9>e6t-`Q@+UXSfBHNUx&ZNuj9_xx)gy81C6J`uERgT3yO t6`P*fdk1~lsiz8bmx2V)6$Xq9a~ZV+fbL^rFi~B?z+Axa@4E~G0|5UcNrV6Z literal 0 HcmV?d00001 diff --git a/assets/image/invoice_history.webp b/assets/image/invoice_history.webp index ad1ea94115a969a7775c0dc2dc82360c62d19e27..806d3da6649a474ad9f9ea6f7d6800df6b5ad5d0 100644 GIT binary patch literal 256 zcmWIYbaVT`z`zjh>J$(bU=hIuWD5YXC>S~V1bCzYd5i_Z43if3ELnddk>>#mV~sh} ziULRf{cHvwi~F7n%0DySoxIFG@k~5V`=u18v>*-! z<&!_Y=%{i$NV3mc{?&eq1NY&NRsYzz*gt;mzI3=jN%^8P(0+v+pluVF8Rjx-i7|*V z*iCep;kk72B1H|Z6&r*&vl!+YUCQrc+Rap5!SL_&)(>p2&Hqe1<{|pwxtWdQmxQ^x zcOJ_cW?MWv7*po-e8Ml*iT^pR)qd?iz3%t_3%hID=QV72mGx;O#~ zBxB_)P{%`I69q^lBd0=4y?Q%4y9@ssWB_sH(zTHv1Spnm=8GeM&R77oiRE-MInaXv zLQyuEuct8M%B3Cs3|+YfU-cXtwm3SJ`b-hf9FPiA^--28cz<4}~Hv4|>H zz_4v`%aC~|63iZCIupUwXva!@<2j3n|-Yp6pp`l>3Ut uN=9Okw$5AcSd=o7sbGLW%nrf%L;3(toQhTW-m6>y0000J$(bU=hIuWD5YXC>S~V1bBo1d5j6dp4+Be{FqzA?9Xd8k5|b> z;Q=QDzssKv4rcQ|!457y47yj87anrl6H!?EXUCz19}hFJe@v3BsWCq+_-MN<-=m{N zJ`d+UsQc;vN8Wp7!!d4O7NBhkO+d3hFf+_$)DmM5W3ZcOGQ)l8qD2c0BzPD$2yx~x z%r%x=e>|m&rFKr-1cra7*D%#G?9t);wZ4A-%N4Onm-R2)|Gs&3_XWw2Fx{}abdg{4 zAK&|KFV=p<{qX*l3N!E7EgyL1)|*_q92M}d?y%#k8`FCOS?7zmlwPr_pJ9Jt<&V6- IE*lsa05}wAOaK4? literal 294 zcmV+>0oneEP)j%F58{VF0>dLr$N>Mu5CE9MdJtxB5e4($*r$=711|`!EwosLDkD%{gCTO(!XRo1aH+w;vDdos@w&iwdOYrHu?mtCs9l2rT5Dkd zt+*a~Y&p}aU-=;E{O^O?V sf?aUz?-R`w)@#uO*d82jwa$;_3fUb#9=}^FLI3~&07*qoM6N<$f+~-DAOHXW diff --git a/assets/image/tip_info.webp b/assets/image/tip_info.webp new file mode 100644 index 0000000000000000000000000000000000000000..74d08e03440e257c06e4dd57413c9cf21902a1d2 GIT binary patch literal 282 zcmV+#0p00Ac;5J=%> z7ZDMIgEo>JsV)GB08WqK!VvhG;!kRCIYjh-0$_RL2e6d718F<5sE;088kYv?_mKLQ zI+YGrqee4VXX=gr-t`qMYU%-LJHk@x4sbrP16EKtAd~odGHl01*H_kvf@3 zrK2LDFc=5`uo4Mu0J|>&davRKAVvUtfd2u}|DXT40k{F%{shK!@BsecxqV?wd%yoQ zFCEkS)za-TL>x&1(#<82<>YpRwLwe`D`mgkhO)!ADHkQ&D4g$W$;JBLo`n2VrbO^& gVRRW{8JJ-M=^*!!=hD0${0)p=@E_muHoyP?0C@jK1 z8Ft2;#0QfZCNX9GU9Du*@!~&=!^eY5S$jlJg+*bVmFmoOQu@hs&QZ%ZEZ1?+;Y6pWA(=GMp{cZ$*n` s5@WfGtz^yoEet?=6eNJA8Za`I0Kus%xc~qF literal 0 HcmV?d00001 diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index f785bee2..9498e6b6 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -582,7 +582,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ), autoplay: true, duration: 1000, - autoplayDelay: 2000, + autoplayDelay: 100000, physics: BouncingScrollPhysics(), itemBuilder: (context, position) { return InkWell( diff --git a/lib/main.dart b/lib/main.dart index 9c99f38d..301c616f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -169,6 +169,12 @@ 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_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 +583,15 @@ Map routers = { 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), + }; diff --git a/lib/mine/mine_view/mine_item.dart b/lib/mine/mine_view/mine_item.dart index 066ba56c..26ee261f 100644 --- a/lib/mine/mine_view/mine_item.dart +++ b/lib/mine/mine_view/mine_item.dart @@ -351,9 +351,17 @@ class _MineItem extends State { ), ), - ///商家管理 + ///发票助手 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(), diff --git a/lib/order/invoices_manage/add_invoices_title.dart b/lib/order/invoices_manage/add_invoices_title.dart index ec600fb4..1bd65a6f 100644 --- a/lib/order/invoices_manage/add_invoices_title.dart +++ b/lib/order/invoices_manage/add_invoices_title.dart @@ -3,130 +3,849 @@ 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:intl/intl.dart'; -import 'package:pull_to_refresh/pull_to_refresh.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/classic_header.dart'; +import '../../view_widget/border_text.dart'; import '../../view_widget/my_appbar.dart'; -import '../../view_widget/my_footer.dart'; -import '../../view_widget/no_data_view.dart'; -class InvoicesManagePage extends StatefulWidget { +class AddInvoicesTitle extends StatefulWidget { + final Map arguments; + + AddInvoicesTitle({this.arguments}); + @override State createState() { - return _InvoicesManagePage(); + return _AddInvoicesTitle(); } } -class _InvoicesManagePage extends State { +class _AddInvoicesTitle extends State { + 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(); - // _onRefresh(); + 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 Scaffold( - resizeToAvoidBottomInset: false, - appBar: MyAppBar( - title: "添加抬头", - titleColor: Colors.black, - background: Colors.white, - leadingColor: Colors.black, - ), - body: - // networkStatus == -1 ? noNetwork() : - Column( - crossAxisAlignment: CrossAxisAlignment.start, + 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: [ - Text( - "请填写抬头信息:", - style: TextStyle( - color: Color(0xFF000000), - fontSize: 12.sp, - fontWeight: MyFontWeight.regular, + 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( + padding: EdgeInsets.symmetric(vertical: 20.h), + color: Color(0xff32A060), + width: double.infinity, + alignment: Alignment.center, + child: Text( + S.of(context).baocun, + style: TextStyle( + color: Colors.white, + fontSize: 16.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: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), + Widget addInvoiceTitleSm() { + return Column( + children: [ + Expanded( child: Container( - margin: EdgeInsets.only(bottom: 16), - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 149, - height: 20, + 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, ), - 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: 42, - height: 20, - ), - ), - Shimmer.fromColors( - baseColor: Color(0XFFD8D8D8), - highlightColor: Color(0XFFD8D8D8), - child: Container( - decoration: BoxDecoration( - color: Color(0XFFD8D8D8), - borderRadius: BorderRadius.circular(2), - ), - width: 60, - height: 20, - ), - ), - ], - ) - ], - ), + ), + ], ); } - } diff --git a/lib/order/invoices_manage/edit_invoices_info.dart b/lib/order/invoices_manage/edit_invoices_info.dart new file mode 100644 index 00000000..1cb53bed --- /dev/null +++ b/lib/order/invoices_manage/edit_invoices_info.dart @@ -0,0 +1,594 @@ +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 arguments; + + EditInvoicesInfo({this.arguments}); + + @override + State createState() { + return _EditInvoicesInfo(); + } +} + +class _EditInvoicesInfo extends State { + 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 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: 20.h), + color: Color(0xff32A060), + 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, + ), + ), + ], + ), + ), + ], + ); + } +} diff --git a/lib/order/invoices_manage/invoices_history.dart b/lib/order/invoices_manage/invoices_history.dart new file mode 100644 index 00000000..54dac85e --- /dev/null +++ b/lib/order/invoices_manage/invoices_history.dart @@ -0,0 +1,454 @@ +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 createState() { + return _InvoicesHistory(); + } +} + +class _InvoicesHistory extends State { + final RefreshController refreshController = RefreshController(); + ApiService apiService; + String networkError = ""; + int networkStatus = 0; + List records = []; + int _current = 1; + Map> _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 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]; + } + }); + _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/bs_no data_logo.webp", + isShowBtn: false, + text: "暂无商品分类", + fontSize: 16, + margin: EdgeInsets.all(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: () {}, + 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 "开票失败"; + } + } + + 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( + margin: EdgeInsets.only(top: 120.h), + 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(0xFF30415B), + 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), + )), + ) + ], + ), + ); + } +} diff --git a/lib/order/invoices_manage/invoices_manage_page.dart b/lib/order/invoices_manage/invoices_manage_page.dart new file mode 100644 index 00000000..1a5b45a0 --- /dev/null +++ b/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 createState() { + return _InvoicesManagePage(); + } +} + +class _InvoicesManagePage extends State { + final RefreshController refreshController = RefreshController(); + ApiService apiService; + String networkError = ""; + int networkStatus = 0; + int _pageNum = 1; + var allCheckIndex = false; + List records = []; + List 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 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 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(0xFF30415B), + borderRadius: BorderRadius.circular(15), + ), + padding: EdgeInsets.symmetric(horizontal: 12, vertical: 3), + child: Text( + "重试", + style: TextStyle( + fontSize: 14, + color: Colors.white, + fontWeight: MyFontWeight.regular, + ), + ), + ), + ), + ], + ), + ); + } +} diff --git a/lib/order/invoices_manage/invoices_title_info.dart b/lib/order/invoices_manage/invoices_title_info.dart new file mode 100644 index 00000000..b8cc4c79 --- /dev/null +++ b/lib/order/invoices_manage/invoices_title_info.dart @@ -0,0 +1,571 @@ +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 arguments; + + InvoicesTitleInfo({this.arguments}); + + @override + State createState() { + return _InvoicesTitleInfo(); + } +} + +class _InvoicesTitleInfo extends State { + final RefreshController refreshController = RefreshController(); + String networkError = ""; + int networkStatus = 0; + ApiService apiService; + List 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 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); + }); + } 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: 20.h), + color: Color(0xff32A060), + 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, + margin: EdgeInsets.only(top: 120.h), + 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(0xFF30415B), + 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, + ), + ], + ) + ], + ), + ), + ); + }, + ); + } +} diff --git a/lib/order/order_history_page.dart b/lib/order/order_history_page.dart index 4372e863..691b7a83 100644 --- a/lib/order/order_history_page.dart +++ b/lib/order/order_history_page.dart @@ -196,6 +196,7 @@ class _OrderHistoryList extends State } 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 ? StatusUtils.statusBtn( context, orderInfo.payStatus, + orderInfo.payChannel, orderInfo.orderStatus, orderInfo.isTakeOut, orderInfo.sendStatus, diff --git a/lib/retrofit/data/invoice_list.dart b/lib/retrofit/data/invoice_list.dart new file mode 100644 index 00000000..d921cde1 --- /dev/null +++ b/lib/retrofit/data/invoice_list.dart @@ -0,0 +1,1212 @@ +/// records : [{"id":"1815299099583315968","createTime":"2024-07-22 16:13:27","createUser":null,"updateTime":null,"updateUser":null,"tenantCode":null,"storeId":null,"storeName":"前进麦味烘焙*海峡姐妹茶(哈乐城店)","tableId":null,"responsible":null,"orderType":null,"clearTable":null,"mid":null,"parentId":"0","parentCode":null,"orderCode":null,"dayFlowCode":null,"orderStatus":null,"sendStatus":null,"payStatus":1,"haveTimes":null,"invoicing":null,"memberAccount":null,"owner":null,"logisticsId":null,"shipperCode":null,"logisticsName":null,"logisticsNum":null,"logisticsCase":null,"refundStatus":null,"addressExt":null,"contactsExtList":null,"postFee":"0","totalPackagingFee":"0","couponSubPrice":"0","removeDecimal":"0","isSubscribe":null,"subcribeTime":null,"sendTime":null,"confirmTime":null,"returnMoneyTime":null,"notes":null,"prepayId":null,"payTime":null,"payChannel":null,"payNum":null,"promotionId":null,"actId":null,"couponId":null,"isDelete":null,"isTakeOut":null,"batch":1,"orderDiscountPrice":"0","dishesDiscountPrice":"0","orderPercentPrice":"0","activityNoPrice":"0","activityDiscountPrice":"0","uniqueDiscountType":null,"totalDiscountPrice":"0","vipDayDiscountPrice":"0","orderSource":null,"benefitDiscountAmount":"0","vipDiscountPrice":"0","orderMerge":null,"canSettlement":null,"endRefundTime":null,"orderProductList":[{"id":"1815299100225044480","createTime":"2024-07-22 16:13:27","createUser":"1428617748061093888","updateTime":"2024-07-22 16:13:27","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1432164681279078400","orderId":"1815299099583315968","actInfo":null,"productId":"1711580655285960704","times":null,"usedTimes":null,"productName":"桂花红豆包","skuId":"1711580655323709440","skuNameStr":"","skuImg":"","buyNum":2,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"8.00","sellPrice":"8.00","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"}],"businessType":null,"paySum":"16.00","useInvoice":null,"payedPrice":"0","finalPayPrice":"16.00","isEnableSubscribePay":null,"invoiceId":null,"invoiceState":null,"posType":null},{"id":"1808763658105257984","createTime":"2024-07-04 15:23:56","createUser":null,"updateTime":null,"updateUser":null,"tenantCode":null,"storeId":null,"storeName":"海峡姐妹茶(歌笛湖印象里店)","tableId":null,"responsible":null,"orderType":null,"clearTable":null,"mid":null,"parentId":"0","parentCode":null,"orderCode":null,"dayFlowCode":null,"orderStatus":null,"sendStatus":null,"payStatus":1,"haveTimes":null,"invoicing":null,"memberAccount":null,"owner":null,"logisticsId":null,"shipperCode":null,"logisticsName":null,"logisticsNum":null,"logisticsCase":null,"refundStatus":null,"addressExt":null,"contactsExtList":null,"postFee":"0","totalPackagingFee":"0","couponSubPrice":"0","removeDecimal":"0","isSubscribe":null,"subcribeTime":null,"sendTime":null,"confirmTime":null,"returnMoneyTime":null,"notes":null,"prepayId":null,"payTime":null,"payChannel":null,"payNum":null,"promotionId":null,"actId":null,"couponId":null,"isDelete":null,"isTakeOut":null,"batch":1,"orderDiscountPrice":"0","dishesDiscountPrice":"0","orderPercentPrice":"0","activityNoPrice":"0","activityDiscountPrice":"0","uniqueDiscountType":null,"totalDiscountPrice":"0","vipDayDiscountPrice":"0","orderSource":null,"benefitDiscountAmount":"0","vipDiscountPrice":"0","orderMerge":null,"canSettlement":null,"endRefundTime":null,"orderProductList":[{"id":"1808763658377887744","createTime":"2024-07-04 15:23:56","createUser":"1428617748061093888","updateTime":"2024-07-04 15:23:56","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1808763658105257984","actInfo":null,"productId":"1780474355029901312","times":null,"usedTimes":null,"productName":"拿铁加吐司下午茶套餐","skuId":"1780474355088621568","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"28.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"}],"businessType":null,"paySum":"0.01","useInvoice":null,"payedPrice":"0.01","finalPayPrice":"0.01","isEnableSubscribePay":null,"invoiceId":null,"invoiceState":null,"posType":null},{"id":"1808758418991742976","createTime":"2024-07-04 15:03:07","createUser":null,"updateTime":null,"updateUser":null,"tenantCode":null,"storeId":null,"storeName":"海峡姐妹茶(歌笛湖印象里店)","tableId":null,"responsible":null,"orderType":null,"clearTable":null,"mid":null,"parentId":"0","parentCode":null,"orderCode":null,"dayFlowCode":null,"orderStatus":null,"sendStatus":null,"payStatus":1,"haveTimes":null,"invoicing":null,"memberAccount":null,"owner":null,"logisticsId":null,"shipperCode":null,"logisticsName":null,"logisticsNum":null,"logisticsCase":null,"refundStatus":null,"addressExt":null,"contactsExtList":null,"postFee":"0","totalPackagingFee":"0","couponSubPrice":"0","removeDecimal":"0","isSubscribe":null,"subcribeTime":null,"sendTime":null,"confirmTime":null,"returnMoneyTime":null,"notes":null,"prepayId":null,"payTime":null,"payChannel":null,"payNum":null,"promotionId":null,"actId":null,"couponId":null,"isDelete":null,"isTakeOut":null,"batch":1,"orderDiscountPrice":"0","dishesDiscountPrice":"0","orderPercentPrice":"0","activityNoPrice":"0","activityDiscountPrice":"0","uniqueDiscountType":null,"totalDiscountPrice":"0","vipDayDiscountPrice":"0","orderSource":null,"benefitDiscountAmount":"0","vipDiscountPrice":"0","orderMerge":null,"canSettlement":null,"endRefundTime":null,"orderProductList":[{"id":"1808758419272761344","createTime":"2024-07-04 15:03:07","createUser":"1428617748061093888","updateTime":"2024-07-04 15:03:07","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1808758418991742976","actInfo":null,"productId":"1780474355029901312","times":null,"usedTimes":null,"productName":"拿铁加吐司下午茶套餐","skuId":"1780474355088621568","skuNameStr":"","skuImg":"","buyNum":2,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"28.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"}],"businessType":null,"paySum":"0.02","useInvoice":null,"payedPrice":"0","finalPayPrice":"0.02","isEnableSubscribePay":null,"invoiceId":null,"invoiceState":null,"posType":null},{"id":"1739531721478504448","createTime":"2023-12-26 14:20:56","createUser":null,"updateTime":null,"updateUser":null,"tenantCode":null,"storeId":null,"storeName":"海峡姐妹茶(歌笛湖印象里店)","tableId":null,"responsible":null,"orderType":null,"clearTable":null,"mid":null,"parentId":"0","parentCode":null,"orderCode":null,"dayFlowCode":null,"orderStatus":null,"sendStatus":null,"payStatus":1,"haveTimes":null,"invoicing":null,"memberAccount":null,"owner":null,"logisticsId":null,"shipperCode":null,"logisticsName":null,"logisticsNum":null,"logisticsCase":null,"refundStatus":null,"addressExt":null,"contactsExtList":null,"postFee":"0","totalPackagingFee":"0","couponSubPrice":"0","removeDecimal":"0","isSubscribe":null,"subcribeTime":null,"sendTime":null,"confirmTime":null,"returnMoneyTime":null,"notes":null,"prepayId":null,"payTime":null,"payChannel":null,"payNum":null,"promotionId":null,"actId":null,"couponId":null,"isDelete":null,"isTakeOut":null,"batch":1,"orderDiscountPrice":"0","dishesDiscountPrice":"0","orderPercentPrice":"0","activityNoPrice":"0","activityDiscountPrice":"0","uniqueDiscountType":null,"totalDiscountPrice":"0","vipDayDiscountPrice":"0","orderSource":null,"benefitDiscountAmount":"0","vipDiscountPrice":"0","orderMerge":null,"canSettlement":null,"endRefundTime":null,"orderProductList":[{"id":"1739531721784688640","createTime":"2023-12-26 14:20:56","createUser":"1428617748061093888","updateTime":"2023-12-26 14:20:56","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1739531721478504448","actInfo":null,"productId":"1722077521022812160","times":0,"usedTimes":0,"productName":"新品台式套餐","skuId":"1722902248855437312","skuNameStr":"美式咖啡(热)360ml 正常糖 花生厚吐司","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"23.00","sellPrice":"13.90","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":null,"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"}],"businessType":null,"paySum":"13.90","useInvoice":null,"payedPrice":"0","finalPayPrice":"13.90","isEnableSubscribePay":null,"invoiceId":null,"invoiceState":null,"posType":null},{"id":"1739529082455982080","createTime":"2023-12-26 14:10:27","createUser":null,"updateTime":null,"updateUser":null,"tenantCode":null,"storeId":null,"storeName":"海峡姐妹茶(歌笛湖印象里店)","tableId":null,"responsible":null,"orderType":null,"clearTable":null,"mid":null,"parentId":"0","parentCode":null,"orderCode":null,"dayFlowCode":null,"orderStatus":null,"sendStatus":null,"payStatus":1,"haveTimes":null,"invoicing":null,"memberAccount":null,"owner":null,"logisticsId":null,"shipperCode":null,"logisticsName":null,"logisticsNum":null,"logisticsCase":null,"refundStatus":null,"addressExt":null,"contactsExtList":null,"postFee":"0","totalPackagingFee":"0","couponSubPrice":"0","removeDecimal":"0","isSubscribe":null,"subcribeTime":null,"sendTime":null,"confirmTime":null,"returnMoneyTime":null,"notes":null,"prepayId":null,"payTime":null,"payChannel":null,"payNum":null,"promotionId":null,"actId":null,"couponId":null,"isDelete":null,"isTakeOut":null,"batch":1,"orderDiscountPrice":"0","dishesDiscountPrice":"0","orderPercentPrice":"0","activityNoPrice":"0","activityDiscountPrice":"0","uniqueDiscountType":null,"totalDiscountPrice":"0","vipDayDiscountPrice":"0","orderSource":null,"benefitDiscountAmount":"0","vipDiscountPrice":"0","orderMerge":null,"canSettlement":null,"endRefundTime":null,"orderProductList":[{"id":"1739529082883801088","createTime":"2023-12-26 14:10:27","createUser":"1428617748061093888","updateTime":"2023-12-26 14:10:27","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1739529082455982080","actInfo":null,"productId":"1722077521022812160","times":0,"usedTimes":0,"productName":"新品台式套餐","skuId":"1722902248855437312","skuNameStr":"美式咖啡(热)360ml 正常糖 花生厚吐司","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"23.00","sellPrice":"13.90","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":null,"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"}],"businessType":null,"paySum":"13.90","useInvoice":null,"payedPrice":"0","finalPayPrice":"13.90","isEnableSubscribePay":null,"invoiceId":null,"invoiceState":null,"posType":null},{"id":"1739528149030404096","createTime":"2023-12-26 14:06:44","createUser":null,"updateTime":null,"updateUser":null,"tenantCode":null,"storeId":null,"storeName":"海峡姐妹茶(歌笛湖印象里店)","tableId":null,"responsible":null,"orderType":null,"clearTable":null,"mid":null,"parentId":"0","parentCode":null,"orderCode":null,"dayFlowCode":null,"orderStatus":null,"sendStatus":null,"payStatus":1,"haveTimes":null,"invoicing":null,"memberAccount":null,"owner":null,"logisticsId":null,"shipperCode":null,"logisticsName":null,"logisticsNum":null,"logisticsCase":null,"refundStatus":null,"addressExt":null,"contactsExtList":null,"postFee":"0","totalPackagingFee":"0","couponSubPrice":"0","removeDecimal":"0","isSubscribe":null,"subcribeTime":null,"sendTime":null,"confirmTime":null,"returnMoneyTime":null,"notes":null,"prepayId":null,"payTime":null,"payChannel":null,"payNum":null,"promotionId":null,"actId":null,"couponId":null,"isDelete":null,"isTakeOut":null,"batch":1,"orderDiscountPrice":"0","dishesDiscountPrice":"0","orderPercentPrice":"0","activityNoPrice":"0","activityDiscountPrice":"0","uniqueDiscountType":null,"totalDiscountPrice":"0","vipDayDiscountPrice":"0","orderSource":null,"benefitDiscountAmount":"0","vipDiscountPrice":"0","orderMerge":null,"canSettlement":null,"endRefundTime":null,"orderProductList":[{"id":"1739528149391114240","createTime":"2023-12-26 14:06:44","createUser":"1428617748061093888","updateTime":"2023-12-26 14:06:44","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1739528149030404096","actInfo":null,"productId":"1717143790415773696","times":0,"usedTimes":0,"productName":"红薯芋圆","skuId":"1717143790453522432","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"2.00","sellPrice":"2.00","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"}],"businessType":null,"paySum":"2.00","useInvoice":null,"payedPrice":"0","finalPayPrice":"2.00","isEnableSubscribePay":null,"invoiceId":null,"invoiceState":null,"posType":null},{"id":"1721749099142709248","createTime":"2023-11-07 12:39:08","createUser":null,"updateTime":null,"updateUser":null,"tenantCode":null,"storeId":null,"storeName":"海峡姐妹茶(歌笛湖印象里店)","tableId":null,"responsible":null,"orderType":null,"clearTable":null,"mid":null,"parentId":"0","parentCode":null,"orderCode":null,"dayFlowCode":null,"orderStatus":null,"sendStatus":null,"payStatus":1,"haveTimes":null,"invoicing":null,"memberAccount":null,"owner":null,"logisticsId":null,"shipperCode":null,"logisticsName":null,"logisticsNum":null,"logisticsCase":null,"refundStatus":null,"addressExt":null,"contactsExtList":null,"postFee":"0","totalPackagingFee":"0","couponSubPrice":"0","removeDecimal":"0","isSubscribe":null,"subcribeTime":null,"sendTime":null,"confirmTime":null,"returnMoneyTime":null,"notes":null,"prepayId":null,"payTime":null,"payChannel":null,"payNum":null,"promotionId":null,"actId":null,"couponId":null,"isDelete":null,"isTakeOut":null,"batch":1,"orderDiscountPrice":"0","dishesDiscountPrice":"0","orderPercentPrice":"0","activityNoPrice":"0","activityDiscountPrice":"0","uniqueDiscountType":null,"totalDiscountPrice":"0","vipDayDiscountPrice":"0","orderSource":null,"benefitDiscountAmount":"0","vipDiscountPrice":"0","orderMerge":null,"canSettlement":null,"endRefundTime":null,"orderProductList":[{"id":"1721749099251761152","createTime":"2023-11-07 12:39:08","createUser":"1428617748061093888","updateTime":"2023-11-07 12:39:08","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1721749099142709248","actInfo":null,"productId":"1668152814867578880","times":0,"usedTimes":0,"productName":"茗茶","skuId":"1696084971438997504","skuNameStr":"少冰 无糖 700ml 台18(红玉红茶)","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"9.00","sellPrice":"9.00","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"}],"businessType":null,"paySum":"9.00","useInvoice":null,"payedPrice":"0","finalPayPrice":"9.00","isEnableSubscribePay":null,"invoiceId":null,"invoiceState":null,"posType":null},{"id":"1721748992578027520","createTime":"2023-11-07 12:38:43","createUser":null,"updateTime":null,"updateUser":null,"tenantCode":null,"storeId":null,"storeName":"海峡姐妹茶(歌笛湖印象里店)","tableId":null,"responsible":null,"orderType":null,"clearTable":null,"mid":null,"parentId":"0","parentCode":null,"orderCode":null,"dayFlowCode":null,"orderStatus":null,"sendStatus":null,"payStatus":1,"haveTimes":null,"invoicing":null,"memberAccount":null,"owner":null,"logisticsId":null,"shipperCode":null,"logisticsName":null,"logisticsNum":null,"logisticsCase":null,"refundStatus":null,"addressExt":null,"contactsExtList":null,"postFee":"0","totalPackagingFee":"0","couponSubPrice":"0","removeDecimal":"0","isSubscribe":null,"subcribeTime":null,"sendTime":null,"confirmTime":null,"returnMoneyTime":null,"notes":null,"prepayId":null,"payTime":null,"payChannel":null,"payNum":null,"promotionId":null,"actId":null,"couponId":null,"isDelete":null,"isTakeOut":null,"batch":1,"orderDiscountPrice":"0","dishesDiscountPrice":"0","orderPercentPrice":"0","activityNoPrice":"0","activityDiscountPrice":"0","uniqueDiscountType":null,"totalDiscountPrice":"0","vipDayDiscountPrice":"0","orderSource":null,"benefitDiscountAmount":"0","vipDiscountPrice":"0","orderMerge":null,"canSettlement":null,"endRefundTime":null,"orderProductList":[{"id":"1721748992607387648","createTime":"2023-11-07 12:38:43","createUser":"1428617748061093888","updateTime":"2023-11-07 12:38:43","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1721748992578027520","actInfo":{"promotionId":null,"promotionType":null,"discountAmount":null,"discountRate":null,"couponId":"1569618358515531776","couponType":1,"couponDiscountAmount":"17.6","couponDiscountRate":100},"productId":"1715256863185960960","times":0,"usedTimes":0,"productName":"椰香酒酿","skuId":"1719915581567664128","skuNameStr":"500ml 热 少糖","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"19.00","sellPrice":"19.00","postPay":"0.00","isDelete":0,"discountAmount":"17.60","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"},{"id":"1721748992615776256","createTime":"2023-11-07 12:38:43","createUser":"1428617748061093888","updateTime":"2023-11-07 12:38:43","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1721748992578027520","actInfo":{"promotionId":null,"promotionType":null,"discountAmount":null,"discountRate":null,"couponId":"1569618358515531776","couponType":1,"couponDiscountAmount":"17.6","couponDiscountRate":100},"productId":"1715256863185960960","times":0,"usedTimes":0,"productName":"椰香酒酿","skuId":"1719915581357948928","skuNameStr":"500ml 少冰 七分糖","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"19.00","sellPrice":"19.00","postPay":"0.00","isDelete":0,"discountAmount":"17.60","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"},{"id":"1721748992615776257","createTime":"2023-11-07 12:38:43","createUser":"1428617748061093888","updateTime":"2023-11-07 12:38:43","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1721748992578027520","actInfo":{"promotionId":null,"promotionType":null,"discountAmount":null,"discountRate":null,"couponId":"1569618358515531776","couponType":1,"couponDiscountAmount":"14.8","couponDiscountRate":100},"productId":"1711327281898586112","times":0,"usedTimes":0,"productName":"金宣乌龙轻乳茶","skuId":"1713376100739973120","skuNameStr":"500ml 温热 七分糖","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"16.00","sellPrice":"16.00","postPay":"0.00","isDelete":0,"discountAmount":"14.80","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":null,"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"}],"businessType":null,"paySum":"54.00","useInvoice":null,"payedPrice":"4.00","finalPayPrice":"4.00","isEnableSubscribePay":null,"invoiceId":null,"invoiceState":null,"posType":null},{"id":"1721748249640960000","createTime":"2023-11-07 12:35:46","createUser":null,"updateTime":null,"updateUser":null,"tenantCode":null,"storeId":null,"storeName":"海峡姐妹茶(歌笛湖印象里店)","tableId":null,"responsible":null,"orderType":null,"clearTable":null,"mid":null,"parentId":"0","parentCode":null,"orderCode":null,"dayFlowCode":null,"orderStatus":null,"sendStatus":null,"payStatus":1,"haveTimes":null,"invoicing":null,"memberAccount":null,"owner":null,"logisticsId":null,"shipperCode":null,"logisticsName":null,"logisticsNum":null,"logisticsCase":null,"refundStatus":null,"addressExt":null,"contactsExtList":null,"postFee":"0","totalPackagingFee":"0","couponSubPrice":"0","removeDecimal":"0","isSubscribe":null,"subcribeTime":null,"sendTime":null,"confirmTime":null,"returnMoneyTime":null,"notes":null,"prepayId":null,"payTime":null,"payChannel":null,"payNum":null,"promotionId":null,"actId":null,"couponId":null,"isDelete":null,"isTakeOut":null,"batch":1,"orderDiscountPrice":"0","dishesDiscountPrice":"0","orderPercentPrice":"0","activityNoPrice":"0","activityDiscountPrice":"0","uniqueDiscountType":null,"totalDiscountPrice":"0","vipDayDiscountPrice":"0","orderSource":null,"benefitDiscountAmount":"0","vipDiscountPrice":"0","orderMerge":null,"canSettlement":null,"endRefundTime":null,"orderProductList":[{"id":"1721748249666125824","createTime":"2023-11-07 12:35:46","createUser":"1428617748061093888","updateTime":"2023-11-07 12:35:46","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1721748249640960000","actInfo":{"promotionId":null,"promotionType":null,"discountAmount":null,"discountRate":null,"couponId":"1569618358515531776","couponType":1,"couponDiscountAmount":"18.0","couponDiscountRate":100},"productId":"1668141170858917888","times":0,"usedTimes":0,"productName":"洛神果果","skuId":"1696083296192036864","skuNameStr":"正常冰 七分糖 700ml","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"18.00","sellPrice":"18.00","postPay":"0.00","isDelete":0,"discountAmount":"18.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"},{"id":"1721748249674514432","createTime":"2023-11-07 12:35:46","createUser":"1428617748061093888","updateTime":"2023-11-07 12:35:46","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1721748249640960000","actInfo":{"promotionId":null,"promotionType":null,"discountAmount":null,"discountRate":null,"couponId":"1569618358515531776","couponType":1,"couponDiscountAmount":"16.0","couponDiscountRate":100},"productId":"1668149489031970816","times":0,"usedTimes":0,"productName":"红枣桂圆姜茶","skuId":"1696084860218638336","skuNameStr":"热 正常糖 500ml","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"16.00","sellPrice":"16.00","postPay":"0.00","isDelete":0,"discountAmount":"16.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"},{"id":"1721748249674514433","createTime":"2023-11-07 12:35:46","createUser":"1428617748061093888","updateTime":"2023-11-07 12:35:46","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1665555596536971264","orderId":"1721748249640960000","actInfo":{"promotionId":null,"promotionType":null,"discountAmount":null,"discountRate":null,"couponId":"1569618358515531776","couponType":1,"couponDiscountAmount":"16.0","couponDiscountRate":100},"productId":"1711327733293776896","times":0,"usedTimes":0,"productName":"凤凰单枞轻乳茶","skuId":"1713394940744040448","skuNameStr":"500ml 少冰 无糖","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"16.00","sellPrice":"16.00","postPay":"0.00","isDelete":0,"discountAmount":"16.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"}],"businessType":null,"paySum":"50.00","useInvoice":null,"payedPrice":"0.00","finalPayPrice":"0.00","isEnableSubscribePay":null,"invoiceId":null,"invoiceState":null,"posType":null}] +/// total : "9" +/// size : "10" +/// current : "1" +/// orders : [{"column":"id","asc":false}] +/// hitCount : false +/// searchCount : true +/// pages : "1" + +class InvoiceList { + InvoiceList({ + List records, + String total, + String size, + String current, + List orders, + bool hitCount, + bool searchCount, + String pages,}){ + _records = records; + _total = total; + _size = size; + _current = current; + _orders = orders; + _hitCount = hitCount; + _searchCount = searchCount; + _pages = pages; +} + + InvoiceList.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; + String _total; + String _size; + String _current; + List _orders; + bool _hitCount; + bool _searchCount; + String _pages; +InvoiceList copyWith({ List records, + String total, + String size, + String current, + List orders, + bool hitCount, + bool searchCount, + String pages, +}) => InvoiceList( 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 get records => _records; + String get total => _total; + String get size => _size; + String get current => _current; + List get orders => _orders; + bool get hitCount => _hitCount; + bool get searchCount => _searchCount; + String get pages => _pages; + + Map toJson() { + final map = {}; + 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 toJson() { + final map = {}; + map['column'] = _column; + map['asc'] = _asc; + return map; + } + +} + +/// id : "1815299099583315968" +/// createTime : "2024-07-22 16:13:27" +/// createUser : null +/// updateTime : null +/// updateUser : null +/// tenantCode : null +/// storeId : null +/// storeName : "前进麦味烘焙*海峡姐妹茶(哈乐城店)" +/// tableId : null +/// responsible : null +/// orderType : null +/// clearTable : null +/// mid : null +/// parentId : "0" +/// parentCode : null +/// orderCode : null +/// dayFlowCode : null +/// orderStatus : null +/// sendStatus : null +/// payStatus : 1 +/// haveTimes : null +/// invoicing : null +/// memberAccount : null +/// owner : null +/// logisticsId : null +/// shipperCode : null +/// logisticsName : null +/// logisticsNum : null +/// logisticsCase : null +/// refundStatus : null +/// addressExt : null +/// contactsExtList : null +/// postFee : "0" +/// totalPackagingFee : "0" +/// couponSubPrice : "0" +/// removeDecimal : "0" +/// isSubscribe : null +/// subcribeTime : null +/// sendTime : null +/// confirmTime : null +/// returnMoneyTime : null +/// notes : null +/// prepayId : null +/// payTime : null +/// payChannel : null +/// payNum : null +/// promotionId : null +/// actId : null +/// couponId : null +/// isDelete : null +/// isTakeOut : null +/// batch : 1 +/// orderDiscountPrice : "0" +/// dishesDiscountPrice : "0" +/// orderPercentPrice : "0" +/// activityNoPrice : "0" +/// activityDiscountPrice : "0" +/// uniqueDiscountType : null +/// totalDiscountPrice : "0" +/// vipDayDiscountPrice : "0" +/// orderSource : null +/// benefitDiscountAmount : "0" +/// vipDiscountPrice : "0" +/// orderMerge : null +/// canSettlement : null +/// endRefundTime : null +/// orderProductList : [{"id":"1815299100225044480","createTime":"2024-07-22 16:13:27","createUser":"1428617748061093888","updateTime":"2024-07-22 16:13:27","updateUser":"1428617748061093888","tenantCode":"1175","storeId":"1432164681279078400","orderId":"1815299099583315968","actInfo":null,"productId":"1711580655285960704","times":null,"usedTimes":null,"productName":"桂花红豆包","skuId":"1711580655323709440","skuNameStr":"","skuImg":"","buyNum":2,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"8.00","sellPrice":"8.00","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":0,"ticketType":"","ticketDays":"0","takeType":null,"skuTickets":[],"ticketStyle":"","setMealDataList":[],"packagingFee":"0.00"}] +/// businessType : null +/// paySum : "16.00" +/// useInvoice : null +/// payedPrice : "0" +/// finalPayPrice : "16.00" +/// isEnableSubscribePay : null +/// invoiceId : null +/// invoiceState : null +/// posType : null + +class Records { + Records({ + String id, + String createTime, + dynamic createUser, + dynamic updateTime, + dynamic updateUser, + dynamic tenantCode, + dynamic storeId, + String storeName, + dynamic tableId, + dynamic responsible, + dynamic orderType, + dynamic clearTable, + dynamic mid, + String parentId, + dynamic parentCode, + dynamic orderCode, + dynamic dayFlowCode, + dynamic orderStatus, + dynamic sendStatus, + num payStatus, + dynamic haveTimes, + dynamic invoicing, + dynamic memberAccount, + dynamic owner, + dynamic logisticsId, + dynamic shipperCode, + dynamic logisticsName, + dynamic logisticsNum, + dynamic logisticsCase, + dynamic refundStatus, + dynamic addressExt, + dynamic contactsExtList, + String postFee, + String totalPackagingFee, + String couponSubPrice, + String removeDecimal, + dynamic isSubscribe, + dynamic subcribeTime, + dynamic sendTime, + dynamic confirmTime, + dynamic returnMoneyTime, + dynamic notes, + dynamic prepayId, + dynamic payTime, + dynamic payChannel, + dynamic payNum, + dynamic promotionId, + dynamic actId, + dynamic couponId, + dynamic isDelete, + dynamic isTakeOut, + num batch, + String orderDiscountPrice, + String dishesDiscountPrice, + String orderPercentPrice, + String activityNoPrice, + String activityDiscountPrice, + dynamic uniqueDiscountType, + String totalDiscountPrice, + String vipDayDiscountPrice, + dynamic orderSource, + String benefitDiscountAmount, + String vipDiscountPrice, + dynamic orderMerge, + dynamic canSettlement, + dynamic endRefundTime, + List orderProductList, + dynamic businessType, + String paySum, + dynamic useInvoice, + String payedPrice, + String finalPayPrice, + dynamic isEnableSubscribePay, + dynamic invoiceId, + dynamic invoiceState, + dynamic posType,}){ + _id = id; + _createTime = createTime; + _createUser = createUser; + _updateTime = updateTime; + _updateUser = updateUser; + _tenantCode = tenantCode; + _storeId = storeId; + _storeName = storeName; + _tableId = tableId; + _responsible = responsible; + _orderType = orderType; + _clearTable = clearTable; + _mid = mid; + _parentId = parentId; + _parentCode = parentCode; + _orderCode = orderCode; + _dayFlowCode = dayFlowCode; + _orderStatus = orderStatus; + _sendStatus = sendStatus; + _payStatus = payStatus; + _haveTimes = haveTimes; + _invoicing = invoicing; + _memberAccount = memberAccount; + _owner = owner; + _logisticsId = logisticsId; + _shipperCode = shipperCode; + _logisticsName = logisticsName; + _logisticsNum = logisticsNum; + _logisticsCase = logisticsCase; + _refundStatus = refundStatus; + _addressExt = addressExt; + _contactsExtList = contactsExtList; + _postFee = postFee; + _totalPackagingFee = totalPackagingFee; + _couponSubPrice = couponSubPrice; + _removeDecimal = removeDecimal; + _isSubscribe = isSubscribe; + _subcribeTime = subcribeTime; + _sendTime = sendTime; + _confirmTime = confirmTime; + _returnMoneyTime = returnMoneyTime; + _notes = notes; + _prepayId = prepayId; + _payTime = payTime; + _payChannel = payChannel; + _payNum = payNum; + _promotionId = promotionId; + _actId = actId; + _couponId = couponId; + _isDelete = isDelete; + _isTakeOut = isTakeOut; + _batch = batch; + _orderDiscountPrice = orderDiscountPrice; + _dishesDiscountPrice = dishesDiscountPrice; + _orderPercentPrice = orderPercentPrice; + _activityNoPrice = activityNoPrice; + _activityDiscountPrice = activityDiscountPrice; + _uniqueDiscountType = uniqueDiscountType; + _totalDiscountPrice = totalDiscountPrice; + _vipDayDiscountPrice = vipDayDiscountPrice; + _orderSource = orderSource; + _benefitDiscountAmount = benefitDiscountAmount; + _vipDiscountPrice = vipDiscountPrice; + _orderMerge = orderMerge; + _canSettlement = canSettlement; + _endRefundTime = endRefundTime; + _orderProductList = orderProductList; + _businessType = businessType; + _paySum = paySum; + _useInvoice = useInvoice; + _payedPrice = payedPrice; + _finalPayPrice = finalPayPrice; + _isEnableSubscribePay = isEnableSubscribePay; + _invoiceId = invoiceId; + _invoiceState = invoiceState; + _posType = posType; +} + + Records.fromJson(dynamic json) { + _id = json['id']; + _createTime = json['createTime']; + _createUser = json['createUser']; + _updateTime = json['updateTime']; + _updateUser = json['updateUser']; + _tenantCode = json['tenantCode']; + _storeId = json['storeId']; + _storeName = json['storeName']; + _tableId = json['tableId']; + _responsible = json['responsible']; + _orderType = json['orderType']; + _clearTable = json['clearTable']; + _mid = json['mid']; + _parentId = json['parentId']; + _parentCode = json['parentCode']; + _orderCode = json['orderCode']; + _dayFlowCode = json['dayFlowCode']; + _orderStatus = json['orderStatus']; + _sendStatus = json['sendStatus']; + _payStatus = json['payStatus']; + _haveTimes = json['haveTimes']; + _invoicing = json['invoicing']; + _memberAccount = json['memberAccount']; + _owner = json['owner']; + _logisticsId = json['logisticsId']; + _shipperCode = json['shipperCode']; + _logisticsName = json['logisticsName']; + _logisticsNum = json['logisticsNum']; + _logisticsCase = json['logisticsCase']; + _refundStatus = json['refundStatus']; + _addressExt = json['addressExt']; + _contactsExtList = json['contactsExtList']; + _postFee = json['postFee']; + _totalPackagingFee = json['totalPackagingFee']; + _couponSubPrice = json['couponSubPrice']; + _removeDecimal = json['removeDecimal']; + _isSubscribe = json['isSubscribe']; + _subcribeTime = json['subcribeTime']; + _sendTime = json['sendTime']; + _confirmTime = json['confirmTime']; + _returnMoneyTime = json['returnMoneyTime']; + _notes = json['notes']; + _prepayId = json['prepayId']; + _payTime = json['payTime']; + _payChannel = json['payChannel']; + _payNum = json['payNum']; + _promotionId = json['promotionId']; + _actId = json['actId']; + _couponId = json['couponId']; + _isDelete = json['isDelete']; + _isTakeOut = json['isTakeOut']; + _batch = json['batch']; + _orderDiscountPrice = json['orderDiscountPrice']; + _dishesDiscountPrice = json['dishesDiscountPrice']; + _orderPercentPrice = json['orderPercentPrice']; + _activityNoPrice = json['activityNoPrice']; + _activityDiscountPrice = json['activityDiscountPrice']; + _uniqueDiscountType = json['uniqueDiscountType']; + _totalDiscountPrice = json['totalDiscountPrice']; + _vipDayDiscountPrice = json['vipDayDiscountPrice']; + _orderSource = json['orderSource']; + _benefitDiscountAmount = json['benefitDiscountAmount']; + _vipDiscountPrice = json['vipDiscountPrice']; + _orderMerge = json['orderMerge']; + _canSettlement = json['canSettlement']; + _endRefundTime = json['endRefundTime']; + if (json['orderProductList'] != null) { + _orderProductList = []; + json['orderProductList'].forEach((v) { + _orderProductList.add(OrderProductList.fromJson(v)); + }); + } + _businessType = json['businessType']; + _paySum = json['paySum']; + _useInvoice = json['useInvoice']; + _payedPrice = json['payedPrice']; + _finalPayPrice = json['finalPayPrice']; + _isEnableSubscribePay = json['isEnableSubscribePay']; + _invoiceId = json['invoiceId']; + _invoiceState = json['invoiceState']; + _posType = json['posType']; + } + String _id; + String _createTime; + dynamic _createUser; + dynamic _updateTime; + dynamic _updateUser; + dynamic _tenantCode; + dynamic _storeId; + String _storeName; + dynamic _tableId; + dynamic _responsible; + dynamic _orderType; + dynamic _clearTable; + dynamic _mid; + String _parentId; + dynamic _parentCode; + dynamic _orderCode; + dynamic _dayFlowCode; + dynamic _orderStatus; + dynamic _sendStatus; + num _payStatus; + dynamic _haveTimes; + dynamic _invoicing; + dynamic _memberAccount; + dynamic _owner; + dynamic _logisticsId; + dynamic _shipperCode; + dynamic _logisticsName; + dynamic _logisticsNum; + dynamic _logisticsCase; + dynamic _refundStatus; + dynamic _addressExt; + dynamic _contactsExtList; + String _postFee; + String _totalPackagingFee; + String _couponSubPrice; + String _removeDecimal; + dynamic _isSubscribe; + dynamic _subcribeTime; + dynamic _sendTime; + dynamic _confirmTime; + dynamic _returnMoneyTime; + dynamic _notes; + dynamic _prepayId; + dynamic _payTime; + dynamic _payChannel; + dynamic _payNum; + dynamic _promotionId; + dynamic _actId; + dynamic _couponId; + dynamic _isDelete; + dynamic _isTakeOut; + num _batch; + String _orderDiscountPrice; + String _dishesDiscountPrice; + String _orderPercentPrice; + String _activityNoPrice; + String _activityDiscountPrice; + dynamic _uniqueDiscountType; + String _totalDiscountPrice; + String _vipDayDiscountPrice; + dynamic _orderSource; + String _benefitDiscountAmount; + String _vipDiscountPrice; + dynamic _orderMerge; + dynamic _canSettlement; + dynamic _endRefundTime; + List _orderProductList; + dynamic _businessType; + String _paySum; + dynamic _useInvoice; + String _payedPrice; + String _finalPayPrice; + dynamic _isEnableSubscribePay; + dynamic _invoiceId; + dynamic _invoiceState; + dynamic _posType; +Records copyWith({ String id, + String createTime, + dynamic createUser, + dynamic updateTime, + dynamic updateUser, + dynamic tenantCode, + dynamic storeId, + String storeName, + dynamic tableId, + dynamic responsible, + dynamic orderType, + dynamic clearTable, + dynamic mid, + String parentId, + dynamic parentCode, + dynamic orderCode, + dynamic dayFlowCode, + dynamic orderStatus, + dynamic sendStatus, + num payStatus, + dynamic haveTimes, + dynamic invoicing, + dynamic memberAccount, + dynamic owner, + dynamic logisticsId, + dynamic shipperCode, + dynamic logisticsName, + dynamic logisticsNum, + dynamic logisticsCase, + dynamic refundStatus, + dynamic addressExt, + dynamic contactsExtList, + String postFee, + String totalPackagingFee, + String couponSubPrice, + String removeDecimal, + dynamic isSubscribe, + dynamic subcribeTime, + dynamic sendTime, + dynamic confirmTime, + dynamic returnMoneyTime, + dynamic notes, + dynamic prepayId, + dynamic payTime, + dynamic payChannel, + dynamic payNum, + dynamic promotionId, + dynamic actId, + dynamic couponId, + dynamic isDelete, + dynamic isTakeOut, + num batch, + String orderDiscountPrice, + String dishesDiscountPrice, + String orderPercentPrice, + String activityNoPrice, + String activityDiscountPrice, + dynamic uniqueDiscountType, + String totalDiscountPrice, + String vipDayDiscountPrice, + dynamic orderSource, + String benefitDiscountAmount, + String vipDiscountPrice, + dynamic orderMerge, + dynamic canSettlement, + dynamic endRefundTime, + List orderProductList, + dynamic businessType, + String paySum, + dynamic useInvoice, + String payedPrice, + String finalPayPrice, + dynamic isEnableSubscribePay, + dynamic invoiceId, + dynamic invoiceState, + dynamic posType, +}) => Records( id: id ?? _id, + createTime: createTime ?? _createTime, + createUser: createUser ?? _createUser, + updateTime: updateTime ?? _updateTime, + updateUser: updateUser ?? _updateUser, + tenantCode: tenantCode ?? _tenantCode, + storeId: storeId ?? _storeId, + storeName: storeName ?? _storeName, + tableId: tableId ?? _tableId, + responsible: responsible ?? _responsible, + orderType: orderType ?? _orderType, + clearTable: clearTable ?? _clearTable, + mid: mid ?? _mid, + parentId: parentId ?? _parentId, + parentCode: parentCode ?? _parentCode, + orderCode: orderCode ?? _orderCode, + dayFlowCode: dayFlowCode ?? _dayFlowCode, + orderStatus: orderStatus ?? _orderStatus, + sendStatus: sendStatus ?? _sendStatus, + payStatus: payStatus ?? _payStatus, + haveTimes: haveTimes ?? _haveTimes, + invoicing: invoicing ?? _invoicing, + memberAccount: memberAccount ?? _memberAccount, + owner: owner ?? _owner, + logisticsId: logisticsId ?? _logisticsId, + shipperCode: shipperCode ?? _shipperCode, + logisticsName: logisticsName ?? _logisticsName, + logisticsNum: logisticsNum ?? _logisticsNum, + logisticsCase: logisticsCase ?? _logisticsCase, + refundStatus: refundStatus ?? _refundStatus, + addressExt: addressExt ?? _addressExt, + contactsExtList: contactsExtList ?? _contactsExtList, + postFee: postFee ?? _postFee, + totalPackagingFee: totalPackagingFee ?? _totalPackagingFee, + couponSubPrice: couponSubPrice ?? _couponSubPrice, + removeDecimal: removeDecimal ?? _removeDecimal, + isSubscribe: isSubscribe ?? _isSubscribe, + subcribeTime: subcribeTime ?? _subcribeTime, + sendTime: sendTime ?? _sendTime, + confirmTime: confirmTime ?? _confirmTime, + returnMoneyTime: returnMoneyTime ?? _returnMoneyTime, + notes: notes ?? _notes, + prepayId: prepayId ?? _prepayId, + payTime: payTime ?? _payTime, + payChannel: payChannel ?? _payChannel, + payNum: payNum ?? _payNum, + promotionId: promotionId ?? _promotionId, + actId: actId ?? _actId, + couponId: couponId ?? _couponId, + isDelete: isDelete ?? _isDelete, + isTakeOut: isTakeOut ?? _isTakeOut, + batch: batch ?? _batch, + orderDiscountPrice: orderDiscountPrice ?? _orderDiscountPrice, + dishesDiscountPrice: dishesDiscountPrice ?? _dishesDiscountPrice, + orderPercentPrice: orderPercentPrice ?? _orderPercentPrice, + activityNoPrice: activityNoPrice ?? _activityNoPrice, + activityDiscountPrice: activityDiscountPrice ?? _activityDiscountPrice, + uniqueDiscountType: uniqueDiscountType ?? _uniqueDiscountType, + totalDiscountPrice: totalDiscountPrice ?? _totalDiscountPrice, + vipDayDiscountPrice: vipDayDiscountPrice ?? _vipDayDiscountPrice, + orderSource: orderSource ?? _orderSource, + benefitDiscountAmount: benefitDiscountAmount ?? _benefitDiscountAmount, + vipDiscountPrice: vipDiscountPrice ?? _vipDiscountPrice, + orderMerge: orderMerge ?? _orderMerge, + canSettlement: canSettlement ?? _canSettlement, + endRefundTime: endRefundTime ?? _endRefundTime, + orderProductList: orderProductList ?? _orderProductList, + businessType: businessType ?? _businessType, + paySum: paySum ?? _paySum, + useInvoice: useInvoice ?? _useInvoice, + payedPrice: payedPrice ?? _payedPrice, + finalPayPrice: finalPayPrice ?? _finalPayPrice, + isEnableSubscribePay: isEnableSubscribePay ?? _isEnableSubscribePay, + invoiceId: invoiceId ?? _invoiceId, + invoiceState: invoiceState ?? _invoiceState, + posType: posType ?? _posType, +); + String get id => _id; + String get createTime => _createTime; + dynamic get createUser => _createUser; + dynamic get updateTime => _updateTime; + dynamic get updateUser => _updateUser; + dynamic get tenantCode => _tenantCode; + dynamic get storeId => _storeId; + String get storeName => _storeName; + dynamic get tableId => _tableId; + dynamic get responsible => _responsible; + dynamic get orderType => _orderType; + dynamic get clearTable => _clearTable; + dynamic get mid => _mid; + String get parentId => _parentId; + dynamic get parentCode => _parentCode; + dynamic get orderCode => _orderCode; + dynamic get dayFlowCode => _dayFlowCode; + dynamic get orderStatus => _orderStatus; + dynamic get sendStatus => _sendStatus; + num get payStatus => _payStatus; + dynamic get haveTimes => _haveTimes; + dynamic get invoicing => _invoicing; + dynamic get memberAccount => _memberAccount; + dynamic get owner => _owner; + dynamic get logisticsId => _logisticsId; + dynamic get shipperCode => _shipperCode; + dynamic get logisticsName => _logisticsName; + dynamic get logisticsNum => _logisticsNum; + dynamic get logisticsCase => _logisticsCase; + dynamic get refundStatus => _refundStatus; + dynamic get addressExt => _addressExt; + dynamic get contactsExtList => _contactsExtList; + String get postFee => _postFee; + String get totalPackagingFee => _totalPackagingFee; + String get couponSubPrice => _couponSubPrice; + String get removeDecimal => _removeDecimal; + dynamic get isSubscribe => _isSubscribe; + dynamic get subcribeTime => _subcribeTime; + dynamic get sendTime => _sendTime; + dynamic get confirmTime => _confirmTime; + dynamic get returnMoneyTime => _returnMoneyTime; + dynamic get notes => _notes; + dynamic get prepayId => _prepayId; + dynamic get payTime => _payTime; + dynamic get payChannel => _payChannel; + dynamic get payNum => _payNum; + dynamic get promotionId => _promotionId; + dynamic get actId => _actId; + dynamic get couponId => _couponId; + dynamic get isDelete => _isDelete; + dynamic get isTakeOut => _isTakeOut; + num get batch => _batch; + String get orderDiscountPrice => _orderDiscountPrice; + String get dishesDiscountPrice => _dishesDiscountPrice; + String get orderPercentPrice => _orderPercentPrice; + String get activityNoPrice => _activityNoPrice; + String get activityDiscountPrice => _activityDiscountPrice; + dynamic get uniqueDiscountType => _uniqueDiscountType; + String get totalDiscountPrice => _totalDiscountPrice; + String get vipDayDiscountPrice => _vipDayDiscountPrice; + dynamic get orderSource => _orderSource; + String get benefitDiscountAmount => _benefitDiscountAmount; + String get vipDiscountPrice => _vipDiscountPrice; + dynamic get orderMerge => _orderMerge; + dynamic get canSettlement => _canSettlement; + dynamic get endRefundTime => _endRefundTime; + List get orderProductList => _orderProductList; + dynamic get businessType => _businessType; + String get paySum => _paySum; + dynamic get useInvoice => _useInvoice; + String get payedPrice => _payedPrice; + String get finalPayPrice => _finalPayPrice; + dynamic get isEnableSubscribePay => _isEnableSubscribePay; + dynamic get invoiceId => _invoiceId; + dynamic get invoiceState => _invoiceState; + dynamic get posType => _posType; + bool _isSelect = false; + + bool get isSelect => _isSelect; + + set isSelect(bool value) { + _isSelect = value; + } + + Map toJson() { + final map = {}; + map['id'] = _id; + map['createTime'] = _createTime; + map['createUser'] = _createUser; + map['updateTime'] = _updateTime; + map['updateUser'] = _updateUser; + map['tenantCode'] = _tenantCode; + map['storeId'] = _storeId; + map['storeName'] = _storeName; + map['tableId'] = _tableId; + map['responsible'] = _responsible; + map['orderType'] = _orderType; + map['clearTable'] = _clearTable; + map['mid'] = _mid; + map['parentId'] = _parentId; + map['parentCode'] = _parentCode; + map['orderCode'] = _orderCode; + map['dayFlowCode'] = _dayFlowCode; + map['orderStatus'] = _orderStatus; + map['sendStatus'] = _sendStatus; + map['payStatus'] = _payStatus; + map['haveTimes'] = _haveTimes; + map['invoicing'] = _invoicing; + map['memberAccount'] = _memberAccount; + map['owner'] = _owner; + map['logisticsId'] = _logisticsId; + map['shipperCode'] = _shipperCode; + map['logisticsName'] = _logisticsName; + map['logisticsNum'] = _logisticsNum; + map['logisticsCase'] = _logisticsCase; + map['refundStatus'] = _refundStatus; + map['addressExt'] = _addressExt; + map['contactsExtList'] = _contactsExtList; + map['postFee'] = _postFee; + map['totalPackagingFee'] = _totalPackagingFee; + map['couponSubPrice'] = _couponSubPrice; + map['removeDecimal'] = _removeDecimal; + map['isSubscribe'] = _isSubscribe; + map['subcribeTime'] = _subcribeTime; + map['sendTime'] = _sendTime; + map['confirmTime'] = _confirmTime; + map['returnMoneyTime'] = _returnMoneyTime; + map['notes'] = _notes; + map['prepayId'] = _prepayId; + map['payTime'] = _payTime; + map['payChannel'] = _payChannel; + map['payNum'] = _payNum; + map['promotionId'] = _promotionId; + map['actId'] = _actId; + map['couponId'] = _couponId; + map['isDelete'] = _isDelete; + map['isTakeOut'] = _isTakeOut; + map['batch'] = _batch; + map['orderDiscountPrice'] = _orderDiscountPrice; + map['dishesDiscountPrice'] = _dishesDiscountPrice; + map['orderPercentPrice'] = _orderPercentPrice; + map['activityNoPrice'] = _activityNoPrice; + map['activityDiscountPrice'] = _activityDiscountPrice; + map['uniqueDiscountType'] = _uniqueDiscountType; + map['totalDiscountPrice'] = _totalDiscountPrice; + map['vipDayDiscountPrice'] = _vipDayDiscountPrice; + map['orderSource'] = _orderSource; + map['benefitDiscountAmount'] = _benefitDiscountAmount; + map['vipDiscountPrice'] = _vipDiscountPrice; + map['orderMerge'] = _orderMerge; + map['canSettlement'] = _canSettlement; + map['endRefundTime'] = _endRefundTime; + if (_orderProductList != null) { + map['orderProductList'] = _orderProductList.map((v) => v.toJson()).toList(); + } + map['businessType'] = _businessType; + map['paySum'] = _paySum; + map['useInvoice'] = _useInvoice; + map['payedPrice'] = _payedPrice; + map['finalPayPrice'] = _finalPayPrice; + map['isEnableSubscribePay'] = _isEnableSubscribePay; + map['invoiceId'] = _invoiceId; + map['invoiceState'] = _invoiceState; + map['posType'] = _posType; + return map; + } + +} + +/// id : "1815299100225044480" +/// createTime : "2024-07-22 16:13:27" +/// createUser : "1428617748061093888" +/// updateTime : "2024-07-22 16:13:27" +/// updateUser : "1428617748061093888" +/// tenantCode : "1175" +/// storeId : "1432164681279078400" +/// orderId : "1815299099583315968" +/// actInfo : null +/// productId : "1711580655285960704" +/// times : null +/// usedTimes : null +/// productName : "桂花红豆包" +/// skuId : "1711580655323709440" +/// skuNameStr : "" +/// skuImg : "" +/// buyNum : 2 +/// refundNum : 0 +/// type : 0 +/// reason : null +/// weight : 0.0 +/// applyPrice : "8.00" +/// sellPrice : "8.00" +/// postPay : "0.00" +/// isDelete : 0 +/// discountAmount : "0.00" +/// discountPercent : 100 +/// status : true +/// batch : 1 +/// deliveries : 0 +/// ticketType : "" +/// ticketDays : "0" +/// takeType : null +/// skuTickets : [] +/// ticketStyle : "" +/// setMealDataList : [] +/// packagingFee : "0.00" + +class OrderProductList { + OrderProductList({ + String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String tenantCode, + String storeId, + String orderId, + dynamic actInfo, + String productId, + dynamic times, + dynamic usedTimes, + String productName, + String skuId, + String skuNameStr, + String skuImg, + num buyNum, + num refundNum, + num type, + dynamic reason, + num weight, + String applyPrice, + String sellPrice, + String postPay, + num isDelete, + String discountAmount, + num discountPercent, + bool status, + num batch, + num deliveries, + String ticketType, + String ticketDays, + dynamic takeType, + List skuTickets, + String ticketStyle, + List setMealDataList, + String packagingFee,}){ + _id = id; + _createTime = createTime; + _createUser = createUser; + _updateTime = updateTime; + _updateUser = updateUser; + _tenantCode = tenantCode; + _storeId = storeId; + _orderId = orderId; + _actInfo = actInfo; + _productId = productId; + _times = times; + _usedTimes = usedTimes; + _productName = productName; + _skuId = skuId; + _skuNameStr = skuNameStr; + _skuImg = skuImg; + _buyNum = buyNum; + _refundNum = refundNum; + _type = type; + _reason = reason; + _weight = weight; + _applyPrice = applyPrice; + _sellPrice = sellPrice; + _postPay = postPay; + _isDelete = isDelete; + _discountAmount = discountAmount; + _discountPercent = discountPercent; + _status = status; + _batch = batch; + _deliveries = deliveries; + _ticketType = ticketType; + _ticketDays = ticketDays; + _takeType = takeType; + _skuTickets = skuTickets; + _ticketStyle = ticketStyle; + _setMealDataList = setMealDataList; + _packagingFee = packagingFee; +} + + OrderProductList.fromJson(dynamic json) { + _id = json['id']; + _createTime = json['createTime']; + _createUser = json['createUser']; + _updateTime = json['updateTime']; + _updateUser = json['updateUser']; + _tenantCode = json['tenantCode']; + _storeId = json['storeId']; + _orderId = json['orderId']; + _actInfo = json['actInfo']; + _productId = json['productId']; + _times = json['times']; + _usedTimes = json['usedTimes']; + _productName = json['productName']; + _skuId = json['skuId']; + _skuNameStr = json['skuNameStr']; + _skuImg = json['skuImg']; + _buyNum = json['buyNum']; + _refundNum = json['refundNum']; + _type = json['type']; + _reason = json['reason']; + _weight = json['weight']; + _applyPrice = json['applyPrice']; + _sellPrice = json['sellPrice']; + _postPay = json['postPay']; + _isDelete = json['isDelete']; + _discountAmount = json['discountAmount']; + _discountPercent = json['discountPercent']; + _status = json['status']; + _batch = json['batch']; + _deliveries = json['deliveries']; + _ticketType = json['ticketType']; + _ticketDays = json['ticketDays']; + _takeType = json['takeType']; + if (json['skuTickets'] != null) { + _skuTickets = []; + // json['skuTickets'].forEach((v) { + // _skuTickets.add(Dynamic.fromJson(v)); + // }); + } + _ticketStyle = json['ticketStyle']; + if (json['setMealDataList'] != null) { + _setMealDataList = []; + // json['setMealDataList'].forEach((v) { + // _setMealDataList.add(Dynamic.fromJson(v)); + // }); + } + _packagingFee = json['packagingFee']; + } + String _id; + String _createTime; + String _createUser; + String _updateTime; + String _updateUser; + String _tenantCode; + String _storeId; + String _orderId; + dynamic _actInfo; + String _productId; + dynamic _times; + dynamic _usedTimes; + String _productName; + String _skuId; + String _skuNameStr; + String _skuImg; + num _buyNum; + num _refundNum; + num _type; + dynamic _reason; + num _weight; + String _applyPrice; + String _sellPrice; + String _postPay; + num _isDelete; + String _discountAmount; + num _discountPercent; + bool _status; + num _batch; + num _deliveries; + String _ticketType; + String _ticketDays; + dynamic _takeType; + List _skuTickets; + String _ticketStyle; + List _setMealDataList; + String _packagingFee; +OrderProductList copyWith({ String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String tenantCode, + String storeId, + String orderId, + dynamic actInfo, + String productId, + dynamic times, + dynamic usedTimes, + String productName, + String skuId, + String skuNameStr, + String skuImg, + num buyNum, + num refundNum, + num type, + dynamic reason, + num weight, + String applyPrice, + String sellPrice, + String postPay, + num isDelete, + String discountAmount, + num discountPercent, + bool status, + num batch, + num deliveries, + String ticketType, + String ticketDays, + dynamic takeType, + List skuTickets, + String ticketStyle, + List setMealDataList, + String packagingFee, +}) => OrderProductList( id: id ?? _id, + createTime: createTime ?? _createTime, + createUser: createUser ?? _createUser, + updateTime: updateTime ?? _updateTime, + updateUser: updateUser ?? _updateUser, + tenantCode: tenantCode ?? _tenantCode, + storeId: storeId ?? _storeId, + orderId: orderId ?? _orderId, + actInfo: actInfo ?? _actInfo, + productId: productId ?? _productId, + times: times ?? _times, + usedTimes: usedTimes ?? _usedTimes, + productName: productName ?? _productName, + skuId: skuId ?? _skuId, + skuNameStr: skuNameStr ?? _skuNameStr, + skuImg: skuImg ?? _skuImg, + buyNum: buyNum ?? _buyNum, + refundNum: refundNum ?? _refundNum, + type: type ?? _type, + reason: reason ?? _reason, + weight: weight ?? _weight, + applyPrice: applyPrice ?? _applyPrice, + sellPrice: sellPrice ?? _sellPrice, + postPay: postPay ?? _postPay, + isDelete: isDelete ?? _isDelete, + discountAmount: discountAmount ?? _discountAmount, + discountPercent: discountPercent ?? _discountPercent, + status: status ?? _status, + batch: batch ?? _batch, + deliveries: deliveries ?? _deliveries, + ticketType: ticketType ?? _ticketType, + ticketDays: ticketDays ?? _ticketDays, + takeType: takeType ?? _takeType, + skuTickets: skuTickets ?? _skuTickets, + ticketStyle: ticketStyle ?? _ticketStyle, + setMealDataList: setMealDataList ?? _setMealDataList, + packagingFee: packagingFee ?? _packagingFee, +); + String get id => _id; + String get createTime => _createTime; + String get createUser => _createUser; + String get updateTime => _updateTime; + String get updateUser => _updateUser; + String get tenantCode => _tenantCode; + String get storeId => _storeId; + String get orderId => _orderId; + dynamic get actInfo => _actInfo; + String get productId => _productId; + dynamic get times => _times; + dynamic get usedTimes => _usedTimes; + String get productName => _productName; + String get skuId => _skuId; + String get skuNameStr => _skuNameStr; + String get skuImg => _skuImg; + num get buyNum => _buyNum; + num get refundNum => _refundNum; + num get type => _type; + dynamic get reason => _reason; + num get weight => _weight; + String get applyPrice => _applyPrice; + String get sellPrice => _sellPrice; + String get postPay => _postPay; + num get isDelete => _isDelete; + String get discountAmount => _discountAmount; + num get discountPercent => _discountPercent; + bool get status => _status; + num get batch => _batch; + num get deliveries => _deliveries; + String get ticketType => _ticketType; + String get ticketDays => _ticketDays; + dynamic get takeType => _takeType; + List get skuTickets => _skuTickets; + String get ticketStyle => _ticketStyle; + List get setMealDataList => _setMealDataList; + String get packagingFee => _packagingFee; + + Map toJson() { + final map = {}; + map['id'] = _id; + map['createTime'] = _createTime; + map['createUser'] = _createUser; + map['updateTime'] = _updateTime; + map['updateUser'] = _updateUser; + map['tenantCode'] = _tenantCode; + map['storeId'] = _storeId; + map['orderId'] = _orderId; + map['actInfo'] = _actInfo; + map['productId'] = _productId; + map['times'] = _times; + map['usedTimes'] = _usedTimes; + map['productName'] = _productName; + map['skuId'] = _skuId; + map['skuNameStr'] = _skuNameStr; + map['skuImg'] = _skuImg; + map['buyNum'] = _buyNum; + map['refundNum'] = _refundNum; + map['type'] = _type; + map['reason'] = _reason; + map['weight'] = _weight; + map['applyPrice'] = _applyPrice; + map['sellPrice'] = _sellPrice; + map['postPay'] = _postPay; + map['isDelete'] = _isDelete; + map['discountAmount'] = _discountAmount; + map['discountPercent'] = _discountPercent; + map['status'] = _status; + map['batch'] = _batch; + map['deliveries'] = _deliveries; + map['ticketType'] = _ticketType; + map['ticketDays'] = _ticketDays; + map['takeType'] = _takeType; + if (_skuTickets != null) { + map['skuTickets'] = _skuTickets.map((v) => v.toJson()).toList(); + } + map['ticketStyle'] = _ticketStyle; + if (_setMealDataList != null) { + map['setMealDataList'] = _setMealDataList.map((v) => v.toJson()).toList(); + } + map['packagingFee'] = _packagingFee; + return map; + } + +} \ No newline at end of file diff --git a/lib/retrofit/data/invoices_history_list.dart b/lib/retrofit/data/invoices_history_list.dart new file mode 100644 index 00000000..4158b09e --- /dev/null +++ b/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, + String total, + String size, + String current, + List 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; + String _total; + String _size; + String _current; + List _orders; + bool _hitCount; + bool _searchCount; + String _pages; +InvoicesHistoryList copyWith({ List records, + String total, + String size, + String current, + List 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 get records => _records; + String get total => _total; + String get size => _size; + String get current => _current; + List get orders => _orders; + bool get hitCount => _hitCount; + bool get searchCount => _searchCount; + String get pages => _pages; + + Map toJson() { + final map = {}; + 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 toJson() { + final map = {}; + 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 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() : []; + _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 _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 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 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 toJson() { + final map = {}; + 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; + } + +} \ No newline at end of file diff --git a/lib/retrofit/data/title_info_list.dart b/lib/retrofit/data/title_info_list.dart new file mode 100644 index 00000000..5c6fcb7c --- /dev/null +++ b/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, + String total, + String size, + String current, + List 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; + String _total; + String _size; + String _current; + List _orders; + bool _hitCount; + bool _searchCount; + String _pages; +TitleInfoList copyWith({ List records, + String total, + String size, + String current, + List 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 get records => _records; + String get total => _total; + String get size => _size; + String get current => _current; + List get orders => _orders; + bool get hitCount => _hitCount; + bool get searchCount => _searchCount; + String get pages => _pages; + + Map toJson() { + final map = {}; + 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 toJson() { + final map = {}; + 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 toJson() { + final map = {}; + 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; + } + +} \ No newline at end of file diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 4ca5a825..6c6f2a94 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/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,8 @@ 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_history_list.dart'; import 'data/ip_data.dart'; import 'data/logistics.dart'; import 'data/member_Infor.dart'; @@ -54,6 +55,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 +613,32 @@ abstract class ApiService { ///获取APP门店推广渠道 @GET("/ipJson.jsp") Future getIpInfo(); + + ///查询订单状态完成的并且可以开发票的订单列表 + @POST("order/invoiceOrderList") + Future> invoiceOrderList(@Body() Map param); + + ///新增发票抬头 + @POST("invoiceHeader") + Future invoiceHeader(@Body() Map param); + + ///修改发票抬头 + @PUT("invoiceHeader") + Future invoiceHeaders(@Body() Map param); + + ///抬头信息列表 + @POST("invoiceHeader/page") + Future> invoiceHeaderList(@Body() Map param); + + ///删除抬头信息 + @DELETE("invoiceHeader?ids[]={ids}") + Future delInvoiceHeader(@Path("ids") String ids); + + ///提交发票审核 + @POST("invoice") + Future invoiceSubmit(@Body() Map param); + + ///开票历史 + @POST("invoice/page") + Future> invoicePage(@Body() Map param); } diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 65f62dad..37ffa091 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -2302,4 +2302,164 @@ class _ApiService implements ApiService { .toList()); return value; } + + @override + Future> invoiceOrderList(param) async { + ArgumentError.checkNotNull(param, 'param'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + _data.addAll(param ?? {}); + final _result = await _dio.request>( + 'order/invoiceOrderList', + queryParameters: queryParameters, + options: RequestOptions( + method: 'POST', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => (json ?? "") == "" ? null : InvoiceList.fromJson(json), + ); + return value; + } + + @override + Future invoiceHeader(param) async { + ArgumentError.checkNotNull(param, 'param'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + _data.addAll(param ?? {}); + final _result = await _dio.request>( + 'invoiceHeader', + queryParameters: queryParameters, + options: RequestOptions( + method: 'POST', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => (json ?? "") == "" ? null : json, + ); + return value; + } + + @override + Future invoiceHeaders(param) async { + ArgumentError.checkNotNull(param, 'param'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + _data.addAll(param ?? {}); + final _result = await _dio.request>( + 'invoiceHeader', + queryParameters: queryParameters, + options: RequestOptions( + method: 'PUT', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => (json ?? "") == "" ? null : json, + ); + return value; + } + + @override + Future> invoiceHeaderList(param) async { + ArgumentError.checkNotNull(param, 'param'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + _data.addAll(param ?? {}); + final _result = await _dio.request>( + 'invoiceHeader/page', + queryParameters: queryParameters, + options: RequestOptions( + method: 'POST', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => (json ?? "") == "" ? null : TitleInfoList.fromJson(json), + ); + return value; + } + + @override + Future> delInvoiceHeader(ids) async { + ArgumentError.checkNotNull(ids, 'ids'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + final _result = await _dio.request>( + 'invoiceHeader?ids[]=$ids', + queryParameters: queryParameters, + options: RequestOptions( + method: 'DELETE', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => json as dynamic, + ); + return value; + } + + @override + Future invoiceSubmit(param) async { + ArgumentError.checkNotNull(param, 'param'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + _data.addAll(param ?? {}); + final _result = await _dio.request>( + 'invoice', + queryParameters: queryParameters, + options: RequestOptions( + method: 'POST', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => (json ?? "") == "" ? null : json, + ); + return value; + } + + @override + Future> invoicePage(param) async { + ArgumentError.checkNotNull(param, 'param'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + _data.addAll(param ?? {}); + final _result = await _dio.request>( + 'invoice/page', + queryParameters: queryParameters, + options: RequestOptions( + method: 'POST', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => (json ?? "") == "" ? null : InvoicesHistoryList.fromJson(json), + ); + return value; + } } diff --git a/lib/utils/status_utils.dart b/lib/utils/status_utils.dart index 78f9450f..42619f0e 100644 --- a/lib/utils/status_utils.dart +++ b/lib/utils/status_utils.dart @@ -89,6 +89,7 @@ class StatusUtils { static List 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, + // ), + // ), + // ), + // ), ]; } } From 6e6f02b3cfc5889f10c2514a632de98c459c8bab Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Fri, 26 Jul 2024 13:41:05 +0800 Subject: [PATCH 03/23] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=BD=AE=E6=92=AD?= =?UTF-8?q?=E9=97=B4=E9=9A=94=E9=80=9F=E5=BA=A6=E8=B0=83=E6=95=B4=EF=BC=9B?= =?UTF-8?q?=20=E9=97=A8=E5=BA=97=E5=88=97=E8=A1=A80=E5=85=83=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=A4=84=E7=90=86=EF=BC=9B=20=E5=BA=97=E9=93=BA?= =?UTF-8?q?=E4=BF=A1=E6=81=AF0=E5=85=83=E6=98=BE=E7=A4=BA=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=9B=20=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E8=BD=AE=E6=92=AD=E5=A4=84=E7=90=86=E9=97=B4=E9=9A=94=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/home/home_page.dart | 4 ++-- lib/mine/mine_page.dart | 2 +- lib/store/store_view/store_info.dart | 17 ++++++++--------- lib/union/union_list.dart | 19 +++++++++---------- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/lib/home/home_page.dart b/lib/home/home_page.dart index 9498e6b6..ef10a954 100644 --- a/lib/home/home_page.dart +++ b/lib/home/home_page.dart @@ -582,7 +582,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ), autoplay: true, duration: 1000, - autoplayDelay: 100000, + autoplayDelay: 17000, physics: BouncingScrollPhysics(), itemBuilder: (context, position) { return InkWell( @@ -675,7 +675,7 @@ class HomePageState extends State with AutomaticKeepAliveClientMixin { ), autoplay: true, duration: 1000, - autoplayDelay: 2000, + autoplayDelay: 10000, itemBuilder: (context, position) { return InkWell( onTap: () { diff --git a/lib/mine/mine_page.dart b/lib/mine/mine_page.dart index 4c0e444b..73c7e73b 100644 --- a/lib/mine/mine_page.dart +++ b/lib/mine/mine_page.dart @@ -467,7 +467,7 @@ class MinePageState extends State with AutomaticKeepAliveClientMixin { ), autoplay: true, duration: 1000, - autoplayDelay: 2000, + autoplayDelay: 10000, itemBuilder: (context, position) { return InkWell( onTap: () { diff --git a/lib/store/store_view/store_info.dart b/lib/store/store_view/store_info.dart index 571ca431..8f279764 100644 --- a/lib/store/store_view/store_info.dart +++ b/lib/store/store_view/store_info.dart @@ -112,22 +112,21 @@ class _StoreInfoView extends State { ), Row( children: [ - Text( + if( widget.storeInfo.perCapitaConsumption != null && ( widget.storeInfo?.perCapitaConsumption ?? "0") != "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 : "")), diff --git a/lib/union/union_list.dart b/lib/union/union_list.dart index 06987789..5feec663 100644 --- a/lib/union/union_list.dart +++ b/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 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", From 9d07548afb1b872b65e3f47f673cb46faa1c15bd Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 30 Jul 2024 12:17:14 +0800 Subject: [PATCH 04/23] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E6=8A=AC=E5=A4=B4?= =?UTF-8?q?=EF=BC=8C=E5=8F=91=E7=A5=A8=E7=AE=A1=E7=90=86=EF=BC=8C=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=8F=91=E7=A5=A8=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E6=8C=89=E9=92=AEios=E7=AB=AFui=E9=80=82?= =?UTF-8?q?=E9=85=8D=EF=BC=9B=20=E9=97=A8=E5=BA=97=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=95=B0=E6=8D=AEbug=E5=A4=84=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/order/invoices_manage/add_invoices_title.dart | 10 ++++++++-- lib/order/invoices_manage/edit_invoices_info.dart | 8 +++++++- lib/order/invoices_manage/invoices_title_info.dart | 8 +++++++- lib/store/store_view/store_info.dart | 2 +- 4 files changed, 23 insertions(+), 5 deletions(-) diff --git a/lib/order/invoices_manage/add_invoices_title.dart b/lib/order/invoices_manage/add_invoices_title.dart index 1bd65a6f..fc53ee36 100644 --- a/lib/order/invoices_manage/add_invoices_title.dart +++ b/lib/order/invoices_manage/add_invoices_title.dart @@ -548,9 +548,15 @@ class _AddInvoicesTitle extends State { } }, child: Container( - padding: EdgeInsets.symmetric(vertical: 20.h), - color: Color(0xff32A060), + 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, diff --git a/lib/order/invoices_manage/edit_invoices_info.dart b/lib/order/invoices_manage/edit_invoices_info.dart index 1cb53bed..ec4f8392 100644 --- a/lib/order/invoices_manage/edit_invoices_info.dart +++ b/lib/order/invoices_manage/edit_invoices_info.dart @@ -398,8 +398,14 @@ class _EditInvoicesInfo extends State { } }, child: Container( - padding: EdgeInsets.symmetric(vertical: 20.h), + 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( diff --git a/lib/order/invoices_manage/invoices_title_info.dart b/lib/order/invoices_manage/invoices_title_info.dart index b8cc4c79..a4c8fec7 100644 --- a/lib/order/invoices_manage/invoices_title_info.dart +++ b/lib/order/invoices_manage/invoices_title_info.dart @@ -239,8 +239,14 @@ class _InvoicesTitleInfo extends State { }); }, child: Container( - padding: EdgeInsets.symmetric(vertical: 20.h), + 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( diff --git a/lib/store/store_view/store_info.dart b/lib/store/store_view/store_info.dart index 8f279764..7f08fea6 100644 --- a/lib/store/store_view/store_info.dart +++ b/lib/store/store_view/store_info.dart @@ -112,7 +112,7 @@ class _StoreInfoView extends State { ), Row( children: [ - if( widget.storeInfo.perCapitaConsumption != null && ( widget.storeInfo?.perCapitaConsumption ?? "0") != "0") + if(( widget.storeInfo?.perCapitaConsumption ?? "") != "0") Padding(padding:EdgeInsets.only(right: 20.w), child: Text( S.of(context).ren( From d0e0fdd1454a51f2f6b33212385b9b9e1cfb17e4 Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 30 Jul 2024 14:35:53 +0800 Subject: [PATCH 05/23] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E6=8A=AC=E5=A4=B4?= =?UTF-8?q?=EF=BC=8C=E5=8F=91=E7=A5=A8=E7=AE=A1=E7=90=86=EF=BC=8C=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E5=8F=91=E7=A5=A8=E4=BF=A1=E6=81=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E7=BD=91=E7=BB=9C=E5=BC=82=E5=B8=B8ui=E5=A4=84=E7=90=86?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/order/invoices_manage/invoices_history.dart | 4 ++-- lib/order/invoices_manage/invoices_manage_page.dart | 2 +- lib/order/invoices_manage/invoices_title_info.dart | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/order/invoices_manage/invoices_history.dart b/lib/order/invoices_manage/invoices_history.dart index 54dac85e..e4a16cff 100644 --- a/lib/order/invoices_manage/invoices_history.dart +++ b/lib/order/invoices_manage/invoices_history.dart @@ -406,7 +406,7 @@ class _InvoicesHistory extends State { Widget noNetwork() { return Container( - margin: EdgeInsets.only(top: 120.h), + width: double.infinity, child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -435,7 +435,7 @@ class _InvoicesHistory extends State { }, child: Container( decoration: BoxDecoration( - color: Color(0xFF30415B), + color: Color(0xff32A060), borderRadius: BorderRadius.circular(15), ), padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), diff --git a/lib/order/invoices_manage/invoices_manage_page.dart b/lib/order/invoices_manage/invoices_manage_page.dart index 1a5b45a0..e5b570a4 100644 --- a/lib/order/invoices_manage/invoices_manage_page.dart +++ b/lib/order/invoices_manage/invoices_manage_page.dart @@ -658,7 +658,7 @@ class _InvoicesManagePage extends State { }, child: Container( decoration: BoxDecoration( - color: Color(0xFF30415B), + color: Color(0xff32A060), borderRadius: BorderRadius.circular(15), ), padding: EdgeInsets.symmetric(horizontal: 12, vertical: 3), diff --git a/lib/order/invoices_manage/invoices_title_info.dart b/lib/order/invoices_manage/invoices_title_info.dart index a4c8fec7..13188916 100644 --- a/lib/order/invoices_manage/invoices_title_info.dart +++ b/lib/order/invoices_manage/invoices_title_info.dart @@ -456,7 +456,6 @@ class _InvoicesTitleInfo extends State { Widget noNetwork() { return Container( width: double.infinity, - margin: EdgeInsets.only(top: 120.h), child: Column( mainAxisAlignment: MainAxisAlignment.center, children: [ @@ -485,7 +484,7 @@ class _InvoicesTitleInfo extends State { }, child: Container( decoration: BoxDecoration( - color: Color(0xFF30415B), + color: Color(0xff32A060), borderRadius: BorderRadius.circular(15), ), padding: EdgeInsets.symmetric(horizontal: 12.w, vertical: 3.h), From 0002200cf8705eb8cf81bfaa084da0373ba9dc3c Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Tue, 30 Jul 2024 17:45:08 +0800 Subject: [PATCH 06/23] =?UTF-8?q?=E5=90=8E=E5=8F=B0=E6=9A=82=E6=97=A0?= =?UTF-8?q?=E4=BC=9A=E5=91=98=E4=BB=B7=E8=AE=BE=E7=BD=AE=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=EF=BC=8C=E6=95=85=E6=9A=82=E6=97=B6=E9=9A=90=E8=97=8F=E9=80=89?= =?UTF-8?q?=E8=A7=84=E6=A0=BC=E7=9A=84=E4=BC=9A=E5=91=98=E4=BB=B7=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=EF=BC=9B=20=E6=96=87=E6=9C=AC=E6=9B=B4=E6=94=B9HISAPP?= =?UTF-8?q?=E6=94=B9=E6=88=90=E6=B5=B7=E5=B3=A1=E5=A7=90=E5=A6=B9App?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/generated/intl/messages_en.dart | 6 +-- lib/generated/intl/messages_en_US.dart | 6 +-- lib/generated/intl/messages_zh_CN.dart | 6 +-- lib/generated/intl/messages_zh_Hans_CN.dart | 6 +-- lib/generated/intl/messages_zh_Hant_CN.dart | 6 +-- lib/generated/intl/messages_zh_TW.dart | 6 +-- lib/generated/l10n.dart | 6 +-- lib/l10n/intl_en.arb | 6 +-- lib/l10n/intl_en_US.arb | 6 +-- lib/l10n/intl_zh_CN.arb | 6 +-- lib/store/store_view/product_sku.dart | 41 +++++++++++---------- 11 files changed, 51 insertions(+), 50 deletions(-) diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index 6b620565..6e0ae61a 100644 --- a/lib/generated/intl/messages_en.dart +++ b/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("线上发放"), diff --git a/lib/generated/intl/messages_en_US.dart b/lib/generated/intl/messages_en_US.dart index e7d5ae74..ede16764 100644 --- a/lib/generated/intl/messages_en_US.dart +++ b/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"), diff --git a/lib/generated/intl/messages_zh_CN.dart b/lib/generated/intl/messages_zh_CN.dart index 97b44075..71a00094 100644 --- a/lib/generated/intl/messages_zh_CN.dart +++ b/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("线上发放"), diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index 1abdf430..208dc7c2 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/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("线上发放"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 86a7ce35..7f77e96b 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/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("綫上發放"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index ac60cbb1..7aa43e49 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/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("綫上發放"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index ae88529d..37883de5 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -1158,7 +1158,7 @@ class S { /// `为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息` String get weizhitishixinxi { return Intl.message( - '为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息', + '为了向您推荐附近的门店信息,推荐您在使用海峡姐妹App时让我们使用位置信息', name: 'weizhitishixinxi', desc: '', args: [], @@ -1168,7 +1168,7 @@ class S { /// `为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收` String get tongzhitishixinxi { return Intl.message( - '为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收', + '为了您可以及时收到我们的活动信息,推荐您在使用海峡姐妹App时打开通知的接收', name: 'tongzhitishixinxi', desc: '', args: [], @@ -1178,7 +1178,7 @@ class S { /// `为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能` String get xiangjitishixinxi { return Intl.message( - '为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能', + '为了您可以在使用过程中进行分享,希望您使用海峡姐妹App时让我们使用相机功能', name: 'xiangjitishixinxi', desc: '', args: [], diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index d361c1c7..a036283c 100644 --- a/lib/l10n/intl_en.arb +++ b/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": "我的积分值", diff --git a/lib/l10n/intl_en_US.arb b/lib/l10n/intl_en_US.arb index 897d36c7..72863f31 100644 --- a/lib/l10n/intl_en_US.arb +++ b/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", diff --git a/lib/l10n/intl_zh_CN.arb b/lib/l10n/intl_zh_CN.arb index f6c26e77..7ece8438 100644 --- a/lib/l10n/intl_zh_CN.arb +++ b/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": "我的积分值", diff --git a/lib/store/store_view/product_sku.dart b/lib/store/store_view/product_sku.dart index 08902b3e..93535f3b 100644 --- a/lib/store/store_view/product_sku.dart +++ b/lib/store/store_view/product_sku.dart @@ -154,26 +154,27 @@ class _ProductSku extends State { ), ), ), - 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( From d008f6d4fc70de64d3bac965968acf21f68fbe98 Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 30 Jul 2024 17:50:39 +0800 Subject: [PATCH 07/23] ios --- ios/Runner.xcodeproj/project.pbxproj | 6 +++--- lib/generated/intl/messages_zh_Hans_CN.dart | 6 +++--- lib/generated/intl/messages_zh_Hant_CN.dart | 6 +++--- lib/generated/intl/messages_zh_TW.dart | 6 +++--- lib/generated/l10n.dart | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 417e53a4..95164ef9 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/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 = 3; 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 = 3; 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 = 3; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index 208dc7c2..1abdf430 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/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("为了您可以及时收到我们的活动信息,推荐您在使用海峡姐妹App时打开通知的接收"), + "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收"), "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("为了向您推荐附近的门店信息,推荐您在使用海峡姐妹App时让我们使用位置信息"), + "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息"), "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("为了您可以在使用过程中进行分享,希望您使用海峡姐妹App时让我们使用相机功能"), + "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能"), "xiangqing" : MessageLookupByLibrary.simpleMessage("详情"), "xiangxidizhi" : MessageLookupByLibrary.simpleMessage("详细地址"), "xianshangfafang" : MessageLookupByLibrary.simpleMessage("线上发放"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 7f77e96b..86a7ce35 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/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("為了您可以及時收到我們的活動資訊,推薦您在使用海峡姐妹App時打開通知的接收 "), + "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "), "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("為了向您推薦附近的門店資訊,推薦您在使用海峡姐妹App時讓我們使用位置資訊"), + "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊"), "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("為了您可以在使用過程中進行分享,希望您使用海峡姐妹App時讓我們使用相機功能 "), + "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以在使用過程中進行分享,希望您使用HISAPP時讓我們使用相機功能 "), "xiangqing" : MessageLookupByLibrary.simpleMessage("詳情"), "xiangxidizhi" : MessageLookupByLibrary.simpleMessage("詳細地址"), "xianshangfafang" : MessageLookupByLibrary.simpleMessage("綫上發放"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index 7aa43e49..ac60cbb1 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/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("為了您可以及時收到我們的活動資訊,推薦您在使用海峡姐妹App時打開通知的接收 "), + "tongzhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以及時收到我們的活動資訊,推薦您在使用HISAPP時打開通知的接收 "), "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("為了向您推薦附近的門店資訊,推薦您在使用海峡姐妹App時讓我們使用位置資訊"), + "weizhitishixinxi" : MessageLookupByLibrary.simpleMessage("為了向您推薦附近的門店資訊,推薦您在使用HISAPP時讓我們使用位置資訊"), "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("為了您可以在使用過程中進行分享,希望您使用海峡姐妹App時讓我們使用相機功能 "), + "xiangjitishixinxi" : MessageLookupByLibrary.simpleMessage("為了您可以在使用過程中進行分享,希望您使用HISAPP時讓我們使用相機功能 "), "xiangqing" : MessageLookupByLibrary.simpleMessage("詳情"), "xiangxidizhi" : MessageLookupByLibrary.simpleMessage("詳細地址"), "xianshangfafang" : MessageLookupByLibrary.simpleMessage("綫上發放"), diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 37883de5..ee13d043 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -1155,7 +1155,7 @@ class S { ); } - /// `为了向您推荐附近的门店信息,推荐您在使用HISAPP时让我们使用位置信息` + /// `为了向您推荐附近的门店信息,推荐您在使用海峡姐妹App时让我们使用位置信息` String get weizhitishixinxi { return Intl.message( '为了向您推荐附近的门店信息,推荐您在使用海峡姐妹App时让我们使用位置信息', @@ -1165,7 +1165,7 @@ class S { ); } - /// `为了您可以及时收到我们的活动信息,推荐您在使用HISAPP时打开通知的接收` + /// `为了您可以及时收到我们的活动信息,推荐您在使用海峡姐妹App时打开通知的接收` String get tongzhitishixinxi { return Intl.message( '为了您可以及时收到我们的活动信息,推荐您在使用海峡姐妹App时打开通知的接收', @@ -1175,7 +1175,7 @@ class S { ); } - /// `为了您可以在使用过程中进行分享,希望您使用HISAPP时让我们使用相机功能` + /// `为了您可以在使用过程中进行分享,希望您使用海峡姐妹App时让我们使用相机功能` String get xiangjitishixinxi { return Intl.message( '为了您可以在使用过程中进行分享,希望您使用海峡姐妹App时让我们使用相机功能', From 424d7ca8d579c21ef04e2d546138a5758cb6c21f Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 30 Jul 2024 17:53:06 +0800 Subject: [PATCH 08/23] =?UTF-8?q?ios=E6=96=87=E6=9C=AC=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/l10n/intl_zh_Hans_CN.arb | 6 +++--- lib/l10n/intl_zh_Hant_CN.arb | 6 +++--- lib/l10n/intl_zh_TW.arb | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/l10n/intl_zh_Hans_CN.arb b/lib/l10n/intl_zh_Hans_CN.arb index 88bcc450..2dedbe14 100644 --- a/lib/l10n/intl_zh_Hans_CN.arb +++ b/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": "我的积分值", diff --git a/lib/l10n/intl_zh_Hant_CN.arb b/lib/l10n/intl_zh_Hant_CN.arb index 2f016e55..3e0a39b7 100644 --- a/lib/l10n/intl_zh_Hant_CN.arb +++ b/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": "我的積分值", diff --git a/lib/l10n/intl_zh_TW.arb b/lib/l10n/intl_zh_TW.arb index c7f0ca10..882becb1 100644 --- a/lib/l10n/intl_zh_TW.arb +++ b/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": "我的積分值", From ffd8eafcac5d1a05254a2ae9ec219d344b17b1ba Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 30 Jul 2024 17:53:28 +0800 Subject: [PATCH 09/23] =?UTF-8?q?ios=E6=96=87=E6=9C=AC=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/generated/intl/messages_zh_Hans_CN.dart | 6 +++--- lib/generated/intl/messages_zh_Hant_CN.dart | 6 +++--- lib/generated/intl/messages_zh_TW.dart | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/generated/intl/messages_zh_Hans_CN.dart b/lib/generated/intl/messages_zh_Hans_CN.dart index 1abdf430..208dc7c2 100644 --- a/lib/generated/intl/messages_zh_Hans_CN.dart +++ b/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("线上发放"), diff --git a/lib/generated/intl/messages_zh_Hant_CN.dart b/lib/generated/intl/messages_zh_Hant_CN.dart index 86a7ce35..7f77e96b 100644 --- a/lib/generated/intl/messages_zh_Hant_CN.dart +++ b/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("綫上發放"), diff --git a/lib/generated/intl/messages_zh_TW.dart b/lib/generated/intl/messages_zh_TW.dart index ac60cbb1..7aa43e49 100644 --- a/lib/generated/intl/messages_zh_TW.dart +++ b/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("綫上發放"), From aed1de8a8290e7136f8ce5f9992306ad7a842a00 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Sat, 3 Aug 2024 10:23:56 +0800 Subject: [PATCH 10/23] =?UTF-8?q?=E5=8A=A9=E5=86=9C=E5=95=86=E5=93=81?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2bug=E6=9B=B4=E6=94=B9=EF=BC=9B=20=E5=AE=9A?= =?UTF-8?q?=E4=BD=8D=E5=BC=82=E5=B8=B8bug=E8=B0=83=E8=AF=95=EF=BC=9B=20per?= =?UTF-8?q?mission=5Fhandler=E4=BE=9D=E8=B5=96=E5=8D=87=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/address/address_map_page.dart | 2 +- lib/home/help_farmers/help_farmers_page.dart | 197 ++++++++++++++++++- lib/retrofit/retrofit_api.g.dart | 4 +- lib/setting/permission_setting_page.dart | 2 +- lib/union/union_page.dart | 7 + lib/utils/location.dart | 2 + lib/utils/send_location_dialog.dart | 119 +++++++++++ pubspec.lock | 128 ++++++++---- pubspec.yaml | 4 +- 9 files changed, 415 insertions(+), 50 deletions(-) create mode 100644 lib/utils/send_location_dialog.dart diff --git a/lib/address/address_map_page.dart b/lib/address/address_map_page.dart index e8d1d6d1..dca398f2 100644 --- a/lib/address/address_map_page.dart +++ b/lib/address/address_map_page.dart @@ -104,7 +104,7 @@ class _AddressMapPage extends State { Future.delayed(Duration(seconds: 6), () { EasyLoading.dismiss(); }); - } else if (await PH.Permission.location.isUndetermined) { + } else if (await PH.Permission.location.isDenied) { await PH.Permission.location.request(); } else { if (Platform.isIOS) { diff --git a/lib/home/help_farmers/help_farmers_page.dart b/lib/home/help_farmers/help_farmers_page.dart index acafdd31..f2be0a3d 100644 --- a/lib/home/help_farmers/help_farmers_page.dart +++ b/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 { final RefreshController refreshController = RefreshController(); List farmersList = []; int tabIndex = 0; + int networkStatus = 0; + String dataErrorText = ""; @override void initState() { @@ -42,7 +45,7 @@ class _HelpFarmersPage extends State { Dio(), context: context, token: value.getString('token'), - // showLoading: true + showLoading: true ), queryConfig(), }); @@ -63,14 +66,18 @@ class _HelpFarmersPage extends State { 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 { 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 { 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 { ]; }, body: recommend(), - ), + )), ); } @@ -302,4 +319,174 @@ class _HelpFarmersPage extends State { ), ); } + + 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, + ), + ), + ], + ), + ), + ], + ), + ); + }, + )), + ], + ), + ); + } } diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 37ffa091..73e9cdfb 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -2228,7 +2228,9 @@ class _ApiService implements ApiService { data: _data); final value = BaseData>.fromJson( _result.data, - (json) => (json as List) + (json) => (json ?? "") == "" + ? null + :(json as List) .map( (i) => FarmersList.fromJson(i as Map)) .toList()); diff --git a/lib/setting/permission_setting_page.dart b/lib/setting/permission_setting_page.dart index b0cbf557..a4ea4ff5 100644 --- a/lib/setting/permission_setting_page.dart +++ b/lib/setting/permission_setting_page.dart @@ -117,7 +117,7 @@ class _PermissionSettingPage extends State { } if (await permission.isPermanentlyDenied) { requestDialog(position); - } else if (await permission.isUndetermined) { + } else if (await permission.isDenied) { await permission.request(); queryPermission(); } else { diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index 3772695a..ee2adb2e 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -22,6 +22,7 @@ import 'package:flutter/rendering.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:visibility_detector/visibility_detector.dart'; +import '../utils/send_location_dialog.dart'; import '../view_widget/location_tips.dart'; import '../view_widget/no_data_view.dart'; @@ -115,6 +116,12 @@ class UnionPageState extends State } getLocation({bool showLoading = true}) async { + // await showDialog( + // context: context, + // useRootNavigator: false, + // builder: (c) => SendLocationDialog(), + // ); + // return; if(showLoading) EasyLoading.show( status: S.current.zhengzaijiazai, diff --git a/lib/utils/location.dart b/lib/utils/location.dart index feda0fec..b1bba7b1 100644 --- a/lib/utils/location.dart +++ b/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'; diff --git a/lib/utils/send_location_dialog.dart b/lib/utils/send_location_dialog.dart new file mode 100644 index 00000000..0b5eaba4 --- /dev/null +++ b/lib/utils/send_location_dialog.dart @@ -0,0 +1,119 @@ +import 'dart:async'; + +import 'package:flutter/cupertino.dart'; +import 'package:flutter/material.dart'; + +import 'package:geolocator/geolocator.dart'; + +class SendLocationDialog extends StatefulWidget { + + const SendLocationDialog({ + Key key, + }) : super(key: key); + + @override + SendLocationDialogState createState() => SendLocationDialogState(); +} + +class SendLocationDialogState extends State { + bool disabled = false; + bool denied = false; + bool isSending = false; + Position position; + Object error; + + @override + void initState() { + super.initState(); + requestLocation(); + } + + Future requestLocation() async { + if (!(await Geolocator.isLocationServiceEnabled())) { + setState(() => disabled = true); + return; + } + var permission = await Geolocator.checkPermission(); + if (permission == LocationPermission.denied) { + permission = await Geolocator.requestPermission(); + if (permission == LocationPermission.denied) { + setState(() => denied = true); + return; + } + } + if (permission == LocationPermission.deniedForever) { + setState(() => denied = true); + return; + } + try { + Position position; + try { + position = await Geolocator.getCurrentPosition( + desiredAccuracy: LocationAccuracy.best, + timeLimit: const Duration(seconds: 30), + ); + } on TimeoutException { + position = await Geolocator.getCurrentPosition( + desiredAccuracy: LocationAccuracy.medium, + timeLimit: const Duration(seconds: 30), + ); + } + setState(() => this.position = position); + } catch (e) { + setState(() => error = e); + } + } + + void sendAction() async { + setState(() => isSending = true); + final body = + 'https://www.openstreetmap.org/?mlat=${position.latitude}&mlon=${position.longitude}#map=16/${position.latitude}/${position.longitude}'; + final uri = + 'geo:${position.latitude},${position.longitude};u=${position.accuracy}'; + Navigator.of(context, rootNavigator: false).pop(); + } + + @override + Widget build(BuildContext context) { + Widget contentWidget; + if (position != null) { + // contentWidget = MapBubble( + // latitude: position.latitude, + // longitude: position.longitude, + // ); + contentWidget = Text("MapBubble"); + } else if (disabled) { + contentWidget = Text("locationDisabledNotice"); + } else if (denied) { + contentWidget = Text("locationPermissionDeniedNotice"); + } else if (error != null) { + contentWidget = + Text(error.toString()); + } else { + contentWidget = Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const CupertinoActivityIndicator(), + const SizedBox(width: 12), + Text("obtainingLocation"), + ], + ); + } + return AlertDialog( + title: Text("shareLocation"), + content: contentWidget, + actions: [ + TextButton( + onPressed: Navigator.of(context, rootNavigator: false).pop, + child: Text("cancel"), + ), + if (position != null) + TextButton( + onPressed: isSending ? null : sendAction, + child: Text("send"), + ), + ], + ); + } +} diff --git a/pubspec.lock b/pubspec.lock index 60fcba17..6179415f 100644 --- a/pubspec.lock +++ b/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: @@ -401,18 +401,50 @@ packages: dependency: "direct main" description: name: geolocator - sha256: "3018f6a37b1ec3c9dfb1adaa1ce406c0522c293a1a623ead94c32cd93a255fd3" + sha256: "5c23f3613f50586c0bbb2b8f970240ae66b3bd992088cf60dd5ee2e6f7dde3a8" + url: "https://pub.flutter-io.cn" + source: hosted + version: "9.0.2" + geolocator_android: + dependency: transitive + description: + name: geolocator_android + sha256: "06e37fa32392f69f133e166ef6b358a8b6afddbf4c418fc236988184cc115a49" + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.4.1" + geolocator_apple: + dependency: transitive + description: + name: geolocator_apple + sha256: bc2aca02423ad429cb0556121f56e60360a2b7d694c8570301d06ea0c00732fd url: "https://pub.flutter-io.cn" source: hosted - version: "6.1.12" + version: "2.3.7" geolocator_platform_interface: dependency: transitive description: name: geolocator_platform_interface - sha256: aa11c4cb9eb31f096ffc62cf54858f869bd437de327cba660577ddd594a8f3fa + sha256: b8cc1d3be0ca039a3f2174b0b026feab8af3610e220b8532e42cff8ec6658535 + url: "https://pub.flutter-io.cn" + source: hosted + version: "4.1.0" + 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" url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.9" + version: "0.1.3" gradient_widgets: dependency: "direct main" description: @@ -553,10 +585,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: @@ -665,18 +697,18 @@ packages: dependency: "direct main" description: name: permission_handler - sha256: fb4666087528b1cbf91d98771cf50b14f36f4d8756ec7e7a8629dd3cb55442b7 + sha256: "7c008a350caabef1b372b5a2f5559dc178fc6f0745c4f6f5a0fd103b11d740d2" url: "https://pub.flutter-io.cn" source: hosted - version: "5.1.0+2" + version: "6.0.0" permission_handler_platform_interface: dependency: transitive description: name: permission_handler_platform_interface - sha256: f7e3c798f7c4dd215e4ca8843695b3a63a5b79c9aa04f296d316f13a15d518ba + sha256: "6760eb5ef34589224771010805bea6054ad28453906936f843a8cc4d3a55c4a4" url: "https://pub.flutter-io.cn" source: hosted - version: "2.0.2" + version: "3.12.0" petitparser: dependency: transitive description: @@ -697,10 +729,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: @@ -709,14 +741,22 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.1.0" + platform_detect: + dependency: transitive + description: + name: platform_detect + sha256: aab1dd0e19af823c0bbfc2d0f364e33abc52bd13be27711fea98bade0fe35213 + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.4.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: c3ebbff365bfb1b5f7b690c9857d2dabea167f35b05eb7586186499b407efb37 + sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.3" + version: "2.1.6" pointycastle: dependency: transitive description: @@ -741,6 +781,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "6.0.5" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "3c51ec0aaeccb85cacfe824816c60e1e3c53da586c64e1166422a906a4f7251c" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.4.4" pull_to_refresh: dependency: "direct main" description: @@ -898,6 +946,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.9.1" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.flutter-io.cn" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: @@ -1015,26 +1071,18 @@ 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: name: url_launcher - sha256: e1e0c46fcd777c0f0bd7f4541b747c28ad4e925f93344cebf667ef76c695533a - url: "https://pub.flutter-io.cn" - source: hosted - version: "5.7.10" - url_launcher_linux: - dependency: transitive - description: - name: url_launcher_linux - sha256: c489023cdd864a19c0be63bb3796bec21ea4bc16bfe09568953f1828e02151c9 + sha256: "0a1f90f605bbfa9832b3514cea3a74693c6e569b8a1999fabeba12d8216a85c9" url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.1+4" + version: "5.4.0" url_launcher_macos: dependency: transitive description: @@ -1047,26 +1095,26 @@ packages: dependency: transitive description: name: url_launcher_platform_interface - sha256: c6bd00f46e8c348703d0ae691850eb2052be8e1338dc3ae6f72af53b962da157 + sha256: "9b5396f49780ac4f3e6563ab0936d8218182b0f1498318b5a7d1528e0293704f" url: "https://pub.flutter-io.cn" source: hosted - version: "1.0.9" + version: "1.0.1" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: eaa6de8ac353681794533edcedd69dd8b39ed987bf2360d172185eff8283dbc2 + sha256: b7478fa6476d0971fd41508bea0b4a25c59ccd263daea09f22f8ca4114559043 url: "https://pub.flutter-io.cn" source: hosted - version: "0.1.5+3" - url_launcher_windows: + version: "0.1.3" + uuid: dependency: transitive description: - name: url_launcher_windows - sha256: "034479b1dafd8f01de81267d8117eb5ae019e0dddcc23f4b14ed31253a2635d9" + name: uuid + sha256: b715b8d3858b6fa9f68f87d20d98830283628014750c2b09b6f516c1da4af2a7 url: "https://pub.flutter-io.cn" source: hosted - version: "0.0.1+3" + version: "4.1.0" vector_math: dependency: transitive description: @@ -1204,5 +1252,5 @@ packages: source: hosted version: "5.4.1" sdks: - dart: ">=2.18.0 <3.0.0" - flutter: ">=3.0.0" + dart: ">=2.19.0 <3.0.0" + flutter: ">=3.7.0" diff --git a/pubspec.yaml b/pubspec.yaml index 8accc489..f95c703d 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,9 +39,9 @@ dependencies: number_precision: ^2.0.2+1 - permission_handler: ^5.0.1+1 + permission_handler: 6.0.0 - geolocator: ^6.1.12 + geolocator: ^9.0.0 # location: ^3.2.4 dio: ^3.0.10 From 39dc320266817733645e870ee08fe22b9ddd038b Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Tue, 6 Aug 2024 14:33:32 +0800 Subject: [PATCH 11/23] =?UTF-8?q?android=E7=AB=AF=E5=AE=9A=E4=BD=8Dbug?= =?UTF-8?q?=E8=A7=A3=E5=86=B3;(classpath=20'com.android.tools.build:gradle?= =?UTF-8?q?:4.1.1=E5=8E=9F=E5=9B=A0=E5=AF=BC=E8=87=B4=E5=AE=9A=E4=BD=8D?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E5=BC=82=E5=B8=B8,=E6=94=B9=E4=B8=BA7.2.0?= =?UTF-8?q?=E5=8D=B3=E5=8F=AF)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/build.gradle | 4 +- android/gradle.properties | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- lib/union/union_page.dart | 7 -- lib/utils/location.dart | 6 +- lib/utils/send_location_dialog.dart | 119 ------------------ pubspec.lock | 52 ++++---- pubspec.yaml | 4 +- 8 files changed, 42 insertions(+), 156 deletions(-) delete mode 100644 lib/utils/send_location_dialog.dart diff --git a/android/build.gradle b/android/build.gradle index 6a39fb30..c7f9f6a8 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,5 +1,5 @@ buildscript { - ext.kotlin_version = '1.6.0' + ext.kotlin_version = '1.7.10' repositories { maven { url 'https://maven.aliyun.com/repository/google' @@ -24,7 +24,7 @@ buildscript { dependencies { // classpath 'com.android.tools.build:gradle:4.1.0' - classpath 'com.android.tools.build:gradle:4.1.1' + classpath 'com.android.tools.build:gradle:7.2.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.huawei.agconnect:agcp:1.4.1.300' classpath 'com.mob.sdk:MobSDK:+' diff --git a/android/gradle.properties b/android/gradle.properties index 90c0c415..f2f0fd0d 100644 --- a/android/gradle.properties +++ b/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 diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index ffed3a25..2ec77e51 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/lib/union/union_page.dart b/lib/union/union_page.dart index ee2adb2e..3772695a 100644 --- a/lib/union/union_page.dart +++ b/lib/union/union_page.dart @@ -22,7 +22,6 @@ import 'package:flutter/rendering.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:visibility_detector/visibility_detector.dart'; -import '../utils/send_location_dialog.dart'; import '../view_widget/location_tips.dart'; import '../view_widget/no_data_view.dart'; @@ -116,12 +115,6 @@ class UnionPageState extends State } getLocation({bool showLoading = true}) async { - // await showDialog( - // context: context, - // useRootNavigator: false, - // builder: (c) => SendLocationDialog(), - // ); - // return; if(showLoading) EasyLoading.show( status: S.current.zhengzaijiazai, diff --git a/lib/utils/location.dart b/lib/utils/location.dart index b1bba7b1..5fa18eda 100644 --- a/lib/utils/location.dart +++ b/lib/utils/location.dart @@ -49,7 +49,11 @@ class LocationInstance { EasyLoading.dismiss(); } }); - Position locationData = await Geolocator.getCurrentPosition(); + Position locationData = await Geolocator.getCurrentPosition( + desiredAccuracy: LocationAccuracy.medium, + timeLimit: const Duration(seconds: 30), + forceAndroidLocationManager: true, + ); isNext = false; locationCallback.call(locationData); } diff --git a/lib/utils/send_location_dialog.dart b/lib/utils/send_location_dialog.dart deleted file mode 100644 index 0b5eaba4..00000000 --- a/lib/utils/send_location_dialog.dart +++ /dev/null @@ -1,119 +0,0 @@ -import 'dart:async'; - -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -import 'package:geolocator/geolocator.dart'; - -class SendLocationDialog extends StatefulWidget { - - const SendLocationDialog({ - Key key, - }) : super(key: key); - - @override - SendLocationDialogState createState() => SendLocationDialogState(); -} - -class SendLocationDialogState extends State { - bool disabled = false; - bool denied = false; - bool isSending = false; - Position position; - Object error; - - @override - void initState() { - super.initState(); - requestLocation(); - } - - Future requestLocation() async { - if (!(await Geolocator.isLocationServiceEnabled())) { - setState(() => disabled = true); - return; - } - var permission = await Geolocator.checkPermission(); - if (permission == LocationPermission.denied) { - permission = await Geolocator.requestPermission(); - if (permission == LocationPermission.denied) { - setState(() => denied = true); - return; - } - } - if (permission == LocationPermission.deniedForever) { - setState(() => denied = true); - return; - } - try { - Position position; - try { - position = await Geolocator.getCurrentPosition( - desiredAccuracy: LocationAccuracy.best, - timeLimit: const Duration(seconds: 30), - ); - } on TimeoutException { - position = await Geolocator.getCurrentPosition( - desiredAccuracy: LocationAccuracy.medium, - timeLimit: const Duration(seconds: 30), - ); - } - setState(() => this.position = position); - } catch (e) { - setState(() => error = e); - } - } - - void sendAction() async { - setState(() => isSending = true); - final body = - 'https://www.openstreetmap.org/?mlat=${position.latitude}&mlon=${position.longitude}#map=16/${position.latitude}/${position.longitude}'; - final uri = - 'geo:${position.latitude},${position.longitude};u=${position.accuracy}'; - Navigator.of(context, rootNavigator: false).pop(); - } - - @override - Widget build(BuildContext context) { - Widget contentWidget; - if (position != null) { - // contentWidget = MapBubble( - // latitude: position.latitude, - // longitude: position.longitude, - // ); - contentWidget = Text("MapBubble"); - } else if (disabled) { - contentWidget = Text("locationDisabledNotice"); - } else if (denied) { - contentWidget = Text("locationPermissionDeniedNotice"); - } else if (error != null) { - contentWidget = - Text(error.toString()); - } else { - contentWidget = Row( - mainAxisSize: MainAxisSize.min, - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const CupertinoActivityIndicator(), - const SizedBox(width: 12), - Text("obtainingLocation"), - ], - ); - } - return AlertDialog( - title: Text("shareLocation"), - content: contentWidget, - actions: [ - TextButton( - onPressed: Navigator.of(context, rootNavigator: false).pop, - child: Text("cancel"), - ), - if (position != null) - TextButton( - onPressed: isSending ? null : sendAction, - child: Text("send"), - ), - ], - ); - } -} diff --git a/pubspec.lock b/pubspec.lock index 6179415f..60df8c48 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -401,18 +401,18 @@ packages: dependency: "direct main" description: name: geolocator - sha256: "5c23f3613f50586c0bbb2b8f970240ae66b3bd992088cf60dd5ee2e6f7dde3a8" + sha256: "5c496b46e245d006760e643cedde7c9fa785a34391b5eca857a46358f9bde02b" url: "https://pub.flutter-io.cn" source: hosted - version: "9.0.2" + version: "8.2.1" geolocator_android: dependency: transitive description: name: geolocator_android - sha256: "06e37fa32392f69f133e166ef6b358a8b6afddbf4c418fc236988184cc115a49" + sha256: "3fa9215caf1e4463adbdf1f21b07fdcb9bc2af2ef1df3715a52376b87bebb087" url: "https://pub.flutter-io.cn" source: hosted - version: "4.4.1" + version: "3.2.1" geolocator_apple: dependency: transitive description: @@ -697,10 +697,26 @@ packages: dependency: "direct main" description: name: permission_handler - sha256: "7c008a350caabef1b372b5a2f5559dc178fc6f0745c4f6f5a0fd103b11d740d2" + 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: "6.0.0" + version: "9.0.2+1" + permission_handler_apple: + dependency: transitive + description: + name: permission_handler_apple + sha256: "99e220bce3f8877c78e4ace901082fb29fa1b4ebde529ad0932d8d664b34f3f5" + url: "https://pub.flutter-io.cn" + source: hosted + version: "9.1.4" permission_handler_platform_interface: dependency: transitive description: @@ -709,6 +725,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "3.12.0" + permission_handler_windows: + dependency: transitive + description: + name: permission_handler_windows + sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.1.3" petitparser: dependency: transitive description: @@ -946,14 +970,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.9.1" - sprintf: - dependency: transitive - description: - name: sprintf - sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" - url: "https://pub.flutter-io.cn" - source: hosted - version: "7.0.0" stack_trace: dependency: transitive description: @@ -1107,14 +1123,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.1.3" - uuid: - dependency: transitive - description: - name: uuid - sha256: b715b8d3858b6fa9f68f87d20d98830283628014750c2b09b6f516c1da4af2a7 - url: "https://pub.flutter-io.cn" - source: hosted - version: "4.1.0" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index f95c703d..37ad775e 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,9 +39,9 @@ dependencies: number_precision: ^2.0.2+1 - permission_handler: 6.0.0 + permission_handler: ^9.0.2 - geolocator: ^9.0.0 + geolocator: ^8.2.1 # location: ^3.2.4 dio: ^3.0.10 From 607729f6dc17959f0e10b4accc44b976b00c7cad Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Tue, 6 Aug 2024 14:48:30 +0800 Subject: [PATCH 12/23] =?UTF-8?q?=E5=BC=80=E7=A5=A8=E5=8E=86=E5=8F=B2,?= =?UTF-8?q?=E7=A9=BA=E6=95=B0=E6=8D=AE=E5=BC=82=E5=B8=B8=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/order/invoices_manage/invoices_history.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/order/invoices_manage/invoices_history.dart b/lib/order/invoices_manage/invoices_history.dart index e4a16cff..5e89da3e 100644 --- a/lib/order/invoices_manage/invoices_history.dart +++ b/lib/order/invoices_manage/invoices_history.dart @@ -80,6 +80,7 @@ class _InvoicesHistory extends State { _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) From 25f0500eaa2085968e1c7c9bc64b06dd1f762750 Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 6 Aug 2024 16:03:00 +0800 Subject: [PATCH 13/23] =?UTF-8?q?=E5=BC=80=E7=A5=A8=E5=8E=86=E5=8F=B2?= =?UTF-8?q?=E6=97=A0=E8=AE=B0=E5=BD=95=E6=98=BE=E7=A4=BA=E6=9B=B4=E6=94=B9?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/order/invoices_manage/invoices_history.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/order/invoices_manage/invoices_history.dart b/lib/order/invoices_manage/invoices_history.dart index 5e89da3e..88fd78d7 100644 --- a/lib/order/invoices_manage/invoices_history.dart +++ b/lib/order/invoices_manage/invoices_history.dart @@ -174,11 +174,11 @@ class _InvoicesHistory extends State { : ((records == null || records.length == 0) ? NoDataView( - src: "assets/image/bs_no data_logo.webp", + src: "assets/image/ding_dan.webp", isShowBtn: false, - text: "暂无商品分类", + text: "暂无开票记录", fontSize: 16, - margin: EdgeInsets.all(20), + margin: EdgeInsets.only(top: 120,left: 20,right: 20), ) : Column( crossAxisAlignment: CrossAxisAlignment.start, From 6dc5ad909c4c9a3d922a83f09178883f514bf0ec Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 6 Aug 2024 16:13:23 +0800 Subject: [PATCH 14/23] ios --- ios/Runner.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 95164ef9..a6bceac9 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/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 = 3; + CURRENT_PROJECT_VERSION = 4; 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 = 3; + CURRENT_PROJECT_VERSION = 4; 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 = 3; + CURRENT_PROJECT_VERSION = 4; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( From 643ae66735cb3e0528e7078d322a3a5e121d0c2c Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 6 Aug 2024 17:49:53 +0800 Subject: [PATCH 15/23] =?UTF-8?q?ios=20=E6=94=AF=E4=BB=98=E5=AE=9D?= =?UTF-8?q?=E7=99=BD=E5=90=8D=E5=8D=95=E8=B7=B3=E8=BD=AC=E5=BA=94=E7=94=A8?= =?UTF-8?q?bug=E5=A4=84=E7=90=86=EF=BC=9B=EF=BC=88=E5=A5=BD=E7=94=9F?= =?UTF-8?q?=E6=84=8F=E5=B0=BE=E5=8F=B73=EF=BC=8C=E6=B5=B7=E5=B3=A1?= =?UTF-8?q?=E5=A7=90=E5=A6=B9=E6=9B=B4=E6=94=B9=E4=B8=BA4=EF=BC=8C?= =?UTF-8?q?=E4=BD=9C=E4=B8=BA=E5=8C=BA=E5=88=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Runner/Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index b4ff2028..1da8c87d 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -71,7 +71,7 @@ alipay CFBundleURLSchemes - alipay2021003156646403 + alipay2021003156646404 From 277f0b7e1c0c15b767f8332f3a72c2a172a43200 Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 6 Aug 2024 17:50:09 +0800 Subject: [PATCH 16/23] =?UTF-8?q?ios=20=E6=94=AF=E4=BB=98=E5=AE=9D?= =?UTF-8?q?=E7=99=BD=E5=90=8D=E5=8D=95=E8=B7=B3=E8=BD=AC=E5=BA=94=E7=94=A8?= =?UTF-8?q?bug=E5=A4=84=E7=90=86=EF=BC=9B=EF=BC=88=E5=A5=BD=E7=94=9F?= =?UTF-8?q?=E6=84=8F=E5=B0=BE=E5=8F=B73=EF=BC=8C=E6=B5=B7=E5=B3=A1?= =?UTF-8?q?=E5=A7=90=E5=A6=B9=E6=9B=B4=E6=94=B9=E4=B8=BA4=EF=BC=8C?= =?UTF-8?q?=E4=BD=9C=E4=B8=BA=E5=8C=BA=E5=88=86=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Runner.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index a6bceac9..05a2171d 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/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 = 4; + CURRENT_PROJECT_VERSION = 5; 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 = 4; + CURRENT_PROJECT_VERSION = 5; 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 = 4; + CURRENT_PROJECT_VERSION = 5; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( From dfabb8f4dfa05b34e84f4c6c43dbfdcb53a4fcf7 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Fri, 9 Aug 2024 11:22:29 +0800 Subject: [PATCH 17/23] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E8=AF=A6=E6=83=85=E9=A1=B5=E9=9D=A2=EF=BC=9B=20pdf=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E5=A4=84=E7=90=86=EF=BC=8C=E6=96=B0=E5=A2=9E=E4=BE=9D?= =?UTF-8?q?=E8=B5=96=EF=BC=88flutter=5Fpdfview=EF=BC=89=EF=BC=9B=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8F=91=E7=A5=A8=E8=AF=A6=E6=83=85=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- android/app/build.gradle | 4 + lib/main.dart | 3 + .../invoices_manage/invoices_detail_page.dart | 820 +++++++++ .../invoices_manage/invoices_history.dart | 10 +- .../invoices_manage/invoices_title_info.dart | 1 + lib/order/invoices_manage/pdf_screen.dart | 179 ++ lib/retrofit/data/invoices_detail_info.dart | 1515 +++++++++++++++++ lib/retrofit/retrofit_api.dart | 5 + lib/retrofit/retrofit_api.g.dart | 22 + pubspec.lock | 28 +- pubspec.yaml | 4 +- 11 files changed, 2579 insertions(+), 12 deletions(-) create mode 100644 lib/order/invoices_manage/invoices_detail_page.dart create mode 100644 lib/order/invoices_manage/pdf_screen.dart create mode 100644 lib/retrofit/data/invoices_detail_info.dart diff --git a/android/app/build.gradle b/android/app/build.gradle index b47d05c0..0d70196a 100644 --- a/android/app/build.gradle +++ b/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' diff --git a/lib/main.dart b/lib/main.dart index 301c616f..882d4d1e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -171,6 +171,7 @@ 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'; @@ -593,5 +594,7 @@ Map routers = { InvoicesHistory(), '/router/edit_invoices_info': (context, {arguments}) => EditInvoicesInfo(arguments:arguments), + '/router/invoices_detail_page': (context, {arguments}) => + InvoicesDetailPage(arguments:arguments), }; diff --git a/lib/order/invoices_manage/invoices_detail_page.dart b/lib/order/invoices_manage/invoices_detail_page.dart new file mode 100644 index 00000000..60c72891 --- /dev/null +++ b/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 arguments; + + InvoicesDetailPage({this.arguments}); + + @override + State createState() { + return _InvoicesDetailPage(); + } +} + +class _InvoicesDetailPage extends State { + 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 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 createFileOfPdfUrl() async { + Completer 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), + )), + ) + ], + ), + ); + } +} diff --git a/lib/order/invoices_manage/invoices_history.dart b/lib/order/invoices_manage/invoices_history.dart index 88fd78d7..79a4c3b5 100644 --- a/lib/order/invoices_manage/invoices_history.dart +++ b/lib/order/invoices_manage/invoices_history.dart @@ -200,7 +200,13 @@ class _InvoicesHistory extends State { itemBuilder: (context, position) { return GestureDetector( behavior: HitTestBehavior.opaque, - onTap: () {}, + onTap: () { + if(records[position].state == "AUDIT_PASS") + Navigator.of(context) + .pushNamed('/router/invoices_detail_page',arguments: { + "id":records[position].id ?? "" + }); + }, child: invoicesHistoryList(records[position]), ); }, @@ -302,6 +308,8 @@ class _InvoicesHistory extends State { return "已作废"; }else if (state =="AUDIT_FAIL") { return "开票失败"; + }else { + return ""; } } diff --git a/lib/order/invoices_manage/invoices_title_info.dart b/lib/order/invoices_manage/invoices_title_info.dart index 13188916..8d56dd2b 100644 --- a/lib/order/invoices_manage/invoices_title_info.dart +++ b/lib/order/invoices_manage/invoices_title_info.dart @@ -130,6 +130,7 @@ class _InvoicesTitleInfo extends State { Future.delayed(Duration(milliseconds: 500), () { SmartDialog.showToast("删除信息成功", alignment: Alignment.center); }); + networkStatus = 1; } else { SmartDialog.showToast(baseData.msg, alignment: Alignment.center); } diff --git a/lib/order/invoices_manage/pdf_screen.dart b/lib/order/invoices_manage/pdf_screen.dart new file mode 100644 index 00000000..ed87f604 --- /dev/null +++ b/lib/order/invoices_manage/pdf_screen.dart @@ -0,0 +1,179 @@ +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 with WidgetsBindingObserver { + final Completer _controller = Completer(); + 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: [ + Center( + child: Container( + height:250, + decoration: BoxDecoration( + color: Colors.transparent, + ), + 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) { + print('page change: $page/$total'); + setState(() { + currentPage = page; + pageTotal = total; + }); + }, + ), + ), + ), + 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}",style: TextStyle(color: Colors.white,fontSize: 16)), + ), + ), + ], + ), + ):Scaffold( + body: Stack( + children: [ + 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) { + print('page change: $page/$total'); + setState(() { + currentPage = page; + pageTotal = total; + }); + }, + ), + 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}",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(); + }, + ), + ), + ], + ), + + ); + + } +} \ No newline at end of file diff --git a/lib/retrofit/data/invoices_detail_info.dart b/lib/retrofit/data/invoices_detail_info.dart new file mode 100644 index 00000000..754baf5b --- /dev/null +++ b/lib/retrofit/data/invoices_detail_info.dart @@ -0,0 +1,1515 @@ +/// id : "1797587255380934656" +/// createTime : "2024-06-03 19:12:54" +/// createUser : "1623178240350748672" +/// updateTime : "2024-06-03 19:16:11" +/// updateUser : "0" +/// phone : "" +/// receivingPhone : null +/// mid : "1623178240350748672" +/// orderIds : ["1797582782189273088"] +/// money : "0.01" +/// type : "ELECTRONIC" +/// headerId : "1797580038447562752" +/// state : "AUDIT_PASS" +/// reviewerTime : "2024-06-03 19:16:11" +/// reviewerBy : "1" +/// ossUrl : "http://file.oa.yixinhuixiang.com/2024/05/30/f11bc4871f78466898e7aa9b79c9b3b2.pdf" +/// reason : "" +/// isDelete : 0 +/// invoiceHeaderName : "回乡信息技术(上海)有限公司武汉分公司" +/// invoiceHeaderCode : "91420106MA49J8GY8D" +/// orderList : [{"id":"1797582782189273088","createTime":"2024-06-03 18:55:07","createUser":"1623178240350748672","updateTime":"2024-06-03 18:55:07","updateUser":"1623178240350748672","tenantCode":"1187","storeId":"1509811680584925184","storeName":"桑葚认养2022","tableId":"0","responsible":null,"orderType":0,"clearTable":false,"mid":"1623178240350748672","parentId":"0","parentCode":null,"orderCode":"202406031855070001","dayFlowCode":"518","orderStatus":4,"sendStatus":0,"payStatus":1,"haveTimes":false,"invoicing":true,"memberAccount":"AA_oODK34oXp-4O8zQhg4OzFbEIL9Yo","owner":"1610225796515889152","logisticsId":"0","shipperCode":"","logisticsName":"","logisticsNum":"","logisticsCase":null,"refundStatus":0,"addressExt":{"addressId":"1777546429707845632","country":null,"countryId":null,"province":"湖北省","provinceId":null,"city":"武汉市","cityId":null,"district":"江岸区","districtId":null,"cityInfo":"江岸区会议中心","address":"中海中心","recName":"","recMobile":"17612711844","longitude":"114.3096","latitude":"30.59982"},"contactsExtList":[{"name":"兰东","mobile":"17612711844","idcard":""}],"postFee":"0.00","totalPackagingFee":"0.00","couponSubPrice":"0.00","removeDecimal":"0.00","isSubscribe":false,"subcribeTime":null,"sendTime":null,"confirmTime":null,"returnMoneyTime":null,"notes":"","prepayId":"WxPayMpOrderResult(appId=wx4ffd76994dc95086, timeStamp=1717412111, nonceStr=p82DnfDFYGFJzPi5, packageValue=prepay_id=wx031855122394490fad3a1b3b449dd20000, signType=MD5, paySign=35926ED291B7426675A6B6E35C890095)","payTime":"2024-06-03 18:55:30","payChannel":1,"payNum":"","promotionId":"0","actId":"0","couponId":"0","isDelete":0,"isTakeOut":0,"batch":1,"orderDiscountPrice":"0.00","dishesDiscountPrice":"0.00","orderPercentPrice":"0.00","activityNoPrice":"0.00","activityDiscountPrice":"0.00","uniqueDiscountType":"AUTO","totalDiscountPrice":null,"vipDayDiscountPrice":"0.00","orderSource":1,"benefitDiscountAmount":"0.00","vipDiscountPrice":"0.00","orderMerge":null,"canSettlement":true,"endRefundTime":null,"orderProductList":[{"id":"1797582782721949696","createTime":"2024-06-03 18:55:08","createUser":"1623178240350748672","updateTime":"2024-06-03 18:55:08","updateUser":"1623178240350748672","tenantCode":"1187","storeId":"1509811680584925184","orderId":"1797582782189273088","actInfo":null,"productId":"1777275921871405056","times":null,"usedTimes":null,"productName":"牡丹花认养测试","skuId":"1777291794300534784","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"200.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":1,"ticketType":"ADOPT_WARRANT","ticketDays":"365","takeType":null,"skuTickets":["牡丹花挂牌*1","有机牡丹籽油250ml*1"],"ticketStyle":"{\"mainImage\":\"https://pos.upload.lotus-wallet.com/1185/2022/03/9ac1a67d-b9cd-4430-80c2-4f33670939cd.png\",\"identityImage\":\"https://pos.upload.lotus-wallet.com/1185/2022/03/9ac1a67d-b9cd-4430-80c2-4f33670939cd.png\",\"identityName\":\"认养花卉\",\"signature\":\"牡丹认养\"}","setMealDataList":null,"packagingFee":"0.00"}],"businessType":null,"paySum":"0.01","useInvoice":null,"payedPrice":"0.01","finalPayPrice":null,"isEnableSubscribePay":null,"invoiceId":null,"invoiceState":null,"posType":null}] +/// headertype : "COMPANY" +/// companyAddr : "" +/// companyPhone : "" +/// bank : "" +/// bankNumber : "" + +class InvoicesDetailInfo { + InvoicesDetailInfo({ + String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String phone, + dynamic receivingPhone, + String mid, + List orderIds, + String money, + String type, + String headerId, + String state, + String reviewerTime, + String reviewerBy, + String ossUrl, + String reason, + num isDelete, + String invoiceHeaderName, + String invoiceHeaderCode, + List orderList, + String headertype, + String companyAddr, + String companyPhone, + String bank, + String 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; +} + + InvoicesDetailInfo.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() : []; + _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']; + if (json['orderList'] != null) { + _orderList = []; + json['orderList'].forEach((v) { + _orderList.add(OrderList.fromJson(v)); + }); + } + _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; + dynamic _receivingPhone; + String _mid; + List _orderIds; + String _money; + String _type; + String _headerId; + String _state; + String _reviewerTime; + String _reviewerBy; + String _ossUrl; + String _reason; + num _isDelete; + String _invoiceHeaderName; + String _invoiceHeaderCode; + List _orderList; + String _headertype; + String _companyAddr; + String _companyPhone; + String _bank; + String _bankNumber; +InvoicesDetailInfo copyWith({ String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String phone, + dynamic receivingPhone, + String mid, + List orderIds, + String money, + String type, + String headerId, + String state, + String reviewerTime, + String reviewerBy, + String ossUrl, + String reason, + num isDelete, + String invoiceHeaderName, + String invoiceHeaderCode, + List orderList, + String headertype, + String companyAddr, + String companyPhone, + String bank, + String bankNumber, +}) => InvoicesDetailInfo( 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; + dynamic get receivingPhone => _receivingPhone; + String get mid => _mid; + List get orderIds => _orderIds; + String get money => _money; + String get type => _type; + String get headerId => _headerId; + String get state => _state; + String get reviewerTime => _reviewerTime; + String get reviewerBy => _reviewerBy; + String get ossUrl => _ossUrl; + String get reason => _reason; + num get isDelete => _isDelete; + String get invoiceHeaderName => _invoiceHeaderName; + String get invoiceHeaderCode => _invoiceHeaderCode; + List get orderList => _orderList; + String get headertype => _headertype; + String get companyAddr => _companyAddr; + String get companyPhone => _companyPhone; + String get bank => _bank; + String get bankNumber => _bankNumber; + + Map toJson() { + final map = {}; + 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; + if (_orderList != null) { + map['orderList'] = _orderList.map((v) => v.toJson()).toList(); + } + map['headertype'] = _headertype; + map['companyAddr'] = _companyAddr; + map['companyPhone'] = _companyPhone; + map['bank'] = _bank; + map['bankNumber'] = _bankNumber; + return map; + } + +} + +/// id : "1797582782189273088" +/// createTime : "2024-06-03 18:55:07" +/// createUser : "1623178240350748672" +/// updateTime : "2024-06-03 18:55:07" +/// updateUser : "1623178240350748672" +/// tenantCode : "1187" +/// storeId : "1509811680584925184" +/// storeName : "桑葚认养2022" +/// tableId : "0" +/// responsible : null +/// orderType : 0 +/// clearTable : false +/// mid : "1623178240350748672" +/// parentId : "0" +/// parentCode : null +/// orderCode : "202406031855070001" +/// dayFlowCode : "518" +/// orderStatus : 4 +/// sendStatus : 0 +/// payStatus : 1 +/// haveTimes : false +/// invoicing : true +/// memberAccount : "AA_oODK34oXp-4O8zQhg4OzFbEIL9Yo" +/// owner : "1610225796515889152" +/// logisticsId : "0" +/// shipperCode : "" +/// logisticsName : "" +/// logisticsNum : "" +/// logisticsCase : null +/// refundStatus : 0 +/// addressExt : {"addressId":"1777546429707845632","country":null,"countryId":null,"province":"湖北省","provinceId":null,"city":"武汉市","cityId":null,"district":"江岸区","districtId":null,"cityInfo":"江岸区会议中心","address":"中海中心","recName":"","recMobile":"17612711844","longitude":"114.3096","latitude":"30.59982"} +/// contactsExtList : [{"name":"兰东","mobile":"17612711844","idcard":""}] +/// postFee : "0.00" +/// totalPackagingFee : "0.00" +/// couponSubPrice : "0.00" +/// removeDecimal : "0.00" +/// isSubscribe : false +/// subcribeTime : null +/// sendTime : null +/// confirmTime : null +/// returnMoneyTime : null +/// notes : "" +/// prepayId : "WxPayMpOrderResult(appId=wx4ffd76994dc95086, timeStamp=1717412111, nonceStr=p82DnfDFYGFJzPi5, packageValue=prepay_id=wx031855122394490fad3a1b3b449dd20000, signType=MD5, paySign=35926ED291B7426675A6B6E35C890095)" +/// payTime : "2024-06-03 18:55:30" +/// payChannel : 1 +/// payNum : "" +/// promotionId : "0" +/// actId : "0" +/// couponId : "0" +/// isDelete : 0 +/// isTakeOut : 0 +/// batch : 1 +/// orderDiscountPrice : "0.00" +/// dishesDiscountPrice : "0.00" +/// orderPercentPrice : "0.00" +/// activityNoPrice : "0.00" +/// activityDiscountPrice : "0.00" +/// uniqueDiscountType : "AUTO" +/// totalDiscountPrice : null +/// vipDayDiscountPrice : "0.00" +/// orderSource : 1 +/// benefitDiscountAmount : "0.00" +/// vipDiscountPrice : "0.00" +/// orderMerge : null +/// canSettlement : true +/// endRefundTime : null +/// orderProductList : [{"id":"1797582782721949696","createTime":"2024-06-03 18:55:08","createUser":"1623178240350748672","updateTime":"2024-06-03 18:55:08","updateUser":"1623178240350748672","tenantCode":"1187","storeId":"1509811680584925184","orderId":"1797582782189273088","actInfo":null,"productId":"1777275921871405056","times":null,"usedTimes":null,"productName":"牡丹花认养测试","skuId":"1777291794300534784","skuNameStr":"","skuImg":"","buyNum":1,"refundNum":0,"type":0,"reason":null,"weight":0.0,"applyPrice":"200.00","sellPrice":"0.01","postPay":"0.00","isDelete":0,"discountAmount":"0.00","discountPercent":100,"status":true,"batch":1,"deliveries":1,"ticketType":"ADOPT_WARRANT","ticketDays":"365","takeType":null,"skuTickets":["牡丹花挂牌*1","有机牡丹籽油250ml*1"],"ticketStyle":"{\"mainImage\":\"https://pos.upload.lotus-wallet.com/1185/2022/03/9ac1a67d-b9cd-4430-80c2-4f33670939cd.png\",\"identityImage\":\"https://pos.upload.lotus-wallet.com/1185/2022/03/9ac1a67d-b9cd-4430-80c2-4f33670939cd.png\",\"identityName\":\"认养花卉\",\"signature\":\"牡丹认养\"}","setMealDataList":null,"packagingFee":"0.00"}] +/// businessType : null +/// paySum : "0.01" +/// useInvoice : null +/// payedPrice : "0.01" +/// finalPayPrice : null +/// isEnableSubscribePay : null +/// invoiceId : null +/// invoiceState : null +/// posType : null + +class OrderList { + OrderList({ + String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String tenantCode, + String storeId, + String storeName, + String tableId, + dynamic responsible, + num orderType, + bool clearTable, + String mid, + String parentId, + dynamic parentCode, + String orderCode, + String dayFlowCode, + num orderStatus, + num sendStatus, + num payStatus, + bool haveTimes, + bool invoicing, + String memberAccount, + String owner, + String logisticsId, + String shipperCode, + String logisticsName, + String logisticsNum, + dynamic logisticsCase, + num refundStatus, + AddressExt addressExt, + List contactsExtList, + String postFee, + String totalPackagingFee, + String couponSubPrice, + String removeDecimal, + bool isSubscribe, + dynamic subcribeTime, + dynamic sendTime, + dynamic confirmTime, + dynamic returnMoneyTime, + String notes, + String prepayId, + String payTime, + num payChannel, + String payNum, + String promotionId, + String actId, + String couponId, + num isDelete, + num isTakeOut, + num batch, + String orderDiscountPrice, + String dishesDiscountPrice, + String orderPercentPrice, + String activityNoPrice, + String activityDiscountPrice, + String uniqueDiscountType, + dynamic totalDiscountPrice, + String vipDayDiscountPrice, + num orderSource, + String benefitDiscountAmount, + String vipDiscountPrice, + dynamic orderMerge, + bool canSettlement, + dynamic endRefundTime, + List orderProductList, + dynamic businessType, + String paySum, + dynamic useInvoice, + String payedPrice, + dynamic finalPayPrice, + dynamic isEnableSubscribePay, + dynamic invoiceId, + dynamic invoiceState, + dynamic posType,}){ + _id = id; + _createTime = createTime; + _createUser = createUser; + _updateTime = updateTime; + _updateUser = updateUser; + _tenantCode = tenantCode; + _storeId = storeId; + _storeName = storeName; + _tableId = tableId; + _responsible = responsible; + _orderType = orderType; + _clearTable = clearTable; + _mid = mid; + _parentId = parentId; + _parentCode = parentCode; + _orderCode = orderCode; + _dayFlowCode = dayFlowCode; + _orderStatus = orderStatus; + _sendStatus = sendStatus; + _payStatus = payStatus; + _haveTimes = haveTimes; + _invoicing = invoicing; + _memberAccount = memberAccount; + _owner = owner; + _logisticsId = logisticsId; + _shipperCode = shipperCode; + _logisticsName = logisticsName; + _logisticsNum = logisticsNum; + _logisticsCase = logisticsCase; + _refundStatus = refundStatus; + _addressExt = addressExt; + _contactsExtList = contactsExtList; + _postFee = postFee; + _totalPackagingFee = totalPackagingFee; + _couponSubPrice = couponSubPrice; + _removeDecimal = removeDecimal; + _isSubscribe = isSubscribe; + _subcribeTime = subcribeTime; + _sendTime = sendTime; + _confirmTime = confirmTime; + _returnMoneyTime = returnMoneyTime; + _notes = notes; + _prepayId = prepayId; + _payTime = payTime; + _payChannel = payChannel; + _payNum = payNum; + _promotionId = promotionId; + _actId = actId; + _couponId = couponId; + _isDelete = isDelete; + _isTakeOut = isTakeOut; + _batch = batch; + _orderDiscountPrice = orderDiscountPrice; + _dishesDiscountPrice = dishesDiscountPrice; + _orderPercentPrice = orderPercentPrice; + _activityNoPrice = activityNoPrice; + _activityDiscountPrice = activityDiscountPrice; + _uniqueDiscountType = uniqueDiscountType; + _totalDiscountPrice = totalDiscountPrice; + _vipDayDiscountPrice = vipDayDiscountPrice; + _orderSource = orderSource; + _benefitDiscountAmount = benefitDiscountAmount; + _vipDiscountPrice = vipDiscountPrice; + _orderMerge = orderMerge; + _canSettlement = canSettlement; + _endRefundTime = endRefundTime; + _orderProductList = orderProductList; + _businessType = businessType; + _paySum = paySum; + _useInvoice = useInvoice; + _payedPrice = payedPrice; + _finalPayPrice = finalPayPrice; + _isEnableSubscribePay = isEnableSubscribePay; + _invoiceId = invoiceId; + _invoiceState = invoiceState; + _posType = posType; +} + + OrderList.fromJson(dynamic json) { + _id = json['id']; + _createTime = json['createTime']; + _createUser = json['createUser']; + _updateTime = json['updateTime']; + _updateUser = json['updateUser']; + _tenantCode = json['tenantCode']; + _storeId = json['storeId']; + _storeName = json['storeName']; + _tableId = json['tableId']; + _responsible = json['responsible']; + _orderType = json['orderType']; + _clearTable = json['clearTable']; + _mid = json['mid']; + _parentId = json['parentId']; + _parentCode = json['parentCode']; + _orderCode = json['orderCode']; + _dayFlowCode = json['dayFlowCode']; + _orderStatus = json['orderStatus']; + _sendStatus = json['sendStatus']; + _payStatus = json['payStatus']; + _haveTimes = json['haveTimes']; + _invoicing = json['invoicing']; + _memberAccount = json['memberAccount']; + _owner = json['owner']; + _logisticsId = json['logisticsId']; + _shipperCode = json['shipperCode']; + _logisticsName = json['logisticsName']; + _logisticsNum = json['logisticsNum']; + _logisticsCase = json['logisticsCase']; + _refundStatus = json['refundStatus']; + _addressExt = json['addressExt'] != null ? AddressExt.fromJson(json['addressExt']) : null; + if (json['contactsExtList'] != null) { + _contactsExtList = []; + json['contactsExtList'].forEach((v) { + _contactsExtList.add(ContactsExtList.fromJson(v)); + }); + } + _postFee = json['postFee']; + _totalPackagingFee = json['totalPackagingFee']; + _couponSubPrice = json['couponSubPrice']; + _removeDecimal = json['removeDecimal']; + _isSubscribe = json['isSubscribe']; + _subcribeTime = json['subcribeTime']; + _sendTime = json['sendTime']; + _confirmTime = json['confirmTime']; + _returnMoneyTime = json['returnMoneyTime']; + _notes = json['notes']; + _prepayId = json['prepayId']; + _payTime = json['payTime']; + _payChannel = json['payChannel']; + _payNum = json['payNum']; + _promotionId = json['promotionId']; + _actId = json['actId']; + _couponId = json['couponId']; + _isDelete = json['isDelete']; + _isTakeOut = json['isTakeOut']; + _batch = json['batch']; + _orderDiscountPrice = json['orderDiscountPrice']; + _dishesDiscountPrice = json['dishesDiscountPrice']; + _orderPercentPrice = json['orderPercentPrice']; + _activityNoPrice = json['activityNoPrice']; + _activityDiscountPrice = json['activityDiscountPrice']; + _uniqueDiscountType = json['uniqueDiscountType']; + _totalDiscountPrice = json['totalDiscountPrice']; + _vipDayDiscountPrice = json['vipDayDiscountPrice']; + _orderSource = json['orderSource']; + _benefitDiscountAmount = json['benefitDiscountAmount']; + _vipDiscountPrice = json['vipDiscountPrice']; + _orderMerge = json['orderMerge']; + _canSettlement = json['canSettlement']; + _endRefundTime = json['endRefundTime']; + if (json['orderProductList'] != null) { + _orderProductList = []; + json['orderProductList'].forEach((v) { + _orderProductList.add(OrderProductList.fromJson(v)); + }); + } + _businessType = json['businessType']; + _paySum = json['paySum']; + _useInvoice = json['useInvoice']; + _payedPrice = json['payedPrice']; + _finalPayPrice = json['finalPayPrice']; + _isEnableSubscribePay = json['isEnableSubscribePay']; + _invoiceId = json['invoiceId']; + _invoiceState = json['invoiceState']; + _posType = json['posType']; + } + String _id; + String _createTime; + String _createUser; + String _updateTime; + String _updateUser; + String _tenantCode; + String _storeId; + String _storeName; + String _tableId; + dynamic _responsible; + num _orderType; + bool _clearTable; + String _mid; + String _parentId; + dynamic _parentCode; + String _orderCode; + String _dayFlowCode; + num _orderStatus; + num _sendStatus; + num _payStatus; + bool _haveTimes; + bool _invoicing; + String _memberAccount; + String _owner; + String _logisticsId; + String _shipperCode; + String _logisticsName; + String _logisticsNum; + dynamic _logisticsCase; + num _refundStatus; + AddressExt _addressExt; + List _contactsExtList; + String _postFee; + String _totalPackagingFee; + String _couponSubPrice; + String _removeDecimal; + bool _isSubscribe; + dynamic _subcribeTime; + dynamic _sendTime; + dynamic _confirmTime; + dynamic _returnMoneyTime; + String _notes; + String _prepayId; + String _payTime; + num _payChannel; + String _payNum; + String _promotionId; + String _actId; + String _couponId; + num _isDelete; + num _isTakeOut; + num _batch; + String _orderDiscountPrice; + String _dishesDiscountPrice; + String _orderPercentPrice; + String _activityNoPrice; + String _activityDiscountPrice; + String _uniqueDiscountType; + dynamic _totalDiscountPrice; + String _vipDayDiscountPrice; + num _orderSource; + String _benefitDiscountAmount; + String _vipDiscountPrice; + dynamic _orderMerge; + bool _canSettlement; + dynamic _endRefundTime; + List _orderProductList; + dynamic _businessType; + String _paySum; + dynamic _useInvoice; + String _payedPrice; + dynamic _finalPayPrice; + dynamic _isEnableSubscribePay; + dynamic _invoiceId; + dynamic _invoiceState; + dynamic _posType; +OrderList copyWith({ String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String tenantCode, + String storeId, + String storeName, + String tableId, + dynamic responsible, + num orderType, + bool clearTable, + String mid, + String parentId, + dynamic parentCode, + String orderCode, + String dayFlowCode, + num orderStatus, + num sendStatus, + num payStatus, + bool haveTimes, + bool invoicing, + String memberAccount, + String owner, + String logisticsId, + String shipperCode, + String logisticsName, + String logisticsNum, + dynamic logisticsCase, + num refundStatus, + AddressExt addressExt, + List contactsExtList, + String postFee, + String totalPackagingFee, + String couponSubPrice, + String removeDecimal, + bool isSubscribe, + dynamic subcribeTime, + dynamic sendTime, + dynamic confirmTime, + dynamic returnMoneyTime, + String notes, + String prepayId, + String payTime, + num payChannel, + String payNum, + String promotionId, + String actId, + String couponId, + num isDelete, + num isTakeOut, + num batch, + String orderDiscountPrice, + String dishesDiscountPrice, + String orderPercentPrice, + String activityNoPrice, + String activityDiscountPrice, + String uniqueDiscountType, + dynamic totalDiscountPrice, + String vipDayDiscountPrice, + num orderSource, + String benefitDiscountAmount, + String vipDiscountPrice, + dynamic orderMerge, + bool canSettlement, + dynamic endRefundTime, + List orderProductList, + dynamic businessType, + String paySum, + dynamic useInvoice, + String payedPrice, + dynamic finalPayPrice, + dynamic isEnableSubscribePay, + dynamic invoiceId, + dynamic invoiceState, + dynamic posType, +}) => OrderList( id: id ?? _id, + createTime: createTime ?? _createTime, + createUser: createUser ?? _createUser, + updateTime: updateTime ?? _updateTime, + updateUser: updateUser ?? _updateUser, + tenantCode: tenantCode ?? _tenantCode, + storeId: storeId ?? _storeId, + storeName: storeName ?? _storeName, + tableId: tableId ?? _tableId, + responsible: responsible ?? _responsible, + orderType: orderType ?? _orderType, + clearTable: clearTable ?? _clearTable, + mid: mid ?? _mid, + parentId: parentId ?? _parentId, + parentCode: parentCode ?? _parentCode, + orderCode: orderCode ?? _orderCode, + dayFlowCode: dayFlowCode ?? _dayFlowCode, + orderStatus: orderStatus ?? _orderStatus, + sendStatus: sendStatus ?? _sendStatus, + payStatus: payStatus ?? _payStatus, + haveTimes: haveTimes ?? _haveTimes, + invoicing: invoicing ?? _invoicing, + memberAccount: memberAccount ?? _memberAccount, + owner: owner ?? _owner, + logisticsId: logisticsId ?? _logisticsId, + shipperCode: shipperCode ?? _shipperCode, + logisticsName: logisticsName ?? _logisticsName, + logisticsNum: logisticsNum ?? _logisticsNum, + logisticsCase: logisticsCase ?? _logisticsCase, + refundStatus: refundStatus ?? _refundStatus, + addressExt: addressExt ?? _addressExt, + contactsExtList: contactsExtList ?? _contactsExtList, + postFee: postFee ?? _postFee, + totalPackagingFee: totalPackagingFee ?? _totalPackagingFee, + couponSubPrice: couponSubPrice ?? _couponSubPrice, + removeDecimal: removeDecimal ?? _removeDecimal, + isSubscribe: isSubscribe ?? _isSubscribe, + subcribeTime: subcribeTime ?? _subcribeTime, + sendTime: sendTime ?? _sendTime, + confirmTime: confirmTime ?? _confirmTime, + returnMoneyTime: returnMoneyTime ?? _returnMoneyTime, + notes: notes ?? _notes, + prepayId: prepayId ?? _prepayId, + payTime: payTime ?? _payTime, + payChannel: payChannel ?? _payChannel, + payNum: payNum ?? _payNum, + promotionId: promotionId ?? _promotionId, + actId: actId ?? _actId, + couponId: couponId ?? _couponId, + isDelete: isDelete ?? _isDelete, + isTakeOut: isTakeOut ?? _isTakeOut, + batch: batch ?? _batch, + orderDiscountPrice: orderDiscountPrice ?? _orderDiscountPrice, + dishesDiscountPrice: dishesDiscountPrice ?? _dishesDiscountPrice, + orderPercentPrice: orderPercentPrice ?? _orderPercentPrice, + activityNoPrice: activityNoPrice ?? _activityNoPrice, + activityDiscountPrice: activityDiscountPrice ?? _activityDiscountPrice, + uniqueDiscountType: uniqueDiscountType ?? _uniqueDiscountType, + totalDiscountPrice: totalDiscountPrice ?? _totalDiscountPrice, + vipDayDiscountPrice: vipDayDiscountPrice ?? _vipDayDiscountPrice, + orderSource: orderSource ?? _orderSource, + benefitDiscountAmount: benefitDiscountAmount ?? _benefitDiscountAmount, + vipDiscountPrice: vipDiscountPrice ?? _vipDiscountPrice, + orderMerge: orderMerge ?? _orderMerge, + canSettlement: canSettlement ?? _canSettlement, + endRefundTime: endRefundTime ?? _endRefundTime, + orderProductList: orderProductList ?? _orderProductList, + businessType: businessType ?? _businessType, + paySum: paySum ?? _paySum, + useInvoice: useInvoice ?? _useInvoice, + payedPrice: payedPrice ?? _payedPrice, + finalPayPrice: finalPayPrice ?? _finalPayPrice, + isEnableSubscribePay: isEnableSubscribePay ?? _isEnableSubscribePay, + invoiceId: invoiceId ?? _invoiceId, + invoiceState: invoiceState ?? _invoiceState, + posType: posType ?? _posType, +); + String get id => _id; + String get createTime => _createTime; + String get createUser => _createUser; + String get updateTime => _updateTime; + String get updateUser => _updateUser; + String get tenantCode => _tenantCode; + String get storeId => _storeId; + String get storeName => _storeName; + String get tableId => _tableId; + dynamic get responsible => _responsible; + num get orderType => _orderType; + bool get clearTable => _clearTable; + String get mid => _mid; + String get parentId => _parentId; + dynamic get parentCode => _parentCode; + String get orderCode => _orderCode; + String get dayFlowCode => _dayFlowCode; + num get orderStatus => _orderStatus; + num get sendStatus => _sendStatus; + num get payStatus => _payStatus; + bool get haveTimes => _haveTimes; + bool get invoicing => _invoicing; + String get memberAccount => _memberAccount; + String get owner => _owner; + String get logisticsId => _logisticsId; + String get shipperCode => _shipperCode; + String get logisticsName => _logisticsName; + String get logisticsNum => _logisticsNum; + dynamic get logisticsCase => _logisticsCase; + num get refundStatus => _refundStatus; + AddressExt get addressExt => _addressExt; + List get contactsExtList => _contactsExtList; + String get postFee => _postFee; + String get totalPackagingFee => _totalPackagingFee; + String get couponSubPrice => _couponSubPrice; + String get removeDecimal => _removeDecimal; + bool get isSubscribe => _isSubscribe; + dynamic get subcribeTime => _subcribeTime; + dynamic get sendTime => _sendTime; + dynamic get confirmTime => _confirmTime; + dynamic get returnMoneyTime => _returnMoneyTime; + String get notes => _notes; + String get prepayId => _prepayId; + String get payTime => _payTime; + num get payChannel => _payChannel; + String get payNum => _payNum; + String get promotionId => _promotionId; + String get actId => _actId; + String get couponId => _couponId; + num get isDelete => _isDelete; + num get isTakeOut => _isTakeOut; + num get batch => _batch; + String get orderDiscountPrice => _orderDiscountPrice; + String get dishesDiscountPrice => _dishesDiscountPrice; + String get orderPercentPrice => _orderPercentPrice; + String get activityNoPrice => _activityNoPrice; + String get activityDiscountPrice => _activityDiscountPrice; + String get uniqueDiscountType => _uniqueDiscountType; + dynamic get totalDiscountPrice => _totalDiscountPrice; + String get vipDayDiscountPrice => _vipDayDiscountPrice; + num get orderSource => _orderSource; + String get benefitDiscountAmount => _benefitDiscountAmount; + String get vipDiscountPrice => _vipDiscountPrice; + dynamic get orderMerge => _orderMerge; + bool get canSettlement => _canSettlement; + dynamic get endRefundTime => _endRefundTime; + List get orderProductList => _orderProductList; + dynamic get businessType => _businessType; + String get paySum => _paySum; + dynamic get useInvoice => _useInvoice; + String get payedPrice => _payedPrice; + dynamic get finalPayPrice => _finalPayPrice; + dynamic get isEnableSubscribePay => _isEnableSubscribePay; + dynamic get invoiceId => _invoiceId; + dynamic get invoiceState => _invoiceState; + dynamic get posType => _posType; + + Map toJson() { + final map = {}; + map['id'] = _id; + map['createTime'] = _createTime; + map['createUser'] = _createUser; + map['updateTime'] = _updateTime; + map['updateUser'] = _updateUser; + map['tenantCode'] = _tenantCode; + map['storeId'] = _storeId; + map['storeName'] = _storeName; + map['tableId'] = _tableId; + map['responsible'] = _responsible; + map['orderType'] = _orderType; + map['clearTable'] = _clearTable; + map['mid'] = _mid; + map['parentId'] = _parentId; + map['parentCode'] = _parentCode; + map['orderCode'] = _orderCode; + map['dayFlowCode'] = _dayFlowCode; + map['orderStatus'] = _orderStatus; + map['sendStatus'] = _sendStatus; + map['payStatus'] = _payStatus; + map['haveTimes'] = _haveTimes; + map['invoicing'] = _invoicing; + map['memberAccount'] = _memberAccount; + map['owner'] = _owner; + map['logisticsId'] = _logisticsId; + map['shipperCode'] = _shipperCode; + map['logisticsName'] = _logisticsName; + map['logisticsNum'] = _logisticsNum; + map['logisticsCase'] = _logisticsCase; + map['refundStatus'] = _refundStatus; + if (_addressExt != null) { + map['addressExt'] = _addressExt.toJson(); + } + if (_contactsExtList != null) { + map['contactsExtList'] = _contactsExtList.map((v) => v.toJson()).toList(); + } + map['postFee'] = _postFee; + map['totalPackagingFee'] = _totalPackagingFee; + map['couponSubPrice'] = _couponSubPrice; + map['removeDecimal'] = _removeDecimal; + map['isSubscribe'] = _isSubscribe; + map['subcribeTime'] = _subcribeTime; + map['sendTime'] = _sendTime; + map['confirmTime'] = _confirmTime; + map['returnMoneyTime'] = _returnMoneyTime; + map['notes'] = _notes; + map['prepayId'] = _prepayId; + map['payTime'] = _payTime; + map['payChannel'] = _payChannel; + map['payNum'] = _payNum; + map['promotionId'] = _promotionId; + map['actId'] = _actId; + map['couponId'] = _couponId; + map['isDelete'] = _isDelete; + map['isTakeOut'] = _isTakeOut; + map['batch'] = _batch; + map['orderDiscountPrice'] = _orderDiscountPrice; + map['dishesDiscountPrice'] = _dishesDiscountPrice; + map['orderPercentPrice'] = _orderPercentPrice; + map['activityNoPrice'] = _activityNoPrice; + map['activityDiscountPrice'] = _activityDiscountPrice; + map['uniqueDiscountType'] = _uniqueDiscountType; + map['totalDiscountPrice'] = _totalDiscountPrice; + map['vipDayDiscountPrice'] = _vipDayDiscountPrice; + map['orderSource'] = _orderSource; + map['benefitDiscountAmount'] = _benefitDiscountAmount; + map['vipDiscountPrice'] = _vipDiscountPrice; + map['orderMerge'] = _orderMerge; + map['canSettlement'] = _canSettlement; + map['endRefundTime'] = _endRefundTime; + if (_orderProductList != null) { + map['orderProductList'] = _orderProductList.map((v) => v.toJson()).toList(); + } + map['businessType'] = _businessType; + map['paySum'] = _paySum; + map['useInvoice'] = _useInvoice; + map['payedPrice'] = _payedPrice; + map['finalPayPrice'] = _finalPayPrice; + map['isEnableSubscribePay'] = _isEnableSubscribePay; + map['invoiceId'] = _invoiceId; + map['invoiceState'] = _invoiceState; + map['posType'] = _posType; + return map; + } + +} + +/// id : "1797582782721949696" +/// createTime : "2024-06-03 18:55:08" +/// createUser : "1623178240350748672" +/// updateTime : "2024-06-03 18:55:08" +/// updateUser : "1623178240350748672" +/// tenantCode : "1187" +/// storeId : "1509811680584925184" +/// orderId : "1797582782189273088" +/// actInfo : null +/// productId : "1777275921871405056" +/// times : null +/// usedTimes : null +/// productName : "牡丹花认养测试" +/// skuId : "1777291794300534784" +/// skuNameStr : "" +/// skuImg : "" +/// buyNum : 1 +/// refundNum : 0 +/// type : 0 +/// reason : null +/// weight : 0.0 +/// applyPrice : "200.00" +/// sellPrice : "0.01" +/// postPay : "0.00" +/// isDelete : 0 +/// discountAmount : "0.00" +/// discountPercent : 100 +/// status : true +/// batch : 1 +/// deliveries : 1 +/// ticketType : "ADOPT_WARRANT" +/// ticketDays : "365" +/// takeType : null +/// skuTickets : ["牡丹花挂牌*1","有机牡丹籽油250ml*1"] +/// ticketStyle : "{\"mainImage\":\"https://pos.upload.lotus-wallet.com/1185/2022/03/9ac1a67d-b9cd-4430-80c2-4f33670939cd.png\",\"identityImage\":\"https://pos.upload.lotus-wallet.com/1185/2022/03/9ac1a67d-b9cd-4430-80c2-4f33670939cd.png\",\"identityName\":\"认养花卉\",\"signature\":\"牡丹认养\"}" +/// setMealDataList : null +/// packagingFee : "0.00" + +class OrderProductList { + OrderProductList({ + String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String tenantCode, + String storeId, + String orderId, + dynamic actInfo, + String productId, + dynamic times, + dynamic usedTimes, + String productName, + String skuId, + String skuNameStr, + String skuImg, + num buyNum, + num refundNum, + num type, + dynamic reason, + num weight, + String applyPrice, + String sellPrice, + String postPay, + num isDelete, + String discountAmount, + num discountPercent, + bool status, + num batch, + num deliveries, + String ticketType, + String ticketDays, + dynamic takeType, + List skuTickets, + String ticketStyle, + dynamic setMealDataList, + String packagingFee,}){ + _id = id; + _createTime = createTime; + _createUser = createUser; + _updateTime = updateTime; + _updateUser = updateUser; + _tenantCode = tenantCode; + _storeId = storeId; + _orderId = orderId; + _actInfo = actInfo; + _productId = productId; + _times = times; + _usedTimes = usedTimes; + _productName = productName; + _skuId = skuId; + _skuNameStr = skuNameStr; + _skuImg = skuImg; + _buyNum = buyNum; + _refundNum = refundNum; + _type = type; + _reason = reason; + _weight = weight; + _applyPrice = applyPrice; + _sellPrice = sellPrice; + _postPay = postPay; + _isDelete = isDelete; + _discountAmount = discountAmount; + _discountPercent = discountPercent; + _status = status; + _batch = batch; + _deliveries = deliveries; + _ticketType = ticketType; + _ticketDays = ticketDays; + _takeType = takeType; + _skuTickets = skuTickets; + _ticketStyle = ticketStyle; + _setMealDataList = setMealDataList; + _packagingFee = packagingFee; +} + + OrderProductList.fromJson(dynamic json) { + _id = json['id']; + _createTime = json['createTime']; + _createUser = json['createUser']; + _updateTime = json['updateTime']; + _updateUser = json['updateUser']; + _tenantCode = json['tenantCode']; + _storeId = json['storeId']; + _orderId = json['orderId']; + _actInfo = json['actInfo']; + _productId = json['productId']; + _times = json['times']; + _usedTimes = json['usedTimes']; + _productName = json['productName']; + _skuId = json['skuId']; + _skuNameStr = json['skuNameStr']; + _skuImg = json['skuImg']; + _buyNum = json['buyNum']; + _refundNum = json['refundNum']; + _type = json['type']; + _reason = json['reason']; + _weight = json['weight']; + _applyPrice = json['applyPrice']; + _sellPrice = json['sellPrice']; + _postPay = json['postPay']; + _isDelete = json['isDelete']; + _discountAmount = json['discountAmount']; + _discountPercent = json['discountPercent']; + _status = json['status']; + _batch = json['batch']; + _deliveries = json['deliveries']; + _ticketType = json['ticketType']; + _ticketDays = json['ticketDays']; + _takeType = json['takeType']; + _skuTickets = json['skuTickets'] != null ? json['skuTickets'].cast() : []; + _ticketStyle = json['ticketStyle']; + _setMealDataList = json['setMealDataList']; + _packagingFee = json['packagingFee']; + } + String _id; + String _createTime; + String _createUser; + String _updateTime; + String _updateUser; + String _tenantCode; + String _storeId; + String _orderId; + dynamic _actInfo; + String _productId; + dynamic _times; + dynamic _usedTimes; + String _productName; + String _skuId; + String _skuNameStr; + String _skuImg; + num _buyNum; + num _refundNum; + num _type; + dynamic _reason; + num _weight; + String _applyPrice; + String _sellPrice; + String _postPay; + num _isDelete; + String _discountAmount; + num _discountPercent; + bool _status; + num _batch; + num _deliveries; + String _ticketType; + String _ticketDays; + dynamic _takeType; + List _skuTickets; + String _ticketStyle; + dynamic _setMealDataList; + String _packagingFee; +OrderProductList copyWith({ String id, + String createTime, + String createUser, + String updateTime, + String updateUser, + String tenantCode, + String storeId, + String orderId, + dynamic actInfo, + String productId, + dynamic times, + dynamic usedTimes, + String productName, + String skuId, + String skuNameStr, + String skuImg, + num buyNum, + num refundNum, + num type, + dynamic reason, + num weight, + String applyPrice, + String sellPrice, + String postPay, + num isDelete, + String discountAmount, + num discountPercent, + bool status, + num batch, + num deliveries, + String ticketType, + String ticketDays, + dynamic takeType, + List skuTickets, + String ticketStyle, + dynamic setMealDataList, + String packagingFee, +}) => OrderProductList( id: id ?? _id, + createTime: createTime ?? _createTime, + createUser: createUser ?? _createUser, + updateTime: updateTime ?? _updateTime, + updateUser: updateUser ?? _updateUser, + tenantCode: tenantCode ?? _tenantCode, + storeId: storeId ?? _storeId, + orderId: orderId ?? _orderId, + actInfo: actInfo ?? _actInfo, + productId: productId ?? _productId, + times: times ?? _times, + usedTimes: usedTimes ?? _usedTimes, + productName: productName ?? _productName, + skuId: skuId ?? _skuId, + skuNameStr: skuNameStr ?? _skuNameStr, + skuImg: skuImg ?? _skuImg, + buyNum: buyNum ?? _buyNum, + refundNum: refundNum ?? _refundNum, + type: type ?? _type, + reason: reason ?? _reason, + weight: weight ?? _weight, + applyPrice: applyPrice ?? _applyPrice, + sellPrice: sellPrice ?? _sellPrice, + postPay: postPay ?? _postPay, + isDelete: isDelete ?? _isDelete, + discountAmount: discountAmount ?? _discountAmount, + discountPercent: discountPercent ?? _discountPercent, + status: status ?? _status, + batch: batch ?? _batch, + deliveries: deliveries ?? _deliveries, + ticketType: ticketType ?? _ticketType, + ticketDays: ticketDays ?? _ticketDays, + takeType: takeType ?? _takeType, + skuTickets: skuTickets ?? _skuTickets, + ticketStyle: ticketStyle ?? _ticketStyle, + setMealDataList: setMealDataList ?? _setMealDataList, + packagingFee: packagingFee ?? _packagingFee, +); + String get id => _id; + String get createTime => _createTime; + String get createUser => _createUser; + String get updateTime => _updateTime; + String get updateUser => _updateUser; + String get tenantCode => _tenantCode; + String get storeId => _storeId; + String get orderId => _orderId; + dynamic get actInfo => _actInfo; + String get productId => _productId; + dynamic get times => _times; + dynamic get usedTimes => _usedTimes; + String get productName => _productName; + String get skuId => _skuId; + String get skuNameStr => _skuNameStr; + String get skuImg => _skuImg; + num get buyNum => _buyNum; + num get refundNum => _refundNum; + num get type => _type; + dynamic get reason => _reason; + num get weight => _weight; + String get applyPrice => _applyPrice; + String get sellPrice => _sellPrice; + String get postPay => _postPay; + num get isDelete => _isDelete; + String get discountAmount => _discountAmount; + num get discountPercent => _discountPercent; + bool get status => _status; + num get batch => _batch; + num get deliveries => _deliveries; + String get ticketType => _ticketType; + String get ticketDays => _ticketDays; + dynamic get takeType => _takeType; + List get skuTickets => _skuTickets; + String get ticketStyle => _ticketStyle; + dynamic get setMealDataList => _setMealDataList; + String get packagingFee => _packagingFee; + + Map toJson() { + final map = {}; + map['id'] = _id; + map['createTime'] = _createTime; + map['createUser'] = _createUser; + map['updateTime'] = _updateTime; + map['updateUser'] = _updateUser; + map['tenantCode'] = _tenantCode; + map['storeId'] = _storeId; + map['orderId'] = _orderId; + map['actInfo'] = _actInfo; + map['productId'] = _productId; + map['times'] = _times; + map['usedTimes'] = _usedTimes; + map['productName'] = _productName; + map['skuId'] = _skuId; + map['skuNameStr'] = _skuNameStr; + map['skuImg'] = _skuImg; + map['buyNum'] = _buyNum; + map['refundNum'] = _refundNum; + map['type'] = _type; + map['reason'] = _reason; + map['weight'] = _weight; + map['applyPrice'] = _applyPrice; + map['sellPrice'] = _sellPrice; + map['postPay'] = _postPay; + map['isDelete'] = _isDelete; + map['discountAmount'] = _discountAmount; + map['discountPercent'] = _discountPercent; + map['status'] = _status; + map['batch'] = _batch; + map['deliveries'] = _deliveries; + map['ticketType'] = _ticketType; + map['ticketDays'] = _ticketDays; + map['takeType'] = _takeType; + map['skuTickets'] = _skuTickets; + map['ticketStyle'] = _ticketStyle; + map['setMealDataList'] = _setMealDataList; + map['packagingFee'] = _packagingFee; + return map; + } + +} + +/// name : "兰东" +/// mobile : "17612711844" +/// idcard : "" + +class ContactsExtList { + ContactsExtList({ + String name, + String mobile, + String idcard,}){ + _name = name; + _mobile = mobile; + _idcard = idcard; +} + + ContactsExtList.fromJson(dynamic json) { + _name = json['name']; + _mobile = json['mobile']; + _idcard = json['idcard']; + } + String _name; + String _mobile; + String _idcard; +ContactsExtList copyWith({ String name, + String mobile, + String idcard, +}) => ContactsExtList( name: name ?? _name, + mobile: mobile ?? _mobile, + idcard: idcard ?? _idcard, +); + String get name => _name; + String get mobile => _mobile; + String get idcard => _idcard; + + Map toJson() { + final map = {}; + map['name'] = _name; + map['mobile'] = _mobile; + map['idcard'] = _idcard; + return map; + } + +} + +/// addressId : "1777546429707845632" +/// country : null +/// countryId : null +/// province : "湖北省" +/// provinceId : null +/// city : "武汉市" +/// cityId : null +/// district : "江岸区" +/// districtId : null +/// cityInfo : "江岸区会议中心" +/// address : "中海中心" +/// recName : "" +/// recMobile : "17612711844" +/// longitude : "114.3096" +/// latitude : "30.59982" + +class AddressExt { + AddressExt({ + String addressId, + dynamic country, + dynamic countryId, + String province, + dynamic provinceId, + String city, + dynamic cityId, + String district, + dynamic districtId, + String cityInfo, + String address, + String recName, + String recMobile, + String longitude, + String latitude,}){ + _addressId = addressId; + _country = country; + _countryId = countryId; + _province = province; + _provinceId = provinceId; + _city = city; + _cityId = cityId; + _district = district; + _districtId = districtId; + _cityInfo = cityInfo; + _address = address; + _recName = recName; + _recMobile = recMobile; + _longitude = longitude; + _latitude = latitude; +} + + AddressExt.fromJson(dynamic json) { + _addressId = json['addressId']; + _country = json['country']; + _countryId = json['countryId']; + _province = json['province']; + _provinceId = json['provinceId']; + _city = json['city']; + _cityId = json['cityId']; + _district = json['district']; + _districtId = json['districtId']; + _cityInfo = json['cityInfo']; + _address = json['address']; + _recName = json['recName']; + _recMobile = json['recMobile']; + _longitude = json['longitude']; + _latitude = json['latitude']; + } + String _addressId; + dynamic _country; + dynamic _countryId; + String _province; + dynamic _provinceId; + String _city; + dynamic _cityId; + String _district; + dynamic _districtId; + String _cityInfo; + String _address; + String _recName; + String _recMobile; + String _longitude; + String _latitude; +AddressExt copyWith({ String addressId, + dynamic country, + dynamic countryId, + String province, + dynamic provinceId, + String city, + dynamic cityId, + String district, + dynamic districtId, + String cityInfo, + String address, + String recName, + String recMobile, + String longitude, + String latitude, +}) => AddressExt( addressId: addressId ?? _addressId, + country: country ?? _country, + countryId: countryId ?? _countryId, + province: province ?? _province, + provinceId: provinceId ?? _provinceId, + city: city ?? _city, + cityId: cityId ?? _cityId, + district: district ?? _district, + districtId: districtId ?? _districtId, + cityInfo: cityInfo ?? _cityInfo, + address: address ?? _address, + recName: recName ?? _recName, + recMobile: recMobile ?? _recMobile, + longitude: longitude ?? _longitude, + latitude: latitude ?? _latitude, +); + String get addressId => _addressId; + dynamic get country => _country; + dynamic get countryId => _countryId; + String get province => _province; + dynamic get provinceId => _provinceId; + String get city => _city; + dynamic get cityId => _cityId; + String get district => _district; + dynamic get districtId => _districtId; + String get cityInfo => _cityInfo; + String get address => _address; + String get recName => _recName; + String get recMobile => _recMobile; + String get longitude => _longitude; + String get latitude => _latitude; + + Map toJson() { + final map = {}; + map['addressId'] = _addressId; + map['country'] = _country; + map['countryId'] = _countryId; + map['province'] = _province; + map['provinceId'] = _provinceId; + map['city'] = _city; + map['cityId'] = _cityId; + map['district'] = _district; + map['districtId'] = _districtId; + map['cityInfo'] = _cityInfo; + map['address'] = _address; + map['recName'] = _recName; + map['recMobile'] = _recMobile; + map['longitude'] = _longitude; + map['latitude'] = _latitude; + return map; + } + +} \ No newline at end of file diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 6c6f2a94..89992773 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -41,6 +41,7 @@ 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'; @@ -641,4 +642,8 @@ abstract class ApiService { ///开票历史 @POST("invoice/page") Future> invoicePage(@Body() Map param); + + ///发票详情 + @GET("invoice/detail{id}") + Future> invoiceDetail(@Path("id") String id); } diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 73e9cdfb..1687b97c 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -2464,4 +2464,26 @@ class _ApiService implements ApiService { ); return value; } + + @override + Future> invoiceDetail(id) async { + ArgumentError.checkNotNull(id, 'id'); + const _extra = {}; + final queryParameters = {}; + final _data = {}; + final _result = await _dio.request>( + 'invoice/detail/$id', + queryParameters: queryParameters, + options: RequestOptions( + method: 'GET', + headers: {}, + extra: _extra, + baseUrl: baseUrl), + data: _data); + final value = BaseData.fromJson( + _result.data, + (json) => InvoicesDetailInfo.fromJson(json), + ); + return value; + } } diff --git a/pubspec.lock b/pubspec.lock index 60df8c48..29986636 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -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: @@ -481,10 +489,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: @@ -689,10 +697,10 @@ 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: @@ -1215,10 +1223,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 +1247,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: diff --git a/pubspec.yaml b/pubspec.yaml index 37ad775e..4cffcde9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,6 +17,8 @@ dependencies: tobias: 2.4.1 + #pdf展示 + flutter_pdfview: ^1.3.2 gradient_widgets: ^0.6.0 @@ -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 From 12c1a1cfa4df51a98422608a5dc8321d75ad04a1 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Tue, 13 Aug 2024 11:12:41 +0800 Subject: [PATCH 18/23] =?UTF-8?q?pdf=E5=B1=95=E7=A4=BA=E6=9B=B4=E6=8D=A2?= =?UTF-8?q?=E4=BE=9D=E8=B5=96pdfx;=20=E6=8E=A5=E5=8F=A3=E6=96=87=E6=A1=A3?= =?UTF-8?q?=E6=96=B0=E5=A2=9EUint8List=E6=96=87=E4=BB=B6=E8=BD=AC=E6=8D=A2?= =?UTF-8?q?;=20=E4=BC=98=E6=83=A0=E5=88=B8=E9=A1=B5=E9=9D=A2ui=E7=BD=91?= =?UTF-8?q?=E7=BB=9C=E5=BC=82=E5=B8=B8=E6=98=BE=E7=A4=BA=E6=9B=B4=E6=94=B9?= =?UTF-8?q?;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/main.dart | 3 + lib/mine/coupon_page.dart | 57 +++++++- .../invoices_manage/invoices_detail_page.dart | 28 +++- .../invoices_manage/invoices_history.dart | 2 +- lib/order/invoices_manage/pdf_screen.dart | 16 ++- lib/order/invoices_manage/pinch_page.dart | 125 ++++++++++++++++++ lib/retrofit/retrofit_api.dart | 2 + lib/retrofit/retrofit_api.g.dart | 16 +++ pubspec.lock | 88 ++++++++++++ pubspec.yaml | 2 + 10 files changed, 324 insertions(+), 15 deletions(-) create mode 100644 lib/order/invoices_manage/pinch_page.dart diff --git a/lib/main.dart b/lib/main.dart index 882d4d1e..253ad21e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -175,6 +175,7 @@ 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'; +import 'order/invoices_manage/pinch_page.dart'; void main() async { @@ -426,6 +427,8 @@ Map routers = { GroupPageDetails(arguments:arguments), '/router/photo_view_gallery_screen': (context, {arguments}) => PhotoViewGalleryScreen(), + '/router/pinch_page': (context, {arguments}) => + PinchPage(), '/router/system_details': (context, {arguments}) => SystemDetails(arguments: arguments), '/router/invitation_record': (context, {arguments}) => diff --git a/lib/mine/coupon_page.dart b/lib/mine/coupon_page.dart index c7edf812..c4e2a51b 100644 --- a/lib/mine/coupon_page.dart +++ b/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 createState() { @@ -33,6 +35,7 @@ class _CouponPage extends State { ApiService apiService; RefreshController _refreshController; int networkStatus = 0; + String networkError = ""; @override void dispose() { @@ -69,7 +72,9 @@ class _CouponPage extends State { "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 { ), 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 { 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 { ); } + 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), + )), + ) + ], + ), + ); + } + } diff --git a/lib/order/invoices_manage/invoices_detail_page.dart b/lib/order/invoices_manage/invoices_detail_page.dart index 60c72891..d291c48b 100644 --- a/lib/order/invoices_manage/invoices_detail_page.dart +++ b/lib/order/invoices_manage/invoices_detail_page.dart @@ -9,7 +9,9 @@ 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:huixiang/order/invoices_manage/pinch_page.dart'; import 'package:path_provider/path_provider.dart'; +import 'package:pdfx/pdfx.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:shimmer/shimmer.dart'; @@ -43,6 +45,7 @@ class _InvoicesDetailPage extends State { String networkError = ""; int networkStatus = 0; final RefreshController refreshController = RefreshController(); + PdfController pdfDoc; @override void initState() { @@ -53,7 +56,7 @@ class _InvoicesDetailPage extends State { context: context, token: value.getString('token'), ), - queryInvoices(widget?.arguments["id"] ?? ""), + queryInvoices("1797587255380934656"), }); } @@ -84,6 +87,10 @@ class _InvoicesDetailPage extends State { }); if (baseData != null && baseData.isSuccess) { invoicesDetailInfo = baseData.data; + final pdfFile = await createFileOfPdfUrl(); + pdfDoc = PdfController( + document: PdfDocument.openFile(pdfFile.path), + ); createFileOfPdfUrl().then((f) { setState(() { remotePDFpath = f.path; @@ -104,7 +111,7 @@ class _InvoicesDetailPage extends State { Completer completer = Completer(); print("Start download file from internet!"); try { - final url = invoicesDetailInfo?.ossUrl ?? ""; + final url = "https://file.oa.yixinhuixiang.com/2024/08/06/e716b61ed0c4444db4e8e33bf2712432.pdf"; final filename = url.substring(url.lastIndexOf("/") + 1); var request = await HttpClient().getUrl(Uri.parse(url)); var response = await request.close(); @@ -298,12 +305,21 @@ class _InvoicesDetailPage extends State { onTap: () { if ((invoicesDetailInfo?.ossUrl ?? "") .endsWith("pdf")) { + // Navigator.push( + // context, + // MaterialPageRoute( + // builder: (context) => PDFScreen( + // path: remotePDFpath, + // inlet: 0, + // ), + // ), + // ); Navigator.push( context, MaterialPageRoute( - builder: (context) => PDFScreen( - path: remotePDFpath, - inlet: 0, + builder: (context) => PinchPage( + path: "https://file.oa.yixinhuixiang.com/2024/08/06/e716b61ed0c4444db4e8e33bf2712432.pdf", + inlet:0 ), ), ); @@ -473,7 +489,7 @@ class _InvoicesDetailPage extends State { showDialog( context: context, builder: (BuildContext context) { - return PDFScreen(path: remotePDFpath, inlet: 1); + return PDFScreen(path:remotePDFpath, inlet: 1); }, ); } diff --git a/lib/order/invoices_manage/invoices_history.dart b/lib/order/invoices_manage/invoices_history.dart index 79a4c3b5..6a94cd4c 100644 --- a/lib/order/invoices_manage/invoices_history.dart +++ b/lib/order/invoices_manage/invoices_history.dart @@ -201,7 +201,7 @@ class _InvoicesHistory extends State { return GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { - if(records[position].state == "AUDIT_PASS") + // if(records[position].state == "AUDIT_PASS") Navigator.of(context) .pushNamed('/router/invoices_detail_page',arguments: { "id":records[position].id ?? "" diff --git a/lib/order/invoices_manage/pdf_screen.dart b/lib/order/invoices_manage/pdf_screen.dart index ed87f604..7e1079fa 100644 --- a/lib/order/invoices_manage/pdf_screen.dart +++ b/lib/order/invoices_manage/pdf_screen.dart @@ -69,11 +69,15 @@ class _PDFScreenState extends State with WidgetsBindingObserver { print('goto uri: $uri'); }, onPageChanged: (int page, int total) { - print('page change: $page/$total'); - setState(() { - currentPage = page; - pageTotal = total; - }); + if(total >0){ + print('page change: $page/$total'); + setState(() { + currentPage = page +1; + pageTotal = total; + }); + }else{ + pageTotal = 1; + } }, ), ), @@ -92,7 +96,7 @@ class _PDFScreenState extends State with WidgetsBindingObserver { width: MediaQuery.of(context).size.width, bottom:45, child: Center( - child: Text("${currentPage+1}/${pageTotal}",style: TextStyle(color: Colors.white,fontSize: 16)), + child: Text("${currentPage}/${pageTotal}",style: TextStyle(color: Colors.white,fontSize: 16)), ), ), ], diff --git a/lib/order/invoices_manage/pinch_page.dart b/lib/order/invoices_manage/pinch_page.dart new file mode 100644 index 00000000..99c8e7ba --- /dev/null +++ b/lib/order/invoices_manage/pinch_page.dart @@ -0,0 +1,125 @@ +import 'package:dio/dio.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:pdfx/pdfx.dart'; + +import '../../retrofit/retrofit_api.dart'; + +class PinchPage extends StatefulWidget { + final String path; + final int inlet; + const PinchPage({Key key,this.path,this.inlet}) : super(key: key); + + @override + State createState() => _PinchPageState(); +} + +enum DocShown { sample, tutorial, hello, password } + +class _PinchPageState extends State { + static const int _initialPage = 1; + PdfControllerPinch _pdfControllerPinch; + ApiService apiService; + + @override + void initState() { + apiService = ApiService( + Dio(), + context: context, + ); + _pdfControllerPinch = PdfControllerPinch( + document: PdfDocument.openData( + apiService.getUrlFile(widget.path ?? "") + ), + initialPage: _initialPage, + ); + super.initState(); + } + + @override + void dispose() { + _pdfControllerPinch.dispose(); + super.dispose(); + } + + @override + Widget build(BuildContext context) { + return widget.inlet == 0 ? Scaffold( + backgroundColor: Colors.white, + body: Column( + children: [ + Container( + alignment: Alignment.topRight, + padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top,right:10), + child: IconButton( + icon: Icon(Icons.close,size: 30,color: Colors.black,), + onPressed: (){ + Navigator.of(context).pop(); + }, + ), + ), + Expanded(child: PdfViewPinch( + builders: PdfViewPinchBuilders( + options: const DefaultBuilderOptions(), + documentLoaderBuilder: (_) => + const Center(child: CircularProgressIndicator()), + pageLoaderBuilder: (_) => + const Center(child: CircularProgressIndicator()), + errorBuilder: (_, error) => Center(child: Text(error.toString())), + ), + controller: _pdfControllerPinch, + )), + Container( + padding:EdgeInsets.only(bottom:45,top:20), + width: MediaQuery.of(context).size.width, + child: Center( + child: PdfPageNumber( + controller: _pdfControllerPinch, + builder: (_, loadingState, page, pagesCount) => Container( + alignment: Alignment.center, + child: Text( + '$page/${pagesCount ?? 0}', + style: const TextStyle(fontSize:16), + ), + ), + ), + ), + ), + ], + ), + ):Column( + children: [ + Expanded(child: Padding( + padding: EdgeInsets.symmetric(vertical:200), + child: PdfViewPinch( + builders: PdfViewPinchBuilders( + options: const DefaultBuilderOptions(), + documentLoaderBuilder: (_) => + const Center(child: CircularProgressIndicator()), + pageLoaderBuilder: (_) => + const Center(child: CircularProgressIndicator()), + errorBuilder: (_, error) => Center(child: Text(error.toString())), + ), + controller: _pdfControllerPinch, + ), + )), + Container( + padding:EdgeInsets.only(bottom:45,top:20), + width: MediaQuery.of(context).size.width, + child: Center( + child: PdfPageNumber( + controller: _pdfControllerPinch, + builder: (_, loadingState, page, pagesCount) => Container( + alignment: Alignment.center, + child: Text( + '$page/${pagesCount ?? 0}', + style: const TextStyle(fontSize:16,color: Colors.white), + ), + ), + ), + ), + ), + ], + ); + } +} \ No newline at end of file diff --git a/lib/retrofit/retrofit_api.dart b/lib/retrofit/retrofit_api.dart index 89992773..d00fa53c 100644 --- a/lib/retrofit/retrofit_api.dart +++ b/lib/retrofit/retrofit_api.dart @@ -615,6 +615,8 @@ abstract class ApiService { @GET("/ipJson.jsp") Future getIpInfo(); + Future getUrlFile(String url); + ///查询订单状态完成的并且可以开发票的订单列表 @POST("order/invoiceOrderList") Future> invoiceOrderList(@Body() Map param); diff --git a/lib/retrofit/retrofit_api.g.dart b/lib/retrofit/retrofit_api.g.dart index 1687b97c..a2d78c6a 100644 --- a/lib/retrofit/retrofit_api.g.dart +++ b/lib/retrofit/retrofit_api.g.dart @@ -2190,6 +2190,22 @@ class _ApiService implements ApiService { return value; } + @override + Future getUrlFile(String url) async { + const _extra = {}; + final queryParameters = {}; + final _data = {}; + final _result = await _dio.request>(url, + queryParameters: queryParameters, + options: RequestOptions( + method: 'GET', + extra: _extra, + baseUrl: baseUrl, + responseType: ResponseType.bytes), + data: _data); + return _result.data; + } + @override Future> orderVip(param) async { ArgumentError.checkNotNull(param, 'param'); diff --git a/pubspec.lock b/pubspec.lock index 29986636..ba22c5dc 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -169,6 +169,54 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.0.5" + device_info_plus: + dependency: transitive + description: + name: device_info_plus + sha256: c2386729379f04cd39ee0d5d4c48d8c8a0e70f7622dac626cbf5e396392602fd + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.2.4" + device_info_plus_linux: + dependency: transitive + description: + name: device_info_plus_linux + sha256: e4eb5db4704f5534e872148a21cfcd39581022b63df556da6720d88f7c9f91a9 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.1" + device_info_plus_macos: + dependency: transitive + description: + name: device_info_plus_macos + sha256: "38871fd2ad31871399d8307630c9f4eb5941dd2c643ee221c44d58de95d367a1" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.2.3" + device_info_plus_platform_interface: + dependency: transitive + description: + name: device_info_plus_platform_interface + sha256: b2743934f0efc3e291880d76fb341ea114b7e8417d77ee0f93bd21f5dfd3e8d2 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.6.1" + device_info_plus_web: + dependency: transitive + description: + name: device_info_plus_web + sha256: "38715ad1ef3bee8915dd7bee08a9ac9ab54472a8df425c887062a3046209f663" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.0" + device_info_plus_windows: + dependency: transitive + description: + name: device_info_plus_windows + sha256: "8fb1403fc94636d6ab48aeebb5f9379f2ca51cde3b337167ec6f39db09234492" + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.1.1" dio: dependency: "direct main" description: @@ -209,6 +257,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" + extension: + dependency: transitive + description: + name: extension + sha256: "755224c11fcbfb81d622e38befd05581b52566529a08f2407e424219200ac7cf" + url: "https://pub.flutter-io.cn" + source: hosted + version: "0.2.0" fake_async: dependency: transitive description: @@ -701,6 +757,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.0.7" + pdfx: + dependency: "direct main" + description: + name: pdfx + sha256: bdd269f7316630698b514778dd071c602cf1862c6e8c6661a74308970db1dc67 + url: "https://pub.flutter-io.cn" + source: hosted + version: "2.0.1+2" permission_handler: dependency: "direct main" description: @@ -1026,6 +1090,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "19.4.56" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.1.0" table_calendar: dependency: "direct main" description: @@ -1099,6 +1171,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.2.7" + universal_platform: + dependency: transitive + description: + name: universal_platform + sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec" + url: "https://pub.flutter-io.cn" + source: hosted + version: "1.1.0" url_launcher: dependency: "direct main" description: @@ -1131,6 +1211,14 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.1.3" + uuid: + dependency: transitive + description: + name: uuid + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.flutter-io.cn" + source: hosted + version: "3.0.7" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 4cffcde9..9085c17b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -20,6 +20,8 @@ dependencies: #pdf展示 flutter_pdfview: ^1.3.2 + pdfx: ^2.0.1+2 + gradient_widgets: ^0.6.0 keframe: ^3.0.0 From dde951ffb9bc656d33d5df1218eabea06eaa5daa Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 13 Aug 2024 11:16:07 +0800 Subject: [PATCH 19/23] ios --- ios/Podfile.lock | 12 +++- ios/Runner.xcodeproj/project.pbxproj | 6 +- lib/order/invoices_manage/pdf_screen.dart | 4 +- pubspec.lock | 72 ++++------------------- pubspec.yaml | 6 +- 5 files changed, 29 insertions(+), 71 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index e1132683..0604e966 100644 --- a/ios/Podfile.lock +++ b/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 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 05a2171d..8441f8a3 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/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 = 5; + CURRENT_PROJECT_VERSION = 6; 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 = 5; + CURRENT_PROJECT_VERSION = 6; 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 = 5; + CURRENT_PROJECT_VERSION = 6; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/order/invoices_manage/pdf_screen.dart b/lib/order/invoices_manage/pdf_screen.dart index 7e1079fa..c44eb8c4 100644 --- a/lib/order/invoices_manage/pdf_screen.dart +++ b/lib/order/invoices_manage/pdf_screen.dart @@ -17,7 +17,7 @@ class _PDFScreenState extends State with WidgetsBindingObserver { final Completer _controller = Completer(); int pages = 0; int currentPage = 0; - int pageTotal =0; + int pageTotal =1; bool isReady = false; String errorMessage = ''; @@ -31,7 +31,7 @@ class _PDFScreenState extends State with WidgetsBindingObserver { child: Container( height:250, decoration: BoxDecoration( - color: Colors.transparent, + color: Colors.white, ), child: PDFView( filePath: widget.path, diff --git a/pubspec.lock b/pubspec.lock index ba22c5dc..f4ceccb5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -465,50 +465,26 @@ packages: dependency: "direct main" description: name: geolocator - sha256: "5c496b46e245d006760e643cedde7c9fa785a34391b5eca857a46358f9bde02b" + sha256: "01fed879aa87185efebfb1d23de619077bcc7d83ffdebd0aad6f74392f84fb40" url: "https://pub.flutter-io.cn" source: hosted - version: "8.2.1" - geolocator_android: - dependency: transitive - description: - name: geolocator_android - sha256: "3fa9215caf1e4463adbdf1f21b07fdcb9bc2af2ef1df3715a52376b87bebb087" - 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: @@ -769,42 +745,18 @@ packages: dependency: "direct main" description: name: permission_handler - sha256: "5749ebeb7ec0c3865ea17e3eb337174b87747be816dab582c551e1aff6f6bbf3" + sha256: fb4666087528b1cbf91d98771cf50b14f36f4d8756ec7e7a8629dd3cb55442b7 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" - 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" + sha256: f7e3c798f7c4dd215e4ca8843695b3a63a5b79c9aa04f296d316f13a15d518ba url: "https://pub.flutter-io.cn" source: hosted - version: "3.12.0" - permission_handler_windows: - dependency: transitive - description: - name: permission_handler_windows - sha256: cc074aace208760f1eee6aa4fae766b45d947df85bc831cde77009cdb4720098 - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.1.3" + version: "2.0.2" petitparser: dependency: transitive description: @@ -849,10 +801,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: diff --git a/pubspec.yaml b/pubspec.yaml index 9085c17b..4d229169 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,7 +18,7 @@ dependencies: tobias: 2.4.1 #pdf展示 - flutter_pdfview: ^1.3.2 + flutter_pdfview: ^1.2.7 pdfx: ^2.0.1+2 @@ -43,9 +43,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 From 6946e2ad46403eda406453294570c2271d0aa02f Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 13 Aug 2024 12:27:15 +0800 Subject: [PATCH 20/23] =?UTF-8?q?ios=20pdf=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Runner.xcodeproj/project.pbxproj | 6 +- lib/main.dart | 3 - .../invoices_manage/invoices_detail_page.dart | 24 +--- lib/order/invoices_manage/pdf_screen.dart | 7 +- lib/order/invoices_manage/pinch_page.dart | 125 ------------------ pubspec.lock | 88 ------------ pubspec.yaml | 4 +- 7 files changed, 13 insertions(+), 244 deletions(-) delete mode 100644 lib/order/invoices_manage/pinch_page.dart diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 8441f8a3..52a55458 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/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 = 6; + CURRENT_PROJECT_VERSION = 7; 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 = 6; + CURRENT_PROJECT_VERSION = 7; 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 = 6; + CURRENT_PROJECT_VERSION = 7; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/main.dart b/lib/main.dart index 253ad21e..882d4d1e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -175,7 +175,6 @@ 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'; -import 'order/invoices_manage/pinch_page.dart'; void main() async { @@ -427,8 +426,6 @@ Map routers = { GroupPageDetails(arguments:arguments), '/router/photo_view_gallery_screen': (context, {arguments}) => PhotoViewGalleryScreen(), - '/router/pinch_page': (context, {arguments}) => - PinchPage(), '/router/system_details': (context, {arguments}) => SystemDetails(arguments: arguments), '/router/invitation_record': (context, {arguments}) => diff --git a/lib/order/invoices_manage/invoices_detail_page.dart b/lib/order/invoices_manage/invoices_detail_page.dart index d291c48b..68247a8b 100644 --- a/lib/order/invoices_manage/invoices_detail_page.dart +++ b/lib/order/invoices_manage/invoices_detail_page.dart @@ -9,9 +9,7 @@ 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:huixiang/order/invoices_manage/pinch_page.dart'; import 'package:path_provider/path_provider.dart'; -import 'package:pdfx/pdfx.dart'; import 'package:pull_to_refresh/pull_to_refresh.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:shimmer/shimmer.dart'; @@ -45,7 +43,6 @@ class _InvoicesDetailPage extends State { String networkError = ""; int networkStatus = 0; final RefreshController refreshController = RefreshController(); - PdfController pdfDoc; @override void initState() { @@ -87,10 +84,6 @@ class _InvoicesDetailPage extends State { }); if (baseData != null && baseData.isSuccess) { invoicesDetailInfo = baseData.data; - final pdfFile = await createFileOfPdfUrl(); - pdfDoc = PdfController( - document: PdfDocument.openFile(pdfFile.path), - ); createFileOfPdfUrl().then((f) { setState(() { remotePDFpath = f.path; @@ -305,21 +298,12 @@ class _InvoicesDetailPage extends State { onTap: () { if ((invoicesDetailInfo?.ossUrl ?? "") .endsWith("pdf")) { - // Navigator.push( - // context, - // MaterialPageRoute( - // builder: (context) => PDFScreen( - // path: remotePDFpath, - // inlet: 0, - // ), - // ), - // ); Navigator.push( context, MaterialPageRoute( - builder: (context) => PinchPage( - path: "https://file.oa.yixinhuixiang.com/2024/08/06/e716b61ed0c4444db4e8e33bf2712432.pdf", - inlet:0 + builder: (context) => PDFScreen( + path: remotePDFpath, + inlet: 0, ), ), ); @@ -489,7 +473,7 @@ class _InvoicesDetailPage extends State { showDialog( context: context, builder: (BuildContext context) { - return PDFScreen(path:remotePDFpath, inlet: 1); + return PDFScreen(path: remotePDFpath, inlet: 1); }, ); } diff --git a/lib/order/invoices_manage/pdf_screen.dart b/lib/order/invoices_manage/pdf_screen.dart index c44eb8c4..fe8b6511 100644 --- a/lib/order/invoices_manage/pdf_screen.dart +++ b/lib/order/invoices_manage/pdf_screen.dart @@ -139,12 +139,15 @@ class _PDFScreenState extends State with WidgetsBindingObserver { onLinkHandler: (String uri) { print('goto uri: $uri'); }, - onPageChanged: (int page, int total) { + onPageChanged: (int page, int total) { if(total >0){ print('page change: $page/$total'); setState(() { - currentPage = page; + currentPage = page +1; pageTotal = total; }); + }else{ + pageTotal = 1; + } }, ), errorMessage.isEmpty diff --git a/lib/order/invoices_manage/pinch_page.dart b/lib/order/invoices_manage/pinch_page.dart deleted file mode 100644 index 99c8e7ba..00000000 --- a/lib/order/invoices_manage/pinch_page.dart +++ /dev/null @@ -1,125 +0,0 @@ -import 'package:dio/dio.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/material.dart'; -import 'package:pdfx/pdfx.dart'; - -import '../../retrofit/retrofit_api.dart'; - -class PinchPage extends StatefulWidget { - final String path; - final int inlet; - const PinchPage({Key key,this.path,this.inlet}) : super(key: key); - - @override - State createState() => _PinchPageState(); -} - -enum DocShown { sample, tutorial, hello, password } - -class _PinchPageState extends State { - static const int _initialPage = 1; - PdfControllerPinch _pdfControllerPinch; - ApiService apiService; - - @override - void initState() { - apiService = ApiService( - Dio(), - context: context, - ); - _pdfControllerPinch = PdfControllerPinch( - document: PdfDocument.openData( - apiService.getUrlFile(widget.path ?? "") - ), - initialPage: _initialPage, - ); - super.initState(); - } - - @override - void dispose() { - _pdfControllerPinch.dispose(); - super.dispose(); - } - - @override - Widget build(BuildContext context) { - return widget.inlet == 0 ? Scaffold( - backgroundColor: Colors.white, - body: Column( - children: [ - Container( - alignment: Alignment.topRight, - padding: EdgeInsets.only(top: MediaQuery.of(context).padding.top,right:10), - child: IconButton( - icon: Icon(Icons.close,size: 30,color: Colors.black,), - onPressed: (){ - Navigator.of(context).pop(); - }, - ), - ), - Expanded(child: PdfViewPinch( - builders: PdfViewPinchBuilders( - options: const DefaultBuilderOptions(), - documentLoaderBuilder: (_) => - const Center(child: CircularProgressIndicator()), - pageLoaderBuilder: (_) => - const Center(child: CircularProgressIndicator()), - errorBuilder: (_, error) => Center(child: Text(error.toString())), - ), - controller: _pdfControllerPinch, - )), - Container( - padding:EdgeInsets.only(bottom:45,top:20), - width: MediaQuery.of(context).size.width, - child: Center( - child: PdfPageNumber( - controller: _pdfControllerPinch, - builder: (_, loadingState, page, pagesCount) => Container( - alignment: Alignment.center, - child: Text( - '$page/${pagesCount ?? 0}', - style: const TextStyle(fontSize:16), - ), - ), - ), - ), - ), - ], - ), - ):Column( - children: [ - Expanded(child: Padding( - padding: EdgeInsets.symmetric(vertical:200), - child: PdfViewPinch( - builders: PdfViewPinchBuilders( - options: const DefaultBuilderOptions(), - documentLoaderBuilder: (_) => - const Center(child: CircularProgressIndicator()), - pageLoaderBuilder: (_) => - const Center(child: CircularProgressIndicator()), - errorBuilder: (_, error) => Center(child: Text(error.toString())), - ), - controller: _pdfControllerPinch, - ), - )), - Container( - padding:EdgeInsets.only(bottom:45,top:20), - width: MediaQuery.of(context).size.width, - child: Center( - child: PdfPageNumber( - controller: _pdfControllerPinch, - builder: (_, loadingState, page, pagesCount) => Container( - alignment: Alignment.center, - child: Text( - '$page/${pagesCount ?? 0}', - style: const TextStyle(fontSize:16,color: Colors.white), - ), - ), - ), - ), - ), - ], - ); - } -} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index f4ceccb5..e4aa165a 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -169,54 +169,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.0.5" - device_info_plus: - dependency: transitive - description: - name: device_info_plus - sha256: c2386729379f04cd39ee0d5d4c48d8c8a0e70f7622dac626cbf5e396392602fd - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.2.4" - device_info_plus_linux: - dependency: transitive - description: - name: device_info_plus_linux - sha256: e4eb5db4704f5534e872148a21cfcd39581022b63df556da6720d88f7c9f91a9 - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.1" - device_info_plus_macos: - dependency: transitive - description: - name: device_info_plus_macos - sha256: "38871fd2ad31871399d8307630c9f4eb5941dd2c643ee221c44d58de95d367a1" - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.2.3" - device_info_plus_platform_interface: - dependency: transitive - description: - name: device_info_plus_platform_interface - sha256: b2743934f0efc3e291880d76fb341ea114b7e8417d77ee0f93bd21f5dfd3e8d2 - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.6.1" - device_info_plus_web: - dependency: transitive - description: - name: device_info_plus_web - sha256: "38715ad1ef3bee8915dd7bee08a9ac9ab54472a8df425c887062a3046209f663" - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.0" - device_info_plus_windows: - dependency: transitive - description: - name: device_info_plus_windows - sha256: "8fb1403fc94636d6ab48aeebb5f9379f2ca51cde3b337167ec6f39db09234492" - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.1.1" dio: dependency: "direct main" description: @@ -257,14 +209,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.0.0" - extension: - dependency: transitive - description: - name: extension - sha256: "755224c11fcbfb81d622e38befd05581b52566529a08f2407e424219200ac7cf" - url: "https://pub.flutter-io.cn" - source: hosted - version: "0.2.0" fake_async: dependency: transitive description: @@ -733,14 +677,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "2.0.7" - pdfx: - dependency: "direct main" - description: - name: pdfx - sha256: bdd269f7316630698b514778dd071c602cf1862c6e8c6661a74308970db1dc67 - url: "https://pub.flutter-io.cn" - source: hosted - version: "2.0.1+2" permission_handler: dependency: "direct main" description: @@ -1042,14 +978,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "19.4.56" - synchronized: - dependency: transitive - description: - name: synchronized - sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.1.0" table_calendar: dependency: "direct main" description: @@ -1123,14 +1051,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "1.2.7" - universal_platform: - dependency: transitive - description: - name: universal_platform - sha256: "64e16458a0ea9b99260ceb5467a214c1f298d647c659af1bff6d3bf82536b1ec" - url: "https://pub.flutter-io.cn" - source: hosted - version: "1.1.0" url_launcher: dependency: "direct main" description: @@ -1163,14 +1083,6 @@ packages: url: "https://pub.flutter-io.cn" source: hosted version: "0.1.3" - uuid: - dependency: transitive - description: - name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" - url: "https://pub.flutter-io.cn" - source: hosted - version: "3.0.7" vector_math: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 4d229169..20e98c3c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -18,9 +18,7 @@ dependencies: tobias: 2.4.1 #pdf展示 - flutter_pdfview: ^1.2.7 - - pdfx: ^2.0.1+2 + flutter_pdfview: ^1.3.2 gradient_widgets: ^0.6.0 From 634d1cc10dacdac8f0223a66fa2dde8c20c5836e Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Tue, 13 Aug 2024 13:42:56 +0800 Subject: [PATCH 21/23] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E8=B0=83=E6=95=B4;=20pdf=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=9B=B4=E6=94=B9;?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../invoices_manage/invoices_detail_page.dart | 6 +- lib/order/invoices_manage/pdf_screen.dart | 329 +++++++++--------- 2 files changed, 172 insertions(+), 163 deletions(-) diff --git a/lib/order/invoices_manage/invoices_detail_page.dart b/lib/order/invoices_manage/invoices_detail_page.dart index 68247a8b..54bbae9a 100644 --- a/lib/order/invoices_manage/invoices_detail_page.dart +++ b/lib/order/invoices_manage/invoices_detail_page.dart @@ -53,7 +53,7 @@ class _InvoicesDetailPage extends State { context: context, token: value.getString('token'), ), - queryInvoices("1797587255380934656"), + queryInvoices(widget?.arguments["id"] ??""), }); } @@ -104,7 +104,7 @@ class _InvoicesDetailPage extends State { Completer completer = Completer(); print("Start download file from internet!"); try { - final url = "https://file.oa.yixinhuixiang.com/2024/08/06/e716b61ed0c4444db4e8e33bf2712432.pdf"; + final url = invoicesDetailInfo?.ossUrl ?? ""; final filename = url.substring(url.lastIndexOf("/") + 1); var request = await HttpClient().getUrl(Uri.parse(url)); var response = await request.close(); @@ -478,7 +478,7 @@ class _InvoicesDetailPage extends State { ); } - ///打开浏览器 + ///下载电子发票 launchBrowser() async { String url = invoicesDetailInfo?.ossUrl ?? ""; if (await canLaunch(url)) { diff --git a/lib/order/invoices_manage/pdf_screen.dart b/lib/order/invoices_manage/pdf_screen.dart index fe8b6511..2e165377 100644 --- a/lib/order/invoices_manage/pdf_screen.dart +++ b/lib/order/invoices_manage/pdf_screen.dart @@ -8,179 +8,188 @@ class PDFScreen extends StatefulWidget { final String path; final int inlet; - PDFScreen({Key key, this.path,this.inlet}) : super(key: key); + PDFScreen({Key key, this.path, this.inlet}) : super(key: key); _PDFScreenState createState() => _PDFScreenState(); } class _PDFScreenState extends State with WidgetsBindingObserver { - final Completer _controller = Completer(); + final Completer _controller = + Completer(); int pages = 0; int currentPage = 0; - int pageTotal =1; + int pageTotal = 0; bool isReady = false; String errorMessage = ''; @override Widget build(BuildContext context) { - return widget.inlet == 1 ?Material( - type: MaterialType.transparency, - child: Stack( - children: [ - 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 +1; - 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}/${pageTotal}",style: TextStyle(color: Colors.white,fontSize: 16)), + return widget.inlet == 1 + ? Material( + type: MaterialType.transparency, + child: Stack( + children: [ + 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 + 1; + 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}/${pageTotal}", + style: TextStyle(color: Colors.white, fontSize: 16)), + ), + ), + ], ), - ), - ], - ), - ):Scaffold( - body: Stack( - children: [ - 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 +1; - 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}",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(); - }, + : Scaffold( + body: Stack( + children: [ + 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 + 1; + 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}/${pageTotal}", + 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(); + }, + ), + ), + ], ), - ), - ], - ), - - ); - + ); } -} \ No newline at end of file +} From 25564389c9af8f2a00b4794915dc707ae0f28f44 Mon Sep 17 00:00:00 2001 From: wurong <953969641@qq.com> Date: Tue, 13 Aug 2024 13:51:02 +0800 Subject: [PATCH 22/23] =?UTF-8?q?=E5=8F=91=E7=A5=A8=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/order/invoices_manage/invoices_history.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/order/invoices_manage/invoices_history.dart b/lib/order/invoices_manage/invoices_history.dart index 6a94cd4c..79a4c3b5 100644 --- a/lib/order/invoices_manage/invoices_history.dart +++ b/lib/order/invoices_manage/invoices_history.dart @@ -201,7 +201,7 @@ class _InvoicesHistory extends State { return GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { - // if(records[position].state == "AUDIT_PASS") + if(records[position].state == "AUDIT_PASS") Navigator.of(context) .pushNamed('/router/invoices_detail_page',arguments: { "id":records[position].id ?? "" From 67a49d0fefa906b0645646b81b53125b93070183 Mon Sep 17 00:00:00 2001 From: zsw Date: Tue, 13 Aug 2024 14:25:37 +0800 Subject: [PATCH 23/23] =?UTF-8?q?ios=20pdf=E6=9B=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ios/Runner.xcodeproj/project.pbxproj | 6 +++--- lib/order/invoices_manage/pdf_screen.dart | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 52a55458..4db48b27 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/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 = 7; + 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 = 7; + 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 = 7; + CURRENT_PROJECT_VERSION = 8; DEVELOPMENT_TEAM = YF3Q8DVP52; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( diff --git a/lib/order/invoices_manage/pdf_screen.dart b/lib/order/invoices_manage/pdf_screen.dart index 2e165377..d488a2c3 100644 --- a/lib/order/invoices_manage/pdf_screen.dart +++ b/lib/order/invoices_manage/pdf_screen.dart @@ -74,7 +74,7 @@ class _PDFScreenState extends State with WidgetsBindingObserver { if (total > 0) { print('page change: $page/$total'); setState(() { - currentPage = page + 1; + currentPage = page; pageTotal = total; }); } else { @@ -98,7 +98,7 @@ class _PDFScreenState extends State with WidgetsBindingObserver { width: MediaQuery.of(context).size.width, bottom: 45, child: Center( - child: Text("${currentPage}/${pageTotal}", + child: Text("${currentPage + 1}/${(pageTotal > 0)?pageTotal:1}", style: TextStyle(color: Colors.white, fontSize: 16)), ), ), @@ -147,7 +147,7 @@ class _PDFScreenState extends State with WidgetsBindingObserver { if (total > 0) { print('page change: $page/$total'); setState(() { - currentPage = page + 1; + currentPage = page; pageTotal = total; }); } else { @@ -169,7 +169,7 @@ class _PDFScreenState extends State with WidgetsBindingObserver { bottom: 45, width: MediaQuery.of(context).size.width, child: Center( - child: Text("${currentPage}/${pageTotal}", + child: Text("${currentPage + 1}/${(pageTotal > 0)?pageTotal:1}", style: TextStyle(color: Colors.black, fontSize: 16)), ), ),