address-client 1.5.24 → 1.5.25-ezhou
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/webpack.base.conf.js +1 -0
- package/package.json +98 -97
- package/src/address.js +6 -0
- package/src/components/AddAreaMsg.vue +73 -47
- package/src/components/AddStreetOrPcd.vue +52 -15
- package/src/components/SliceAddAreaMsg.vue +281 -0
- package/src/components/SliceAreaList.vue +144 -0
- package/src/components/SliceAreaManage.vue +68 -0
- package/src/components/UserAddress.vue +66 -26
|
@@ -38,6 +38,7 @@ module.exports = {
|
|
|
38
38
|
`${projectRoot}\\test`,
|
|
39
39
|
`${projectRoot}\\node_modules\\vue-client\\src`,
|
|
40
40
|
`${projectRoot}\\node_modules\\vue-strap\\src`,
|
|
41
|
+
`${projectRoot}\\node_modules\\ldap-clients\\src`,
|
|
41
42
|
`${projectRoot}\\node_modules\\system-clients\\src`,
|
|
42
43
|
`${projectRoot}\\node_modules\\sale-client\\src`,
|
|
43
44
|
]
|
package/package.json
CHANGED
|
@@ -1,97 +1,98 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "address-client",
|
|
3
|
-
"version": "1.5.
|
|
4
|
-
"description": "地址管理前台组件",
|
|
5
|
-
"author": "wanbochao",
|
|
6
|
-
"license": "ISC",
|
|
7
|
-
"main": "src/index.js",
|
|
8
|
-
"keywords": [
|
|
9
|
-
"sale"
|
|
10
|
-
],
|
|
11
|
-
"scripts": {
|
|
12
|
-
"unit": "karma start test/unit/karma.conf.js",
|
|
13
|
-
"example": "node build/example-server.js",
|
|
14
|
-
"dev": "node build/dev-server.js",
|
|
15
|
-
"lint": "eslint src/**.js test/e2e/**.js test/unit/specs/** build/**.js",
|
|
16
|
-
"build": "rimraf dist && mkdirp dist && ncp static dist/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prod.conf.js",
|
|
17
|
-
"e2e": "node test/e2e/runner.js",
|
|
18
|
-
"make": "rimraf dist-android && mkdirp dist-android && ncp static dist-android/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prodandroid.conf.js && publish",
|
|
19
|
-
"release": "bash build/release.sh"
|
|
20
|
-
},
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "https://gitee.com/aote/address_management.git"
|
|
24
|
-
},
|
|
25
|
-
"dependencies": {
|
|
26
|
-
"less-loader": "^2.2.3",
|
|
27
|
-
"vue": "^1.0.17"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"babel-core": "^6.0.0",
|
|
31
|
-
"babel-loader": "^6.0.0",
|
|
32
|
-
"babel-plugin-transform-runtime": "^6.0.0",
|
|
33
|
-
"babel-preset-es2015": "^6.0.0",
|
|
34
|
-
"babel-preset-stage-2": "^6.0.0",
|
|
35
|
-
"chai": "^3.5.0",
|
|
36
|
-
"co": "^4.6.0",
|
|
37
|
-
"connect-history-api-fallback": "^1.1.0",
|
|
38
|
-
"cross-env": "^1.0.7",
|
|
39
|
-
"cross-spawn": "^2.1.5",
|
|
40
|
-
"css-loader": "^0.23.0",
|
|
41
|
-
"echarts": "^4.1.0",
|
|
42
|
-
"eslint": "^2.0.0",
|
|
43
|
-
"eslint-config-standard": "^5.1.0",
|
|
44
|
-
"eslint-friendly-formatter": "^1.2.2",
|
|
45
|
-
"eslint-loader": "^1.3.0",
|
|
46
|
-
"eslint-plugin-html": "^1.3.0",
|
|
47
|
-
"eslint-plugin-promise": "^1.0.8",
|
|
48
|
-
"eslint-plugin-standard": "^1.3.2",
|
|
49
|
-
"eslint-plugin-vue": "^0.1.1",
|
|
50
|
-
"eventsource-polyfill": "^0.9.6",
|
|
51
|
-
"express": "^4.13.3",
|
|
52
|
-
"extract-text-webpack-plugin": "^1.0.1",
|
|
53
|
-
"file-loader": "^0.8.4",
|
|
54
|
-
"function-bind": "^1.0.2",
|
|
55
|
-
"html-webpack-plugin": "^2.8.1",
|
|
56
|
-
"http-proxy-middleware": "^0.11.0",
|
|
57
|
-
"inject-loader": "^2.0.1",
|
|
58
|
-
"isparta-loader": "^2.0.0",
|
|
59
|
-
"jasmine-core": "^2.4.1",
|
|
60
|
-
"jquery": "^3.3.1",
|
|
61
|
-
"json-loader": "^0.5.4",
|
|
62
|
-
"karma": "^1.4.1",
|
|
63
|
-
"karma-chrome-launcher": "^2.2.0",
|
|
64
|
-
"karma-coverage": "^1.1.1",
|
|
65
|
-
"karma-mocha": "^1.3.0",
|
|
66
|
-
"karma-sinon-chai": "^1.3.1",
|
|
67
|
-
"karma-sourcemap-loader": "^0.3.7",
|
|
68
|
-
"karma-spec-reporter": "0.0.31",
|
|
69
|
-
"karma-webpack": "^2.0.2",
|
|
70
|
-
"less": "^2.7.3",
|
|
71
|
-
"mkdirp": "^0.5.1",
|
|
72
|
-
"mocha": "^3.2.0",
|
|
73
|
-
"ncp": "^2.0.0",
|
|
74
|
-
"rimraf": "^2.5.0",
|
|
75
|
-
"sale-client": "^1.2.5",
|
|
76
|
-
"selenium-server": "2.52.0",
|
|
77
|
-
"sinon": "^2.1.0",
|
|
78
|
-
"sinon-chai": "^2.8.0",
|
|
79
|
-
"style": "0.0.3",
|
|
80
|
-
"style-loader": "^0.20.3",
|
|
81
|
-
"
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"vue-
|
|
85
|
-
"vue-
|
|
86
|
-
"vue-loader": "^
|
|
87
|
-
"vue-
|
|
88
|
-
"vue-
|
|
89
|
-
"vue-
|
|
90
|
-
"vue-
|
|
91
|
-
"vue-
|
|
92
|
-
"
|
|
93
|
-
"webpack
|
|
94
|
-
"webpack-
|
|
95
|
-
"webpack-
|
|
96
|
-
|
|
97
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "address-client",
|
|
3
|
+
"version": "1.5.25-ezhou",
|
|
4
|
+
"description": "地址管理前台组件",
|
|
5
|
+
"author": "wanbochao",
|
|
6
|
+
"license": "ISC",
|
|
7
|
+
"main": "src/index.js",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"sale"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"unit": "karma start test/unit/karma.conf.js",
|
|
13
|
+
"example": "node build/example-server.js",
|
|
14
|
+
"dev": "node build/dev-server.js",
|
|
15
|
+
"lint": "eslint src/**.js test/e2e/**.js test/unit/specs/** build/**.js",
|
|
16
|
+
"build": "rimraf dist && mkdirp dist && ncp static dist/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prod.conf.js",
|
|
17
|
+
"e2e": "node test/e2e/runner.js",
|
|
18
|
+
"make": "rimraf dist-android && mkdirp dist-android && ncp static dist-android/static && cross-env NODE_ENV=production webpack --progress --hide-modules --config build/webpack.prodandroid.conf.js && publish",
|
|
19
|
+
"release": "bash build/release.sh"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "https://gitee.com/aote/address_management.git"
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"less-loader": "^2.2.3",
|
|
27
|
+
"vue": "^1.0.17"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"babel-core": "^6.0.0",
|
|
31
|
+
"babel-loader": "^6.0.0",
|
|
32
|
+
"babel-plugin-transform-runtime": "^6.0.0",
|
|
33
|
+
"babel-preset-es2015": "^6.0.0",
|
|
34
|
+
"babel-preset-stage-2": "^6.0.0",
|
|
35
|
+
"chai": "^3.5.0",
|
|
36
|
+
"co": "^4.6.0",
|
|
37
|
+
"connect-history-api-fallback": "^1.1.0",
|
|
38
|
+
"cross-env": "^1.0.7",
|
|
39
|
+
"cross-spawn": "^2.1.5",
|
|
40
|
+
"css-loader": "^0.23.0",
|
|
41
|
+
"echarts": "^4.1.0",
|
|
42
|
+
"eslint": "^2.0.0",
|
|
43
|
+
"eslint-config-standard": "^5.1.0",
|
|
44
|
+
"eslint-friendly-formatter": "^1.2.2",
|
|
45
|
+
"eslint-loader": "^1.3.0",
|
|
46
|
+
"eslint-plugin-html": "^1.3.0",
|
|
47
|
+
"eslint-plugin-promise": "^1.0.8",
|
|
48
|
+
"eslint-plugin-standard": "^1.3.2",
|
|
49
|
+
"eslint-plugin-vue": "^0.1.1",
|
|
50
|
+
"eventsource-polyfill": "^0.9.6",
|
|
51
|
+
"express": "^4.13.3",
|
|
52
|
+
"extract-text-webpack-plugin": "^1.0.1",
|
|
53
|
+
"file-loader": "^0.8.4",
|
|
54
|
+
"function-bind": "^1.0.2",
|
|
55
|
+
"html-webpack-plugin": "^2.8.1",
|
|
56
|
+
"http-proxy-middleware": "^0.11.0",
|
|
57
|
+
"inject-loader": "^2.0.1",
|
|
58
|
+
"isparta-loader": "^2.0.0",
|
|
59
|
+
"jasmine-core": "^2.4.1",
|
|
60
|
+
"jquery": "^3.3.1",
|
|
61
|
+
"json-loader": "^0.5.4",
|
|
62
|
+
"karma": "^1.4.1",
|
|
63
|
+
"karma-chrome-launcher": "^2.2.0",
|
|
64
|
+
"karma-coverage": "^1.1.1",
|
|
65
|
+
"karma-mocha": "^1.3.0",
|
|
66
|
+
"karma-sinon-chai": "^1.3.1",
|
|
67
|
+
"karma-sourcemap-loader": "^0.3.7",
|
|
68
|
+
"karma-spec-reporter": "0.0.31",
|
|
69
|
+
"karma-webpack": "^2.0.2",
|
|
70
|
+
"less": "^2.7.3",
|
|
71
|
+
"mkdirp": "^0.5.1",
|
|
72
|
+
"mocha": "^3.2.0",
|
|
73
|
+
"ncp": "^2.0.0",
|
|
74
|
+
"rimraf": "^2.5.0",
|
|
75
|
+
"sale-client": "^1.2.5",
|
|
76
|
+
"selenium-server": "2.52.0",
|
|
77
|
+
"sinon": "^2.1.0",
|
|
78
|
+
"sinon-chai": "^2.8.0",
|
|
79
|
+
"style": "0.0.3",
|
|
80
|
+
"style-loader": "^0.20.3",
|
|
81
|
+
"ldap-clients": "0.5.5-ezhou",
|
|
82
|
+
"system-clients": "1.6.38",
|
|
83
|
+
"url-loader": "^0.5.7",
|
|
84
|
+
"vue-client": "1.22.22-ezhou",
|
|
85
|
+
"vue-hot-reload-api": "^1.2.0",
|
|
86
|
+
"vue-html-loader": "^1.0.0",
|
|
87
|
+
"vue-loader": "^8.2.1",
|
|
88
|
+
"vue-resource": "^1.5.0",
|
|
89
|
+
"vue-router": "^0.7.13",
|
|
90
|
+
"vue-strap": "^1.0.9",
|
|
91
|
+
"vue-style-loader": "^1.0.0",
|
|
92
|
+
"vue-validator": "2.1.7",
|
|
93
|
+
"webpack": "^1.12.2",
|
|
94
|
+
"webpack-dev-middleware": "^1.4.0",
|
|
95
|
+
"webpack-hot-middleware": "^2.6.0",
|
|
96
|
+
"webpack-merge": "^0.8.3"
|
|
97
|
+
}
|
|
98
|
+
}
|
package/src/address.js
CHANGED
|
@@ -41,4 +41,10 @@ export default function () {
|
|
|
41
41
|
Vue.component('user-address', (resolve) => { require(['./components/UserAddress'], resolve) })
|
|
42
42
|
//地址变更记录
|
|
43
43
|
Vue.component('user-address-change', (resolve) => { require(['./components/UserAddressChange'], resolve) })
|
|
44
|
+
//片区列表
|
|
45
|
+
Vue.component('slice-area-list', (resolve) => { require(['./components/SliceAreaList'], resolve) })
|
|
46
|
+
//片区管理(包含修改表具,小区的添加)
|
|
47
|
+
Vue.component('slice-area-manage', (resolve) => { require(['./components/SliceAreaManage'], resolve) })
|
|
48
|
+
//片区添加
|
|
49
|
+
Vue.component('slice-add-area-msg', (resolve) => { require(['./components/SliceAddAreaMsg'], resolve) })
|
|
44
50
|
}
|
|
@@ -23,28 +23,32 @@
|
|
|
23
23
|
</v-select>
|
|
24
24
|
</div>
|
|
25
25
|
</div>
|
|
26
|
+
<div class="col-sm-6 form-group form-input-group" :class="[$v.f_slice_area_id.required ? 'has-error' : 'has-success']" >
|
|
27
|
+
<label class="control-label">片区</label>
|
|
28
|
+
<div class="col-sm-4">
|
|
29
|
+
<input type="text" v-show="false" v-model="$refs.f_slice_area_id.selectedItems"
|
|
30
|
+
v-validate:f_slice_area_id='{required: true }'>
|
|
31
|
+
<v-select :value.sync="areamodel.f_slice_area_id" :value-single="true"
|
|
32
|
+
v-model="areamodel.f_slice_area_id" v-ref:f_slice_area_id
|
|
33
|
+
:options='sliceArea' placeholder='片区/管理站'
|
|
34
|
+
close-on-select @change="areaChange">
|
|
35
|
+
</v-select>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
26
38
|
<div class="col-sm-6 form-group form-input-group"
|
|
27
39
|
:class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
|
|
28
40
|
<label class="control-label">街道名称</label>
|
|
29
41
|
<div class="col-sm-4">
|
|
30
|
-
<input type="text" v-show="false" v-model="
|
|
42
|
+
<input type="text" v-show="false" v-model="$refs.f_street_id.selectedItems"
|
|
31
43
|
v-validate:f_street_id='{required: true }'>
|
|
32
44
|
<v-select
|
|
33
45
|
:value.sync="areamodel.f_street_id" :value-single="true"
|
|
34
|
-
:options='streetslist' placeholder='请选择'
|
|
35
|
-
close-on-select search="true"
|
|
36
|
-
</v-select>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="col-sm-6 form-group form-input-group">
|
|
40
|
-
<label class="control-label">片区</label>
|
|
41
|
-
<div class="col-sm-4">
|
|
42
|
-
<v-select :value.sync="areamodel.f_slice_area" :value-single="true"
|
|
43
|
-
:options='sliceArea' placeholder='片区/管理站'
|
|
44
|
-
close-on-select>
|
|
46
|
+
:options='streetslist' placeholder='请选择' v-ref:f_street_id
|
|
47
|
+
close-on-select search="true">
|
|
45
48
|
</v-select>
|
|
46
49
|
</div>
|
|
47
50
|
</div>
|
|
51
|
+
|
|
48
52
|
<!--小区(特殊)信息-->
|
|
49
53
|
<div v-if="!f_special"
|
|
50
54
|
class="col-sm-6 form-group form-input-group"
|
|
@@ -246,10 +250,13 @@
|
|
|
246
250
|
pcdslist:[],
|
|
247
251
|
//初始化街道数据
|
|
248
252
|
streetslist:[],
|
|
253
|
+
//初始化片区
|
|
254
|
+
sliceArea:[],
|
|
249
255
|
//小区
|
|
250
256
|
areamodel: {
|
|
251
257
|
f_pcd_id:'',
|
|
252
258
|
f_linkname:'',
|
|
259
|
+
f_slice_area_id:'',
|
|
253
260
|
f_linkphone:'',
|
|
254
261
|
f_street_id:'',
|
|
255
262
|
f_slice_area:'',
|
|
@@ -299,6 +306,32 @@
|
|
|
299
306
|
//this.$emit('ready')
|
|
300
307
|
})
|
|
301
308
|
},
|
|
309
|
+
//初始化片区 添加小区
|
|
310
|
+
initslicearea(pconditon){
|
|
311
|
+
console.log("片区准备")
|
|
312
|
+
let HttpReset = new HttpResetClass()
|
|
313
|
+
|
|
314
|
+
HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
315
|
+
data: {
|
|
316
|
+
items: '*',
|
|
317
|
+
tablename: 't_slicearea',
|
|
318
|
+
orderitem: 'id',
|
|
319
|
+
condition: pconditon
|
|
320
|
+
}
|
|
321
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
|
|
322
|
+
let redata = []
|
|
323
|
+
req.data.forEach((row, n) => {
|
|
324
|
+
redata[n] = {
|
|
325
|
+
label: row.f_slice_area,
|
|
326
|
+
value: row.id,
|
|
327
|
+
data:row,
|
|
328
|
+
id:row.id
|
|
329
|
+
}
|
|
330
|
+
})
|
|
331
|
+
this.sliceArea=redata
|
|
332
|
+
//this.$emit('ready')
|
|
333
|
+
})
|
|
334
|
+
},
|
|
302
335
|
//初始化街道 添加小区
|
|
303
336
|
initstreets(pconditon){
|
|
304
337
|
console.log("街道数据准备")
|
|
@@ -338,33 +371,35 @@
|
|
|
338
371
|
initdata(){
|
|
339
372
|
console.log('areatype是....',this.areatype)
|
|
340
373
|
this.initpcds(` f_filialeids = '${this.f_filialeids}'`)
|
|
374
|
+
this.initslicearea(` f_filialeids = '${this.f_filialeids}'`)
|
|
341
375
|
this.initstreets(` f_filialeids = '${this.f_filialeids}'`)
|
|
376
|
+
|
|
342
377
|
},
|
|
343
|
-
|
|
344
|
-
pcdChange(val){
|
|
345
|
-
console.log("省/市/区变化",val)
|
|
378
|
+
areaChange(val){
|
|
346
379
|
if(val&&this.operation=='add'){
|
|
347
|
-
|
|
348
|
-
this.initstreets(` f_filialeids = '${this.f_filialeids}' and f_pcd_id ='${val}' `)
|
|
349
|
-
if(this.areamodel.f_street_id){
|
|
350
|
-
let pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
|
|
351
|
-
if(pcd_id!=val){
|
|
352
|
-
this.areamodel.f_street_id=''
|
|
353
|
-
}
|
|
354
|
-
}
|
|
380
|
+
this.areamodel.f_street_id=''
|
|
355
381
|
}
|
|
356
382
|
this.$resetValidation()
|
|
383
|
+
let pconditon = `f_pcd_id = '${this.areamodel.f_pcd_id}' and f_slice_area_id = '${this.areamodel.f_slice_area_id}' `
|
|
384
|
+
this.initstreets(pconditon)
|
|
385
|
+
},
|
|
386
|
+
//省/市/区变化
|
|
387
|
+
|
|
388
|
+
pcdChange(val){
|
|
389
|
+
this.$resetValidation()
|
|
390
|
+
let pconditon = `f_pcd_id = '${this.areamodel.f_pcd_id}' `
|
|
391
|
+
//初始化片区
|
|
392
|
+
this.initslicearea(pconditon)
|
|
393
|
+
|
|
394
|
+
//重置街道
|
|
395
|
+
if(this.operation==='add'){
|
|
396
|
+
this.streetslist = []
|
|
397
|
+
this.areamodel.f_street_id = null
|
|
398
|
+
}
|
|
357
399
|
},
|
|
358
400
|
//街道变化
|
|
359
401
|
streetChange(val){
|
|
360
|
-
console.log("街道变化",val)
|
|
361
|
-
if(val&&this.operation=='add'){
|
|
362
|
-
if(this.areamodel.f_pcd_id.length==0){
|
|
363
|
-
this.areamodel.f_pcd_id=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_pcd_id
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
402
|
|
|
367
|
-
this.$resetValidation()
|
|
368
403
|
},
|
|
369
404
|
//保存
|
|
370
405
|
confirm(){
|
|
@@ -384,6 +419,7 @@
|
|
|
384
419
|
this.areamodel.f_filialeids =this.$login.f.f_orgids
|
|
385
420
|
this.areamodel.f_pcd=this.findbyid(this.pcdslist,this.areamodel.f_pcd_id).f_pcd
|
|
386
421
|
this.areamodel.f_street=this.findbyid(this.streetslist,this.areamodel.f_street_id).f_street
|
|
422
|
+
this.areamodel.f_slice_area = this.findbyid(this.sliceArea,this.areamodel.f_slice_area_id).f_slice_area
|
|
387
423
|
let result = this.$resetpost('rs/logic/address_updatearea', this.areamodel)
|
|
388
424
|
},
|
|
389
425
|
cleardara(){
|
|
@@ -391,6 +427,7 @@
|
|
|
391
427
|
f_pcd_id:'',
|
|
392
428
|
f_street_id:'',
|
|
393
429
|
f_slice_area:'',
|
|
430
|
+
f_slice_area_id:'',
|
|
394
431
|
f_linkname:'',
|
|
395
432
|
f_linkphone:'',
|
|
396
433
|
f_adjustable_id:'',
|
|
@@ -414,13 +451,13 @@
|
|
|
414
451
|
'areatype'(){
|
|
415
452
|
this.initdata()
|
|
416
453
|
},
|
|
417
|
-
'areamodel.f_pcd_id'(){
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
},
|
|
454
|
+
// 'areamodel.f_pcd_id'(){
|
|
455
|
+
// if(this.areamodel.f_pcd_id&&this.areamodel.f_street_id){
|
|
456
|
+
// this.areamodel.f_area_address = this.findbyid(this.pcdslist,this.areamodel.f_pcd_id).f_pcd+this.findbyid(this.streetslist,this.areamodel.f_street_id).f_street
|
|
457
|
+
// }
|
|
458
|
+
// },
|
|
422
459
|
'areamodel.f_street_id'(){
|
|
423
|
-
if(this.areamodel.f_pcd_id&&this.areamodel.f_street_id) {
|
|
460
|
+
if(this.areamodel.f_pcd_id&&this.areamodel.f_street_id && this.operation==='add') {
|
|
424
461
|
this.areamodel.f_area_address = this.findbyid(this.pcdslist, this.areamodel.f_pcd_id).f_pcd + this.findbyid(this.streetslist, this.areamodel.f_street_id).f_street
|
|
425
462
|
}
|
|
426
463
|
},
|
|
@@ -498,17 +535,6 @@
|
|
|
498
535
|
})
|
|
499
536
|
return [{label: '全部', value: ''}, ...arr]
|
|
500
537
|
},
|
|
501
|
-
sliceArea () {
|
|
502
|
-
let rs = new Array()
|
|
503
|
-
for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
|
|
504
|
-
let temp = {
|
|
505
|
-
label: this.$login.f.f_allArea[i].label,
|
|
506
|
-
value: this.$login.f.f_allArea[i].label
|
|
507
|
-
}
|
|
508
|
-
rs.push(temp)
|
|
509
|
-
}
|
|
510
|
-
return rs
|
|
511
|
-
},
|
|
512
538
|
inputtores () {
|
|
513
539
|
// 获取抄表员
|
|
514
540
|
let rs = new Array()
|
|
@@ -51,12 +51,14 @@
|
|
|
51
51
|
</v-select>
|
|
52
52
|
</div>
|
|
53
53
|
</div>
|
|
54
|
-
<div class="col-sm-6 form-group form-input-group">
|
|
54
|
+
<div class="col-sm-6 form-group form-input-group" :class="[$v.f_slice_area_id.required ? 'has-error' : 'has-success']">
|
|
55
55
|
<label class="control-label">片区</label>
|
|
56
56
|
<div class="col-sm-4">
|
|
57
|
-
<v-
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
<input type="text" v-show="false" v-model="$refs.f_slice_area_id.selectedItems"
|
|
58
|
+
v-validate:f_slice_area_id='{required: true }'>
|
|
59
|
+
<v-select :value.sync="streetmodel.f_slice_area_id" :value-single="true"
|
|
60
|
+
:options='sliceArea' placeholder='片区/管理站'
|
|
61
|
+
close-on-select v-ref:f_slice_area_id>
|
|
60
62
|
</v-select>
|
|
61
63
|
</div>
|
|
62
64
|
</div>
|
|
@@ -86,6 +88,7 @@
|
|
|
86
88
|
return {
|
|
87
89
|
//初始化省市区数据
|
|
88
90
|
pcdslist:[],
|
|
91
|
+
sliceArea:[],
|
|
89
92
|
//省市区
|
|
90
93
|
pcdmodel: {
|
|
91
94
|
f_province:'',
|
|
@@ -96,6 +99,7 @@
|
|
|
96
99
|
streetmodel: {
|
|
97
100
|
f_pcd_id:'',
|
|
98
101
|
f_street_id:'',
|
|
102
|
+
f_slice_area_id:'',
|
|
99
103
|
f_slice_area:'',
|
|
100
104
|
f_adjustable_id:'',
|
|
101
105
|
f_street:'',
|
|
@@ -142,6 +146,32 @@
|
|
|
142
146
|
})
|
|
143
147
|
return result
|
|
144
148
|
},
|
|
149
|
+
//初始化片区 添加小区
|
|
150
|
+
initslicearea(){
|
|
151
|
+
console.log("片区准备")
|
|
152
|
+
let HttpReset = new HttpResetClass()
|
|
153
|
+
let pconditon = `f_pcd_id = '${this.streetmodel.f_pcd_id}' `
|
|
154
|
+
HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
155
|
+
data: {
|
|
156
|
+
items: '*',
|
|
157
|
+
tablename: 't_slicearea',
|
|
158
|
+
orderitem: 'id',
|
|
159
|
+
condition: pconditon
|
|
160
|
+
}
|
|
161
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
|
|
162
|
+
let redata = []
|
|
163
|
+
req.data.forEach((row, n) => {
|
|
164
|
+
redata[n] = {
|
|
165
|
+
label: row.f_slice_area,
|
|
166
|
+
value: row.id,
|
|
167
|
+
data:row,
|
|
168
|
+
id:row.id
|
|
169
|
+
}
|
|
170
|
+
})
|
|
171
|
+
this.sliceArea=redata
|
|
172
|
+
//this.$emit('ready')
|
|
173
|
+
})
|
|
174
|
+
},
|
|
145
175
|
//初始化数据
|
|
146
176
|
initdata(){
|
|
147
177
|
console.log('areatype是....',this.areatype)
|
|
@@ -156,6 +186,10 @@
|
|
|
156
186
|
//省/市/区变化
|
|
157
187
|
pcdChange(val){
|
|
158
188
|
console.log("省/市/区变化",val)
|
|
189
|
+
this.initslicearea()
|
|
190
|
+
if(this.operation==='add'){
|
|
191
|
+
this.streetmodel.f_slice_area_id = ''
|
|
192
|
+
}
|
|
159
193
|
this.$resetValidation()
|
|
160
194
|
},
|
|
161
195
|
//保存
|
|
@@ -189,8 +223,10 @@
|
|
|
189
223
|
this.streetmodel.f_outlets = this.$login.f.f_parentname
|
|
190
224
|
this.streetmodel.f_orgstr = this.$login.f.orgpathstr
|
|
191
225
|
this.streetmodel.f_filialeids =this.$login.f.f_orgids
|
|
226
|
+
|
|
192
227
|
}
|
|
193
228
|
this.streetmodel.f_pcd=this.findbyid(this.pcdslist,this.streetmodel.f_pcd_id).f_pcd
|
|
229
|
+
this.streetmodel.f_slice_area = this.findbyid(this.sliceArea,this.streetmodel.f_slice_area_id).f_slice_area
|
|
194
230
|
let result = this.$resetpost('rs/logic/address_updatestreet', this.streetmodel)
|
|
195
231
|
},
|
|
196
232
|
cancel(){
|
|
@@ -206,6 +242,7 @@
|
|
|
206
242
|
this.streetmodel = {
|
|
207
243
|
f_pcd_id: '',
|
|
208
244
|
f_slice_area: '',
|
|
245
|
+
f_slice_area_id: '',
|
|
209
246
|
f_adjustable_id: '',
|
|
210
247
|
f_street: ''
|
|
211
248
|
}
|
|
@@ -221,17 +258,17 @@
|
|
|
221
258
|
},
|
|
222
259
|
computed: {
|
|
223
260
|
// 片区处理
|
|
224
|
-
sliceArea () {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
}
|
|
261
|
+
// sliceArea () {
|
|
262
|
+
// let rs = new Array()
|
|
263
|
+
// for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
|
|
264
|
+
// let temp = {
|
|
265
|
+
// label: this.$login.f.f_allArea[i].label,
|
|
266
|
+
// value: this.$login.f.f_allArea[i].label
|
|
267
|
+
// }
|
|
268
|
+
// rs.push(temp)
|
|
269
|
+
// }
|
|
270
|
+
// return rs
|
|
271
|
+
// }
|
|
235
272
|
}
|
|
236
273
|
}
|
|
237
274
|
</script>
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="span">
|
|
3
|
+
<validator name='v'>
|
|
4
|
+
<div class="auto select-overspread form-horizontal">
|
|
5
|
+
<div class="row auto">
|
|
6
|
+
<div class="col-sm-12 bg-info text-center" style="padding: 8px;font-size: 18px;font-weight: bold">
|
|
7
|
+
<span v-if="operation=='add'">添加{{areatype}}</span>
|
|
8
|
+
<span v-if="operation=='modify'">修改【{{areamodel.f_slice_area}}】片区</span>
|
|
9
|
+
</div>
|
|
10
|
+
<!--基本小区(单位)信息-->
|
|
11
|
+
<div
|
|
12
|
+
class="col-sm-6 form-group form-input-group"
|
|
13
|
+
:class="[$v.f_slice_id.required ? 'has-error' : 'has-success']">
|
|
14
|
+
<label class="control-label">片区编号</label>
|
|
15
|
+
<div class="col-sm-4">
|
|
16
|
+
<input type="text" v-model="areamodel.f_slice_id"
|
|
17
|
+
class="form-control" placeholder="片区编号"
|
|
18
|
+
v-validate:f_slice_id='{required: true }'>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div
|
|
22
|
+
class="col-sm-6 form-group form-input-group"
|
|
23
|
+
:class="[$v.f_slice_area.required ? 'has-error' : 'has-success']">
|
|
24
|
+
<label class="control-label">片区名称</label>
|
|
25
|
+
<div class="col-sm-4">
|
|
26
|
+
<input type="text" v-model="areamodel.f_slice_area"
|
|
27
|
+
class="form-control" placeholder="片区名称"
|
|
28
|
+
v-validate:f_slice_area='{required: true }'>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="col-sm-6 form-group form-input-group"
|
|
32
|
+
:class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
|
|
33
|
+
<label class="control-label">省市区</label>
|
|
34
|
+
<div class="col-sm-4">
|
|
35
|
+
<input type="text" v-show="false" v-model="areamodel.f_pcd_id"
|
|
36
|
+
v-validate:f_pcd_id='{required: true }'>
|
|
37
|
+
<v-select
|
|
38
|
+
:value.sync="areamodel.f_pcd_id" :value-single="true"
|
|
39
|
+
:options='pcdslist' placeholder='请选择'
|
|
40
|
+
close-on-select search="true" >
|
|
41
|
+
</v-select>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
<div class="col-sm-12 form-group form-input-group"
|
|
45
|
+
>
|
|
46
|
+
<label class="control-label">详细地址</label>
|
|
47
|
+
<div class="col-sm-10">
|
|
48
|
+
<input type="text" v-model="areamodel.f_slice_address"
|
|
49
|
+
class="form-control" >
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
<div class="col-sm-6 form-group form-input-group">
|
|
53
|
+
<label class="control-label">片区类型</label>
|
|
54
|
+
<div class="col-sm-4">
|
|
55
|
+
<v-select :value.sync="areamodel.f_slice_type" :value-single="true"
|
|
56
|
+
:options='sliceArea' placeholder='片区类型'
|
|
57
|
+
close-on-select>
|
|
58
|
+
</v-select>
|
|
59
|
+
</div>
|
|
60
|
+
</div>
|
|
61
|
+
<div class="col-sm-6 form-group form-input-group">
|
|
62
|
+
<label class="control-label">片区长</label>
|
|
63
|
+
<div class="col-sm-4">
|
|
64
|
+
<v-select :value.sync="areamodel.f_slice_master" :value-single="true"
|
|
65
|
+
v-model="areamodel.f_slice_master"
|
|
66
|
+
:options='sliceAreaMaster' placeholder='片区长'
|
|
67
|
+
close-on-select>
|
|
68
|
+
</v-select>
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div
|
|
72
|
+
class="col-sm-6 form-group form-input-group"
|
|
73
|
+
:class="[$v.f_link_phone.required ? 'has-error' : 'has-success']">
|
|
74
|
+
<label class="control-label">联系电话</label>
|
|
75
|
+
<div class="col-sm-4">
|
|
76
|
+
<input type="text" v-model="areamodel.f_link_phone"
|
|
77
|
+
class="form-control" placeholder="联系电话"
|
|
78
|
+
v-validate:f_link_phone='{required: true }'>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
<div class="row" style="margin-top:5px;">
|
|
82
|
+
<div class="col-sm-12 form-input-group">
|
|
83
|
+
<label for="f_curbalance" class="col-sm-2 control-label">片区详情:</label>
|
|
84
|
+
<textarea class="form-control" rows="3" v-model="areamodel.f_slice_msg" ></textarea>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
<div class="col-sm-6" style="text-align:right;">
|
|
90
|
+
<button class="btn btn-default fr" @click="cancel()">取消</button>
|
|
91
|
+
<button class="btn btn-success fr" @click="confirm()" :disabled='!$v.valid'>保存</button>
|
|
92
|
+
</div>
|
|
93
|
+
</div>
|
|
94
|
+
</div>
|
|
95
|
+
</validator>
|
|
96
|
+
</div>
|
|
97
|
+
</template>
|
|
98
|
+
|
|
99
|
+
<script>
|
|
100
|
+
import {HttpResetClass} from 'vue-client'
|
|
101
|
+
import Vue from 'vue'
|
|
102
|
+
|
|
103
|
+
export default {
|
|
104
|
+
title: '小区添加',
|
|
105
|
+
data () {
|
|
106
|
+
return {
|
|
107
|
+
//初始化省市区数据
|
|
108
|
+
pcdslist:[],
|
|
109
|
+
sliceAreaMaster:[],
|
|
110
|
+
//初始化街道数据
|
|
111
|
+
streetslist:[],
|
|
112
|
+
//小区
|
|
113
|
+
areamodel: {
|
|
114
|
+
f_slice_id:'',
|
|
115
|
+
f_slice_name:'',
|
|
116
|
+
f_pcd_id:'',
|
|
117
|
+
f_link_phone:'',
|
|
118
|
+
f_street_id:'',
|
|
119
|
+
f_slice_area:'',
|
|
120
|
+
f_slice_master:'',
|
|
121
|
+
f_slice_type:'',
|
|
122
|
+
f_slice_msg:'',
|
|
123
|
+
f_slice_address:'',
|
|
124
|
+
f_operator:''
|
|
125
|
+
},
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
props: ['f_filialeids','f_special', 'areatype','row','operation'],
|
|
129
|
+
ready(){
|
|
130
|
+
this.initdata()
|
|
131
|
+
},
|
|
132
|
+
init(){
|
|
133
|
+
this.$LoadParams.loadParam()
|
|
134
|
+
},
|
|
135
|
+
methods: {
|
|
136
|
+
//初始化省市区,添加街道
|
|
137
|
+
initpcds(pconditon){
|
|
138
|
+
console.log("省市区准备")
|
|
139
|
+
let HttpReset = new HttpResetClass()
|
|
140
|
+
HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
141
|
+
data: {
|
|
142
|
+
items: '*',
|
|
143
|
+
tablename: 't_pcd',
|
|
144
|
+
orderitem: 'id',
|
|
145
|
+
condition: pconditon
|
|
146
|
+
}
|
|
147
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
|
|
148
|
+
let redata = []
|
|
149
|
+
req.data.forEach((row, n) => {
|
|
150
|
+
redata[n] = {
|
|
151
|
+
label: row.f_pcd,
|
|
152
|
+
value: row.id,
|
|
153
|
+
data:row,
|
|
154
|
+
id:row.id
|
|
155
|
+
}
|
|
156
|
+
})
|
|
157
|
+
this.pcdslist=redata
|
|
158
|
+
//this.$emit('ready')
|
|
159
|
+
})
|
|
160
|
+
},
|
|
161
|
+
//根据名字找数据
|
|
162
|
+
findbyid(list,name){
|
|
163
|
+
var result
|
|
164
|
+
list.forEach((row, n) => {
|
|
165
|
+
if(name==row.id){
|
|
166
|
+
result= row.data
|
|
167
|
+
}
|
|
168
|
+
})
|
|
169
|
+
return result
|
|
170
|
+
},
|
|
171
|
+
//初始化数据
|
|
172
|
+
initdata(){
|
|
173
|
+
console.log('areatype是....',this.areatype)
|
|
174
|
+
this.initpcds(` f_filialeids = '${this.f_filialeids}'`)
|
|
175
|
+
this.getAreaMaster()
|
|
176
|
+
},
|
|
177
|
+
async getAreaMaster(){
|
|
178
|
+
let getGasman = await Vue.resetpost('/rs/search', {
|
|
179
|
+
source: 'this.getParentByType($organization$).getChildByName($片区长$).getUsers()',
|
|
180
|
+
userid: Vue.$login.f.id
|
|
181
|
+
}, {resolveMsg: null, rejectMsg: null})
|
|
182
|
+
let gasman = []
|
|
183
|
+
for (let i = 0; i < getGasman.data.length; i++) {
|
|
184
|
+
|
|
185
|
+
let msg = {label:getGasman.data[i].name,value:getGasman.data[i].name}
|
|
186
|
+
gasman.push(msg)
|
|
187
|
+
}
|
|
188
|
+
this.sliceAreaMaster = gasman
|
|
189
|
+
},
|
|
190
|
+
//保存
|
|
191
|
+
confirm(){
|
|
192
|
+
this.savearea()
|
|
193
|
+
this.cleardara()
|
|
194
|
+
this.$dispatch('confirm')
|
|
195
|
+
},
|
|
196
|
+
//保存小区
|
|
197
|
+
savearea(){
|
|
198
|
+
this.areamodel.f_operator= this.$login.f.name
|
|
199
|
+
this.areamodel.f_filiale = this.$login.f.f_fengongsi
|
|
200
|
+
this.areamodel.f_outlets = this.$login.f.f_parentname
|
|
201
|
+
this.areamodel.f_orgstr = this.$login.f.orgpathstr
|
|
202
|
+
this.areamodel.f_filialeids =this.$login.f.f_orgids
|
|
203
|
+
this.areamodel.f_pcd=this.findbyid(this.pcdslist,this.areamodel.f_pcd_id).f_pcd
|
|
204
|
+
let result = this.$resetpost('rs/logic/address_updateslicearea', this.areamodel)
|
|
205
|
+
},
|
|
206
|
+
cleardara(){
|
|
207
|
+
this.areamodel= {
|
|
208
|
+
f_slice_id:'',
|
|
209
|
+
f_slice_name:'',
|
|
210
|
+
f_pcd_id:'',
|
|
211
|
+
f_link_phone:'',
|
|
212
|
+
f_slice_address:'',
|
|
213
|
+
f_street_id:'',
|
|
214
|
+
f_slice_area:'',
|
|
215
|
+
f_slice_master:'',
|
|
216
|
+
f_slice_type:'',
|
|
217
|
+
f_slice_msg:'',
|
|
218
|
+
f_operator:''
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
cancel(){
|
|
222
|
+
this.cleardara()
|
|
223
|
+
this.$dispatch('cancel')
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
watch: {
|
|
227
|
+
'areatype'(){
|
|
228
|
+
this.initdata()
|
|
229
|
+
},
|
|
230
|
+
'areamodel.f_pcd_id'(){
|
|
231
|
+
if(this.areamodel.f_pcd_id&&this.areamodel.f_street_id){
|
|
232
|
+
this.areamodel.f_slice_address = this.findbyid(this.pcdslist,this.areamodel.f_pcd_id).f_pcd+this.findbyid(this.streetslist,this.areamodel.f_street_id).f_street
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
'areamodel.f_street_id'(){
|
|
236
|
+
if(this.areamodel.f_pcd_id&&this.areamodel.f_street_id) {
|
|
237
|
+
this.areamodel.f_slice_address = this.findbyid(this.pcdslist, this.areamodel.f_pcd_id).f_pcd + this.findbyid(this.streetslist, this.areamodel.f_street_id).f_street
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
'f_filialeids'(){
|
|
241
|
+
this.initdata()
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
computed: {
|
|
245
|
+
sliceArea () {
|
|
246
|
+
return this.$appdata.getParam('片区类型')
|
|
247
|
+
},
|
|
248
|
+
inputtores () {
|
|
249
|
+
// 获取抄表员
|
|
250
|
+
let rs = new Array()
|
|
251
|
+
if (this.$login.f.f_gasman.length > 0) {
|
|
252
|
+
for (let i = 0; i < this.$login.f.f_gasman.length; i++) {
|
|
253
|
+
let temp = {
|
|
254
|
+
label: this.$login.f.f_gasman[i].name,
|
|
255
|
+
value: this.$login.f.f_gasman[i].name
|
|
256
|
+
}
|
|
257
|
+
rs.push(temp)
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
return rs
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
}
|
|
264
|
+
</script>
|
|
265
|
+
<style>
|
|
266
|
+
.box {
|
|
267
|
+
width: 727px;
|
|
268
|
+
height: 175px;
|
|
269
|
+
border-radius: 2px;
|
|
270
|
+
background-color: #fafafa;
|
|
271
|
+
border: 1px solid #999999;
|
|
272
|
+
margin-top: 13px;
|
|
273
|
+
}
|
|
274
|
+
.datapanel {
|
|
275
|
+
color: #333;
|
|
276
|
+
background-color: white;
|
|
277
|
+
box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
|
|
278
|
+
padding: 10px 30px 10px 30px;
|
|
279
|
+
border-radius:15px;
|
|
280
|
+
}
|
|
281
|
+
</style>
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex">
|
|
3
|
+
<criteria-paged :model="model" v-ref:paged>
|
|
4
|
+
<criteria partial='criteria' @condition-changed='$parent.search' v-ref:cri>
|
|
5
|
+
<div novalidate class="form-inline auto" partial>
|
|
6
|
+
<div class="form-group form-input-group">
|
|
7
|
+
<right-tree
|
|
8
|
+
:userid.sync='$parent.$parent.userid'
|
|
9
|
+
:source.sync='$parent.$parent.source'
|
|
10
|
+
@re-res="$parent.$parent.getRes"></right-tree>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="form-group form-input-group">
|
|
13
|
+
<input type="text" class="form-control" v-model="model.f_province"
|
|
14
|
+
condition="f_province like '%{}%'" placeholder="省份"
|
|
15
|
+
:size="model.f_province ? model.f_province.length*2 : 2"/>
|
|
16
|
+
</div>
|
|
17
|
+
<div class="form-group form-input-group">
|
|
18
|
+
<input type="text" class="form-control" v-model="model.f_city"
|
|
19
|
+
condition="f_city like '%{}%'" placeholder="城市"
|
|
20
|
+
:size="model.f_city ? model.f_city.length*2 : 2"/>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="form-group form-input-group">
|
|
23
|
+
<input type="text" class="form-control" v-model="model.f_district"
|
|
24
|
+
condition="f_district like '%{}%'" placeholder="区县"
|
|
25
|
+
:size="model.f_district ? model.f_district.length*2 : 2"/>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="form-group form-input-group">
|
|
28
|
+
<button class="btn btn-success width-80" @click="search()" >查询</button>
|
|
29
|
+
<button v-if="!$parent.$parent.f_special" class="btn btn-success width-80" @click="$parent.$parent.add('片区')">添加</button>
|
|
30
|
+
<button class="btn btn-success width-80" @click="$parent.$parent.clear()">清空</button>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</criteria>
|
|
34
|
+
<data-grid :model="model" partial='list' v-ref:grid>
|
|
35
|
+
<template partial='head'>
|
|
36
|
+
<tr>
|
|
37
|
+
<th><nobr>id</nobr></th>
|
|
38
|
+
<th><nobr>片区编号</nobr></th>
|
|
39
|
+
<th><nobr>片区名称</nobr></th>
|
|
40
|
+
<th><nobr>片区地址</nobr></th>
|
|
41
|
+
<th><nobr>片区区长</nobr></th>
|
|
42
|
+
<th><nobr>操作人</nobr></th>
|
|
43
|
+
<th><nobr>操作日期</nobr></th>
|
|
44
|
+
<th><nobr>操作</nobr></th>
|
|
45
|
+
</tr>
|
|
46
|
+
</template>
|
|
47
|
+
<template partial='body'>
|
|
48
|
+
<tr>
|
|
49
|
+
<td style="text-align:center"><nobr>{{row.id}}</nobr></td>
|
|
50
|
+
<td style="text-align:center"><nobr>{{row.f_slice_id}}</nobr></td>
|
|
51
|
+
<td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
|
|
52
|
+
<td style="text-align:center"><nobr>{{row.f_slice_address}}</nobr></td>
|
|
53
|
+
<td style="text-align:center"><nobr>{{row.f_slice_master}}</nobr></td>
|
|
54
|
+
<td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
|
|
55
|
+
<td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
|
|
56
|
+
<td style="text-align:center">
|
|
57
|
+
<button type="button" name="button" class="btn btn-danger" style="padding: 5px 12px"
|
|
58
|
+
@click.stop="$parent.$parent.$parent.delete(row)">删除</button>
|
|
59
|
+
</td>
|
|
60
|
+
</tr>
|
|
61
|
+
</template>
|
|
62
|
+
<template partial='foot'></template>
|
|
63
|
+
</data-grid>
|
|
64
|
+
</criteria-paged>
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script>
|
|
69
|
+
import { PagedList } from 'vue-client'
|
|
70
|
+
|
|
71
|
+
export default {
|
|
72
|
+
data () {
|
|
73
|
+
return {
|
|
74
|
+
model: new PagedList('rs/sql/address_getslicearealist',20),
|
|
75
|
+
userid: this.$login.f.id,
|
|
76
|
+
source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
|
|
77
|
+
addflag: false,
|
|
78
|
+
jurisdiction: this.$login.r,
|
|
79
|
+
addtitle:''
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
title: '小区管理',
|
|
83
|
+
props:{
|
|
84
|
+
f_filialeids:{
|
|
85
|
+
type: String
|
|
86
|
+
},
|
|
87
|
+
f_special:{
|
|
88
|
+
type: String
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
ready(){
|
|
92
|
+
|
|
93
|
+
},
|
|
94
|
+
methods: {
|
|
95
|
+
async delete(row){
|
|
96
|
+
if(row.id){
|
|
97
|
+
var id = row.id
|
|
98
|
+
let useraredss = await this.$resetpost('rs/sql/address_singleTable',
|
|
99
|
+
{data: {
|
|
100
|
+
items: 'f_slice_area_id',
|
|
101
|
+
tablename: 't_user_address',
|
|
102
|
+
condition: `f_slice_area_id='${id}'`}
|
|
103
|
+
},
|
|
104
|
+
{resolveMsg: null, rejectMsg: null})
|
|
105
|
+
if(useraredss.data.length>0){
|
|
106
|
+
this.$showAlert('该片区下已有地址信息,无法删除!','warning',1000)
|
|
107
|
+
}else{
|
|
108
|
+
this.$resetdelete('rs/entity/t_slicearea', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
109
|
+
this.$dispatch('cancel')
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
add(val){
|
|
115
|
+
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
116
|
+
this.$dispatch('add')
|
|
117
|
+
},
|
|
118
|
+
modify(val){
|
|
119
|
+
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
120
|
+
this.$dispatch('modify',val)
|
|
121
|
+
},
|
|
122
|
+
search (args) {
|
|
123
|
+
if(this.f_special){
|
|
124
|
+
args.condition = `${args.condition} and s.f_filiale='1' and s.f_filialeids = '${this.f_filialeids}'`
|
|
125
|
+
}else{
|
|
126
|
+
args.condition = `${args.condition} and s.f_filialeids = '${this.f_filialeids}'`
|
|
127
|
+
}
|
|
128
|
+
this.model.search(args.condition, args.model)
|
|
129
|
+
},
|
|
130
|
+
//清空
|
|
131
|
+
clear(){
|
|
132
|
+
this.$refs.paged.$refs.cri.model = {}
|
|
133
|
+
},
|
|
134
|
+
getRes (obj) {
|
|
135
|
+
console.log(obj,'选择到公司')
|
|
136
|
+
this.f_filialeids = obj.resids
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
watch:{
|
|
140
|
+
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
}
|
|
144
|
+
</script>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="unit" class="flex-row">
|
|
3
|
+
<div class="flex" style="flex: 1; width:60%">
|
|
4
|
+
<slice-area-list @select-changed="selected" v-ref:arealist :f_filialeids.sync="f_filialeids"></slice-area-list>
|
|
5
|
+
</div>
|
|
6
|
+
<div v-show="areaShow" style="width: 40%">
|
|
7
|
+
<div class="flex">
|
|
8
|
+
<slice-add-area-msg v-ref:sliceaddareamsg :areatype="areatype" :operation="operation"
|
|
9
|
+
:f_filialeids.sync="f_filialeids" :row="arearow"></slice-add-area-msg>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
export default {
|
|
17
|
+
title: '片区管理',
|
|
18
|
+
components:{
|
|
19
|
+
},
|
|
20
|
+
data () {
|
|
21
|
+
return {
|
|
22
|
+
//分公司id串
|
|
23
|
+
f_filialeids: this.$login.f.f_orgids,
|
|
24
|
+
areaShow:false,
|
|
25
|
+
areatype:'小区',
|
|
26
|
+
arearow:{},
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
ready(){
|
|
30
|
+
},
|
|
31
|
+
props:{
|
|
32
|
+
|
|
33
|
+
},
|
|
34
|
+
methods:{
|
|
35
|
+
selected(obj){
|
|
36
|
+
if(obj.val&&obj.val.id){
|
|
37
|
+
this.areaShow=true
|
|
38
|
+
this.$refs.sliceaddareamsg.cleardara()
|
|
39
|
+
this.$refs.sliceaddareamsg.operation='modify'
|
|
40
|
+
this.$refs.sliceaddareamsg.areatype='片区'
|
|
41
|
+
this.$refs.sliceaddareamsg.areamodel=Object.assign({},obj.val)
|
|
42
|
+
this.$refs.sliceaddareamsg.initdata()
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
events:{
|
|
47
|
+
'add'(){
|
|
48
|
+
this.areaShow=true
|
|
49
|
+
this.$refs.sliceaddareamsg.cleardara()
|
|
50
|
+
this.$refs.sliceaddareamsg.operation='add'
|
|
51
|
+
this.$refs.sliceaddareamsg.areatype='片区'
|
|
52
|
+
this.$refs.sliceaddareamsg.initdata()
|
|
53
|
+
},
|
|
54
|
+
'modify'(area){
|
|
55
|
+
|
|
56
|
+
},
|
|
57
|
+
'confirm' () {
|
|
58
|
+
this.$refs.arealist.$refs.paged.$refs.cri.search()
|
|
59
|
+
this.areaShow = false
|
|
60
|
+
},
|
|
61
|
+
'cancel' () {
|
|
62
|
+
this.$refs.arealist.$refs.paged.$refs.cri.search()
|
|
63
|
+
this.areaShow = false
|
|
64
|
+
},
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</script>
|
|
68
|
+
|
|
@@ -15,33 +15,35 @@
|
|
|
15
15
|
:class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
|
|
16
16
|
<label class="col-sm-2 control-label">省市区</label>
|
|
17
17
|
<div class="col-sm-4">
|
|
18
|
-
<input type="text" v-show="false" v-model="
|
|
18
|
+
<input type="text" v-show="false" v-model="$refs.f_pcd_id.selectedItems"
|
|
19
19
|
v-validate:f_pcd_id='{required: true }'>
|
|
20
|
-
<v-select :value.sync="model.f_pcd_id" :value-single="true"
|
|
20
|
+
<v-select :value.sync="model.f_pcd_id" :value-single="true" v-ref:f_pcd_id
|
|
21
21
|
:options='pcdslist' placeholder='请选择'
|
|
22
22
|
close-on-select search="true" @change="pcdChange">
|
|
23
23
|
</v-select>
|
|
24
24
|
</div>
|
|
25
25
|
|
|
26
26
|
</div>
|
|
27
|
-
<div class="col-sm-6 form-group form-input-group">
|
|
28
|
-
<label class="
|
|
27
|
+
<div class="col-sm-6 form-group form-input-group" :class="[$v.f_slice_area_id.required ? 'has-error' : 'has-success']">
|
|
28
|
+
<label class="control-label">片区</label>
|
|
29
29
|
<div class="col-sm-4">
|
|
30
|
-
<v-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
<input type="text" v-show="false" v-model="$refs.f_slice_area_id.selectedItems"
|
|
31
|
+
v-validate:f_slice_area_id='{required: true }'>
|
|
32
|
+
<v-select :value.sync="model.f_slice_area_id" :value-single="true"
|
|
33
|
+
v-model="model.f_slice_area_id"
|
|
34
|
+
:options='sliceArea' placeholder='片区/管理站' v-ref:f_slice_area_id
|
|
35
|
+
close-on-select @change="sliceareaChange">
|
|
33
36
|
</v-select>
|
|
34
37
|
</div>
|
|
35
|
-
|
|
36
38
|
</div>
|
|
37
39
|
<div class="col-sm-6 form-group form-input-group"
|
|
38
40
|
:class="[$v.f_street_id.required ? 'has-error' : 'has-success']">
|
|
39
41
|
<label class="col-sm-2 control-label">街道名称</label>
|
|
40
42
|
<div class="col-sm-4">
|
|
41
|
-
<input type="text" v-show="false" v-model="
|
|
43
|
+
<input type="text" v-show="false" v-model="$refs.f_street_id.selectedItems"
|
|
42
44
|
v-validate:f_street_id='{required: true }'>
|
|
43
45
|
<v-select :value.sync="model.f_street_id" :value-single="true"
|
|
44
|
-
:options='streetslist' placeholder='请选择'
|
|
46
|
+
:options='streetslist' placeholder='请选择' v-ref:f_street_id
|
|
45
47
|
close-on-select search="true" @change="streetChange">
|
|
46
48
|
</v-select>
|
|
47
49
|
</div>
|
|
@@ -50,10 +52,10 @@
|
|
|
50
52
|
:class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">
|
|
51
53
|
<label class="col-sm-2 control-label">小区名称</label>
|
|
52
54
|
<div class="col-sm-4">
|
|
53
|
-
<input type="text" v-show="false" v-model="
|
|
55
|
+
<input type="text" v-show="false" v-model="$refs.f_residential_area_id.selectedItems"
|
|
54
56
|
v-validate:f_residential_area_id='{required: true }'>
|
|
55
57
|
<v-select :value.sync="model.f_residential_area_id" :value-single="true"
|
|
56
|
-
:options='areaslist' placeholder='请选择'
|
|
58
|
+
:options='areaslist' placeholder='请选择' v-ref:f_residential_area_id
|
|
57
59
|
@change="areaChange"
|
|
58
60
|
close-on-select search="true">
|
|
59
61
|
</v-select>
|
|
@@ -263,6 +265,7 @@
|
|
|
263
265
|
return {
|
|
264
266
|
//初始化省市区数据
|
|
265
267
|
pcdslist:[],
|
|
268
|
+
sliceArea:[],
|
|
266
269
|
//初始化街道数据
|
|
267
270
|
streetslist:[],
|
|
268
271
|
//初始化街道数据
|
|
@@ -281,6 +284,7 @@
|
|
|
281
284
|
f_street: '',
|
|
282
285
|
f_residential_area: '',
|
|
283
286
|
f_slice_area: '',
|
|
287
|
+
f_slice_area_id: '',
|
|
284
288
|
f_building: '',
|
|
285
289
|
f_building_start: '',
|
|
286
290
|
f_building_end: '',
|
|
@@ -419,8 +423,53 @@
|
|
|
419
423
|
this.model.f_residential_area_id=''
|
|
420
424
|
}
|
|
421
425
|
}
|
|
426
|
+
let pconditon = `f_pcd_id = '${this.model.f_pcd_id}' `
|
|
427
|
+
this.initslicearea(pconditon)
|
|
428
|
+
this.model.f_slice_area_id = ''
|
|
429
|
+
this.model.f_street_id_id= ''
|
|
430
|
+
this.model.f_residential_area_id = ''
|
|
431
|
+
this.$resetValidation()
|
|
422
432
|
}
|
|
423
|
-
|
|
433
|
+
|
|
434
|
+
},
|
|
435
|
+
//初始化片区 添加小区
|
|
436
|
+
initslicearea(pconditon){
|
|
437
|
+
console.log("片区准备")
|
|
438
|
+
let HttpReset = new HttpResetClass()
|
|
439
|
+
|
|
440
|
+
HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
441
|
+
data: {
|
|
442
|
+
items: '*',
|
|
443
|
+
tablename: 't_slicearea',
|
|
444
|
+
orderitem: 'id',
|
|
445
|
+
condition: pconditon
|
|
446
|
+
}
|
|
447
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
|
|
448
|
+
let redata = []
|
|
449
|
+
req.data.forEach((row, n) => {
|
|
450
|
+
redata[n] = {
|
|
451
|
+
label: row.f_slice_area,
|
|
452
|
+
value: row.id,
|
|
453
|
+
data:row,
|
|
454
|
+
id:row.id
|
|
455
|
+
}
|
|
456
|
+
})
|
|
457
|
+
this.sliceArea=redata
|
|
458
|
+
//this.$emit('ready')
|
|
459
|
+
})
|
|
460
|
+
},
|
|
461
|
+
sliceareaChange(val){
|
|
462
|
+
if(val){
|
|
463
|
+
if(val&&this.operation=='add'){
|
|
464
|
+
this.model.f_street_id=''
|
|
465
|
+
}
|
|
466
|
+
this.$resetValidation()
|
|
467
|
+
let pconditon = `f_pcd_id = '${this.model.f_pcd_id}' and f_slice_area_id = '${this.model.f_slice_area_id}' `
|
|
468
|
+
this.initstreets(pconditon)
|
|
469
|
+
this.model.f_street_id_id= ''
|
|
470
|
+
this.model.f_residential_area_id = ''
|
|
471
|
+
}
|
|
472
|
+
|
|
424
473
|
},
|
|
425
474
|
//小区变化
|
|
426
475
|
areaChange(val){
|
|
@@ -440,12 +489,13 @@
|
|
|
440
489
|
streetChange(val){
|
|
441
490
|
console.log("街道变化",val)
|
|
442
491
|
console.log("街道变化",this.operation)
|
|
443
|
-
if(val&&this.operation=='add'
|
|
492
|
+
if(val&&this.operation=='add' ){
|
|
444
493
|
// if(this.model.f_pcd_id.length==0){
|
|
445
494
|
// this.model.f_pcd_id=this.findbyid(this.streetslist,this.model.f_street_id).f_pcd_id
|
|
446
495
|
// }
|
|
447
496
|
//那就把[小区]重新组织一下
|
|
448
497
|
this.initareas(` f_filialeids = '${this.f_filialeids}' and f_street_id ='${val}' `)
|
|
498
|
+
this.model.f_residential_area_id=''
|
|
449
499
|
// if(this.model.f_residential_area_id){
|
|
450
500
|
// let street_id=this.findbyid(this.areaslist,this.model.f_residential_area_id).f_street_id
|
|
451
501
|
// if(street_id!=val){
|
|
@@ -538,6 +588,7 @@
|
|
|
538
588
|
this.model.f_floor_suffix=''
|
|
539
589
|
this.model.f_room_suffix=''
|
|
540
590
|
this.model.f_pcd=this.findbyid(this.pcdslist,this.model.f_pcd_id).f_pcd
|
|
591
|
+
this.model.f_slice_area = this.findbyid(this.sliceArea,this.model.f_slice_area_id).f_slice_area
|
|
541
592
|
let f_pcd = this.model.f_pcd.substring(this.model.f_pcd.indexOf('省')+1)
|
|
542
593
|
this.model.f_street=this.findbyid(this.streetslist,this.model.f_street_id).f_street
|
|
543
594
|
this.model.f_address = f_pcd + this.model.f_street + this.model.f_address
|
|
@@ -613,18 +664,7 @@
|
|
|
613
664
|
}
|
|
614
665
|
},
|
|
615
666
|
computed: {
|
|
616
|
-
|
|
617
|
-
console.log('地址管理查看片区,,,', this.$login.f)
|
|
618
|
-
let rs = new Array()
|
|
619
|
-
for (let i = 0; i < this.$login.f.f_allArea.length; i++) {
|
|
620
|
-
let temp = {
|
|
621
|
-
label: this.$login.f.f_allArea[i].label,
|
|
622
|
-
value: this.$login.f.f_allArea[i].label
|
|
623
|
-
}
|
|
624
|
-
rs.push(temp)
|
|
625
|
-
}
|
|
626
|
-
return rs
|
|
627
|
-
}
|
|
667
|
+
|
|
628
668
|
}
|
|
629
669
|
}
|
|
630
670
|
</script>
|