safecheck-client 4.0.1-41 → 4.0.1-43

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