sale-client 3.4.151 → 3.4.154

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 (73) hide show
  1. package/build/dev-server.js +160 -157
  2. package/package.json +1 -1
  3. package/src/components/FilesManage/UserGeneralInfoTest.vue +643 -642
  4. package/src/components/charge/HandList.vue +6 -0
  5. package/src/components/charge/business/OtherChargeByPay.vue +21 -21
  6. package/src/components/charge/business/OtherChargeNew.vue +28 -30
  7. package/src/components/charge/business/PriceChangeCompensation/CompensationManage.vue +26 -26
  8. package/src/components/charge/business/PriceChangeCompensation/SurplusRecordDetail.vue +72 -72
  9. package/src/components/charge/business/ShowCardSellGas.vue +5 -0
  10. package/src/components/charge/business/refund/IOTRefund.vue +237 -237
  11. package/src/components/charge/gasloss/gasLossOperate.vue +357 -357
  12. package/src/components/revenue/HandManager/MeterBookManage.vue +153 -153
  13. package/src/components/revenue/base/leftview/Mulitinfo.vue +74 -74
  14. package/src/components/revenue/base/leftview/SafeCheck.vue +311 -311
  15. package/src/components/revenue/base/rightview/CardList.vue +7 -1
  16. package/src/components/revenue/comprehen/ComprehenOperation/BatchChange/BatchCancellation.vue +243 -243
  17. package/src/components/revenue/comprehen/ComprehenOperation/MeterDisable/DisableManage.vue +93 -93
  18. package/src/components/revenue/comprehen/ComprehenOperation/MeterEnable/EnableManage.vue +184 -184
  19. package/src/components/revenue/comprehen/Message/MessageList.vue +614 -614
  20. package/src/components/revenue/machineHandManage/ArrearsQuery.vue +12 -2
  21. package/src/components/revenue/machineHandManage/machineHand.vue +1773 -1773
  22. package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +686 -686
  23. package/src/components/webMeter/{MeterManage → paramSave}/ParamHistory.vue +115 -115
  24. package/src/components/webMeter/{MeterManage → paramSave}/ParamSet.vue +597 -597
  25. package/src/components/webMeter/{MeterManage → paramSave}/ParamSetForm.vue +344 -344
  26. package/src/filiale/liaoyuan/MeterBookUser.vue +722 -0
  27. package/src/filiale/liaoyuan/sale.js +3 -1
  28. package/src/filiale/macheng/FilesManageNew/UserGeneralInfoTest.vue +596 -596
  29. package/src/filiale/meihekou/MeterinfoTest.vue +626 -626
  30. package/src/filiale/qianneng/OtherChargeNew.vue +36 -36
  31. package/src/filiale/qingtongxia/HandList.vue +4 -0
  32. package/src/filiale/rongchuang/Userinfo.vue +176 -176
  33. package/src/filiale/rongchuang/sale.js +43 -43
  34. package/src/filiale/tongchuan/MeterinfoTest.vue +892 -892
  35. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/AutomaticPurse.vue +298 -298
  36. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/CardHandRecord.vue +267 -267
  37. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/ChangeMeterQueryUser.vue +240 -240
  38. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/ChangeRecord.vue +235 -235
  39. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/ChargeQueryUser.vue +372 -372
  40. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/DeveiceRecord.vue +251 -251
  41. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/FillCardQueryUser.vue +209 -209
  42. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/HandQueryUser.vue +365 -365
  43. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +252 -252
  44. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/OtherChargeQueryUser.vue +250 -250
  45. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/RecordQueryUser.vue +249 -249
  46. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/TransferQueryUser.vue +222 -222
  47. package/src/filiale/tongchuan/sale.js +107 -107
  48. package/src/filiale/zhongyi/MeterinfoTest.vue +921 -0
  49. package/src/filiale/zhongyi/sale.js +6 -0
  50. package/src/main.js +23 -23
  51. package/src/plugins/FileManageService.js +366 -366
  52. package/src/sale.js +1075 -1074
  53. package/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
  54. package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
  55. package/.gradle/5.2.1/gc.properties +0 -0
  56. package/.gradle/6.1.1/executionHistory/executionHistory.bin +0 -0
  57. package/.gradle/6.1.1/executionHistory/executionHistory.lock +0 -0
  58. package/.gradle/6.1.1/fileChanges/last-build.bin +0 -0
  59. package/.gradle/6.1.1/fileHashes/fileHashes.bin +0 -0
  60. package/.gradle/6.1.1/fileHashes/fileHashes.lock +0 -0
  61. package/.gradle/6.1.1/gc.properties +0 -0
  62. package/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  63. package/.gradle/7.1/dependencies-accessors/gc.properties +0 -0
  64. package/.gradle/7.1/executionHistory/executionHistory.bin +0 -0
  65. package/.gradle/7.1/executionHistory/executionHistory.lock +0 -0
  66. package/.gradle/7.1/fileChanges/last-build.bin +0 -0
  67. package/.gradle/7.1/fileHashes/fileHashes.bin +0 -0
  68. package/.gradle/7.1/fileHashes/fileHashes.lock +0 -0
  69. package/.gradle/7.1/gc.properties +0 -0
  70. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  71. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  72. package/.gradle/checksums/checksums.lock +0 -0
  73. package/.gradle/vcs-1/gc.properties +0 -0
