sale-client 3.4.112 → 3.4.113

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 (93) hide show
  1. package/.gradle/{5.2.1 → 4.4}/fileChanges/last-build.bin +0 -0
  2. package/.gradle/{6.1.1 → 4.4}/fileHashes/fileHashes.bin +0 -0
  3. package/.gradle/4.4/fileHashes/fileHashes.lock +0 -0
  4. package/build/dev-server.js +3 -3
  5. package/{.gradle/5.2.1/gc.properties → npm} +0 -0
  6. package/package.json +1 -1
  7. package/src/components/FilesManage/MeterinfoTest.vue +904 -905
  8. package/src/components/FilesManage/TemplateManage.vue +167 -167
  9. package/src/components/FilesManage/UserGeneralInfoTest.vue +642 -640
  10. package/src/components/charge/business/CardChangeFill.vue +612 -612
  11. package/src/components/charge/business/CardMeterCenter.vue +899 -899
  12. package/src/components/charge/business/FilesComplete.vue +253 -253
  13. package/src/components/charge/business/refund/IOTRefund.vue +236 -236
  14. package/src/components/charge/business/refund/RefundManage.vue +28 -28
  15. package/src/components/charge/gasloss/gasLossOperate.vue +357 -357
  16. package/src/components/chargeNew/thirdSurplus.vue +2 -0
  17. package/src/components/revenue/Common/MeterMessage.vue +184 -184
  18. package/src/components/revenue/HandManager/MeterBookManage.vue +153 -153
  19. package/src/components/revenue/base/leftview/MixPriceInfo.vue +60 -60
  20. package/src/components/revenue/base/leftview/Mulitinfo.vue +74 -74
  21. package/src/components/revenue/base/leftview/SafeCheck.vue +311 -311
  22. package/src/components/revenue/base/leftview/Stairinfo.vue +156 -156
  23. package/src/components/revenue/base/leftview/meterinfodetail.vue +195 -195
  24. package/src/components/revenue/base/rightview/CardList.vue +477 -477
  25. package/src/components/revenue/comprehen/ComprehenOperation/MeterDisable/DisableManage.vue +93 -93
  26. package/src/components/revenue/comprehen/ComprehenOperation/MeterEnable/EnableManage.vue +184 -184
  27. package/src/components/revenue/comprehen/ComprehenOperation/OtherGas/OtherGas.vue +5 -1
  28. package/src/components/revenue/comprehen/ComprehenOperation/removeTable.vue +1 -1
  29. package/src/components/revenue/comprehen/Maintenance/hand/handListMaintain.vue +638 -638
  30. package/src/components/revenue/comprehen/Maintenance/revenue/StockListmain.vue +7 -7
  31. package/src/components/revenue/comprehen/Message/MessageList.vue +587 -587
  32. package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackList.vue +1 -1
  33. package/src/components/revenue/comprehen/SpecialUser/BlackList/BlackListManage.vue +1 -1
  34. package/src/components/revenue/comprehen/StairPrice/GasPriceList.vue +303 -303
  35. package/src/components/revenue/comprehen/replacement/replacementHandInfoRecord.vue +155 -155
  36. package/src/components/revenue/comprehen/wechatpay/WeChat.vue +62 -62
  37. package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +8 -4
  38. package/src/filiale/alashan/PrintBill.vue +116 -116
  39. package/src/filiale/jingwei/CardHand.vue +742 -742
  40. package/src/filiale/macheng/FilesManageNew/FileUserFiles.vue +743 -0
  41. package/src/filiale/macheng/FilesManageNew/UserEssentialInfoTest.vue +371 -371
  42. package/src/filiale/macheng/FilesManageNew/UserGeneralInfoTest.vue +596 -596
  43. package/src/filiale/macheng/UserEssentialInfoTest.vue +368 -366
  44. package/src/filiale/meihekou/MeterinfoTest.vue +0 -1
  45. package/src/filiale/meihekou/PrintBill.vue +140 -140
  46. package/src/filiale/meihekou/ReissueBill.vue +322 -322
  47. package/src/filiale/qianneng/FilesManage/MeterinfoTest.vue +0 -1
  48. package/src/filiale/qianneng/GasPriceList.vue +330 -330
  49. package/src/filiale/qianneng/HandManager.vue +1838 -1838
  50. package/src/filiale/qianneng/OtherChargeNew.vue +6 -2
  51. package/src/filiale/qianneng/sale.js +30 -32
  52. package/src/filiale/qingtongxia/UserGeneralInfoTest.vue +538 -533
  53. package/src/filiale/rongcheng/FilesManageNew/UserGeneralInfoTest.vue +608 -608
  54. package/src/filiale/rongchuang/OtherGas.vue +329 -329
  55. package/src/filiale/tongchuan/CardList.vue +482 -482
  56. package/src/filiale/tongchuan/MeterinfoTest.vue +892 -892
  57. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/AutomaticPurse.vue +298 -298
  58. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/CardHandRecord.vue +267 -267
  59. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/ChangeMeterQueryUser.vue +240 -240
  60. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/ChangeRecord.vue +235 -235
  61. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/ChargeQueryUser.vue +372 -372
  62. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/DeveiceRecord.vue +251 -251
  63. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/FillCardQueryUser.vue +209 -209
  64. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/HandQueryUser.vue +365 -365
  65. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +252 -252
  66. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/OtherChargeQueryUser.vue +250 -250
  67. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/RecordQueryUser.vue +249 -249
  68. package/src/filiale/tongchuan/common/userinfo_detail/ic_detail/TransferQueryUser.vue +222 -222
  69. package/src/filiale/tongchuan/sale.js +107 -107
  70. package/src/filiale/zhongsheng/rightview/CardList.vue +492 -492
  71. package/src/filiale/zhongsheng/wechatpay/WeChatPayDetail.vue +469 -469
  72. package/src/main.js +1 -1
  73. package/src/plugins/CardService.js +1798 -1798
  74. package/src/plugins/ChangeMeterService.js +756 -756
  75. package/src/plugins/FileManageService.js +366 -366
  76. package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
  77. package/.gradle/6.1.1/executionHistory/executionHistory.bin +0 -0
  78. package/.gradle/6.1.1/executionHistory/executionHistory.lock +0 -0
  79. package/.gradle/6.1.1/fileChanges/last-build.bin +0 -0
  80. package/.gradle/6.1.1/fileHashes/fileHashes.lock +0 -0
  81. package/.gradle/6.1.1/gc.properties +0 -0
  82. package/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  83. package/.gradle/7.1/dependencies-accessors/gc.properties +0 -0
  84. package/.gradle/7.1/executionHistory/executionHistory.bin +0 -0
  85. package/.gradle/7.1/executionHistory/executionHistory.lock +0 -0
  86. package/.gradle/7.1/fileChanges/last-build.bin +0 -0
  87. package/.gradle/7.1/fileHashes/fileHashes.bin +0 -0
  88. package/.gradle/7.1/fileHashes/fileHashes.lock +0 -0
  89. package/.gradle/7.1/gc.properties +0 -0
  90. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  91. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  92. package/.gradle/checksums/checksums.lock +0 -0
  93. package/.gradle/vcs-1/gc.properties +0 -0
