sale-client 3.5.266 → 3.5.268

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.266",
3
+ "version": "3.5.268",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -287,7 +287,7 @@
287
287
  :show-reset-button="true">
288
288
  </datepicker>
289
289
  </div>
290
- <div class="col-sm-4 form-group" :class="[$m.fee.required ? 'select-error' : '']">
290
+ <div class="col-sm-4 form-group" :class="[$m.fee.required ? 'has-error col' : '']">
291
291
  <label for="gasmodel" class="font_normal_body">&ensp;垃&ensp;圾&ensp;费</label>
292
292
  <v-select :value.sync="row.f_garbage_fee" :options='garbagefee' placeholder='垃圾费' close-on-select
293
293
  :value-single="true"
@@ -0,0 +1,698 @@
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 :usertype="row?row.f_user_type:null" :userphonelist="data.baseinfo.userphonelist" :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" :curuser="row"
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 :show.sync="highmetershow" v-if="highmetershow" @photo-finish="newPhoto" v-on:confirminfo="confirmIdCard"></high-meter>
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="fileSaveData.reason" style="width:60%"
86
+ placeholder='变更原因'
87
+ :value.sync="fileSaveData.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="fileSaveData.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.reason || (fileSaveData.reason === '其他' && !fileSaveData.modifyReason)" @click='confirmation()'>确认</button>
102
+ </footer>
103
+ </modal>
104
+ </div>
105
+ <work-busy :is-busy="seaching"></work-busy>
106
+ </template>
107
+
108
+ <script>
109
+ import UserPaperInfoTest from '../../components/FilesManage/UserPaperInfoTest.vue'
110
+ import {HttpResetClass} from 'vue-client'
111
+
112
+ let getFileGen = async function (self, data) {
113
+ let http = new HttpResetClass()
114
+ try {
115
+ await self.$getConfig(self, 'FilesDetail')
116
+ } catch (ignore) {}
117
+ let result = await http.load('POST', 'rs/logic/filemanage_getFilesDetail', data, {
118
+ resolveMsg: null,
119
+ rejectMsg: '用户详细信息加载失败,请重新选择,如果多次失败,请检查系统是否正常!',
120
+ newly: true
121
+ })
122
+ self.data = result.data
123
+ self.data.meterinfo.forEach((item) => {
124
+ item.devicesinfo.forEach((item2) => {
125
+ if (item2.img.content) {
126
+ let URL = item2.img.content.substring(item2.img.content.lastIndexOf(':\\') + 2)
127
+ item2.img.content = 'http://' + location.host + '/' + URL
128
+ }
129
+ })
130
+ })
131
+ // 更新地址
132
+ // 修改附件临时id为表档案id
133
+ self.blodid = self.data.baseinfo.base.f_userinfo_id
134
+ console.log('获取档案信息', self.data)
135
+ self.checkout()
136
+ console.log('附件id', self.blodid)
137
+ }
138
+
139
+ export default {
140
+ title: '综合信息',
141
+ props: ['f_filialeid', 'row', 'areainfo', 'haslimit', 'isedit'],
142
+ components: {UserPaperInfoTest},
143
+ data () {
144
+ return {
145
+ config: {
146
+ hasnumber: false,
147
+ adddevices: false,
148
+ f_building_suffix: '栋',
149
+ f_unit_suffix: '单元',
150
+ f_floor_suffix: '层',
151
+ f_room_suffix: '室'
152
+ },
153
+ data: {
154
+ baseinfo: {
155
+ base: {
156
+ f_user_name: '',
157
+ f_user_state: '',
158
+ f_user_type: '',
159
+ f_credentials: '',
160
+ f_cost_type: '',
161
+ f_bz_type: '',
162
+ f_paper_type: '',
163
+ f_idnumber: ''
164
+ },
165
+ userinfodevices: [],
166
+ bank: {
167
+ f_bank_name: ''
168
+ },
169
+ // 用户备用电话信息
170
+ userphonelist: []
171
+ },
172
+ addressinfo: {
173
+ id: '',
174
+ f_address: '',
175
+ f_address_state: ''
176
+ },
177
+ meterinfo: [{
178
+ f_user_type: '',
179
+ f_gasproperties: '',
180
+ devicesinfo: [],
181
+ fireinfo: {}
182
+ }],
183
+ devicesinfo: [],
184
+ fireinfo: {},
185
+ address: {
186
+ id: '',
187
+ f_address: '',
188
+ f_address_state: ''
189
+ }
190
+ },
191
+ show_userinfodevices: false,
192
+ userinfodevices: [],
193
+ oldAddress: {},
194
+ highmetershow: false, // 高拍仪组件控制
195
+ showfiles: false,
196
+ overdueset: [],
197
+ // 子组件验证
198
+ essentialInfo: false,
199
+ meterInfo: false,
200
+
201
+ // 地址相关属性
202
+ params: {
203
+ areas: [],
204
+ f_street: [],
205
+ f_residential_area: []
206
+ },
207
+
208
+ // 限购相关属性
209
+ limitShow: false,
210
+ limit_gas: null,
211
+ peopleNum: this.$appdata.getSingleValue('默认人口'),
212
+ blodid: '', // 附件的临时id
213
+ defaultMeterInfo: '', // 默认的表具信息
214
+ fileSaveData: {
215
+ // 修改原因
216
+ modifyReason: '',
217
+ reason: ''
218
+ },
219
+ // 档案变更明细
220
+ filechangeDetails: {rows: []},
221
+ filechangeDetailsShow: false,
222
+ seaching: false // 保存中
223
+ }
224
+ },
225
+ async ready () {
226
+ if (this.data.baseinfo.base.f_userinfo_id){
227
+ this.blodid = this.data.baseinfo.base.f_userinfo_id
228
+ }else {
229
+ this.blodid = '临时id' + Date.now()
230
+ }
231
+ console.log('ready,,,', this.row)
232
+ await this.getOvedueset()
233
+ if (this.row) { // 修改用户
234
+ await this.areaGen(this.row)
235
+ } else if (!this.row) { // 小区批量建档
236
+ // 将小区信息转化为综合信息的格式
237
+ await this.areainfoInUser(this.areainfo)
238
+ }
239
+ console.log('this.blodid------------>',this.blodid)
240
+ },
241
+ watch: {
242
+ async 'row' (val) {
243
+ console.log('观察row', val)
244
+ if (val) {
245
+ await this.areaGen(val)
246
+ } else {
247
+ await this.areainfoInUser(this.areainfo)
248
+ }
249
+ },
250
+ 'areainfo' (val) {
251
+ console.log('小区观察。。', val)
252
+ if (val) {
253
+ this.$refs.meter.clearMeter()
254
+ this.blodid = '临时id' + Date.now()
255
+ this.areainfoInUser(val)
256
+ }
257
+ },
258
+ 'essentialInfo' (val) {
259
+ console.log('观察到验证变化', val)
260
+ }
261
+ },
262
+ methods: {
263
+ async getOvedueset () {
264
+ let overdueset = []
265
+ let res = await this.$resetpost('rs/sql/saleSingleTable', {
266
+ data: {
267
+ tablename: 't_overdue_set',
268
+ condition: `f_orgid = '${this.f_filialeid}' `
269
+ }
270
+ }, {resolveMsg: null, rejectMsg: '', newly: true})
271
+ for (let row of res.data) {
272
+ overdueset.push({label: row.f_rule_name, value: `${row.id}`})
273
+ }
274
+ this.overdueset = overdueset
275
+ },
276
+ confirmIdCard (IdCardInfo) {
277
+ console.log('返回的身份证', IdCardInfo)
278
+ this.uploadPictures()
279
+ this.data.baseinfo.base.f_user_name = IdCardInfo.strName
280
+ this.data.baseinfo.base.f_idnumber = IdCardInfo.strID
281
+ },
282
+ showUserDevices (index, row) {
283
+ this.userinfodevices = []
284
+ this.show_userinfodevices = true
285
+ this.userinfodevices = row.userinfodevices
286
+ console.log('查看设备信息', this.userinfodevices)
287
+ },
288
+
289
+ uploadFiles () {
290
+ this.showfiles = !this.showfiles
291
+ },
292
+
293
+ uploadPictures () {
294
+ this.highmetershow = !this.highmetershow
295
+ },
296
+
297
+ openBankAccount () {
298
+ this.$resetpost('rs/logic/openBankAccount', {f_userinfo_code: this.data.baseinfo.base.f_userinfo_code, f_username: this.data.baseinfo.base.f_user_name},
299
+ {resolveMsg: null, rejectMsg: null}).then((res) => {
300
+ this.$showMessage(res.data.resultmessage)
301
+ })
302
+ },
303
+ async confirm () {
304
+ this.data.addressinfo.f_address = this.$refs.useressential.addressinfo.f_address
305
+ this.data.addressinfo.id = this.$refs.useressential.addressinfo.id
306
+ this.data.oldaddressinfo = this.oldAddress
307
+ this.data.hasnumber = this.config.hasnumber
308
+ this.data.limit_gas = this.limit_gas
309
+ if (this.f_filialeid && this.f_filialeid != '') {
310
+ this.data.f_filialeid = this.f_filialeid
311
+ } else {
312
+ this.data.f_filialeid = this.$login.f.orgid
313
+ }
314
+ if (this.row) {
315
+ this.data.baseinfo.base.version = this.row.version
316
+ }
317
+ this.seaching = true
318
+ console.log('档案保存之前,。。。', this.data)
319
+ if (this.data.meterinfo[0].f_gas_date != null) {
320
+ this.data.addressinfo.f_address_state = '已通气'
321
+ }
322
+ // 获取保存数据
323
+ Object.assign(this.fileSaveData, {}, this.$FileManageService.fileSaveBefore(this.data))
324
+ // 如果是修改, 则展示修改的明细给用户
325
+ if (this.fileSaveData.userinfo.f_userinfo_id) {
326
+ if (this.row.f_user_state === '预备' && this.fileSaveData.userinfo.f_user_state === '正常') {
327
+ this.fileSaveData.modifyReason = this.reason = '建档(档案信息完善)'
328
+ } else {
329
+ this.reason = '其他'
330
+ this.fileSaveData.modifyReason = ''
331
+ }
332
+ let details = await this.$resetpost('rs/logic/filechangeDetails', {data: this.fileSaveData}, {resolveMsg: null, rejectMsg: '获取修改明细出错!'})
333
+ this.seaching = false
334
+ this.filechangeDetails.rows = details.data.changeDetails
335
+ this.filechangeDetailsShow = details.data.isChange
336
+ }
337
+ // 不是修改直接保存
338
+ if (!this.filechangeDetailsShow) this.confirmation()
339
+ },
340
+ confirmation () {
341
+ if (this.fileSaveData.reason && this.fileSaveData.reason !== '其他') {
342
+ this.fileSaveData.modifyReason = this.fileSaveData.reason
343
+ }
344
+ for (let i = 0; i < this.filechangeDetails.rows.length; i++) {
345
+ if (this.filechangeDetails.rows[i].f_field_name === '通气日期') {
346
+ let name = this.$login.f.name
347
+ let nameId = this.$login.f.id
348
+ let parentname = this.$login.f.deps
349
+ let parentnameId = this.$login.f.depids
350
+ this.fileSaveData.userinfo.f_operator = name
351
+ this.fileSaveData.userinfo.f_operatorid = nameId
352
+ this.fileSaveData.userinfo.f_depname = parentname
353
+ this.fileSaveData.userinfo.f_depid = parentnameId
354
+ this.fileSaveData.userinfo.userfiles.f_operator = name
355
+ this.fileSaveData.userinfo.userfiles.f_operatorid = nameId
356
+ this.fileSaveData.userinfo.userfiles.f_depname = parentname
357
+ this.fileSaveData.userinfo.userfiles.f_depid = parentnameId
358
+ }
359
+ }
360
+ this.$FileManageService.fileSave(this.fileSaveData).then((res) => {
361
+ this.$parent.resdata = res.data.result[0].f_userinfo_code
362
+ if (!this.row) {
363
+ this.$parent.resshow = true
364
+ }
365
+ this.$dispatch('success')
366
+ }).catch((error) => {
367
+ if (error.status === 603) {
368
+ this.$error('重复提交')
369
+ return
370
+ }
371
+ this.seaching = false
372
+ this.$dispatch('error', '档案保存', this.data, error)
373
+ })
374
+ },
375
+ convertBase64ToBlob (base64String) {
376
+ // 将base64解码
377
+ var bytes = atob(base64String)
378
+ // var bytes = base64;
379
+ var bytesCode = new ArrayBuffer(bytes.length)
380
+ // 转换为类型化数组
381
+ var byteArray = new Uint8Array(bytesCode)
382
+
383
+ // 将base64转换为ascii码
384
+ for (var i = 0; i < bytes.length; i++) {
385
+ byteArray[i] = bytes.charCodeAt(i)
386
+ }
387
+ // 生成Blob对象(文件对象)
388
+ return new Blob([bytesCode], {type: 'image/jpeg'})
389
+ },
390
+ newPhoto (Imgbase64) {
391
+ this.$refs.upload.newPhoto(Imgbase64)
392
+ /* let form = new FormData()
393
+ let xhr = new XMLHttpRequest()
394
+ let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
395
+ form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
396
+ form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
397
+ xhr.open("POST", "rs/file/uploadFile")
398
+
399
+ if (this.headers) {
400
+ for (var header in this.headers) {
401
+ xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
402
+ }
403
+ }
404
+ xhr.send(form)
405
+ setTimeout(() => {
406
+ this.load(this)
407
+ }, 5000) */
408
+ },
409
+ async areaGen (data) {
410
+ data.f_user_id = data.f_user_id + ''
411
+ await getFileGen(this, data)
412
+ },
413
+ cancel () {
414
+ this.$dispatch('clean', '取消档案修正', 'user-general-info', this.row)
415
+ },
416
+ checkout (val) {
417
+ // 对收到的综合信息进行校验(主要目的是为了防止下拉框没有默认值)
418
+ // 对综合用户基本信息进行校验
419
+
420
+ // 将oldAddress 置为空,
421
+ this.oldAddress = {}
422
+ this.data.baseinfo.base.f_user_state = this.data.baseinfo.base.f_user_state === '预备' ? ['正常'] : [this.data.baseinfo.base.f_user_state]
423
+ // this.data.baseinfo.base.f_user_nature = this.data.baseinfo.base.f_user_nature ? [this.data.baseinfo.base.f_user_nature] : '民用'
424
+ // this.data.baseinfo.base.f_credentials = this.data.baseinfo.base.f_credentials ? [this.data.baseinfo.base.f_credentials] : '身份证'
425
+ this.data.baseinfo.base.f_cost_type = this.data.baseinfo.base.f_cost_type ? [this.data.baseinfo.base.f_cost_type] : '现金缴费'
426
+ this.data.baseinfo.base.f_bz_type = this.data.baseinfo.base.f_bz_type ? [this.data.baseinfo.base.f_bz_type] : ''
427
+
428
+ this.data.baseinfo.base.f_paper_type = this.data.baseinfo.base.f_paper_type ? [this.data.baseinfo.base.f_paper_type] : '电子发票'
429
+ this.data.baseinfo.bank.f_bank_name = this.data.baseinfo.bank.f_bank_name ? [this.data.baseinfo.bank.f_bank_name] : '中国银行'
430
+ 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)
431
+
432
+ if (this.data.baseinfo.base.f_slice_area) {
433
+ this.data.baseinfo.base.f_slice_area = [this.data.baseinfo.base.f_slice_area]
434
+ } else {
435
+ this.data.baseinfo.base.f_slice_area = ''
436
+ }
437
+ this.oldAddress.f_address = this.data.addressinfo.f_address
438
+ this.oldAddress.id = this.data.addressinfo.id
439
+
440
+ // 地址信息
441
+ // loadStreetAndResGen(this)
442
+
443
+ // 对表具信息进行校验
444
+ this.data.meterinfo.forEach((row) => {
445
+ console.log(row)
446
+ if (row.gasbrand) {
447
+ this.meterbrands.forEach((item) => {
448
+ if (item.label === row.gasbrand) {
449
+ row.gasbrand = [item.value]
450
+ }
451
+ })
452
+ } else {
453
+ row.gasbrand = ''
454
+ }
455
+ if (row.gasmodel && (row.gasbrand instanceof Array)) {
456
+ row.gasbrand[0].gasmodel.forEach((item) => {
457
+ if (item.label === (val === 'area' ? row.gasmodel : row.gasmodel + row.gasmodeltype)) {
458
+ row.gasmodel = [item.value]
459
+ }
460
+ })
461
+ } else {
462
+ row.gasmodel = ''
463
+ }
464
+ if (row.f_fire_state === '1') {
465
+ row.f_fire_state1 = true
466
+ } else if (row.f_fire_state === '0') {
467
+ row.f_fire_state1 = false
468
+ }
469
+ row.f_install_date = row.f_install_date ? row.f_install_date : null
470
+ row.f_gas_date = row.f_gas_date ? row.f_gas_date : null
471
+ row.f_changetube_date = row.f_changetube_date ? row.f_changetube_date : null
472
+ row.f_aroundmeter = row.f_aroundmeter ? row.f_aroundmeter : ''
473
+ row.f_garbage_fee = row.f_garbage_fee ? row.f_garbage_fee : ''
474
+ row.f_valve_state = row.f_valve_state ? [row.f_valve_state] : ''
475
+ row.f_usetype = row.f_usetype ? [row.f_usetype] : ''
476
+ row.f_usestate = row.f_usestate && row.f_usestate.length > 0 ? [row.f_usestate] : ''
477
+ row.f_meter_book_num = row.f_meter_book_num && row.f_meter_book_num.length > 0 ? [row.f_meter_book_num] : ''
478
+ row.f_userfiles_address = row.f_userfiles_address && row.f_userfiles_address.length > 0 ? [row.f_userfiles_address] : ''
479
+ row.f_inputtor = row.f_inputtor ? [row.f_inputtor] : ''
480
+ row.f_position = row.f_position ? [row.f_position] : ''
481
+
482
+ row.f_user_type = row.f_user_type ? [row.f_user_type] : ''
483
+ row.f_gasproperties = row.f_gasproperties ? [row.f_gasproperties] : ''
484
+ row.pricetype = row.pricetype ? [row.pricetype] : ''
485
+
486
+ if (row.pricename) {
487
+ let names = this.getPricenames(row.f_user_type,
488
+ row.f_gasproperties,
489
+ row.pricetype)
490
+
491
+ console.log('=====2.===校验气价名称', names, row.f_user_type, row.f_gasproperties, row.pricetype)
492
+ if (names.length > 0) {
493
+ names.forEach((item) => {
494
+ if (item.label === row.pricename) {
495
+ row.pricename = [item.value]
496
+ row.f_detailprice = this.$CommonService.getShowPriceDetail(item.value.detailprice)
497
+ }
498
+ })
499
+ } else {
500
+ row.pricename = ''
501
+ }
502
+ } else {
503
+ row.pricename = ''
504
+ }
505
+
506
+ if (row.f_adjustable) {
507
+ this.adjustables.forEach((item) => {
508
+ if (item.label === row.f_adjustable) {
509
+ row.f_adjustable = [item.value]
510
+ }
511
+ })
512
+ } else {
513
+ row.f_adjustable = ''
514
+ }
515
+ })
516
+ // console.log('5555555555', this.data.meterinfo)
517
+ // 对设备进行校验
518
+ // this.data.devicesinfo.forEach((row) => {
519
+ // row.f_devices_type = row.f_devices_type ? [row.f_devices_type] : ''
520
+ // })
521
+ },
522
+ getPricenames (f_user_type, f_gasproperties, f_price_type) {
523
+ let rs = []
524
+ if (f_user_type.length === 1 && f_gasproperties.length === 1 && f_price_type.length === 1) {
525
+ rs = this.$GetSaleParam.getPrice({
526
+ f_user_type: f_user_type[0],
527
+ f_gasproperties: f_gasproperties[0],
528
+ f_price_type: f_price_type[0],
529
+ filter: this.f_filialeid
530
+ })
531
+ }
532
+ return rs
533
+ },
534
+ // 将小区信息转化为综合信息的格式
535
+ async areainfoInUser (areainfo) {
536
+ // this.nextTick(() => {
537
+ //
538
+ // })
539
+ // await this.$getConfig(this, 'UserAddress')
540
+ this.data = {
541
+ baseinfo: {
542
+ base: {
543
+ f_user_state: '正常',
544
+ f_is_mgq: '',
545
+ f_slice_area: '', // 片区
546
+ // 附件表临时id
547
+ blodid: this.blodid,
548
+ // 用户姓名
549
+ f_user_name: '',
550
+ // 用户电话
551
+ f_user_phone: '',
552
+ f_people_num: this.$appdata.getSingleValue('默认人口数') ? this.$appdata.getSingleValue('默认人口数') : 0,
553
+ f_packaging: '',
554
+ // 备用电话
555
+ f_rent_phone: '',
556
+ f_credentials: '身份证',
557
+ f_cost_type: '',
558
+ f_bz_type: '',
559
+ f_address: '',
560
+ addressid: '',
561
+ f_idnumber: '',
562
+ f_meter_book_num: ''
563
+ },
564
+ bank: {},
565
+ // 用户备用电话信息
566
+ userphonelist: []
567
+ },
568
+ addressinfo: {
569
+ // 详细地址
570
+ f_address: '',
571
+ id: ''
572
+ },
573
+ meterinfo: [{
574
+ // 表号
575
+ f_meternumber: '',
576
+ f_metertitles: '',
577
+ f_area_code: '',
578
+ // 气表品牌
579
+ gasbrand: '',
580
+ // 气表型号
581
+ gasmodel: '',
582
+ // 气表类型
583
+ gasmodeltype: '',
584
+ pricetype: '', // 气价类型
585
+ pricename: '', // 气价名称
586
+ f_user_type: '', // 用户类型
587
+ f_gasproperties: '', // 用气性质
588
+ f_inputtor: '',
589
+ // 安装位置
590
+ f_position: '',
591
+ // 安装地址
592
+ f_userfiles_address: '',
593
+ // 安装经度
594
+ f_userfiles_lng: '',
595
+ // 安装纬度
596
+ f_userfiles_lat: '',
597
+ // 使用类型
598
+ f_usetype: '',
599
+ // 使用状态
600
+ f_usestate: '',
601
+ // 左右表
602
+ f_aroundmeter: '',
603
+ f_garbage_fee: '',
604
+ f_meter_base: '',
605
+ f_initial_base: 0,
606
+ // 通气人
607
+ f_gas_person: '',
608
+ f_adjustable: '', // 调压箱
609
+ f_detailprice: '', // 价格详情显示
610
+ devicesinfo: [], // 设备信息
611
+ f_hand_month: '', // 抄表月份
612
+ fireinfo: {}, // 用气信息
613
+ f_meter_book_num: '',
614
+ f_use_limit: '',
615
+ f_gas_date: '',
616
+ f_install_date: ''
617
+ }],
618
+ devicesinfo: []
619
+ }
620
+ // 若有id,则表示该地址是更新操作
621
+ /* if (areainfo.id) {
622
+ this.data.addressinfo.id = areainfo.id
623
+ }
624
+ // 改地址是 只有表没有户信息
625
+ if (areainfo.meter) {
626
+ Object.assign(this.data.meterinfo[0], this.data.meterinfo[0], areainfo.meter)
627
+ }
628
+ if (areainfo.user) {
629
+ Object.assign(this.data.baseinfo.base, this.data.baseinfo.base, areainfo.user)
630
+ } */
631
+
632
+ this.checkout('area')
633
+ },
634
+ limitClick () {
635
+ this.limitShow = true
636
+ },
637
+ getLimitGas (val) {
638
+ this.limit_gas = val
639
+ },
640
+ clearinfo () {
641
+ this.blodid = this.data.baseinfo.base.f_userinfo_id
642
+ this.areainfoInUser(this.areainfo)
643
+ }
644
+ },
645
+ computed: {
646
+ meterbrands () {
647
+ return this.$GetSaleParam.getGasbrand()
648
+ },
649
+ reasons () {
650
+ return this.$appdata.getParam('变更原因')
651
+ },
652
+ adjustables () {
653
+ return this.$GetSaleParam.getAdjustable()
654
+ },
655
+ getMeterBooks () {
656
+ return this.$GetSaleParam.getMeterBooks()
657
+ }
658
+ },
659
+ events: {
660
+ // 设置表具气价等默认值
661
+ defaultOtheret (row) {
662
+ if (!this.isedit) {
663
+ let temp = {
664
+ gasmodel: row.f_meter_style,
665
+ gasbrand: row.f_meter_brand,
666
+ gasmodeltype: row.f_meter_style,
667
+ pricetype: row.f_price_type,
668
+ pricename: row.f_price_name,
669
+ f_user_type: row.f_user_type,
670
+ f_gasproperties: row.f_gasproperties,
671
+ f_position: row.f_position,
672
+ f_meter_book_num: row.f_meter_book ? row.f_meter_book : '',
673
+ f_usestate: '正常',
674
+ f_adjustable: row.f_adjustable_id,
675
+ f_install_date: row.f_install_date,
676
+ f_inputtor: row.f_inputtor,
677
+ f_hand_month: row.f_hand_month,
678
+ f_usetype: ''
679
+ }
680
+ if (!temp.f_install_date) {
681
+ delete temp.f_install_date
682
+ }
683
+ Object.assign(this.data.meterinfo[0], this.data.meterinfo[0], temp)
684
+ this.data.baseinfo.base.f_house_type = row.f_house_type ? [row.f_house_type] : ''
685
+ console.log('====1.=====', temp, row)
686
+ this.checkout('area')
687
+ }
688
+ }
689
+ }
690
+ }
691
+ </script>
692
+ <style lang="less">
693
+ .filechangeDetailsShow {
694
+ td {
695
+ text-align: center !important;
696
+ }
697
+ }
698
+ </style>
@@ -24,4 +24,6 @@ export default function () {
24
24
  Vue.component('file-user-address', (resolve) => { require(['./FileUserAddress'], resolve) })
25
25
  // 发卡售气
26
26
  Vue.component('show-card-sell-gas', (resolve) => { require(['./ShowCardSellGas'], resolve) })
27
+ // 用户综合信息
28
+ Vue.component('file-user-general-info', (resolve) => { require(['./UserGeneralInfoTest'], resolve) })
27
29
  }
