address-client 3.2.88 → 3.2.90

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,204 +1,204 @@
1
- <template>
2
- <div class="span">
3
- <validator name='v'>
4
- <p class="bg-info text-center" style="padding: 8px;">{{ businesstype }}街道办</p>
5
- <div class="auto select-overspread form-horizontal">
6
- <div style="text-align:right;margin-top:6px;" class="col-sm-12">
7
- <!-- 街道办-->
8
- <div class="row">
9
- <div class="col-sm-6 form-group "
10
- :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
11
- <label class="font_normal_body">省&ensp;市&ensp;区</label>
12
- <input type="text" v-show="false" v-model="streetmanagemodel.f_pcd_id"
13
- v-validate:f_pcd_id='{required: true }'>
14
- <v-select
15
- :value.sync="streetmanagemodel.f_pcd_id" :value-single="true"
16
- :options='pcdslist' placeholder='请选择'
17
- close-on-select search="true" @change="pcdChange">
18
- </v-select>
19
- </div>
20
- <div class="col-sm-6 form-group "
21
- :class="[$v.f_street_manage_name.required ? 'has-error' : 'has-success']">
22
- <label class="font_normal_body">街道办名称</label>
23
- <input type="text" v-model="streetmanagemodel.f_street_manage_name"
24
- class="input_search" style="width:60%" placeholder="街道办名称"
25
- v-validate:f_street_manage_name='{required: true }'>
26
- </div>
27
- <div class="col-sm-6 form-group"
28
- :class="[$v.f_street_manage_number.required ? 'has-error' : 'has-success']">
29
- <label class="font_normal_body">街道办编号</label>
30
- <input type="text" v-model="streetmanagemodel.f_street_manage_number"
31
- @change="streetyanzheng"
32
- class="input_search" style="width:60%" placeholder="街道办编号"
33
- v-validate:f_street_manage_number='{required: true }'>
34
- </div>
35
- <!-- <div class="col-sm-6 form-group "-->
36
- <!-- :class="[$v.f_iscity.required ? 'has-error' : 'has-success']">-->
37
- <!-- <label class="font_normal_body">地区类型</label>-->
38
- <!-- <input type="text" v-show="false" v-model="streetmanagemodel.f_iscity"-->
39
- <!-- v-validate:f_iscity='{required: true }'>-->
40
- <!-- <v-select-->
41
- <!-- :value.sync="streetmanagemodel.f_iscity" :value-single="true"-->
42
- <!-- :options='iscity' placeholder='请选择'-->
43
- <!-- close-on-select>-->
44
- <!-- </v-select>-->
45
- <!-- </div>-->
46
- <div class="col-sm-12 form-group">
47
- <label class="font_normal_body " style="">备&emsp;&emsp;注</label>
48
- <textarea class="input_textarea" rows="3" style="margin-top:25px;width:80%;height: auto;"
49
- v-model="streetmanagemodel.f_comments"></textarea>
50
- </div>
51
- </div>
52
- <div class="row">
53
- <div style="margin-top:40px;text-align:right;">
54
- <button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>保存</button>
55
- <button class="button_clear button_spacing" @click="cancel()">取消</button>
56
- </div>
57
- </div>
58
- </div>
59
- </div>
60
- </validator>
61
- </div>
62
- </template>
63
-
64
- <script>
65
- import {HttpResetClass} from 'vue-client'
66
-
67
- // let getAreaConfig = async function (self) {
68
- // // 获取气价里面的配置
69
- // await self.$getConfig(self, 'StreetManage')
70
- // console.log('原地址配置', self.config)
71
- // console.log('获取地址配置', self.config)
72
- // Object.assign(self.model, self.config)
73
- // }
74
- export default {
75
- title: '街道办信息添加',
76
- data() {
77
- return {
78
- //初始化省市区数据
79
- config: {
80
- hasnumber: true
81
- },
82
- pcdslist: [],
83
- //街道办
84
- streetmanagemodel: {
85
- f_pcd_id: '',
86
- f_street_manage_id: '',
87
- slice_area: null,
88
- f_slice_area: null,
89
- f_adjustable_id: null,
90
- f_street_manage_name: '',
91
- f_comments: '',
92
- f_street_manage_number: ''
93
- }
94
- }
95
- },
96
- props: ['f_filialeids', 'businesstype'],
97
- ready() {
98
- this.initdata()
99
- // getAreaConfig(this)
100
- },
101
- methods: {
102
- async streetyanzheng() {
103
- console.log(this.streetmanagemodel.f_street_manage_number.length)
104
- let res = await this.$resetpost('rs/sql/address_singleTableOrderBy', {
105
- data: {
106
- items: '*',
107
- tablename: 't_street_manage',
108
- orderitem: 'id',
109
- condition: `f_street_manage_number = '${this.streetmanagemodel.f_street_manage_number}'`
110
- }
111
- }, {resolveMsg: null, rejectMsg: null})
112
- if (res.data.length > 0) {
113
- if (res.data[0].id != this.streetmanagemodel.id) {
114
- this.$showAlert('当前编号已存在', 'warning', 2000)
115
- this.streetmanagemodel.f_street_manage_number = ''
116
- }
117
- }
118
- },
119
- //根据名字找数据
120
- findbyid(list, name) {
121
- var result
122
- list.forEach((row, n) => {
123
- if (name == row.id) {
124
- result = row.data
125
- }
126
- })
127
- return result
128
- },
129
- //初始化数据
130
- initdata() {
131
- console.log("省市区准备")
132
- let HttpReset = new HttpResetClass()
133
- HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
134
- data: {
135
- items: '*',
136
- tablename: 't_pcd',
137
- orderitem: 'id',
138
- condition: ` f_filialeid = '${this.f_filialeids}'`
139
- }
140
- }, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
141
- let redata = []
142
- req.data.forEach((row, n) => {
143
- redata[n] = {
144
- label: row.f_pcd,
145
- value: row.id,
146
- data: row,
147
- id: row.id
148
- }
149
- })
150
- this.pcdslist = redata
151
- })
152
- },
153
- //省/市/区变化
154
- pcdChange(val) {
155
- console.log("省/市/区变化", val)
156
- this.$resetValidation()
157
- },
158
- //保存
159
- async confirm() {
160
- await this.savestreet()
161
- this.clearData()
162
- this.$dispatch('confirm')
163
- },
164
- //保存街道
165
- async savestreet() {
166
- this.streetmanagemodel.f_filialeid = this.f_filialeids
167
- this.streetmanagemodel.f_operator = this.$login.f.name
168
- this.streetmanagemodel.f_operatorid = this.$login.f.id
169
- this.streetmanagemodel.f_orgid = this.$login.f.orgid
170
- this.streetmanagemodel.f_orgname = this.$login.f.orgs
171
- this.streetmanagemodel.f_depid = this.$login.f.depids
172
- this.streetmanagemodel.f_depname = this.$login.f.deps
173
- this.streetmanagemodel.f_pcd = this.findbyid(this.pcdslist, this.streetmanagemodel.f_pcd_id).f_pcd
174
- console.log('获取街道model', this.streetmanagemodel)
175
- await this.$resetpost('rs/logic/address_updateStreetManage', this.streetmanagemodel)
176
- },
177
- cancel() {
178
- this.clearData()
179
- this.$dispatch('cancel')
180
- },
181
- clearData() {
182
- this.streetmanagemodel = {
183
- f_pcd_id: '',
184
- f_slice_area: '',
185
- f_adjustable_id: '',
186
- f_street_manage_name: '',
187
- f_street_manage_number: '',
188
- f_comments: ''
189
- }
190
- }
191
-
192
- },
193
- watch: {
194
- 'f_filialeids'() {
195
- if (this.streetmanagemodel.f_filialeid) {
196
- if (this.streetmanagemodel.f_filialeid != this.f_filialeids) {
197
- this.$dispatch('cancel')
198
- }
199
- }
200
- this.initdata()
201
- }
202
- }
203
- }
204
- </script>
1
+ <template>
2
+ <div class="span">
3
+ <validator name='v'>
4
+ <p class="bg-info text-center" style="padding: 8px;">{{ businesstype }}街道办</p>
5
+ <div class="auto select-overspread form-horizontal">
6
+ <div style="text-align:right;margin-top:6px;" class="col-sm-12">
7
+ <!-- 街道办-->
8
+ <div class="row">
9
+ <div class="col-sm-6 form-group "
10
+ :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">
11
+ <label class="font_normal_body">省&ensp;市&ensp;区</label>
12
+ <input type="text" v-show="false" v-model="streetmanagemodel.f_pcd_id"
13
+ v-validate:f_pcd_id='{required: true }'>
14
+ <v-select
15
+ :value.sync="streetmanagemodel.f_pcd_id" :value-single="true"
16
+ :options='pcdslist' placeholder='请选择'
17
+ close-on-select search="true" @change="pcdChange">
18
+ </v-select>
19
+ </div>
20
+ <div class="col-sm-6 form-group "
21
+ :class="[$v.f_street_manage_name.required ? 'has-error' : 'has-success']">
22
+ <label class="font_normal_body">街道办名称</label>
23
+ <input type="text" v-model="streetmanagemodel.f_street_manage_name"
24
+ class="input_search" style="width:60%" placeholder="街道办名称"
25
+ v-validate:f_street_manage_name='{required: true }'>
26
+ </div>
27
+ <div class="col-sm-6 form-group"
28
+ :class="[$v.f_street_manage_number.required ? 'has-error' : 'has-success']">
29
+ <label class="font_normal_body">街道办编号</label>
30
+ <input type="text" v-model="streetmanagemodel.f_street_manage_number"
31
+ @change="streetyanzheng"
32
+ class="input_search" style="width:60%" placeholder="街道办编号"
33
+ v-validate:f_street_manage_number='{required: true }'>
34
+ </div>
35
+ <!-- <div class="col-sm-6 form-group "-->
36
+ <!-- :class="[$v.f_iscity.required ? 'has-error' : 'has-success']">-->
37
+ <!-- <label class="font_normal_body">地区类型</label>-->
38
+ <!-- <input type="text" v-show="false" v-model="streetmanagemodel.f_iscity"-->
39
+ <!-- v-validate:f_iscity='{required: true }'>-->
40
+ <!-- <v-select-->
41
+ <!-- :value.sync="streetmanagemodel.f_iscity" :value-single="true"-->
42
+ <!-- :options='iscity' placeholder='请选择'-->
43
+ <!-- close-on-select>-->
44
+ <!-- </v-select>-->
45
+ <!-- </div>-->
46
+ <div class="col-sm-12 form-group">
47
+ <label class="font_normal_body " style="">备&emsp;&emsp;注</label>
48
+ <textarea class="input_textarea" rows="3" style="margin-top:25px;width:80%;height: auto;"
49
+ v-model="streetmanagemodel.f_comments"></textarea>
50
+ </div>
51
+ </div>
52
+ <div class="row">
53
+ <div style="margin-top:40px;text-align:right;">
54
+ <button class="button_search button_spacing" @click="confirm()" :disabled='!$v.valid'>保存</button>
55
+ <button class="button_clear button_spacing" @click="cancel()">取消</button>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </validator>
61
+ </div>
62
+ </template>
63
+
64
+ <script>
65
+ import {HttpResetClass} from 'vue-client'
66
+
67
+ // let getAreaConfig = async function (self) {
68
+ // // 获取气价里面的配置
69
+ // await self.$getConfig(self, 'StreetManage')
70
+ // console.log('原地址配置', self.config)
71
+ // console.log('获取地址配置', self.config)
72
+ // Object.assign(self.model, self.config)
73
+ // }
74
+ export default {
75
+ title: '街道办信息添加',
76
+ data() {
77
+ return {
78
+ //初始化省市区数据
79
+ config: {
80
+ hasnumber: true
81
+ },
82
+ pcdslist: [],
83
+ //街道办
84
+ streetmanagemodel: {
85
+ f_pcd_id: '',
86
+ f_street_manage_id: '',
87
+ slice_area: null,
88
+ f_slice_area: null,
89
+ f_adjustable_id: null,
90
+ f_street_manage_name: '',
91
+ f_comments: '',
92
+ f_street_manage_number: ''
93
+ }
94
+ }
95
+ },
96
+ props: ['f_filialeids', 'businesstype'],
97
+ ready() {
98
+ this.initdata()
99
+ // getAreaConfig(this)
100
+ },
101
+ methods: {
102
+ async streetyanzheng() {
103
+ console.log(this.streetmanagemodel.f_street_manage_number.length)
104
+ let res = await this.$resetpost('rs/sql/address_singleTableOrderBy', {
105
+ data: {
106
+ items: '*',
107
+ tablename: 't_street_manage',
108
+ orderitem: 'id',
109
+ condition: `f_street_manage_number = '${this.streetmanagemodel.f_street_manage_number}'`
110
+ }
111
+ }, {resolveMsg: null, rejectMsg: null})
112
+ if (res.data.length > 0) {
113
+ if (res.data[0].id != this.streetmanagemodel.id) {
114
+ this.$showAlert('当前编号已存在', 'warning', 2000)
115
+ this.streetmanagemodel.f_street_manage_number = ''
116
+ }
117
+ }
118
+ },
119
+ //根据名字找数据
120
+ findbyid(list, name) {
121
+ var result
122
+ list.forEach((row, n) => {
123
+ if (name == row.id) {
124
+ result = row.data
125
+ }
126
+ })
127
+ return result
128
+ },
129
+ //初始化数据
130
+ initdata() {
131
+ console.log("省市区准备")
132
+ let HttpReset = new HttpResetClass()
133
+ HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
134
+ data: {
135
+ items: '*',
136
+ tablename: 't_pcd',
137
+ orderitem: 'id',
138
+ condition: ` f_filialeid = '${this.f_filialeids}'`
139
+ }
140
+ }, {resolveMsg: null, rejectMsg: '获取地址失败!'}).then((req) => {
141
+ let redata = []
142
+ req.data.forEach((row, n) => {
143
+ redata[n] = {
144
+ label: row.f_pcd,
145
+ value: row.id,
146
+ data: row,
147
+ id: row.id
148
+ }
149
+ })
150
+ this.pcdslist = redata
151
+ })
152
+ },
153
+ //省/市/区变化
154
+ pcdChange(val) {
155
+ console.log("省/市/区变化", val)
156
+ this.$resetValidation()
157
+ },
158
+ //保存
159
+ async confirm() {
160
+ await this.savestreet()
161
+ this.clearData()
162
+ this.$dispatch('confirm')
163
+ },
164
+ //保存街道
165
+ async savestreet() {
166
+ this.streetmanagemodel.f_filialeid = this.f_filialeids
167
+ this.streetmanagemodel.f_operator = this.$login.f.name
168
+ this.streetmanagemodel.f_operatorid = this.$login.f.id
169
+ this.streetmanagemodel.f_orgid = this.$login.f.orgid
170
+ this.streetmanagemodel.f_orgname = this.$login.f.orgs
171
+ this.streetmanagemodel.f_depid = this.$login.f.depids
172
+ this.streetmanagemodel.f_depname = this.$login.f.deps
173
+ this.streetmanagemodel.f_pcd = this.findbyid(this.pcdslist, this.streetmanagemodel.f_pcd_id).f_pcd
174
+ console.log('获取街道model', this.streetmanagemodel)
175
+ await this.$resetpost('rs/logic/address_updateStreetManage', this.streetmanagemodel)
176
+ },
177
+ cancel() {
178
+ this.clearData()
179
+ this.$dispatch('cancel')
180
+ },
181
+ clearData() {
182
+ this.streetmanagemodel = {
183
+ f_pcd_id: '',
184
+ f_slice_area: '',
185
+ f_adjustable_id: '',
186
+ f_street_manage_name: '',
187
+ f_street_manage_number: '',
188
+ f_comments: ''
189
+ }
190
+ }
191
+
192
+ },
193
+ watch: {
194
+ 'f_filialeids'() {
195
+ if (this.streetmanagemodel.f_filialeid) {
196
+ if (this.streetmanagemodel.f_filialeid != this.f_filialeids) {
197
+ this.$dispatch('cancel')
198
+ }
199
+ }
200
+ this.initdata()
201
+ }
202
+ }
203
+ }
204
+ </script>
@@ -55,15 +55,6 @@
55
55
  close-on-select search="true" @change="pcdChange">
