apply-clients 5.0.35-ezhou-25-10 → 5.0.35-ezhou-25-11

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.
@@ -1,48 +1,48 @@
1
- import Vue from 'vue'
2
- import { all } from 'vue-client'
3
- Vue.config.silent = true
4
- import ApplyGetSaleParam from './stores/ApplyGetSaleParams'
5
- import ApplyLoadParams from './stores/ApplyLoadParams'
6
- /** ****************服务插件*********************/
7
-
8
- export default function () {
9
- Vue.use(ApplyGetSaleParam)
10
- Vue.use(ApplyLoadParams)
11
- /** ***************************报建模块*********************************/
12
- // 报建 总入口
13
- Vue.component('apply_app', (resolve) => { require(['./components/app_apply/ApplyApp'], resolve) })
14
- // 报建 总入口
15
- Vue.component('one-to-many', (resolve) => { require(['./components/app_apply/OneToMany'], resolve) })
16
- // 报建 待办流程页
17
- Vue.component('placecontrolerapp', (resolve) => { require(['./components/app_apply/PlaceControler'], resolve) })
18
- // 报建 已办事项
19
- Vue.component('applydownlist', (resolve) => { require(['./components/app_apply/ApplyDownList'], resolve) })
20
- // 报建 上传
21
- Vue.component('applylistupload', (resolve) => { require(['./components/app_apply/ApplyListUpload'], resolve) })
22
- // 报建 待办事项
23
- Vue.component('applytodolist', (resolve) => { require(['./components/app_apply/ApplyToDoList'], resolve) })
24
- // 报建 用户信息
25
- Vue.component('apply-user-info', (resolve) => { require(['./components/app_apply/ApplyUserInfo'], resolve) })
26
- // 报建 报建流程信息
27
- Vue.component('apply-info', (resolve) => { require(['./components/app_apply/ApplyInfo'], resolve) })
28
- // 报建 现场勘探
29
- Vue.component('fieldexploration', (resolve) => { require(['./components/app_apply/FieldExploration'], resolve) })
30
- // 报建 竣工验收
31
- Vue.component('acceptance', (resolve) => { require(['./components/app_apply/Acceptance'], resolve) })
32
- // 报建 通气点火
33
- Vue.component('ventilation', (resolve) => { require(['./components/app_apply/Ventilation'], resolve) })
34
-
35
- Vue.component('back-page', (resolve) => { require(['./components/app_apply/ToolsPage.vue'], resolve) })
36
-
37
- // 业务tab(control层)页
38
- Vue.component('service-control-app', (resolve) => { require(['./components/app_apply/ServiceControl'], resolve) })
39
- // 公共业务显示(view层)页
40
- Vue.component('service-view-app', (resolve) => { require(['./components/app_apply/ezhou/ServiceView'], resolve) })
41
- Vue.component('minyong', (resolve) => { require(['./components/app_apply/ezhou/MinYong'], resolve) })
42
- Vue.component('feiminyongv', (resolve) => { require(['./components/app_apply/ezhou/FeiMinYongV'], resolve) })
43
- Vue.component('feiminyongvv', (resolve) => { require(['./components/app_apply/ezhou/FeiMinYongVV'], resolve) })
44
- // Vue.component('hetong-minyong', (resolve) => { require(['./components/app_apply/ezhou/HeTongMinYong'], resolve) })
45
- // Vue.component('hetong-feiminyongv', (resolve) => { require(['./components/app_apply/ezhou/HeTongFeiMinYongV'], resolve) })
46
- // 工程 待办事项
47
- Vue.component('gongcheng', (resolve) => { require(['./components/app_apply/Gongcheng'], resolve) })
48
- }
1
+ import Vue from 'vue'
2
+ import { all } from 'vue-client'
3
+ Vue.config.silent = true
4
+ import ApplyGetSaleParam from './stores/ApplyGetSaleParams'
5
+ import ApplyLoadParams from './stores/ApplyLoadParams'
6
+ /** ****************服务插件*********************/
7
+
8
+ export default function () {
9
+ Vue.use(ApplyGetSaleParam)
10
+ Vue.use(ApplyLoadParams)
11
+ /** ***************************报建模块*********************************/
12
+ // 报建 总入口
13
+ Vue.component('apply_app', (resolve) => { require(['./components/app_apply/ApplyApp'], resolve) })
14
+ // 报建 总入口
15
+ Vue.component('one-to-many', (resolve) => { require(['./components/app_apply/OneToMany'], resolve) })
16
+ // 报建 待办流程页
17
+ Vue.component('placecontrolerapp', (resolve) => { require(['./components/app_apply/PlaceControler'], resolve) })
18
+ // 报建 已办事项
19
+ Vue.component('applydownlist', (resolve) => { require(['./components/app_apply/ApplyDownList'], resolve) })
20
+ // 报建 上传
21
+ Vue.component('applylistupload', (resolve) => { require(['./components/app_apply/ApplyListUpload'], resolve) })
22
+ // 报建 待办事项
23
+ Vue.component('applytodolist', (resolve) => { require(['./components/app_apply/ApplyToDoList'], resolve) })
24
+ // 报建 用户信息
25
+ Vue.component('apply-user-info', (resolve) => { require(['./components/app_apply/ApplyUserInfo'], resolve) })
26
+ // 报建 报建流程信息
27
+ Vue.component('apply-info', (resolve) => { require(['./components/app_apply/ApplyInfo'], resolve) })
28
+ // 报建 现场勘探
29
+ Vue.component('fieldexploration', (resolve) => { require(['./components/app_apply/FieldExploration'], resolve) })
30
+ // 报建 竣工验收
31
+ Vue.component('acceptance', (resolve) => { require(['./components/app_apply/Acceptance'], resolve) })
32
+ // 报建 通气点火
33
+ Vue.component('ventilation', (resolve) => { require(['./components/app_apply/Ventilation'], resolve) })
34
+
35
+ Vue.component('back-page', (resolve) => { require(['./components/app_apply/ToolsPage.vue'], resolve) })
36
+
37
+ // 业务tab(control层)页
38
+ Vue.component('service-control-app', (resolve) => { require(['./components/app_apply/ServiceControl'], resolve) })
39
+ // 公共业务显示(view层)页
40
+ Vue.component('service-view-app', (resolve) => { require(['./components/app_apply/ezhou/ServiceView'], resolve) })
41
+ Vue.component('minyong', (resolve) => { require(['./components/app_apply/ezhou/MinYong'], resolve) })
42
+ Vue.component('feiminyongv', (resolve) => { require(['./components/app_apply/ezhou/FeiMinYongV'], resolve) })
43
+ Vue.component('feiminyongvv', (resolve) => { require(['./components/app_apply/ezhou/FeiMinYongVV'], resolve) })
44
+ // Vue.component('hetong-minyong', (resolve) => { require(['./components/app_apply/ezhou/HeTongMinYong'], resolve) })
45
+ // Vue.component('hetong-feiminyongv', (resolve) => { require(['./components/app_apply/ezhou/HeTongFeiMinYongV'], resolve) })
46
+ // 工程 待办事项
47
+ Vue.component('gongcheng', (resolve) => { require(['./components/app_apply/Gongcheng'], resolve) })
48
+ }
@@ -1,233 +1,241 @@
1
- import Vue from 'vue'
2
-
3
- let openEticketGen = async function (param, type, conf) {
4
- // 组织数据
5
- let getEticket = await Vue.resetpost('rs/logic/bjcombineData', {param: param, charge_type: type, eticket: conf}, {resolveMsg: null, rejectMsg: '获取电子票数据出错'})
6
- console.log('获取的电子票数据', getEticket)
7
- try{
8
- let url= await Vue.resetpost('rs/logic/bjopenEticket', {sell_id: param.id,eticket_id:getEticket.data.eticket_id,conf:conf},{resolveMsg: null, rejectMsg: null})
9
- return url
10
- }catch (e) {
11
- Vue.showAlert(`电子发票开票失败,请在发票管理处重新开具`,'warning',3000)
12
- }}
13
-
14
- let correctEticketGen = async function (id, type, conf) {
15
- let param = {
16
- id: id,
17
- type: type,
18
- eticket: conf
19
- }
20
- let requestUrl = ''
21
- if (type === '机表抄表') {
22
- requestUrl = 'rs/logic/correctHandEticket'
23
- } else {
24
- requestUrl = 'rs/logic/correctEticket'
25
- }
26
-
27
- await Vue.resetpost(requestUrl, param, {resolveMsg: '冲红成功', rejectMsg: '冲红失败'})
28
- }
29
-
30
- let commonService = {
31
- install (Vue, options) {
32
- // 给vue增添对话框显示方法
33
- Vue.commonService = Vue.prototype.$commonService = commonService
34
- },
35
-
36
-
37
- gasCalculate (model, pregas) {
38
- return Vue.resetpost('rs/logic/CommonCal', {data: {model: model, isGasValue: 0, value: pregas}}, {resolveMsg: null, rejectMsg: '获取金额失败'})
39
- },
40
-
41
- feeCalculate (model, preamount) {
42
- return Vue.resetpost('rs/logic/commonCal', {data: {model: model, isGasValue: 1, value: preamount}}, {resolveMsg: null, rejectMsg: '获取气量失败'})
43
- },
44
-
45
- async saveLiquidation(data) {
46
- let param = {
47
- endDate:data.endDate,
48
- startDate:data.startDate,
49
- f_user_name: data.f_user_name,
50
- f_bill_id: data.f_bill_id,
51
- f_bill_number: data.f_bill_number,
52
- f_bill_type: data.f_bill_type,
53
- f_userinfo_id: data.f_userinfo_id,
54
- f_user_id: data.f_user_id,
55
- f_operator: data.f_operator,
56
- f_hand_month: data.f_hand_month,
57
- f_paid_money: data.f_paid_money,
58
- f_filiale : data.f_filiale,
59
- f_outlets: data.f_outlets,
60
- f_orgstr: data.f_orgstr,
61
- f_filialeids: data.f_filialeids,
62
- f_gas : data.f_gas
63
- }
64
- return await Vue.resetpost('rs/logic/saveLiquidation', {data: param}, {resolveMsg: null, rejectMsg: '开具发票失败,请重试或联系管理员'})
65
- },
66
- async operateLiquidation(data) {
67
- let param = {
68
- id :data.id,
69
- type : data.type
70
- }
71
- return await Vue.resetpost('rs/logic/operateLiquidation', {data: param}, {resolveMsg: null, rejectMsg: ''})
72
- },
73
-
74
- async openPaperBill(sellId, chargeType, useType, usingBill, billType,f_operator,f_filiale,f_outlets,f_orgstr,f_filialeids) {
75
- console.log("进入commonService")
76
- console.log(sellId, chargeType, useType, usingBill, billType,f_operator,f_filiale,f_outlets,f_orgstr,f_filialeids)
77
- let param = {
78
- f_charge_id: sellId,
79
- f_charge_type: '报建收费',
80
- f_use_type: useType,
81
- f_using_bill: usingBill,
82
- f_bill_type: billType,
83
- f_operator:f_operator,
84
- f_outlets:f_outlets,
85
- f_filiale:f_filiale,
86
- f_orgstr:f_orgstr,
87
- f_filialeids:f_filialeids
88
- // f_filialeid: this.$login.f.f_orgids.split('.')[this.$login.f.f_orgids.split('.').length - 2] + '.'
89
- }
90
- console.log("进入commonService,看看参数")
91
- console.log(param)
92
- await Vue.resetpost('rs/logic/apply_sale_openBill', {data: param}, {resolveMsg: null, rejectMsg: '更新发票号失败,请从右侧操作卡片进行补打!!'})
93
- },
94
-
95
- async correctPaperBill(sellId, chargeType, useType, usingBill, correctType) {
96
- let param = {
97
- f_charge_id: sellId,
98
- f_charge_type: chargeType,
99
- f_use_type: useType,
100
- f_using_bill: usingBill,
101
- f_bill_correct_type: correctType
102
- }
103
- await Vue.resetpost('rs/logic/sale_correctBill', {data: param}, {resolveMsg: null, rejectMsg: '更新发票号失败,请从右侧操作卡片进行补打!!'})
104
- },
105
-
106
- async reissuePaperBill(sellId, chargeType, model, useType) {
107
- let param = {
108
- f_charge_id: sellId,
109
- f_charge_type: chargeType,
110
- model: model,
111
- f_use_type: useType
112
- }
113
- await Vue.resetpost('rs/logic/sale_reissueBill', {data: param}, {resolveMsg: null, rejectMsg: '更新发票号失败,请从右侧操作卡片进行补打!!'})
114
- },
115
-
116
- async openEticket (param, chargeType) {
117
- // 获取各分公司下的电子票配置文件
118
- // 从vues目录下获取电子票配置
119
- try {
120
- let conf = await commonService.getSelfConfig()
121
- console.log('看看配置文件', conf)
122
- let tecket =await openEticketGen(param, chargeType, conf)
123
- return tecket
124
- } catch (error) {
125
- console.log('电子发票开票失败', JSON.stringify(error))
126
- Vue.showAlert(`电子发票开票失败!!请到发票管理重新开票。错误原因: ${JSON.stringify(error)}。`, 'danger', 0)
127
- }
128
-
129
- },
130
-
131
- async correctEticket (sellId, chargeType) {
132
- try {
133
- let conf = await commonService.getSelfConfig()
134
- console.log('看看配置文件', conf)
135
- await correctEticketGen(sellId, chargeType, conf)
136
- } catch (error) {
137
- console.log('电子发票冲正失败', JSON.stringify(error))
138
- Vue.showAlert(`电子发票冲正失败!!请到发票管理重新开票。错误原因: ${JSON.stringify(error)}。`, 'danger', 0)
139
- }
140
- },
141
-
142
- async getSelfConfig () {
143
- let res = await Vue.resetget('/rs/vue/Eticket.json',{resolveMsg: null, rejectMsg: '获取电子票配置出错'})
144
- console.log('获取各分公司下的电子票配置文件', res)
145
- let config = res.data[Vue.$login.f.f_orgids]
146
- if (config.isOne) {
147
- return config.info
148
- } else {
149
- // 返回操作人上一级的配置 key为f_orgstr(到操作人)串的前一个即网点
150
- return config[commonService.getOutlets()]
151
- }
152
- },
153
- getOutlets () {
154
- let result = ''
155
- let operator = Vue.$login.f.orgpathstr
156
- let tempArr = operator.split('.').splice(0, operator.split('.').length-2)
157
- for(let str of tempArr) {
158
- result += str + '.'
159
- }
160
- return result
161
- },
162
-
163
- buildSellinggas (model, row) {
164
- return {
165
- f_balance: row.f_meter_type === '机表' ? row.f_real_balance : row.f_balance,
166
- f_curbalance: row.f_meter_type === '机表' ? (row.f_real_balance - 0) + (model.f_collection - 0) : model.f_curbalance,
167
- f_user_balance: row.f_meter_type === '机表' ? row.f_balance : model.f_curbalance,
168
- f_meter_type: row.f_meter_type,
169
- f_payment: model.f_payment,
170
- f_user_id: model.f_user_id,
171
- // f_userinfo_id: row.f_userinfo_id,
172
- f_user_name: row.f_user_name,
173
- f_user_type: row.f_user_type,
174
- f_gasproperties: row.f_gasproperties,
175
- f_address: row.f_address,
176
- f_meter_brand: row.f_meter_brand,
177
- f_meter_style: row.f_meter_style,
178
- f_meternumber: row.f_meternumber,
179
- f_price_id: row.f_price_id,
180
- f_collection: model.f_collection,
181
- f_operator: Vue.$login.f.name,
182
- f_filiale: Vue.$login.f.f_fengongsi,
183
- f_outlets: Vue.$login.f.f_parentname,
184
- f_orgstr: Vue.$login.f.orgpathstr,
185
- f_filialeids: Vue.$login.f.f_orgids,
186
- f_charge_state: '有效'
187
- }
188
- },
189
- writeCardParams (cardParams) {
190
- console.log('common写卡参数,,,', cardParams)
191
- let result = {
192
- csql: cardParams.data.sc,
193
- lastmoney: cardParams.data.scje,
194
- ccsql: cardParams.data.ssc,
195
- lastlastmoney: cardParams.data.sscje,
196
- ljgql: cardParams.data.f_pregas,
197
- ljyql: cardParams.data.f_pregasall,
198
- yhh: cardParams.data.f_meterid,
199
- sxrq: cardParams.data.f_perform_date,
200
- totalmoney: cardParams.data.f_collection,
201
- stairversion: cardParams.data.f_stairversion
202
- }
203
-
204
- // 对阶梯进行处理
205
- if (cardParams.data.stairprice.includes(';') && cardParams.data.stairamount.includes(';')) {
206
- let gases = cardParams.data.stairamount.split(';')
207
- let prices = cardParams.data.stairprice.split(';')
208
- if (gases.length >= 2) {
209
- result.stairgas1 = gases[0] !== '' ? gases[0] : 0
210
- result.stairgas2 = gases[1] !== '' ? gases[1] : 0
211
- result.stairgas3 = '99999999'
212
- }
213
- if (prices.length >= 2) {
214
- result.stairprice1 = prices[0] !== '' ? prices[0] : 0
215
- result.stairprice2 = prices[1] !== '' ? prices[1] : 0
216
- result.stairprice3 = prices[2] !== '' ? prices[2] : 0
217
- }
218
- } else {
219
- // 从固定气价的表换金额表的时候,气量随便写,金额用之前的固定单价
220
- result.stairgas1 = '77777777'
221
- result.stairgas2 = '88888888'
222
- result.stairgas3 = '99999999'
223
-
224
- result.stairprice1 = cardParams.data.stairprice
225
- result.stairprice2 = cardParams.data.stairprice
226
- result.stairprice3 = cardParams.data.stairprice
227
- }
228
-
229
- return result
230
- }
231
- }
232
-
233
- export default commonService
1
+ import Vue from 'vue'
2
+
3
+ let openEticketGen = async function (param, type, conf) {
4
+ // 组织数据
5
+ let getEticket = await Vue.resetpost('rs/logic/bjcombineData', {param: param, charge_type: type, eticket: conf}, {resolveMsg: null, rejectMsg: '获取电子票数据出错'})
6
+ console.log('获取的电子票数据', getEticket)
7
+ try{
8
+ const openEticketParams = {
9
+ url: '/invoice/rs/logic/getFapiao',
10
+ params: {
11
+ eticket_id: `${getEticket.data.eticket_id}`,
12
+ USERNAME: ''
13
+ }
14
+ }
15
+ const res = await Vue.resetpost('rs/logic/callInvoicing', openEticketParams, {resolveMsg: null, rejectMsg: null})
16
+ this.$showAlert(res.data.RETURNMESSAGE || res.data.msg || '开票失败!', res.data.CODE === '0000' ? 'success' : 'danger', 3000)
17
+ return res
18
+ }catch (e) {
19
+ Vue.showAlert(`电子发票开票失败,请在发票管理处重新开具`,'warning',3000)
20
+ }}
21
+
22
+ let correctEticketGen = async function (id, type, conf) {
23
+ let param = {
24
+ id: id,
25
+ type: type,
26
+ eticket: conf
27
+ }
28
+ let requestUrl = ''
29
+ if (type === '机表抄表') {
30
+ requestUrl = 'rs/logic/correctHandEticket'
31
+ } else {
32
+ requestUrl = 'rs/logic/correctEticket'
33
+ }
34
+
35
+ await Vue.resetpost(requestUrl, param, {resolveMsg: '冲红成功', rejectMsg: '冲红失败'})
36
+ }
37
+
38
+ let commonService = {
39
+ install (Vue, options) {
40
+ // 给vue增添对话框显示方法
41
+ Vue.commonService = Vue.prototype.$commonService = commonService
42
+ },
43
+
44
+
45
+ gasCalculate (model, pregas) {
46
+ return Vue.resetpost('rs/logic/CommonCal', {data: {model: model, isGasValue: 0, value: pregas}}, {resolveMsg: null, rejectMsg: '获取金额失败'})
47
+ },
48
+
49
+ feeCalculate (model, preamount) {
50
+ return Vue.resetpost('rs/logic/commonCal', {data: {model: model, isGasValue: 1, value: preamount}}, {resolveMsg: null, rejectMsg: '获取气量失败'})
51
+ },
52
+
53
+ async saveLiquidation(data) {
54
+ let param = {
55
+ endDate:data.endDate,
56
+ startDate:data.startDate,
57
+ f_user_name: data.f_user_name,
58
+ f_bill_id: data.f_bill_id,
59
+ f_bill_number: data.f_bill_number,
60
+ f_bill_type: data.f_bill_type,
61
+ f_userinfo_id: data.f_userinfo_id,
62
+ f_user_id: data.f_user_id,
63
+ f_operator: data.f_operator,
64
+ f_hand_month: data.f_hand_month,
65
+ f_paid_money: data.f_paid_money,
66
+ f_filiale : data.f_filiale,
67
+ f_outlets: data.f_outlets,
68
+ f_orgstr: data.f_orgstr,
69
+ f_filialeids: data.f_filialeids,
70
+ f_gas : data.f_gas
71
+ }
72
+ return await Vue.resetpost('rs/logic/saveLiquidation', {data: param}, {resolveMsg: null, rejectMsg: '开具发票失败,请重试或联系管理员'})
73
+ },
74
+ async operateLiquidation(data) {
75
+ let param = {
76
+ id :data.id,
77
+ type : data.type
78
+ }
79
+ return await Vue.resetpost('rs/logic/operateLiquidation', {data: param}, {resolveMsg: null, rejectMsg: ''})
80
+ },
81
+
82
+ async openPaperBill(sellId, chargeType, useType, usingBill, billType,f_operator,f_filiale,f_outlets,f_orgstr,f_filialeids) {
83
+ console.log("进入commonService")
84
+ console.log(sellId, chargeType, useType, usingBill, billType,f_operator,f_filiale,f_outlets,f_orgstr,f_filialeids)
85
+ let param = {
86
+ f_charge_id: sellId,
87
+ f_charge_type: '报建收费',
88
+ f_use_type: useType,
89
+ f_using_bill: usingBill,
90
+ f_bill_type: billType,
91
+ f_operator:f_operator,
92
+ f_outlets:f_outlets,
93
+ f_filiale:f_filiale,
94
+ f_orgstr:f_orgstr,
95
+ f_filialeids:f_filialeids
96
+ // f_filialeid: this.$login.f.f_orgids.split('.')[this.$login.f.f_orgids.split('.').length - 2] + '.'
97
+ }
98
+ console.log("进入commonService,看看参数")
99
+ console.log(param)
100
+ await Vue.resetpost('rs/logic/apply_sale_openBill', {data: param}, {resolveMsg: null, rejectMsg: '更新发票号失败,请从右侧操作卡片进行补打!!'})
101
+ },
102
+
103
+ async correctPaperBill(sellId, chargeType, useType, usingBill, correctType) {
104
+ let param = {
105
+ f_charge_id: sellId,
106
+ f_charge_type: chargeType,
107
+ f_use_type: useType,
108
+ f_using_bill: usingBill,
109
+ f_bill_correct_type: correctType
110
+ }
111
+ await Vue.resetpost('rs/logic/sale_correctBill', {data: param}, {resolveMsg: null, rejectMsg: '更新发票号失败,请从右侧操作卡片进行补打!!'})
112
+ },
113
+
114
+ async reissuePaperBill(sellId, chargeType, model, useType) {
115
+ let param = {
116
+ f_charge_id: sellId,
117
+ f_charge_type: chargeType,
118
+ model: model,
119
+ f_use_type: useType
120
+ }
121
+ await Vue.resetpost('rs/logic/sale_reissueBill', {data: param}, {resolveMsg: null, rejectMsg: '更新发票号失败,请从右侧操作卡片进行补打!!'})
122
+ },
123
+
124
+ async openEticket (param, chargeType) {
125
+ // 获取各分公司下的电子票配置文件
126
+ // 从vues目录下获取电子票配置
127
+ try {
128
+ let conf = await commonService.getSelfConfig()
129
+ console.log('看看配置文件', conf)
130
+ let tecket =await openEticketGen(param, chargeType, conf)
131
+ return tecket
132
+ } catch (error) {
133
+ console.log('电子发票开票失败', JSON.stringify(error))
134
+ Vue.showAlert(`电子发票开票失败!!请到发票管理重新开票。错误原因: ${JSON.stringify(error)}。`, 'danger', 0)
135
+ }
136
+
137
+ },
138
+
139
+ async correctEticket (sellId, chargeType) {
140
+ try {
141
+ let conf = await commonService.getSelfConfig()
142
+ console.log('看看配置文件', conf)
143
+ await correctEticketGen(sellId, chargeType, conf)
144
+ } catch (error) {
145
+ console.log('电子发票冲正失败', JSON.stringify(error))
146
+ Vue.showAlert(`电子发票冲正失败!!请到发票管理重新开票。错误原因: ${JSON.stringify(error)}。`, 'danger', 0)
147
+ }
148
+ },
149
+
150
+ async getSelfConfig () {
151
+ let res = await Vue.resetget('/rs/vue/Eticket.json',{resolveMsg: null, rejectMsg: '获取电子票配置出错'})
152
+ console.log('获取各分公司下的电子票配置文件', res)
153
+ let config = res.data[Vue.$login.f.f_orgids]
154
+ if (config.isOne) {
155
+ return config.info
156
+ } else {
157
+ // 返回操作人上一级的配置 key为f_orgstr(到操作人)串的前一个即网点
158
+ return config[commonService.getOutlets()]
159
+ }
160
+ },
161
+ getOutlets () {
162
+ let result = ''
163
+ let operator = Vue.$login.f.orgpathstr
164
+ let tempArr = operator.split('.').splice(0, operator.split('.').length-2)
165
+ for(let str of tempArr) {
166
+ result += str + '.'
167
+ }
168
+ return result
169
+ },
170
+
171
+ buildSellinggas (model, row) {
172
+ return {
173
+ f_balance: row.f_meter_type === '机表' ? row.f_real_balance : row.f_balance,
174
+ f_curbalance: row.f_meter_type === '机表' ? (row.f_real_balance - 0) + (model.f_collection - 0) : model.f_curbalance,
175
+ f_user_balance: row.f_meter_type === '机表' ? row.f_balance : model.f_curbalance,
176
+ f_meter_type: row.f_meter_type,
177
+ f_payment: model.f_payment,
178
+ f_user_id: model.f_user_id,
179
+ // f_userinfo_id: row.f_userinfo_id,
180
+ f_user_name: row.f_user_name,
181
+ f_user_type: row.f_user_type,
182
+ f_gasproperties: row.f_gasproperties,
183
+ f_address: row.f_address,
184
+ f_meter_brand: row.f_meter_brand,
185
+ f_meter_style: row.f_meter_style,
186
+ f_meternumber: row.f_meternumber,
187
+ f_price_id: row.f_price_id,
188
+ f_collection: model.f_collection,
189
+ f_operator: Vue.$login.f.name,
190
+ f_filiale: Vue.$login.f.f_fengongsi,
191
+ f_outlets: Vue.$login.f.f_parentname,
192
+ f_orgstr: Vue.$login.f.orgpathstr,
193
+ f_filialeids: Vue.$login.f.f_orgids,
194
+ f_charge_state: '有效'
195
+ }
196
+ },
197
+ writeCardParams (cardParams) {
198
+ console.log('common写卡参数,,,', cardParams)
199
+ let result = {
200
+ csql: cardParams.data.sc,
201
+ lastmoney: cardParams.data.scje,
202
+ ccsql: cardParams.data.ssc,
203
+ lastlastmoney: cardParams.data.sscje,
204
+ ljgql: cardParams.data.f_pregas,
205
+ ljyql: cardParams.data.f_pregasall,
206
+ yhh: cardParams.data.f_meterid,
207
+ sxrq: cardParams.data.f_perform_date,
208
+ totalmoney: cardParams.data.f_collection,
209
+ stairversion: cardParams.data.f_stairversion
210
+ }
211
+
212
+ // 对阶梯进行处理
213
+ if (cardParams.data.stairprice.includes(';') && cardParams.data.stairamount.includes(';')) {
214
+ let gases = cardParams.data.stairamount.split(';')
215
+ let prices = cardParams.data.stairprice.split(';')
216
+ if (gases.length >= 2) {
217
+ result.stairgas1 = gases[0] !== '' ? gases[0] : 0
218
+ result.stairgas2 = gases[1] !== '' ? gases[1] : 0
219
+ result.stairgas3 = '99999999'
220
+ }
221
+ if (prices.length >= 2) {
222
+ result.stairprice1 = prices[0] !== '' ? prices[0] : 0
223
+ result.stairprice2 = prices[1] !== '' ? prices[1] : 0
224
+ result.stairprice3 = prices[2] !== '' ? prices[2] : 0
225
+ }
226
+ } else {
227
+ // 从固定气价的表换金额表的时候,气量随便写,金额用之前的固定单价
228
+ result.stairgas1 = '77777777'
229
+ result.stairgas2 = '88888888'
230
+ result.stairgas3 = '99999999'
231
+
232
+ result.stairprice1 = cardParams.data.stairprice
233
+ result.stairprice2 = cardParams.data.stairprice
234
+ result.stairprice3 = cardParams.data.stairprice
235
+ }
236
+
237
+ return result
238
+ }
239
+ }
240
+
241
+ export default commonService