@@ -0,0 +1,255 @@
1
+ <template>
2
+ <partial-view v-ref:pv>
3
+ <div class="panel panel-info auto" style="margin-top: auto">
4
+ <div class="panel-heading" style="height: 35px">
5
+ <h4 style="display:inline-block;margin-top: auto">表具信息</h4>
6
+ </div>
7
+ <div class="auto ">
8
+ <div class="row" v-if="data.f_customer">
9
+ <label class = "col-sm-5 " style="color: brown">团缴编号</label>
10
+ <span class = "col-sm-7" style="color: brown">{{data.f_customer?data.f_customer:'无'}}</span>
11
+ </div>
12
+ <div class="row">
13
+ <label class = "col-sm-5 " >气表类型</label>
14
+ <span class = "col-sm-7">{{data?data.f_meter_type:dafault.f_meter_brand}}</span>
15
+ </div>
16
+ <div class="row">
17
+ <label class = "col-sm-5 " >气表品牌</label>
18
+ <span class = "col-sm-7">{{data?data.f_meter_brand:dafault.f_meter_brand}}</span>
19
+ </div>
20
+ <div class="row">
21
+ <label class = "col-sm-5 " >气表型号</label>
22
+ <span class = "col-sm-7">{{data?data.f_meter_style:dafault.f_meter_style}}</span>
23
+ </div>
24
+ <div class="row">
25
+ <label class="col-sm-5" style="color: brown">表具状态</label>
26
+ <span class="col-sm-7" style="color: brown">{{data?data.f_table_state:dafault.f_table_state}}</span>
27
+ </div>
28
+ <div class="row" v-if="data.f_meter_type.includes('物联网') && data.f_collection_type === '按金额'">
29
+ <label class = "col-sm-5 " style="color: brown">系统余额</label>
30
+ <span class = "col-sm-7" style="color: brown">{{data?data.f_balance_amount:dafault.f_balance_amount}}</span>
31
+ </div>
32
+ <div class="row" v-if="data.f_meter_type.includes('物联网') && data.f_collection_type === '按气量'">
33
+ <label class = "col-sm-5 " style="color: brown">系统余量</label>
34
+ <span class = "col-sm-7" style="color: brown">{{data?data.f_balance_gas:dafault.f_balance_gas}}</span>
35
+ </div>
36
+ <div class="row" v-if="data.f_meter_type.includes('物联网') && data.f_collection_type === '按金额'">
37
+ <label class = "col-sm-5 " style="color: brown">表上余额</label>
38
+ <span class = "col-sm-7" style="color: brown">{{data?data.f_jval:dafault.f_jval}}</span>
39
+ </div>
40
+ <div class="row" v-if="data.f_meter_type.includes('物联网') && data.f_collection_type === '按气量'">
41
+ <label class = "col-sm-5 " style="color: brown">表上余量</label>
42
+ <span class = "col-sm-7" style="color: brown">{{data?data.f_jval:dafault.f_jval}}</span>
43
+ </div>
44
+ <div class="row">
45
+ <label class = "col-sm-5 " >初始表底数</label>
46
+ <span class = "col-sm-7" >{{data?data.f_initial_base:dafault.f_initial_base}}</span>
47
+ </div>
48
+ <div class="row">
49
+ <label class = "col-sm-5 " >表当前底数</label>
50
+ <span class = "col-sm-7" >{{data?data.f_meter_base:dafault.f_meter_base}}</span>
51
+ </div>
52
+ <div class="row">
53
+ <label class = "col-sm-5 " >写卡次数</label>
54
+ <span class = "col-sm-7" >{{data?data.f_times:dafault.f_times}}</span>
55
+ </div>
56
+ <div class="row" v-if="data.f_meter_type.includes('物联网')">
57
+ <label class = "col-sm-5 ">物联网次数</label>
58
+ <span class = "col-sm-7" >{{data?data.f_iot_times:dafault.f_iot_times}}</span>
59
+ </div>
60
+ <div class="row" v-if="data.f_meter_type.includes('物联网')">
61
+ <label class = "col-sm-5 " style="color: brown" >户累购气量</label>
62
+ <span class = "col-sm-7" style="color: brown">{{data?data.f_total_gas_all:dafault.f_total_gas_all}}</span>
63
+ </div>
64
+ <div class="row" v-if="(data.f_meter_brand.includes('物联网'))">
65
+ <label class = "col-sm-5 " style="color: brown" >累购气量</label>
66
+ <span class = "col-sm-7" style="color: brown">{{data?data.f_total_gas:dafault.f_total_gas}}</span>
67
+ </div>
68
+ <div class="row" v-if="data.f_meter_type.includes('物联网')">
69
+ <label class = "col-sm-5 ">表累购金额</label>
70
+ <span class = "col-sm-7" >{{data?data.f_total_fee:dafault.f_total_fee}}</span>
71
+ </div>
72
+ <div class="row" v-if="data.f_meter_type.includes('物联网')">
73
+ <label class = "col-sm-5 ">户累购金额</label>
74
+ <span class = "col-sm-7" >{{data?data.f_total_fee_all:dafault.f_total_fee_all}}</span>
75
+ </div>
76
+ <div class="row" v-if="(data.f_meter_type === '机表' || data.f_meter_type === '物联网表') && data.f_deduction_gas > 0">
77
+ <label class = "col-sm-5 " >剩余抵扣量</label>
78
+ <span class = "col-sm-7" >{{data?data.f_deduction_gas:dafault.f_deduction_gas}}</span>
79
+ </div>
80
+ <div class="row" v-if="data.f_meter_type.includes('卡表')">
81
+ <label class = "col-sm-5 " style="color: brown" >户累购气量</label>
82
+ <span class = "col-sm-7" style="color: brown">{{data?data.f_total_gas_all:dafault.f_total_gas_all}}</span>
83
+ </div>
84
+ <div class="row" v-if="(data.f_meter_brand.includes('数码表'))">
85
+ <label class = "col-sm-5 " style="color: brown" >累购气量</label>
86
+ <span class = "col-sm-7" style="color: brown">{{data?data.f_total_gas:dafault.f_total_gas}}</span>
87
+ </div>
88
+ <div class="row" v-if="data.f_meter_type.includes('卡表') && data.f_meter_type === '气量卡表'">
89
+ <label class = "col-sm-5 " style="color: brown" >累购气量</label>
90
+ <span class = "col-sm-7" style="color: brown">{{data?data.f_total_gas:dafault.f_total_gas}}</span>
91
+ </div>
92
+ <div class="row" v-if="data.f_meter_type.includes('卡表')">
93
+ <label class = "col-sm-5 " style="color: brown">累购金额</label>
94
+ <span class = "col-sm-7" style="color: brown">{{data?data.f_total_fee:dafault.f_total_fee}}</span>
95
+ </div>
96
+ <div class="row" v-if="data.f_meter_type.includes('卡表')">
97
+ <label class = "col-sm-5 " style="color: brown">累购写卡金额</label>
98
+ <span class = "col-sm-7" style="color: brown">{{data?data.f_write_totalfee:dafault.f_total_fee}}</span>
99
+ </div>
100
+ <div class="row">
101
+ <label class = "col-sm-5 " >气表表号</label>
102
+ <span class = "col-sm-7">{{data?data.f_meternumber:dafault.f_meternumber}}</span>
103
+ </div>
104
+ <div class="row" v-if="data.f_meter_type.includes('卡表') || (data.f_meter_type.includes('物联网表') && data.f_hascard==='是')">
105
+ <label class = "col-sm-5 " >卡&emsp;&emsp;号</label>
106
+ <span class = "col-sm-7">{{data?data.f_card_id:dafault.f_card_id}}</span>
107
+ </div>
108
+ <div class="row" v-if="data.f_meter_type.includes('卡表') || data.f_meter_type.includes('物联网表') && data.f_hascard==='是'">
109
+ <label class = "col-sm-5 " >写卡次数</label>
110
+ <span class = "col-sm-7">{{data?data.f_times:dafault.f_times}}</span>
111
+ </div>
112
+ <div class="row">
113
+ <label class = "col-sm-5 " >用气性质</label>
114
+ <span class = "col-sm-7">{{data?data.f_gasproperties:dafault.f_gasproperties}}</span>
115
+ </div>
116
+ <div class="row">
117
+ <label class = "col-sm-5 " >气价名称</label>
118
+ <span class = "col-sm-7">{{data?data.f_price_name:dafault.f_price_name}}</span>
119
+ </div>
120
+ <!--<div class="row" v-if="data.f_balance < 0">-->
121
+ <!--<label class = "col-sm-5 " >账户欠费</label>-->
122
+ <!--<span class = "col-sm-7" title="不包含违约金">{{data?0 - (data.f_balance - 0):dafault.f_balance}}</span>-->
123
+ <!--</div>-->
124
+ <!--<div class="row" v-else>-->
125
+ <!--<label class = "col-sm-5 " >账户余额</label>-->
126
+ <!--<span class = "col-sm-7">{{data?data.f_balance:dafault.f_balance}}</span>-->
127
+ <!--</div>-->
128
+ <div class="row" v-if="data.f_remanent_money > 0">
129
+ <label class = "col-sm-5 " >应补金额</label>
130
+ <span class = "col-sm-7">{{data?data.f_remanent_money:dafault.f_remanent_money}}</span>
131
+ </div>
132
+ <div class="row" v-if="data.f_remanent_gas > 0">
133
+ <label class = "col-sm-5 " >应补气量</label>
134
+ <span class = "col-sm-7">{{data?data.f_remanent_gas:dafault.f_remanent_gas}}</span>
135
+ </div>
136
+ <div class="row">
137
+ <label class = "col-sm-5 " >表&emsp;&emsp;向</label>
138
+ <span class = "col-sm-7">{{data?data.f_aroundmeter:dafault.f_hand_date}}</span>
139
+ </div>
140
+ <div class="row">
141
+ <label class = "col-sm-5 " >抄表册名</label>
142
+ <span class = "col-sm-7">{{data?'['+data.f_book_code + '] '+ (data.f_book_name ? data.f_book_name:''):dafault.f_book_name}}</span>
143
+ </div>
144
+ <div class="row">
145
+ <label class = "col-sm-5 " >抄表册册序号</label>
146
+ <span class = "col-sm-7">{{data?data.f_meter_book_sort:dafault.f_meter_book_sort}}</span>
147
+ </div>
148
+ <div class="row">
149
+ <label class = "col-sm-5 " >安装位置</label>
150
+ <span class = "col-sm-7">{{data?data.f_position:dafault.f_position}}</span>
151
+ </div>
152
+ <div class="row">
153
+ <label class = "col-sm-5 " >置换人员</label>
154
+ <span class = "col-sm-7">{{data?data.f_gas_person:dafault.f_hand_date}}</span>
155
+ </div>
156
+ <div class="row">
157
+ <label class = "col-sm-5 " >置换时间</label>
158
+ <span class = "col-sm-7">{{data?data.f_gas_date.substring(0,7):dafault.f_hand_date}}</span>
159
+ </div>
160
+ <div class="row">
161
+ <label class = "col-sm-5 " >抄表员</label>
162
+ <span class = "col-sm-7">{{data?data.f_inputtor:dafault.f_inputtor}}</span>
163
+ </div>
164
+ <div class="row">
165
+ <label class = "col-sm-5 " >上次抄表日</label>
166
+ <span class = "col-sm-7">{{data?data.f_hand_date.substring(0,7):dafault.f_hand_date}}</span>
167
+ </div>
168
+ <div class="row">
169
+ <label class = "col-sm-5 " >建档日期</label>
170
+ <span class = "col-sm-7">{{data?data.f_input_date.substring(0,7):dafault.f_input_date}}</span>
171
+ </div>
172
+ <div class="row">
173
+ <label class = "col-sm-5 " >备&emsp;&emsp;注</label>
174
+ <span class = "col-sm-7">{{data?data.comments:dafault.comments}}</span>
175
+ </div>
176
+ </div>
177
+ </div>
178
+ </partial-view>
179
+ </template>
180
+
181
+ <script>
182
+ /*用户档案相关信息组件*/
183
+ export default {
184
+ ready () {
185
+ console.log('看看userinfo里面接收的data数据', this.data)
186
+ },
187
+ title: '客户基本信息',
188
+ data () {
189
+ return {
190
+ dafault: {
191
+ f_total_gas_all: 0,
192
+ f_total_fee_all:0,
193
+ f_balance_amount: 0,
194
+ f_balance_gas: 0,
195
+ f_initial_base: 0,
196
+ f_meter_base: 0,
197
+ f_deduction_gas: 0,
198
+ f_total_gas: 0,
199
+ f_total_fee: 0,
200
+ f_card_id: '*****',
201
+ f_times: 0,
202
+ f_iot_times: 0,
203
+ f_meternumber: 0,
204
+ f_gasproperties: '****',
205
+ f_price_name: '****',
206
+ f_meter_brand: '****',
207
+ f_balance: 0,
208
+ f_user_type: '**',
209
+ f_remanent_gas: 0,
210
+ f_position: '****',
211
+ f_inputtor: '****',
212
+ f_jval: 0,
213
+ f_table_state: 0
214
+ },
215
+ model: null
216
+ }
217
+ },
218
+ props: ['data'],
219
+ methods: {
220
+ dealmsg (val) {
221
+ this.$dispatch('deal-msg', val)
222
+ }
223
+ },
224
+ watch: {
225
+ 'data' (val) {
226
+ console.log('val========', val)
227
+ }
228
+ }
229
+ }
230
+ </script>
231
+ <style lang="less">
232
+ .row {
233
+ /*border-bottom:1px solid #F2F6FA;*/
234
+ margin-left: 0;
235
+ margin-right: 0;
236
+ }
237
+ // . {
238
+ // height: 23px;
239
+ // border-right: 1px solid #F2F6FA;
240
+ // margin-bottom: 0;
241
+ // text-align: left;
242
+ // }
243
+ // #address {
244
+ // border-left: 1px solid #F2F6FA;
245
+ // }
246
+ // #user-info {
247
+ // padding:6px;
248
+ // span {
249
+ // padding-left: 5px;
250
+ // }
251
+ // }
252
+ // #address1 {
253
+ // border-right: 0;
254
+ // }
255
+ </style>
@@ -2,6 +2,8 @@
2
2
  import Vue from 'vue'
3
3
 
4
4
  export default function () {
5
+ // 当前选择用户的表具基本信息
6
+ Vue.component('user-meterinfodetail', (resolve) => { require(['./meterinfodetail'], resolve) })
5
7
  Vue.component('iot-meter-center', (resolve) => { require(['./IOTMeterCenter'], resolve) })
6
8
  Vue.component('card-meter-center', (resolve) => { require(['./CardMeterCenter'], resolve) })
7
9
  // 换表补气