system-clients 3.1.74-xianyang → 3.1.79-xianyang

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,315 +1,299 @@
1
- <template>
2
- <div class="auto select-overspread">
3
- <validator name='v'>
4
- <ul class="nav nav-tabs">
5
- <li role="presentation" class="active"><a href="#">POS</a></li>
6
- </ul>
7
- <form novalidate class="form-horizontal">
8
- <div class="row">
9
- <div class="col-sm-4 form-group">
10
- <label class="font_normal_body">所属人员</label>
11
- <right-tree @re-res="getRes" :source="source"></right-tree>
12
- </div>
13
- <div class="col-sm-4 form-group" :class="[$v.f_terminal_number.required ? 'has-error' : '']">
14
- <label class="font_normal_body">设备编号</label>
15
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_terminal_number"
16
- placeholder="设备编号" v-el:f_terminal_number
17
- v-validate:f_terminal_number='{required :true}'/>
18
- </div>
19
- <div class="col-sm-4 form-group" :class="[$v.f_terminal_name.required ? 'has-error' : '']">
20
- <label class="font_normal_body">设备名称</label>
21
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_terminal_name"
22
- placeholder="设备名称"
23
- v-validate:f_terminal_name='{required: true}'/>
24
- </div>
25
- <div class="col-sm-4 form-group" :class="{'has-error': $v.f_equipment_type.required}">
26
- <label class="font_normal_body">设备类型</label>
27
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_equipment_type"
28
- placeholder="设备类型"
29
- v-validate:f_equipment_type="{required: true}"/>
30
- </div>
31
- <div class="col-sm-4 form-group">
32
- <label class="font_normal_body">MAC&nbsp;号&nbsp;</label>
33
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_mac_number" placeholder="MAC号">
34
- </div>
35
- <div class="col-sm-4 form-group">
36
- <label class="font_normal_body">机器编号</label>
37
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_machine_number"
38
- placeholder="机器编号">
39
- </div>
40
- <div class="col-sm-4 form-group" :class="{'has-error': $v.f_phone.required}">
41
- <label class="font_normal_body">联系电话</label>
42
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_phone" placeholder="联系电话"
43
- v-validate:f_phone="{required: true}">
44
- <!-- <div class="font_normal_body" v-if="$v.f_phone.minlength || $v.f_phone.maxlength"><span>手机号必须7-11位</span></div>-->
45
- </div>
46
- <div class="col-sm-4 form-group" :class="{'has-error': $v.f_address.required}">
47
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;所在地</label>
48
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_address" placeholder="所在地"
49
- v-validate:f_address="{required: true}">
50
- </div>
51
- <div class="col-sm-4 form-group" :class="{'has-error': $v.f_bank_name.required}">
52
- <label class="font_normal_body">所属银行</label>
53
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_bank_name" placeholder="所属银行"
54
- v-validate:f_bank_name="{required: true}">
55
- </div>
56
- </div>
57
- <div class="col-sm-12 form-group">
58
- <label class="font_normal_body ">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
59
- <textarea class="input_textarea" rows="3" style="width:80%;margin-top:5px"
60
- v-model="model.f_comments"></textarea>
61
- </div>
62
- </form>
63
- <div style="text-align:right;height:auto;">
64
- <button class="button_search" @click="uploadFiles()" v-if="info">上传图片</button>
65
- <button class="btn btn-info" @click="upgrade()" v-if="info && data.f_state==='正常'">升级</button>
66
- <button class="btn btn-success" @click="getEditState()" v-if="model.f_state === '停用' && info">启用</button>
67
- <button class="btn btn-danger" @click="getEditState()" v-if="model.f_state === '正常' && info">停用</button>
68
- <button class="btn button_search" @click="confirm()" :disabled="!$v.valid">确认</button>
69
- <button class="btn button_clear " @click="cancel()">取消</button>
70
- </div>
71
- <modal :show.sync="showfiles" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
72
- <article slot="modal-body">
73
- <upload :blodid="model.f_userinfo_id" :businessid="model.id" v-ref:upload fusetype="收费" isremark="true"
74
- style="width:auto"></upload>
75
- </article>
76
- <footer slot="modal-footer" class="modal-footer">
77
- </footer>
78
- </modal>
79
-
80
- <modal v-if="show" :show.sync="show" v-ref:modal backdrop="false">
81
- <header slot="modal-header" class="modal-header">
82
- <button type="button" class="close" @click="close"><span>&times;</span></button>
83
- <h4 class="modal-title">pos机升级</h4>
84
- </header>
85
- <article slot="modal-body" class="modal-body">
86
- <form class="form-horizontal">
87
- <div class="row">
88
- <div>
89
- <h4>是否升级?</h4>
90
- </div>
91
- <!-- <div class="col-sm-6 form-group">-->
92
- <!-- <label class="font_normal_body">参数名称</label>-->
93
- <!-- <input type="text" class="input_search" style="width: 60%" v-model="modifyItem.name" @keyup.enter="confirm">-->
94
- <!-- </div>-->
95
- <!-- <div class="col-sm-6 form-group" v-if="modifyItem.EntityType === 't_parameter'">-->
96
- <!-- <div class="checkbox">-->
97
- <!-- <label>-->
98
- <!-- <input type="checkbox" v-model="modifyItem.isGlobal" :checked="modifyItem.isGlobal">是否全局-->
99
- <!-- </label>-->
100
- <!-- </div>-->
101
- <!-- </div>-->
102
- </div>
103
- </form>
104
- </article>
105
- <footer slot="modal-footer" class="modal-footer">
106
- <button type="button" class="button_search button_spacing" @click='upgradeRoot()'>是</button>
107
- <button type="button" class="button_clear button_spacing" @click='close'>否</button>
108
- </footer>
109
- </modal>
110
- </validator>
111
-
112
- </div>
113
- </template>
114
- <script>
115
- import {PagedList} from 'vue-client'
116
-
117
- export default {
118
- data() {
119
- return {
120
- checkparam: false,
121
- source: `tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`,
122
- model: {
123
- f_terminal_number: '',
124
- f_terminal_name: '',
125
- f_mac_number: '',
126
- // f_username:'',
127
- f_bank_name: '',
128
- f_equipment_type: 'POS',
129
- f_state: '正常',
130
- f_machine_number: '',
131
- f_phone: '',
132
- f_comments: '',
133
- f_address: '',
134
- f_filialeids: '',
135
- f_orgid: ''
136
- },
137
- showfiles: false,
138
- show: false,
139
- infoadd: this.infoadd,
140
- isSelPop: false
141
- }
142
- },
143
- props: ['data', 'f_filialeids', 'info'],
144
-
145
- watch: {
146
- 'data'(val) {
147
- if (val) {
148
- this.edit(val)
149
- } else {
150
- this.initModel()
151
- }
152
- }
153
- },
154
- ready() {
155
- console.log('mac信息:', this.data)
156
- if (this.data) {
157
- this.edit(this.data)
158
- }
159
- console.log('查看是否隐藏', this.info)
160
- },
161
-
162
- methods: {
163
- recursiveSelOrg(val, flag) {
164
- if (val.parent) {
165
- if (val.parent.resourcetype === flag) {
166
- return {id: val.parent.id, name: val.parent.name}
167
- } else {
168
- return this.recursiveSelOrg(val.parent, flag)
169
- }
170
- } else {
171
- return {id: '', name: ''}
172
- }
173
- },
174
- getRes(val) {
175
- console.log('====================', val)
176
- if (val.orgobj.length === 1 && val.orgobj[0].resourcetype === 'user') {
177
-
178
- let org = this.recursiveSelOrg(val.orgobj[0], 'organization')
179
- this.model.f_user_orgid = org.id
180
- this.model.f_user_orgname = org.name
181
- let dep = this.recursiveSelOrg(val.orgobj[0], 'department')
182
- this.model.f_user_depid = dep.id
183
- this.model.f_user_depname = dep.name
184
-
185
- this.model.f_user_operatorid = val.orgobj[0].userid
186
- this.model.f_user_operator = val.orgobj[0].name
187
- this.isSelPop = true
188
- } else {
189
- // 不可提交
190
- this.isSelPop = false
191
- }
192
- },
193
- close() {
194
- this.show = false
195
- },
196
- uploadFiles() {
197
- this.showfiles = !this.showfiles
198
- },
199
- getEditState() {
200
- if (this.model.f_state === '正常') {
201
- this.$showMessage(`当前设备号: ${this.model.f_terminal_number} ,确认停用该设备?`, ['confirm', 'cancel']).then((res) => {
202
- if (res === 'confirm') {
203
- this.$showAlert(`已向设备号: ${this.model.f_terminal_number}发送停用指令,请稍后查看执行结果!`, 'success', 2500)
204
- this.model.f_state = '停用'
205
- try {
206
- // 测试接口
207
- // this.$resetpost('rs/logic/updatePosState', {data: {number: this.model.f_terminal_number, state: '停用'}}, {resolveMsg: null, rejectMsg: null}, 0)
208
- // .then((res) => {})
209
- this.$resetpost('rs/logic/batchPos', {data: {tasks: [this.data], taskState: 0}}, {
210
- rejectMsg: null,
211
- resolveMsg: null
212
- })
213
- } catch (error) {
214
- this.search()
215
- }
216
- }
217
- })
218
- } else if (this.model.f_state === '停用') {
219
- this.$showMessage(`当前设备号: ${this.model.f_terminal_number} ,确认启用该设备?`, ['confirm', 'cancel']).then((res) => {
220
- if (res === 'confirm') {
221
- this.$showAlert(`已向设备号: ${this.model.f_terminal_number}发送启用指令,请稍后查看执行结果!`, 'success', 2500)
222
- this.model.f_state = '正常'
223
- try {
224
- // 测试接口
225
- // this.$resetpost('rs/logic/getEditPosState', {data: {number: this.model.f_terminal_number, state: '正常'}}, {resolveMsg: null, rejectMsg: null}, 0)
226
- // .then((res) => {})
227
- this.$resetpost('rs/logic/batchPos', {data: {tasks: [this.data], taskState: 1}}, {
228
- rejectMsg: null,
229
- resolveMsg: null
230
- })
231
- } catch (error) {
232
- this.search()
233
- }
234
- }
235
- })
236
- }
237
- },
238
- editBeizhu(val) {
239
- this.editshow = true
240
- this.posBase = val
241
- },
242
-
243
- //升级
244
- upgrade() {
245
- this.show = true
246
- },
247
- upgradeRoot() {
248
- this.$resetpost('rs/logic/batchPos', {data: {tasks: [this.data], taskState: 2}}, {
249
- rejectMsg: null,
250
- resolveMsg: null
251
- })
252
- this.$dispatch('refresh')
253
- // this.$resetpost('rs/logic/t_equipment', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
254
- // this.$dispatch('refresh')
255
- // }).catch((error) => {
256
- // this.$dispatch('refresh')
257
- // })
258
- },
259
- search() {
260
- this.$refs.paged.$refs.cri.search()
261
- },
262
- confirm() {
263
- // 如果是修改的话,只修改页面上用户填写的信息
264
- if (!this.info) {
265
- this.model.f_online = '离线'
266
- this.model.f_operator = this.$login.f.name
267
- this.model.f_orgid = this.$login.f.orgid
268
- this.model.f_filialeids = this.$login.f.orgid
269
- this.model.f_operatorid = this.$login.f.id
270
- this.model.f_orgname = this.$login.f.orgs
271
- this.model.f_depid = this.$login.f.depids
272
- this.model.f_depname = this.$login.f.deps
273
- this.model.f_orgstr = this.$login.f.fullids
274
- }
275
- this.$resetpost('rs/entity/t_equipment', this.model, {resolveMsg: '保存成功', rejectMsg: '保存失败'}).then((res) => {
276
- this.$dispatch('refresh')
277
- }).catch((error) => {
278
- this.$dispatch('refresh')
279
- })
280
-
281
- },
282
- edit(row) {
283
- this.model.f_terminal_number = row.f_terminal_number
284
- this.model.f_terminal_name = row.f_terminal_name
285
- this.model.f_bank_name = row.f_bank_name
286
- this.model.f_machine_number = row.f_machine_number
287
- this.model.f_mac_number = row.f_mac_number
288
- this.model.f_address = row.f_address
289
- this.model.f_phone = row.f_phone
290
- this.model.f_state = row.f_state
291
- this.model.f_comments = row.f_comments
292
- // this.model.f_username=row.f_username
293
- this.model.id = row.id
294
- this.model.f_filialeids = row.f_filialeids
295
- this.model.f_orgid = row.f_orgid
296
- },
297
- initModel() {
298
- delete this.model.id
299
- this.model.f_terminal_number = ''
300
- this.model.f_terminal_name = ''
301
- this.model.f_bank_name = ''
302
- this.model.f_machine_number = ''
303
- this.model.f_state = '正常'
304
- this.model.f_phone = ''
305
- this.model.f_address = ''
306
- this.model.f_filialeids = ''
307
- this.model.f_orgid = ''
308
- this.model.f_comments = ''
309
- },
310
- cancel() {
311
- this.$dispatch('close')
312
- }
313
- }
314
- }
315
- </script>
1
+ <template>
2
+ <div class="auto select-overspread">
3
+ <validator name='v'>
4
+ <ul class="nav nav-tabs" >
5
+ <li role="presentation" class="active"><a href="#">POS</a></li>
6
+ </ul>
7
+ <form novalidate class="form-horizontal" >
8
+ <div class="row">
9
+ <div class="col-sm-4 form-group">
10
+ <label class="font_normal_body">所属人员</label>
11
+ <right-tree @re-res="getRes" :source="source"></right-tree>
12
+ </div>
13
+ <div class="col-sm-4 form-group" :class="[$v.f_terminal_number.required ? 'has-error' : '']">
14
+ <label class="font_normal_body">设备编号</label>
15
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_terminal_number" placeholder="设备编号" v-el:f_terminal_number
16
+ v-validate:f_terminal_number='{required :true}' />
17
+ </div>
18
+ <div class="col-sm-4 form-group" :class="[$v.f_terminal_name.required ? 'has-error' : '']">
19
+ <label class="font_normal_body">设备名称</label>
20
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_terminal_name" placeholder="设备名称"
21
+ v-validate:f_terminal_name='{required: true}' />
22
+ </div>
23
+ <div class="col-sm-4 form-group" :class="{'has-error': $v.f_equipment_type.required}">
24
+ <label class="font_normal_body">设备类型</label>
25
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_equipment_type" placeholder="设备类型"
26
+ v-validate:f_equipment_type="{required: true}" />
27
+ </div>
28
+ <div class="col-sm-4 form-group">
29
+ <label class="font_normal_body" >MAC&nbsp;号&nbsp;</label>
30
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_mac_number" placeholder="MAC号" >
31
+ </div>
32
+ <div class="col-sm-4 form-group">
33
+ <label class="font_normal_body" >机器编号</label>
34
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_machine_number" placeholder="机器编号" >
35
+ </div>
36
+ <div class="col-sm-4 form-group" :class="{'has-error': $v.f_phone.required}">
37
+ <label class="font_normal_body">联系电话</label>
38
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_phone" placeholder="联系电话"
39
+ v-validate:f_phone="{required: true, minlength:7, maxlength: 11}" title="手机号必须7-11位">
40
+ <!-- <div class="font_normal_body" v-if="$v.f_phone.minlength || $v.f_phone.maxlength"><span>手机号必须7-11位</span></div>-->
41
+ </div>
42
+ <div class="col-sm-4 form-group" :class="{'has-error': $v.f_address.required}">
43
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;所在地</label>
44
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_address" placeholder="所在地"
45
+ v-validate:f_address="{required: true}">
46
+ </div>
47
+ <div class="col-sm-4 form-group" :class="{'has-error': $v.f_bank_name.required}">
48
+ <label class="font_normal_body">所属银行</label>
49
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_bank_name" placeholder="所属银行"
50
+ v-validate:f_bank_name="{required: true}">
51
+ </div>
52
+ </div>
53
+ <div class="col-sm-12 form-group">
54
+ <label class="font_normal_body " >&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
55
+ <textarea class="input_textarea" rows="3" style="width:80%;margin-top:5px" v-model="model.f_comments"></textarea>
56
+ </div>
57
+ </form>
58
+ <div style="text-align:right;height:auto;">
59
+ <button class="button_search" @click="uploadFiles()" v-if="info">上传图片</button>
60
+ <button class="btn btn-info" @click="upgrade()" v-if="info && data.f_state==='正常'">升级</button>
61
+ <button class="btn btn-success" @click="getEditState()" v-if="model.f_state === '停用' && info" >启用</button>
62
+ <button class="btn btn-danger" @click="getEditState()" v-if="model.f_state === '正常' && info" >停用</button>
63
+ <button class="btn button_search" @click="confirm()" :disabled="!$v.valid" >确认</button>
64
+ <button class="btn button_clear " @click="cancel()" >取消</button>
65
+ </div>
66
+ <modal :show.sync="showfiles" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
67
+ <article slot="modal-body">
68
+ <upload :blodid="model.f_userinfo_id" :businessid="model.id" v-ref:upload fusetype="收费" isremark="true" style="width:auto" ></upload>
69
+ </article>
70
+ <footer slot="modal-footer" class="modal-footer">
71
+ </footer>
72
+ </modal>
73
+
74
+ <modal v-if="show" :show.sync="show" v-ref:modal backdrop="false" >
75
+ <header slot="modal-header" class="modal-header">
76
+ <button type="button" class="close" @click="close"><span>&times;</span></button>
77
+ <h4 class="modal-title">pos机升级</h4>
78
+ </header>
79
+ <article slot="modal-body" class="modal-body">
80
+ <form class="form-horizontal">
81
+ <div class="row">
82
+ <div>
83
+ <h4>是否升级?</h4>
84
+ </div>
85
+ <!-- <div class="col-sm-6 form-group">-->
86
+ <!-- <label class="font_normal_body">参数名称</label>-->
87
+ <!-- <input type="text" class="input_search" style="width: 60%" v-model="modifyItem.name" @keyup.enter="confirm">-->
88
+ <!-- </div>-->
89
+ <!-- <div class="col-sm-6 form-group" v-if="modifyItem.EntityType === 't_parameter'">-->
90
+ <!-- <div class="checkbox">-->
91
+ <!-- <label>-->
92
+ <!-- <input type="checkbox" v-model="modifyItem.isGlobal" :checked="modifyItem.isGlobal">是否全局-->
93
+ <!-- </label>-->
94
+ <!-- </div>-->
95
+ <!-- </div>-->
96
+ </div>
97
+ </form>
98
+ </article>
99
+ <footer slot="modal-footer" class="modal-footer">
100
+ <button type="button" class="button_search button_spacing" @click='upgradeRoot()'>是</button>
101
+ <button type="button" class="button_clear button_spacing" @click='close'>否</button>
102
+ </footer>
103
+ </modal>
104
+ </validator>
105
+
106
+ </div>
107
+ </template>
108
+ <script>
109
+ import {PagedList} from 'vue-client'
110
+ export default {
111
+ data () {
112
+ return {
113
+ checkparam: false,
114
+ source: `tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`,
115
+ model: {
116
+ f_terminal_number: '',
117
+ f_terminal_name: '',
118
+ f_mac_number:'',
119
+ // f_username:'',
120
+ f_bank_name: '',
121
+ f_equipment_type: 'POS',
122
+ f_state: '正常',
123
+ f_machine_number: '',
124
+ f_phone:'',
125
+ f_comments:'',
126
+ f_address:'',
127
+ f_filialeids: '',
128
+ f_orgid:''
129
+ },
130
+ showfiles: false,
131
+ show:false,
132
+ infoadd: this.infoadd,
133
+ isSelPop: false
134
+ }
135
+ },
136
+ props: ['data', 'f_filialeids','info'],
137
+
138
+ watch: {
139
+ 'data' (val) {
140
+ if (val) {
141
+ this.edit(val)
142
+ } else {
143
+ this.initModel()
144
+ }
145
+ }
146
+ },
147
+ ready () {
148
+ console.log('mac信息:', this.data)
149
+ if (this.data) {
150
+ this.edit(this.data)
151
+ }
152
+ console.log('查看是否隐藏', this.info)
153
+ },
154
+
155
+ methods: {
156
+ recursiveSelOrg(val, flag){
157
+ if(val.parent){
158
+ if(val.parent.resourcetype===flag){
159
+ return {id: val.parent.id, name: val.parent.name}
160
+ } else {
161
+ return this.recursiveSelOrg(val.parent,flag)
162
+ }
163
+ } else {
164
+ return {id: '', name: ''}
165
+ }
166
+ },
167
+ getRes(val){
168
+ console.log('====================', val)
169
+ if (val.orgobj.length === 1 && val.orgobj[0].resourcetype === 'user'){
170
+
171
+ let org = this.recursiveSelOrg(val.orgobj[0], 'organization')
172
+ this.model.f_user_orgid=org.id
173
+ this.model.f_user_orgname=org.name
174
+ let dep = this.recursiveSelOrg(val.orgobj[0], 'department')
175
+ this.model.f_user_depid=dep.id
176
+ this.model.f_user_depname=dep.name
177
+
178
+ this.model.f_user_operatorid = val.orgobj[0].userid
179
+ this.model.f_user_operator=val.orgobj[0].name
180
+ this.isSelPop = true
181
+ } else {
182
+ // 不可提交
183
+ this.isSelPop = false
184
+ }
185
+ },
186
+ close () {
187
+ this.show = false
188
+ },
189
+ uploadFiles(){
190
+ this.showfiles= !this.showfiles
191
+ },
192
+ getEditState () {
193
+ if (this.model.f_state === '正常') {
194
+ this.$showMessage(`当前设备号: ${this.model.f_terminal_number} ,确认停用该设备?`, ['confirm', 'cancel']).then((res) => {
195
+ if (res === 'confirm') {
196
+ this.$showAlert(`已向设备号: ${this.model.f_terminal_number}发送停用指令,请稍后查看执行结果!`, 'success', 2500)
197
+ this.model.f_state = '停用'
198
+ try {
199
+ // 测试接口
200
+ // this.$resetpost('rs/logic/updatePosState', {data: {number: this.model.f_terminal_number, state: '停用'}}, {resolveMsg: null, rejectMsg: null}, 0)
201
+ // .then((res) => {})
202
+ this.$resetpost('rs/logic/batchPos',{data: {tasks: [this.data], taskState: 0}}, {rejectMsg: null, resolveMsg: null})
203
+ } catch (error) {
204
+ this.search()
205
+ }
206
+ }
207
+ })
208
+ } else if (this.model.f_state === '停用'){
209
+ this.$showMessage(`当前设备号: ${this.model.f_terminal_number} ,确认启用该设备?`, ['confirm', 'cancel']).then((res) => {
210
+ if (res === 'confirm') {
211
+ this.$showAlert(`已向设备号: ${this.model.f_terminal_number}发送启用指令,请稍后查看执行结果!`, 'success', 2500)
212
+ this.model.f_state = '正常'
213
+ try {
214
+ // 测试接口
215
+ // this.$resetpost('rs/logic/getEditPosState', {data: {number: this.model.f_terminal_number, state: '正常'}}, {resolveMsg: null, rejectMsg: null}, 0)
216
+ // .then((res) => {})
217
+ this.$resetpost('rs/logic/batchPos',{data: {tasks: [this.data], taskState: 1}}, {rejectMsg: null, resolveMsg: null})
218
+ } catch (error) {
219
+ this.search()
220
+ }
221
+ }
222
+ })
223
+ }
224
+ },
225
+ editBeizhu (val) {
226
+ this.editshow = true
227
+ this.posBase = val
228
+ },
229
+
230
+ //升级
231
+ upgrade(){
232
+ this.show=true
233
+ },
234
+ upgradeRoot() {
235
+ this.$resetpost('rs/logic/batchPos',{data: {tasks: [this.data], taskState: 2}}, {rejectMsg: null, resolveMsg: null})
236
+ this.$dispatch('refresh')
237
+ // this.$resetpost('rs/logic/t_equipment', {data: val}, {resolveMsg: null, rejectMsg: null}).then((res) => {
238
+ // this.$dispatch('refresh')
239
+ // }).catch((error) => {
240
+ // this.$dispatch('refresh')
241
+ // })
242
+ },
243
+ search () {
244
+ this.$refs.paged.$refs.cri.search()
245
+ },
246
+ confirm () {
247
+ // 如果是修改的话,只修改页面上用户填写的信息
248
+ if (!this.info) {
249
+ this.model.f_online = '离线'
250
+ this.model.f_operator = this.$login.f.name
251
+ this.model.f_orgid = this.$login.f.orgid
252
+ this.model.f_filialeids = this.$login.f.orgid
253
+ this.model.f_operatorid = this.$login.f.id
254
+ this.model.f_orgname = this.$login.f.orgs
255
+ this.model.f_depid = this.$login.f.depids
256
+ this.model.f_depname = this.$login.f.deps
257
+ this.model.f_orgstr = this.$login.f.fullids
258
+ }
259
+ this.$resetpost('rs/entity/t_equipment', this.model, {resolveMsg: '保存成功', rejectMsg: '保存失败'}).then((res) => {
260
+ this.$dispatch('refresh')
261
+ }).catch((error) => {
262
+ this.$dispatch('refresh')
263
+ })
264
+
265
+ },
266
+ edit (row) {
267
+ this.model.f_terminal_number = row.f_terminal_number
268
+ this.model.f_terminal_name = row.f_terminal_name
269
+ this.model.f_bank_name = row.f_bank_name
270
+ this.model.f_machine_number = row.f_machine_number
271
+ this.model.f_mac_number = row.f_mac_number
272
+ this.model.f_address = row.f_address
273
+ this.model.f_phone = row.f_phone
274
+ this.model.f_state = row.f_state
275
+ this.model.f_comments=row.f_comments
276
+ // this.model.f_username=row.f_username
277
+ this.model.id = row.id
278
+ this.model.f_filialeids=row.f_filialeids
279
+ this.model.f_orgid = row.f_orgid
280
+ },
281
+ initModel () {
282
+ delete this.model.id
283
+ this.model.f_terminal_number = ''
284
+ this.model.f_terminal_name = ''
285
+ this.model.f_bank_name = ''
286
+ this.model.f_machine_number = ''
287
+ this.model.f_state = '正常'
288
+ this.model.f_phone = ''
289
+ this.model.f_address = ''
290
+ this.model.f_filialeids=''
291
+ this.model.f_orgid=''
292
+ this.model.f_comments=''
293
+ },
294
+ cancel () {
295
+ this.$dispatch('close')
296
+ }
297
+ }
298
+ }
299
+ </script>