sale-client 3.5.156 → 3.5.157

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