safecheck-client 4.0.1-8 → 4.0.1-81

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