apply-clients 7.1.36-yuchuan-56 → 7.1.36-yuchuan-57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/android.html +27 -27
  2. package/build/dev-server.js +192 -192
  3. package/package.json +1 -1
  4. package/src/apply.js +163 -163
  5. package/src/applyAndroid.js +98 -98
  6. package/src/components/android/AppSign.vue +232 -232
  7. package/src/components/android/Ignition/VentilationIgnition.vue +409 -409
  8. package/src/components/android/Ignition/VentilationIgnitionHandle.vue +472 -472
  9. package/src/components/android/Process/AppExplorationUser.vue +454 -454
  10. package/src/components/android/Process/AppServiceControl.vue +1434 -1434
  11. package/src/components/android/Process/Processes/AppInstallationDetails.vue +1026 -1026
  12. package/src/components/android/Process/Processes/newAppInstallationDetails.vue +671 -671
  13. package/src/components/android/SealBind.vue +382 -382
  14. package/src/components/android/SealManage.vue +278 -278
  15. package/src/components/android/Sign/AppSignTask.vue +183 -183
  16. package/src/components/android/Supervisory/AppProcessSupervisory.vue +344 -344
  17. package/src/components/android/Task/Build/BuildTsak.vue +117 -117
  18. package/src/components/android/Task/BuildIgnition/BuildIgnition.vue +114 -114
  19. package/src/components/android/Task/GuanXianJianShe/AppExplorationGuanXian.vue +317 -317
  20. package/src/components/android/Task/RepairFromSend/RepairFrom.vue +124 -124
  21. package/src/components/android/Task/RepairFromSend/RepairSend.vue +124 -124
  22. package/src/components/android/Task/ShiGongXinXi/AppShowBuildUser.vue +431 -431
  23. package/src/components/android/Task/Survey/SurveyTsak.vue +141 -141
  24. package/src/components/android/Task/yiban/AppShowDone.vue +442 -442
  25. package/src/components/android/newPackage/customerServiceManager.vue +218 -218
  26. package/src/components/android/newPackage/projectPrice.vue +218 -218
  27. package/src/components/product/ApplyCharge/ApplyChargeList.vue +1101 -1101
  28. package/src/components/product/ApplyGuanXian/GuanXianExplorationSelect.vue +325 -325
  29. package/src/components/product/ApplyGuanXian/GuanXianExplorationUser.vue +142 -142
  30. package/src/components/product/ApplyGuanXian/GuanXianSupervisoryhCart.vue +119 -119
  31. package/src/components/product/ApplyMap/AppMapLocation.vue +829 -829
  32. package/src/components/product/ApplyMap/ApplyMapInputSearch.vue +335 -335
  33. package/src/components/product/ChongZheng/ApplyChongZhengList.vue +417 -417
  34. package/src/components/product/Function/InstallFunction.vue +132 -132
  35. package/src/components/product/Function/InstallInfoSelect.vue +374 -374
  36. package/src/components/product/Function/Service/FunctionServiceControl.vue +581 -581
  37. package/src/components/product/Ignition/IgnitionDispatch.vue +90 -90
  38. package/src/components/product/Ignition/IgnitionListManage.vue +604 -604
  39. package/src/components/product/Ignition/IgnitionRecord.vue +380 -380
  40. package/src/components/product/InsuranceApply/InsuranceReport.vue +188 -188
  41. package/src/components/product/List/OldShowDevices.vue +272 -272
  42. package/src/components/product/List/ShowAllActivity.vue +541 -541
  43. package/src/components/product/List/ShowDevices.vue +279 -279
  44. package/src/components/product/Print/BuildOrder/buildOrderList.vue +446 -446
  45. package/src/components/product/Process/ExplorationSelect.vue +593 -593
  46. package/src/components/product/Process/ExplorationUser.vue +154 -154
  47. package/src/components/product/Process/New1ExplorationUser.vue +196 -196
  48. package/src/components/product/Process/NewExplorationSelect.vue +587 -587
  49. package/src/components/product/Process/NewExplorationUser.vue +216 -216
  50. package/src/components/product/Process/Processes/Print/printCharge.vue +250 -250
  51. package/src/components/product/Process/Processes/Print/printGaiXianCharge.vue +244 -244
  52. package/src/components/product/Process/Processes/chargeManagement.vue +2 -1
  53. package/src/components/product/Process/Processes/selectApply.vue +250 -250
  54. package/src/components/product/Process/Processes/selectChaiChuUserinfo.vue +230 -230
  55. package/src/components/product/Process/Processes/selectOldUserinfo.vue +241 -241
  56. package/src/components/product/Process/Processes/selectUserinfo.vue +234 -234
  57. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  58. package/src/components/product/ServiceView.vue +644 -644
  59. package/src/components/product/Stop/StopApplyList.vue +224 -224
  60. package/src/components/product/Supervisory/NewSupervisoryhCart.vue +175 -175
  61. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +593 -593
  62. package/src/components/product/Supervisory/SupervisoryControl.vue +114 -114
  63. package/src/components/product/Supervisory/SupervisoryList.vue +586 -586
  64. package/src/components/product/Supervisory/SupervisoryhCart.vue +120 -120
  65. package/src/components/product/Supervisory/YiBanSupervisoryControl.vue +111 -111
  66. package/src/components/product/Supervisory/YiBanSupervisoryList.vue +539 -539
  67. package/src/components/product/VueUtils/ApplyUpload.vue +303 -303
  68. package/src/main.js +27 -27
