system-clients 3.1.87-aode → 3.1.87-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.
Files changed (132) hide show
  1. package/build/webpack.base.conf.js +1 -4
  2. package/package.json +2 -2
  3. package/src/components/Main.vue +6 -8
  4. package/src/components/equipment/EquipmentManage.vue +68 -65
  5. package/src/components/equipment/PcAdd.vue +5 -5
  6. package/src/components/equipment/PcList.vue +5 -5
  7. package/src/components/equipment/PhoneAdd.vue +4 -4
  8. package/src/components/equipment/PhoneList.vue +4 -4
  9. package/src/components/equipment/PosAdd.vue +205 -43
  10. package/src/components/equipment/PosList.vue +153 -63
  11. package/src/components/equipment/PosManage.vue +92 -9
  12. package/src/components/equipment/QCAdd.vue +318 -0
  13. package/src/components/equipment/QCList.vue +230 -0
  14. package/src/components/equipment/QCManage.vue +150 -0
  15. package/src/components/server/Login.vue +49 -100
  16. package/src/components/server/ModifyPw.vue +4 -5
  17. package/src/components/server/ResSelect.vue +5 -1
  18. package/src/components/server/ResSelectGroup.vue +1 -1
  19. package/src/components/server/RightTree.vue +314 -344
  20. package/src/plugins/EncryptUtil.js +53 -0
  21. package/src/plugins/GetLoginInfoService.js +3 -0
  22. package/src/plugins/validation.js +1 -1
  23. package/src/system.js +89 -83
  24. package/.gradle/3.5/file-changes/last-build.bin +0 -0
  25. package/.gradle/3.5/taskHistory/taskHistory.lock +0 -0
  26. package/.gradle/5.5/fileChanges/last-build.bin +0 -0
  27. package/.gradle/5.5/fileHashes/fileHashes.lock +0 -0
  28. package/.gradle/5.5/gc.properties +0 -0
  29. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  30. package/.gradle/buildOutputCleanup/built.bin +0 -0
  31. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  32. package/.gradle/buildOutputCleanup/cache.properties.lock +0 -1
  33. package/src/styles/fonts/PINGFANG LIGHT.TTF +0 -0
  34. package/src/styles/fonts/PingFangSC-Regular.ttf +0 -0
  35. package/src/styles/fonts/glyphicons-halflings-regular.eot +0 -0
  36. package/src/styles/fonts/glyphicons-halflings-regular.svg +0 -288
  37. package/src/styles/fonts/glyphicons-halflings-regular.ttf +0 -0
  38. package/src/styles/fonts/glyphicons-halflings-regular.woff +0 -0
  39. package/src/styles/fonts/glyphicons-halflings-regular.woff2 +0 -0
  40. package/src/styles/fonts/pingfang-bold.ttf +0 -0
  41. package/src/styles/fonts/pingfang-medium.ttf +0 -0
  42. package/src/styles/fonts/pingfang-regular.ttf +0 -0
  43. package/src/styles/fonts/trendstrends.ttf +0 -0
  44. package/src/styles/fonts//346/261/211/344/273/252/350/217/261/345/277/203/344/275/223/347/256/200.ttf +0 -0
  45. package/src/styles/less/.csscomb.json +0 -304
  46. package/src/styles/less/.csslintrc +0 -19
  47. package/src/styles/less/alerts.less +0 -73
  48. package/src/styles/less/aofeng/animate.min.css +0 -11
  49. package/src/styles/less/aofeng/expandcss.less +0 -569
  50. package/src/styles/less/aofeng/standard.less +0 -2121
  51. package/src/styles/less/aofeng/themeOne/BinaryTemplate.less +0 -686
  52. package/src/styles/less/aofeng/themeOne/loginStyle.less +0 -1586
  53. package/src/styles/less/aofeng/themeOne/systemStyle.less +0 -2650
  54. package/src/styles/less/aofeng/themeOne.less +0 -17
  55. package/src/styles/less/aofeng/themeTwo/newStyle1.less +0 -415
  56. package/src/styles/less/aofeng/themeTwo.less +0 -3
  57. package/src/styles/less/badges.less +0 -66
  58. package/src/styles/less/bootstrap.less +0 -66
  59. package/src/styles/less/breadcrumbs.less +0 -26
  60. package/src/styles/less/button-groups.less +0 -247
  61. package/src/styles/less/buttons.less +0 -172
  62. package/src/styles/less/carousel.less +0 -269
  63. package/src/styles/less/close.less +0 -34
  64. package/src/styles/less/code.less +0 -69
  65. package/src/styles/less/component-animations.less +0 -33
  66. package/src/styles/less/dropdowns.less +0 -216
  67. package/src/styles/less/fonts-list.less +0 -25
  68. package/src/styles/less/forms.less +0 -626
  69. package/src/styles/less/glyphicons.less +0 -305
  70. package/src/styles/less/grid.less +0 -84
  71. package/src/styles/less/input-groups.less +0 -167
  72. package/src/styles/less/jumbotron.less +0 -52
  73. package/src/styles/less/labels.less +0 -64
  74. package/src/styles/less/list-group.less +0 -141
  75. package/src/styles/less/manageStyle/manageChile.less +0 -180
  76. package/src/styles/less/manageStyle/manageStyle.less +0 -1102
  77. package/src/styles/less/manageStyle/safeStyle.less +0 -498
  78. package/src/styles/less/media.less +0 -66
  79. package/src/styles/less/mixins/alerts.less +0 -14
  80. package/src/styles/less/mixins/background-variant.less +0 -9
  81. package/src/styles/less/mixins/border-radius.less +0 -18
  82. package/src/styles/less/mixins/buttons.less +0 -69
  83. package/src/styles/less/mixins/center-block.less +0 -7
  84. package/src/styles/less/mixins/clearfix.less +0 -22
  85. package/src/styles/less/mixins/forms.less +0 -90
  86. package/src/styles/less/mixins/gradients.less +0 -59
  87. package/src/styles/less/mixins/grid-framework.less +0 -92
  88. package/src/styles/less/mixins/grid.less +0 -122
  89. package/src/styles/less/mixins/hide-text.less +0 -21
  90. package/src/styles/less/mixins/image.less +0 -33
  91. package/src/styles/less/mixins/labels.less +0 -12
  92. package/src/styles/less/mixins/list-group.less +0 -30
  93. package/src/styles/less/mixins/nav-divider.less +0 -10
  94. package/src/styles/less/mixins/nav-vertical-align.less +0 -9
  95. package/src/styles/less/mixins/opacity.less +0 -8
  96. package/src/styles/less/mixins/pagination.less +0 -24
  97. package/src/styles/less/mixins/panels.less +0 -24
  98. package/src/styles/less/mixins/progress-bar.less +0 -10
  99. package/src/styles/less/mixins/reset-filter.less +0 -8
  100. package/src/styles/less/mixins/reset-text.less +0 -18
  101. package/src/styles/less/mixins/resize.less +0 -6
  102. package/src/styles/less/mixins/responsive-visibility.less +0 -15
  103. package/src/styles/less/mixins/size.less +0 -10
  104. package/src/styles/less/mixins/tab-focus.less +0 -9
  105. package/src/styles/less/mixins/table-row.less +0 -44
  106. package/src/styles/less/mixins/text-emphasis.less +0 -9
  107. package/src/styles/less/mixins/text-overflow.less +0 -8
  108. package/src/styles/less/mixins/vendor-prefixes.less +0 -227
  109. package/src/styles/less/mixins.less +0 -40
  110. package/src/styles/less/modals.less +0 -151
  111. package/src/styles/less/navbar.less +0 -660
  112. package/src/styles/less/navs.less +0 -285
  113. package/src/styles/less/normalize.less +0 -424
  114. package/src/styles/less/pager.less +0 -76
  115. package/src/styles/less/pagination.less +0 -89
  116. package/src/styles/less/panels.less +0 -275
  117. package/src/styles/less/popovers.less +0 -131
  118. package/src/styles/less/print.less +0 -101
  119. package/src/styles/less/progress-bars.less +0 -87
  120. package/src/styles/less/responsive-embed.less +0 -35
  121. package/src/styles/less/responsive-utilities.less +0 -194
  122. package/src/styles/less/scaffolding.less +0 -161
  123. package/src/styles/less/stand.less +0 -207
  124. package/src/styles/less/tables.less +0 -262
  125. package/src/styles/less/theme.less +0 -291
  126. package/src/styles/less/thumbnails.less +0 -36
  127. package/src/styles/less/tooltip.less +0 -102
  128. package/src/styles/less/type.less +0 -303
  129. package/src/styles/less/utilities.less +0 -55
  130. package/src/styles/less/variables.less +0 -896
  131. package/src/styles/less/wells.less +0 -29
  132. package/static/logo.png +0 -0