56
56
  </v-select>
57
57
  </div>
58
- <div class="col-sm-6 form-group ">
59
- <label class="font_normal_body">街&ensp;道&ensp;办</label>
60
- <input type="text" v-show="false" v-model="streetmodel.f_street_manage_id">
61
- <v-select
62
- :value.sync="streetmodel.f_street_manage_id" :value-single="true"
63
- :options='streetmanagelist' placeholder='请选择'
64
- close-on-select search="true" @change="pcdChange">
65
- </v-select>
66
- </div>
67
58
  <div class="col-sm-6 form-group "
68
59
  :class="[$v.f_street.required ? 'has-error' : 'has-success']">
69
60
  <label class="font_normal_body">街道/乡镇</label>
@@ -129,7 +120,6 @@
129
120
  hasnumber: false
130
121
  },
131
122
  pcdslist:[],
132
- streetmanagelist: [],
133
123
  iscity:[{label:'市区',value:'市区'},{label:'乡镇',value:'乡镇'}],
134
124
  //省市区
135
125
  pcdmodel: {
@@ -142,7 +132,6 @@
142
132
  //街道
143
133
  streetmodel: {
144
134
  f_pcd_id:'',
145
- f_street_manage_id: '',
146
135
  f_street_id:'',
147
136
  slice_area: null,
148
137
  f_slice_area: null,
@@ -227,34 +216,6 @@
227
216
  this.pcdslist=redata
228
217
  })
