address-client 1.3.55 → 1.3.57-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,180 +1,189 @@
1
- <template>
2
- <div class="flex">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' 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
- <input type="text" class="form-control" v-model="model.f_street"
29
- condition="f_street like '%{}%'" placeholder="街道"
30
- :size="model.f_street ? model.f_street.length*2 : 2"/>
31
- </div>
32
- <div class="form-group form-input-group">
33
- <input type="text" class="form-control" v-model="model.f_residential_area"
34
- condition="f_residential_area like '%{}%'" placeholder="小区"
35
- :size="model.f_residential_area ? model.f_residential_area.length*2 : 2"/>
36
- </div>
37
- <div class="form-group form-input-group">
38
- <button class="btn btn-success width-80" @click="search()" >查询</button>
39
- <button v-if="!$parent.$parent.f_special" class="btn btn-success width-80" @click="$parent.$parent.add('小区')">添加小区</button>
40
- <button v-if="$parent.$parent.f_special"class="btn btn-success width-80" @click="$parent.$parent.add('单位')">添加单位</button>
41
- <button class="btn btn-success width-80" @click="$parent.$parent.clear()">清空</button>
42
- </div>
43
- </div>
44
- </criteria>
45
- <data-grid :model="model" partial='list' v-ref:grid>
46
- <template partial='head'>
47
- <tr>
48
- <th><nobr>id</nobr></th>
49
- <th><nobr>省份</nobr></th>
50
- <th><nobr>城市</nobr></th>
51
- <th><nobr>区/县</nobr></th>
52
- <th><nobr>街道名称</nobr></th>
53
- <!--民用小区信息开始-->
54
- <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
55
- <th v-if="!$parent.$parent.$parent.f_special"><nobr>详细地址</nobr></th>
56
- <!--民用小区信息结束-->
57
- <!--非民用单位信息开始-->
58
- <th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
59
- <th v-if="$parent.$parent.$parent.f_special"><nobr>单位地址</nobr></th>
60
- <th v-if="$parent.$parent.$parent.f_special"><nobr>联系人</nobr></th>
61
- <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
62
- <!--非民用单位信息结束-->
63
- <th><nobr>片区/管理站 </nobr></th>
64
- <th><nobr>营业网点</nobr></th>
65
- <th><nobr>操作人</nobr></th>
66
- <th><nobr>操作日期</nobr></th>
67
- <th><nobr>操作</nobr></th>
68
-
69
- </tr>
70
- </template>
71
- <template partial='body'>
72
- <tr>
73
- <td style="text-align:center"><nobr>{{row.id}}</nobr></td>
74
- <td style="text-align:center"><nobr>{{row.f_province}}</nobr></td>
75
- <td style="text-align:center"><nobr>{{row.f_city}}</nobr></td>
76
- <td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
77
- <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
78
- <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
79
- <td style="text-align:center"><nobr>{{row.f_area_address}}{{row.f_residential_area}}</nobr></td>
80
- <!--非民用单位信息开始-->
81
- <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
82
- <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
83
- <!--非民用单位信息结束-->
84
- <td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>
85
- <td style="text-align:center"><nobr>{{row.f_outlets}}</nobr></td>
86
- <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
87
- <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
88
- <td><nobr>
89
- <!--<button type="button" name="button" class="btn btn-link"
90
- @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
91
- <button type="button" name="button" class="btn btn-link"
92
- @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
93
- </nobr></td>
94
- </tr>
95
- </template>
96
- <template partial='foot'></template>
97
- </data-grid>
98
- </criteria-paged>
99
- </div>
100
- </template>
101
-
102
- <script>
103
- import { PagedList } from 'vue-client'
104
-
105
- export default {
106
- data () {
107
- return {
108
- model: new PagedList('rs/sql/address_getarealist',20),
109
- userid: this.$login.f.id,
110
- source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
111
- addflag: false,
112
- addtitle:''
113
- }
114
- },
115
- title: '小区管理',
116
- props:{
117
- f_filialeids:{
118
- type: String
119
- },
120
- f_special:{
121
- type: String
122
- }
123
- },
124
- ready(){
125
- this.search()
126
- },
127
- methods: {
128
- search() {
129
- this.$refs.paged.$refs.cri.search()
130
- },
131
- async delete(row){
132
- if(row.id){
133
- var id = row.id
134
- let useraredss = await this.$resetpost('rs/sql/address_singleTable',
135
- {data: {
136
- items: 'f_residential_area_id',
137
- tablename: 't_user_address',
138
- condition: `f_residential_area_id='${id}'`}
139
- },
140
- {resolveMsg: null, rejectMsg: null})
141
- if(useraredss.data.length>0){
142
- this.$showAlert('该小区下已有地址信息,无法删除!','warning',1000)
143
- }else{
144
- this.$resetdelete('rs/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
145
- this.$dispatch('cancel')
146
- })
147
- }
148
- }
149
- },
150
- add(val){
151
- this.$refs.paged.$refs.grid.selectStore.selected = null
152
- this.$dispatch('add')
153
- },
154
- modify(val){
155
- this.$refs.paged.$refs.grid.selectStore.selected = null
156
- this.$dispatch('modify',val)
157
- },
158
- selfSearch (args) {
159
- if(this.f_special){
160
- args.condition = `${args.condition} and s.f_special='1' and s.f_filialeids = '${this.f_filialeids}'`
161
- }else{
162
- args.condition = `${args.condition} and s.f_filialeids = '${this.f_filialeids}'`
163
- }
164
- this.model.search(args.condition, args.model)
165
- },
166
- //清空
167
- clear(){
168
- this.$refs.paged.$refs.cri.model = {}
169
- },
170
- getRes (obj) {
171
- console.log(obj,'选择到公司')
172
- this.f_filialeids = obj.resids
173
- },
174
- },
175
- watch:{
176
-
177
- }
178
-
179
- }
180
- </script>
1
+ <template>
2
+ <div class="flex">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' 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
+ <input type="text" class="form-control" v-model="model.f_street"
29
+ condition="f_street like '%{}%'" placeholder="街道"
30
+ :size="model.f_street ? model.f_street.length*2 : 2"/>
31
+ </div>
32
+ <div class="form-group form-input-group">
33
+ <input type="text" class="form-control" v-model="model.f_residential_area"
34
+ condition="f_residential_area like '%{}%'" placeholder="小区"
35
+ :size="model.f_residential_area ? model.f_residential_area.length*2 : 2"/>
36
+ </div>
37
+ <div class="form-group form-input-group">
38
+ <button class="btn btn-success width-80" @click="search()" >查询</button>
39
+ <button v-if="!$parent.$parent.f_special" class="btn btn-success width-80" @click="$parent.$parent.add('小区')">添加小区</button>
40
+ <button v-if="$parent.$parent.f_special"class="btn btn-success width-80" @click="$parent.$parent.add('单位')">添加单位</button>
41
+ <button class="btn btn-success width-80" @click="$parent.$parent.clear()">清空</button>
42
+ </div>
43
+ </div>
44
+ </criteria>
45
+ <data-grid :model="model" partial='list' v-ref:grid>
46
+ <template partial='head'>
47
+ <tr>
48
+ <!--<th><nobr>id</nobr></th>-->
49
+ <!--<th><nobr>省市区</nobr></th>-->
50
+ <!--<th><nobr>城市</nobr></th>-->
51
+ <!--<th><nobr>区/县</nobr></th>-->
52
+ <th><nobr>街道名称</nobr></th>
53
+ <!--民用小区信息开始-->
54
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>小区名称</nobr></th>
55
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>详细地址</nobr></th>
56
+ <th v-if="!$parent.$parent.$parent.f_special"><nobr>客户数量</nobr></th>
57
+ <!--民用小区信息结束-->
58
+ <!--非民用单位信息开始-->
59
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位名称</nobr></th>
60
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>单位地址</nobr></th>
61
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系人</nobr></th>
62
+ <th v-if="$parent.$parent.$parent.f_special"><nobr>联系电话</nobr></th>
63
+ <!--非民用单位信息结束-->
64
+ <!--<th><nobr>片区/管理站 </nobr></th>-->
65
+ <!--<th><nobr>营业网点</nobr></th>-->
66
+ <th><nobr>操作人</nobr></th>
67
+ <th><nobr>操作日期</nobr></th>
68
+ <th><nobr>操作</nobr></th>
69
+
70
+ </tr>
71
+ </template>
72
+ <template partial='body'>
73
+ <tr>
74
+ <!--<td style="text-align:center"><nobr>{{row.id}}</nobr></td>-->
75
+ <!--<td style="text-align:center"><nobr>{{row.f_pcd}}</nobr></td>-->
76
+ <!--<td style="text-align:center"><nobr>{{row.f_city}}</nobr></td>-->
77
+ <!--<td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>-->
78
+ <td style="text-align:center"><nobr>{{row.f_street}}</nobr></td>
79
+ <td style="text-align:center"><nobr>{{row.f_residential_area}}</nobr></td>
80
+ <td style="text-align:center"><nobr>{{row.f_area_address}}{{row.f_residential_area}}</nobr></td>
81
+ <td style="text-align:center"><nobr>{{row.usercount}}</nobr></td>
82
+ <!--非民用单位信息开始-->
83
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkname}}</nobr></td>
84
+ <td v-if="$parent.$parent.$parent.f_special" style="text-align:center"><nobr>{{row.f_linkphone}}</nobr></td>
85
+ <!--非民用单位信息结束-->
86
+ <!--<td style="text-align:center"><nobr>{{row.f_slice_area}}</nobr></td>-->
87
+ <!--<td style="text-align:center"><nobr>{{row.f_outlets}}</nobr></td>-->
88
+ <td style="text-align:center"><nobr>{{row.f_operator}}</nobr></td>
89
+ <td style="text-align:center"><nobr>{{row.f_operate_date}}</nobr></td>
90
+ <td><nobr>
91
+ <!--<button type="button" name="button" class="btn btn-link"
92
+ @click.stop="$parent.$parent.$parent.modify(row)">修改</button>-->
93
+ <button type="button" name="button" class="btn btn-link"
94
+ @click.stop="$parent.$parent.$parent.delete(row)">删除</button>
95
+ </nobr></td>
96
+ </tr>
97
+ </template>
98
+ <template partial='foot'></template>
99
+ </data-grid>
100
+ </criteria-paged>
101
+ </div>
102
+ </template>
103
+
104
+ <script>
105
+ import { PagedList } from 'vue-client'
106
+
107
+ export default {
108
+ data () {
109
+ return {
110
+ model: new PagedList('rs/sql/address_getarealist',20),
111
+ userid: this.$login.f.id,
112
+ source:`tool.getFullTree(this.getRights().where(row.getType() == $organization$))`,
113
+ addflag: false,
114
+ addtitle:''
115
+ }
116
+ },
117
+ title: '小区管理',
118
+ props:{
119
+ f_filialeids:{
120
+ type: String
121
+ },
122
+ f_special:{
123
+ type: String
124
+ }
125
+ },
126
+ ready(){
127
+ this.init().then(()=>{
128
+ this.$emit('ready')
129
+ }).catch((error) => {
130
+ this.$emit('error', error)
131
+ })
132
+ },
133
+ methods: {
134
+ async init(){
135
+ await this.$refs.paged.$refs.cri.search()
136
+ },
137
+ async delete(row){
138
+ if(row.id){
139
+ var id = row.id
140
+ var usercount = row.usercount
141
+ let useraredss = await this.$resetpost('rs/sql/address_singleTable',
142
+ {data: {
143
+ items: 'f_residential_area_id',
144
+ tablename: 't_user_address',
145
+ condition: `f_residential_area_id='${id}'`}
146
+ },
147
+ {resolveMsg: null, rejectMsg: null})
148
+ if(useraredss.data.length>0 || usercount>0 ){
149
+ this.$showAlert('该小区下已有地址或档案信息,无法删除!','warning',1000)
150
+ }else{
151
+ this.$resetdelete('rs/entity/t_area', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
152
+ this.$dispatch('cancel')
153
+ })
154
+ }
155
+ }
156
+ },
157
+ add(val){
158
+ this.$refs.paged.$refs.grid.selectStore.selected = null
159
+ this.$dispatch('add')
160
+ },
161
+ modify(val){
162
+ this.$refs.paged.$refs.grid.selectStore.selected = null
163
+ this.$dispatch('modify',val)
164
+ },
165
+ selfSearch (args) {
166
+ if(this.f_special){
167
+ args.condition = `${args.condition} and s.f_special='1' and s.f_filialeids = '${this.f_filialeids}'`
168
+ }else{
169
+ args.condition = `${args.condition} and s.f_filialeids = '${this.f_filialeids}'`
170
+ }
171
+ this.model.search(args.condition, args.model)
172
+ },
173
+ //清空
174
+ clear(){
175
+ this.$refs.paged.$refs.cri.model = {}
176
+ },
177
+ getRes (obj) {
178
+ console.log(obj,'选择到公司')
179
+ this.f_filialeids = obj.resids
180
+ },
181
+ },
182
+ watch:{
183
+ 'f_filialeids'(){
184
+ this.init()
185
+ }
186
+ }
187
+
188
+ }
189
+ </script>
@@ -1,75 +1,75 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="flex" style="flex: 1; width:60%">
4
- <area-list @select-changed="selected" v-ref:arealist :f_filialeids.sync="f_filialeids"></area-list>
5
- </div>
6
- <div v-show="areaShow" style="width: 40%">
7
- <div class="flex">
8
- <add-area-msg v-ref:addareamsg :areatype="areatype" :operation="operation"
9
- :f_filialeids.sync="f_filialeids" :row="arearow"></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
- this.loadParam()
31
- },
32
- props:{
33
-
34
- },
35
- methods:{
36
- selected(obj){
37
- if(obj.val&&obj.val.id){
38
- this.areaShow=true
39
- this.$refs.addareamsg.cleardara()
40
- this.$refs.addareamsg.operation='modify'
41
- this.$refs.addareamsg.areatype='小区'
42
- this.$refs.addareamsg.areamodel=Object.assign({},obj.val)
43
- this.$refs.addareamsg.initdata()
44
- }
45
- },
46
-
47
- async search() {
48
- this.areaShow = false
49
- await this.$refs.arealist.$refs.paged.$refs.cri.search()
50
- },
51
-
52
- async loadParam () {
53
- await this.$LoadParams.loadParam()
54
- }
55
- },
56
- events:{
57
- 'add'(){
58
- this.areaShow=true
59
- this.$refs.addareamsg.cleardara()
60
- this.$refs.addareamsg.operation='add'
61
- this.$refs.addareamsg.areatype='小区'
62
- this.$refs.addareamsg.initdata()
63
- },
64
- 'confirm' () {
65
- console.log('小区变更成')
66
- this.search()
67
- },
68
- 'cancel' () {
69
- this.$refs.arealist.$refs.paged.$refs.cri.search()
70
- this.areaShow = false
71
- },
72
- }
73
- }
74
- </script>
75
-
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="flex" style="flex: 1; width:60%">
4
+ <area-list @select-changed="selected" v-ref:arealist :f_filialeids.sync="f_filialeids"></area-list>
5
+ </div>
6
+ <div v-show="areaShow" style="width: 40%">
7
+ <div class="flex">
8
+ <add-area-msg v-ref:addareamsg :areatype="areatype" :operation="operation"
9
+ :f_filialeids.sync="f_filialeids" :row="arearow"></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
+ this.loadParam()
31
+ },
32
+ props:{
33
+
34
+ },
35
+ methods:{
36
+ selected(obj){
37
+ if(obj.val&&obj.val.id){
38
+ this.areaShow=true
39
+ this.$refs.addareamsg.cleardara()
40
+ this.$refs.addareamsg.operation='modify'
41
+ this.$refs.addareamsg.areatype='小区'
42
+ this.$refs.addareamsg.areamodel=Object.assign({},obj.val)
43
+ this.$refs.addareamsg.initdata()
44
+ }
45
+ },
46
+
47
+ async search() {
48
+ this.areaShow = false
49
+ await this.$refs.arealist.$refs.paged.$refs.cri.search()
50
+ },
51
+
52
+ async loadParam () {
53
+ await this.$LoadParams.loadParam()
54
+ }
55
+ },
56
+ events:{
57
+ 'add'(){
58
+ this.areaShow=true
59
+ this.$refs.addareamsg.cleardara()
60
+ this.$refs.addareamsg.operation='add'
61
+ this.$refs.addareamsg.areatype='小区'
62
+ this.$refs.addareamsg.initdata()
63
+ },
64
+ 'confirm' () {
65
+ console.log('小区变更成')
66
+ this.search()
67
+ },
68
+ 'cancel' () {
69
+ this.$refs.arealist.$refs.paged.$refs.cri.search()
70
+ this.areaShow = false
71
+ },
72
+ }
73
+ }
74
+ </script>
75
+