sale-client 3.5.217 → 3.5.218

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.
@@ -4,7 +4,7 @@ var path = require('path')
4
4
  var webpackDevServer = require('webpack-dev-server')
5
5
  var compiler = webpack(config)
6
6
  // 自己改了这里不要提交 来回覆盖挺麻烦的
7
- const [localUrl, serverRul] = ['http://59.48.150.94:8300/', 'http://59.48.150.94:8300/']
7
+ const [localUrl, serverRul] = ['http://127.0.0.1:8080', 'http://121.36.106.17:8400']
8
8
  const port = 8089
9
9
 
10
10
  // eslint-disable-next-line new-cap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.217",
3
+ "version": "3.5.218",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -3,7 +3,7 @@
3
3
  <div :class="{'basic-main':!useraddressShow,'binary-left':useraddressShow}" v-show="isSelect">
4
4
  <file-address-list @select-changed="selected" v-ref:addresslist :style="style" :select=select :company=company :f_filialeids.sync="f_filialeids"></file-address-list>
5
5
  </div>
6
- <div v-show="useraddressShow" :class="{'basic-main':!isSelect, 'binary-right': isSelect}">
6
+ <div v-show="useraddressShow" :class="{'basic-main':!isSelect, 'binary-right': isSelect}" style="width:60%">
7
7
  <div class="flex">
8
8
  <file-user-address :f_filialeids.sync="f_filialeids" :is_pecial="isSpecial" :isedit="isSelect" :row="row" v-ref:fileuseraddress></file-user-address>
9
9
 
@@ -205,7 +205,7 @@
205
205
  </div>
206
206
  </form>
207
207
  </validator>
208
- <modal v-if="showselectaddress" :show.sync="showselectaddress" width="50%" height="80%" title="地址信息" v-ref:modal large backdrop="false">
208
+ <modal v-if="showselectaddress" :show.sync="showselectaddress" width="70%" height="80%" title="地址信息" v-ref:modal large backdrop="false">
209
209
  <article slot="modal-body" class="modal-body" style="height: 700px;padding: 0!important;">
210
210
  <file-address-manage :is-select="isSelect" :fileinfo="addressinfo"
211
211
  @address-valid="doNothing" :showselectaddress.sync="showselectaddress" v-ref:fileaddress ></file-address-manage>
@@ -3,7 +3,7 @@
3
3
  <div :class="{'basic-main':!useraddressShow,'binary-left':useraddressShow}" v-show="isSelect">
4
4
  <file-address-list @select-changed="selected" v-ref:addresslist :style="style" :select=select :company=company :f_filialeids.sync="f_filialeids"></file-address-list>
5
5
  </div>
6
- <div v-show="useraddressShow" :class="{'basic-main':!isSelect, 'binary-right': isSelect}">
6
+ <div v-show="useraddressShow" :class="{'basic-main':!isSelect, 'binary-right': isSelect}" style="width:60%">
7
7
  <div class="flex">
8
8
  <file-user-address :f_filialeids.sync="f_filialeids" :is_pecial="isSpecial" :isedit="isSelect" :row="row" v-ref:fileuseraddress></file-user-address>
9
9
 
@@ -5,14 +5,14 @@
5
5
  <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
6
 
7
7
  <div class="row">
8
- <div class="col-sm-4 form-group">
8
+ <div class="col-sm-6 form-group">
9
9
  <label class="font_normal_body">地址信息</label>
10
10
  <input type="text" class="input_search" style="width:60%" v-model="model.f_address"
11
11
  condition="f_address like '%{}%'" placeholder="地址信息"
12
12
  @keyup.enter.stop="search()"
13
13
  :size="model.f_address ? model.f_address.length*2 : 8"/>
14
14
  </div>
15
- <div class="col-sm-4 form-group button-range" >
15
+ <div class="col-sm-6 form-group button-range" >
16
16
  <button class="button_search button_spacing" @click="search()" >查询</button>
17
17
  <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('民用')">添加民用地址</button>
18
18
  <button class="button_new button_spacing" style="width: max-content" @click="$parent.$parent.add('非民用')">添加特殊地址</button>
@@ -17,7 +17,7 @@
17
17
  <label for="gasmodel" class="font_normal_body">气表型号</label>
18
18
  <input type="text" v-show="false" v-model="$refs.model.selectedItems"
19
19
  v-validate:model='{required: true }'>
20
- <v-select :value.sync="row.gasmodel" :options='row.gasbrand[0].gasmodel' placeholder='气表型号'
20
+ <v-select :value.sync="row.gasmodel" :options='gasmodelOptions' placeholder='气表型号'
21
21
  close-on-select