@@ -1,382 +1,382 @@
1
- <template>
2
- <div class="auto">
3
- <div class="row app-row">
4
- <div class="col-xs-4">
5
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
6
- <label for="f_userinfoid" class="font text-left">用户编号:</label>
7
- </div>
8
- <div class="col-xs-8" >
9
- <input id="f_userinfoid" class="search_input input-font" readonly
10
- v-model=row.f_userinfo_id :value.sync="row.f_userinfo_id" />
11
- </div>
12
- </div>
13
- <div class="row app-row">
14
- <div class="col-xs-4">
15
- <img src="../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
16
- <label class="font text-left">用户姓名:</label>
17
- </div>
18
- <div class="col-xs-8" >
19
- <input class="search_input input-font" v-model=row.f_user_name :value.sync="row.f_user_name" readonly />
20
- </div>
21
- </div>
22
- <div class="row app-row">
23
- <div class="col-xs-4">
24
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
25
- <label class="font text-left">用户地址:</label>
26
- </div>
27
- <div class="col-xs-8" >
28
- <input class="search_input input-font" v-model=row.f_address :value.sync="row.f_address" readonly />
29
- </div>
30
- </div>
31
- <div class="row app-row">
32
- <div class="col-xs-4">
33
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
34
- <label class="font text-left">铅封编号:</label>
35
- </div>
36
- <div class="col-xs-5" >
37
- <input class="search_input input-font"
38
- v-model=sealUID :value.sync="sealUID" readonly />
39
- </div>
40
- <div class="col-xs-3">
41
- <button style="padding: 5px" type="button" class="btn btn-font btn-color" @click="scan()">NFC识别</button>
42
- </div>
43
- </div>
44
- <div class="row app-row">
45
- <div class="col-xs-4">
46
- <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
47
- <label class="font text-left">二维码编号:</label>
48
- </div>
49
- <div class="col-xs-5" >
50
- <input class="search_input input-font"
51
- v-model=f_qr_code :value.sync="f_qr_code" readonly />
52
- </div>
53
- <div class="col-xs-3">
54
- <button style="padding: 5px" type="button" class="btn btn-font btn-color" @click="codeScan()">扫描二维码</button>
55
- </div>
56
- </div>
57
- <div class="row app-row">
58
- <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
59
- <label class="text-left font">铅封照片:</label>
60
-
61
- <div class="auto" :class="style__">
62
- <div class="panel" style="padding: 10px 10px 5px 10px;">
63
- <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
64
- <div class="row" style="height: 240px;overflow: scroll;top: 1px" >
65
- <div class="col-xs-4 col-sm-3 col-md-2" style="margin-bottom: 35px" v-for="(index,img) in imgs">
66
- <img-self :src="img" alt="铅封照片" :width="140" :height="170"></img-self>
67
- <img src="../../assets/删除.png" @click="delfile(img,index)" style="width: 15px;margin-top: -80px" alt="">
68
- </div>
69
- </div>
70
- <div class="row text-right div-photo">
71
- <button type="button" name="button" class="btn btn-photo" @click="takePic()">拍照</button>
72
- </div>
73
- </div>
74
- </div>
75
- </div>
76
- </div>
77
- </div>
78
- <div class="row app-row">
79
- <div class="col-xs-4">
80
- <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
81
- <label class="font text-left">施封原因:</label>
82
- </div>
83
- <div class="col-xs-8" >
84
- <v-select
85
- v-model="cause"
86
- :value.sync="cause"
87
- :value-single="true"
88
- :options='causeOption'
89
- placeholder='请选择施封原因'
90
- width="100%"
91
- close-on-select></v-select>
92
- </div>
93
- </div>
94
- <div class="row text-center" style="margin-top: 40px;">
95
- <button style="font-size: 20px; padding: 8px 40px" type="button" name="button" class="col-sm-3 btn btn-primary" @click="bind">
96
- 施封
97
- </button>
98
- </div>
99
- </div>
100
- </template>
101
-
102
- <script>
103
- import {HttpResetClass, PagedList} from 'vue-client'
104
- import Vue from 'vue'
105
- import * as Util from '../Util'
106
-
107
- export default {
108
- title: '施封',
109
- props: ['row'],
110
- data () {
111
- return {
112
- sealUID: '',
113
- imgs: [],
114
- cause: '',
115
- address: '',
116
- longitude: '',
117
- latitude: '',
118
- f_qr_code: '',
119
- causeOption: this.$appdata.getParam('施封原因')
120
- }
121
- },
122
- ready () {
123
- console.log('this.row=', JSON.stringify(this.row))
124
- this.getLocation()
125
- if (this.longitude == 0){
126
- this.timer = window.setInterval(this.getLocation, 3000)
127
- }
128
- },
129
- computed: {
130
-
131
- },
132
- methods:{
133
- codeScan() {
134
- console.log('codeScan=========')
135
- HostApp.__this__ = this
136
- HostApp.scanQRCode({callback:"javascript:HostApp.__this__.codeScanCallback()"})
137
- },
138
- codeScanCallback() {
139
- console.log('codeScanCallback=========')
140
- let result = HostApp.getQRCode()
141
- console.log('result=', result)
142
- if (result.code == 200){
143
- this.f_qr_code = result.data
144
- }else {
145
- this.$showMessage("未识别到二维码信息,请重新尝试!")
146
- }
147
- },
148
- generateUUID() {
149
- return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
150
- var r = (Math.random() * 16) | 0,
151
- v = c == 'x' ? r : (r & 0x3) | 0x8;
152
- return v.toString(16);
153
- });
154
- },
155
- getLocation() {
156
- const location = HostApp.getDetailAddress()
157
- this.address = location.data
158
- const longitude = HostApp.getPreference('longitude')
159
- this.longitude = longitude.data
160
- const latitude = HostApp.getPreference('latitude')
161
- this.latitude = latitude.data
162
- if (this.longitude != 0){
163
- window.clearInterval(this.timer)
164
- }
165
- console.log('this.address=', this.address)
166
- console.log('this.longitude=', this.longitude)
167
- console.log('this.latitude=', this.latitude)
168
- },
169
- bind() {
170
- if (!this.sealUID) {
171
- this.$showMessage("铅封编号不能为空!")
172
- return
173
- }
174
- if (!this.f_qr_code) {
175
- this.$showMessage("二维码编号不能为空!")
176
- return
177
- }
178
- if (!this.imgs.length) {
179
- this.$showMessage("请拍摄铅封照片!")
180
- return
181
- }
182
- if (!this.cause) {
183
- this.$showMessage("请选择施封原因!")
184
- return
185
- }
186
- //this.getLocation()
187
- if (this.longitude == 0){
188
- this.$showMessage("位置获取失败,请开启定位后进行施封!")
189
- return
190
- }
191
- const param = {
192
- seal: {
193
- f_uid: this.sealUID,
194
- f_qr_code: this.f_qr_code,
195
- f_userinfo_id: this.row.f_userinfo_id,
196
- f_filiale: this.row.f_filiale,
197
- f_filiale_id: this.row.f_filiale_id,
198
- f_user_id: this.row.f_user_id,
199
- f_address: this.address,
200
- f_longitude: this.longitude,
201
- f_latitude: this.latitude,
202
- f_operate_name: Vue.user.name,
203
- f_operate_id: Vue.user.id,
204
- f_operate_date: Util.toStandardTimeString(),
205
- f_state: '有效'
206
- },
207
- operateList: {
208
- f_cause: this.cause,
209
- f_operate_date: Util.toStandardTimeString(),
210
- f_creation_date: Util.toStandardTimeString(),
211
- f_creation_name: Vue.user.name,
212
- f_creation_name_id: Vue.user.id
213
- },
214
- files: [],
215
- imgs: [],
216
- f_devices_no: this.generateUUID()
217
- }
218
- for (const img of this.imgs) {
219
- const i1 = img.lastIndexOf('?')
220
- const i2 = img.lastIndexOf('/')
221
- const key = img.substring(i2+1, i1)
222
- const filename = img.substring(0, i1)
223
- param.files.push({
224
- f_img_url: key,
225
- f_operate_date: Util.toStandardTimeString(),
226
- f_operator: Vue.user.name,
227
- f_operatorid: Vue.user.id
228
- })
229
- param.imgs.push({
230
- key: key,
231
- filename: filename
232
- })
233
- }
234
- //tag)
235
- let paramStr = JSON.stringify(param)
236
- console.log('paramStr=', paramStr)
237
- // 多长截断一次
238
- let subLength = 800
239
- for (let i = 0; i < paramStr.length; i += subLength) {
240
- HostApp.param_cache(paramStr.substr(i, subLength))
241
- }
242
- HostApp.__this__ = this
243
- HostApp.syncLogic({
244
- 'logic': 'sealBind',
245
- 'callback': 'javascript:HostApp.__this__.sealBindBack()',
246
- 'backresult': 1
247
- })
248
- },
249
- sealBindBack(jo) {
250
- if(jo.state == 'ok') {
251
- let res = JSON.parse(jo.result)
252
- if (res.code == 200 && res.data.code == 200) {
253
- this.$showMessage('施封成功!')
254
- this.$back(this.sealUID)
255
- return
256
- }
257
- this.$showMessage(res.data.msg)
258
- return
259
- }
260
- this.$showMessage('网络异常!')
261
- },
262
- scan() {
263
- HostApp.__this__ = this
264
- HostApp.readNfc({
265
- 'callback': 'javascript:HostApp.__this__.scanCallback()',
266
- // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
267
- // 执行回调方法传入key为backresult
268
- // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
269
- 'backresult': 1
270
- })
271
- },
272
- scanCallback() {
273
- console.log('scanCallback=========')
274
- const result = HostApp.getNfcUUID()
275
- console.log('result=', result)
276
- if (result.code == 200){
277
- this.sealUID = result.data
278
- }else {
279
- this.$showMessage("未识别到铅封信息,请重新尝试!")
280
- return
281
- }
282
- },
283
- takePic() {
284
- HostApp.__callback__ = this.cameraCallBack
285
- HostApp.__this__ = this
286
-
287
- let fileName = `${Util.guid()}.jpg`
288
- HostApp._open_a_page({
289
- type: 'boomerang',
290
- page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
291
- param: {
292
- file: fileName,
293
- requestCode: 111,
294
- callback: 'javascript:HostApp.__callback__("%s");',
295
- watermark: '铅封照片\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name + '\t' + this.row.f_userinfo_id+ '\t' + this.row.f_user_name+ '\t' + this.row.f_address
296
- }
297
- })
298
- },
299
- cameraCallBack(fileName) {
300
- // if (prop == 'f_overall_path') {
301
- // let f_overall_path = fileName + '?' + Math.random()
302
- // HostApp.__this__.paper.f_overall_imgs.push({
303
- // f_overall_path: f_overall_path
304
- // })
305
- // } else {
306
- // HostApp.__this__.paper[prop] = fileName + '?' + Math.random()
307
- // }
308
- this.imgs.push(fileName + '?' + Math.random())
309
- HostApp.__callback__ = null
310
- HostApp.__this__ = null
311
- },
312
- delfile(fileName, index) {
313
- if (fileName == Vue.nopic)
314
- return
315
- else {
316
- this.imgs.splice(index, 1)
317
- HostApp.delfile(fileName)
318
- }
319
- }
320
- }
321
- }
322
- </script>
323
- <style scoped>
324
- .app-row {
325
- background-color: white;
326
- padding: 10px 10px 0 10px;
327
- border-bottom: 1px solid rgba(235, 235, 235, 0.5);
328
- }
329
- .search_input {
330
- border: 0;
331
- outline: none;
332
- }
333
- .font{
334
- font: 15px PingFang-SC-Medium;
335
- color: #666666;
336
- }
337
- .input-font{
338
- font: 15px PingFang-SC-Medium;
339
- color: #333333;
340
- }
341
- .btn-font{
342
- font:600 16px PingFang-SC-Bold;
343
- color: #499EDF;
344
- }
345
- .btn-color{
346
- background-color: #FFFFFF;
347
- border-radius: 10px ;
348
- border: 1px solid #499EDF;
349
- }
350
- .app-text {
351
- font-size: 12px;
352
- }
353
- .panel-self{
354
- border-radius: 10px;
355
- border:1px solid #499EDF;
356
- background-color: #F8F8F8;
357
- }
358
- .yybtn-color{
359
- border-radius: 4px ;
360
- border: 1px solid #499EDF;
361
- }
362
- .qxbtn-color{
363
- background-color: #FFFFFF;
364
- border-radius: 4px ;
365
- border: 1px solid #499EDF;
366
- }
367
- .btn-photo{
368
- border: 0;
369
- border-radius: 7px;
370
- background-color: #7dc1f4;
371
- font: 15px PingFang-SC-Bold;
372
- height: 20%;
373
- }
374
- .div-photo{
375
- width: auto;
376
- height: auto;
377
- /* margin-top: 10px; */
378
- position: absolute;
379
- bottom: 10px;
380
- right: 10px;
381
- }
382
- </style>
1
+ <template>
2
+ <div class="auto">
3
+ <div class="row app-row">
4
+ <div class="col-xs-4">
5
+ <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
6
+ <label for="f_userinfoid" class="font text-left">用户编号:</label>
7
+ </div>
8
+ <div class="col-xs-8" >
9
+ <input id="f_userinfoid" class="search_input input-font" readonly
10
+ v-model=row.f_userinfo_id :value.sync="row.f_userinfo_id" />
11
+ </div>
12
+ </div>
13
+ <div class="row app-row">
14
+ <div class="col-xs-4">
15
+ <img src="../../assets/用户姓名.png" style="width: 20px;margin-bottom: 5px" alt="">
16
+ <label class="font text-left">用户姓名:</label>
17
+ </div>
18
+ <div class="col-xs-8" >
19
+ <input class="search_input input-font" v-model=row.f_user_name :value.sync="row.f_user_name" readonly />
20
+ </div>
21
+ </div>
22
+ <div class="row app-row">
23
+ <div class="col-xs-4">
24
+ <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
25
+ <label class="font text-left">用户地址:</label>
26
+ </div>
27
+ <div class="col-xs-8" >
28
+ <input class="search_input input-font" v-model=row.f_address :value.sync="row.f_address" readonly />
29
+ </div>
30
+ </div>
31
+ <div class="row app-row">
32
+ <div class="col-xs-4">
33
+ <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
34
+ <label class="font text-left">铅封编号:</label>
35
+ </div>
36
+ <div class="col-xs-5" >
37
+ <input class="search_input input-font"
38
+ v-model=sealUID :value.sync="sealUID" readonly />
39
+ </div>
40
+ <div class="col-xs-3">
41
+ <button style="padding: 5px" type="button" class="btn btn-font btn-color" @click="scan()">NFC识别</button>
42
+ </div>
43
+ </div>
44
+ <div class="row app-row">
45
+ <div class="col-xs-4">
46
+ <img src="../../assets/用户ID.png" style="width: 20px;margin-bottom: 5px" alt="">
47
+ <label class="font text-left">二维码编号:</label>
48
+ </div>
49
+ <div class="col-xs-5" >
50
+ <input class="search_input input-font"
51
+ v-model=f_qr_code :value.sync="f_qr_code" readonly />
52
+ </div>
53
+ <div class="col-xs-3">
54
+ <button style="padding: 5px" type="button" class="btn btn-font btn-color" @click="codeScan()">扫描二维码</button>
55
+ </div>
56
+ </div>
57
+ <div class="row app-row">
58
+ <div class="form-group col-sm-12 col-xs-12 col-md-12 " :class="style__">
59
+ <label class="text-left font">铅封照片:</label>
60
+
61
+ <div class="auto" :class="style__">
62
+ <div class="panel" style="padding: 10px 10px 5px 10px;">
63
+ <div class="panel-body panel-self" style="background-color: #F8F8F8;width: 100%;height: 260px;position: relative">
64
+ <div class="row" style="height: 240px;overflow: scroll;top: 1px" >
65
+ <div class="col-xs-4 col-sm-3 col-md-2" style="margin-bottom: 35px" v-for="(index,img) in imgs">
66
+ <img-self :src="img" alt="铅封照片" :width="140" :height="170"></img-self>
67
+ <img src="../../assets/删除.png" @click="delfile(img,index)" style="width: 15px;margin-top: -80px" alt="">
68
+ </div>
69
+ </div>
70
+ <div class="row text-right div-photo">
71
+ <button type="button" name="button" class="btn btn-photo" @click="takePic()">拍照</button>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ <div class="row app-row">
79
+ <div class="col-xs-4">
80
+ <img src="../../assets/小区.png" style="width: 20px;margin-bottom: 5px" alt="">
81
+ <label class="font text-left">施封原因:</label>
82
+ </div>
83
+ <div class="col-xs-8" >
84
+ <v-select
85
+ v-model="cause"
86
+ :value.sync="cause"
87
+ :value-single="true"
88
+ :options='causeOption'
89
+ placeholder='请选择施封原因'
90
+ width="100%"
91
+ close-on-select></v-select>
92
+ </div>
93
+ </div>
94
+ <div class="row text-center" style="margin-top: 40px;">
95
+ <button style="font-size: 20px; padding: 8px 40px" type="button" name="button" class="col-sm-3 btn btn-primary" @click="bind">
96
+ 施封
97
+ </button>
98
+ </div>
99
+ </div>
100
+ </template>
101
+
102
+ <script>
103
+ import {HttpResetClass, PagedList} from 'vue-client'
104
+ import Vue from 'vue'
105
+ import * as Util from '../Util'
106
+
107
+ export default {
108
+ title: '施封',
109
+ props: ['row'],
110
+ data () {
111
+ return {
112
+ sealUID: '',
113
+ imgs: [],
114
+ cause: '',
115
+ address: '',
116
+ longitude: '',
117
+ latitude: '',
118
+ f_qr_code: '',
119
+ causeOption: this.$appdata.getParam('施封原因')
120
+ }
121
+ },
122
+ ready () {
123
+ console.log('this.row=', JSON.stringify(this.row))
124
+ this.getLocation()
125
+ if (this.longitude == 0){
126
+ this.timer = window.setInterval(this.getLocation, 3000)
127
+ }
128
+ },
129
+ computed: {
130
+
131
+ },
132
+ methods:{
133
+ codeScan() {
134
+ console.log('codeScan=========')
135
+ HostApp.__this__ = this
136
+ HostApp.scanQRCode({callback:"javascript:HostApp.__this__.codeScanCallback()"})
137
+ },
138
+ codeScanCallback() {
139
+ console.log('codeScanCallback=========')
140
+ let result = HostApp.getQRCode()
141
+ console.log('result=', result)
142
+ if (result.code == 200){
143
+ this.f_qr_code = result.data
144
+ }else {
145
+ this.$showMessage("未识别到二维码信息,请重新尝试!")
146
+ }
147
+ },
148
+ generateUUID() {
149
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
150
+ var r = (Math.random() * 16) | 0,
151
+ v = c == 'x' ? r : (r & 0x3) | 0x8;
152
+ return v.toString(16);
153
+ });
154
+ },
155
+ getLocation() {
156
+ const location = HostApp.getDetailAddress()
157
+ this.address = location.data
158
+ const longitude = HostApp.getPreference('longitude')
159
+ this.longitude = longitude.data
160
+ const latitude = HostApp.getPreference('latitude')
161
+ this.latitude = latitude.data
162
+ if (this.longitude != 0){
163
+ window.clearInterval(this.timer)
164
+ }
165
+ console.log('this.address=', this.address)
166
+ console.log('this.longitude=', this.longitude)
167
+ console.log('this.latitude=', this.latitude)
168
+ },
169
+ bind() {
170
+ if (!this.sealUID) {
171
+ this.$showMessage("铅封编号不能为空!")
172
+ return
173
+ }
174
+ if (!this.f_qr_code) {
175
+ this.$showMessage("二维码编号不能为空!")
176
+ return
177
+ }
178
+ if (!this.imgs.length) {
179
+ this.$showMessage("请拍摄铅封照片!")
180
+ return
181
+ }
182
+ if (!this.cause) {
183
+ this.$showMessage("请选择施封原因!")
184
+ return
185
+ }
186
+ //this.getLocation()
187
+ if (this.longitude == 0){
188
+ this.$showMessage("位置获取失败,请开启定位后进行施封!")
189
+ return
190
+ }
191
+ const param = {
192
+ seal: {
193
+ f_uid: this.sealUID,
194
+ f_qr_code: this.f_qr_code,
195
+ f_userinfo_id: this.row.f_userinfo_id,
196
+ f_filiale: this.row.f_filiale,
197
+ f_filiale_id: this.row.f_filiale_id,
198
+ f_user_id: this.row.f_user_id,
199
+ f_address: this.address,
200
+ f_longitude: this.longitude,
201
+ f_latitude: this.latitude,
202
+ f_operate_name: Vue.user.name,
203
+ f_operate_id: Vue.user.id,
204
+ f_operate_date: Util.toStandardTimeString(),
205
+ f_state: '有效'
206
+ },
207
+ operateList: {
208
+ f_cause: this.cause,
209
+ f_operate_date: Util.toStandardTimeString(),
210
+ f_creation_date: Util.toStandardTimeString(),
211
+ f_creation_name: Vue.user.name,
212
+ f_creation_name_id: Vue.user.id
213
+ },
214
+ files: [],
215
+ imgs: [],
216
+ f_devices_no: this.generateUUID()
217
+ }
218
+ for (const img of this.imgs) {
219
+ const i1 = img.lastIndexOf('?')
220
+ const i2 = img.lastIndexOf('/')
221
+ const key = img.substring(i2+1, i1)
222
+ const filename = img.substring(0, i1)
223
+ param.files.push({
224
+ f_img_url: key,
225
+ f_operate_date: Util.toStandardTimeString(),
226
+ f_operator: Vue.user.name,
227
+ f_operatorid: Vue.user.id
228
+ })
229
+ param.imgs.push({
230
+ key: key,
231
+ filename: filename
232
+ })
233
+ }
234
+ //tag)
235
+ let paramStr = JSON.stringify(param)
236
+ console.log('paramStr=', paramStr)
237
+ // 多长截断一次
238
+ let subLength = 800
239
+ for (let i = 0; i < paramStr.length; i += subLength) {
240
+ HostApp.param_cache(paramStr.substr(i, subLength))
241
+ }
242
+ HostApp.__this__ = this
243
+ HostApp.syncLogic({
244
+ 'logic': 'sealBind',
245
+ 'callback': 'javascript:HostApp.__this__.sealBindBack()',
246
+ 'backresult': 1
247
+ })
248
+ },
249
+ sealBindBack(jo) {
250
+ if(jo.state == 'ok') {
251
+ let res = JSON.parse(jo.result)
252
+ if (res.code == 200 && res.data.code == 200) {
253
+ this.$showMessage('施封成功!')
254
+ this.$back(this.sealUID)
255
+ return
256
+ }
257
+ this.$showMessage(res.data.msg)
258
+ return
259
+ }
260
+ this.$showMessage('网络异常!')
261
+ },
262
+ scan() {
263
+ HostApp.__this__ = this
264
+ HostApp.readNfc({
265
+ 'callback': 'javascript:HostApp.__this__.scanCallback()',
266
+ // 固定key,代表是否将logic执行结果作为参数传入回调方法,1代表true,0代表false,
267
+ // 执行回调方法传入key为backresult
268
+ // 如需额外拼接参数,写在logic返回值的params,例如xxlogic返回:{"params": "success"}
269
+ 'backresult': 1
270
+ })
271
+ },
272
+ scanCallback() {
273
+ console.log('scanCallback=========')
274
+ const result = HostApp.getNfcUUID()
275
+ console.log('result=', result)
276
+ if (result.code == 200){
277
+ this.sealUID = result.data
278
+ }else {
279
+ this.$showMessage("未识别到铅封信息,请重新尝试!")
280
+ return
281
+ }
282
+ },
283
+ takePic() {
284
+ HostApp.__callback__ = this.cameraCallBack
285
+ HostApp.__this__ = this
286
+
287
+ let fileName = `${Util.guid()}.jpg`
288
+ HostApp._open_a_page({
289
+ type: 'boomerang',
290
+ page: 'com.aofeng.hybrid.android.peripheral.CameraActivity',
291
+ param: {
292
+ file: fileName,
293
+ requestCode: 111,
294
+ callback: 'javascript:HostApp.__callback__("%s");',
295
+ watermark: '铅封照片\t时间:' + Util.toStandardTimeString() + '\t' + Vue.user.name + '\t' + this.row.f_userinfo_id+ '\t' + this.row.f_user_name+ '\t' + this.row.f_address
296
+ }
297
+ })
298
+ },
299
+ cameraCallBack(fileName) {
300
+ // if (prop == 'f_overall_path') {
301
+ // let f_overall_path = fileName + '?' + Math.random()
302
+ // HostApp.__this__.paper.f_overall_imgs.push({
303
+ // f_overall_path: f_overall_path
304
+ // })
305
+ // } else {
306
+ // HostApp.__this__.paper[prop] = fileName + '?' + Math.random()
307
+ // }
308
+ this.imgs.push(fileName + '?' + Math.random())
309
+ HostApp.__callback__ = null
310
+ HostApp.__this__ = null
311
+ },
312
+ delfile(fileName, index) {
313
+ if (fileName == Vue.nopic)
314
+ return
315
+ else {
316
+ this.imgs.splice(index, 1)
317
+ HostApp.delfile(fileName)
318
+ }
319
+ }
320
+ }
321
+ }
322
+ </script>
323
+ <style scoped>
324
+ .app-row {
325
+ background-color: white;
326
+ padding: 10px 10px 0 10px;
327
+ border-bottom: 1px solid rgba(235, 235, 235, 0.5);
328
+ }
329
+ .search_input {
330
+ border: 0;
331
+ outline: none;
332
+ }
333
+ .font{
334
+ font: 15px PingFang-SC-Medium;
335
+ color: #666666;
336
+ }
337
+ .input-font{
338
+ font: 15px PingFang-SC-Medium;
339
+ color: #333333;
340
+ }
341
+ .btn-font{
342
+ font:600 16px PingFang-SC-Bold;
343
+ color: #499EDF;
344
+ }
345
+ .btn-color{
346
+ background-color: #FFFFFF;
347
+ border-radius: 10px ;
348
+ border: 1px solid #499EDF;
349
+ }
350
+ .app-text {
351
+ font-size: 12px;
352
+ }
353
+ .panel-self{
354
+ border-radius: 10px;
355
+ border:1px solid #499EDF;
356
+ background-color: #F8F8F8;
357
+ }
358
+ .yybtn-color{
359
+ border-radius: 4px ;
360
+ border: 1px solid #499EDF;
361
+ }
362
+ .qxbtn-color{
363
+ background-color: #FFFFFF;
364
+ border-radius: 4px ;
365
+ border: 1px solid #499EDF;
366
+ }
367
+ .btn-photo{
368
+ border: 0;
369
+ border-radius: 7px;
370
+ background-color: #7dc1f4;
371
+ font: 15px PingFang-SC-Bold;
372
+ height: 20%;
373
+ }
374
+ .div-photo{
375
+ width: auto;
376
+ height: auto;
377
+ /* margin-top: 10px; */
378
+ position: absolute;
379
+ bottom: 10px;
380
+ right: 10px;
381
+ }
382
+ </style>