safecheck-client 4.0.1-39 → 4.0.1-40

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