sale-client 4.0.69-preview → 4.0.70-preview

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
File without changes
@@ -1,7 +1,7 @@
1
1
  var path = require('path')
2
2
  var checkVersion = require('./versionCheck.js')
3
3
  checkVersion()
4
- const [ serverRul, localUrl ] = ['http://222.222.226.211:31467/', 'http://localhost:9026/']
4
+ const [ serverRul, localUrl ] = ['http://192.168.50.67:31467/', 'http://localhost:9026/']
5
5
  var merge = require('webpack-merge')
6
6
  var baseConfig = require('./webpack.dev.conf')
7
7
  var devConfig = {
@@ -11,7 +11,7 @@ var devConfig = {
11
11
  publicPath: baseConfig.output.publicPath,
12
12
  historyApiFallback: true,
13
13
  host: '127.0.0.1',
14
- port: 8090,
14
+ port: 8089,
15
15
  open: false,
16
16
  stats: {
17
17
  colors: false, // 配置控制台输出彩色日志
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.0.69-preview",
3
+ "version": "4.0.70-preview",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -227,7 +227,7 @@
227
227
  <label class=" font_normal_body">换表原因</label>
228
228
  <v-select id="f_ladder_sync"
229
229
  v-model="f_ladder_sync"
230
- placeholder='是否累计'
230
+ placeholder='换表原因'
231
231
  :search="false"
232
232
  :value-single="true"
233
233
  :value.sync="model.f_changetables_reason"
@@ -0,0 +1,448 @@
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v'>
4
+ <form novalidate class="form-horizontal">
5
+ <div class="row" style="margin-top:10px;">
6
+
7
+ <div class="col-sm-4 form-group" :class="[$v.f_pregas.required || $v.f_pregas.dctest? 'has-error' : 'has-success']">
8
+ <label for="f_pregas" class=" font_normal_body">*超用气量</label>
9
+ <input class="input_search" style="width:60%" type="number"
10
+ v-validate:f_pregas='{required: true, dctest: [0, ">=" ]}' v-model="model.f_pregas" v-scale = "[model.f_pregas, config.decimal]">
11
+ </div>
12
+
13
+ <div class="col-sm-4 form-group">
14
+ <label for="f_pregas" class=" font_normal_body">单&emsp;&emsp;价</label>
15
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_price" v-scale = "[model.f_price, 4]" @blur="priceChange">
16
+ </div>
17
+
18
+ <div class="col-sm-4 form-group">
19
+ <label for="f_preamount" class=" font_normal_body">超用金额</label>
20
+ <input class="input_search" @blur="calCollection" style="width:60%" type="number" v-model="model.f_preamount" v-scale="[model.f_preamount, config.decimal]">
21
+ </div>
22
+ </div>
23
+ <div class="row" style="margin-top:10px;">
24
+ <div class="col-sm-4 form-group" :class="[$v.payment.required ? 'select-error' : '']">
25
+ <label class=" font_normal_body" title="参数名称:付款方式">收款方式</label>
26
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems" v-validate:payment='{required: true }'>
27
+ <v-select v-model="model.f_payment"
28
+ placeholder='请选择'
29
+ :value.sync="model.f_payment"
30
+ close-on-select
31
+ :options='paytype' clear-button v-ref:payment></v-select>
32
+ </div>
33
+ <div class=" col-sm-4 form-group">
34
+ <label for="f_print" class="font_normal_body">打印格式</label>
35
+ <v-select id="print"
36
+ v-model="f_print"
37
+ placeholder='请选择'
38
+ :multiple="mulPrint"
39
+ :value.sync="model.f_print"
40
+ :options='printstyle'
41
+ close-on-select clear-button>
42
+ </v-select>
43
+ </div>
44
+ <!--<div class="col-sm-4 form-group" v-if="model.f_payment[0].includes('POS')">-->
45
+ <!--<label for="f_voucher_number" class="font_normal_body">凭证号</label>-->
46
+ <!--<input type="text" class="input_search col-sm-2" v-model="model.f_voucher_number" placeholder="凭证号">-->
47
+ <!--</div>-->
48
+ <!--<div class="col-sm-4 form-group" v-if="!model.f_payment[0].includes('POS')">-->
49
+ <!--</div>-->
50
+ <div class="col-sm-4 form-group">
51
+ <label for="f_totalcost" class=" font_normal_body">应交金额</label>
52
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_totalcost.toFixed(config.decimal)" disabled>
53
+ </div>
54
+ </div>
55
+ <div class="row" style="margin-top:10px;">
56
+ <div class=" col-sm-4 form-group">
57
+ <label for="f_totalcost" class=" font_normal_body">&nbsp;上期结余</label>
58
+ <input class="input_search" style="width:60%" type="number" v-model="row.f_balance" disabled>
59
+ </div>
60
+ <div class=" col-sm-4 form-group">
61
+ <label for="f_totalcost" class=" font_normal_body">本期结余</label>
62
+ <input class="input_search" style="width:60%" type="number" v-model="f_curbalance" disabled>
63
+ </div>
64
+ <div v-if="collectionreload" class="col-sm-4 form-group" :class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error' : 'has-success']">
65
+ <label for="f_collection" class="font_normal_body">&nbsp;&nbsp;&nbsp;收款&nbsp;&nbsp;&nbsp;</label>
66
+ <input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
67
+ v-validate:f_collection='{required: true, dctest: [(model.f_totalcost-0), ">=" ] }'
68
+ v-scale = "[model.f_collection, config.decimal]">
69
+ </div>
70
+ </div>
71
+
72
+ <div class="row" style="margin-top:10px;">
73
+ <div class="col-sm-4 form-group" v-if="!mjshow" >
74
+ <label for="f_serial_number" class="font_normal_body">&nbsp;业务单号</label>
75
+ <input class="input_search" style="width:60%" type="text"
76
+ v-model="model.f_serial_number" placeholder="业务单号">
77
+ </div>
78
+ <div class="col-sm-4 form-group" v-if="mjshow" :class="[$v.f_serial_number.required || $v.f_serial_number.dctest ? 'has-error' : 'has-success']">
79
+ <label for="f_serial_number" class="font_normal_body">&nbsp;业务单号</label>
80
+ <input class="input_search" style="width:60%" type="text" v-validate:f_serial_number='{required: true }'
81
+ v-model="model.f_serial_number" placeholder="业务单号">
82
+ </div>
83
+ <div class=" col-sm-4 form-group" :class="[$v.addtotal.required || $v.addtotal.dctest ? 'has-error' : 'has-success']">
84
+ <label for="f_print" class="font_normal_body">是否累计</label>
85
+ <input class="input_search" style="width:60%" type="text" v-validate:addtotal='{required: true }' v-show="false"
86
+ v-model="model.addtotal" placeholder="是否累计">
87
+ <v-select id="addtotal"
88
+ v-model="model.addtotal"
89
+ placeholder='请选择'
90
+ :search="false"
91
+ :value.sync="model.addtotal"
92
+ :options='addtotals'
93
+ close-on-select clear-button>
94
+ </v-select>
95
+ </div>
96
+ <div v-if="collectionreload" class="col-sm-4 form-group">
97
+ <label for="f_is_liability" class="font_normal_body">应负款</label>
98
+ <input id="f_is_liability" class="input_search" style="width:60%" type="number" v-model="model.f_is_liability" disabled>
99
+ </div>
100
+
101
+ </div>
102
+ <div class="row" style="margin-top:5px;">
103
+ <div class="col-sm-9">
104
+ </div>
105
+ <div class="col-sm-3">
106
+ <span v-if="$v.f_collection.dctest" style="color:red ">收款不能小于应收金额</span>
107
+ </div>
108
+ </div>
109
+ <div class="row" style="padding-top: 0.5em;">
110
+ <div class="col-sm-12 form-group">
111
+ <label for="f_comments" class="font_normal_body">&nbsp;备&emsp;&emsp;注</label>
112
+ <input class="input_search" style="width:87%" v-model="model.f_comments" placeholder="备注"/>
113
+ </div>
114
+ </div>
115
+ <div class="row" style="margin-top:10px;" v-if="!config.notShowFormula && calculatedetail">
116
+ <div class="col-sm-4 form-group col-sm-offset-7">
117
+ <strong>计算公式: {{calculatedetail}}</strong>
118
+ </div>
119
+ </div>
120
+ <div class="row">
121
+ <div class="col-sm-8">
122
+ <strong style="color:blue">温馨提示: 若为阶梯价,只按照一阶进行计算,并不计入阶梯!!</strong>
123
+ </div>
124
+ </div>
125
+ </form>
126
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
127
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="close" :data='row' @printok="printok" v-ref:printbill></print-bill>
128
+ <div style="text-align:right;margin-top:30px;margin-right:50px;">
129
+ <payment-code-button :clickable="!$v.valid || validateOk"
130
+ :payment.sync="model.f_payment" :payment-data="paytype"
131
+ @confirm-payment="confirm()">
132
+ </payment-code-button>
133
+ <button class="button_search" @click="checkInvoiceMsg()" :disabled='!$v.valid || validateOk'>确认</button>
134
+ <button class="button_clear" @click="clean()" >取消</button>
135
+ </div>
136
+ </validator>
137
+ </div>
138
+ <eticket-modal :show="eticket_msg" @closemodalshow="eticket_msg = false" :row="row" @confirm="confirm"></eticket-modal>
139
+ <ticket-print :show="eticket_show" @toggle="eticket_toggle" v-ref:eticketbill></ticket-print>
140
+ <payment-code v-ref:paymentcode :payment="model.f_payment" :row="row" :money="model.f_collection"></payment-code>
141
+ <upload :blodid="blodid" v-if="config.showupload" :businessid="randomBusinessId" isremark="true" fusetype="超用收费"></upload>
142
+ </template>
143
+ <script>
144
+ /**
145
+ *综合业务
146
+ *超用收费组件
147
+ */
148
+
149
+ let getOverUseGen = async function (self) {
150
+ await self.$getConfig(self, 'OverUseCharge')
151
+ console.log('超用config...', self.config)
152
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
153
+ self.model.f_payment = [self.config.payment]
154
+ self.mulPrint = self.config.printType instanceof Array
155
+
156
+ // 验证发票
157
+ self.model.f_use_type = self.config.billType
158
+ self.model.f_bill_type = self.model.f_print
159
+ self.hasValidateBill = self.config.hasBillManage
160
+
161
+ self.model = Object.assign({}, self.model, self.row)
162
+ self.model.f_comments = ''
163
+ // 获取单价(阶梯使用一阶, 固定直接是固定)
164
+ let res = await self.$CommonService.feeCalculate(self.model, 0)
165
+ if (self.row.f_price_type == '固定气价') {
166
+ self.model.f_price = res.data.chargeprice[0].f_price - 0
167
+ } else if (self.row.f_price_type == '阶梯气价') {
168
+ self.model.f_price = res.data.f_stair1price - 0
169
+ }
170
+ }
171
+
172
+ let overChargeGen = async function (self) {
173
+ try {
174
+ // 组织价格明细
175
+ self.model.chargeprice = [{
176
+ f_price: (self.model.f_price - 0),
177
+ f_gas: self.model.f_pregas,
178
+ f_money: self.model.f_preamount,
179
+ f_price_name: self.row.f_meter_type == '固定气价' ? '固定气价' : '阶梯1',
180
+ f_user_id: self.row.f_user_id,
181
+ f_userfiles_id: self.row.f_userfiles_id,
182
+ f_operate_date: self.$login.toStandardTimeString(),
183
+ f_state: '有效',
184
+ f_type: '超用收费'
185
+ }]
186
+
187
+ // 加入扫码盒付款码支付流水号
188
+ self.model.f_serial_id = self.$refs.paymentcode.paymentCodeReturnData.f_out_trade_no
189
+
190
+ let res = await self.$ChangeMeterService.overCharge(self.model, self.row)
191
+ console.log('超用收费返回id', res)
192
+ if (self.config.showupload) {
193
+ let param = []
194
+ for (let row of self.resid) {
195
+ param.push({id: row.id})
196
+ }
197
+ let data = {
198
+ param: param,
199
+ f_blobid: res.data
200
+ }
201
+ await self.$resetpost('api/af-revenue/logic/updatefiles', data)
202
+ }
203
+ if (self.config.hasPrint && !self.$login.r.includes('不打印发票')) {
204
+ if (self.printInvoiceType.indexOf(self.model.f_print) === -1) {
205
+ if (self.config.hasBillManage) {
206
+ // 启用发票管理,获取票据管理中的票号并存储记录
207
+ self.row.id = res.data
208
+ self.row.f_bill_type = '超用收费'
209
+ self.row.f_bill_style = self.model.f_print[0]
210
+ self.print = true
211
+ } else {
212
+ self.row.id = res.data
213
+ self.print = true
214
+ }
215
+ } else {
216
+ if (self.printInvoiceType.indexOf(self.model.f_print[0]) !== -1) {
217
+ // self.$CommonService.openEticket(res.data, '超用收费')
218
+ self.row.id = res.data
219
+ self.eticket_show = true
220
+ self.row.f_print = self.model.f_print[0]
221
+ await self.$refs.eticketbill.openETicket(res.data, self.row, '超用收费')
222
+ }
223
+ }
224
+ } else {
225
+ self.$dispatch('success')
226
+ }
227
+ } catch (error) {
228
+ console.log('捕获到异常', error)
229
+ if (error instanceof Object) {
230
+ self.$showAlert(error.data, 'danger', 0)
231
+ } else {
232
+ self.$showAlert(error, 'danger', 0)
233
+ }
234
+ self.$showAlert(error, 'danger', 0)
235
+ self.$dispatch('refresh')
236
+ }
237
+ }
238
+
239
+ export default {
240
+ title: '超用收费',
241
+ data () {
242
+ return {
243
+ config: {
244
+ notShowFormula: false, // 不显示计算公式,默认显示
245
+ showupload: true, // 默认不显示附件
246
+ hasPrint: false, // 默认打票
247
+ hasBillManage: false, // 默认不启用发票管理
248
+ billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
249
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
250
+ payment: '现金缴费',
251
+ decimal: 4
252
+ },
253
+ disable: false,
254
+ total: 0,
255
+ blodid: '',
256
+ randomBusinessId: '',
257
+ resid: [], // 存放新增的f_files表中id
258
+ collectionreload: true,
259
+ model: {
260
+ f_pregas: '',
261
+ f_price: 0,
262
+ f_preamount: 0,
263
+ f_totalcost: 0,
264
+ f_collection: 0,
265
+ f_balance: '',
266
+ f_curbalance: '',
267
+ f_payment: '现金缴费',
268
+ f_print: [],
269
+ f_voucher_number: '',
270
+ f_comments: '',
271
+ addtotal: '是',
272
+ f_is_liability: 0
273
+ },
274
+ // 本期结余
275
+ f_curbalance: 0,
276
+ addtotals: [{label: '是', value: '是'}, {label: '否', value: '否'}],
277
+ cal: false,
278
+ calculatedetail: '',
279
+
280
+ oldprice: 0,
281
+
282
+ // 启用发票管理需要对票号进行验证
283
+ hasValidateBill: false,
284
+ validateOk: false,
285
+
286
+ billData: {
287
+ url: 'api/af-revenue/report/overuse_bill',
288
+ bill: ''
289
+ },
290
+ print: false,
291
+ eticket_msg: false,
292
+ eticket_show: false,
293
+ mulPrint: false,
294
+ paytype: this.$appdata.getParam('付款方式'),
295
+ printInvoiceType: this.$appdata.getSingleValue('电子票打印类型') ? this.$appdata.getSingleValue('电子票打印类型') : '电子发票',
296
+ printstyle: this.$appdata.getParam('打印格式'),
297
+ mjshow: false
298
+ }
299
+ },
300
+ props: ['row'],
301
+ ready () {
302
+ this.blodid = this.row.f_userinfo_id
303
+ // 获取超用记录并赋值
304
+ getOverUseGen(this)
305
+ this.getRandomId()
306
+ },
307
+ events: {
308
+ // 删除Resid数组元素
309
+ 'delResid' (val) {
310
+ this.resid.$remove({id: val, f_biobid: ''})
311
+ // this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
312
+ },
313
+ // 增加Resid数组元素
314
+ 'resid' (val) {
315
+ this.resid.push({id: val, f_biobid: ''})
316
+ }
317
+ },
318
+ methods: {
319
+ getRandomId () {
320
+ this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
321
+ let res = Math.random() * 16 | 0
322
+ let v = c == 'x' ? res : (res & 0x3 | 0x8)
323
+ return v.toString(16)
324
+ })
325
+ },
326
+ confirm () {
327
+ this.model.f_curbalance = this.f_curbalance
328
+ this.$showMessage(`对客户${this.row.f_user_name}进行超用收费,确定要进行该操作吗?`, ['confirm', 'cancel']).then(async (res) => {
329
+ if (res === 'confirm') {
330
+ let ss = await this.$refs.paymentcode.flowPath()
331
+ this.$refs.paymentcode.paymentCodeShow = false
332
+ console.log('付款码操作返回', ss)
333
+ if (!ss.result) return
334
+
335
+ this.clickConfirm = true
336
+ this.$dispatch('no-button')
337
+ overChargeGen(this)
338
+ }
339
+ })
340
+ },
341
+ // 校验发票信息
342
+ checkInvoiceMsg (flag) {
343
+ // 收款回车时, 如果确认按钮是灰色不进行任何操作
344
+ if (flag) return
345
+ console.log(this.model.f_print[0])
346
+ if (this.printInvoiceType.indexOf(this.model.f_print[0]) !== -1) {
347
+ if (!this.row.f_taxpayer_id && this.config.taxforidnumber) {
348
+ this.row.f_taxpayer_id = this.row.f_idnumber
349
+ }
350
+ if (!this.row.f_paper_name) {
351
+ this.row.f_paper_name = this.row.f_user_name
352
+ }
353
+ if (!this.row.f_address_phone) {
354
+ this.row.f_address_phone = this.row.f_address + ' ' + this.row.f_user_phone
355
+ }
356
+ if (!this.row.f_email) {
357
+ this.row.f_email = this.row.f_email
358
+ }
359
+ this.eticket_msg = true
360
+ } else {
361
+ this.confirm()
362
+ }
363
+ },
364
+ eticket_toggle () {
365
+ this.eticket_show = false
366
+ this.$dispatch('success', '超用收费')
367
+ },
368
+ clean () {
369
+ this.$dispatch('refresh')
370
+ },
371
+ close () {
372
+ this.showprint = false
373
+ this.print = false
374
+ this.clean()
375
+ },
376
+ printok () {
377
+ // 收据打完,判断是否还有其他票据进行请求
378
+ for (let i = 0; i < this.model.f_print.length; i++) {
379
+ if (this.model.f_print[i] === '电子发票') {
380
+ this.$CommonService.openEticket(this.row.id, '超用收费')
381
+ }
382
+ }
383
+ this.$dispatch('success')
384
+ },
385
+ validateBill (val) {
386
+ this.validateOk = !val.isOk
387
+ this.billData.bill = val.bill
388
+ },
389
+ async calPreamount () {
390
+ this.collectionreload = false
391
+ this.model.f_preamount = ((this.model.f_pregas - 0) * (this.model.f_price - 0)).toFixed(4)
392
+ this.model.f_totalcost = this.model.f_balance > this.model.f_preamount ? 0 : (this.model.f_preamount - 0) - (this.model.f_balance - 0)
393
+ this.model.f_collection = this.model.f_totalcost - 0
394
+ await this.$nextTick()
395
+ this.collectionreload = true
396
+ },
397
+ async calCollection () {
398
+ this.collectionreload = false
399
+ this.model.f_totalcost = this.model.f_balance > this.model.f_preamount ? 0 : (this.model.f_preamount - 0) - (this.model.f_balance - 0)
400
+ this.model.f_collection = this.model.f_totalcost - 0
401
+ await this.$nextTick()
402
+ this.collectionreload = true
403
+ },
404
+ priceChange () {
405
+ console.log('新旧价格', this.model.f_price, this.oldprice)
406
+ if (this.model.f_price - this.oldprice < 0) {
407
+ // 判断是否有超用价格修改权限
408
+ if (!this.$login.r.includes('超用价格修改')) {
409
+ this.$showAlert('您没有将该价格降低的权限!!', 'warning', 3000)
410
+ this.model.f_price = this.oldprice
411
+ }
412
+ }
413
+ }
414
+ },
415
+ watch: {
416
+ 'model.f_pregas' () {
417
+ this.calPreamount()
418
+ },
419
+ 'model.f_price' (newVal, oldVal) {
420
+ this.oldprice = oldVal
421
+ this.calPreamount()
422
+ },
423
+ 'model.f_payment' (val) {
424
+ // 根据付款方式增加业务单号
425
+ if (val == '免交') {
426
+ this.mjshow = true
427
+ } else {
428
+ this.mjshow = false
429
+ }
430
+ },
431
+ 'model.f_collection' (newVal) {
432
+ this.model.f_is_liability = newVal
433
+ }
434
+ },
435
+ computed: {
436
+ 'f_curbalance' () {
437
+ if (this.model.f_preamount) {
438
+ return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - (this.model.f_preamount - 0)).toFixed(4)
439
+ } else {
440
+ return this.model.f_balance
441
+ }
442
+ }
443
+ }
444
+ }
445
+ </script>
446
+
447
+ <style>
448
+ </style>
@@ -258,6 +258,17 @@
258
258
  close-on-select clear-button></v-select>
