sale-client 3.6.489 → 3.6.491

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.489",
3
+ "version": "3.6.491",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -8,7 +8,7 @@
8
8
  <button class="button_search" v-show="!warninginfo.data.state.info" @click="operational('files_complete')" style="width: max-content;">完善信息</button>
9
9
  <button class="button_search" v-show="warninginfo.data.state.blacklist&&!warninginfo.data.state.dibao" @click="operational('basic-living')" style="width: max-content;">低保续保</button>
10
10
  <button class="button_search" v-show="warninginfo.data.state.blacklist&&!warninginfo.data.state.dibao && warninginfo.data.state.dibaoend" @click="operational('stop-basic-living')" style="width: max-content;">停止续保</button>
11
- <button class="button_search" v-show="!(!warninginfo.data.state.dibao&&warninginfo.data.state.dibaoend) && warninginfo.data.canCharge" @click="success()">确认</button>
11
+ <button class="button_search" v-show="!(!warninginfo.data.state.dibao&&warninginfo.data.state.dibaoend)" @click="success()">确认</button>
12
12
  </span>
13
13
  </div>
14
14
  <p>{{authorityInformation}}</p>
@@ -472,9 +472,13 @@
472
472
  self.hasLimit = getLimit.data.hasLimit
473
473
  if (self.hasLimit) {
474
474
  if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
475
- if (getLimit.data.f_limit_value < 0 && getLimit.data.f_limit_amount < 0) {
475
+ if (getLimit.data.f_limit_value < 0 || getLimit.data.f_limit_amount < 0) {
476
+ self.maxmoney = 0
477
+ self.limitmoney = true
478
+ console.log(self.maxmoney, self.limitmoney)
476
479
  self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
477
- self.$dispatch('refresh')
480
+
481
+ // self.$dispatch('refresh')
478
482
  } else {
479
483
  if (getLimit.data.f_limit_value) {
480
484
  self.maxgas = (getLimit.data.f_limit_value - 0)
@@ -429,8 +429,12 @@
429
429
  if (self.hasLimit) {
430
430
  if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
431
431
  if (getLimit.data.f_limit_value < 0 || getLimit.data.f_limit_amount < 0) {
432
+ self.maxmoney = 0
433
+ self.limitmoney = true
434
+ console.log(self.maxmoney, self.limitmoney)
432
435
  self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
433
- self.$dispatch('refresh')
436
+
437
+ // self.$dispatch('refresh')
434
438
  } else {
435
439
  if (getLimit.data.f_limit_value) {
436
440
  self.maxgas = (getLimit.data.f_limit_value - 0)
@@ -453,9 +453,13 @@ let asyncShowCardSellGas = async function (self) {
453
453
  self.hasLimit = getLimit.data.hasLimit
454
454
  if (self.hasLimit) {
455
455
  if (getLimit.data.f_limit_value || getLimit.data.f_limit_amount) {
456
- if (getLimit.data.f_limit_value < 0 && getLimit.data.f_limit_amount < 0) {
456
+ if (getLimit.data.f_limit_value < 0 || getLimit.data.f_limit_amount < 0) {
457
+ self.maxmoney = 0
458
+ self.limitmoney = true
459
+ console.log(self.maxmoney, self.limitmoney)
457
460
  self.$showAlert(`${getLimit.data.msg}`, 'warning', 3000)
458
- self.$dispatch('refresh')
461
+
462
+ // self.$dispatch('refresh')
459
463
  } else {
460
464
  if (getLimit.data.f_limit_value) {
461
465
  self.maxgas = (getLimit.data.f_limit_value - 0)
@@ -29,6 +29,11 @@
29
29
 
30
30
  <div style="float: right">
31
31
  <button @click="search()" class="button_search" style="margin-right: 10px" v-el:cba>查询</button>
32
+ <export-excel :data="$parent.$parent.getCondition" :footer="$parent.$parent.footer"
33
+ :field="$parent.$parent.fields" :header="$parent.$parent.other"
34
+ sqlurl="rs/logic/saleExport" sql-name="sale_cardhandplanQuery" template-name='抄表查询导出'
35
+ :choose-col="true" ref="salehandplanExport"></export-excel>
36
+
32
37
  <print-data :defaultfield="$parent.$parent.defaultfield" :field="$parent.$parent.fields" :is-selected="true" :model="$parent.$parent.printModel"
33
38
  @print-data="$parent.$parent.print()" print-name="其他收费流水"></print-data>
34
39
  </div>
@@ -132,6 +137,7 @@
132
137
  data () {
133
138
  return {
134
139
  condition: '1=1',
140
+ getfields: {},
135
141
  model: new PagedList('rs/sql/sale_cardhandplanQuery', 20, {}),
136
142
  // 控制单选
137
143
  radio: [],
@@ -148,7 +154,11 @@
148
154
  ],
149
155
  printModel: {
150
156
  rows: []
151
- }
157
+ },
158
+ other: [],
159
+ footer: [],
160
+ // 合计数据
161
+ sumsmodel: {}
152
162
  }
153
163
  },
154
164
  props: ['row'],
@@ -156,6 +166,23 @@
156
166
  this.$refs.paged.$refs.criteria.search()
157
167
  },
158
168
  methods: {
169
+ getotherfooter () {
170
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
171
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
172
+ this.other = []
173
+ this.footer = []
174
+ // let exportdata = this.getCondition;
175
+ let otherInData = []
176
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
177
+ let footerData = [], exportfield = this.getfields
178
+ footerData.push('合计')
179
+ let self = this
180
+ for (var field in self.sumsmodel) {
181
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`)
182
+ }
183
+ this.footer.push(footerData)
184
+ this.other.push(otherInData)
185
+ },
159
186
  async search () {
160
187
  this.condition = `${this.$refs.paged.$refs.criteria.condition} and ${this.searchValue} = '${this.row[this.searchValue]}' `
161
188
  this.model.search(this.condition, this.model)
@@ -262,6 +289,19 @@
262
289
  }
263
290
  return this.radio[index][i]
264
291
  }
292
+ },
293
+ getCondition () {
294
+ return {
295
+ condition: this.condition
296
+ }
297
+ }
298
+ },
299
+ watch: {
300
+ sumsmodel: {
301
+ handler: function (val) {
302
+ this.getotherfooter()
303
+ },
304
+ deep: true
265
305
  }
266
306
  }
267
307
  }
@@ -52,6 +52,11 @@
52
52
 
53
53
  <div style="float: right">
54
54
  <button @click="search()" class="button_search" style="margin-right: 10px" v-el:cba>查询</button>
55
+ <export-excel :data="$parent.$parent.getCondition" :footer="$parent.$parent.footer"
56
+ :field="$parent.$parent.fields" :header="$parent.$parent.other"
57
+ sqlurl="rs/logic/saleExport" :sql-name="$parent.$parent.sqlname" template-name='抄表查询导出'
58
+ :choose-col="true" ref="salehandplanExport"></export-excel>
59
+
55
60
  <print-data :defaultfield="$parent.$parent.defaultfield" :field="$parent.$parent.fields" :is-selected="true" :model="$parent.$parent.printModel"
56
61
  @print-data="$parent.$parent.print()"
57
62
  :starthead="$parent.$parent.starthead"
@@ -194,9 +199,11 @@
194
199
  all: [],
195
200
  // row数据
196
201
  rowsdata: [],
202
+ sqlname: `${this.row.f_meter_type === '物联网表'?'sale_WebHandplanQuery':'sale_HandplanQuery'}`,
197
203
  searchValue: this.$appdata.getSingleValue('综合条件查询') ? this.$appdata.getSingleValue('综合条件查询') : 'f_userfiles_id',
198
204
  starthead: '',
199
- fields: {'f_userinfo_code': '用户编号',
205
+ fields: {
206
+ 'f_userinfo_code': '用户编号',
200
207
  'f_user_name': '姓名',
201
208
  'f_last_tablebase': '上期底数',
202
209
  'f_tablebase': '本期底数',
@@ -208,15 +215,17 @@
208
215
  'datas': '用气周期',
209
216
  'money1': '违约金',
210
217
  'f_stair1price': '一阶单价',
218
+ 'f_stair1fee': '一阶用气金额',
211
219
  'f_stairamount1': '一阶用量',
212
220
  'f_stair2price': '二阶单价',
221
+ 'f_stair2fee': '二阶用气金额',
213
222
  'f_stair2amount': '二阶用量',
214
223
  'f_stair3price': '三阶单价',
224
+ 'f_stair3fee': '三阶用气金额',
215
225
  'f_stair3amount': '三阶用量',
216
226
  'f_oughtfee1': '应交金额',
217
227
  'f_inputtor': '抄表员',
218
228
  'f_input_date': '抄表日期',
219
- 'f_whether_pay': '是否缴费',
220
229
  'f_hand_date': '录入时间'},
221
230
  defaultfield: [
222
231
  'datas', 'f_last_tablebase', 'f_last_tablebase', 'f_oughtamount', 'f_oughtfee', 'f_oughtfee1', 'money1', 'price1'
@@ -227,7 +236,11 @@
227
236
  ],
228
237
  printModel: {
229
238
  rows: []
230
- }
239
+ },
240
+ other: [],
241
+ footer: [],
242
+ // 合计数据
243
+ sumsmodel: {}
231
244
  }
232
245
  },
233
246
  props: ['row'],
@@ -235,13 +248,30 @@
235
248
  this.$refs.paged.$refs.criteria.model.f_hand_state = ['有效']
236
249
  this.f_calculation = this.row.f_calculation
237
250
  this.$refs.paged.$refs.criteria.search()
238
- // this.sumgasandmoney= this.$refs.paged.$refs.grid.model.sums
251
+ this.sumsmodel= this.$refs.paged.$refs.grid.model.sums
239
252
  for (let i in this.all) {
240
253
  this.money += i.f_oughtamount
241
254
  this.gas += i.f_oughtfee
242
255
  }
243
256
  },
244
257
  methods: {
258
+ getotherfooter () {
259
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData=[];
260
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData=[];
261
+ this.other = []
262
+ this.footer = []
263
+ // let exportdata = this.getCondition;
264
+ let otherInData = []
265
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`)
266
+ let footerData = [], exportfield = this.fields
267
+ footerData.push('合计')
268
+ let self = this
269
+ for (var field in self.sumsmodel) {
270
+ footerData.push(`${exportfield[field]}合计:${self.sumsmodel[field]}`)
271
+ }
272
+ this.footer.push(footerData)
273
+ this.other.push(otherInData)
274
+ },
245
275
  // search() {
246
276
  // this.condition = `${this.$refs.paged.$refs.criteria.condition} and f_user_id = '${this.row.f_user_id}'`
247
277
  // this.model.search(this.condition, this.model)
@@ -361,6 +391,19 @@
361
391
  }
362
392
  return this.radio[index][i]
363
393
  }
394
+ },
395
+ getCondition () {
396
+ return {
397
+ condition: this.condition
398
+ }
399
+ }
400
+ },
401
+ watch: {
402
+ sumsmodel: {
403
+ handler: function (val) {
404
+ this.getotherfooter()
405
+ },
406
+ deep: true
364
407
  }
365
408
  }
366
409
  }
@@ -765,6 +765,7 @@
765
765
  str += `and f_input_date<='${this.$refs.paged.$refs.cri.model.inputendDate}'`
766
766
  }
767
767
  args.condition = `${args.condition} and f_meter_type='机表'` + f_orgstr
768
+ this.orgCondtionStr = args.condition
768
769
  this.model.search(args.condition, args.model, str)
769
770
  this.sumsmodel = this.$refs.paged.$refs.grid.model.sums
770
771
  }
@@ -0,0 +1,394 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="span" style="overflow-y: scroll">
4
+ <form novalidate class="form-horizontal">
5
+ <p class="bg-info text-center" style="padding: 8px;">上次购气信息</p>
6
+ <div class="row" style="margin-top:6px;">
7
+ <label class=" col-sm-2 control-label">预购气量</label>
8
+ <div class="col-sm-2" >
9
+ <input class="form-control" type="number" v-model="model.f_pregas" placeholder="预购气量" disabled>
10
+ </div>
11
+ <label class=" col-sm-2 control-label">预购金额</label>
12
+ <div class="col-sm-2">
13
+ <input class="form-control" type="number" v-model="model.f_preamount" placeholder="预购金额" disabled>
14
+ </div>
15
+ <label class=" col-sm-2 control-label">撤销类型</label>
16
+ <div class="col-sm-2">
17
+ <input class="form-control" type="text" v-model="model.f_canceltype" placeholder="撤销类型" disabled>
18
+ </div>
19
+ </div>
20
+ <div class="row" style="margin-top:6px;">
21
+ <label class=" col-sm-2 control-label">上期结余</label>
22
+ <div class="col-sm-2">
23
+ <input class="form-control" type="number" v-model="model.f_balance" placeholder="上期结余" disabled>
24
+ </div>
25
+ <label class="col-sm-2 control-label">本期结余</label>
26
+ <div class="col-sm-2">
27
+ <input class="form-control" type="number" v-model="model.f_curbalance" placeholder="本期结余" disabled>
28
+ </div>
29
+ <label class="col-sm-2 control-label">收款</label>
30
+ <div class="col-sm-2">
31
+ <input class="form-control" type="number" v-model="model.f_collection" placeholder="收款" disabled>
32
+ </div>
33
+ </div>
34
+ <div class="row" style="margin-top:6px;">
35
+ <label class=" col-sm-2 control-label">售气时间</label>
36
+ <div class="col-sm-2" >
37
+ <input class="form-control" type="text" v-model="model.f_date" disabled>
38
+ </div>
39
+ <label class="col-sm-2 control-label">操作员</label>
40
+ <div class="col-sm-2">
41
+ <input class="form-control" type="text" v-model="model.f_operator" disabled>
42
+ </div>
43
+ <label class="col-sm-2 control-label" title="参数名称:付款方式">收款方式</label>
44
+ <div class="col-sm-2">
45
+ <v-select v-model="f_payment"
46
+ placeholder='请选择'
47
+ :value.sync="model.f_payment"
48
+ :options='paytype' clear-button></v-select>
49
+ </div>
50
+ <!--<label for="f_outlets" class="col-sm-2 control-label" style="width:15%">网点:</label>-->
51
+ <!--<div class="col-sm-2">-->
52
+ <!--<input class="form-control" type="text" v-model="model.f_outlets" disabled>-->
53
+ <!--</div>-->
54
+ </div>
55
+
56
+ <div v-if="model.f_fillgas_id">
57
+ <p class="bg-info text-center" style="padding: 8px;" >相关补气信息</p>
58
+ <div class="row" style="margin-top:6px;">
59
+ <label class=" col-sm-2 control-label">预购气量</label>
60
+ <div class="col-sm-2" >
61
+ <input class="form-control" type="number" v-model="xmodel.f_pregas" placeholder="预购气量" disabled>
62
+ </div>
63
+ <label class=" col-sm-2 control-label">预购金额</label>
64
+ <div class="col-sm-2">
65
+ <input class="form-control" type="number" v-model="xmodel.f_preamount" placeholder="预购金额" disabled>
66
+ </div>
67
+ <label class=" col-sm-2 control-label">撤销类型</label>
68
+ <div class="col-sm-2">
69
+ <input class="form-control" type="text" v-model="xmodel.f_canceltype" placeholder="撤销类型" disabled>
70
+ </div>
71
+ </div>
72
+ <div class="row" style="margin-top:6px;">
73
+ <label class=" col-sm-2 control-label">上期结余</label>
74
+ <div class="col-sm-2">
75
+ <input class="form-control" type="number" v-model="xmodel.f_balance" placeholder="上期结余" disabled>
76
+ </div>
77
+ <label class="col-sm-2 control-label">本期结余</label>
78
+ <div class="col-sm-2">
79
+ <input class="form-control" type="number" v-model="xmodel.f_curbalance" placeholder="本期结余" disabled>
80
+ </div>
81
+ <label class="col-sm-2 control-label">收款</label>
82
+
83
+ <div class="col-sm-2">
84
+ <input class="form-control" type="number" v-model="xmodel.f_collection" placeholder="收款" disabled>
85
+ </div>
86
+ </div>
87
+ <div class="row" style="margin-top:6px;">
88
+ <label class=" col-sm-2 control-label">售气时间</label>
89
+ <div class="col-sm-2" >
90
+ <input class="form-control" type="text" v-model="xmodel.f_date" disabled>
91
+ </div>
92
+ <label class="col-sm-2 control-label">操作员</label>
93
+ <div class="col-sm-2">
94
+ <input class="form-control" type="text" v-model="xmodel.f_operator" disabled>
95
+ </div>
96
+ <!--<label for="f_outlets" class="col-sm-2 control-label" style="width:15%">网点:</label>-->
97
+ <!--<div class="col-sm-2">-->
98
+ <!--<input class="form-control" type="text" v-model="model.f_outlets" disabled>-->
99
+ <!--</div>-->
100
+ </div>
101
+ </div>
102
+ </form>
103
+ <div style="text-align:right;margin-right:50px;height: auto">
104
+ <button class="btn btn-success width-60" @click="cancel()" :disabled="isToday" v-if="jurisdiction.includes('购气撤销')">购气撤销</button>
105
+ <button class="button_clear" @click="clean()">取消</button>
106
+ </div>
107
+
108
+ <modal v-if="show" :show.sync="show" v-ref:modal backdrop="false">
109
+ <header slot="modal-header" class="modal-header">
110
+ <h4 class="modal-title">撤销原因</h4>
111
+ </header>
112
+ <article slot="modal-body" class="modal-body">
113
+ <validator name='v'>
114
+ <form class="form-horizontal select-overspread">
115
+ <div class="form-group" v-if="config.hasBillManage && model.f_bill_style">
116
+ <label class=" col-sm-3 control-label">发票撤销类型:</label>
117
+ <div class="col-sm-4">
118
+ <v-select v-model="f_cancel_type"
119
+ placeholder='请选择'
120
+ :value.sync="correctModel.f_cancel_type"
121
+ :options='cancelTypes'
122
+ @change="cancelTypeChange"
123
+ :value-single="true"
124
+ close-on-select clear-button>
125
+ </v-select>
126
+ </div>
127
+ </div>
128
+ <div class="form-group" :class="[$v.f_cancel_reason.required ? 'has-error' : 'has-success']">
129
+ <label class=" col-sm-3 control-label">撤销原因:</label>
130
+ <div class="col-sm-8">
131
+ <textarea class="form-control" v-model="correctModel.f_cancel_reason" rows="3"
132
+ placeholder="请填写原因" v-validate:f_cancel_reason='{required: true}'></textarea>
133
+ </div>
134
+ </div>
135
+ </form>
136
+ </validator>
137
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
138
+ </article>
139
+ <footer slot="modal-footer" class="modal-footer">
140
+ <button v-show="show" type="button" class="button_search" @click='confirm()' :disabled="!correctModel.f_cancel_reason">确认</button>
141
+ <button v-show="show" type="button" class="button_clear" @click='close'>取消</button>
142
+ </footer>
143
+ </modal>
144
+ <correct-bill :show="print" :bill-config='config' :bill-data='billData'
145
+ @printok="printok" @toggle="printCancel" :data='printModel' v-ref:printbill ></correct-bill>
146
+ </div>
147
+ </div>
148
+ </template>
149
+ <script>
150
+ /**
151
+ *综合业务
152
+ *卡表收费组件
153
+ */
154
+
155
+ let cardChargeCancelGen = async function (self) {
156
+ // 冲正记录
157
+ self.row.cardInfo = self.cardData
158
+ self.model = Object.assign({}, self.model, self.correctModel)
159
+ let res = null
160
+ if (self.xmodel.id) {
161
+ res = await self.$CancelService.cardAndFillGasCancel(self.model, self.xmodel, self.row)
162
+ } else {
163
+ res = await self.$CancelService.cardChargeCancel(self.model, self.row)
164
+ }
165
+
166
+ console.log('冲正返回。。', res, self.model, self.config, self.correctModel)
167
+
168
+ if (self.model.f_bill_style.includes('普通收据') && self.config.hasBillManage) {
169
+ // 冲正发票管理数据
170
+ if (self.correctModel.f_cancel_type === 'newBill') {
171
+ // 显示发票信息
172
+ self.printModel.id = res.data.record.id
173
+ self.printModel.f_type = res.data.type
174
+ self.printModel.f_bill_style = res.data.record.f_bill_style
175
+ self.billData.url = self.getBillUrl(res.data.type)
176
+ console.log('普通收据打印。。。', self.printModel, self.billUrl)
177
+ self.print = true
178
+ } else if (self.correctModel.f_cancel_type === 'abort') {
179
+ await self.$CommonService.correctPaperBill(res.data.record.id, res.data.type, null, null, 'abort')
180
+ self.$dispatch('refresh')
181
+ }
182
+ } else if (self.model.f_bill_style.includes('电子发票')) {
183
+ // 冲正电子票
184
+ // await self.$CommonService.correctEticket(self.model.id, self.model.f_canceltype)
185
+ self.$dispatch('success')
186
+ } else {
187
+ self.$dispatch('success')
188
+ }
189
+ }
190
+
191
+ let readyGen = async function (self) {
192
+ console.log('冲正业务config', self.config)
193
+ self.correctModel.f_cancel_type = self.config.cancelType
194
+
195
+ self.model.f_price_id = self.row.f_price_id
196
+ self.model.f_user_id = self.row.f_user_id
197
+ self.model.f_user_name = self.row.f_user_name
198
+ self.model.f_userinfo_id = self.row.f_userinfo_id
199
+ let res = await self.$resetpost('rs/sql/gasCancel', {data: {f_user_id: self.model.f_user_id}}, {resolveMsg: null, rejectMsg: '获取记录失败!!'})
200
+ console.log('GASCANCEL:', res.data)
201
+ self.model.id = res.data[0].id
202
+ self.model.f_pregas = res.data[0].f_pregas
203
+ self.model.f_preamount = res.data[0].f_preamount
204
+ self.model.f_curbalance = res.data[0].f_curbalance
205
+ self.model.f_collection = res.data[0].f_collection
206
+ self.model.f_balance = res.data[0].f_balance
207
+ self.model.f_user_balance = res.data[0].f_user_balance
208
+ self.model.f_canceltype = res.data[0].f_canceltype
209
+ self.model.f_bill_style = res.data[0].f_bill_style
210
+ self.model.f_operator = res.data[0].f_operator
211
+ self.model.f_date = res.data[0].f_date
212
+ self.model.f_payment = [res.data[0].f_payment]
213
+ if (res.data[0].f_fillgas_id && res.data[0].f_fillgas_id.length > 0) {
214
+ self.model.f_fillgas_id = res.data[0].f_fillgas_id
215
+ // 开始给关联购气信息赋值
216
+ for (var i = 0; i < res.data.length; i++) {
217
+ console.log('换表关联信息。。', res.data[0].f_fillgas_id, res.data[i].id)
218
+ if (res.data[0].f_fillgas_id == res.data[i].id) {
219
+ self.$showAlert('此卡存在关联购气信息,请谨慎核对!!!', 'warning', 2000)
220
+ self.xmodel.id = res.data[i].id
221
+ self.xmodel.f_pregas = res.data[i].f_pregas
222
+ self.xmodel.f_preamount = res.data[i].f_preamount
223
+ self.xmodel.f_curbalance = res.data[i].f_curbalance
224
+ self.xmodel.f_collection = res.data[i].f_collection
225
+ self.xmodel.f_balance = res.data[i].f_balance
226
+ self.xmodel.f_user_balance = res.data[i].f_user_balance
227
+ self.xmodel.f_canceltype = res.data[i].f_canceltype
228
+ self.xmodel.f_bill_style = res.data[i].f_bill_style
229
+ self.xmodel.f_operator = res.data[i].f_operator
230
+ self.xmodel.f_date = res.data[i].f_date
231
+ // 跳出循环
232
+ break
233
+ }
234
+ // this.radio[index].$set(i,true)
235
+ }
236
+ }
237
+ if (self.config.cancletime && !self.$login.f.rolesnames.includes('管理员')) {
238
+ self.isToday = new Date().toDateString() !== new Date(res.data[0].f_date).toDateString()
239
+ }
240
+
241
+ if (self.config.hasBillManage && self.config.cancelType === 'newBill' && self.model.f_bill_style) {
242
+ // 获取原来收费记录使用的发票类型
243
+ let param = {
244
+ id: res.data[0].id,
245
+ type: res.data[0].f_canceltype
246
+ }
247
+ let oldUseType = await self.$resetpost('rs/logic/sale_getOldUseType', {data: param}, {resolveMsg: null, rejectMsg: '获取原始票据信息出错!!'})
248
+ console.log('获取原始票据信息。。。', oldUseType)
249
+
250
+ self.model.f_use_type = oldUseType.data.f_use_type
251
+ self.model.f_bill_type = [res.data[0].f_bill_style]
252
+ self.hasValidateBill = self.config.hasBillManage
253
+ }
254
+ }
255
+
256
+ export default {
257
+ title: '卡表冲正',
258
+ data () {
259
+ return {
260
+ config: {
261
+ cancleother: false, // 默认可以撤销别人的操作
262
+ hasBillManage: false, // 默认不启用发票管理
263
+ cancelType: 'newBill',
264
+ cancletime: false // 是否限制当天不能冲正
265
+ },
266
+ model: {
267
+ f_payment: '',
268
+ f_pregas: '',
269
+ f_preamount: '',
270
+ f_totalcost: '',
271
+ f_curbalance: '',
272
+ f_collection: '',
273
+ f_balance: '',
274
+ f_user_balance: '',
275
+ f_canceltype: '',
276
+ f_operator: '',
277
+ f_date: '',
278
+ f_fillgas_id: null
279
+ },
280
+ // 关联购气信息
281
+ xmodel: {
282
+ f_payment: '',
283
+ f_pregas: '',
284
+ f_preamount: '',
285
+ f_totalcost: '',
286
+ f_curbalance: '',
287
+ f_collection: '',
288
+ f_balance: '',
289
+ f_user_balance: '',
290
+ f_canceltype: '',
291
+ f_operator: '',
292
+ f_date: ''
293
+ },
294
+ show: false,
295
+ isToday: false,
296
+
297
+ paytype: this.$appdata.getParam('付款方式'),
298
+ correctModel: {
299
+ f_cancel_type: '',
300
+ f_cancel_reason: ''
301
+ },
302
+ printModel: {},
303
+ print: false,
304
+ billUrl: '',
305
+ billData: {
306
+ url: '',
307
+ bill: ''
308
+ },
309
+
310
+ // 启用发票管理需要对票号进行验证
311
+ hasValidateBill: false,
312
+ validateOk: false,
313
+
314
+ jurisdiction: this.$login.r
315
+
316
+ }
317
+ },
318
+ props: ['row', 'cardData'],
319
+ ready () {
320
+ readyGen(this)
321
+ },
322
+ watch: {
323
+ 'row' (val) {
324
+ this.model.f_price_id = val.f_price_id
325
+ this.model.f_user_id = val.f_user_id
326
+ this.model.f_userinfo_id = val.f_userinfo_id
327
+ }
328
+ },
329
+ methods: {
330
+ cancel () {
331
+ if (this.config.cancleother && !this.$login.f.rolesnames.includes('管理员')) {
332
+ if (this.model.f_operator != this.$login.f.name) {
333
+ this.$showAlert('不能撤销不是自己进行的操作', 'warning', 1500)
334
+ return
335
+ }
336
+ }
337
+ if (this.config.cancletime && !this.$login.f.rolesnames.includes('管理员')) {
338
+ let a = this.$login.toStandardDateString() + ' 00:00:00'
339
+ if (this.model.f_date < a) {
340
+ this.$showAlert('不能撤销不是当天的操作', 'warning', 1500)
341
+ return
342
+ }
343
+ }
344
+ this.show = true
345
+ },
346
+ close () {
347
+ this.show = false
348
+ },
349
+ confirm () {
350
+ // 关闭 modal框
351
+ this.close()
352
+ console.log('看看有没有撤销原因', this.model)
353
+ cardChargeCancelGen(this)
354
+ },
355
+ clean () {
356
+ this.$info('取消操作')
357
+ this.$dispatch('cancelclean', this.row)
358
+ },
359
+ getBillUrl (type) {
360
+ let name = ''
361
+ // 根据type数据 选择调用的Logic
362
+ if (type === '卡表收费') {
363
+ name = 'rs/report/card_bill'
364
+ } else if (type === '发卡售气') {
365
+ name = 'rs/report/sendCard_bill'
366
+ }
367
+ return name
368
+ },
369
+ printok () {
370
+ this.show = false
371
+ this.print = false
372
+ this.$dispatch('success')
373
+ },
374
+ printCancel () {
375
+ this.$dispatch('refresh')
376
+ },
377
+ validateBill (val) {
378
+ this.validateOk = !val.isOk
379
+ this.billData.bill = val.bill
380
+ },
381
+ cancelTypeChange () {
382
+ this.hasValidateBill = this.correctModel.f_cancel_type === 'newBill'
383
+ }
384
+ },
385
+ computed: {
386
+ cancelTypes () {
387
+ return [{label: '使用新票号', value: 'newBill'}, {label: '旧发票作废', value: 'abort'}]
388
+ }
389
+ }
390
+ }
391
+ </script>
392
+
393
+ <style>
394
+ </style>
@@ -50,7 +50,7 @@
50
50
  title: '用户安检历史',
51
51
  data () {
52
52
  return {
53
- model: new PagedList('api/af-revenue/sql/findCheckPaper', 5),
53
+ model: new PagedList('rs/sql/findCheckPaper', 5),
54
54
  row: Object,
55
55
  infoshow: false,
56
56
  onedata: Object
@@ -69,4 +69,6 @@ export default function () {
69
69
  Vue.component('disable-record', (resolve) => { require(['./disableRecord'], resolve) })
70
70
  // 用户基本信息test
71
71
  Vue.component('file-user-essential-info', (resolve) => { require(['./UserEssentialInfoTest'], resolve) })
72
+ // 购气撤销
73
+ Vue.component('card-meter-charge-cancel', (resolve) => { require(['./CardMeterChargeCancel'], resolve) })
72
74
  }