safecheck-client 3.0.35-18 → 3.0.35-19

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