@vtx/modals2 5.0.3 → 5.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/lib/_components/index.js +4 -3
  2. package/lib/_components/vm-bar-charts/index.js +1 -1
  3. package/lib/_components/vm-calendar/style/index.less +4 -7
  4. package/lib/_components/vm-card-statistics/index.less +27 -27
  5. package/lib/_components/vm-factor/index.js +10 -5
  6. package/lib/_components/vm-factor/style/index.less +5 -1
  7. package/lib/_components/vm-factor-list/index.less +11 -11
  8. package/lib/_components/vm-filter/style/index.less +2 -1
  9. package/lib/_components/vm-info-collection/index.js +2 -2
  10. package/lib/_components/vm-line-charts/index.js +1 -1
  11. package/lib/_components/vm-map/index.js +5 -5
  12. package/lib/_components/vm-pie-charts/index.js +7 -5
  13. package/lib/_components/vm-repair-maintain/RmInfoSummary.js +46 -0
  14. package/lib/_components/vm-repair-maintain/RmMonthTrend.js +44 -0
  15. package/lib/_components/vm-repair-maintain/RmRecord.js +157 -0
  16. package/lib/_components/vm-repair-maintain/RmType.js +32 -0
  17. package/lib/_components/vm-repair-maintain/api.js +92 -0
  18. package/lib/_components/vm-repair-maintain/imgs/amount.png +0 -0
  19. package/lib/_components/vm-repair-maintain/imgs/amount_light.png +0 -0
  20. package/lib/_components/vm-repair-maintain/imgs/count.png +0 -0
  21. package/lib/_components/vm-repair-maintain/imgs/count_light.png +0 -0
  22. package/lib/_components/vm-repair-maintain/index.js +56 -0
  23. package/lib/_components/vm-repair-maintain/style/index.js +1 -0
  24. package/lib/_components/vm-repair-maintain/style/index.less +25 -0
  25. package/lib/_components/vm-table/index.js +7 -4
  26. package/lib/_components/vm-table/style/index.less +3 -2
  27. package/lib/_components/vm-tag/style/index.less +9 -0
  28. package/lib/_components/vm-title/index.js +3 -2
  29. package/lib/_components/vm-wrapper/index.js +32 -10
  30. package/lib/_components/vm-wrapper/style/index.less +28 -0
  31. package/lib/index.js +7 -2
  32. package/lib/style/index.less +2 -6
  33. package/lib/vtx-area-modal/components/BaseInfo/ListZymx.js +2 -1
  34. package/lib/vtx-base-modal/Header/index.less +98 -98
  35. package/lib/vtx-base-modal/Tabs/index.less +31 -31
  36. package/lib/vtx-base-modal/index.js +5 -2
  37. package/lib/vtx-car-modal/api.js +4 -3
  38. package/lib/vtx-car-modal/components/Info/index.less +6 -6
  39. package/lib/vtx-car-modal/content/Cc/BaseInfo/index.js +3 -0
  40. package/lib/vtx-car-modal/content/Cc/WorkRecord/Summary.js +1 -0
  41. package/lib/vtx-car-modal/content/Common/BaseInfo/index.js +5 -1
  42. package/lib/vtx-car-modal/content/Common/OilConsumption/index.less +6 -6
  43. package/lib/vtx-car-modal/content/Common/StaticInfo/index.js +1 -0
  44. package/lib/vtx-car-modal/content/Common/WaterConsumption/index.js +1 -0
  45. package/lib/vtx-car-modal/content/Common/WaterConsumption/index.less +6 -6
  46. package/lib/vtx-car-modal/content/JXH/AlarmInfo/List.js +9 -3
  47. package/lib/vtx-car-modal/content/JXH/BaseInfo/index.js +5 -1
  48. package/lib/vtx-car-modal/content/JXH/StaticInfo/index.js +7 -6
  49. package/lib/vtx-car-modal/content/JXH/WorkRecord/index.js +20 -12
  50. package/lib/vtx-car-modal/content/Ljsy/BaseInfo/index.js +3 -0
  51. package/lib/vtx-car-modal/content/Ljsy/WorkRecord/Summary.js +1 -0
  52. package/lib/vtx-car-modal/content/Ljzy/BaseInfo/index.js +3 -0
  53. package/lib/vtx-car-modal/content/Ljzy/WorkRecord/Summary.js +1 -0
  54. package/lib/vtx-car-modal/index.js +16 -2
  55. package/lib/vtx-cc-cp-modal/api.js +381 -0
  56. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmRecord.js +120 -0
  57. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTrend.js +27 -0
  58. package/lib/vtx-cc-cp-modal/components/AlarmInfo/AlarmTypeAnalysis.js +32 -0
  59. package/lib/vtx-cc-cp-modal/components/AlarmInfo/StaticInfo.js +41 -0
  60. package/lib/vtx-cc-cp-modal/components/AlarmInfo/index.js +69 -0
  61. package/lib/vtx-cc-cp-modal/components/BaseInfo/AllWork.js +103 -0
  62. package/lib/vtx-cc-cp-modal/components/BaseInfo/Info.js +75 -0
  63. package/lib/vtx-cc-cp-modal/components/BaseInfo/Rules.js +58 -0
  64. package/lib/vtx-cc-cp-modal/components/BaseInfo/SyRecord.js +142 -0
  65. package/lib/vtx-cc-cp-modal/components/BaseInfo/index.js +63 -0
  66. package/lib/vtx-cc-cp-modal/components/BaseInfo/index.less +16 -0
  67. package/lib/vtx-cc-cp-modal/components/Calendar/index.js +168 -0
  68. package/lib/vtx-cc-cp-modal/components/Calendar/index.less +93 -0
  69. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTrend.js +27 -0
  70. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExceptionTypeAnalysis.js +32 -0
  71. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/ExeceptionRecord.js +118 -0
  72. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/StaticInfo.js +41 -0
  73. package/lib/vtx-cc-cp-modal/components/ExceptionInfo/index.js +69 -0
  74. package/lib/vtx-cc-cp-modal/components/Restaurant/index.js +111 -0
  75. package/lib/vtx-cc-cp-modal/components/Restaurant/index.less +3 -0
  76. package/lib/vtx-cc-cp-modal/components/SyInfo/Ljcsl.js +46 -0
  77. package/lib/vtx-cc-cp-modal/components/SyInfo/SummaryInfo.js +81 -0
  78. package/lib/vtx-cc-cp-modal/components/SyInfo/index.js +78 -0
  79. package/lib/vtx-cc-cp-modal/components/index.js +7 -0
  80. package/lib/vtx-cc-cp-modal/imgs/rwnsjts.png +0 -0
  81. package/lib/vtx-cc-cp-modal/imgs/rwnsjts_dark.png +0 -0
  82. package/lib/vtx-cc-cp-modal/imgs/rwnsjzl.png +0 -0
  83. package/lib/vtx-cc-cp-modal/imgs/rwnsjzl_dark.png +0 -0
  84. package/lib/vtx-cc-cp-modal/imgs/rwnsscs.png +0 -0
  85. package/lib/vtx-cc-cp-modal/imgs/rwnsscs_dark.png +0 -0
  86. package/lib/vtx-cc-cp-modal/imgs/zsjts.png +0 -0
  87. package/lib/vtx-cc-cp-modal/imgs/zsjts_dark.png +0 -0
  88. package/lib/vtx-cc-cp-modal/imgs/zsjzl.png +0 -0
  89. package/lib/vtx-cc-cp-modal/imgs/zsjzl_dark.png +0 -0
  90. package/lib/vtx-cc-cp-modal/imgs/zsscs.png +0 -0
  91. package/lib/vtx-cc-cp-modal/imgs/zsscs_dark.png +0 -0
  92. package/lib/vtx-cc-cp-modal/index.js +119 -0
  93. package/lib/vtx-cc-cp-modal/style/index.js +1 -0
  94. package/lib/vtx-cc-cp-modal/style/index.less +13 -0
  95. package/lib/vtx-cc-unit-modal/api.js +361 -0
  96. package/lib/vtx-cc-unit-modal/components/BaseInfo/CollectRecord.js +69 -0
  97. package/lib/vtx-cc-unit-modal/components/BaseInfo/DetailList.js +66 -0
  98. package/lib/vtx-cc-unit-modal/components/BaseInfo/Factory.js +60 -0
  99. package/lib/vtx-cc-unit-modal/components/BaseInfo/Statistics.js +91 -0
  100. package/lib/vtx-cc-unit-modal/components/BaseInfo/index.js +118 -0
  101. package/lib/vtx-cc-unit-modal/components/BaseInfo/index.less +6 -0
  102. package/lib/vtx-cc-unit-modal/components/CarList/index.js +129 -0
  103. package/lib/vtx-cc-unit-modal/components/Collection/index.js +95 -0
  104. package/lib/vtx-cc-unit-modal/components/DetailInfo/index.js +126 -0
  105. package/lib/vtx-cc-unit-modal/components/Factory/index.js +149 -0
  106. package/lib/vtx-cc-unit-modal/components/RestaurantList/index.js +127 -0
  107. package/lib/vtx-cc-unit-modal/components/index.js +7 -0
  108. package/lib/vtx-cc-unit-modal/imgs/jccc.png +0 -0
  109. package/lib/vtx-cc-unit-modal/imgs/jccc_dark.png +0 -0
  110. package/lib/vtx-cc-unit-modal/imgs/jcl.png +0 -0
  111. package/lib/vtx-cc-unit-modal/imgs/jcl_dark.png +0 -0
  112. package/lib/vtx-cc-unit-modal/imgs/syts.png +0 -0
  113. package/lib/vtx-cc-unit-modal/imgs/syts_dark.png +0 -0
  114. package/lib/vtx-cc-unit-modal/imgs/syzl.png +0 -0
  115. package/lib/vtx-cc-unit-modal/imgs/syzl_dark.png +0 -0
  116. package/lib/vtx-cc-unit-modal/index.js +137 -0
  117. package/lib/vtx-cc-unit-modal/style/index.js +1 -0
  118. package/lib/vtx-cc-unit-modal/style/index.less +14 -0
  119. package/lib/vtx-cp-modal/api.js +3 -3
  120. package/lib/vtx-cp-modal/index.js +4 -1
  121. package/lib/vtx-default-modal/index.js +10 -7
  122. package/lib/vtx-device-modal/api.js +531 -0
  123. package/lib/vtx-device-modal/components/BaseInfo/index.js +140 -0
  124. package/lib/vtx-device-modal/components/DataAnalysis/AlarmAnalysis.js +279 -0
  125. package/lib/vtx-device-modal/components/DataAnalysis/MonitorAnalysis.js +611 -0
  126. package/lib/vtx-device-modal/components/DataAnalysis/TabsList.js +23 -0
  127. package/lib/vtx-device-modal/components/DataAnalysis/index.js +24 -0
  128. package/lib/vtx-device-modal/components/DataAnalysis/index.less +66 -0
  129. package/lib/vtx-device-modal/components/index.js +3 -0
  130. package/lib/vtx-device-modal/config.js +21 -0
  131. package/lib/vtx-device-modal/imgs/current.png +0 -0
  132. package/lib/vtx-device-modal/imgs/current_dark.png +0 -0
  133. package/lib/vtx-device-modal/imgs/history.png +0 -0
  134. package/lib/vtx-device-modal/imgs/history_dark.png +0 -0
  135. package/lib/vtx-device-modal/index.js +96 -0
  136. package/lib/vtx-device-modal/style/index.js +1 -0
  137. package/lib/vtx-device-modal/style/index.less +1 -0
  138. package/lib/vtx-df-modal/index.js +11 -9
  139. package/lib/vtx-kh-modal/api2.js +178 -0
  140. package/lib/vtx-kh-modal/components/BaseInfo/index.js +197 -0
  141. package/lib/vtx-kh-modal/components/BaseInfo/index.less +101 -0
  142. package/lib/vtx-kh-modal/components/Record/index.js +204 -0
  143. package/lib/vtx-kh-modal/components/Record/index.less +7 -0
  144. package/lib/vtx-kh-modal/components/index.js +3 -0
  145. package/lib/vtx-kh-modal/imgs/count.png +0 -0
  146. package/lib/vtx-kh-modal/imgs/count_light.png +0 -0
  147. package/lib/vtx-kh-modal/imgs/question_bg.png +0 -0
  148. package/lib/vtx-kh-modal/imgs/question_bg_light.png +0 -0
  149. package/lib/vtx-kh-modal/imgs/score.png +0 -0
  150. package/lib/vtx-kh-modal/imgs/score_light.png +0 -0
  151. package/lib/vtx-kh-modal/imgs/subtract.png +0 -0
  152. package/lib/vtx-kh-modal/imgs/subtract_light.png +0 -0
  153. package/lib/vtx-kh-modal/index.js +46 -0
  154. package/lib/vtx-kh-modal/style/index.js +4 -0
  155. package/lib/vtx-kh-modal/style/index.less +1 -0
  156. package/lib/vtx-restaurant-modal/api.js +297 -0
  157. package/lib/vtx-restaurant-modal/components/Alarm/AlarmRecord.js +47 -0
  158. package/lib/vtx-restaurant-modal/components/Alarm/AlarmTrend.js +31 -0
  159. package/lib/vtx-restaurant-modal/components/Alarm/AlarmTypeAnalysis.js +36 -0
  160. package/lib/vtx-restaurant-modal/components/Alarm/StaticInfo.js +41 -0
  161. package/lib/vtx-restaurant-modal/components/Alarm/index.js +69 -0
  162. package/lib/vtx-restaurant-modal/components/Basic/CollectRule.js +64 -0
  163. package/lib/vtx-restaurant-modal/components/Basic/DetailList.js +68 -0
  164. package/lib/vtx-restaurant-modal/components/Basic/Info.js +87 -0
  165. package/lib/vtx-restaurant-modal/components/Basic/Summary.js +61 -0
  166. package/lib/vtx-restaurant-modal/components/Basic/SummaryStatistics.js +60 -0
  167. package/lib/vtx-restaurant-modal/components/Basic/index.js +74 -0
  168. package/lib/vtx-restaurant-modal/components/Basic/index.less +16 -0
  169. package/lib/vtx-restaurant-modal/components/Calendar/index.js +171 -0
  170. package/lib/vtx-restaurant-modal/components/Calendar/index.less +93 -0
  171. package/lib/vtx-restaurant-modal/components/Collection/index.js +86 -0
  172. package/lib/vtx-restaurant-modal/components/DetailInfo/index.js +111 -0
  173. package/lib/vtx-restaurant-modal/components/SignAndContract/ContactDetail.js +299 -0
  174. package/lib/vtx-restaurant-modal/components/SignAndContract/index.js +198 -0
  175. package/lib/vtx-restaurant-modal/components/index.js +7 -0
  176. package/lib/vtx-restaurant-modal/config.js +283 -0
  177. package/lib/vtx-restaurant-modal/imgs/csl.png +0 -0
  178. package/lib/vtx-restaurant-modal/imgs/csl_dark.png +0 -0
  179. package/lib/vtx-restaurant-modal/imgs/sycs.png +0 -0
  180. package/lib/vtx-restaurant-modal/imgs/sycs_dark.png +0 -0
  181. package/lib/vtx-restaurant-modal/imgs/syts.png +0 -0
  182. package/lib/vtx-restaurant-modal/imgs/syts_dark.png +0 -0
  183. package/lib/vtx-restaurant-modal/index.js +168 -0
  184. package/lib/vtx-restaurant-modal/style/index.js +1 -0
  185. package/lib/vtx-restaurant-modal/style/index.less +13 -0
  186. package/lib/vtx-road-modal/components/BaseInfo/index.less +218 -218
  187. package/lib/vtx-road-modal/components/Statistical/index.less +32 -32
  188. package/lib/vtx-shxq-modal/components/AlarmRecord/index.js +4 -1
  189. package/lib/vtx-shxq-modal/components/Tfd/index.js +0 -1
  190. package/lib/vtx-shxq-modal/components/ThrowRecord/index.js +4 -1
  191. package/lib/vtx-staff-modal/components/BaseInfo/ListZymx.js +6 -2
  192. package/lib/vtx-tfd-modal/api.js +22 -27
  193. package/lib/vtx-tfd-modal/components/BaseInfo/index.js +107 -59
  194. package/lib/vtx-tfd-modal/components/BaseInfo/index.less +5 -0
  195. package/lib/vtx-zg-modal/api.js +107 -0
  196. package/lib/vtx-zg-modal/components/BaseInfo/index.js +287 -0
  197. package/lib/vtx-zg-modal/components/BaseInfo/index.less +124 -0
  198. package/lib/vtx-zg-modal/components/index.js +1 -0
  199. package/lib/vtx-zg-modal/imgs/dot.png +0 -0
  200. package/lib/vtx-zg-modal/imgs/dot_done.png +0 -0
  201. package/lib/vtx-zg-modal/index.js +42 -0
  202. package/lib/vtx-zg-modal/style/index.js +3 -0
  203. package/lib/vtx-zg-modal/style/index.less +1 -0
  204. package/lib/vtx-zzz-modal/index.js +10 -10
  205. package/package.json +1 -1
  206. package/lib/vtx-car-modal/imgs/calendar/fsdf/durationqq.png +0 -0