22
22
  v-model='row.gasmodel' :disabled="row.gasbrand.length === 0 || curuser.f_user_state != '预备'" v-ref:model></v-select>
23
23
  </div>
@@ -50,9 +50,11 @@
50
50
  <input type="number" class="input_search" style="width:60%" v-model="row.f_meter_base" placeholder='表底数'
51
51
  :disabled="!jurisdiction.includes('档案信息查询修改')" :readonly="!row.f_userfiles_id">
52
52
  </div>
53
- <div class="col-sm-4 form-group" title="涉及权限:【档案信息查询修改】" :class="[$m.f_initial_base.required ? 'has-error' : '']">
54
- <label for="f_meter_base" class="font_normal_body">*&ensp;初始底数</label>
55
- <input type="number" class="input_search" style="width:60%" v-model="row.f_initial_base" placeholder='表底数'
53
+
54
+
55
+ <div title="涉及权限:【档案信息查询修改】" :class="[$m.f_initial_base.required ? 'col-sm-4 form-group has-error' : 'col-sm-4 form-group']">
56
+ <label for="f_initial_base" class="font_normal_body">*&ensp;气表底数</label>
57
+ <input type="text" class="input_search" style="width:60%" v-model="row.f_initial_base" placeholder='表底数'
56
58
  v-validate:f_initial_base='{required: true }'
57
59
  :disabled="!jurisdiction.includes('档案信息查询修改')">
58
60
  </div>
@@ -181,13 +183,24 @@
181
183
  close-on-select
182
184
  v-el:cc></v-select>
183
185
  </div>
184
- <div class="col-sm-4 form-group" >
185
- <label for="gasmodel" class="font_normal_body">*&ensp;左&ensp;右&ensp;表</label>
186
- <input v-show="false" class="input_search" style="width:60%" v-model="row.f_aroundmeter" placeholder='左右表'
187
- v-validate:f_aroundmeter='{required: true }'>
188
- <v-select :value.sync="row.f_aroundmeter" :options='aroundmeters' placeholder='左右表' close-on-select
189
- v-model='row.f_aroundmeter'></v-select>
186
+ <div class="col-sm-4 form-group" :class="[$m.aroundmeter.required ? 'has-error' : '']" >
187
+ <label for="f_aroundmeter" class="font_normal_body">*&ensp;左&ensp;右&ensp;表1</label>
188
+ <input type="text" v-model="row.f_aroundmeter" v-show="false" v-validate:aroundmeter='{required: true }'>
189
+ <v-select :value.sync="row.f_aroundmeter" v-model="row.f_aroundmeter"
190
+ :options='aroundmeters' placeholder='请选择'
191
+ close-on-select
192
+ v-ref:aroundmeter
193
+ ></v-select>
190
194
  </div>
195
+
196
+ <div class="col-sm-4 form-group" :class="[$m.f_position.required ? 'has-error' : '']">
197
+ <label for="f_position" class="font_normal_body" title="参数:安装位置">&ensp;安装位置</label>
198
+ <input type="text" v-model="row.f_position" v-show="false" v-validate:f_position='{required: true }'>
199
+ <v-select :value.sync="row.f_position" v-model="row.f_position"
200
+ :options='positions' placeholder='安装位置'
201
+ close-on-select></v-select>
202
+ </div>
203
+
191
204
  <div class="col-sm-4 form-group" >
192
205
  <label for="f_bqf_type" class="font_normal_body">表前阀型号</label>
193
206
  <input type="text" class="input_search" style="width:60%" v-model="row.f_bqf_type"
@@ -209,8 +222,8 @@
209
222
  close-on-select></v-select> -->
210
223
  </div>
211
224
  <div class="col-sm-4 form-group" :class="[$m.f_gas_date.required ? 'has-error' : '']">
212
- <input type="text" v-model="$refs.f_gas_date.value" v-show="false" v-validate:f_gas_date='{required: true }'>
213
225
  <label for="f_gas_date" class="font_normal_body">&ensp;通气日期</label>
226
+ <input type="text" v-model="$refs.f_gas_date.value" v-show="false" v-validate:f_gas_date='{required: true }'>
214
227
  <datepicker style="width:60%" placeholder="通气日期"
215
228
  v-model="row.f_gas_date"
216
229
  v-ref:f_gas_date
@@ -220,8 +233,9 @@
220
233
  ></datepicker>
