safecheck-client 4.0.0-22 → 4.0.0-23

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