@@ -0,0 +1,111 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
3
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
5
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
7
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
8
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
12
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
13
+ import { getVtxToken } from '@vtx/utils';
14
+ import { Col, Image, Row } from 'antd';
15
+ import groupBy from 'lodash/groupBy';
16
+ import { useContext } from 'react';
17
+ import { VmInfoCollection, VmMap, VmWrapper } from "../../../_components";
18
+ import { BasicService } from "../../api";
19
+ import { getFormItem, RestaurantConfigureEnum } from "../../config";
20
+ import { RestaurantContext } from "../../index";
21
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
22
+ var DetailInfo = function DetailInfo() {
23
+ var _info$location;
24
+ var _useContext = useContext(RestaurantContext),
25
+ info = _useContext.info;
26
+ var configData = BasicService.useGetConfigData();
27
+ var baseConfigList = (configData || []).filter(function (item) {
28
+ return item.isVisible;
29
+ });
30
+ var groupByGroupName = groupBy(baseConfigList, 'groupName');
31
+ var getDataSource = function getDataSource(config) {
32
+ return config.filter(function (item) {
33
+ return item.dataKey !== 'location';
34
+ }).map(function (item) {
35
+ var formItem = getFormItem(item, info);
36
+ if (item.dataKey === RestaurantConfigureEnum.DIVISION_NAME) {
37
+ formItem.isAddress = false;
38
+ }
39
+ return _objectSpread(_objectSpread({
40
+ key: item.dataKey
41
+ }, formItem), formItem.type === 'img' ? {
42
+ render: function render() {
43
+ var photos = JSON.parse(formItem.value || '[]');
44
+ return /*#__PURE__*/_jsx("div", {
45
+ style: {
46
+ whiteSpace: 'break-spaces'
47
+ },
48
+ children: photos.map(function (item) {
49
+ return /*#__PURE__*/_jsx(Image, {
50
+ width: 80,
51
+ height: 80,
52
+ src: "/vortex/rest/cloud/np/file/downloadFileThumbnail?outputQuality=0.5&scale=0.2&id=".concat(item.id, "&token=").concat(getVtxToken('token')),
53
+ preview: {
54
+ src: "/cloudFile/common/downloadFile?id=".concat(item.id, "&token=").concat(getVtxToken('token'))
55
+ }
56
+ }, item.id);
57
+ })
58
+ });
59
+ }
60
+ } : {});
61
+ });
62
+ };
63
+ var _ref = info !== null && info !== void 0 && (_info$location = info.location) !== null && _info$location !== void 0 && _info$location.lngLats ? info.location.lngLats.split(',') : [],
64
+ _ref2 = _slicedToArray(_ref, 2),
65
+ lng = _ref2[0],
66
+ lat = _ref2[1];
67
+ var mapPoints = lng && lat ? [{
68
+ lng: lng,
69
+ lat: lat,
70
+ icon: 'CC_CSDW',
71
+ name: info.name,
72
+ type: 'point',
73
+ id: info.name
74
+ }] : [];
75
+ return /*#__PURE__*/_jsx(Row, {
76
+ gutter: [10, 10],
77
+ style: {
78
+ height: '100%'
79
+ },
80
+ children: Object.keys(groupByGroupName).map(function (name) {
81
+ return /*#__PURE__*/_jsx(Col, {
82
+ span: 24,
83
+ children: /*#__PURE__*/_jsx(VmWrapper, {
84
+ title: name,
85
+ children: /*#__PURE__*/_jsxs(_Fragment, {
86
+ children: [/*#__PURE__*/_jsx(VmInfoCollection, {
87
+ data: getDataSource(groupByGroupName[name]),
88
+ horizontal: true,
89
+ width: "33%",
90
+ ellipsis: true
91
+ }), groupByGroupName[name].find(function (item) {
92
+ return item.dataKey === 'location';
93
+ }) && lng && lat ? /*#__PURE__*/_jsx("div", {
94
+ style: {
95
+ height: 230,
96
+ marginBottom: 16
97
+ },
98
+ children: /*#__PURE__*/_jsx(VmMap, {
99
+ mapPoints: mapPoints,
100
+ mapType: 'wgs84',
101
+ mapCenter: [lng, lat],
102
+ address: info === null || info === void 0 ? void 0 : info.address
103
+ })
104
+ }) : null]
105
+ })
106
+ })
107
+ }, name);
108
+ })
109
+ });
110
+ };
111
+ export default DetailInfo;
@@ -0,0 +1,299 @@
1
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
4
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
5
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
6
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
7
+ import { downloadFile, getVtxToken } from '@vtx/utils';
8
+ import { Button, Image, message, Space } from 'antd';
9
+ import { useContext } from 'react';
10
+ import { VmInfoCollection, VmTable, VmTitle, VmWrapper } from "../../../_components";
11
+ import VtxBaseModal from "../../../vtx-base-modal";
12
+ import { BasicService } from "../../api";
13
+ import { RestaurantContext } from "../../index";
14
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
15
+ var Content = function Content(_ref) {
16
+ var id = _ref.id;
17
+ var data = BasicService.useContactInfo({
18
+ id: id
19
+ });
20
+ var infoData = [{
21
+ label: '合同编号',
22
+ value: data.contractNumber,
23
+ key: 'contractNumber'
24
+ }, {
25
+ label: '垃圾类型',
26
+ value: data.garbageTypeStr,
27
+ key: 'garbageTypeStr'
28
+ }, {
29
+ label: '甲方名称',
30
+ value: data.firstParty,
31
+ key: 'firstParty'
32
+ }, {
33
+ label: '乙方名称',
34
+ value: data.secondParty,
35
+ key: 'secondParty'
36
+ }, {
37
+ label: '运输地址',
38
+ value: data.transportAddress,
39
+ key: 'transportAddress',
40
+ isAddress: true
41
+ }].concat(_toConsumableArray(data.garbageType === 'ccfqw' ? [{
42
+ label: '运输频次',
43
+ value: data.frequencyStr,
44
+ key: 'frequencyStr'
45
+ }, {
46
+ label: '运输时间',
47
+ value: data.time,
48
+ key: 'time'
49
+ }] : []), [{
50
+ label: '运输量',
51
+ value: data.garbageType === 'fqyz' ? "".concat(data.trafficWeek || '-', "\u516C\u65A4/\u5468\uFF0C").concat(data.trafficMonth || '-') : "".concat(data.trafficDay || '-', "\u516C\u65A4/\u5929"),
52
+ key: 'trafficDay'
53
+ }], _toConsumableArray(data.garbageType === 'fqyz' ? [{
54
+ label: '收运频次',
55
+ value: data.frequencyStr,
56
+ key: 'frequencyStr'
57
+ }, {
58
+ label: '收运时间',
59
+ value: data.time,
60
+ key: 'time'
61
+ }, {
62
+ label: '费用支付方式',
63
+ value: data.paymentMethod,
64
+ key: 'paymentMethod'
65
+ }] : [{
66
+ label: '签约金额',
67
+ value: "".concat(data.contractAmount || '-', "\u5143/\u5E74"),
68
+ key: 'contractAmount'
69
+ }]), [{
70
+ label: '甲方未按规定分类违约金',
71
+ value: "".concat(data.classifyPenalty || '-', "\u5143/\u5428"),
72
+ key: 'classifyPenalty'
73
+ }], _toConsumableArray(data.garbageType === 'fqyz' ? [{
74
+ label: '协议违反解约期限',
75
+ value: "".concat(data.terminationPeriod || '-', "\u5929"),
76
+ key: 'terminationPeriod'
77
+ }] : [{
78
+ label: '甲方转交其他单位个人收运违约金',
79
+ value: "".concat(data.transferOtherPenalty || '-', "\u5143/\u6B21"),
80
+ key: 'terminationPeriod'
81
+ }]));
82
+ var columns = [{
83
+ title: '容量',
84
+ dataIndex: 'capacity',
85
+ align: 'center'
86
+ }, {
87
+ title: '桶数',
88
+ dataIndex: 'barrelage',
89
+ align: 'center'
90
+ }];
91
+ var token = getVtxToken('token');
92
+ return /*#__PURE__*/_jsx("div", {
93
+ children: /*#__PURE__*/_jsx(VmWrapper, {
94
+ title: "\u5408\u540C\u4FE1\u606F",
95
+ rightContent: /*#__PURE__*/_jsxs(Space, {
96
+ children: [/*#__PURE__*/_jsx(Button, {
97
+ onClick: function onClick() {
98
+ if (data.contractId) {
99
+ downloadFile("/cloudFile/common/downloadFile?id=".concat(data.contractId, "&token=").concat(token), {}, 'form');
100
+ } else {
101
+ message.warning('还没有合同生成');
102
+ }
103
+ },
104
+ children: "\u4E0B\u8F7D\u5408\u540C(word)"
105
+ }), /*#__PURE__*/_jsx(Button, {
106
+ type: "primary",
107
+ onClick: function onClick() {
108
+ message.config({
109
+ prefixCls: 'my-message'
110
+ });
111
+ if (data.contractPdfId) {
112
+ downloadFile("/cloudFile/common/downloadFile?id=".concat(data.contractPdfId, "&token=").concat(token), {}, 'form');
113
+ } else {
114
+ message.warning('还没有合同生成');
115
+ }
116
+ },
117
+ children: "\u4E0B\u8F7D\u5408\u540C(pdf)"
118
+ })]
119
+ }),
120
+ children: /*#__PURE__*/_jsxs(_Fragment, {
121
+ children: [/*#__PURE__*/_jsx(VmInfoCollection, {
122
+ data: infoData,
123
+ horizontal: true,
124
+ width: "50%",
125
+ ellipsis: true
126
+ }), /*#__PURE__*/_jsx(VmTitle, {
127
+ title: '免费桶配置'
128
+ }), /*#__PURE__*/_jsx(VmTable, {
129
+ columns: columns,
130
+ dataSource: [{
131
+ capacity: '120L',
132
+ barrelage: data.bucketNumberOne || ''
133
+ }, {
134
+ capacity: '240L',
135
+ barrelage: data.bucketNumberTwo || ''
136
+ }],
137
+ height: 220,
138
+ pagination: false
139
+ }), /*#__PURE__*/_jsx(VmInfoCollection, {
140
+ data: [{
141
+ label: '押金',
142
+ value: "".concat(data.deposit || '-', "\u5143"),
143
+ key: 'deposit'
144
+ }].concat(_toConsumableArray(data.garbageType === 'ccfqw' ? [{
145
+ label: '配小桶',
146
+ value: "".concat(data.keg || '-', "\u4E2A"),
147
+ key: 'keg'
148
+ }] : [])),
149
+ horizontal: true,
150
+ width: "50%",
151
+ ellipsis: true
152
+ }), /*#__PURE__*/_jsx(VmTitle, {
153
+ title: '甲方信息'
154
+ }), /*#__PURE__*/_jsx(VmInfoCollection, {
155
+ data: [{
156
+ label: '签字',
157
+ value: data.firstSign,
158
+ key: 'firstSign',
159
+ render: data.firstSign ? function () {
160
+ return /*#__PURE__*/_jsx(Image, {
161
+ src: "/vortex/rest/cloud/np/file/downloadFileThumbnail?outputQuality=0.5&scale=0.2&id=".concat(data === null || data === void 0 ? void 0 : data.firstSign, "&token=").concat(token),
162
+ preview: {
163
+ destroyOnClose: true,
164
+ src: "/cloudFile/common/downloadFile?id=".concat(data === null || data === void 0 ? void 0 : data.firstSign, "&token=").concat(token),
165
+ maskClassName: 'maskClass'
166
+ },
167
+ alt: "\u7B7E\u5B57",
168
+ style: {
169
+ width: 100,
170
+ height: 100
171
+ }
172
+ });
173
+ } : undefined
174
+ }, {
175
+ label: '签章',
176
+ value: data.firstSignature,
177
+ key: 'firstSignature',
178
+ componentType: 'image'
179
+ }, {
180
+ label: '法定代表人',
181
+ value: data.firstRepresentative,
182
+ key: 'firstRepresentative'
183
+ }, {
184
+ label: '委托代理人',
185
+ value: data.firstProxy,
186
+ key: 'firstProxy'
187
+ }, {
188
+ label: '通讯地址',
189
+ value: data.firstMailingAddress,
190
+ key: 'firstMailingAddress',
191
+ isAddress: true
192
+ }, {
193
+ label: '联系电话',
194
+ value: data.firstPhone,
195
+ key: 'firstPhone',
196
+ isAddress: true
197
+ }],
198
+ horizontal: true,
199
+ width: "50%",
200
+ ellipsis: true
201
+ }), /*#__PURE__*/_jsx(VmTitle, {
202
+ title: '乙方信息'
203
+ }), /*#__PURE__*/_jsx(VmInfoCollection, {
204
+ data: [{
205
+ label: '签字',
206
+ value: data.secondSign,
207
+ key: 'secondSign',
208
+ render: data.secondSign ? function () {
209
+ return /*#__PURE__*/_jsx(Image, {
210
+ src: "/vortex/rest/cloud/np/file/downloadFileThumbnail?outputQuality=0.5&scale=0.2&id=".concat(data === null || data === void 0 ? void 0 : data.secondSign, "&token=").concat(token),
211
+ preview: {
212
+ destroyOnClose: true,
213
+ src: "/cloudFile/common/downloadFile?id=".concat(data === null || data === void 0 ? void 0 : data.secondSign, "&token=").concat(token),
214
+ maskClassName: 'maskClass'
215
+ },
216
+ alt: "\u7B7E\u5B57",
217
+ style: {
218
+ width: 100,
219
+ height: 100
220
+ }
221
+ });
222
+ } : undefined
223
+ }, {
224
+ label: '签章',
225
+ value: data.collectSignature,
226
+ key: 'collectSignature',
227
+ componentType: 'image'
228
+ }, {
229
+ label: '法定代表人',
230
+ value: data.secondRepresentative,
231
+ key: 'secondRepresentative'
232
+ }, {
233
+ label: '委托代理人',
234
+ value: data.secondProxy,
235
+ key: 'secondProxy'
236
+ }, {
237
+ label: '通讯地址',
238
+ value: data.secondMailingAddress,
239
+ key: 'secondMailingAddress',
240
+ isAddress: true
241
+ }, {
242
+ label: '联系电话',
243
+ value: data.secondPhone,
244
+ key: 'secondPhone',
245
+ isAddress: true
246
+ }],
247
+ horizontal: true,
248
+ width: "50%",
249
+ ellipsis: true
250
+ }), /*#__PURE__*/_jsx(VmTitle, {
251
+ title: '时效信息'
252
+ }), /*#__PURE__*/_jsx(VmInfoCollection, {
253
+ data: [{
254
+ label: '生效日期',
255
+ value: data.effectiveTime,
256
+ key: 'effectiveTime'
257
+ }, {
258
+ label: '终止日期',
259
+ value: data.terminationTime,
260
+ key: 'terminationTime'
261
+ }, {
262
+ label: '签约日期',
263
+ value: data.signTime,
264
+ key: 'signTime'
265
+ }, {
266
+ label: '纸质合同附件',
267
+ value: data.paperContractAttachments,
268
+ key: 'paperContractAttachments',
269
+ componentType: 'ATTACHS'
270
+ }],
271
+ horizontal: true,
272
+ width: "50%",
273
+ ellipsis: true
274
+ })]
275
+ })
276
+ })
277
+ });
278
+ };
279
+ var ContactDetail = function ContactDetail(_ref2) {
280
+ var onCancel = _ref2.onCancel,
281
+ id = _ref2.id;
282
+ var _useContext = useContext(RestaurantContext),
283
+ theme = _useContext.theme;
284
+ return /*#__PURE__*/_jsx(VtxBaseModal, {
285
+ title: '合同管理 > 查看',
286
+ tabs: [{
287
+ key: 'info'
288
+ }],
289
+ contents: {
290
+ info: /*#__PURE__*/_jsx(Content, {
291
+ id: id
292
+ })
293
+ },
294
+ visible: true,
295
+ onCancel: onCancel,
296
+ theme: theme
297
+ });
298
+ };
299
+ export default ContactDetail;
@@ -0,0 +1,198 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
9
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
10
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
11
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
12
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
13
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, catch: function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
14
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
15
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
16
+ import { useAntdTable, useSetState } from 'ahooks';
17
+ import { Badge, Col, Row, Space } from 'antd';
18
+ import { useContext } from 'react';
19
+ import { VmInfoCollection, VmTable, VmTag, VmWrapper } from "../../../_components";
20
+ import { getContactList } from "../../api";
21
+ import { signColorMap } from "../../config";
22
+ import { RestaurantContext } from "../../index";
23
+ import ContactDetail from "./ContactDetail";
24
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
25
+ var SignAndContract = function SignAndContract() {
26
+ var _info$contract;
27
+ var _useContext = useContext(RestaurantContext),
28
+ info = _useContext.info,
29
+ openSyPoint = _useContext.openSyPoint,
30
+ openUnit = _useContext.openUnit;
31
+ var collectStatusValue = info.collectStatusValue,
32
+ syPointName = info.syPointName,
33
+ syPointId = info.syPointId;
34
+ var contractItem = (info === null || info === void 0 || (_info$contract = info.contract) === null || _info$contract === void 0 ? void 0 : _info$contract[0]) || {};
35
+ var dataSource = [{
36
+ key: '',
37
+ label: '服务状态',
38
+ value: /*#__PURE__*/_jsxs(Space, {
39
+ children: [contractItem.status && /*#__PURE__*/_jsx(Badge, {
40
+ color: signColorMap[contractItem.status]
41
+ }), contractItem.statusStr || '--']
42
+ })
43
+ }, {
44
+ key: '',
45
+ label: '签约企业',
46
+ value: contractItem.signTransUnitName,
47
+ render: function render() {
48
+ return /*#__PURE__*/_jsx("a", {
49
+ onClick: function onClick() {
50
+ return openUnit && openUnit({
51
+ id: contractItem.signTransUnitId,
52
+ title: contractItem.signTransUnitName
53
+ });
54
+ },
55
+ children: contractItem.signTransUnitName
56
+ });
57
+ }
58
+ }, {
59
+ key: '',
60
+ label: '收集类型',
61
+ value: collectStatusValue
62
+ }, {
63
+ key: '',
64
+ label: '收集点',
65
+ value: syPointName,
66
+ render: function render() {
67
+ return /*#__PURE__*/_jsx("a", {
68
+ onClick: function onClick() {
69
+ return openSyPoint && openSyPoint({
70
+ id: syPointId,
71
+ title: syPointName
72
+ });
73
+ },
74
+ children: syPointName
75
+ });
76
+ }
77
+ }];
78
+ var _useAntdTable = useAntdTable( /*#__PURE__*/function () {
79
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref) {
80
+ var current, pageSize, sorter, sort, order, field;
81
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
82
+ while (1) switch (_context.prev = _context.next) {
83
+ case 0:
84
+ current = _ref.current, pageSize = _ref.pageSize, sorter = _ref.sorter;
85
+ if (sorter && sorter.order) {
86
+ order = sorter.order, field = sorter.field;
87
+ sort = "".concat(field, ",").concat(order === 'descend' ? 'DESC' : 'ASC');
88
+ }
89
+ return _context.abrupt("return", getContactList({
90
+ firstPartyId: info.id,
91
+ page: current - 1,
92
+ size: pageSize,
93
+ sort: sort
94
+ }));
95
+ case 3:
96
+ case "end":
97
+ return _context.stop();
98
+ }
99
+ }, _callee);
100
+ }));
101
+ return function (_x) {
102
+ return _ref2.apply(this, arguments);
103
+ };
104
+ }(), {
105
+ defaultPageSize: 10,
106
+ refreshDeps: [info.id]
107
+ }),
108
+ tableProps = _useAntdTable.tableProps;
109
+ var _useSetState = useSetState({
110
+ visible: false,
111
+ id: ''
112
+ }),
113
+ _useSetState2 = _slicedToArray(_useSetState, 2),
114
+ modalInfo = _useSetState2[0],
115
+ setModalInfo = _useSetState2[1];
116
+ var columns = [{
117
+ title: '合同时间',
118
+ dataIndex: 'contractTime',
119
+ width: 160
120
+ }, {
121
+ title: '签约日期',
122
+ dataIndex: 'signTime',
123
+ width: 120
124
+ }, {
125
+ title: '运输量',
126
+ dataIndex: 'trafficDay',
127
+ align: 'right',
128
+ width: 120
129
+ }, {
130
+ title: '签约企业',
131
+ dataIndex: 'secondParty',
132
+ width: 200
133
+ }, {
134
+ title: '服务状态',
135
+ dataIndex: 'statusStr',
136
+ width: 120,
137
+ render: function render(text, record) {
138
+ return /*#__PURE__*/_jsx("span", {
139
+ children: record.status ? /*#__PURE__*/_jsx(VmTag, {
140
+ type: record.status === 'fwz' ? 'green' : record.status === 'wkq' ? 'blue' : 'yellow',
141
+ title: text
142
+ }) : '-'
143
+ });
144
+ }
145
+ }, {
146
+ title: '操作',
147
+ dadaIndex: 'action',
148
+ width: 80,
149
+ render: function render(_un, record) {
150
+ return /*#__PURE__*/_jsx("span", {
151
+ children: /*#__PURE__*/_jsx("a", {
152
+ onClick: function onClick() {
153
+ return setModalInfo({
154
+ visible: true,
155
+ id: record.id
156
+ });
157
+ },
158
+ children: "\u67E5\u770B"
159
+ })
160
+ });
161
+ }
162
+ }];
163
+ return /*#__PURE__*/_jsxs(_Fragment, {
164
+ children: [/*#__PURE__*/_jsxs(Row, {
165
+ gutter: [10, 10],
166
+ children: [/*#__PURE__*/_jsx(Col, {
167
+ span: 24,
168
+ children: /*#__PURE__*/_jsx(VmWrapper, {
169
+ title: '签约信息',
170
+ children: /*#__PURE__*/_jsx(VmInfoCollection, {
171
+ data: dataSource,
172
+ horizontal: true,
173
+ width: '33%',
174
+ ellipsis: true
175
+ })
176
+ })
177
+ }), /*#__PURE__*/_jsx(Col, {
178
+ span: 24,
179
+ children: /*#__PURE__*/_jsx(VmWrapper, {
180
+ title: '合同信息',
181
+ children: /*#__PURE__*/_jsx(VmTable, _objectSpread(_objectSpread({
182
+ columns: columns
183
+ }, tableProps), {}, {
184
+ height: 400
185
+ }))
186
+ })
187
+ })]
188
+ }), modalInfo.visible && /*#__PURE__*/_jsx(ContactDetail, {
189
+ onCancel: function onCancel() {
190
+ return setModalInfo({
191
+ visible: false
192
+ });
193
+ },
194
+ id: modalInfo.id
195
+ })]
196
+ });
197
+ };
198
+ export default SignAndContract;
@@ -0,0 +1,7 @@
1
+ import Alarm from "./Alarm";
2
+ import Basic from "./Basic";
3
+ import Calendar from "./Calendar";
4
+ import Collection from "./Collection";
5
+ import DetailInfo from "./DetailInfo";
6
+ import SignAndContract from "./SignAndContract";
7
+ export { Alarm, Basic, Calendar, Collection, DetailInfo, SignAndContract };