system-clients 3.2.100 → 3.2.101-temp

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.
Files changed (74) hide show
  1. package/.gradle/7.4/checksums/checksums.lock +0 -0
  2. package/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
  3. package/.gradle/7.4/dependencies-accessors/gc.properties +0 -0
  4. package/.gradle/7.4/executionHistory/executionHistory.bin +0 -0
  5. package/.gradle/7.4/executionHistory/executionHistory.lock +0 -0
  6. package/.gradle/7.4/fileChanges/last-build.bin +0 -0
  7. package/.gradle/7.4/fileHashes/fileHashes.bin +0 -0
  8. package/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  9. package/.gradle/7.4/gc.properties +0 -0
  10. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  11. package/.gradle/buildOutputCleanup/cache.properties +2 -0
  12. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  13. package/.gradle/file-system.probe +0 -0
  14. package/.gradle/vcs-1/gc.properties +0 -0
  15. package/gradle/wrapper/gradle-wrapper.jar +0 -0
  16. package/gradle/wrapper/gradle-wrapper.properties +5 -0
  17. package/package.json +103 -103
  18. package/src/components/Main.vue +59 -34
  19. package/src/components/equipment/PcAdd.vue +1 -1
  20. package/src/components/equipment/PcList.vue +3 -3
  21. package/src/components/equipment/PhoneAdd.vue +1 -1
  22. package/src/components/equipment/PhoneList.vue +2 -2
  23. package/src/components/equipment/PosAdd.vue +11 -7
  24. package/src/components/equipment/PosList.vue +5 -3
  25. package/src/components/equipment/PosManage.vue +1 -1
  26. package/src/components/equipment/PosParamAdd.vue +2 -2
  27. package/src/components/equipment/PosParamList.vue +2 -2
  28. package/src/components/materialManage/materialList.vue +1 -1
  29. package/src/components/parammanage/ParamPage.vue +12 -12
  30. package/src/components/parammanage/ParamPages.vue +2 -2
  31. package/src/components/parammanage/SinglePage.vue +8 -8
  32. package/src/components/parammanage/SinglePages.vue +2 -2
  33. package/src/components/server/AddChangeMsg.vue +1 -1
  34. package/src/components/server/ChangeDeclare.vue +1 -1
  35. package/src/components/server/Login.vue +571 -575
  36. package/src/components/server/ModifyPw.vue +0 -1
  37. package/src/components/server/PcdBuildingSelect.vue +6 -8
  38. package/src/components/server/ResSelect.vue +9 -3
  39. package/src/components/server/ResSelectGroup.vue +1 -1
  40. package/src/components/server/RoleSelector.vue +2 -3
  41. package/src/components/server/TestResSelectGroup.vue +1 -1
  42. package/src/filiale/baole/Login.vue +2 -4
  43. package/src/filiale/bayan/PosAdd.vue +374 -0
  44. package/src/filiale/bayan/PosList.vue +349 -0
  45. package/src/filiale/bayan/PosManage.vue +138 -0
  46. package/src/filiale/bayan/system.js +6 -0
  47. package/src/filiale/chengtou/Login.vue +2 -4
  48. package/src/filiale/dongguan/Login.vue +2 -4
  49. package/src/filiale/dongguan/Main.vue +2 -4
  50. package/src/filiale/furuike/Login.vue +3 -7
  51. package/src/filiale/furuike/Main.vue +25 -38
  52. package/src/filiale/gehua/Main.vue +2 -4
  53. package/src/filiale/konggang/Login.vue +2 -4
  54. package/src/filiale/qianneng/Login.vue +2 -4
  55. package/src/filiale/qianneng/Main.vue +816 -818
  56. package/src/filiale/qianneng/ModifyPw.vue +0 -1
  57. package/src/filiale/rizhao/Login.vue +1 -3
  58. package/src/filiale/rizhao/Main.vue +2 -2
  59. package/src/filiale/shiquan/Login.vue +2 -4
  60. package/src/filiale/tianyi/Login.vue +2 -4
  61. package/src/filiale/tongchuan/Login.vue +2 -4
  62. package/src/filiale/tongchuan/Main.vue +5 -7
  63. package/src/filiale/weinan/Main.vue +5 -6
  64. package/src/filiale/wenxi/Login.vue +2 -4
  65. package/src/filiale/wenxi/Main.vue +2 -4
  66. package/src/filiale/wuhai/Main.vue +2 -5
  67. package/src/filiale/yuchuan/Login.vue +3 -5
  68. package/src/filiale/yuchuan/Main.vue +2 -4
  69. package/src/filiale/zhoukou/Main.vue +2 -4
  70. package/src/plugins/GetLoginInfoService.js +121 -18
  71. package/src/stores/AppData.js +1 -1
  72. package/src/system.js +6 -2
  73. package/src/filiale/ruihua/Login.vue +0 -549
  74. package/src/filiale/ruihua/system.js +0 -5
