sale-client 4.1.230 → 4.2.1-ronghao

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 (171) hide show
  1. package/build/dev-server.js +29 -46
  2. package/package.json +2 -2
  3. package/src/App.vue +3 -3
  4. package/src/components/FilesManage/UserGeneralInfoTest.vue +4 -4
  5. package/src/components/FilesManageNew/FileUserFiles.vue +2 -4
  6. package/src/components/FilesManageNew/MeterinfoTest.vue +9 -9
  7. package/src/components/FilesManageNew/UserEssentialInfoTest.vue +201 -227
  8. package/src/components/FilesManageNew/UserGeneralInfoTest.vue +0 -2
  9. package/src/components/charge/business/CardMeterCenter.vue +1 -1
  10. package/src/components/charge/business/FilesComplete.vue +3 -3
  11. package/src/components/charge/business/IOTMeterCenter.vue +1 -1
  12. package/src/components/charge/business/OtherChargeNew.vue +68 -48
  13. package/src/components/common/userinfo_detail/UserInfoDetailManageNew.vue +10 -1
  14. package/src/components/common/userinfo_detail/ic_detail/CardHandRecord.vue +1 -1
  15. package/src/components/common/userinfo_detail/ic_detail/ChangeMeterQueryUser.vue +1 -1
  16. package/src/components/common/userinfo_detail/ic_detail/GarbageRecordList.vue +69 -0
  17. package/src/components/common/userinfo_detail/ic_detail/InsuranceChargesRecord.vue +384 -0
  18. package/src/components/common/userinfo_detail/ic_detail/WebHandQueryUser.vue +1 -1
  19. package/src/components/revenue/Common/MeterMessage.vue +1 -1
  20. package/src/components/revenue/HandManager/MeterBookUser.vue +726 -726
  21. package/src/components/revenue/HandManager/WebHand.vue +7 -4
  22. package/src/components/revenue/base/leftview/SafeCheck.vue +41 -3
  23. package/src/components/revenue/base/leftview/UserFeeInfo.vue +76 -0
  24. package/src/components/revenue/base/leftview/otherinfo.vue +1 -0
  25. package/src/components/revenue/base/rightview/CardList.vue +7 -3
  26. package/src/components/revenue/batchDeduction/batchDeductionList.vue +1 -1
  27. package/src/components/revenue/cardHandManage/cardDown.vue +18 -0
  28. package/src/components/revenue/changeInsurance/InsuranceAdd.vue +1 -0
  29. package/src/components/revenue/changeInsurance/InsuranceRecord.vue +2 -1
  30. package/src/components/revenue/comprehen/ComprehenOperation/BankPayment/BankPayment.vue +1 -1
  31. package/src/components/revenue/comprehen/ComprehenOperation/GiftFee/icTable.vue +4 -2
  32. package/src/components/revenue/comprehen/ComprehenOperation/QrPay/QrPaymentDetailed.vue +423 -423
  33. package/src/components/revenue/comprehen/Maintenance/hand/handOperate.vue +469 -469
  34. package/src/components/revenue/comprehen/Maintenance/revenue/MeterOperatemain.vue +2 -2
  35. package/src/components/revenue/machineHandManage/ArrearsQuery.vue +938 -938
  36. package/src/components/revenue/machineHandManage/HandplanQuery.vue +1 -1
  37. package/src/components/revenue/machineHandManage/machineHand.vue +3 -2
  38. package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +970 -970
  39. package/src/filiale/alashan/eticket/EticketRecordList.vue +428 -428
  40. package/src/filiale/bayan/ChargeList.vue +1010 -1010
  41. package/src/filiale/bayan/StockListmain.vue +543 -543
  42. package/src/filiale/beifangshiye/OtherChargeNew.vue +625 -625
  43. package/src/filiale/dexin/MeterinfoTest.vue +1239 -0
  44. package/src/filiale/dexin/UserEssentialInfoTest.vue +602 -0
  45. package/src/filiale/dexin/sale.js +5 -0
  46. package/src/filiale/fugou/MeterinfoTest.vue +1 -1
  47. package/src/filiale/jiaxian/AutomaticPurse.vue +349 -0
  48. package/src/filiale/jiaxian/ChangeMeterQueryUser.vue +303 -0
  49. package/src/filiale/jiaxian/ChangeRecord.vue +44 -2
  50. package/src/filiale/jiaxian/FillCardQueryUser.vue +250 -0
  51. package/src/filiale/jiaxian/FillGasQueryUser.vue +270 -0
  52. package/src/filiale/jiaxian/OtherChargeQueryUser.vue +305 -0
  53. package/src/filiale/jiaxian/PriceAdjustmentQueryUser.vue +368 -0
  54. package/src/filiale/jiaxian/PriceChangeQueryUser.vue +243 -0
  55. package/src/filiale/jiaxian/QueryInstruct.vue +436 -0
  56. package/src/filiale/jiaxian/RecordQueryUser.vue +321 -0
  57. package/src/filiale/jiaxian/Repurchase.vue +181 -0
  58. package/src/filiale/jiaxian/TransferQueryUser.vue +274 -0
  59. package/src/filiale/jiaxian/UserInfoDetailManageNew.vue +11 -11
  60. package/src/filiale/jiaxian/Userinfo.vue +426 -0
  61. package/src/filiale/jiaxian/WatchCollection.vue +54 -1
  62. package/src/filiale/jiaxian/WebAutomaticPurse.vue +348 -0
  63. package/src/filiale/jiaxian/contractSigningList.vue +149 -0
  64. package/src/filiale/jiaxian/sale.js +5 -0
  65. package/src/filiale/jinhong/AutoAccountsDetail.vue +63 -0
  66. package/src/filiale/jinhong/CardList.vue +572 -0
  67. package/src/filiale/jinhong/CardMeterCenter.vue +1 -1
  68. package/src/filiale/jinhong/CardMeterCenterInner.vue +61 -22
  69. package/src/filiale/jinhong/GarbageCharge.vue +1 -1
  70. package/src/filiale/jinhong/HandplanQuery.vue +1430 -0
  71. package/src/filiale/jinhong/IOTMeterCenterInner.vue +42 -14
  72. package/src/filiale/jinhong/InsuranceAdd.vue +27 -5
  73. package/src/filiale/jinhong/InsuranceChargesDetails.vue +11 -5
  74. package/src/filiale/jinhong/InsuranceRecord.vue +4 -5
  75. package/src/filiale/jinhong/InsuranceTemp.vue +33 -5
  76. package/src/filiale/jinhong/MachineChargeService.js +8 -0
  77. package/src/filiale/jinhong/MachineMeterCenter.vue +38 -11
  78. package/src/filiale/jinhong/ShowCardSellGasInner.vue +46 -14
  79. package/src/filiale/jinhong/Userinfo.vue +75 -1
  80. package/src/filiale/jinhong/insuranceGuanL.vue +349 -0
  81. package/src/filiale/jinhong/machineDown.vue +1205 -0
  82. package/src/filiale/jinhong/sale.js +9 -0
  83. package/src/filiale/jinhuang/UserInfoDetailManageNew.vue +259 -0
  84. package/src/filiale/jinhuang/WebHand.vue +1026 -0
  85. package/src/filiale/jinhuang/WebHandQueryUser.vue +413 -0
  86. package/src/filiale/jinhuang/cardsHand.vue +911 -0
  87. package/src/filiale/jinhuang/sale.js +8 -0
  88. package/src/filiale/lixianV3/ArrearsQuery.vue +938 -938
  89. package/src/filiale/lixianV3/InsuranceAdd.vue +1 -0
  90. package/src/filiale/lixianV3/InsuranceChargesDetails.vue +425 -425
  91. package/src/filiale/meihekou/CardMeterCenter.vue +991 -0
  92. package/src/filiale/meihekou/ChargeManage.vue +3 -2
  93. package/src/filiale/meihekou/ChargeOper.vue +279 -169
  94. package/src/filiale/meihekou/HandManager.vue +57 -2
  95. package/src/filiale/meihekou/NoCardMeterCenter.vue +542 -0
  96. package/src/filiale/meihekou/OverUseCharge.vue +1 -1
  97. package/src/filiale/meihekou/PrintBill.vue +48 -41
  98. package/src/filiale/meihekou/ReissueBill.vue +4 -1
  99. package/src/filiale/meihekou/ShowCardSellGas.vue +935 -0
  100. package/src/filiale/meihekou/TransferManage.vue +704 -0
  101. package/src/filiale/meihekou/Userinfo.vue +233 -5
  102. package/src/filiale/meihekou/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +281 -281
  103. package/src/filiale/meihekou/icTable.vue +233 -0
  104. package/src/filiale/meihekou/machineHand.vue +2158 -0
  105. package/src/filiale/meihekou/manualChargeCenter.vue +394 -0
  106. package/src/filiale/meihekou/meterTable.vue +220 -0
  107. package/src/filiale/meihekou/sale.js +15 -0
  108. package/src/filiale/qianneng/MeterMessage.vue +1 -1
  109. package/src/filiale/qianneng/revenue/sms/AccountMessageList.vue +508 -508
  110. package/src/filiale/rizhao/InsuranceAdd.vue +1 -0
  111. package/src/filiale/ronghao/ArrearsQuery.vue +974 -974
  112. package/src/filiale/ronghao/CardList.vue +19 -17
  113. package/src/filiale/ronghao/CardMeterChargeCancel.vue +5 -0
  114. package/src/filiale/ronghao/CardService.js +2144 -2144
  115. package/src/filiale/ronghao/ChangeMeterService.js +1 -1
  116. package/src/filiale/ronghao/ChargeList.vue +17 -17
  117. package/src/filiale/ronghao/ChargeManage.vue +325 -0
  118. package/src/filiale/ronghao/ChargeOper.vue +330 -0
  119. package/src/filiale/ronghao/FilesManageNew/UserEssentialInfoTest.vue +457 -0
  120. package/src/filiale/ronghao/FilesManageNew/UserGeneralInfoTest.vue +690 -0
  121. package/src/filiale/ronghao/HandplanQuery.vue +13 -14
  122. package/src/filiale/ronghao/IOTMeterCenter.vue +15 -6
  123. package/src/filiale/ronghao/InsuranceAdd.vue +1 -0
  124. package/src/filiale/ronghao/InsuranceManage.vue +58 -58
  125. package/src/filiale/ronghao/MachineChargeService.js +149 -149
  126. package/src/filiale/ronghao/NoCardMeterCenter.vue +534 -534
  127. package/src/filiale/ronghao/PaymentCode.vue +174 -174
  128. package/src/filiale/ronghao/PriceChangeCompensation/CompensationManage.vue +26 -26
  129. package/src/filiale/ronghao/PriceChangeCompensation/IotCompensation.vue +318 -318
  130. package/src/filiale/ronghao/PriceChangeCompensation/JbCompensation.vue +343 -343
  131. package/src/filiale/ronghao/PriceChangeCompensation/SurplusRecordDetail.vue +74 -74
  132. package/src/filiale/ronghao/ReplaceCardManage.vue +415 -415
  133. package/src/filiale/ronghao/Upload.vue +654 -654
  134. package/src/filiale/ronghao/Userinfo.vue +18 -18
  135. package/src/filiale/ronghao/cardDown.vue +1141 -1141
  136. package/src/filiale/ronghao/changemeterOperate.vue +315 -315
  137. package/src/filiale/ronghao/fillgasSpecific.vue +313 -313
  138. package/src/filiale/ronghao/ic_detail/ChargeRecordQuery.vue +106 -106
  139. package/src/filiale/ronghao/ic_detail/WatchCollection.vue +115 -115
  140. package/src/filiale/ronghao/ic_detail/WebHandQueryUser.vue +411 -411
  141. package/src/filiale/ronghao/machineDown.vue +1176 -1176
  142. package/src/filiale/ronghao/machineRefund.vue +3 -1
  143. package/src/filiale/ronghao/replacementSingleInfoOperation.vue +315 -315
  144. package/src/filiale/ronghao/sale.js +11 -0
  145. package/src/filiale/ronghao/specificInformation.vue +537 -537
  146. package/src/filiale/ronghao/uploadFilesHistory.vue +214 -0
  147. package/src/filiale/ruihua/FilesManage/MeterinfoTest.vue +10 -0
  148. package/src/filiale/shanxian/components/revenue/InsuranceAdd.vue +1 -0
  149. package/src/filiale/wuan/MeterMessage.vue +1 -1
  150. package/src/filiale/yangchun/BasicLivingList.vue +281 -0
  151. package/src/filiale/yangchun/BlackList/BlackRecordQuery.vue +1 -0
  152. package/src/filiale/yangchun/CardChangeFill.vue +1 -1
  153. package/src/filiale/yangchun/ChargeList.vue +954 -954
  154. package/src/filiale/yangchun/FilesManage/UserPaperInfoTest.vue +3 -3
  155. package/src/filiale/yangchun/NewMeterList.vue +742 -0
  156. package/src/filiale/yangchun/sale.js +3 -0
  157. package/src/filiale/yuncheng/CardList.vue +1 -1
  158. package/src/filiale/yuncheng/IndustryCommerceHand.vue +1145 -0
  159. package/src/filiale/yuncheng/IndustryCommerceHandAudit.vue +794 -0
  160. package/src/filiale/yuncheng/IndustryCommerceHandManager.vue +64 -0
  161. package/src/filiale/yuncheng/InsuranceAdd.vue +1 -0
  162. package/src/filiale/yuncheng/MeterBookUser.vue +781 -0
  163. package/src/filiale/yuncheng/UserDeviceInfoTest.vue +2 -2
  164. package/src/filiale/yuncheng/changemeterListMaintain.vue +504 -504
  165. package/src/filiale/yuncheng/industryDown.vue +1118 -0
  166. package/src/filiale/yuncheng/sale.js +11 -0
  167. package/src/filiale/yuncheng/uploadFilesHistory.vue +185 -0
  168. package/src/filiale/zhongsheng/BlackListList.vue +293 -293
  169. package/src/filiale/zhongyi/HandQueryUser.vue +389 -389
  170. package/src/plugins/CardService.js +2217 -2217
  171. package/src/sale.js +3 -1
