sale-client 4.2.37 → 4.2.39

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.
File without changes
@@ -1,2 +1,2 @@
1
- #Wed Oct 23 13:32:43 CST 2024
1
+ #Thu Sep 04 15:35:12 CST 2025
2
2
  gradle.version=5.2.1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.2.37",
3
+ "version": "4.2.39",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -742,12 +742,11 @@ let loadParamGem = async function (self) {
742
742
  },
743
743
  goChargeManage () {
744
744
  try {
745
- this.$goto('charge-manage', {f: this.$login.f}, 'main')
746
- this.$showAlert(`请根据客户编号重新查询后,再进行业务操作!`, 'warning', 3000)
747
- } catch (e) {
748
- }
749
- try {
750
- window.parent.dispatchEvent(new CustomEvent('gotoChargeManage', {detail: 'Hello from iframe'}))
745
+ if (window.parent !== window) {
746
+ window.parent.postMessage({type: 'route', path:'/chargeMange/charge-manage'}, '*')
747
+ } else {
748
+ this.$goto('charge-manage', {f: this.$login.f}, 'main')
749
+ }
751
750
  } catch (e) {
752
751
  }
753
752
  },
@@ -38,6 +38,17 @@
38
38
  </div>
39
39
  </div>
40
40
  <div class="row" style="margin-top:10px;" v-if="model.f_type == '卡表退费'">
41
+ <div class="col-sm-4 form-group">
42
+ <label for="f_print" class="font_normal_body">打印格式</label>
43
+ <v-select id="print"
44
+ v-model="model.f_print"
45
+ style="width:60%"
46
+ placeholder='请选择'
47
+ :value.sync="model.f_print"
48
+ :options='printstyle'
49
+ close-on-select clear-button>
50
+ </v-select>
51
+ </div>
41
52
  <div class="col-sm-4 form-group" :class="[$v.f_pregas.required || $v.f_pregas.dctest ? 'has-error' : 'has-success']">
42
53
  <label for="f_pregas" class="font_normal_body">退费气量</label>
43
54
  <input class="input_search" style="width:60%" type="number"
@@ -61,7 +72,8 @@
61
72
  <button class="button_clear btn-gn" @click="clean()">取消</button>
62
73
  </div>
63
74
  </validator>
64
- <!--<print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="clean" @printok="printok" :data='printModel'></print-bill>-->
75
+ <validate-bill v-if="hasValidateBill" :data="row" @validate-bill="validateBill"></validate-bill>
76
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' @toggle="clean" @printok="printok" :data='row' v-ref:printbill></print-bill>
65
77
  <modal :show.sync="modalShow" v-ref:modalShow backdrop="false">
66
78
  <article slot="modal-body" class="modal-body">
67
79
  <div class="modal_class flex">
@@ -109,6 +121,13 @@
109
121
 
110
122
 
111
123
  <script>
124
+ let readyGen = async function (self) {
125
+ await self.$getConfig(self, 'OtherRefundConfig')
126
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
127
+ self.model.f_payment = [self.config.payment]
128
+ self.hasValidateBill = self.config.hasBillManage
129
+ console.log('其他退费config', self.config, self.model)
130
+ }
112
131
  export default {
113
132
  title: '退保证金',
114
133
  data () {
@@ -116,9 +135,17 @@
116
135
  model: {
117
136
  f_refund_fee: '',
118
137
  f_comments: '',
138
+ f_print: '',
139
+ f_payment: '',
119
140
  f_price: 0,
120
141
  f_pregas: 0
121
142
  },
143
+ config: {
144
+ hasPrint: false, // 默认打票
145
+ hasBillManage: false, // 默认不启用发票管理
146
+ printType: '普通收据',
147
+ payment: '现金缴费'
148
+ },
122
149
  dis: false,
123
150
  blodid: '',
124
151
  hasValidateBill: false,
@@ -142,11 +169,13 @@
142
169
  modalData: {
143
170
  rows: []
144
171
  },
145
- modalShow: false
172
+ modalShow: false,
173
+ printstyle: this.$appdata.getParam('打印格式')
146
174
  }
147
175
  },
148
176
  props: ['row'],
149
177
  ready () {
178
+ readyGen(this)
150
179
  },
151
180
  watch: {
152
181
  async 'model.f_type' (val) {
@@ -279,12 +308,36 @@
279
308
  } else {
280
309
  url = 'api/af-revenue/logic/yajincancel'
281
310
  }
282
- await this.$resetpost(url, {data: param}, {
311
+ let res = await this.$resetpost(url, {data: param}, {
283
312
  warnMsg: `确定要进行${this.model.f_type}操作吗?`,
284
313
  resolveMsg: `${this.model.f_type}操作成功!!`,
285
314
  rejectMsg: `${this.model.f_type}操作失败!!请重试!!`
286
315
  })
287
- this.$dispatch('success')
316
+ if (this.model.f_type == '卡表退费') {
317
+ if (this.model.f_print.indexOf('电子发票') == -1 && this.config.hasPrint) {
318
+ console.log('this.config.hasBillManage', this.config.hasBillManage)
319
+ if (this.config.hasBillManage) {
320
+ // 启用发票管理,获取票据管理中的票号并存储记录
321
+ this.row.id = res.data.id
322
+ this.row.f_bill_type = '卡表退费'
323
+ this.row.f_bill_style = this.model.f_print[0]
324
+ this.print = true
325
+ } else {
326
+ this.row.id = res.data.id
327
+ this.print = true
328
+ }
329
+ } else if (this.config.printType === '国税发票') {
330
+ // TODO
331
+ this.$dispatch('success')
332
+ } else if (this.config.printType === '电子发票') {
333
+ // TODO
334
+ this.$dispatch('success')
335
+ } else {
336
+ this.$dispatch('success')
337
+ }
338
+ } else {
339
+ this.$dispatch('success')
340
+ }
288
341
  }
289
342
  },
290
343
  clean () {
@@ -340,7 +340,7 @@
340
340
  }
341
341
  }