@@ -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) {
@@ -66,7 +66,7 @@
66
66
  self.arrays.pcd=[{label:'全部',value:''}]
67
67
  if(self.show.pcdShow){
68
68
  let HttpReset = new HttpResetClass()
69
- var pcd = await HttpReset.load('POST', 'api/af-revenue/sql/singleTable_OrderBy', {
69
+ var pcd = await HttpReset.load('POST', 'rs/sql/singleTable_OrderBy', {
70
70
  data: {
71
71
  items: 'f_pcd',
72
72
  tablename: 't_pcd',
@@ -80,7 +80,7 @@
80
80
  }else if(self.show.streetShow){
81
81
  console.log("------------查街道")
82
82
  let HttpReset = new HttpResetClass()
83
- var street = await HttpReset.load('POST', 'api/af-revenue/sql/singleTable_OrderBy', {
83
+ var street = await HttpReset.load('POST', 'rs/sql/singleTable_OrderBy', {
84
84
  data: {
85
85
  items: 'f_street',
86
86
  tablename: 't_street',
@@ -93,7 +93,7 @@
93
93
  }
94
94
  }else if(self.show.areaShow){
95
95
  let HttpReset = new HttpResetClass()
96
- var area = await HttpReset.load('POST', 'api/af-revenue/sql/singleTable_OrderBy', {
96
+ var area = await HttpReset.load('POST', 'rs/sql/singleTable_OrderBy', {
97
97
  data: {
98
98
  items: 'f_residential_area',
99
99
  tablename: 't_area',
@@ -155,8 +155,7 @@
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
- let street = await this.$resetpost('api/af-revenue/sql/singleTable_OrderBy', {
158
+ let street = await this.$resetpost('rs/sql/singleTable_OrderBy', {
160
159
  data: {
161
160
  items: 'f_street',
162
161
  tablename: 't_street',
@@ -172,7 +171,7 @@
172
171
  async streetChange(){
173
172
  this.arrays.area=[{label:'全部',value:''}]
174
173
  var condition = `f_street = '${this.model.f_street?this.model.f_street:null}' and f_residential_area is not null group by f_residential_area`
175
- let area = await this.$resetpost('api/af-revenue/sql/singleTable_OrderBy', {
174
+ let area = await this.$resetpost('rs/sql/singleTable_OrderBy', {
176
175
  data: {
177
176
  items: 'f_residential_area',
178
177
  tablename: 't_area',
@@ -193,8 +192,7 @@
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
- let build = await this.$resetpost('api/af-revenue/sql/singleTable_OrderBy', {
195
+ let build = await this.$resetpost('rs/sql/singleTable_OrderBy', {
198
196
  data: {
199
197
  items: 'f_building',
200
198
  tablename: 't_user_address',
@@ -80,9 +80,6 @@
80
80
  //找到跟节点
81
81
  ergodicList (val,parentname) {
82
82
  if(val.children.length > 0 ){
83
- if (val.name !== '组织机构' && parentname !== '资源管理'){
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>
@@ -42,7 +42,7 @@
42
42
 
43
43
  <export-excel :data="$parent.$parent.getCondition"
44
44
  :field="$parent.$parent.getfield"
45
- sqlurl="api/af-revenue/logic/exportfile" sql-name="chargeQuery" template-name='收费查询导出'
45
+ sqlurl="rs/logic/exportfile" sql-name="chargeQuery" template-name='收费查询导出'
46
46
  :choose-col="true"></export-excel>
47
47
 
48
48
  <print-data :model="$parent.model" :field="$parent.$parent.getfield"
@@ -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
@@ -264,7 +263,7 @@ export default {
264
263
  this.vTime = this.format(new Date(window.versionTime));
265
264
  try{
266
265
  let http = new HttpResetClass()
267
- let res = await http.load('POST', 'api/af-system/sql/singleTable',
266
+ let res = await http.load('POST', 'rs/sql/singleTable',
268
267
  {data:{
269
268
  tablename: 't_changedeclare',
270
269
  condition: ` f_type ='变更通知' `
@@ -364,7 +363,7 @@ export default {
364
363
  } else {
365
364
  condition =` f_orderstate is null and (f_address in( select f_address from t_user_address where f_slice_area='柠条塔') or f_address like '%柠条塔%') `
366
365
  }
367
- await http.load('POST', '/api/af-system/sql/singleTable', {data: {
366
+ await http.load('POST', '/rs/sql/singleTable', {data: {
368
367
  tablename:'t_order_center',
369
368
  condition:condition
370
369
  }}, {
@@ -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,374 @@
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">&ensp;所属公司&ensp;</label>
11
+ <right-tree @re-res="getOrg"></right-tree>
12
+ </div>
13
+ <div class="col-sm-6 form-group">
14
+ <label class="font_normal_body">所属部门</label>
15
+ <res-select restype='department'
16
+ :is-mul="false"
17
+ @res-select="getDep"
18
+ :parentresid="depresid"
19
+ :initresid="initresid">
20
+ </res-select>
21
+ </div>
22
+ <div class="col-sm-6 form-group">
23
+ <label class="font_normal_body">设备负责人</label>
24
+ <right-tree @re-res="getRes" :source="source" :initresid="initresids"></right-tree>
25
+ </div>
26
+ <div class="col-sm-6 form-group" :class="[$v.f_terminal_number.required ? 'has-error' : '']">
27
+ <label class="font_normal_body">设备编号</label>
28
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_terminal_number" placeholder="设备编号" v-el:f_terminal_number
29
+ v-validate:f_terminal_number='{required :true}' />
30
+ </div>
31
+ <div class="col-sm-6 form-group" :class="[$v.f_terminal_name.required ? 'has-error' : '']">
32
+ <label class="font_normal_body">&ensp;设备名称&ensp;</label>
33
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_terminal_name" placeholder="设备名称"
34
+ v-validate:f_terminal_name='{required: true}' />
35
+ </div>
36
+ <div class="col-sm-6 form-group" :class="{'has-error': $v.f_equipment_type.required}">
37
+ <label class="font_normal_body">设备类型</label>
38
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_equipment_type" placeholder="设备类型"
39
+ v-validate:f_equipment_type="{required: true}" />
40
+ </div>
41
+ <div class="col-sm-6 form-group">
42
+ <label class="font_normal_body" >&ensp;MAC&nbsp;号&nbsp;&ensp;</label>
43
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_mac_number" placeholder="MAC号" >
44
+ </div>
45
+ <div class="col-sm-6 form-group">
46
+ <label class="font_normal_body" >机器编号</label>
47
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_machine_number" placeholder="机器编号" >
48
+ </div>
49
+ <div class="col-sm-6 form-group" :class="{'has-error': $v.f_phone.required}">
50
+ <label class="font_normal_body">&ensp;联系电话&ensp;</label>
51
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_phone" placeholder="联系电话"
52
+ v-validate:f_phone="{required: true, minlength:7, maxlength: 11}" title="手机号必须7-11位">
53
+ <!-- <div class="font_normal_body" v-if="$v.f_phone.minlength || $v.f_phone.maxlength"><span>手机号必须7-11位</span></div>-->
54
+ </div>
55
+ <div class="col-sm-6 form-group" :class="{'has-error': $v.f_bank_name.required}">
56
+ <label class="font_normal_body">所属银行</label>
57
+ <v-select id="f_charge_type"
58
+ v-model="model.f_bank_name"
59
+ placeholder='所属银行'
60
+ :value.sync="model.f_bank_name"
61
+ :options='bankAffiliation'
62
+ :value-single="true"
63
+ v-validate:f_bank_name="{ required: true }"
64
+ close-on-select clear-button>
65
+ </v-select>
66
+ </div>
67
+ <div class="col-sm-6 form-group">
68
+ <label class="font_normal_body">&ensp;所属参数&ensp;</label>
69
+ <v-select id="f_charge_type"
70
+ v-model="model.f_param_id"
71
+ placeholder='所属参数'
72
+ :value.sync="model.f_param_id"
73
+ :options='ParamTypeItems'
74
+ close-on-select clear-button>
75
+ </v-select>
76
+ </div>
77
+ </div>
78
+ <div class="col-sm-12 form-group" :class="{'has-error': $v.f_address.required}">
79
+ <label class="font_normal_body">&ensp;放置地点&ensp;</label>
80
+ <textarea class="input_textarea" style="width: 80%" v-model="model.f_address" placeholder="所在地"
81
+ v-validate:f_address="{required: true}" rows="2"></textarea>
82
+ </div>
83
+ <div class="col-sm-12 form-group">
84
+ <label class="font_normal_body " >&ensp;&nbsp;&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;&ensp;</label>
85
+ <textarea class="input_textarea" rows="3" style="width:80%;margin-top:5px" v-model="model.f_comments"></textarea>
86
+ </div>
87
+ </form>
88
+ <div style="text-align:right;height:auto;">
89
+ <button class="button_search" @click="uploadFiles()" v-if="info">上传图片</button>
90
+ <button class="btn btn-info" @click="upgrade()" v-if="info && data.f_state==='正常'">升级</button>
91
+ <button class="btn btn-success" @click="getEditState()" v-if="model.f_state === '停用' && info" >启用</button>
92
+ <button class="btn btn-danger" @click="getEditState()" v-if="model.f_state === '正常' && info" >停用</button>
93
+ <button class="btn button_search" @click="confirm()" :disabled="!$v.valid" >确认</button>
94
+ <button class="btn button_clear " @click="cancel()" >取消</button>
95
+ </div>
96
+ <modal :show.sync="showfiles" width="80%" style="width:auto;" v-ref:modal middle backdrop="false">
97
+ <article slot="modal-body" style="height: 500px">
98
+ <upload v-show="showfiles" :businessid="model.id" v-ref:upload fusetype="POS" isremark="true" style="width:auto" ></upload>
99
+ </article>
100
+ <footer slot="modal-footer" class="modal-footer">
101
+ </footer>
102
+ </modal>
103
+ <modal v-if="show" :show.sync="show" v-ref:modal backdrop="false" >
104
+ <header slot="modal-header" class="modal-header">
105
+ <button type="button" class="close" @click="close"><span>&times;</span></button>
106
+ <h4 class="modal-title">pos机升级</h4>
107
+ </header>
108
+ <article slot="modal-body" class="modal-body">
109
+ <form class="form-horizontal">
110
+ <div class="row">
111
+ <div>
112
+ <h4>是否升级?</h4>
113
+ </div>
114
+ <!-- <div class="col-sm-6 form-group">-->
115
+ <!-- <label class="font_normal_body">参数名称</label>-->
116
+ <!-- <input type="text" class="input_search" style="width: 60%" v-model="modifyItem.name" @keyup.enter="confirm">-->
117
+ <!-- </div>-->
118
+ <!-- <div class="col-sm-6 form-group" v-if="modifyItem.EntityType === 't_parameter'">-->
119
+ <!-- <div class="checkbox">-->
120
+ <!-- <label>-->
121
+ <!-- <input type="checkbox" v-model="modifyItem.isGlobal" :checked="modifyItem.isGlobal">是否全局-->
122
+ <!-- </label>-->
123
+ <!-- </div>-->
124
+ <!-- </div>-->
125
+ </div>
126
+ </form>
127
+ </article>
128
+ <footer slot="modal-footer" class="modal-footer">
129
+ <button type="button" class="button_search button_spacing" @click='upgradeRoot()'>是</button>
130
+ <button type="button" class="button_clear button_spacing" @click='close'>否</button>
131
+ </footer>
132
+ </modal>
133
+ </validator>
134
+
135
+ </div>
136
+ </template>
137
+ <script>
138
+ import {HttpResetClass, PagedList} from 'vue-client'
139
+ export default {
140
+ data () {
141
+ return {
142
+ depname: '',
143
+ f_depid: '',
144
+ orgname: '',
145
+ initresid: [], // 用于存放初始化选中的部门 ID
146
+ initresids: [],
147
+ depresid: [this.$login.f.orgid],
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
+ getOrg (obj, val) {
216
+ console.log('org', obj, val)
217
+ this.model.f_orgname = obj.res[0]
218
+ this.depresid = obj.resids
219
+ this.model.f_orgid = obj.resids[0]
220
+ console.log(this.model)
221
+ },
222
+ getDep (obj, val) {
223
+ console.log('dep', obj, val)
224
+ this.model.f_depname = val[0]
225
+ this.userresid = obj
226
+ this.model.f_depid = obj[0]
227
+ console.log(this.model)
228
+ },
229
+ recursiveSelOrg(val, flag){
230
+ if(val.parent){
231
+ if(val.parent.resourcetype===flag){
232
+ return {id: val.parent.id, name: val.parent.name}
233
+ } else {
234
+ return this.recursiveSelOrg(val.parent,flag)
235
+ }
236
+ } else {
237
+ return {id: '', name: ''}
238
+ }
239
+ },
240
+ getRes(val){
241
+ console.log('====================', val)
242
+ if (val.orgobj.length === 1 && val.orgobj[0].resourcetype === 'user'){
243
+
244
+ // let org = this.recursiveSelOrg(val.orgobj[0], 'organization')
245
+ // this.model.f_orgid=org.id
246
+ // this.model.f_orgname=org.name
247
+ // let dep = this.recursiveSelOrg(val.orgobj[0], 'department')
248
+ // this.model.f_depid=dep.id
249
+ // this.model.f_depname=dep.name
250
+
251
+ this.model.f_operatorid = val.orgobj[0].userid
252
+ this.model.f_operator=val.orgobj[0].name
253
+ this.isSelPop = true
254
+ } else {
255
+ // 不可提交
256
+ this.isSelPop = false
257
+ }
258
+ },
259
+ close () {
260
+ this.show = false
261
+ },
262
+ uploadFiles(){
263
+ this.showfiles= !this.showfiles
264
+ },
265
+ getEditState () {
266
+ if (this.model.f_state === '正常') {
267
+ this.$showMessage(`当前设备号: ${this.model.f_terminal_number} ,确认停用该设备?`, ['confirm', 'cancel']).then((res) => {
268
+ if (res === 'confirm') {
269
+ this.$showAlert(`已向设备号: ${this.model.f_terminal_number}发送停用指令,请稍后查看执行结果!`, 'success', 2500)
270
+ this.model.f_state = '停用'
271
+ try {
272
+ // 测试接口
273
+ // this.$resetpost('rs/logic/updatePosState', {data: {number: this.model.f_terminal_number, state: '停用'}}, {resolveMsg: null, rejectMsg: null}, 0)
274
+ // .then((res) => {})
275
+ this.$resetpost('rs/logic/batchPos',{data: {tasks: [this.data], taskState: 0}}, {rejectMsg: null, resolveMsg: null})
276
+ } catch (error) {
277
+ this.search()
278
+ }
279
+ }
280
+ })
281
+ } else if (this.model.f_state === '停用'){
282
+ this.$showMessage(`当前设备号: ${this.model.f_terminal_number} ,确认启用该设备?`, ['confirm', 'cancel']).then((res) => {
283
+ if (res === 'confirm') {
284
+ this.$showAlert(`已向设备号: ${this.model.f_terminal_number}发送启用指令,请稍后查看执行结果!`, 'success', 2500)
285
+ this.model.f_state = '正常'
286
+ try {
287
+ // 测试接口
288
+ // this.$resetpost('rs/logic/getEditPosState', {data: {number: this.model.f_terminal_number, state: '正常'}}, {resolveMsg: null, rejectMsg: null}, 0)
289
+ // .then((res) => {})
290
+ this.$resetpost('rs/logic/batchPos',{data: {tasks: [this.data], taskState: 1}}, {rejectMsg: null, resolveMsg: null})
291
+ } catch (error) {
292
+ this.search()
293
+ }
294
+ }
295
+ })
296
+ }
297
+ },
298
+ editBeizhu (val) {
299
+ this.editshow = true
300
+ this.posBase = val
301
+ },
302
+
303
+ //升级
304
+ upgrade(){
305
+ this.show=true
306
+ },
307
+ upgradeRoot() {
308
+ this.$resetpost('rs/logic/batchPos',{data: {tasks: [this.data], taskState: 2}}, {rejectMsg: null, resolveMsg: null})
309
+ this.$dispatch('refresh')
310
+ },
311
+ search () {
312
+ this.$refs.paged.$refs.cri.search()
313
+ },
314
+ confirm () {
315
+ // 如果是修改的话,只修改页面上用户填写的信息
316
+ if (!this.info) {
317
+ this.model.f_user_depname = this.$login.f.deps
318
+ this.model.f_user_depid = this.$login.f.depids
319
+ this.model.f_online = '离线'
320
+ this.model.f_user_operator = this.$login.f.name
321
+ this.model.f_user_orgid = this.$login.f.orgid
322
+ this.model.f_filialeids = this.$login.f.orgid
323
+ this.model.f_user_operatorid = this.$login.f.id
324
+ this.model.f_user_orgname = this.$login.f.orgs
325
+ // this.model.f_depname=this.depname[0]
326
+ this.model.f_orgstr = this.$login.f.fullids
327
+ }
328
+ console.log(this.model)
329
+ this.$resetpost('rs/entity/t_equipment', this.model, {resolveMsg: '保存成功', rejectMsg: '保存失败'}).then((res) => {
330
+ this.$dispatch('refresh')
331
+ }).catch((error) => {
332
+ this.$dispatch('refresh')
333
+ })
334
+
335
+ },
336
+ edit (row) {
337
+ this.model.f_terminal_number = row.f_terminal_number
338
+ this.model.f_terminal_name = row.f_terminal_name
339
+ this.model.f_bank_name = row.f_bank_name
340
+ this.model.f_machine_number = row.f_machine_number
341
+ this.model.f_mac_number = row.f_mac_number
342
+ this.model.f_address = row.f_address
343
+ this.model.f_phone = row.f_phone
344
+ this.model.f_state = row.f_state
345
+ this.model.f_comments=row.f_comments
346
+ this.model.f_param_id=row.f_param_id
347
+ // this.model.f_username=row.f_username
348
+ this.model.id = row.id
349
+ this.model.f_filialeids=row.f_filialeids
350
+ this.model.f_orgid = row.f_orgid
351
+ this.model.f_depname = row.f_depname
352
+ this.initresid = [row.f_depid]
353
+ this.initresids = [row.f_operatorid]
354
+ },
355
+ initModel() {
356
+ delete this.model.id
357
+ this.model.f_terminal_number = ''
358
+ this.model.f_terminal_name = ''
359
+ this.model.f_bank_name = ''
360
+ this.model.f_machine_number = ''
361
+ this.model.f_state = '正常'
362
+ this.model.f_phone = ''
363
+ this.model.f_param_id = ''
364
+ this.model.f_address = ''
365
+ this.model.f_filialeids = ''
366
+ this.model.f_orgid = ''
367
+ this.model.f_comments = ''
368
+ },
369
+ cancel() {
370
+ this.$dispatch('close')
371
+ }
372
+ }
373
+ }
374
+ </script>