apply-clients 3.4.91 → 3.4.93

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/build/dev-server.js +133 -133
  2. package/package.json +117 -117
  3. package/src/App.vue +26 -21
  4. package/src/components/android/Ignition/VentilationIgnition.vue +312 -312
  5. package/src/components/android/Ignition/VentilationIgnitionHandle.vue +353 -353
  6. package/src/components/product/ApplyCharge/ApplyChargeList.vue +476 -476
  7. package/src/components/product/Function/InstallInfoSelect.vue +326 -326
  8. package/src/components/product/Ignition/IgnitionListManage.vue +420 -420
  9. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  10. package/src/components/product/Material/Materiallist.vue +74 -74
  11. package/src/components/product/Material/Materialmanger.vue +58 -58
  12. package/src/components/product/Process/ExplorationSelect.vue +491 -491
  13. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +203 -203
  14. package/src/components/product/Process/ShowBackReason.vue +40 -40
  15. package/src/components/product/Stop/StopApplyList.vue +278 -278
  16. package/src/components/product/Supervisory/SupervisoryControl.vue +140 -140
  17. package/src/filiale/hongda/pc/printChargepc.vue +114 -114
  18. package/src/filiale/hongda/pc/printactivatecard.vue +151 -151
  19. package/src/filiale/linzhou/pc/ApplyChargeList.vue +486 -486
  20. package/src/filiale/linzhou/pc/ServiceControl.vue +1968 -1968
  21. package/src/filiale/linzhou/pc/devicesManagement.vue +494 -494
  22. package/src/filiale/linzhou/pc.js +10 -10
  23. package/src/filiale/qianneng/android/AppAddMaterialScience.vue +477 -477
  24. package/src/filiale/qianneng/android/AppExplorationUser.vue +447 -447
  25. package/src/filiale/qianneng/android/AppServiceControl.vue +1608 -1608
  26. package/src/filiale/qianneng/android/AppServiceView.vue +761 -761
  27. package/src/filiale/qianneng/android/AppSign.vue +152 -152
  28. package/src/filiale/qianneng/android/AppTakePic.vue +140 -140
  29. package/src/filiale/qianneng/android.js +12 -12
  30. package/src/filiale/qianneng/pc/ApplyUpload.vue +290 -290
  31. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +685 -685
  32. package/src/filiale/qianneng/pc/ExplorationUser.vue +189 -189
  33. package/src/filiale/qianneng/pc/InstallationDetails.vue +561 -561
  34. package/src/filiale/qianneng/pc/ServiceView.vue +1118 -1121
  35. package/src/filiale/qianneng/pc/SupervisoryList.vue +344 -344
  36. package/src/filiale/qianneng/pc/SupervisoryhCart.vue +127 -127
  37. package/src/filiale/qianneng/pc/addMaterialScience.vue +464 -464
  38. package/src/filiale/qianneng/pc/addressAndUserinfoManagement.vue +389 -389
  39. package/src/filiale/qianneng/pc/devicesManagement.vue +484 -484
  40. package/src/filiale/qianneng/pc/printactivatecard.vue +295 -295
  41. package/src/filiale/qianneng/pc.js +26 -26
  42. package/src/filiale/yangchunboneng/pc/ApplyChargeList.vue +516 -0
  43. package/src/filiale/yangchunboneng/pc.js +13 -12
  44. package/src/main.js +23 -23
