safecheck-client 4.0.1-3 → 4.0.1-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 (263) hide show
  1. package/.babelrc +5 -5
  2. package/.editorconfig +9 -9
  3. package/android.html +18 -18
  4. package/config/dev.env.js +6 -6
  5. package/config/index.js +38 -38
  6. package/config/prod.env.js +3 -3
  7. package/config/test.env.js +6 -6
  8. package/docs/AppBase.md +22 -22
  9. package/docs/Busy.md +14 -14
  10. package/docs/CriteriaPaged.md +47 -47
  11. package/docs/DataGrid.md +54 -54
  12. package/docs/DataModel.md +22 -22
  13. package/docs/Dynamic.md +42 -42
  14. package/docs/GetParams.md +11 -11
  15. package/docs/HttpBusy.md +13 -13
  16. package/docs/HttpStore.md +29 -29
  17. package/docs/MessageBox.md +28 -28
  18. package/docs/PagedList.md +29 -29
  19. package/docs/Pager.md +21 -21
  20. package/docs/Project.md +23 -23
  21. package/docs/Route.md +105 -105
  22. package/docs/SafetyCheck/AdjustPlan.md +13 -13
  23. package/docs/SafetyCheck/CheckerPlan.md +12 -12
  24. package/docs/Task.md +46 -46
  25. package/docs/TreeList.md +28 -28
  26. package/docs/TreeMixin.md +18 -18
  27. package/docs/all.md +10 -10
  28. package/docs/list.md +42 -42
  29. package/docs/partial.md +75 -75
  30. package/docs/selector.md +82 -82
  31. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/Snippets.md +28 -28
  32. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue-strap/345/217/230/346/233/264/350/256/260/345/275/225.md +7 -7
  33. package/docs//345/274/200/345/217/221/346/226/207/346/241/243/vue/345/217/230/346/233/264/350/256/260/345/275/225.md +13 -13
  34. package/docs//345/274/200/345/217/221/346/226/207/346/241/243//345/274/200/345/217/221/347/216/257/345/242/203/350/256/276/347/275/256.md +77 -77
  35. package/docs//347/225/214/351/235/242/345/210/266/344/275/234/350/247/204/350/214/203.md +54 -54
  36. package/examples/AddressList/App.vue +13 -13
  37. package/examples/AddressList/index.html +11 -11
  38. package/examples/DispatchList/App.vue +10 -10
  39. package/examples/DispatchList/BaseTree.vue +13 -13
  40. package/examples/DispatchList/Init.vue +22 -22
  41. package/examples/DispatchList/Test.vue +20 -20
  42. package/examples/DispatchList/index.html +11 -11
  43. package/examples/DispatchList/main.js +18 -18
  44. package/home.html +16 -16
  45. package/package.json +1 -1
  46. package/publish.bat +7 -7
  47. package/release.bat +5 -5
  48. package/src/Widget.vue +13 -13
  49. package/src/android-bootstrap/fonts/glyphicons-halflings-regular.svg +287 -287
  50. package/src/android-bootstrap/less/.csscomb.json +304 -304
  51. package/src/android-bootstrap/less/.csslintrc +19 -19
  52. package/src/android-bootstrap/less/alerts.less +73 -73
  53. package/src/android-bootstrap/less/badges.less +66 -66
  54. package/src/android-bootstrap/less/bootstrap.less +56 -56
  55. package/src/android-bootstrap/less/breadcrumbs.less +26 -26
  56. package/src/android-bootstrap/less/button-groups.less +247 -247
  57. package/src/android-bootstrap/less/buttons.less +173 -173
  58. package/src/android-bootstrap/less/carousel.less +269 -269
  59. package/src/android-bootstrap/less/close.less +34 -34
  60. package/src/android-bootstrap/less/code.less +69 -69
  61. package/src/android-bootstrap/less/component-animations.less +33 -33
  62. package/src/android-bootstrap/less/grid.less +84 -84
  63. package/src/android-bootstrap/less/input-groups.less +167 -167
  64. package/src/android-bootstrap/less/jumbotron.less +52 -52
  65. package/src/android-bootstrap/less/labels.less +64 -64
  66. package/src/android-bootstrap/less/list-group.less +141 -141
  67. package/src/android-bootstrap/less/media.less +66 -66
  68. package/src/android-bootstrap/less/mixins/alerts.less +14 -14
  69. package/src/android-bootstrap/less/mixins/background-variant.less +9 -9
  70. package/src/android-bootstrap/less/mixins/border-radius.less +18 -18
  71. package/src/android-bootstrap/less/mixins/buttons.less +69 -69
  72. package/src/android-bootstrap/less/mixins/center-block.less +7 -7
  73. package/src/android-bootstrap/less/mixins/clearfix.less +22 -22
  74. package/src/android-bootstrap/less/mixins/forms.less +90 -90
  75. package/src/android-bootstrap/less/mixins/gradients.less +59 -59
  76. package/src/android-bootstrap/less/mixins/grid-framework.less +92 -92
  77. package/src/android-bootstrap/less/mixins/grid.less +122 -122
  78. package/src/android-bootstrap/less/mixins/hide-text.less +21 -21
  79. package/src/android-bootstrap/less/mixins/image.less +33 -33
  80. package/src/android-bootstrap/less/mixins/labels.less +12 -12
  81. package/src/android-bootstrap/less/mixins/list-group.less +30 -30
  82. package/src/android-bootstrap/less/mixins/nav-divider.less +10 -10
  83. package/src/android-bootstrap/less/mixins/nav-vertical-align.less +9 -9
  84. package/src/android-bootstrap/less/mixins/opacity.less +8 -8
  85. package/src/android-bootstrap/less/mixins/pagination.less +24 -24
  86. package/src/android-bootstrap/less/mixins/panels.less +24 -24
  87. package/src/android-bootstrap/less/mixins/progress-bar.less +10 -10
  88. package/src/android-bootstrap/less/mixins/reset-filter.less +8 -8
  89. package/src/android-bootstrap/less/mixins/reset-text.less +18 -18
  90. package/src/android-bootstrap/less/mixins/resize.less +6 -6
  91. package/src/android-bootstrap/less/mixins/responsive-visibility.less +15 -15
  92. package/src/android-bootstrap/less/mixins/size.less +10 -10
  93. package/src/android-bootstrap/less/mixins/tab-focus.less +9 -9
  94. package/src/android-bootstrap/less/mixins/table-row.less +44 -44
  95. package/src/android-bootstrap/less/mixins/text-emphasis.less +9 -9
  96. package/src/android-bootstrap/less/mixins/text-overflow.less +8 -8
  97. package/src/android-bootstrap/less/mixins/vendor-prefixes.less +227 -227
  98. package/src/android-bootstrap/less/mixins.less +40 -40
  99. package/src/android-bootstrap/less/modals.less +151 -151
  100. package/src/android-bootstrap/less/navbar.less +660 -660
  101. package/src/android-bootstrap/less/navs.less +290 -290
  102. package/src/android-bootstrap/less/normalize.less +424 -424
  103. package/src/android-bootstrap/less/pager.less +76 -76
  104. package/src/android-bootstrap/less/pagination.less +89 -89
  105. package/src/android-bootstrap/less/panels.less +274 -274
  106. package/src/android-bootstrap/less/popovers.less +131 -131
  107. package/src/android-bootstrap/less/print.less +101 -101
  108. package/src/android-bootstrap/less/progress-bars.less +87 -87
  109. package/src/android-bootstrap/less/responsive-embed.less +35 -35
  110. package/src/android-bootstrap/less/responsive-utilities.less +194 -194
  111. package/src/android-bootstrap/less/scaffolding.less +161 -161
  112. package/src/android-bootstrap/less/tables.less +262 -262
  113. package/src/android-bootstrap/less/theme.less +291 -291
  114. package/src/android-bootstrap/less/thumbnails.less +36 -36
  115. package/src/android-bootstrap/less/tooltip.less +102 -102
  116. package/src/android-bootstrap/less/type.less +303 -303
  117. package/src/android-bootstrap/less/utilities.less +55 -55
  118. package/src/android-bootstrap/less/variables.less +896 -896
  119. package/src/android-bootstrap/less/wells.less +29 -29
  120. package/src/bootstrap/less/.csscomb.json +304 -304
  121. package/src/bootstrap/less/.csslintrc +19 -19
  122. package/src/bootstrap/less/alerts.less +73 -73
  123. package/src/bootstrap/less/badges.less +66 -66
  124. package/src/bootstrap/less/breadcrumbs.less +26 -26
  125. package/src/bootstrap/less/button-groups.less +247 -247
  126. package/src/bootstrap/less/buttons.less +172 -172
  127. package/src/bootstrap/less/carousel.less +269 -269
  128. package/src/bootstrap/less/close.less +34 -34
  129. package/src/bootstrap/less/code.less +69 -69
  130. package/src/bootstrap/less/component-animations.less +33 -33
  131. package/src/bootstrap/less/dropdowns.less +216 -216
  132. package/src/bootstrap/less/grid.less +84 -84
  133. package/src/bootstrap/less/input-groups.less +167 -167
  134. package/src/bootstrap/less/jumbotron.less +52 -52
  135. package/src/bootstrap/less/labels.less +64 -64
  136. package/src/bootstrap/less/list-group.less +141 -141
  137. package/src/bootstrap/less/media.less +66 -66
  138. package/src/bootstrap/less/mixins/alerts.less +14 -14
  139. package/src/bootstrap/less/mixins/background-variant.less +9 -9
  140. package/src/bootstrap/less/mixins/border-radius.less +18 -18
  141. package/src/bootstrap/less/mixins/buttons.less +69 -69
  142. package/src/bootstrap/less/mixins/center-block.less +7 -7
  143. package/src/bootstrap/less/mixins/clearfix.less +22 -22
  144. package/src/bootstrap/less/mixins/forms.less +90 -90
  145. package/src/bootstrap/less/mixins/gradients.less +59 -59
  146. package/src/bootstrap/less/mixins/grid-framework.less +92 -92
  147. package/src/bootstrap/less/mixins/grid.less +122 -122
  148. package/src/bootstrap/less/mixins/hide-text.less +21 -21
  149. package/src/bootstrap/less/mixins/image.less +33 -33
  150. package/src/bootstrap/less/mixins/labels.less +12 -12
  151. package/src/bootstrap/less/mixins/list-group.less +30 -30
  152. package/src/bootstrap/less/mixins/nav-divider.less +10 -10
  153. package/src/bootstrap/less/mixins/nav-vertical-align.less +9 -9
  154. package/src/bootstrap/less/mixins/opacity.less +8 -8
  155. package/src/bootstrap/less/mixins/pagination.less +24 -24
  156. package/src/bootstrap/less/mixins/panels.less +24 -24
  157. package/src/bootstrap/less/mixins/progress-bar.less +10 -10
  158. package/src/bootstrap/less/mixins/reset-filter.less +8 -8
  159. package/src/bootstrap/less/mixins/reset-text.less +18 -18
  160. package/src/bootstrap/less/mixins/resize.less +6 -6
  161. package/src/bootstrap/less/mixins/responsive-visibility.less +15 -15
  162. package/src/bootstrap/less/mixins/size.less +10 -10
  163. package/src/bootstrap/less/mixins/tab-focus.less +9 -9
  164. package/src/bootstrap/less/mixins/table-row.less +44 -44
  165. package/src/bootstrap/less/mixins/text-emphasis.less +9 -9
  166. package/src/bootstrap/less/mixins/text-overflow.less +8 -8
  167. package/src/bootstrap/less/mixins/vendor-prefixes.less +227 -227
  168. package/src/bootstrap/less/mixins.less +40 -40
  169. package/src/bootstrap/less/modals.less +151 -151
  170. package/src/bootstrap/less/navbar.less +660 -660
  171. package/src/bootstrap/less/normalize.less +424 -424
  172. package/src/bootstrap/less/pagination.less +89 -89
  173. package/src/bootstrap/less/panels.less +275 -275
  174. package/src/bootstrap/less/popovers.less +131 -131
  175. package/src/bootstrap/less/print.less +101 -101
  176. package/src/bootstrap/less/progress-bars.less +87 -87
  177. package/src/bootstrap/less/responsive-embed.less +35 -35
  178. package/src/bootstrap/less/responsive-utilities.less +194 -194
  179. package/src/bootstrap/less/scaffolding.less +161 -161
  180. package/src/bootstrap/less/theme.less +291 -291
  181. package/src/bootstrap/less/thumbnails.less +36 -36
  182. package/src/bootstrap/less/tooltip.less +102 -102
  183. package/src/bootstrap/less/type.less +303 -303
  184. package/src/bootstrap/less/utilities.less +55 -55
  185. package/src/bootstrap/less/wells.less +29 -29
  186. package/src/components/FileUpload.vue +696 -696
  187. package/src/components/Hello.vue +39 -39
  188. package/src/components/LeftTree.vue +27 -27
  189. package/src/components/NewDefectList/DefectListNew.vue +663 -660
  190. package/src/components/NewDefectList/DefectPaperNew.vue +1184 -1184
  191. package/src/components/Util/SafecheckUpload.vue +281 -281
  192. package/src/components/android/AttendanceTally.vue +116 -116
  193. package/src/components/android/Blank.vue +10 -10
  194. package/src/components/android/CheckUnplanPage.vue +56 -56
  195. package/src/components/android/Checker.vue +12 -12
  196. package/src/components/android/CheckerAnnual.vue +81 -81
  197. package/src/components/android/CheckerAvarta.vue +82 -82
  198. package/src/components/android/EquipmentInspection.vue +348 -348
  199. package/src/components/android/FootprintMap.vue +120 -120
  200. package/src/components/android/HiddentroubleInvestigation.vue +192 -192
  201. package/src/components/android/MasterMain.vue +77 -77
  202. package/src/components/android/Menu.vue +132 -132
  203. package/src/components/android/PaperAlarm.vue +85 -85
  204. package/src/components/android/PaperDeviceNoncivil.vue +214 -214
  205. package/src/components/android/PhoneUpUserinfo.vue +1249 -1249
  206. package/src/components/android/PlumberAnnual.vue +83 -83
  207. package/src/components/android/PlumberAnnualDetail.vue +65 -65
  208. package/src/components/android/PlumberMonthly.vue +84 -84
  209. package/src/components/android/PostMap.vue +83 -83
  210. package/src/components/android/QueryCheckHistory.vue +122 -122
  211. package/src/components/android/QueryCheckHistoryItem.vue +62 -62
  212. package/src/components/android/RepairMain.vue +60 -60
  213. package/src/components/android/Repairman.vue +12 -12
  214. package/src/components/android/SafeRightTree.vue +218 -218
  215. package/src/components/android/SafecheckDevices.vue +1340 -1340
  216. package/src/components/android/StationMaster.vue +12 -12
  217. package/src/components/defects/DefectModal.vue +101 -101
  218. package/src/components/defects/DevicesAndItem.vue +39 -39
  219. package/src/components/issueplan/IssuePlanMain.vue +23 -23
  220. package/src/components/notice/NoticeForm.vue +100 -100
  221. package/src/components/notice/NoticeIssue.vue +20 -20
  222. package/src/components/paper/PaperList.vue +797 -797
  223. package/src/components/paper/PicViewer.vue +18 -18
  224. package/src/components/pc/CheckBook.vue +303 -303
  225. package/src/components/pc/CheckBookArea.vue +146 -146
  226. package/src/components/pc/CheckBookCompany.vue +144 -144
  227. package/src/components/pc/CheckBookDetails.vue +161 -161
  228. package/src/components/pc/CheckBookEntry.vue +60 -60
  229. package/src/components/pc/CheckBookSearchArea.vue +560 -560
  230. package/src/components/pc/CheckBookSearchUnit.vue +229 -229
  231. package/src/components/pc/CheckBookSearchUser.vue +659 -659
  232. package/src/components/pc/CheckBookSearchUserList.vue +674 -674
  233. package/src/components/pc/CheckBookUser.vue +333 -333
  234. package/src/components/pc/PaperDefectMain.vue +880 -880
  235. package/src/components/phonestate/MonthlyTraffic.vue +66 -66
  236. package/src/components/phonestate/MonthlyTrafficRouter.vue +15 -15
  237. package/src/components/phonestate/PostMap.vue +82 -82
  238. package/src/components/querycheckpaper/PaperItem.vue +59 -59
  239. package/src/components/userfile/MeterFile.vue +145 -145
  240. package/src/components/userfile/MeterModify.vue +46 -46
  241. package/src/components/userfileaudit/MeterAuditFile.vue +129 -129
  242. package/src/filiale/meihekou/android/CheckPlanList.vue +198 -198
  243. package/src/filiale/meihekou/android/CheckPlanListArea.vue +190 -190
  244. package/src/filiale/meihekou/android/CurrentCreate.vue +1038 -1038
  245. package/src/filiale/meihekou/android/PaperFeedback.vue +1542 -1542
  246. package/src/filiale/meihekou/android/SafecheckDevices.vue +1340 -1340
  247. package/src/filiale/meihekou/android/SafecheckOrderV.vue +2433 -2433
  248. package/src/filiale/meihekou/android.js +22 -22
  249. package/src/filiale/meihekou/pc/NewCheckpaper.vue +2027 -2027
  250. package/src/filiale/yunchengminsheng/android/SafecheckOrderV.vue +2850 -2850
  251. package/src/main.js +33 -33
  252. package/src/plugins/LoadData.js +10 -10
  253. package/src/plugins/LoadParams.js +24 -24
  254. package/src/stores/wxconfig.js +10 -10
  255. package/src/utils/getNowDate.js +33 -33
  256. package/test/e2e/custom-assertions/elementCount.js +26 -26
  257. package/test/e2e/nightwatch.conf.js +40 -40
  258. package/test/e2e/runner.js +30 -30
  259. package/test/e2e/specs/test.js +13 -13
  260. package/test/unit/.eslintrc +5 -5
  261. package/test/unit/TestUtil.js +62 -62
  262. package/test/unit/context.html +20 -20
  263. package/test/unit/index.js +13 -13
