safecheck-client 4.0.0-97 → 4.0.0-99

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