@@ -4,71 +4,137 @@
4
4
  <ul class="nav nav-tabs" >
5
5
  <li role="presentation" class="active"><a href="#">POS</a></li>
6
6
  </ul>
7
- <form class="form-horizontal">
7
+ <form novalidate class="form-horizontal" >
8
8
  <div class="row">
9
- <div class="col-sm-6">
10
- <label class="font_normal_body" >设备编号</label>
11
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_terminal_number" placeholder="设备编号" >
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
12
  </div>
13
- <div class="col-sm-6">
14
- <label class="font_normal_body" >设备名称</label>
15
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_terminal_name" placeholder="设备名称" >
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}' />
16
17
  </div>
17
- </div>
18
- <div class="row">
19
- <div class="col-sm-6">
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">
20
33
  <label class="font_normal_body" >机器编号</label>
21
34
  <input type="text" class="input_search" style="width: 60%" v-model="model.f_machine_number" placeholder="机器编号" >
22
35
  </div>
23
- <div class="col-sm-6">
24
- <label class="font_normal_body" >联系电话</label>
25
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_phone" placeholder="联系电话" >
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>-->
26
41
  </div>
27
- </div>
28
- <div class="row">
29
- <div class="col-sm-6">
30
- <label class="font_normal_body" >&nbsp;&nbsp;&nbsp;所在地</label>
31
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_address" placeholder="所在地" >
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}">
32
46
  </div>