229
218
  },
230
- //初始化省市区,添加街道
231
- initstreetmanage(pconditon){
232
- try{
233
- console.log("初始化街道办")
234
- let HttpReset = new HttpResetClass()
235
- HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
236
- data: {
237
- items: '*',
238
- tablename: 't_street_manage',
239
- orderitem: 'id',
240
- condition: '1=1'
241
- }
242
- }, {resolveMsg: null, rejectMsg: null}).then((req) => {
243
- let redata = []
244
- req.data.forEach((row, n) => {
245
- redata[n] = {
246
- label: row.f_street_manage_name,
247
- value: row.id,
248
- data:row,
249
- id:row.id
250
- }
251
- })
252
- this.streetmanagelist=redata
253
- })
254
- }catch (e) {
255
- console.log(e)
256
- }
257
- },
258
219
  //根据名字找数据
259
220
  findbyid(list,name){
260
221
  var result
@@ -314,7 +275,6 @@
314
275
  this.streetmodel.f_depid = this.$login.f.depids
315
276
  this.streetmodel.f_depname = this.$login.f.deps
316
277
  this.streetmodel.f_pcd=this.findbyid(this.pcdslist,this.streetmodel.f_pcd_id).f_pcd
317
- this.streetmodel.f_street_manage_name=this.findbyid(this.streetmanagelist,this.streetmodel.f_street_manage_id).f_street_manage_name
318
278
  console.log('获取街道model', this.streetmodel)
319
279
  await this.$resetpost('rs/logic/address_updatestreet', this.streetmodel)
320
280
  },
