sale-client 3.6.177 → 3.6.179

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.177",
3
+ "version": "3.6.179",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -73,7 +73,7 @@
73
73
  // 如果所有提示信息均处理,获取改户数据,进入收费操作
74
74
  if (!this.warninginfo.data.info && !this.warninginfo.data.blacklist && !this.warninginfo.data.dibao) {
75
75
  this.showInformation = false
76
- let data = await this.$resetpost('rs/sql/sale_getUser', {data: {condition: `1=1 and f_userinfo_code = '${this.row.f_userinfo_code}' and u.f_filialeid = ${this.$login.f.orgid}`}}, {resolveMsg: '', rejectMsg: ''})
76
+ let data = await this.$resetpost('rs/sql/sale_getUser', {data: {condition: `1=1 and f_userinfo_code = '${this.row.f_userinfo_code}' and u.f_filialeid = '${this.$login.f.orgid}'`}}, {resolveMsg: '', rejectMsg: ''})
77
77
  this.$emit('modalsuccess', data.data[0])
78
78
  } else { // 没有处理完,显示提示信息
79
79
  this.showInformation = true
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="auto">
3
- <surplus-record-detail :row.sync="row" :civill.sync="civill"></surplus-record-detail>
4
- <group-jb-compensation :row.sync="row" :civill="civill"></group-jb-compensation>
3
+ <surplus-record-detail :row.sync="row" :civill.sync="civill.f_civill_id"></surplus-record-detail>
4
+ <group-jb-compensation :row.sync="row" :civill="civill.f_civill_id"></group-jb-compensation>
5
5
  </div>
6
6
  </template>
7
7
  <script>
@@ -190,7 +190,7 @@ let asyncCardMeterCenter = async function (self) {
190
190
  data: {
191
191
  items: 'sum(f_real_amount) f_real_amount,sum(f_surplus_fee) f_surplus_fee',
192
192
  tablename: 't_surplus_detail',
193
- condition: `f_userinfo_id = any(select f_userinfo_id from t_userfiles where f_civill_id = '${self.civill.id}') and f_state='有效' and f_whether_pay = '否' `,
193
+ condition: `f_userinfo_id = any(select f_userinfo_id from t_userfiles where f_civill_id = '${self.civill}') and f_state='有效' and f_whether_pay = '否' `,
194
194
  orderitem: 'f_surplus_fee'
195
195
  }
196
196
  },
@@ -119,7 +119,7 @@ export default {
119
119
  orderitem: 'f_userinfo_id'
120
120
  }
121
121
  }