259
259
  </div>
260
260
  </div>
261
+ <div class="col-sm-4 ">
262
+ <label class=" font_normal_body">清零原因</label>
263
+ <v-select id="f_ladder_sync"
264
+ v-model="f_ladder_sync"
265
+ placeholder='清零原因'
266
+ :search="false"
267
+ :value-single="true"
268
+ :value.sync="model.f_changetables_reason"
269
+ :options='resetreason'
270
+ close-on-select clear-button></v-select>
271
+ </div>
261
272
  <div class="row auto">
262
273
  <div class="col-sm-12"
263
274
  v-if="!commitflag"
@@ -455,6 +466,7 @@ export default {
455
466
  // 控制气量金额的编辑
456
467
  isGas: false,
457
468
  replacewatchtype: this.$appdata.getParam('换表类型'),
469
+ resetreason: this.$appdata.getParam('清零原因') ? this.$appdata.getParam('清零原因') : [],
458
470
  reason: this.$appdata.getParam('换表原因') ? this.$appdata.getParam('换表原因') : [],
459
471
  paytype: this.$appdata.getParam('付款方式'),
460
472
  printstyle: this.$appdata.getParam('打印格式'),
@@ -0,0 +1,250 @@
1
+ <template>
2
+ <div class="auto" style="overflow:auto;">
3
+ <validator name='v'>
4
+ <form novalidate class="form-horizontal">
5
+ <div class="row auto">
6
+
7
+ <div class="col-sm-4 form-group"
8
+ :class="[$v.f_using_base_old.required || $v.f_using_base_old.dctest ? 'has-error' : 'has-success']">
9
+ <label class=" font_normal_body">&emsp;表底数</label>
10
+ <input class="input_search" style="width:60%" type="number"
11
+ v-model="model.f_using_base_old"
12
+ placeholder="请输入表底数"
13
+ v-validate:f_using_base_old='{required: true, dctest: [-1, ">" ] }'
14
+ >
15
+ </div>
16
+ </div>
17
+ <div class="row" style="height: 30%">
18
+ <div class="col-sm-4 form-group">
19
+ <label class="font_normal_body">拆表原因</label>
20
+ <v-select v-model="model.f_reason"
21
+ placeholder='拆表原因'
22
+ :value.sync="model.f_reason"
23
+ :options='reason'
24
+ :value-single="true"
25
+ :search="false"
26
+ v-ref:reason
27
+ close-on-select></v-select>
28
+ </div>
29
+ <div class="col-sm-8 form-group" v-if="model.f_reason[0] === '其他'">
30
+ <label class="font_normal_body">其他原因</label>
31
+ <input class="input_search" style="width:80%" v-model="model.f_othereason" placeholder="请填写原因"/>
32
+ </div>
33
+ </div>
34
+ <div style="text-align:right;height:auto;">
35
+ <button class="button_search btn-gn" type="button" @click="confirm()" :disabled="!$v.valid"
36
+ >确认
37
+ </button>
38
+ <button class="button_clear btn-gn" type="button" @click="clean()">取消
39
+ </button>
40
+ </div>
41
+ <!--<div style="height: auto;width: 100%">-->
42
+ <!--<div style="height: 10%">-->
43
+ <!--<img style="margin-top: -5px" src="../../../../../../static/images/lefticon/矩形1183.png">-->
44
+ <!--<a style="font-size: 16px;font-weight: 500;color: #333;text-decoration: none;">附件信息</a>&nbsp;<a style="color: #999999"></a>-->
45
+ <!--</div>-->
46
+ <!--<upload :blodid="row.f_userinfo_id" isremark="true" fusetype="换表"></upload>-->
47
+ <!--</div>-->
48
+ </form>
49
+ </validator>
50
+ </div>
51
+ </template>
52
+ <script>
53
+ /**
54
+ *换表管理
55
+ *组合界面,加载机表,物联网表,气量卡表,金额卡表旧表信息,以及控制显示换新表信息
56
+ */
57
+ export default {
58
+ title: '换表登记',
59
+ data () {
60
+ return {
61
+ resid: [], // 存放新增的f_files表中id
62
+ model: {
63
+ metermessage: {
64
+ f_meter_type: '',
65
+ gasbrand: '',
66
+ gasmodel: '',
67
+ f_meternumber: '',
68
+ f_meter_base: 0,
69
+ f_metertitles: '',
70
+ f_oldmeter_use_reference: 0 // 旧表使用量参考值
71
+ },
72
+ // 旧表底数
73
+ f_using_base_old: '',
74
+ // 换表补气量
75
+ f_remanent_gas: 0,
76
+ // 换表补气单价
77
+ f_remanent_price: 0,
78
+ f_remanent_money: 0,
79
+ f_type: '换新表',
80
+ f_comments: '',
81
+ f_othereason: '',
82
+ f_payment: '现金缴费',
83
+ f_print: '普通收据',
84
+ f_state: '有效',
85
+ f_changemeter_date: this.$login.toStandardTimeString(),
86
+ f_changemeter_fee: this.$appdata.getSingleValue('换表金额') ? this.$appdata.getSingleValue('换表金额') : 0
87
+ },
88
+ meterinfo: false,
89
+
90
+ // 控制气量和金额的转换显示
91
+ changeType: '',
92
+ config: {
93
+ showupload: true, //
94
+ dispatch: false // 是否派工
95
+ },
96
+ // 控制气量金额的编辑
97
+ isGas: false,
98
+ reason: this.$appdata.getParam('拆表原因') ? this.$appdata.getParam('拆表原因') : [],
99
+ paytype: this.$appdata.getParam('付款方式'),
100
+ printstyle: this.$appdata.getParam('打印格式'),
101
+ gasproperties: [],
102
+ newinfo: {
103
+ f_user_type: '',
104
+ f_gasproperties: '',
105
+ pricetype: '',
106
+ pricename: '',
107
+ f_perform_date: this.$login.toStandardDateString() + ' 00:00:00' // 操作时间
108
+ },
109
+ usertypes: this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
110
+ pricetypes: this.$appdata.getParam('气价类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')] : []
111
+ }
112
+ },
113
+ props: ['row'],
114
+ ready () {
115
+
116
+ },
117
+ events: {},
118
+ methods: {
119
+
120
+ // 返回
121
+ clean () {
122
+ this.$dispatch('success', '换表', this.row)
123
+ },
124
+ async confirm () {
125
+ if (this.row.f_meter_type.includes('机表')) {
126
+ this.$showMessage(`将生成抄表记录,是否确认`, ['confirm', 'cancel']).then((res) => {
127
+ if (res === 'confirm') {
128
+ let data = {
129
+ downDate: this.$login.toStandardTimeString(),
130
+ startDate: this.$login.toStandardDateString(),
131
+ endDate: this.$login.toStandardDateString(),
132
+ condition: `f_userfiles_id = '${this.row.f_userfiles_id}'`,
133
+ f_operator: this.$login.f.name,
134
+ f_operatorid: this.$login.f.id,
135
+ f_meternumber: this.row.f_meternumber,
136
+ f_userinfo_id: this.row.f_userinfo_id,
137
+ f_userfiles_id: this.row.f_userfiles_id,
138
+ f_meterbase: this.model.f_using_base_old,
139
+ f_meter_brand: this.row.f_meter_brand,
140
+ f_price_id: this.row.f_price_id
141
+ }
142
+ this.$resetpost('api/af-revenue/logic/changeMeterHand', {data: data}, {
143
+ resolveMsg: '生成欠费成功',
144
+ rejectMsg: '生成欠费失败'
145
+ }).then((res) => {
146
+ console.log('成功')
147
+ this.saveobj()
148
+ }).catch((err) => {
149
+ if (err.code === 500) {
150
+ this.$showAlert(`本期表底数不能低于上期表底数!!`, 'warning', 5000)
151
+ } else if (err.code === 624) {
152
+ this.$showAlert(`本次抄表上期底数小于档案底数,请删除本条抄表记录,重新下发后抄表!`, 'warning', 5000)
153
+ } else {
154
+ this.$showAlert(err.message, 'warning', 5000)
155
+ }
156
+ })
157
+ } else {
158
+
159
+ }
160
+ })
161
+ } else if (this.row.f_meter_type.includes('卡表')) {
162
+ let totalGas = (this.row.f_total_gas - 0) + (this.row.f_initial_base - 0)
163
+ if (this.model.f_using_base_old > totalGas) {
164
+ this.$showAlert('该表可能存在超用,请核实输入后进行拆表操作!!', 'warning', 5000)
165
+ this.$dispatch('button-specifies', {name: '超用收费', value: 'over-use-charge'}, this.row)
166
+ return
167
+ }
168
+ this.saveobj()
169
+ } else {
170
+ // 物联网表拆表
171
+ this.$showMessage(`将生成抄表记录,是否确认`, ['confirm', 'cancel']).then((res) => {
172
+ if (res === 'confirm') {
173
+ let data = {
174
+ downDate: this.$login.toStandardTimeString(),
175
+ startDate: this.$login.toStandardDateString(),
176
+ endDate: this.$login.toStandardDateString(),
177
+ condition: `f_userfiles_id = '${this.row.f_userfiles_id}'`,
178
+ f_operator: this.$login.f.name,
179
+ f_operatorid: this.$login.f.id,
180
+ f_meternumber: this.row.f_meternumber,
181
+ f_userinfo_id: this.row.f_userinfo_id,
182
+ f_userfiles_id: this.row.f_userfiles_id,
183
+ f_meterbase: this.model.f_using_base_old,
184
+ f_meter_brand: this.row.f_meter_brand,
185
+ f_meter_type: this.row.f_meter_type,
186
+ f_meter_classify: this.row.f_meter_type,
187
+ f_price_id: this.row.f_price_id
188
+ }
189
+ // 划价
190
+ this.$resetpost('api/af-revenue/logic/changeMeterWebHand', {data: data}, {resolveMsg: null, rejectMsg: null }).then((res) => {
191
+ if(res.data.code === "9990") {
192
+ this.$showAlert(res.data.msg, 'warning', 5000)
193
+ }
194
+ console.log('划价成功')
195
+ // 保存拆表记录
196
+ this.saveobj()
197
+ })
198
+ } else {
199
+ // 取消
200
+ }
201
+ })
202
+ }
203
+ },
204
+ async saveobj () {
205
+ let res = await this.$resetpost('api/af-revenue/sql/singleTable_OrderBy', {
206
+ data: {
207
+ orderitem: 'f_userfiles_id',
208
+ items: '*',
209
+ tablename: 't_userfiles',
210
+ condition: 'f_userfiles_id = ' + this.row.f_userfiles_id
211
+ }
212
+ })
213
+ console.log('=============', res.data[0])
214
+ let sql = `update t_userfiles set f_table_state = '拆表' where f_userfiles_id = '${this.row.f_userfiles_id}'`
215
+ await this.$resetpost('api/af-revenue/logic/runSQL', { sql: sql })
216
+ let data = {
217
+ // f_userfiles_id: {
218
+ // f_userfiles_id: this.row.f_userfiles_id,
219
+
220
+ // version: res.data[0].version
221
+ // },
222
+ f_table_state: '拆表',
223
+ f_userfiles_id: this.row.f_userfiles_id,
224
+ f_user_id: this.row.f_user_id,
225
+ f_userinfo_id: this.row.f_userinfo_id,
226
+ f_user_name: this.row.f_user_name,
227
+ f_operat_type: '拆表',
228
+ f_operate_type: '拆表',
229
+ f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行拆表操作`,
230
+ f_state: '有效',
231
+ f_comments: this.model.f_reason,
232
+ f_othereason: this.model.f_othereason,
233
+ f_operator: this.$login.f.name,
234
+ f_operatorid: this.$login.f.id,
235
+ f_orgid: this.$login.f.orgid,
236
+ f_orgname: this.$login.f.orgs,
237
+ f_depid: this.$login.f.depids,
238
+ f_depname: this.$login.f.deps,
239
+ f_zoneid: this.$login.f.zoneid,
240
+ f_zones: this.$login.f.zones
241
+ }
242
+ this.$resetpost('api/af-revenue/entity/save/t_disable', data, {resolveMsg: '拆表成功', rejectMsg: '拆表失败'})
243
+ this.$dispatch('success')
244
+ }
245
+
246
+ },
247
+
248
+ watch: {}
249
+ }
250
+ </script>
@@ -0,0 +1,138 @@
1
+ <template>
2
+ <div class="auto" style="overflow:auto;">
3
+ <validator name='v'>
4
+ <form novalidate class="form-horizontal">
5
+ <div class="row auto" >
6
+
7
+ </div>
8
+
9
+ <div style="text-align:right;height:auto;">
10
+ <button class="button_search" type="button" @click="saveobj()"
11
+ >确认
12
+ </button>
13
+ <button class="button_clear" type="button" @click="clean()" >取消
14
+ </button>
15
+ </div>
16
+ <!--<div style="height: auto;width: 100%">-->
17
+ <!--<div style="height: 10%">-->
18
+ <!--<img style="margin-top: -5px" src="../../../../../../static/images/lefticon/矩形1183.png">-->
19
+ <!--<a style="font-size: 16px;font-weight: 500;color: #333;text-decoration: none;">附件信息</a>&nbsp;<a style="color: #999999"></a>-->
20
+ <!--</div>-->
21
+ <!--<upload :blodid="row.f_userinfo_id" isremark="true" fusetype="换表"></upload>-->
22
+ <!--</div>-->
23
+ </form>
24
+ </validator>
25
+ </div>
26
+ </template>
27
+ <script>
28
+ /**
29
+ *换表管理
30
+ *组合界面,加载机表,物联网表,气量卡表,金额卡表旧表信息,以及控制显示换新表信息
31
+ */
32
+ import { HttpResetClass } from 'vue-client'
33
+ export default {
34
+ title: '换表登记',
35
+ data () {
36
+ return {
37
+ resid: [], // 存放新增的f_files表中id
38
+ model: {
39
+ metermessage: {
40
+ f_meter_type: '',
41
+ gasbrand: '',
42
+ gasmodel: '',
43
+ f_meternumber: '',
44
+ f_meter_base: 0,
45
+ f_metertitles: '',
46
+ f_oldmeter_use_reference: 0 // 旧表使用量参考值
47
+ },
48
+ // 旧表底数
49
+ f_using_base_old: '',
50
+ // 换表补气量
51
+ f_remanent_gas: 0,
52
+ // 换表补气单价
53
+ f_remanent_price: 0,
54
+ f_remanent_money: 0,
55
+ f_type: '换新表',
56
+ f_comments: '',
57
+ f_othereason: '',
58
+ f_payment: '现金缴费',
59
+ f_print: '普通收据',
60
+ f_state: '有效',
61
+ f_changemeter_date: this.$login.toStandardTimeString(),
62
+ f_changemeter_fee: this.$appdata.getSingleValue('换表金额') ? this.$appdata.getSingleValue('换表金额') : 0
63
+ },
64
+ meterinfo: false,
65
+
66
+ // 控制气量和金额的转换显示
67
+ changeType: '',
68
+ config: {
69
+ showupload: true, //
70
+ dispatch: false // 是否派工
71
+ },
72
+ // 控制气量金额的编辑
73
+ isGas: false,
74
+ replacewatchtype: this.$appdata.getParam('换表类型'),
75
+ reason: this.$appdata.getParam('换表原因') ? this.$appdata.getParam('换表原因') : [],
76
+ paytype: this.$appdata.getParam('付款方式'),
77
+ printstyle: this.$appdata.getParam('打印格式'),
78
+ gasproperties: [],
79
+ newinfo: {
80
+ f_user_type: '',
81
+ f_gasproperties: '',
82
+ pricetype: '',
83
+ pricename: '',
84
+ f_perform_date: this.$login.toStandardDateString() + ' 00:00:00' // 操作时间
85
+ },
86
+ usertypes: this.$appdata.getParam('用户类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('用户类型')] : [],
87
+ pricetypes: this.$appdata.getParam('气价类型') ? [{label: '全部', value: ''}, ...this.$appdata.getParam('气价类型')] : []
88
+ }
89
+ },
90
+ props: ['row'],
91
+ ready () {
92
+
93
+ },
94
+ events: {
95
+
96
+ },
97
+ methods: {
98
+ // 返回
99
+ clean () {
100
+ this.$dispatch('success', '换表', this.row)
101
+ },
102
+ async saveobj () {
103
+ let sql = `update t_userfiles set f_table_state = '正常' where f_userfiles_id = '${this.row.f_userfiles_id}'`
104
+ await this.$resetpost('api/af-revenue/logic/runSQL', { sql: sql })
105
+ let data = {
106
+ // f_userfiles_id: {
107
+ // f_userfiles_id: this.row.f_userfiles_id,
108
+ // f_table_state: '正常',
109
+ // version: this.row.version
110
+ // },
111
+ f_meter_type: this.row.f_meter_type,
112
+ f_userfile_id: this.row.f_userfiles_id,
113
+ f_user_id: this.row.f_user_id,
114
+ f_userinfo_id: this.row.f_userinfo_id,
115
+ f_user_name: this.row.f_user_name,
116
+ f_operat_type: '表具复位',
117
+ f_describe: `${this.$login.f.name}对客户${this.row.f_user_name}进行表具复位操作`,
118
+ f_state: '有效',
119
+ f_operator: this.$login.f.name,
120
+ f_operatorid: this.$login.f.id,
121
+ f_orgid: this.$login.f.orgid,
122
+ f_orgname: this.$login.f.orgs,
123
+ f_depid: this.$login.f.depids,
124
+ f_depname: this.$login.f.deps,
125
+ f_zoneid: this.$login.f.zoneid,
126
+ f_zones: this.$login.f.zones
127
+ }
128
+ await this.$resetpost('api/af-revenue/logic/removeTableCancel', data, {resolveMsg: '复拆表成功', rejectMsg: '复拆表失败'})
129
+ this.$dispatch('success')
130
+ }
131
+
132
+ },
133
+
134
+ watch: {
135
+
136
+ }
137
+ }
138
+ </script>
@@ -36,4 +36,10 @@ export default function () {
36
36
  Vue.component('change-meter', (resolve) => { require(['./ChangeMeter'], resolve) })
37
37
  // 清零
38
38
  Vue.component('reset-meter', (resolve) => { require(['./ResetMeter'], resolve) })
39
+ // 超用收费
40
+ Vue.component('over-use-charge', (resolve) => { require(['./OverUseCharge'], resolve) })
41
+ // 拆表
42
+ Vue.component('remove-table', (resolve) => { require(['./removeTable'], resolve) })
43
+ Vue.component('remove-table-cancel', (resolve) => { require(['./removeTableCancel'], resolve) })
44
+
39
45
  }
package/src/main.js CHANGED
@@ -3,7 +3,7 @@ import all from 'vue-client/src/all'
3
3
  import App from './App'
4
4
  import system from 'system-clients/src/system'
5
5
  import sale from './sale'
6
- import FilialeSale from './filiale/huaran/sale'
6
+ import FilialeSale from './filiale/beifangshiye/sale'
7
7
  import address from 'address-client/src/address'
8
8
  import ldap from 'ldap-clients/src/ldap'
9
9
  import VueClipboard from 'vue-clipboard2'