342
342
  if (row.type === '物联网收费' || row.type === '卡表赠气' || row.type === '物联网赠费' || row.type === '卡表赠费' || row.type === '物联网赠气') {
343
- let table_name = this.$appdata.getSingleValue('新抄表')? 't_web_handplan' : 't_handplan'
343
+ let table_name = this.$appdata.getSingleValue('新抄表') ? 't_web_handplan' : 't_handplan'
344
344
  let getWebHand = await this.$SqlService.singleTable(table_name, `f_hand_state = '有效' and f_input_date > '${row.f_operate_date}' and f_userfiles_id = '${row.f_userfiles_id}'`)
345
345
  console.log('长度', getWebHand)
346
346
  if (getWebHand.data.length > 0) {
@@ -474,7 +474,7 @@
474
474
  name = 'api/af-revenue/report/pre_sell'
475
475
  } else if (type === '调价预存') {
476
476
  name = 'api/af-revenue/report/refund_sell'
477
- } else if (type === '退费') {
477
+ } else if (type === '退费' || type === '卡表退费') {
478
478
  name = 'api/af-revenue/report/refund_sell'
479
479
  } else if (type === '调价补费') {
480
480
  name = 'api/af-revenue/report/compensation_bill'
@@ -340,7 +340,7 @@
340
340
  }
341
341
  }
342
342
  if (row.type === '物联网收费' || row.type === '卡表赠气' || row.type === '物联网赠费' || row.type === '卡表赠费' || row.type === '物联网赠气') {
343
- let table_name = this.$appdata.getSingleValue('新抄表')? 't_web_handplan' : 't_handplan'
343
+ let table_name = this.$appdata.getSingleValue('新抄表') ? 't_web_handplan' : 't_handplan'
344
344
  let getWebHand = await this.$SqlService.singleTable(table_name, `f_hand_state = '有效' and f_input_date > '${row.f_operate_date}' and f_userfiles_id = '${row.f_userfiles_id}'`)
345
345
  console.log('长度', getWebHand)
346
346
  if (getWebHand.data.length > 0) {
@@ -474,7 +474,7 @@
474
474
  name = 'api/af-revenue/report/pre_sell'
475
475
  } else if (type === '调价预存') {
476
476
  name = 'api/af-revenue/report/refund_sell'
477
- } else if (type === '退费') {
477
+ } else if (type === '退费' || type === '卡表退费') {
478
478
  name = 'api/af-revenue/report/refund_sell'
479
479
  } else if (type === '调价补费') {
480
480
  name = 'api/af-revenue/report/compensation_bill'
@@ -73,6 +73,7 @@ let loadGen = async function (self) {
73
73
  let owes = res.data
74
74
  self.refreshCenter(owes)
75
75
  }
76
+ console.log('垃圾费收费config', self.config, self.model)
76
77
  }
77
78
  /**
78
79
  *售气收费
@@ -91,13 +92,13 @@ export default {
91
92
  payment: '现金',
92
93
  billType: '燃气费'
93
94
  },
94
- print:false,
95
+ print: false,
95
96
  paytype: this.$appdata.getParam('付款方式'),
96
97
  printstyle: this.$appdata.getParam('打印格式'),
97
98
  printInvoiceType: this.$appdata.getSingleValue('电子票打印类型') ? this.$appdata.getSingleValue('电子票打印类型') : '电子发票',
98
99
  garbagelist: [],
99
100
  billData: {
100
- url: 'api/af-revenue/report/sendCard_bill',
101
+ url: 'api/af-revenue/report/garbageChargeReport',
101
102
  bill: ''
102
103
  },
103
104
  garbagefee: 0,
@@ -109,7 +110,7 @@ export default {
109
110
  chargeView: false
110
111
  }
111
112
  },
112
- props: ['row','cardData'],
113
+ props: ['row', 'cardData'],
113
114
  ready () {
114
115
  this.initData(this.row)
115
116
  this.blodid = this.row.f_userinfo_id
@@ -152,11 +153,9 @@ export default {
152
153
  this.row.id = res.data.recordId
153
154
  this.row.f_bill_type = '垃圾费'
154
155
  this.row.f_bill_style = this.model.f_print
155
- this.billData.url = 'api/af-revenue/report/garbageChargeReport'
156
156
  this.print = true
157
157
  } else {
158
158
  this.row.id = res.data.recordId
159
- this.billData.url = 'api/af-revenue/report/garbageChargeReport'
160
159
  this.print = true
161
160
  }
162
161
  } else if (this.config.printType === '国税发票') {