sale-client 3.5.195 → 3.5.197

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.
@@ -10,25 +10,60 @@ const [local, server] = ['http://127.0.0.1:8080', 'http://192.168.50.4:8400']
10
10
  const port = 8089
11
11
 
12
12
  const proxyTable = {
13
- '/text': {
14
- target: local,
15
- // changeOrigin: true //https请求需要加
13
+ '/rs/file': {
14
+ target: server
16
15
  },
17
- '/files': {
18
- target: server,
19
- // changeOrigin: true
16
+ // 查找资源服务数据
17
+ '/rs/search': {
18
+ target: server
19
+ },
20
+ // 查找资源服务数据
21
+ '/rs/logic/getLogin': {
22
+ target: server
23
+ },
24
+ // 查找资源服务数据
25
+ '/rs/logic/getInitData': {
26
+ target: server
27
+ },
28
+ '/rs/logic/getSaleInitData': {
29
+ target: server
30
+ },
31
+ // 用户登录服务地址
32
+ '/rs/user': {
33
+ target: server
34
+ },
35
+ '/rs/path': {
36
+ target: server
37
+ },
38
+ '/rs/data': {
39
+ target: server
40
+ },
41
+ '/rs/license': {
42
+ target: server
43
+ },
44
+ '/rs/db': {
45
+ target: server
20
46
  },
21
47
  '/excel': {
22
- target: server,
23
- // changeOrigin: true
48
+ target: server
24
49
  },
25
- '/webmeter': {
26
- target: server,
27
- // changeOrigin: true
50
+ '/rs/config': {
51
+ target: server
52
+ },
53
+ '/rs/report': {
54
+ target: server
55
+ },
56
+ '/rs/vue': {
57
+ target: server
28
58
  },
29
59
  '/rs/logic': {
30
- target: server,
31
- // changeOrigin: true
60
+ target: local
61
+ },
62
+ '/rs/sql': {
63
+ target: local
64
+ },
65
+ '/webmeter': {
66
+ target: server
32
67
  },
33
68
  '/rs': {
34
69
  target: server,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.195",
3
+ "version": "3.5.197",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -44,7 +44,7 @@
44
44
 
45
45
  <div style="float: right">
46
46
  <button @click="search()" class="button_search" style="margin-right: 10px" v-el:cba>查询</button>
47
- <print-data :defaultfield="$parent.$parent.defaultfield" :field="$parent.$parent.fields" :is-selected="true" :model="$parent.$parent.printModel"
47
+ <print-data :defaultfield="$parent.$parent.defaultfield" :field="$parent.$parent.isIot?$parent.$parent.iotFields:$parent.$parent.fields" :is-selected="true" :model="$parent.$parent.printModel"
48
48
  @print-data="$parent.$parent.print()" print-name="购气流水"></print-data>
49
49
  </div>
50
50
  </div>
@@ -56,18 +56,18 @@
56
56
  <template partial='head'>
57
57
  <tr>
58
58
  <th><nobr>收费类型</nobr></th>
59
- <th><nobr>收费区间</nobr></th>
59
+ <th v-if="!$parent.$parent.$parent.isIot"><nobr>收费区间</nobr></th>
60
60
 
61
61
  <th><nobr>表号</nobr></th>
62
- <th><nobr>上期指数</nobr></th>
63
- <th><nobr>本期指数</nobr></th>
62
+ <th v-if="!$parent.$parent.$parent.isIot"><nobr>上期指数</nobr></th>
63
+ <th v-if="!$parent.$parent.$parent.isIot"><nobr>本期指数</nobr></th>
64
64
  <th><nobr>气价</nobr></th>
65
65
  <th><nobr>气量</nobr></th>
66
66
  <th><nobr>气费金额</nobr></th>
67
67
  <th><nobr>滞纳金</nobr></th>
68
68
  <th><nobr>减免金额</nobr></th>
69
69
  <th><nobr>上期结余</nobr></th>
70
- <th><nobr>应交金额</nobr></th>
70
+ <th><nobr v-if="!$parent.$parent.$parent.isIot">应交金额</nobr></th>
71
71
  <th><nobr>实收金额</nobr></th>
72
72
  <th><nobr>本期结余</nobr></th>
73
73
  <th><nobr>付款方式</nobr></th>
@@ -83,18 +83,18 @@
83
83
  <template partial='body' partial='list' v-ref:grid>
84
84
  <tr >
85
85
  <td style="text-align:center">{{row.type}}</td>
86
- <td style="text-align:center">{{row.f_hand_date}}</td>
86
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{row.f_hand_date}}</td>
87
87
 
88
88
  <td style="text-align:center">{{row.f_meternumber}}</td>
89
- <td style="text-align:center">{{row.f_last_tablebase}}</td>
90
- <td style="text-align:center">{{row.f_tablebase}}</td>
89
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{row.f_last_tablebase}}</td>
90
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{row.f_tablebase}}</td>
91
91
  <td style="text-align:center">{{row.f_price}}</td>
92
92
  <td style="text-align:center">{{row.f_pregas}}</td>
93
93
  <td style="text-align:center">{{row.f_preamount}}</td>
94
94
  <td style="text-align:center">{{row.f_delaypay}}</td>
95
95
  <td style="text-align:center">{{row.f_jianmian}}</td>
96
96
  <td style="text-align:center">{{row.f_balance}}</td>
97
- <td style="text-align:center">{{row.f_oughtfee}}</td>
97
+ <td style="text-align:center" v-if="!$parent.$parent.$parent.isIot">{{row.f_oughtfee}}</td>
98
98
  <td style="text-align:center">{{row.f_collection}}</td>
99
99
  <td style="text-align:center">{{row.f_curbalance}}</td>
100
100
  <td style="text-align:center">{{row.f_payment}}</td>
@@ -120,15 +120,15 @@
120
120
  style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">
121
121
  汇总信息
122
122
  </td>
123
- <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
124
- <!-- 气量合计:&emsp;{{model.sums.f_pregas}}-->
125
- <!-- </td>-->
126
- <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
127
- <!-- 金额合计:&emsp;{{model.sums.f_preamount}}-->
128
- <!-- </td>-->
129
- <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
130
- <!-- 应交合计:&emsp;{{model.sums.f_oughtfee}}-->
131
- <!-- </td>-->
123
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
124
+ <!-- 气量合计:&emsp;{{model.sums.f_pregas}}-->
125
+ <!-- </td>-->
126
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
127
+ <!-- 金额合计:&emsp;{{model.sums.f_preamount}}-->
128
+ <!-- </td>-->
129
+ <!-- <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">-->
130
+ <!-- 应交合计:&emsp;{{model.sums.f_oughtfee}}-->
131
+ <!-- </td>-->
132
132
  <td style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px">
133
133
  实收合计:&emsp;{{model.sums.f_collection}}
134
134
  </td>
@@ -142,7 +142,7 @@
142
142
  <script>
143
143
  import {HttpResetClass, PagedList} from 'vue-client'
144
144
  import co from 'co'
145
- let reprintGen = function * (self, row) {
145
+ let reprintGen = function * (self, row) {
146
146
  try {
147
147
  let reissueData = {}
148
148
  reissueData = Object.assign({}, reissueData, row)
@@ -173,12 +173,10 @@ let reprintGen = function * (self, row) {
173
173
  reissue_show: false,
174
174
  reissue_data: null,
175
175
  condition: '1=1',
176
- model: new PagedList(`${this.row.f_meter_type === '物联网表'?'rs/sql/sale_WebChargeQuery':'rs/sql/sale_ChargeQuery'}`, 20, {}, {
177
- f_preamount: 0,
178
- f_pregas: 0,
179
- f_oughtfee: 0,
176
+ model: new PagedList(`${this.row.f_meter_type === '物联网表' ? 'rs/sql/sale_WebChargeQuery' : 'rs/sql/sale_ChargeQuery'}`, 20, {f_user_id: this.row.f_user_id}, {
180
177
  f_collection: 0
181
178
  }),
179
+ isIot: this.row.f_meter_type === '物联网表',
182
180
  show: false,
183
181
  list: [],
184
182
  jiaofeistates: this.$appdata.getParam('缴费状态') ? [{
@@ -207,16 +205,22 @@ let reprintGen = function * (self, row) {
207
205
  'f_tablebase': '本期指数',
208
206
  'f_comments': '备注'
209
207
  },
208
+ iotFields: {
209
+ 'f_userinfo_code': '客户编号',
210
+ 'f_user_name': '客户姓名',
211
+ 'f_preamount': '购气金额',
212
+ 'f_pregas': '购气量',
213
+ 'f_operate_date': '缴费时间',
214
+ 'f_operator': '操作员',
215
+ 'f_comments': '备注'
216
+ },
210
217
  defaultfield: [
211
218
  'f_userinfo_code',
212
219
  'f_user_name',
213
220
  'f_preamount',
214
221
  'f_pregas',
215
- 'f_hand_date',
216
222
  'f_operate_date',
217
223
  'f_operator',
218
- 'f_last_tablebase',
219
- 'f_tablebase',
220
224
  'f_comments'
221
225
  ],
222
226
  printModel: {
@@ -227,6 +231,7 @@ let reprintGen = function * (self, row) {
227
231
  props: ['row'],
228
232
  ready () {
229
233
  this.$refs.paged.$refs.criteria.model.f_state = ['有效']
234
+ this.$refs.paged.$refs.criteria.model.f_user_id = this.row.f_user_id
230
235
  this.$refs.paged.$refs.criteria.search()
231
236
  },
232
237
  methods: {
@@ -235,9 +240,10 @@ let reprintGen = function * (self, row) {
235
240
  this.condition = `${this.$refs.paged.$refs.criteria.condition} and f_user_id = '${this.row.f_user_id}' and f_orgid = '${this.$login.f.orgid}'`
236
241
  this.model.search(this.condition, this.model)
237
242
  let http = new HttpResetClass()
238
- let res = await http.load('POST', `${this.row.f_meter_type === '物联网表'?'rs/sql/sale_WebChargeQuery':'rs/sql/sale_ChargeQuery'}`, {
243
+ let res = await http.load('POST', `${this.row.f_meter_type === '物联网表' ? 'rs/sql/sale_WebChargeQuery' : 'rs/sql/sale_ChargeQuery'}`, {
239
244
  data: {
240
- condition: this.condition
245
+ condition: this.condition,
246
+ f_user_id: this.row.f_user_id
241
247
  }
242
248
  }, {resolveMsg: null, rejectMsg: null})
243
249
  this.printModel.rows = res.data
@@ -175,6 +175,13 @@
175
175
  v-model="model.f_add_price" />
176
176
  </div>
177
177
  </div>
178
+ <div class="row" v-if="model.f_price_type === '固定气价'">
179
+ <div class="col-sm-6 form-group" >
180
+ <label class="font_normal_body">政府定价</label>
181
+ <input class="input_search" style="width:60%"
182
+ :value.sync="(model.detailprice[0].f_price-model.f_add_price).toFixed(2)" readonly="true" />
183
+ </div>
184
+ </div>
178
185
  <div class="row">
179
186
  <div class="col-sm-12 form-group" style="height: auto !important;">
180
187
  <label class="font_normal_body ">备&emsp;&emsp;注</label>
@@ -188,7 +195,7 @@
188
195
  <div class='auto' style="margin-top: 10px;">
189
196
 
190
197
  <mix-price :is-disable.sync='isEdit' :mixmodel.sync='model.detailprice' v-if="mixshow"></mix-price>
191
- <stair-price :is-disable.sync='isEdit' :isheat.sync="model.f_isheat" :stairmodel.sync='model.detailprice' style="height: 40%;"
198
+ <stair-price :is-disable.sync='isEdit' :isheat.sync="model.f_isheat" :f_add_price="model.f_add_price" :stairmodel.sync='model.detailprice' style="height: 40%;"
192
199
  v-if="stairshow"></stair-price>
193
200
  </div>
194
201
 
@@ -70,6 +70,8 @@
70
70
 
71
71
  </div>
72
72
  </form>
73
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
74
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' :data='data' @toggle="close" @printok="printok" v-ref:printbill></print-bill>
73
75
  <div style="text-align:right;">
74
76
  <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
75
77
  <button class="button_clear btn-gn" @click="clean()">取消</button>
@@ -102,6 +104,33 @@
102
104
  f_price: 0
103
105
  },
104
106
 
107
+ validateBill (val) {
108
+ this.validateOk = !val.isOk
109
+ this.billData.bill = val.bill
110
+ },
111
+ config: {
112
+ notShowFormula: false, // 不显示计算公式,默认显示
113
+ priceCalculation: false, // 划气量控制
114
+ showupload: true, // 默认显示附件上传组件
115
+ hasPrint: true, // 默认打票
116
+ floor: true, //是否取整收费
117
+ hasBillManage: true, // 默认不启用发票管理
118
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
119
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
120
+ payment: '现金缴费'
121
+ },
122
+ blodid: '',
123
+ hasValidateBill: false,
124
+ validateOk: false,
125
+ printModel: {},
126
+ print: false,
127
+ billUrl: '',
128
+ billData: {
129
+ url: 'rs/report/refund_sell',
130
+ operator: this.$login.f.name,
131
+ billnumber: '',
132
+ bill: ''
133
+ },
105
134
  blodid: ''
106
135
  }
107
136
  },
@@ -137,7 +166,17 @@
137
166
  }
138
167
  }
139
168
  console.log('退费传参', param)
140
- let res = await this.$resetpost('rs/logic/iotRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'})
169
+ let res = await this.$resetpost('rs/logic/iotRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'}).then((res) => {
170
+ if (this.config.hasBillManage) {
171
+ // 启用发票管理,获取票据管理中的票号并存储记录
172
+ this.data.id = res.data.id
173
+ this.data.f_bill_type = '退费'
174
+ this.print = true
175
+ } else {
176
+ this.data.id = res.data.id
177
+ this.print = true
178
+ }
179
+ })
141
180
  this.$dispatch('success')
142
181
  },
143
182
  async getQueryData () {
@@ -161,6 +200,19 @@
161
200
  refundChange () {
162
201
  this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
163
202
  },
203
+ close () {
204
+ this.print = false
205
+ this.clean()
206
+ },
207
+ printok () {
208
+ // 收据打完,判断是否还有其他票据进行请求
209
+ for (let i = 0; i < this.model.f_print.length; i++) {
210
+ if (this.model.f_print[i] === '电子发票') {
211
+ this.$CommonService.openEticket(this.row.id, '售气收费')
212
+ }
213
+ }
214
+ this.$dispatch('success')
215
+ },
164
216
  clean () {
165
217
  this.$dispatch('refresh')
166
218
  }
@@ -0,0 +1,84 @@
1
+ <template>
2
+ <div class="auto">
3
+ <table class="table table-condensed" style="margin-top:15px; margin-left:5%; width:90%;text-algin:center;">
4
+ <thead>
5
+ <tr>
6
+ <th style="text-align:center"><nobr>操作</nobr></th>
7
+ <th style="text-align:center"><nobr>阶梯数</nobr></th>
8
+ <th style="text-align:center"><nobr>气量</nobr></th>
9
+ <th style="text-align:center"><nobr>政府定价</nobr></th>
10
+ <th style="text-align:center"><nobr>单价</nobr></th>
11
+ <th style="text-align:center"><nobr>人口增量</nobr></th>
12
+ <th style="text-align:center" v-if="isheat == '1'"><nobr>采暖增量</nobr></th>
13
+ </tr>
14
+ </thead>
15
+ <tbody>
16
+ <tr v-for="row in stairmodel">
17
+ <td><nobr>
18
+ <button class="glyphicon glyphicon-minus btn-danger" @click.stop="delGas($index)"></button>&nbsp;&nbsp;&nbsp;
19
+ <button class="glyphicon glyphicon-plus btn-success" @click.stop="addGas()"></button>
20
+ </nobr></td>
21
+ <td v-if='!row.f_price_name'>{{$index+1}}</td>
22
+ <td v-if='row.f_price_name'>{{row.f_price_name}}</td>
23
+ <td style="text-align:center">
24
+ <input class="input_search" style="width: 100px" type="number" v-model="row.f_gas" :disabled="isDisable"
25
+ placeholder="气量">
26
+ </td>
27
+ <td style="text-align:center">
28
+ <input class="input_search" style="width: 100px" :value.sync="(row.f_price-this.f_add_price).toFixed(2)" readonly="true"
29
+ placeholder="政府定价">
30
+ </td>
31
+ <td style="text-align:center">
32
+ <input class="input_search" style="width: 100px" type="number" v-model="row.f_price" :disabled="isDisable"
33
+ placeholder="单价">
34
+ </td>
35
+ <td style="text-align:center">
36
+ <input class="input_search" style="width: 100px" type="number" v-model="row.f_add_gas" :disabled="isDisable"
37
+ placeholder="人口增量">
38
+ </td>
39
+ <td style="text-align:center" v-if="isheat == '1'">
40
+ <input class="input_search" style="width: 100px" type="number" v-model="row.f_add_gas_heat" :disabled="isDisable"
41
+ placeholder="采暖增量">
42
+ </td>
43
+ </tr>
44
+ </tbody>
45
+ </table>
46
+ </div>
47
+
48
+ </template>
49
+ <script>
50
+ /**
51
+ *阶梯气价管理组件
52
+ */
53
+ export default {
54
+ data () {
55
+ return {
56
+ }
57
+ },
58
+ props: ['stairmodel', 'isDisable', 'isheat','f_add_price'],
59
+ watch: {
60
+ 'stairmodel' (val) {
61
+ console.log('val----->',val)
62
+ },
63
+ },
64
+ ready:{
65
+
66
+ },
67
+ methods: {
68
+ addGas () {
69
+ this.stairmodel.push({
70
+ f_add_gas: 0,
71
+ f_add_gas_heat: 0
72
+ })
73
+ },
74
+ delGas (index) {
75
+ if (this.stairmodel.length > 1) {
76
+ this.stairmodel.splice(index, 1)
77
+ }
78
+ }
79
+ }
80
+ }
81
+ </script>
82
+ <style>
83
+ input { outline:none; }
84
+ </style>
@@ -62,6 +62,8 @@
62
62
 
63
63
  </div>
64
64
  </form>
65
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
66
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' :data='data' @toggle="close" @printok="printok" v-ref:printbill></print-bill>
65
67
  <div style="text-align:right;">
66
68
  <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
67
69
  <button class="button_clear btn-gn" @click="clean()">取消</button>
@@ -92,6 +94,21 @@
92
94
  f_price: 0
93
95
  },
94
96
 
97
+ validateBill (val) {
98
+ this.validateOk = !val.isOk
99
+ this.billData.bill = val.bill
100
+ },
101
+ config: {
102
+ notShowFormula: false, // 不显示计算公式,默认显示
103
+ priceCalculation: false, // 划气量控制
104
+ showupload: true, // 默认显示附件上传组件
105
+ hasPrint: true, // 默认打票
106
+ floor: true, //是否取整收费
107
+ hasBillManage: true, // 默认不启用发票管理
108
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
109
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
110
+ payment: '现金缴费'
111
+ },
95
112
  blodid: '',
96
113
  hasValidateBill: false,
97
114
  validateOk: false,
@@ -100,6 +117,8 @@
100
117
  billUrl: '',
101
118
  billData: {
102
119
  url: 'rs/report/refund_sell',
120
+ operator: this.$login.f.name,
121
+ billnumber: '',
103
122
  bill: ''
104
123
  }
105
124
  }
@@ -135,8 +154,21 @@
135
154
  }
136
155
  }
137
156
  console.log('退费传参', param)
138
- let res = await this.$resetpost('rs/logic/cardRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'})
139
- this.$dispatch('success')
157
+ let res = await this.$resetpost('rs/logic/cardRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'}).then((res) => {
158
+ if (this.config.hasPrint) {
159
+ if (this.config.hasBillManage) {
160
+ // 启用发票管理,获取票据管理中的票号并存储记录
161
+ this.data.id = res.data.id
162
+ this.data.f_bill_type = '退费'
163
+ this.print = true
164
+ } else {
165
+ this.data.id = res.data.id
166
+ this.print = true
167
+ }
168
+ } else {
169
+ this.$dispatch('success')
170
+ }
171
+ })
140
172
  },
141
173
  async getQueryData () {
142
174
  await this.$resetpost('rs/sql/cardRefundQuery', {
@@ -157,6 +189,19 @@
157
189
  refundChange () {
158
190
  this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
159
191
  },
192
+ close () {
193
+ this.print = false
194
+ this.clean()
195
+ },
196
+ printok () {
197
+ // 收据打完,判断是否还有其他票据进行请求
198
+ for (let i = 0; i < this.model.f_print.length; i++) {
199
+ if (this.model.f_print[i] === '电子发票') {
200
+ this.$CommonService.openEticket(this.row.id, '售气收费')
201
+ }
202
+ }
203
+ this.$dispatch('success')
204
+ },
160
205
  clean () {
161
206
  this.$dispatch('refresh')
162
207
  }
@@ -70,6 +70,8 @@
70
70
 
71
71
  </div>
72
72
  </form>
73
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
74
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' :data='data' @toggle="close" @printok="printok" v-ref:printbill></print-bill>
73
75
  <div style="text-align:right;">
74
76
  <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
75
77
  <button class="button_clear btn-gn" @click="clean()">取消</button>
@@ -102,6 +104,21 @@
102
104
  f_price: 0
103
105
  },
104
106
 
107
+ validateBill (val) {
108
+ this.validateOk = !val.isOk
109
+ this.billData.bill = val.bill
110
+ },
111
+ config: {
112
+ notShowFormula: false, // 不显示计算公式,默认显示
113
+ priceCalculation: false, // 划气量控制
114
+ showupload: true, // 默认显示附件上传组件
115
+ hasPrint: true, // 默认打票
116
+ floor: true, //是否取整收费
117
+ hasBillManage: true, // 默认不启用发票管理
118
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
119
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
120
+ payment: '现金缴费'
121
+ },
105
122
  blodid: '',
106
123
  hasValidateBill: false,
107
124
  validateOk: false,
@@ -110,6 +127,8 @@
110
127
  billUrl: '',
111
128
  billData: {
112
129
  url: 'rs/report/refund_sell',
130
+ operator: this.$login.f.name,
131
+ billnumber: '',
113
132
  bill: ''
114
133
  }
115
134
  }
@@ -145,7 +164,17 @@
145
164
  }
146
165
  }
147
166
  console.log('退费传参', param)
148
- let res = await this.$resetpost('rs/logic/machineRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'})
167
+ let res = await this.$resetpost('rs/logic/machineRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'}).then((res) => {
168
+ if (this.config.hasBillManage) {
169
+ // 启用发票管理,获取票据管理中的票号并存储记录
170
+ this.data.id = res.data.id
171
+ this.data.f_bill_type = '退费'
172
+ this.print = true
173
+ } else {
174
+ this.data.id = res.data.id
175
+ this.print = true
176
+ }
177
+ })
149
178
  this.$dispatch('success')
150
179
  },
151
180
  async getQueryData () {
@@ -166,6 +195,19 @@
166
195
  }
167
196
  })
168
197
  },
198
+ close () {
199
+ this.print = false
200
+ this.clean()
201
+ },
202
+ printok () {
203
+ // 收据打完,判断是否还有其他票据进行请求
204
+ for (let i = 0; i < this.model.f_print.length; i++) {
205
+ if (this.model.f_print[i] === '电子发票') {
206
+ this.$CommonService.openEticket(this.row.id, '售气收费')
207
+ }
208
+ }
209
+ this.$dispatch('success')
210
+ },
169
211
  refundChange () {
170
212
  this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
171
213
  },
@@ -2,6 +2,8 @@
2
2
  import Vue from "vue";
3
3
 
4
4
  let specialComp = {
5
+ // 阶梯气价
6
+ 'stair-price': (resolve) => { require(['./StairPrice'], resolve) },
5
7
  // 气价管理(新增)
6
8
  'gas-price': (resolve) => { require(['./GasPrice'], resolve) },
7
9
  // 退费管理