221
234
  </div>
222
235
 
223
- <div class="col-sm-4 form-group" >
236
+ <div class="col-sm-4 form-group" :class="[$m.f_position.required ? 'has-error' : '']">
224
237
  <label for="f_position" class="font_normal_body" title="参数:安装位置">&ensp;安装位置</label>
238
+ <input type="text" v-model="row.f_position" v-show="false" v-validate:f_position='{required: true }'>
225
239
  <v-select :value.sync="row.f_position" v-model="row.f_position"
226
240
  :options='positions' placeholder='安装位置'
227
241
  close-on-select></v-select>
@@ -246,8 +260,8 @@
246
260
  :options='meterbookoptions' placeholder='抄表册'
247
261
  close-on-select></v-select>
248
262
  </div>
249
- <div class="col-sm-4 form-group" v-show="true" :class="[$m.f_install_date.required ? 'has-error' : '']">
250
- <input type="text" v-model="$refs.f_install_date.value" v-show="false" v-validate:f_install_date='{required: true }'>
263
+ <div class="col-sm-4 form-group">
264
+ <input type="text" v-model="$refs.f_install_date.value" v-show="false" >
251
265
  <label for="f_install_date" class="font_normal_body">&ensp;安装日期</label>
252
266
  <datepicker style="width:60%" id="startDate" placeholder="安装日期" width='100%'
253
267
  v-model="row.f_install_date"
@@ -474,6 +488,7 @@
474
488
  import co from 'co'
475
489
  import {HttpResetClass} from 'vue-client'
476
490
  import Vue from 'vue'
491
+ import {color} from 'echarts/lib/export'
477
492
 
478
493
  let meterBookGen = function * (self) {
479
494
  if (self.$login.r.find(value => value == '抄表册建档')) {
@@ -602,6 +617,7 @@
602
617
  co(meterBookGen(this))
603
618
  },
604
619
  methods: {
620
+ color,
605
621
  checkCardId() {
606
622
  this.$resetpost('rs/logic/checkCardId', {
607
623
  data: {
@@ -727,6 +743,14 @@
727
743
  this.show = true
728
744
  this.field = field
729
745
  },
746
+ initialBaseValidate (){
747
+ console.log('initialBaseValidate', this.row.f_initial_base.required)
748
+ if (this.row.f_initial_base.required) {
749
+ return ''
750
+ } else {
751
+ return 'has-error'
752
+ }
753
+ },
730
754
  async meternumberValidate () {
731
755
  let http1 = new HttpResetClass()
732
756
  let res1 = await http1.load('POST', '/rs/sql/getBrandAndType', {data: {condition: ` mi.f_meternumber = '${this.row.f_meternumber}'`}}, {resolveMsg: null, rejectMsg: '获取默认气表品牌型号失败!!'})
@@ -838,6 +862,19 @@
838
862
  }
839
863
  },
840
864
  computed: {
865
+ // 控制气表型号
866
+ gasmodelOptions () {
867
+ let option = []
868
+ if (this.row.gasbrand.length > 0) {
869
+ option = this.row.gasbrand[0].gasmodel
870
+ }
871
+ option.map((item) => {
872
+ if (!item.label) return item
873
+ item.label = item.label.replace(/(家用|非家用|工业)?膜式燃气表|\*\*[\u4e00-\u9fa5]+/g, '')
874
+ return item
875
+ })
876
+ return option
877
+ },
841
878
 
842
879
  // 控制用户类型修改
843
880
  permissionUserType () {
@@ -26,7 +26,6 @@
26
26
  <div class="col-sm-4 form-group" style="" v-if="true">
27
27
  <label for="f_user_state" class="font_normal_body">&ensp;客户状态</label>
28
28
  <v-select :value.sync="baseinfo.base.f_user_state"
29
- :disabled="true"
30
29
  :value-single="true"
31
30
  :options='userstates' placeholder='客户状态'
32
31
  close-on-select></v-select>
@@ -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'
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: '',
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>
@@ -8,4 +8,5 @@ export default function () {
8
8
  Vue.component('file-meter-info', (resolve) => { require(['./MeterinfoTest'], resolve) })
9
9
  Vue.component('file-user-meter-info', (resolve) => { require(['./UserMeterInfoTest'], resolve) })
10
10
  Vue.component('file-user-device-info', (resolve) => { require(['./UserDeviceInfoTest'], resolve) })
11
+ Vue.component('file-user-general-info', (resolve) => { require(['./UserGeneralInfoTest'], resolve) })
11
12
  }