safecheck-client 4.0.2-13 → 4.0.2-15

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