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