address-client 3.2.88 → 3.2.89

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,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>
@@ -1,68 +1,68 @@
1
- <template>
2
- <div id="unit" class="flex-row " :class="{'binary':streetManageShow}">
3
- <div :class="{'basic-main':!streetManageShow,'binary-left':streetManageShow}">
4
- <street-manage-list @select-changed="selected"
5
- :f_filialeids.sync="f_filialeids"
6
- v-ref:streetmanage>
7
- </street-manage-list>
8
- </div>
9
- <div v-show="streetManageShow" class="binary-right">
10
- <add-street-manage-msg v-ref:addstreetmanage
11
- :f_filialeids.sync="f_filialeids">
12
- </add-street-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.addstreetmanage.businesstype = '修改' + obj.val.f_street_manage_name
38
- this.$refs.addstreetmanage.streetmanagemodel = Object.assign({},obj.val)
39
- this.$refs.addstreetmanage.initdata()
40
- }
41
- },
42
- async refresh() {
43
- this.streetManageShow = false
44
- await this.$refs.streetmanage.$refs.paged.$refs.cri.search()
45
- }
46
- },
47
- events: {
48
- 'add'(areatype) {
49
- this.style = 'col-sm-3 '
50
- this.streetManageShow = true
51
- this.$refs.addstreetmanage.businesstype = '增加'
52
- this.$refs.addstreetmanage.clearData()
53
- this.$refs.addstreetmanage.initdata()
54
- },
55
- 'confirm'() {
56
- this.style = 'col-sm-2 '
57
- this.refresh()
58
- },
59
- 'cancel'() {
60
- this.style = 'col-sm-2 '
61
- this.streetManageShow = false
62
- this.$refs.streetmanage.$refs.paged.$refs.cri.search()
63
- }
64
- }
65
- }
66
- </script>
67
-
68
-
1
+ <template>
2
+ <div id="unit" class="flex-row " :class="{'binary':streetManageShow}">
3
+ <div :class="{'basic-main':!streetManageShow,'binary-left':streetManageShow}">
4
+ <street-manage-list @select-changed="selected"
5
+ :f_filialeids.sync="f_filialeids"
6
+ v-ref:streetmanage>
7
+ </street-manage-list>
8
+ </div>
9
+ <div v-show="streetManageShow" class="binary-right">
10
+ <add-street-manage-msg v-ref:addstreetmanage
11
+ :f_filialeids.sync="f_filialeids">
12
+ </add-street-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.addstreetmanage.businesstype = '修改' + obj.val.f_street_manage_name
38
+ this.$refs.addstreetmanage.streetmanagemodel = Object.assign({},obj.val)
39
+ this.$refs.addstreetmanage.initdata()
40
+ }
41
+ },
42
+ async refresh() {
43
+ this.streetManageShow = false
44
+ await this.$refs.streetmanage.$refs.paged.$refs.cri.search()
45
+ }
46
+ },
47
+ events: {
48
+ 'add'(areatype) {
49
+ this.style = 'col-sm-3 '
50
+ this.streetManageShow = true
51
+ this.$refs.addstreetmanage.businesstype = '增加'
52
+ this.$refs.addstreetmanage.clearData()
53
+ this.$refs.addstreetmanage.initdata()
54
+ },
55
+ 'confirm'() {
56
+ this.style = 'col-sm-2 '
57
+ this.refresh()
58
+ },
59
+ 'cancel'() {
60
+ this.style = 'col-sm-2 '
61
+ this.streetManageShow = false
62
+ this.$refs.streetmanage.$refs.paged.$refs.cri.search()
63
+ }
64
+ }
65
+ }
66
+ </script>
67
+
68
+
@@ -1,225 +1,225 @@
1
- <template>
2
- <div class="flex" @keyup.enter="search">
3
- <criteria-paged :model="model" v-ref:paged>
4
- <criteria partial='criteria' @condition-changed='$parent.selfSearch' @sort="sort()" v-ref:cri>
5
- <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
- <div class="row">
7
- <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
8
- <label class="font_normal_body">组织机构</label>
9
- <res-select restype='organization'
10
- @res-select="$parent.$parent.getorg"
11
- :initresid='$parent.$parent.curorgid'>
12
- </res-select>
13
- </div>
14
- <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
15
- <label class="font_normal_body">街道办名称</label>
16
- <input type="text" class="input_search" style="width:60%" v-model="model.f_street_manage_name"
17
- condition="f_street_manage_name like '%{}%'" placeholder="街道办名称"/>
18
- </div>
19
- <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
20
- <label class="font_normal_body">街道办编号</label>
21
- <input type="text" class="input_search" style="width:60%" v-model="model.f_street_manage_number"
22
- condition="f_street_manage_number = '{}'" placeholder="街道办编号"/>
23
- </div>
24
- <div class="col-sm-4 form-group button-range">
25
- <button class="button_search button_spacing" @click="search()" >查询</button>
26
- <button class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add()">添加街道办</button>
27
- <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
28
- <export-excel :data="$parent.$parent.getCondition"
29
- :field="$parent.$parent.getfield"
30
- sqlurl="rs/logic/exportfile"
31
- sql-name="manage_getStreetManageList"
32
- template-name='街道办信息查询导出'
33
- :choose-col="true"></export-excel>
34
- <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
35
- </div>
36
- </div>
37
- <div class="row" v-show="$parent.$parent.criteriaShow">
38
- <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
39
- <label class="font_normal_body">省&emsp;&emsp;份</label>
40
- <input type="text" style="width:60%" class="input_search" v-model="model.f_province"
41
- condition="f_province like '%{}%'" placeholder="省份"
42
- :size="model.f_province ? model.f_province.length*2 : 6"/>
43
- </div>
44
- <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
45
- <label class="font_normal_body">城&emsp;&emsp;市</label>
46
- <input type="text" style="width:60%" class="input_search" v-model="model.f_city"
47
- condition="f_city like '%{}%'" placeholder="城市"
48
- :size="model.f_city ? model.f_city.length*2 : 6"/>
49
- </div>
50
- <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
51
- <label class="font_normal_body">区&emsp;&emsp;县</label>
52
- <input type="text" style="width:60%" class="input_search" v-model="model.f_district"
53
- condition="f_district like '%{}%'" placeholder="区县"
54
- :size="model.f_district ? model.f_district.length*2 : 6"/>
55
- </div>
56
- </div>
57
- </div>
58
- </criteria>
59
- <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
60
- <template partial='head'>
61
- <tr>
62
- <th><nobr>序号</nobr></th>
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
- <th><data-order field="f_address" name="地址"
69
- :order.sync="$parent.$parent.$parent.$parent.orderFields.f_address"></data-order></th>
70
- <th><nobr>分公司</nobr></th>
71
- <th title="该街道办下现有的街道数"><nobr>街道数量</nobr></th>
72
- <th><nobr>操作</nobr></th>
73
- </tr>
74
- </template>
75
- <template partial='body'>
76
- <tr>
77
- <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
78
- <td style="text-align:center"><nobr>{{row.f_province}}</nobr></td>
79
- <td style="text-align:center"><nobr>{{row.f_city}}</nobr></td>
80
- <td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
81
- <td style="text-align:center"><nobr>{{row.f_street_manage_name}}</nobr></td>
82
- <td style="text-align:center"><nobr>{{row.f_street_manage_number}}</nobr></td>
83
- <td style="text-align:center"><nobr>{{row.f_pcd}}{{row.f_street}}</nobr></td>
84
- <td style="text-align:center"><nobr>{{row.f_orgname}}</nobr></td>
85
- <td style="text-align:center"><nobr>{{row.streetnum}}</nobr></td>
86
- <td style="text-align:center">
87
- <nobr>
88
- <button v-if="!row.streetmanageid"
89
- type="button"
90
- name="button"
91
- class="btn btn-danger"
92
- style="padding: 5px 12px"
93
- @click.stop="$parent.$parent.$parent.delete(row)">
94
- 删除
95
- </button>
96
- </nobr>
97
- </td>
98
- </tr>
99
- </template>
100
- <template partial='foot'></template>
101
- </data-grid>
102
- </criteria-paged>
103
- </div>
104
- </template>
105
-
106
- <script>
107
- import { PagedList } from 'vue-client'
108
- let readyGen = async function (self) {
109
- self.getfield = self.config.excelHeaders
110
- }
111
- export default {
112
- data () {
113
- return {
114
- criteriaShow: false,
115
- model: new PagedList('rs/sql/address_getStreetManageList',20,{orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_city,f_iscity,f_street_manage_name desc'`}),
116
- addflag: false,
117
- getfield: {},
118
- //排序
119
- orderitem:'f_city,f_iscity,f_street_manage_name desc',
120
- addtitle:'',
121
- // 公司下拉
122
- curorgid: [this.$login.f.orgid],
123
- f_orgid: '',
124
- config: {
125
- // 导出列要和查询列相同
126
- excelHeaders: {
127
- 'f_province':'省份',
128
- 'f_city':'城市',
129
- 'f_district':'区/县',
130
- 'f_street_manage_name':'街道办名称',
131
- 'f_orgname':'分公司',
132
- 'streetnum':'街道数量'
133
- }
134
- },
135
- orderFields: {
136
- f_operate_date: 'no'
137
- },
138
- }
139
- },
140
- title: '街道办管理',
141
- ready(){
142
- readyGen(this)
143
- this.search()
144
- },
145
- methods: {
146
- hidden() {
147
- this.criteriaShow = !this.criteriaShow
148
- },
149
- search () {
150
- this.$refs.paged.$refs.cri.search()
151
- },
152
- async delete(row){
153
- if(row.id >= 0 ){
154
- var id = row.id
155
- let useraredss = await this.$resetpost('rs/sql/address_singleTable',
156
- {data: {
157
- items: 'id',
158
- tablename: 't_street',
159
- condition: `f_street_manage_id=${id}`}
160
- },
161
- {resolveMsg: null, rejectMsg: null})
162
- if(useraredss.data.length>0){
163
- this.$showAlert('该街道办下已有街道信息,无法删除!','warning',1000)
164
- }else{
165
- this.$resetdelete('rs/entity/t_street_manage', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
166
- this.$dispatch('cancel')
167
- })
168
- }
169
- }
170
- },
171
- add(val){
172
- if (this.f_filialeids) {
173
- this.$refs.paged.$refs.grid.selectStore.selected = null
174
- this.$dispatch('add',val)
175
- } else {
176
- this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
177
- }
178
- },
179
- selfSearch (args) {
180
- if (!this.f_orgid) {
181
- this.getorg([this.$login.f.orgid])
182
- }
183
- args.condition = `${args.condition}`
184
- this.model.search(args.condition, args.model)
185
- },
186
- //清空
187
- clear(){
188
- this.$refs.paged.$refs.cri.model = {}
189
- },
190
- getorg (val) {
191
- this.f_orgid = this.$login.convertToIn(val)
192
- this.f_filialeids = val[0]
193
- }
194
- },
195
- computed: {
196
- getCondition() {
197
- return {
198
- condition: `${this.$refs.paged.$refs.cri.condition}`,
199
- orderitem: this.orderitem ? `${this.orderitem}` : " id desc"
200
- }
201
- }
202
- },
203
- events:{
204
- 'sort' (field, rule) {
205
- // 将所有排序方式设为不排序,实现相互排斥
206
- console.log("field",field, rule)
207
- for (let key in this.orderFields) {
208
- if (key === field) {
209
- this.orderFields[key] = rule
210
- } else {
211
- this.orderFields[key] = 'no'
212
- }
213
- }
214
- // 如果新规则不排序,还原为默认排序
215
- if (rule === 'no') {
216
- this.model.paramSource.orderitem = `'${this.orderitem}'`
217
- } else {
218
- this.model.paramSource.orderitem = `'${field} ${rule}'`
219
- }
220
-
221
- this.search()
222
- },
223
- },
224
- }
225
- </script>
1
+ <template>
2
+ <div class="flex" @keyup.enter="search">
3
+ <criteria-paged :model="model" v-ref:paged>
4
+ <criteria partial='criteria' @condition-changed='$parent.selfSearch' @sort="sort()" v-ref:cri>
5
+ <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
6
+ <div class="row">
7
+ <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
8
+ <label class="font_normal_body">组织机构</label>
9
+ <res-select restype='organization'
10
+ @res-select="$parent.$parent.getorg"
11
+ :initresid='$parent.$parent.curorgid'>
12
+ </res-select>
13
+ </div>
14
+ <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
15
+ <label class="font_normal_body">街道办名称</label>
16
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street_manage_name"
17
+ condition="f_street_manage_name like '%{}%'" placeholder="街道办名称"/>
18
+ </div>
19
+ <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
20
+ <label class="font_normal_body">街道办编号</label>
21
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_street_manage_number"
22
+ condition="f_street_manage_number = '{}'" placeholder="街道办编号"/>
23
+ </div>
24
+ <div class="col-sm-4 form-group button-range">
25
+ <button class="button_search button_spacing" @click="search()" >查询</button>
26
+ <button class="button_new button_spacing" style="width: max-content;" @click="$parent.$parent.add()">添加街道办</button>
27
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
28
+ <export-excel :data="$parent.$parent.getCondition"
29
+ :field="$parent.$parent.getfield"
30
+ sqlurl="rs/logic/exportfile"
31
+ sql-name="manage_getStreetManageList"
32
+ template-name='街道办信息查询导出'
33
+ :choose-col="true"></export-excel>
34
+ <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}" @click="$parent.$parent.hidden()"></div>
35
+ </div>
36
+ </div>
37
+ <div class="row" v-show="$parent.$parent.criteriaShow">
38
+ <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
39
+ <label class="font_normal_body">省&emsp;&emsp;份</label>
40
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_province"
41
+ condition="f_province like '%{}%'" placeholder="省份"
42
+ :size="model.f_province ? model.f_province.length*2 : 6"/>
43
+ </div>
44
+ <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
45
+ <label class="font_normal_body">城&emsp;&emsp;市</label>
46
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_city"
47
+ condition="f_city like '%{}%'" placeholder="城市"
48
+ :size="model.f_city ? model.f_city.length*2 : 6"/>
49
+ </div>
50
+ <div class="form-group" :class="{'col-sm-3':$parent.$parent.$parent.areaShow,'col-sm-2':!$parent.$parent.$parent.areaShow}">
51
+ <label class="font_normal_body">区&emsp;&emsp;县</label>
52
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_district"
53
+ condition="f_district like '%{}%'" placeholder="区县"
54
+ :size="model.f_district ? model.f_district.length*2 : 6"/>
55
+ </div>
56
+ </div>
57
+ </div>
58
+ </criteria>
59
+ <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid>
60
+ <template partial='head'>
61
+ <tr>
62
+ <th><nobr>序号</nobr></th>
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
+ <th><data-order field="f_address" name="地址"
69
+ :order.sync="$parent.$parent.$parent.$parent.orderFields.f_address"></data-order></th>
70
+ <th><nobr>分公司</nobr></th>
71
+ <th title="该街道办下现有的街道数"><nobr>街道数量</nobr></th>
72
+ <th><nobr>操作</nobr></th>
73
+ </tr>
74
+ </template>
75
+ <template partial='body'>
76
+ <tr>
77
+ <td style="text-align:center"><nobr>{{$index + 1}}</nobr></td>
78
+ <td style="text-align:center"><nobr>{{row.f_province}}</nobr></td>
79
+ <td style="text-align:center"><nobr>{{row.f_city}}</nobr></td>
80
+ <td style="text-align:center"><nobr>{{row.f_district}}</nobr></td>
81
+ <td style="text-align:center"><nobr>{{row.f_street_manage_name}}</nobr></td>
82
+ <td style="text-align:center"><nobr>{{row.f_street_manage_number}}</nobr></td>
83
+ <td style="text-align:center"><nobr>{{row.f_pcd}}{{row.f_street}}</nobr></td>
84
+ <td style="text-align:center"><nobr>{{row.f_orgname}}</nobr></td>
85
+ <td style="text-align:center"><nobr>{{row.streetnum}}</nobr></td>
86
+ <td style="text-align:center">
87
+ <nobr>
88
+ <button v-if="!row.streetmanageid"
89
+ type="button"
90
+ name="button"
91
+ class="btn btn-danger"
92
+ style="padding: 5px 12px"
93
+ @click.stop="$parent.$parent.$parent.delete(row)">
94
+ 删除
95
+ </button>
96
+ </nobr>
97
+ </td>
98
+ </tr>
99
+ </template>
100
+ <template partial='foot'></template>
101
+ </data-grid>
102
+ </criteria-paged>
103
+ </div>
104
+ </template>
105
+
106
+ <script>
107
+ import { PagedList } from 'vue-client'
108
+ let readyGen = async function (self) {
109
+ self.getfield = self.config.excelHeaders
110
+ }
111
+ export default {
112
+ data () {
113
+ return {
114
+ criteriaShow: false,
115
+ model: new PagedList('rs/sql/address_getStreetManageList',20,{orderitem: this.orderitem?'"' + this.orderitem + ' "':`'f_city,f_iscity,f_street_manage_name desc'`}),
116
+ addflag: false,
117
+ getfield: {},
118
+ //排序
119
+ orderitem:'f_city,f_iscity,f_street_manage_name desc',
120
+ addtitle:'',
121
+ // 公司下拉
122
+ curorgid: [this.$login.f.orgid],
123
+ f_orgid: '',
124
+ config: {
125
+ // 导出列要和查询列相同
126
+ excelHeaders: {
127
+ 'f_province':'省份',
128
+ 'f_city':'城市',
129
+ 'f_district':'区/县',
130
+ 'f_street_manage_name':'街道办名称',
131
+ 'f_orgname':'分公司',
132
+ 'streetnum':'街道数量'
133
+ }
134
+ },
135
+ orderFields: {
136
+ f_operate_date: 'no'
137
+ },
138
+ }
139
+ },
140
+ title: '街道办管理',
141
+ ready(){
142
+ readyGen(this)
143
+ this.search()
144
+ },
145
+ methods: {
146
+ hidden() {
147
+ this.criteriaShow = !this.criteriaShow
148
+ },
149
+ search () {
150
+ this.$refs.paged.$refs.cri.search()
151
+ },
152
+ async delete(row){
153
+ if(row.id >= 0 ){
154
+ var id = row.id
155
+ let useraredss = await this.$resetpost('rs/sql/address_singleTable',
156
+ {data: {
157
+ items: 'id',
158
+ tablename: 't_street',
159
+ condition: `f_street_manage_id=${id}`}
160
+ },
161
+ {resolveMsg: null, rejectMsg: null})
162
+ if(useraredss.data.length>0){
163
+ this.$showAlert('该街道办下已有街道信息,无法删除!','warning',1000)
164
+ }else{
165
+ this.$resetdelete('rs/entity/t_street_manage', {id: id}, {resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
166
+ this.$dispatch('cancel')
167
+ })
168
+ }
169
+ }
170
+ },
171
+ add(val){
172
+ if (this.f_filialeids) {
173
+ this.$refs.paged.$refs.grid.selectStore.selected = null
174
+ this.$dispatch('add',val)
175
+ } else {
176
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
177
+ }
178
+ },
179
+ selfSearch (args) {
180
+ if (!this.f_orgid) {
181
+ this.getorg([this.$login.f.orgid])
182
+ }
183
+ args.condition = `${args.condition}`
184
+ this.model.search(args.condition, args.model)
185
+ },
186
+ //清空
187
+ clear(){
188
+ this.$refs.paged.$refs.cri.model = {}
189
+ },
190
+ getorg (val) {
191
+ this.f_orgid = this.$login.convertToIn(val)
192
+ this.f_filialeids = val[0]
193
+ }
194
+ },
195
+ computed: {
196
+ getCondition() {
197
+ return {
198
+ condition: `${this.$refs.paged.$refs.cri.condition}`,
199
+ orderitem: this.orderitem ? `${this.orderitem}` : " id desc"
200
+ }
201
+ }
202
+ },
203
+ events:{
204
+ 'sort' (field, rule) {
205
+ // 将所有排序方式设为不排序,实现相互排斥
206
+ console.log("field",field, rule)
207
+ for (let key in this.orderFields) {
208
+ if (key === field) {
209
+ this.orderFields[key] = rule
210
+ } else {
211
+ this.orderFields[key] = 'no'
212
+ }
213
+ }
214
+ // 如果新规则不排序,还原为默认排序
215
+ if (rule === 'no') {
216
+ this.model.paramSource.orderitem = `'${this.orderitem}'`
217
+ } else {
218
+ this.model.paramSource.orderitem = `'${field} ${rule}'`
219
+ }
220
+
221
+ this.search()
222
+ },
223
+ },
224
+ }
225
+ </script>