safecheck-client 4.0.0-92 → 4.0.0-93

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