address-client 1.6.75 → 1.6.76
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/components/AddAreaMsg.vue +18 -0
- package/src/components/UseGasAreaList.vue +110 -110
- package/yarn-error.log +7599 -0
package/package.json
CHANGED
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
<label class="font_normal_body _zoom4">小区ID</label>
|
|
48
48
|
<input type="text"
|
|
49
49
|
style="width: 60%"
|
|
50
|
+
@blur="areaidCheck"
|
|
50
51
|
v-model="areamodel.oldid" :disabled="operation=='modify'"
|
|
51
52
|
class="form-control" placeholder="小区ID"
|
|
52
53
|
v-validate:oldid='{required: true }'>
|
|
@@ -136,6 +137,7 @@
|
|
|
136
137
|
<label class="font_normal_body _zoom4">单位ID</label>
|
|
137
138
|
<input type="text"
|
|
138
139
|
style="width: 60%"
|
|
140
|
+
@blur="areaidCheck"
|
|
139
141
|
v-model="areamodel.oldid"
|
|
140
142
|
class="form-control" placeholder="单位ID"
|
|
141
143
|
v-validate:oldid='{required: true }'>
|
|
@@ -787,6 +789,22 @@ export default {
|
|
|
787
789
|
card_size: null,
|
|
788
790
|
}
|
|
789
791
|
},
|
|
792
|
+
areaidCheck(){
|
|
793
|
+
let HttpReset = new HttpResetClass()
|
|
794
|
+
HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
|
|
795
|
+
data: {
|
|
796
|
+
items: 'id',
|
|
797
|
+
tablename: 't_area',
|
|
798
|
+
orderitem: 'id desc',
|
|
799
|
+
condition: ` oldid = '${this.areamodel.oldid}' `
|
|
800
|
+
}
|
|
801
|
+
}, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
|
|
802
|
+
if (req.data.length > 0) {
|
|
803
|
+
this.areamodel.oldid = ''
|
|
804
|
+
this.$showAlert('ID重复,请检查ID是否正确!','warning',1000)
|
|
805
|
+
}
|
|
806
|
+
})
|
|
807
|
+
},
|
|
790
808
|
cancel() {
|
|
791
809
|
this.cleardara()
|
|
792
810
|
this.$dispatch('cancel')
|
|
@@ -1,110 +1,110 @@
|
|
|
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
|
-
<button class="btn btn-success width-80" @click="search()" >查询</button>
|
|
8
|
-
<button class="btn btn-success width-80" @click="$parent.$parent.add('民用')">添加用气区域</button>
|
|
9
|
-
<button class="btn btn-success width-80" @click="$parent.$parent.clear()">清空</button>
|
|
10
|
-
</div>
|
|
11
|
-
</div>
|
|
12
|
-
</criteria>
|
|
13
|
-
<data-grid :model="model" partial='list' v-ref:grid>
|
|
14
|
-
<template partial='head'>
|
|
15
|
-
<tr>
|
|
16
|
-
<th><nobr>id</nobr></th>
|
|
17
|
-
<th><nobr>区/县</nobr></th>
|
|
18
|
-
<th><nobr>片区</nobr></th>
|
|
19
|
-
<th><nobr>街道</nobr></th>
|
|
20
|
-
<th><nobr>用气区域</nobr></th>
|
|
21
|
-
<th><nobr>时间</nobr></th>
|
|
22
|
-
<th><nobr>操作人</nobr></th>
|
|
23
|
-
<th><nobr>操作</nobr></th>
|
|
24
|
-
</tr>
|
|
25
|
-
</template>
|
|
26
|
-
<template partial='body'>
|
|
27
|
-
<tr>
|
|
28
|
-
<td style="text-align:center"><nobr>{{row.id}}</nobr></td>
|
|
29
|
-
<td style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
|
|
30
|
-
<td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
|
|
31
|
-
<td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
|
|
32
|
-
<td style="text-align:center"><nobr>{{row.f_usegas_area}}</nobr></td>
|
|
33
|
-
<td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
|
|
34
|
-
<td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
|
|
35
|
-
<td style="text-align:center">
|
|
36
|
-
<!-- <button type="button" name="button" class="btn btn-link"
|
|
37
|
-
@click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
|
|
38
|
-
<button type="button" name="button" class="btn btn-link"
|
|
39
|
-
@click.stop="$parent.$parent.$parent.delete(row)">删除</button>
|
|
40
|
-
</td>
|
|
41
|
-
</tr>
|
|
42
|
-
</template>
|
|
43
|
-
<template partial='foot'></template>
|
|
44
|
-
</data-grid>
|
|
45
|
-
</criteria-paged>
|
|
46
|
-
</div>
|
|
47
|
-
</template>
|
|
48
|
-
|
|
49
|
-
<script>
|
|
50
|
-
import { PagedList } from 'vue-client'
|
|
51
|
-
|
|
52
|
-
export default {
|
|
53
|
-
data () {
|
|
54
|
-
return {
|
|
55
|
-
model: new PagedList('rs/sql/address_getusegasarealist',20), userid: this.$login.f.id,
|
|
56
|
-
source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
title: '用气区域列表',
|
|
60
|
-
props:{
|
|
61
|
-
},
|
|
62
|
-
ready(){
|
|
63
|
-
|
|
64
|
-
},
|
|
65
|
-
methods: {
|
|
66
|
-
//添加方法
|
|
67
|
-
add(val){
|
|
68
|
-
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
69
|
-
this.$dispatch('add',val)
|
|
70
|
-
},
|
|
71
|
-
//修改
|
|
72
|
-
modify(val){
|
|
73
|
-
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
74
|
-
this.$dispatch('modify',val)
|
|
75
|
-
},
|
|
76
|
-
async delete(row){
|
|
77
|
-
if(row.id){
|
|
78
|
-
var id = row.id
|
|
79
|
-
let useraredss = await this.$resetpost('rs/sql/address_singleTable',
|
|
80
|
-
{data: {
|
|
81
|
-
items: 'f_usegas_area_id',
|
|
82
|
-
tablename: 't_user_address',
|
|
83
|
-
condition: `f_usegas_area_id='${id}'`}
|
|
84
|
-
},
|
|
85
|
-
{resolveMsg: null, rejectMsg: null})
|
|
86
|
-
if(useraredss.data.length>0){
|
|
87
|
-
this.$showAlert('该用气区域下已有地址信息,无法删除!','warning',1000)
|
|
88
|
-
}else{
|
|
89
|
-
this.$resetdelete('rs/entity/t_usegas_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
90
|
-
this.$dispatch('cancel')
|
|
91
|
-
})
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
search (args) {
|
|
96
|
-
this.model.search(args.condition, args.model)
|
|
97
|
-
},
|
|
98
|
-
//清空
|
|
99
|
-
clear(){
|
|
100
|
-
this.$refs.paged.$refs.cri.model = {}
|
|
101
|
-
},
|
|
102
|
-
},
|
|
103
|
-
watch:{
|
|
104
|
-
|
|
105
|
-
},
|
|
106
|
-
events: {
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
}
|
|
110
|
-
</script>
|
|
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
|
+
<button class="btn btn-success width-80" @click="search()" >查询</button>
|
|
8
|
+
<button class="btn btn-success width-80" @click="$parent.$parent.add('民用')">添加用气区域</button>
|
|
9
|
+
<button class="btn btn-success width-80" @click="$parent.$parent.clear()">清空</button>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</criteria>
|
|
13
|
+
<data-grid :model="model" partial='list' v-ref:grid>
|
|
14
|
+
<template partial='head'>
|
|
15
|
+
<tr>
|
|
16
|
+
<th><nobr>id</nobr></th>
|
|
17
|
+
<th><nobr>区/县</nobr></th>
|
|
18
|
+
<th><nobr>片区</nobr></th>
|
|
19
|
+
<th><nobr>街道</nobr></th>
|
|
20
|
+
<th><nobr>用气区域</nobr></th>
|
|
21
|
+
<th><nobr>时间</nobr></th>
|
|
22
|
+
<th><nobr>操作人</nobr></th>
|
|
23
|
+
<th><nobr>操作</nobr></th>
|
|
24
|
+
</tr>
|
|
25
|
+
</template>
|
|
26
|
+
<template partial='body'>
|
|
27
|
+
<tr>
|
|
28
|
+
<td style="text-align:center"><nobr>{{row.id}}</nobr></td>
|
|
29
|
+
<td style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>
|
|
30
|
+
<td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
|
|
31
|
+
<td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
|
|
32
|
+
<td style="text-align:center"><nobr>{{row.f_usegas_area}}</nobr></td>
|
|
33
|
+
<td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
|
|
34
|
+
<td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
|
|
35
|
+
<td style="text-align:center">
|
|
36
|
+
<!-- <button type="button" name="button" class="btn btn-link"
|
|
37
|
+
@click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
|
|
38
|
+
<button type="button" name="button" class="btn btn-link"
|
|
39
|
+
@click.stop="$parent.$parent.$parent.delete(row)">删除</button>
|
|
40
|
+
</td>
|
|
41
|
+
</tr>
|
|
42
|
+
</template>
|
|
43
|
+
<template partial='foot'></template>
|
|
44
|
+
</data-grid>
|
|
45
|
+
</criteria-paged>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script>
|
|
50
|
+
import { PagedList } from 'vue-client'
|
|
51
|
+
|
|
52
|
+
export default {
|
|
53
|
+
data () {
|
|
54
|
+
return {
|
|
55
|
+
model: new PagedList('rs/sql/address_getusegasarealist',20), userid: this.$login.f.id,
|
|
56
|
+
source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
title: '用气区域列表',
|
|
60
|
+
props:{
|
|
61
|
+
},
|
|
62
|
+
ready(){
|
|
63
|
+
|
|
64
|
+
},
|
|
65
|
+
methods: {
|
|
66
|
+
//添加方法
|
|
67
|
+
add(val){
|
|
68
|
+
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
69
|
+
this.$dispatch('add',val)
|
|
70
|
+
},
|
|
71
|
+
//修改
|
|
72
|
+
modify(val){
|
|
73
|
+
this.$refs.paged.$refs.grid.selectStore.selected = null
|
|
74
|
+
this.$dispatch('modify',val)
|
|
75
|
+
},
|
|
76
|
+
async delete(row){
|
|
77
|
+
if(row.id){
|
|
78
|
+
var id = row.id
|
|
79
|
+
let useraredss = await this.$resetpost('rs/sql/address_singleTable',
|
|
80
|
+
{data: {
|
|
81
|
+
items: 'f_usegas_area_id',
|
|
82
|
+
tablename: 't_user_address',
|
|
83
|
+
condition: `f_usegas_area_id='${id}'`}
|
|
84
|
+
},
|
|
85
|
+
{resolveMsg: null, rejectMsg: null})
|
|
86
|
+
if(useraredss.data.length>0){
|
|
87
|
+
` this.$showAlert('该用气区域下已有地址信息,无法删除!','warning',1000)
|
|
88
|
+
` }else{
|
|
89
|
+
this.$resetdelete('rs/entity/t_usegas_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
|
|
90
|
+
this.$dispatch('cancel')
|
|
91
|
+
})
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
search (args) {
|
|
96
|
+
this.model.search(args.condition, args.model)
|
|
97
|
+
},
|
|
98
|
+
//清空
|
|
99
|
+
clear(){
|
|
100
|
+
this.$refs.paged.$refs.cri.model = {}
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
watch:{
|
|
104
|
+
|
|
105
|
+
},
|
|
106
|
+
events: {
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
}
|
|
110
|
+
</script>
|