system-clients 3.2.99 → 3.2.100-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 (217) hide show
  1. package/.eslintrc.js +16 -16
  2. package/.gradle/7.4/checksums/checksums.lock +0 -0
  3. package/.gradle/7.4/dependencies-accessors/dependencies-accessors.lock +0 -0
  4. package/.gradle/7.4/dependencies-accessors/gc.properties +0 -0
  5. package/.gradle/7.4/executionHistory/executionHistory.bin +0 -0
  6. package/.gradle/7.4/executionHistory/executionHistory.lock +0 -0
  7. package/.gradle/7.4/fileChanges/last-build.bin +0 -0
  8. package/.gradle/7.4/fileHashes/fileHashes.bin +0 -0
  9. package/.gradle/7.4/fileHashes/fileHashes.lock +0 -0
  10. package/.gradle/7.4/gc.properties +0 -0
  11. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  12. package/.gradle/buildOutputCleanup/cache.properties +2 -0
  13. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  14. package/.gradle/file-system.probe +0 -0
  15. package/.gradle/vcs-1/gc.properties +0 -0
  16. package/SystemClient.iml +8 -8
  17. package/build/webpack.base.conf.js +85 -85
  18. package/build.gradle +6 -6
  19. package/examples/LoginPage/App.vue +21 -21
  20. package/examples/LoginPage/index.html +11 -11
  21. package/examples/LoginPage/main.js +15 -15
  22. package/index.html +21 -21
  23. package/package.json +103 -103
  24. package/src/components/Main.vue +58 -29
  25. package/src/components/TabButton.vue +201 -201
  26. package/src/components/Tabs.vue +67 -67
  27. package/src/components/Util.js +343 -343
  28. package/src/components/addressManage/AddressCascadingMenu.vue +145 -145
  29. package/src/components/common/ProgressBase.vue +83 -83
  30. package/src/components/equipment/EquipmentManage.vue +83 -83
  31. package/src/components/equipment/PcAdd.vue +115 -115
  32. package/src/components/equipment/PcList.vue +119 -119
  33. package/src/components/equipment/PcManage.vue +61 -61
  34. package/src/components/equipment/PhoneAdd.vue +118 -118
  35. package/src/components/equipment/PhoneList.vue +113 -113
  36. package/src/components/equipment/PhoneManage.vue +61 -61
  37. package/src/components/equipment/PosAdd.vue +323 -319
  38. package/src/components/equipment/PosList.vue +294 -292
  39. package/src/components/equipment/PosManage.vue +138 -138
  40. package/src/components/equipment/PosManageBoth.vue +125 -125
  41. package/src/components/equipment/PosParamAdd.vue +236 -236
  42. package/src/components/equipment/PosParamList.vue +121 -121
  43. package/src/components/equipment/PosParamManage.vue +51 -51
  44. package/src/components/materialManage/materialData.vue +44 -44
  45. package/src/components/materialManage/materialList.vue +255 -255
  46. package/src/components/parammanage/ParamManage.vue +42 -42
  47. package/src/components/parammanage/ParamPage.vue +337 -337
  48. package/src/components/parammanage/ParamPages.vue +222 -222
  49. package/src/components/parammanage/SinglePage.vue +235 -235
  50. package/src/components/parammanage/SinglePages.vue +167 -167
  51. package/src/components/server/AddChangeMsg.vue +66 -66
  52. package/src/components/server/ChangeDeclare.vue +45 -45
  53. package/src/components/server/ImageVieweTest.vue +56 -56
  54. package/src/components/server/ImageViewer.vue +350 -350
  55. package/src/components/server/LeftTree.vue +111 -111
  56. package/src/components/server/LoadData.vue +55 -55
  57. package/src/components/server/Login.vue +571 -548
  58. package/src/components/server/LoginPage.vue +235 -235
  59. package/src/components/server/LoginView.vue +128 -128
  60. package/src/components/server/Menu.vue +188 -188
  61. package/src/components/server/ModifyPw.vue +125 -126
  62. package/src/components/server/PcdBuildingSelect.vue +241 -243
  63. package/src/components/server/ResSelect.vue +175 -169
  64. package/src/components/server/ResSelectGroup.vue +211 -211
  65. package/src/components/server/RightTree.vue +348 -348
  66. package/src/components/server/RoleSelector.vue +89 -90
  67. package/src/components/server/TestResSelect.vue +58 -58
  68. package/src/components/server/TestResSelectGroup.vue +388 -388
  69. package/src/filiale/baole/Login.vue +568 -570
  70. package/src/filiale/baole/system.js +5 -5
  71. package/src/filiale/bayan/PosAdd.vue +374 -0
  72. package/src/filiale/bayan/PosList.vue +349 -0
  73. package/src/filiale/bayan/PosManage.vue +138 -0
  74. package/src/filiale/bayan/system.js +6 -0
  75. package/src/filiale/chengtou/Login.vue +537 -539
  76. package/src/filiale/chengtou/system.js +5 -5
  77. package/src/filiale/dongguan/Login.vue +900 -902
  78. package/src/filiale/dongguan/Main.vue +715 -717
  79. package/src/filiale/dongguan/system.js +6 -6
  80. package/src/filiale/furuike/Login.vue +583 -587
  81. package/src/filiale/furuike/Main.vue +827 -840
  82. package/src/filiale/furuike/system.js +7 -7
  83. package/src/filiale/gehua/Main.vue +807 -809
  84. package/src/filiale/gehua/system.js +6 -6
  85. package/src/filiale/konggang/Login.vue +470 -472
  86. package/src/filiale/konggang/system.js +7 -7
  87. package/src/filiale/qianneng/Login.vue +582 -584
  88. package/src/filiale/qianneng/Main.vue +4 -6
  89. package/src/filiale/qianneng/ModifyPw.vue +107 -108
  90. package/src/filiale/qianneng/system.js +11 -11
  91. package/src/filiale/rizhao/LeftTree.vue +111 -111
  92. package/src/filiale/rizhao/Login.vue +791 -793
  93. package/src/filiale/rizhao/Main.vue +611 -611
  94. package/src/filiale/rizhao/system.js +14 -14
  95. package/src/filiale/shiquan/Login.vue +564 -566
  96. package/src/filiale/shiquan/system.js +8 -8
  97. package/src/filiale/tianyi/Login.vue +571 -573
  98. package/src/filiale/tianyi/system.js +5 -5
  99. package/src/filiale/tongchuan/Login.vue +561 -563
  100. package/src/filiale/tongchuan/Main.vue +1019 -1021
  101. package/src/filiale/tongchuan/system.js +7 -7
  102. package/src/filiale/weinan/Main.vue +923 -924
  103. package/src/filiale/weinan/system.js +7 -7
  104. package/src/filiale/wenxi/Login.vue +535 -537
  105. package/src/filiale/wenxi/Main.vue +785 -787
  106. package/src/filiale/wenxi/system.js +10 -10
  107. package/src/filiale/wuhai/LeftTree.vue +141 -141
  108. package/src/filiale/wuhai/Main.vue +807 -810
  109. package/src/filiale/wuhai/system.js +10 -10
  110. package/src/filiale/yuchuan/Login.vue +889 -891
  111. package/src/filiale/yuchuan/Main.vue +864 -866
  112. package/src/filiale/yuchuan/system.js +10 -10
  113. package/src/filiale/zhoukou/Main.vue +807 -809
  114. package/src/filiale/zhoukou/system.js +6 -6
  115. package/src/plugins/EncryptUtil.js +53 -53
  116. package/src/plugins/GetLoginInfoService.js +581 -478
  117. package/src/plugins/HeatGetLoginInfoService.js +491 -491
  118. package/src/plugins/validation.js +15 -15
  119. package/src/stores/AppData.js +38 -38
  120. package/src/stores/HeatAppData.js +38 -38
  121. package/src/styles/fonts/glyphicons-halflings-regular.svg +288 -288
  122. package/src/styles/less/.csscomb.json +304 -304
  123. package/src/styles/less/.csslintrc +19 -19
  124. package/src/styles/less/alerts.less +73 -73
  125. package/src/styles/less/aofeng/animate.min.css +10 -10
  126. package/src/styles/less/aofeng/expandcss.less +569 -569
  127. package/src/styles/less/aofeng/login.less +367 -367
  128. package/src/styles/less/aofeng/standard.less +2507 -2507
  129. package/src/styles/less/aofeng/themeOne/BinaryTemplate.less +690 -690
  130. package/src/styles/less/aofeng/themeOne/loginStyle.less +1586 -1586
  131. package/src/styles/less/aofeng/themeOne/systemStyle.less +2650 -2650
  132. package/src/styles/less/aofeng/themeOne.less +17 -17
  133. package/src/styles/less/aofeng/themeTwo/newStyle1.less +415 -415
  134. package/src/styles/less/aofeng/themeTwo.less +3 -3
  135. package/src/styles/less/badges.less +66 -66
  136. package/src/styles/less/bootstrap.less +66 -66
  137. package/src/styles/less/breadcrumbs.less +26 -26
  138. package/src/styles/less/button-groups.less +247 -247
  139. package/src/styles/less/buttons.less +172 -172
  140. package/src/styles/less/carousel.less +269 -269
  141. package/src/styles/less/close.less +34 -34
  142. package/src/styles/less/code.less +69 -69
  143. package/src/styles/less/component-animations.less +33 -33
  144. package/src/styles/less/dropdowns.less +216 -216
  145. package/src/styles/less/fonts-list.less +25 -25
  146. package/src/styles/less/forms.less +626 -626
  147. package/src/styles/less/glyphicons.less +305 -305
  148. package/src/styles/less/grid.less +84 -84
  149. package/src/styles/less/input-groups.less +167 -167
  150. package/src/styles/less/jumbotron.less +52 -52
  151. package/src/styles/less/labels.less +64 -64
  152. package/src/styles/less/list-group.less +141 -141
  153. package/src/styles/less/manageStyle/manageChile.less +180 -180
  154. package/src/styles/less/manageStyle/manageStyle/manageChile.less +180 -180
  155. package/src/styles/less/manageStyle/manageStyle/manageStyle.less +1102 -1102
  156. package/src/styles/less/manageStyle/manageStyle/safeStyle.less +498 -498
  157. package/src/styles/less/manageStyle/manageStyle.less +1102 -1102
  158. package/src/styles/less/manageStyle/safeStyle.less +498 -498
  159. package/src/styles/less/media.less +66 -66
  160. package/src/styles/less/mixins/alerts.less +14 -14
  161. package/src/styles/less/mixins/background-variant.less +9 -9
  162. package/src/styles/less/mixins/border-radius.less +18 -18
  163. package/src/styles/less/mixins/buttons.less +69 -69
  164. package/src/styles/less/mixins/center-block.less +7 -7
  165. package/src/styles/less/mixins/clearfix.less +22 -22
  166. package/src/styles/less/mixins/forms.less +90 -90
  167. package/src/styles/less/mixins/gradients.less +59 -59
  168. package/src/styles/less/mixins/grid-framework.less +92 -92
  169. package/src/styles/less/mixins/grid.less +122 -122
  170. package/src/styles/less/mixins/hide-text.less +21 -21
  171. package/src/styles/less/mixins/image.less +33 -33
  172. package/src/styles/less/mixins/labels.less +12 -12
  173. package/src/styles/less/mixins/list-group.less +30 -30
  174. package/src/styles/less/mixins/nav-divider.less +10 -10
  175. package/src/styles/less/mixins/nav-vertical-align.less +9 -9
  176. package/src/styles/less/mixins/opacity.less +8 -8
  177. package/src/styles/less/mixins/pagination.less +24 -24
  178. package/src/styles/less/mixins/panels.less +24 -24
  179. package/src/styles/less/mixins/progress-bar.less +10 -10
  180. package/src/styles/less/mixins/reset-filter.less +8 -8
  181. package/src/styles/less/mixins/reset-text.less +18 -18
  182. package/src/styles/less/mixins/resize.less +6 -6
  183. package/src/styles/less/mixins/responsive-visibility.less +15 -15
  184. package/src/styles/less/mixins/size.less +10 -10
  185. package/src/styles/less/mixins/tab-focus.less +9 -9
  186. package/src/styles/less/mixins/table-row.less +44 -44
  187. package/src/styles/less/mixins/text-emphasis.less +9 -9
  188. package/src/styles/less/mixins/text-overflow.less +8 -8
  189. package/src/styles/less/mixins/vendor-prefixes.less +227 -227
  190. package/src/styles/less/mixins.less +40 -40
  191. package/src/styles/less/modals.less +151 -151
  192. package/src/styles/less/navbar.less +660 -660
  193. package/src/styles/less/navs.less +285 -285
  194. package/src/styles/less/normalize.less +424 -424
  195. package/src/styles/less/pager.less +76 -76
  196. package/src/styles/less/pagination.less +89 -89
  197. package/src/styles/less/panels.less +275 -275
  198. package/src/styles/less/popovers.less +131 -131
  199. package/src/styles/less/print.less +101 -101
  200. package/src/styles/less/progress-bars.less +87 -87
  201. package/src/styles/less/responsive-embed.less +35 -35
  202. package/src/styles/less/responsive-utilities.less +194 -194
  203. package/src/styles/less/scaffolding.less +161 -161
  204. package/src/styles/less/stand.less +207 -207
  205. package/src/styles/less/tables.less +312 -312
  206. package/src/styles/less/theme.less +291 -291
  207. package/src/styles/less/thumbnails.less +36 -36
  208. package/src/styles/less/tooltip.less +102 -102
  209. package/src/styles/less/type.less +316 -316
  210. package/src/styles/less/utilities.less +55 -55
  211. package/src/styles/less/variables.less +899 -899
  212. package/src/styles/less/wells.less +29 -29
  213. package/src/system.js +125 -121
  214. package/src/util/Daiban.json +12 -12
  215. package/yarn-error.log +6896 -6896
  216. package/src/filiale/ruihua/Login.vue +0 -549
  217. package/src/filiale/ruihua/system.js +0 -5
@@ -1,5 +1,5 @@
1
- // 分公司特殊组件页面注册
2
-
3
- exports.specialComp = {
4
- 'login': (resolve) => require(['./Login'], resolve)
5
- }
1
+ // 分公司特殊组件页面注册
2
+
3
+ exports.specialComp = {
4
+ 'login': (resolve) => require(['./Login'], resolve)
5
+ }
@@ -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>