safecheck-client 4.0.1-9 → 4.0.1-90

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