@@ -0,0 +1,330 @@
1
+ <template>
2
+ <div class="form-inline" style="height: auto">
3
+ <div class="form-group" v-for="btn in operBtns">
4
+ <button :id="btn.name" type="button"
5
+ :style="['其他欠费','调价补差'].includes(btn.name) ?'color:#CA2C16':'color:black'"
6
+ :class="[($index === 0) ? 'btn btn-click' : 'btn btn-un-click']" @click="business(btn)"
7
+ :disabled="noButton"><span
8
+ :style="['其他欠费','调价补差'].includes(btn.name) ?'color:#CA2C16':'color:black'">
9
+ {{ btn.name === '超用收费' && $login.f.orgid && ($login.f.orgid === '377819591608500226' || $login.f.orgid === '377819674060128258') ? '气费(其他)' : btn.name }}
10
+ </span>
11
+ </button>
12
+
13
+ </div>
14
+ </div>
15
+ <div v-show="isBusiness" style="height: auto" class="select-overspread">
16
+ <route v-ref:route></route>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ import {HttpResetClass} from 'vue-client'
22
+ import Vue from 'vue'
23
+
24
+ let getNewmetermsg = async function (self, row) {
25
+ self.cardInfo = undefined
26
+ if (row.f_userfiles_id && row.f_userfiles_id.length > 0) {
27
+ // 获取用户信息
28
+ let getUser = await self.$resetpost('api/af-revenue/sql/sale_getUser', {
29
+ data: {
30
+ condition: `u.f_userfiles_id='${row.f_userfiles_id}' `,
31
+ orderitem: `u.f_userfiles_id Desc`
32
+ }
33
+ }, {resolveMsg: '读卡新的用户成功', rejectMsg: '读卡新的用户失败'})
34
+ if (getUser.data.length > 0) {
35
+ await self.$showAlert('换表成功', 'success', 200)
36
+ self.data = getUser.data[0]
37
+ }
38
+ }
39
+ }
40
+ let getBtnsGen = async function (self) {
41
+ let http = new HttpResetClass()
42
+ let param = {
43
+ f_userfiles_id: self.data.f_userfiles_id
44
+ }
45
+ if (self.cardInfo) {
46
+ param.cardInfo = self.cardInfo
47
+ }
48
+ let res = await http.load('POST', 'api/af-revenue/logic/getOperBtns', {
49
+ data: param
50
+ }, {
51
+ resolveMsg: null,
52
+ rejectMsg: '获取业务按钮失败!!'
53
+ })
54
+ let http2 = new HttpResetClass()
55
+ let getWriteError = await http2.load('POST', 'api/af-revenue/sql/singleTable_OrderBy', {
56
+ data: {
57
+ condition: `f_state = '有效' and (f_write_card = '写卡失败' and f_operate_date >= DATEADD(HOUR, -3, GETDATE())) and f_userfiles_id = '${self.data.f_userfiles_id}'`,
58
+ tablename: 't_fillcard',
59
+ items: '*',
60
+ orderitem: 'id desc'
61
+ }
62
+ }, {resolveMsg: null, rejectMsg: '获取写卡失败的补卡记录失败'})
63
+ console.log('获取写卡失败的补卡记录', getWriteError)
64
+ let getBtns = res.data
65
+ console.log('获取的业务按钮', getBtns)
66
+ console.log('有没有用户信息', self.data)
67
+ for(let i = 0; i < getBtns.length; i++){
68
+ if(getBtns[i].name === '其他欠费'){
69
+ self.$showMessage('请先完成待缴费的材料费',["confirm","cancel"]).then(res =>{
70
+ if(res === 'confirm'){
71
+ self.business(getBtns[i])
72
+ }
73
+ })
74
+ }
75
+ }
76
+ if (self.$login.r.length === 0) {
77
+ self.$showAlert('您没有相关的业务操作权限, 请联系管理员!!', 'warning', 2000)
78
+ } else {
79
+ self.temp = []
80
+ for (let i = 0; i < getBtns.length; i++) {
81
+ // 不需要权限的按钮
82
+ let noInclude = getBtns[i].name === '垃圾费收费'
83
+ if (noInclude || self.$login.r.includes(getBtns[i].name)) {
84
+ // 进行权限验证
85
+ if (getBtns[i].name === '换表&清零') {
86
+ self.temp.push({
87
+ name: '换表',
88
+ value: getBtns[i].value
89
+ })
90
+ if (self.data.f_totalsplit_type !== '总表') {
91
+ self.temp.push({
92
+ name: '清零',
93
+ value: {
94
+ 'weight': getBtns[i].value.weight,
95
+ 'routeName': 'reset-meter'
96
+ }
97
+ })
98
+ }
99
+ } else {
100
+ self.temp.push(getBtns[i])
101
+ }
102
+ console.log(self.temp[i])
103
+ }
104
+ }
105
+ // // 检查是否需要展示限制购气按钮
106
+ // if (self.$login.r.includes('限制购气')) {
107
+ // let limitGasButton = getBtns.find(btn => btn.name === '限制购气')
108
+ // if (limitGasButton) {
109
+ // self.temp.push(limitGasButton)
110
+ // }
111
+ // }
112
+ // 如果有未写卡记录,添加线下写卡按钮
113
+ if (self.data.unWriteSell) {
114
+ if (self.data.unWriteSell.length > 0) {
115
+ self.temp.push({
116
+ name: '线下写卡',
117
+ value: {
118
+ 'weight': 0,
119
+ 'routeName': 'un-write-card-center'
120
+ }
121
+ })
122
+ }
123
+ }
124
+ if (self.data.f_user_nature === '单位') {
125
+ self.temp.push({
126
+ name: '维管收费',
127
+ value: {
128
+ 'weight': 5,
129
+ 'routeName': 'repair-charge'
130
+ }
131
+ })
132
+ }
133
+ if (self.data.f_meter_type === '物联网表') {
134
+ if (self.data.f_hascard === '是') {
135
+ if (self.data.f_whether_hairpin === '未发') {
136
+ if (self.data.f_share_times !== '' && self.data.f_share_times === '是' && self.data.f_times > 0) {
137
+ self.temp.push({
138
+ name: '补卡',
139
+ value: {
140
+ 'weight': 2,
141
+ 'routeName': 'replace-card-manage'
142
+ }
143
+ })
144
+ } else {
145
+ }
146
+ }
147
+ }
148
+ }
149
+ // 如果卡上有气,添加购气撤销按钮
150
+ if (self.cardInfo && (self.cardInfo.Gas > 0 || self.cardInfo.Money > 0 || (self.cardInfo.TotalMoney > 0 && self.data.f_support_purchase === '是'))) {
151
+ self.temp.push({
152
+ name: '购气撤销',
153
+ value: {
154
+ 'weight': 0,
155
+ 'routeName': 'card-meter-charge-cancel'
156
+ }
157
+ })
158
+ if (self.data.unWriteSell && self.data.unWriteSell.length > 0) {
159
+ // 过滤掉线下写卡
160
+ self.temp = self.temp.filter((item) => {
161
+ return item.name !== '线下写卡'
162
+ })
163
+ self.data.unWriteSell.forEach(
164
+ async (item) => {
165
+ let sql = `update t_sellinggas set f_write_card = null where id = '${item.id}' and f_write_card ='写卡失败'`
166
+ await self.$resetpost('api/af-revenue/logic/runSQL', { sql: sql })
167
+ }
168
+ )
169
+ }
170
+ }
171
+ /* // 如果是预备户,删除发卡售气按钮
172
+ if (self.data.f_user_state == '预备') {
173
+ self.temp.splice(self.temp.findIndex(item => item.name === '发卡售气'), 1)
174
+ } */
175
+
176
+ // 根据权重将业务按钮排序
177
+ self.operBtns = self.temp.sort((a, b) => {
178
+ return a.value.weight - b.value.weight
179
+ })
180
+
181
+ // 当有调价补差时,只展示调价补差按钮
182
+ let adjustSenders = self.operBtns.find((row) => {
183
+ return row.name == '调价补差'
184
+ })
185
+ if (adjustSenders) {
186
+ self.operBtns = []
187
+ self.operBtns.push(adjustSenders)
188
+ }
189
+ if (getWriteError.data.length > 0) {
190
+ self.operBtns = [{
191
+ name: '补卡',
192
+ value: {
193
+ 'weight': 0,
194
+ 'routeName': 'replace-card-manage'
195
+ }
196
+ }]
197
+ }
198
+
199
+ if (self.operBtns.length > 0) {
200
+ self.isBusiness = true
201
+ self.$refs.route.init(self.operBtns[0].value.routeName, {row: self.data, cardData: self.cardInfo, writeError: getWriteError.data})
202
+ self.styleChange(self.operBtns[0])
203
+ }
204
+ }
205
+ // // 添加“限制购气”按钮
206
+ // self.operBtns.push({
207
+ // name: '限制购气',
208
+ // value: {
209
+ // 'weight': 0,
210
+ // 'routeName': 'limit-gas-manages'
211
+ // }
212
+ // })
213
+ }
214
+
215
+ export default {
216
+ title: '业务操作',
217
+ data () {
218
+ return {
219
+ operBtns: [],
220
+ isBusiness: false,
221
+ noButton: false // 业务请求时禁止按钮点击
222
+ }
223
+ },
224
+ props: ['data', 'cardInfo'],
225
+ ready () {
226
+ getBtnsGen(this)
227
+ console.log('data,cardInfo', this.data, this.cardInfo)
228
+ },
229
+ methods: {
230
+ business (btn) {
231
+ // // 处理按钮样式
232
+ // this.styleChange(btn.name)
233
+ // this.isBusiness = true
234
+ // this.$refs.route.init(btn.value.routeName, {row: this.data, cardData: this.cardInfo})
235
+ if (this.$refs.route.cards.length > 0) {
236
+ if (this.$refs.route.cards[0].title == '增值服务管理') {
237
+ this.$showMessage('切换页面后,当前页面数据会丢失,是否切换?', ['confirm', 'cancel']).then(res => {
238
+ if (res == 'cancel') {
239
+
240
+ } else {
241
+ // 处理按钮样式
242
+ this.styleChange(btn.name)
243
+ this.isBusiness = true
244
+ this.$refs.route.init(btn.value.routeName, {row: this.data, cardData: this.cardInfo})
245
+ }
246
+ })
247
+ } else {
248
+ // 处理按钮样式
249
+ this.styleChange(btn.name)
250
+ this.isBusiness = true
251
+ this.$refs.route.init(btn.value.routeName, {row: this.data, cardData: this.cardInfo})
252
+ }
253
+ }
254
+ },
255
+
256
+ styleChange (name) {
257
+ this.operBtns.forEach((res) => {
258
+ if (res.name === name) {
259
+ if (document.getElementById(res.name)) {
260
+ document.getElementById(res.name).style.backgroundColor = '#6aa6e2'
261
+ document.getElementById(res.name).style.color = 'white'
262
+ }
263
+ } else {
264
+ if (document.getElementById(res.name)) {
265
+ document.getElementById(res.name).style.backgroundColor = 'white'
266
+ document.getElementById(res.name).style.color = 'black'
267
+ }
268
+ }
269
+ })
270
+ }
271
+ },
272
+ watch: {
273
+ 'data' () {
274
+ getBtnsGen(this)
275
+ }
276
+ },
277
+ events: {
278
+ 'no-button' () {
279
+ this.noButton = true
280
+ },
281
+ 'has-button' () {
282
+ this.noButton = false
283
+ },
284
+ 'get-new-row' (row) {
285
+ console.log('xxxxxx', row)
286
+ // 发生换表成功
287
+ getNewmetermsg(this, row)
288
+ },
289
+ 'toroute' (buttonObj, data) {
290
+ console.log('指定按钮。。', buttonObj)
291
+ this.$resetpost('api/af-revenue/sql/sale_getUser', {
292
+ data: {condition: `i.f_userinfo_code='${data.f_userinfo_code}' and u.f_filialeid = '${data.f_filialeid}'`, orderitem: `f_userinfo_id Desc`}
293
+ }, {resolveMsg: null, rejectMsg: '获取用户信息失败'}).then((res) => {
294
+ if (buttonObj) {
295
+ this.$dispatch('resflushdata', res.data[0])
296
+ this.styleChange(buttonObj.name)
297
+ this.$refs.route.init(buttonObj.value, {row: res.data[0]})
298
+ }
299
+ })
300
+ },
301
+ 'button-specifies' (buttonObj, data) {
302
+ console.log('指定按钮。。', buttonObj)
303
+ // buttonObj 格式: {name:'机表收费', value: 'machine-meter-center'}
304
+ if (buttonObj) {
305
+ this.styleChange(buttonObj.name)
306
+ this.$refs.route.init(buttonObj.value, {row: data})
307
+ }
308
+ }
309
+ }
310
+ }
311
+ </script>
312
+
313
+ <style scoped>
314
+
315
+ .btn-click {
316
+ background-color: #6aa6e2;
317
+ border-radius: 5px;
318
+ color: white;
319
+ /*border-color: black;*/
320
+ border: solid 1px #c7c7c7;
321
+ }
322
+
323
+ .btn-un-click {
324
+ background-color: white;
325
+ border-radius: 5px;
326
+ color: black;
327
+ /*border-color: black;*/
328
+ border: solid 1px #c7c7c7;
329
+ }
330
+ </style>