piao_wait.dart 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929
  1. import 'package:flutter/material.dart';
  2. import 'package:flutter_screenutil/flutter_screenutil.dart';
  3. import 'package:liftmanager/internal/bbs/model/liftcase_model.dart';
  4. import 'package:liftmanager/internal/wode/wode_router.dart';
  5. import 'package:liftmanager/net/api_service.dart';
  6. import 'package:liftmanager/res/resources.dart';
  7. import 'package:liftmanager/routers/fluro_navigator.dart';
  8. import 'package:liftmanager/utils/fast_notification.dart';
  9. import 'package:liftmanager/utils/time_format.dart';
  10. import 'package:liftmanager/utils/toast.dart';
  11. import 'package:liftmanager/widgets/app_bar.dart';
  12. import 'package:liftmanager/widgets/load_image.dart';
  13. import 'package:umeng_common_sdk/umeng_common_sdk.dart';
  14. class PiaoWait extends StatefulWidget {
  15. // QuestionList(this.index);
  16. // final String index;
  17. bool checkAll = false;
  18. @override
  19. PiaoWaitState createState() => PiaoWaitState();
  20. }
  21. class PiaoWaitState extends State<PiaoWait> {
  22. int _page = 1;
  23. List<int> idList = [];
  24. List<int> commentListWidget = [];
  25. List<dynamic> listCase;
  26. String totalMoney = '0.00';
  27. bool _hasData = false;
  28. bool _isEdit = false;
  29. @override
  30. void initState() {
  31. UmengCommonSdk.onPageStart("待开发票");
  32. super.initState();
  33. getLiftCasesListNoPage();
  34. print(66666);
  35. FastNotification.addListener("initThisPiao", (initThisStringPiao) {
  36. if (mounted) {
  37. getLiftCasesListNoPage();
  38. }
  39. });
  40. }
  41. complayTotalMoney() {
  42. double price = 0.0;
  43. listCase.forEach((subitem) {
  44. idList.forEach((i) {
  45. if (subitem.id == i) {
  46. price += double.parse('${subitem.payCost}');
  47. }
  48. });
  49. });
  50. setState(() {
  51. totalMoney = price.toStringAsFixed(2);
  52. widget.checkAll = (idList.length == listCase.length);
  53. });
  54. }
  55. Future getLiftCasesListNoPage() async {
  56. await NewApiService().getLiftCasesListNoPage(onSuccess: (res) {
  57. if (res != null) {
  58. _hasData = true;
  59. listCase = res;
  60. res.forEach((item) {
  61. // print(JsonEncoder().convert(item));
  62. // print(item.id);
  63. commentListWidget.add(item.id);
  64. });
  65. // LogUtil.d(JsonEncoder().convert(listCase));
  66. print(123);
  67. setState(() {});
  68. }
  69. }, onError: (code, msg) {
  70. toasts(msg);
  71. });
  72. }
  73. @override
  74. void dispose() {
  75. UmengCommonSdk.onPageEnd("待开发票");
  76. super.dispose();
  77. }
  78. @override
  79. Widget build(BuildContext context) {
  80. double width = MediaQuery.of(context).size.width;
  81. String checkFalse = "tab_first/check_false";
  82. String checkTrue = "tab_first/check_true";
  83. return Scaffold(
  84. // resizeToAvoidBottomPadding: true,
  85. appBar: MyAppBar(
  86. centerTitle: "待开发票",
  87. actions: <Widget>[
  88. !_isEdit
  89. ? FlatButton(
  90. child: Text("开发票"),
  91. textColor: Colours.text,
  92. highlightColor: Colors.transparent,
  93. onPressed: () {
  94. setState(() {
  95. _isEdit = true;
  96. });
  97. // NavigatorUtils.push(context, WodeRouter.piaotou);
  98. },
  99. )
  100. : Container()
  101. ],
  102. ),
  103. body: _hasData
  104. ? SafeArea(
  105. child: Stack(
  106. children: <Widget>[
  107. listCase.length > 0
  108. ? Container(
  109. color: Color(0xffF6F6F6),
  110. margin: EdgeInsets.only(bottom: _isEdit ? 60 : 0),
  111. // color: Color(0xFFF1F4FC),
  112. child: ListView(
  113. children: <Widget>[
  114. OrderListItemWidget(
  115. idList: idList,
  116. lists: listCase,
  117. isEdit: _isEdit,
  118. changeState: (id) {
  119. setState(() {
  120. print(557);
  121. if (idList.contains(id)) {
  122. idList.remove(id);
  123. } else {
  124. idList.add(id);
  125. }
  126. print(idList);
  127. print(commentListWidget);
  128. if (commentListWidget.length ==
  129. idList.length) {
  130. widget.checkAll = true;
  131. print(widget.checkAll);
  132. print(555);
  133. } else {
  134. widget.checkAll = false;
  135. print(widget.checkAll);
  136. print(556);
  137. }
  138. complayTotalMoney();
  139. print(idList);
  140. print(557);
  141. });
  142. })
  143. ],
  144. ),
  145. )
  146. : Center(child: Text("暂无数据")),
  147. _isEdit
  148. ? Positioned(
  149. bottom: 0,
  150. left: 0,
  151. child: Container(
  152. width: width,
  153. child: Row(children: <Widget>[
  154. Container(
  155. height: 60,
  156. // width: width / 2,
  157. color: Colors.white,
  158. child: GestureDetector(
  159. onTap: () {
  160. print(commentListWidget);
  161. setState(() {
  162. widget.checkAll = !widget.checkAll;
  163. if (widget.checkAll == false) {
  164. idList = [];
  165. } else {
  166. idList = [];
  167. commentListWidget.forEach((item) {
  168. idList.add(item);
  169. });
  170. }
  171. });
  172. complayTotalMoney();
  173. print(idList);
  174. print(89888);
  175. print(commentListWidget);
  176. },
  177. child: Row(
  178. mainAxisAlignment:
  179. MainAxisAlignment.center,
  180. children: <Widget>[
  181. SizedBox(width: 20),
  182. LoadAssetImage(
  183. // image: AssetImage(i['img']),
  184. widget.checkAll == true
  185. ? checkTrue
  186. : checkFalse,
  187. width: ScreenUtil().setWidth(20),
  188. height: ScreenUtil().setWidth(20),
  189. // alignment: Alignment.centerLeft,
  190. ),
  191. SizedBox(width: 5),
  192. Text(
  193. "已选",
  194. style: TextStyle(
  195. fontSize:
  196. ScreenUtil().setSp(14)),
  197. ),
  198. Text(
  199. "${idList.length}",
  200. style: TextStyle(
  201. color: Colours.blue_app_main,
  202. fontSize:
  203. ScreenUtil().setSp(14)),
  204. )
  205. ],
  206. ))),
  207. Container(
  208. height: 60,
  209. // width: width / 2,
  210. color: Colors.white,
  211. child: Row(
  212. mainAxisAlignment:
  213. MainAxisAlignment.center,
  214. children: <Widget>[
  215. SizedBox(
  216. width: 40,
  217. ),
  218. Text(
  219. "合计:",
  220. style: TextStyle(
  221. fontSize: ScreenUtil().setSp(14)),
  222. ),
  223. Text(
  224. " ¥$totalMoney",
  225. style: TextStyle(
  226. color: Color(0xffFF5B00),
  227. fontSize: ScreenUtil().setSp(14)),
  228. )
  229. ],
  230. )),
  231. Expanded(child: Container()),
  232. Container(
  233. height: 50,
  234. width: 130,
  235. margin: EdgeInsets.only(right: 10),
  236. // color: Color(0xff0388FD),
  237. decoration: new BoxDecoration(
  238. //背景
  239. color: Colours.blue_app_main,
  240. //设置四周圆角 角度
  241. borderRadius:
  242. BorderRadius.all(Radius.circular(25.0)),
  243. ),
  244. child: FlatButton(
  245. // padding: EdgeInsets.all(15.0),
  246. child: Text(
  247. "申请发票",
  248. style: TextStyle(
  249. fontSize: ScreenUtil().setSp(16)),
  250. ),
  251. textColor: Colors.white,
  252. onPressed: () {
  253. if (idList.length > 0) {
  254. String str = "";
  255. idList.forEach((item) {
  256. str += (item.toString() + ",");
  257. });
  258. print(str.substring(0, str.length));
  259. print(456);
  260. // double price = 0.0;
  261. // listCase.forEach((subitem) {
  262. // idList.forEach((i) {
  263. // if (subitem.id == i) {
  264. // price += subitem.payCost;
  265. // }
  266. // });
  267. // });
  268. NavigatorUtils.push(context,
  269. "${WodeRouter.kaipiao}?ids=${str.substring(0, str.length)}&price=${totalMoney.toString()}");
  270. idList = [];
  271. print(idList);
  272. } else {
  273. toasts("请选择一项");
  274. }
  275. },
  276. ),
  277. ),
  278. ])))
  279. : Container(child: null)
  280. ],
  281. ))
  282. : Center(
  283. child: Text("正在加载..."),
  284. ));
  285. }
  286. }
  287. class OrderListItemWidget extends StatelessWidget {
  288. OrderListItemWidget(
  289. {Key key,
  290. this.data,
  291. this.changeState,
  292. this.idList,
  293. this.lists,
  294. this.isEdit})
  295. : super(key: key);
  296. LiftCasesDetailModel data;
  297. Function changeState;
  298. List<int> idList;
  299. List<dynamic> lists;
  300. String checkFalse = "tab_first/check_false";
  301. String checkTrue = "tab_first/check_true";
  302. bool isEdit;
  303. List<Widget> getListWdiget(context) => lists.asMap().keys.map((i) {
  304. double width = MediaQuery.of(context).size.width;
  305. return Container(
  306. // height: 20,
  307. margin: EdgeInsets.fromLTRB(10, 10, 10, 0),
  308. padding: EdgeInsets.only(
  309. bottom: ScreenUtil().setWidth(15),
  310. top: ScreenUtil().setWidth(15)),
  311. decoration: new BoxDecoration(
  312. //背景
  313. color: Colors.white,
  314. //设置四周圆角 角度
  315. borderRadius: BorderRadius.all(Radius.circular(5.0)),
  316. ),
  317. child: Row(
  318. crossAxisAlignment: CrossAxisAlignment.start,
  319. children: <Widget>[
  320. isEdit
  321. ? GestureDetector(
  322. child: Container(
  323. padding: EdgeInsets.only(
  324. top: ScreenUtil().setWidth(0),
  325. left: ScreenUtil().setWidth(5),
  326. right: ScreenUtil().setWidth(5),
  327. bottom: ScreenUtil().setWidth(10)),
  328. child: LoadAssetImage(
  329. // image: AssetImage(i['img']),
  330. idList.contains(lists[i].id) ? checkTrue : checkFalse,
  331. width: ScreenUtil().setWidth(20),
  332. height: ScreenUtil().setWidth(20),
  333. // alignment: Alignment.centerLeft,
  334. ),
  335. ),
  336. onTap: () {
  337. changeState(lists[i].id);
  338. },
  339. )
  340. : Container(),
  341. Expanded(
  342. child: GestureDetector(
  343. onTap: () {
  344. NavigatorUtils.push(
  345. context, "${WodeRouter.orderDetail}?id=${lists[i].id}");
  346. // NavigatorUtils.push(context,
  347. // "${BbsRouter.recommendAsk}?id=${detailObj.id}&type=3");
  348. },
  349. child: Row(
  350. crossAxisAlignment: CrossAxisAlignment.start,
  351. children: <Widget>[
  352. SizedBox(
  353. width: 10,
  354. ),
  355. ClipRRect(
  356. borderRadius: BorderRadius.circular(20),
  357. child: LoadNetworkImage(
  358. lists[i].avatarUrl,
  359. width: ScreenUtil().setWidth(43),
  360. height: ScreenUtil().setWidth(43),
  361. // alignment: Alignment.centerLeft,
  362. ),
  363. ),
  364. SizedBox(
  365. width: 10,
  366. ),
  367. Expanded(
  368. child: Container(
  369. padding: EdgeInsets.only(right: 10),
  370. child: Column(
  371. children: <Widget>[
  372. Container(
  373. child: Row(
  374. mainAxisAlignment: MainAxisAlignment.start,
  375. children: <Widget>[
  376. Row(
  377. crossAxisAlignment:
  378. CrossAxisAlignment.center,
  379. children: <Widget>[
  380. Text(
  381. lists[i].name ?? '',
  382. style: TextStyle(
  383. fontSize: ScreenUtil().setSp(17),
  384. ),
  385. textAlign: TextAlign.start,
  386. ),
  387. Container(
  388. decoration: BoxDecoration(
  389. //背景
  390. color: lists[i].dataTable == 1
  391. ? Colours.blue_app_main
  392. : Color(0xffFDAF2C),
  393. //设置四周圆角 角度
  394. borderRadius: BorderRadius.all(
  395. Radius.circular(4.0)),
  396. ),
  397. margin: EdgeInsets.only(left: 5),
  398. padding: EdgeInsets.only(
  399. left: 5,
  400. right: 5,
  401. top: 2,
  402. bottom: 2),
  403. child: Text(
  404. lists[i].dataTable == 1
  405. ? '问诊服务'
  406. : '出诊服务',
  407. style: TextStyle(
  408. color: Colors.white,
  409. fontSize: ScreenUtil().setSp(14),
  410. ),
  411. textAlign: TextAlign.start,
  412. ),
  413. ),
  414. ],
  415. ),
  416. ],
  417. ),
  418. ),
  419. Container(
  420. child: Row(
  421. mainAxisAlignment:
  422. MainAxisAlignment.spaceBetween,
  423. children: <Widget>[
  424. Row(
  425. crossAxisAlignment:
  426. CrossAxisAlignment.center,
  427. children: <Widget>[
  428. Text(
  429. lists[i].createTime != null
  430. ? DateUtils.instance
  431. .getFormartData(
  432. timeSamp:
  433. lists[i].createTime,
  434. format: "MM月dd日")
  435. : '',
  436. style: TextStyle(
  437. color: Color(0xff999999),
  438. fontSize: ScreenUtil().setSp(13),
  439. ),
  440. textAlign: TextAlign.start,
  441. ),
  442. Container(
  443. padding: EdgeInsets.only(left: 5),
  444. child: Text(
  445. lists[i].brandName ?? '',
  446. style: TextStyle(
  447. color: Colours.blue_app_main,
  448. fontSize: ScreenUtil().setSp(13),
  449. ),
  450. textAlign: TextAlign.start,
  451. ),
  452. )
  453. ],
  454. ),
  455. ],
  456. ),
  457. ),
  458. lists[i].dataTable != 1
  459. ? Container(
  460. child: Row(
  461. mainAxisAlignment:
  462. MainAxisAlignment.spaceBetween,
  463. children: <Widget>[
  464. Row(
  465. crossAxisAlignment:
  466. CrossAxisAlignment.start,
  467. children: <Widget>[
  468. Container(
  469. // padding: EdgeInsets.only(left: 5),
  470. child: Text(
  471. '出诊时间:',
  472. style: TextStyle(
  473. color: Color(0xff999999),
  474. fontSize:
  475. ScreenUtil().setSp(13),
  476. ),
  477. textAlign: TextAlign.start,
  478. ),
  479. ),
  480. Text(
  481. lists[i].createTime != null
  482. ? DateUtils.instance
  483. .getFormartData(
  484. timeSamp: lists[i]
  485. .createTime,
  486. format:
  487. "MM月dd日 HH:mm")
  488. : '',
  489. style: TextStyle(
  490. color: Color(0xff666666),
  491. fontSize:
  492. ScreenUtil().setSp(13),
  493. ),
  494. textAlign: TextAlign.start,
  495. ),
  496. ],
  497. ),
  498. ],
  499. ),
  500. )
  501. : Container(),
  502. lists[i].dataTable != 1
  503. ? Container(
  504. // margin: EdgeInsets.only(top: 6),
  505. child: Row(
  506. children: <Widget>[
  507. Container(
  508. // padding: EdgeInsets.only(left: 5),
  509. child: Text(
  510. '出诊地点:',
  511. style: TextStyle(
  512. color: Color(0xff999999),
  513. fontSize:
  514. ScreenUtil().setSp(13),
  515. ),
  516. textAlign: TextAlign.start,
  517. ),
  518. ),
  519. Container(
  520. width: ScreenUtil()
  521. .setWidth(isEdit ? 190 : 220),
  522. child: Text(
  523. '${lists[i].address ?? ''}',
  524. style: TextStyle(
  525. color: Color(0xff666666),
  526. fontSize:
  527. ScreenUtil().setSp(13),
  528. // color: Color(0xff666666),
  529. // fontSize: ScreenUtil().setSp(15),
  530. ),
  531. textAlign: TextAlign.start,
  532. maxLines: 1,
  533. overflow: TextOverflow.ellipsis,
  534. ),
  535. ),
  536. ],
  537. ),
  538. )
  539. : Container(),
  540. Container(
  541. // margin: EdgeInsets.only(top: 6),
  542. child: Row(
  543. children: <Widget>[
  544. Container(
  545. // padding: EdgeInsets.only(left: 5),
  546. child: Text(
  547. '问题描述:',
  548. style: TextStyle(
  549. color: Color(0xff999999),
  550. fontSize: ScreenUtil().setSp(13),
  551. ),
  552. textAlign: TextAlign.start,
  553. ),
  554. ),
  555. Container(
  556. width: ScreenUtil()
  557. .setWidth(isEdit ? 190 : 220),
  558. child: Text(
  559. '${lists[i].expression ?? ''}',
  560. style: TextStyle(
  561. color: Color(0xff666666),
  562. fontSize: ScreenUtil().setSp(13),
  563. // color: Color(0xff666666),
  564. // fontSize: ScreenUtil().setSp(15),
  565. ),
  566. textAlign: TextAlign.start,
  567. maxLines: 1,
  568. overflow: TextOverflow.ellipsis,
  569. ),
  570. ),
  571. ],
  572. ),
  573. ),
  574. Container(
  575. margin: EdgeInsets.only(top: 6),
  576. child: Row(
  577. children: <Widget>[
  578. Container(
  579. padding: EdgeInsets.only(right: 5),
  580. child: Text(
  581. lists[i].payCost != null
  582. ? "¥${lists[i].payCost.toString()}"
  583. : '',
  584. style: TextStyle(
  585. color: Color(0xffFD0808),
  586. fontSize: ScreenUtil().setSp(15),
  587. ),
  588. textAlign: TextAlign.start,
  589. ),
  590. ),
  591. ],
  592. ),
  593. )
  594. // Container(
  595. // child: Row(
  596. // mainAxisAlignment:
  597. // MainAxisAlignment.start,
  598. // children: <Widget>[
  599. // Row(
  600. // crossAxisAlignment:
  601. // CrossAxisAlignment
  602. // .center,
  603. // children: <Widget>[
  604. // Text(
  605. // detailObj.createTime !=
  606. // null
  607. // ? DateUtils
  608. // .instance
  609. // .getFormartData(
  610. // timeSamp:
  611. // detailObj
  612. // .createTime,
  613. // format:
  614. // "MM月dd日",
  615. // )
  616. // : '',
  617. // style: TextStyle(
  618. // color: Color(
  619. // 0xff999999),
  620. // fontSize:
  621. // ScreenUtil()
  622. // .setSp(
  623. // 13),
  624. // ),
  625. // textAlign:
  626. // TextAlign.left,
  627. // ),
  628. // Container(
  629. // padding:
  630. // EdgeInsets.only(
  631. // left: 5),
  632. // child: Text(
  633. // detailObj
  634. // .brandName ??
  635. // '',
  636. // style: TextStyle(
  637. // color: Color(
  638. // 0xff999999),
  639. // fontSize:
  640. // ScreenUtil()
  641. // .setSp(
  642. // 13),
  643. // ),
  644. // textAlign:
  645. // TextAlign
  646. // .left,
  647. // ),
  648. // )
  649. // ],
  650. // ),
  651. // ],
  652. // ),
  653. // ),
  654. // Row(
  655. // mainAxisAlignment:
  656. // MainAxisAlignment.start,
  657. // children: <Widget>[
  658. // Container(
  659. // width: 260,
  660. // child: Text(
  661. // detailObj.expression ??
  662. // '',
  663. // style: TextStyle(
  664. // color:
  665. // Color(0xff0288FF),
  666. // fontSize: ScreenUtil()
  667. // .setSp(15),
  668. // ),
  669. // textAlign:
  670. // TextAlign.left,
  671. // maxLines: 1,
  672. // overflow: TextOverflow
  673. // .ellipsis,
  674. // ),
  675. // ),
  676. // ],
  677. // ),
  678. ],
  679. ),
  680. ),
  681. )
  682. ],
  683. ),
  684. ),
  685. ),
  686. ],
  687. ),
  688. );
  689. // Container(
  690. // padding: EdgeInsets.all(ScreenUtil().setWidth(10)),
  691. // width: width,
  692. // decoration: BoxDecoration(
  693. // border: Border(
  694. // bottom: BorderSide(width: 0.5, color: Colours.line),
  695. // ),
  696. // ),
  697. // // height: 100,
  698. // child: Row(
  699. // children: <Widget>[
  700. // GestureDetector(
  701. // child: Container(
  702. // padding: EdgeInsets.only(
  703. // top: ScreenUtil().setWidth(10),
  704. // left: ScreenUtil().setWidth(5),
  705. // right: ScreenUtil().setWidth(5),
  706. // bottom: ScreenUtil().setWidth(10)),
  707. // child: LoadAssetImage(
  708. // // image: AssetImage(i['img']),
  709. // idList.contains(lists[i].id) ? checkTrue : checkFalse,
  710. // width: ScreenUtil().setWidth(20),
  711. // height: ScreenUtil().setWidth(20),
  712. // // alignment: Alignment.centerLeft,
  713. // ),
  714. // ),
  715. // onTap: () {
  716. // changeState(lists[i].id);
  717. // },
  718. // ),
  719. // Expanded(
  720. // child: GestureDetector(
  721. // behavior: HitTestBehavior.opaque,
  722. // onTap: () {
  723. // NavigatorUtils.push(
  724. // context, "${WodeRouter.orderDetail}?id=${lists[i].id}");
  725. // },
  726. // child: Row(
  727. // crossAxisAlignment: CrossAxisAlignment.start,
  728. // // mainAxisSize: MainAxisSize.min,
  729. // children: <Widget>[
  730. // Container(
  731. // margin: EdgeInsets.only(
  732. // left: ScreenUtil().setWidth(10),
  733. // right: ScreenUtil().setWidth(10),
  734. // top: ScreenUtil().setWidth(5)),
  735. // decoration: BoxDecoration(
  736. // borderRadius:
  737. // BorderRadius.circular(ScreenUtil().setWidth(22)),
  738. // ),
  739. // child: ClipRRect(
  740. // borderRadius:
  741. // BorderRadius.circular(ScreenUtil().setWidth(22)),
  742. // child: LoadNetworkImage(
  743. // lists[i].avatarUrl,
  744. // width: ScreenUtil().setWidth(43),
  745. // height: ScreenUtil().setWidth(43),
  746. // // alignment: Alignment.centerLeft,
  747. // ),
  748. // ),
  749. // ),
  750. // Expanded(
  751. // // flex: 1,
  752. // // fit: FlexFit.loose,
  753. // child: Container(
  754. // padding:
  755. // EdgeInsets.only(right: ScreenUtil().setWidth(15)),
  756. // child: Column(
  757. // children: <Widget>[
  758. // Container(
  759. // child: Row(
  760. // mainAxisAlignment:
  761. // MainAxisAlignment.spaceBetween,
  762. // children: <Widget>[
  763. // Row(
  764. // crossAxisAlignment:
  765. // CrossAxisAlignment.center,
  766. // children: <Widget>[
  767. // Text(
  768. // lists[i].name,
  769. // style: TextStyle(
  770. // color: Color(0xff333333),
  771. // fontSize: ScreenUtil().setSp(17)),
  772. // textAlign: TextAlign.start,
  773. // ),
  774. // Container(
  775. // padding: EdgeInsets.only(left: 5),
  776. // child: Text(
  777. // lists[i].dataTable == 1
  778. // ? '问诊服务'
  779. // : '出诊服务',
  780. // style: TextStyle(
  781. // color: Color(0xff0288FF),
  782. // fontSize: ScreenUtil().setSp(14),
  783. // ),
  784. // textAlign: TextAlign.start,
  785. // ),
  786. // )
  787. // ],
  788. // ),
  789. // // Container(
  790. // // child: Text(
  791. // // OrderConstant.getStatusName(data.statuz, data.dataTable, arrivedFlag: data.arrivedFlag, userType: 'USER'),
  792. // // style: TextStyle(
  793. // // color: [].indexOf(data.statuz) == -1
  794. // // ? Color(0xff0288FF)
  795. // // : Color(0xffF84203),
  796. // // fontSize: ScreenUtil().setSp(14),
  797. // // ),
  798. // // textAlign: TextAlign.end,
  799. // // ),
  800. // // )
  801. // ],
  802. // ),
  803. // ),
  804. // Container(
  805. // child: Row(
  806. // mainAxisAlignment:
  807. // MainAxisAlignment.spaceBetween,
  808. // children: <Widget>[
  809. // Row(
  810. // crossAxisAlignment:
  811. // CrossAxisAlignment.center,
  812. // children: <Widget>[
  813. // Text(
  814. // lists[i].createTime != null
  815. // ? DateUtils.instance
  816. // .getFormartData(
  817. // timeSamp:
  818. // lists[i].createTime,
  819. // format: "yyyy-MM-dd")
  820. // : '',
  821. // style: TextStyle(
  822. // color: Color(0xff999999),
  823. // fontSize: ScreenUtil().setSp(13),
  824. // ),
  825. // textAlign: TextAlign.start,
  826. // ),
  827. // Container(
  828. // padding: EdgeInsets.only(left: 5),
  829. // child: Text(
  830. // lists[i].brandName ?? '',
  831. // style: TextStyle(
  832. // color: Color(0xff999999),
  833. // fontSize: ScreenUtil().setSp(13),
  834. // ),
  835. // textAlign: TextAlign.start,
  836. // ),
  837. // )
  838. // ],
  839. // ),
  840. // ],
  841. // ),
  842. // ),
  843. // Container(
  844. // // margin: EdgeInsets.only(top: 6),
  845. // child: Row(
  846. // children: <Widget>[
  847. // Container(
  848. // width: width * 0.6,
  849. // padding: EdgeInsets.only(right: 5),
  850. // child: Text(
  851. // lists[i].expression ?? '',
  852. // style: TextStyle(
  853. // color: Color(0xff666666),
  854. // fontSize: ScreenUtil().setSp(15),
  855. // ),
  856. // textAlign: TextAlign.start,
  857. // maxLines: 1,
  858. // overflow: TextOverflow.ellipsis,
  859. // ),
  860. // ),
  861. // ],
  862. // ),
  863. // ),
  864. // Container(
  865. // margin: EdgeInsets.only(top: 6),
  866. // child: Row(
  867. // children: <Widget>[
  868. // Container(
  869. // padding: EdgeInsets.only(right: 5),
  870. // child: Text(
  871. // lists[i].payCost != null
  872. // ? "¥${lists[i].payCost.toString()}"
  873. // : '',
  874. // style: TextStyle(
  875. // color: Color(0xffFD0808),
  876. // fontSize: ScreenUtil().setSp(15),
  877. // ),
  878. // textAlign: TextAlign.start,
  879. // ),
  880. // ),
  881. // ],
  882. // ),
  883. // )
  884. // ],
  885. // ),
  886. // ),
  887. // )
  888. // ],
  889. // ),
  890. // ),
  891. // )
  892. // ],
  893. // ),
  894. // );
  895. }).toList();
  896. @override
  897. @override
  898. Widget build(BuildContext context) {
  899. return Container(
  900. child: Column(
  901. crossAxisAlignment: CrossAxisAlignment.start,
  902. children: getListWdiget(context),
  903. ),
  904. );
  905. }
  906. }