piao_wait.dart 45 KB

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