@@ -1,17 +1,17 @@
1
- <template>
2
- <liuli-render configname="query_address_list"></liuli-render>
3
- </template>
4
-
5
- <script>
6
- export default {
7
- title: '地址管理琉璃',
8
- data () {
9
- return {
10
- }
11
- },
12
- ready () {
13
- },
14
- methods: {
15
- }
16
- }
17
- </script>
1
+ <template>
2
+ <liuli-render configname="query_address_list"></liuli-render>
3
+ </template>
4
+
5
+ <script>
6
+ export default {
7
+ title: '地址管理琉璃',
8
+ data () {
9
+ return {
10
+ }
11
+ },
12
+ ready () {
13
+ },
14
+ methods: {
15
+ }
16
+ }
17
+ </script>
@@ -0,0 +1,66 @@
1
+ <template>
2
+ <div id="unit" class="flex-row " :class="{'binary':streetManageShow}">
3
+ <div :class="{'basic-main':!streetManageShow,'binary-left':streetManageShow}">
4
+ <community-manage-list @select-changed="selected"
5
+ :f_filialeids.sync="f_filialeids"
6
+ v-ref:communitymanage>
7
+ </community-manage-list>
8
+ </div>
9
+ <div v-show="streetManageShow" class="binary-right">
10
+ <add-community-manage-msg v-ref:addcommunitymanage
11
+ :f_filialeids.sync="f_filialeids">
12
+ </add-community-manage-msg>
13
+ </div>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ title: '社区管理',
20
+ components: {},
21
+ data () {
22
+ return {
23
+ // 分公司id串
24
+ f_filialeids: this.$login.f.orgid,
25
+ streetManageShow: false
26
+ }
27
+ },
28
+ props: {},
29
+ methods: {
30
+ selected (obj) {
31
+ if (obj.val && obj.val.id) {
32
+ if (obj.val.f_filialeid != this.f_filialeids) {
33
+ this.refresh()
34
+ return
35
+ }
36
+ this.streetManageShow = true
37
+ this.$refs.addcommunitymanage.businesstype = '修改' + obj.val.f_community_name
38
+ this.$refs.addcommunitymanage.communitymodel = Object.assign({}, obj.val)
39
+ }
40
+ },
41
+ refresh () {
42
+ this.streetManageShow = false
43
+ this.$refs.communitymanage.$refs.paged.$refs.cri.search()
44
+ }
45
+ },
46
+ events: {
47
+ 'add' (areatype) {
48
+ this.style = 'col-sm-3 '
49
+ this.streetManageShow = true
50
+ this.$refs.addcommunitymanage.businesstype = '新增'
51
+ this.$refs.addcommunitymanage.clearData()
52
+ },
53
+ 'confirm' () {
54
+ this.style = 'col-sm-2 '
55
+ this.refresh()
56
+ },
57
+ 'cancel' () {
58
+ this.style = 'col-sm-2 '
59
+ this.streetManageShow = false
60
+ this.$refs.communitymanage.$refs.paged.$refs.cri.search()
61
+ }
62
+ }
63
+ }
64
+ </script>
65
+
66
+