safecheck-client 4.0.1-40 → 4.0.1-41

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