@@ -1,389 +1,389 @@
1
- <template>
2
- <work-busy :is-busy="showWork" v-show="showWork"></work-busy>
3
-
4
- <div class="col-sm-12" style="margin: 20px 0px;">
5
- <criteria-paged :model="model" v-ref:cp>
6
- <criteria partial='criteria' @condition-changed='search' v-ref:cri>
7
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
- </div>
9
- </criteria>
10
- <data-grid :model="model" v-ref:grid partial='list' class="list_area table_sy" style="padding: 0px">
11
- <template partial='head'>
12
- <tr>
13
- <th class="textNoLineBreak">序号</th>
14
- <th class="textNoLineBreak">区/县</th>
15
- <th class="textNoLineBreak">片区</th>
16
- <th class="textNoLineBreak">街道</th>
17
- <th class="textNoLineBreak">小区</th>
18
- <th class="textNoLineBreak">详细地址</th>
19
- <th class="textNoLineBreak">地址状态</th>
20
- <th class="textNoLineBreak">客户编号</th>
21
- <th class="textNoLineBreak">用户姓名</th>
22
- <th class="textNoLineBreak">电话</th>
23
- <th class="textNoLineBreak">证件类型</th>
24
- <th class="textNoLineBreak">证件号码</th>
25
- <th class="textNoLineBreak">时间</th>
26
- <th class="textNoLineBreak">备注</th>
27
- <th class="textNoLineBreak">
28
- <button
29
- type="button"
30
- class="btn btn-info head-but"
31
- @click="$parent.$parent.$parent.showFileModal()"
32
- :disabled=" $parent.$parent.$parent.mark === 1 || $parent.$parent.$parent.flag"
33
- >添加</button>
34
- <button type="button" class="btn btn-info head-but"
35
- :disabled="$parent.$parent.$parent.mark === 1 || $parent.$parent.$parent.flag"
36
- @click="$parent.$parent.$parent.showFile1()">导入</button>
37
- <a type="button" class="btn btn-info head-but"
38
- href="/apply/download/excel/批量导入.xlsx" download>模板下载</a>
39
- </th>
40
- </tr>
41
- </template>
42
- <template partial='body'>
43
- <tr>
44
- <td style="text-align: center;">
45
- <nobr>{{$index+1}}</nobr>
46
- </td>
47
- <td style="text-align: center;">
48
- <nobr>{{row.f_pcd}}</nobr>
49
- </td>
50
- <td style="text-align: center;">
51
- <nobr>{{row.f_slice_area}}</nobr>
52
- </td>
53
- <td style="text-align: center;">
54
- <nobr>{{row.f_street}}</nobr>
55
- </td>
56
- <td style="text-align: center;">
57
- <nobr>{{row.f_residential_area}}</nobr>
58
- </td>
59
- <td style="text-align: center;">
60
- <nobr>{{row.f_address}}</nobr>
61
- </td>
62
- <td style="text-align: center;">
63
- <nobr>{{row.f_address_state}}</nobr>
64
- </td>
65
- <td style="text-align: center;">
66
- <nobr>{{row.f_userinfo_code}}</nobr>
67
- </td>
68
- <td style="text-align: center;">
69
- <nobr>{{row.f_user_name}}</nobr>
70
- </td>
71
- <td style="text-align: center;">
72
- <nobr>{{row.f_user_phone}}</nobr>
73
- </td>
74
- <td style="text-align: center;">
75
- <nobr>{{row.f_credentials}}</nobr>
76
- </td>
77
- <td style="text-align: center;">
78
- <nobr>{{row.f_idnumber}}</nobr>
79
- </td>
80
- <td style="text-align: center;">
81
- <nobr>{{row.f_create_date}}</nobr>
82
- </td>
83
- <td style="text-align: center;">
84
- <nobr>{{row.f_userinfo_comments}}</nobr>
85
- </td>
86
- <td style="text-align: center;">
87
- <nobr>
88
-
89
- </nobr>
90
- </td>
91
- </tr>
92
- </template>
93
- </data-grid>
94
- </criteria-paged>
95
- </div>
96
- <validator name="v">
97
- <modal v-if="showmodel" :show.sync="showmodel" v-ref:modal :large="true" :backdrop="false" title="添加用户">
98
- <header slot="modal-header" class="modal-header">
99
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
100
- <h4 class="modal-title">添加用户</h4>
101
- </header>
102
- <article slot="modal-body" class="modal-body clearfix">
103
- <div class="form-group col-sm-12" :class="[$v.f_pcd.required ? 'has-error' : '']">
104
- <label class="col-sm-2 control-label">区/县:</label>
105
- <div class="col-sm-10">
106
- <input type="text" v-show="false" v-model="useraddres.f_pcd" v-validate:f_pcd = "['required']" >
107
- <input-select width="100%" class="select select_list" placeholder='请选择'
108
- v-model="useraddres.f_pcd"
109
- :value.sync="useraddres.f_pcd"
110
- :options='pcds'
111
- @change="pcdChange(useraddres.f_pcd)"
112
- :value-single="true"
113
- close-on-select ></input-select>
114
- </div>
115
- </div>
116
- <div class="form-group col-sm-12" :class="[$v.f_street.required ? 'has-error' : '']">
117
- <label class="col-sm-2 control-label">街道/乡镇:</label>
118
- <div class="col-sm-10">
119
- <input type="text" v-show="false" v-model="useraddres.f_street" v-validate:f_street = "['required']" >
120
- <input-select width="100%" class="select select_list" placeholder='请选择'
121
- v-model="useraddres.f_street"
122
- :value.sync="useraddres.f_street"
123
- :options='streets'
124
- @change="streetChange(useraddres.f_street)"
125
- :value-single="true"
126
- close-on-select ></input-select>
127
- </div>
128
- </div>
129
- <div class="form-group col-sm-12" :class="[$v.f_residential_area.required ? 'has-error' : '']">
130
- <label class="col-sm-2 control-label">小区:</label>
131
- <div class="col-sm-10">
132
- <input type="text" v-show="false" v-model="useraddres.f_residential_area" v-validate:f_residential_area = "['required']" >
133
- <input-select width="100%" class="select select_list" placeholder='请选择'
134
- v-model="useraddres.f_residential_area"
135
- :value.sync="useraddres.f_residential_area"
136
- :options='areas'
137
- :value-single="true"
138
- close-on-select ></input-select>
139
- </div>
140
- </div>
141
- <div class="form-group col-sm-12">
142
- <label class="col-sm-2 control-label">详细地址:</label>
143
- <div class="col-sm-10">
144
- <input type="text"
145
- class="form-control input_view"
146
- style="width: 100%"
147
- v-model="useraddres.f_address"
148
- />
149
- </div>
150
- </div>
151
- <div class="form-group col-sm-12">
152
- <label class="col-sm-2 control-label">地址类型:</label>
153
- <div class="col-sm-10">
154
- <input type="text"
155
- class="form-control input_view"
156
- style="width: 100%"
157
- v-model="useraddres.f_address_type"
158
- value="特殊地址" readonly
159
- />
160
- </div>
161
- </div>
162
- </article>
163
- <footer slot="modal-footer" class="modal-footer">
164
- <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveuseraddress()">保存</button>
165
- </footer>
166
- </modal>
167
- </validator>
168
- <modal :show.sync="showFile" v-ref:modal backdrop="true" title="选择文件">
169
- <header slot="modal-header" class="modal-header">
170
- <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
171
- <h4 class="modal-title">选择文件</h4>
172
- </header>
173
- <article slot="modal-body" class="modal-body">
174
- <div class="form-group">
175
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
176
- </div>
177
- </article>
178
- <footer slot="modal-footer" class="modal-footer"></footer>
179
- </modal>
180
- </template>
181
- <script>
182
- import {PagedList} from 'vue-client'
183
- import {HttpResetClass} from 'vue-client'
184
- import {isEmpty} from '../../../components/Util'
185
-
186
- export default {
187
- title: '地址管理',
188
- props: {
189
- selectdata: {
190
- type: Object
191
- },
192
- mark: {
193
- type: Number,
194
- default: 0 // 0:正常 1:禁用
195
- }
196
- },
197
- data () {
198
- return {
199
- showFile: false,
200
- model: new PagedList('rs/sql/getAddressAanUserinfo', 20, {
201
- data: {
202
- f_filialeid: this.$login.f.orgid,
203
- f_process_id: this.selectdata.f_process_id
204
- }
205
- }),
206
- showWork: false,
207
- useraddres:{},
208
- pcds: [],
209
- streets:[],
210
- areas:[],
211
- // 添加按钮禁用
212
- flag:true,
213
- showmodel : false
214
- }
215
- },
216
- ready () {
217
- this.search()
218
- this.getPcd()
219
- this.disp()
220
- },
221
- methods: {
222
- showFile1() {
223
- this.showFile = !this.showFile
224
- },
225
- showFileModal() {
226
- this.useraddres = {}
227
- this.showmodel = !this.showmodel
228
- },
229
- async search () {
230
- this.$refs.cp.$refs.cri.search()
231
- },
232
- // 关闭文件上传对话框
233
- closeFile() {
234
- this.useraddres = {}
235
- this.showWork = false
236
- this.showFile = false
237
- this.showmodel = false
238
- this.search()
239
- },
240
- // 保存用户信息
241
- saveuseraddress(){
242
- let http = new HttpResetClass()
243
- let data = {
244
- selectdata:this.selectdata,
245
- user:this.$login.f,
246
- useraddres:this.useraddres,
247
- userinfo:{}
248
- }
249
- http.load('post',`rs/logic/importAddressAndUserinfo`, {data: data}, {
250
- resolveMsg: null,
251
- rejectMsg: '添加失败!!!',
252
- }).then(res=>{
253
- if (res.data.type == 'success'){
254
- this.closeFile()
255
- }
256
- })
257
- },
258
- // 获取区县
259
- async getPcd () {
260
- let data = {
261
- tablename: 't_pcd',
262
- condition: `f_filialeid = '${this.$login.f.orgid}'`
263
- }
264
- let http = new HttpResetClass()
265
- let res = await http.load(
266
- 'POST',
267
- `rs/sql/apply_singleTable`,
268
- {data: data},
269
- {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
270
- )
271
-
272
- this.pcds = res.data.map(item => {
273
- return {
274
- label: item.f_pcd,
275
- value: item.f_pcd
276
- }
277
- })
278
- },
279
- // 获取街道
280
- async pcdChange (row) {
281
- if (isEmpty(row)) {
282
- return
283
- }
284
-
285
- let data = {
286
- tablename: 't_street',
287
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${row}'`
288
- }
289
- let http = new HttpResetClass()
290
- let res = await http.load(
291
- 'POST',
292
- `rs/sql/apply_singleTable`,
293
- {data: data},
294
- {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
295
- )
296
-
297
- this.streets = res.data.map(item => {
298
- return {
299
- label: item.f_street,
300
- value: item.f_street
301
- }
302
- })
303
- },
304
- // 获取集收单位
305
- async streetChange (row) {
306
- if (isEmpty(row)) {
307
- return
308
- }
309
-
310
- let data = {
311
- tablename: 't_area',
312
- condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${row}'`
313
- }
314
- let http = new HttpResetClass()
315
- let res = await http.load(
316
- 'POST',
317
- `rs/sql/apply_singleTable`,
318
- {data: data},
319
- {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
320
- )
321
-
322
- this.areas = res.data.map(item => {
323
- return {
324
- label: item.f_residential_area,
325
- value: item.f_residential_area
326
- }
327
- })
328
- },
329
- disp(){
330
- if (!isEmpty(this.selectdata.f_installed_households)){
331
- if (this.selectdata.f_installed_households > this.model.count){
332
- this.flag = false
333
- }else {
334
- this.flag = true
335
- }
336
- }else {
337
- this.flag = true
338
- }
339
- }
340
- },
341
- events: {
342
- async 'onFileUpload'(file, result) {
343
- let data = {
344
- selectdata: this.selectdata,
345
- filepath: result.f_downloadpath,
346
- user: this.$login.f,
347
- mark: this.mark
348
- }
349
-
350
- try {
351
- let res = await this.$resetpost(`rs/logic/importAddressAndUserinfo2`, {data: data}, {
352
- resolveMsg: null,
353
- rejectMsg: '导入失败!!!',
354
- silent: true
355
- }, 0)
356
- this.$showMessage(res.data)
357
- } catch (e) {
358
- // this.closeFile()
359
- } finally {
360
- this.closeFile()
361
- }
362
-
363
- }
364
- },
365
- computed: {
366
- },
367
- watch: {
368
- 'model.count'(){
369
- this.disp()
370
- },
371
- 'selectdata.f_installed_households'(){
372
- this.disp()
373
- }
374
- }
375
- }
376
- </script>
377
- <style scoped>
378
- .textNoLineBreak {
379
- white-space: nowrap;
380
- }
381
- .head-but{
382
- margin-left: 5px;
383
- height: 34px;
384
- /*background-color: #6aa6e2;*/
385
- border-radius: 4px;
386
- font-family: PingFang;
387
- color: #ffffff;
388
- }
389
- </style>
1
+ <template>
2
+ <work-busy :is-busy="showWork" v-show="showWork"></work-busy>
3
+
4
+ <div class="col-sm-12" style="margin: 20px 0px;">
5
+ <criteria-paged :model="model" v-ref:cp>
6
+ <criteria partial='criteria' @condition-changed='search' v-ref:cri>
7
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
8
+ </div>
9
+ </criteria>
10
+ <data-grid :model="model" v-ref:grid partial='list' class="list_area table_sy" style="padding: 0px">
11
+ <template partial='head'>
12
+ <tr>
13
+ <th class="textNoLineBreak">序号</th>
14
+ <th class="textNoLineBreak">区/县</th>
15
+ <th class="textNoLineBreak">片区</th>
16
+ <th class="textNoLineBreak">街道</th>
17
+ <th class="textNoLineBreak">小区</th>
18
+ <th class="textNoLineBreak">详细地址</th>
19
+ <th class="textNoLineBreak">地址状态</th>
20
+ <th class="textNoLineBreak">客户编号</th>
21
+ <th class="textNoLineBreak">用户姓名</th>
22
+ <th class="textNoLineBreak">电话</th>
23
+ <th class="textNoLineBreak">证件类型</th>
24
+ <th class="textNoLineBreak">证件号码</th>
25
+ <th class="textNoLineBreak">时间</th>
26
+ <th class="textNoLineBreak">备注</th>
27
+ <th class="textNoLineBreak">
28
+ <button
29
+ type="button"
30
+ class="btn btn-info head-but"
31
+ @click="$parent.$parent.$parent.showFileModal()"
32
+ :disabled=" $parent.$parent.$parent.mark === 1 || $parent.$parent.$parent.flag"
33
+ >添加</button>
34
+ <button type="button" class="btn btn-info head-but"
35
+ :disabled="$parent.$parent.$parent.mark === 1 || $parent.$parent.$parent.flag"
36
+ @click="$parent.$parent.$parent.showFile1()">导入</button>
37
+ <a type="button" class="btn btn-info head-but"
38
+ href="/apply/download/excel/批量导入.xlsx" download>模板下载</a>
39
+ </th>
40
+ </tr>
41
+ </template>
42
+ <template partial='body'>
43
+ <tr>
44
+ <td style="text-align: center;">
45
+ <nobr>{{$index+1}}</nobr>
46
+ </td>
47
+ <td style="text-align: center;">
48
+ <nobr>{{row.f_pcd}}</nobr>
49
+ </td>
50
+ <td style="text-align: center;">
51
+ <nobr>{{row.f_slice_area}}</nobr>
52
+ </td>
53
+ <td style="text-align: center;">
54
+ <nobr>{{row.f_street}}</nobr>
55
+ </td>
56
+ <td style="text-align: center;">
57
+ <nobr>{{row.f_residential_area}}</nobr>
58
+ </td>
59
+ <td style="text-align: center;">
60
+ <nobr>{{row.f_address}}</nobr>
61
+ </td>
62
+ <td style="text-align: center;">
63
+ <nobr>{{row.f_address_state}}</nobr>
64
+ </td>
65
+ <td style="text-align: center;">
66
+ <nobr>{{row.f_userinfo_code}}</nobr>
67
+ </td>
68
+ <td style="text-align: center;">
69
+ <nobr>{{row.f_user_name}}</nobr>
70
+ </td>
71
+ <td style="text-align: center;">
72
+ <nobr>{{row.f_user_phone}}</nobr>
73
+ </td>
74
+ <td style="text-align: center;">
75
+ <nobr>{{row.f_credentials}}</nobr>
76
+ </td>
77
+ <td style="text-align: center;">
78
+ <nobr>{{row.f_idnumber}}</nobr>
79
+ </td>
80
+ <td style="text-align: center;">
81
+ <nobr>{{row.f_create_date}}</nobr>
82
+ </td>
83
+ <td style="text-align: center;">
84
+ <nobr>{{row.f_userinfo_comments}}</nobr>
85
+ </td>
86
+ <td style="text-align: center;">
87
+ <nobr>
88
+
89
+ </nobr>
90
+ </td>
91
+ </tr>
92
+ </template>
93
+ </data-grid>
94
+ </criteria-paged>
95
+ </div>
96
+ <validator name="v">
97
+ <modal v-if="showmodel" :show.sync="showmodel" v-ref:modal :large="true" :backdrop="false" title="添加用户">
98
+ <header slot="modal-header" class="modal-header">
99
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
100
+ <h4 class="modal-title">添加用户</h4>
101
+ </header>
102
+ <article slot="modal-body" class="modal-body clearfix">
103
+ <div class="form-group col-sm-12" :class="[$v.f_pcd.required ? 'has-error' : '']">
104
+ <label class="col-sm-2 control-label">区/县:</label>
105
+ <div class="col-sm-10">
106
+ <input type="text" v-show="false" v-model="useraddres.f_pcd" v-validate:f_pcd = "['required']" >
107
+ <input-select width="100%" class="select select_list" placeholder='请选择'
108
+ v-model="useraddres.f_pcd"
109
+ :value.sync="useraddres.f_pcd"
110
+ :options='pcds'
111
+ @change="pcdChange(useraddres.f_pcd)"
112
+ :value-single="true"
113
+ close-on-select ></input-select>
114
+ </div>
115
+ </div>
116
+ <div class="form-group col-sm-12" :class="[$v.f_street.required ? 'has-error' : '']">
117
+ <label class="col-sm-2 control-label">街道/乡镇:</label>
118
+ <div class="col-sm-10">
119
+ <input type="text" v-show="false" v-model="useraddres.f_street" v-validate:f_street = "['required']" >
120
+ <input-select width="100%" class="select select_list" placeholder='请选择'
121
+ v-model="useraddres.f_street"
122
+ :value.sync="useraddres.f_street"
123
+ :options='streets'
124
+ @change="streetChange(useraddres.f_street)"
125
+ :value-single="true"
126
+ close-on-select ></input-select>
127
+ </div>
128
+ </div>
129
+ <div class="form-group col-sm-12" :class="[$v.f_residential_area.required ? 'has-error' : '']">
130
+ <label class="col-sm-2 control-label">小区:</label>
131
+ <div class="col-sm-10">
132
+ <input type="text" v-show="false" v-model="useraddres.f_residential_area" v-validate:f_residential_area = "['required']" >
133
+ <input-select width="100%" class="select select_list" placeholder='请选择'
134
+ v-model="useraddres.f_residential_area"
135
+ :value.sync="useraddres.f_residential_area"
136
+ :options='areas'
137
+ :value-single="true"
138
+ close-on-select ></input-select>
139
+ </div>
140
+ </div>
141
+ <div class="form-group col-sm-12">
142
+ <label class="col-sm-2 control-label">详细地址:</label>
143
+ <div class="col-sm-10">
144
+ <input type="text"
145
+ class="form-control input_view"
146
+ style="width: 100%"
147
+ v-model="useraddres.f_address"
148
+ />
149
+ </div>
150
+ </div>
151
+ <div class="form-group col-sm-12">
152
+ <label class="col-sm-2 control-label">地址类型:</label>
153
+ <div class="col-sm-10">
154
+ <input type="text"
155
+ class="form-control input_view"
156
+ style="width: 100%"
157
+ v-model="useraddres.f_address_type"
158
+ value="特殊地址" readonly
159
+ />
160
+ </div>
161
+ </div>
162
+ </article>
163
+ <footer slot="modal-footer" class="modal-footer">
164
+ <button type="button" class="btn btn-primary" :disabled='!$v.valid' @click="saveuseraddress()">保存</button>
165
+ </footer>
166
+ </modal>
167
+ </validator>
168
+ <modal :show.sync="showFile" v-ref:modal backdrop="true" title="选择文件">
169
+ <header slot="modal-header" class="modal-header">
170
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
171
+ <h4 class="modal-title">选择文件</h4>
172
+ </header>
173
+ <article slot="modal-body" class="modal-body">
174
+ <div class="form-group">
175
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
176
+ </div>
177
+ </article>
178
+ <footer slot="modal-footer" class="modal-footer"></footer>
179
+ </modal>
180
+ </template>
181
+ <script>
182
+ import {PagedList} from 'vue-client'
183
+ import {HttpResetClass} from 'vue-client'
184
+ import {isEmpty} from '../../../components/Util'
185
+
186
+ export default {
187
+ title: '地址管理',
188
+ props: {
189
+ selectdata: {
190
+ type: Object
191
+ },
192
+ mark: {
193
+ type: Number,
194
+ default: 0 // 0:正常 1:禁用
195
+ }
196
+ },
197
+ data () {
198
+ return {
199
+ showFile: false,
200
+ model: new PagedList('rs/sql/getAddressAanUserinfo', 20, {
201
+ data: {
202
+ f_filialeid: this.$login.f.orgid,
203
+ f_process_id: this.selectdata.f_process_id
204
+ }
205
+ }),
206
+ showWork: false,
207
+ useraddres:{},
208
+ pcds: [],
209
+ streets:[],
210
+ areas:[],
211
+ // 添加按钮禁用
212
+ flag:true,
213
+ showmodel : false
214
+ }
215
+ },
216
+ ready () {
217
+ this.search()
218
+ this.getPcd()
219
+ this.disp()
220
+ },
221
+ methods: {
222
+ showFile1() {
223
+ this.showFile = !this.showFile
224
+ },
225
+ showFileModal() {
226
+ this.useraddres = {}
227
+ this.showmodel = !this.showmodel
228
+ },
229
+ async search () {
230
+ this.$refs.cp.$refs.cri.search()
231
+ },
232
+ // 关闭文件上传对话框
233
+ closeFile() {
234
+ this.useraddres = {}
235
+ this.showWork = false
236
+ this.showFile = false
237
+ this.showmodel = false
238
+ this.search()
239
+ },
240
+ // 保存用户信息
241
+ saveuseraddress(){
242
+ let http = new HttpResetClass()
243
+ let data = {
244
+ selectdata:this.selectdata,
245
+ user:this.$login.f,
246
+ useraddres:this.useraddres,
247
+ userinfo:{}
248
+ }
249
+ http.load('post',`rs/logic/importAddressAndUserinfo`, {data: data}, {
250
+ resolveMsg: null,
251
+ rejectMsg: '添加失败!!!',
252
+ }).then(res=>{
253
+ if (res.data.type == 'success'){
254
+ this.closeFile()
255
+ }
256
+ })
257
+ },
258
+ // 获取区县
259
+ async getPcd () {
260
+ let data = {
261
+ tablename: 't_pcd',
262
+ condition: `f_filialeid = '${this.$login.f.orgid}'`
263
+ }
264
+ let http = new HttpResetClass()
265
+ let res = await http.load(
266
+ 'POST',
267
+ `rs/sql/apply_singleTable`,
268
+ {data: data},
269
+ {resolveMsg: null, rejectMsg: '区县查询失败!!!'}
270
+ )
271
+
272
+ this.pcds = res.data.map(item => {
273
+ return {
274
+ label: item.f_pcd,
275
+ value: item.f_pcd
276
+ }
277
+ })
278
+ },
279
+ // 获取街道
280
+ async pcdChange (row) {
281
+ if (isEmpty(row)) {
282
+ return
283
+ }
284
+
285
+ let data = {
286
+ tablename: 't_street',
287
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_pcd = '${row}'`
288
+ }
289
+ let http = new HttpResetClass()
290
+ let res = await http.load(
291
+ 'POST',
292
+ `rs/sql/apply_singleTable`,
293
+ {data: data},
294
+ {resolveMsg: null, rejectMsg: '街道/乡镇查询失败!!!'}
295
+ )
296
+
297
+ this.streets = res.data.map(item => {
298
+ return {
299
+ label: item.f_street,
300
+ value: item.f_street
301
+ }
302
+ })
303
+ },
304
+ // 获取集收单位
305
+ async streetChange (row) {
306
+ if (isEmpty(row)) {
307
+ return
308
+ }
309
+
310
+ let data = {
311
+ tablename: 't_area',
312
+ condition: `f_filialeid = '${this.$login.f.orgid}' and f_street = '${row}'`
313
+ }
314
+ let http = new HttpResetClass()
315
+ let res = await http.load(
316
+ 'POST',
317
+ `rs/sql/apply_singleTable`,
318
+ {data: data},
319
+ {resolveMsg: null, rejectMsg: '集收单位查询失败!!!'}
320
+ )
321
+
322
+ this.areas = res.data.map(item => {
323
+ return {
324
+ label: item.f_residential_area,
325
+ value: item.f_residential_area
326
+ }
327
+ })
328
+ },
329
+ disp(){
330
+ if (!isEmpty(this.selectdata.f_installed_households)){
331
+ if (this.selectdata.f_installed_households > this.model.count){
332
+ this.flag = false
333
+ }else {
334
+ this.flag = true
335
+ }
336
+ }else {
337
+ this.flag = true
338
+ }
339
+ }
340
+ },
341
+ events: {
342
+ async 'onFileUpload'(file, result) {
343
+ let data = {
344
+ selectdata: this.selectdata,
345
+ filepath: result.f_downloadpath,
346
+ user: this.$login.f,
347
+ mark: this.mark
348
+ }
349
+
350
+ try {
351
+ let res = await this.$resetpost(`rs/logic/importAddressAndUserinfo2`, {data: data}, {
352
+ resolveMsg: null,
353
+ rejectMsg: '导入失败!!!',
354
+ silent: true
355
+ }, 0)
356
+ this.$showMessage(res.data)
357
+ } catch (e) {
358
+ // this.closeFile()
359
+ } finally {
360
+ this.closeFile()
361
+ }
362
+
363
+ }
364
+ },
365
+ computed: {
366
+ },
367
+ watch: {
368
+ 'model.count'(){
369
+ this.disp()
370
+ },
371
+ 'selectdata.f_installed_households'(){
372
+ this.disp()
373
+ }
374
+ }
375
+ }
376
+ </script>
377
+ <style scoped>
378
+ .textNoLineBreak {
379
+ white-space: nowrap;
380
+ }
381
+ .head-but{
382
+ margin-left: 5px;
383
+ height: 34px;
384
+ /*background-color: #6aa6e2;*/
385
+ border-radius: 4px;
386
+ font-family: PingFang;
387
+ color: #ffffff;
388
+ }
389
+ </style>