safecheck-client 4.0.1-4 → 4.0.1-40

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