122
- this.$resetpost('rs/sql/singleTable_OrderBy', surplusdata).then((res) => {
122
+ this.$resetpost('rs/sql/singleTable_OrderBy', surplusdata, {resolveMsg: null, rejectMsg: null}).then((res) => {
123
123
  if (res.data.length === 0) {
124
124
  this.operBtns = [
125
125
  {name: '团体缴费', value: {routeName: 'batch-charge'}},
@@ -130,7 +130,7 @@ export default {
130
130
  this.getsale()
131
131
  } else {
132
132
  this.operBtns = [{name: '团体调价补差', value: {routeName: 'group-compensation'}}]
133
- this.business(this.operBtns[0])
133
+ this.getsale()
134
134
  }
135
135
  })
136
136
  },
@@ -0,0 +1,378 @@
1
+ <template>
2
+ <div id="BatchCharge">
3
+ <div class="span" style="overflow-y: auto;">
4
+ <validator name='v'>
5
+ <form class="form-horizontal">
6
+ <div class="row" style="padding-top: 0.5em;">
7
+ <div class="col-sm-4 form-group" :class="[$v.payment.required ? 'has-error select-error' : '']">
8
+ <label for="f_paytype" class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
9
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems" v-validate:payment='{required: true }'>
10
+ <v-select id="f_payment"
11
+ v-model="data.f_payment"
12
+ style="width:60%"
13
+ placeholder='请选择'
14
+ :value.sync="data.f_payment"
15
+ :options='paytype'
16
+ v-ref:payment
17
+ close-on-select clear-button>
18
+ </v-select>
19
+ </div>
20
+ <div class="col-sm-4 form-group">
21
+ <label for="f_print" class="font_normal_body">打印格式</label>
22
+ <v-select id="print"
23
+ v-model="data.f_print"
24
+ placeholder='请选择'
25
+ style="width:60%"
26
+ :value.sync="data.f_print"
27
+ :options='printstyle'
28
+ close-on-select clear-button>
29
+ </v-select>
30
+ </div>
31
+ <div class="col-sm-4 form-group">
32
+ <label for="f_overdue" class="font_normal_body">违&ensp;约&ensp;金</label>
33
+ <input class="input_search" style="width:60%" type="number" v-model="data.overdue_all"
34
+ v-scale="[data.overdue_all,2]" placeholder="违约金" disabled>
35
+ </div>
36
+ </div>
37
+ <div class="row" style="padding-top: 0.5em;" >
38
+ <div class="col-sm-4 form-group">
39
+ <label for="f_pregas" class=" font_normal_body">用&ensp;气&ensp;量</label>
40
+ <input class="input_search" style="width:60%" type="number"
41
+ v-model="data.oughtamount_all" placeholder="用气量"
42
+ v-scale="[data.oughtamount_all, 2]" disabled>
43
+ </div>
44
+ <div class="col-sm-4 form-group">
45
+ <label for="f_preamount" class="font_normal_body">实欠气费</label>
46
+ <input class="input_search" style="width:60%" type="number" v-model="data.oughtfee_new_all"
47
+ v-scale = "[data.oughtfee_new_all, 2]" placeholder="实欠气费" disabled>
48
+ </div>
49
+ <div class="col-sm-4 form-group">
50
+ <label for="f_totalcost" class=" font_normal_body">应收金额</label>
51
+ <input class="input_search" style="width:60%" type="number" v-model="data.oughtfee_all"
52
+ v-scale = "[data.oughtfee_all, 2]" placeholder="应收金额" disabled>
53
+ </div>
54
+ </div>
55
+
56
+ <div class="row" style="padding-top: 0.5em;">
57
+ <div class="col-sm-4 form-group">
58
+ <label for="f_balance" class="font_normal_body">上期结余</label>
59
+ <input class="input_search" style="width:60%" type="number" v-model="data.f_balance"
60
+ v-scale="[data.f_balance,4]" placeholder="上期结余" disabled>
61
+ </div>
62
+ <div class="col-sm-4 form-group">
63
+ <label for="f_overdue" class="font_normal_body">本期结余</label>
64
+ <input class="input_search" style="width:60%" type="number" v-model="curbalance" disabled>
65
+ </div>
66
+ <div class="col-sm-4 form-group" :class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error select-error' : '']">
67
+ <label for="f_collection" class="font_normal_body">收&emsp;&emsp;款</label>
68
+ <input id="f_collection" class="input_search" style="width:60%" type="number" v-model="data.f_collection"
69
+ v-validate:f_collection='{required: true, dctest: [0, ">=" ]}' v-scale = "[data.f_collection, 2]"
70
+ @mousewheel.native.prevent @keyup.enter="confirm()" :disabled="!editCollection" v-el:paycode>
71
+ </div>
72
+ </div>
73
+
74
+ <div class="row" style="padding-top: 0.5em;">
75
+ <div class="col-sm-8">
76
+ <label for="f_comments" class="font_normal_body">备&emsp;&emsp;注</label>
77
+ <input class="input_search" style="width:87%" v-model="data.f_comments" placeholder="备注">
78
+ </div>
79
+ </div>
80
+ </form>
81
+ <validate-bill v-if="hasValidateBill" :data="data" @validate-bill="validateBill"></validate-bill>
82
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="close" :data='data' @printok="printok" v-ref:printbill></print-bill>
83
+ <div class="text-right" style="margin-top: 1%">
84
+ <payment-code-button :clickable="!$v.valid || validateOk"
85
+ :payment.sync="data.f_payment" :payment-data="paytype"
86
+ @confirm-payment="confirm()">
87
+ </payment-code-button>
88
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid || validateOk'>确认</button>
89
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
90
+ </div>
91
+ </validator>
92
+ <payment-code v-ref:paymentcode :payment="data.f_payment" :row="row" :money="data.f_after_discount"></payment-code>
93
+ </div>
94
+ </div>
95
+ <modal :show.sync="show" v-ref:modal backdrop="false">
96
+ <header slot="modal-header" class="modal-header text-center">
97
+ <h4 class="modal-title">正在批量处理中, 请耐心等待...</h4>
98
+ </header>
99
+ <article slot="modal-body">
100
+ <div class="progress" style="margin: 20px">
101
+ <div class="progress-bar progress-bar-success progress-bar-striped active" :style="{width: `${percent}%`}">
102
+ {{ percent }}
103
+ </div>
104
+ </div>
105
+ </article>
106
+ <footer slot="modal-footer" class="modal-footer">
107
+ </footer>
108
+ </modal>
109
+ </template>
110
+
111
+ <script>
112
+ import {HttpResetClass} from 'vue-client'
113
+
114
+ let asyncMachineMeterCenter = async function (self) {
115
+ await self.$getConfig(self, 'BatchCharge')
116
+ self.data.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
117
+ self.data.f_payment = [self.config.payment]
118
+ self.data.f_use_type = self.config.billType
119
+ self.data.f_bill_type = self.data.f_print
120
+ self.hasValidateBill = self.config.hasBillManage
121
+ }
122
+ export default {
123
+ name: 'BatchCharge',
124
+ title: '团体缴费',
125
+ data () {
126
+ return {
127
+ // 请求对象(批量导入,查询进度使用)
128
+ HttpReset: new HttpResetClass(),
129
+ timer: null,
130
+ config: {
131
+ showupload: true, // 显示上传
132
+ ceilCollcition: false, // 是否向上取整
133
+ hasPrint: true, // 默认打票
134
+ postAsync: false, // 是否异步请求 存完主记录再存明细
135
+ hasBillManage: false, // 默认不启用发票管理
136
+ hasfindaReail: true, // 默认开启找零功能
137
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
138
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
139
+ payment: '现金缴费'
140
+ },
141
+ print: false,
142
+ billData: {
143
+ url: 'rs/report/charge_manage_group_bill',
144
+ bill: ''
145
+ },
146
+ paytype: this.$appdata.getParam('付款方式') ? this.$appdata.getParam('付款方式') : [],
147
+ printstyle: this.$appdata.getParam('打印格式') ? this.$appdata.getParam('打印格式') : [],
148
+ // 启用发票管理需要对票号进行验证
149
+ hasValidateBill: false,
150
+ validateOk: false,
151
+ editCollection: false,
152
+ // 收费进度
153
+ show: false,
154
+ percent: 0
155
+ }
156
+ },
157
+ props: ['data', 'owe', 'civill'],
158
+ beforeDestroy () {
159
+ // 销毁定时器
160
+ if (this.timer) clearInterval(this.timer)
161
+ },
162
+ ready () {
163
+ this.paycodefocus()
164
+ if (!this.$login.r.includes('免交充值付款')) {
165
+ this.paytype = this.paytype.filter((item) => {
166
+ return item.label != '免交'
167
+ })
168
+ }
169
+ this.editCollection = !!this.civill
170
+ this.data.f_collection = this.data.oughtfee_all - this.data.f_balance > 0 ? this.data.oughtfee_all - this.data.f_balance : 0
171
+ if (this.config.ceilCollcition) {
172
+ this.data.f_collection = Math.ceil(this.data.f_collection)
173
+ }
174
+ asyncMachineMeterCenter(this)
175
+ },
176
+ methods: {
177
+ paycodefocus () {
178
+ this.$nextTick(() => {
179
+ this.$els.paycode.focus()
180
+ })
181
+ },
182
+ /**
183
+ * 用来进行小数相加的工具方法
184
+ * @param {*} num1
185
+ * @param {*} num2
186
+ */
187
+ addNum (num1, num2) {
188
+ let sq1, sq2, multiple
189
+ try {
190
+ sq1 = num1.toString().split('.')[1].length
191
+ } catch (e) {
192
+ sq1 = 0
193
+ }
194
+ try {
195
+ sq2 = num2.toString().split('.')[1].length
196
+ } catch (e) {
197
+ sq2 = 0
198
+ }
199
+ multiple = Math.pow(10, Math.max(sq1, sq2) + 1)
200
+ return (num1 * multiple + num2 * multiple) / multiple
201
+ },
202
+ /**
203
+ * 用来进行小数相减的工具方法
204
+ * @param {*} num1
205
+ * @param {*} num2
206
+ */
207
+ subNum (num1, num2) {
208
+ let sq1, sq2, multiple
209
+ try {
210
+ sq1 = num1.toString().split('.')[1].length
211
+ } catch (e) {
212
+ sq1 = 0
213
+ }
214
+ try {
215
+ sq2 = num2.toString().split('.')[1].length
216
+ } catch (e) {
217
+ sq2 = 0
218
+ }
219
+ multiple = Math.pow(10, Math.max(sq1, sq2) + 1)
220
+ return (num1 * multiple - num2 * multiple) / multiple
221
+ },
222
+ confirm () {
223
+ // if (this.owe.rows.length <= 0) {
224
+ // this.$showMessage('当前没有欠费!!')
225
+ // return
226
+ // }
227
+ // 如果有变更原因说明有变更
228
+ if (this.data.f_collection < 0) {
229
+ this.$showMessage('收款金额不能小于零!!')
230
+ return
231
+ }
232
+ let inti = this.subNum(this.addNum(this.data.f_collection, this.data.f_balance), this.data.oughtfee_all)
233
+ if (inti < 0) {
234
+ this.$showMessage('收款金额不足以清缴欠费,请核查,并重新输入收款金额!!')
235
+ return
236
+ }
237
+ let msg = '确定进行批量收费吗?'
238
+ if (this.row) {
239
+ }
240
+ this.$showMessage(msg, ['confirm', 'cancel']).then(async (res) => {
241
+ if (res === 'confirm') {
242
+ // 先调用付款码支付组件流程
243
+ let ss = await this.$refs.paymentcode.flowPath()
244
+ this.$refs.paymentcode.paymentCodeShow = false
245
+ console.log('付款码操作返回', ss)
246
+ if (!ss.result) return
247
+ this.machineChargeGen()
248
+ }
249
+ })
250
+ },
251
+ async machineChargeGen () {
252
+ let uuid = this.$login.guid()
253
+ let param = {
254
+ uuid: uuid,
255
+ chargeUser: [],
256
+ f_serial_id: this.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no,
257
+ f_balance: this.data.f_balance,
258
+ f_curbalance: this.curbalance,
259
+ f_pregas: this.data.oughtamount_all,
260
+ f_preamount: this.data.oughtfee_new_all,
261
+ f_delay: this.data.overdue_all,
262
+ f_delaypay: this.data.overdue_all,
263
+ f_collection: this.data.f_collection,
264
+ f_payment: this.data.f_payment[0],
265
+ f_print: this.data.f_print[0],
266
+ f_comments: this.data.f_comments,
267
+ operInfo: {
268
+ f_operator: this.$login.f.name,
269
+ f_operatorid: this.$login.f.id,
270
+ f_orgid: this.$login.f.orgid,
271
+ f_orgname: this.$login.f.orgs,
272
+ f_depid: this.$login.f.depids,
273
+ f_depname: this.$login.f.deps,
274
+ f_zoneid: this.$login.f.zoneid,
275
+ f_zones: this.$login.f.zones
276
+ }
277
+ }
278
+ for (let row of this.owe.rows) {
279
+ param.chargeUser.push({
280
+ f_userinfo_id: row.f_userinfo_id,
281
+ f_collection: row.f_oughtfee_all,
282
+ f_oughtfee: row.f_oughtfee,
283
+ f_oughtamount: row.f_oughtamount,
284
+ min_handplan_id: row.min_handplan_id,
285
+ max_handplan_id: row.max_handplan_id
286
+ })
287
+ }
288
+ if (this.civill) {
289
+ param = Object.assign(this.civill, param)
290
+ }
291
+ let batchId = ''
292
+ // 如果配置了异步请求
293
+ if (this.config.postAsync) {
294
+ // 插入主收费记录
295
+ let batch = await this.$resetpost('rs/logic/asyncbatchPaymentSellinggas', {data: param}, {resolveMsg: null, rejectMsg: null}, 1000)
296
+ batchId = param.f_batch_id = batch.data.f_batch_id
297
+ // 处理记录明细抄表明细
298
+ // await this.$resetpost('rs/logic/async/asyncbatchPaymentFiles', {data: param}, {resolveMsg: null, rejectMsg: null}, 1000)
299
+ } else {
300
+ try {
301
+ await this.$resetpost('rs/logic/batchPayment', {data: param}, {resolveMsg: null, rejectMsg: null}, 1000)
302
+ } catch (e) {}
303
+ // this.$showMessage(`正在批量处理中, 请耐心等待...`, [])
304
+ this.show = true
305
+ // 启动定时器定时查询处理结果
306
+ this.timer = setInterval(async () => {
307
+ let res = await this.HttpReset.load('POST', 'rs/logic/getBatchOperaPro', {data: {uuid: uuid}}, {resolveMsg: null, rejectMsg: null})
308
+ if (res.data.percent) {
309
+ this.percent = res.data.percent
310
+ }
311
+ if (res.data.msg || res.data.error) {
312
+ this.show = false
313
+ clearInterval(this.timer)
314
+ this.$closeMessage()
315
+ if (res.data.error) {
316
+ this.$showAlert(`${res.data.error}`, 'danger')
317
+ return
318
+ }
319
+ await this.$showMessage(res.data.msg)
320
+ batchId = res.data.id
321
+ }
322
+ }, 1500)
323
+ }
324
+ if (this.config.hasPrint) {
325
+ if (this.data.f_print.indexOf('电子发票') == -1) {
326
+ console.log('this.config.hasBillManage', this.config.hasBillManage)
327
+ if (this.config.hasBillManage) {
328
+ // 启用发票管理,获取票据管理中的票号并存储记录
329
+ this.row.id = batchId
330
+ this.row.f_bill_type = '物联网收费'
331
+ this.row.f_bill_style = this.model.f_print[0]
332
+ this.print = true
333
+ } else {
334
+ this.data.id = batchId
335
+ this.print = true
336
+ }
337
+ } else if (this.config.printType === '国税发票') {
338
+ // TODO
339
+ } else if (this.model.f_print[0] === '电子发票') {
340
+ this.eticket_show = true
341
+ await this.$refs.eticketbill.openETicket([batchId], this.row, this.invoice_show_gas, this.invoice_is_pax, '物联网收费')
342
+ }
343
+ } else {
344
+ this.clean()
345
+ }
346
+ },
347
+ clean () {
348
+ this.$dispatch('success')
349
+ },
350
+ validateBill (val) {
351
+ this.validateOk = !val.isOk
352
+ this.billData.bill = val.bill
353
+ },
354
+ printok () {
355
+ this.$dispatch('success')
356
+ },
357
+ close () {
358
+ this.print = false
359
+ this.clean()
360
+ }
361
+ },
362
+ watch: {
363
+ },
364
+ computed: {
365
+ curbalance () {
366
+ if (((this.data.f_collection - 0) + (this.data.f_balance - 0)) > (this.data.oughtfee_all - 0)) {
367
+ return ((this.data.f_collection - 0) + (this.data.f_balance - 0) - (this.data.oughtfee_all - 0)).toFixed(2)
368
+ } else {
369
+ return 0
370
+ }
371
+ }
372
+ }
373
+ }
374
+ </script>
375
+
376
+ <style lang="less">
377
+
378
+ </style>
@@ -147,13 +147,13 @@
147
147
  <template partial='foot'></template>
148
148
  </data-grid>
149
149
  </criteria-paged>
150
- <print-data :sum-field="getfield" :model="printModel" :field="getfield" :printview="true"
151
- :defaultfield="defaultfield" titletable="团体欠费明细报表" v-ref:printdata>
150
+ <print-data :sum-field="getfield" :model="printModel" :thead="getHead" :field="getfield" :printview="true"
151
+ :sumsmodel="{'f_oughtfee':printModel.sums.f_oughtfee}" :defaultfield="defaultfield" :titletable="getPrintname" v-ref:printdata>
152
152
  </print-data>
153
153
  </div>
154
154
 
155
155
  <export-excel
156
- :isshow="false" :data="getCondition" :field="getfield" :choose-col="true" v-ref:excel
156
+ :isshow="false" :data="getCondition" :footer="footer" :defaultselect="defaultselect" :header="other" :field="getfield" :choose-col="true" v-ref:excel
157
157
  sqlurl="rs/logic/saleExport" sql-name="batchOweQuery" template-name='团体欠费明细导出'>
158
158
  </export-excel>
159
159
 
@@ -173,6 +173,8 @@ export default {
173
173
  model: new PagedList('rs/sql/ncarchivesQuery', 20),
174
174
  // 公司下拉
175
175
  curorgid: [this.$login.f.orgid],
176
+ other:[],
177
+ footer:[],
176
178
  f_orgid: '',
177
179
  f_civill_id: null,
178
180
  oweShow: false,
@@ -185,22 +187,37 @@ export default {
185
187
  'f_user_name': '客户姓名',
186
188
  'f_address': '客户地址',
187
189
  'f_user_phone': '客户电话',
188
- //'f_meter_classify': '气表类型',
189
- //'c': '欠费期数',
190
+ 'price': '气价',
190
191
  'f_hand_date': '欠费区间',
191
192
  'f_last_tablebase': '上期底数',
192
193
  'f_tablebase': '本期底数',
193
- 'price':'单价',
194
194
  'f_oughtamount': '用气量',
195
195
  'f_oughtfee': '用气金额'
196
- //'f_debt_money': '已交金额',
197
- //'f_oughtfee_new': '应交气费',
198
- //'overdue': '违约金',
199
- //'f_oughtfee_all': '合计欠费'
200
196
  }
201
197
  },
202
- defaultfield: [],
203
- printModel: new PagedList('rs/sql/batchOweQuery', 20),
198
+ // excel默认导出列
199
+ defaultselect: {
200
+ 'f_userinfo_code': '客户编号',
201
+ 'f_user_name': '客户姓名',
202
+ 'f_address': '客户地址',
203
+ 'price': '气价',
204
+ 'f_last_tablebase': '上期底数',
205
+ 'f_tablebase': '本期底数',
206
+ 'f_oughtamount': '用气量',
207
+ 'f_oughtfee': '用气金额'
208
+ },
209
+ // 打印默认导出列
210
+ defaultfield: [
211
+ 'f_userinfo_code',
212
+ 'f_user_name',
213
+ 'f_address',
214
+ 'price',
215
+ 'f_last_tablebase',
216
+ 'f_tablebase',
217
+ 'f_oughtamount',
218
+ 'f_oughtfee'
219
+ ],
220
+ printModel: new PagedList('rs/sql/batchOweQuery', 20,{},{f_oughtfee: 0}),
204
221
  row: null
205
222
  }
206
223
  },
@@ -233,6 +250,14 @@ export default {
233
250
  destroyed () {
234
251
  clearInterval(this.interval)
235
252
  },
253
+ computed: {
254
+ getPrintname(){
255
+ return `团缴欠费明细(${this.row.f_user_name}:${this.row.f_customer})`
256
+ },
257
+ getHead () {
258
+ return `团缴号:${this.row.f_customer}`
259
+ }
260
+ },
236
261
  watch: {
237
262
  'oweShow' (val) {
238
263
  if (val) {
@@ -243,6 +268,26 @@ export default {
243
268
  }
244
269
  },
245
270
  methods: {
271
+ getotherfooter () {
272
+ // this.$refs.paged.$refs.cri.$refs.exports.otherData = [];
273
+ // this.$refs.paged.$refs.cri.$refs.exports.footerData = [];
274
+ this.other = [];
275
+ this.footer = [];
276
+ let otherInData = [];
277
+ otherInData.push(`导出时间: ${this.$login.toStandardTimeString()}`);
278
+
279
+ // otherInData.push(``)
280
+ let footerData = [], exportfield = this.getfield
281
+ footerData.push("合计")
282
+ footerData.push(`用气金额:${this.row.f_oughtfee_all}`)
283
+ this.footer.push(footerData)
284
+ let date = []
285
+ date.push(`团缴名称:${this.row.f_user_name}`)
286
+ date.push(`团缴号:${this.row.f_customer}`)
287
+ this.other.push(date)
288
+ this.other.push(otherInData)
289
+
290
+ },
246
291
  async readCiTiaoCard () {
247
292
  console.log('读磁条卡,开始,不停的循环')
248
293
  let data = {}
@@ -284,12 +329,15 @@ export default {
284
329
  },
285
330
  // 打印
286
331
  async print (row) {
332
+ this.row = row
287
333
  let condition = `p.f_civill_id = ${row.id}`
288
334
  await this.printModel.search(condition)
289
335
  this.$refs.printdata.printData()
290
336
  },
291
337
  // 导出
292
338
  export (row) {
339
+ this.row = row
340
+ this.getotherfooter(row)
293
341
  this.getCondition = {condition: `p.f_civill_id = ${row.id}`}
294
342
  this.$refs.excel.exportExcel()
295
343
  },
@@ -75,6 +75,8 @@ export default function () {
75
75
  Vue.component('user-base-info-new', (resolve) => { require(['./components/common/userinfo_detail/UserBaseInfoNew'], resolve) })
76
76
  // 团体缴费查询列表
77
77
  Vue.component('charge-group-list', (resolve) => { require(['./chargeBatch/ChargeGroupList'], resolve) })
78
+ // 团体缴费查询列表
79
+ Vue.component('batch-charge', (resolve) => { require(['./chargeBatch/BatchCharge'], resolve) })
78
80
  // 选中用户的欠费信息
79
81
  Vue.component('owe-record-query', (resolve) => { require(['./chargeBatch/OweRecordQuery'], resolve) })
80
82
  // 再装表
@@ -631,7 +631,7 @@ let sendCardSaleGasGenremanent = async function (model, row) {
631
631
  getCardNumber.data.cardNumber = row.f_card_id
632
632
  console.log('档案自带卡号、、', getCardNumber)
633
633
  }
634
- if (row.f_alias && row.f_alias.includes('SmartCard_TP')) {
634
+ if (row.f_alias && (row.f_alias.includes('SmartCard_TP') || row.f_alias.includes('LiHengSystem'))) {
635
635
  model.cardNumber = row.f_meternumber
636
636
  } else if (getCardNumber.data.cardNumber) {
637
637
  model.cardNumber = getCardNumber.data.cardNumber + ''
@@ -739,7 +739,7 @@ let resetsendCardSaleGasGen = async function (model, row) {
739
739
  if (getCardNumber.data.cardNumber) {
740
740
  // 当卡的别名是泰鹏普通卡的时候卡号和表号一致
741
741
  console.log('开始验证是不是泰鹏普通卡')
742
- if (row.f_alias && row.f_alias.includes('SmartCard_TP')) {
742
+ if (row.f_alias && (row.f_alias.includes('SmartCard_TP') || row.f_alias.includes('LiHengSystem'))) {
743
743
  model.cardNumber = row.f_meternumber
744
744
  } else {
745
745
  model.cardNumber = getCardNumber.data.cardNumber + ''
@@ -842,7 +842,7 @@ let sendCardSaleGasGen = async function (model, row) {
842
842
  if (getCardNumber.data.cardNumber) {
843
843
  // 当卡的别名是泰鹏普通卡的时候卡号和表号一致
844
844
  console.log('开始验证是不是泰鹏普通卡')
845
- if (row.f_alias && row.f_alias.includes('SmartCard_TP')) {
845
+ if (row.f_alias && (row.f_alias.includes('SmartCard_TP') || row.f_alias.includes('LiHengSystem'))) {
846
846
  model.cardNumber = row.f_meternumber
847
847
  } else if (row.f_alias && row.f_alias.includes('LaiDeRF')) {
848
848
  model.cardNumber = row.f_card_id
@@ -14,8 +14,9 @@
14
14
  <a style="font-size: 16px;font-weight: 500;">设备基本信息</a>&nbsp;<a style="color: #999999;text-decoration: none"></a>
15
15
  </div>
16
16
  <div class="row auto" style="margin-top: 10px;margin-left: 10px;">
17
- <div class="col-sm-6 form-group" style="padding-right: 5px;">
18
- <label class="font_normal_body">设备类型</label>
17
+ <div class="col-sm-6 form-group" style="padding-right: 5px;" :class="[!row.f_devices_type ? 'has-error' : '']">
18
+ <label class="font_normal_body">*设备类型</label>
19
+ <input type="text" v-show="false" v-model="row.f_devices_type" required="true"/>
19
20
  <v-select :value.sync="row.f_devices_type" v-model="row.f_devices_type"
20
21
  :options='devicetypes' placeholder='设备类型' :value-single="true"
21
22
  close-on-select></v-select>
@@ -27,9 +28,10 @@
27
28
  </div>
28
29
  </div>
29
30
  <div class="row auto" style="margin-left: 10px;">
30
- <div class="col-sm-6 form-group" style="padding-right: 5px;" :class="[!row.f_brand && (row.f_devices_type == '壁挂炉' || row.f_devices_type == '热水器') ? 'has-error' : '']">
31
- <label class="font_normal_body">设备品牌</label>
31
+ <div class="col-sm-6 form-group" style="padding-right: 5px;" :class="[!row.f_brand ? 'has-error' : '']">
32
+ <label class="font_normal_body">*设备品牌</label>
32
33
  <input type="text" class="input_search" style="width:60%" v-model="row.f_brand" placeholder='设备品牌'
34
+ required="true"
33
35
  v-next-el="{id: $index+'devicesmodel'}" :id="$index+'brand'">
34
36
  </div>
35
37
  <div class="col-sm-6 form-group" style="padding-right: 5px;">
@@ -62,8 +64,9 @@
62
64
  :options='installperson' placeholder='安装人'
63
65
  close-on-select></v-select>
64
66
  </div>
65
- <div class="col-sm-6 form-group" style="padding-right: 5px;" :class="[row.f_devices_type == '壁挂炉' && row.f_input_date == '' ? 'has-error' : '']">
67
+ <div class="col-sm-6 form-group" style="padding-right: 5px;" :class="[ row.f_input_date == '' ? 'has-error' : '']">
66
68
  <label class="font_normal_body">安装日期</label>
69
+ <input type="text" v-show="false" v-model="row.f_input_date" required="true"/>
67
70
  <datepicker placeholder="安装日期" style="width: 60%"
68
71
  v-model="row.f_input_date"
69
72
  :value.sync="row.f_input_date"
@@ -95,10 +98,11 @@
95
98
  :value.sync="row.f_expire_date"
96
99
  placeholder="到期日期" disabled></input>
97
100
  </div>
98
- <div class="col-sm-6 form-group" style="padding-right: 5px;">
101
+ <div class="col-sm-6 form-group" style="padding-right: 5px;" :class="[!row.f_devices_num ? 'has-error' : '']">
99
102
  <label class="font_normal_body">设备数量</label>
100
103
  <input type="text" class="input_search" style="width:60%" v-model="row.f_devices_num"
101
104
  :value.sync="row.f_devices_num"
105
+ required="true"
102
106
  placeholder='设备数量' :id="$index+'devicesmodel'">
103
107
  </div>
104
108
  </div>
@@ -133,8 +137,9 @@
133
137
  <a style="font-size: 16px;font-weight: 500;">连接管信息</a>&nbsp;<a style="color: #999999;text-decoration: none"></a>
134
138
  </div>
135
139
  <div class="row auto" style="margin-left: 10px;">
136
- <div class="col-sm-8 form-group" style="padding-right: 5px;">
137
- <label class="font_normal_body">有无不锈钢波纹管</label>
140
+ <div class="col-sm-8 form-group" style="padding-right: 5px;" :class="[!row.f_pipe_type ? 'has-error' : '']">
141
+ <label class="font_normal_body">*有无不锈钢波纹管</label>
142
+ <input type="text" v-show="false" v-model="row.f_pipe_type" required="true"/>
138
143
  <v-select :value.sync="row.f_pipe_type" v-model="row.f_pipe_type"
139
144
  :options='pipetypes' placeholder='有无不锈钢波纹管' :value-single="true"
140
145
  close-on-select></v-select>
@@ -163,8 +168,9 @@
163
168
  </div>
164
169
  </div>
165
170
  <div class="row auto" style="margin-left: 10px;">
166
- <div class="col-sm-6 form-group" style="padding-right: 5px;" v-if="devicesinfoShow">
167
- <label class="font_normal_body">有无自闭阀</label>
171
+ <div class="col-sm-6 form-group" style="padding-right: 5px;" v-if="devicesinfoShow" :class="[!row.f_is_zibifa ? 'has-error' : '']">
172
+ <label class="font_normal_body">*有无自闭阀</label>
173
+ <input type="text" v-show="false" v-model="row.f_is_zibifa" required="true"/>
168
174
  <v-select :value.sync="row.f_is_zibifa" v-model="row.f_is_zibifa"
169
175
  :options='is_zibifa' placeholder='有无自闭阀' :value-single="true"
170
176
  close-on-select></v-select>
@@ -350,6 +356,10 @@ export default {
350
356
  let cannotclose = false
351
357
  let deleteData = []
352
358
  for (let [index, row] of this.devicesinfo.entries()) {
359
+ if (!row.f_devices_type || !row.f_brand || !row.f_input_date || !row.f_devices_num || !row.f_is_zibifa || !row.f_zibifa_num || !row.f_pipe_type || !row.f_pipe_num) {
360
+ deleteData.push(index)
361
+ cannotclose = true
362
+ }
353
363
  switch (row.f_devices_type) {
354
364
  case '壁挂炉':
355
365
  if (!(row.f_brand && row.f_input_date)) {
@@ -0,0 +1,165 @@
1
+ <template>
2
+ <div class="auto form-horizontal">
3
+ <modal :show.sync="show" v-ref:modal large backdrop="false" :width="900">
4
+ <header slot="modal-header" class="modal-header">
5
+ <button type="button" class="close" @click="closeShow"><span>&times;</span></button>
6
+ <h4 class="modal-title">发票信息</h4>
7
+ </header>
8
+ <article slot="modal-body" class="modal-body">
9
+ <div class="auto select-overspread form-horizontal">
10
+ <div class="row pt-20">
11
+ <button id="one" class="btn btn-click" @click="switchTab(0)"><strong>个人</strong></button>
12
+ <button id="tow" class="btn btn-click" @click="switchTab(1)"><strong>企业</strong></button>
13
+ </div>
14
+ <div class="row auto" v-show="tabIndex===0">
15
+ <div class="col-sm-6 form-group form-input-group" :class="[!row.f_paper_name ? 'has-error' : '']">
16
+ <label class="control-label">开票名称:</label>
17
+ <input class="form-control col-sm-2"
18
+ v-model="row.f_paper_name" placeholder="开票名称">
19
+ </div>
20
+ <!-- <div class="col-sm-6 form-group form-input-group">-->
21
+ <!-- <nobr class="col-sm-4"><label class="control-label">是否征税:</label></nobr>-->
22
+ <!-- <v-select v-model="row.invoice_is_pax"-->
23
+ <!-- placeholder='请选择'-->
24
+ <!-- :value.sync="row.invoice_is_pax"-->
25
+ <!-- close-on-select-->
26
+ <!-- :width="60" disabled-->
27
+ <!-- :value-single="true"-->
28
+ <!-- :search="false"-->
29
+ <!-- :options='is_pax' clear-button>-->
30
+ <!-- </v-select>-->
31
+ <!-- </div>-->
32
+ <div class="col-sm-12 form-group form-input-group">
33
+ <label class="control-label">开户行及账号:</label>
34
+ <input class="form-control col-sm-2"
35
+ v-model="row.f_paper_account" placeholder="购方开户行及账号">
36
+ </div>
37
+ <div class="col-sm-12 form-group form-input-group"
38
+ :class="[ row.f_taxpayer_id.length<16 || row.f_taxpayer_id.length>18 ? 'has-error' : '']">
39
+ <label class="control-label">身份证号:</label>
40
+ <input class="form-control col-sm-2"
41
+ v-model="row.f_taxpayer_id" placeholder="纳税人识别号(16至18位)">
42
+ </div>
43
+ <div class="col-sm-12 form-group form-input-group" :class="[!row.f_address_phone ? 'has-error' : '']">
44
+ <label class="control-label">开票地址电话:</label>
45
+ <input class="form-control col-sm-2"
46
+ v-model="row.f_address_phone" placeholder="开票地址">
47
+ </div>
48
+ <div class="col-sm-12 form-group form-input-group" >
49
+ <label class="control-label">发票备注:</label>
50
+ <input class="form-control col-sm-2"
51
+ v-model="row.f_eticket_reason" placeholder="发票备注">
52
+ </div>
53
+ <div class="col-sm-12 form-group form-input-group">
54
+ <label class="control-label">邮箱推送:</label>
55
+ <input class="form-control col-sm-2"
56
+ v-model="row.f_email" placeholder="邮箱推送">
57
+ </div>
58
+ </div>
59
+ <div class="row auto" v-show="tabIndex===1">
60
+ <div class="col-sm-6 form-group form-input-group" :class="[!row.f_paper_name ? 'has-error' : '']">
61
+ <label class="control-label">开票名称:</label>
62
+ <input class="form-control col-sm-2"
63
+ v-model="row.f_paper_name" placeholder="开票名称">
64
+ </div>
65
+ <div class="col-sm-6 form-group form-input-group">
66
+ <nobr class="col-sm-4"><label class="control-label">是否征税:</label></nobr>
67
+ <v-select v-model="row.invoice_is_pax"
68
+ placeholder='请选择'
69
+ :value.sync="row.invoice_is_pax"
70
+ close-on-select
71
+ :width="60" disabled
72
+ :value-single="true"
73
+ :search="false"
74
+ :options='is_pax' clear-button>
75
+ </v-select>
76
+ </div>
77
+ <div class="col-sm-12 form-group form-input-group">
78
+ <label class="control-label">开户行及账号:</label>
79
+ <input class="form-control col-sm-2"
80
+ v-model="row.f_paper_account" placeholder="购方开户行及账号">
81
+ </div>
82
+ <div class="col-sm-12 form-group form-input-group"
83
+ :class="[ row.f_taxpayer_id.length<16 || row.f_taxpayer_id.length>18 ? 'has-error' : '']">
84
+ <label class="control-label">纳税人识别号:</label>
85
+ <input class="form-control col-sm-2"
86
+ v-model="row.f_taxpayer_id" placeholder="纳税人识别号(16至18位)">
87
+ </div>
88
+ <div class="col-sm-12 form-group form-input-group" :class="[!row.f_address_phone ? 'has-error' : '']">
89
+ <label class="control-label">开票地址电话:</label>
90
+ <input class="form-control col-sm-2"
91
+ v-model="row.f_address_phone" placeholder="开票地址">
92
+ </div>
93
+ <div class="col-sm-12 form-group form-input-group" >
94
+ <label class="control-label">发票备注:</label>
95
+ <input class="form-control col-sm-2"
96
+ v-model="row.f_eticket_reason" placeholder="发票备注">
97
+ </div>
98
+ <div class="col-sm-12 form-group form-input-group">
99
+ <label class="control-label">邮箱推送:</label>
100
+ <input class="form-control col-sm-2"
101
+ v-model="row.f_email" placeholder="邮箱推送">
102
+ </div>
103
+ </div>
104
+ </div>
105
+ </article>
106
+ <footer slot="modal-footer" class="modal-footer">
107
+ <button type="button" class="btn button_search"
108
+ :disabled="!(row.f_paper_name&&row.f_address_phone&&row.f_taxpayer_id.length>=16 && row.f_taxpayer_id.length<=18)"
109
+ @click='confirm'>确认收费
110
+ </button>
111
+ </footer>
112
+ </modal>
113
+ </div>
114
+ </template>
115
+ <script>
116
+
117
+ export default {
118
+ title: '电子发票',
119
+ data () {
120
+ return {
121
+ is_pax: [{label: '征税', value: '征税'}, {label: '不征税', value: '不征税'}],
122
+ tabIndex: 0
123
+ }
124
+ },
125
+ props: ['row','show'],
126
+ ready () {
127
+ document.getElementById('one').style.backgroundColor = '#6aa6e2'
128
+ document.getElementById('one').style.color = 'white'
129
+ },
130
+ methods: {
131
+ switchTab (param) {
132
+ this.tabIndex = param
133
+ if (param === 0) {
134
+ if (document.getElementById('one')) {
135
+ document.getElementById('one').style.backgroundColor = '#6aa6e2'
136
+ document.getElementById('one').style.color = 'white'
137
+ document.getElementById('tow').style.backgroundColor = 'white'
138
+ document.getElementById('tow').style.color = 'black'
139
+ }
140
+ } else {
141
+ if (document.getElementById('tow')) {
142
+ document.getElementById('tow').style.backgroundColor = '#6aa6e2'
143
+ document.getElementById('tow').style.color = 'white'
144
+ document.getElementById('one').style.backgroundColor = 'white'
145
+ document.getElementById('one').style.color = 'black'
146
+ }
147
+ }
148
+ },
149
+ confirm () {
150
+ this.$dispatch('confirm')
151
+ },
152
+ closeShow () {
153
+ this.$dispatch('closemodalshow')
154
+ }
155
+ },
156
+ watch: {
157
+ 'row' () {
158
+ this.row.invoice_is_pax = ['征税']
159
+ }
160
+ },
161
+ events: {}
162
+ }
163
+ </script>
164
+ <style>
165
+ </style>
@@ -29,4 +29,6 @@ export default function () {
29
29
  Vue.component('no-card-meter-center', (resolve) => { require(['./NoCardMeterCenter'], resolve) })
30
30
  // 无卡收费
31
31
  Vue.component('other-gas', (resolve) => { require(['./OtherGas'], resolve) })
32
+ // 发票信息公共
33
+ Vue.component('eticket-modal', (resolve) => { require(['./EticketModal'], resolve) })
32
34
  }