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,92 +1,113 @@
1
- <template>
2
- <div id="unit" class="flex-row">
3
- <div class="flex" style="flex: 1; width:60%">
4
- <address-list @select-changed="selected" v-ref:addresslist :f_filialeids.sync="f_filialeids"></address-list>
5
- </div>
6
- <div v-show="useraddressShow" style="width: 40%">
7
- <div class="flex">
8
- <user-address v-ref:useraddressmsg
9
- :f_filialeids.sync="f_filialeids" :row="row"></user-address>
10
-
11
- <user-address-change v-if="addressId" :address_id="addressId"></user-address-change>
12
- </div>
13
- </div>
14
- </div>
15
- </template>
16
-
17
- <script>
18
- export default {
19
- title: '地址管理',
20
- components:{
21
- },
22
- data () {
23
- return {
24
- //分公司id串
25
- f_filialeids: this.$login.f.f_orgids,
26
- area: [],
27
- street: [],
28
- residential: [],
29
- row: {},
30
- useraddressShow: false,
31
- addressId: null
32
- }
33
- },
34
- props:{
35
-
36
- },
37
- methods:{
38
- selected(obj){
39
- if(obj.val&&obj.val.id){
40
- // 呼叫中心需要
41
- this.$dispatch('re-ref', obj.val)
42
- this.addressId=obj.val.id
43
- this.useraddressShow=true
44
- this.$refs.useraddressmsg.cleardara()
45
- this.$refs.useraddressmsg.usertype=obj.val.f_user_type
46
- this.$refs.useraddressmsg.operation='modify'
47
- this.$refs.useraddressmsg.onedata='one'
48
- this.$refs.useraddressmsg.model=Object.assign({},obj.val)
49
- if(obj.val.f_special=='1'){
50
- this.$refs.useraddressmsg.usertype = true
51
- }else{
52
- this.$refs.useraddressmsg.usertype = false
53
- }
54
- this.$refs.useraddressmsg.initdata()
55
- }
56
- }
57
- },
58
- events:{
59
- 'add'(val){
60
- this.useraddressShow = true
61
- this.$refs.useraddressmsg.cleardara()
62
- this.addressId=null
63
- //true为新增特殊地址
64
- if (val!='民用') {
65
- //非民用
66
- this.$refs.useraddressmsg.usertype = true
67
- this.$refs.useraddressmsg.onedata = 'one'
68
- }else{
69
- this.$refs.useraddressmsg.usertype = false
70
- }
71
- this.$refs.useraddressmsg.operation='add'
72
- this.$refs.useraddressmsg.initdata()
73
- },
74
- 'confirm' () {
75
- console.log('地址管理变更。。')
76
- this.addressId=null
77
- this.$refs.addresslist.$refs.paged.$refs.cri.search()
78
- this.useraddressShow = false
79
- },
80
- 'modify'(area){
81
-
82
- },
83
- 'cancel' () {
84
- this.addressId=null
85
- this.$refs.addresslist.$refs.paged.$refs.cri.search()
86
- this.useraddressShow = false
87
- },
88
- }
89
- }
90
- </script>
91
- <style>
92
- </style>
1
+ <template>
2
+ <div id="unit" class="flex-row">
3
+ <div class="flex" style="flex: 1; width:60%">
4
+ <address-list @select-changed="selected" v-ref:addresslist :f_filialeids.sync="f_filialeids"></address-list>
5
+ </div>
6
+ <div v-show="useraddressShow" style="width: 40%">
7
+ <div class="flex">
8
+ <user-address v-ref:useraddressmsg
9
+ :f_filialeids.sync="f_filialeids" :row="row"></user-address>
10
+
11
+ <user-address-change v-if="addressId" :address_id="addressId"></user-address-change>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ </template>
16
+
17
+ <script>
18
+ export default {
19
+ title: '地址管理',
20
+ components:{
21
+ },
22
+ data () {
23
+ return {
24
+ //分公司id串
25
+ f_filialeids: this.$login.f.f_orgids,
26
+ area: [],
27
+ street: [],
28
+ residential: [],
29
+ row: {},
30
+ useraddressShow: false,
31
+ addressId: null
32
+ }
33
+ },
34
+ props:{
35
+ ishujiao:{
36
+ type: Boolean,
37
+ default: false
38
+ }
39
+ },
40
+ methods:{
41
+ selected(obj){
42
+ if(obj.val&&obj.val.id){
43
+ // 呼叫中心需要
44
+ this.row = obj.val
45
+ this.$refs.useraddressmsg.revise = true
46
+ // this.$dispatch('re-ref', obj.val)
47
+ this.addressId=obj.val.id
48
+ this.useraddressShow=true
49
+ this.$refs.useraddressmsg.cleardara()
50
+ this.$refs.useraddressmsg.usertype=obj.val.f_user_type
51
+ this.$refs.useraddressmsg.operation='modify'
52
+ this.$refs.useraddressmsg.onedata='one'
53
+ this.$refs.useraddressmsg.model=Object.assign({},obj.val)
54
+ if(obj.val.f_special=='1'){
55
+ this.$refs.useraddressmsg.usertype = true
56
+ }else{
57
+ this.$refs.useraddressmsg.usertype = false
58
+ }
59
+ this.$refs.useraddressmsg.initdata()
60
+ }
61
+ }
62
+ },
63
+ events:{
64
+ 'add'(val){
65
+ this.useraddressShow = true
66
+ this.$refs.useraddressmsg.cleardara()
67
+ this.addressId=null
68
+ //true为新增特殊地址
69
+ if (val!='民用') {
70
+ //非民用
71
+ this.$refs.useraddressmsg.usertype = true
72
+ this.$refs.useraddressmsg.onedata = 'one'
73
+ }else{
74
+ this.$refs.useraddressmsg.usertype = false
75
+ }
76
+ this.$refs.useraddressmsg.operation='add'
77
+ this.$refs.useraddressmsg.initdata()
78
+ },
79
+ 'confirm' () {
80
+ console.log('地址管理变更。。')
81
+ this.addressId=null
82
+ this.$refs.addresslist.$refs.paged.$refs.cri.search()
83
+ this.useraddressShow = false
84
+ },
85
+ 'modify'(area){
86
+
87
+ },
88
+
89
+ 'address_select'(){
90
+ console.log("我背选中了",JSON.stringify(this.row) )
91
+
92
+ if(this.$refs.useraddressmsg.revise){
93
+ //看看地址是否上传工单
94
+ this.$resetpost('rs/sql/address_singleTable',{data: {items: 'id',tablename: 't_service',condition: `f_addressid='${this.row.id}'`}}, {resolveMsg: null, rejectMsg: null}).then((rs)=>{
95
+ if(rs.data.length>0){
96
+ this.$showAlert('该地址已下发通气单','warning',900)
97
+ }else{
98
+ this.$dispatch('re-ref',this.row)
99
+ console.log("返回事件",this.row)
100
+ }
101
+ })
102
+ }
103
+ },
104
+ 'cancel' () {
105
+ this.addressId=null
106
+ this.$refs.addresslist.$refs.paged.$refs.cri.search()
107
+ this.useraddressShow = false
108
+ },
109
+ }
110
+ }
111
+ </script>
112
+ <style>
113
+ </style>
@@ -1,80 +1,80 @@
1
- <template>
2
- <div style="width: auto;">
3
- <partial-view v-ref:pv @condition-changed="selfSearch">
4
- <criteria-paged :model="model" v-ref:paged :pager="false">
5
- <criteria partial='criteria' v-ref:criteria>
6
- <div novalidate class="flex-row auto" partial>
7
- <div class="form-group" style="flex: 1;">
8
- <input type="text" class="form-control" v-model="model.f_residential_area"
9
- condition="f_residential_area like '%{}%'" placeholder='小区名称'>
10
- </div>
11
- <div class="form-group" style="margin-right: 0px;" id='filesArea'>
12
- <button class="btn btn-success width-100" @click="search()">查询</button>
13
- </div>
14
- </div>
15
- </criteria>
16
- <data-grid :model="model" partial='list' v-ref:grid >
17
- <template partial='head'>
18
- <tr>
19
- <th>序号</th>
20
- <th>小区详细地址</th>
21
- <th>操作</th>
22
- </tr>
23
- </template>
24
- <template partial='body'>
25
- <td id = "1" style="text-align: center;">{{$index + 1}}</td>
26
- <td>{{row.f_area_address}}-{{row.f_residential_area}}</td>
27
- <td style="text-align: center;">
28
- <button type="button" name="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$parent.foundFile(row)">建档</button>
29
- </td>
30
- </template>
31
- </data-grid>
32
- </criteria-paged>
33
- </partial-view>
34
- </div>
35
- </template>
36
-
37
- <script>
38
- import { PagedList } from 'vue-client'
39
-
40
- export default {
41
- title: '小区列表',
42
- data () {
43
- return {
44
- model: new PagedList('rs/sql/address_getArea', 500, {orderitem: '"a.id desc"'})
45
- }
46
- },
47
- props: ['f_filialeid'],
48
- ready () {
49
- this.search({condition: '1=1'})
50
- },
51
- methods: {
52
- foundFile (row) {
53
- console.log('小区建档', row)
54
- this.$emit('re-ref', row)
55
- },
56
- search (obj) {
57
- obj.condition += ` and a.f_filialeids = '${this.f_filialeid}'`
58
-
59
- this.$refs.pv.load('rs/sql/address_getArea', {data: {orderitem: 'a.id desc', condition: obj.condition}}).then((a) => {
60
- if (a.data.length === 0) {
61
- this.model.state = '错误'
62
- this.model.error = '没有相关的小区信息'
63
- } else {
64
- this.model.state = '正确'
65
- this.model.rows = a.data
66
- }
67
- this.$emit("ready")
68
- })
69
- },
70
- selfSearch (datas) {
71
- datas.condition += ` and a.f_filialeids = '${this.f_filialeid}'`
72
- this.model.search(datas.condition, this.model)
73
- },
74
- // 主要提供外部组件调用,刷新数据
75
- reflash () {
76
- this.$refs.paged.$refs.criteria.search()
77
- }
78
- }
79
- }
80
- </script>
1
+ <template>
2
+ <div style="width: auto;">
3
+ <partial-view v-ref:pv @condition-changed="selfSearch">
4
+ <criteria-paged :model="model" v-ref:paged :pager="false">
5
+ <criteria partial='criteria' v-ref:criteria>
6
+ <div novalidate class="flex-row auto" partial>
7
+ <div class="form-group" style="flex: 1;">
8
+ <input type="text" class="form-control" v-model="model.f_residential_area"
9
+ condition="f_residential_area like '%{}%'" placeholder='小区名称'>
10
+ </div>
11
+ <div class="form-group" style="margin-right: 0px;" id='filesArea'>
12
+ <button class="btn btn-success width-100" @click="search()">查询</button>
13
+ </div>
14
+ </div>
15
+ </criteria>
16
+ <data-grid :model="model" partial='list' v-ref:grid >
17
+ <template partial='head'>
18
+ <tr>
19
+ <th>序号</th>
20
+ <th>小区详细地址</th>
21
+ <th>操作</th>
22
+ </tr>
23
+ </template>
24
+ <template partial='body'>
25
+ <td id = "1" style="text-align: center;">{{$index + 1}}</td>
26
+ <td>{{row.f_area_address}}-{{row.f_residential_area}}</td>
27
+ <td style="text-align: center;">
28
+ <button type="button" name="button" class="btn btn-link" @click.stop="$parent.$parent.$parent.$parent.foundFile(row)">建档</button>
29
+ </td>
30
+ </template>
31
+ </data-grid>
32
+ </criteria-paged>
33
+ </partial-view>
34
+ </div>
35
+ </template>
36
+
37
+ <script>
38
+ import { PagedList } from 'vue-client'
39
+
40
+ export default {
41
+ title: '小区列表',
42
+ data () {
43
+ return {
44
+ model: new PagedList('rs/sql/address_getArea', 500, {orderitem: '"a.id desc"'})
45
+ }
46
+ },
47
+ props: ['f_filialeid'],
48
+ ready () {
49
+ this.search({condition: '1=1'})
50
+ },
51
+ methods: {
52
+ foundFile (row) {
53
+ console.log('小区建档', row)
54
+ this.$emit('re-ref', row)
55
+ },
56
+ search (obj) {
57
+ obj.condition += ` and a.f_filialeids = '${this.f_filialeid}'`
58
+
59
+ this.$refs.pv.load('rs/sql/address_getArea', {data: {orderitem: 'a.id desc', condition: obj.condition}}).then((a) => {
60
+ if (a.data.length === 0) {
61
+ this.model.state = '错误'
62
+ this.model.error = '没有相关的小区信息'
63
+ } else {
64
+ this.model.state = '正确'
65
+ this.model.rows = a.data
66
+ }
67
+ this.$emit("ready")
68
+ })
69
+ },
70
+ selfSearch (datas) {
71
+ datas.condition += ` and a.f_filialeids = '${this.f_filialeid}'`
72
+ this.model.search(datas.condition, this.model)
73
+ },
74
+ // 主要提供外部组件调用,刷新数据
75
+ reflash () {
76
+ this.$refs.paged.$refs.criteria.search()
77
+ }
78
+ }
79
+ }
80
+ </script>