33
- <div class="col-sm-6">
34
- <label class="font_normal_body" >所属银行</label>
35
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_bank_name" placeholder="所属银行" >
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}">
36
51
  </div>
37
52
  </div>
38
- <div class="col-sm-12">
39
- <label class="font_normal_body " style="margin-top:-20px">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
53
+ <div class="col-sm-12 form-group">
54
+ <label class="font_normal_body " >&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
40
55
  <textarea class="input_textarea" rows="3" style="width:80%;margin-top:5px" v-model="model.f_comments"></textarea>
41
56
  </div>
42
57
  </form>
43
58
  <div style="text-align:right;height:auto;">
44
- <button class="btn button_search " @click="confirm()" >确认</button>
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>
45
64
  <button class="btn button_clear " @click="cancel()" >取消</button>
46
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>
47
104
  </validator>
105
+
48
106
  </div>
49
107
  </template>
50
108
  <script>
51
-
52
-
109
+ import {PagedList} from 'vue-client'
53
110
  export default {
54
111
  data () {
55
112
  return {
113
+ checkparam: false,
114
+ source: `tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`,
56
115
  model: {
57
116
  f_terminal_number: '',
58
117
  f_terminal_name: '',
118
+ f_mac_number:'',
119
+ // f_username:'',
59
120
  f_bank_name: '',
60
121
  f_equipment_type: 'POS',
61
122
  f_state: '正常',
62
- f_machine_number:'',
123
+ f_machine_number: '',
63
124
  f_phone:'',
64
125
  f_comments:'',
65
126
  f_address:'',
66
- f_filialeids:this.f_filialeids,
127
+ f_filialeids: '',
67
128
  f_orgid:''
68
- }
129
+ },
130
+ showfiles: false,
131
+ show:false,
132
+ infoadd: this.infoadd,
133
+ isSelPop: false
69
134
  }
70
135
  },
71
- props: ['data', 'f_filialeids'],
136
+ props: ['data', 'f_filialeids','info'],
137
+
72
138
  watch: {
73
139
  'data' (val) {
74
140
  if (val) {
@@ -83,26 +149,118 @@
83
149
  if (this.data) {
84
150
  this.edit(this.data)
85
151
  }
152
+ console.log('查看是否隐藏', this.info)
86
153
  },
154
+
87
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
+ },
88
246
  confirm () {
89
- // if(this.f_filialeids!=''&&this.f_filialeids!=null){
90
- this.model.f_operator = this.$login.f.name
91
- this.model.f_operatorid = this.$login.f.id
92
- this.model.f_filialeids = this.f_filialeids
93
- this.model.f_orgid = this.$login.f.orgid
94
- this.model.f_orgname = this.$login.f.orgs
95
- this.model.f_depid = this.$login.f.depids
96
- this.model.f_depname = this.$login.f.deps
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
+ }
97
259
  this.$resetpost('rs/entity/t_equipment', this.model, {resolveMsg: '保存成功', rejectMsg: '保存失败'}).then((res) => {
98
260
  this.$dispatch('refresh')
99
261
  }).catch((error) => {
100
262
  this.$dispatch('refresh')
101
263
  })
102
- // }else
103
- // {
104
- // this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
105
- // }
106
264
 
107
265
  },
