safecheck-client 4.0.2-5 → 4.0.2-51

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