@@ -1,329 +1,329 @@
1
- <template>
2
- <div class="flex-row">
3
- <div class="span">
4
- <validator name='v'>
5
- <form novalidate class="form-horizontal">
6
- <div class="row" v-if="isGas">
7
- <div class="col-sm-4" :class="[$v.f_pregas.dctest ? 'has-error' : 'has-success']">
8
- <label class="font_normal_body">应补气量</label>
9
- <input class="input_search" style="width:60%" type="number" @blur="pregas"
10
- v-validate:f_pregas='{ dctest: [0, ">=" ]}' v-model="model.f_pregas" placeholder="应补气量" v-ref:f_pregas>
11
- </div>
12
- <div class="col-sm-4">
13
- <label for="f_add_gas" class="font_normal_body">是否入累计</label>
14
- <v-select id="f_add_gas"
15
- v-model="model.f_add_gas"
16
- placeholder='请选择'
17
- :value.sync="model.f_add_gas"
18
- :options='addGas'
19
- close-on-select clear-button>
20
- </v-select>
21
- </div>
22
- </div>
23
- <div class="row" v-if="!isGas">
24
- <div class="col-sm-4">
25
- <label for="f_preamount" class=" font_normal_body">应补金额:</label>
26
- <input class="input_search" style="width:60%" type="number" min = "0" v-model="model.f_preamount" placeholder="金额">
27
- </div>
28
- <div class="col-sm-4">
29
- <label for="f_add_gas" class="font_normal_body">是否入累计:</label>
30
- <v-select v-model="model.f_add_gas"
31
- placeholder='请选择'
32
- :value.sync="model.f_add_gas"
33
- :options='addGas'
34
- close-on-select clear-button>
35
- </v-select>
36
- </div>
37
- </div>
38
- <div class="row" style="margin-top:10px;">
39
- <label for="f_reason" class=" font_normal_body">备&emsp;&emsp;注</label>
40
- <input class="input_search" style="width:55%" rows="1" v-model="model.f_reason" placeholder="备注">
41
- </div>
42
- </form>
43
- <print-bill :show="print" :bill-config='config' :bill-data='billData' :data='row' @toggle="close" @printok="printok" v-ref:printbill></print-bill>
44
- <accept-bill :show="acceptprint" :bill-url='acceptUrl' v-on:toggle="close" :data='row' :billdata="printData" v-ref:acceptbill @closeaccept="closeAccept"></accept-bill>
45
- <div style="text-align:right;margin-top: 2%">
46
- <button class="button_search" @click="accept()" v-if="config.hasAcceptance" :disabled='!$v.valid'>受理单</button>
47
- <button class="button_search" @click="confirm()" :disabled='!$v.valid' >确认</button>
48
- <button class="button_clear" @click="clean()" >取消</button>
49
- </div>
50
- </validator>
51
- </div>
52
- </div>
53
- </template>
54
- <script>
55
- let otherGasGen = async function (self) {
56
- // 划价
57
- let data = self.getSell()
58
-
59
- // 获取最后一次操作
60
- let getLastOper = await self.$resetpost('rs/logic/sale_getLastOper', {data: {f_userfiles_id: self.row.f_userfiles_id}}, {resolveMsg: null, rejectMsg: '获取最后一次操作失败'})
61
- console.log('获取最后一次的操作。。', getLastOper)
62
-
63
- // 验证是否可以不计入补气(这里不计入补气 == 掉气补气)
64
- // if (data.f_add_gas === '不计入' && getLastOper.data.ispick === '已过表') {
65
- // self.$showAlert('该客户最后一次购气已过表,禁止不计入补气,请修改为计入在进行补气', 'warning', 10000)
66
- // return
67
- // }
68
-
69
- data.f_total_gas = data.f_add_gas === '计入' ? (self.row.f_total_gas - 0) + (self.model.f_pregas - 0) : (self.row.f_total_gas - 0)
70
- data.f_total_fee = data.f_add_gas === '计入' ? (self.row.f_total_fee - 0) + (self.model.f_preamount - 0) : (self.row.f_total_fee - 0)
71
-
72
- // 组织划价model
73
- let param = {
74
- f_price_id: self.row.f_price_id,
75
- f_userfiles_id: self.row.f_userfiles_id,
76
- f_user_id: self.row.f_user_id,
77
- f_meter_type: self.row.f_meter_type
78
- }
79
- // 若是气量卡表 temp为金额 若是金额卡表 temp为气量
80
- if (self.isGas) {
81
- data.f_pregas = self.model.f_pregas
82
- // let fee = await self.$CommonService.gasCalculate(param, self.model.f_pregas)
83
- // data.f_preamount = fee.data.chargenum
84
- } else {
85
- data.f_preamount = self.model.f_preamount
86
- let gas = await self.$CommonService.feeCalculate(param, self.model.f_preamount)
87
- data.f_pregas = gas.data.gas
88
- }
89
- data.f_userfiles_id = {
90
- f_userfiles_id: self.row.f_userfiles_id,
91
- f_user_id: self.row.f_user_id,
92
- version: self.row.version,
93
- f_times: self.row.cardInfo.Times + 1,
94
- f_total_gas: data.f_add_gas === '计入' ? (self.row.f_total_gas - 0) + (self.model.f_pregas - 0) : (self.row.f_total_gas - 0),
95
- f_total_fee: data.f_add_gas === '计入' ? (self.row.f_total_fee - 0) + (self.model.f_preamount - 0) : (self.row.f_total_fee - 0),
96
- f_write_totalgas: data.f_add_gas === '计入' ? (self.row.f_write_totalgas - 0) + (self.model.f_pregas - 0) : (self.row.f_write_totalgas - 0),
97
- f_write_totalfee: data.f_add_gas === '计入' ? (self.row.f_write_totalfee - 0) + (self.model.f_preamount - 0) : (self.row.f_write_totalfee - 0),
98
- f_balance_gas: 0,
99
- f_balance_amount: 0
100
- }
101
- if (self.row.f_meter_type === '物联网表') {
102
- if (self.row.f_calculation === '预付费' || (self.row.f_hascard == '是' && self.row.f_calculation == '表端结算')) {
103
- if (self.row.f_billing === '按气量') {
104
- data.f_userfiles_id.f_balance_gas = (self.row.f_balance_gas - 0) + (self.model.f_pregas - 0)
105
- } else {
106
- data.f_userfiles_id.f_balance_amount = (self.row.f_balance_amount - 0) + (self.model.f_preamount - 0)
107
- }
108
- } else {
109
- data.f_userinfo_id = {
110
- f_userinfo_id: self.row.f_userinfo_id,
111
- f_balance: (self.row.f_balance - 0) + (self.model.f_preamount - 0),
112
- f_real_balance: (self.row.f_real_balance - 0) + (self.model.f_preamount - 0),
113
- version: self.row.userinfo_version
114
- }
115
- }
116
- } else if (self.row.f_meter_type === '机表') {
117
- data.f_user_id.f_balance_amount = (self.row.f_balance_amount - 0) + (self.model.f_preamount - 0)
118
- }
119
-
120
- let cardId = self.row.f_card_id
121
- if (self.row.f_tag && self.row.f_tag !== 'null') {
122
- // 截取用户编号后四位
123
- data.f_userfiles_id.f_card_id = cardId = self.row.f_tag + self.row.f_card_id
124
- data.f_userfiles_id.f_tag = null
125
- }
126
-
127
- // 保存表类型
128
- data.f_meter_type = self.row.f_meter_type
129
- if(!(self.row.f_hascard==null) && !(self.row.f_share_times==null) && self.row.f_meter_type =='物联网表' && self.row.f_hascard == '是' && self.row.f_share_times == '是'){
130
- data.f_times = self.row.f_times+1
131
- }else{
132
- data.f_times = self.row.cardInfo.Times + 1
133
- }
134
-
135
- let result = await self.$resetpost('rs/logic/sale_fillGas', data, {resolveMsg: null, rejectMsg: '补气报错!!!'})
136
-
137
- if (self.row.f_meter_type == '机表') {
138
- self.$showAlert('补气成功', 'success', 2000)
139
- return result.data.id
140
- } else {
141
- try {
142
- // 写卡操作
143
- let cardParams = await self.$resetpost('rs/logic/stairCard', {data: {f_card_id: cardId + '', f_alias: self.row.f_alias, f_user_id: self.row.f_user_id}}, {resolveMsg: null, rejectMsg: '获取写卡参数失败'})
144
-
145
- // 获取写卡参数
146
- let params = self.getWriteCard(cardParams, self.row, data)
147
- params.kh = cardId
148
- params.kzt = getLastOper.data.ispick === '未过表' && getLastOper.data.lastsell_oper === '发卡售气' ? '0' : '1'
149
- if(!(self.row.f_hascard==null) && !(self.row.f_share_times==null) && self.row.f_meter_type =='物联网表' && self.row.f_hascard == '是' && self.row.f_share_times == '是'){
150
- params.cs = self.row.f_times+1
151
- }
152
- console.log('获取其他补气写卡参数,,', params)
153
- if (data.f_add_gas === '不计入'){
154
- params.totalmoney = (params.totalmoney-0) - (cardParams.data.otherFee-0)
155
- }
156
- let url = (getLastOper.data.last_oper === '补卡' || getLastOper.data.last_oper === '换表')
157
- ? 'http://127.0.0.1:8003/WriteNewCard' : 'http://127.0.0.1:8003/WriteGasCard'
158
-
159
- let cardRes = await self.$resetpost(url, params, {resolveMsg: null, rejectMsg: '补气卡服务错误'})
160
-
161
- // 卡服务写卡异常,业务逻辑回滚
162
- if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
163
- throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
164
- } else {
165
- await self.$CommonService.updatePassword(self.row, cardRes)
166
- self.$showAlert('补气成功', 'success', 2000)
167
- return result.data.id
168
- }
169
- } catch (error) {
170
- self.$showAlert(error, 'danger', 0)
171
- let rollback = {
172
- id: result.data.id,
173
- f_card_id: self.row.f_card_id
174
- }
175
- if (self.row.f_tag) {
176
- rollback.f_tag = self.row.f_tag
177
- }
178
- await self.$resetpost('rs/logic/otherGasRollback', {data: rollback}, {rejectMsg: '其他补气回滚出错', resolveMsg: null})
179
- }
180
- }
181
- }
182
-
183
- let readyGen = async function (self) {
184
- console.log('其他补气,,,', self.row)
185
- await self.$getConfig(self, 'OtherGas')
186
- console.log('其他补气config', self.config)
187
- }
188
-
189
- export default {
190
- title: '其他补气',
191
- data () {
192
- return {
193
- isGas: false,
194
- config: {
195
- hasPrint: false, // 默认打票
196
- hasBillManage: false, // 默认不启用发票管理
197
- billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
198
- printType: '普通收据', // 收据/电子票/专用发票/国税发票
199
- payment: '现金缴费',
200
- hasAcceptance: false // 是否需要打印受理单
201
- },
202
- acceptprint: false,
203
- acceptUrl: '',
204
- printData: {
205
- reason: '',
206
- fillgas: '',
207
- fillamount: ''
208
- },
209
- model: {
210
- f_pregas: 0,
211
- f_preamount: 0,
212
- f_reason: '',
213
- f_add_gas: '不计入'
214
- },
215
-
216
- print: false,
217
- billData: {
218
- url: 'rs/report/card_bill',
219
- billnumber: ''
220
- }
221
- }
222
- },
223
- props: ['row', 'cardData'],
224
- ready () {
225
- this.isGas = this.row.f_meter_type === '气量卡表' || this.row.f_collection_type == '按气量' || (this.row.f_calculation === '预付费' && this.row.f_billing === '按气量')
226
- this.row.cardInfo = this.cardData
227
- console.log('卡信息', this.row.cardInfo)
228
- readyGen(this)
229
- },
230
- methods: {
231
- accept () {
232
- // 打印受理单
233
- console.log('其他补气model', this.model)
234
- console.log('其他补气受累单中row', this.row)
235
- this.printData.reason = this.model.f_comments ? `'${this.model.f_reason}'` : '' + `'${this.model.f_reason}'`
236
- this.printData.fillgas = `'${this.model.f_pregas}'`
237
- this.printData.fillamount = `'${this.model.f_preamount}'`
238
- console.log('受累单中printData', this.printData)
239
- this.acceptUrl = 'rs/report/acceptOtherGas_bill'
240
- this.acceptprint = true
241
- },
242
- closeAccept () {
243
- this.acceptprint = false
244
- },
245
- confirm () {
246
- otherGasGen(this).then((res) => {
247
- this.$dispatch('success')
248
- })
249
- },
250
- pregas () {
251
- // 对气量进行验证
252
- if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
253
- this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
254
- this.model.f_pregas = null
255
- }
256
- },
257
- getSell () {
258
- return {
259
- f_balance: this.row.f_balance,
260
- f_curbalance: this.row.f_balance,
261
- f_card_id: this.row.f_card_id,
262
- f_comments: this.model.f_reason,
263
- f_add_gas: this.model.f_add_gas[0],
264
- f_type: '其他补气',
265
- f_user_id: this.row.f_user_id,
266
- f_userfiles_id: this.row.f_userfiles_id,
267
- f_userinfo_id: this.row.f_userinfo_id,
268
- f_user_name: this.row.f_user_name,
269
- f_user_type: this.row.f_user_type,
270
- f_gasproperties: this.row.f_gasproperties,
271
- f_address: this.row.f_address,
272
- f_meter_brand: this.row.f_meter_brand,
273
-
274
- f_operat_type: '其他补气',
275
- f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他补气操作`,
276
- f_state: '有效',
277
- f_operator: this.$login.f.name,
278
- f_operatorid: this.$login.f.id,
279
- f_orgid: this.$login.f.orgid,
280
- f_orgname: this.$login.f.orgs,
281
- f_depid: this.$login.f.depids,
282
- f_depname: this.$login.f.deps,
283
- f_zoneid: this.$login.f.zoneid,
284
- f_zones: this.$login.f.zones
285
- }
286
- },
287
- getWriteCard (cardParams, row, data) {
288
- let params = {
289
- factory: row.f_alias, // 气表厂家
290
- kh: row.f_card_id, // 卡号
291
- kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
292
- bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
293
- czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
294
- tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
295
- bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
296
- ql: data.f_pregas, // 预购气量
297
- cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
298
- iotTimes: row.f_iot_times, // 远传次数
299
- money: data.f_preamount, // 购气金额
300
- klx: row.f_coding,
301
- kzt: '1',
302
- dqdm: row.f_area_code,
303
- meterid: row.f_meternumber ? row.f_meternumber : 0 // 表号
304
- // meternumber: row.f_meternumber ? row.f_meternumber : 0
305
- }
306
- return Object.assign({}, this.$CommonService.writeCardParams(cardParams), params)
307
- },
308
- close () {
309
- this.print = false
310
- this.clean()
311
- },
312
- clean () {
313
- this.$info('取消操作')
314
- this.$dispatch('cancelclean', this.row)
315
- },
316
- printok () {
317
- this.$dispatch('success')
318
- }
319
- },
320
- computed: {
321
- addGas () {
322
- return [{label: '计入', value: '计入'}, {label: '不计入', value: '不计入'}]
323
- }
324
- }
325
- }
326
- </script>
327
-
328
- <style>
329
- </style>
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="span">
4
+ <validator name='v'>
5
+ <form novalidate class="form-horizontal">
6
+ <div class="row" v-if="isGas">
7
+ <div class="col-sm-4" :class="[$v.f_pregas.dctest ? 'has-error' : 'has-success']">
8
+ <label class="font_normal_body">应补气量</label>
9
+ <input class="input_search" style="width:60%" type="number" @blur="pregas"
10
+ v-validate:f_pregas='{ dctest: [0, ">=" ]}' v-model="model.f_pregas" placeholder="应补气量" v-ref:f_pregas>
11
+ </div>
12
+ <div class="col-sm-4">
13
+ <label for="f_add_gas" class="font_normal_body">是否入累计</label>
14
+ <v-select id="f_add_gas"
15
+ v-model="model.f_add_gas"
16
+ placeholder='请选择'
17
+ :value.sync="model.f_add_gas"
18
+ :options='addGas'
19
+ close-on-select clear-button>
20
+ </v-select>
21
+ </div>
22
+ </div>
23
+ <div class="row" v-if="!isGas">
24
+ <div class="col-sm-4">
25
+ <label for="f_preamount" class=" font_normal_body">应补金额:</label>
26
+ <input class="input_search" style="width:60%" type="number" min = "0" v-model="model.f_preamount" placeholder="金额">
27
+ </div>
28
+ <div class="col-sm-4">
29
+ <label for="f_add_gas" class="font_normal_body">是否入累计:</label>
30
+ <v-select v-model="model.f_add_gas"
31
+ placeholder='请选择'
32
+ :value.sync="model.f_add_gas"
33
+ :options='addGas'
34
+ close-on-select clear-button>
35
+ </v-select>
36
+ </div>
37
+ </div>
38
+ <div class="row" style="margin-top:10px;">
39
+ <label for="f_reason" class=" font_normal_body">备&emsp;&emsp;注</label>
40
+ <input class="input_search" style="width:55%" rows="1" v-model="model.f_reason" placeholder="备注">
41
+ </div>
42
+ </form>
43
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' :data='row' @toggle="close" @printok="printok" v-ref:printbill></print-bill>
44
+ <accept-bill :show="acceptprint" :bill-url='acceptUrl' v-on:toggle="close" :data='row' :billdata="printData" v-ref:acceptbill @closeaccept="closeAccept"></accept-bill>
45
+ <div style="text-align:right;margin-top: 2%">
46
+ <button class="button_search" @click="accept()" v-if="config.hasAcceptance" :disabled='!$v.valid'>受理单</button>
47
+ <button class="button_search" @click="confirm()" :disabled='!$v.valid' >确认</button>
48
+ <button class="button_clear" @click="clean()" >取消</button>
49
+ </div>
50
+ </validator>
51
+ </div>
52
+ </div>
53
+ </template>
54
+ <script>
55
+ let otherGasGen = async function (self) {
56
+ // 划价
57
+ let data = self.getSell()
58
+
59
+ // 获取最后一次操作
60
+ let getLastOper = await self.$resetpost('rs/logic/sale_getLastOper', {data: {f_userfiles_id: self.row.f_userfiles_id}}, {resolveMsg: null, rejectMsg: '获取最后一次操作失败'})
61
+ console.log('获取最后一次的操作。。', getLastOper)
62
+
63
+ // 验证是否可以不计入补气(这里不计入补气 == 掉气补气)
64
+ // if (data.f_add_gas === '不计入' && getLastOper.data.ispick === '已过表') {
65
+ // self.$showAlert('该客户最后一次购气已过表,禁止不计入补气,请修改为计入在进行补气', 'warning', 10000)
66
+ // return
67
+ // }
68
+
69
+ data.f_total_gas = data.f_add_gas === '计入' ? (self.row.f_total_gas - 0) + (self.model.f_pregas - 0) : (self.row.f_total_gas - 0)
70
+ data.f_total_fee = data.f_add_gas === '计入' ? (self.row.f_total_fee - 0) + (self.model.f_preamount - 0) : (self.row.f_total_fee - 0)
71
+
72
+ // 组织划价model
73
+ let param = {
74
+ f_price_id: self.row.f_price_id,
75
+ f_userfiles_id: self.row.f_userfiles_id,
76
+ f_user_id: self.row.f_user_id,
77
+ f_meter_type: self.row.f_meter_type
78
+ }
79
+ // 若是气量卡表 temp为金额 若是金额卡表 temp为气量
80
+ if (self.isGas) {
81
+ data.f_pregas = self.model.f_pregas
82
+ // let fee = await self.$CommonService.gasCalculate(param, self.model.f_pregas)
83
+ // data.f_preamount = fee.data.chargenum
84
+ } else {
85
+ data.f_preamount = self.model.f_preamount
86
+ let gas = await self.$CommonService.feeCalculate(param, self.model.f_preamount)
87
+ data.f_pregas = gas.data.gas
88
+ }
89
+ data.f_userfiles_id = {
90
+ f_userfiles_id: self.row.f_userfiles_id,
91
+ f_user_id: self.row.f_user_id,
92
+ version: self.row.version,
93
+ f_times: self.row.cardInfo.Times + 1,
94
+ f_total_gas: data.f_add_gas === '计入' ? (self.row.f_total_gas - 0) + (self.model.f_pregas - 0) : (self.row.f_total_gas - 0),
95
+ f_total_fee: data.f_add_gas === '计入' ? (self.row.f_total_fee - 0) + (self.model.f_preamount - 0) : (self.row.f_total_fee - 0),
96
+ f_write_totalgas: data.f_add_gas === '计入' ? (self.row.f_write_totalgas - 0) + (self.model.f_pregas - 0) : (self.row.f_write_totalgas - 0),
97
+ f_write_totalfee: data.f_add_gas === '计入' ? (self.row.f_write_totalfee - 0) + (self.model.f_preamount - 0) : (self.row.f_write_totalfee - 0),
98
+ f_balance_gas: 0,
99
+ f_balance_amount: 0
100
+ }
101
+ if (self.row.f_meter_type === '物联网表') {
102
+ if (self.row.f_calculation === '预付费' || (self.row.f_hascard == '是' && self.row.f_calculation == '表端结算')) {
103
+ if (self.row.f_billing === '按气量') {
104
+ data.f_userfiles_id.f_balance_gas = (self.row.f_balance_gas - 0) + (self.model.f_pregas - 0)
105
+ } else {
106
+ data.f_userfiles_id.f_balance_amount = (self.row.f_balance_amount - 0) + (self.model.f_preamount - 0)
107
+ }
108
+ } else {
109
+ data.f_userinfo_id = {
110
+ f_userinfo_id: self.row.f_userinfo_id,
111
+ f_balance: (self.row.f_balance - 0) + (self.model.f_preamount - 0),
112
+ f_real_balance: (self.row.f_real_balance - 0) + (self.model.f_preamount - 0),
113
+ version: self.row.userinfo_version
114
+ }
115
+ }
116
+ } else if (self.row.f_meter_type === '机表') {
117
+ data.f_user_id.f_balance_amount = (self.row.f_balance_amount - 0) + (self.model.f_preamount - 0)
118
+ }
119
+
120
+ let cardId = self.row.f_card_id
121
+ if (self.row.f_tag && self.row.f_tag !== 'null') {
122
+ // 截取用户编号后四位
123
+ data.f_userfiles_id.f_card_id = cardId = self.row.f_tag + self.row.f_card_id
124
+ data.f_userfiles_id.f_tag = null
125
+ }
126
+
127
+ // 保存表类型
128
+ data.f_meter_type = self.row.f_meter_type
129
+ if(!(self.row.f_hascard==null) && !(self.row.f_share_times==null) && self.row.f_meter_type =='物联网表' && self.row.f_hascard == '是' && self.row.f_share_times == '是'){
130
+ data.f_times = self.row.f_times+1
131
+ }else{
132
+ data.f_times = self.row.cardInfo.Times + 1
133
+ }
134
+
135
+ let result = await self.$resetpost('rs/logic/sale_fillGas', data, {resolveMsg: null, rejectMsg: '补气报错!!!'})
136
+
137
+ if (self.row.f_meter_type == '机表') {
138
+ self.$showAlert('补气成功', 'success', 2000)
139
+ return result.data.id
140
+ } else {
141
+ try {
142
+ // 写卡操作
143
+ let cardParams = await self.$resetpost('rs/logic/stairCard', {data: {f_card_id: cardId + '', f_alias: self.row.f_alias, f_user_id: self.row.f_user_id}}, {resolveMsg: null, rejectMsg: '获取写卡参数失败'})
144
+
145
+ // 获取写卡参数
146
+ let params = self.getWriteCard(cardParams, self.row, data)
147
+ params.kh = cardId
148
+ params.kzt = getLastOper.data.ispick === '未过表' && getLastOper.data.lastsell_oper === '发卡售气' ? '0' : '1'
149
+ if(!(self.row.f_hascard==null) && !(self.row.f_share_times==null) && self.row.f_meter_type =='物联网表' && self.row.f_hascard == '是' && self.row.f_share_times == '是'){
150
+ params.cs = self.row.f_times+1
151
+ }
152
+ console.log('获取其他补气写卡参数,,', params)
153
+ if (data.f_add_gas === '不计入'){
154
+ params.totalmoney = (params.totalmoney-0) - (cardParams.data.otherFee-0)
155
+ }
156
+ let url = (getLastOper.data.last_oper === '补卡' || getLastOper.data.last_oper === '换表')
157
+ ? 'http://127.0.0.1:8003/WriteNewCard' : 'http://127.0.0.1:8003/WriteGasCard'
158
+
159
+ let cardRes = await self.$resetpost(url, params, {resolveMsg: null, rejectMsg: '补气卡服务错误'})
160
+
161
+ // 卡服务写卡异常,业务逻辑回滚
162
+ if (!cardParams || !result || cardRes.data.Err || cardRes.data.Exception) {
163
+ throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
164
+ } else {
165
+ await self.$CommonService.updatePassword(self.row, cardRes)
166
+ self.$showAlert('补气成功', 'success', 2000)
167
+ return result.data.id
168
+ }
169
+ } catch (error) {
170
+ self.$showAlert(error, 'danger', 0)
171
+ let rollback = {
172
+ id: result.data.id,
173
+ f_card_id: self.row.f_card_id
174
+ }
175
+ if (self.row.f_tag) {
176
+ rollback.f_tag = self.row.f_tag
177
+ }
178
+ await self.$resetpost('rs/logic/otherGasRollback', {data: rollback}, {rejectMsg: '其他补气回滚出错', resolveMsg: null})
179
+ }
180
+ }
181
+ }
182
+
183
+ let readyGen = async function (self) {
184
+ console.log('其他补气,,,', self.row)
185
+ await self.$getConfig(self, 'OtherGas')
186
+ console.log('其他补气config', self.config)
187
+ }
188
+
189
+ export default {
190
+ title: '其他补气',
191
+ data () {
192
+ return {
193
+ isGas: false,
194
+ config: {
195
+ hasPrint: false, // 默认打票
196
+ hasBillManage: false, // 默认不启用发票管理
197
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
198
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
199
+ payment: '现金缴费',
200
+ hasAcceptance: false // 是否需要打印受理单
201
+ },
202
+ acceptprint: false,
203
+ acceptUrl: '',
204
+ printData: {
205
+ reason: '',
206
+ fillgas: '',
207
+ fillamount: ''
208
+ },
209
+ model: {
210
+ f_pregas: 0,
211
+ f_preamount: 0,
212
+ f_reason: '',
213
+ f_add_gas: '不计入'
214
+ },
215
+
216
+ print: false,
217
+ billData: {
218
+ url: 'rs/report/card_bill',
219
+ billnumber: ''
220
+ }
221
+ }
222
+ },
223
+ props: ['row', 'cardData'],
224
+ ready () {
225
+ this.isGas = this.row.f_meter_type === '气量卡表' || this.row.f_collection_type == '按气量' || (this.row.f_calculation === '预付费' && this.row.f_billing === '按气量')
226
+ this.row.cardInfo = this.cardData
227
+ console.log('卡信息', this.row.cardInfo)
228
+ readyGen(this)
229
+ },
230
+ methods: {
231
+ accept () {
232
+ // 打印受理单
233
+ console.log('其他补气model', this.model)
234
+ console.log('其他补气受累单中row', this.row)
235
+ this.printData.reason = this.model.f_comments ? `'${this.model.f_reason}'` : '' + `'${this.model.f_reason}'`
236
+ this.printData.fillgas = `'${this.model.f_pregas}'`
237
+ this.printData.fillamount = `'${this.model.f_preamount}'`
238
+ console.log('受累单中printData', this.printData)
239
+ this.acceptUrl = 'rs/report/acceptOtherGas_bill'
240
+ this.acceptprint = true
241
+ },
242
+ closeAccept () {
243
+ this.acceptprint = false
244
+ },
245
+ confirm () {
246
+ otherGasGen(this).then((res) => {
247
+ this.$dispatch('success')
248
+ })
249
+ },
250
+ pregas () {
251
+ // 对气量进行验证
252
+ if ((this.row.f_topup_ceil - 0) > 0 && (this.model.f_pregas - 0) > (this.row.f_topup_ceil - 0)) {
253
+ this.$showAlert(`您输入的气量不能大于该表的充值上限: ${this.row.f_topup_ceil}`, 'warning', 5000)
254
+ this.model.f_pregas = null
255
+ }
256
+ },
257
+ getSell () {
258
+ return {
259
+ f_balance: this.row.f_balance,
260
+ f_curbalance: this.row.f_balance,
261
+ f_card_id: this.row.f_card_id,
262
+ f_comments: this.model.f_reason,
263
+ f_add_gas: this.model.f_add_gas[0],
264
+ f_type: '其他补气',
265
+ f_user_id: this.row.f_user_id,
266
+ f_userfiles_id: this.row.f_userfiles_id,
267
+ f_userinfo_id: this.row.f_userinfo_id,
268
+ f_user_name: this.row.f_user_name,
269
+ f_user_type: this.row.f_user_type,
270
+ f_gasproperties: this.row.f_gasproperties,
271
+ f_address: this.row.f_address,
272
+ f_meter_brand: this.row.f_meter_brand,
273
+
274
+ f_operat_type: '其他补气',
275
+ f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行其他补气操作`,
276
+ f_state: '有效',
277
+ f_operator: this.$login.f.name,
278
+ f_operatorid: this.$login.f.id,
279
+ f_orgid: this.$login.f.orgid,
280
+ f_orgname: this.$login.f.orgs,
281
+ f_depid: this.$login.f.depids,
282
+ f_depname: this.$login.f.deps,
283
+ f_zoneid: this.$login.f.zoneid,
284
+ f_zones: this.$login.f.zones
285
+ }
286
+ },
287
+ getWriteCard (cardParams, row, data) {
288
+ let params = {
289
+ factory: row.f_alias, // 气表厂家
290
+ kh: row.f_card_id, // 卡号
291
+ kmm: row.f_card_password, // 卡密码,写卡后返回新密码, 不论补卡还是先开户都没有密码
292
+ bjql: row.f_police_gas, // 报警气量,t_gasbrand表中
293
+ czsx: row.f_topup_ceil, // 充值上线,t_gasbrand表中
294
+ tzed: row.f_overdr_lines, // 透支额度,t_gasbrand表中
295
+ bkcs: row.f_fillcard_times, // 补卡次数,从补卡表里通过表编号获得
296
+ ql: data.f_pregas, // 预购气量
297
+ cs: row.cardInfo.Times + 1, // 求购气次数,先开户为1
298
+ iotTimes: row.f_iot_times, // 远传次数
299
+ money: data.f_preamount, // 购气金额
300
+ klx: row.f_coding,
301
+ kzt: '1',
302
+ dqdm: row.f_area_code,
303
+ meterid: row.f_meternumber ? row.f_meternumber : 0 // 表号
304
+ // meternumber: row.f_meternumber ? row.f_meternumber : 0
305
+ }
306
+ return Object.assign({}, this.$CommonService.writeCardParams(cardParams), params)
307
+ },
308
+ close () {
309
+ this.print = false
310
+ this.clean()
311
+ },
312
+ clean () {
313
+ this.$info('取消操作')
314
+ this.$dispatch('cancelclean', this.row)
315
+ },
316
+ printok () {
317
+ this.$dispatch('success')
318
+ }
319
+ },
320
+ computed: {
321
+ addGas () {
322
+ return [{label: '计入', value: '计入'}, {label: '不计入', value: '不计入'}]
323
+ }
324
+ }
325
+ }
326
+ </script>
327
+
328
+ <style>
329
+ </style>