safecheck-client 4.0.0-24 → 4.0.0-25

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