safecheck-client 4.0.2-10 → 4.0.2-11

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