From d52764747d664e046ff379ce19854f131649b2dd Mon Sep 17 00:00:00 2001 From: zhang <494089941@qq.com> Date: Tue, 26 Jan 2021 10:42:11 +0800 Subject: [PATCH] update fixed detail page --- assets/icons/manager_order_cancel.png | Bin 0 -> 2216 bytes assets/icons/manager_phone_call.png | Bin 0 -> 4780 bytes lib/const/resource.dart | 452 ++++++++---------- .../things_page/widget/fixed_detail_page.dart | 140 +++++- lib/utils/bee_map.dart | 23 +- 5 files changed, 356 insertions(+), 259 deletions(-) create mode 100644 assets/icons/manager_order_cancel.png create mode 100644 assets/icons/manager_phone_call.png diff --git a/assets/icons/manager_order_cancel.png b/assets/icons/manager_order_cancel.png new file mode 100644 index 0000000000000000000000000000000000000000..8190127825c1f606f3a81c69f601fc444d08d30f GIT binary patch literal 2216 zcma);`#aN(8^`Bia+n#0(PVQN)0`%Zh<)ZTA#G2RQ_QjCVF_P{D9m9)&GB)Jt*LZy zYKjtJ!q-KLiijL4gpgCHzP|rKKfLeP^?qOXbzk={_jTROlPBz@B$OpUAdr*;*@n7L z#=h=|iSAdlj@`mO#OY-BOCS)=@&6L4vMj9L4}~sK?Ez5D0CIlchy)Xzi6Bt@b;&&% z7z7ftbg&_wiV<2WcZon6!(UkC;YM=m{Hp0mMSjvMBXy1}$(RnXtR8GjTuduN>cDfl z(DjG@q+iIZSS<{P8Sb3O3rmGM;eJ?pH)787oK+#n$(-Pq~qGrLU`LBtgC^y7U$Xgz% z+)Zx#TACj}=*p@0kUTJh+#Phy!E{~CAHf&F57K+Sc-l-7?Edm<=Ue!HHzrgKdBUCgp^1J%%2Rp;@ z^u^gd=+C+Ww#1ZykSgsmPq+iAP#7s0lp8F8&SEsP40QN?qXg?n_LT4C3>AhnZ&bPb z$SP9Uh3;Au1zX zs0=5}sYfdPQWu~DbZ~1Pb9@lu$X;_ko>5)Bm79N<@tzF%F#vD4t_Vn2jE0%|-DGC@0&?T{Wh$Xh9R#`42$5%HW7*l!dheV#X` zE*yJJK(6k)gVKMQ|H1y8Y5hd78{!(SHF^N8KLn?)7bM9XZXUrjz>FeE zJUcWM^*4E{(oHnC5f5mB=yx8(l^3A&FA6U;$!S{MO{-YOQwU?WXv{mpfF(2PW_C2 zTh?MK9T6TC38e<;GCH>%KQ%h$Jb*!mmP!Y4wuSq1+nAU_xT%5OsQ46n;F?Z0H9(U= ziW~dNcgV?xLFbnnhc#?X03>j>#xP(m1Kow}%u9tq*YMd`l05{A%Ue+fFlGOkpvEq$st#P4pJo|3saHYUQfd|i2l{b6_m@}-m(t!4ar zGT8m*lEOqym*M+xia%O`8=t~Z$&x-?k&<_{G#8G#*aB!_ph)jnV31=fd z4}u8&`5paPClSs20Y^e~7bSdDH3X0}1s>4icsW93H0@;AqbLJvy8E&M`^}P!XGS-> zJ^NmMPdmB5rF2`W!JG@z+T$c!Xo6BUmx$6w!GaCUvKp>i%M|=A`e<`;3ef`Oo|5pg zsJAuiJ7GQkn3?9z-ok?ZmC6cO!o&q9Y0r!jt4Lju2OgE|+mi>s_N|yp(ux{6wNNJ+Wt1P9{~*k;m8?T+ZnhB}%JyE9y=D6+4TwCaanQ z8o<-J&k8;(;Pt?GqesE71dm~F>rHnP+P$fTO`OiiDR|47L_U#8A2PZkx@z@S{0W#J T_riPsu>d*Pp0KF_e3SnNsW;9f literal 0 HcmV?d00001 diff --git a/assets/icons/manager_phone_call.png b/assets/icons/manager_phone_call.png new file mode 100644 index 0000000000000000000000000000000000000000..4bc6dedf3822bfcd7091058eef452cdbb8f7f90d GIT binary patch literal 4780 zcmV;d5>xGoP)@~0drDELIAGL9O(c600d`2O+f$vv5yPY2MFLtS%2O~zO7c{oe?YK#>QgX% zYVrUkFI5sL{7|G6si}Ve_U2b{B$T#N1nbxh6e_VuNO;%YxjkpRYu5JKo_p`iof&gK z68P7yJwLv4&bjBFdoF;%U@#aA27^I23^bAL=t$d)?dBG1XPjs8TZzg)q5zELIp=xC ztTUx@c{rEL<-rhnd>2?Yli5?Y;2`6W6?q?LFcf3FZ|Guf2n>vKV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%uXnuJLdy9YTUp0+eTm&e6(isTj+&hv^g)V$;os%#!fKqLHD0!#6=i^ zEuzMnwSu?TXI^Oc?%m^qgM(TVwd4xF`syoo@AmELgY*V?!3yFcjKJ#PbZ0J2_u}Pw z7rehldHj|ACEGriN~Q2~;F#Xyqt&i zKO3hF-7#)+evATK@|N4TZ^PZYccD-yKqKdASZ}r4WoYG$??y{Sc`QHLi()EdS_L5*DnFngBNEHgiX}W1sb8;`bp#%6dUxT#|Jy)l#hQ?7+3(-O+Ps#+E^#qNV2V_P)@C#Ig|CAEy-+#jK&+wR52_WsMqnPHZM5kx_`L8T zRM*jqx!e$VfDxF-L{w;=3#*C|m`_ANXii^yzl2rA2+U__y5@`X=d+kV?Wvjn3-Y>? zurRLTe=6B9;CDX`BQTA0cXuadi}!HqhV90T$4hWOIqK(q;FbULn3Otem-!i;Ez*s^ z0%G2>S&-$Nb)n!EPwj}_8@}i(oCRPw*9p`)=v+{pgZ>X@4sm4kCz8?t0000 { bool _onLoading = true; EasyRefreshController _easyRefreshController; - FixedDetailModel _model=FixedDetailModel(); - bool get showRepairCard => _model?.appDispatchListVo!=null; + FixedDetailModel _model = FixedDetailModel(); + bool get showRepairCard => _model?.appDispatchListVo != null; + bool get showProcessCard => _model.appProcessRecordVo.isNotEmpty; Color _getColor(int state) { switch (state) { case 1: @@ -174,6 +176,133 @@ class _FixedDetailPageState extends State { ); } + Widget _buildProcessCard(FixedDetailModel model) { + return Container( + padding: EdgeInsets.symmetric(horizontal: 28.w, vertical: 24.w), + decoration: BoxDecoration( + color: kForeGroundColor, + borderRadius: BorderRadius.circular(8.w), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + '进程处理'.text.black.size(32.sp).bold.make(), + 24.w.heightBox, + BeeDivider.horizontal(), + 24.w.heightBox, + ...model.appProcessRecordVo + .map((e) => Row( + children: [ + BeeMap() + .processClass[e.operationType] + .text + .color(ktextSubColor) + .size(28.sp) + .make(), + Spacer(), + e.operationDate.text.black.size(28.sp).make(), + ], + )) + .toList() + .sepWidget(separate: 8.w.heightBox) + ], + ), + ); + } + + Widget _buttons(FixedDetailModel model) { + return Container( + width: 228.w * 3, + height: 96.w, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(8.w), + color: kForeGroundColor, + ), + child: Row( + children: [ + MaterialButton( + padding: EdgeInsets.zero, + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + onPressed: () {}, + textColor: ktextPrimary, + disabledColor: kDarkSubColor.withOpacity(0.1), + disabledTextColor: ktextSubColor.withOpacity(0.3), + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + R.ASSETS_ICONS_MANAGER_ORDER_CANCEL_PNG, + width: 40.w, + height: 40.w, + ), + 16.w.widthBox, + '取消订单'.text.size(28.sp).bold.make() + ], + ), + elevation: 0, + focusElevation: 0, + highlightElevation: 0, + hoverElevation: 0, + disabledElevation: 0, + ).expand(), + MaterialButton( + padding: EdgeInsets.zero, + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + onPressed: showProcessCard ? () {} : null, + disabledColor: kDarkSubColor.withOpacity(0.1), + disabledTextColor: ktextSubColor.withOpacity(0.3), + textColor: ktextPrimary, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + R.ASSETS_ICONS_MANAGER_PHONE_CALL_PNG, + width: 40.w, + height: 40.w, + color: showProcessCard?Colors.black:kDarkSubColor.withOpacity(0.5), + ), + 16.w.widthBox, + '致电管家'.text.size(28.sp).bold.make() + ], + ), + elevation: 0, + focusElevation: 0, + highlightElevation: 0, + hoverElevation: 0, + disabledElevation: 0, + ).expand(), + MaterialButton( + height: 96.w, + padding: EdgeInsets.zero, + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + onPressed: showRepairCard ? () {} : null, + disabledColor: kDarkSubColor.withOpacity(0.1), + disabledTextColor: ktextSubColor.withOpacity(0.3), + textColor: ktextPrimary, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + R.ASSETS_ICONS_MANAGER_PHONE_CALL_PNG, + width: 40.w, + height: 40.w, + color: showRepairCard?Colors.black:kDarkSubColor.withOpacity(0.5), + ), + 16.w.widthBox, + '致电师傅'.text.size(28.sp).bold.make() + ], + ), + elevation: 0, + focusElevation: 0, + highlightElevation: 0, + hoverElevation: 0, + disabledElevation: 0, + ).expand() + ], + ), + ); + } + @override Widget build(BuildContext context) { return BeeScaffold( @@ -191,10 +320,11 @@ class _FixedDetailPageState extends State { ? _buildEmpty() : ListView( padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 36.w), - children: [ + children: [ _buildHead(_model), - showRepairCard?_reparCard(_model):null, - + ...showRepairCard ? [_reparCard(_model)] : [], + ...showProcessCard ? [_buildProcessCard(_model)] : [], + _buttons(_model), ].sepWidget(separate: 16.w.heightBox), ), ), diff --git a/lib/utils/bee_map.dart b/lib/utils/bee_map.dart index bb8d3832..b933179d 100644 --- a/lib/utils/bee_map.dart +++ b/lib/utils/bee_map.dart @@ -4,5 +4,26 @@ class BeeMap { 2: '家庭报修', }; - Map fixState = {1: '待分配', 2: '未接单', 3: '处理中',4:'已处理',5:'已完成',6:'已关闭',7:'已作废',8:'未知'}; + Map fixState = { + 1: '待分配', + 2: '未接单', + 3: '处理中', + 4: '已处理', + 5: '已完成', + 6: '已关闭', + 7: '已作废', + 8: '未知' + }; + + Map processClass = { + 1: '报修时间', + 2: '管家分派', + 3: '师傅接单', + 4: '处理完成', + 5: '确认', + 6: '回访', + 7: '回退', + 8: '作废', + 9: '取消' + }; }