@@ -1,642 +1,643 @@
1
- <template>
2
- <div>
3
- <div style="overflow-y: scroll;height: 92%">
4
- <div style="height: auto;width: 100%">
5
- <div style="margin-bottom: 2%; margin-top: 2%">
6
- <img style="margin-top: -5px" src="../../../static/images/lefticon/矩形1183.png">
7
- <a style="font-size: 20px;font-weight: 500;">基本信息</a>&nbsp;<a style="color: #999999;text-decoration: none"></a>
8
- <button class="button_search" style="width: max-content" v-show="data.baseinfo.base.f_user_nature === '单位'" @click="showUserDevices($index, data.baseinfo)">用户设备信息</button>
9
- <button class="button_search" style="width: max-content" @click="uploadFiles()">上传附件</button>
10
- <button class="button_search" style="width: max-content" @click="uploadPictures()">拍照</button>
11
- <button class="button_search" style="width: max-content" @click="openBankAccount()" v-if="data.meterinfo[0].f_user_type[0] === '非民用' && ($login.r.includes('银行开户'))">银行开户</button>
12
- </div>
13
- <file-user-essential-info :baseinfo="data.baseinfo" :addressinfo="data.addressinfo" @valid="essentialInfo = true"
14
- @invalid="essentialInfo = false" v-ref:useressential :isedit="isedit"></file-user-essential-info>
15
- <file-userinfo-device :userinfodevices.sync="userinfodevices" :show_userinfodevices.sync="show_userinfodevices"
16
- :userinfoid='data.baseinfo.base.f_userinfo_id'></file-userinfo-device>
17
- </div>
18
-
19
- <div style="height: auto;width: 100%">
20
- <file-user-meter-info :meterinfo.sync="data.meterinfo" :f_filialeid="f_filialeid" :metervalid.sync="meterInfo" :overdueset="overdueset"
21
- :f_userinfo_id="data.baseinfo.base.f_userinfo_id" :addressinfo="data.addressinfo" :baseinfo.sync="data.baseinfo.base" v-ref:meter></file-user-meter-info>
22
- </div>
23
-
24
- <div style="height: auto;width: 100%">
25
- <div style="margin-bottom: 2%; margin-top: 2%">
26
- <img style="margin-top: -5px" src="../../../static/images/lefticon/矩形1183.png">
27
- <a style="font-size: 20px;font-weight: 500;">发票信息</a>&nbsp;<a style="color: #999999"></a>
28
- </div>
29
- <user-paper-info-test :baseinfo="data.baseinfo"></user-paper-info-test>
30
- </div>
31
-
32
- <!--<div style="height: auto;width: 100%">-->
33
- <!--<div style="margin-bottom: 2%; margin-top: 2%">-->
34
- <!--<img style="margin-top: -5px" src="../../../static/images/lefticon/矩形1183.png">-->
35
- <!--<a style="font-size: 20px;font-weight: 500;">附件信息</a>&nbsp;<a style="color: #999999"></a>-->
36
- <!--</div>-->
37
- <!--<upload :blodid="blodid" isremark="true" fusetype="档案"></upload>-->
38
- <!--</div>-->
39
- </div>
40
-
41
- <div class="form-horizontal auto">
42
- <div class="form-group">
43
- <div style="text-align:right;">
44
-
45
- <button class="button_search" @click="confirm()" :disabled="!(essentialInfo && meterInfo )">确认
46
- </button>
47
- <button class="button_search" style="width: max-content" v-if="haslimit" @click="limitClick">限购配置</button>
48
- <button class="button_clear" @click="cancel()">取消</button>
49
- </div>
50
- </div>
51
- </div>
52
- <limit-gas :show.sync="limitShow" :f_userinfo_id="data.baseinfo.base.f_userinfo_id"
53
- @limit="getLimitGas"></limit-gas>
54
- <modal :show.sync="showfiles" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
55
- <article slot="modal-body">
56
- <upload-idcard :blodid="blodid" isremark="true" @getidinfo="confirmIdCard" style="width:auto" fusetype="档案信息" v-ref:upload></upload-idcard>
57
- </article>
58
- <footer slot="modal-footer" class="modal-footer">
59
- </footer>
60
- </modal>
61
- <high-meter-idcard :show.sync="highmetershow" v-if="highmetershow" @photo-finish="newPhoto" v-on:confirminfo="confirmIdCard"></high-meter-idcard>
62
-
63
- <modal :show.sync="filechangeDetailsShow" v-ref:filechangeDetailsShow backdrop="false" class="filechangeDetailsShow">
64
- <header slot="modal-header" class="modal-header" style="text-align: center">
65
- <h4 class="modal-title">档案修改明细</h4>
66
- </header>
67
- <article slot="modal-body" class="modal-body">
68
- <data-grid class="list_area table_sy" :model="filechangeDetails" partial='list'>
69
- <template partial='head'>
70
- <th><nobr>序号</nobr></th>
71
- <th><nobr>更改内容</nobr></th>
72
- <th><nobr>更改前</nobr></th>
73
- <th><nobr>更改后</nobr></th>
74
- </template>
75
- <template partial='body'>
76
- <td >{{$index+1}}</td>
77
- <td><nobr>{{row.f_field_name}}</nobr></td>
78
- <td><nobr>{{row.f_used_content}}</nobr></td>
79
- <td><nobr>{{row.f_new_content}}</nobr></td>
80
- </template>
81
- </data-grid>
82
- <div class="row">
83
- <div class="col-sm-12 form-group" >
84
- <label for="f_paper_account" class="col-sm-2 font_normal_body " title="参数:变更原因">变更原因:</label>
85
- <v-select v-model="reason" style="width:60%"
86
- placeholder='变更原因'
87
- :value.sync="reason"
88
- :options='reasons'
89
- :value-single="true"
90
- v-ref:reason
91
- close-on-select ></v-select>
92
- </div>
93
- </div>
94
- <div class="row">
95
- <div class="col-sm-2"></div>
96
- <input v-if="reason==='其他'" class="input_search" style="width:60%" placeholder='修改原因' v-model="fileSaveData.modifyReason"/>
97
- </div>
98
- </article>
99
- <footer slot="modal-footer" class="modal-footer">
100
- <button type="button" class="btn btn-default" @click='filechangeDetailsShow = false'>取消</button>
101
- <button type="button" class="btn btn-success" :disabled="!fileSaveData.modifyReason" @click='confirmation()'>确认</button>
102
- </footer>
103
- </modal>
104
- </div>
105
- </template>
106
-
107
- <script>
108
- import UserPaperInfoTest from './UserPaperInfoTest'
109
- import {HttpResetClass} from 'vue-client'
110
-
111
- let getFileGen = async function (self, data) {
112
- let http = new HttpResetClass()
113
- await self.$getConfig(self, 'FilesDetail')
114
- console.log('FilesDetail的config:' + self.config)
115
- let result = await http.load('POST', 'rs/logic/filemanage_getFilesDetail', data, {
116
- resolveMsg: null,
117
- rejectMsg: '用户详细信息加载失败,请重新选择,如果多次失败,请检查系统是否正常!'
118
- })
119
- self.data = result.data
120
- self.data.meterinfo.forEach((item)=>{
121
- item.devicesinfo.forEach((item2)=>{
122
- if(item2.img.content){
123
- let URL = item2.img.content.substring(item2.img.content.lastIndexOf(':\\') +2)
124
- item2.img.content = 'http://' + location.host + '/' + URL
125
- }
126
- })
127
- })
128
- // 更新地址
129
- // 修改附件临时id为表档案id
130
- self.blodid = self.data.baseinfo.base.f_userinfo_id
131
- console.log('获取档案信息', self.data)
132
- self.checkout()
133
- console.log('附件id', self.blodid)
134
- }
135
-
136
- export default {
137
- title: '综合信息',
138
- props: ['f_filialeid', 'row', 'areainfo', 'haslimit', 'isedit'],
139
- components: {UserPaperInfoTest},
140
- data () {
141
- return {
142
- config: {
143
- hasnumber: false,
144
- adddevices: false,
145
- f_building_suffix: '栋',
146
- f_unit_suffix: '单元',
147
- f_floor_suffix: '层',
148
- f_room_suffix: '室'
149
- },
150
- data: {
151
- baseinfo: {
152
- base: {
153
- f_user_state: '',
154
- f_credentials: '',
155
- f_cost_type: '',
156
- f_bz_type: '',
157
- f_paper_type: '',
158
- f_idnumber: ''
159
- },
160
- userinfodevices: [],
161
- bank: {
162
- f_bank_name: ''
163
- }
164
- },
165
- addressinfo: {},
166
- meterinfo: [{
167
- f_user_type: '',
168
- f_gasproperties: '',
169
- devicesinfo: [],
170
- fireinfo: {}
171
- }],
172
- devicesinfo: [],
173
- fireinfo:{},
174
- address: {
175
- id: '',
176
- f_address: ''
177
- }
178
- },
179
- show_userinfodevices: false,
180
- userinfodevices: [],
181
- oldAddress: {},
182
- highmetershow: false, // 高拍仪组件控制
183
- showfiles: false,
184
- overdueset: [],
185
- // 子组件验证
186
- essentialInfo: false,
187
- meterInfo: false,
188
-
189
- // 地址相关属性
190
- params: {
191
- areas: [],
192
- f_street: [],
193
- f_residential_area: []
194
- },
195
-
196
- // 限购相关属性
197
- limitShow: false,
198
- limit_gas: null,
199
- peopleNum: this.$appdata.getSingleValue('默认人口'),
200
- blodid: '', // 附件的临时id
201
- defaultMeterInfo: '', // 默认的表具信息
202
- fileSaveData: {
203
- // 修改原因
204
- modifyReason: ''
205
- },
206
- // 档案变更明细
207
- filechangeDetails: {rows: []},
208
- filechangeDetailsShow: false
209
- }
210
- },
211
- async ready () {
212
- this.blodid = '临时id' + Date.now()
213
- console.log('ready,,,', this.row)
214
- await this.getOvedueset()
215
- if (this.row) { // 修改用户
216
- await this.areaGen(this.row)
217
- } else if (!this.row) { // 小区批量建档
218
- // 将小区信息转化为综合信息的格式
219
- await this.areainfoInUser(this.areainfo)
220
- }
221
- },
222
- watch: {
223
- async 'row' (val) {
224
- console.log('观察row', val)
225
- if (val) {
226
- await this.areaGen(val)
227
- } else {
228
- await this.areainfoInUser(this.areainfo)
229
- }
230
- },
231
- 'areainfo' (val) {
232
- console.log('小区观察。。', val)
233
- if (val) {
234
- this.$refs.meter.clearMeter()
235
- this.blodid = '临时id' + Date.now()
236
- this.areainfoInUser(val)
237
- }
238
- },
239
- 'essentialInfo' (val) {
240
- console.log('观察到验证变化', val)
241
- }
242
- },
243
- methods: {
244
- async getOvedueset () {
245
- let overdueset= []
246
- let res = await this.$resetpost('rs/sql/saleSingleTable', {
247
- data: {
248
- tablename: 't_overdue_set',
249
- condition: `f_orgid = '${this.f_filialeid}' `
250
- }
251
- }, {resolveMsg: null, rejectMsg: ''})
252
- for (let row of res.data) {
253
- overdueset.push({label: row.f_rule_name, value: `${row.id}`})
254
- }
255
- this.overdueset = overdueset
256
- },
257
- confirmIdCard (IdCardInfo) {
258
- console.log('返回的身份证', IdCardInfo)
259
- this.uploadPictures()
260
- this.data.baseinfo.base.f_user_name = IdCardInfo.strName
261
- this.data.baseinfo.base.f_idnumber = IdCardInfo.strID
262
- },
263
- showUserDevices (index, row) {
264
- this.userinfodevices = []
265
- this.show_userinfodevices = true
266
- this.userinfodevices = row.userinfodevices
267
- console.log('查看设备信息', this.userinfodevices)
268
- },
269
-
270
- uploadFiles () {
271
- this.showfiles = !this.showfiles
272
- },
273
-
274
- uploadPictures () {
275
- this.highmetershow = !this.highmetershow
276
- },
277
-
278
- openBankAccount () {
279
- this.$resetpost('rs/logic/openBankAccount', {f_userinfo_code: this.data.baseinfo.base.f_userinfo_code, f_username: this.data.baseinfo.base.f_user_name},
280
- {resolveMsg: null, rejectMsg: null}).then((res) => {
281
- this.$showMessage(res.data.resultmessage)
282
- })
283
- },
284
- async confirm () {
285
- this.data.addressinfo.f_address = this.$refs.useressential.addressinfo.f_address
286
- this.data.addressinfo.id = this.$refs.useressential.addressinfo.id
287
- this.data.oldaddressinfo = this.oldAddress
288
- this.data.hasnumber = this.config.hasnumber
289
- this.data.limit_gas = this.limit_gas
290
- if (this.f_filialeid && this.f_filialeid != '') {
291
- this.data.f_filialeid = this.f_filialeid
292
- } else {
293
- this.data.f_filialeid = this.$login.f.orgid
294
- }
295
- if (this.row) {
296
- this.data.baseinfo.base.version = this.row.version
297
- }
298
- console.log('档案保存之前,。。。', this.data)
299
- // 获取保存数据
300
- Object.assign(this.fileSaveData, {}, this.$FileManageService.fileSaveBefore(this.data))
301
- // 如果是修改, 则展示修改的明细给用户
302
- if (this.fileSaveData.userinfo.f_userinfo_id) {
303
- if (this.row.f_user_state === '预备' && this.fileSaveData.userinfo.f_user_state === '正常') {
304
- this.fileSaveData.modifyReason = this.reason = '建档(档案信息完善)'
305
- } else {
306
- this.reason = '其他'
307
- this.fileSaveData.modifyReason = ''
308
- }
309
- let details = await this.$resetpost('rs/logic/filechangeDetails', {data: this.fileSaveData}, {resolveMsg: null, rejectMsg: '获取修改明细出错!'})
310
- this.filechangeDetails.rows = details.data.changeDetails
311
- this.filechangeDetailsShow = details.data.isChange
312
- }
313
- // 不是修改直接保存
314
- if (!this.filechangeDetailsShow) this.confirmation()
315
- },
316
- confirmation () {
317
- // 权限判断, 没有修改权限,只可以修改电话
318
- // if (this.filechangeDetailsShow && this.filechangeDetails.rows.find(value => value.f_field_name != '用户电话')) {
319
- // if (!this.$login.r.find(value => value == '档案信息查询修改')) {
320
- // this.$showMessage('当前登陆用户没有档案信息查询修改权限, 只能修改用户电话!')
321
- // return
322
- // }
323
- // }
324
- this.$FileManageService.fileSave(this.fileSaveData).then((res) => {
325
- this.$parent.resdata = res.data.result[0].f_userinfo_code
326
- if (!this.row) {
327
- this.$parent.resshow = true
328
- }
329
- this.$dispatch('success')
330
- }).catch((error) => {
331
- if (error.status === 603) {
332
- this.$error('重复提交')
333
- return
334
- }
335
- this.$dispatch('error', '档案保存', this.data, error)
336
- })
337
- },
338
- convertBase64ToBlob (base64String) {
339
- // 将base64解码
340
- var bytes = atob(base64String)
341
- // var bytes = base64;
342
- var bytesCode = new ArrayBuffer(bytes.length)
343
- // 转换为类型化数组
344
- var byteArray = new Uint8Array(bytesCode)
345
-
346
- // 将base64转换为ascii码
347
- for (var i = 0; i < bytes.length; i++) {
348
- byteArray[i] = bytes.charCodeAt(i)
349
- }
350
- // 生成Blob对象(文件对象)
351
- return new Blob([bytesCode], {type: 'image/jpeg'})
352
- },
353
- newPhoto (Imgbase64) {
354
- this.$refs.upload.newPhoto(Imgbase64)
355
- /* let form = new FormData()
356
- let xhr = new XMLHttpRequest()
357
- let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
358
- form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
359
- form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
360
- xhr.open("POST", "rs/file/uploadFile")
361
-
362
- if (this.headers) {
363
- for (var header in this.headers) {
364
- xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
365
- }
366
- }
367
- xhr.send(form)
368
- setTimeout(() => {
369
- this.load(this)
370
- }, 5000) */
371
- },
372
- async areaGen (data) {
373
- data.f_user_id = data.f_user_id + ''
374
- await getFileGen(this, data)
375
- },
376
- cancel () {
377
- this.$dispatch('clean', '取消档案修正', 'user-general-info', this.row)
378
- },
379
- checkout (val) {
380
- // 对收到的综合信息进行校验(主要目的是为了防止下拉框没有默认值)
381
- // 对综合用户基本信息进行校验
382
-
383
- // 将oldAddress 置为空,
384
- this.oldAddress = {}
385
- this.data.baseinfo.base.f_user_state = this.data.baseinfo.base.f_user_state ? ['正常'] : '正常'
386
- // this.data.baseinfo.base.f_user_nature = this.data.baseinfo.base.f_user_nature ? [this.data.baseinfo.base.f_user_nature] : '民用'
387
- // this.data.baseinfo.base.f_credentials = this.data.baseinfo.base.f_credentials ? [this.data.baseinfo.base.f_credentials] : '身份证'
388
- this.data.baseinfo.base.f_cost_type = this.data.baseinfo.base.f_cost_type ? [this.data.baseinfo.base.f_cost_type] : '现金缴费'
389
- this.data.baseinfo.base.f_bz_type = this.data.baseinfo.base.f_bz_type ? [this.data.baseinfo.base.f_bz_type] : ''
390
-
391
- this.data.baseinfo.base.f_paper_type = this.data.baseinfo.base.f_paper_type ? [this.data.baseinfo.base.f_paper_type] : '国税发票'
392
- this.data.baseinfo.bank.f_bank_name = this.data.baseinfo.bank.f_bank_name ? [this.data.baseinfo.bank.f_bank_name] : '中国银行'
393
- this.data.baseinfo.base.f_people_num = this.data.baseinfo.base.f_people_num ? this.data.baseinfo.base.f_people_num : (this.peopleNum ? this.peopleNum : 0)
394
-
395
- if (this.data.baseinfo.base.f_slice_area) {
396
- this.data.baseinfo.base.f_slice_area = [this.data.baseinfo.base.f_slice_area]
397
- } else {
398
- this.data.baseinfo.base.f_slice_area = ''
399
- }
400
- this.oldAddress.f_address = this.data.addressinfo.f_address
401
- this.oldAddress.id = this.data.addressinfo.id
402
-
403
- // 地址信息
404
- // loadStreetAndResGen(this)
405
-
406
- // 对表具信息进行校验
407
- this.data.meterinfo.forEach((row) => {
408
- console.log(row)
409
- if (row.gasbrand) {
410
- this.meterbrands.forEach((item) => {
411
- if (item.label === row.gasbrand) {
412
- row.gasbrand = [item.value]
413
- }
414
- })
415
- } else {
416
- row.gasbrand = ''
417
- }
418
- if (row.gasmodel && (row.gasbrand instanceof Array)) {
419
- row.gasbrand[0].gasmodel.forEach((item) => {
420
- if (item.label === (val === 'area' ? row.gasmodel : row.gasmodel + row.gasmodeltype)) {
421
- row.gasmodel = [item.value]
422
- }
423
- })
424
- } else {
425
- row.gasmodel = ''
426
- }
427
- if (row.f_fire_state === '1') {
428
- row.f_fire_state1 = true
429
- } else if (row.f_fire_state === '0') {
430
- row.f_fire_state1 = false
431
- }
432
- row.f_install_date = row.f_install_date ? row.f_install_date : ''
433
- row.f_gas_date = row.f_gas_date ? row.f_gas_date : null
434
- row.f_changetube_date = row.f_changetube_date ? row.f_changetube_date : null
435
- row.f_aroundmeter = row.f_aroundmeter ? row.f_aroundmeter : ''
436
- row.f_garbage_fee = row.f_garbage_fee ? [row.f_garbage_fee] : ''
437
- row.f_valve_state = row.f_valve_state ? [row.f_valve_state] : ''
438
- row.f_usetype = row.f_usetype ? [row.f_usetype] : ''
439
- row.f_usestate = row.f_usestate ? [row.f_usestate] : ''
440
- row.f_inputtor = row.f_inputtor ? [row.f_inputtor] : ''
441
- row.f_position = row.f_position ? row.f_position : ''
442
-
443
- row.f_user_type = row.f_user_type ? [row.f_user_type] : ''
444
- row.f_gasproperties = row.f_gasproperties ? [row.f_gasproperties] : ''
445
- row.pricetype = row.pricetype ? [row.pricetype] : ''
446
-
447
- if (row.pricename) {
448
- let names = this.getPricenames(row.f_user_type,
449
- row.f_gasproperties,
450
- row.pricetype)
451
-
452
- console.log('=====2.===校验气价名称', names, row.f_user_type, row.f_gasproperties, row.pricetype)
453
- if (names.length > 0) {
454
- names.forEach((item) => {
455
- if (item.label === row.pricename) {
456
- row.pricename = [item.value]
457
- row.f_detailprice = this.$CommonService.getShowPriceDetail(item.value.detailprice)
458
- }
459
- })
460
- } else {
461
- row.pricename = ''
462
- }
463
- } else {
464
- row.pricename = ''
465
- }
466
-
467
- if (row.f_adjustable) {
468
- this.adjustables.forEach((item) => {
469
- if (item.label === row.f_adjustable) {
470
- row.f_adjustable = [item.value]
471
- }
472
- })
473
- } else {
474
- row.f_adjustable = ''
475
- }
476
- })
477
- // console.log('5555555555', this.data.meterinfo)
478
- // 对设备进行校验
479
- // this.data.devicesinfo.forEach((row) => {
480
- // row.f_devices_type = row.f_devices_type ? [row.f_devices_type] : ''
481
- // })
482
- },
483
- getPricenames (f_user_type, f_gasproperties, f_price_type) {
484
- let rs = []
485
- if (f_user_type.length === 1 && f_gasproperties.length === 1 && f_price_type.length === 1) {
486
- rs = this.$GetSaleParam.getPrice({
487
- f_user_type: f_user_type[0],
488
- f_gasproperties: f_gasproperties[0],
489
- f_price_type: f_price_type[0],
490
- filter: this.f_filialeid
491
- })
492
- }
493
- return rs
494
- },
495
- // 将小区信息转化为综合信息的格式
496
- async areainfoInUser (areainfo) {
497
- // this.nextTick(() => {
498
- //
499
- // })
500
- // await this.$getConfig(this, 'UserAddress')
501
- this.data = {
502
- baseinfo: {
503
- base: {
504
- f_user_state: '正常',
505
- f_is_mgq: '',
506
- f_slice_area: '', // 片区
507
- // 附件表临时id
508
- blodid: this.blodid,
509
- // 用户姓名
510
- f_user_name: '',
511
- // 用户电话
512
- f_user_phone: '',
513
- f_people_num: 0,
514
- f_packaging:'',
515
- // 备用电话
516
- f_rent_phone: '',
517
- f_credentials: '身份证',
518
- f_cost_type: '',
519
- f_bz_type:'',
520
- f_address: '',
521
- addressid: '',
522
- f_idnumber: '',
523
- f_meter_book_num:''
524
- },
525
- bank: {}
526
- },
527
- addressinfo: {
528
- // 详细地址
529
- f_address: '',
530
- id: ''
531
- },
532
- meterinfo: [{
533
- // 表号
534
- f_meternumber: '',
535
- f_metertitles: '',
536
- f_area_code: '',
537
- // 气表品牌
538
- gasbrand: '',
539
- // 气表型号
540
- gasmodel: '',
541
- // 气表类型
542
- gasmodeltype: '',
543
- pricetype: '', // 气价类型
544
- pricename: '', // 气价名称
545
- f_user_type: '', // 用户类型
546
- f_gasproperties: '', // 用气性质
547
- f_inputtor: '',
548
- // 安装位置
549
- f_position: '',
550
- // 安装地址
551
- f_userfiles_address: '',
552
- // 安装经度
553
- f_userfiles_lng: '',
554
- // 安装纬度
555
- f_userfiles_lat: '',
556
- // 使用类型
557
- f_usetype: '',
558
- // 使用状态
559
- f_usestate: '',
560
- // 左右表
561
- f_aroundmeter: '',
562
- f_garbage_fee: '否',
563
- f_meter_base: '',
564
- f_initial_base: 0,
565
- // 通气人
566
- f_gas_person: '',
567
- f_adjustable: '', // 调压箱
568
- f_detailprice: '', // 价格详情显示
569
- devicesinfo: [], // 设备信息
570
- f_hand_month: '', // 抄表月份
571
- fireinfo:{}, //用气信息
572
- f_meter_book_num:''
573
- }],
574
- devicesinfo: []
575
- }
576
- // 若有id,则表示该地址是更新操作
577
- /* if (areainfo.id) {
578
- this.data.addressinfo.id = areainfo.id
579
- }
580
- // 改地址是 只有表没有户信息
581
- if (areainfo.meter) {
582
- Object.assign(this.data.meterinfo[0], this.data.meterinfo[0], areainfo.meter)
583
- }
584
- if (areainfo.user) {
585
- Object.assign(this.data.baseinfo.base, this.data.baseinfo.base, areainfo.user)
586
- } */
587
-
588
- this.checkout('area')
589
- },
590
- limitClick () {
591
- this.limitShow = true
592
- },
593
- getLimitGas (val) {
594
- this.limit_gas = val
595
- },
596
- clearinfo () {
597
- this.blodid = '临时id' + Date.now()
598
- this.areainfoInUser(this.areainfo)
599
- }
600
- },
601
- computed: {
602
- meterbrands () {
603
- return this.$GetSaleParam.getGasbrand()
604
- },
605
- adjustables () {
606
- return this.$GetSaleParam.getAdjustable()
607
- },
608
- getMeterBooks () {
609
- return this.$GetSaleParam.getMeterBooks()
610
- }
611
- },
612
- events: {
613
- // 设置表具气价等默认值
614
- defaultOtheret (row) {
615
- if (!this.isedit) {
616
- let temp = {
617
- gasmodel: row.f_meter_style,
618
- gasbrand: row.f_meter_brand,
619
- gasmodeltype: row.f_meter_style,
620
- pricetype: row.f_price_type,
621
- pricename: row.f_price_name,
622
- f_user_type: row.f_user_type,
623
- f_gasproperties: row.f_gasproperties,
624
- f_position: row.f_position,
625
- f_inputtor: row.f_inputtor,
626
- f_hand_month: row.f_hand_month
627
- }
628
- Object.assign(this.data.meterinfo[0], this.data.meterinfo[0], temp)
629
- console.log('====1.=====', temp, row)
630
- this.checkout('area')
631
- }
632
- }
633
- }
634
- }
635
- </script>
636
- <style lang="less">
637
- .filechangeDetailsShow {
638
- td {
639
- text-align: center !important;
640
- }
641
- }
642
- </style>
1
+ <template>
2
+ <div>
3
+ <div style="overflow-y: scroll;height: 92%">
4
+ <div style="height: auto;width: 100%">
5
+ <div style="margin-bottom: 2%; margin-top: 2%">
6
+ <img style="margin-top: -5px" src="../../../static/images/lefticon/矩形1183.png">
7
+ <a style="font-size: 20px;font-weight: 500;">基本信息</a>&nbsp;<a style="color: #999999;text-decoration: none"></a>
8
+ <button class="button_search" style="width: max-content" v-show="data.baseinfo.base.f_user_nature === '单位'" @click="showUserDevices($index, data.baseinfo)">用户设备信息</button>
9
+ <button class="button_search" style="width: max-content" @click="uploadFiles()">上传附件</button>
10
+ <button class="button_search" style="width: max-content" @click="uploadPictures()">拍照</button>
11
+ <button class="button_search" style="width: max-content" @click="openBankAccount()" v-if="data.meterinfo[0].f_user_type[0] === '非民用' && ($login.r.includes('银行开户'))">银行开户</button>
12
+ </div>
13
+ <file-user-essential-info :baseinfo="data.baseinfo" :addressinfo="data.addressinfo" @valid="essentialInfo = true"
14
+ @invalid="essentialInfo = false" v-ref:useressential :isedit="isedit"></file-user-essential-info>
15
+ <file-userinfo-device :userinfodevices.sync="userinfodevices" :show_userinfodevices.sync="show_userinfodevices"
16
+ :userinfoid='data.baseinfo.base.f_userinfo_id'></file-userinfo-device>
17
+ </div>
18
+
19
+ <div style="height: auto;width: 100%">
20
+ <file-user-meter-info :meterinfo.sync="data.meterinfo" :f_filialeid="f_filialeid" :metervalid.sync="meterInfo" :overdueset="overdueset"
21
+ :f_userinfo_id="data.baseinfo.base.f_userinfo_id" :addressinfo="data.addressinfo" :baseinfo.sync="data.baseinfo.base" v-ref:meter></file-user-meter-info>
22
+ </div>
23
+
24
+ <div style="height: auto;width: 100%">
25
+ <div style="margin-bottom: 2%; margin-top: 2%">
26
+ <img style="margin-top: -5px" src="../../../static/images/lefticon/矩形1183.png">
27
+ <a style="font-size: 20px;font-weight: 500;">发票信息</a>&nbsp;<a style="color: #999999"></a>
28
+ </div>
29
+ <user-paper-info-test :baseinfo="data.baseinfo"></user-paper-info-test>
30
+ </div>
31
+
32
+ <!--<div style="height: auto;width: 100%">-->
33
+ <!--<div style="margin-bottom: 2%; margin-top: 2%">-->
34
+ <!--<img style="margin-top: -5px" src="../../../static/images/lefticon/矩形1183.png">-->
35
+ <!--<a style="font-size: 20px;font-weight: 500;">附件信息</a>&nbsp;<a style="color: #999999"></a>-->
36
+ <!--</div>-->
37
+ <!--<upload :blodid="blodid" isremark="true" fusetype="档案"></upload>-->
38
+ <!--</div>-->
39
+ </div>
40
+
41
+ <div class="form-horizontal auto">
42
+ <div class="form-group">
43
+ <div style="text-align:right;">
44
+
45
+ <button class="button_search" @click="confirm()" :disabled="!(essentialInfo && meterInfo )">确认
46
+ </button>
47
+ <button class="button_search" style="width: max-content" v-if="haslimit" @click="limitClick">限购配置</button>
48
+ <button class="button_clear" @click="cancel()">取消</button>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ <limit-gas :show.sync="limitShow" :f_userinfo_id="data.baseinfo.base.f_userinfo_id"
53
+ @limit="getLimitGas"></limit-gas>
54
+ <modal :show.sync="showfiles" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
55
+ <article slot="modal-body">
56
+ <upload-idcard :blodid="blodid" isremark="true" @getidinfo="confirmIdCard" style="width:auto" fusetype="档案信息" v-ref:upload></upload-idcard>
57
+ </article>
58
+ <footer slot="modal-footer" class="modal-footer">
59
+ </footer>
60
+ </modal>
61
+ <high-meter-idcard :show.sync="highmetershow" v-if="highmetershow" @photo-finish="newPhoto" v-on:confirminfo="confirmIdCard"></high-meter-idcard>
62
+
63
+ <modal :show.sync="filechangeDetailsShow" v-ref:filechangeDetailsShow backdrop="false" class="filechangeDetailsShow">
64
+ <header slot="modal-header" class="modal-header" style="text-align: center">
65
+ <h4 class="modal-title">档案修改明细</h4>
66
+ </header>
67
+ <article slot="modal-body" class="modal-body">
68
+ <data-grid class="list_area table_sy" :model="filechangeDetails" partial='list'>
69
+ <template partial='head'>
70
+ <th><nobr>序号</nobr></th>
71
+ <th><nobr>更改内容</nobr></th>
72
+ <th><nobr>更改前</nobr></th>
73
+ <th><nobr>更改后</nobr></th>
74
+ </template>
75
+ <template partial='body'>
76
+ <td >{{$index+1}}</td>
77
+ <td><nobr>{{row.f_field_name}}</nobr></td>
78
+ <td><nobr>{{row.f_used_content}}</nobr></td>
79
+ <td><nobr>{{row.f_new_content}}</nobr></td>
80
+ </template>
81
+ </data-grid>
82
+ <div class="row">
83
+ <div class="col-sm-12 form-group" >
84
+ <label for="f_paper_account" class="col-sm-2 font_normal_body " title="参数:变更原因">变更原因:</label>
85
+ <v-select v-model="reason" style="width:60%"
86
+ placeholder='变更原因'
87
+ :value.sync="reason"
88
+ :options='reasons'
89
+ :value-single="true"
90
+ v-ref:reason
91
+ close-on-select ></v-select>
92
+ </div>
93
+ </div>
94
+ <div class="row">
95
+ <div class="col-sm-2"></div>
96
+ <input v-if="reason==='其他'" class="input_search" style="width:60%" placeholder='修改原因' v-model="fileSaveData.modifyReason"/>
97
+ </div>
98
+ </article>
99
+ <footer slot="modal-footer" class="modal-footer">
100
+ <button type="button" class="btn btn-default" @click='filechangeDetailsShow = false'>取消</button>
101
+ <button type="button" class="btn btn-success" :disabled="!fileSaveData.modifyReason" @click='confirmation()'>确认</button>
102
+ </footer>
103
+ </modal>
104
+ </div>
105
+ </template>
106
+
107
+ <script>
108
+ import UserPaperInfoTest from './UserPaperInfoTest'
109
+ import {HttpResetClass} from 'vue-client'
110
+
111
+ let getFileGen = async function (self, data) {
112
+ let http = new HttpResetClass()
113
+ await self.$getConfig(self, 'FilesDetail')
114
+ console.log('FilesDetail的config:' + self.config)
115
+ let result = await http.load('POST', 'rs/logic/filemanage_getFilesDetail', data, {
116
+ resolveMsg: null,
117
+ rejectMsg: '用户详细信息加载失败,请重新选择,如果多次失败,请检查系统是否正常!'
118
+ })
119
+ self.data = result.data
120
+ self.data.meterinfo.forEach((item)=>{
121
+ item.devicesinfo.forEach((item2)=>{
122
+ if(item2.img.content){
123
+ let URL = item2.img.content.substring(item2.img.content.lastIndexOf(':\\') +2)
124
+ item2.img.content = 'http://' + location.host + '/' + URL
125
+ }
126
+ })
127
+ })
128
+ // 更新地址
129
+ // 修改附件临时id为表档案id
130
+ self.blodid = self.data.baseinfo.base.f_userinfo_id
131
+ console.log('获取档案信息', self.data)
132
+ self.checkout()
133
+ console.log('附件id', self.blodid)
134
+ }
135
+
136
+ export default {
137
+ title: '综合信息',
138
+ props: ['f_filialeid', 'row', 'areainfo', 'haslimit', 'isedit'],
139
+ components: {UserPaperInfoTest},
140
+ data () {
141
+ return {
142
+ config: {
143
+ hasnumber: false,
144
+ adddevices: false,
145
+ f_building_suffix: '栋',
146
+ f_unit_suffix: '单元',
147
+ f_floor_suffix: '层',
148
+ f_room_suffix: '室'
149
+ },
150
+ data: {
151
+ baseinfo: {
152
+ base: {
153
+ f_user_state: '',
154
+ f_credentials: '',
155
+ f_cost_type: '',
156
+ f_bz_type: '',
157
+ f_paper_type: '',
158
+ f_idnumber: ''
159
+ },
160
+ userinfodevices: [],
161
+ bank: {
162
+ f_bank_name: ''
163
+ }
164
+ },
165
+ addressinfo: {},
166
+ meterinfo: [{
167
+ f_user_type: '',
168
+ f_gasproperties: '',
169
+ devicesinfo: [],
170
+ fireinfo: {}
171
+ }],
172
+ devicesinfo: [],
173
+ fireinfo:{},
174
+ address: {
175
+ id: '',
176
+ f_address: ''
177
+ }
178
+ },
179
+ show_userinfodevices: false,
180
+ userinfodevices: [],
181
+ oldAddress: {},
182
+ highmetershow: false, // 高拍仪组件控制
183
+ showfiles: false,
184
+ overdueset: [],
185
+ // 子组件验证
186
+ essentialInfo: false,
187
+ meterInfo: false,
188
+
189
+ // 地址相关属性
190
+ params: {
191
+ areas: [],
192
+ f_street: [],
193
+ f_residential_area: []
194
+ },
195
+
196
+ // 限购相关属性
197
+ limitShow: false,
198
+ limit_gas: null,
199
+ peopleNum: this.$appdata.getSingleValue('默认人口'),
200
+ blodid: '', // 附件的临时id
201
+ defaultMeterInfo: '', // 默认的表具信息
202
+ fileSaveData: {
203
+ // 修改原因
204
+ modifyReason: ''
205
+ },
206
+ // 档案变更明细
207
+ filechangeDetails: {rows: []},
208
+ filechangeDetailsShow: false
209
+ }
210
+ },
211
+ async ready () {
212
+ this.blodid = '临时id' + Date.now()
213
+ console.log('ready,,,', this.row)
214
+ await this.getOvedueset()
215
+ if (this.row) { // 修改用户
216
+ await this.areaGen(this.row)
217
+ } else if (!this.row) { // 小区批量建档
218
+ // 将小区信息转化为综合信息的格式
219
+ await this.areainfoInUser(this.areainfo)
220
+ }
221
+ },
222
+ watch: {
223
+ async 'row' (val) {
224
+ console.log('观察row', val)
225
+ if (val) {
226
+ await this.areaGen(val)
227
+ } else {
228
+ await this.areainfoInUser(this.areainfo)
229
+ }
230
+ },
231
+ 'areainfo' (val) {
232
+ console.log('小区观察。。', val)
233
+ if (val) {
234
+ this.$refs.meter.clearMeter()
235
+ this.blodid = '临时id' + Date.now()
236
+ this.areainfoInUser(val)
237
+ }
238
+ },
239
+ 'essentialInfo' (val) {
240
+ console.log('观察到验证变化', val)
241
+ }
242
+ },
243
+ methods: {
244
+ async getOvedueset () {
245
+ let overdueset= []
246
+ let res = await this.$resetpost('rs/sql/saleSingleTable', {
247
+ data: {
248
+ tablename: 't_overdue_set',
249
+ condition: `f_orgid = '${this.f_filialeid}' `
250
+ }
251
+ }, {resolveMsg: null, rejectMsg: ''})
252
+ for (let row of res.data) {
253
+ overdueset.push({label: row.f_rule_name, value: `${row.id}`})
254
+ }
255
+ this.overdueset = overdueset
256
+ },
257
+ confirmIdCard (IdCardInfo) {
258
+ console.log('返回的身份证', IdCardInfo)
259
+ this.uploadPictures()
260
+ this.data.baseinfo.base.f_user_name = IdCardInfo.strName
261
+ this.data.baseinfo.base.f_idnumber = IdCardInfo.strID
262
+ },
263
+ showUserDevices (index, row) {
264
+ this.userinfodevices = []
265
+ this.show_userinfodevices = true
266
+ this.userinfodevices = row.userinfodevices
267
+ console.log('查看设备信息', this.userinfodevices)
268
+ },
269
+
270
+ uploadFiles () {
271
+ this.showfiles = !this.showfiles
272
+ },
273
+
274
+ uploadPictures () {
275
+ this.highmetershow = !this.highmetershow
276
+ },
277
+
278
+ openBankAccount () {
279
+ this.$resetpost('rs/logic/openBankAccount', {f_userinfo_code: this.data.baseinfo.base.f_userinfo_code, f_username: this.data.baseinfo.base.f_user_name},
280
+ {resolveMsg: null, rejectMsg: null}).then((res) => {
281
+ this.$showMessage(res.data.resultmessage)
282
+ })
283
+ },
284
+ async confirm () {
285
+ this.data.addressinfo.f_address = this.$refs.useressential.addressinfo.f_address
286
+ this.data.addressinfo.id = this.$refs.useressential.addressinfo.id
287
+ this.data.oldaddressinfo = this.oldAddress
288
+ this.data.hasnumber = this.config.hasnumber
289
+ this.data.limit_gas = this.limit_gas
290
+ if (this.f_filialeid && this.f_filialeid != '') {
291
+ this.data.f_filialeid = this.f_filialeid
292
+ } else {
293
+ this.data.f_filialeid = this.$login.f.orgid
294
+ }
295
+ if (this.row) {
296
+ this.data.baseinfo.base.version = this.row.version
297
+ }
298
+ console.log('档案保存之前,。。。', this.data)
299
+ // 获取保存数据
300
+ Object.assign(this.fileSaveData, {}, this.$FileManageService.fileSaveBefore(this.data))
301
+ // 如果是修改, 则展示修改的明细给用户
302
+ if (this.fileSaveData.userinfo.f_userinfo_id) {
303
+ if (this.row.f_user_state === '预备' && this.fileSaveData.userinfo.f_user_state === '正常') {
304
+ this.fileSaveData.modifyReason = this.reason = '建档(档案信息完善)'
305
+ } else {
306
+ this.reason = '其他'
307
+ this.fileSaveData.modifyReason = ''
308
+ }
309
+ let details = await this.$resetpost('rs/logic/filechangeDetails', {data: this.fileSaveData}, {resolveMsg: null, rejectMsg: '获取修改明细出错!'})
310
+ this.filechangeDetails.rows = details.data.changeDetails
311
+ this.filechangeDetailsShow = details.data.isChange
312
+ }
313
+ // 不是修改直接保存
314
+ if (!this.filechangeDetailsShow) this.confirmation()
315
+ },
316
+ confirmation () {
317
+ // 权限判断, 没有修改权限,只可以修改电话
318
+ // if (this.filechangeDetailsShow && this.filechangeDetails.rows.find(value => value.f_field_name != '用户电话')) {
319
+ // if (!this.$login.r.find(value => value == '档案信息查询修改')) {
320
+ // this.$showMessage('当前登陆用户没有档案信息查询修改权限, 只能修改用户电话!')
321
+ // return
322
+ // }
323
+ // }
324
+ this.$FileManageService.fileSave(this.fileSaveData).then((res) => {
325
+ this.$parent.resdata = res.data.result[0].f_userinfo_code
326
+ if (!this.row) {
327
+ this.$parent.resshow = true
328
+ }
329
+ this.$dispatch('success')
330
+ }).catch((error) => {
331
+ if (error.status === 603) {
332
+ this.$error('重复提交')
333
+ return
334
+ }
335
+ this.$dispatch('error', '档案保存', this.data, error)
336
+ })
337
+ },
338
+ convertBase64ToBlob (base64String) {
339
+ // 将base64解码
340
+ var bytes = atob(base64String)
341
+ // var bytes = base64;
342
+ var bytesCode = new ArrayBuffer(bytes.length)
343
+ // 转换为类型化数组
344
+ var byteArray = new Uint8Array(bytesCode)
345
+
346
+ // 将base64转换为ascii码
347
+ for (var i = 0; i < bytes.length; i++) {
348
+ byteArray[i] = bytes.charCodeAt(i)
349
+ }
350
+ // 生成Blob对象(文件对象)
351
+ return new Blob([bytesCode], {type: 'image/jpeg'})
352
+ },
353
+ newPhoto (Imgbase64) {
354
+ this.$refs.upload.newPhoto(Imgbase64)
355
+ /* let form = new FormData()
356
+ let xhr = new XMLHttpRequest()
357
+ let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
358
+ form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
359
+ form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
360
+ xhr.open("POST", "rs/file/uploadFile")
361
+
362
+ if (this.headers) {
363
+ for (var header in this.headers) {
364
+ xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
365
+ }
366
+ }
367
+ xhr.send(form)
368
+ setTimeout(() => {
369
+ this.load(this)
370
+ }, 5000) */
371
+ },
372
+ async areaGen (data) {
373
+ data.f_user_id = data.f_user_id + ''
374
+ await getFileGen(this, data)
375
+ },
376
+ cancel () {
377
+ this.$dispatch('clean', '取消档案修正', 'user-general-info', this.row)
378
+ },
379
+ checkout (val) {
380
+ // 对收到的综合信息进行校验(主要目的是为了防止下拉框没有默认值)
381
+ // 对综合用户基本信息进行校验
382
+
383
+ // 将oldAddress 置为空,
384
+ this.oldAddress = {}
385
+ this.data.baseinfo.base.f_user_state = this.data.baseinfo.base.f_user_state ? ['正常'] : '正常'
386
+ // this.data.baseinfo.base.f_user_nature = this.data.baseinfo.base.f_user_nature ? [this.data.baseinfo.base.f_user_nature] : '民用'
387
+ // this.data.baseinfo.base.f_credentials = this.data.baseinfo.base.f_credentials ? [this.data.baseinfo.base.f_credentials] : '身份证'
388
+ this.data.baseinfo.base.f_cost_type = this.data.baseinfo.base.f_cost_type ? [this.data.baseinfo.base.f_cost_type] : '现金缴费'
389
+ this.data.baseinfo.base.f_bz_type = this.data.baseinfo.base.f_bz_type ? [this.data.baseinfo.base.f_bz_type] : ''
390
+
391
+ this.data.baseinfo.base.f_paper_type = this.data.baseinfo.base.f_paper_type ? [this.data.baseinfo.base.f_paper_type] : '国税发票'
392
+ this.data.baseinfo.bank.f_bank_name = this.data.baseinfo.bank.f_bank_name ? [this.data.baseinfo.bank.f_bank_name] : '中国银行'
393
+ this.data.baseinfo.base.f_people_num = this.data.baseinfo.base.f_people_num ? this.data.baseinfo.base.f_people_num : (this.peopleNum ? this.peopleNum : 0)
394
+
395
+ if (this.data.baseinfo.base.f_slice_area) {
396
+ this.data.baseinfo.base.f_slice_area = [this.data.baseinfo.base.f_slice_area]
397
+ } else {
398
+ this.data.baseinfo.base.f_slice_area = ''
399
+ }
400
+ this.oldAddress.f_address = this.data.addressinfo.f_address
401
+ this.oldAddress.id = this.data.addressinfo.id
402
+
403
+ // 地址信息
404
+ // loadStreetAndResGen(this)
405
+
406
+ // 对表具信息进行校验
407
+ this.data.meterinfo.forEach((row) => {
408
+ console.log(row)
409
+ if (row.gasbrand) {
410
+ this.meterbrands.forEach((item) => {
411
+ if (item.label === row.gasbrand) {
412
+ row.gasbrand = [item.value]
413
+ }
414
+ })
415
+ } else {
416
+ row.gasbrand = ''
417
+ }
418
+ if (row.gasmodel && (row.gasbrand instanceof Array)) {
419
+ row.gasbrand[0].gasmodel.forEach((item) => {
420
+ if (item.label === (val === 'area' ? row.gasmodel : row.gasmodel + row.gasmodeltype)) {
421
+ row.gasmodel = [item.value]
422
+ }
423
+ })
424
+ } else {
425
+ row.gasmodel = ''
426
+ }
427
+ if (row.f_fire_state === '1') {
428
+ row.f_fire_state1 = true
429
+ } else if (row.f_fire_state === '0') {
430
+ row.f_fire_state1 = false
431
+ }
432
+ row.f_install_date = row.f_install_date ? row.f_install_date : ''
433
+ row.f_gas_date = row.f_gas_date ? row.f_gas_date : null
434
+ row.f_changetube_date = row.f_changetube_date ? row.f_changetube_date : null
435
+ row.f_aroundmeter = row.f_aroundmeter ? row.f_aroundmeter : ''
436
+ row.f_garbage_fee = row.f_garbage_fee ? [row.f_garbage_fee] : ''
437
+ row.f_valve_state = row.f_valve_state ? [row.f_valve_state] : ''
438
+ row.f_usetype = row.f_usetype ? [row.f_usetype] : ''
439
+ row.f_usestate = row.f_usestate ? [row.f_usestate] : ''
440
+ row.f_inputtor = row.f_inputtor ? [row.f_inputtor] : ''
441
+ row.f_position = row.f_position ? row.f_position : ''
442
+
443
+ row.f_user_type = row.f_user_type ? [row.f_user_type] : ''
444
+ row.f_gasproperties = row.f_gasproperties ? [row.f_gasproperties] : ''
445
+ row.pricetype = row.pricetype ? [row.pricetype] : ''
446
+
447
+ if (row.pricename) {
448
+ let names = this.getPricenames(row.f_user_type,
449
+ row.f_gasproperties,
450
+ row.pricetype)
451
+
452
+ console.log('=====2.===校验气价名称', names, row.f_user_type, row.f_gasproperties, row.pricetype)
453
+ if (names.length > 0) {
454
+ names.forEach((item) => {
455
+ if (item.label === row.pricename) {
456
+ row.pricename = [item.value]
457
+ row.f_detailprice = this.$CommonService.getShowPriceDetail(item.value.detailprice)
458
+ }
459
+ })
460
+ } else {
461
+ row.pricename = ''
462
+ }
463
+ } else {
464
+ row.pricename = ''
465
+ }
466
+
467
+ if (row.f_adjustable) {
468
+ this.adjustables.forEach((item) => {
469
+ if (item.label === row.f_adjustable) {
470
+ row.f_adjustable = [item.value]
471
+ }
472
+ })
473
+ } else {
474
+ row.f_adjustable = ''
475
+ }
476
+ })
477
+ // console.log('5555555555', this.data.meterinfo)
478
+ // 对设备进行校验
479
+ // this.data.devicesinfo.forEach((row) => {
480
+ // row.f_devices_type = row.f_devices_type ? [row.f_devices_type] : ''
481
+ // })
482
+ },
483
+ getPricenames (f_user_type, f_gasproperties, f_price_type) {
484
+ let rs = []
485
+ if (f_user_type.length === 1 && f_gasproperties.length === 1 && f_price_type.length === 1) {
486
+ rs = this.$GetSaleParam.getPrice({
487
+ f_user_type: f_user_type[0],
488
+ f_gasproperties: f_gasproperties[0],
489
+ f_price_type: f_price_type[0],
490
+ filter: this.f_filialeid
491
+ })
492
+ }
493
+ return rs
494
+ },
495
+ // 将小区信息转化为综合信息的格式
496
+ async areainfoInUser (areainfo) {
497
+ // this.nextTick(() => {
498
+ //
499
+ // })
500
+ // await this.$getConfig(this, 'UserAddress')
501
+ this.data = {
502
+ baseinfo: {
503
+ base: {
504
+ f_user_state: '正常',
505
+ f_is_mgq: '',
506
+ f_slice_area: '', // 片区
507
+ // 附件表临时id
508
+ blodid: this.blodid,
509
+ // 用户姓名
510
+ f_user_name: '',
511
+ // 用户电话
512
+ f_user_phone: '',
513
+ f_people_num: 0,
514
+ f_packaging:'',
515
+ // 备用电话
516
+ f_rent_phone: '',
517
+ f_credentials: '身份证',
518
+ f_cost_type: '',
519
+ f_bz_type:'',
520
+ f_address: '',
521
+ addressid: '',
522
+ f_idnumber: '',
523
+ f_meter_book_num:''
524
+ },
525
+ bank: {}
526
+ },
527
+ addressinfo: {
528
+ // 详细地址
529
+ f_address: '',
530
+ id: ''
531
+ },
532
+ meterinfo: [{
533
+ // 表号
534
+ f_meternumber: '',
535
+ f_metertitles: '',
536
+ f_area_code: '',
537
+ // 气表品牌
538
+ gasbrand: '',
539
+ // 气表型号
540
+ gasmodel: '',
541
+ // 气表类型
542
+ gasmodeltype: '',
543
+ pricetype: '', // 气价类型
544
+ pricename: '', // 气价名称
545
+ f_user_type: '', // 用户类型
546
+ f_gasproperties: '', // 用气性质
547
+ f_inputtor: '',
548
+ // 安装位置
549
+ f_position: '',
550
+ // 安装地址
551
+ f_userfiles_address: '',
552
+ // 安装经度
553
+ f_userfiles_lng: '',
554
+ // 安装纬度
555
+ f_userfiles_lat: '',
556
+ // 使用类型
557
+ f_usetype: '',
558
+ // 使用状态
559
+ f_usestate: '',
560
+ // 左右表
561
+ f_aroundmeter: '',
562
+ f_garbage_fee: '否',
563
+ f_meter_base: '',
564
+ f_initial_base: 0,
565
+ // 通气人
566
+ f_gas_person: '',
567
+ f_adjustable: '', // 调压箱
568
+ f_detailprice: '', // 价格详情显示
569
+ devicesinfo: [], // 设备信息
570
+ f_hand_month: '', // 抄表月份
571
+ fireinfo:{}, //用气信息
572
+ f_meter_book_num:''
573
+ }],
574
+ devicesinfo: []
575
+ }
576
+ // 若有id,则表示该地址是更新操作
577
+ /* if (areainfo.id) {
578
+ this.data.addressinfo.id = areainfo.id
579
+ }
580
+ // 改地址是 只有表没有户信息
581
+ if (areainfo.meter) {
582
+ Object.assign(this.data.meterinfo[0], this.data.meterinfo[0], areainfo.meter)
583
+ }
584
+ if (areainfo.user) {
585
+ Object.assign(this.data.baseinfo.base, this.data.baseinfo.base, areainfo.user)
586
+ } */
587
+
588
+ this.checkout('area')
589
+ },
590
+ limitClick () {
591
+ this.limitShow = true
592
+ },
593
+ getLimitGas (val) {
594
+ this.limit_gas = val
595
+ },
596
+ clearinfo () {
597
+ this.blodid = '临时id' + Date.now()
598
+ this.areainfoInUser(this.areainfo)
599
+ }
600
+ },
601
+ computed: {
602
+ meterbrands () {
603
+ return this.$GetSaleParam.getGasbrand()
604
+ },
605
+ adjustables () {
606
+ return this.$GetSaleParam.getAdjustable()
607
+ },
608
+ getMeterBooks () {
609
+ return this.$GetSaleParam.getMeterBooks()
610
+ }
611
+ },
612
+ events: {
613
+ // 设置表具气价等默认值
614
+ defaultOtheret (row) {
615
+ if (!this.isedit) {
616
+ let temp = {
617
+ gasmodel: row.f_meter_style,
618
+ gasbrand: row.f_meter_brand,
619
+ gasmodeltype: row.f_meter_style,
620
+ pricetype: row.f_price_type,
621
+ pricename: row.f_price_name,
622
+ f_user_type: row.f_user_type,
623
+ f_gasproperties: row.f_gasproperties,
624
+ f_position: row.f_position,
625
+ f_install_date: row.f_install_date,
626
+ f_inputtor: row.f_inputtor,
627
+ f_hand_month: row.f_hand_month
628
+ }
629
+ Object.assign(this.data.meterinfo[0], this.data.meterinfo[0], temp)
630
+ console.log('====1.=====', temp, row)
631
+ this.checkout('area')
632
+ }
633
+ }
634
+ }
635
+ }
636
+ </script>
637
+ <style lang="less">
638
+ .filechangeDetailsShow {
639
+ td {
640
+ text-align: center !important;
641
+ }
642
+ }
643
+ </style>