safecheck-client 4.0.0-23 → 4.0.0-24

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