sale-client 3.6.200 → 3.6.202

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/.eslintrc.js CHANGED
@@ -16,6 +16,7 @@ module.exports = {
16
16
  'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
17
17
  // 必须使用全等
18
18
  'eqeqeq': 0,
19
- "import/no-unresolved": ["error", { "caseSensitive": true }]
19
+ "import/no-unresolved": ["error", { "caseSensitive": true }],
20
+ "camelcase": "off"
20
21
  }
21
22
  }
@@ -1,5 +1,5 @@
1
1
  var path = require('path')
2
- const [ serverRul, localUrl ] = ['http://192.168.50.4:8400/', 'http://127.0.0.1:8080/']
2
+ const [ serverRul, localUrl ] = ['http://121.36.106.17:8400/', 'http://127.0.0.1:8080/']
3
3
  var merge = require('webpack-merge')
4
4
  var baseConfig = require('./webpack.dev.conf')
5
5
  var devConfig = {
@@ -10,13 +10,17 @@ var devConfig = {
10
10
  historyApiFallback: true,
11
11
  host: '127.0.0.1',
12
12
  port: 8089,
13
- open: true,
13
+ open: false,
14
14
  stats: {
15
15
  colors: false, // 配置控制台输出彩色日志
16
16
  chunks: false, // 不输出构建 chunk 信息
17
17
  children: false // 不输出子模块构建信息
18
18
  },
19
19
  proxy: {
20
+ '/invoice/rs/logic/getInvoice': {
21
+ pathRewrite: {'/invoice/rs/logic/getInvoice': '/m2/925029-0-default/90887834'},
22
+ target: 'http://127.0.0.1:4523'
23
+ },
20
24
  '/rs/file': {
21
25
  target: serverRul
22
26
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.200",
3
+ "version": "3.6.202",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -274,7 +274,7 @@ let otherChargeGen = async function (self, parameter) {
274
274
  } else if (self.printInvoiceType.indexOf(self.model.f_print[0]) !== -1) {
275
275
  self.eticket_show = true
276
276
  self.row.f_print = self.model.f_print[0]
277
- await self.$refs.eticketbill.openETicket(resid.data, self.row, '其他收费')
277
+ await self.$refs.eticketbill.openETicket(resid.data, self.row, '其他收费', '其他收费', '其他收费', self.model.f_print[0])
278
278
  // self.$CommonService.openEticket(resid.data, '其他收费')
279
279
  // self.$dispatch('success')
280
280
  }
@@ -190,9 +190,6 @@
190
190
  <th>
191
191
  <nobr>上期结余</nobr>
192
192
  </th>
193
- <th>
194
- <nobr>平均用气量</nobr>
195
- </th>
196
193
  <th>
197
194
  <nobr>上期底数</nobr>
198
195
  </th>
@@ -264,7 +261,6 @@
264
261
  <td>{{row.f_adjustable_name}}</td>
265
262
  <td>{{row.f_inputtor}}</td>
266
263
  <td>{{row.f_balacne}}</td>
267
- <td style="text-align: center;">{{Math.round(row.avggas)}}</td>
268
264
  <td>{{row.f_meter_base}}</td>
269
265
  <td id="hand-creat">{{row.f_tablebase}}</td>
270
266
  <td style="text-align: center;">{{row.f_oughtamount = row.f_tablebase ?
@@ -280,9 +276,7 @@
280
276
  <td> <nobr>{{row.f_book_name}} </nobr></td>
281
277
  <td style="text-align: center;"><nobr>
282
278
  <img-self :src="row.f_handplan_image" v-if="row.f_handplan_image" :width="50" :height="50"></img-self>
283
-
284
- <!-- <button v-if="row.is_has_file=='是'" class="btn btn-link" @click.stop="$parent.$parent.$parent.view(row)">查看</button>-->
285
- <button v-if="row.f_notified_path" class="btn btn-link" @click.stop="$parent.$parent.$parent.imgShow(row.f_notified_path)">图像识别</button>
279
+ <img-self :src="`rs/image/file/${row.f_notified_path}`" v-if="row.f_notified_path" :width="100" :height="100"></img-self>
286
280
  </nobr></td>
287
281
  <td style="text-align: center;" class="row auto">
288
282
  <nobr>
@@ -300,26 +294,6 @@
300
294
  </template>
301
295
  </data-grid>
302
296
  </criteria-paged>
303
- <!-- <table class="table-hover">-->
304
- <!-- <tr style="position: relative" class="table-bordered">-->
305
- <!-- <td-->
306
- <!-- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;color: #5CB95C;font-weight: bold">-->
307
- <!-- 汇总信息-->
308
- <!-- </td>-->
309
- <!-- <td-->
310
- <!-- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">-->
311
- <!-- 支付宝金额汇总:&emsp;{{sumsmodel.f_total_charge}}-->
312
- <!-- </td>-->
313
- <!-- <td-->
314
- <!-- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">-->
315
- <!-- 收费金额汇总:&emsp;{{sumsmodel.f_collection}}-->
316
- <!-- </td>-->
317
- <!-- <td-->
318
- <!-- style="display: inline-block;width: auto;border-right: 1px solid #F2F6FA;padding: 0px 10px 0px 10px;font-weight: bold">-->
319
- <!-- 差额汇总:&emsp;{{((sumsmodel.f_total_charge -0) - (sumsmodel.f_collection -0)).toFixed(2)}}-->
320
- <!-- </td>-->
321
- <!-- </tr>-->
322
- <!-- </table>-->
323
297
  </div>
324
298
  </div>
325
299
  <modal :show.sync="imgshow" v-ref:modal backdrop="true">
@@ -350,10 +324,10 @@ import {HttpResetClass, PagedList} from 'vue-client'
350
324
  }
351
325
 
352
326
  export default {
353
- title: '支付宝中间表对账',
327
+ title: '卡表审核',
354
328
  data () {
355
329
  return {
356
- model: new PagedList('rs/sql/getAuditMachineHand', 20),
330
+ model: new PagedList('rs/sql/getAuditCardHand', 20),
357
331
  initres: {
358
332
  org: [this.$login.f.orgid],
359
333
  dep: [],
@@ -439,31 +413,16 @@ import {HttpResetClass, PagedList} from 'vue-client'
439
413
  f_meter_classify: row.f_meter_classify,
440
414
  f_meter_brand: row.f_meter_brand,
441
415
  f_hand_id: row.id,
416
+ id: row.id,
417
+ f_userfiles_id: row.f_userfiles_id,
442
418
  f_operator: Vue.$login.f.name,
443
419
  f_tablebase: row.f_tablebase,
444
- f_userinfo_id: row.f_userinfo_id
420
+ f_autotable_base: row.f_autotable_base,
421
+ f_userinfo_id: row.f_userinfo_id,
422
+ f_meter_state: '已抄表',
423
+ f_result_state: '成功'
445
424
  }
446
- this.$resetpost('rs/logic/sale_commonEnter', {data: param}, {resolveMsg: null, rejectMsg: null}).then((res) => {
447
- row.f_meter_state = res.data.f_meter_state
448
- row.f_whether_pay = res.data.f_whether_pay
449
- row.f_oughtfee = res.data.f_oughtfee
450
- // this.$resetpost('rs/logic/getMeterSms', {data: param}, {resolveMsg: null, rejectMsg: null}).then((res) => {
451
- // this.search()
452
- let f_result_state = '正常'
453
- if (row.f_result_state && row.f_result_state != '') {
454
- f_result_state = row.f_result_state
455
- }
456
- let f_input_date = ''
457
- if (row.f_input_date && row.f_input_date != '') {
458
- f_input_date = ` ,f_input_date = '${row.f_input_date}'`
459
- }
460
- let sqldata = `update t_handplan set f_result_state = '${f_result_state}' ${f_input_date} where id = '${row.id}'`
461
- this.$resetpost('rs/logic/runSQL', {data: {sql: sqldata}}, {resolveMsg: null, rejectMsg: '业务单号保存失败'})
462
- // }).catch((error) => {
463
- // row.state = '失败'
464
- // Vue.set(row, 'error', JSON.stringify(error))
465
- // this.speckText('抄表出错,请注意!')
466
- // })
425
+ this.$resetpost('rs/logic/cardCommonEnter', {data: param}, {resolveMsg: null, rejectMsg: null}).then((res) => {
467
426
  this.search()
468
427
  }).catch((error) => {
469
428
  row.state = '失败'
@@ -475,19 +434,19 @@ import {HttpResetClass, PagedList} from 'vue-client'
475
434
  console.log('不通过。。。', row)
476
435
  let handplan = {
477
436
  id: row.id,
478
- f_oughtamount: 0,
479
437
  f_tablebase: 0,
480
438
  f_input_date: null,
481
439
  f_meter_state: '未抄表',
440
+ f_hand_state: '作废',
482
441
  f_meter_source: null
483
442
  }
484
- this.$resetpost('rs/entity/t_handplan', handplan, {
443
+ this.$resetpost('rs/entity/t_cardhand', handplan, {
485
444
  resolveMsg: null,
486
445
  rejectMsg: '未通过,抄表数据返回未抄表保存出错!!!'
487
446
  }).then((res) => {
488
447
  row.f_tablebase = null
489
448
  row.f_meter_state = '未抄表'
490
- row.f_whether_pay = '否'
449
+ // row.f_whether_pay = '否'
491
450
  this.search()
492
451
  }).catch((error) => {
493
452
  row.state = '失败'
@@ -497,8 +456,7 @@ import {HttpResetClass, PagedList} from 'vue-client'
497
456
  },
498
457
  loadMeterBooks () {
499
458
  this.meterbooks = [...this.meterbooks, ...this.$GetSaleParam.getMeterBooks()]
500
- },
501
-
459
+ }
502
460
  },
503
461
  computed: {
504
462
  inputtores () {
@@ -1,14 +1,14 @@
1
1
  <template>
2
2
  <tab-button v-ref:list>
3
- <!-- <tabs header="计划下发">-->
4
- <!-- <card-down></card-down>-->
5
- <!-- </tabs>-->
3
+ <tabs header="计划下发">
4
+ <card-down></card-down>
5
+ </tabs>
6
6
  <tabs header="卡表抄表">
7
7
  <cards-hand></cards-hand>
8
8
  </tabs>
9
- <!-- <tabs header="抄表审核">-->
10
- <!-- <card-hand-audit></card-hand-audit>-->
11
- <!-- </tabs>-->
9
+ <tabs header="抄表审核">
10
+ <card-hand-audit></card-hand-audit>
11
+ </tabs>
12
12
  </tab-button>
13
13
  </template>
14
14
 
@@ -16,7 +16,8 @@
16
16
  <script>
17
17
  import TabButton from './../comprehen/common/TabButton'
18
18
  import Tabs from './../comprehen/common/Tabs'
19
- export default {
19
+ import CardHandAudit from './cardHandAudit.vue'
20
+ export default {
20
21
  name: 'cardHandManager',
21
22
  title: '卡表抄表管理',
22
23
  data () {
@@ -34,7 +35,7 @@
34
35
  show: [true]
35
36
  }
36
37
  },
37
- components: {Tabs, TabButton},
38
+ components: {CardHandAudit, Tabs, TabButton},
38
39
  ready () {
39
40
  console.log(this.$refs.list)
40
41
  },
@@ -258,7 +258,10 @@
258
258
  <nobr>本期底数</nobr>
259
259
  </th>
260
260
  <th>
261
- <nobr>表状态</nobr>
261
+ <nobr>抄表结果</nobr>
262
+ </th>
263
+ <th>
264
+ <nobr>附件查看</nobr>
262
265
  </th>
263
266
  <th>
264
267
  <nobr>实际用量</nobr>
@@ -333,7 +336,7 @@
333
336
  'has-error has-feedback': row.error}"
334
337
  v-if="row.f_meter_state === '未抄表' && row.states !== 0">
335
338
  <v-select :value.sync="row.f_result_state" v-model="row.f_result_state"
336
- :options='$parent.$parent.$parent.resultstate' placeholder='表状态'
339
+ :options='$parent.$parent.$parent.resultstate' placeholder='抄表结果'
337
340
  width="100%"
338
341
  :value-single="true"
339
342
  close-on-select
@@ -344,7 +347,10 @@
344
347
  {{ row.f_result_state }}
345
348
  </div>
346
349
  </td>
347
-
350
+ <td style="text-align:center">
351
+ <img-self :src="row.f_handplan_image" v-if="row.f_handplan_image" :width="100" :height="100"></img-self>
352
+ <img-self :src="`rs/image/file/${row.f_notified_path}`" v-if="row.f_notified_path" :width="100" :height="100"></img-self>
353
+ </td>
348
354
 
349
355
  <td style="text-align: center;">{{ row.f_actualtablebase }}</td>
350
356
  <td style="text-align: center;">{{ row.total_gas - (row.f_tablebase - row.f_initial_base) }}</td>
@@ -412,9 +418,7 @@ import co from 'co'
412
418
 
413
419
  let loadParamGem = async function (self) {
414
420
  await self.$LoadParams.loadParam(self.f_filialeid)
415
-
416
421
  self.loadMeterBooks()
417
- await self.search()
418
422
  }
419
423
  let modifyGen = function* (self, row, url) {
420
424
  console.log('抄表修正,。。。', row, url)
@@ -438,6 +442,11 @@ export default {
438
442
  title: '卡表抄表',
439
443
  data () {
440
444
  return {
445
+ initres: {
446
+ org: [this.$login.f.orgid],
447
+ dep: [],
448
+ user: []
449
+ },
441
450
  timer: null,
442
451
  // 请求对象(批量导入,查询进度使用)
443
452
  HttpReset: new HttpResetClass(),
@@ -478,11 +487,6 @@ export default {
478
487
  },
479
488
  meterbrands: [{label: '全部', value: ''}],
480
489
  upshow: false,
481
- initres: {
482
- org: [this.$login.f.orgid],
483
- dep: [],
484
- user: []
485
- },
486
490
  orgCondtionStr: ''
487
491
  }
488
492
  },
@@ -583,7 +587,7 @@ export default {
583
587
  }
584
588
 
585
589
  if (!this.orgCondtionStr) {
586
- args.condition = `${args.condition}` + ' and f_orgid = ' + this.$login.f.orgid
590
+ args.condition = `${args.condition} and f_orgid = '${this.$login.f.orgid}'`
587
591
  } else {
588
592
  args.condition = `${args.condition}` + this.orgCondtionStr
589
593
  }
@@ -90,41 +90,38 @@
90
90
  <v-select id="f_is_mgq" :value.sync="baseinfo.base.f_is_mgq" v-model="baseinfo.base.f_is_mgq"
91
91
  :options='mgq' placeholder='是否煤改气' style="width: 65%" close-on-select></v-select>
92
92
  </div>
93
- <div class="col-sm-4 form-group">
94
- <label for="f_contract" class="font_normal_body">&ensp;燃气本号</label>
95
- <input type="text" v-model="baseinfo.base.f_book_no" class="input_search" style="width:60%" placeholder="用户证号">
96
- </div>
97
- </div>
98
- <div class="row">
99
93
  <div style="" class="col-sm-4 form-group">
100
94
  <label for="f_rent_name" class="font_normal_body">&ensp;租户姓名</label>
101
95
  <input type="text" v-model="baseinfo.base.f_rent_name" class="input_search" style="width:60%"
102
96
  placeholder="租户姓名">
103
97
  </div>
98
+ </div>
99
+ <div class="row">
104
100
  <div style="" class="col-sm-4 form-group">
105
101
  <label for="f_zuhu_phone" class="font_normal_body">&ensp;租户电话</label>
106
102
  <input type="text" v-model="baseinfo.base.f_zuhu_phone" class="input_search" style="width:60%"
107
103
  placeholder="租户电话">
108
104
  </div>
109
- </div>
110
- <div class="row">
111
105
  <div style="" class="col-sm-8 form-group">
112
106
  <label for="f_zuhu_idnumber" class="font_normal_body">租户身份证</label>
113
107
  <input type="text" v-model="baseinfo.base.f_zuhu_idnumber" class="input_search" style="width:80%"
114
108
  placeholder="租户身份证">
115
109
  </div>
110
+ </div>
111
+ <div class="row">
116
112
  <div style="" class="col-sm-4 form-group">
117
113
  <label for="f_is_mgq" class="font_normal_body ">&ensp;付款类型</label>
118
114
  <v-select id="f_is_mgq" :value.sync="baseinfo.base.f_cost_type" v-model="baseinfo.base.f_cost_type"
119
115
  :options='costtype' placeholder='付款类型' style="width: 65%" close-on-select></v-select>
120
116
  </div>
121
- </div>
122
- <div class="row">
123
117
  <div class="col-sm-8 form-group">
124
118
  <label for="f_contract" class="font_normal_body">&ensp;合同编号</label>
125
119
  <input type="text" v-model="baseinfo.base.f_contract_id" class="input_search" style="width:80%"
126
120
  placeholder="合同编号">
127
121
  </div>
122
+ </div>
123
+ <div class="row">
124
+
128
125
  <!-- <div class="col-sm-4 form-group">-->
129
126
  <!-- <label for="f_user_state" class="font_normal_body">&ensp;房屋类型</label>-->
130
127
  <!-- <input type="text" v-show="false" v-model="baseinfo.base.f_house_type">-->
@@ -375,11 +375,11 @@ let sellgasGen = async function (self) {
375
375
  self.print = true
376
376
  }
377
377
  } else {
378
- if (self.model.f_print[0] === '电子发票') {
378
+ if (self.printInvoiceType.indexOf(self.model.f_print[0]) !== -1) {
379
379
  self.row.id = res
380
380
  self.eticket_show = true
381
381
  // 应铜川需要卡表显示
382
- await self.$refs.eticketbill.openETicket([res], self.row, '是', self.invoice_is_pax, '卡表收费')
382
+ await self.$refs.eticketbill.openETicket([res], self.row, '是', self.invoice_is_pax, '卡表收费', self.model.f_print[0])
383
383
  // await self.$CommonService.openEticket(res, '售气收费')
384
384
  // self.print = true
385
385
  }
@@ -515,6 +515,7 @@ export default {
515
515
  eticket_msg: false,
516
516
  eticket_show: false,
517
517
  invoice_is_pax: '不征税',
518
+ printInvoiceType: this.$appdata.getSingleValue('电子票打印类型') ? this.$appdata.getSingleValue('电子票打印类型') : '电子发票',
518
519
  is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
519
520
  model: {
520
521
  f_purchase: 0,
@@ -663,7 +664,7 @@ export default {
663
664
  // 收款回车时, 如果确认按钮是灰色不进行任何操作
664
665
  if (flag) return
665
666
  console.log(this.model.f_print[0])
666
- if (this.model.f_print[0] === '电子发票') {
667
+ if (this.printInvoiceType.indexOf(this.model.f_print[0]) !== -1) {
667
668
  if (!this.row.f_taxpayer_id) {
668
669
  this.row.f_taxpayer_id = this.row.f_idnumber
669
670
  }
@@ -93,18 +93,18 @@ export default {
93
93
  console.log('查看传进来的参数:', obj)
94
94
  this.warningInfo = await this.$resetpost('rs/logic/getWarningMsg',
95
95
  {data: {
96
- f_userfiles_id: obj.f_userfiles_id,
97
- f_userinfo_code: obj.f_userinfo_code,
98
- f_userinfo_id: obj.f_userinfo_id,
99
- f_meternumber: obj.f_meternumber,
100
- f_meter_type: obj.f_meter_type,
101
- f_hascard: obj.f_hascard
102
- }
96
+ f_userfiles_id: obj.f_userfiles_id,
97
+ f_userinfo_code: obj.f_userinfo_code,
98
+ f_userinfo_id: obj.f_userinfo_id,
99
+ f_meternumber: obj.f_meternumber,
100
+ f_meter_type: obj.f_meter_type,
101
+ f_hascard: obj.f_hascard
102
+ }
103
103
  }
104
104
  , {resolveMsg: '', rejectMsg: '获取提示失败'})
105
- console.log("获取到提示了!!!!",this.warningInfo)
106
- if ((!this.warningInfo.data.state.info || !this.warningInfo.data.state.dibao || !this.warningInfo.data.state.taxpayerId ||
107
- !this.warningInfo.data.state.ins|| !this.warningInfo.data.state.blacklist ||
105
+ if (this.warningInfo.data.warningNum > 0 && (!this.warningInfo.data.state.info ||
106
+ !this.warningInfo.data.state.dibao || !this.warningInfo.data.state.taxpayerId ||
107
+ !this.warningInfo.data.state.ins || !this.warningInfo.data.state.blacklist ||
108
108
  !this.warningInfo.data.state.invoice || !this.warningInfo.data.state.isExtendMeterInfo || !this.warningInfo.data.state.ruhu) && obj.f_user_state !== '预备') {
109
109
  this.modalrow = obj
110
110
  this.showModal = true
@@ -8,7 +8,7 @@
8
8
  <label class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
9
9
  <input type="text" v-show="false" v-model="$refs.payment.selectedItems" v-validate:payment='{required: true }'>
10
10
  <v-select v-model="f_payment"
11
- placeholder='请选择1'
11
+ placeholder='请选择'
12
12
  :value.sync="model.f_payment"
13
13
  :options='paytype' clear-button v-ref:payment></v-select>
14
14
  </div>
@@ -386,9 +386,9 @@
386
386
  }
387
387
  } else if (self.config.printType === '国税发票') {
388
388
  // TODO
389
- } else if (self.model.f_print[0] === '电子发票') {
389
+ } else if (self.printInvoiceType.indexOf(self.model.f_print[0]) !== -1) {
390
390
  self.eticket_show = true
391
- await self.$refs.eticketbill.openETicket([res.data.id], self.row, self.invoice_show_gas, self.invoice_is_pax, '物联网收费')
391
+ await self.$refs.eticketbill.openETicket([res.data.id], self.row, self.invoice_show_gas, self.invoice_is_pax, '物联网收费', self.model.f_print[0])
392
392
  // self.$CommonService.openEticket(res.data.id, '其他收费')
393
393
  // self.$dispatch('success')
394
394
  }
@@ -487,6 +487,7 @@
487
487
  eticket_msg: false,
488
488
  eticket_show: false,
489
489
  invoice_is_pax: '不征税',
490
+ printInvoiceType: this.$appdata.getSingleValue('电子票打印类型') ? this.$appdata.getSingleValue('电子票打印类型') : '电子发票',
490
491
  is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
491
492
  model: {
492
493
  f_purchase: 0,
@@ -626,7 +627,7 @@
626
627
  this.model.f_sys_balance = curSysBalance
627
628
  }
628
629
 
629
- if (this.model.f_print[0] === '电子发票') {
630
+ if (this.printInvoiceType.indexOf(this.model.f_print[0]) !== -1) {
630
631
  if (!this.row.f_taxpayer_id) {
631
632
  this.row.f_taxpayer_id = this.row.f_idnumber
632
633
  }
@@ -54,14 +54,17 @@ export default {
54
54
  }
55
55
  await this.$resetpost('rs/entity/t_eticket', model, {resolveMsg: null, rejectMsg: '保存发票记录失败'})
56
56
  },
57
- async openETicket (sellId, row, show_gas, is_pax, type) {
57
+ async openETicket (sellId, row, show_gas, is_pax, type, invoice_kind = '电子发票') {
58
58
  try {
59
59
  let model = {
60
- id: sellId,
61
- f_charge_type: type,
60
+ id: sellId[0],
61
+ charge_item: type,
62
+ invoice_type: 0,
63
+ invoice_kind,
62
64
  f_dept_id: this.$login.f.depids,
63
65
  f_operator: this.$login.f.name,
64
66
  f_orgid: this.$login.f.orgid,
67
+ org_id: this.$login.f.orgid,
65
68
  f_orgname: this.$login.f.orgs,
66
69
  f_depname: this.$login.f.deps,
67
70
  f_operatorid: this.$login.f.id,
@@ -72,12 +75,50 @@ export default {
72
75
  f_mail_push: row.f_email,
73
76
  f_buy_openbank: row.f_paper_account,
74
77
  invoice_show_gas: show_gas === '是',
75
- is_pax: is_pax === '征税'
78
+ is_pax: is_pax === '征税',
79
+ isTax: is_pax === '征税' ? 1 : 0
76
80
  }
77
- console.log('组织开票数据并保存', model)
78
81
  // TODO 组织开票数据并保存
79
- let ticket_id = await this.$resetpost('rs/logic/TCcombineData', model, {resolveMsg: null, rejectMsg: '保存开票信息失败'})
80
- return this.openEticketGen(ticket_id.data)
82
+ const res = await this.$resetpost('/invoice/rs/logic/getInvoice', model, {resolveMsg: null, rejectMsg: '开票请求失败'})
83
+ if (res.data.code == '0000') {
84
+ this.return_msg = '发票开具成功,请稍后到发票管理页面查看或打印'
85
+ } else {
86
+ this.return_msg = '发票开具失败,请稍后到发票管理页面补打或重开'
87
+ }
88
+ } catch (error) {
89
+ this.$showAlert(`电子发票开票失败!!请到发票管理重新开票。错误原因: ${JSON.stringify(error)}。`, 'danger', 0)
90
+ }
91
+ },
92
+ async rushRedInvoice (sellId, eticket_id, row, type, invoice_kind = '电子发票') {
93
+ try {
94
+ let model = {
95
+ id: sellId[0],
96
+ eticket_id,
97
+ charge_item: type,
98
+ invoice_type: 1,
99
+ invoice_kind,
100
+ f_dept_id: this.$login.f.depids,
101
+ f_operator: this.$login.f.name,
102
+ f_orgid: this.$login.f.orgid,
103
+ org_id: this.$login.f.orgid,
104
+ f_orgname: this.$login.f.orgs,
105
+ f_depname: this.$login.f.deps,
106
+ f_operatorid: this.$login.f.id,
107
+ f_filialeids: this.$login.f.f_orgids,
108
+ f_buy_name: row.f_paper_name,
109
+ f_pay_id: row.f_taxpayer_id,
110
+ f_buy_address: row.f_address_phone,
111
+ f_mail_push: row.f_email,
112
+ f_buy_openbank: row.f_paper_account,
113
+ isTax: 1
114
+ }
115
+ // TODO 组织开票数据并保存
116
+ const res = await this.$resetpost('/invoice/rs/logic/getInvoice', model, {resolveMsg: null, rejectMsg: '开票请求失败'})
117
+ if (res.data.code == '0000') {
118
+ this.return_msg = '发票开具成功,请稍后到发票管理页面查看或打印'
119
+ } else {
120
+ this.return_msg = '发票开具失败,请稍后到发票管理页面补打或重开'
121
+ }
81
122
  } catch (error) {
82
123
  this.$showAlert(`电子发票开票失败!!请到发票管理重新开票。错误原因: ${JSON.stringify(error)}。`, 'danger', 0)
83
124
  }
@@ -177,7 +218,7 @@ export default {
177
218
  },
178
219
  /** 冲红
179
220
  * */
180
- async rushRedInvoice (ticket_id) {
221
+ async rushRedInvoice_1 (ticket_id) {
181
222
  try {
182
223
  // 否则正常打票
183
224
  let time = 0
@@ -144,9 +144,9 @@
144
144
  <button class="btn btn-link" v-if="row.f_bill_state==='开票失败'"
145
145
  @click="$parent.$parent.$parent.kp(row)">重新开票
146
146
  </button>
147
- <button class="btn btn-link" v-if="['查询失败','等待查询'].includes(row.f_bill_state)"
148
- @click="$parent.$parent.$parent.fp_search(row)">电票查询
149
- </button>
147
+ <!-- <button class="btn btn-link" v-if="['查询失败','等待查询'].includes(row.f_bill_state)"-->
148
+ <!-- @click="$parent.$parent.$parent.fp_search(row)">电票查询-->
149
+ <!-- </button>-->
150
150
  </template>
151
151
  </th>
152
152
  </tr>
@@ -215,13 +215,9 @@ export default {
215
215
  this.model.search(args.condition, args.model)
216
216
  },
217
217
  async confirm () {
218
- // 修改发票状态
219
- let res = await this.$resetpost('rs/logic/correctEticket', {id: this.row.id, bz: this.bz}, {
220
- resolveMsg: null,
221
- rejectMsg: '保存开票信息失败'
222
- })
218
+ // row
223
219
  this.eticket_show = true
224
- await this.$refs.eticketbill.rushRedInvoice(res.data)
220
+ await this.$refs.eticketbill.rushRedInvoice(this.row.sell_id, this.row.id, this.row, this.row.f_charge_type, this.row.f_invoice_type)
225
221
  },
226
222
  async fp_search (row) {
227
223
  this.eticket_show = true
@@ -242,7 +238,7 @@ export default {
242
238
  },
243
239
  kp (row) {
244
240
  this.eticket_show = true
245
- this.$refs.eticketbill.openEticketGen(row.id)
241
+ this.$refs.eticketbill.openETicket(row.sell_id, row, '否', '征税', row.f_charge_type, row.f_invoice_type)
246
242
  },
247
243
  eticket_toggle () {
248
244
  this.eticket_show = false