models.dart 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883
  1. //登录
  2. class Login {
  3. bool success;
  4. int code;
  5. String msg;
  6. LoginMap data;
  7. Login({
  8. this.success,
  9. this.code,
  10. this.msg,
  11. this.data,
  12. });
  13. factory Login.fromJson(Map<String, dynamic> json) {
  14. LoginMap tempData = LoginMap.fromJson(json['data']);
  15. return Login(
  16. success: json['success'],
  17. code: json['code'],
  18. msg: json['msg'],
  19. data: tempData);
  20. }
  21. }
  22. class LoginMap {
  23. String avatarUrl;
  24. String nickName;
  25. int roleType;
  26. String userId;
  27. int status;
  28. String token;
  29. List stationIds;
  30. LoginMap(
  31. {this.userId,
  32. this.avatarUrl,
  33. this.nickName,
  34. this.roleType,
  35. this.status,
  36. this.token,
  37. this.stationIds});
  38. factory LoginMap.fromJson(Map<String, dynamic> json) {
  39. return LoginMap(
  40. avatarUrl: json['avatarUrl'],
  41. nickName: json['nickName'],
  42. roleType: json['roleType'],
  43. userId: json['userId'],
  44. status: json['status'],
  45. token: json['token'],
  46. stationIds: json['stationIds']);
  47. }
  48. }
  49. //接单页列表
  50. class OrderListObj {
  51. bool success;
  52. int code;
  53. String msg;
  54. OrderListData data;
  55. OrderListObj({this.success, this.code, this.msg, this.data});
  56. factory OrderListObj.fromJson(Map<String, dynamic> json) {
  57. return OrderListObj(
  58. success: json['success'],
  59. code: json['code'],
  60. msg: json['msg'],
  61. data: OrderListData.fromJson(json['data']));
  62. }
  63. }
  64. class OrderListData {
  65. bool hasNextPage;
  66. List<OrderList> items;
  67. int limit;
  68. int page;
  69. int totalCount;
  70. int totalPage;
  71. OrderListData(
  72. {this.hasNextPage,
  73. this.items,
  74. this.limit,
  75. this.page,
  76. this.totalCount,
  77. this.totalPage});
  78. factory OrderListData.fromJson(Map<String, dynamic> json) {
  79. List list = json['items'] as List;
  80. List<OrderList> tempOrderList =
  81. list.map((i) => OrderList.fromJson(i)).toList();
  82. return OrderListData(
  83. hasNextPage: json['hasNextPage'],
  84. items: tempOrderList,
  85. limit: json['limit'],
  86. page: json['page'],
  87. totalCount: json['totalCount'],
  88. totalPage: json['totalPage']);
  89. }
  90. }
  91. class OrderList {
  92. String orderNo;
  93. int createTime;
  94. String goods;
  95. int goodsQuantity;
  96. String receiptCompanyAddress;
  97. String receiptCompanyName;
  98. String receiptCompanyPhone;
  99. String receiptCompanyProvinceName;
  100. String receiptCompanyCityName;
  101. String receiptCompanyAreaName;
  102. String sendCompanyAddress;
  103. String sendCompanyName;
  104. String sendCompanyPhone;
  105. String sendCompanyProvinceName;
  106. String sendCompanyCityName;
  107. String sendCompanyAreaName;
  108. OrderList(
  109. {this.orderNo,
  110. this.createTime,
  111. this.goods,
  112. this.goodsQuantity,
  113. this.receiptCompanyAddress,
  114. this.receiptCompanyName,
  115. this.receiptCompanyPhone,
  116. this.receiptCompanyProvinceName,
  117. this.receiptCompanyCityName,
  118. this.receiptCompanyAreaName,
  119. this.sendCompanyAddress,
  120. this.sendCompanyName,
  121. this.sendCompanyPhone,
  122. this.sendCompanyProvinceName,
  123. this.sendCompanyCityName,
  124. this.sendCompanyAreaName,
  125. });
  126. factory OrderList.fromJson(Map<String, dynamic> json) {
  127. return OrderList(
  128. orderNo: json['orderNo'] ?? '',
  129. createTime: json['createTime'] ?? '',
  130. goods: json['goods'] ?? '',
  131. goodsQuantity: json['goodsQuantity'] ?? '',
  132. receiptCompanyAddress: json['receiptCompanyAddress'] ?? '',
  133. receiptCompanyName: json['receiptCompanyName'] ?? '',
  134. receiptCompanyPhone: json['receiptCompanyPhone'] ?? '',
  135. receiptCompanyProvinceName:json['receiptCompanyProvinceName'] ?? '',
  136. receiptCompanyCityName:json['receiptCompanyCityName'] ?? '',
  137. receiptCompanyAreaName:json['receiptCompanyAreaName'] ?? '',
  138. sendCompanyAddress: json['sendCompanyAddress'] ?? '',
  139. sendCompanyName: json['sendCompanyName'] ?? '',
  140. sendCompanyPhone: json['sendCompanyPhone'] ?? '',
  141. sendCompanyProvinceName:json['sendCompanyProvinceName'] ?? '',
  142. sendCompanyCityName:json['sendCompanyCityName'] ?? '',
  143. sendCompanyAreaName:json['sendCompanyAreaName'] ?? '',
  144. );
  145. }
  146. }
  147. //获取站点
  148. class Station {
  149. bool success;
  150. int code;
  151. String msg;
  152. List<StationList> data;
  153. Station({this.success, this.code, this.msg, this.data});
  154. factory Station.fromJson(Map<String, dynamic> json) {
  155. List list = json['data'] as List;
  156. print(list.toString());
  157. List<StationList> tempList =
  158. list.map((i) => StationList.fromJson(i)).toList();
  159. return Station(
  160. success: json['success'],
  161. code: json['code'],
  162. msg: json['msg'],
  163. data: tempList);
  164. }
  165. }
  166. class StationList {
  167. String code;
  168. int id;
  169. String name;
  170. int stationStatus;
  171. int status;
  172. StationList({this.code, this.id, this.name, this.stationStatus, this.status});
  173. factory StationList.fromJson(Map<String, dynamic> json) {
  174. return StationList(
  175. code: json['code'],
  176. id: json['id'],
  177. name: json['name'],
  178. stationStatus: json['stationStatus'],
  179. status: json['status']);
  180. }
  181. }
  182. //站点线路
  183. class StationLine {
  184. bool success;
  185. int code;
  186. String msg;
  187. List<LineObj> data;
  188. StationLine({this.success, this.code, this.msg, this.data});
  189. factory StationLine.fromJson(Map<String, dynamic> json) {
  190. var list = json['data'] as List;
  191. List<LineObj> tempList = list.map((i) => LineObj.fromJson(i)).toList();
  192. return StationLine(
  193. success: json['success'],
  194. code: json['code'],
  195. msg: json['msg'],
  196. data: tempList);
  197. }
  198. }
  199. class LineObj {
  200. String code;
  201. int id;
  202. String name;
  203. LineObj({this.code, this.name, this.id});
  204. factory LineObj.fromJson(Map<String, dynamic> json) {
  205. return LineObj(code: json['code'], id: json['id'], name: json['name']);
  206. }
  207. }
  208. //修改密码
  209. class UpdataPasswrod {
  210. bool success;
  211. int code;
  212. String msg;
  213. String data;
  214. UpdataPasswrod({this.success, this.code, this.msg, this.data});
  215. factory UpdataPasswrod.fromJson(Map<String, dynamic> json) {
  216. return UpdataPasswrod(
  217. success: json['success'],
  218. code: json['code'],
  219. msg: json['msg'],
  220. data: json['data']);
  221. }
  222. }
  223. //手机号模糊匹配
  224. class LikePhone {
  225. bool success;
  226. int code;
  227. String msg;
  228. List<LikePhoneList> data;
  229. LikePhone({this.success, this.code, this.msg, this.data});
  230. factory LikePhone.fromJson(Map<String, dynamic> json) {
  231. List list = json['data'] as List;
  232. List<LikePhoneList> tempList =
  233. list.map((i) => LikePhoneList.fromJson(i)).toList();
  234. return LikePhone(
  235. success: json['success'],
  236. code: json['code'],
  237. msg: json['msg'],
  238. data: tempList);
  239. }
  240. }
  241. class LikePhoneList {
  242. String address;
  243. String areaCode;
  244. String areaName;
  245. String cityCode;
  246. String cityName;
  247. String companyCode;
  248. String companyName;
  249. String companyPhone;
  250. int id;
  251. String provinceCode;
  252. String provinceName;
  253. String uzerPhone;
  254. LikePhoneList(
  255. {this.address,
  256. this.areaCode,
  257. this.areaName,
  258. this.cityCode,
  259. this.cityName,
  260. this.companyCode,
  261. this.companyName,
  262. this.companyPhone,
  263. this.id,
  264. this.provinceCode,
  265. this.provinceName,
  266. this.uzerPhone});
  267. factory LikePhoneList.fromJson(Map<String, dynamic> json) {
  268. return LikePhoneList(
  269. address: json['address'],
  270. areaCode: json['areaCode'],
  271. areaName: json['areaName'],
  272. cityCode: json['cityCode'],
  273. cityName: json['cityName'],
  274. companyCode: json['companyCode'],
  275. companyName: json['companyName'],
  276. companyPhone: json['companyPhone'],
  277. id: json['id'],
  278. provinceCode: json['provinceCode'],
  279. provinceName: json['provinceName'],
  280. uzerPhone: json['uzerPhone']);
  281. }
  282. }
  283. //商品类别列表
  284. class GoodsCategory {
  285. bool success;
  286. int code;
  287. String msg;
  288. List<GoodCategoryList> data;
  289. GoodsCategory({this.success, this.code, this.msg, this.data});
  290. factory GoodsCategory.fromJson(Map<String, dynamic> json) {
  291. List list = json['data'] as List;
  292. List<GoodCategoryList> tempList =
  293. list.map((i) => GoodCategoryList.fromJson(i)).toList();
  294. return GoodsCategory(
  295. success: json['success'],
  296. code: json['code'],
  297. msg: json['msg'],
  298. data: tempList);
  299. }
  300. }
  301. class GoodCategoryList {
  302. int id;
  303. String name;
  304. GoodCategoryList({this.id, this.name});
  305. factory GoodCategoryList.fromJson(Map<String, dynamic> json) {
  306. return GoodCategoryList(id: json['id'], name: json['name']);
  307. }
  308. }
  309. //商品包装类别列表
  310. class GoodsPackage {
  311. bool success;
  312. int code;
  313. String msg;
  314. List<GoodsPackageList> data;
  315. GoodsPackage({this.success, this.code, this.msg, this.data});
  316. factory GoodsPackage.fromJson(Map<String, dynamic> json) {
  317. List list = json['data'] as List;
  318. List<GoodsPackageList> tempList =
  319. list.map((i) => GoodsPackageList.fromJson(i)).toList();
  320. return GoodsPackage(
  321. success: json['success'],
  322. code: json['code'],
  323. msg: json['msg'],
  324. data: tempList
  325. );
  326. }
  327. }
  328. class GoodsPackageList {
  329. int id;
  330. String name;
  331. GoodsPackageList({this.id, this.name});
  332. factory GoodsPackageList.fromJson(Map<String, dynamic> json) {
  333. return GoodsPackageList(id: json['id'], name: json['name']);
  334. }
  335. }
  336. //创建订单
  337. class CreateOrder {
  338. bool success;
  339. int code;
  340. String msg;
  341. String orderNo;
  342. CreateOrder({this.success, this.code, this.msg, this.orderNo});
  343. factory CreateOrder.fromJson(Map<String, dynamic> json) {
  344. return CreateOrder(
  345. success: json['success'],
  346. code: json['code'],
  347. msg: json['msg'],
  348. orderNo: json['data']['orderNo']);
  349. }
  350. }
  351. //订单详情
  352. class OrderDetailObj {
  353. bool success;
  354. int code;
  355. String msg;
  356. OrderDetailData data;
  357. OrderDetailObj({
  358. this.success,
  359. this.code,
  360. this.msg,
  361. this.data,
  362. });
  363. factory OrderDetailObj.fromJson(Map<String, dynamic> json) {
  364. OrderDetailData tempData = OrderDetailData.fromJson(json['data']);
  365. return OrderDetailObj(
  366. success: json['success'],
  367. code: json['code'],
  368. msg: json['msg'],
  369. data: tempData);
  370. }
  371. }
  372. class OrderDetailData {
  373. int createTime;
  374. String orderNo;
  375. String goods; //商品名称
  376. int goodsAgencyFund; //代收款
  377. int goodsCategoryId;
  378. String goodsCategoryName;//货物类型
  379. int goodsFlatCost; //工本费
  380. int goodsFreight; //运费
  381. int goodsInsurance; //商品保险费
  382. int goodsOtherFees; //其他费用
  383. int goodsPackingId;
  384. String goodsPackingName;//货物包装类型
  385. int goodsPaymentMethod;//付款方式
  386. int goodsPriceProtection; //商品保价
  387. int goodsQuantity; //商品数量
  388. int goodsValue; //商品价值
  389. double goodsWeight; //商品重量
  390. int id; //订单Id
  391. String lineCode;//线路编码
  392. int lineId;//线路id
  393. String lineName;//线路名称
  394. String memo; //备注
  395. int orderStatus; //订单状态 0:代收单,1:已接单,2:配送中,3:已签收,4:拒收
  396. String receiptCompanyAddress; //收件详细地址
  397. String receiptCompanyAreaCode; //收件区码
  398. String receiptCompanyAreaName; //收件区名
  399. String receiptCompanyBankCard; //收件银行卡号
  400. String receiptCompanyCityCode; //收件市码
  401. String receiptCompanyCityName; //收件市名
  402. int receiptCompanyId;
  403. String receiptCompanyName; //收件公司名称
  404. String receiptCompanyPhone; //收件公司电话
  405. String receiptCompanyProvinceCode; //收件省码
  406. String receiptCompanyProvinceName; //收件省名
  407. String sendCompanyAddress; //发件详细地址
  408. String sendCompanyAreaCode; //发件区码
  409. String sendCompanyAreaName; //发件区名
  410. String sendCompanyBankCard; //发件银行卡号
  411. String sendCompanyCityCode; //发件市码
  412. String sendCompanyCityName; //发件市名
  413. int sendCompanyId; //发件公司id
  414. String sendCompanyName; //发件公司名称
  415. String sendCompanyCode; //发件公司编码
  416. String sendCompanyProvinceCode; //发件公司市码
  417. String sendCompanyProvinceName; //发件公司市名
  418. String sendCompanyPhone;
  419. String senderIdCard; //发件人身份证号
  420. String senderName; //发件人名称
  421. String senderPhone; //发件人电话
  422. int stationId;
  423. String stationName;
  424. String receiptStationName;
  425. String receiptStationCode;
  426. OrderDetailData(
  427. {
  428. this.createTime,
  429. this.orderNo,
  430. this.goods,
  431. this.goodsAgencyFund,
  432. this.goodsCategoryId,
  433. this.goodsCategoryName,
  434. this.goodsFlatCost,
  435. this.goodsFreight,
  436. this.goodsInsurance,
  437. this.goodsOtherFees,
  438. this.goodsPackingId,
  439. this.goodsPackingName,
  440. this.goodsPaymentMethod,
  441. this.goodsPriceProtection,
  442. this.goodsQuantity,
  443. this.goodsValue,
  444. this.goodsWeight,
  445. this.id,
  446. this.lineCode,
  447. this.lineId,
  448. this.lineName,
  449. this.memo,
  450. this.orderStatus,
  451. this.receiptCompanyAddress,
  452. this.receiptCompanyAreaCode,
  453. this.receiptCompanyAreaName,
  454. this.receiptCompanyPhone,
  455. this.receiptCompanyBankCard,
  456. this.receiptCompanyCityCode,
  457. this.receiptCompanyCityName,
  458. this.receiptCompanyId,
  459. this.receiptCompanyName,
  460. this.receiptCompanyProvinceCode,
  461. this.receiptCompanyProvinceName,
  462. this.sendCompanyAddress,
  463. this.sendCompanyAreaCode,
  464. this.sendCompanyAreaName,
  465. this.sendCompanyBankCard,
  466. this.sendCompanyCityCode,
  467. this.sendCompanyCityName,
  468. this.sendCompanyId,
  469. this.sendCompanyName,
  470. this.sendCompanyCode,
  471. this.sendCompanyProvinceCode,
  472. this.sendCompanyProvinceName,
  473. this.senderIdCard,
  474. this.senderName,
  475. this.sendCompanyPhone,
  476. this.senderPhone,
  477. this.stationId,
  478. this.stationName,
  479. this.receiptStationName,
  480. this.receiptStationCode,
  481. });
  482. factory OrderDetailData.fromJson(Map<String, dynamic> json) {
  483. return OrderDetailData(
  484. createTime:json['createTime'],
  485. orderNo: json['orderNo'],
  486. goods: json['goods'],
  487. goodsAgencyFund: json['goodsAgencyFund'] ?? 0,
  488. goodsCategoryId:json['goodsCategoryId'],
  489. goodsCategoryName:json['goodsCategoryName'],
  490. goodsFlatCost: json['goodsFlatCost'] ?? 0,
  491. goodsFreight: json['goodsFreight'] ?? 0,
  492. goodsInsurance: json['goodsInsurance'],
  493. goodsOtherFees: json['goodsOtherFees'] ?? 0,
  494. goodsPackingId:json['goodsPackingId'],
  495. goodsPackingName:json['goodsPackingName'],
  496. goodsPriceProtection: json['goodsPriceProtection'],
  497. goodsPaymentMethod:json['goodsPaymentMethod'],
  498. goodsQuantity: json['goodsQuantity'],
  499. goodsValue: json['goodsValue'],
  500. goodsWeight: json['goodsWeight'],
  501. id: json['id'],
  502. lineCode:json['lineCode'],
  503. lineId:json['lineId'],
  504. lineName:json['lineName'],
  505. memo: json['memo'] ?? '',
  506. orderStatus: json['orderStatus'],
  507. receiptCompanyAddress: json['receiptCompanyAddress'],
  508. receiptCompanyAreaCode: json['receiptCompanyAreaCode'],
  509. receiptCompanyAreaName: json['receiptCompanyAreaName'],
  510. receiptCompanyBankCard: json['receiptCompanyBankCard'],
  511. receiptCompanyCityCode: json['receiptCompanyCityCode'],
  512. receiptCompanyCityName: json['receiptCompanyCityName'],
  513. receiptCompanyId:json['receiptCompanyId'],
  514. receiptCompanyName: json['receiptCompanyName'],
  515. receiptCompanyPhone: json['receiptCompanyPhone'],
  516. receiptCompanyProvinceCode: json['receiptCompanyProvinceCode'],
  517. receiptCompanyProvinceName: json['receiptCompanyProvinceName'],
  518. sendCompanyAddress: json['sendCompanyAddress'],
  519. sendCompanyAreaCode: json['sendCompanyAreaCode'],
  520. sendCompanyAreaName: json['sendCompanyAreaName'],
  521. sendCompanyBankCard: json['sendCompanyBankCard'],
  522. sendCompanyCityCode: json['sendCompanyCityCode'],
  523. sendCompanyCityName: json['sendCompanyCityName'],
  524. sendCompanyId: json['sendCompanyId'],
  525. sendCompanyName: json['sendCompanyName'],
  526. sendCompanyCode: json['sendCompanyCode'],
  527. sendCompanyProvinceCode: json['sendCompanyProvinceCode'],
  528. sendCompanyProvinceName: json['sendCompanyProvinceName'],
  529. senderIdCard: json['senderIdCard'],
  530. senderName: json['senderName'],
  531. senderPhone: json['senderPhone'],
  532. sendCompanyPhone:json['sendCompanyPhone'],
  533. stationId:json['stationId'],
  534. stationName:json['stationName'],
  535. receiptStationName:json['receiptStationName'],
  536. receiptStationCode:json['receiptStationCode'],
  537. );
  538. }
  539. }
  540. //接单对象
  541. class OrderReception {
  542. bool success;
  543. int code;
  544. String msg;
  545. OrderReception({
  546. this.success,
  547. this.code,
  548. this.msg,
  549. });
  550. factory OrderReception.fromJson(Map<String, dynamic> json) {
  551. return OrderReception(
  552. success: json['success'],
  553. code: json['code'],
  554. msg: json['msg'],
  555. );
  556. }
  557. }
  558. //订单管理获取列表
  559. class FromStatusGetOrderObj {
  560. bool success;
  561. int code;
  562. String msg;
  563. FromStatusGetOrderData data;
  564. FromStatusGetOrderObj({this.success, this.code, this.msg, this.data});
  565. factory FromStatusGetOrderObj.fromJson(Map<String, dynamic> json) {
  566. return FromStatusGetOrderObj(
  567. success: json['success'],
  568. code: json['code'],
  569. msg: json['msg'],
  570. data: FromStatusGetOrderData.fromJson(json['data']));
  571. }
  572. }
  573. class FromStatusGetOrderData {
  574. bool hasNextPage;
  575. List<FromStatusGetOrderList> items;
  576. int limit;
  577. int page;
  578. int totalCount;
  579. int totalPage;
  580. FromStatusGetOrderData({
  581. this.hasNextPage,
  582. this.items,
  583. this.limit,
  584. this.page,
  585. this.totalCount,
  586. this.totalPage,
  587. });
  588. factory FromStatusGetOrderData.fromJson(Map<String, dynamic> json) {
  589. List list = json['items'] as List;
  590. List<FromStatusGetOrderList> tempList =
  591. list.map((i) => FromStatusGetOrderList.fromJson(i)).toList();
  592. return FromStatusGetOrderData(
  593. hasNextPage: json['hasNextPage'],
  594. items: tempList,
  595. limit: json['limit'],
  596. page: json['page'],
  597. totalCount: json['totalCount'],
  598. totalPage: json['totalPage'],
  599. );
  600. }
  601. }
  602. class FromStatusGetOrderList {
  603. int goodsAgencyFund;
  604. int goodsFreight;
  605. int goodsQuantity;
  606. int orderStatus;
  607. String orderNo;
  608. String goods;
  609. String receiptCompanyName;
  610. String sendCompanyName;
  611. FromStatusGetOrderList({
  612. this.goodsAgencyFund,
  613. this.goodsFreight,
  614. this.goodsQuantity,
  615. this.orderStatus,
  616. this.orderNo,
  617. this.goods,
  618. this.receiptCompanyName,
  619. this.sendCompanyName,
  620. });
  621. factory FromStatusGetOrderList.fromJson(Map<String, dynamic> json) {
  622. return FromStatusGetOrderList(
  623. goodsAgencyFund: json['goodsAgencyFund'],
  624. goodsFreight: json['goodsFreight'],
  625. goodsQuantity: json['goodsQuantity'],
  626. orderStatus: json['orderStatus'],
  627. orderNo: json['orderNo'],
  628. goods: json['goods'],
  629. receiptCompanyName: json['receiptCompanyName'],
  630. sendCompanyName: json['sendCompanyName'],
  631. );
  632. }
  633. }
  634. //提交改单、作废、寄件、拒收、签收后返回对象
  635. class OrderStatusReturnObj {
  636. bool success;
  637. int code;
  638. String msg;
  639. OrderStatusReturnObj({this.success, this.code, this.msg});
  640. factory OrderStatusReturnObj.fromJson(Map<String, dynamic> json) {
  641. return OrderStatusReturnObj(
  642. success: json['success'],
  643. code: json['code'],
  644. msg: json['msg'],
  645. );
  646. }
  647. }
  648. //模糊匹配订单号返回对象
  649. class LikeOrderNo {
  650. bool success;
  651. int code;
  652. String msg;
  653. List data;
  654. LikeOrderNo({
  655. this.success,
  656. this.code,
  657. this.msg,
  658. this.data,
  659. });
  660. factory LikeOrderNo.fromJson(Map<String, dynamic> json) {
  661. return LikeOrderNo(
  662. success: json['success'],
  663. code: json['code'],
  664. msg: json['msg'],
  665. data: json['data'],
  666. );
  667. }
  668. }
  669. //验证token是否过期返回对象
  670. class CheckToken {
  671. bool success;
  672. int code;
  673. String msg;
  674. String data;
  675. CheckToken({
  676. this.success,
  677. this.code,
  678. this.msg,
  679. this.data,
  680. });
  681. factory CheckToken.fromJson(Map<String, dynamic> json) {
  682. return CheckToken(
  683. success: json['success'],
  684. code: json['code'],
  685. msg: json['msg'],
  686. data: json['data'],
  687. );
  688. }
  689. }
  690. //蓝牙信息缓存对象
  691. class BtInfoList {
  692. List<BtInfoObj> btList;
  693. BtInfoList({this.btList});
  694. factory BtInfoList.fromJson(List json) {
  695. List tempList = json.map((i) => BtInfoObj.fromJson(i)).toList();
  696. return BtInfoList(btList: tempList);
  697. }
  698. }
  699. class BtInfoObj {
  700. String name;
  701. bool showLoadStauts;
  702. bool connectStatus;
  703. BtInfoObj({this.name, this.showLoadStauts, this.connectStatus});
  704. factory BtInfoObj.fromJson(Map<String, dynamic> json) {
  705. return BtInfoObj(
  706. name: json['name'],
  707. showLoadStauts: json['showLoadStauts'],
  708. connectStatus: json['connectStatus'],
  709. );
  710. }
  711. }
  712. //根据公司id获取线路
  713. class CompanyOfLine {
  714. bool success;
  715. int code;
  716. String msg;
  717. List<CompanyOfLineList> data;
  718. CompanyOfLine({
  719. this.success,
  720. this.code,
  721. this.msg,
  722. this.data
  723. });
  724. factory CompanyOfLine.fromJson(Map<String,dynamic> json){
  725. var list = json['data'] as List;
  726. List tempList = list.map((i) => CompanyOfLineList.fromJson(i)).toList();
  727. return CompanyOfLine(
  728. success:json['success'],
  729. code:json['code'],
  730. msg:json['msg'],
  731. data:tempList,
  732. );
  733. }
  734. }
  735. class CompanyOfLineList {
  736. int lineId;
  737. String lineName;
  738. int uzerCompanyId;
  739. bool checkedStatus = false;
  740. CompanyOfLineList({
  741. this.lineId,
  742. this.lineName,
  743. this.uzerCompanyId,
  744. });
  745. factory CompanyOfLineList.fromJson(Map<String, dynamic> json) {
  746. return CompanyOfLineList(
  747. lineId:json['lineId'],
  748. lineName:json['lineName'],
  749. uzerCompanyId:json['uzerCompanyId'],
  750. );
  751. }
  752. }
  753. //物流公司客服电话及公司名
  754. class CompanyInfo{
  755. bool success;
  756. int code;
  757. String msg;
  758. CompanyInfoChild data;
  759. CompanyInfo({
  760. this.success,
  761. this.code,
  762. this.msg,
  763. this.data
  764. });
  765. factory CompanyInfo.fromJson(Map<String,dynamic> json){
  766. CompanyInfoChild data = CompanyInfoChild.fromJson(json['data']);
  767. return CompanyInfo(
  768. success:json['success'],
  769. code:json['code'],
  770. msg:json['msg'],
  771. data:data
  772. );
  773. }
  774. }
  775. class CompanyInfoChild{
  776. String customerPhone;
  777. String name;
  778. CompanyInfoChild({
  779. this.customerPhone,
  780. this.name
  781. });
  782. factory CompanyInfoChild.fromJson(Map<String,dynamic> json){
  783. return CompanyInfoChild(
  784. customerPhone:json['customerPhone'],
  785. name:json['name']
  786. );
  787. }
  788. }