sale-client 3.6.186 → 3.6.188

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.
@@ -1,5 +1,5 @@
1
1
  var path = require('path')
2
- const [ serverRul, localUrl ] = ['http://192.168.3.82:8400/#', 'http://192.168.3.82:8400/#']
2
+ const [ serverRul, localUrl ] = ['http://121.36.106.17:8400/', 'http://121.36.106.17:8400/']
3
3
  var merge = require('webpack-merge')
4
4
  var baseConfig = require('./webpack.dev.conf')
5
5
  var devConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.186",
3
+ "version": "3.6.188",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -42,7 +42,7 @@ export default {
42
42
  },
43
43
  ready () {
44
44
  let sql = ''
45
- if (this.data.type === '其他收费欠费登记') {
45
+ if (this.data.type === '其他收费欠费登记' || this.data.type === '其他收费欠费登记撤销') {
46
46
  sql = 'otherChangenopay'
47
47
  }else{
48
48
  sql = 'otherChange'
@@ -259,7 +259,7 @@
259
259
  this.$parent.priceid = row.f_price_id
260
260
  this.$parent.pricename = row.f_price_name
261
261
  this.$parent.f_islow_income = row.f_islow_income
262
- this.$parent.priceorgid = row.f_orgid
262
+ this.$parent.priceorgid = row.f_filialeid
263
263
  },
264
264
  search () {
265
265
  this.$refs.paged.$refs.cri.search()
@@ -105,7 +105,7 @@
105
105
  <replacecardmanage-detail :data="row" v-if="row.type === '补卡'"></replacecardmanage-detail>
106
106
  <machinecard-detail :data="row" v-if="row.type === '机表补卡'"></machinecard-detail>
107
107
  <transfermanage-detail :data="row" v-if="row.type === '过户'"></transfermanage-detail>
108
- <othercharge-detail :data="row" v-if="row.type === '其他收费欠费登记'||row.type === '其他收费'||row.type === '维修收费'"></othercharge-detail>
108
+ <othercharge-detail :data="row" v-if="row.type === '其他收费欠费登记'||row.type === '其他收费欠费登记撤销'||row.type === '其他收费'||row.type === '维修收费'"></othercharge-detail>
109
109
  <inputtorchange-detail :data="row" v-if="row.type === '抄表员变更'"></inputtorchange-detail>
110
110
  <offgasaddgas-detail :data="row"
111
111
  v-if=" row.type === '换表补气' ||row.type === '其他补气' || row.type === '清零补气' || row.type === '掉气补气'||row.type==='物联网补费'||row.type==='物联网扣费'||row.type==='机表补费'||row.type==='机表扣费'||row.type==='物联网补气'||row.type==='物联网扣气' " ></offgasaddgas-detail>
@@ -572,44 +572,32 @@
572
572
  self.showCardError2 = true
573
573
  return
574
574
  }
575
- if (getUser.data[0].f_filialeid != self.$login.f.orgid) {
576
- self.showCardError = true
577
- self.showCardError2 = true
578
- self.orgName = ''
579
- let arr = []
580
- for(let i=0;i < getUser.data.length;i++){
581
- arr.push(getUser.data[i].f_orgname)
582
- }
583
- self.orgName = arr.join(", ")
584
- self.showOrgname = true
585
- return
586
- }
587
- // self.$showMessage('当前卡充值次数与系统不符,请检查是否是正确的卡.')
588
575
  }
589
- }
590
- // 判断是否是旧卡
591
- if (getUser.data.length > 0) {
592
576
  if (self.cardInfo.Times > getUser.data[0].f_times) {
593
577
  self.systemTimes = getUser.data[0].f_times
594
578
  self.userCode = getUser.data[0].f_userinfo_code
595
579
  self.userName = getUser.data[0].f_user_name
596
580
  self.userAddress = getUser.data[0].f_address
597
581
  self.orgName = getUser.data[0].f_orgname
598
- if (getUser.data[0].f_filialeid != self.$login.f.orgid) {
599
- self.showCardError = true
600
- self.showCardError2 = true
601
- self.showOrgname = true
602
- return
603
- }
604
582
  if (getUser.data[0].f_is_check != '否') {
605
583
  self.showCardError2 = false
606
584
  self.showCardError = true
607
585
  return
608
586
  }
609
-
587
+ }
588
+ if (getUser.data[0].f_filialeid != self.$login.f.orgid) {
589
+ self.showCardError = true
590
+ self.showCardError2 = true
591
+ self.orgName = ''
592
+ let arr = []
593
+ for(let i=0;i < getUser.data.length;i++){
594
+ arr.push(getUser.data[i].f_orgname)
595
+ }
596
+ self.orgName = arr.join(", ")
597
+ self.showOrgname = true
598
+ return
610
599
  }
611
600
  }
