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,2433 +1,2433 @@
1
- <template>
2
- <div id="savebut" class="no-close row android-repair-order" style="background-color: #f9f9f9">
3
- <div class="col-sm-12 col-xs-12" >
4
- <ul class="nav nav-tabs" style="background:#ffffff;overflow-y: hidden">
5
- <li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
6
- v-if="$index < number+1 && $index < faultshow.number" >
7
- <a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
8
- <span class="spanboder">{{row.header}}</span>
9
- <img class="butt2" :src="imgback(row.complete === componentName,row.header === header)"></a>
10
- <p></p>
11
- </li>
12
- <div class="col-sm-12 col-xs-12 repair-bg" v-show="routeShow">
13
- <route name='repair' :reuse="false"></route>
14
- </div>
15
- <li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
16
- v-if="$index > number && $index < faultshow.number ">
17
- <a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
18
- <span class="spanboder">{{row.header}}</span>
19
- <img class="butt2" :src="imgback(row.complete === componentName,row.header === header)"></a>
20
- <p></p>
21
- </li>
22
- <div class="col-sm-12 col-xs-12 repair-bg" v-if="actionEnabled ">
23
- <div class="auto select-overspread form-horizontal repair-bg " style="padding-bottom:5px;">
24
- <div class="bq-parent">
25
- <blockquote class="blockquote">
26
- <p>安检上传</p>
27
- </blockquote>
28
- </div>
29
- <div class="panel panel-default auto repair-info-content">
30
- <div class="panel-body ">
31
- <div class="row auto">
32
- <!--<div class="col-xs-12 col-sm-12 col-md-12" :style="timeSet(this.isneedDate)?'':'display:none'">-->
33
- <!--<label>请输入超期原因:</label><br/>-->
34
- <!--<textarea style="width: 100%;" v-model=""></textarea>-->
35
- <!--</div>-->
36
- <div class="col-xs-12 col-sm-12 col-md-12 flex-between" style="margin-top: 20px;">
37
- <div class="col-xs-3 col-sm-3 col-md-3" v-if="parentPage=='CurrentCreate'">
38
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="save('temp')">
39
- 临时保存
40
- </button>
41
- </div>
42
- <div class="col-xs-3 col-sm-3 col-md-3">
43
- <button class="col-sm-3 btn btn-primary" @click="save('finish')">
44
- 本地缓存
45
- </button>
46
- </div>
47
- <div class="col-xs-3 col-sm-3 col-md-3">
48
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="uploadCheckPaper">
49
- 上传
50
- </button>
51
- </div>
52
- <div v-if="show_torepair">
53
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="showmod">
54
- 转维修
55
- </button>
56
- </div>
57
- </div>
58
- </div>
59
- </div>
60
- </div>
61
- </div>
62
- </div>
63
- </ul>
64
- </div>
65
- <modal :show.sync="showModal2" :backdrop="false" style="font-size: 15px">
66
- <div slot="modal-header" class="modal-header upuserinfo_sel">
67
- <h4 class="modal-title">
68
- 转维修
69
- </h4>
70
- </div>
71
- <div slot="modal-body" class="modal-body">
72
- <div class="row">
73
- <ol style="border: 1px solid green;padding: 15px 0 15px 20px">
74
- <li v-for="row in repairDefect.data" >{{row}}</li>
75
- </ol>
76
- </div>
77
- <div class="row" style="margin-top: 10px">
78
- <label class="font_normal_body">派发类型</label>
79
- <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
80
- :options='dispatchTypeOptions' placeholder='派发类型'
81
- close-on-select>
82
- </v-select>
83
- </div>
84
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
85
- <label class="font_normal_body">维&ensp;修&ensp;员</label>
86
- <v-select
87
- :value.sync="selectData.f_repairman"
88
- :value-single="true"
89
- :options='repairers'
90
- placeholder='请选择维修员'
91
- close-on-select></v-select>
92
- </div>
93
- <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
94
- <label class="font_normal_body">站&ensp;&ensp;&ensp;&ensp;点</label>
95
- <safe-right-tree
96
- islist
97
- :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
98
- @re-res="getSiteRes"></safe-right-tree>
99
- </div>
100
- <div class="row" style="margin-top: 10px">
101
- <label class="font_normal_body">报修类型</label>
102
- <v-select :value.sync="selectData.f_repairtype"
103
- class="select select_list" @change="getDays"
104
- :value-single="true"
105
- :options='repairTypeOptions'
106
- close-on-select>
107
- </v-select>
108
- </div>
109
- <div class="row" style="margin-top: 10px">
110
- <label class="font_normal_body">截止天数</label>
111
- <v-select :value="selectData.day" :value-single="true"
112
- v-model="selectData.day" class="select select_list"
113
- :options='days' placeholder='请选择截止天数'
114
- close-on-select
115
- v-on:change="daychange" style="width: 60%"></v-select>
116
- </div>
117
- <div class="row" style="margin-top: 10px">
118
- <label class="font_normal_body">截止时间</label>
119
- <datepicker placeholder="请选择截至时间"
120
- :value.sync="selectData.f_finish_date"
121
- v-model="selectData.f_finish_date"
122
- :format="'yyyy-MM-dd HH:mm:ss'"
123
- style="width: 60%"
124
- :disabled="true"></datepicker>
125
- </div>
126
- <div class="row" style="margin-top: 10px">
127
- <label class="font_normal_body" >备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
128
- <div class="btn-group" style="width:60%">
129
- <textarea style="width:100%;height: 100px" v-model="selectData.f_remarks"></textarea>
130
- </div>
131
- </div>
132
- </div>
133
- <div slot="modal-footer" class="modal-footer" style="text-align: center">
134
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="rectification">转维修</button>
135
- <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="cancel1">取消</button>
136
- </div>
137
- </modal>
138
- </div>
139
- </template>
140
-
141
- <script>
142
- import Vue from 'vue'
143
- import * as Util from '../../../components/Util'
144
- import { HttpResetClass } from 'vue-client'
145
- import co from 'co'
146
- import $ from "jquery";
147
- import MeterReading from './MeterReading'
148
- let loadParamGem = async function (self) {
149
- await self.$LoadParams.loadParam()
150
- }
151
-
152
- export default {
153
- title: '安检单',
154
- props: ['f_plan_id', 'item', 'role','parentPage','source'],
155
- // props: ['f_plan_id', 'role'],
156
- data() {
157
- return {
158
- //测试数据
159
- // f_plan_id:'',
160
- // role:'inspect',
161
- // item:{"f_approved_time":null,"f_user_family_remarks":null,"f_street":"测试街道","f_repair_approved_time":null,
162
- // "f_user_type":null,"f_approved_by":null,"f_card_id":null,"f_remark":null,"f_building":"1","f_batch_number":null,
163
- // "f_idnumber":null,"f_state":"未检","id":"0EFE0EE2-B155-46F9-8DE0-38C022664A4D","f_complete":null,"f_check_state":null,"f_last_check_state":"拒检",
164
- // "f_user_inhome_time":null,"f_residential_area":"测试小区1","version":1,"f_processid":null,"f_last_check_result":"{\"result\":\"正常\",\"data\":[]}",
165
- // "f_area":null,"f_usegas":null,"f_user_phone":"16566546548","f_slice_area":"营业大区","f_approved":"未审核","f_upload_state":"未传","f_user_check_time":null,
166
- // "f_unit":"1","f_user_spare_phone":null,"f_last_check_date":null,"f_userproperties":null,"f_userfile_id":null,"f_prearranged_date":null,"f_filialeid":"453",
167
- // "f_branch":null,"f_orgstr":null,"f_plan_year":2020,"f_orgid":null,"f_approval_notified":null,"f_plan_month":4,"f_approved_note":null,"f_filialeids":null,
168
- // "f_floor":"1","f_flag":null,"f_repair_approved_note":null,"f_userinfo_code":"00000002","f_create_time":"2020-05-10 18:56:03","f_meter_no":"","f_station":null,
169
- // "f_repair_approved":"未审核","f_no_checkplan":"有计划安检","f_plan_name":"关于","f_repair_approved_by":null,"f_room":"1","f_office":null,"f_comments":null,
170
- // "f_address":"兰山街道泰盛小区1栋1单元1层1室","id_back":null,"f_userinfoid":"2","f_subcompany":null,"f_addressid":null,"f_user_phone2":null,
171
- // "f_user_equipment_remarks":null,"f_plan_id":"0819ea6707ad4d9dad217c06a87f4227","f_user_name":"用户二",
172
- // "f_plan_meters":[{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2119035714","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":3,"f_maker":null,"f_metergasnums":0,"f_total_fee":100,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663},{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2118999901","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":1,"f_maker":null,"f_metergasnums":0,"f_total_fee":0,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663}]
173
- // },
174
-
175
- data: {
176
- f_devices: [],
177
- f_defect_content:'',
178
- f_recording1_path:'',
179
- f_visit_number:'',
180
- f_remark:''
181
- },
182
- imgsnum:this.$appdata.getSingleValue('安检总体照片数量') ? this.$appdata.getSingleValue('安检总体照片数量'):1, // 安检整体照片默认必须拍1张
183
- updateuserphone:false, //安检时是否更新用户电话
184
- updatemetermodel:false, //安检时是否更新表型号
185
- updatemeternumber:false, //安检时是否更新表号
186
- beforephone:'',
187
- isUpload:false,
188
- show_torepair: false,
189
- onlySave:true, //判断保存还是保存并上传
190
- livedispose:'',
191
- refuseinspection:'', // 拒检拍照是否提示
192
- notencountered:'', // 到访不遇拍照是否提示
193
- startClick:false, //开始安检按钮是否可点击
194
- isStrat: false, //是否开始安检
195
- checkResult:{},//查询结果
196
- newcheckResult:{},
197
- repairDefect : {
198
- result: '正常',
199
- data: []
200
- },
201
- rowCodata:{},
202
- repairers: [],
203
- timer: null,
204
- showModal: false,
205
- showModal2:false,
206
- pic_to_be_viewed: '',
207
- showBack:true,
208
- devices: [],
209
- f_devices : [],
210
- isToRepair:false,
211
- clickBack:true, //是否点击返回按钮
212
- isSafeCheckToRepair:false,//是否转维修
213
- Url:this.$androidUtil.getProxyUrl(),
214
- detail:{},
215
- defectDevice:{},
216
- user:{},
217
- is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
218
- dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'},{label: '派发给站点', value: '派发给站点'}],
219
- selectData:{
220
- f_finish_date:'',
221
- day:'',
222
- dispatchType:'派发给站点',
223
- f_repairman:'',
224
- f_remarks:'',
225
- f_repairtype:'安检隐患',
226
- f_reciever:'434656123644149762',
227
- f_meetunit:'维修站',
228
- f_outlets:'维修站'
229
- },
230
- model: { //转维修数据
231
- // 一次派单
232
- serviceacitivity: [{
233
- f_service_acitivity_type: '派单'
234
- }],
235
- f_source:'安检',
236
- f_service_id: '',
237
- f_contact_phone: '',
238
- f_meetunit: '',
239
- f_phone: '',
240
- f_user_name: '',
241
- f_address: '',
242
- f_repair_date: Util.toStandardTimeString(),
243
- f_card_id: '',
244
- // f_department: '', 站点选择
245
- f_reciever:'',
246
- f_remarks: '',
247
- f_user_type: '',
248
- f_area: '',
249
- f_unit_name:'',
250
- f_street: '',
251
- f_residential_area: '',
252
- f_building: '',
253
- f_unit: '',
254
- f_floor: '',
255
- f_room: '',
256
- aState: null,
257
- f_repairtype: '',
258
- f_repairitems:{},
259
- },
260
- repairitems:[],
261
- meading:'转站点',
262
- repairTypeOptions:this.$appdata.getParam('报修类型'),
263
- config: {
264
- "燃气表":{
265
- "checkmust":true,
266
- "index":1,
267
- "items":{
268
- //"燃气表照片":{"index":1,"type":"picture","remark":"(拍摄清晰的表具编号、字轮数、剩余气量等)"},
269
- "基表编号":{"index":1,"type":"string","readonly":true},
270
- "气表型号":{"index":2,"type":"string","readonly":true},
271
- "气表品牌":{"index":3,"type":"string","readonly":true},
272
- "表向":{"index":4,"type":"string","readonly":true},
273
- "初始表底":{"index":5,"type":"number","isshow":false,"readonly":true},
274
- "上期表读数":{"index":6,"type":"number","readonly":true,isshow:false},
275
- "累购气量":{"index":7,"type":"number","readonly":true},
276
- "累购金额":{"index":7,"type":"number","readonly":true},
277
- "已用气量":{"index":8,"type":"number","checkmust": false},//基表数
278
- "已用金额":{"index":8,"type":"number","checkmust": false},
279
- "剩余气量":{"index":9,"type":"number","checkmust": false},//累购-已用
280
- //显示屏数 --实际剩余气量
281
- "剩余金额":{"index":9,"type":"number","checkmust": false},
282
- "气量异常差值":{"index":10,"type":"number","readonly": true},
283
- "金额异常差值":{"index":10,"type":"number","readonly": true},
284
- "系统余额":{"index":10,"type":"number","readonly": true},
285
- "表封号":{"index":11,"type":"string","readonly": true},
286
- "燃气表照片":{"index":12,"type":"picture","checkmust": false}
287
- }
288
- // 注意,配置项的index必须与上面的固定配置保持'顺序'
289
- },
290
- // "燃气表2":{
291
- // "checkmust":true,
292
- // "index":2,src
293
- // "items":{
294
- // "燃气表照片":{"index":1,"type":"picture"},
295
- // "表品牌":{"index":2,"type":"string","readonly":true},
296
- // "表号":{"index":3,"type":"string","readonly":true},
297
- // "表封号":{"index":4,"type":"number","readonly":true},
298
- // "表型号":{"index":5,"type":"string","readonly":true},
299
- // "位置":{"index":6,"type":"string","readonly":true},
300
- // "表底数":{"index":7,"type":"number","readonly":true},
301
- // "累购气量":{"index":8,"type":"number","readonly":true},
302
- // "累购金额":{"index":8,"type":"number","readonly":true}
303
- // }
304
- // }
305
- },
306
- // 维修项
307
- isneedDate:'',
308
- days: this.$appdata.getParam('截止天数'),
309
- routeShow:true,
310
- number:0,
311
- shupingshow:false,
312
- pipeline: {},
313
- details: [],
314
- ids: '',
315
- savevalid: {
316
- uservalid: false,
317
- doorvalid: true,
318
- changetable: false
319
- },
320
- doordetails: {},
321
- devicedetails: {},
322
- cookdetails: {},
323
- componentName: 'safecheck-userinfo',
324
- header:'客户信息',
325
- tabs: [
326
- // 参数全部设置成空,在ready时,等model处理好了,再添加
327
- {
328
- header: '客户信息',complete:'safecheck-userinfo',class: 'repair-info-class', props: null
329
- },
330
- {
331
- header: '拍照签名',complete:'paper-feedback', class: 'outlay-class', props: null
332
- }
333
- ],
334
- faultshow:{
335
- number : 8
336
- } // 控制 故障汇总 在 菜单里显示与否,
337
- }
338
- },
339
- components: {
340
- 'meter-reading': MeterReading,
341
- },
342
- computed: {
343
- actionEnabled: {
344
- get() {
345
- return (this.role == 'inspect' && (this.item.f_last_check_state == '到访不遇' || this.item.f_last_check_state == '拒检' || this.item.f_approved == '不通过' )) || (this.role == 'inspect' && this.item.f_complete !='已完成' && this.item.f_complete !='已传' )
346
- }
347
- }
348
- },
349
- methods: {
350
- getDays(val){
351
- console.log(val)
352
- this.days = this.$appdata.getParam(val+'截止天数')
353
- this.selectData.day = this.$appdata.getSingleValue(val+'默认截止天数') || 1
354
- },
355
- daychange(val) {
356
- this.selectData.day = val
357
- if (val == '其他') {
358
- this.flag = false
359
- } else {
360
- if(val){
361
- this.flag = true
362
- this.selectData.f_finish_date = this.getSecondDay(val)
363
- }else {
364
- this.selectData.f_finish_date = this.getSecondDay(1)
365
- }
366
-
367
- }
368
- },
369
- getSecondDay(val){
370
- let t = new Date();
371
- let t1 = t.getTime()
372
- val = val * 1000
373
- t.setTime(t1 + val * 60 * 60 * 24);
374
- let Y = t.getFullYear() + '-'
375
- let M = (t.getMonth() + 1 < 10 ? '0' + (t.getMonth() + 1) : t.getMonth() + 1) + '-'
376
- let D = (t.getDate() < 10 ? '0' + t.getDate() : t.getDate()) + ' '
377
- let h = (t.getHours() < 10 ? '0' + t.getHours() : t.getHours()) + ':'
378
- let m = (t.getMinutes() < 10 ? '0' + t.getMinutes() : t.getMinutes()) + ':'
379
- let s = t.getSeconds() < 10 ? '0' + t.getSeconds() : t.getSeconds()
380
- return Y + M + D + h + m + s
381
- },
382
- showmod(){
383
- // this.saveNoclick()
384
- let errString = this.errorVerify()
385
- if (errString) {
386
- console.log(errString)
387
- console.log('Vue.android',Vue.android)
388
- console.log('this.isUpload',this.isUpload)
389
- if (Vue.android){
390
- this.$showMessage(errString)
391
- }
392
- return
393
- }
394
- //清空转维修列表重新进行数据组织
395
- this.repairDefect = {
396
- result: '正常',
397
- data: []
398
- }
399
- this.data.f_complete = '已完成'
400
- this.$set('data.f_offsite_time', Util.toStandardTimeString())
401
- this.assemblyCodata()
402
- if(this.repairDefect.result=='正常'){
403
- this.$showMessage("未发现有选择需要转维修的隐患,请检查填写的数据。如需转维修请在处理方式中选择 '转维修' !")
404
- return
405
- }
406
- console.log("准备保存!")
407
- this.disableTimer()
408
- this.getEmp()
409
- this.showModal2=true
410
- const f_reciever = this.$appdata.getSingleValue('安检-站点id') || '434656123644149762'
411
- const f_meetunit = this.$appdata.getSingleValue('安检-站点') || '维修站'
412
- const f_repairtype = this.$appdata.getSingleValue('安检-报修类型') || '安检隐患'
413
- this.selectData = {
414
- dispatchType:'派发给站点',
415
- f_repairman:'',
416
- f_remarks:'',
417
- f_repairtype:f_repairtype,
418
- f_reciever:f_reciever,
419
- f_meetunit:f_meetunit,
420
- f_outlets:f_meetunit,
421
- }
422
- },
423
- cancel1(){
424
- this.showModal2=false
425
- this.selectData={
426
- dispatchType:'派发给站点',
427
- f_repairman:'',
428
- f_remarks:'',
429
- f_repairtype:'安检隐患',
430
- f_reciever:'434656123644149762',
431
- f_meetunit:'维修站',
432
- f_outlets:'维修站',
433
- }
434
- },
435
- getSiteRes(obj) {
436
- console.log('siteRes ---> ')
437
- console.log(obj)
438
- if(obj.resids[0]){
439
- this.selectData.f_meetunit = obj.res.join('.')
440
- this.selectData.f_reciever = obj.resids.join('.')
441
- this.selectData.f_outlets = obj.res[obj.res.length - 1]
442
- }else {
443
- this.selectData.f_meetunit = '维修站'
444
- this.selectData.f_reciever ='434656123644149762'
445
- this.selectData.f_outlets ='维修站'
446
- }
447
- },
448
- rectification(){
449
- if(this.selectData.dispatchType){
450
- if(this.selectData.dispatchType=='派发给站点'){
451
- if(!this.selectData.f_reciever){
452
- this.selectData.f_meetunit = '维修站'
453
- this.selectData.f_reciever ='434656123644149762'
454
- this.selectData.f_outlets ='维修站'
455
- }
456
- }else{
457
- if(!this.selectData.f_repairman){
458
- this.$showMessage('请选择维修员!')
459
- return
460
- }
461
- }
462
- }else {
463
- this.$showMessage('请选择派发类型!')
464
- return
465
- }
466
- if(!this.selectData.f_repairtype){
467
- this.$showMessage('请选择报修类型!')
468
- return
469
- }
470
- //关闭录音
471
- this.closely(false) // 保存本地,不删除录音文件暂停录音
472
- let act={}
473
- let toRepair=''
474
- if(this.selectData.dispatchType=='派发给站点'){
475
- act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
476
- toRepair=null
477
- }else{
478
- console.log('派发给维修员---------'+this.selectData.f_repairman)
479
- act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
480
- toRepair='一级派单'
481
- }
482
- let repData={
483
- toRepair:toRepair,
484
- activity:act,
485
- deps:Vue.user.deps,
486
- depids:Vue.user.depids,
487
- f_remarks:this.selectData.f_remarks,
488
- f_repairtype:this.selectData.f_repairtype,
489
- f_finish_date:this.selectData.f_finish_date,
490
- dispatchType: this.selectData.dispatchType,
491
- f_attendant: Vue.user.name,
492
- loginUser:{name:Vue.user.name,ename:Vue.user.id,id:Vue.user.id},
493
- }
494
- this.rowCodata.istoRepair='转维修'
495
- this.rowCodata.repData=repData
496
- console.log("当前组装好的转维修数据--"+JSON.stringify(repData))
497
- this.onlySave = false
498
- this.save()
499
- },
500
- // 获取维修员
501
- getEmp() {
502
- this.repairers=[]
503
- let per = {source: 'this.getRights().where(row.getType()==$user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${Vue.user.id}`}
504
- let http = new HttpResetClass()
505
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: per}, {resolveMsg: null, rejectMsg: null}).then((res) => {
506
- res.data.forEach((user)=>{
507
- this.repairers.push({label:user.name, value: user.name})
508
- })
509
- })
510
- },
511
- closely(isdelete){
512
- try {
513
- var startOrStopAudioClipStr;
514
- if (isdelete===true) {
515
- //tag
516
- startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止并删除录音') //停止并删除录音
517
- }else {
518
- //tag
519
- startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止录音') //停止录音
520
- }
521
- if (startOrStopAudioClipStr.code == 200) {
522
- //tag
523
- return true;
524
- }else {
525
- return false;
526
- }
527
- } catch (e) {
528
- console.error("关闭录音方法异常")
529
- console.error(e)
530
- return false;
531
- }
532
- },
533
- // 录音方法
534
- record() {
535
- //tag
536
- if (this.role != 'inspect') {
537
- if (this.data.f_recording1_path != '') {
538
- window.location = "/rs/file"+this.data.f_recording1_path
539
- }
540
- } else {
541
- //tag
542
- let fileName
543
- if (!this.data.f_recording1_path) {
544
- fileName = Util.guid() + '.amr'
545
- } else {
546
- fileName = Util.getFileName(this.data.f_recording1_path)
547
- }
548
- //HostApp.__this__ = this
549
- /*调用无限制录音模块*/
550
- let startOrStopState = HostApp.startOrStopAudioClip(fileName,"开始录音")
551
- //tag
552
- if (startOrStopState.code == 200) {
553
- this.data.f_recording1_path = "file:///storage/emulated/0/safecheck/" + fileName
554
- //tag
555
- return true;
556
- }else {
557
- return false;
558
- }
559
- }
560
- },
561
- saveNoclick() {
562
- // 禁用点击事件
563
- $("#savebut").addClass("noclickbut");
564
- //tag
565
-
566
- // 5秒后启用点击事件
567
- setTimeout(function(){
568
- $("#savebut").removeClass("noclickbut");
569
- },5000);
570
- },
571
- timeSet(val){
572
- if (!val){
573
- return
574
- }
575
- let time =new Date(val).getTime()
576
- let time2=new Date().getTime()
577
- if (time2>time) {
578
- return true
579
- }
580
- },
581
- imgback(val,isheader){
582
- if(val && this.routeShow && isheader){
583
- return require('../../../assets/xiangxia1.png')
584
- }else{
585
- return require('../../../assets/xiangyou1.png')
586
- }
587
- },
588
- changediv(val){
589
- return val
590
- },
591
- // 选择tab
592
- tabSelect (item,number) {
593
- this.header = item.header
594
- // 处理关闭/显示 内容
595
- if(this.number == number && !this.routeShow ){
596
- this.routeShow = true
597
- }else if(this.number == number && this.routeShow){
598
- this.routeShow = false
599
- }else if(this.number != item.complete){
600
- this.routeShow = true
601
- }
602
- this.number = number
603
- this.componentName = item.complete
604
- if(item.complete == 'safecheck-devices'){
605
- if(item.header != '燃气表' && this.data['device'+item.number].length == 0){
606
- this.data['device' + item.number].push({})
607
- }
608
- let idx=this.data['device' + item.number].length - 1
609
- let itemprops = {
610
- config:this.config,
611
- device:this.devices[item.number-1],
612
- idx:idx,
613
- role:'inspect'
614
- }
615
- if(this.routeShow){
616
- this.$goto(item.complete, itemprops, 'repair')
617
- }
618
- }else if (item.complete == 'meter-reading'){
619
- if(this.routeShow){
620
- this.$goto(item.complete, {service:this.data}, 'repair')
621
- }
622
- }else{
623
- if(this.routeShow){
624
- this.$goto(item.complete, {userinfo:this.data}, 'repair')
625
- }
626
- }
627
- this.shupingshow = true
628
- },
629
- // 给组件添加参数
630
- getImgPath() {
631
- for (var i = 0; i < this.model.serviceacitivity[0].imgs.length; i++) {
632
- this.ids += this.model.serviceacitivity[0].imgs[i].imgid + ','
633
- }
634
- this.ids = this.ids.substring(0, this.ids.length - 1)
635
- if(this.ids){
636
- this.getImgGen();
637
- }
638
- },
639
- getImgGen(){
640
- let http = new HttpResetClass()
641
- http.load('POST','api/af-safecheck/sql/safe_singleTable_OrderBy', {data: {
642
- items: '*',
643
- tablename: 't_files',
644
- condition: `id in (${this.ids})`,
645
- orderitem: 'id'
646
- }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
647
- for (let i = 0; i < res.data.length; i++) {
648
- for (let j = 0; j < this.model.serviceacitivity[0].imgs.length; j++) {
649
- if (res.data[i].id.toString() === this.model.serviceacitivity[0].imgs[j].imgid) {
650
- this.model.serviceacitivity[0].imgs[j] = Object.assign({}, res.data[i], this.model.serviceacitivity[0].imgs[j])
651
- }
652
- }
653
-
654
- }
655
- })
656
- },
657
-
658
- sortDetails(){
659
- for (let i = 0; i < this.details.length; i++) {
660
- if (this.details[i].details.length) {
661
- for (let j = 0; j < this.details[i].details.length; j++) {
662
- if (this.details[i].details[j].f_type === 'a') {
663
- this.doordetails = {details: this.details[i].details}
664
- break
665
- }
666
- if (this.details[i].details[j].f_type === 'b') {
667
- this.devicedetails = {details: this.details[i].details}
668
- break
669
- }
670
- if (this.details[i].details[j].f_type === 'c') {
671
- this.cookdetails = {details: this.details[i].details}
672
- break
673
- }
674
- }
675
- }
676
- }
677
- },
678
- // 复制数据
679
- back () {
680
- let _this = this
681
- if(this.issee){
682
- _this.$back()
683
- return
684
- }
685
- this.$showMessage('所填写内容将不可恢复!', ['confirm', 'cancel']).then((res) => {
686
- if (res === 'confirm') {
687
- this.closely()
688
- _this.$back()
689
- }
690
- })
691
- },
692
- confirm(){
693
- this.$dispatch('confirm')
694
- },
695
- tick() {
696
- this.timer = null
697
- this.data.f_offsite_time = Util.toStandardTimeString()
698
- this.timer = window.setTimeout(this.tick, 1000)
699
- },
700
- getRepairState() {
701
- let repaired = true
702
- this.data.f_defects.forEach((defect) => {
703
- repaired = repaired & (defect.f_ratification == '已处理')
704
- })
705
- return repaired
706
- },
707
- verifyRepairDefects() {
708
- this.data.f_repair_date = Util.toStandardTimeString()
709
- this.data.f_repaired = this.getRepairState() ? '已修' : '在修'
710
- },
711
- errorVerify() {
712
- let hasError = this.verifyState()
713
- if(hasError)
714
- return hasError
715
-
716
- if(this.data.f_entry_status != '入户' || this.data.f_usegas == '未用气')
717
- return null
718
- hasError = this.verifyUser()
719
- if(hasError)
720
- return hasError
721
- hasError = this.verifyDevices()
722
- if(hasError)
723
- return hasError
724
- hasError = this.verifyFeedback()
725
- if(hasError)
726
- return hasError
727
- },
728
- verifyState() {
729
- if(Vue.android && this.data.f_usegas == '未用气' && (this.data.f_nongasuser_path == Vue.nopic || this.data.f_nongasuser_path == ''))
730
- return '未使用天然气则必须拍照'
731
- if(Vue.android && this.data.f_entry_status == '到访不遇' && this.notencountered && (this.data.f_noanswer_path == Vue.nopic || this.data.f_noanswer_path == ''))
732
- return '到访不遇必须拍照'
733
- if(Vue.android && this.data.f_entry_status == '拒检' && this.refuseinspection && (this.data.f_rejectcheck_path == Vue.nopic || this.data.f_rejectcheck_path == ''))
734
- return '拒检必须拍照'
735
- },
736
- verifyUser() {
737
- let prefix = '用户基本信息:'
738
- if(Util.required(this.data.f_user_name))
739
- return prefix + '用户名必须输入'
740
- if (!this.data.f_user_phone){
741
- return '请输入正确的电话号码'
742
- }
743
- if(!(/^\d{11}$/.test(this.data.f_user_phone.trim()))) {
744
- return '请输入正确的电话号码'
745
- }
746
- // if(Util.required(this.data.f_residential_area))
747
- // return prefix + '小区名称必须输入'
748
- // if(Util.required(this.data.f_address))
749
- // return prefix + '地址必须输入'
750
- },
751
- verifyDevices() {
752
- for (let dev in this.config) {
753
- if (this.config[dev].checkmust == true) {
754
- let error = true
755
- for(let device in this.data) {
756
- if (device.startsWith("device")) {
757
- for (let item in this.data[device]) {
758
- if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
759
- error = false
760
- }
761
- }
762
- }
763
- }
764
- if (error) {
765
- return "请检查" + dev
766
- }
767
- }
768
- }
769
-
770
- for (let dev in this.config) {
771
- for(let device in this.data) {
772
- if (device.startsWith("device")) {
773
- for (let item in this.data[device]) {
774
- //检查每一条安检结果
775
- if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
776
- for (let i in this.data[device][item].f_items) {
777
- for (let it in this.config[dev].items) {
778
- if (it == this.data[device][item].f_items[i].f_item_name) {
779
- let check=false
780
- if (!this.data[device][item].f_items[i].f_item_value){
781
- check=true
782
- }else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)){
783
- if (this.data[device][item].f_items[i].f_item_value.length==0){
784
- check=true
785
- }
786
- }
787
-
788
- if(this.config[dev].items[it].type=='picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path){
789
- return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
790
- }
791
- if (this.config[dev].items[it].type !='picture' && this.config[dev].items[it].checkmust == true && check) {
792
- return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
793
- }
794
- }
795
- }
796
- //检查安检下拉结果
797
- if (this.data[device][item].f_items[i].type == 'selector' || this.data[device][item].f_items[i].type == 'radio') {
798
- if (this.data[device][item].f_items[i].f_is_defect == true && this.data[device][item].f_items[i].f_path == Vue.nopic) {
799
- return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + this.data[device][item].f_items[i].f_item_value + "选中必须拍照"
800
- }
801
- }
802
- }
803
- }
804
- }
805
- }
806
- }
807
- }
808
- },
809
- verifyFeedback() {
810
- let prefix = '拍照签名:'
811
- if(Vue.android && (!this.data.f_overall_imgs || this.data.f_overall_imgs.length < this.imgsnum) && this.data.f_entry_status == '入户')
812
- return prefix + `必须有${this.imgsnum}安检总体照片`
813
- /*if(Vue.android && (!this.data.f_sign_path || this.data.f_sign_path.length == 0) && this.data.f_entry_status == '入户')
814
- return prefix + '必须有用户签名'*/
815
- // if(Vue.android && this.data.f_defect_notified && this.data.f_notified_path == Vue.nopic)
816
- // return prefix + '下发安检通知书则必须给通知书拍照'
817
- if(Vue.android && this.data.f_blacklist && this.data.f_blocking_cause=='')
818
- return prefix + '请填写拉黑原因'
819
- if(!this.data.f_client_evaluation && this.data.f_entry_status == '入户')
820
- return prefix + '请选择服务评价'
821
- },
822
- getAllDefect() {
823
- let checkResults = {
824
- result: '正常',
825
- data: []
826
- }
827
- let value = ''
828
- let codata = JSON.parse(JSON.stringify(this.data))
829
- codata.f_devices = []
830
- this.f_devices = []
831
- for (let device in codata) {
832
- let f_device_type
833
- if (device.startsWith("device")) {
834
- let hasOther = ''
835
- let otherValue = null
836
- for (let item in codata[device]) {
837
- if(typeof codata[device][item]=='function'){
838
- continue
839
- }
840
- codata[device][item].f_create_time = Util.toStandardTimeString()
841
- if (codata[device].length > 1) {
842
- let j = Number.parseInt(item) + 1
843
- f_device_type = `${codata[device][item].f_device_type}${j}`
844
- } else {
845
- f_device_type = codata[device][item].f_device_type
846
- }
847
- if(item == 'sum' || item == 'removeEmpty'){
848
- continue
849
- }
850
- for (let i = 0; i < codata[device][item].f_items.length ; i++) {
851
- //tag
852
- if(i == 'sum' || i == 'removeEmpty'){
853
- continue
854
- }
855
- var items = codata[device][item].f_items[i]
856
- items.f_create_time = Util.toStandardTimeString()
857
- items.f_item_lists = []
858
- if (items.type == 'selector') {
859
- items.selected = []
860
- } else if (items.type == 'inputSelector') {
861
- items.selected = ''
862
- }
863
- //遍历配置项 将所选隐患项的配置信息放入保存的数据中
864
- let f_is_defect //是否是隐患
865
- let f_defect_level //是否是隐患
866
- let f_item_name = items.f_item_name
867
- let f_item_value
868
- if (items.type == 'selector' || items.type == 'checkbox' || items.type == 'radio') {
869
- for (let i in items.f_item_value) {
870
- if(typeof items.f_item_value[i]=='function'){
871
- continue
872
- }
873
- let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
874
- //tag)
875
- for (let k in configItems.options) {
876
- if(typeof configItems.options[k]=='function'){
877
- continue
878
- }
879
- //tag)
880
- if (items.f_item_value[i] === configItems.options[k].data) {
881
-
882
- f_is_defect = configItems.options[k].isdefect
883
- f_item_value = items.f_item_value[i]
884
- f_defect_level = configItems.options[k].level
885
- if (f_is_defect) {
886
- if (checkResults.result !== '有隐患') {
887
- checkResults.result = '有隐患'
888
- }
889
- console.log('items'+items)
890
- if(items.f_deal_dispose=='报修'){
891
- console.log("检测到需要转维修++++++++++++")
892
- this.repairDefect.result='未处理'
893
- this.repairDefect.data.push(`${f_item_name} : ${f_item_value}`)
894
- }
895
- if (!this.checkResult.hasOwnProperty(f_device_type+'-'+f_item_name)) {
896
- this.checkResult[f_device_type+'-'+f_item_name] = []
897
- }
898
- this.checkResult[f_device_type+'-'+f_item_name].push(f_item_value)
899
-
900
- }
901
-
902
- let items_list = {
903
- f_is_defect: f_is_defect,
904
- f_item_value: f_item_value,
905
- f_defect_level: f_defect_level,
906
- f_is_eliminate: null,
907
- f_create_time: Util.toStandardTimeString()
908
- }
909
- if (!items.f_item_lists) {
910
- items.f_item_lists = []
911
- if (JSON.stringify(items_list) !== '{}') {
912
- items.f_item_lists.push(items_list)
913
- }
914
- } else {
915
- if (JSON.stringify(items_list) !== '{}') {
916
- items.f_item_lists.push(items_list)
917
- }
918
- }
919
- }
920
- }
921
- }
922
- } else {
923
- let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
924
- f_is_defect = items.f_is_defect
925
- f_defect_level = items.level
926
- f_item_value = items.f_item_value
927
- let items_list = {
928
- f_is_defect: f_is_defect,
929
- f_item_value: f_item_value,
930
- f_defect_level: f_defect_level,
931
- f_create_time: Util.toStandardTimeString()
932
- }
933
- if (f_is_defect && f_item_value) {
934
- items.f_is_defect = true
935
- if (checkResults.result !== '有隐患') {
936
- checkResults.result = '有隐患'
937
- }
938
- if (!this.checkResult.hasOwnProperty(items.f_item_name)) {
939
- this.checkResult[items.f_item_name] = []
940
- }
941
-
942
- this.checkResult[items.f_item_name].push(f_item_value)
943
-
944
- }
945
- if (!items.f_item_lists) {
946
- items.f_item_lists = []
947
- if (JSON.stringify(items_list) != '{}') {
948
- items.f_item_lists.push(items_list)
949
- }
950
- } else {
951
- if (JSON.stringify(items_list) != '{}') {
952
- items.f_item_lists.push(items_list)
953
- }
954
- }
955
- }
956
- if (hasOther !== '' && otherValue !== null) {
957
- this.checkResult[hasOther].push(otherValue)
958
- hasOther = ''
959
- otherValue = null
960
- }
961
- items.f_item_value = ''
962
- }
963
- this.f_devices.push(codata[device][item])
964
- }
965
- }
966
- }
967
- if (this.checkResult) {
968
- for (let key in this.checkResult) {
969
- if(typeof this.checkResult[key]=='function'){
970
- continue
971
- }
972
- // 上次安检结果数据组织
973
- let temp = {}
974
- temp[key] = this.checkResult[key].join(',')
975
- checkResults.data.push(temp)
976
- }
977
- this.checkResult = {}
978
- }
979
- if (checkResults.data.length > 0) {
980
- let msg = ''
981
- for (let a = 0; a < checkResults.data.length; a++) {
982
- for (let datumKey in checkResults.data[a]) {
983
- msg += datumKey + ':' + checkResults.data[a][datumKey] + ';'
984
- }
985
- }
986
- this.data.f_defect_text = msg
987
- codata.f_defect_text = msg
988
- }
989
- codata.f_defect_content = JSON.stringify(checkResults)
990
- this.data.f_defect_content = JSON.stringify(checkResults)
991
- return codata
992
- },
993
- uploadCheckPaper(){
994
- this.saveNoclick()
995
- this.closely(false) // 保存本地,不删除录音文件停止录音
996
- let errString = this.errorVerify()
997
- if (errString) {
998
- if (Vue.android){
999
- this.$showMessage(errString)
1000
- }
1001
- return
1002
- } else {
1003
- this.$set('data.f_offsite_time', Util.toStandardTimeString())
1004
- this.$set('data.f_upload_time', Util.toStandardTimeString())
1005
- this.$set('data.f_upload_date', Util.toStandardTimeString())
1006
- this.data.f_complete = '已完成'
1007
- this.disableTimer()
1008
- }
1009
- this.onlySave = false
1010
- this.assemblyCodata()
1011
- if (this.repairDefect.result != '正常') {
1012
- return this.$showMessage('有隐患的处理方式为转维修,请点击转维修')
1013
- }
1014
- this.save()
1015
-
1016
- },
1017
- //将数据组装提出
1018
- assemblyCodata(){
1019
- let codata = this.getAllDefect()
1020
- console.log(`codata类型 开始组装codeta数据-->${typeof codata}`)
1021
- console.log(`codata内容-->${JSON.stringify(codata)}`)
1022
- for (let key in codata) {
1023
- if (key.startsWith("device")) {
1024
- console.log('this.data.' + key + JSON.stringify(codata[key]))
1025
- codata[key] = []
1026
- }
1027
- }
1028
- codata.f_devices = this.f_devices
1029
- this.rowCodata=codata
1030
- },
1031
- save(type) {
1032
- if (type == 'temp' || type == 'finish') {
1033
- this.assemblyCodata()
1034
- }
1035
- //禁用事件
1036
- this.saveNoclick()
1037
- if(type == 'temp'){
1038
- this.data.f_complete = '未完成'
1039
- this.rowCodata.f_complete = '未完成'
1040
- // 关闭录音方法
1041
- this.closely(true) //临时保存,删除录音文件并暂停录音
1042
- this.disableTimer()
1043
- }else {
1044
- // 关闭录音方法
1045
- this.closely(false) // 保存本地,不删除录音文件暂停录音
1046
- let errString = this.errorVerify()
1047
- if (errString) {
1048
- if (Vue.android){
1049
- this.$showMessage(errString)
1050
- }
1051
- return
1052
- } else {
1053
- this.data.f_complete = '已完成'
1054
- this.rowCodata.f_complete = '已完成'
1055
- this.$set('data.f_offsite_time', Util.toStandardTimeString())
1056
- this.$set('rowCodata.f_offsite_time', Util.toStandardTimeString())
1057
- this.disableTimer()
1058
- }
1059
- }
1060
- if(this.data.f_blacklist!='是'){
1061
- delete this.data.f_blocking_cause
1062
- }
1063
- if (this.data.f_entry_status == '入户') {
1064
- this.data.f_rejectchecks_path = []
1065
- this.data.f_rejectcheck_path = null
1066
- this.data.f_rejectcheck1_path = null
1067
- this.data.f_rejectcheck2_path = null
1068
- this.data.f_noanswers_path=[]
1069
- this.data.f_noanswer_path = null
1070
- this.data.f_noanswer1_path = null
1071
- this.data.f_noanswer2_path = null
1072
- }else if (this.data.f_entry_status == '到访不遇') {
1073
- this.data.f_rejectchecks_path = []
1074
- this.data.f_rejectcheck_path = null
1075
- this.data.f_rejectcheck1_path = null
1076
- this.data.f_rejectcheck2_path = null
1077
- }else if (this.data.f_entry_status == '拒检') {
1078
- this.data.f_noanswers_path=[]
1079
- this.data.f_noanswer_path = null
1080
- this.data.f_noanswer1_path = null
1081
- this.data.f_noanswer2_path = null
1082
- }
1083
- let codata = this.rowCodata
1084
- for (let key in codata) {
1085
- if (key.startsWith("device")) {
1086
- codata[key] = []
1087
- }
1088
- }
1089
- codata.f_complete = this.data.f_complete
1090
- if (Vue.android) {
1091
- let value = this.$androidUtil.path({
1092
- alias: 'getUserinfomation',
1093
- data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
1094
- })
1095
- if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && this.item.f_no_checkplan != '打回') {
1096
- codata.f_devices = this.f_devices
1097
- if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1098
- this.rowCodata = Object.assign({},this.rowCodata,codata)
1099
- } else {
1100
- this.rowCodata = codata
1101
- }
1102
- this.rowCodata.f_tablebase = this.data.f_new_tablebase
1103
- let param = {
1104
- f_check_item_id: this.data.f_check_item_id,
1105
- f_checker_id: this.data.f_checker_id,
1106
- f_upload_state: '未传',
1107
- row: this.rowCodata
1108
- }
1109
- let paramStr = JSON.stringify(param)
1110
- // 多长截断一次
1111
- let subLength = 800
1112
- for (let i = 0; i < paramStr.length; i += subLength) {
1113
- HostApp.param_cache(paramStr.slice(i, i + subLength))
1114
- }
1115
- HostApp.__this__ = this
1116
- HostApp.syncLogic({
1117
- // logic别名,key必须为logic
1118
- 'logic': 'SafeSaveNoPaper',
1119
- // 回调执行方法名,key必须为callback
1120
- 'callback': 'javascript:HostApp.__this__.saveCallBack()',
1121
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1122
- // 执行回调方法传入key为backresult
1123
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1124
- 'backresult': 1
1125
- })
1126
- } else {
1127
- codata.f_devices = this.f_devices
1128
- if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1129
- this.rowCodata = Object.assign({},this.rowCodata,codata)
1130
- } else {
1131
- this.rowCodata = codata
1132
- }
1133
- this.rowCodata.f_tablebase = this.data.f_new_tablebase
1134
- let param = {
1135
- f_check_item_id: this.data.f_check_item_id,
1136
- f_checker_id: this.data.f_checker_id,
1137
- row: this.rowCodata
1138
- }
1139
- let paramStr = JSON.stringify(param)
1140
- // 多长截断一次
1141
- let subLength = 800
1142
- for (let i = 0; i < paramStr.length; i += subLength) {
1143
- HostApp.param_cache(paramStr.slice(i, i + subLength))
1144
- }
1145
- HostApp.__this__ = this
1146
- HostApp.syncLogic({
1147
- // logic别名,key必须为logic
1148
- 'logic': '保存安检单信息',
1149
- // 回调执行方法名,key必须为callback
1150
- 'callback': 'javascript:HostApp.__this__.saveCallBack()',
1151
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1152
- // 执行回调方法传入key为backresult
1153
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1154
- 'backresult': 1
1155
- })
1156
- }
1157
-
1158
- } else {
1159
- let value = this.$androidUtil.path({
1160
- alias: 'getUserinfomation',
1161
- data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
1162
- })
1163
- if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1164
- this.rowCodata = Object.assign({},this.rowCodata,codata)
1165
- } else {
1166
- this.rowCodata = codata
1167
- }
1168
- if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && value.data.length == 0 && this.item.f_no_checkplan != '打回') {
1169
- this.$androidUtil.bzLogic('SafeSaveNoPaper', {
1170
- f_check_item_id: this.data.f_check_item_id,
1171
- f_checker_id: this.data.f_checker_id,
1172
- f_upload_state: '未传',
1173
- row: this.rowCodata
1174
- }).then((res) => {
1175
- if (res.data.code == 200) {
1176
- //保存devices
1177
- this.$androidUtil.bzLogic('getPaperInfo', {
1178
- f_check_item_id: this.data.f_check_item_id
1179
- }).then((res) => {
1180
- if (res.data.code == 200) {
1181
- let f_paper_id = res.data.data[0].id
1182
- for (let device of this.f_devices) {
1183
- device.f_paper_id = f_paper_id
1184
- this.$androidUtil.bzLogic('saveDevice', {
1185
- row: device
1186
- }).then((ret) => {
1187
- if (ret.code != 200) {
1188
- //TODO 失败后处理
1189
- this.$showMessage("保存失败!")
1190
- return false
1191
- }
1192
- })
1193
- }
1194
- }
1195
- })
1196
- this.$showMessage('保存成功!')
1197
- return true
1198
- } else {
1199
- this.$showMessage("保存失败!")
1200
- return false
1201
- }
1202
- })
1203
- }
1204
- else {
1205
- this.$androidUtil.bzLogic('保存安检单信息', {
1206
- f_check_item_id: this.data.f_check_item_id,
1207
- f_checker_id: this.data.f_checker_id,
1208
- row: this.rowCodata
1209
- }).then((res) => {
1210
- if (res.data.code == 200) {
1211
- //保存devices
1212
- this.$androidUtil.bzLogic('getPaperInfo', {
1213
- f_check_item_id: this.data.f_check_item_id
1214
- }).then((res) => {
1215
- if (res.data.code == 200) {
1216
-
1217
- let f_paper_id = res.data.data[0].id
1218
- for (let device of this.f_devices) {
1219
- device.f_paper_id = f_paper_id
1220
- this.$androidUtil.bzLogic('saveDevice', {
1221
- row: device
1222
- }).then((ret) => {
1223
- if (ret.code != 200) {
1224
- //TODO 失败后处理
1225
- this.$showMessage("保存失败!")
1226
- return false
1227
- }
1228
- })
1229
- }
1230
- }
1231
- })
1232
- this.$showMessage('保存成功!')
1233
- return true
1234
- } else {
1235
- this.$showMessage("保存失败!")
1236
- return false
1237
- }
1238
- })
1239
- }
1240
- }
1241
- },
1242
- runSyncLogic(logic,callback,backresult){
1243
- HostApp.runSyncLogic({
1244
- // logic别名,key必须为logic
1245
- 'logic': logic,
1246
- // 回调执行方法名,key必须为callback
1247
- 'callback': callback,
1248
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1249
- // 执行回调方法传入key为backresult
1250
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1251
- 'backresult':backresult
1252
- })
1253
- },
1254
- logicWithHint(logic,data,callback,backresult){
1255
- HostApp.logicWithHint({
1256
- // logic别名,key必须为logic
1257
- 'logic': logic,
1258
- // 回调执行方法名,key必须为callback
1259
- 'callback': callback,
1260
- // logic执行需要的业务参数
1261
- 'data': data,
1262
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1263
- // 执行回调方法传入key为backresult
1264
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1265
- 'backresult':backresult
1266
- })
1267
- },
1268
- saveCallBack(jo){
1269
- if(jo.state == 'ok'){
1270
- let res = JSON.parse(jo.result)
1271
- if(res.code == 200){
1272
- if(!this.onlySave){
1273
- let codata = this.getAllDefect()
1274
- //获取微信推送内容
1275
- // let WxResult = this.getWeixin(codata)
1276
- let haslivedispose = this.$androidUtil.bzLogic('getLiveDispose', {
1277
- f_check_item_id: this.data.f_check_item_id
1278
- })
1279
- //如果是转维修上传,则不做校验,上传完成后自动转维修
1280
- if(!this.isToRepair){
1281
- if(haslivedispose.data.length > 0 && (this.livedispose == 'true' || this.livedispose == true)){
1282
- if(!this.isSafeCheckToRepair){
1283
-
1284
- }
1285
- }
1286
- }
1287
- for (let key in codata){
1288
- if(key.startsWith("device")){
1289
- codata[key] = []
1290
- }
1291
- }
1292
- codata.f_devices = this.f_devices
1293
- if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1294
- this.rowCodata = Object.assign({},this.rowCodata,codata)
1295
- } else {
1296
- this.rowCodata = codata
1297
- }
1298
- this.rowCodata.f_tablebase = null
1299
- let param = {
1300
- f_check_item_id: this.data.f_check_item_id,
1301
- f_checker_id: this.data.f_checker_id,
1302
- row: this.rowCodata
1303
- }
1304
- let paramStr = JSON.stringify(param)
1305
- // 多长截断一次
1306
- let subLength = 800
1307
- for (let i = 0; i < paramStr.length; i += subLength) {
1308
- HostApp.param_cache(paramStr.slice(i, i + subLength))
1309
- }
1310
- HostApp.__this__ = this
1311
- HostApp.syncLogic({
1312
- // logic别名,key必须为logic
1313
- 'logic': '上传安检信息',
1314
- // 回调执行方法名,key必须为callback
1315
- 'callback': 'javascript:HostApp.__this__.uploadCallBack()',
1316
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1317
- // 执行回调方法传入key为backresult
1318
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1319
- 'backresult': 1
1320
- })
1321
- }else{
1322
- this.$showMessage('保存成功!')
1323
- if(this.clickBack){
1324
- this.isStrat = false
1325
- this.$dispatch('confirm')
1326
- }
1327
- }
1328
- }else{
1329
- this.$showMessage('保存失败!')
1330
- return
1331
- }
1332
- }else{
1333
- this.$showMessage('服务器内部错误,保存失败!')
1334
- return
1335
- }
1336
- },
1337
- uploadCallBack(jo){
1338
- //获取微信推送路径
1339
- let url = ""
1340
- if(Vue.config.safecheck != undefined) {
1341
- if (Vue.config.safecheck.ApproveConfig != undefined) {
1342
- if (Vue.config.safecheck.ApproveConfig.weixinurl != undefined) {
1343
- url = Vue.config.safecheck.ApproveConfig.weixinurl
1344
- }
1345
- }
1346
- }
1347
- if(jo.state == 'ok'){
1348
- let res = JSON.parse(jo.result)
1349
- if(res.code == 200){
1350
- this.$set('data.f_paper_id', res.id)
1351
- this.isStrat=false
1352
- if(url != ""){
1353
- this.$resetpost(`${url}`,{data:WxResult})
1354
- }
1355
- // 预约安检回更预约安检单
1356
- if(this.data.isupdateplanitem == 'true' && this.data.f_SafeToRepair_id){
1357
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/ReturnSafeService`, {data:{
1358
- f_paper_id:this.data.f_paper_id,
1359
- f_service_id:this.data.f_SafeToRepair_id
1360
- }
1361
- }).then((ret) => {
1362
- if(ret.data && ret.data.code == 200){
1363
- console.log('预约安检回更成功')
1364
- }
1365
- })
1366
- }
1367
- if(this.isToRepair){
1368
- for (let device in this.data){
1369
- if(device.startsWith("device")){
1370
- this.data[device] = []
1371
- if(res.data.length > 0){
1372
- for(let i in res.data[0].f_devices){
1373
- if(this.data[device].length > 0){
1374
- if(this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type){
1375
- this.data[device].push(res.data[0].f_devices[i])
1376
- res.data[0].f_devices.splice(i,1)
1377
- }
1378
- }else{
1379
- this.data[device].push(res.data[0].f_devices[i])
1380
- res.data[0].f_devices.splice(i,1)
1381
- }
1382
- }
1383
- }
1384
- }
1385
- }
1386
- this.todo()
1387
- }else{
1388
- this.$showMessage('安检上传成功!')
1389
- if (this.data.f_userinfoid){
1390
- let http = new HttpResetClass()
1391
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/tel_singleTable_OrderBy`, {
1392
- data: {
1393
- items: 'count(0) as num',
1394
- tablename: 't_userfiles a left join t_userinfo b on a.f_userinfo_id = b.f_userinfo_id',
1395
- condition: `a.f_userinfo_id = '${this.item.f_userinfoid}' and a.f_meter_classify != '物联网表' and a.f_table_state = '正常' and b.f_user_state='正常'`,
1396
- orderitem: '1'
1397
- }
1398
- }, {resolveMsg: null, rejectMsg: null}).then((response) => {
1399
- if (response.data[0].num > 0 ){
1400
- let _this = this
1401
- this.$showMessage(`是否前往抄表`, ['confirm', 'cancel']).then((res) => {
1402
- if (res === 'confirm') {
1403
- let http = new HttpResetClass()
1404
- http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-readmeter/sql/PcHandInfo`, {data:{
1405
- sort: `asc`,
1406
- condition:`f_userinfo_id = '${_this.data.f_userinfoid}'`
1407
- }
1408
- }, {resolveMsg: null, rejectMsg: null}).then((res) => {
1409
- let param = {}
1410
- param = res.data[0]
1411
- param.f_new_tablebase = _this.data.f_new_tablebase
1412
- param.tabname="在线抄表"
1413
- var pardate = {
1414
- _this:this,
1415
- tittle:'抄表单信息',
1416
- safe:false
1417
- }
1418
- this.$dispatch('gotoson',pardate)
1419
- this.$goto('phone-hand-edit', {data:param,source:'抄表',type:'save'}, 'self', function (){
1420
- _this.$dispatch('confirm')
1421
- }
1422
- )
1423
- })
1424
- }else {
1425
- this.$dispatch('tijiao')
1426
- }
1427
- })
1428
- }else {
1429
- this.$dispatch('tijiao')
1430
- }
1431
- })
1432
- }else{
1433
- this.$dispatch('tijiao')
1434
- }
1435
- }
1436
- }else if(res.code == 309){
1437
- this.$showMessage('该安检单已作废!')
1438
- this.$dispatch('confirm')
1439
- }else if(res.code == 710){
1440
- this.$showMessage('上传照片失败,请检查网络是否正常!'+res.msg)
1441
- this.onlySave = true
1442
- return
1443
- }else if(res.code == 711){
1444
- this.$showMessage('该安检单已被管理员调整,请联系管理员!')
1445
- this.onlySave = true
1446
- return
1447
- }else if(res.code == 712){
1448
- this.$showMessage('网络异常,请缓存后重新尝试上传,多次上传失败请联系管理员!')
1449
- this.onlySave = true
1450
- return
1451
- }
1452
- else{
1453
- this.$showMessage('上传失败!')
1454
- }
1455
- }else {
1456
- this.$showMessage('网络异常,上传失败!')
1457
- }
1458
- this.onlySave = true
1459
- },
1460
- safecheckToRepairCallBack(jo){
1461
- //获取微信推送路径
1462
- if(jo.state == 'ok'){
1463
- let res = JSON.parse(jo.result)
1464
- if(res.code == 200){
1465
- if(res.data.code == 200){
1466
- this.$showMessage('上传并转维修成功!')
1467
- }else{
1468
- this.$showMessage('上传并转维修成功,回写安检单失败!')
1469
- }
1470
- this.$dispatch('confirm')
1471
- }else{
1472
- this.$showMessage('上传失败!')
1473
- this.onlySave = true
1474
- }
1475
- }else{
1476
- this.$showMessage('网络异常,上传失败!')
1477
- this.onlySave = true
1478
- }
1479
- },
1480
- todo(){
1481
- let gen = getRepairParam(this)
1482
- co(gen)
1483
- },
1484
- undo(){
1485
- this.showCheckToRepair = !this.showCheckToRepair
1486
- this.model.serviceacitivity[0].f_reciever = ''
1487
- this.model.serviceacitivity[0].f_meetunit = ''
1488
- this.model.f_repairtype = ''
1489
- this.meading = '转站点'
1490
- },
1491
- disableTimer() {
1492
- if(this.timer) {
1493
- window.clearTimeout(this.timer)
1494
- this.timer = null
1495
- }
1496
- },
1497
- loaded(paper) {
1498
- if(!paper.hasOwnProperty('id')) {
1499
- this.$showMessage("该安检单在手机上已经不存在,可能是卸载过程序。可以进入重新安检,或返回安检计划。")
1500
- this.init()
1501
- } else {
1502
- Util.booleanFilter(paper)
1503
- HostApp.__this__.$set('data', paper)
1504
- HostApp.__this__.$goto('safecheck-userinfo', {}, 'paper-router')
1505
- // 如果打回重检则重新计时
1506
- if(HostApp.__this__.role == 'inspect'
1507
- && HostApp.__this__.data.f_approved
1508
- && HostApp.__this__.data.f_approved == '打回') {
1509
- HostApp.__this__.data.f_onsite_time = Util.toStandardTimeString()
1510
- HostApp.__this__.tick()
1511
- }
1512
- }
1513
- HostApp.__callback__ = null
1514
- HostApp.__this__ = null
1515
- },
1516
- S4() {
1517
- return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
1518
- },
1519
- extend(initalObj, finalObj) {
1520
- var obj = finalObj || {};
1521
- for (var i in initalObj) {
1522
- var prop = initalObj[i];
1523
-
1524
- // 避免相互引用对象导致死循环,如initalObj.a = initalObj的情况
1525
- if (prop === obj) {
1526
- continue;
1527
- }
1528
-
1529
- if (typeof prop === 'object') {
1530
- if (obj[i]) {
1531
- this.extend(obj[i], prop)
1532
- } else {
1533
- obj[i] = prop;
1534
- }
1535
- }
1536
- }
1537
- return obj;
1538
- },
1539
- putDevices() {
1540
- this.$set('data.approve', "true")
1541
- this.$set('data.writeback', "false")
1542
- if (Vue.config.safecheck != undefined) {
1543
- if (Vue.config.safecheck.ApproveConfig != undefined) {
1544
- if (Vue.config.safecheck.ApproveConfig.approve != undefined) {
1545
- this.$set('data.approve', Vue.config.safecheck.ApproveConfig.approve)
1546
- }
1547
- if (Vue.config.safecheck.ApproveConfig.writeback != undefined) {
1548
- this.$set('data.writeback', Vue.config.safecheck.ApproveConfig.writeback)
1549
- }
1550
- if (Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
1551
- this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
1552
- }
1553
- if (Vue.config.safecheck.ApproveConfig.showtorepair) {
1554
- this.show_torepair = Vue.config.safecheck.ApproveConfig.showtorepair
1555
- }
1556
- if (Vue.config.safecheck.ApproveConfig.notencountered != undefined){
1557
- this.notencountered = Vue.config.safecheck.ApproveConfig.notencountered
1558
- }
1559
- if (Vue.config.safecheck.ApproveConfig.refuseinspection != undefined){
1560
- this.refuseinspection = Vue.config.safecheck.ApproveConfig.refuseinspection
1561
- }
1562
- }
1563
- if(this.item.f_user_type == '非民用'){
1564
- // 非民用
1565
- if (Vue.config.safecheck.DevicesSetConfig != undefined){
1566
- if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
1567
- this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
1568
- }else{
1569
- this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type]])
1570
- }
1571
- }
1572
-
1573
- }else{
1574
- // 民用户
1575
- if (Vue.config.safecheck.DevicesConfig != undefined){
1576
- if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
1577
- this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
1578
- }else{
1579
- this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type?this.item.f_user_type:'民用']])
1580
- }
1581
- }
1582
- }
1583
-
1584
- }
1585
- // 预留设备项位置
1586
- for (let i in this.config) {
1587
- this.tabs.splice(1,0,null)
1588
- }
1589
- //遍历安检项配置
1590
- for (let i in this.config) {
1591
- //取得安检项索引值
1592
- let n = this.config[i].index
1593
- this.devices[n - 1] = {device: i, n: n, checkmust: this.config[i].checkmust}
1594
- this.$set('data.' + 'device' + n, [])
1595
- this.tabs[n] = {
1596
- header: i,
1597
- complete: 'safecheck-devices',
1598
- class: 'repair-details-class',
1599
- number: n
1600
- }
1601
-
1602
- if(this.config[i].quantity && this.config[i].quantity >0){
1603
- let items = []
1604
- for (let it in this.config[i].items) {
1605
- //赋值下拉选项
1606
- if (this.config[i].items[it].type == 'selector') {
1607
- for (let op in this.config[i].items[it].options) {
1608
- if (this.config[i].items[it].options[op].isdefault == true) {
1609
- items.push({
1610
- f_defect_level: this.config[i].items[it].options[op].level,
1611
- f_is_defect: this.config[i].items[it].options[op].isdefect,
1612
- f_item_name: it,
1613
- f_item_value: this.config[i].items[it].options[op].data,
1614
- f_path: "",
1615
- type: "selector"
1616
- })
1617
- }
1618
- }
1619
- }
1620
- }
1621
- for(let q =0;q<this.config[i].quantity;q++) {
1622
- this.data['device' + n].push(
1623
- {f_device_type: i, f_items:items}
1624
- )
1625
- }
1626
- }
1627
- n = n + 1
1628
- }
1629
- this.faultshow.number = this.tabs.length
1630
- },
1631
- init () {
1632
- // 无计划安检是否回更待办计划
1633
- this.data.isupdateplanitem = this.$appdata.getSingleValue('在线安检回更有计划') ? this.$appdata.getSingleValue('在线安检回更有计划') : 'false'
1634
- // 预约安检单工单编号
1635
- this.data.f_SafeToRepair_id = this.item.f_service_id
1636
- this.data.ename = Vue.user.ename
1637
- this.data.f_outlets = Vue.user.f_parentname
1638
- this.data.f_meetunit = Vue.user.orgpathnames
1639
- this.data.orgpathstr = Vue.user.orgpathstr
1640
- this.data.f_check_item_id = this.item.id
1641
- this.data.f_check_plan_id = this.f_plan_id
1642
- this.data.f_checker_id = Vue.user.id
1643
- this.data.f_checker_name = Vue.user.name
1644
- this.data.f_check_type = this.item.f_user_type
1645
- this.data.f_safecheck_type = this.item.f_safecheck_type
1646
- this.data.f_subcompany = this.item.f_subcompany
1647
- this.data.f_approved = this.item.f_approvedf_read_instructions
1648
- this.data.f_repair_approved = this.item.f_repair_approved
1649
- this.data.f_no_checkplan = this.item.f_no_checkplan
1650
- this.data.f_approved = this.item.f_approved
1651
- this.data.f_filialeid = this.item.f_filialeid || Vue.user.orgid
1652
- this.data.f_orgstr = this.item.f_orgstr
1653
- this.data.version = this.item.version
1654
- this.data.f_check_version=this.item.f_check_version
1655
- this.$set('data.f_meters', this.item.f_plan_meters)
1656
- this.$set('data.f_userinfo_code', this.item.f_userinfo_code)
1657
- // 安检状态
1658
- this.$set('data.f_entry_status', '入户')
1659
- this.$set('data.f_safe_type', '年度安检')
1660
- this.$set('data.f_usegas', '已使用')
1661
- this.$set('data.f_state',this.item.f_state)
1662
- this.$set('data.f_source', this.source?this.source:'安检')
1663
- this.$set('data.f_other_checker_name', '')
1664
- // this.$set('data.f_defect_notified', true)
1665
- // 用户信息
1666
- this.$set('data.f_user_name', this.item.f_user_name)
1667
- this.$set('data.f_rent_phone', this.item.f_rent_phone)
1668
- this.$set('data.f_user_phone', this.item.f_user_phone || this.item.f_plan_meters[0].f_user_phone)
1669
- this.$set('data.f_userinfoid', this.item.f_userinfoid)
1670
- this.$set('data.f_address', this.item.f_address)
1671
- this.$set('data.f_card_id', this.item.f_card_id)
1672
- this.$set('data.f_slice_area', this.item.f_slice_area)
1673
- this.$set('data.f_recheck_id', this.item.id)
1674
- this.$set('rowCodata.f_recheck_id', this.item.id)
1675
- this.$set('data.f_street', this.item.f_street)
1676
- this.$set('data.f_room', this.item.f_room)
1677
- this.$set('data.f_building', this.item.f_building)
1678
- this.$set('data.f_unit', this.item.f_unit)
1679
- this.$set('data.f_floor', this.item.f_floor)
1680
- this.$set('data.f_residential_area' , this.item.f_residential_area)
1681
- this.$set('data.f_idnumber', this.item.f_idnumber)
1682
- this.$set('data.f_comments', this.item.f_comments)
1683
- this.$set('data.f_userproperties', this.item.f_userproperties)
1684
- this.$set('data.f_client_evaluation', '满意')
1685
- this.$set('data.f_userfiles_id', this.item.f_plan_meters[0].f_userfiles_id)
1686
- this.$set('data.f_valve_state', this.item.f_plan_meters[0].f_valve_state)
1687
- this.$set('data.f_off_valve_reason', this.item.f_plan_meters[0].f_off_valve_reason)
1688
- // 处置方式
1689
- this.$set('data.f_gas_guidelines', true)
1690
- this.$set('data.f_safety_warning', true)
1691
- this.$set('data.f_gas_manual', true)
1692
- this.$set('data.f_no_gas_device', false)
1693
- this.$set('data.f_close_valve', false)
1694
- this.$set('data.f_unload_battery', false)
1695
- if (this.data.f_check_item_id == '' && this.item.f_no_checkplan == '无计划安检' ) {
1696
- this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
1697
- }
1698
- if(this.item.f_no_checkplan == '复检'){
1699
- this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
1700
- }
1701
- if(this.item.f_plan_meters) {
1702
- for (let de in this.devices) {
1703
- if(typeof this.devices[de]=='function'){
1704
- continue
1705
- }
1706
- this.$set('data.device' + this.devices[de].n, [])
1707
- for (let i = 0; i < this.item.f_plan_meters.length; i++) {
1708
- if (this.item.f_plan_meters[i].f_meter_type) {
1709
- this.data.f_meter_type=this.item.f_plan_meters[i].f_meter_type
1710
- //tag)
1711
- if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') >= 0) {
1712
- this.data['device' + this.devices[de].n].push({
1713
- f_device_type: "燃气表",
1714
- f_items: [
1715
- {
1716
- f_defect_level: null,
1717
- f_device_id: "",
1718
- f_is_defect: "",
1719
- f_item_name: "基表编号",
1720
- f_item_value: this.item.f_plan_meters[i].f_meter_no,
1721
- f_path: "",
1722
- type: "number"
1723
- },
1724
- {
1725
- f_defect_level: null,
1726
- f_device_id: "",
1727
- f_is_defect: "",
1728
- f_item_name: "气表型号",
1729
- f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
1730
- f_path: "",
1731
- type: "string"
1732
- },
1733
- {
1734
- f_defect_level: null,
1735
- f_device_id: "",
1736
- f_is_defect: "",
1737
- f_item_name: "气表品牌",
1738
- f_item_value: this.item.f_plan_meters[i].f_aliasname,
1739
- f_path: "",
1740
- type: "string"
1741
- },
1742
- {
1743
- f_defect_level: null,
1744
- f_device_id: "",
1745
- f_is_defect: "",
1746
- f_item_name: "表向",
1747
- f_item_value: this.item.f_plan_meters[i].f_flow_direction,
1748
- f_path: "",
1749
- type: "string"
1750
- },
1751
- {
1752
- f_defect_level: null,
1753
- f_device_id: "",
1754
- f_is_defect: "",
1755
- f_item_name: "上期表读数",
1756
- f_item_value: this.item.f_plan_meters[i].f_prior_reading,
1757
- f_path: "",
1758
- type: "number"
1759
- },
1760
- {
1761
- f_defect_level: null,
1762
- f_device_id: "",
1763
- f_is_defect: "",
1764
- f_item_name: "表封号",
1765
- f_item_value: this.item.f_plan_meters[i].f_metertitles,
1766
- f_path: "",
1767
- type: "string"
1768
- }
1769
- ]
1770
- })
1771
- }
1772
- else if (this.devices[de].device == "燃气表") {
1773
- this.data['device' + this.devices[de].n].push({
1774
- f_device_type: "燃气表",
1775
- f_items: [
1776
- {
1777
- f_defect_level: null,
1778
- f_device_id: "",
1779
- f_is_defect: "",
1780
- f_item_name: "基表编号",
1781
- f_item_value: this.item.f_plan_meters[i].f_meter_no,
1782
- f_path: "",
1783
- type: "number"
1784
- },
1785
- {
1786
- f_defect_level: null,
1787
- f_device_id: "",
1788
- f_is_defect: "",
1789
- f_item_name: "气表型号",
1790
- f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
1791
- f_path: "",
1792
- type: "string"
1793
- },
1794
- {
1795
- f_defect_level: null,
1796
- f_device_id: "",
1797
- f_is_defect: "",
1798
- f_item_name: "气表品牌",
1799
- f_item_value: this.item.f_plan_meters[i].f_aliasname,
1800
- f_path: "",
1801
- type: "string"
1802
- },
1803
- {
1804
- f_defect_level: null,
1805
- f_device_id: "",
1806
- f_is_defect: "",
1807
- f_item_name: "表向",
1808
- f_item_value: this.item.f_plan_meters[i].f_flow_direction,
1809
- f_path: "",
1810
- type: "string"
1811
- },
1812
- {
1813
- f_defect_level: null,
1814
- f_device_id: "",
1815
- f_is_defect: "",
1816
- f_item_name: "上期表读数",
1817
- f_item_value: this.item.f_plan_meters[i].f_prior_reading,
1818
- f_path: "",
1819
- type: "number"
1820
- },
1821
- {
1822
- f_defect_level: null,
1823
- f_device_id: "",
1824
- f_is_defect: "",
1825
- f_item_name: "表封号",
1826
- f_item_value: this.item.f_plan_meters[i].f_metertitles,
1827
- f_path: "",
1828
- type: "string"
1829
- }
1830
- ]
1831
- })
1832
- }
1833
- if(this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('物联网表') >= 0){
1834
- this.data['device' + this.devices[de].n].forEach(device => {
1835
- if (!this.data.f_collection_type) {
1836
- this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
1837
- delete this.config['燃气表']['items']['累购气量']
1838
- delete this.config['燃气表']['items']['已用金额']
1839
- delete this.config['燃气表']['items']['剩余气量']
1840
- delete this.config['燃气表']['items']['气量异常差值']
1841
- delete this.config['燃气表']['items']['金额异常差值']
1842
- device.f_items.push(
1843
- {
1844
- f_defect_level: null,
1845
- f_device_id: "",
1846
- f_is_defect: "",
1847
- f_item_name: "初始表底",
1848
- isshow: true,
1849
- f_item_value: this.item.f_plan_meters[i].f_initial_base,
1850
- f_path: "",
1851
- type: "number"
1852
- },
1853
- {
1854
- f_defect_level: null,
1855
- f_device_id: "",
1856
- f_is_defect: "",
1857
- f_item_name: "累购金额",
1858
- f_item_value: this.item.f_plan_meters[i].f_total_fee,
1859
- f_path: "",
1860
- type: "number"
1861
- },
1862
- {
1863
- f_defect_level: null,
1864
- f_device_id: "",
1865
- f_is_defect: "",
1866
- f_item_name: "已用气量",
1867
- f_item_value: this.item.f_plan_meters[i].f_meter_base,
1868
- f_path: "",
1869
- type: "number"
1870
- },
1871
- {
1872
- f_defect_level: null,
1873
- f_device_id: "",
1874
- f_is_defect: "",
1875
- f_item_name: "剩余金额",
1876
- f_item_value: '',
1877
- f_path: "",
1878
- type: "number"
1879
- },
1880
- {
1881
- f_defect_level: null,
1882
- f_device_id: "",
1883
- f_is_defect: "",
1884
- f_item_name: "系统余额",
1885
- f_item_value: this.item.f_plan_meters[i].f_balance_amount,
1886
- f_path: "",
1887
- type: "number"
1888
- }
1889
- )
1890
- }
1891
- })
1892
- } else if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_collection_type) {
1893
- this.data['device' + this.devices[de].n].forEach(device => {
1894
- /*
1895
- "累购气量":{"index":8,"type":"number","readonly":true},
1896
- "累购金额":{"index":8,"type":"number","readonly":true},
1897
- "字轮读数":{"index":9,"type":"number","checkmust": true},
1898
- "已用金额":{"index":9,"type":"number","checkmust": true},
1899
- "剩余气量":{"index":10,"type":"number","checkmust": true},
1900
- "剩余金额":{"index":10,"type":"number","checkmust": true},
1901
- "气量异常差值":{"index":11,"type":"number","readonly": true},
1902
- "金额异常差值":{"index":11,"type":"number","readonly": true}
1903
- */
1904
- if (this.item.f_plan_meters[i].f_collection_type == '按金额') {
1905
- if (!this.data.f_collection_type) {
1906
- this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
1907
- delete this.config['燃气表']['items']['累购气量']
1908
- delete this.config['燃气表']['items']['已用气量']
1909
- delete this.config['燃气表']['items']['剩余气量']
1910
- delete this.config['燃气表']['items']['气量异常差值']
1911
- delete this.config['燃气表']['items']['系统余额']
1912
- device.f_items.push(
1913
- {
1914
- f_defect_level: null,
1915
- f_device_id: "",
1916
- f_is_defect: "",
1917
- f_item_name: "初始表底",
1918
- isshow: false,
1919
- f_item_value: '',
1920
- f_path: "",
1921
- type: "number"
1922
- },
1923
- {
1924
- f_defect_level: null,
1925
- f_device_id: "",
1926
- f_is_defect: "",
1927
- f_item_name: "累购金额",
1928
- f_item_value: this.item.f_plan_meters[i].f_total_fee,
1929
- f_path: "",
1930
- type: "number"
1931
- },
1932
- {
1933
- f_defect_level: null,
1934
- f_device_id: "",
1935
- f_is_defect: "",
1936
- f_item_name: "已用金额",
1937
- f_item_value: null,
1938
- f_path: "",
1939
- type: "number"
1940
- },
1941
- {
1942
- f_defect_level: null,
1943
- f_device_id: "",
1944
- f_is_defect: "",
1945
- f_item_name: "剩余金额",
1946
- f_item_value: null,
1947
- f_path: "",
1948
- type: "number"
1949
- },
1950
- {
1951
- f_defect_level: null,
1952
- f_device_id: "",
1953
- f_is_defect: "",
1954
- f_item_name: "金额异常差值",
1955
- f_item_value: null,
1956
- f_path: "",
1957
- type: "number"
1958
- }
1959
- )
1960
- }
1961
- } else
1962
- if (this.item.f_plan_meters[i].f_collection_type == '按气量') {
1963
- if (!this.data.f_collection_type) {
1964
- this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
1965
- delete this.config['燃气表']['items']['累购金额']
1966
- delete this.config['燃气表']['items']['已用金额']
1967
- delete this.config['燃气表']['items']['剩余金额']
1968
- delete this.config['燃气表']['items']['金额异常差值']
1969
- delete this.config['燃气表']['items']['系统余额']
1970
- device.f_items.push(
1971
- {
1972
- f_defect_level: null,
1973
- f_device_id: "",
1974
- f_is_defect: "",
1975
- f_item_name: "初始表底",
1976
- isshow: true,
1977
- f_item_value: this.item.f_plan_meters[i].f_initial_base,
1978
- f_path: "",
1979
- type: "number"
1980
- },
1981
- {
1982
- f_defect_level: null,
1983
- f_device_id: "",
1984
- f_is_defect: "",
1985
- f_item_name: "累购气量",
1986
- f_item_value: this.item.f_plan_meters[i].f_total_gas,
1987
- f_path: "",
1988
- type: "number"
1989
- },
1990
- {
1991
- f_defect_level: null,
1992
- f_device_id: "",
1993
- f_is_defect: "",
1994
- f_item_name: "已用气量",
1995
- f_item_value: this.item.f_plan_meters[i].f_meter_base,
1996
- f_path: "",
1997
- type: "number"
1998
- },
1999
- {
2000
- f_defect_level: null,
2001
- f_device_id: "",
2002
- f_is_defect: "",
2003
- f_item_name: "剩余气量",
2004
- f_item_value: "",
2005
- f_path: "",
2006
- type: "number"
2007
- },
2008
- {
2009
- f_defect_level: null,
2010
- f_device_id: "",
2011
- f_is_defect: "",
2012
- f_item_name: "气量异常差值",
2013
- f_item_value: null,
2014
- f_path: "",
2015
- type: "number"
2016
- }
2017
- )
2018
- }
2019
- }
2020
- })
2021
- } else if(this.devices[de].device == "燃气表"){
2022
- this.data['device' + this.devices[de].n].forEach(device => {
2023
- if (!this.data.f_collection_type) {
2024
- this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2025
- delete this.config['燃气表']['items']['累购金额']
2026
- delete this.config['燃气表']['items']['已用金额']
2027
- delete this.config['燃气表']['items']['剩余金额']
2028
- delete this.config['燃气表']['items']['金额异常差值']
2029
- delete this.config['燃气表']['items']['系统余额']
2030
- device.f_items.push(
2031
- {
2032
- f_defect_level: null,
2033
- f_device_id: "",
2034
- f_is_defect: "",
2035
- f_item_name: "初始表底",
2036
- isshow: true,
2037
- f_item_value: this.item.f_plan_meters[i].f_initial_base,
2038
- f_path: "",
2039
- type: "number"
2040
- },
2041
- {
2042
- f_defect_level: null,
2043
- f_device_id: "",
2044
- f_is_defect: "",
2045
- f_item_name: "累购气量",
2046
- f_item_value: this.item.f_plan_meters[i].f_total_gas,
2047
- f_path: "",
2048
- type: "number"
2049
- },
2050
- {
2051
- f_defect_level: null,
2052
- f_device_id: "",
2053
- f_is_defect: "",
2054
- f_item_name: "已用气量",
2055
- f_item_value: this.item.f_plan_meters[i].f_meter_base,
2056
- f_path: "",
2057
- type: "number"
2058
- },
2059
- {
2060
- f_defect_level: null,
2061
- f_device_id: "",
2062
- f_is_defect: "",
2063
- f_item_name: "剩余气量",
2064
- f_item_value: '',
2065
- f_path: "",
2066
- type: "number"
2067
- },
2068
- {
2069
- f_defect_level: null,
2070
- f_device_id: "",
2071
- f_is_defect: "",
2072
- f_item_name: "气量异常差值",
2073
- isshow:false,
2074
- f_item_value: null,
2075
- f_path: "",
2076
- type: "number"
2077
- }
2078
- )
2079
- }
2080
- })
2081
- }
2082
- }
2083
- }
2084
- }
2085
- }
2086
- this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
2087
- }
2088
- },
2089
- watch: {
2090
- 'row' () {
2091
- //tag
2092
- this.copy()
2093
- }
2094
- },
2095
- async ready () {
2096
- try {
2097
- if (this.item.f_userinfoid){
2098
- let http = new HttpResetClass()
2099
- let response = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/tel_singleTable_OrderBy`, {
2100
- data: {
2101
- items: 'count(0) as num',
2102
- tablename: 't_userfiles a left join t_userinfo b on a.f_userinfo_id = b.f_userinfo_id',
2103
- condition: `a.f_userinfo_id = '${this.item.f_userinfoid}' and a.f_meter_classify != '物联网表' and a.f_table_state = '正常' and b.f_user_state='正常'`,
2104
- orderitem: '1'
2105
- }
2106
- }, {resolveMsg: null, rejectMsg: null})
2107
- if (response && response.data && response.data.length > 0 && response.data[0].num > 0 ){
2108
- this.tabs.push({
2109
- header: '抄表', complete: 'meter-reading', class: 'meter-reading-class', props: null
2110
- })
2111
- }else {
2112
- console.log('无网络')
2113
- }
2114
- }
2115
- }catch (e){
2116
- console.log(e)
2117
- console.log('无网络')
2118
- }
2119
- //送气超期功能
2120
- //await this.isoverDate()
2121
- this.putDevices()
2122
- //如果已检,则提取安检单
2123
- if (this.item.f_state != '未检') {
2124
- if (this.role == 'inspect' || this.role == 'androidview') {
2125
- HostApp.__callback__ = this.loaded
2126
- HostApp.__this__ = this
2127
- let that = this
2128
- let value = {}
2129
- if (this.role == 'inspect') {
2130
- let condition=` f_check_item_id ='${this.item.id}'`
2131
- if (this.item.f_no_checkplan == '无计划安检') {
2132
- condition += ` and f_no_checkplan = '无计划安检'`
2133
- }
2134
- value = this.$androidUtil.bzLogic('path_getPhoneCheckPaper', {condition: condition})
2135
- } else {
2136
- value = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data: {condition: `id = '${this.item.f_paper_id}'`}})
2137
- }
2138
- Util.replaceFalse(value)
2139
- if (value.data.length != 0) {
2140
- that.$set('data', value.data[0])
2141
- if (this.data.f_collection_type == '按气量') {
2142
- delete this.config['燃气表']['items']['累购金额']
2143
- delete this.config['燃气表']['items']['已用金额']
2144
- delete this.config['燃气表']['items']['剩余金额']
2145
- delete this.config['燃气表']['items']['金额异常差值']
2146
- delete this.config['燃气表']['items']['系统余额']
2147
- } else if (this.data.f_collection_type == '按金额') {
2148
- delete this.config['燃气表']['items']['累购气量']
2149
- delete this.config['燃气表']['items']['已用气量']
2150
- delete this.config['燃气表']['items']['剩余气量']
2151
- delete this.config['燃气表']['items']['气量异常差值']
2152
- delete this.config['燃气表']['items']['系统余额']
2153
- }
2154
- //tag)
2155
- if (value.data[0].f_devices) {
2156
- for (let da in that.devices) {
2157
- if(typeof that.devices[da]=='function'){
2158
- continue
2159
- }
2160
- that.$set('data.device' + that.devices[da].n, [])
2161
- }
2162
- value.data[0].f_devices.forEach((item) => {
2163
- for (let i in item.f_items) {
2164
- if(typeof item.f_items[i]=='function'){
2165
- continue
2166
- }
2167
- for (let de in that.config[item.f_device_type].items) {
2168
- if(typeof that.config[item.f_device_type].items[de]=='function'){
2169
- continue
2170
- }
2171
- if (item.f_items[i].f_item_name == de) {
2172
- if (that.config[item.f_device_type].items[de].type == 'selector' || that.config[item.f_device_type].items[de].type == 'checkbox') {
2173
- item.f_items[i].f_item_value = []
2174
- } else {
2175
- item.f_items[i].f_item_value = ''
2176
- }
2177
- }
2178
- }
2179
- for (let j in item.f_items[i].f_item_lists) {
2180
- if(typeof item.f_items[i].f_item_lists[j]=='function'){
2181
- continue
2182
- }
2183
- if (item.f_items[i].f_item_value instanceof Array) {
2184
- item.f_items[i].f_item_value.push(item.f_items[i].f_item_lists[j].f_item_value)
2185
- } else {
2186
- item.f_items[i].f_item_value = item.f_items[i].f_item_lists[j].f_item_value
2187
- }
2188
- }
2189
-
2190
- }
2191
- for (let de in that.devices) {
2192
- if(typeof that.devices[de]=='function'){
2193
- continue
2194
- }
2195
- if (that.devices[de].device == item.f_device_type) {
2196
- that.data['device' + that.devices[de].n].push({
2197
- f_device_type: item.f_device_type,
2198
- f_items: item.f_items
2199
- })
2200
- //tag)
2201
- }
2202
- }
2203
- })
2204
- if (this.role == 'androidview') {
2205
- Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
2206
- Util.androidRatifyPics(that.picture, this.$androidUtil.getProxyUrl())
2207
- Util.booleanFilter(that.data)
2208
- }
2209
- //tag)
2210
- }
2211
- } else {
2212
- this.init()
2213
- }
2214
- if(this.parentPage && this.parentPage=='CurrentCreate'){
2215
- let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2216
- if (isRecodr) {
2217
- if (isRecodr=='true') {
2218
- this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
2219
- // 初始化录音
2220
- let resse = this.record()
2221
- }
2222
- }
2223
- }
2224
- this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
2225
- } else {
2226
- let that = this
2227
- let id
2228
- if (this.role == 'view') {
2229
- id = this.item.id
2230
- }
2231
- this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data:{condition:`id = '${id}'`}}).then((respanse)=> {
2232
- if (respanse.data.length != 0) {
2233
- that.data = Object.assign(that.data,respanse.data[0])
2234
- if(respanse.data[0].f_devices) {
2235
- for (let da in that.devices) {
2236
- that.$set('data.device' + that.devices[da].n, [])
2237
- }
2238
- respanse.data[0].f_devices.forEach((item) => {
2239
- for (let de in that.devices) {
2240
- if (that.devices[de].device == item.f_device_type) {
2241
- that.data['device' + that.devices[de].n].push({
2242
- f_device_type: item.f_device_type,
2243
- f_items: item.f_items
2244
- })
2245
- }
2246
- }
2247
- })
2248
- }
2249
- Util.replaceFalse(that.data)
2250
- Util.booleanFilter(that.data)
2251
- if(this.role == 'view'){
2252
- Util.ratifyPics(that.data)
2253
- }else{
2254
- Util.androidRatifyPics(that.data,this.$androidUtil.getProxyUrl())
2255
- }
2256
- } else {
2257
- alert("该安检单可能已不在本地!")
2258
- this.init()
2259
- }
2260
- this.$goto('safecheck-userinfo', {userinfo:this.data}, 'paper-router')
2261
- }
2262
- ).catch(
2263
- (respanse) => {
2264
- alert('查找安检单失败')
2265
- })
2266
- }
2267
- }else{
2268
- if(this.parentPage && (this.parentPage == 'CurrentCreate' || this.parentPage == 'AddPlanItem') ){
2269
- //tag
2270
- let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2271
- if (isRecodr) {
2272
- if (isRecodr=='true') {
2273
- // this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
2274
- // 初始化录音
2275
- let resse = this.record()
2276
- }
2277
- }
2278
- }
2279
- this.init()
2280
- }
2281
- },
2282
- events: {
2283
- 'tijiao': function () {
2284
- // 事件回调内的 `this` 自动绑定到注册它的实例上
2285
- this.confirm()
2286
- }
2287
- }
2288
- }
2289
- </script>
2290
- <style lang="less">
2291
- @import "../../../../src/bootstrap/less/variables.less";
2292
- .noclickbut {
2293
- pointer-events: none;
2294
- }
2295
- .tab-befor-img (@url) {
2296
- content: '';
2297
- background-image: url("@{url}");
2298
- background-size: 20px;
2299
- display: inline-block;
2300
- margin-right: 8px;
2301
- margin-top: 0.3em;
2302
- height: 1.3em;
2303
- width: 1.3em;
2304
- vertical-align: -35%;
2305
- }
2306
-
2307
- @media screen and (min-width: 768px) {
2308
- .android-repair-order > div > ul a {
2309
- font-size: @font-size-h2;
2310
- margin: 0.3em 0;
2311
- }
2312
- }
2313
- .repair-details-class{
2314
- &::before {
2315
- .tab-befor-img("../../../assets/huneiweixiu1.png");
2316
- }
2317
- }
2318
- .repair-info-class {
2319
- &::before {
2320
- .tab-befor-img("../../../assets/baoxiuxinxi1.png");
2321
- }
2322
- }
2323
- .repair-user-info-class {
2324
- &::before {
2325
- .tab-befor-img("../../../assets/jibenxinxi1.png")
2326
- }
2327
- }
2328
-
2329
- .door-service-class {
2330
- &::before {
2331
- .tab-befor-img("../../../assets/huneiweixiu1.png")
2332
- }
2333
- }
2334
-
2335
- .pipeline-class {
2336
- &::before {
2337
- .tab-befor-img("../../../assets/guandao1.png")
2338
- }
2339
- }
2340
-
2341
- .device-service-class {
2342
- &::before {
2343
- .tab-befor-img("../../../assets/shebeiweixiu1.png")
2344
- }
2345
- }
2346
-
2347
- .trouble-removal-class {
2348
- &::before {
2349
- .tab-befor-img("../../../assets/shiguchuli.png")
2350
- }
2351
- }
2352
-
2353
- .cooking-utensils-class {
2354
- &::before {
2355
- .tab-befor-img("../../../assets/zaoju1.png")
2356
- }
2357
- }
2358
-
2359
- .outlay-class {
2360
- &::before {
2361
- .tab-befor-img("../../../assets/feiyong1.png")
2362
- }
2363
- }
2364
- .meter-reading-class {
2365
- &::before {
2366
- .tab-befor-img("../../../assets/guzhanghuizong1.png")
2367
- }
2368
- }
2369
- .fault-all-class {
2370
- &::before {
2371
- .tab-befor-img("../../../assets/guzhanghuizong1.png")
2372
- }
2373
- }
2374
- .photo-write-class {
2375
- &::before {
2376
- .tab-befor-img("../../../assets/zaoju.png")
2377
- }
2378
- }
2379
- .delay-apply-class {
2380
- &::before {
2381
- .tab-befor-img("../../../assets/yonghubaoxiu.png")
2382
- }
2383
- }
2384
-
2385
- .repair-back-class {
2386
- &::before {
2387
- .tab-befor-img("../../../assets/fanhui.png")
2388
- }
2389
- }
2390
- .butt2 {
2391
- display: inline;
2392
- float: right;
2393
- width: 10px;
2394
- text-align: center;
2395
- align-items:center;
2396
- position: absolute;
2397
- top:50%;
2398
-
2399
- left:90%;
2400
- transform: translate(-50%,-50%);
2401
- }
2402
- .linesty{
2403
- display: inline-block;
2404
- height:1px;
2405
- width:100%;
2406
- background:#d0d0d0;
2407
- overflow:hidden;
2408
- vertical-align: middle;
2409
- }
2410
- .spanboder{
2411
- border-bottom:2px solid #499edf;
2412
- padding-bottom: 8px
2413
- }
2414
- .app-botton {
2415
- position:fixed;
2416
- background: #87b2dd;
2417
- right:8px;
2418
- color: #FFF;
2419
- padding: 8px;
2420
- text-align: center;
2421
- font-size: 1.2em;
2422
- z-index: 10;
2423
- opacity:0.5;
2424
- bottom: 50px;
2425
- margin-top: -10px;
2426
- height: 40px;
2427
- }
2428
- .android-repair-order > div > ul a {
2429
- font-size: 12px;
2430
- color: #333333;
2431
- padding: 13px 16px;
2432
- }
2433
- </style>
1
+ <template>
2
+ <div id="savebut" class="no-close row android-repair-order" style="background-color: #f9f9f9">
3
+ <div class="col-sm-12 col-xs-12" >
4
+ <ul class="nav nav-tabs" style="background:#ffffff;overflow-y: hidden">
5
+ <li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
6
+ v-if="$index < number+1 && $index < faultshow.number" >
7
+ <a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
8
+ <span class="spanboder">{{row.header}}</span>
9
+ <img class="butt2" :src="imgback(row.complete === componentName,row.header === header)"></a>
10
+ <p></p>
11
+ </li>
12
+ <div class="col-sm-12 col-xs-12 repair-bg" v-show="routeShow">
13
+ <route name='repair' :reuse="false"></route>
14
+ </div>
15
+ <li v-for="row in tabs" @click="tabSelect(row,$index)" :class="{active1: row.complete === componentName}"
16
+ v-if="$index > number && $index < faultshow.number ">
17
+ <a href="#" style="background-color: #ffffff;color: #666666;font-size: 16px;font-family:SimSun" :class="row.class">
18
+ <span class="spanboder">{{row.header}}</span>
19
+ <img class="butt2" :src="imgback(row.complete === componentName,row.header === header)"></a>
20
+ <p></p>
21
+ </li>
22
+ <div class="col-sm-12 col-xs-12 repair-bg" v-if="actionEnabled ">
23
+ <div class="auto select-overspread form-horizontal repair-bg " style="padding-bottom:5px;">
24
+ <div class="bq-parent">
25
+ <blockquote class="blockquote">
26
+ <p>安检上传</p>
27
+ </blockquote>
28
+ </div>
29
+ <div class="panel panel-default auto repair-info-content">
30
+ <div class="panel-body ">
31
+ <div class="row auto">
32
+ <!--<div class="col-xs-12 col-sm-12 col-md-12" :style="timeSet(this.isneedDate)?'':'display:none'">-->
33
+ <!--<label>请输入超期原因:</label><br/>-->
34
+ <!--<textarea style="width: 100%;" v-model=""></textarea>-->
35
+ <!--</div>-->
36
+ <div class="col-xs-12 col-sm-12 col-md-12 flex-between" style="margin-top: 20px;">
37
+ <div class="col-xs-3 col-sm-3 col-md-3" v-if="parentPage=='CurrentCreate'">
38
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="save('temp')">
39
+ 临时保存
40
+ </button>
41
+ </div>
42
+ <div class="col-xs-3 col-sm-3 col-md-3">
43
+ <button class="col-sm-3 btn btn-primary" @click="save('finish')">
44
+ 本地缓存
45
+ </button>
46
+ </div>
47
+ <div class="col-xs-3 col-sm-3 col-md-3">
48
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="uploadCheckPaper">
49
+ 上传
50
+ </button>
51
+ </div>
52
+ <div v-if="show_torepair">
53
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="showmod">
54
+ 转维修
55
+ </button>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ </div>
62
+ </div>
63
+ </ul>
64
+ </div>
65
+ <modal :show.sync="showModal2" :backdrop="false" style="font-size: 15px">
66
+ <div slot="modal-header" class="modal-header upuserinfo_sel">
67
+ <h4 class="modal-title">
68
+ 转维修
69
+ </h4>
70
+ </div>
71
+ <div slot="modal-body" class="modal-body">
72
+ <div class="row">
73
+ <ol style="border: 1px solid green;padding: 15px 0 15px 20px">
74
+ <li v-for="row in repairDefect.data" >{{row}}</li>
75
+ </ol>
76
+ </div>
77
+ <div class="row" style="margin-top: 10px">
78
+ <label class="font_normal_body">派发类型</label>
79
+ <v-select :value.sync="selectData.dispatchType" :value-single="true" v-model="selectData.dispatchType"
80
+ :options='dispatchTypeOptions' placeholder='派发类型'
81
+ close-on-select>
82
+ </v-select>
83
+ </div>
84
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给维修员'">
85
+ <label class="font_normal_body">维&ensp;修&ensp;员</label>
86
+ <v-select
87
+ :value.sync="selectData.f_repairman"
88
+ :value-single="true"
89
+ :options='repairers'
90
+ placeholder='请选择维修员'
91
+ close-on-select></v-select>
92
+ </div>
93
+ <div class="row" style="margin-top: 10px" v-if="selectData.dispatchType=='派发给站点'">
94
+ <label class="font_normal_body">站&ensp;&ensp;&ensp;&ensp;点</label>
95
+ <safe-right-tree
96
+ islist
97
+ :source="'dep=this.getParentByType($organization$).getSpecialResByType($department$),tool.getFullTree(dep.where(row.hasSpecialRole($派单员$)))'"
98
+ @re-res="getSiteRes"></safe-right-tree>
99
+ </div>
100
+ <div class="row" style="margin-top: 10px">
101
+ <label class="font_normal_body">报修类型</label>
102
+ <v-select :value.sync="selectData.f_repairtype"
103
+ class="select select_list" @change="getDays"
104
+ :value-single="true"
105
+ :options='repairTypeOptions'
106
+ close-on-select>
107
+ </v-select>
108
+ </div>
109
+ <div class="row" style="margin-top: 10px">
110
+ <label class="font_normal_body">截止天数</label>
111
+ <v-select :value="selectData.day" :value-single="true"
112
+ v-model="selectData.day" class="select select_list"
113
+ :options='days' placeholder='请选择截止天数'
114
+ close-on-select
115
+ v-on:change="daychange" style="width: 60%"></v-select>
116
+ </div>
117
+ <div class="row" style="margin-top: 10px">
118
+ <label class="font_normal_body">截止时间</label>
119
+ <datepicker placeholder="请选择截至时间"
120
+ :value.sync="selectData.f_finish_date"
121
+ v-model="selectData.f_finish_date"
122
+ :format="'yyyy-MM-dd HH:mm:ss'"
123
+ style="width: 60%"
124
+ :disabled="true"></datepicker>
125
+ </div>
126
+ <div class="row" style="margin-top: 10px">
127
+ <label class="font_normal_body" >备&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;注</label>
128
+ <div class="btn-group" style="width:60%">
129
+ <textarea style="width:100%;height: 100px" v-model="selectData.f_remarks"></textarea>
130
+ </div>
131
+ </div>
132
+ </div>
133
+ <div slot="modal-footer" class="modal-footer" style="text-align: center">
134
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="rectification">转维修</button>
135
+ <button type="button" name="button" class="col-sm-3 btn btn-primary" @click="cancel1">取消</button>
136
+ </div>
137
+ </modal>
138
+ </div>
139
+ </template>
140
+
141
+ <script>
142
+ import Vue from 'vue'
143
+ import * as Util from '../../../components/Util'
144
+ import { HttpResetClass } from 'vue-client'
145
+ import co from 'co'
146
+ import $ from "jquery";
147
+ import MeterReading from './MeterReading'
148
+ let loadParamGem = async function (self) {
149
+ await self.$LoadParams.loadParam()
150
+ }
151
+
152
+ export default {
153
+ title: '安检单',
154
+ props: ['f_plan_id', 'item', 'role','parentPage','source'],
155
+ // props: ['f_plan_id', 'role'],
156
+ data() {
157
+ return {
158
+ //测试数据
159
+ // f_plan_id:'',
160
+ // role:'inspect',
161
+ // item:{"f_approved_time":null,"f_user_family_remarks":null,"f_street":"测试街道","f_repair_approved_time":null,
162
+ // "f_user_type":null,"f_approved_by":null,"f_card_id":null,"f_remark":null,"f_building":"1","f_batch_number":null,
163
+ // "f_idnumber":null,"f_state":"未检","id":"0EFE0EE2-B155-46F9-8DE0-38C022664A4D","f_complete":null,"f_check_state":null,"f_last_check_state":"拒检",
164
+ // "f_user_inhome_time":null,"f_residential_area":"测试小区1","version":1,"f_processid":null,"f_last_check_result":"{\"result\":\"正常\",\"data\":[]}",
165
+ // "f_area":null,"f_usegas":null,"f_user_phone":"16566546548","f_slice_area":"营业大区","f_approved":"未审核","f_upload_state":"未传","f_user_check_time":null,
166
+ // "f_unit":"1","f_user_spare_phone":null,"f_last_check_date":null,"f_userproperties":null,"f_userfile_id":null,"f_prearranged_date":null,"f_filialeid":"453",
167
+ // "f_branch":null,"f_orgstr":null,"f_plan_year":2020,"f_orgid":null,"f_approval_notified":null,"f_plan_month":4,"f_approved_note":null,"f_filialeids":null,
168
+ // "f_floor":"1","f_flag":null,"f_repair_approved_note":null,"f_userinfo_code":"00000002","f_create_time":"2020-05-10 18:56:03","f_meter_no":"","f_station":null,
169
+ // "f_repair_approved":"未审核","f_no_checkplan":"有计划安检","f_plan_name":"关于","f_repair_approved_by":null,"f_room":"1","f_office":null,"f_comments":null,
170
+ // "f_address":"兰山街道泰盛小区1栋1单元1层1室","id_back":null,"f_userinfoid":"2","f_subcompany":null,"f_addressid":null,"f_user_phone2":null,
171
+ // "f_user_equipment_remarks":null,"f_plan_id":"0819ea6707ad4d9dad217c06a87f4227","f_user_name":"用户二",
172
+ // "f_plan_meters":[{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2119035714","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":3,"f_maker":null,"f_metergasnums":0,"f_total_fee":100,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663},{"f_weizhi":null,"f_flow_direction":"右表","f_metertitles":"","f_prior_reading":0,"f_meter_no":"2118999901","f_collection_type":"按金额","f_aliasname":"先锋系统结算物联网表","f_meter_type":"物联网表","version":1,"f_maker":null,"f_metergasnums":0,"f_total_fee":0,"f_diaphgram_size":"G2.5","f_total_gas":0,"id":18663}]
173
+ // },
174
+
175
+ data: {
176
+ f_devices: [],
177
+ f_defect_content:'',
178
+ f_recording1_path:'',
179
+ f_visit_number:'',
180
+ f_remark:''
181
+ },
182
+ imgsnum:this.$appdata.getSingleValue('安检总体照片数量') ? this.$appdata.getSingleValue('安检总体照片数量'):1, // 安检整体照片默认必须拍1张
183
+ updateuserphone:false, //安检时是否更新用户电话
184
+ updatemetermodel:false, //安检时是否更新表型号
185
+ updatemeternumber:false, //安检时是否更新表号
186
+ beforephone:'',
187
+ isUpload:false,
188
+ show_torepair: false,
189
+ onlySave:true, //判断保存还是保存并上传
190
+ livedispose:'',
191
+ refuseinspection:'', // 拒检拍照是否提示
192
+ notencountered:'', // 到访不遇拍照是否提示
193
+ startClick:false, //开始安检按钮是否可点击
194
+ isStrat: false, //是否开始安检
195
+ checkResult:{},//查询结果
196
+ newcheckResult:{},
197
+ repairDefect : {
198
+ result: '正常',
199
+ data: []
200
+ },
201
+ rowCodata:{},
202
+ repairers: [],
203
+ timer: null,
204
+ showModal: false,
205
+ showModal2:false,
206
+ pic_to_be_viewed: '',
207
+ showBack:true,
208
+ devices: [],
209
+ f_devices : [],
210
+ isToRepair:false,
211
+ clickBack:true, //是否点击返回按钮
212
+ isSafeCheckToRepair:false,//是否转维修
213
+ Url:this.$androidUtil.getProxyUrl(),
214
+ detail:{},
215
+ defectDevice:{},
216
+ user:{},
217
+ is_has_jingweidu: this.$appdata.getSingleValue('照片水印加经纬度') || 'false',
218
+ dispatchTypeOptions: [{label: '派发给维修员', value: '派发给维修员'},{label: '派发给站点', value: '派发给站点'}],
219
+ selectData:{
220
+ f_finish_date:'',
221
+ day:'',
222
+ dispatchType:'派发给站点',
223
+ f_repairman:'',
224
+ f_remarks:'',
225
+ f_repairtype:'安检隐患',
226
+ f_reciever:'434656123644149762',
227
+ f_meetunit:'维修站',
228
+ f_outlets:'维修站'
229
+ },
230
+ model: { //转维修数据
231
+ // 一次派单
232
+ serviceacitivity: [{
233
+ f_service_acitivity_type: '派单'
234
+ }],
235
+ f_source:'安检',
236
+ f_service_id: '',
237
+ f_contact_phone: '',
238
+ f_meetunit: '',
239
+ f_phone: '',
240
+ f_user_name: '',
241
+ f_address: '',
242
+ f_repair_date: Util.toStandardTimeString(),
243
+ f_card_id: '',
244
+ // f_department: '', 站点选择
245
+ f_reciever:'',
246
+ f_remarks: '',
247
+ f_user_type: '',
248
+ f_area: '',
249
+ f_unit_name:'',
250
+ f_street: '',
251
+ f_residential_area: '',
252
+ f_building: '',
253
+ f_unit: '',
254
+ f_floor: '',
255
+ f_room: '',
256
+ aState: null,
257
+ f_repairtype: '',
258
+ f_repairitems:{},
259
+ },
260
+ repairitems:[],
261
+ meading:'转站点',
262
+ repairTypeOptions:this.$appdata.getParam('报修类型'),
263
+ config: {
264
+ "燃气表":{
265
+ "checkmust":true,
266
+ "index":1,
267
+ "items":{
268
+ //"燃气表照片":{"index":1,"type":"picture","remark":"(拍摄清晰的表具编号、字轮数、剩余气量等)"},
269
+ "基表编号":{"index":1,"type":"string","readonly":true},
270
+ "气表型号":{"index":2,"type":"string","readonly":true},
271
+ "气表品牌":{"index":3,"type":"string","readonly":true},
272
+ "表向":{"index":4,"type":"string","readonly":true},
273
+ "初始表底":{"index":5,"type":"number","isshow":false,"readonly":true},
274
+ "上期表读数":{"index":6,"type":"number","readonly":true,isshow:false},
275
+ "累购气量":{"index":7,"type":"number","readonly":true},
276
+ "累购金额":{"index":7,"type":"number","readonly":true},
277
+ "已用气量":{"index":8,"type":"number","checkmust": false},//基表数
278
+ "已用金额":{"index":8,"type":"number","checkmust": false},
279
+ "剩余气量":{"index":9,"type":"number","checkmust": false},//累购-已用
280
+ //显示屏数 --实际剩余气量
281
+ "剩余金额":{"index":9,"type":"number","checkmust": false},
282
+ "气量异常差值":{"index":10,"type":"number","readonly": true},
283
+ "金额异常差值":{"index":10,"type":"number","readonly": true},
284
+ "系统余额":{"index":10,"type":"number","readonly": true},
285
+ "表封号":{"index":11,"type":"string","readonly": true},
286
+ "燃气表照片":{"index":12,"type":"picture","checkmust": false}
287
+ }
288
+ // 注意,配置项的index必须与上面的固定配置保持'顺序'
289
+ },
290
+ // "燃气表2":{
291
+ // "checkmust":true,
292
+ // "index":2,src
293
+ // "items":{
294
+ // "燃气表照片":{"index":1,"type":"picture"},
295
+ // "表品牌":{"index":2,"type":"string","readonly":true},
296
+ // "表号":{"index":3,"type":"string","readonly":true},
297
+ // "表封号":{"index":4,"type":"number","readonly":true},
298
+ // "表型号":{"index":5,"type":"string","readonly":true},
299
+ // "位置":{"index":6,"type":"string","readonly":true},
300
+ // "表底数":{"index":7,"type":"number","readonly":true},
301
+ // "累购气量":{"index":8,"type":"number","readonly":true},
302
+ // "累购金额":{"index":8,"type":"number","readonly":true}
303
+ // }
304
+ // }
305
+ },
306
+ // 维修项
307
+ isneedDate:'',
308
+ days: this.$appdata.getParam('截止天数'),
309
+ routeShow:true,
310
+ number:0,
311
+ shupingshow:false,
312
+ pipeline: {},
313
+ details: [],
314
+ ids: '',
315
+ savevalid: {
316
+ uservalid: false,
317
+ doorvalid: true,
318
+ changetable: false
319
+ },
320
+ doordetails: {},
321
+ devicedetails: {},
322
+ cookdetails: {},
323
+ componentName: 'safecheck-userinfo',
324
+ header:'客户信息',
325
+ tabs: [
326
+ // 参数全部设置成空,在ready时,等model处理好了,再添加
327
+ {
328
+ header: '客户信息',complete:'safecheck-userinfo',class: 'repair-info-class', props: null
329
+ },
330
+ {
331
+ header: '拍照签名',complete:'paper-feedback', class: 'outlay-class', props: null
332
+ }
333
+ ],
334
+ faultshow:{
335
+ number : 8
336
+ } // 控制 故障汇总 在 菜单里显示与否,
337
+ }
338
+ },
339
+ components: {
340
+ 'meter-reading': MeterReading,
341
+ },
342
+ computed: {
343
+ actionEnabled: {
344
+ get() {
345
+ return (this.role == 'inspect' && (this.item.f_last_check_state == '到访不遇' || this.item.f_last_check_state == '拒检' || this.item.f_approved == '不通过' )) || (this.role == 'inspect' && this.item.f_complete !='已完成' && this.item.f_complete !='已传' )
346
+ }
347
+ }
348
+ },
349
+ methods: {
350
+ getDays(val){
351
+ console.log(val)
352
+ this.days = this.$appdata.getParam(val+'截止天数')
353
+ this.selectData.day = this.$appdata.getSingleValue(val+'默认截止天数') || 1
354
+ },
355
+ daychange(val) {
356
+ this.selectData.day = val
357
+ if (val == '其他') {
358
+ this.flag = false
359
+ } else {
360
+ if(val){
361
+ this.flag = true
362
+ this.selectData.f_finish_date = this.getSecondDay(val)
363
+ }else {
364
+ this.selectData.f_finish_date = this.getSecondDay(1)
365
+ }
366
+
367
+ }
368
+ },
369
+ getSecondDay(val){
370
+ let t = new Date();
371
+ let t1 = t.getTime()
372
+ val = val * 1000
373
+ t.setTime(t1 + val * 60 * 60 * 24);
374
+ let Y = t.getFullYear() + '-'
375
+ let M = (t.getMonth() + 1 < 10 ? '0' + (t.getMonth() + 1) : t.getMonth() + 1) + '-'
376
+ let D = (t.getDate() < 10 ? '0' + t.getDate() : t.getDate()) + ' '
377
+ let h = (t.getHours() < 10 ? '0' + t.getHours() : t.getHours()) + ':'
378
+ let m = (t.getMinutes() < 10 ? '0' + t.getMinutes() : t.getMinutes()) + ':'
379
+ let s = t.getSeconds() < 10 ? '0' + t.getSeconds() : t.getSeconds()
380
+ return Y + M + D + h + m + s
381
+ },
382
+ showmod(){
383
+ // this.saveNoclick()
384
+ let errString = this.errorVerify()
385
+ if (errString) {
386
+ console.log(errString)
387
+ console.log('Vue.android',Vue.android)
388
+ console.log('this.isUpload',this.isUpload)
389
+ if (Vue.android){
390
+ this.$showMessage(errString)
391
+ }
392
+ return
393
+ }
394
+ //清空转维修列表重新进行数据组织
395
+ this.repairDefect = {
396
+ result: '正常',
397
+ data: []
398
+ }
399
+ this.data.f_complete = '已完成'
400
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
401
+ this.assemblyCodata()
402
+ if(this.repairDefect.result=='正常'){
403
+ this.$showMessage("未发现有选择需要转维修的隐患,请检查填写的数据。如需转维修请在处理方式中选择 '转维修' !")
404
+ return
405
+ }
406
+ console.log("准备保存!")
407
+ this.disableTimer()
408
+ this.getEmp()
409
+ this.showModal2=true
410
+ const f_reciever = this.$appdata.getSingleValue('安检-站点id') || '434656123644149762'
411
+ const f_meetunit = this.$appdata.getSingleValue('安检-站点') || '维修站'
412
+ const f_repairtype = this.$appdata.getSingleValue('安检-报修类型') || '安检隐患'
413
+ this.selectData = {
414
+ dispatchType:'派发给站点',
415
+ f_repairman:'',
416
+ f_remarks:'',
417
+ f_repairtype:f_repairtype,
418
+ f_reciever:f_reciever,
419
+ f_meetunit:f_meetunit,
420
+ f_outlets:f_meetunit,
421
+ }
422
+ },
423
+ cancel1(){
424
+ this.showModal2=false
425
+ this.selectData={
426
+ dispatchType:'派发给站点',
427
+ f_repairman:'',
428
+ f_remarks:'',
429
+ f_repairtype:'安检隐患',
430
+ f_reciever:'434656123644149762',
431
+ f_meetunit:'维修站',
432
+ f_outlets:'维修站',
433
+ }
434
+ },
435
+ getSiteRes(obj) {
436
+ console.log('siteRes ---> ')
437
+ console.log(obj)
438
+ if(obj.resids[0]){
439
+ this.selectData.f_meetunit = obj.res.join('.')
440
+ this.selectData.f_reciever = obj.resids.join('.')
441
+ this.selectData.f_outlets = obj.res[obj.res.length - 1]
442
+ }else {
443
+ this.selectData.f_meetunit = '维修站'
444
+ this.selectData.f_reciever ='434656123644149762'
445
+ this.selectData.f_outlets ='维修站'
446
+ }
447
+ },
448
+ rectification(){
449
+ if(this.selectData.dispatchType){
450
+ if(this.selectData.dispatchType=='派发给站点'){
451
+ if(!this.selectData.f_reciever){
452
+ this.selectData.f_meetunit = '维修站'
453
+ this.selectData.f_reciever ='434656123644149762'
454
+ this.selectData.f_outlets ='维修站'
455
+ }
456
+ }else{
457
+ if(!this.selectData.f_repairman){
458
+ this.$showMessage('请选择维修员!')
459
+ return
460
+ }
461
+ }
462
+ }else {
463
+ this.$showMessage('请选择派发类型!')
464
+ return
465
+ }
466
+ if(!this.selectData.f_repairtype){
467
+ this.$showMessage('请选择报修类型!')
468
+ return
469
+ }
470
+ //关闭录音
471
+ this.closely(false) // 保存本地,不删除录音文件暂停录音
472
+ let act={}
473
+ let toRepair=''
474
+ if(this.selectData.dispatchType=='派发给站点'){
475
+ act={f_meetunit:this.selectData.f_meetunit,f_reciever:this.selectData.f_reciever,f_service_acitivity_type:'派单'}
476
+ toRepair=null
477
+ }else{
478
+ console.log('派发给维修员---------'+this.selectData.f_repairman)
479
+ act={f_meetunit:'',f_reciever:this.selectData.f_repairman,f_service_acitivity_type:'派单'}
480
+ toRepair='一级派单'
481
+ }
482
+ let repData={
483
+ toRepair:toRepair,
484
+ activity:act,
485
+ deps:Vue.user.deps,
486
+ depids:Vue.user.depids,
487
+ f_remarks:this.selectData.f_remarks,
488
+ f_repairtype:this.selectData.f_repairtype,
489
+ f_finish_date:this.selectData.f_finish_date,
490
+ dispatchType: this.selectData.dispatchType,
491
+ f_attendant: Vue.user.name,
492
+ loginUser:{name:Vue.user.name,ename:Vue.user.id,id:Vue.user.id},
493
+ }
494
+ this.rowCodata.istoRepair='转维修'
495
+ this.rowCodata.repData=repData
496
+ console.log("当前组装好的转维修数据--"+JSON.stringify(repData))
497
+ this.onlySave = false
498
+ this.save()
499
+ },
500
+ // 获取维修员
501
+ getEmp() {
502
+ this.repairers=[]
503
+ let per = {source: 'this.getRights().where(row.getType()==$user$).where(row.getAttributes().get($rolestr$).indexOf($维修员$) != -1))', userid: `${Vue.user.id}`}
504
+ let http = new HttpResetClass()
505
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/rs/search`, {data: per}, {resolveMsg: null, rejectMsg: null}).then((res) => {
506
+ res.data.forEach((user)=>{
507
+ this.repairers.push({label:user.name, value: user.name})
508
+ })
509
+ })
510
+ },
511
+ closely(isdelete){
512
+ try {
513
+ var startOrStopAudioClipStr;
514
+ if (isdelete===true) {
515
+ //tag
516
+ startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止并删除录音') //停止并删除录音
517
+ }else {
518
+ //tag
519
+ startOrStopAudioClipStr= HostApp.startOrStopAudioClip("----",'停止录音') //停止录音
520
+ }
521
+ if (startOrStopAudioClipStr.code == 200) {
522
+ //tag
523
+ return true;
524
+ }else {
525
+ return false;
526
+ }
527
+ } catch (e) {
528
+ console.error("关闭录音方法异常")
529
+ console.error(e)
530
+ return false;
531
+ }
532
+ },
533
+ // 录音方法
534
+ record() {
535
+ //tag
536
+ if (this.role != 'inspect') {
537
+ if (this.data.f_recording1_path != '') {
538
+ window.location = "/rs/file"+this.data.f_recording1_path
539
+ }
540
+ } else {
541
+ //tag
542
+ let fileName
543
+ if (!this.data.f_recording1_path) {
544
+ fileName = Util.guid() + '.amr'
545
+ } else {
546
+ fileName = Util.getFileName(this.data.f_recording1_path)
547
+ }
548
+ //HostApp.__this__ = this
549
+ /*调用无限制录音模块*/
550
+ let startOrStopState = HostApp.startOrStopAudioClip(fileName,"开始录音")
551
+ //tag
552
+ if (startOrStopState.code == 200) {
553
+ this.data.f_recording1_path = "file:///storage/emulated/0/safecheck/" + fileName
554
+ //tag
555
+ return true;
556
+ }else {
557
+ return false;
558
+ }
559
+ }
560
+ },
561
+ saveNoclick() {
562
+ // 禁用点击事件
563
+ $("#savebut").addClass("noclickbut");
564
+ //tag
565
+
566
+ // 5秒后启用点击事件
567
+ setTimeout(function(){
568
+ $("#savebut").removeClass("noclickbut");
569
+ },5000);
570
+ },
571
+ timeSet(val){
572
+ if (!val){
573
+ return
574
+ }
575
+ let time =new Date(val).getTime()
576
+ let time2=new Date().getTime()
577
+ if (time2>time) {
578
+ return true
579
+ }
580
+ },
581
+ imgback(val,isheader){
582
+ if(val && this.routeShow && isheader){
583
+ return require('../../../assets/xiangxia1.png')
584
+ }else{
585
+ return require('../../../assets/xiangyou1.png')
586
+ }
587
+ },
588
+ changediv(val){
589
+ return val
590
+ },
591
+ // 选择tab
592
+ tabSelect (item,number) {
593
+ this.header = item.header
594
+ // 处理关闭/显示 内容
595
+ if(this.number == number && !this.routeShow ){
596
+ this.routeShow = true
597
+ }else if(this.number == number && this.routeShow){
598
+ this.routeShow = false
599
+ }else if(this.number != item.complete){
600
+ this.routeShow = true
601
+ }
602
+ this.number = number
603
+ this.componentName = item.complete
604
+ if(item.complete == 'safecheck-devices'){
605
+ if(item.header != '燃气表' && this.data['device'+item.number].length == 0){
606
+ this.data['device' + item.number].push({})
607
+ }
608
+ let idx=this.data['device' + item.number].length - 1
609
+ let itemprops = {
610
+ config:this.config,
611
+ device:this.devices[item.number-1],
612
+ idx:idx,
613
+ role:'inspect'
614
+ }
615
+ if(this.routeShow){
616
+ this.$goto(item.complete, itemprops, 'repair')
617
+ }
618
+ }else if (item.complete == 'meter-reading'){
619
+ if(this.routeShow){
620
+ this.$goto(item.complete, {service:this.data}, 'repair')
621
+ }
622
+ }else{
623
+ if(this.routeShow){
624
+ this.$goto(item.complete, {userinfo:this.data}, 'repair')
625
+ }
626
+ }
627
+ this.shupingshow = true
628
+ },
629
+ // 给组件添加参数
630
+ getImgPath() {
631
+ for (var i = 0; i < this.model.serviceacitivity[0].imgs.length; i++) {
632
+ this.ids += this.model.serviceacitivity[0].imgs[i].imgid + ','
633
+ }
634
+ this.ids = this.ids.substring(0, this.ids.length - 1)
635
+ if(this.ids){
636
+ this.getImgGen();
637
+ }
638
+ },
639
+ getImgGen(){
640
+ let http = new HttpResetClass()
641
+ http.load('POST','api/af-safecheck/sql/safe_singleTable_OrderBy', {data: {
642
+ items: '*',
643
+ tablename: 't_files',
644
+ condition: `id in (${this.ids})`,
645
+ orderitem: 'id'
646
+ }}, {resolveMsg: null, rejectMsg: null}).then((res) => {
647
+ for (let i = 0; i < res.data.length; i++) {
648
+ for (let j = 0; j < this.model.serviceacitivity[0].imgs.length; j++) {
649
+ if (res.data[i].id.toString() === this.model.serviceacitivity[0].imgs[j].imgid) {
650
+ this.model.serviceacitivity[0].imgs[j] = Object.assign({}, res.data[i], this.model.serviceacitivity[0].imgs[j])
651
+ }
652
+ }
653
+
654
+ }
655
+ })
656
+ },
657
+
658
+ sortDetails(){
659
+ for (let i = 0; i < this.details.length; i++) {
660
+ if (this.details[i].details.length) {
661
+ for (let j = 0; j < this.details[i].details.length; j++) {
662
+ if (this.details[i].details[j].f_type === 'a') {
663
+ this.doordetails = {details: this.details[i].details}
664
+ break
665
+ }
666
+ if (this.details[i].details[j].f_type === 'b') {
667
+ this.devicedetails = {details: this.details[i].details}
668
+ break
669
+ }
670
+ if (this.details[i].details[j].f_type === 'c') {
671
+ this.cookdetails = {details: this.details[i].details}
672
+ break
673
+ }
674
+ }
675
+ }
676
+ }
677
+ },
678
+ // 复制数据
679
+ back () {
680
+ let _this = this
681
+ if(this.issee){
682
+ _this.$back()
683
+ return
684
+ }
685
+ this.$showMessage('所填写内容将不可恢复!', ['confirm', 'cancel']).then((res) => {
686
+ if (res === 'confirm') {
687
+ this.closely()
688
+ _this.$back()
689
+ }
690
+ })
691
+ },
692
+ confirm(){
693
+ this.$dispatch('confirm')
694
+ },
695
+ tick() {
696
+ this.timer = null
697
+ this.data.f_offsite_time = Util.toStandardTimeString()
698
+ this.timer = window.setTimeout(this.tick, 1000)
699
+ },
700
+ getRepairState() {
701
+ let repaired = true
702
+ this.data.f_defects.forEach((defect) => {
703
+ repaired = repaired & (defect.f_ratification == '已处理')
704
+ })
705
+ return repaired
706
+ },
707
+ verifyRepairDefects() {
708
+ this.data.f_repair_date = Util.toStandardTimeString()
709
+ this.data.f_repaired = this.getRepairState() ? '已修' : '在修'
710
+ },
711
+ errorVerify() {
712
+ let hasError = this.verifyState()
713
+ if(hasError)
714
+ return hasError
715
+
716
+ if(this.data.f_entry_status != '入户' || this.data.f_usegas == '未用气')
717
+ return null
718
+ hasError = this.verifyUser()
719
+ if(hasError)
720
+ return hasError
721
+ hasError = this.verifyDevices()
722
+ if(hasError)
723
+ return hasError
724
+ hasError = this.verifyFeedback()
725
+ if(hasError)
726
+ return hasError
727
+ },
728
+ verifyState() {
729
+ if(Vue.android && this.data.f_usegas == '未用气' && (this.data.f_nongasuser_path == Vue.nopic || this.data.f_nongasuser_path == ''))
730
+ return '未使用天然气则必须拍照'
731
+ if(Vue.android && this.data.f_entry_status == '到访不遇' && this.notencountered && (this.data.f_noanswer_path == Vue.nopic || this.data.f_noanswer_path == ''))
732
+ return '到访不遇必须拍照'
733
+ if(Vue.android && this.data.f_entry_status == '拒检' && this.refuseinspection && (this.data.f_rejectcheck_path == Vue.nopic || this.data.f_rejectcheck_path == ''))
734
+ return '拒检必须拍照'
735
+ },
736
+ verifyUser() {
737
+ let prefix = '用户基本信息:'
738
+ if(Util.required(this.data.f_user_name))
739
+ return prefix + '用户名必须输入'
740
+ if (!this.data.f_user_phone){
741
+ return '请输入正确的电话号码'
742
+ }
743
+ if(!(/^\d{11}$/.test(this.data.f_user_phone.trim()))) {
744
+ return '请输入正确的电话号码'
745
+ }
746
+ // if(Util.required(this.data.f_residential_area))
747
+ // return prefix + '小区名称必须输入'
748
+ // if(Util.required(this.data.f_address))
749
+ // return prefix + '地址必须输入'
750
+ },
751
+ verifyDevices() {
752
+ for (let dev in this.config) {
753
+ if (this.config[dev].checkmust == true) {
754
+ let error = true
755
+ for(let device in this.data) {
756
+ if (device.startsWith("device")) {
757
+ for (let item in this.data[device]) {
758
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
759
+ error = false
760
+ }
761
+ }
762
+ }
763
+ }
764
+ if (error) {
765
+ return "请检查" + dev
766
+ }
767
+ }
768
+ }
769
+
770
+ for (let dev in this.config) {
771
+ for(let device in this.data) {
772
+ if (device.startsWith("device")) {
773
+ for (let item in this.data[device]) {
774
+ //检查每一条安检结果
775
+ if (this.data[device].length != 0 && this.data[device][item].f_device_type == dev) {
776
+ for (let i in this.data[device][item].f_items) {
777
+ for (let it in this.config[dev].items) {
778
+ if (it == this.data[device][item].f_items[i].f_item_name) {
779
+ let check=false
780
+ if (!this.data[device][item].f_items[i].f_item_value){
781
+ check=true
782
+ }else if (Array.isArray(this.data[device][item].f_items[i].f_item_value)){
783
+ if (this.data[device][item].f_items[i].f_item_value.length==0){
784
+ check=true
785
+ }
786
+ }
787
+
788
+ if(this.config[dev].items[it].type=='picture' && this.config[dev].items[it].checkmust == true && !this.data[device][item].f_items[i].f_path){
789
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
790
+ }
791
+ if (this.config[dev].items[it].type !='picture' && this.config[dev].items[it].checkmust == true && check) {
792
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + "未检查"
793
+ }
794
+ }
795
+ }
796
+ //检查安检下拉结果
797
+ if (this.data[device][item].f_items[i].type == 'selector' || this.data[device][item].f_items[i].type == 'radio') {
798
+ if (this.data[device][item].f_items[i].f_is_defect == true && this.data[device][item].f_items[i].f_path == Vue.nopic) {
799
+ return dev + (this.data[device].indexOf(this.data[device][item]) + 1) + this.data[device][item].f_items[i].f_item_name + this.data[device][item].f_items[i].f_item_value + "选中必须拍照"
800
+ }
801
+ }
802
+ }
803
+ }
804
+ }
805
+ }
806
+ }
807
+ }
808
+ },
809
+ verifyFeedback() {
810
+ let prefix = '拍照签名:'
811
+ if(Vue.android && (!this.data.f_overall_imgs || this.data.f_overall_imgs.length < this.imgsnum) && this.data.f_entry_status == '入户')
812
+ return prefix + `必须有${this.imgsnum}安检总体照片`
813
+ /*if(Vue.android && (!this.data.f_sign_path || this.data.f_sign_path.length == 0) && this.data.f_entry_status == '入户')
814
+ return prefix + '必须有用户签名'*/
815
+ // if(Vue.android && this.data.f_defect_notified && this.data.f_notified_path == Vue.nopic)
816
+ // return prefix + '下发安检通知书则必须给通知书拍照'
817
+ if(Vue.android && this.data.f_blacklist && this.data.f_blocking_cause=='')
818
+ return prefix + '请填写拉黑原因'
819
+ if(!this.data.f_client_evaluation && this.data.f_entry_status == '入户')
820
+ return prefix + '请选择服务评价'
821
+ },
822
+ getAllDefect() {
823
+ let checkResults = {
824
+ result: '正常',
825
+ data: []
826
+ }
827
+ let value = ''
828
+ let codata = JSON.parse(JSON.stringify(this.data))
829
+ codata.f_devices = []
830
+ this.f_devices = []
831
+ for (let device in codata) {
832
+ let f_device_type
833
+ if (device.startsWith("device")) {
834
+ let hasOther = ''
835
+ let otherValue = null
836
+ for (let item in codata[device]) {
837
+ if(typeof codata[device][item]=='function'){
838
+ continue
839
+ }
840
+ codata[device][item].f_create_time = Util.toStandardTimeString()
841
+ if (codata[device].length > 1) {
842
+ let j = Number.parseInt(item) + 1
843
+ f_device_type = `${codata[device][item].f_device_type}${j}`
844
+ } else {
845
+ f_device_type = codata[device][item].f_device_type
846
+ }
847
+ if(item == 'sum' || item == 'removeEmpty'){
848
+ continue
849
+ }
850
+ for (let i = 0; i < codata[device][item].f_items.length ; i++) {
851
+ //tag
852
+ if(i == 'sum' || i == 'removeEmpty'){
853
+ continue
854
+ }
855
+ var items = codata[device][item].f_items[i]
856
+ items.f_create_time = Util.toStandardTimeString()
857
+ items.f_item_lists = []
858
+ if (items.type == 'selector') {
859
+ items.selected = []
860
+ } else if (items.type == 'inputSelector') {
861
+ items.selected = ''
862
+ }
863
+ //遍历配置项 将所选隐患项的配置信息放入保存的数据中
864
+ let f_is_defect //是否是隐患
865
+ let f_defect_level //是否是隐患
866
+ let f_item_name = items.f_item_name
867
+ let f_item_value
868
+ if (items.type == 'selector' || items.type == 'checkbox' || items.type == 'radio') {
869
+ for (let i in items.f_item_value) {
870
+ if(typeof items.f_item_value[i]=='function'){
871
+ continue
872
+ }
873
+ let configItems = this.config[codata[device][item].f_device_type].items[f_item_name]
874
+ //tag)
875
+ for (let k in configItems.options) {
876
+ if(typeof configItems.options[k]=='function'){
877
+ continue
878
+ }
879
+ //tag)
880
+ if (items.f_item_value[i] === configItems.options[k].data) {
881
+
882
+ f_is_defect = configItems.options[k].isdefect
883
+ f_item_value = items.f_item_value[i]
884
+ f_defect_level = configItems.options[k].level
885
+ if (f_is_defect) {
886
+ if (checkResults.result !== '有隐患') {
887
+ checkResults.result = '有隐患'
888
+ }
889
+ console.log('items'+items)
890
+ if(items.f_deal_dispose=='报修'){
891
+ console.log("检测到需要转维修++++++++++++")
892
+ this.repairDefect.result='未处理'
893
+ this.repairDefect.data.push(`${f_item_name} : ${f_item_value}`)
894
+ }
895
+ if (!this.checkResult.hasOwnProperty(f_device_type+'-'+f_item_name)) {
896
+ this.checkResult[f_device_type+'-'+f_item_name] = []
897
+ }
898
+ this.checkResult[f_device_type+'-'+f_item_name].push(f_item_value)
899
+
900
+ }
901
+
902
+ let items_list = {
903
+ f_is_defect: f_is_defect,
904
+ f_item_value: f_item_value,
905
+ f_defect_level: f_defect_level,
906
+ f_is_eliminate: null,
907
+ f_create_time: Util.toStandardTimeString()
908
+ }
909
+ if (!items.f_item_lists) {
910
+ items.f_item_lists = []
911
+ if (JSON.stringify(items_list) !== '{}') {
912
+ items.f_item_lists.push(items_list)
913
+ }
914
+ } else {
915
+ if (JSON.stringify(items_list) !== '{}') {
916
+ items.f_item_lists.push(items_list)
917
+ }
918
+ }
919
+ }
920
+ }
921
+ }
922
+ } else {
923
+ let configItems = this.config[codata[device][item].f_device_type].items[items.f_item_name]
924
+ f_is_defect = items.f_is_defect
925
+ f_defect_level = items.level
926
+ f_item_value = items.f_item_value
927
+ let items_list = {
928
+ f_is_defect: f_is_defect,
929
+ f_item_value: f_item_value,
930
+ f_defect_level: f_defect_level,
931
+ f_create_time: Util.toStandardTimeString()
932
+ }
933
+ if (f_is_defect && f_item_value) {
934
+ items.f_is_defect = true
935
+ if (checkResults.result !== '有隐患') {
936
+ checkResults.result = '有隐患'
937
+ }
938
+ if (!this.checkResult.hasOwnProperty(items.f_item_name)) {
939
+ this.checkResult[items.f_item_name] = []
940
+ }
941
+
942
+ this.checkResult[items.f_item_name].push(f_item_value)
943
+
944
+ }
945
+ if (!items.f_item_lists) {
946
+ items.f_item_lists = []
947
+ if (JSON.stringify(items_list) != '{}') {
948
+ items.f_item_lists.push(items_list)
949
+ }
950
+ } else {
951
+ if (JSON.stringify(items_list) != '{}') {
952
+ items.f_item_lists.push(items_list)
953
+ }
954
+ }
955
+ }
956
+ if (hasOther !== '' && otherValue !== null) {
957
+ this.checkResult[hasOther].push(otherValue)
958
+ hasOther = ''
959
+ otherValue = null
960
+ }
961
+ items.f_item_value = ''
962
+ }
963
+ this.f_devices.push(codata[device][item])
964
+ }
965
+ }
966
+ }
967
+ if (this.checkResult) {
968
+ for (let key in this.checkResult) {
969
+ if(typeof this.checkResult[key]=='function'){
970
+ continue
971
+ }
972
+ // 上次安检结果数据组织
973
+ let temp = {}
974
+ temp[key] = this.checkResult[key].join(',')
975
+ checkResults.data.push(temp)
976
+ }
977
+ this.checkResult = {}
978
+ }
979
+ if (checkResults.data.length > 0) {
980
+ let msg = ''
981
+ for (let a = 0; a < checkResults.data.length; a++) {
982
+ for (let datumKey in checkResults.data[a]) {
983
+ msg += datumKey + ':' + checkResults.data[a][datumKey] + ';'
984
+ }
985
+ }
986
+ this.data.f_defect_text = msg
987
+ codata.f_defect_text = msg
988
+ }
989
+ codata.f_defect_content = JSON.stringify(checkResults)
990
+ this.data.f_defect_content = JSON.stringify(checkResults)
991
+ return codata
992
+ },
993
+ uploadCheckPaper(){
994
+ this.saveNoclick()
995
+ this.closely(false) // 保存本地,不删除录音文件停止录音
996
+ let errString = this.errorVerify()
997
+ if (errString) {
998
+ if (Vue.android){
999
+ this.$showMessage(errString)
1000
+ }
1001
+ return
1002
+ } else {
1003
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
1004
+ this.$set('data.f_upload_time', Util.toStandardTimeString())
1005
+ this.$set('data.f_upload_date', Util.toStandardTimeString())
1006
+ this.data.f_complete = '已完成'
1007
+ this.disableTimer()
1008
+ }
1009
+ this.onlySave = false
1010
+ this.assemblyCodata()
1011
+ if (this.repairDefect.result != '正常') {
1012
+ return this.$showMessage('有隐患的处理方式为转维修,请点击转维修')
1013
+ }
1014
+ this.save()
1015
+
1016
+ },
1017
+ //将数据组装提出
1018
+ assemblyCodata(){
1019
+ let codata = this.getAllDefect()
1020
+ console.log(`codata类型 开始组装codeta数据-->${typeof codata}`)
1021
+ console.log(`codata内容-->${JSON.stringify(codata)}`)
1022
+ for (let key in codata) {
1023
+ if (key.startsWith("device")) {
1024
+ console.log('this.data.' + key + JSON.stringify(codata[key]))
1025
+ codata[key] = []
1026
+ }
1027
+ }
1028
+ codata.f_devices = this.f_devices
1029
+ this.rowCodata=codata
1030
+ },
1031
+ save(type) {
1032
+ if (type == 'temp' || type == 'finish') {
1033
+ this.assemblyCodata()
1034
+ }
1035
+ //禁用事件
1036
+ this.saveNoclick()
1037
+ if(type == 'temp'){
1038
+ this.data.f_complete = '未完成'
1039
+ this.rowCodata.f_complete = '未完成'
1040
+ // 关闭录音方法
1041
+ this.closely(true) //临时保存,删除录音文件并暂停录音
1042
+ this.disableTimer()
1043
+ }else {
1044
+ // 关闭录音方法
1045
+ this.closely(false) // 保存本地,不删除录音文件暂停录音
1046
+ let errString = this.errorVerify()
1047
+ if (errString) {
1048
+ if (Vue.android){
1049
+ this.$showMessage(errString)
1050
+ }
1051
+ return
1052
+ } else {
1053
+ this.data.f_complete = '已完成'
1054
+ this.rowCodata.f_complete = '已完成'
1055
+ this.$set('data.f_offsite_time', Util.toStandardTimeString())
1056
+ this.$set('rowCodata.f_offsite_time', Util.toStandardTimeString())
1057
+ this.disableTimer()
1058
+ }
1059
+ }
1060
+ if(this.data.f_blacklist!='是'){
1061
+ delete this.data.f_blocking_cause
1062
+ }
1063
+ if (this.data.f_entry_status == '入户') {
1064
+ this.data.f_rejectchecks_path = []
1065
+ this.data.f_rejectcheck_path = null
1066
+ this.data.f_rejectcheck1_path = null
1067
+ this.data.f_rejectcheck2_path = null
1068
+ this.data.f_noanswers_path=[]
1069
+ this.data.f_noanswer_path = null
1070
+ this.data.f_noanswer1_path = null
1071
+ this.data.f_noanswer2_path = null
1072
+ }else if (this.data.f_entry_status == '到访不遇') {
1073
+ this.data.f_rejectchecks_path = []
1074
+ this.data.f_rejectcheck_path = null
1075
+ this.data.f_rejectcheck1_path = null
1076
+ this.data.f_rejectcheck2_path = null
1077
+ }else if (this.data.f_entry_status == '拒检') {
1078
+ this.data.f_noanswers_path=[]
1079
+ this.data.f_noanswer_path = null
1080
+ this.data.f_noanswer1_path = null
1081
+ this.data.f_noanswer2_path = null
1082
+ }
1083
+ let codata = this.rowCodata
1084
+ for (let key in codata) {
1085
+ if (key.startsWith("device")) {
1086
+ codata[key] = []
1087
+ }
1088
+ }
1089
+ codata.f_complete = this.data.f_complete
1090
+ if (Vue.android) {
1091
+ let value = this.$androidUtil.path({
1092
+ alias: 'getUserinfomation',
1093
+ data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
1094
+ })
1095
+ if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && this.item.f_no_checkplan != '打回') {
1096
+ codata.f_devices = this.f_devices
1097
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1098
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1099
+ } else {
1100
+ this.rowCodata = codata
1101
+ }
1102
+ this.rowCodata.f_tablebase = this.data.f_new_tablebase
1103
+ let param = {
1104
+ f_check_item_id: this.data.f_check_item_id,
1105
+ f_checker_id: this.data.f_checker_id,
1106
+ f_upload_state: '未传',
1107
+ row: this.rowCodata
1108
+ }
1109
+ let paramStr = JSON.stringify(param)
1110
+ // 多长截断一次
1111
+ let subLength = 800
1112
+ for (let i = 0; i < paramStr.length; i += subLength) {
1113
+ HostApp.param_cache(paramStr.slice(i, i + subLength))
1114
+ }
1115
+ HostApp.__this__ = this
1116
+ HostApp.syncLogic({
1117
+ // logic别名,key必须为logic
1118
+ 'logic': 'SafeSaveNoPaper',
1119
+ // 回调执行方法名,key必须为callback
1120
+ 'callback': 'javascript:HostApp.__this__.saveCallBack()',
1121
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1122
+ // 执行回调方法传入key为backresult
1123
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1124
+ 'backresult': 1
1125
+ })
1126
+ } else {
1127
+ codata.f_devices = this.f_devices
1128
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1129
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1130
+ } else {
1131
+ this.rowCodata = codata
1132
+ }
1133
+ this.rowCodata.f_tablebase = this.data.f_new_tablebase
1134
+ let param = {
1135
+ f_check_item_id: this.data.f_check_item_id,
1136
+ f_checker_id: this.data.f_checker_id,
1137
+ row: this.rowCodata
1138
+ }
1139
+ let paramStr = JSON.stringify(param)
1140
+ // 多长截断一次
1141
+ let subLength = 800
1142
+ for (let i = 0; i < paramStr.length; i += subLength) {
1143
+ HostApp.param_cache(paramStr.slice(i, i + subLength))
1144
+ }
1145
+ HostApp.__this__ = this
1146
+ HostApp.syncLogic({
1147
+ // logic别名,key必须为logic
1148
+ 'logic': '保存安检单信息',
1149
+ // 回调执行方法名,key必须为callback
1150
+ 'callback': 'javascript:HostApp.__this__.saveCallBack()',
1151
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1152
+ // 执行回调方法传入key为backresult
1153
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1154
+ 'backresult': 1
1155
+ })
1156
+ }
1157
+
1158
+ } else {
1159
+ let value = this.$androidUtil.path({
1160
+ alias: 'getUserinfomation',
1161
+ data: {condition: "f_userinfoid = '" + this.item.f_userinfoid + "' and f_no_checkplan in ('无计划安检','复检')"}
1162
+ })
1163
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1164
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1165
+ } else {
1166
+ this.rowCodata = codata
1167
+ }
1168
+ if ((this.item.f_no_checkplan == '无计划安检' || this.item.f_no_checkplan == '复检') && value.data.length == 0 && this.item.f_no_checkplan != '打回') {
1169
+ this.$androidUtil.bzLogic('SafeSaveNoPaper', {
1170
+ f_check_item_id: this.data.f_check_item_id,
1171
+ f_checker_id: this.data.f_checker_id,
1172
+ f_upload_state: '未传',
1173
+ row: this.rowCodata
1174
+ }).then((res) => {
1175
+ if (res.data.code == 200) {
1176
+ //保存devices
1177
+ this.$androidUtil.bzLogic('getPaperInfo', {
1178
+ f_check_item_id: this.data.f_check_item_id
1179
+ }).then((res) => {
1180
+ if (res.data.code == 200) {
1181
+ let f_paper_id = res.data.data[0].id
1182
+ for (let device of this.f_devices) {
1183
+ device.f_paper_id = f_paper_id
1184
+ this.$androidUtil.bzLogic('saveDevice', {
1185
+ row: device
1186
+ }).then((ret) => {
1187
+ if (ret.code != 200) {
1188
+ //TODO 失败后处理
1189
+ this.$showMessage("保存失败!")
1190
+ return false
1191
+ }
1192
+ })
1193
+ }
1194
+ }
1195
+ })
1196
+ this.$showMessage('保存成功!')
1197
+ return true
1198
+ } else {
1199
+ this.$showMessage("保存失败!")
1200
+ return false
1201
+ }
1202
+ })
1203
+ }
1204
+ else {
1205
+ this.$androidUtil.bzLogic('保存安检单信息', {
1206
+ f_check_item_id: this.data.f_check_item_id,
1207
+ f_checker_id: this.data.f_checker_id,
1208
+ row: this.rowCodata
1209
+ }).then((res) => {
1210
+ if (res.data.code == 200) {
1211
+ //保存devices
1212
+ this.$androidUtil.bzLogic('getPaperInfo', {
1213
+ f_check_item_id: this.data.f_check_item_id
1214
+ }).then((res) => {
1215
+ if (res.data.code == 200) {
1216
+
1217
+ let f_paper_id = res.data.data[0].id
1218
+ for (let device of this.f_devices) {
1219
+ device.f_paper_id = f_paper_id
1220
+ this.$androidUtil.bzLogic('saveDevice', {
1221
+ row: device
1222
+ }).then((ret) => {
1223
+ if (ret.code != 200) {
1224
+ //TODO 失败后处理
1225
+ this.$showMessage("保存失败!")
1226
+ return false
1227
+ }
1228
+ })
1229
+ }
1230
+ }
1231
+ })
1232
+ this.$showMessage('保存成功!')
1233
+ return true
1234
+ } else {
1235
+ this.$showMessage("保存失败!")
1236
+ return false
1237
+ }
1238
+ })
1239
+ }
1240
+ }
1241
+ },
1242
+ runSyncLogic(logic,callback,backresult){
1243
+ HostApp.runSyncLogic({
1244
+ // logic别名,key必须为logic
1245
+ 'logic': logic,
1246
+ // 回调执行方法名,key必须为callback
1247
+ 'callback': callback,
1248
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1249
+ // 执行回调方法传入key为backresult
1250
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1251
+ 'backresult':backresult
1252
+ })
1253
+ },
1254
+ logicWithHint(logic,data,callback,backresult){
1255
+ HostApp.logicWithHint({
1256
+ // logic别名,key必须为logic
1257
+ 'logic': logic,
1258
+ // 回调执行方法名,key必须为callback
1259
+ 'callback': callback,
1260
+ // logic执行需要的业务参数
1261
+ 'data': data,
1262
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1263
+ // 执行回调方法传入key为backresult
1264
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1265
+ 'backresult':backresult
1266
+ })
1267
+ },
1268
+ saveCallBack(jo){
1269
+ if(jo.state == 'ok'){
1270
+ let res = JSON.parse(jo.result)
1271
+ if(res.code == 200){
1272
+ if(!this.onlySave){
1273
+ let codata = this.getAllDefect()
1274
+ //获取微信推送内容
1275
+ // let WxResult = this.getWeixin(codata)
1276
+ let haslivedispose = this.$androidUtil.bzLogic('getLiveDispose', {
1277
+ f_check_item_id: this.data.f_check_item_id
1278
+ })
1279
+ //如果是转维修上传,则不做校验,上传完成后自动转维修
1280
+ if(!this.isToRepair){
1281
+ if(haslivedispose.data.length > 0 && (this.livedispose == 'true' || this.livedispose == true)){
1282
+ if(!this.isSafeCheckToRepair){
1283
+
1284
+ }
1285
+ }
1286
+ }
1287
+ for (let key in codata){
1288
+ if(key.startsWith("device")){
1289
+ codata[key] = []
1290
+ }
1291
+ }
1292
+ codata.f_devices = this.f_devices
1293
+ if (this.rowCodata && this.rowCodata.istoRepair=='转维修') {
1294
+ this.rowCodata = Object.assign({},this.rowCodata,codata)
1295
+ } else {
1296
+ this.rowCodata = codata
1297
+ }
1298
+ this.rowCodata.f_tablebase = null
1299
+ let param = {
1300
+ f_check_item_id: this.data.f_check_item_id,
1301
+ f_checker_id: this.data.f_checker_id,
1302
+ row: this.rowCodata
1303
+ }
1304
+ let paramStr = JSON.stringify(param)
1305
+ // 多长截断一次
1306
+ let subLength = 800
1307
+ for (let i = 0; i < paramStr.length; i += subLength) {
1308
+ HostApp.param_cache(paramStr.slice(i, i + subLength))
1309
+ }
1310
+ HostApp.__this__ = this
1311
+ HostApp.syncLogic({
1312
+ // logic别名,key必须为logic
1313
+ 'logic': '上传安检信息',
1314
+ // 回调执行方法名,key必须为callback
1315
+ 'callback': 'javascript:HostApp.__this__.uploadCallBack()',
1316
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
1317
+ // 执行回调方法传入key为backresult
1318
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
1319
+ 'backresult': 1
1320
+ })
1321
+ }else{
1322
+ this.$showMessage('保存成功!')
1323
+ if(this.clickBack){
1324
+ this.isStrat = false
1325
+ this.$dispatch('confirm')
1326
+ }
1327
+ }
1328
+ }else{
1329
+ this.$showMessage('保存失败!')
1330
+ return
1331
+ }
1332
+ }else{
1333
+ this.$showMessage('服务器内部错误,保存失败!')
1334
+ return
1335
+ }
1336
+ },
1337
+ uploadCallBack(jo){
1338
+ //获取微信推送路径
1339
+ let url = ""
1340
+ if(Vue.config.safecheck != undefined) {
1341
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
1342
+ if (Vue.config.safecheck.ApproveConfig.weixinurl != undefined) {
1343
+ url = Vue.config.safecheck.ApproveConfig.weixinurl
1344
+ }
1345
+ }
1346
+ }
1347
+ if(jo.state == 'ok'){
1348
+ let res = JSON.parse(jo.result)
1349
+ if(res.code == 200){
1350
+ this.$set('data.f_paper_id', res.id)
1351
+ this.isStrat=false
1352
+ if(url != ""){
1353
+ this.$resetpost(`${url}`,{data:WxResult})
1354
+ }
1355
+ // 预约安检回更预约安检单
1356
+ if(this.data.isupdateplanitem == 'true' && this.data.f_SafeToRepair_id){
1357
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/api/af-safecheck/logic/ReturnSafeService`, {data:{
1358
+ f_paper_id:this.data.f_paper_id,
1359
+ f_service_id:this.data.f_SafeToRepair_id
1360
+ }
1361
+ }).then((ret) => {
1362
+ if(ret.data && ret.data.code == 200){
1363
+ console.log('预约安检回更成功')
1364
+ }
1365
+ })
1366
+ }
1367
+ if(this.isToRepair){
1368
+ for (let device in this.data){
1369
+ if(device.startsWith("device")){
1370
+ this.data[device] = []
1371
+ if(res.data.length > 0){
1372
+ for(let i in res.data[0].f_devices){
1373
+ if(this.data[device].length > 0){
1374
+ if(this.data[device][0].f_device_type == res.data[0].f_devices[i].f_device_type){
1375
+ this.data[device].push(res.data[0].f_devices[i])
1376
+ res.data[0].f_devices.splice(i,1)
1377
+ }
1378
+ }else{
1379
+ this.data[device].push(res.data[0].f_devices[i])
1380
+ res.data[0].f_devices.splice(i,1)
1381
+ }
1382
+ }
1383
+ }
1384
+ }
1385
+ }
1386
+ this.todo()
1387
+ }else{
1388
+ this.$showMessage('安检上传成功!')
1389
+ if (this.data.f_userinfoid){
1390
+ let http = new HttpResetClass()
1391
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/tel_singleTable_OrderBy`, {
1392
+ data: {
1393
+ items: 'count(0) as num',
1394
+ tablename: 't_userfiles a left join t_userinfo b on a.f_userinfo_id = b.f_userinfo_id',
1395
+ condition: `a.f_userinfo_id = '${this.item.f_userinfoid}' and a.f_meter_classify != '物联网表' and a.f_table_state = '正常' and b.f_user_state='正常'`,
1396
+ orderitem: '1'
1397
+ }
1398
+ }, {resolveMsg: null, rejectMsg: null}).then((response) => {
1399
+ if (response.data[0].num > 0 ){
1400
+ let _this = this
1401
+ this.$showMessage(`是否前往抄表`, ['confirm', 'cancel']).then((res) => {
1402
+ if (res === 'confirm') {
1403
+ let http = new HttpResetClass()
1404
+ http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-readmeter/sql/PcHandInfo`, {data:{
1405
+ sort: `asc`,
1406
+ condition:`f_userinfo_id = '${_this.data.f_userinfoid}'`
1407
+ }
1408
+ }, {resolveMsg: null, rejectMsg: null}).then((res) => {
1409
+ let param = {}
1410
+ param = res.data[0]
1411
+ param.f_new_tablebase = _this.data.f_new_tablebase
1412
+ param.tabname="在线抄表"
1413
+ var pardate = {
1414
+ _this:this,
1415
+ tittle:'抄表单信息',
1416
+ safe:false
1417
+ }
1418
+ this.$dispatch('gotoson',pardate)
1419
+ this.$goto('phone-hand-edit', {data:param,source:'抄表',type:'save'}, 'self', function (){
1420
+ _this.$dispatch('confirm')
1421
+ }
1422
+ )
1423
+ })
1424
+ }else {
1425
+ this.$dispatch('tijiao')
1426
+ }
1427
+ })
1428
+ }else {
1429
+ this.$dispatch('tijiao')
1430
+ }
1431
+ })
1432
+ }else{
1433
+ this.$dispatch('tijiao')
1434
+ }
1435
+ }
1436
+ }else if(res.code == 309){
1437
+ this.$showMessage('该安检单已作废!')
1438
+ this.$dispatch('confirm')
1439
+ }else if(res.code == 710){
1440
+ this.$showMessage('上传照片失败,请检查网络是否正常!'+res.msg)
1441
+ this.onlySave = true
1442
+ return
1443
+ }else if(res.code == 711){
1444
+ this.$showMessage('该安检单已被管理员调整,请联系管理员!')
1445
+ this.onlySave = true
1446
+ return
1447
+ }else if(res.code == 712){
1448
+ this.$showMessage('网络异常,请缓存后重新尝试上传,多次上传失败请联系管理员!')
1449
+ this.onlySave = true
1450
+ return
1451
+ }
1452
+ else{
1453
+ this.$showMessage('上传失败!')
1454
+ }
1455
+ }else {
1456
+ this.$showMessage('网络异常,上传失败!')
1457
+ }
1458
+ this.onlySave = true
1459
+ },
1460
+ safecheckToRepairCallBack(jo){
1461
+ //获取微信推送路径
1462
+ if(jo.state == 'ok'){
1463
+ let res = JSON.parse(jo.result)
1464
+ if(res.code == 200){
1465
+ if(res.data.code == 200){
1466
+ this.$showMessage('上传并转维修成功!')
1467
+ }else{
1468
+ this.$showMessage('上传并转维修成功,回写安检单失败!')
1469
+ }
1470
+ this.$dispatch('confirm')
1471
+ }else{
1472
+ this.$showMessage('上传失败!')
1473
+ this.onlySave = true
1474
+ }
1475
+ }else{
1476
+ this.$showMessage('网络异常,上传失败!')
1477
+ this.onlySave = true
1478
+ }
1479
+ },
1480
+ todo(){
1481
+ let gen = getRepairParam(this)
1482
+ co(gen)
1483
+ },
1484
+ undo(){
1485
+ this.showCheckToRepair = !this.showCheckToRepair
1486
+ this.model.serviceacitivity[0].f_reciever = ''
1487
+ this.model.serviceacitivity[0].f_meetunit = ''
1488
+ this.model.f_repairtype = ''
1489
+ this.meading = '转站点'
1490
+ },
1491
+ disableTimer() {
1492
+ if(this.timer) {
1493
+ window.clearTimeout(this.timer)
1494
+ this.timer = null
1495
+ }
1496
+ },
1497
+ loaded(paper) {
1498
+ if(!paper.hasOwnProperty('id')) {
1499
+ this.$showMessage("该安检单在手机上已经不存在,可能是卸载过程序。可以进入重新安检,或返回安检计划。")
1500
+ this.init()
1501
+ } else {
1502
+ Util.booleanFilter(paper)
1503
+ HostApp.__this__.$set('data', paper)
1504
+ HostApp.__this__.$goto('safecheck-userinfo', {}, 'paper-router')
1505
+ // 如果打回重检则重新计时
1506
+ if(HostApp.__this__.role == 'inspect'
1507
+ && HostApp.__this__.data.f_approved
1508
+ && HostApp.__this__.data.f_approved == '打回') {
1509
+ HostApp.__this__.data.f_onsite_time = Util.toStandardTimeString()
1510
+ HostApp.__this__.tick()
1511
+ }
1512
+ }
1513
+ HostApp.__callback__ = null
1514
+ HostApp.__this__ = null
1515
+ },
1516
+ S4() {
1517
+ return (((1+Math.random())*0x10000)|0).toString(16).substring(1);
1518
+ },
1519
+ extend(initalObj, finalObj) {
1520
+ var obj = finalObj || {};
1521
+ for (var i in initalObj) {
1522
+ var prop = initalObj[i];
1523
+
1524
+ // 避免相互引用对象导致死循环,如initalObj.a = initalObj的情况
1525
+ if (prop === obj) {
1526
+ continue;
1527
+ }
1528
+
1529
+ if (typeof prop === 'object') {
1530
+ if (obj[i]) {
1531
+ this.extend(obj[i], prop)
1532
+ } else {
1533
+ obj[i] = prop;
1534
+ }
1535
+ }
1536
+ }
1537
+ return obj;
1538
+ },
1539
+ putDevices() {
1540
+ this.$set('data.approve', "true")
1541
+ this.$set('data.writeback', "false")
1542
+ if (Vue.config.safecheck != undefined) {
1543
+ if (Vue.config.safecheck.ApproveConfig != undefined) {
1544
+ if (Vue.config.safecheck.ApproveConfig.approve != undefined) {
1545
+ this.$set('data.approve', Vue.config.safecheck.ApproveConfig.approve)
1546
+ }
1547
+ if (Vue.config.safecheck.ApproveConfig.writeback != undefined) {
1548
+ this.$set('data.writeback', Vue.config.safecheck.ApproveConfig.writeback)
1549
+ }
1550
+ if (Vue.config.safecheck.ApproveConfig.livedispose != undefined) {
1551
+ this.livedispose = Vue.config.safecheck.ApproveConfig.livedispose
1552
+ }
1553
+ if (Vue.config.safecheck.ApproveConfig.showtorepair) {
1554
+ this.show_torepair = Vue.config.safecheck.ApproveConfig.showtorepair
1555
+ }
1556
+ if (Vue.config.safecheck.ApproveConfig.notencountered != undefined){
1557
+ this.notencountered = Vue.config.safecheck.ApproveConfig.notencountered
1558
+ }
1559
+ if (Vue.config.safecheck.ApproveConfig.refuseinspection != undefined){
1560
+ this.refuseinspection = Vue.config.safecheck.ApproveConfig.refuseinspection
1561
+ }
1562
+ }
1563
+ if(this.item.f_user_type == '非民用'){
1564
+ // 非民用
1565
+ if (Vue.config.safecheck.DevicesSetConfig != undefined){
1566
+ if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
1567
+ this.config = this.extend(this.config, Vue.config.safecheck.DevicesSetConfig)
1568
+ }else{
1569
+ this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type]])
1570
+ }
1571
+ }
1572
+
1573
+ }else{
1574
+ // 民用户
1575
+ if (Vue.config.safecheck.DevicesConfig != undefined){
1576
+ if(this.item.f_safecheck_type == undefined || this.item.f_safecheck_type == '' || Vue.config.safecheck.SafecheckType == undefined) {
1577
+ this.config = this.extend(this.config, Vue.config.safecheck.DevicesConfig)
1578
+ }else{
1579
+ this.config = this.extend(this.config, Vue.config.safecheck[Vue.config.safecheck.SafecheckType[this.item.f_safecheck_type][this.item.f_user_type?this.item.f_user_type:'民用']])
1580
+ }
1581
+ }
1582
+ }
1583
+
1584
+ }
1585
+ // 预留设备项位置
1586
+ for (let i in this.config) {
1587
+ this.tabs.splice(1,0,null)
1588
+ }
1589
+ //遍历安检项配置
1590
+ for (let i in this.config) {
1591
+ //取得安检项索引值
1592
+ let n = this.config[i].index
1593
+ this.devices[n - 1] = {device: i, n: n, checkmust: this.config[i].checkmust}
1594
+ this.$set('data.' + 'device' + n, [])
1595
+ this.tabs[n] = {
1596
+ header: i,
1597
+ complete: 'safecheck-devices',
1598
+ class: 'repair-details-class',
1599
+ number: n
1600
+ }
1601
+
1602
+ if(this.config[i].quantity && this.config[i].quantity >0){
1603
+ let items = []
1604
+ for (let it in this.config[i].items) {
1605
+ //赋值下拉选项
1606
+ if (this.config[i].items[it].type == 'selector') {
1607
+ for (let op in this.config[i].items[it].options) {
1608
+ if (this.config[i].items[it].options[op].isdefault == true) {
1609
+ items.push({
1610
+ f_defect_level: this.config[i].items[it].options[op].level,
1611
+ f_is_defect: this.config[i].items[it].options[op].isdefect,
1612
+ f_item_name: it,
1613
+ f_item_value: this.config[i].items[it].options[op].data,
1614
+ f_path: "",
1615
+ type: "selector"
1616
+ })
1617
+ }
1618
+ }
1619
+ }
1620
+ }
1621
+ for(let q =0;q<this.config[i].quantity;q++) {
1622
+ this.data['device' + n].push(
1623
+ {f_device_type: i, f_items:items}
1624
+ )
1625
+ }
1626
+ }
1627
+ n = n + 1
1628
+ }
1629
+ this.faultshow.number = this.tabs.length
1630
+ },
1631
+ init () {
1632
+ // 无计划安检是否回更待办计划
1633
+ this.data.isupdateplanitem = this.$appdata.getSingleValue('在线安检回更有计划') ? this.$appdata.getSingleValue('在线安检回更有计划') : 'false'
1634
+ // 预约安检单工单编号
1635
+ this.data.f_SafeToRepair_id = this.item.f_service_id
1636
+ this.data.ename = Vue.user.ename
1637
+ this.data.f_outlets = Vue.user.f_parentname
1638
+ this.data.f_meetunit = Vue.user.orgpathnames
1639
+ this.data.orgpathstr = Vue.user.orgpathstr
1640
+ this.data.f_check_item_id = this.item.id
1641
+ this.data.f_check_plan_id = this.f_plan_id
1642
+ this.data.f_checker_id = Vue.user.id
1643
+ this.data.f_checker_name = Vue.user.name
1644
+ this.data.f_check_type = this.item.f_user_type
1645
+ this.data.f_safecheck_type = this.item.f_safecheck_type
1646
+ this.data.f_subcompany = this.item.f_subcompany
1647
+ this.data.f_approved = this.item.f_approvedf_read_instructions
1648
+ this.data.f_repair_approved = this.item.f_repair_approved
1649
+ this.data.f_no_checkplan = this.item.f_no_checkplan
1650
+ this.data.f_approved = this.item.f_approved
1651
+ this.data.f_filialeid = this.item.f_filialeid || Vue.user.orgid
1652
+ this.data.f_orgstr = this.item.f_orgstr
1653
+ this.data.version = this.item.version
1654
+ this.data.f_check_version=this.item.f_check_version
1655
+ this.$set('data.f_meters', this.item.f_plan_meters)
1656
+ this.$set('data.f_userinfo_code', this.item.f_userinfo_code)
1657
+ // 安检状态
1658
+ this.$set('data.f_entry_status', '入户')
1659
+ this.$set('data.f_safe_type', '年度安检')
1660
+ this.$set('data.f_usegas', '已使用')
1661
+ this.$set('data.f_state',this.item.f_state)
1662
+ this.$set('data.f_source', this.source?this.source:'安检')
1663
+ this.$set('data.f_other_checker_name', '')
1664
+ // this.$set('data.f_defect_notified', true)
1665
+ // 用户信息
1666
+ this.$set('data.f_user_name', this.item.f_user_name)
1667
+ this.$set('data.f_rent_phone', this.item.f_rent_phone)
1668
+ this.$set('data.f_user_phone', this.item.f_user_phone || this.item.f_plan_meters[0].f_user_phone)
1669
+ this.$set('data.f_userinfoid', this.item.f_userinfoid)
1670
+ this.$set('data.f_address', this.item.f_address)
1671
+ this.$set('data.f_card_id', this.item.f_card_id)
1672
+ this.$set('data.f_slice_area', this.item.f_slice_area)
1673
+ this.$set('data.f_recheck_id', this.item.id)
1674
+ this.$set('rowCodata.f_recheck_id', this.item.id)
1675
+ this.$set('data.f_street', this.item.f_street)
1676
+ this.$set('data.f_room', this.item.f_room)
1677
+ this.$set('data.f_building', this.item.f_building)
1678
+ this.$set('data.f_unit', this.item.f_unit)
1679
+ this.$set('data.f_floor', this.item.f_floor)
1680
+ this.$set('data.f_residential_area' , this.item.f_residential_area)
1681
+ this.$set('data.f_idnumber', this.item.f_idnumber)
1682
+ this.$set('data.f_comments', this.item.f_comments)
1683
+ this.$set('data.f_userproperties', this.item.f_userproperties)
1684
+ this.$set('data.f_client_evaluation', '满意')
1685
+ this.$set('data.f_userfiles_id', this.item.f_plan_meters[0].f_userfiles_id)
1686
+ this.$set('data.f_valve_state', this.item.f_plan_meters[0].f_valve_state)
1687
+ this.$set('data.f_off_valve_reason', this.item.f_plan_meters[0].f_off_valve_reason)
1688
+ // 处置方式
1689
+ this.$set('data.f_gas_guidelines', true)
1690
+ this.$set('data.f_safety_warning', true)
1691
+ this.$set('data.f_gas_manual', true)
1692
+ this.$set('data.f_no_gas_device', false)
1693
+ this.$set('data.f_close_valve', false)
1694
+ this.$set('data.f_unload_battery', false)
1695
+ if (this.data.f_check_item_id == '' && this.item.f_no_checkplan == '无计划安检' ) {
1696
+ this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
1697
+ }
1698
+ if(this.item.f_no_checkplan == '复检'){
1699
+ this.data.f_check_item_id = this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4() + "" + this.S4()
1700
+ }
1701
+ if(this.item.f_plan_meters) {
1702
+ for (let de in this.devices) {
1703
+ if(typeof this.devices[de]=='function'){
1704
+ continue
1705
+ }
1706
+ this.$set('data.device' + this.devices[de].n, [])
1707
+ for (let i = 0; i < this.item.f_plan_meters.length; i++) {
1708
+ if (this.item.f_plan_meters[i].f_meter_type) {
1709
+ this.data.f_meter_type=this.item.f_plan_meters[i].f_meter_type
1710
+ //tag)
1711
+ if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('机表') >= 0) {
1712
+ this.data['device' + this.devices[de].n].push({
1713
+ f_device_type: "燃气表",
1714
+ f_items: [
1715
+ {
1716
+ f_defect_level: null,
1717
+ f_device_id: "",
1718
+ f_is_defect: "",
1719
+ f_item_name: "基表编号",
1720
+ f_item_value: this.item.f_plan_meters[i].f_meter_no,
1721
+ f_path: "",
1722
+ type: "number"
1723
+ },
1724
+ {
1725
+ f_defect_level: null,
1726
+ f_device_id: "",
1727
+ f_is_defect: "",
1728
+ f_item_name: "气表型号",
1729
+ f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
1730
+ f_path: "",
1731
+ type: "string"
1732
+ },
1733
+ {
1734
+ f_defect_level: null,
1735
+ f_device_id: "",
1736
+ f_is_defect: "",
1737
+ f_item_name: "气表品牌",
1738
+ f_item_value: this.item.f_plan_meters[i].f_aliasname,
1739
+ f_path: "",
1740
+ type: "string"
1741
+ },
1742
+ {
1743
+ f_defect_level: null,
1744
+ f_device_id: "",
1745
+ f_is_defect: "",
1746
+ f_item_name: "表向",
1747
+ f_item_value: this.item.f_plan_meters[i].f_flow_direction,
1748
+ f_path: "",
1749
+ type: "string"
1750
+ },
1751
+ {
1752
+ f_defect_level: null,
1753
+ f_device_id: "",
1754
+ f_is_defect: "",
1755
+ f_item_name: "上期表读数",
1756
+ f_item_value: this.item.f_plan_meters[i].f_prior_reading,
1757
+ f_path: "",
1758
+ type: "number"
1759
+ },
1760
+ {
1761
+ f_defect_level: null,
1762
+ f_device_id: "",
1763
+ f_is_defect: "",
1764
+ f_item_name: "表封号",
1765
+ f_item_value: this.item.f_plan_meters[i].f_metertitles,
1766
+ f_path: "",
1767
+ type: "string"
1768
+ }
1769
+ ]
1770
+ })
1771
+ }
1772
+ else if (this.devices[de].device == "燃气表") {
1773
+ this.data['device' + this.devices[de].n].push({
1774
+ f_device_type: "燃气表",
1775
+ f_items: [
1776
+ {
1777
+ f_defect_level: null,
1778
+ f_device_id: "",
1779
+ f_is_defect: "",
1780
+ f_item_name: "基表编号",
1781
+ f_item_value: this.item.f_plan_meters[i].f_meter_no,
1782
+ f_path: "",
1783
+ type: "number"
1784
+ },
1785
+ {
1786
+ f_defect_level: null,
1787
+ f_device_id: "",
1788
+ f_is_defect: "",
1789
+ f_item_name: "气表型号",
1790
+ f_item_value: this.item.f_plan_meters[i].f_diaphgram_size,
1791
+ f_path: "",
1792
+ type: "string"
1793
+ },
1794
+ {
1795
+ f_defect_level: null,
1796
+ f_device_id: "",
1797
+ f_is_defect: "",
1798
+ f_item_name: "气表品牌",
1799
+ f_item_value: this.item.f_plan_meters[i].f_aliasname,
1800
+ f_path: "",
1801
+ type: "string"
1802
+ },
1803
+ {
1804
+ f_defect_level: null,
1805
+ f_device_id: "",
1806
+ f_is_defect: "",
1807
+ f_item_name: "表向",
1808
+ f_item_value: this.item.f_plan_meters[i].f_flow_direction,
1809
+ f_path: "",
1810
+ type: "string"
1811
+ },
1812
+ {
1813
+ f_defect_level: null,
1814
+ f_device_id: "",
1815
+ f_is_defect: "",
1816
+ f_item_name: "上期表读数",
1817
+ f_item_value: this.item.f_plan_meters[i].f_prior_reading,
1818
+ f_path: "",
1819
+ type: "number"
1820
+ },
1821
+ {
1822
+ f_defect_level: null,
1823
+ f_device_id: "",
1824
+ f_is_defect: "",
1825
+ f_item_name: "表封号",
1826
+ f_item_value: this.item.f_plan_meters[i].f_metertitles,
1827
+ f_path: "",
1828
+ type: "string"
1829
+ }
1830
+ ]
1831
+ })
1832
+ }
1833
+ if(this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_meter_type.indexOf('物联网表') >= 0){
1834
+ this.data['device' + this.devices[de].n].forEach(device => {
1835
+ if (!this.data.f_collection_type) {
1836
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
1837
+ delete this.config['燃气表']['items']['累购气量']
1838
+ delete this.config['燃气表']['items']['已用金额']
1839
+ delete this.config['燃气表']['items']['剩余气量']
1840
+ delete this.config['燃气表']['items']['气量异常差值']
1841
+ delete this.config['燃气表']['items']['金额异常差值']
1842
+ device.f_items.push(
1843
+ {
1844
+ f_defect_level: null,
1845
+ f_device_id: "",
1846
+ f_is_defect: "",
1847
+ f_item_name: "初始表底",
1848
+ isshow: true,
1849
+ f_item_value: this.item.f_plan_meters[i].f_initial_base,
1850
+ f_path: "",
1851
+ type: "number"
1852
+ },
1853
+ {
1854
+ f_defect_level: null,
1855
+ f_device_id: "",
1856
+ f_is_defect: "",
1857
+ f_item_name: "累购金额",
1858
+ f_item_value: this.item.f_plan_meters[i].f_total_fee,
1859
+ f_path: "",
1860
+ type: "number"
1861
+ },
1862
+ {
1863
+ f_defect_level: null,
1864
+ f_device_id: "",
1865
+ f_is_defect: "",
1866
+ f_item_name: "已用气量",
1867
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
1868
+ f_path: "",
1869
+ type: "number"
1870
+ },
1871
+ {
1872
+ f_defect_level: null,
1873
+ f_device_id: "",
1874
+ f_is_defect: "",
1875
+ f_item_name: "剩余金额",
1876
+ f_item_value: '',
1877
+ f_path: "",
1878
+ type: "number"
1879
+ },
1880
+ {
1881
+ f_defect_level: null,
1882
+ f_device_id: "",
1883
+ f_is_defect: "",
1884
+ f_item_name: "系统余额",
1885
+ f_item_value: this.item.f_plan_meters[i].f_balance_amount,
1886
+ f_path: "",
1887
+ type: "number"
1888
+ }
1889
+ )
1890
+ }
1891
+ })
1892
+ } else if (this.devices[de].device == "燃气表" && this.item.f_plan_meters[i].f_collection_type) {
1893
+ this.data['device' + this.devices[de].n].forEach(device => {
1894
+ /*
1895
+ "累购气量":{"index":8,"type":"number","readonly":true},
1896
+ "累购金额":{"index":8,"type":"number","readonly":true},
1897
+ "字轮读数":{"index":9,"type":"number","checkmust": true},
1898
+ "已用金额":{"index":9,"type":"number","checkmust": true},
1899
+ "剩余气量":{"index":10,"type":"number","checkmust": true},
1900
+ "剩余金额":{"index":10,"type":"number","checkmust": true},
1901
+ "气量异常差值":{"index":11,"type":"number","readonly": true},
1902
+ "金额异常差值":{"index":11,"type":"number","readonly": true}
1903
+ */
1904
+ if (this.item.f_plan_meters[i].f_collection_type == '按金额') {
1905
+ if (!this.data.f_collection_type) {
1906
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
1907
+ delete this.config['燃气表']['items']['累购气量']
1908
+ delete this.config['燃气表']['items']['已用气量']
1909
+ delete this.config['燃气表']['items']['剩余气量']
1910
+ delete this.config['燃气表']['items']['气量异常差值']
1911
+ delete this.config['燃气表']['items']['系统余额']
1912
+ device.f_items.push(
1913
+ {
1914
+ f_defect_level: null,
1915
+ f_device_id: "",
1916
+ f_is_defect: "",
1917
+ f_item_name: "初始表底",
1918
+ isshow: false,
1919
+ f_item_value: '',
1920
+ f_path: "",
1921
+ type: "number"
1922
+ },
1923
+ {
1924
+ f_defect_level: null,
1925
+ f_device_id: "",
1926
+ f_is_defect: "",
1927
+ f_item_name: "累购金额",
1928
+ f_item_value: this.item.f_plan_meters[i].f_total_fee,
1929
+ f_path: "",
1930
+ type: "number"
1931
+ },
1932
+ {
1933
+ f_defect_level: null,
1934
+ f_device_id: "",
1935
+ f_is_defect: "",
1936
+ f_item_name: "已用金额",
1937
+ f_item_value: null,
1938
+ f_path: "",
1939
+ type: "number"
1940
+ },
1941
+ {
1942
+ f_defect_level: null,
1943
+ f_device_id: "",
1944
+ f_is_defect: "",
1945
+ f_item_name: "剩余金额",
1946
+ f_item_value: null,
1947
+ f_path: "",
1948
+ type: "number"
1949
+ },
1950
+ {
1951
+ f_defect_level: null,
1952
+ f_device_id: "",
1953
+ f_is_defect: "",
1954
+ f_item_name: "金额异常差值",
1955
+ f_item_value: null,
1956
+ f_path: "",
1957
+ type: "number"
1958
+ }
1959
+ )
1960
+ }
1961
+ } else
1962
+ if (this.item.f_plan_meters[i].f_collection_type == '按气量') {
1963
+ if (!this.data.f_collection_type) {
1964
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
1965
+ delete this.config['燃气表']['items']['累购金额']
1966
+ delete this.config['燃气表']['items']['已用金额']
1967
+ delete this.config['燃气表']['items']['剩余金额']
1968
+ delete this.config['燃气表']['items']['金额异常差值']
1969
+ delete this.config['燃气表']['items']['系统余额']
1970
+ device.f_items.push(
1971
+ {
1972
+ f_defect_level: null,
1973
+ f_device_id: "",
1974
+ f_is_defect: "",
1975
+ f_item_name: "初始表底",
1976
+ isshow: true,
1977
+ f_item_value: this.item.f_plan_meters[i].f_initial_base,
1978
+ f_path: "",
1979
+ type: "number"
1980
+ },
1981
+ {
1982
+ f_defect_level: null,
1983
+ f_device_id: "",
1984
+ f_is_defect: "",
1985
+ f_item_name: "累购气量",
1986
+ f_item_value: this.item.f_plan_meters[i].f_total_gas,
1987
+ f_path: "",
1988
+ type: "number"
1989
+ },
1990
+ {
1991
+ f_defect_level: null,
1992
+ f_device_id: "",
1993
+ f_is_defect: "",
1994
+ f_item_name: "已用气量",
1995
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
1996
+ f_path: "",
1997
+ type: "number"
1998
+ },
1999
+ {
2000
+ f_defect_level: null,
2001
+ f_device_id: "",
2002
+ f_is_defect: "",
2003
+ f_item_name: "剩余气量",
2004
+ f_item_value: "",
2005
+ f_path: "",
2006
+ type: "number"
2007
+ },
2008
+ {
2009
+ f_defect_level: null,
2010
+ f_device_id: "",
2011
+ f_is_defect: "",
2012
+ f_item_name: "气量异常差值",
2013
+ f_item_value: null,
2014
+ f_path: "",
2015
+ type: "number"
2016
+ }
2017
+ )
2018
+ }
2019
+ }
2020
+ })
2021
+ } else if(this.devices[de].device == "燃气表"){
2022
+ this.data['device' + this.devices[de].n].forEach(device => {
2023
+ if (!this.data.f_collection_type) {
2024
+ this.data.f_collection_type = this.item.f_plan_meters[i].f_collection_type
2025
+ delete this.config['燃气表']['items']['累购金额']
2026
+ delete this.config['燃气表']['items']['已用金额']
2027
+ delete this.config['燃气表']['items']['剩余金额']
2028
+ delete this.config['燃气表']['items']['金额异常差值']
2029
+ delete this.config['燃气表']['items']['系统余额']
2030
+ device.f_items.push(
2031
+ {
2032
+ f_defect_level: null,
2033
+ f_device_id: "",
2034
+ f_is_defect: "",
2035
+ f_item_name: "初始表底",
2036
+ isshow: true,
2037
+ f_item_value: this.item.f_plan_meters[i].f_initial_base,
2038
+ f_path: "",
2039
+ type: "number"
2040
+ },
2041
+ {
2042
+ f_defect_level: null,
2043
+ f_device_id: "",
2044
+ f_is_defect: "",
2045
+ f_item_name: "累购气量",
2046
+ f_item_value: this.item.f_plan_meters[i].f_total_gas,
2047
+ f_path: "",
2048
+ type: "number"
2049
+ },
2050
+ {
2051
+ f_defect_level: null,
2052
+ f_device_id: "",
2053
+ f_is_defect: "",
2054
+ f_item_name: "已用气量",
2055
+ f_item_value: this.item.f_plan_meters[i].f_meter_base,
2056
+ f_path: "",
2057
+ type: "number"
2058
+ },
2059
+ {
2060
+ f_defect_level: null,
2061
+ f_device_id: "",
2062
+ f_is_defect: "",
2063
+ f_item_name: "剩余气量",
2064
+ f_item_value: '',
2065
+ f_path: "",
2066
+ type: "number"
2067
+ },
2068
+ {
2069
+ f_defect_level: null,
2070
+ f_device_id: "",
2071
+ f_is_defect: "",
2072
+ f_item_name: "气量异常差值",
2073
+ isshow:false,
2074
+ f_item_value: null,
2075
+ f_path: "",
2076
+ type: "number"
2077
+ }
2078
+ )
2079
+ }
2080
+ })
2081
+ }
2082
+ }
2083
+ }
2084
+ }
2085
+ }
2086
+ this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
2087
+ }
2088
+ },
2089
+ watch: {
2090
+ 'row' () {
2091
+ //tag
2092
+ this.copy()
2093
+ }
2094
+ },
2095
+ async ready () {
2096
+ try {
2097
+ if (this.item.f_userinfoid){
2098
+ let http = new HttpResetClass()
2099
+ let response = await http.load('POST', `${this.$androidUtil.getProxyUrl()}/af-telephone/rs/sql/tel_singleTable_OrderBy`, {
2100
+ data: {
2101
+ items: 'count(0) as num',
2102
+ tablename: 't_userfiles a left join t_userinfo b on a.f_userinfo_id = b.f_userinfo_id',
2103
+ condition: `a.f_userinfo_id = '${this.item.f_userinfoid}' and a.f_meter_classify != '物联网表' and a.f_table_state = '正常' and b.f_user_state='正常'`,
2104
+ orderitem: '1'
2105
+ }
2106
+ }, {resolveMsg: null, rejectMsg: null})
2107
+ if (response && response.data && response.data.length > 0 && response.data[0].num > 0 ){
2108
+ this.tabs.push({
2109
+ header: '抄表', complete: 'meter-reading', class: 'meter-reading-class', props: null
2110
+ })
2111
+ }else {
2112
+ console.log('无网络')
2113
+ }
2114
+ }
2115
+ }catch (e){
2116
+ console.log(e)
2117
+ console.log('无网络')
2118
+ }
2119
+ //送气超期功能
2120
+ //await this.isoverDate()
2121
+ this.putDevices()
2122
+ //如果已检,则提取安检单
2123
+ if (this.item.f_state != '未检') {
2124
+ if (this.role == 'inspect' || this.role == 'androidview') {
2125
+ HostApp.__callback__ = this.loaded
2126
+ HostApp.__this__ = this
2127
+ let that = this
2128
+ let value = {}
2129
+ if (this.role == 'inspect') {
2130
+ let condition=` f_check_item_id ='${this.item.id}'`
2131
+ if (this.item.f_no_checkplan == '无计划安检') {
2132
+ condition += ` and f_no_checkplan = '无计划安检'`
2133
+ }
2134
+ value = this.$androidUtil.bzLogic('path_getPhoneCheckPaper', {condition: condition})
2135
+ } else {
2136
+ value = await this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data: {condition: `id = '${this.item.f_paper_id}'`}})
2137
+ }
2138
+ Util.replaceFalse(value)
2139
+ if (value.data.length != 0) {
2140
+ that.$set('data', value.data[0])
2141
+ if (this.data.f_collection_type == '按气量') {
2142
+ delete this.config['燃气表']['items']['累购金额']
2143
+ delete this.config['燃气表']['items']['已用金额']
2144
+ delete this.config['燃气表']['items']['剩余金额']
2145
+ delete this.config['燃气表']['items']['金额异常差值']
2146
+ delete this.config['燃气表']['items']['系统余额']
2147
+ } else if (this.data.f_collection_type == '按金额') {
2148
+ delete this.config['燃气表']['items']['累购气量']
2149
+ delete this.config['燃气表']['items']['已用气量']
2150
+ delete this.config['燃气表']['items']['剩余气量']
2151
+ delete this.config['燃气表']['items']['气量异常差值']
2152
+ delete this.config['燃气表']['items']['系统余额']
2153
+ }
2154
+ //tag)
2155
+ if (value.data[0].f_devices) {
2156
+ for (let da in that.devices) {
2157
+ if(typeof that.devices[da]=='function'){
2158
+ continue
2159
+ }
2160
+ that.$set('data.device' + that.devices[da].n, [])
2161
+ }
2162
+ value.data[0].f_devices.forEach((item) => {
2163
+ for (let i in item.f_items) {
2164
+ if(typeof item.f_items[i]=='function'){
2165
+ continue
2166
+ }
2167
+ for (let de in that.config[item.f_device_type].items) {
2168
+ if(typeof that.config[item.f_device_type].items[de]=='function'){
2169
+ continue
2170
+ }
2171
+ if (item.f_items[i].f_item_name == de) {
2172
+ if (that.config[item.f_device_type].items[de].type == 'selector' || that.config[item.f_device_type].items[de].type == 'checkbox') {
2173
+ item.f_items[i].f_item_value = []
2174
+ } else {
2175
+ item.f_items[i].f_item_value = ''
2176
+ }
2177
+ }
2178
+ }
2179
+ for (let j in item.f_items[i].f_item_lists) {
2180
+ if(typeof item.f_items[i].f_item_lists[j]=='function'){
2181
+ continue
2182
+ }
2183
+ if (item.f_items[i].f_item_value instanceof Array) {
2184
+ item.f_items[i].f_item_value.push(item.f_items[i].f_item_lists[j].f_item_value)
2185
+ } else {
2186
+ item.f_items[i].f_item_value = item.f_items[i].f_item_lists[j].f_item_value
2187
+ }
2188
+ }
2189
+
2190
+ }
2191
+ for (let de in that.devices) {
2192
+ if(typeof that.devices[de]=='function'){
2193
+ continue
2194
+ }
2195
+ if (that.devices[de].device == item.f_device_type) {
2196
+ that.data['device' + that.devices[de].n].push({
2197
+ f_device_type: item.f_device_type,
2198
+ f_items: item.f_items
2199
+ })
2200
+ //tag)
2201
+ }
2202
+ }
2203
+ })
2204
+ if (this.role == 'androidview') {
2205
+ Util.androidRatifyPics(that.data, this.$androidUtil.getProxyUrl())
2206
+ Util.androidRatifyPics(that.picture, this.$androidUtil.getProxyUrl())
2207
+ Util.booleanFilter(that.data)
2208
+ }
2209
+ //tag)
2210
+ }
2211
+ } else {
2212
+ this.init()
2213
+ }
2214
+ if(this.parentPage && this.parentPage=='CurrentCreate'){
2215
+ let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2216
+ if (isRecodr) {
2217
+ if (isRecodr=='true') {
2218
+ this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
2219
+ // 初始化录音
2220
+ let resse = this.record()
2221
+ }
2222
+ }
2223
+ }
2224
+ this.$goto('safecheck-userinfo', {userinfo:this.data}, 'repair')
2225
+ } else {
2226
+ let that = this
2227
+ let id
2228
+ if (this.role == 'view') {
2229
+ id = this.item.id
2230
+ }
2231
+ this.$resetpost(`${this.$androidUtil.getProxyUrl()}/rs/path/getUserinfomation`, {data:{condition:`id = '${id}'`}}).then((respanse)=> {
2232
+ if (respanse.data.length != 0) {
2233
+ that.data = Object.assign(that.data,respanse.data[0])
2234
+ if(respanse.data[0].f_devices) {
2235
+ for (let da in that.devices) {
2236
+ that.$set('data.device' + that.devices[da].n, [])
2237
+ }
2238
+ respanse.data[0].f_devices.forEach((item) => {
2239
+ for (let de in that.devices) {
2240
+ if (that.devices[de].device == item.f_device_type) {
2241
+ that.data['device' + that.devices[de].n].push({
2242
+ f_device_type: item.f_device_type,
2243
+ f_items: item.f_items
2244
+ })
2245
+ }
2246
+ }
2247
+ })
2248
+ }
2249
+ Util.replaceFalse(that.data)
2250
+ Util.booleanFilter(that.data)
2251
+ if(this.role == 'view'){
2252
+ Util.ratifyPics(that.data)
2253
+ }else{
2254
+ Util.androidRatifyPics(that.data,this.$androidUtil.getProxyUrl())
2255
+ }
2256
+ } else {
2257
+ alert("该安检单可能已不在本地!")
2258
+ this.init()
2259
+ }
2260
+ this.$goto('safecheck-userinfo', {userinfo:this.data}, 'paper-router')
2261
+ }
2262
+ ).catch(
2263
+ (respanse) => {
2264
+ alert('查找安检单失败')
2265
+ })
2266
+ }
2267
+ }else{
2268
+ if(this.parentPage && (this.parentPage == 'CurrentCreate' || this.parentPage == 'AddPlanItem') ){
2269
+ //tag
2270
+ let isRecodr = this.$appdata.getSingleValue('无限制录音'); //单值参数,为true则是开启全程录音
2271
+ if (isRecodr) {
2272
+ if (isRecodr=='true') {
2273
+ // this.$showMessage("为了保证服务质量,您的电话将会被全程录音!")
2274
+ // 初始化录音
2275
+ let resse = this.record()
2276
+ }
2277
+ }
2278
+ }
2279
+ this.init()
2280
+ }
2281
+ },
2282
+ events: {
2283
+ 'tijiao': function () {
2284
+ // 事件回调内的 `this` 自动绑定到注册它的实例上
2285
+ this.confirm()
2286
+ }
2287
+ }
2288
+ }
2289
+ </script>
2290
+ <style lang="less">
2291
+ @import "../../../../src/bootstrap/less/variables.less";
2292
+ .noclickbut {
2293
+ pointer-events: none;
2294
+ }
2295
+ .tab-befor-img (@url) {
2296
+ content: '';
2297
+ background-image: url("@{url}");
2298
+ background-size: 20px;
2299
+ display: inline-block;
2300
+ margin-right: 8px;
2301
+ margin-top: 0.3em;
2302
+ height: 1.3em;
2303
+ width: 1.3em;
2304
+ vertical-align: -35%;
2305
+ }
2306
+
2307
+ @media screen and (min-width: 768px) {
2308
+ .android-repair-order > div > ul a {
2309
+ font-size: @font-size-h2;
2310
+ margin: 0.3em 0;
2311
+ }
2312
+ }
2313
+ .repair-details-class{
2314
+ &::before {
2315
+ .tab-befor-img("../../../assets/huneiweixiu1.png");
2316
+ }
2317
+ }
2318
+ .repair-info-class {
2319
+ &::before {
2320
+ .tab-befor-img("../../../assets/baoxiuxinxi1.png");
2321
+ }
2322
+ }
2323
+ .repair-user-info-class {
2324
+ &::before {
2325
+ .tab-befor-img("../../../assets/jibenxinxi1.png")
2326
+ }
2327
+ }
2328
+
2329
+ .door-service-class {
2330
+ &::before {
2331
+ .tab-befor-img("../../../assets/huneiweixiu1.png")
2332
+ }
2333
+ }
2334
+
2335
+ .pipeline-class {
2336
+ &::before {
2337
+ .tab-befor-img("../../../assets/guandao1.png")
2338
+ }
2339
+ }
2340
+
2341
+ .device-service-class {
2342
+ &::before {
2343
+ .tab-befor-img("../../../assets/shebeiweixiu1.png")
2344
+ }
2345
+ }
2346
+
2347
+ .trouble-removal-class {
2348
+ &::before {
2349
+ .tab-befor-img("../../../assets/shiguchuli.png")
2350
+ }
2351
+ }
2352
+
2353
+ .cooking-utensils-class {
2354
+ &::before {
2355
+ .tab-befor-img("../../../assets/zaoju1.png")
2356
+ }
2357
+ }
2358
+
2359
+ .outlay-class {
2360
+ &::before {
2361
+ .tab-befor-img("../../../assets/feiyong1.png")
2362
+ }
2363
+ }
2364
+ .meter-reading-class {
2365
+ &::before {
2366
+ .tab-befor-img("../../../assets/guzhanghuizong1.png")
2367
+ }
2368
+ }
2369
+ .fault-all-class {
2370
+ &::before {
2371
+ .tab-befor-img("../../../assets/guzhanghuizong1.png")
2372
+ }
2373
+ }
2374
+ .photo-write-class {
2375
+ &::before {
2376
+ .tab-befor-img("../../../assets/zaoju.png")
2377
+ }
2378
+ }
2379
+ .delay-apply-class {
2380
+ &::before {
2381
+ .tab-befor-img("../../../assets/yonghubaoxiu.png")
2382
+ }
2383
+ }
2384
+
2385
+ .repair-back-class {
2386
+ &::before {
2387
+ .tab-befor-img("../../../assets/fanhui.png")
2388
+ }
2389
+ }
2390
+ .butt2 {
2391
+ display: inline;
2392
+ float: right;
2393
+ width: 10px;
2394
+ text-align: center;
2395
+ align-items:center;
2396
+ position: absolute;
2397
+ top:50%;
2398
+
2399
+ left:90%;
2400
+ transform: translate(-50%,-50%);
2401
+ }
2402
+ .linesty{
2403
+ display: inline-block;
2404
+ height:1px;
2405
+ width:100%;
2406
+ background:#d0d0d0;
2407
+ overflow:hidden;
2408
+ vertical-align: middle;
2409
+ }
2410
+ .spanboder{
2411
+ border-bottom:2px solid #499edf;
2412
+ padding-bottom: 8px
2413
+ }
2414
+ .app-botton {
2415
+ position:fixed;
2416
+ background: #87b2dd;
2417
+ right:8px;
2418
+ color: #FFF;
2419
+ padding: 8px;
2420
+ text-align: center;
2421
+ font-size: 1.2em;
2422
+ z-index: 10;
2423
+ opacity:0.5;
2424
+ bottom: 50px;
2425
+ margin-top: -10px;
2426
+ height: 40px;
2427
+ }
2428
+ .android-repair-order > div > ul a {
2429
+ font-size: 12px;
2430
+ color: #333333;
2431
+ padding: 13px 16px;
2432
+ }
2433
+ </style>