108
266
  edit (row) {
@@ -110,11 +268,14 @@
110
268
  this.model.f_terminal_name = row.f_terminal_name
111
269
  this.model.f_bank_name = row.f_bank_name
112
270
  this.model.f_machine_number = row.f_machine_number
271
+ this.model.f_mac_number = row.f_mac_number
113
272
  this.model.f_address = row.f_address
114
273
  this.model.f_phone = row.f_phone
274
+ this.model.f_state = row.f_state
115
275
  this.model.f_comments=row.f_comments
116
- this.model.f_filialeids=row.f_filialeids
276
+ // this.model.f_username=row.f_username
117
277
  this.model.id = row.id
278
+ this.model.f_filialeids=row.f_filialeids
118
279
  this.model.f_orgid = row.f_orgid
119
280
  },
120
281
  initModel () {
@@ -123,6 +284,7 @@
123
284
  this.model.f_terminal_name = ''
124
285
  this.model.f_bank_name = ''
125
286
  this.model.f_machine_number = ''
287
+ this.model.f_state = '正常'
126
288
  this.model.f_phone = ''
127
289
  this.model.f_address = ''
128
290
  this.model.f_filialeids=''
@@ -5,153 +5,243 @@
5
5
  <criteria partial='criteria' @condition-changed='$parent.selfSearch' v-ref:cri>
6
6
  <div novalidate class="form-horizontal select-overspread container-fluid auto" partial>
7
7
  <div class="row">
8
- <div class="col-sm-3">
9
- <label class="font_normal_body">使用公司</label>
8
+ <div class="col-sm-3 form-group">
9
+ <label class="font_normal_body">公&nbsp;&nbsp;&nbsp;司</label>
10
10
  <res-select restype='organization'
11
11
  is-mul="false"
12
12
  @res-select="$parent.$parent.getorg"
13
13
  :initresid="$parent.$parent.curorgid">
14
14
  </res-select>
15
15
  </div>
16
- <div class="col-sm-3">
16
+ <div class="col-sm-3 form-group">
17
17
  <label class="font_normal_body">设备编号</label>
18
18
  <input type="text" class="input_search" style="width:60%" v-model="model.f_terminal_number"
19
19
  condition="f_terminal_number like '%{}%'" placeholder="设备编号">
20
20
  </div>
21
- <div class="col-sm-3">
22
- <label class="font_normal_body">联系电话</label>
23
- <input type="text" class="input_search" style="width:60%" v-model="model.f_phone"
24
- condition="f_phone like '%{}%'" placeholder="联系电话">
21
+ <div class="col-sm-3 form-group">
22
+ <label class="font_normal_body">所属人员</label>
23
+ <right-tree @re-res="$parent.$parent.getRes" :source="$parent.$parent.source"></right-tree>
25
24
  </div>
26
25
 
27
26
  <div class="span" style="float:right;">
28
27
  <button type="button" class="button_search" @click="search()" v-el:cx>查询</button>
29
- <button type="button" class="button_search" @click="$parent.$parent.add()" v-el:cx>新增</button>
28
+ <button type="button" class="button_search" @click="$parent.$parent.add() " v-el:cx >新增</button>
30
29
  <div style="float: right" class="button_spacing" :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
31
30
  @click="$parent.$parent.hidden()"></div>
32
31
  </div>
33
32
  </div>
34
33
  <div class="row" v-show="$parent.$parent.criteriaShow">
35
- <div class="col-sm-3">
36
- <label class="font_normal_body">&nbsp;&nbsp;&nbsp;所在地</label>
34
+ <div class="col-sm-3 form-group">
35
+ <label class="font_normal_body">所在地</label>
37
36
  <input type="text" class="input_search" style="width:60%" v-model="model.f_address"
38
37
  condition="f_address like '%{}%'" placeholder="所在地">
39
38
  </div>
40
- <div class="col-sm-3">
39
+ <div class="col-sm-3 form-group">
41
40
  <label class="font_normal_body">设备名称</label>
42
41
  <input type="text" class="input_search" style="width:60%" v-model="model.f_terminal_name"
43
42
  condition="f_terminal_name like '%{}%'" placeholder="设备名称">
44
43
  </div>
45
- <div class="col-sm-3">
44
+ <div class="col-sm-3 form-group">
46
45
  <label class="font_normal_body">机器编号</label>
47
46
  <input type="text" class="input_search" style="width:60%" v-model="model.f_machine_number"
48
47
  condition="f_machine_number like '%{}%'" placeholder="机器编号">
49
48
  </div>
50
- <div class="col-sm-3">
49
+ <div class="col-sm-3 form-group">
51
50
  <label class="font_normal_body">所属银行</label>
52
51
  <input type="text" class="input_search" style="width:60%" v-model="model.f_bank_name"
53
52
  condition="f_bank_name like '%{}%'" placeholder="所属银行">
54
53
  </div>
54
+ <div class="col-sm-3 form-group">
55
+ <label class="font_normal_body">联系电话</label>
56
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_phone"
57
+ condition="f_phone like '%{}%'" placeholder="联系电话">
58
+ </div>
55
59
  </div>
56
60
  </div>
57
61
  </criteria>
58
62
  <data-grid :model="model" partial='list' class="list_area table_sy" v-ref:grid >
59
63
  <template partial='head'>
60
64
  <tr>
61
- <th>序号</th>
62
- <th>设备编号</th>
63
- <th>设备名称</th>
64
- <th>机器编号</th>
65
- <th>联系电话</th>
66
- <th>所在地</th>
67
- <th>所属银行</th>
68
- <th>电池电量</th>
69
- <th>是否登录</th>
70
- <th>更新时间</th>
71
- <th>软件版本</th>
72
- <th>操作</th>
65
+ <th><input type="checkbox" name="ischeckbox_all_id" v-model="$parent.$parent.$parent.isSelAll" :value.sync="$parent.$parent.$parent.isSelAll" /></th>
66
+ <th style="text-align:center;white-space:nowrap;">序号</th>
67
+ <th style="text-align:center;white-space:nowrap;">设备编号</th>
68
+ <th style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">设备类型</th>
69
+ <th style="text-align:center;white-space:nowrap;">设备名称</th>
70
+ <th style="text-align:center;white-space:nowrap;">所属公司</th>
71
+ <th style="text-align:center;white-space:nowrap;">所属部门</th>
72
+ <th style="text-align:center;white-space:nowrap;">所属人员</th>
73
+ <th style="text-align:center;white-space:nowrap;">状态</th>
74
+ <th style="text-align:center;white-space:nowrap;">机器编号</th>
75
+ <th style="text-align:center;white-space:nowrap;">联系电话</th>
76
+ <th style="text-align:center;white-space:nowrap;">所在地</th>
77
+ <th style="text-align:center;white-space:nowrap;">所属银行</th>
78
+ <th style="text-align:center;white-space:nowrap;">电池电量</th>
79
+ <th style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">是否登录</th>
80
+ <th style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">更新时间</th>
81
+ <th style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">操作时间</th>
82
+ <th style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">软件版本</th>
83
+ <!-- <th style="text-align:center;white-space:nowrap;">使用人员</th>-->
84
+ <th style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">操作人</th>
85
+ <th style="text-align:center;white-space:nowrap;">失联状态</th>
73
86
  </tr>
74
87
  </template>
75
88
  <template partial='body':model="model">
76
89
  <tr>
77
- <td style="text-align:center">{{$index+1}}</td>
78
- <td style="text-align:center">{{row.f_terminal_number}}</td>
79
- <td style="text-align:center">{{row.f_terminal_name}}</td>
80
- <td style="text-align:center">{{row.f_machine_number}}</td>
81
- <td style="text-align:center">{{row.f_phone}}</td>
82
- <td style="text-align:center">{{row.f_address}}</td>
83
- <td style="text-align:center">{{row.f_bank_name}}</td>
84
- <td style="text-align:center">{{row.f_battery_level}}</td>
85
- <td style="text-align:center">{{row.f_is_login}}</td>
86
- <td style="text-align:center">{{row.f_hybrid_version}}</td>
87
- <td style="text-align:center">{{row.f_appVer}}</td>
88
- <td style="text-align:center">
89
- <button class="btn btn-link" @click.stop="$parent.$parent.$parent.del(row)">删除</button>
90
- </td>
90
+ <td><input type="checkbox" name="checkbox_id" v-model="$parent.$parent.$parent.selPos" :value.sync="row"></td>
91
+ <td style="text-align:center;white-space:nowrap;">{{$index+1}}</td>
92
+ <td style="text-align:center;white-space:nowrap;"><span title="点击查看历史" @click="$parent.$parent.$parent.abcd(row)"><a>{{row.f_terminal_number}}</a></span></td>
93
+ <td style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">{{row.f_equipment_type}}</td>
94
+ <td style="text-align:center;white-space:nowrap;">{{row.f_terminal_name}}</td>
95
+ <td style="text-align:center;white-space:nowrap;">{{row.f_user_orgname}}</td>
96
+ <td style="text-align:center;white-space:nowrap;">{{row.f_depname}}</td>
97
+ <td style="text-align:center;white-space:nowrap;">{{row.f_operator}}</td>
98
+
99
+ <td style="text-align:center;white-space:nowrap;">{{row.f_state}}</td>
100
+ <td style="text-align:center;white-space:nowrap;">{{row.f_machine_number}}</td>
101
+ <td style="text-align:center;white-space:nowrap;">{{row.f_phone}}</td>
102
+ <td style="text-align:center;white-space:nowrap;">{{row.f_address}}</td>
103
+ <td style="text-align:center;white-space:nowrap;">{{row.f_bank_name}}</td>
104
+ <td style="text-align:center;white-space:nowrap;">{{row.f_battery_level}}</td>
105
+ <td style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">{{row.f_is_login}}</td>
106
+ <td style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">{{row.f_hybrid_version}}</td>
107
+ <td style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">{{row.f_operate_date}}</td>
108
+ <td style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">{{row.f_appVer}}</td>
109
+ <!-- <td style="text-align:center;white-space:nowrap;" >{{row.f_username}}</td>-->
110
+ <td style="text-align:center;white-space:nowrap;" v-show="!$parent.$parent.$parent.isshowless">{{row.f_operator}}</td>
111
+ <td style="text-align:center;white-space:nowrap;" >{{row.isunknown}}</td>
91
112
  </tr>
92
113
  </template>
93
114
  </data-grid>
94
115
  </criteria-paged>
95
116
  </div>
117
+ <modal v-show="infoshow" :show.sync="infoshow" v-ref:modal backdrop="false" width="800px" title="终端历史信息">
118
+ <article slot="modal-body" class="modal-body">
119
+ <criteria-paged :model="model2" v-ref:paged2>
120
+ <data-grid :model="model2" v-ref:grid2 partial='list'>
121
+ <template partial='head'>
122
+ <tr>
123
+ <!--<th style="padding: 0;border: 0">
124
+ <input type="checkbox" id="f_operator" v-model="$parent.$parent.$parent.all[model.pageIndex-1]"
125
+ @change="$parent.$parent.$parent.select()" style="width: 22px;height: 22px"/>
126
+ </th>-->
127
+ <th><nobr>序号</nobr></th>
128
+ <th><nobr>终端号</nobr></th>
129
+ <th><nobr>上次上报时间</nobr></th>
130
+ <th><nobr>本次上报时间</nobr></th>
131
+ <th><nobr><b>状态</b></nobr></th>
132
+ </tr>
133
+ </template>
134
+ <template partial='body'>
135
+ <td style="text-align: center;">{{$index + 1}}</td>
136
+ <td style="text-align: center;">{{row.f_terminal_number}}</td>
137
+ <td style="text-align: center;">{{row.f_update_date}}</td>
138
+ <td style="text-align: center;">{{row.f_update_date }}</td>
139
+ <td style="text-align: center;"><b>{{row.f_pos_state}}</b></td>
140
+ </template>
141
+ </data-grid>
142
+ </criteria-paged>
143
+ </article>
144
+ <footer slot="modal-footer" class="modal-footer">
145
+ <button type="button" class="btn btn-success" @click='infoclose'>关闭</button>
146
+ </footer>
147
+ </modal>
96
148
  </template>
97
149
 
98
150
  <script>
99
151
 
100
- import { PagedList } from 'vue-client'
152
+ import {PagedList} from 'vue-client'
101
153
 
102
154
  export default {
103
155
  title: '终端控制',
104
156
  components: {},
105
157
  data () {
106
158
  return {
159
+ source: `tool.getFullTree(this.getRights().where(row.getType() != $zone$).where(row.getType() != $role$))`,
107
160
  model: new PagedList('rs/sql/equipmentQuery', 20),
161
+ model2: new PagedList('rs/sql/singleTable', 30, {tablename: '`t_poshistory`'}),
108
162
  curorgid: [this.f_filialeid],
109
163
  f_orgid: '',
110
- f_filialeids:'',
111
- criteriaShow: false
164
+ f_filialeids: '',
165
+ criteriaShow: false,
166
+ infoadd: false,
167
+ selPos: [],
168
+ isSelAll: false, // 默认不全选
169
+ infoshow: false
112
170
  }
113
171
  },
114
- props: ['f_filialeid'],
172
+ props: ['f_filialeid','isshowless'],
115
173
  ready () {
116
174
  this.search()
117
175
  },
176
+ watch:{
177
+ // 'selPos'(val){
178
+ // console.log(val)
179
+ // },
180
+ 'isSelAll'(val){
181
+ console.log('-------', val)
182
+ if (val) {
183
+ // 对当前页面全选
184
+ this.selPos = []
185
+ for (const sel of this.model.rows) {
186
+ // if (this.selPos.indexOf(sel.id) < 0){
187
+ this.selPos.push(sel)
188
+ // }
189
+ }
190
+ } else {
191
+ // 取消全选
192
+ this.selPos = []
193
+ }
194
+ }
195
+ },
118
196
  methods: {
119
-
197
+ getRes(val){
198
+ if (val.orgobj.length === 1 && val.orgobj[0].resourcetype === 'user'){
199
+ this.$refs.paged.$refs.cri.model.f_user_operatorid=val.orgobj[0].userid
200
+ this.$refs.paged.$refs.cri.model.f_user_operator=val.orgobj[0].name
201
+ } else {
202
+ this.$refs.paged.$refs.cri.model.f_user_operatorid=''
203
+ this.$refs.paged.$refs.cri.model.f_user_operator=''
204
+ }
205
+ },
206
+ infoclose(){
207
+ this.infoshow=false
208
+ },
209
+ abcd (row) {
210
+ console.log("chakan",row)
211
+ let condition = `f_terminal_number = '${row.f_terminal_number}' order by id desc`
212
+ this.model2.search(condition)
213
+ this.infoshow = true
214
+ },
120
215
  search () {
121
216
  console.log("111111111111111111111111111111111111")
122
217
  this.$refs.paged.$refs.cri.search()
123
218
  },
124
219
 
125
220
  selfSearch (args) {
126
- args.condition = `${args.condition} and f_equipment_type = 'POS' and f_state = '正常' and f_orgid = '${this.f_filialeid ? this.f_orgid: this.$login.f.orgid}'`
221
+ console.log(args)
222
+ if (args.model.f_user_operatorid && args.model.f_user_operator){
223
+ args.condition = `${args.condition} and f_user_operatorid = '${args.model.f_user_operatorid}'
224
+ and f_user_operator = '${args.model.f_user_operator}'`
225
+ }
226
+ args.condition = `${args.condition} and f_equipment_type = 'POS' and f_orgid = '${this.f_filialeid ? this.f_orgid: this.$login.f.orgid}'`
127
227
  this.model.search(args.condition, this.model)
128
228
  this.$dispatch('research')
129
229
  },
130
230
 
131
231
  add () {
132
- if (this.f_filialeid) {
133
- this.$parent.f_filialeid=this.f_filialeid
134
- this.$dispatch('add')
135
- } else {
136
- this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
137
- }
138
-
139
- },
140
-
141
- del (row) {
142
- console.log('要删除了', row)
143
- row.f_state = '已删除'
144
- this.$resetpost('rs/entity/t_equipment', row, {warnMsg: '确定要删除这条信息吗?', resolveMsg: '删除成功', rejectMsg: '删除失败'}).then((res) => {
145
- this.$dispatch('refresh')
146
- }).catch((error) => {
147
- this.$dispatch('refresh')
148
- })
232
+ this.infoadd=false
233
+ // if (this.f_filialeid) {
234
+ this.$dispatch('add', this.f_filialeid)
235
+ // } else {
236
+ // this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
237
+ // }
149
238
  },
150
239
 
151
240
  getorg (val) {
241
+ console.log("====================", val)
152
242
  this.f_orgid = val[0]
153
243
  this.f_filialeid = val[0]
154
- this.search()
244
+ // this.search()
155
245
  },
156
246
  hidden(){
157
247
  this.criteriaShow = !this.criteriaShow