612
-
613
601
  if (getUser.data.length === 0) {
614
602
  self.model.state = '错误'
615
603
  self.model.rows = null
@@ -0,0 +1,843 @@
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
8
+ style="color: #999999;text-decoration: none"></a>
9
+ <button class="button_search" style="width: max-content" v-show="data.baseinfo.base.f_user_nature === '单位'"
10
+ @click="showUserDevices($index, data.baseinfo)">用户设备信息
11
+ </button>
12
+ <button class="button_search" style="width: max-content" @click="uploadFiles()">上传/查看附件</button>
13
+ <button class="button_search" style="width: max-content" @click="uploadPictures()">拍照</button>
14
+ <button class="button_search" style="width: max-content" @click="openBankAccount()"
15
+ v-if="data.meterinfo[0].f_user_type[0] === '非民用' && ($login.r.includes('银行开户'))">银行开户
16
+ </button>
17
+ <div
18
+ v-if="hiddenBtn" @click="criteriaShow=!criteriaShow" class="button_spacing"
19
+ :class="{'button_shrink_top':!criteriaShow,'button_shrink_bottom':criteriaShow}"
20
+ style="float: right;margin-right:1rem"></div>
21
+ </div>
22
+ <file-user-essential-info :formconfig="config.fileUserEssentialInfo" :usertype="row?row.f_user_type:null"
23
+ :userphonelist="data.baseinfo.userphonelist" :baseinfo="data.baseinfo"
24
+ :addressinfo="data.addressinfo" @valid="essentialInfo = true"
25
+ :onlyshowmust="criteriaShow" @invalid="essentialInfo = false" v-ref:useressential
26
+ :isedit="isedit"></file-user-essential-info>
27
+ <file-userinfo-device :userinfodevices.sync="userinfodevices" :show_userinfodevices.sync="show_userinfodevices"
28
+ :userinfoid='data.baseinfo.base.f_userinfo_id'></file-userinfo-device>
29
+ </div>
30
+
31
+ <div style="height: auto;width: 100%">
32
+ <file-user-meter-info :formconfig="config.fileUserMeterInfo" :meterinfo.sync="data.meterinfo"
33
+ :f_filialeid="f_filialeid" :metervalid.sync="meterInfo" :overdueset="overdueset"
34
+ :curuser="row"
35
+ :onlyshowmust="criteriaShow"
36
+ :f_userinfo_id="data.baseinfo.base.f_userinfo_id" :addressinfo="data.addressinfo"
37
+ :baseinfo.sync="data.baseinfo.base" v-ref:meter></file-user-meter-info>
38
+ </div>
39
+
40
+ <div style="height: auto;width: 100%">
41
+ <div style="margin-bottom: 2%; margin-top: 2%">
42
+ <img style="margin-top: -5px" src="../../../../static/images/lefticon/矩形1183.png">
43
+ <span v-if="!usertype">
44
+ <a style="font-size: 20px;font-weight: 500;">发票信息</a>&nbsp;<a style="color: #999999"></a>
45
+ </span>
46
+ <span v-if="usertype">
47
+ <a style="font-size: 20px;font-weight: 500;">企业信息</a>&nbsp;<a style="color: #999999"></a>
48
+ </span>
49
+ </div>
50
+ <user-paper-info-test :baseinfo="data.baseinfo"></user-paper-info-test>
51
+ </div>
52
+
53
+ <!--<div style="height: auto;width: 100%">-->
54
+ <!--<div style="margin-bottom: 2%; margin-top: 2%">-->
55
+ <!--<img style="margin-top: -5px" src="../../../static/images/lefticon/矩形1183.png">-->
56
+ <!--<a style="font-size: 20px;font-weight: 500;">附件信息</a>&nbsp;<a style="color: #999999"></a>-->
57
+ <!--</div>-->
58
+ <!--<upload :blodid="blodid" isremark="true" fusetype="档案"></upload>-->
59
+ <!--</div>-->
60
+ </div>
61
+
62
+ <div class="form-horizontal auto">
63
+ <div class="form-group">
64
+ <div style="text-align:right;">
65
+
66
+ <button class="button_search" @click="confirm()" :disabled="!(essentialInfo && meterInfo )">确认
67
+ </button>
68
+ <button class="button_search" style="width: max-content" v-if="haslimit" @click="limitClick">限购配置</button>
69
+ <button class="button_clear" @click="cancel()">取消</button>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ <limit-gas :show.sync="limitShow" :f_userinfo_id="data.baseinfo.base.f_userinfo_id"
74
+ @limit="getLimitGas"></limit-gas>
75
+ <modal :show.sync="showfiles" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
76
+ <article slot="modal-body">
77
+ <upload-idcard :blodid="blodid" isremark="true" @getidinfo="confirmIdCard" style="width:auto"
78
+ fusetype="档案信息" v-ref:upload></upload-idcard>
79
+ </article>
80
+ <footer slot="modal-footer" class="modal-footer">
81
+ </footer>
82
+ </modal>
83
+ <high-meter :show.sync="highmetershow" v-if="highmetershow" @photo-finish="newPhoto"
84
+ v-on:confirminfo="confirmIdCard"></high-meter>
85
+
86
+ <modal :show.sync="filechangeDetailsShow" v-ref:filechangeDetailsShow backdrop="false"
87
+ class="filechangeDetailsShow">
88
+ <header slot="modal-header" class="modal-header" style="text-align: center">
89
+ <h4 class="modal-title">档案修改明细</h4>
90
+ </header>
91
+ <article slot="modal-body" class="modal-body">
92
+ <data-grid class="list_area table_sy" :model="filechangeDetails" partial='list'>
93
+ <template partial='head'>
94
+ <th>
95
+ <nobr>序号</nobr>
96
+ </th>
97
+ <th>
98
+ <nobr>更改内容</nobr>
99
+ </th>
100
+ <th>
101
+ <nobr>更改前</nobr>
102
+ </th>
103
+ <th>
104
+ <nobr>更改后</nobr>
105
+ </th>
106
+ </template>
107
+ <template partial='body'>
108
+ <td>{{ $index + 1 }}</td>
109
+ <td>
110
+ <nobr>{{ row.f_field_name }}</nobr>
111
+ </td>
112
+ <td>
113
+ <nobr>{{ row.f_used_content }}</nobr>
114
+ </td>
115
+ <td>
116
+ <nobr>{{ row.f_new_content }}</nobr>
117
+ </td>
118
+ </template>
119
+ </data-grid>
120
+ <div class="row">
121
+ <div class="col-sm-12 form-group">
122
+ <label for="f_paper_account" class="col-sm-2 font_normal_body " title="参数:变更原因">变更原因:</label>
123
+ <v-select v-model="fileSaveData.reason" style="width:60%"
124
+ placeholder='变更原因'
125
+ :value.sync="fileSaveData.reason"
126
+ :options='reasons'
127
+ :value-single="true"
128
+ v-ref:reason
129
+ close-on-select></v-select>
130
+ </div>
131
+ </div>
132
+ <div class="row">
133
+ <div class="col-sm-2"></div>
134
+ <input v-if="fileSaveData.reason ==='其他'" class="input_search" style="width:60%" placeholder='修改原因'
135
+ v-model="fileSaveData.modifyReason"/>
136
+ </div>
137
+ </article>
138
+ <footer slot="modal-footer" class="modal-footer">
139
+ <button type="button" class="btn btn-default" @click='filechangeDetailsShow = false'>取消</button>
140
+ <button type="button" class="btn btn-success"
141
+ :disabled="!fileSaveData.reason || (fileSaveData.reason === '其他' && !fileSaveData.modifyReason)"
142
+ @click='confirmation()'>确认
143
+ </button>
144
+ </footer>
145
+ </modal>
146
+ </div>
147
+ <work-busy :is-busy="seaching"></work-busy>
148
+ </template>
149
+
150
+ <script>
151
+ import UserPaperInfoTest from '../../../components/FilesManage/UserPaperInfoTest.vue'
152
+ import {HttpResetClass} from 'vue-client'
153
+ import * as Util from '../../../Util'
154
+
155
+ let getConfigScope = async function (self, name) {
156
+ try {
157
+ let res = await self.$resetget('/rs/vue/' + name + '.json', {resolveMsg: null, rejectMsg: null, newly: true})
158
+ // 如果有表单配置 展示 收起按钮
159
+ if (Object.keys(res.data).length > 0) {
160
+ self.hiddenBtn = true
161
+ }
162
+ self.config[name] = res.data
163
+ } catch (error) {
164
+ // 忽略704,文件找不到异常
165
+ if (error.status !== 704) {
166
+ throw error
167
+ }
168
+ }
169
+ }
170
+ let getFileGen = async function (self, data) {
171
+ let http = new HttpResetClass()
172
+ try {
173
+ await self.$getConfig(self, 'FilesDetail')
174
+ } catch (ignore) {
175
+ }
176
+ let result = await http.load('POST', 'rs/logic/filemanage_getFilesDetail', data, {
177
+ resolveMsg: null,
178
+ rejectMsg: '用户详细信息加载失败,请重新选择,如果多次失败,请检查系统是否正常!',
179
+ newly: true
180
+ })
181
+ self.data = result.data
182
+ self.data.meterinfo.forEach((item) => {
183
+ item.devicesinfo.forEach((item2) => {
184
+ if (item2.img.content) {
185
+ let URL = item2.img.content.substring(item2.img.content.lastIndexOf(':\\') + 2)
186
+ item2.img.content = 'http://' + location.host + '/' + URL
187
+ }
188
+ })
189
+ })
190
+ // 更新地址
191
+ // 修改附件临时id为表档案id
192
+ self.blodid = self.data.baseinfo.base.f_userinfo_id
193
+ console.log('获取档案信息', self.data)
194
+ self.checkout()
195
+ console.log('附件id', self.blodid)
196
+ }
197
+
198
+ export default {
199
+ title: '综合信息',
200
+ props: ['f_filialeid', 'row', 'areainfo', 'haslimit', 'isedit'],
201
+ components: {UserPaperInfoTest},
202
+ data () {
203
+ return {
204
+ config: {
205
+ hasnumber: false,
206
+ adddevices: false,
207
+ f_building_suffix: '栋',
208
+ f_unit_suffix: '单元',
209
+ f_floor_suffix: '层',
210
+ f_room_suffix: '室',
211
+ fileUserEssentialInfo: {},
212
+ fileUserinfoDevice: {},
213
+ fileUserMeterInfo: {},
214
+ userPaperInfo: {}
215
+ },
216
+ data: {
217
+ baseinfo: {
218
+ base: {
219
+ f_user_name: '',
220
+ f_user_state: '',
221
+ f_user_type: '',
222
+ f_credentials: '',
223
+ f_cost_type: '',
224
+ f_bz_type: '',
225
+ f_paper_type: '',
226
+ f_idnumber: ''
227
+ },
228
+ userinfodevices: [],
229
+ bank: {
230
+ f_bank_name: ''
231
+ },
232
+ // 用户备用电话信息
233
+ userphonelist: []
234
+ },
235
+ addressinfo: {
236
+ id: '',
237
+ f_address: '',
238
+ f_address_state: ''
239
+ },
240
+ meterinfo: [{
241
+ f_user_type: '',
242
+ f_gasproperties: '',
243
+ devicesinfo: [],
244
+ fireinfo: {}
245
+ }],
246
+ devicesinfo: [],
247
+ fireinfo: {},
248
+ address: {
249
+ id: '',
250
+ f_address: '',
251
+ f_address_state: ''
252
+ }
253
+ },
254
+ show_userinfodevices: false,
255
+ userinfodevices: [],
256
+ oldAddress: {},
257
+ highmetershow: false, // 高拍仪组件控制
258
+ showfiles: false,
259
+ overdueset: [],
260
+ // 子组件验证
261
+ essentialInfo: false,
262
+ meterInfo: false,
263
+ // 是否仅展示必填项
264
+ criteriaShow: false,
265
+ hiddenBtn: false,
266
+ // 地址相关属性
267
+ params: {
268
+ areas: [],
269
+ f_street: [],
270
+ f_residential_area: []
271
+ },
272
+ // 限购相关属性
273
+ limitShow: false,
274
+ limit_gas: null,
275
+ peopleNum: this.$appdata.getSingleValue('默认人口'),
276
+ blodid: '', // 附件的临时id
277
+ defaultMeterInfo: '', // 默认的表具信息
278
+ fileSaveData: {
279
+ // 修改原因
280
+ modifyReason: '',
281
+ reason: ''
282
+ },
283
+ // 档案变更明细
284
+ filechangeDetails: {rows: []},
285
+ filechangeDetailsShow: false,
286
+ seaching: false // 保存中
287
+ }
288
+ },
289
+ async ready () {
290
+ try {
291
+ console.log('开始获取配置文件')
292
+ // 获取配置文件 用来展示字段是否展示 是否必填
293
+ await getConfigScope(this, 'fileUserEssentialInfo')
294
+ await getConfigScope(this, 'fileUserinfoDevice')
295
+ await getConfigScope(this, 'fileUserMeterInfo')
296
+ await getConfigScope(this, 'userPaperInfo')
297
+ } catch (e) {
298
+ console.warn(e)
299
+ console.warn('获取展示配置失败,按照默认展示')
300
+ }
301
+ if (this.data.baseinfo.base.f_userinfo_id) {
302
+ this.blodid = this.data.baseinfo.base.f_userinfo_id
303
+ } else {
304
+ this.blodid = '临时id' + Date.now()
305
+ }
306
+ console.log('ready,,,', this.row)
307
+ await this.getOvedueset()
308
+ if (this.row) { // 修改用户
309
+ await this.areaGen(this.row)
310
+ } else if (!this.row) { // 小区批量建档
311
+ // 将小区信息转化为综合信息的格式
312
+ await this.areainfoInUser(this.areainfo)
313
+ }
314
+ console.log('this.blodid------------>', this.blodid)
315
+ },
316
+ watch: {
317
+ async 'row' (val) {
318
+ console.log('观察row', val)
319
+ if (val) {
320
+ await this.areaGen(val)
321
+ } else {
322
+ await this.areainfoInUser(this.areainfo)
323
+ }
324
+ },
325
+ 'areainfo' (val) {
326
+ console.log('小区观察。。', val)
327
+ if (val) {
328
+ this.$refs.meter.clearMeter()
329
+ this.blodid = '临时id' + Date.now()
330
+ this.areainfoInUser(val)
331
+ }
332
+ },
333
+ 'essentialInfo' (val) {
334
+ console.log('观察到验证变化', val)
335
+ }
336
+ },
337
+ methods: {
338
+ async getOvedueset () {
339
+ let overdueset = []
340
+ let res = await this.$resetpost('rs/sql/saleSingleTable', {
341
+ data: {
342
+ tablename: 't_overdue_set',
343
+ condition: `f_orgid = '${this.f_filialeid}' `
344
+ }
345
+ }, {resolveMsg: null, rejectMsg: '', newly: true})
346
+ for (let row of res.data) {
347
+ overdueset.push({label: row.f_rule_name, value: `${row.id}`})
348
+ }
349
+ this.overdueset = overdueset
350
+ },
351
+ confirmIdCard (IdCardInfo) {
352
+ console.log('返回的身份证', IdCardInfo)
353
+ this.uploadPictures()
354
+ this.data.baseinfo.base.f_user_name = IdCardInfo.strName
355
+ this.data.baseinfo.base.f_idnumber = IdCardInfo.strID
356
+ },
357
+ showUserDevices (index, row) {
358
+ this.userinfodevices = []
359
+ this.show_userinfodevices = true
360
+ this.userinfodevices = row.userinfodevices
361
+ console.log('查看设备信息', this.userinfodevices)
362
+ },
363
+
364
+ uploadFiles () {
365
+ this.showfiles = !this.showfiles
366
+ },
367
+
368
+ uploadPictures () {
369
+ this.highmetershow = !this.highmetershow
370
+ },
371
+
372
+ openBankAccount () {
373
+ this.$resetpost('rs/logic/openBankAccount', {
374
+ f_userinfo_code: this.data.baseinfo.base.f_userinfo_code,
375
+ f_username: this.data.baseinfo.base.f_user_name
376
+ },
377
+ {resolveMsg: null, rejectMsg: null}).then((res) => {
378
+ this.$showMessage(res.data.resultmessage)
379
+ })
380
+ },
381
+ async confirm () {
382
+ this.data.addressinfo.f_address = this.$refs.useressential.addressinfo.f_address
383
+ this.data.addressinfo.id = this.$refs.useressential.addressinfo.id
384
+ this.data.oldaddressinfo = this.oldAddress
385
+ this.data.hasnumber = this.config.hasnumber
386
+ this.data.limit_gas = this.limit_gas
387
+ if (this.f_filialeid && this.f_filialeid != '') {
388
+ this.data.f_filialeid = this.f_filialeid
389
+ } else {
390
+ this.data.f_filialeid = this.$login.f.orgid
391
+ }
392
+ if (this.row) {
393
+ this.data.baseinfo.base.version = this.row.version
394
+ }
395
+ this.seaching = true
396
+ console.log('档案保存之前,。。。', this.data)
397
+ this.data.baseinfo.base.f_user_name = Util.removerUnnecessary(this.data.baseinfo.base.f_user_name)
398
+ this.data.baseinfo.base.f_user_phone = Util.removerUnnecessary(this.data.baseinfo.base.f_user_phone)
399
+ this.data.meterinfo.forEach((item) => {
400
+ item.f_meternumber = Util.removerUnnecessary(item.f_meternumber)
401
+ })
402
+ if (this.data.meterinfo[0].f_gas_date != null) {
403
+ this.data.addressinfo.f_address_state = '已通气'
404
+ }
405
+ // 获取保存数据
406
+ Object.assign(this.fileSaveData, {}, this.$FileManageService.fileSaveBefore(this.data))
407
+ // 如果是修改, 则展示修改的明细给用户
408
+ if (this.fileSaveData.userinfo.f_userinfo_id) {
409
+ if (this.row.f_user_state === '预备' && this.fileSaveData.userinfo.f_user_state === '正常') {
410
+ this.fileSaveData.modifyReason = this.reason = '建档(档案信息完善)'
411
+ } else {
412
+ this.reason = '其他'
413
+ this.fileSaveData.modifyReason = ''
414
+ }
415
+ let details = await this.$resetpost('rs/logic/filechangeDetails', {data: this.fileSaveData}, {
416
+ resolveMsg: null,
417
+ rejectMsg: '获取修改明细出错!'
418
+ })
419
+ this.seaching = false
420
+ this.filechangeDetails.rows = details.data.changeDetails
421
+ this.filechangeDetailsShow = details.data.isChange
422
+ }
423
+ // 不是修改直接保存
424
+ if (!this.filechangeDetailsShow) this.confirmation()
425
+ },
426
+ async confirmation () {
427
+ if (this.fileSaveData.reason && this.fileSaveData.reason !== '其他') {
428
+ this.fileSaveData.modifyReason = this.fileSaveData.reason
429
+ }
430
+ for (let i = 0; i < this.filechangeDetails.rows.length; i++) {
431
+ if (this.filechangeDetails.rows[i].f_field_name === '通气日期') {
432
+ let name = this.$login.f.name
433
+ let nameId = this.$login.f.id
434
+ let parentname = this.$login.f.deps
435
+ let parentnameId = this.$login.f.depids
436
+ this.fileSaveData.userinfo.f_operator = name
437
+ this.fileSaveData.userinfo.f_operatorid = nameId
438
+ this.fileSaveData.userinfo.f_depname = parentname
439
+ this.fileSaveData.userinfo.f_depid = parentnameId
440
+ this.fileSaveData.userinfo.userfiles.f_operator = name
441
+ this.fileSaveData.userinfo.userfiles.f_operatorid = nameId
442
+ this.fileSaveData.userinfo.userfiles.f_depname = parentname
443
+ this.fileSaveData.userinfo.userfiles.f_depid = parentnameId
444
+ }
445
+ }
446
+ let userinfoid = null
447
+ await this.$FileManageService.fileSave(this.fileSaveData).then((res) => {
448
+ this.$parent.resdata = res.data.result[0].f_userinfo_code
449
+ userinfoid = res.data.result[0].f_userinfo_id
450
+ if (!this.row) {
451
+ this.$parent.resshow = true
452
+ }
453
+ this.$dispatch('success')
454
+ }).catch((error) => {
455
+ if (error.status === 603) {
456
+ this.$error('重复提交')
457
+ return
458
+ }
459
+ this.seaching = false
460
+ this.$dispatch('error', '档案保存', this.data, error)
461
+ })
462
+ try {
463
+ // 如果是物联网表并且设备类型是报警器的话,调用物联监控平台存储报警器信息
464
+ let http = new HttpResetClass()
465
+ await this.fileSaveData.userinfo.userfiles.forEach(row => {
466
+ if (row.f_meter_classify == '物联网表') {
467
+ if (row.devicesinfo.length > 0) {
468
+ row.devicesinfo.forEach(obj => {
469
+ if (obj.f_devices_type == '报警器') {
470
+ let param = {
471
+ userinfoId: userinfoid,
472
+ deviceNo: obj.f_devices_no,
473
+ state: 1,
474
+ brandId: obj.f_brand,
475
+ modelId: obj.f_devices_model,
476
+ inputtor: obj.f_operator,
477
+ inputDate: this.$login.toStandardTimeString(),
478
+ installDate: obj.f_input_date
479
+ }
480
+ if (obj.f_input_person.length > 0) {
481
+ param.installPerson = obj.f_input_person[0]
482
+ }
483
+ if (!obj.id) {
484
+ http.load('POST', '/webmeter/rs/logic/deviceSyncIotDevice', {data: param}, {
485
+ resolveMsg: null,
486
+ rejectMsg: null
487
+ })
488
+ } else {
489
+ let data = {
490
+ items: 'id',
491
+ tablename: 't_iot_device',
492
+ condition: `f_device_no = '${obj.f_devices_no}'`,
493
+ orderitem: 'id'
494
+ }
495
+ http.load('POST', 'rs/sql/saleSingleTable', {data: data}, {resolveMsg: null, rejectMsg: null})
496
+ .then(res => {
497
+ if (res.data.length > 0) {
498
+ http.load('POST', '/webmeter/rs/logic/deviceSyncIotDevice', {data: param}, {
499
+ resolveMsg: null,
500
+ rejectMsg: null
501
+ })
502
+ }
503
+ })
504
+ }
505
+ }
506
+ })
507
+ }
508
+ }
509
+ })
510
+ } catch (e) {
511
+ console.log(e)
512
+ }
513
+ },
514
+ convertBase64ToBlob (base64String) {
515
+ // 将base64解码
516
+ var bytes = atob(base64String)
517
+ // var bytes = base64;
518
+ var bytesCode = new ArrayBuffer(bytes.length)
519
+ // 转换为类型化数组
520
+ var byteArray = new Uint8Array(bytesCode)
521
+
522
+ // 将base64转换为ascii码
523
+ for (var i = 0; i < bytes.length; i++) {
524
+ byteArray[i] = bytes.charCodeAt(i)
525
+ }
526
+ // 生成Blob对象(文件对象)
527
+ return new Blob([bytesCode], {type: 'image/jpeg'})
528
+ },
529
+ newPhoto (Imgbase64) {
530
+ this.$refs.upload.newPhoto(Imgbase64)
531
+ /* let form = new FormData()
532
+ let xhr = new XMLHttpRequest()
533
+ let formDataBoundary = "----WebkitFormBoundary" + "GaoPaiYi";
534
+ form.append('Content-Type', 'multipart/form-data;boundary=' + formDataBoundary)
535
+ form.append('file', this.convertBase64ToBlob(Imgbase64), "GaoPaiYi.jpg")
536
+ xhr.open("POST", "rs/file/uploadFile")
537
+
538
+ if (this.headers) {
539
+ for (var header in this.headers) {
540
+ xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
541
+ }
542
+ }
543
+ xhr.send(form)
544
+ setTimeout(() => {
545
+ this.load(this)
546
+ }, 5000) */
547
+ },
548
+ async areaGen (data) {
549
+ data.f_user_id = data.f_user_id + ''
550
+ await getFileGen(this, data)
551
+ },
552
+ cancel () {
553
+ this.$dispatch('clean', '取消档案修正', 'user-general-info', this.row)
554
+ },
555
+ checkout (val) {
556
+ // 对收到的综合信息进行校验(主要目的是为了防止下拉框没有默认值)
557
+ // 对综合用户基本信息进行校验
558
+
559
+ // 将oldAddress 置为空,
560
+ this.oldAddress = {}
561
+ this.data.baseinfo.base.f_user_state = this.data.baseinfo.base.f_user_state === '预备' ? '正常' : this.data.baseinfo.base.f_user_state
562
+ // this.data.baseinfo.base.f_user_nature = this.data.baseinfo.base.f_user_nature ? [this.data.baseinfo.base.f_user_nature] : '民用'
563
+ // this.data.baseinfo.base.f_credentials = this.data.baseinfo.base.f_credentials ? [this.data.baseinfo.base.f_credentials] : '身份证'
564
+ this.data.baseinfo.base.f_cost_type = this.data.baseinfo.base.f_cost_type ? [this.data.baseinfo.base.f_cost_type] : '现金缴费'
565
+ this.data.baseinfo.base.f_bz_type = this.data.baseinfo.base.f_bz_type ? [this.data.baseinfo.base.f_bz_type] : ''
566
+
567
+ this.data.baseinfo.base.f_paper_type = this.data.baseinfo.base.f_paper_type ? [this.data.baseinfo.base.f_paper_type] : '电子发票'
568
+ this.data.baseinfo.bank.f_bank_name = this.data.baseinfo.bank.f_bank_name ? [this.data.baseinfo.bank.f_bank_name] : '中国银行'
569
+ 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)
570
+
571
+ if (this.data.baseinfo.base.f_slice_area) {
572
+ this.data.baseinfo.base.f_slice_area = [this.data.baseinfo.base.f_slice_area]
573
+ } else {
574
+ this.data.baseinfo.base.f_slice_area = ''
575
+ }
576
+ this.oldAddress.f_address = this.data.addressinfo.f_address
577
+ this.oldAddress.id = this.data.addressinfo.id
578
+
579
+ // 地址信息
580
+ // loadStreetAndResGen(this)
581
+
582
+ // 对表具信息进行校验
583
+ this.data.meterinfo.forEach((row) => {
584
+ console.log(row)
585
+ if (row.gasbrand) {
586
+ this.meterbrands.forEach((item) => {
587
+ if (item.label === row.gasbrand) {
588
+ row.gasbrand = [item.value]
589
+ }
590
+ })
591
+ } else {
592
+ row.gasbrand = ''
593
+ }
594
+ if (row.gasmodel && (row.gasbrand instanceof Array)) {
595
+ row.gasbrand[0].gasmodel.forEach((item) => {
596
+ if (item.label === (val === 'area' ? row.gasmodel : row.gasmodel + row.gasmodeltype)) {
597
+ row.gasmodel = [item.value]
598
+ }
599
+ })
600
+ } else {
601
+ row.gasmodel = ''
602
+ }
603
+ if (row.f_fire_state === '1') {
604
+ row.f_fire_state1 = true
605
+ } else if (row.f_fire_state === '0') {
606
+ row.f_fire_state1 = false
607
+ }
608
+ row.f_install_date = row.f_install_date ? row.f_install_date : this.$login.toStandardTimeString()
609
+ row.f_gas_date = row.f_gas_date ? row.f_gas_date : null
610
+ row.f_changetube_date = row.f_changetube_date ? row.f_changetube_date : null
611
+ row.f_aroundmeter = row.f_aroundmeter ? row.f_aroundmeter : ''
612
+ row.f_garbage_fee = row.f_garbage_fee ? row.f_garbage_fee : ''
613
+ row.f_valve_state = row.f_valve_state ? [row.f_valve_state] : ''
614
+ row.f_usetype = row.f_usetype ? [row.f_usetype] : ''
615
+ row.f_usestate = row.f_usestate && row.f_usestate.length > 0 ? [row.f_usestate] : ''
616
+ row.f_meter_book_num = row.f_meter_book_num && row.f_meter_book_num.length > 0 ? [row.f_meter_book_num] : ''
617
+ row.f_userfiles_address = row.f_userfiles_address && row.f_userfiles_address.length > 0 ? [row.f_userfiles_address] : ''
618
+ row.f_inputtor = row.f_inputtor ? [row.f_inputtor] : ''
619
+ row.f_position = row.f_position ? [row.f_position] : ''
620
+
621
+ row.f_user_type = row.f_user_type ? [row.f_user_type] : ''
622
+ row.f_gasproperties = row.f_gasproperties ? [row.f_gasproperties] : ''
623
+ row.pricetype = row.pricetype ? [row.pricetype] : ''
624
+
625
+ if (row.pricename) {
626
+ let names = this.getPricenames(row.f_user_type,
627
+ row.f_gasproperties,
628
+ row.pricetype)
629
+
630
+ console.log('=====2.===校验气价名称', names, row.f_user_type, row.f_gasproperties, row.pricetype)
631
+ if (names.length > 0) {
632
+ names.forEach((item) => {
633
+ if (item.label === row.pricename) {
634
+ row.pricename = [item.value]
635
+ row.f_detailprice = this.$CommonService.getShowPriceDetail(item.value.detailprice)
636
+ }
637
+ })
638
+ } else {
639
+ row.pricename = ''
640
+ }
641
+ } else {
642
+ row.pricename = ''
643
+ }
644
+
645
+ if (row.f_adjustable) {
646
+ this.adjustables.forEach((item) => {
647
+ if (item.label === row.f_adjustable) {
648
+ row.f_adjustable = [item.value]
649
+ }
650
+ })
651
+ } else {
652
+ row.f_adjustable = ''
653
+ }
654
+ })
655
+ // console.log('5555555555', this.data.meterinfo)
656
+ // 对设备进行校验
657
+ // this.data.devicesinfo.forEach((row) => {
658
+ // row.f_devices_type = row.f_devices_type ? [row.f_devices_type] : ''
659
+ // })
660
+ },
661
+ getPricenames (f_user_type, f_gasproperties, f_price_type) {
662
+ let rs = []
663
+ if (f_user_type.length === 1 && f_gasproperties.length === 1 && f_price_type.length === 1) {
664
+ rs = this.$GetSaleParam.getPrice({
665
+ f_user_type: f_user_type[0],
666
+ f_gasproperties: f_gasproperties[0],
667
+ f_price_type: f_price_type[0],
668
+ filter: this.f_filialeid
669
+ })
670
+ }
671
+ return rs
672
+ },
673
+ // 将小区信息转化为综合信息的格式
674
+ async areainfoInUser (areainfo) {
675
+ // this.nextTick(() => {
676
+ //
677
+ // })
678
+ // await this.$getConfig(this, 'UserAddress')
679
+ this.data = {
680
+ baseinfo: {
681
+ base: {
682
+ f_user_state: '正常',
683
+ f_is_mgq: '',
684
+ f_slice_area: '', // 片区
685
+ // 附件表临时id
686
+ blodid: this.blodid,
687
+ // 用户姓名
688
+ f_user_name: '',
689
+ // 用户电话
690
+ f_user_phone: '',
691
+ f_people_num: this.$appdata.getSingleValue('默认人口数') ? this.$appdata.getSingleValue('默认人口数') : 0,
692
+ f_packaging: '',
693
+ // 备用电话
694
+ f_rent_phone: '',
695
+ f_credentials: '身份证',
696
+ f_cost_type: '',
697
+ f_bz_type: '',
698
+ f_address: '',
699
+ addressid: '',
700
+ f_idnumber: '',
701
+ f_meter_book_num: ''
702
+ },
703
+ bank: {},
704
+ // 用户备用电话信息
705
+ userphonelist: []
706
+ },
707
+ addressinfo: {
708
+ // 详细地址
709
+ f_address: '',
710
+ id: ''
711
+ },
712
+ meterinfo: [{
713
+ // 表号
714
+ f_meternumber: '',
715
+ f_metertitles: '',
716
+ f_area_code: '',
717
+ // 气表品牌
718
+ gasbrand: '',
719
+ // 气表型号
720
+ gasmodel: '',
721
+ // 气表类型
722
+ gasmodeltype: '',
723
+ pricetype: '', // 气价类型
724
+ pricename: '', // 气价名称
725
+ f_user_type: '', // 用户类型
726
+ f_gasproperties: '', // 用气性质
727
+ f_inputtor: '',
728
+ // 安装位置
729
+ f_position: '',
730
+ // 安装地址
731
+ f_userfiles_address: '',
732
+ // 安装经度
733
+ f_userfiles_lng: '',
734
+ // 安装纬度
735
+ f_userfiles_lat: '',
736
+ // 使用类型
737
+ f_usetype: '',
738
+ // 使用状态
739
+ f_usestate: '',
740
+ // 左右表
741
+ f_aroundmeter: '',
742
+ f_garbage_fee: '否',
743
+ f_meter_base: '',
744
+ f_initial_base: 0,
745
+ // 通气人
746
+ f_gas_person: '',
747
+ f_adjustable: '', // 调压箱
748
+ f_detailprice: '', // 价格详情显示
749
+ devicesinfo: [], // 设备信息
750
+ f_hand_month: '', // 抄表月份
751
+ fireinfo: {}, // 用气信息
752
+ f_meter_book_num: '',
753
+ f_use_limit: '',
754
+ f_gas_date: '',
755
+ f_install_date: ''
756
+ }],
757
+ devicesinfo: []
758
+ }
759
+ // 若有id,则表示该地址是更新操作
760
+ /* if (areainfo.id) {
761
+ this.data.addressinfo.id = areainfo.id
762
+ }
763
+ // 改地址是 只有表没有户信息
764
+ if (areainfo.meter) {
765
+ Object.assign(this.data.meterinfo[0], this.data.meterinfo[0], areainfo.meter)
766
+ }
767
+ if (areainfo.user) {
768
+ Object.assign(this.data.baseinfo.base, this.data.baseinfo.base, areainfo.user)
769
+ } */
770
+
771
+ this.checkout('area')
772
+ },
773
+ limitClick () {
774
+ this.limitShow = true
775
+ },
776
+ getLimitGas (val) {
777
+ this.limit_gas = val
778
+ },
779
+ clearinfo () {
780
+ this.blodid = this.data.baseinfo.base.f_userinfo_id
781
+ this.areainfoInUser(this.areainfo)
782
+ }
783
+ },
784
+ computed: {
785
+ usertype () {
786
+ if (this.row && this.row.f_user_type) {
787
+ return this.row.f_user_type == '非民用'
788
+ }
789
+ return this.$refs.useressential.$refs.useraddressinfile.usertype
790
+ },
791
+ meterbrands () {
792
+ return this.$GetSaleParam.getGasbrand()
793
+ },
794
+ reasons () {
795
+ return this.$appdata.getParam('变更原因')
796
+ },
797
+ adjustables () {
798
+ return this.$GetSaleParam.getAdjustable()
799
+ },
800
+ getMeterBooks () {
801
+ return this.$GetSaleParam.getMeterBooks()
802
+ }
803
+ },
804
+ events: {
805
+ // 设置表具气价等默认值
806
+ defaultOtheret (row) {
807
+ if (!this.isedit) {
808
+ let temp = {
809
+ gasmodel: row.f_meter_style,
810
+ gasbrand: row.f_meter_brand,
811
+ gasmodeltype: row.f_meter_style,
812
+ pricetype: row.f_price_type,
813
+ pricename: row.f_price_name,
814
+ f_user_type: row.f_user_type,
815
+ f_gasproperties: row.f_gasproperties,
816
+ f_position: row.f_position,
817
+ f_meter_book_num: row.f_meter_book ? row.f_meter_book : '',
818
+ f_usestate: '正常',
819
+ f_adjustable: row.f_adjustable_id,
820
+ f_install_date: row.f_install_date,
821
+ f_inputtor: row.f_inputtor,
822
+ f_hand_month: row.f_hand_month,
823
+ f_usetype: ''
824
+ }
825
+ if (!temp.f_install_date) {
826
+ delete temp.f_install_date
827
+ }
828
+ Object.assign(this.data.meterinfo[0], this.data.meterinfo[0], temp)
829
+ this.data.baseinfo.base.f_house_type = row.f_house_type ? [row.f_house_type] : ''
830
+ console.log('====1.=====', temp, row)
831
+ this.checkout('area')
832
+ }
833
+ }
834
+ }
835
+ }
836
+ </script>
837
+ <style lang="less">
838
+ .filechangeDetailsShow {
839
+ td {
840
+ text-align: center !important;
841
+ }
842
+ }
843
+ </style>
@@ -16,4 +16,6 @@ export default function () {
16
16
  // 用户基本信息
17
17
  Vue.component('file-user-essential-info', (resolve) => { require(['./FilesManage/UserEssentialInfoTest'], resolve) })
18
18
  Vue.component('file-user-essential-info-new', (resolve) => { require(['./FilesManageNew/UserEssentialInfoTest'], resolve) })
19
+ // 用户综合信息
20
+ Vue.component('file-user-general-info', (resolve) => { require(['./FilesManage/UserGeneralInfoTest'], resolve) })
19
21
  }
package/src/main.js CHANGED
@@ -4,7 +4,7 @@ import App from './App'
4
4
  import system from 'system-clients/src/system'
5
5
  import sale from './sale'
6
6
  // import wenxi from './filiale/rizhao/sale'
7
- import FilialeSale from './filiale/gehua/sale'
7
+ import FilialeSale from './filiale/liaoyuan/sale'
8
8
  import address from 'address-client/src/address'
9
9
  import ldap from 'ldap-clients/src/ldap'
10
10
  import VueClipboard from 'vue-clipboard2'
@@ -851,7 +851,7 @@ let sendCardSaleGasGen = async function (model, row) {
851
851
  if (getCardNumber.data.cardNumber) {
852
852
  // 当卡的别名是泰鹏普通卡的时候卡号和表号一致
853
853
  console.log('开始验证是不是泰鹏普通卡')
854
- if (row.f_alias && row.f_alias.includes('SmartCard_TP')) {
854
+ if (row.f_alias && row.f_alias.includes('SmartCard_TP') && row.f_alias.includes('LiHengSystem')) {
855
855
  model.cardNumber = row.f_meternumber
856
856
  } else if (row.f_alias && row.f_alias.includes('LaiDeRF')) {
857
857
  model.cardNumber = row.f_card_id