system-clients 3.0.14-akyh-1 → 3.0.14-akyh-3

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.
@@ -65,7 +65,9 @@
65
65
  methods: {
66
66
  confirm () {
67
67
  this.model.f_operator = this.$login.f.name
68
- this.model.f_filialeids = this.filialeCodeStr
68
+ this.model.f_filialeids = this.filialeCodeStr[0]
69
+ this.model.f_filialeid = this.filialeCodeStr[0]
70
+ this.model.f_orgid = this.filialeCodeStr[0]
69
71
  console.log('保存', this.model)
70
72
  this.$resetpost('rs/entity/t_equipment', this.model, {resolveMsg: '保存成功', rejectMsg: '保存失败'}).then((res) => {
71
73
  this.$dispatch('refresh')
@@ -74,7 +74,7 @@
74
74
  },
75
75
 
76
76
  selfSearch (args) {
77
- args.condition = `${args.condition} and f_equipment_type = 'PHONE' and f_state = '正常' and f_filialeids like '${this.filialeCodeStr}%'`
77
+ args.condition = `${args.condition} and f_equipment_type = 'PHONE' and f_state = '正常' and f_orgid like '${this.filialeCodeStr}%'`
78
78
  this.model.search(args.condition, this.model)
79
79
  },
80
80
  add () {
@@ -65,6 +65,7 @@
65
65
  this.model.f_operator = this.$login.f.name
66
66
  this.model.f_operatorid = this.$login.f.id
67
67
  this.model.f_orgid = this.f_filialeid
68
+ this.model.f_filialeid = this.f_filialeid
68
69
  this.$resetpost('rs/entity/t_equipment', this.model, {resolveMsg: '保存成功', rejectMsg: '保存失败'}).then((res) => {
69
70
  this.$dispatch('refresh')
70
71
  }).catch((error) => {
@@ -18,6 +18,12 @@
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="联系电话">
25
+ </div>
26
+
21
27
  <div class="span" style="float:right;">
22
28
  <button type="button" class="button_search" @click="search()" v-el:cx>查询</button>
23
29
  <button type="button" class="button_search" @click="$parent.$parent.add()" v-el:cx>新增</button>
@@ -26,11 +32,21 @@
26
32
  </div>
27
33
  </div>
28
34
  <div class="row" v-show="$parent.$parent.criteriaShow">
35
+ <div class="col-sm-3">
36
+ <label class="font_normal_body">&nbsp;&nbsp;&nbsp;所在地</label>
37
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_address"
38
+ condition="f_address like '%{}%'" placeholder="所在地">
39
+ </div>
29
40
  <div class="col-sm-3">
30
41
  <label class="font_normal_body">设备名称</label>
31
42
  <input type="text" class="input_search" style="width:60%" v-model="model.f_terminal_name"
32
43
  condition="f_terminal_name like '%{}%'" placeholder="设备名称">
33
44
  </div>
45
+ <div class="col-sm-3">
46
+ <label class="font_normal_body">机器编号</label>
47
+ <input type="text" class="input_search" style="width:60%" v-model="model.f_machine_number"
48
+ condition="f_machine_number like '%{}%'" placeholder="机器编号">
49
+ </div>
34
50
  <div class="col-sm-3">
35
51
  <label class="font_normal_body">所属银行</label>
36
52
  <input type="text" class="input_search" style="width:60%" v-model="model.f_bank_name"
@@ -45,7 +61,14 @@
45
61
  <th>序号</th>
46
62
  <th>设备编号</th>
47
63
  <th>设备名称</th>
64
+ <th>机器编号</th>
65
+ <th>联系电话</th>
66
+ <th>所在地</th>
48
67
  <th>所属银行</th>
68
+ <th>电池电量</th>
69
+ <th>是否登录</th>
70
+ <th>更新时间</th>
71
+ <th>软件版本</th>
49
72
  <th>操作</th>
50
73
  </tr>
51
74
  </template>
@@ -54,10 +77,19 @@
54
77
  <td style="text-align:center">{{$index+1}}</td>
55
78
  <td style="text-align:center">{{row.f_terminal_number}}</td>
56
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>
57
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>
58
88
  <td style="text-align:center">
59
89
  <button class="btn btn-link" @click.stop="$parent.$parent.$parent.del(row)">删除</button>
60
90
  </td>
91
+
92
+
61
93
  </tr>
62
94
  </template>
63
95
  </data-grid>
@@ -77,6 +109,7 @@
77
109
  model: new PagedList('rs/sql/equipmentQuery', 20),
78
110
  curorgid: [this.f_filialeid],
79
111
  f_orgid: '',
112
+ f_filialeids:'',
80
113
  criteriaShow: false
81
114
  }
82
115
  },
@@ -87,17 +120,24 @@
87
120
  methods: {
88
121
 
89
122
  search () {
123
+ console.log("111111111111111111111111111111111111")
90
124
  this.$refs.paged.$refs.cri.search()
91
125
  },
92
126
 
93
127
  selfSearch (args) {
94
- args.condition = `${args.condition} and f_equipment_type = 'POS' and f_state = '正常' and f_orgid = '${this.f_orgid ? this.f_orgid: this.$login.f.orgid}'`
128
+ 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}'`
95
129
  this.model.search(args.condition, this.model)
96
130
  this.$dispatch('research')
97
131
  },
98
132
 
99
133
  add () {
100
- this.$dispatch('add')
134
+ if (this.f_filialeid) {
135
+ this.$parent.f_filialeid=this.f_filialeid
136
+ this.$dispatch('add')
137
+ } else {
138
+ this.$showAlert('请先选择左上角的所在分公司', 'warning', 2000)
139
+ }
140
+
101
141
  },
102
142
 
103
143
  del (row) {
@@ -113,6 +153,7 @@
113
153
  getorg (val) {
114
154
  this.f_orgid = val[0]
115
155
  this.f_filialeid = val[0]
156
+ this.search()
116
157
  },
117
158
  hidden(){
118
159
  this.criteriaShow = !this.criteriaShow
@@ -79,46 +79,43 @@
79
79
  </div>
80
80
  <!--输入框结束-->
81
81
  <!-- 注册模态框开始 -->
82
- <!-- <modal v-ref:modal :show.sync="registerShow" :backdrop="false" class="auto">
82
+ <modal :show.sync="visible" v-ref:modal :backdrop="true">
83
83
  <header slot="modal-header" class="modal-header">
84
- <button type="button" class="close" @click="close"><span>&times;</span></button>
85
- <h4 class="modal-title">注册</h4>
84
+ <!-- <button type="button" class="close" @click="closeReset"><span>&times;</span></button>-->
85
+ <h4 class="modal-title">密码强度过低,请及时重新设置</h4>
86
86
  </header>
87
87
  <article slot="modal-body" class="modal-body modifystyle">
88
88
  <validator name="v">
89
89
 
90
- <div class="has-feedback"
91
- :class="{'has-warning':$v.ename.required,'has-success': !$v.ename.required}">
92
- <label for="user" class="control-label">登录用户:&nbsp;&nbsp;</label>
93
- <input type="text" v-model="deliver.ename" class="form-control" id="user" v-validate:ename="{ required: true}">
94
- <span class="glyphicon glyphicon-ok form-control-feedback" v-if="!$v.ename.required"></span>
95
- <span v-if="$v.ename.required">不能为空</span>
90
+ <div class="has-feedback">
91
+ <label class="control-label">密码在8-16位字符之间,至少同时具有数字和密码</label>
96
92
  </div>
97
93
 
98
- <div class="has-feedback"
99
- :class="{'has-warning':$v.password.required, 'has-success': !$v.password.required}">
94
+ <div class="has-feedback">
95
+ <label class="control-label">用户名:</label>
96
+ <span style="color: black">{{model.ename}}</span>
97
+ </div>
98
+
99
+ <div class="has-feedback" :class="{'has-warning':deliver.password, 'has-success': !deliver.password}">
100
100
  <label for="newpassword" class="control-label">登录密码:&nbsp;&nbsp;</label>
101
- <input type="password" v-model="deliver.password" class="form-control" id="newpassword" v-validate:password='{ required: true }'>
102
- <span class="glyphicon glyphicon-ok form-control-feedback" v-if="!$v.password.required"></span>
103
- <span v-if="$v.password.required">不能为空</span>
101
+ <input type="password" v-model="deliver.password" class="form-control" id="newpassword">
102
+ <span v-if="!deliver.password">不能为空</span>
104
103
  </div>
105
104
 
106
105
  <div class="has-feedback"
107
- :class="{'has-warning':$v.affirmpassword.required,'has-error':$v.affirmpassword.equalValid && !($v.affirmpassword.required),
108
- 'has-success': !$v.affirmpassword.required && !($v.affirmpassword.equalValid && !($v.affirmpassword.required))}">
106
+ :class="{'has-warning':deliver.affirmpassword,'has-success': !deliver.affirmpassword}">
109
107
  <label for="affirmpassword" class="control-label">确认密码:&nbsp;&nbsp;</label>
110
- <input type="password" v-model="deliver.affirmpassword" class="form-control" id="affirmpassword" v-validate:affirmpassword="{ required: true, equalValid: deliver.password }">
111
- <span class="glyphicon glyphicon-ok form-control-feedback" v-if="!$v.affirmpassword.required && !($v.affirmpassword.equalValid && !($v.affirmpassword.required))"></span>
112
- <span v-if="$v.affirmpassword.required">不能为空</span>
113
- <span v-if="$v.affirmpassword.equalValid && !($v.affirmpassword.required)">两次密码不一致 !!</span>
108
+ <input type="password" v-model="deliver.affirmpassword" class="form-control" id="affirmpassword">
109
+ <span v-if="!deliver.affirmpassword">不能为空</span>
110
+ <span v-if="deliver.affirmpassword !== deliver.password">两次密码不一致 !!</span>
114
111
  </div>
115
-
116
112
  </validator>
117
113
  </article>
118
114
  <footer slot="modal-footer" class="footerbtn">
119
- <button type="button" class="btn btn-success" @click='registed()' :disabled="!$v.valid">提交注册</button>
115
+ <button type="button" class="btn btn-success" @click='resetPassword()' :disabled="!$v.valid">提交</button>
116
+ <button type="button" class="btn btn-default" @click='closeReset()'>返回</button>
120
117
  </footer>
121
- <modal> -->
118
+ </modal>
122
119
  <!-- 注册模态框结束 -->
123
120
  <!--<load-data @ready="onReady"></load-data>-->
124
121
  <!-- </div>-->
@@ -189,6 +186,22 @@
189
186
  $('form').fadeIn(500)
190
187
  }
191
188
  }
189
+ let savePassword = function * (self) {
190
+ self.deliver.ename = self.model.ename
191
+ self.deliver.password = self.model.password
192
+ let res = yield self.$post('rs/db/modifypwd', {data: self.deliver})
193
+ if (res.status === 200 || res.status === 204) {
194
+ self.visible = false
195
+ self.deliver.password = ''
196
+ self.deliver.newpassword = ''
197
+ self.deliver.affirmpassword = ''
198
+ self.deliver.ename = ''
199
+ self.model.ename = ''
200
+ self.model.password = ''
201
+ self.login = false
202
+ $('form').fadeIn(500)
203
+ }
204
+ }
192
205
  export default {
193
206
  title: '登录',
194
207
  ready () {
@@ -222,7 +235,8 @@
222
235
  show: false,
223
236
  checkCode: '',
224
237
  login_do:true,
225
- picLyanzhengma: ''
238
+ picLyanzhengma: '',
239
+ visible: false
226
240
  }
227
241
  },
228
242
  methods: {
@@ -237,6 +251,11 @@
237
251
  this.$emit('ready')
238
252
  },
239
253
  confirm (key) {
254
+ if (this.checkPassword(this.model.password) <= 2) {
255
+ this.visible = true
256
+ $('form').fadeIn(500)
257
+ return
258
+ }
240
259
  this.login_do=!this.login_do
241
260
  // return
242
261
  if (key == 'key') {
@@ -282,7 +301,114 @@
282
301
  code += random[index];//根据索引取得随机数加到code上
283
302
  }
284
303
  this.checkCode = code;//把code值赋给验证码
304
+ },
305
+ checkPassword (str) {
306
+ // 第一步先判断各分类长度
307
+ let num = 0// 数字
308
+ let lowerCase = 0// 小写字母
309
+ let upperCase = 0// 大写字母
310
+ let special = 0// 特殊字符
311
+ for (let i = 0; i < str.length; i++) {
312
+ const c = str.charCodeAt(i)
313
+ if (c >= 48 && c <= 57) {
314
+ // 数字
315
+ num++
316
+ } else if (c >= 65 && c <= 90) {
317
+ // 大写字母
318
+ upperCase++
319
+ } else if (c === 97 && c <= 122) {
320
+ // 小写字母
321
+ lowerCase++
322
+ } else {
323
+ special++
324
+ }
325
+ }
326
+ // 第二步 计算分数
327
+ let wholeMark = 0
328
+ let numMark = 0
329
+ let caseMark = 0
330
+ let specialMark = 0
331
+ let reward = 0
332
+ // 整长度分数
333
+ if (str.length <= 4) {
334
+ wholeMark = 5
335
+ } else if (str.length > 4 && str.length <= 8) {
336
+ wholeMark = 10
337
+ } else {
338
+ wholeMark = 25
285
339
  }
340
+ // 奖励分数
341
+ if ((lowerCase || upperCase) && num) {
342
+ reward = 2
343
+ if (special) {
344
+ reward = 3
345
+ if (lowerCase && upperCase) {
346
+ reward = 5
347
+ }
348
+ }
349
+ }
350
+ // 字母分数
351
+ if (lowerCase || upperCase) {
352
+ caseMark = 10
353
+ if (lowerCase && upperCase) {
354
+ caseMark = 20
355
+ }
356
+ }
357
+ // 数字分数
358
+ if (num) {
359
+ numMark = 10
360
+ if (num >= 3) {
361
+ numMark = 20
362
+ }
363
+ }
364
+ // 符号分数
365
+ if (special) {
366
+ specialMark = 10
367
+ if (special > 1) {
368
+ specialMark = 25
369
+ }
370
+ }
371
+ const totalMark = wholeMark + numMark + caseMark + specialMark + reward
372
+ console.warn(totalMark)
373
+ let strength
374
+ if (totalMark < 25) {
375
+ strength = 0
376
+ } else if (totalMark >= 25 && totalMark < 50) {
377
+ strength = 1
378
+ } else if (totalMark >= 50 && totalMark < 60) {
379
+ strength = 2
380
+ } else if (totalMark >= 60 && totalMark < 70) {
381
+ strength = 3
382
+ } else if (totalMark >= 70 && totalMark < 80) {
383
+ strength = 4
384
+ } else if (totalMark >= 80 && totalMark < 90) {
385
+ strength = 5
386
+ } else {
387
+ strength = 6
388
+ }
389
+ return strength
390
+ },
391
+ closeReset () {
392
+ this.visible = false
393
+ this.login = false
394
+ $('form').fadeIn(500)
395
+ },
396
+ resetPassword () {
397
+ if (!this.deliver.password || !this.deliver.affirmpassword) {
398
+ this.$showMessage("密码不能为空!")
399
+ return
400
+ }
401
+ if (this.deliver.password !== this.deliver.affirmpassword) {
402
+ this.$showMessage("两次输入的密码不一致,请核对!")
403
+ return
404
+ }
405
+ if (this.checkPassword(this.deliver.password) <= 2) {
406
+ this.$showMessage("密码过于简单,请重新设置!")
407
+ return
408
+ }
409
+ let gen = savePassword(this)
410
+ co(gen)
411
+ }
286
412
  }
287
413
  }
288
414
  </script>