system-clients 3.2.95-ruihua1 → 3.2.95-temp-1
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/.gradle/7.4/checksums/checksums.lock +0 -0
- package/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/.gradle/7.4/dependencies-accessors/gc.properties +0 -0
- package/.gradle/7.4/executionHistory/executionHistory.bin +0 -0
- package/.gradle/7.4/executionHistory/executionHistory.lock +0 -0
- package/.gradle/7.4/fileChanges/last-build.bin +0 -0
- package/.gradle/7.4/fileHashes/fileHashes.bin +0 -0
- package/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
- package/.gradle/7.4/gc.properties +0 -0
- package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
- package/.gradle/file-system.probe +0 -0
- package/.gradle/vcs-1/gc.properties +0 -0
- package/package.json +103 -103
- package/src/components/Main.vue +42 -18
- package/src/components/equipment/PcAdd.vue +1 -1
- package/src/components/equipment/PcList.vue +3 -3
- package/src/components/equipment/PhoneAdd.vue +1 -1
- package/src/components/equipment/PhoneList.vue +2 -2
- package/src/components/equipment/PosAdd.vue +10 -6
- package/src/components/equipment/PosList.vue +5 -3
- package/src/components/equipment/PosParamAdd.vue +1 -1
- package/src/components/equipment/PosParamList.vue +2 -2
- package/src/components/parammanage/ParamPage.vue +12 -12
- package/src/components/parammanage/SinglePage.vue +8 -8
- package/src/components/server/Login.vue +35 -17
- package/src/components/server/ModifyPw.vue +0 -1
- package/src/components/server/PcdBuildingSelect.vue +0 -2
- package/src/components/server/ResSelect.vue +9 -3
- package/src/components/server/ResSelectGroup.vue +1 -1
- package/src/components/server/RoleSelector.vue +2 -3
- package/src/filiale/baole/Login.vue +0 -2
- package/src/filiale/bayan/PosAdd.vue +369 -0
- package/src/filiale/bayan/PosList.vue +349 -0
- package/src/filiale/bayan/PosManage.vue +138 -0
- package/src/filiale/bayan/system.js +6 -0
- package/src/filiale/chengtou/Login.vue +0 -2
- package/src/filiale/dongguan/Login.vue +0 -2
- package/src/filiale/dongguan/Main.vue +0 -2
- package/src/filiale/furuike/Login.vue +0 -4
- package/src/filiale/furuike/Main.vue +23 -36
- package/src/filiale/gehua/Main.vue +0 -2
- package/src/filiale/konggang/Login.vue +0 -2
- package/src/filiale/qianneng/Login.vue +0 -2
- package/src/filiale/qianneng/Main.vue +2 -4
- package/src/filiale/qianneng/ModifyPw.vue +0 -1
- package/src/filiale/rizhao/Login.vue +0 -2
- package/src/filiale/rizhao/Main.vue +1 -1
- package/src/filiale/shiquan/Login.vue +0 -2
- package/src/filiale/tianyi/Login.vue +0 -2
- package/src/filiale/tongchuan/Login.vue +0 -2
- package/src/filiale/tongchuan/Main.vue +1 -3
- package/src/filiale/weinan/Main.vue +1 -2
- package/src/filiale/wenxi/Login.vue +0 -2
- package/src/filiale/wenxi/Main.vue +0 -2
- package/src/filiale/wuhai/Main.vue +0 -3
- package/src/filiale/yuchuan/Login.vue +1 -3
- package/src/filiale/yuchuan/Main.vue +0 -2
- package/src/filiale/zhoukou/Main.vue +0 -2
- package/src/plugins/GetLoginInfoService.js +8 -4
- package/src/stores/AppData.js +1 -1
- package/src/filiale/ruihua/Login.vue +0 -549
- package/src/filiale/ruihua/system.js +0 -5
@@ -30,11 +30,11 @@
|
|
30
30
|
<data-grid :model="model" v-ref:grid >
|
31
31
|
<template partial='head'>
|
32
32
|
<tr>
|
33
|
-
<th
|
34
|
-
<th
|
35
|
-
<th
|
36
|
-
<th
|
37
|
-
<th
|
33
|
+
<th>序号</th>
|
34
|
+
<th>名称</th>
|
35
|
+
<th>参数值</th>
|
36
|
+
<th>所属</th>
|
37
|
+
<th>操作</th>
|
38
38
|
</tr>
|
39
39
|
</template>
|
40
40
|
<template partial='body'>
|
@@ -149,7 +149,7 @@
|
|
149
149
|
async queryParam (condition) {
|
150
150
|
this.model.rows = []
|
151
151
|
let http = new HttpResetClass()
|
152
|
-
let res = await http.load('POST', '
|
152
|
+
let res = await http.load('POST', 'rs/sql/system_getSingle', {data: condition}, {resolveMsg: null, rejectMsg: '获取参数出错!!'})
|
153
153
|
this.model.rows = res.data
|
154
154
|
},
|
155
155
|
|
@@ -183,7 +183,7 @@
|
|
183
183
|
deleteItem (row) {
|
184
184
|
this.$showMessage('删除后不可恢复,确认删除吗?', ['confirm', 'cancel']).then((res) => {
|
185
185
|
if (res === 'confirm') {
|
186
|
-
this.$resetpost('
|
186
|
+
this.$resetpost('rs/logic/deleteValue', {tablename: 't_singlevalue', id: row.id}).then((res) => {
|
187
187
|
this.filter_query(this.conditionModel.paramName, this.conditionModel.f_cond_orgid)
|
188
188
|
})
|
189
189
|
}
|
@@ -201,7 +201,7 @@
|
|
201
201
|
this.show = true
|
202
202
|
},
|
203
203
|
confirm () {
|
204
|
-
this.$resetpost('
|
204
|
+
this.$resetpost('rs/logic/system_saveSingle', this.selectItem).then((res) => {
|
205
205
|
// 如果没有id,需要在数组中添加
|
206
206
|
this.filter_query(this.conditionModel.paramName, this.conditionModel.f_cond_orgid)
|
207
207
|
this.show = false
|
@@ -174,7 +174,7 @@ let saveGen = function *(self) {
|
|
174
174
|
console.log('登录配置', self.config)
|
175
175
|
if (self.config.isMac) {
|
176
176
|
// 获取该登录人分公司下的mac配置
|
177
|
-
let getMacs = yield self.$resetpost('
|
177
|
+
let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
|
178
178
|
resolveMsg: null,
|
179
179
|
rejectMsg: null
|
180
180
|
}).catch(() => {
|
@@ -239,7 +239,7 @@ let saveGen = function *(self) {
|
|
239
239
|
msg = ret.data
|
240
240
|
} else if (ret.status === 710) {
|
241
241
|
msg = ret.data
|
242
|
-
} else {
|
242
|
+
} else if (ret.status === 555) {
|
243
243
|
msg = ret.data
|
244
244
|
}
|
245
245
|
self.createCode()
|
@@ -257,6 +257,21 @@ export default {
|
|
257
257
|
this.titleShow = this.$appdata.getSingleValue('关于我们')
|
258
258
|
window.versionTime = window.versionTime ? window.versionTime : new Date().getTime()
|
259
259
|
this.vTime = this.format(new Date(window.versionTime));
|
260
|
+
try{
|
261
|
+
let http = new HttpResetClass()
|
262
|
+
let res = await http.load('POST', 'rs/sql/singleTable',
|
263
|
+
{data:{
|
264
|
+
tablename: 't_changedeclare',
|
265
|
+
condition: ` f_type ='变更通知' `
|
266
|
+
}
|
267
|
+
}, {resolveMsg: null, rejectMsg: null})
|
268
|
+
if(res.data.length>0){
|
269
|
+
console.log("---------------获取通知",res.data[0].f_change_message)
|
270
|
+
this.notice=res.data[0].f_change_message
|
271
|
+
}
|
272
|
+
}catch(e){}
|
273
|
+
|
274
|
+
this.loginother();
|
260
275
|
$('#login-button').click(function (event) {
|
261
276
|
event.preventDefault()
|
262
277
|
$('form').fadeOut(500)
|
@@ -412,24 +427,27 @@ export default {
|
|
412
427
|
}else {
|
413
428
|
console.log("待办提醒全局关闭。")
|
414
429
|
}
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
415
434
|
},
|
416
435
|
|
417
436
|
async loginother(){
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
// }
|
437
|
+
if (this.config.distanceLogin) {
|
438
|
+
if (this.$login && this.$login.getUrlParames('name') ) {
|
439
|
+
let ename = this.$login.getUrlParames('name');
|
440
|
+
let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
|
441
|
+
if(logininfo.data){
|
442
|
+
if(logininfo.data.ename && logininfo.data.password){
|
443
|
+
this.model.ename = logininfo.data.ename
|
444
|
+
this.model.password =logininfo.data.password
|
445
|
+
let gen = saveGen(this)
|
446
|
+
return co(gen)
|
447
|
+
}
|
448
|
+
}
|
449
|
+
}
|
450
|
+
}
|
433
451
|
},
|
434
452
|
theme(){
|
435
453
|
// var elementList = document.querySelectorAll('body');
|
@@ -62,7 +62,6 @@
|
|
62
62
|
// let res = yield self.$post('rs/db/modifypassword', {data: self.deliver})
|
63
63
|
// let res = yield self.$resetpost('/rs/db/modifypwd', {data: self.deliver})
|
64
64
|
// Util.f.password = self.deliver.newpassword
|
65
|
-
// todo v4
|
66
65
|
let res = yield self.$resetpost('/rs/user/modifypwd', {data: self.deliver }, {resolveMsg: null,rejectMsg: null})
|
67
66
|
self.$login.f.password = self.deliver.newpassword
|
68
67
|
if (res.data) {
|
@@ -155,7 +155,6 @@
|
|
155
155
|
async pcdChange(){
|
156
156
|
this.arrays.street=[{label:'全部',value:''}]
|
157
157
|
var condition = `f_filialeid = '${this.$login.f.orgid}' and f_street is not null group by f_street`
|
158
|
-
// todo v4
|
159
158
|
let street = await this.$resetpost('rs/sql/singleTable_OrderBy', {
|
160
159
|
data: {
|
161
160
|
items: 'f_street',
|
@@ -193,7 +192,6 @@
|
|
193
192
|
}else{
|
194
193
|
condition = `f_filialeid = '${this.$login.f.orgid}' and f_building is not null group by f_building`
|
195
194
|
}
|
196
|
-
// todo v4
|
197
195
|
let build = await this.$resetpost('rs/sql/singleTable_OrderBy', {
|
198
196
|
data: {
|
199
197
|
items: 'f_building',
|
@@ -80,9 +80,6 @@
|
|
80
80
|
//找到跟节点
|
81
81
|
ergodicList (val,parentname) {
|
82
82
|
if(val.children.length > 0 ){
|
83
|
-
if (val.name !== '组织机构'){
|
84
|
-
this.resoptions.push({label: parentname === '组织机构' ? val.name : val.name+' - '+parentname, value: val.id})
|
85
|
-
}
|
86
83
|
parentname=parentname+val.name
|
87
84
|
this.treetoList(val,parentname)
|
88
85
|
}else {
|
@@ -164,6 +161,15 @@
|
|
164
161
|
'parentresid'(){
|
165
162
|
this.dealdata()
|
166
163
|
},
|
164
|
+
initresid: {
|
165
|
+
handler(newVal, oldVal) {
|
166
|
+
// 避免重复触发
|
167
|
+
if (JSON.stringify(newVal) === JSON.stringify(oldVal)) {
|
168
|
+
return;
|
169
|
+
}
|
170
|
+
this.dealdata();
|
171
|
+
},
|
172
|
+
}
|
167
173
|
},
|
168
174
|
}
|
169
175
|
</script>
|
@@ -167,7 +167,7 @@ export default {
|
|
167
167
|
for (let row of this.$refs.department.resoptions) {
|
168
168
|
depids.push(row.value)
|
169
169
|
}
|
170
|
-
let depid = depids.length ? plugin.convertToIn(depids) :
|
170
|
+
let depid = depids.length ? plugin.convertToIn(depids) : ('')
|
171
171
|
condition += " and f_depid in " + depid;
|
172
172
|
}
|
173
173
|
}
|
@@ -51,7 +51,6 @@
|
|
51
51
|
}
|
52
52
|
},
|
53
53
|
ready() {
|
54
|
-
// todo v4
|
55
54
|
this.$resetpost('/rs/search', {data: {source: this.source, userid: this.$login.f.id}}, {resolveMsg: null, rejectMsg: null})
|
56
55
|
.then(res => {
|
57
56
|
console.log('res-->' + JSON.stringify(res))
|
@@ -66,7 +65,7 @@
|
|
66
65
|
this.$dispatch('re-res',obj)
|
67
66
|
},
|
68
67
|
filterUser(resids) {
|
69
|
-
// 处理第一次进入页面值异常问题
|
68
|
+
// 处理第一次进入页面值异常问题
|
70
69
|
if(resids.length > 0 && typeof resids[0] == "object"){
|
71
70
|
resids = resids[0]
|
72
71
|
}
|
@@ -87,4 +86,4 @@
|
|
87
86
|
|
88
87
|
<style scoped>
|
89
88
|
|
90
|
-
</style>
|
89
|
+
</style>
|
@@ -175,7 +175,6 @@ let saveGen = function *(self) {
|
|
175
175
|
console.log('登录配置', self.config)
|
176
176
|
if (self.config.isMac) {
|
177
177
|
// 获取该登录人分公司下的mac配置
|
178
|
-
// todo v4
|
179
178
|
let getMacs = yield self.$resetpost('rs/sql/equipmentQuery', {data: {condition: `f_filialeids like '%${self.$login.f.f_orgids}%'`}}, {
|
180
179
|
resolveMsg: null,
|
181
180
|
rejectMsg: null
|
@@ -440,7 +439,6 @@ export default {
|
|
440
439
|
if (this.config.distanceLogin) {
|
441
440
|
if (this.$login && this.$login.getUrlParames('name') ) {
|
442
441
|
let ename = this.$login.getUrlParames('name');
|
443
|
-
// todo v4
|
444
442
|
let logininfo = await this.$resetpost('rs/logic/getLoginData',{data:{ename:ename}},{resolveMsg: null, rejectMsg: null});
|
445
443
|
if(logininfo.data){
|
446
444
|
if(logininfo.data.ename && logininfo.data.password){
|
@@ -0,0 +1,369 @@
|
|
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-6 form-group">
|
10
|
+
<label class="font_normal_body"> 公  司 </label>
|
11
|
+
<right-tree @re-res="getRes1"></right-tree>
|
12
|
+
</div>
|
13
|
+
<div class="col-sm-6 form-group">
|
14
|
+
<label class="font_normal_body">设备负责人</label>
|
15
|
+
<right-tree @re-res="getRes" :source="source"></right-tree>
|
16
|
+
</div>
|
17
|
+
<div class="col-sm-6 form-group" :class="[$v.f_terminal_number.required ? 'has-error' : '']">
|
18
|
+
<label class="font_normal_body">设备编号</label>
|
19
|
+
<input type="text" class="input_search" style="width: 60%" v-model="model.f_terminal_number" placeholder="设备编号" v-el:f_terminal_number
|
20
|
+
v-validate:f_terminal_number='{required :true}' />
|
21
|
+
</div>
|
22
|
+
<div class="col-sm-6 form-group" :class="[$v.f_terminal_name.required ? 'has-error' : '']">
|
23
|
+
<label class="font_normal_body"> 设备名称 </label>
|
24
|
+
<input type="text" class="input_search" style="width: 60%" v-model="model.f_terminal_name" placeholder="设备名称"
|
25
|
+
v-validate:f_terminal_name='{required: true}' />
|
26
|
+
</div>
|
27
|
+
<div class="col-sm-6 form-group" :class="{'has-error': $v.f_equipment_type.required}">
|
28
|
+
<label class="font_normal_body">设备类型</label>
|
29
|
+
<input type="text" class="input_search" style="width: 60%" v-model="model.f_equipment_type" placeholder="设备类型"
|
30
|
+
v-validate:f_equipment_type="{required: true}" />
|
31
|
+
</div>
|
32
|
+
<div class="col-sm-6 form-group">
|
33
|
+
<label class="font_normal_body" > MAC 号  </label>
|
34
|
+
<input type="text" class="input_search" style="width: 60%" v-model="model.f_mac_number" placeholder="MAC号" >
|
35
|
+
</div>
|
36
|
+
<div class="col-sm-6 form-group">
|
37
|
+
<label class="font_normal_body" >机器编号</label>
|
38
|
+
<input type="text" class="input_search" style="width: 60%" v-model="model.f_machine_number" placeholder="机器编号" >
|
39
|
+
</div>
|
40
|
+
<div class="col-sm-6 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-6 form-group" :class="{'has-error': $v.f_bank_name.required}">
|
47
|
+
<label class="font_normal_body">所属银行</label>
|
48
|
+
<v-select id="f_charge_type"
|
49
|
+
v-model="model.f_bank_name"
|
50
|
+
placeholder='所属银行'
|
51
|
+
:value.sync="model.f_bank_name"
|
52
|
+
:options='bankAffiliation'
|
53
|
+
:value-single="true"
|
54
|
+
v-validate:f_bank_name="{ required: true }"
|
55
|
+
close-on-select clear-button>
|
56
|
+
</v-select>
|
57
|
+
</div>
|
58
|
+
<div class="col-sm-6 form-group">
|
59
|
+
<label class="font_normal_body"> 所属参数 </label>
|
60
|
+
<v-select id="f_charge_type"
|
61
|
+
v-model="model.f_param_id"
|
62
|
+
placeholder='所属参数'
|
63
|
+
:value.sync="model.f_param_id"
|
64
|
+
:options='ParamTypeItems'
|
65
|
+
close-on-select clear-button>
|
66
|
+
</v-select>
|
67
|
+
</div>
|
68
|
+
<div class="col-sm-6 form-group">
|
69
|
+
<label class="font_normal_body">所属部门</label>
|
70
|
+
<res-select restype='department'
|
71
|
+
:is-mul="false"
|
72
|
+
@res-select="getdep"
|
73
|
+
:parentresid="depresid"
|
74
|
+
:initresid="initresid">
|
75
|
+
</res-select>
|
76
|
+
</div>
|
77
|
+
|
78
|
+
</div>
|
79
|
+
<div class="col-sm-12 form-group" :class="{'has-error': $v.f_address.required}">
|
80
|
+
<label class="font_normal_body"> 放置地点 </label>
|
81
|
+
<textarea class="input_textarea" style="width: 80%" v-model="model.f_address" placeholder="所在地"
|
82
|
+
v-validate:f_address="{required: true}" rows="2"></textarea>
|
83
|
+
</div>
|
84
|
+
<div class="col-sm-12 form-group">
|
85
|
+
<label class="font_normal_body " >  备注  </label>
|
86
|
+
<textarea class="input_textarea" rows="3" style="width:80%;margin-top:5px" v-model="model.f_comments"></textarea>
|
87
|
+
</div>
|
88
|
+
</form>
|
89
|
+
<div style="text-align:right;height:auto;">
|
90
|
+
<button class="button_search" @click="uploadFiles()" v-if="info">上传图片</button>
|
91
|
+
<button class="btn btn-info" @click="upgrade()" v-if="info && data.f_state==='正常'">升级</button>
|
92
|
+
<button class="btn btn-success" @click="getEditState()" v-if="model.f_state === '停用' && info" >启用</button>
|
93
|
+
<button class="btn btn-danger" @click="getEditState()" v-if="model.f_state === '正常' && info" >停用</button>
|
94
|
+
<button class="btn button_search" @click="confirm()" :disabled="!$v.valid" >确认</button>
|
95
|
+
<button class="btn button_clear " @click="cancel()" >取消</button>
|
96
|
+
</div>
|
97
|
+
<modal :show.sync="showfiles" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
|
98
|
+
<article slot="modal-body" style="height: 500px">
|
99
|
+
<upload v-show="showfiles" :businessid="model.id" v-ref:upload fusetype="POS" isremark="true" style="width:auto" ></upload>
|
100
|
+
</article>
|
101
|
+
<footer slot="modal-footer" class="modal-footer">
|
102
|
+
</footer>
|
103
|
+
</modal>
|
104
|
+
<modal v-if="show" :show.sync="show" v-ref:modal backdrop="false" >
|
105
|
+
<header slot="modal-header" class="modal-header">
|
106
|
+
<button type="button" class="close" @click="close"><span>×</span></button>
|
107
|
+
<h4 class="modal-title">pos机升级</h4>
|
108
|
+
</header>
|
109
|
+
<article slot="modal-body" class="modal-body">
|
110
|
+
<form class="form-horizontal">
|
111
|
+
<div class="row">
|
112
|
+
<div>
|
113
|
+
<h4>是否升级?</h4>
|
114
|
+
</div>
|
115
|
+
<!-- <div class="col-sm-6 form-group">-->
|
116
|
+
<!-- <label class="font_normal_body">参数名称</label>-->
|
117
|
+
<!-- <input type="text" class="input_search" style="width: 60%" v-model="modifyItem.name" @keyup.enter="confirm">-->
|
118
|
+
<!-- </div>-->
|
119
|
+
<!-- <div class="col-sm-6 form-group" v-if="modifyItem.EntityType === 't_parameter'">-->
|
120
|
+
<!-- <div class="checkbox">-->
|
121
|
+
<!-- <label>-->
|
122
|
+
<!-- <input type="checkbox" v-model="modifyItem.isGlobal" :checked="modifyItem.isGlobal">是否全局-->
|
123
|
+
<!-- </label>-->
|
124
|
+
<!-- </div>-->
|
125
|
+
<!-- </div>-->
|
126
|
+
</div>
|
127
|
+
</form>
|
128
|
+
</article>
|
129
|
+
<footer slot="modal-footer" class="modal-footer">
|
130
|
+
<button type="button" class="button_search button_spacing" @click='upgradeRoot()'>是</button>
|
131
|
+
<button type="button" class="button_clear button_spacing" @click='close'>否</button>
|
132
|
+
</footer>
|
133
|
+
</modal>
|
134
|
+
</validator>
|
135
|
+
|
136
|
+
</div>
|
137
|
+
</template>
|
138
|
+
<script>
|
139
|
+
import {HttpResetClass, PagedList} from 'vue-client'
|
140
|
+
export default {
|
141
|
+
data () {
|
142
|
+
return {
|
143
|
+
depname: '',
|
144
|
+
f_depid: '',
|
145
|
+
orgname: '',
|
146
|
+
initresid: [], // 用于存放初始化选中的部门 ID
|
147
|
+
depresid: [this.$login.f.depids],
|
148
|
+
depid: [this.f_depid],
|
149
|
+
f_orgid: this.$login.f.orgid,
|
150
|
+
userresid: [this.$login.f.id],
|
151
|
+
checkparam: false,
|
152
|
+
bankAffiliation: this.$appdata.getParam('所属银行'),
|
153
|
+
source: `tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`,
|
154
|
+
userid: this.$login.f.id,
|
155
|
+
model: {
|
156
|
+
f_terminal_number: '',
|
157
|
+
f_terminal_name: '',
|
158
|
+
f_depname: '',
|
159
|
+
f_mac_number:'',
|
160
|
+
// f_username:'',
|
161
|
+
f_bank_name: '微信',
|
162
|
+
f_equipment_type: 'POS',
|
163
|
+
f_state: '正常',
|
164
|
+
f_machine_number: '',
|
165
|
+
f_phone:'',
|
166
|
+
f_comments:'',
|
167
|
+
f_address:'',
|
168
|
+
f_filialeids: '',
|
169
|
+
f_orgid:'',
|
170
|
+
f_param_id:''
|
171
|
+
},
|
172
|
+
ParamTypeItems:[],
|
173
|
+
showfiles: false,
|
174
|
+
show:false,
|
175
|
+
infoadd: this.infoadd,
|
176
|
+
isSelPop: false
|
177
|
+
}
|
178
|
+
},
|
179
|
+
props: ['data', 'f_filialeids','info'],
|
180
|
+
|
181
|
+
watch: {
|
182
|
+
'data' (val) {
|
183
|
+
if (val) {
|
184
|
+
this.edit(val)
|
185
|
+
} else {
|
186
|
+
this.initModel()
|
187
|
+
}
|
188
|
+
}
|
189
|
+
},
|
190
|
+
async ready () {
|
191
|
+
console.log('mac信息:', this.data)
|
192
|
+
if (this.data) {
|
193
|
+
this.edit(this.data)
|
194
|
+
}
|
195
|
+
console.log('查看是否隐藏', this.info)
|
196
|
+
try {
|
197
|
+
// 获取参数
|
198
|
+
let http = new HttpResetClass()
|
199
|
+
let res = await http.load('POST', 'rs/sql/get_posParam', {data: {condition : ' 1 = 1 '}}, {
|
200
|
+
resolveMsg: null,
|
201
|
+
rejectMsg: '获取参数出错!!'
|
202
|
+
})
|
203
|
+
this.ParamTypeItems = res.data.map(item=>{
|
204
|
+
return {
|
205
|
+
label:item.name,
|
206
|
+
value:item.f_param_id
|
207
|
+
}
|
208
|
+
})
|
209
|
+
} catch (e) {
|
210
|
+
console.log(e)
|
211
|
+
}
|
212
|
+
},
|
213
|
+
|
214
|
+
methods: {
|
215
|
+
getRes1 (obj) {
|
216
|
+
this.orgname = obj.res[0]
|
217
|
+
this.depresid = obj.resids
|
218
|
+
this.f_orgid = obj.resids
|
219
|
+
this.userresid = obj.resids
|
220
|
+
},
|
221
|
+
getdep (obj, val) {
|
222
|
+
this.depname = val
|
223
|
+
// this.userresid = obj
|
224
|
+
this.f_depid = obj
|
225
|
+
},
|
226
|
+
recursiveSelOrg(val, flag){
|
227
|
+
if(val.parent){
|
228
|
+
if(val.parent.resourcetype===flag){
|
229
|
+
return {id: val.parent.id, name: val.parent.name}
|
230
|
+
} else {
|
231
|
+
return this.recursiveSelOrg(val.parent,flag)
|
232
|
+
}
|
233
|
+
} else {
|
234
|
+
return {id: '', name: ''}
|
235
|
+
}
|
236
|
+
},
|
237
|
+
getRes(val){
|
238
|
+
console.log('====================', val)
|
239
|
+
if (val.orgobj.length === 1 && val.orgobj[0].resourcetype === 'user'){
|
240
|
+
|
241
|
+
let org = this.recursiveSelOrg(val.orgobj[0], 'organization')
|
242
|
+
this.model.f_orgid=org.id
|
243
|
+
this.model.f_orgname=org.name
|
244
|
+
let dep = this.recursiveSelOrg(val.orgobj[0], 'department')
|
245
|
+
this.model.f_depid=dep.id
|
246
|
+
this.model.f_depname=dep.name
|
247
|
+
|
248
|
+
this.model.f_operatorid = val.orgobj[0].userid
|
249
|
+
this.model.f_operator=val.orgobj[0].name
|
250
|
+
this.isSelPop = true
|
251
|
+
} else {
|
252
|
+
// 不可提交
|
253
|
+
this.isSelPop = false
|
254
|
+
}
|
255
|
+
},
|
256
|
+
close () {
|
257
|
+
this.show = false
|
258
|
+
},
|
259
|
+
uploadFiles(){
|
260
|
+
this.showfiles= !this.showfiles
|
261
|
+
},
|
262
|
+
getEditState () {
|
263
|
+
if (this.model.f_state === '正常') {
|
264
|
+
this.$showMessage(`当前设备号: ${this.model.f_terminal_number} ,确认停用该设备?`, ['confirm', 'cancel']).then((res) => {
|
265
|
+
if (res === 'confirm') {
|
266
|
+
this.$showAlert(`已向设备号: ${this.model.f_terminal_number}发送停用指令,请稍后查看执行结果!`, 'success', 2500)
|
267
|
+
this.model.f_state = '停用'
|
268
|
+
try {
|
269
|
+
// 测试接口
|
270
|
+
// this.$resetpost('rs/logic/updatePosState', {data: {number: this.model.f_terminal_number, state: '停用'}}, {resolveMsg: null, rejectMsg: null}, 0)
|
271
|
+
// .then((res) => {})
|
272
|
+
this.$resetpost('rs/logic/batchPos',{data: {tasks: [this.data], taskState: 0}}, {rejectMsg: null, resolveMsg: null})
|
273
|
+
} catch (error) {
|
274
|
+
this.search()
|
275
|
+
}
|
276
|
+
}
|
277
|
+
})
|
278
|
+
} else if (this.model.f_state === '停用'){
|
279
|
+
this.$showMessage(`当前设备号: ${this.model.f_terminal_number} ,确认启用该设备?`, ['confirm', 'cancel']).then((res) => {
|
280
|
+
if (res === 'confirm') {
|
281
|
+
this.$showAlert(`已向设备号: ${this.model.f_terminal_number}发送启用指令,请稍后查看执行结果!`, 'success', 2500)
|
282
|
+
this.model.f_state = '正常'
|
283
|
+
try {
|
284
|
+
// 测试接口
|
285
|
+
// this.$resetpost('rs/logic/getEditPosState', {data: {number: this.model.f_terminal_number, state: '正常'}}, {resolveMsg: null, rejectMsg: null}, 0)
|
286
|
+
// .then((res) => {})
|
287
|
+
this.$resetpost('rs/logic/batchPos',{data: {tasks: [this.data], taskState: 1}}, {rejectMsg: null, resolveMsg: null})
|
288
|
+
} catch (error) {
|
289
|
+
this.search()
|
290
|
+
}
|
291
|
+
}
|
292
|
+
})
|
293
|
+
}
|
294
|
+
},
|
295
|
+
editBeizhu (val) {
|
296
|
+
this.editshow = true
|
297
|
+
this.posBase = val
|
298
|
+
},
|
299
|
+
|
300
|
+
//升级
|
301
|
+
upgrade(){
|
302
|
+
this.show=true
|
303
|
+
},
|
304
|
+
upgradeRoot() {
|
305
|
+
this.$resetpost('rs/logic/batchPos',{data: {tasks: [this.data], taskState: 2}}, {rejectMsg: null, resolveMsg: null})
|
306
|
+
this.$dispatch('refresh')
|
307
|
+
},
|
308
|
+
search () {
|
309
|
+
this.$refs.paged.$refs.cri.search()
|
310
|
+
},
|
311
|
+
confirm () {
|
312
|
+
// 如果是修改的话,只修改页面上用户填写的信息
|
313
|
+
this.model.f_depname = this.depname[0]
|
314
|
+
this.model.f_depid = this.f_depid[0]
|
315
|
+
if (!this.info) {
|
316
|
+
this.model.f_online = '离线'
|
317
|
+
this.model.f_operator = this.$login.f.name
|
318
|
+
this.model.f_orgid = this.$login.f.orgid
|
319
|
+
this.model.f_filialeids = this.$login.f.orgid
|
320
|
+
this.model.f_operatorid = this.$login.f.id
|
321
|
+
this.model.f_orgname = this.$login.f.orgs
|
322
|
+
// this.model.f_depname=this.depname[0]
|
323
|
+
this.model.f_orgstr = this.$login.f.fullids
|
324
|
+
}
|
325
|
+
this.$resetpost('rs/entity/t_equipment', this.model, {resolveMsg: '保存成功', rejectMsg: '保存失败'}).then((res) => {
|
326
|
+
this.$dispatch('refresh')
|
327
|
+
}).catch((error) => {
|
328
|
+
this.$dispatch('refresh')
|
329
|
+
})
|
330
|
+
|
331
|
+
},
|
332
|
+
edit (row) {
|
333
|
+
this.model.f_terminal_number = row.f_terminal_number
|
334
|
+
this.model.f_terminal_name = row.f_terminal_name
|
335
|
+
this.model.f_bank_name = row.f_bank_name
|
336
|
+
this.model.f_machine_number = row.f_machine_number
|
337
|
+
this.model.f_mac_number = row.f_mac_number
|
338
|
+
this.model.f_address = row.f_address
|
339
|
+
this.model.f_phone = row.f_phone
|
340
|
+
this.model.f_state = row.f_state
|
341
|
+
this.model.f_comments=row.f_comments
|
342
|
+
this.model.f_param_id=row.f_param_id
|
343
|
+
// this.model.f_username=row.f_username
|
344
|
+
this.model.id = row.id
|
345
|
+
this.model.f_filialeids=row.f_filialeids
|
346
|
+
this.model.f_orgid = row.f_orgid
|
347
|
+
this.model.f_depname = row.f_depname
|
348
|
+
this.initresid = [row.f_depid]
|
349
|
+
},
|
350
|
+
initModel() {
|
351
|
+
delete this.model.id
|
352
|
+
this.model.f_terminal_number = ''
|
353
|
+
this.model.f_terminal_name = ''
|
354
|
+
this.model.f_bank_name = ''
|
355
|
+
this.model.f_machine_number = ''
|
356
|
+
this.model.f_state = '正常'
|
357
|
+
this.model.f_phone = ''
|
358
|
+
this.model.f_param_id = ''
|
359
|
+
this.model.f_address = ''
|
360
|
+
this.model.f_filialeids = ''
|
361
|
+
this.model.f_orgid = ''
|
362
|
+
this.model.f_comments = ''
|
363
|
+
},
|
364
|
+
cancel() {
|
365
|
+
this.$dispatch('close')
|
366
|
+
}
|
367
|
+
}
|
368
|
+
}
|
369
|
+
</script>
|