safecheck-client 4.0.2-66 → 4.0.2-68

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