@@ -1,1038 +1,1038 @@
1
- <style scoped>
2
- .bg {
3
- background-color: blue;
4
- height: 1px;
5
- border: 0;
6
- }
7
- .app-row {
8
- background-color: white;
9
- padding: 10px 10px 0 10px;
10
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
11
- }
12
- .search_input {
13
- border: 0;
14
- outline: none;
15
- }
16
- .font{
17
- font: 15px PingFang-SC-Medium;
18
- color: #666666;
19
- }
20
- .input-font{
21
- font: 15px PingFang-SC-Medium;
22
- color: #333333;
23
- }
24
- .btn-font{
25
- font:600 16px PingFang-SC-Bold;
26
- color: #499EDF;
27
- }
28
- .btn-color{
29
- background-color: #FFFFFF;
30
- border-radius: 10px ;
31
- border: 1px solid #499EDF;
32
- }
33
- .app-text {
34
- font-size: 12px;
35
- }
36
- .panel-self{
37
- border-radius: 10px;
38
- border:1px solid #499EDF;
39
- background-color: #F8F8F8;
40
- }
41
- .yybtn-color{
42
- background-color:#499edf;
43
- border-radius: 4px ;
44
- border: 1px solid #499EDF;
45
- color: #FFFFFF;
46
- font: 14px PingFang-SC-Bold;
47
- }
48
- .qxbtn-color{
49
- background-color: #FFFFFF;
50
- border-radius: 4px ;
51
- color: #499edf;
52
- font: 14px PingFang-SC-Bold;
53
- border: 1px solid #499EDF;
54
- }
55
-
56
- .button_shrink_top {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_top.png")}
57
- .button_shrink_bottom {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_bottom.png")}
58
- .button_shrink_left {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_left.png")}
59
- .button_shrink_right {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_right.png")}
60
- </style>
61
- <style>
62
- .clear-select-with .dropdown-menu{
63
- left: 0px !important;
64
- width: 200% !important;
65
- }
66
- </style>
67
- <template>
68
- <div style="height: auto;width: 100%">
69
- <criteria-paged :model="model" v-ref:paged>
70
- <criteria partial='criteria' @condition-changed='search' v-ref:cri>
71
- <div partial>
72
- <form>
73
- <div class="row app-row">
74
- <div class="col-xs-4">
75
- <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
76
- <label for="f_plan_name" class="font text-left">单元:</label>
77
- </div>
78
- <v-select :value.sync="model.f_unit"
79
- class="input-font"
80
- :options='$parent.$parent.unitOptions'
81
- placeholder='单元'
82
- :width="'60%'"
83
- :value-single = true
84
- v-model="model.f_unit"
85
- condition="ti.f_unit = '{}'"
86
- close-on-select clear-button>
87
- </v-select>
88
- </div>
89
- <div class="row app-row">
90
- <div class="col-xs-4">
91
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
92
- <label for="f_floor" class="font text-left">楼层:</label>
93
- </div>
94
- <div class="col-xs-8" >
95
- <input id="f_floor" class="search_input input-font"
96
- v-model=model.f_floor condition="ti.f_floor like '%{}%'" />
97
- </div>
98
- </div>
99
- <div class="row app-row">
100
- <div class="col-xs-4">
101
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
102
- <label for="f_userinfo_code" class="font text-left">用户编号:</label>
103
- </div>
104
- <div class="col-xs-8" >
105
- <input id="f_userinfo_code" class="search_input input-font"
106
- v-model=model.f_userinfo_code condition="f_userinfo_code like '%{}%'" />
107
- </div>
108
- </div>
109
- <div class="row app-row">
110
- <div class="col-xs-4">
111
- <img src="../../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
112
- <label class="font text-left">用户姓名:</label>
113
- </div>
114
- <div class="col-xs-8" >
115
- <input class="search_input input-font" v-model=model.f_user_name condition="f_user_name like '%{}%'" />
116
- </div>
117
- </div>
118
-
119
- <div class="row app-row">
120
- <div class="col-xs-4">
121
- <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
122
- <label class="font text-left">用户证号:</label>
123
- </div>
124
- <div class="col-xs-8" >
125
- <input class="search_input input-font" v-model=model.f_enter_number condition="f_enter_number like '%{}%'" />
126
- </div>
127
- </div>
128
-
129
- <div class="row app-row" v-if="$parent.$parent.criteriaShow && !$parent.$parent.planName">
130
- <div class="col-xs-4">
131
- <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
132
- <label for="f_plan_name" class="font text-left">计划名称:</label>
133
- </div>
134
- <v-select
135
- id="f_plan_name"
136
- :value.sync="model.f_plan_name"
137
- class="input-font"
138
- :options='$parent.$parent.planNameOptions'
139
- placeholder='计划名称'
140
- :width="'60%'"
141
- v-model="model.f_plan_name"
142
- condition="f_plan_name like '%{}%'"
143
- close-on-select clear-button>
144
- </v-select>
145
- </div>
146
-
147
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
148
- <div class="col-xs-4">
149
- <img src="../../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
150
- <label for="f_state" class="font text-left">是否已检:</label>
151
- </div>
152
- <v-select id="f_state"
153
- :value.sync="model.f_state"
154
- class="input-font"
155
- :options='$parent.$parent.check_states'
156
- placeholder='是否已检'
157
- :width="'60%'"
158
- v-model="model.f_state"
159
- condition="f_state='{}'"
160
- close-on-select clear-button>
161
- </v-select>
162
- </div>
163
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
164
- <div class="col-xs-4">
165
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
166
- <label class="font text-left">表&emsp;&emsp;号:</label>
167
- </div>
168
- <div class="col-xs-5" >
169
- <input class="search_input input-font"
170
- v-model=model.f_meter_no condition="f_meter_no like '%{}%'" />
171
- </div>
172
- <div class="col-xs-3">
173
- <button type="button" class="btn btn-lg btn-font btn-color" @click="$parent.$parent.scan()">扫码</button>
174
- </div>
175
- </div>
176
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
177
- <div class="col-xs-4">
178
- <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
179
- <label class="font text-left">客户电话:</label>
180
- </div>
181
- <div class="col-xs-8" >
182
- <input class="search_input input-font"
183
- v-model=model.f_user_phone condition="f_user_phone like '%{}%'" />
184
- </div>
185
- </div>
186
-
187
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
188
- <div class="col-xs-4">
189
- <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
190
- <label class="font text-left">用户地址:</label>
191
- </div>
192
- <div class="col-xs-8" >
193
- <input class="search_input input-font"
194
- v-model=model.f_keyword condition="f_address like '%{}%'" />
195
- </div>
196
- </div>
197
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
198
- <div class="col-xs-4">
199
- <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
200
- <label for="f_user_type" class="font text-left">用户类型:</label>
201
- </div>
202
- <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
203
- :width="'60%'"
204
- :options='$parent.$parent.user_types' placeholder='请选择用户类型'
205
- v-model="model.f_user_type" condition="f_user_type='{}'" close-on-select clear-button></v-select>
206
- </div>
207
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
208
- <div class="col-xs-4">
209
- <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
210
- <label for="f_user_type" class="font text-left">安检状态:</label>
211
- </div>
212
- <v-select id="f_user_type" :value.sync="model.f_last_state" class="input-font"
213
- :width="'60%'"
214
- :options='$parent.$parent.last_check_states' placeholder='请选择用户类型'
215
- v-model="model.f_last_state"
216
- close-on-select clear-button></v-select>
217
- </div>
218
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
219
- <div class="col-xs-6">
220
- <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
221
- <label class="font text-left">到访不遇:</label>
222
- </div>
223
- <div class="col-xs-8" >
224
- <input class="search_input input-font" type="number"
225
- v-model=model.f_check_version condition="f_check_version <= '{}'" />
226
- </div>
227
- </div>
228
- <div class="row app-row" v-if="$parent.$parent.criteriaShow">
229
- <div class="col-xs-6" style="text-align: center">
230
- <span class="font text-left">待办{{$parent.$parent.upcomingCount}}条</span>
231
- </div>
232
- <div class="col-xs-6" style="text-align: center">
233
- <span class="font text-left">已办{{$parent.$parent.doneCount}}条</span>
234
- </div>
235
- <div class="col-xs-6" style="text-align: center">
236
- <span class="font text-left">临时保存{{$parent.$parent.tempSaveCount}}条</span>
237
- </div>
238
- <div class="col-xs-6" style="text-align: center">
239
- <span class="font text-left">总共{{$parent.$parent.allPlanCount}}条</span>
240
- </div>
241
- </div>
242
-
243
- <div class="row text-center" style="margin-top: 20px;">
244
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="$parent.$parent.selfSearch">查询</button>
245
- <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%; margin-left: 10px" @click="$parent.$parent.queryplanmany">转发</button>
246
- <div style="float: right;margin-right: 3% " class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
247
- <img v-if="!$parent.$parent.planName" style="float: right;margin-right: 3% " @click="$parent.$parent.getNewOrder" src="../../../assets/shuaxindaiban1.png" style="width: 40px;padding: 5px; float:right">
248
- </div>
249
- <div class="col-sm-12">
250
-
251
- </div>
252
- <!--<div class="row app-btn">-->
253
- <!--<button class="btn btn-primary col-xs-6" type="button" @click="search"><span class="glyphicon glyphicon-search" style="margin-right: 20px;">查询</span></button>-->
254
- <!--</div>-->
255
- <div style="height:30px;"></div>
256
- </form>
257
- </div>
258
- </criteria>
259
- <list :model="model" partial='list'>
260
- <div partial>
261
- <div class="auto app-text" style="margin-top: 5px;">
262
- <div class="panel" style="padding: 10px 10px 5px 10px;">
263
- <div class="panel-body panel-self" :style="{ backgroundColor: $parent.$parent.$parent.getLastCheckStateStyle(row.f_state,row.f_last_check_state) }">
264
- <div class="col-xs-12">
265
- <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}&emsp;&emsp;&emsp;&emsp;{{ row.f_user_name }}</p>
266
- <p class="panel-title col-xs-2 text-left input-font" style="width: 5%;float:right">
267
- <input type="checkbox" @click="$parent.$parent.$parent.setPlanParam(row.id, $event)"/>
268
- </p>
269
- </div>
270
- <div class="col-xs-6">
271
- <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone }}
272
- <img src="../../../assets/phone.png" style="width: 6%"
273
- v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_user_phone)'/>
274
- </p>
275
- </div>
276
- <div class="col-xs-6">
277
- <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_unit}}单元{{ row.f_floor}}楼{{ row.f_room}}室</p>
278
- </div>
279
- <div class="col-xs-6">
280
- <p class="panel-title col-xs-7 text-left input-font">{{row.f_state==='未检'? row.f_state:row.f_last_check_state}}</p>
281
- </div>
282
- <div class="col-xs-6">
283
- <p class="panel-title col-xs-7 text-left input-font">{{ row.f_upload_state }}</p>
284
- </div>
285
- <div class="col-xs-12">
286
- <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right" @click="$parent.$parent.$parent.inspect(row)">处理</button>
287
- <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right;margin-right:10px;" @click="$parent.$parent.$parent.queryplan(row.id)">转发</button>
288
- <!--<button type="button" class="btn btn-default" @click="$parent.$parent.$parent.ceshi">确认2</button>-->
289
- </div>
290
- <!-- <div class="row text-right" v-show="row.f_upload_state != '已传'" >-->
291
- <!-- <button type="button" class="btn yybtn-color" v-on:click.stop.prevent='$parent.$parent.$parent.reserve($index)'>预约</button>&nbsp;-->
292
- <!-- <button type="button" class="btn qxbtn-color" v-if ='row.f_prearranged_date'-->
293
- <!-- v-on:click.stop.prevent='$parent.$parent.$parent.cancelReserve($index, row.id)'>取消预约</button>-->
294
- <!-- </div>-->
295
- </div>
296
- </div>
297
- </div>
298
- </div>
299
- </list>
300
- </criteria-paged>
301
- <modal :show.sync="showModal">
302
- <div slot="modal-header" class="modal-header">
303
- <h4 class="modal-title">
304
- 选择预约时间
305
- </h4>
306
- </div>
307
- <div slot="modal-body" class="modal-body">
308
- <input type="datetime-local" v-model="f_preset_dt">
309
- </div>
310
- <div slot="modal-footer" class="modal-footer">
311
- <button type="button" class="btn btn-default" @click="genuineReserve">确认</button>
312
- </div>
313
- </modal>
314
- <!--<back-page :need-back='true' @flag="$back()"></back-page>-->
315
- <modal :show.sync="showModal2" v-ref:modal>
316
- <div slot="modal-header" class="modal-header">
317
- <h4 class="modal-title">
318
- 选择计划
319
- </h4>
320
- </div>
321
- <div slot="modal-body" class="modal-body">
322
- <div class="col-xs-12">
323
-
324
- <div class="col-xs-4">
325
- <v-select :value.sync="check" v-model='check'
326
- :value-single="true"
327
- class="select_list select"
328
- :options='checkers' placeholder='安检员'
329
- close-on-select width="100%"></v-select>
330
- </div>
331
-
332
- <div class="col-xs-1">
333
- <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
334
- </div>
335
- <div class="col-xs-4" style="padding-left: 2px">
336
- <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
337
- </div>
338
- <div class="col-xs-1" >
339
- <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
340
- </div>
341
- <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
342
- <div class="col-xs-2" style="float: right">
343
- <button type="button" class="btn btn-primary" @click="plansearch" style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">查询</button>
344
- </div>
345
- </div>
346
- <table class="table table_sy">
347
- <thead>
348
- <tr>
349
- <th style="width: 30px"></th>
350
- <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
351
- </tr>
352
- </thead>
353
- <tbody>
354
- <tr v-for="row in planoption">
355
- <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
356
- <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
357
-
358
-
359
- </tr>
360
- </tbody>
361
- </table>
362
- </div>
363
- <div slot="modal-footer" class="modal-footer">
364
- <button class="btn btn-default" @click="isok()">确认</button>
365
- <button class="btn btn-default" @click="iscancel()">取消</button>
366
- </div>
367
- </modal>
368
- <modal :show.sync="showModal3" v-ref:modal>
369
- <div slot="modal-header" class="modal-header">
370
- <h4 class="modal-title">
371
- 选择计划
372
- </h4>
373
- </div>
374
- <div slot="modal-body" class="modal-body">
375
- <div class="col-xs-12">
376
-
377
- <div class="col-xs-4">
378
- <v-select :value.sync="check" v-model='check'
379
- :value-single="true"
380
- class="select_list select"
381
- :options='checkers' placeholder='安检员'
382
- close-on-select width="100%"></v-select>
383
- </div>
384
-
385
- <div class="col-xs-1">
386
- <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
387
- </div>
388
- <div class="col-xs-4" style="padding-left: 2px">
389
- <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
390
- </div>
391
- <div class="col-xs-1" >
392
- <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
393
- </div>
394
- <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
395
- <div class="col-xs-2" style="float: right">
396
- <button type="button" class="btn btn-primary" @click="plansearch" style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">查询</button>
397
- </div>
398
- </div>
399
- <table class="table table_sy">
400
- <thead>
401
- <tr>
402
- <th style="width: 30px"></th>
403
- <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
404
- </tr>
405
- </thead>
406
- <tbody>
407
- <tr v-for="row in planoption">
408
- <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
409
- <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
410
-
411
-
412
- </tr>
413
- </tbody>
414
- </table>
415
- </div>
416
- <div slot="modal-footer" class="modal-footer">
417
- <button class="btn btn-default" @click="manyisok()">确认</button>
418
- <button class="btn btn-default" @click="iscancel()">取消</button>
419
- </div>
420
- </modal>
421
- </div>
422
-
423
- </template>
424
-
425
- <script>
426
- import LocalPagedList from '../../../plugins/LocalPagedList'
427
- import Vue from 'vue'
428
- import { PagedList,HttpResetClass } from 'vue-client'
429
- import * as Util from '../../Util'
430
- import co from 'co'
431
- import {isEmpty} from '../../Util'
432
- let select = function * (self) {
433
- let http = new HttpResetClass()
434
- http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
435
- source: 'this.getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1)',
436
- userid: Vue.user.orgid
437
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
438
- //tag
439
- self.checkers.push({label:'全部',value:''})
440
- res.data.forEach((checker)=>{
441
- self.checkers.push({label:checker.name,value:checker.id})
442
- })
443
- })
444
- }
445
- export default {
446
- title: '无计划安检查询',
447
- props: ['planName','f_residential_area','f_building'],
448
- data() {
449
- return {
450
- f_filialeids:'('+Vue.user.orgid+')',
451
- //f_filialeids:'(305)',
452
- planparam:[],
453
- check:'',
454
- plan:'',
455
- planid:'',
456
- model:Vue.android? new LocalPagedList('androidGetuserinfo',50,{condition:'this.condition'}): new PagedList( 'AndroidRest/api/af-safecheck/sql/androidGetuserinfo',20,{condition:'this.condition'}),
457
- showModal: false,
458
- showModal2:false,
459
- showModal3:false,
460
- needid:'',
461
- criteriaShow: false,
462
- planoption:[],
463
- condition:'',
464
- checkers:[],
465
- param: null,
466
- f_preset_dt : Util.to3339TimeString(),
467
- flow_direction:[
468
- {label: '请选择挂表方式', value: ''},
469
- {label: '左表', value: '左表'},
470
- {label: '右表', value: '右表'}
471
- ],
472
- check_states: [
473
- {label: '请选择安检状态', value: ''},
474
- {label: '未检', value: '未检'},
475
- {label: '已检', value: '已检'},
476
- ],
477
- last_check_states: [
478
- {label: '请选择上次安检状态', value: ''},
479
- {label: '入户', value: '入户'},
480
- {label: '拒检', value: '拒检'},
481
- {label: '到访不遇', value: '到访不遇'},
482
- {label: '未使用天然气', value: '未使用天然气'}
483
- ],
484
- upload_states: [
485
- {label: '请选择上传状态', value: ''},
486
- {label: '未传', value: '未传'},
487
- {label: '已传', value: '已传'}
488
- ],
489
- user_types: [
490
- {label: '请选择用户类型', value: ''},
491
- {label: '民用', value: '民用'},
492
- {label: '非民用', value: '非民用'},
493
- ],
494
- verify_state: [
495
- {label: '请选择审核状态', value: ''},
496
- {label: '未审核', value: '未审核'},
497
- {label: '打回', value: '打回'}
498
- ],
499
- residentialAreaOptions: [],
500
- buildOptions: [],
501
- unitOptions: [],
502
- planNameOptions: [],
503
- upcomingCount: 0,
504
- doneCount: 0,
505
- tempSaveCount: 0,
506
- allPlanCount: 0
507
- }
508
- },
509
- ready(){
510
- // this.getAllArea()
511
- this.getAllPlanName()
512
- if (!isEmpty(this.f_residential_area)){
513
- this.$refs.paged.$refs.cri.model.f_residential_area = this.f_residential_area
514
- }
515
- if (!isEmpty(this.f_building)){
516
- this.$refs.paged.$refs.cri.model.f_building = this.f_building
517
- }
518
- this.getUnits(this.f_building)
519
- this.selfSearch()
520
- let gen = select(this)
521
- co(gen)
522
- },
523
- mounted(){
524
- //tag
525
- if (window.history && window.history.pushState) {
526
- history.pushState(null, null, document.URL);
527
- window.addEventListener('popstate', this.fun, false);//false阻止默认事件
528
- }
529
- },
530
- destroyed(){
531
- //tag
532
- window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
533
- },
534
- methods: {
535
- getLastCheckStateStyle(state, f_last_check_state) {
536
- if (state === '未检') {
537
- return 'transparent';
538
- }
539
- switch(f_last_check_state) {
540
- case '入户':
541
- return '#00ff71';
542
- case '拒检':
543
- return '#00f3ff';
544
- case '到访不遇':
545
- return '#fff600';
546
- default:
547
- return 'transparent';
548
- }
549
- },
550
- scan(){
551
- HostApp.__this__=this,
552
- HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
553
- },
554
- getCode(){
555
- const datapa = HostApp.getCode().data;
556
- //tag
557
- this.$refs.paged.$refs.cri.model.f_meter_no = datapa
558
-
559
- },
560
- fun () {
561
- //tag
562
- //tag
563
- },
564
- iscancel(){
565
- this.showModal2=false
566
- this.showModal3=false
567
- this.planoption=[]
568
- },
569
- timeSet(val){
570
- return val
571
- },
572
- async isok(){
573
- if(this.planoption.length==0){
574
- this.$showMessage("请选择计划")
575
- return false
576
- }
577
- for (let i = 0; i <this.planoption.length ; i++) {
578
- if (this.planoption[i]["selected"]==true){
579
- this.planid=this.planoption[i].value
580
- break
581
- }
582
- }
583
- if(this.planid==''){
584
- this.$showMessage("请选择计划")
585
- return false
586
- }
587
- await this.okput()
588
- },
589
- async manyisok(){
590
- if(this.planoption.length==0){
591
- this.$showMessage("请选择计划")
592
- return false
593
- }
594
- for (let i = 0; i <this.planoption.length ; i++) {
595
- if (this.planoption[i]["selected"]==true){
596
- this.planid=this.planoption[i].value
597
- break
598
- }
599
- }
600
- if(this.planid==''){
601
- this.$showMessage("请选择计划")
602
- return false
603
- }
604
- await this.manyokput()
605
- },
606
- changenull(){
607
- this.showModal2=false
608
- this.showModal3=false
609
- this.planoption=[]
610
- this.plan=''
611
- this.check=''
612
- },
613
- async okput(){
614
- let result = this.$androidUtil.bzLogic('UpCheckPlanItemAndroid', {condition:`id='`+this.needid+`'`,f_plan_id:this.planid})
615
- if (result.code == 200) {
616
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/UpCheckPlanItem`, {data:{
617
- condition:`i.id='`+this.needid+`'`,
618
- f_plan_id:this.planid,
619
- switchCheckAll:false,
620
- checkAll:false,
621
- f_operator:Vue.user.name
622
- }
623
- })
624
- await this.changenull()
625
- }
626
- },
627
- async manyokput(){
628
- let condition = `1=1`
629
- let criteria = {
630
- items: 'id',
631
- tablename: 't_check_plan',
632
- condition: `f_checker_id = '${Vue.user.id}'`,
633
- groupitem: 'id'
634
- }
635
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
636
- if (result.code==200){
637
- condition = `1=1 and i.f_plan_id in (${result.data.rows.map(row => { return `'${row.id}'` }).join()})`
638
- }
639
- let result2 = this.$androidUtil.bzLogic('UpCheckPlanItemAndroid', {condition:`f_plan_id in (${result.data.rows.map(row => { return `'${row.id}'` }).join()})`,f_plan_id:this.planid})
640
- if (result2.code == 200) {
641
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/UpCheckPlanItem`, {data:{
642
- columnName:"i.id",
643
- condition:condition,
644
- f_plan_id:this.planid,
645
- switchCheckAll:true,
646
- param:this.planparam,
647
- checkAll:true,
648
- f_operator:Vue.user.name
649
- }
650
- })
651
- await this.changenull()
652
- }
653
- },
654
- async plansearch(){
655
- this.planoption=[]
656
- let condition= ` f_plan_year=${new Date().getFullYear()}`
657
- if(this.check){
658
- condition += ` and f_checker_id= '${this.check}'`
659
- }
660
- if(this.plan){
661
- condition += ` and f_plan_name like '%${this.plan}%'`
662
- }
663
- let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/预约计划下发`, {data:{
664
- condition:condition,
665
- f_filialeids:this.f_filialeids,
666
- groupitem:'',
667
- orderitem:'id'
668
- }})
669
- let resoult=res.data
670
- for (let i = 0; i < resoult.length; i++) {
671
- this.planoption.push({label: resoult[i].f_plan_name,selected:false, value: resoult[i].id})
672
- }
673
- },
674
-
675
- select(row, idx) {
676
- this.$set('planoption[' + idx + '].selected', true)
677
- for (let i = 0; i <this.planoption.length ; i++) {
678
- if (i!=idx){
679
- this.planoption[i]["selected"]=false
680
- }
681
- }
682
- },
683
- planclose(){
684
- this.showModal2=false
685
- this.showModal3=false
686
- },
687
- queryplan(val){
688
- this.needid=val
689
- this.showModal2 = true
690
- },
691
- queryplanmany(){
692
-
693
- this.showModal3 = true
694
- },
695
- reload(){
696
- // this.getAllArea()
697
- // this.getAllPlanName()
698
- this.selfSearch()
699
- },
700
- cancelReserve (idx, id) {
701
- if(Vue.android){
702
- let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
703
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
704
- if (res.code == 200) {
705
- this.$showMessage("取消预约成功")
706
- }
707
- }else {
708
- this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
709
- this.$set('model.rows[' + idx + '].f_prearranged_date', null)
710
- if (repanse.data.code == 200) {
711
- alert("取消预约成功!")
712
- }
713
- })
714
- }},
715
- genuineReserve () {
716
- if(Vue.android){
717
- if (!this.f_preset_dt) {
718
- this.$showMessage('请选择一个日期')
719
- return
720
- }
721
- let pdt = this.f_preset_dt.replace('T', ' ')
722
- let respanse = this.$androidUtil.bzLogic('BookingCheck', {id: this.model.rows[this.param].id, dt: pdt})
723
- this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
724
- if(respanse.code == 200) {
725
- this.$showMessage("预约成功!")
726
- }
727
- this.showModal = false
728
- }else {
729
- if (!this.f_preset_dt) {
730
- alert('请选择一个日期')
731
- return
732
- }
733
- let pdt = this.f_preset_dt.replace('T', ' ')
734
- this.$androidUtil.bzLogic('PCbookingCheck', {id: this.model.rows[this.param].id, dt: pdt}).then((res) => {
735
- this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
736
- if(res.data.code == 200) {
737
- alert("预约成功!")
738
- }
739
- this.showModal = false
740
- })
741
- }
742
- },
743
- inspect(row) {
744
- var _this = this
745
- try {
746
- let http = new HttpResetClass()
747
- http.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
748
- items: 'id',
749
- tablename: 't_check_plan_item',
750
- condition: `id = '${row.id}'`,
751
- orderitem: ' id '
752
- }}, {resolveMsg: null, rejectMsg: null}).then((getcheckplan) => {
753
- this.getcheckplandata = getcheckplan.data[0]
754
- if(this.getcheckplandata){
755
- if (row.f_no_checkplan != '无计划安检') {
756
- _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/查询计划项表信息`, {data: {f_userid: row.f_userinfoid}},{resolveMsg: null,rejectMsg: null}).then((response) => {
757
- row['f_plan_meters'] = response.data
758
- var pardate = {
759
- _this:_this,
760
- title:'安全检查',
761
- safe:true
762
- }
763
- _this.$dispatch('gotoson',pardate)
764
- //tag
765
- _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self')
766
- }).catch ((msg)=>{
767
- this.noLineInspect(row)
768
- this.$showMessage("网络异常,请检查网络后再试!")
769
- })
770
- }
771
- }else {
772
- this.$showMessage("该用户安检单已被移除,请联系管理员确认!")
773
- }
774
- }).catch((e)=>{
775
- this.noLineInspect(row)
776
- })
777
- }catch (e){
778
- this.noLineInspect(row)
779
- }
780
- },
781
- noLineInspect(row){
782
- let _this = this
783
- let criteria = {
784
- items: ' * ',
785
- tablename: ' t_plan_item_meter ',
786
- condition: ` f_plan_item_id = '${row.id}' `,
787
- orderitem: ' 1 '
788
- }
789
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_OrderBy', 'criteria': criteria}})
790
- if(result.code == 200){
791
- row.f_plan_meters = [result.data.rows[0]]
792
- var pardate = {
793
- _this:_this,
794
- title:'安全检查',
795
- safe:true
796
- }
797
- _this.$dispatch('gotoson',pardate)
798
- _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self', _this.reload)
799
- }
800
- },
801
- makeAPhoneCall(phoneNumber) {
802
- this.$androidUtil.makeAPhoneCall(phoneNumber)
803
- },
804
- reserve (idx) {
805
- this.param = idx
806
- this.showModal = true
807
- },
808
- search(args) {
809
- this.model.rows = []
810
- this.model.search(args.condition, args.model)
811
- },
812
- selfSearch () {
813
- this.getPlanCount()
814
- let condition = ""
815
- if (Array.isArray(this.$refs.paged.$refs.cri.model.f_residential_area) && this.$refs.paged.$refs.cri.model.f_residential_area.length >0){
816
- condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area[0]+"'"
817
- }else if(typeof this.$refs.paged.$refs.cri.model.f_residential_area == 'string' && this.$refs.paged.$refs.cri.model.f_residential_area){
818
- condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area+"'"
819
- }
820
- if(this.$refs.paged.$refs.cri.model.f_building)
821
- condition += ` and ti.f_building = '${this.$refs.paged.$refs.cri.model.f_building}'`
822
- if(this.$refs.paged.$refs.cri.model.f_unit)
823
- condition += ` and ti.f_unit = '${this.$refs.paged.$refs.cri.model.f_unit}'`
824
- if (this.planName){
825
- condition += " and f_plan_name like '%"+this.planName +"%'"
826
- }else {
827
- if(this.$refs.paged.$refs.cri.model.f_plan_name)
828
- condition += " and f_plan_name like '%"+this.$refs.paged.$refs.cri.model.f_plan_name +"%'"
829
- }
830
- // if(this.$refs.paged.$refs.cri.model.f_plan_year)
831
- // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
832
- // if(this.$refs.paged.$refs.cri.model.f_plan_month)
833
- // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
834
- if(this.$refs.paged.$refs.cri.model.f_userinfo_code)
835
- condition += " and ti.f_userinfo_code like '%"+this.$refs.paged.$refs.cri.model.f_userinfo_code+"%'"
836
- if(this.$refs.paged.$refs.cri.model.f_floor)
837
- condition += " and ti.f_floor like '%"+this.$refs.paged.$refs.cri.model.f_floor+"%'"
838
- if(this.$refs.paged.$refs.cri.model.f_keyword)
839
- condition += " and ti.f_address like '%"+this.$refs.paged.$refs.cri.model.f_keyword+"%'"
840
- if(this.$refs.paged.$refs.cri.model.f_user_name)
841
- condition += " and ti.f_user_name like '%"+this.$refs.paged.$refs.cri.model.f_user_name+"%'"
842
- if(this.$refs.paged.$refs.cri.model.f_state[0])
843
- condition += " and ti.f_state='"+this.$refs.paged.$refs.cri.model.f_state[0]+"'"
844
- if(this.$refs.paged.$refs.cri.model.f_last_state[0])
845
- condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
846
- if(this.$refs.paged.$refs.cri.model.f_user_type[0])
847
- condition += " and ti.f_user_type='"+this.$refs.paged.$refs.cri.model.f_user_type[0]+"'"
848
- if(this.$refs.paged.$refs.cri.model.f_meter_no)
849
- condition += " and tm.f_meter_no like '%"+this.$refs.paged.$refs.cri.model.f_meter_no+"%'"
850
- // if(this.$refs.paged.$refs.cri.model.f_flow_direction[0])
851
- // condition += " and tm.f_flow_direction = '"+this.$refs.paged.$refs.cri.model.f_flow_direction[0]+"'"
852
- if(this.$refs.paged.$refs.cri.model.f_user_phone){
853
- condition += `and ti.f_user_phone like '%${this.$refs.paged.$refs.cri.model.f_user_phone}%'`
854
- }
855
- if(this.$refs.paged.$refs.cri.model.f_enter_number)
856
- condition += " and ti.f_enter_number like '%"+this.$refs.paged.$refs.cri.model.f_enter_number+"%'"
857
- if(this.$refs.paged.$refs.cri.model.f_check_version)
858
- condition += " and ti.f_check_version <= "+this.$refs.paged.$refs.cri.model.f_check_version
859
- //tag
860
- this.model.search("ti.f_no_checkplan = '有计划安检'" + condition)
861
- },
862
- getNewOrder(){
863
- HostApp.__this__ = this
864
- HostApp.logicWithHint({
865
- // logic别名,key必须为logic
866
- 'logic': 'SafeCheckServiceTimeOut',
867
- // 回调执行方法名,key必须为callback
868
- 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
869
- // logic执行需要的业务参数
870
- 'data': {params: ''},
871
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
872
- // 执行回调方法传入key为backresult
873
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
874
- 'backresult': 1
875
- })
876
- HostApp.logicWithHint({
877
- // logic别名,key必须为logic
878
- 'logic': 'FreshPlanItem',
879
- // 回调执行方法名,key必须为callback
880
- 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
881
- // logic执行需要的业务参数
882
- 'data': {params: ''},
883
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
884
- // 执行回调方法传入key为backresult
885
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
886
- 'backresult': 1
887
- })
888
- },
889
- getNewOrderCallBack() {
890
- this.selfSearch()
891
- this.getAllArea()
892
- this.getAllPlanName()
893
- },
894
- hidden() {
895
- this.criteriaShow = !this.criteriaShow
896
- },
897
- getAllArea(){
898
- this.residentialAreaOptions = []
899
- this.buildOptions = []
900
- this.unitOptions = []
901
- this.$refs.paged.$refs.cri.model.f_unit = ''
902
- let criteria = {
903
- items: 'f_residential_area',
904
- tablename: 't_check_plan_item',
905
- condition: `f_residential_area IS NOT NULL AND f_residential_area != ''`,
906
- groupitem: 'f_residential_area'
907
- }
908
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
909
- //tag)
910
- if(result.code == 200){
911
- result.data.rows.forEach(item => this.residentialAreaOptions.push({label:item.f_residential_area,value:item.f_residential_area}))
912
- }
913
- //tag)
914
- },
915
- getbuilds(f_residential_area){
916
- //tag)
917
- this.buildOptions = []
918
- this.unitOptions = []
919
- this.$refs.paged.$refs.cri.model.f_unit = ''
920
- if(!f_residential_area){
921
- return
922
- }
923
- let criteria = {
924
- items: 'f_building',
925
- tablename: 't_check_plan_item',
926
- condition: `f_building IS NOT NULL AND f_building != '' AND f_residential_area = '${f_residential_area}'`,
927
- groupitem: 'f_building order by f_building+0'
928
- }
929
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
930
- if(result.code == 200){
931
- result.data.rows.forEach(item => this.buildOptions.push({label:item.f_building,value:item.f_building}))
932
- }
933
- this.buildOptions.sort((a,b)=>{
934
- return Number(a.label)- Number(b.label)
935
- })
936
- //tag)
937
- },
938
- getUnits(f_building){
939
- //tag)
940
- this.unitOptions = []
941
- this.$refs.paged.$refs.cri.model.f_unit = ''
942
- if(!f_building){
943
- return
944
- }
945
- let criteria = {
946
- items: 'f_unit',
947
- tablename: 't_check_plan_item',
948
- condition: `f_unit IS NOT NULL AND f_unit != '' AND f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' AND f_building = '${f_building}'`,
949
- groupitem: 'f_unit'
950
- }
951
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
952
- if(result.code == 200){
953
- result.data.rows.forEach(item => this.unitOptions.push({label:item.f_unit,value:item.f_unit}))
954
- }
955
- },
956
- getPlanCount(){
957
- this.upcomingCount = 0
958
- this.tempSaveCount = 0
959
- this.doneCount = 0
960
- this.allPlanCount = 0
961
- let criteria = {
962
- items: 'count(id) count',
963
- tablename: 't_check_plan_item',
964
- condition: `f_state = '未检'`,
965
- groupitem: 'f_state'
966
- }
967
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
968
- if(result.code && result.code == 200){
969
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
970
- this.upcomingCount = result.data.rows[0].count
971
- }
972
- }
973
- criteria = {
974
- items: 'count(id) count',
975
- tablename: 't_check_plan_item',
976
- condition: `(f_complete = '' or f_complete is null or f_complete = '未完成') AND f_state = '已检'`,
977
- groupitem: 'f_state'
978
- }
979
- result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
980
- if(result.code && result.code == 200){
981
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
982
- this.tempSaveCount = result.data.rows[0].count
983
- }
984
- }
985
- criteria = {
986
- items: 'count(id) count',
987
- tablename: 't_check_plan_item',
988
- condition: `f_complete = '已完成' AND f_state = '已检'`,
989
- groupitem: 'f_state'
990
- }
991
- result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
992
- if(result.code && result.code == 200){
993
- if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
994
- this.doneCount = result.data.rows[0].count
995
- }
996
- }
997
- this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
998
-
999
- //tag
1000
- //tag
1001
- //tag
1002
- //tag
1003
- },
1004
- getAllPlanName(){
1005
- this.planNameOptions = []
1006
- this.$refs.paged.$refs.cri.model.f_plan_name = ''
1007
- let criteria = {
1008
- items: 'f_plan_name',
1009
- tablename: 't_check_plan',
1010
- condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
1011
- groupitem: 'f_plan_name'
1012
- }
1013
- let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1014
- //tag)
1015
- if(result.code == 200){
1016
- result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
1017
- }
1018
- //tag)
1019
- },
1020
- setPlanParam(detailsType, event) {
1021
- if (event.srcElement.checked) {
1022
- this.planparam.push(detailsType)
1023
- //tag
1024
- } else {
1025
- if(this.planparam.length>0){
1026
- let planid= this.planparam.findIndex((value) => {
1027
- return value === detailsType
1028
- })
1029
- this.planparam.splice(planid, 1)
1030
- //tag
1031
-
1032
- }
1033
-
1034
- }
1035
- }
1036
- }
1037
- }
1038
- </script>
1
+ <style scoped>
2
+ .bg {
3
+ background-color: blue;
4
+ height: 1px;
5
+ border: 0;
6
+ }
7
+ .app-row {
8
+ background-color: white;
9
+ padding: 10px 10px 0 10px;
10
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
11
+ }
12
+ .search_input {
13
+ border: 0;
14
+ outline: none;
15
+ }
16
+ .font{
17
+ font: 15px PingFang-SC-Medium;
18
+ color: #666666;
19
+ }
20
+ .input-font{
21
+ font: 15px PingFang-SC-Medium;
22
+ color: #333333;
23
+ }
24
+ .btn-font{
25
+ font:600 16px PingFang-SC-Bold;
26
+ color: #499EDF;
27
+ }
28
+ .btn-color{
29
+ background-color: #FFFFFF;
30
+ border-radius: 10px ;
31
+ border: 1px solid #499EDF;
32
+ }
33
+ .app-text {
34
+ font-size: 12px;
35
+ }
36
+ .panel-self{
37
+ border-radius: 10px;
38
+ border:1px solid #499EDF;
39
+ background-color: #F8F8F8;
40
+ }
41
+ .yybtn-color{
42
+ background-color:#499edf;
43
+ border-radius: 4px ;
44
+ border: 1px solid #499EDF;
45
+ color: #FFFFFF;
46
+ font: 14px PingFang-SC-Bold;
47
+ }
48
+ .qxbtn-color{
49
+ background-color: #FFFFFF;
50
+ border-radius: 4px ;
51
+ color: #499edf;
52
+ font: 14px PingFang-SC-Bold;
53
+ border: 1px solid #499EDF;
54
+ }
55
+
56
+ .button_shrink_top {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_top.png")}
57
+ .button_shrink_bottom {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_bottom.png")}
58
+ .button_shrink_left {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_left.png")}
59
+ .button_shrink_right {width: 35px; height: 35px; background-size:100%;background-image: url("../../../../static/newStyle/stretch_right.png")}
60
+ </style>
61
+ <style>
62
+ .clear-select-with .dropdown-menu{
63
+ left: 0px !important;
64
+ width: 200% !important;
65
+ }
66
+ </style>
67
+ <template>
68
+ <div style="height: auto;width: 100%">
69
+ <criteria-paged :model="model" v-ref:paged>
70
+ <criteria partial='criteria' @condition-changed='search' v-ref:cri>
71
+ <div partial>
72
+ <form>
73
+ <div class="row app-row">
74
+ <div class="col-xs-4">
75
+ <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
76
+ <label for="f_plan_name" class="font text-left">单元:</label>
77
+ </div>
78
+ <v-select :value.sync="model.f_unit"
79
+ class="input-font"
80
+ :options='$parent.$parent.unitOptions'
81
+ placeholder='单元'
82
+ :width="'60%'"
83
+ :value-single = true
84
+ v-model="model.f_unit"
85
+ condition="ti.f_unit = '{}'"
86
+ close-on-select clear-button>
87
+ </v-select>
88
+ </div>
89
+ <div class="row app-row">
90
+ <div class="col-xs-4">
91
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
92
+ <label for="f_floor" class="font text-left">楼层:</label>
93
+ </div>
94
+ <div class="col-xs-8" >
95
+ <input id="f_floor" class="search_input input-font"
96
+ v-model=model.f_floor condition="ti.f_floor like '%{}%'" />
97
+ </div>
98
+ </div>
99
+ <div class="row app-row">
100
+ <div class="col-xs-4">
101
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
102
+ <label for="f_userinfo_code" class="font text-left">用户编号:</label>
103
+ </div>
104
+ <div class="col-xs-8" >
105
+ <input id="f_userinfo_code" class="search_input input-font"
106
+ v-model=model.f_userinfo_code condition="f_userinfo_code like '%{}%'" />
107
+ </div>
108
+ </div>
109
+ <div class="row app-row">
110
+ <div class="col-xs-4">
111
+ <img src="../../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
112
+ <label class="font text-left">用户姓名:</label>
113
+ </div>
114
+ <div class="col-xs-8" >
115
+ <input class="search_input input-font" v-model=model.f_user_name condition="f_user_name like '%{}%'" />
116
+ </div>
117
+ </div>
118
+
119
+ <div class="row app-row">
120
+ <div class="col-xs-4">
121
+ <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
122
+ <label class="font text-left">用户证号:</label>
123
+ </div>
124
+ <div class="col-xs-8" >
125
+ <input class="search_input input-font" v-model=model.f_enter_number condition="f_enter_number like '%{}%'" />
126
+ </div>
127
+ </div>
128
+
129
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow && !$parent.$parent.planName">
130
+ <div class="col-xs-4">
131
+ <img src="../../../assets/安检状态.png" style="width: 20px;margin-bottom: 5px" alt="">
132
+ <label for="f_plan_name" class="font text-left">计划名称:</label>
133
+ </div>
134
+ <v-select
135
+ id="f_plan_name"
136
+ :value.sync="model.f_plan_name"
137
+ class="input-font"
138
+ :options='$parent.$parent.planNameOptions'
139
+ placeholder='计划名称'
140
+ :width="'60%'"
141
+ v-model="model.f_plan_name"
142
+ condition="f_plan_name like '%{}%'"
143
+ close-on-select clear-button>
144
+ </v-select>
145
+ </div>
146
+
147
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
148
+ <div class="col-xs-4">
149
+ <img src="../../../assets/是否已检.png" style="width: 20px;margin-bottom: 5px" alt="">
150
+ <label for="f_state" class="font text-left">是否已检:</label>
151
+ </div>
152
+ <v-select id="f_state"
153
+ :value.sync="model.f_state"
154
+ class="input-font"
155
+ :options='$parent.$parent.check_states'
156
+ placeholder='是否已检'
157
+ :width="'60%'"
158
+ v-model="model.f_state"
159
+ condition="f_state='{}'"
160
+ close-on-select clear-button>
161
+ </v-select>
162
+ </div>
163
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
164
+ <div class="col-xs-4">
165
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
166
+ <label class="font text-left">表&emsp;&emsp;号:</label>
167
+ </div>
168
+ <div class="col-xs-5" >
169
+ <input class="search_input input-font"
170
+ v-model=model.f_meter_no condition="f_meter_no like '%{}%'" />
171
+ </div>
172
+ <div class="col-xs-3">
173
+ <button type="button" class="btn btn-lg btn-font btn-color" @click="$parent.$parent.scan()">扫码</button>
174
+ </div>
175
+ </div>
176
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
177
+ <div class="col-xs-4">
178
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
179
+ <label class="font text-left">客户电话:</label>
180
+ </div>
181
+ <div class="col-xs-8" >
182
+ <input class="search_input input-font"
183
+ v-model=model.f_user_phone condition="f_user_phone like '%{}%'" />
184
+ </div>
185
+ </div>
186
+
187
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
188
+ <div class="col-xs-4">
189
+ <img src="../../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
190
+ <label class="font text-left">用户地址:</label>
191
+ </div>
192
+ <div class="col-xs-8" >
193
+ <input class="search_input input-font"
194
+ v-model=model.f_keyword condition="f_address like '%{}%'" />
195
+ </div>
196
+ </div>
197
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
198
+ <div class="col-xs-4">
199
+ <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
200
+ <label for="f_user_type" class="font text-left">用户类型:</label>
201
+ </div>
202
+ <v-select id="f_user_type" :value.sync="model.f_user_type" class="input-font"
203
+ :width="'60%'"
204
+ :options='$parent.$parent.user_types' placeholder='请选择用户类型'
205
+ v-model="model.f_user_type" condition="f_user_type='{}'" close-on-select clear-button></v-select>
206
+ </div>
207
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
208
+ <div class="col-xs-4">
209
+ <img src="../../../assets/用户类型.png" style="width: 20px;margin-bottom: 5px" alt="">
210
+ <label for="f_user_type" class="font text-left">安检状态:</label>
211
+ </div>
212
+ <v-select id="f_user_type" :value.sync="model.f_last_state" class="input-font"
213
+ :width="'60%'"
214
+ :options='$parent.$parent.last_check_states' placeholder='请选择用户类型'
215
+ v-model="model.f_last_state"
216
+ close-on-select clear-button></v-select>
217
+ </div>
218
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
219
+ <div class="col-xs-6">
220
+ <img src="../../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
221
+ <label class="font text-left">到访不遇:</label>
222
+ </div>
223
+ <div class="col-xs-8" >
224
+ <input class="search_input input-font" type="number"
225
+ v-model=model.f_check_version condition="f_check_version <= '{}'" />
226
+ </div>
227
+ </div>
228
+ <div class="row app-row" v-if="$parent.$parent.criteriaShow">
229
+ <div class="col-xs-6" style="text-align: center">
230
+ <span class="font text-left">待办{{$parent.$parent.upcomingCount}}条</span>
231
+ </div>
232
+ <div class="col-xs-6" style="text-align: center">
233
+ <span class="font text-left">已办{{$parent.$parent.doneCount}}条</span>
234
+ </div>
235
+ <div class="col-xs-6" style="text-align: center">
236
+ <span class="font text-left">临时保存{{$parent.$parent.tempSaveCount}}条</span>
237
+ </div>
238
+ <div class="col-xs-6" style="text-align: center">
239
+ <span class="font text-left">总共{{$parent.$parent.allPlanCount}}条</span>
240
+ </div>
241
+ </div>
242
+
243
+ <div class="row text-center" style="margin-top: 20px;">
244
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%;" @click="$parent.$parent.selfSearch">查询</button>
245
+ <button type="button" class="btn btn-lg btn-font btn-color" style="width: 25%; margin-left: 10px" @click="$parent.$parent.queryplanmany">转发</button>
246
+ <div style="float: right;margin-right: 3% " class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
247
+ <img v-if="!$parent.$parent.planName" style="float: right;margin-right: 3% " @click="$parent.$parent.getNewOrder" src="../../../assets/shuaxindaiban1.png" style="width: 40px;padding: 5px; float:right">
248
+ </div>
249
+ <div class="col-sm-12">
250
+
251
+ </div>
252
+ <!--<div class="row app-btn">-->
253
+ <!--<button class="btn btn-primary col-xs-6" type="button" @click="search"><span class="glyphicon glyphicon-search" style="margin-right: 20px;">查询</span></button>-->
254
+ <!--</div>-->
255
+ <div style="height:30px;"></div>
256
+ </form>
257
+ </div>
258
+ </criteria>
259
+ <list :model="model" partial='list'>
260
+ <div partial>
261
+ <div class="auto app-text" style="margin-top: 5px;">
262
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
263
+ <div class="panel-body panel-self" :style="{ backgroundColor: $parent.$parent.$parent.getLastCheckStateStyle(row.f_state,row.f_last_check_state) }">
264
+ <div class="col-xs-12">
265
+ <p class="panel-title col-xs-5 text-left input-font" style="width: 74%">{{ row.f_userinfo_code }}&emsp;&emsp;&emsp;&emsp;{{ row.f_user_name }}</p>
266
+ <p class="panel-title col-xs-2 text-left input-font" style="width: 5%;float:right">
267
+ <input type="checkbox" @click="$parent.$parent.$parent.setPlanParam(row.id, $event)"/>
268
+ </p>
269
+ </div>
270
+ <div class="col-xs-6">
271
+ <p class="panel-title text-left input-font" style="width: 77%">{{ row.f_user_phone }}
272
+ <img src="../../../assets/phone.png" style="width: 6%"
273
+ v-on:click.stop.prevent='$parent.$parent.$parent.makeAPhoneCall(row.f_user_phone)'/>
274
+ </p>
275
+ </div>
276
+ <div class="col-xs-6">
277
+ <p class="panel-title text-left input-font" style="width: 79%">{{ row.f_unit}}单元{{ row.f_floor}}楼{{ row.f_room}}室</p>
278
+ </div>
279
+ <div class="col-xs-6">
280
+ <p class="panel-title col-xs-7 text-left input-font">{{row.f_state==='未检'? row.f_state:row.f_last_check_state}}</p>
281
+ </div>
282
+ <div class="col-xs-6">
283
+ <p class="panel-title col-xs-7 text-left input-font">{{ row.f_upload_state }}</p>
284
+ </div>
285
+ <div class="col-xs-12">
286
+ <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right" @click="$parent.$parent.$parent.inspect(row)">处理</button>
287
+ <button type="button" name="button" class="btn btn-primary" style="background-color:#499edf;float: right;margin-right:10px;" @click="$parent.$parent.$parent.queryplan(row.id)">转发</button>
288
+ <!--<button type="button" class="btn btn-default" @click="$parent.$parent.$parent.ceshi">确认2</button>-->
289
+ </div>
290
+ <!-- <div class="row text-right" v-show="row.f_upload_state != '已传'" >-->
291
+ <!-- <button type="button" class="btn yybtn-color" v-on:click.stop.prevent='$parent.$parent.$parent.reserve($index)'>预约</button>&nbsp;-->
292
+ <!-- <button type="button" class="btn qxbtn-color" v-if ='row.f_prearranged_date'-->
293
+ <!-- v-on:click.stop.prevent='$parent.$parent.$parent.cancelReserve($index, row.id)'>取消预约</button>-->
294
+ <!-- </div>-->
295
+ </div>
296
+ </div>
297
+ </div>
298
+ </div>
299
+ </list>
300
+ </criteria-paged>
301
+ <modal :show.sync="showModal">
302
+ <div slot="modal-header" class="modal-header">
303
+ <h4 class="modal-title">
304
+ 选择预约时间
305
+ </h4>
306
+ </div>
307
+ <div slot="modal-body" class="modal-body">
308
+ <input type="datetime-local" v-model="f_preset_dt">
309
+ </div>
310
+ <div slot="modal-footer" class="modal-footer">
311
+ <button type="button" class="btn btn-default" @click="genuineReserve">确认</button>
312
+ </div>
313
+ </modal>
314
+ <!--<back-page :need-back='true' @flag="$back()"></back-page>-->
315
+ <modal :show.sync="showModal2" v-ref:modal>
316
+ <div slot="modal-header" class="modal-header">
317
+ <h4 class="modal-title">
318
+ 选择计划
319
+ </h4>
320
+ </div>
321
+ <div slot="modal-body" class="modal-body">
322
+ <div class="col-xs-12">
323
+
324
+ <div class="col-xs-4">
325
+ <v-select :value.sync="check" v-model='check'
326
+ :value-single="true"
327
+ class="select_list select"
328
+ :options='checkers' placeholder='安检员'
329
+ close-on-select width="100%"></v-select>
330
+ </div>
331
+
332
+ <div class="col-xs-1">
333
+ <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
334
+ </div>
335
+ <div class="col-xs-4" style="padding-left: 2px">
336
+ <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
337
+ </div>
338
+ <div class="col-xs-1" >
339
+ <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
340
+ </div>
341
+ <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
342
+ <div class="col-xs-2" style="float: right">
343
+ <button type="button" class="btn btn-primary" @click="plansearch" style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">查询</button>
344
+ </div>
345
+ </div>
346
+ <table class="table table_sy">
347
+ <thead>
348
+ <tr>
349
+ <th style="width: 30px"></th>
350
+ <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
351
+ </tr>
352
+ </thead>
353
+ <tbody>
354
+ <tr v-for="row in planoption">
355
+ <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
356
+ <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
357
+
358
+
359
+ </tr>
360
+ </tbody>
361
+ </table>
362
+ </div>
363
+ <div slot="modal-footer" class="modal-footer">
364
+ <button class="btn btn-default" @click="isok()">确认</button>
365
+ <button class="btn btn-default" @click="iscancel()">取消</button>
366
+ </div>
367
+ </modal>
368
+ <modal :show.sync="showModal3" v-ref:modal>
369
+ <div slot="modal-header" class="modal-header">
370
+ <h4 class="modal-title">
371
+ 选择计划
372
+ </h4>
373
+ </div>
374
+ <div slot="modal-body" class="modal-body">
375
+ <div class="col-xs-12">
376
+
377
+ <div class="col-xs-4">
378
+ <v-select :value.sync="check" v-model='check'
379
+ :value-single="true"
380
+ class="select_list select"
381
+ :options='checkers' placeholder='安检员'
382
+ close-on-select width="100%"></v-select>
383
+ </div>
384
+
385
+ <div class="col-xs-1">
386
+ <!--<label style="font-size:20px;line-height: 35px">人员 </label>-->
387
+ </div>
388
+ <div class="col-xs-4" style="padding-left: 2px">
389
+ <input class="select-style" placeholder="计划名称" type="text" v-model="plan" style="border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 35px"/>
390
+ </div>
391
+ <div class="col-xs-1" >
392
+ <!--<label style="font-size: 20px;line-height: 35px">计划</label>-->
393
+ </div>
394
+ <!--<input placeholder="安检员" type="text" v-model="check" style="height:30px;width: 100px"/>-->
395
+ <div class="col-xs-2" style="float: right">
396
+ <button type="button" class="btn btn-primary" @click="plansearch" style="background-color:#499edf;float: right;margin-right:10px;border: 1px solid #93B2D3;height:34px;width: 100%;line-height: 1px;padding-left: 12px">查询</button>
397
+ </div>
398
+ </div>
399
+ <table class="table table_sy">
400
+ <thead>
401
+ <tr>
402
+ <th style="width: 30px"></th>
403
+ <th style="font-family: 'Adobe 黑体 Std R'">计划名称</th>
404
+ </tr>
405
+ </thead>
406
+ <tbody>
407
+ <tr v-for="row in planoption">
408
+ <td @click="select(row, $index)" >{{row.selected==true ? '☆' : '&nbsp;&nbsp;&nbsp;&nbsp;'}}</td>
409
+ <td @click="select(row, $index)" style="text-align: center">{{row.label}}</td>
410
+
411
+
412
+ </tr>
413
+ </tbody>
414
+ </table>
415
+ </div>
416
+ <div slot="modal-footer" class="modal-footer">
417
+ <button class="btn btn-default" @click="manyisok()">确认</button>
418
+ <button class="btn btn-default" @click="iscancel()">取消</button>
419
+ </div>
420
+ </modal>
421
+ </div>
422
+
423
+ </template>
424
+
425
+ <script>
426
+ import LocalPagedList from '../../../plugins/LocalPagedList'
427
+ import Vue from 'vue'
428
+ import { PagedList,HttpResetClass } from 'vue-client'
429
+ import * as Util from '../../Util'
430
+ import co from 'co'
431
+ import {isEmpty} from '../../Util'
432
+ let select = function * (self) {
433
+ let http = new HttpResetClass()
434
+ http.load('POST', `${self.$androidUtil.getProxyUrl()}/rs/search`, {
435
+ source: 'this.getSpecialResByType($user$).where(row.getAttributes().get($rolestr$)!=null ).where(row.getAttributes().get($rolestr$).indexOf($安检员$) != -1)',
436
+ userid: Vue.user.orgid
437
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
438
+ //tag
439
+ self.checkers.push({label:'全部',value:''})
440
+ res.data.forEach((checker)=>{
441
+ self.checkers.push({label:checker.name,value:checker.id})
442
+ })
443
+ })
444
+ }
445
+ export default {
446
+ title: '无计划安检查询',
447
+ props: ['planName','f_residential_area','f_building'],
448
+ data() {
449
+ return {
450
+ f_filialeids:'('+Vue.user.orgid+')',
451
+ //f_filialeids:'(305)',
452
+ planparam:[],
453
+ check:'',
454
+ plan:'',
455
+ planid:'',
456
+ model:Vue.android? new LocalPagedList('androidGetuserinfo',50,{condition:'this.condition'}): new PagedList( 'AndroidRest/api/af-safecheck/sql/androidGetuserinfo',20,{condition:'this.condition'}),
457
+ showModal: false,
458
+ showModal2:false,
459
+ showModal3:false,
460
+ needid:'',
461
+ criteriaShow: false,
462
+ planoption:[],
463
+ condition:'',
464
+ checkers:[],
465
+ param: null,
466
+ f_preset_dt : Util.to3339TimeString(),
467
+ flow_direction:[
468
+ {label: '请选择挂表方式', value: ''},
469
+ {label: '左表', value: '左表'},
470
+ {label: '右表', value: '右表'}
471
+ ],
472
+ check_states: [
473
+ {label: '请选择安检状态', value: ''},
474
+ {label: '未检', value: '未检'},
475
+ {label: '已检', value: '已检'},
476
+ ],
477
+ last_check_states: [
478
+ {label: '请选择上次安检状态', value: ''},
479
+ {label: '入户', value: '入户'},
480
+ {label: '拒检', value: '拒检'},
481
+ {label: '到访不遇', value: '到访不遇'},
482
+ {label: '未使用天然气', value: '未使用天然气'}
483
+ ],
484
+ upload_states: [
485
+ {label: '请选择上传状态', value: ''},
486
+ {label: '未传', value: '未传'},
487
+ {label: '已传', value: '已传'}
488
+ ],
489
+ user_types: [
490
+ {label: '请选择用户类型', value: ''},
491
+ {label: '民用', value: '民用'},
492
+ {label: '非民用', value: '非民用'},
493
+ ],
494
+ verify_state: [
495
+ {label: '请选择审核状态', value: ''},
496
+ {label: '未审核', value: '未审核'},
497
+ {label: '打回', value: '打回'}
498
+ ],
499
+ residentialAreaOptions: [],
500
+ buildOptions: [],
501
+ unitOptions: [],
502
+ planNameOptions: [],
503
+ upcomingCount: 0,
504
+ doneCount: 0,
505
+ tempSaveCount: 0,
506
+ allPlanCount: 0
507
+ }
508
+ },
509
+ ready(){
510
+ // this.getAllArea()
511
+ this.getAllPlanName()
512
+ if (!isEmpty(this.f_residential_area)){
513
+ this.$refs.paged.$refs.cri.model.f_residential_area = this.f_residential_area
514
+ }
515
+ if (!isEmpty(this.f_building)){
516
+ this.$refs.paged.$refs.cri.model.f_building = this.f_building
517
+ }
518
+ this.getUnits(this.f_building)
519
+ this.selfSearch()
520
+ let gen = select(this)
521
+ co(gen)
522
+ },
523
+ mounted(){
524
+ //tag
525
+ if (window.history && window.history.pushState) {
526
+ history.pushState(null, null, document.URL);
527
+ window.addEventListener('popstate', this.fun, false);//false阻止默认事件
528
+ }
529
+ },
530
+ destroyed(){
531
+ //tag
532
+ window.removeEventListener('popstate', this.fun, false);//false阻止默认事件
533
+ },
534
+ methods: {
535
+ getLastCheckStateStyle(state, f_last_check_state) {
536
+ if (state === '未检') {
537
+ return 'transparent';
538
+ }
539
+ switch(f_last_check_state) {
540
+ case '入户':
541
+ return '#00ff71';
542
+ case '拒检':
543
+ return '#00f3ff';
544
+ case '到访不遇':
545
+ return '#fff600';
546
+ default:
547
+ return 'transparent';
548
+ }
549
+ },
550
+ scan(){
551
+ HostApp.__this__=this,
552
+ HostApp.scanCode({callback:"javascript:HostApp.__this__.getCode();"})
553
+ },
554
+ getCode(){
555
+ const datapa = HostApp.getCode().data;
556
+ //tag
557
+ this.$refs.paged.$refs.cri.model.f_meter_no = datapa
558
+
559
+ },
560
+ fun () {
561
+ //tag
562
+ //tag
563
+ },
564
+ iscancel(){
565
+ this.showModal2=false
566
+ this.showModal3=false
567
+ this.planoption=[]
568
+ },
569
+ timeSet(val){
570
+ return val
571
+ },
572
+ async isok(){
573
+ if(this.planoption.length==0){
574
+ this.$showMessage("请选择计划")
575
+ return false
576
+ }
577
+ for (let i = 0; i <this.planoption.length ; i++) {
578
+ if (this.planoption[i]["selected"]==true){
579
+ this.planid=this.planoption[i].value
580
+ break
581
+ }
582
+ }
583
+ if(this.planid==''){
584
+ this.$showMessage("请选择计划")
585
+ return false
586
+ }
587
+ await this.okput()
588
+ },
589
+ async manyisok(){
590
+ if(this.planoption.length==0){
591
+ this.$showMessage("请选择计划")
592
+ return false
593
+ }
594
+ for (let i = 0; i <this.planoption.length ; i++) {
595
+ if (this.planoption[i]["selected"]==true){
596
+ this.planid=this.planoption[i].value
597
+ break
598
+ }
599
+ }
600
+ if(this.planid==''){
601
+ this.$showMessage("请选择计划")
602
+ return false
603
+ }
604
+ await this.manyokput()
605
+ },
606
+ changenull(){
607
+ this.showModal2=false
608
+ this.showModal3=false
609
+ this.planoption=[]
610
+ this.plan=''
611
+ this.check=''
612
+ },
613
+ async okput(){
614
+ let result = this.$androidUtil.bzLogic('UpCheckPlanItemAndroid', {condition:`id='`+this.needid+`'`,f_plan_id:this.planid})
615
+ if (result.code == 200) {
616
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/UpCheckPlanItem`, {data:{
617
+ condition:`i.id='`+this.needid+`'`,
618
+ f_plan_id:this.planid,
619
+ switchCheckAll:false,
620
+ checkAll:false,
621
+ f_operator:Vue.user.name
622
+ }
623
+ })
624
+ await this.changenull()
625
+ }
626
+ },
627
+ async manyokput(){
628
+ let condition = `1=1`
629
+ let criteria = {
630
+ items: 'id',
631
+ tablename: 't_check_plan',
632
+ condition: `f_checker_id = '${Vue.user.id}'`,
633
+ groupitem: 'id'
634
+ }
635
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
636
+ if (result.code==200){
637
+ condition = `1=1 and i.f_plan_id in (${result.data.rows.map(row => { return `'${row.id}'` }).join()})`
638
+ }
639
+ let result2 = this.$androidUtil.bzLogic('UpCheckPlanItemAndroid', {condition:`f_plan_id in (${result.data.rows.map(row => { return `'${row.id}'` }).join()})`,f_plan_id:this.planid})
640
+ if (result2.code == 200) {
641
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/UpCheckPlanItem`, {data:{
642
+ columnName:"i.id",
643
+ condition:condition,
644
+ f_plan_id:this.planid,
645
+ switchCheckAll:true,
646
+ param:this.planparam,
647
+ checkAll:true,
648
+ f_operator:Vue.user.name
649
+ }
650
+ })
651
+ await this.changenull()
652
+ }
653
+ },
654
+ async plansearch(){
655
+ this.planoption=[]
656
+ let condition= ` f_plan_year=${new Date().getFullYear()}`
657
+ if(this.check){
658
+ condition += ` and f_checker_id= '${this.check}'`
659
+ }
660
+ if(this.plan){
661
+ condition += ` and f_plan_name like '%${this.plan}%'`
662
+ }
663
+ let res= await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/预约计划下发`, {data:{
664
+ condition:condition,
665
+ f_filialeids:this.f_filialeids,
666
+ groupitem:'',
667
+ orderitem:'id'
668
+ }})
669
+ let resoult=res.data
670
+ for (let i = 0; i < resoult.length; i++) {
671
+ this.planoption.push({label: resoult[i].f_plan_name,selected:false, value: resoult[i].id})
672
+ }
673
+ },
674
+
675
+ select(row, idx) {
676
+ this.$set('planoption[' + idx + '].selected', true)
677
+ for (let i = 0; i <this.planoption.length ; i++) {
678
+ if (i!=idx){
679
+ this.planoption[i]["selected"]=false
680
+ }
681
+ }
682
+ },
683
+ planclose(){
684
+ this.showModal2=false
685
+ this.showModal3=false
686
+ },
687
+ queryplan(val){
688
+ this.needid=val
689
+ this.showModal2 = true
690
+ },
691
+ queryplanmany(){
692
+
693
+ this.showModal3 = true
694
+ },
695
+ reload(){
696
+ // this.getAllArea()
697
+ // this.getAllPlanName()
698
+ this.selfSearch()
699
+ },
700
+ cancelReserve (idx, id) {
701
+ if(Vue.android){
702
+ let res = this.$androidUtil.bzLogic('BookingCheck', {dt: '', id: id})
703
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
704
+ if (res.code == 200) {
705
+ this.$showMessage("取消预约成功")
706
+ }
707
+ }else {
708
+ this.$androidUtil.bzLogic('PCbookingCheck', {dt: '', id: id}).then((repanse) => {
709
+ this.$set('model.rows[' + idx + '].f_prearranged_date', null)
710
+ if (repanse.data.code == 200) {
711
+ alert("取消预约成功!")
712
+ }
713
+ })
714
+ }},
715
+ genuineReserve () {
716
+ if(Vue.android){
717
+ if (!this.f_preset_dt) {
718
+ this.$showMessage('请选择一个日期')
719
+ return
720
+ }
721
+ let pdt = this.f_preset_dt.replace('T', ' ')
722
+ let respanse = this.$androidUtil.bzLogic('BookingCheck', {id: this.model.rows[this.param].id, dt: pdt})
723
+ this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
724
+ if(respanse.code == 200) {
725
+ this.$showMessage("预约成功!")
726
+ }
727
+ this.showModal = false
728
+ }else {
729
+ if (!this.f_preset_dt) {
730
+ alert('请选择一个日期')
731
+ return
732
+ }
733
+ let pdt = this.f_preset_dt.replace('T', ' ')
734
+ this.$androidUtil.bzLogic('PCbookingCheck', {id: this.model.rows[this.param].id, dt: pdt}).then((res) => {
735
+ this.$set('model.rows[' + this.param + '].f_prearranged_date', pdt)
736
+ if(res.data.code == 200) {
737
+ alert("预约成功!")
738
+ }
739
+ this.showModal = false
740
+ })
741
+ }
742
+ },
743
+ inspect(row) {
744
+ var _this = this
745
+ try {
746
+ let http = new HttpResetClass()
747
+ http.load('POST',`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/safe_singleTable_OrderBy`, {data: {
748
+ items: 'id',
749
+ tablename: 't_check_plan_item',
750
+ condition: `id = '${row.id}'`,
751
+ orderitem: ' id '
752
+ }}, {resolveMsg: null, rejectMsg: null}).then((getcheckplan) => {
753
+ this.getcheckplandata = getcheckplan.data[0]
754
+ if(this.getcheckplandata){
755
+ if (row.f_no_checkplan != '无计划安检') {
756
+ _this.$resetpost(`${_this.$androidUtil.getProxyUrl()}/api/af-safecheck/sql/查询计划项表信息`, {data: {f_userid: row.f_userinfoid}},{resolveMsg: null,rejectMsg: null}).then((response) => {
757
+ row['f_plan_meters'] = response.data
758
+ var pardate = {
759
+ _this:_this,
760
+ title:'安全检查',
761
+ safe:true
762
+ }
763
+ _this.$dispatch('gotoson',pardate)
764
+ //tag
765
+ _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self')
766
+ }).catch ((msg)=>{
767
+ this.noLineInspect(row)
768
+ this.$showMessage("网络异常,请检查网络后再试!")
769
+ })
770
+ }
771
+ }else {
772
+ this.$showMessage("该用户安检单已被移除,请联系管理员确认!")
773
+ }
774
+ }).catch((e)=>{
775
+ this.noLineInspect(row)
776
+ })
777
+ }catch (e){
778
+ this.noLineInspect(row)
779
+ }
780
+ },
781
+ noLineInspect(row){
782
+ let _this = this
783
+ let criteria = {
784
+ items: ' * ',
785
+ tablename: ' t_plan_item_meter ',
786
+ condition: ` f_plan_item_id = '${row.id}' `,
787
+ orderitem: ' 1 '
788
+ }
789
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_OrderBy', 'criteria': criteria}})
790
+ if(result.code == 200){
791
+ row.f_plan_meters = [result.data.rows[0]]
792
+ var pardate = {
793
+ _this:_this,
794
+ title:'安全检查',
795
+ safe:true
796
+ }
797
+ _this.$dispatch('gotoson',pardate)
798
+ _this.$goto('safecheck-order-v', {f_plan_id: row.f_plan_id, item: row, role: 'inspect',parentPage:'CurrentCreate'}, 'self', _this.reload)
799
+ }
800
+ },
801
+ makeAPhoneCall(phoneNumber) {
802
+ this.$androidUtil.makeAPhoneCall(phoneNumber)
803
+ },
804
+ reserve (idx) {
805
+ this.param = idx
806
+ this.showModal = true
807
+ },
808
+ search(args) {
809
+ this.model.rows = []
810
+ this.model.search(args.condition, args.model)
811
+ },
812
+ selfSearch () {
813
+ this.getPlanCount()
814
+ let condition = ""
815
+ if (Array.isArray(this.$refs.paged.$refs.cri.model.f_residential_area) && this.$refs.paged.$refs.cri.model.f_residential_area.length >0){
816
+ condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area[0]+"'"
817
+ }else if(typeof this.$refs.paged.$refs.cri.model.f_residential_area == 'string' && this.$refs.paged.$refs.cri.model.f_residential_area){
818
+ condition += " and ti.f_residential_area = '"+this.$refs.paged.$refs.cri.model.f_residential_area+"'"
819
+ }
820
+ if(this.$refs.paged.$refs.cri.model.f_building)
821
+ condition += ` and ti.f_building = '${this.$refs.paged.$refs.cri.model.f_building}'`
822
+ if(this.$refs.paged.$refs.cri.model.f_unit)
823
+ condition += ` and ti.f_unit = '${this.$refs.paged.$refs.cri.model.f_unit}'`
824
+ if (this.planName){
825
+ condition += " and f_plan_name like '%"+this.planName +"%'"
826
+ }else {
827
+ if(this.$refs.paged.$refs.cri.model.f_plan_name)
828
+ condition += " and f_plan_name like '%"+this.$refs.paged.$refs.cri.model.f_plan_name +"%'"
829
+ }
830
+ // if(this.$refs.paged.$refs.cri.model.f_plan_year)
831
+ // condition += " and f_plan_year = '"+this.$refs.paged.$refs.cri.model.f_plan_year +"'"
832
+ // if(this.$refs.paged.$refs.cri.model.f_plan_month)
833
+ // condition += " and f_plan_month = '"+this.$refs.paged.$refs.cri.model.f_plan_month +"'"
834
+ if(this.$refs.paged.$refs.cri.model.f_userinfo_code)
835
+ condition += " and ti.f_userinfo_code like '%"+this.$refs.paged.$refs.cri.model.f_userinfo_code+"%'"
836
+ if(this.$refs.paged.$refs.cri.model.f_floor)
837
+ condition += " and ti.f_floor like '%"+this.$refs.paged.$refs.cri.model.f_floor+"%'"
838
+ if(this.$refs.paged.$refs.cri.model.f_keyword)
839
+ condition += " and ti.f_address like '%"+this.$refs.paged.$refs.cri.model.f_keyword+"%'"
840
+ if(this.$refs.paged.$refs.cri.model.f_user_name)
841
+ condition += " and ti.f_user_name like '%"+this.$refs.paged.$refs.cri.model.f_user_name+"%'"
842
+ if(this.$refs.paged.$refs.cri.model.f_state[0])
843
+ condition += " and ti.f_state='"+this.$refs.paged.$refs.cri.model.f_state[0]+"'"
844
+ if(this.$refs.paged.$refs.cri.model.f_last_state[0])
845
+ condition += " and ti.f_last_check_state='"+this.$refs.paged.$refs.cri.model.f_last_state[0]+"'"
846
+ if(this.$refs.paged.$refs.cri.model.f_user_type[0])
847
+ condition += " and ti.f_user_type='"+this.$refs.paged.$refs.cri.model.f_user_type[0]+"'"
848
+ if(this.$refs.paged.$refs.cri.model.f_meter_no)
849
+ condition += " and tm.f_meter_no like '%"+this.$refs.paged.$refs.cri.model.f_meter_no+"%'"
850
+ // if(this.$refs.paged.$refs.cri.model.f_flow_direction[0])
851
+ // condition += " and tm.f_flow_direction = '"+this.$refs.paged.$refs.cri.model.f_flow_direction[0]+"'"
852
+ if(this.$refs.paged.$refs.cri.model.f_user_phone){
853
+ condition += `and ti.f_user_phone like '%${this.$refs.paged.$refs.cri.model.f_user_phone}%'`
854
+ }
855
+ if(this.$refs.paged.$refs.cri.model.f_enter_number)
856
+ condition += " and ti.f_enter_number like '%"+this.$refs.paged.$refs.cri.model.f_enter_number+"%'"
857
+ if(this.$refs.paged.$refs.cri.model.f_check_version)
858
+ condition += " and ti.f_check_version <= "+this.$refs.paged.$refs.cri.model.f_check_version
859
+ //tag
860
+ this.model.search("ti.f_no_checkplan = '有计划安检'" + condition)
861
+ },
862
+ getNewOrder(){
863
+ HostApp.__this__ = this
864
+ HostApp.logicWithHint({
865
+ // logic别名,key必须为logic
866
+ 'logic': 'SafeCheckServiceTimeOut',
867
+ // 回调执行方法名,key必须为callback
868
+ 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
869
+ // logic执行需要的业务参数
870
+ 'data': {params: ''},
871
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
872
+ // 执行回调方法传入key为backresult
873
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
874
+ 'backresult': 1
875
+ })
876
+ HostApp.logicWithHint({
877
+ // logic别名,key必须为logic
878
+ 'logic': 'FreshPlanItem',
879
+ // 回调执行方法名,key必须为callback
880
+ 'callback': 'javascript:HostApp.__this__.getNewOrderCallBack()',
881
+ // logic执行需要的业务参数
882
+ 'data': {params: ''},
883
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
884
+ // 执行回调方法传入key为backresult
885
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
886
+ 'backresult': 1
887
+ })
888
+ },
889
+ getNewOrderCallBack() {
890
+ this.selfSearch()
891
+ this.getAllArea()
892
+ this.getAllPlanName()
893
+ },
894
+ hidden() {
895
+ this.criteriaShow = !this.criteriaShow
896
+ },
897
+ getAllArea(){
898
+ this.residentialAreaOptions = []
899
+ this.buildOptions = []
900
+ this.unitOptions = []
901
+ this.$refs.paged.$refs.cri.model.f_unit = ''
902
+ let criteria = {
903
+ items: 'f_residential_area',
904
+ tablename: 't_check_plan_item',
905
+ condition: `f_residential_area IS NOT NULL AND f_residential_area != ''`,
906
+ groupitem: 'f_residential_area'
907
+ }
908
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
909
+ //tag)
910
+ if(result.code == 200){
911
+ result.data.rows.forEach(item => this.residentialAreaOptions.push({label:item.f_residential_area,value:item.f_residential_area}))
912
+ }
913
+ //tag)
914
+ },
915
+ getbuilds(f_residential_area){
916
+ //tag)
917
+ this.buildOptions = []
918
+ this.unitOptions = []
919
+ this.$refs.paged.$refs.cri.model.f_unit = ''
920
+ if(!f_residential_area){
921
+ return
922
+ }
923
+ let criteria = {
924
+ items: 'f_building',
925
+ tablename: 't_check_plan_item',
926
+ condition: `f_building IS NOT NULL AND f_building != '' AND f_residential_area = '${f_residential_area}'`,
927
+ groupitem: 'f_building order by f_building+0'
928
+ }
929
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
930
+ if(result.code == 200){
931
+ result.data.rows.forEach(item => this.buildOptions.push({label:item.f_building,value:item.f_building}))
932
+ }
933
+ this.buildOptions.sort((a,b)=>{
934
+ return Number(a.label)- Number(b.label)
935
+ })
936
+ //tag)
937
+ },
938
+ getUnits(f_building){
939
+ //tag)
940
+ this.unitOptions = []
941
+ this.$refs.paged.$refs.cri.model.f_unit = ''
942
+ if(!f_building){
943
+ return
944
+ }
945
+ let criteria = {
946
+ items: 'f_unit',
947
+ tablename: 't_check_plan_item',
948
+ condition: `f_unit IS NOT NULL AND f_unit != '' AND f_residential_area = '${this.$refs.paged.$refs.cri.model.f_residential_area}' AND f_building = '${f_building}'`,
949
+ groupitem: 'f_unit'
950
+ }
951
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
952
+ if(result.code == 200){
953
+ result.data.rows.forEach(item => this.unitOptions.push({label:item.f_unit,value:item.f_unit}))
954
+ }
955
+ },
956
+ getPlanCount(){
957
+ this.upcomingCount = 0
958
+ this.tempSaveCount = 0
959
+ this.doneCount = 0
960
+ this.allPlanCount = 0
961
+ let criteria = {
962
+ items: 'count(id) count',
963
+ tablename: 't_check_plan_item',
964
+ condition: `f_state = '未检'`,
965
+ groupitem: 'f_state'
966
+ }
967
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
968
+ if(result.code && result.code == 200){
969
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)) {
970
+ this.upcomingCount = result.data.rows[0].count
971
+ }
972
+ }
973
+ criteria = {
974
+ items: 'count(id) count',
975
+ tablename: 't_check_plan_item',
976
+ condition: `(f_complete = '' or f_complete is null or f_complete = '未完成') AND f_state = '已检'`,
977
+ groupitem: 'f_state'
978
+ }
979
+ result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
980
+ if(result.code && result.code == 200){
981
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
982
+ this.tempSaveCount = result.data.rows[0].count
983
+ }
984
+ }
985
+ criteria = {
986
+ items: 'count(id) count',
987
+ tablename: 't_check_plan_item',
988
+ condition: `f_complete = '已完成' AND f_state = '已检'`,
989
+ groupitem: 'f_state'
990
+ }
991
+ result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
992
+ if(result.code && result.code == 200){
993
+ if(result.data.rows[0] && !isNaN(result.data.rows[0].count)){
994
+ this.doneCount = result.data.rows[0].count
995
+ }
996
+ }
997
+ this.allPlanCount = this.upcomingCount + this.tempSaveCount + this.doneCount
998
+
999
+ //tag
1000
+ //tag
1001
+ //tag
1002
+ //tag
1003
+ },
1004
+ getAllPlanName(){
1005
+ this.planNameOptions = []
1006
+ this.$refs.paged.$refs.cri.model.f_plan_name = ''
1007
+ let criteria = {
1008
+ items: 'f_plan_name',
1009
+ tablename: 't_check_plan',
1010
+ condition: `f_plan_name IS NOT NULL AND f_plan_name != ''`,
1011
+ groupitem: 'f_plan_name'
1012
+ }
1013
+ let result = HostApp._executeTask({'type':'sql', 'data':{'alias': 'safe_singleTable_GroupBy', 'criteria': criteria}})
1014
+ //tag)
1015
+ if(result.code == 200){
1016
+ result.data.rows.forEach(item => this.planNameOptions.push({label:item.f_plan_name,value:item.f_plan_name}))
1017
+ }
1018
+ //tag)
1019
+ },
1020
+ setPlanParam(detailsType, event) {
1021
+ if (event.srcElement.checked) {
1022
+ this.planparam.push(detailsType)
1023
+ //tag
1024
+ } else {
1025
+ if(this.planparam.length>0){
1026
+ let planid= this.planparam.findIndex((value) => {
1027
+ return value === detailsType
1028
+ })
1029
+ this.planparam.splice(planid, 1)
1030
+ //tag
1031
+
1032
+ }
1033
+
1034
+ }
1035
+ }
1036
+ }
1037
+ }
1038
+ </script>