sale-client 3.5.250 → 3.5.252
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/build/dev-server.js +104 -104
- package/package.json +1 -1
- package/src/components/revenue/base/rightview/RecordCancel.vue +2 -0
- package/src/filiale/kelai/GarbageCharge.vue +4 -3
- package/src/filiale/kelai/MeterinfoTest.vue +5 -2
- package/src/filiale/rongcheng/RecordCancel.vue +314 -314
- package/src/filiale/wenxi/plugins/FileManageService.js +3 -1
- package/src/filiale/xiangyun/IOTRefund.vue +4 -0
- package/src/filiale/xiangyun/RefundManage.vue +11 -3
- package/src/filiale/xiangyun/cardHistoryRefund.vue +215 -0
- package/src/main.js +27 -27
package/build/dev-server.js
CHANGED
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
var path = require('path')
|
|
2
|
-
const [localUrl, serverRul] = ['http://
|
|
3
|
-
var merge = require('webpack-merge')
|
|
4
|
-
var baseConfig = require('./webpack.dev.conf')
|
|
5
|
-
var devConfig = {
|
|
6
|
-
devServer: {
|
|
7
|
-
contentBase: path.join(__dirname, 'src'),
|
|
8
|
-
hot: true,
|
|
9
|
-
publicPath: baseConfig.output.publicPath,
|
|
10
|
-
historyApiFallback: true,
|
|
11
|
-
port: 8089,
|
|
12
|
-
open: true,
|
|
13
|
-
stats: {
|
|
14
|
-
colors: false, // 配置控制台输出彩色日志
|
|
15
|
-
chunks: false, // 不输出构建 chunk 信息
|
|
16
|
-
children: false // 不输出子模块构建信息
|
|
17
|
-
},
|
|
18
|
-
proxy: {
|
|
19
|
-
'/rs/file': {
|
|
20
|
-
target: serverRul
|
|
21
|
-
},
|
|
22
|
-
// 查找资源服务数据
|
|
23
|
-
'/rs/search': {
|
|
24
|
-
target: serverRul
|
|
25
|
-
},
|
|
26
|
-
'/rs/sql/sale_getUser': {
|
|
27
|
-
target:
|
|
28
|
-
},
|
|
29
|
-
'/rs/logic/chargeCancel': {
|
|
30
|
-
target:
|
|
31
|
-
},
|
|
32
|
-
'/rs/sql/gasCancel': {
|
|
33
|
-
target:
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
'/rs/logic/marginCharge': {
|
|
37
|
-
target:
|
|
38
|
-
},
|
|
39
|
-
'/rs/logic/sale_cardCharge_logic': {
|
|
40
|
-
target:
|
|
41
|
-
},
|
|
42
|
-
|
|
43
|
-
'/rs/logic/getOperBtns': {
|
|
44
|
-
target:
|
|
45
|
-
},
|
|
46
|
-
'/rs/logic/commonCal': {
|
|
47
|
-
target:
|
|
48
|
-
},
|
|
49
|
-
// 查找资源服务数据
|
|
50
|
-
'/rs/logic/getLogin': {
|
|
51
|
-
target: serverRul
|
|
52
|
-
},
|
|
53
|
-
// 查找资源服务数据
|
|
54
|
-
'/rs/logic/getInitData': {
|
|
55
|
-
target: serverRul
|
|
56
|
-
},
|
|
57
|
-
'/rs/logic/getSaleInitData': {
|
|
58
|
-
target: serverRul
|
|
59
|
-
},
|
|
60
|
-
// 用户登录服务地址
|
|
61
|
-
'/rs/user': {
|
|
62
|
-
target: serverRul
|
|
63
|
-
},
|
|
64
|
-
'/rs/path': {
|
|
65
|
-
target: serverRul
|
|
66
|
-
},
|
|
67
|
-
'/rs/data': {
|
|
68
|
-
target: serverRul
|
|
69
|
-
},
|
|
70
|
-
'/rs/license': {
|
|
71
|
-
target: serverRul
|
|
72
|
-
},
|
|
73
|
-
'/rs/db': {
|
|
74
|
-
target: serverRul
|
|
75
|
-
},
|
|
76
|
-
'/excel': {
|
|
77
|
-
target: serverRul
|
|
78
|
-
},
|
|
79
|
-
'/rs/config': {
|
|
80
|
-
target: serverRul
|
|
81
|
-
},
|
|
82
|
-
'/rs/report': {
|
|
83
|
-
target: serverRul
|
|
84
|
-
},
|
|
85
|
-
'/rs/vue': {
|
|
86
|
-
target: serverRul
|
|
87
|
-
},
|
|
88
|
-
'/rs/logic': {
|
|
89
|
-
target: localUrl
|
|
90
|
-
},
|
|
91
|
-
'/rs/sql': {
|
|
92
|
-
target: localUrl
|
|
93
|
-
},
|
|
94
|
-
'/webmeter': {
|
|
95
|
-
target: serverRul
|
|
96
|
-
},
|
|
97
|
-
'/rs': {
|
|
98
|
-
target: serverRul
|
|
99
|
-
// changeOrigin: true
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
module.exports = merge(baseConfig, devConfig)
|
|
1
|
+
var path = require('path')
|
|
2
|
+
const [localUrl, serverRul] = ['http://127.0.0.1:8080', 'http://192.168.50.4:8400']
|
|
3
|
+
var merge = require('webpack-merge')
|
|
4
|
+
var baseConfig = require('./webpack.dev.conf')
|
|
5
|
+
var devConfig = {
|
|
6
|
+
devServer: {
|
|
7
|
+
contentBase: path.join(__dirname, 'src'),
|
|
8
|
+
hot: true,
|
|
9
|
+
publicPath: baseConfig.output.publicPath,
|
|
10
|
+
historyApiFallback: true,
|
|
11
|
+
port: 8089,
|
|
12
|
+
open: true,
|
|
13
|
+
stats: {
|
|
14
|
+
colors: false, // 配置控制台输出彩色日志
|
|
15
|
+
chunks: false, // 不输出构建 chunk 信息
|
|
16
|
+
children: false // 不输出子模块构建信息
|
|
17
|
+
},
|
|
18
|
+
proxy: {
|
|
19
|
+
'/rs/file': {
|
|
20
|
+
target: serverRul
|
|
21
|
+
},
|
|
22
|
+
// 查找资源服务数据
|
|
23
|
+
'/rs/search': {
|
|
24
|
+
target: serverRul
|
|
25
|
+
},
|
|
26
|
+
'/rs/sql/sale_getUser': {
|
|
27
|
+
target: localUrl
|
|
28
|
+
},
|
|
29
|
+
'/rs/logic/chargeCancel': {
|
|
30
|
+
target: localUrl
|
|
31
|
+
},
|
|
32
|
+
'/rs/sql/gasCancel': {
|
|
33
|
+
target: localUrl
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
'/rs/logic/marginCharge': {
|
|
37
|
+
target: localUrl
|
|
38
|
+
},
|
|
39
|
+
'/rs/logic/sale_cardCharge_logic': {
|
|
40
|
+
target: localUrl
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
'/rs/logic/getOperBtns': {
|
|
44
|
+
target: localUrl
|
|
45
|
+
},
|
|
46
|
+
'/rs/logic/commonCal': {
|
|
47
|
+
target: localUrl
|
|
48
|
+
},
|
|
49
|
+
// 查找资源服务数据
|
|
50
|
+
'/rs/logic/getLogin': {
|
|
51
|
+
target: serverRul
|
|
52
|
+
},
|
|
53
|
+
// 查找资源服务数据
|
|
54
|
+
'/rs/logic/getInitData': {
|
|
55
|
+
target: serverRul
|
|
56
|
+
},
|
|
57
|
+
'/rs/logic/getSaleInitData': {
|
|
58
|
+
target: serverRul
|
|
59
|
+
},
|
|
60
|
+
// 用户登录服务地址
|
|
61
|
+
'/rs/user': {
|
|
62
|
+
target: serverRul
|
|
63
|
+
},
|
|
64
|
+
'/rs/path': {
|
|
65
|
+
target: serverRul
|
|
66
|
+
},
|
|
67
|
+
'/rs/data': {
|
|
68
|
+
target: serverRul
|
|
69
|
+
},
|
|
70
|
+
'/rs/license': {
|
|
71
|
+
target: serverRul
|
|
72
|
+
},
|
|
73
|
+
'/rs/db': {
|
|
74
|
+
target: serverRul
|
|
75
|
+
},
|
|
76
|
+
'/excel': {
|
|
77
|
+
target: serverRul
|
|
78
|
+
},
|
|
79
|
+
'/rs/config': {
|
|
80
|
+
target: serverRul
|
|
81
|
+
},
|
|
82
|
+
'/rs/report': {
|
|
83
|
+
target: serverRul
|
|
84
|
+
},
|
|
85
|
+
'/rs/vue': {
|
|
86
|
+
target: serverRul
|
|
87
|
+
},
|
|
88
|
+
'/rs/logic': {
|
|
89
|
+
target: localUrl
|
|
90
|
+
},
|
|
91
|
+
'/rs/sql': {
|
|
92
|
+
target: localUrl
|
|
93
|
+
},
|
|
94
|
+
'/webmeter': {
|
|
95
|
+
target: serverRul
|
|
96
|
+
},
|
|
97
|
+
'/rs': {
|
|
98
|
+
target: serverRul
|
|
99
|
+
// changeOrigin: true
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
module.exports = merge(baseConfig, devConfig)
|
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<label class="font_normal_body" title="参数名称:付款方式">收款方式</label>
|
|
8
8
|
<input type="text" v-show="false" v-model="$refs.payment.selectedItems"
|
|
9
9
|
v-validate:payment='{required: true }'>
|
|
10
|
-
<v-select v-model="f_payment"
|
|
10
|
+
<v-select v-model="model.f_payment"
|
|
11
11
|
placeholder='请选择'
|
|
12
12
|
style="width:60%"
|
|
13
13
|
:value.sync="model.f_payment"
|
|
@@ -91,7 +91,7 @@ export default {
|
|
|
91
91
|
hasBillManage: false, // 默认不启用发票管理
|
|
92
92
|
overBalance: false, // 为true时退费金额可以大于余额
|
|
93
93
|
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
94
|
-
payment: '
|
|
94
|
+
payment: '现金',
|
|
95
95
|
billType: '燃气费'
|
|
96
96
|
},
|
|
97
97
|
model: {
|
|
@@ -144,7 +144,8 @@ export default {
|
|
|
144
144
|
f_orgid: this.$login.f.orgid,
|
|
145
145
|
f_orgname: this.$login.f.orgs,
|
|
146
146
|
f_depid: this.$login.f.depids,
|
|
147
|
-
f_depname: this.$login.f.deps
|
|
147
|
+
f_depname: this.$login.f.deps,
|
|
148
|
+
f_payment: this.model.f_payment[0]
|
|
148
149
|
}
|
|
149
150
|
console.log('垃圾费收费', param)
|
|
150
151
|
let res = await this.$resetpost('rs/logic/garbageCharges', {data: param}, {warnMsg: `确定要对用户${this.row.f_user_name}进行垃圾费收费吗?`, resolveMsg: '收费成功!!', rejectMsg: '收费失败!!请重试!!'})
|
|
@@ -287,11 +287,14 @@
|
|
|
287
287
|
:show-reset-button="true">
|
|
288
288
|
</datepicker>
|
|
289
289
|
</div>
|
|
290
|
-
<div class="col-sm-4 form-group">
|
|
290
|
+
<div class="col-sm-4 form-group" :class="[$m.fee.required ? 'select-error' : '']">
|
|
291
291
|
<label for="gasmodel" class="font_normal_body"> 垃 圾 费</label>
|
|
292
292
|
<v-select :value.sync="row.f_garbage_fee" :options='garbagefee' placeholder='垃圾费' close-on-select
|
|
293
293
|
:value-single="true"
|
|
294
|
-
v-model='row.f_garbage_fee'
|
|
294
|
+
v-model='row.f_garbage_fee'
|
|
295
|
+
v-ref:fee >
|
|
296
|
+
</v-select>
|
|
297
|
+
<input type="text" v-show="false" v-model="$refs.fee.selectedItems" v-validate:fee='{required: true }'>
|
|
295
298
|
</div>
|
|
296
299
|
<div class="col-sm-4 form-group">
|
|
297
300
|
<label class="font_normal_body"> 抄 表 员</label>
|
|
@@ -1,314 +1,314 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="auto">
|
|
3
|
-
<modal :show.sync="show" v-ref:modal large backdrop="false">
|
|
4
|
-
<header slot="modal-header" class="modal-header" style="text-align: center">
|
|
5
|
-
<h4 class="modal-title">{{data.type}}撤销</h4>
|
|
6
|
-
</header>
|
|
7
|
-
<article slot="modal-body" class="modal-body">
|
|
8
|
-
<validator name='v'>
|
|
9
|
-
<form class="form-horizontal select-overspread">
|
|
10
|
-
<div class="form-group" v-if="config.hasBillManage">
|
|
11
|
-
<label class=" col-sm-2 control-label">发票撤销类型:</label>
|
|
12
|
-
<div class="col-sm-2">
|
|
13
|
-
<v-select v-model="f_cancel_type"
|
|
14
|
-
placeholder='请选择'
|
|
15
|
-
:value.sync="model.f_cancel_type"
|
|
16
|
-
:options='cancelTypes'
|
|
17
|
-
@change='cancelTypeChange'
|
|
18
|
-
:value-single="true"
|
|
19
|
-
close-on-select clear-button>
|
|
20
|
-
</v-select>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="form-group" :class="[$v.f_cancel_reason.required ? 'has-error' : 'has-success']">
|
|
24
|
-
<label for="f_cancel_reason" class=" col-sm-2 control-label">撤销原因:</label>
|
|
25
|
-
<div class="col-sm-8">
|
|
26
|
-
<textarea class="form-control" v-model="model.f_cancel_reason" rows="3"
|
|
27
|
-
placeholder="请填写原因" v-validate:f_cancel_reason='{required: true}'></textarea>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="form-group" :class="[$v.payment.required ? 'has-error' : '']"
|
|
31
|
-
v-if="data.type ==='物联网收费'|| data.type === '机表收费' || data.type === '卡表收费'|| data.type === '超用收费' || data.type === '发卡售气'|| data.type === '其他收费' ">
|
|
32
|
-
<label class="col-sm-2 font_normal_body" title="参数名称:付款方式">收款方式:</label>
|
|
33
|
-
<input type="text" v-show="false" v-model="$refs.payment.selectedItems"
|
|
34
|
-
v-validate:payment='{required: true }'>
|
|
35
|
-
<div class="col-sm-4">
|
|
36
|
-
<v-select v-model="f_payment"
|
|
37
|
-
placeholder='请选择'
|
|
38
|
-
:value.sync="model.f_payment"
|
|
39
|
-
:options='paytype' clear-button v-ref:payment></v-select></div>
|
|
40
|
-
</div>
|
|
41
|
-
<validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
|
|
42
|
-
<upload v-if="file" :blodid="blodid" cols="col-sm-12" isremark="true" fusetype="签字图片"></upload>
|
|
43
|
-
|
|
44
|
-
</form>
|
|
45
|
-
</validator>
|
|
46
|
-
</article>
|
|
47
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
48
|
-
<button class="btn btn-success" @click="confirm()" :disabled="!$v.valid">确认</button>
|
|
49
|
-
<button class="btn btn-default" @click="clean()">取消</button>
|
|
50
|
-
</footer>
|
|
51
|
-
|
|
52
|
-
</modal>
|
|
53
|
-
<correct-bill :show="print" :bill-config='config' :bill-data='billData'
|
|
54
|
-
@printok="printok" @toggle="printCancel" :data='printModel' v-ref:printbill ></correct-bill>
|
|
55
|
-
|
|
56
|
-
</div>
|
|
57
|
-
</template>
|
|
58
|
-
|
|
59
|
-
<script>
|
|
60
|
-
import {HttpResetClass} from 'vue-client'
|
|
61
|
-
let postGen = async function (self, name) {
|
|
62
|
-
let url = 'rs/logic/' + name
|
|
63
|
-
debugger
|
|
64
|
-
|
|
65
|
-
// 获取冲正后的记录
|
|
66
|
-
let res = await self.$CancelService.cancel(url, self.model, self.data)
|
|
67
|
-
console.log('冲正后的记录。。', res, self.model)
|
|
68
|
-
|
|
69
|
-
// 判断需不需要判断冲正发票(发票管理)
|
|
70
|
-
if (self.config.hasPrint) {
|
|
71
|
-
if (self.model.f_cancel_type === 'newBill') {
|
|
72
|
-
// 显示发票信息,
|
|
73
|
-
self.printModel.id = res.data.record
|
|
74
|
-
self.printModel.f_type = res.data.type
|
|
75
|
-
self.printModel.f_use_type = self.model.f_use_type
|
|
76
|
-
self.billData.url = self.getBillUrl(self.data.type)
|
|
77
|
-
self.print = true
|
|
78
|
-
} else if (self.model.f_cancel_type === 'abort') {
|
|
79
|
-
await self.$CommonService.correctPaperBill(res.data.record, res.data.type, null, null, 'abort')
|
|
80
|
-
self.$dispatch('cancel-success')
|
|
81
|
-
}
|
|
82
|
-
} else {
|
|
83
|
-
self.$dispatch('cancel-success')
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// 判断需不需要冲正电子票
|
|
87
|
-
// if (self.isNeedEticket(getRecord.data, self.data.type)) {
|
|
88
|
-
// console.log('冲正打票,', getRecord.data.id, self.data.type)
|
|
89
|
-
// let getEticket = await self.$resetpost('rs/sql/singleTable', {
|
|
90
|
-
// data: {
|
|
91
|
-
// tablename: 't_eticket',
|
|
92
|
-
// condition: `f_sell_id = '${getRecord.data.id}' and f_type = '${self.data.type}'`
|
|
93
|
-
// }
|
|
94
|
-
// }, {resolveMsg: null, rejectMsg: '获取电子票明细失败!!'})
|
|
95
|
-
// console.log('获取电子票信息', getEticket)
|
|
96
|
-
// if (getEticket.data.length > 0) {
|
|
97
|
-
// await self.$CommonService.correctEticket(getRecord.data.id, self.data.type)
|
|
98
|
-
// }
|
|
99
|
-
// }
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
let readyGen = async function (self) {
|
|
103
|
-
self.blodid = self.data.id
|
|
104
|
-
await self.$getConfig(self, 'RecordCancel')
|
|
105
|
-
console.log('冲正业务config', self.config)
|
|
106
|
-
// 验证是否是卡表,如果是卡表提示卡表需要读卡撤销
|
|
107
|
-
console.log('卡看看有没有是卡表的标识', self.data)
|
|
108
|
-
|
|
109
|
-
// 查询获取表状态
|
|
110
|
-
let res = await self.$resetpost('rs/sql/sale_getUserfilesDetail', {
|
|
111
|
-
data: {
|
|
112
|
-
condition: `f_userfiles_id = '${self.data.f_userfiles_id}'`
|
|
113
|
-
}
|
|
114
|
-
}, {resolveMsg: null, rejectMsg: '获取客户信息失败'})
|
|
115
|
-
|
|
116
|
-
if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
|
|
117
|
-
self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
|
|
118
|
-
self.$dispatch('cancel')
|
|
119
|
-
}
|
|
120
|
-
if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
|
|
121
|
-
self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
|
|
122
|
-
self.$dispatch('cancel')
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
|
|
126
|
-
self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
|
|
127
|
-
self.$dispatch('cancel')
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// 获取原来收费记录使用的发票类型
|
|
131
|
-
let param = {
|
|
132
|
-
id: self.data.id,
|
|
133
|
-
type: self.data.type
|
|
134
|
-
}
|
|
135
|
-
let oldUseType = await self.$resetpost('rs/logic/sale_getOldUseType', {data: param}, {resolveMsg: null, rejectMsg: '获取原始票据信息出错!!'})
|
|
136
|
-
console.log('获取原始票据信息。。。', oldUseType)
|
|
137
|
-
if (self.config.hasBillManage && self.config.cancelType === 'newBill' && oldUseType.data.billtype) {
|
|
138
|
-
self.model.f_use_type = oldUseType.data.f_use_type
|
|
139
|
-
self.model.f_bill_type = [oldUseType.data.billtype]
|
|
140
|
-
self.hasValidateBill = self.config.hasBillManage
|
|
141
|
-
}
|
|
142
|
-
self.model.f_cancel_type = self.config.cancelType
|
|
143
|
-
if (self.data.type === '物联网收费' || self.data.type === '机表收费' || self.data.type === '卡表收费' || self.data.type === '超用收费' || self.data.type === '发卡售气') {
|
|
144
|
-
let getWebHand = await self.$SqlService.singleTable('t_sellinggas', `id = '${self.data.id}'`)
|
|
145
|
-
console.log('-----a--a-a-a-a-a-', getWebHand)
|
|
146
|
-
self.model.f_payment = [getWebHand.data[0].f_payment]
|
|
147
|
-
}
|
|
148
|
-
if (self.data.type === '其他收费') {
|
|
149
|
-
let getWebHand = await self.$SqlService.singleTable('t_othercharge', `id = '${self.data.id}'`)
|
|
150
|
-
console.log('-----a--a-a-a-a-a-', getWebHand)
|
|
151
|
-
self.model.f_payment = [getWebHand.data[0].f_payment]
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
export default {
|
|
156
|
-
props: ['show', 'data', 'file'],
|
|
157
|
-
title: '操作撤销',
|
|
158
|
-
data () {
|
|
159
|
-
return {
|
|
160
|
-
config: {
|
|
161
|
-
hasPrint: true,
|
|
162
|
-
hasBillManage: true, // 默认不启用发票管理
|
|
163
|
-
cancelType: 'newBill'
|
|
164
|
-
},
|
|
165
|
-
blodid: '',
|
|
166
|
-
model: {
|
|
167
|
-
f_cancel_type: '',
|
|
168
|
-
f_cancel_reason: '',
|
|
169
|
-
f_cancel_name: this.$login.f.name,
|
|
170
|
-
f_operator: this.$login.f.name,
|
|
171
|
-
f_operatorid: this.$login.f.id,
|
|
172
|
-
f_orgid: this.$login.f.orgid,
|
|
173
|
-
f_orgname: this.$login.f.orgs,
|
|
174
|
-
f_depid: this.$login.f.depids,
|
|
175
|
-
f_depname: this.$login.f.deps,
|
|
176
|
-
record_id: ''
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
// 发票信息
|
|
180
|
-
printModel: {},
|
|
181
|
-
print: false,
|
|
182
|
-
paytype: this.$appdata.getParam('付款方式'),
|
|
183
|
-
billData: {
|
|
184
|
-
url: '',
|
|
185
|
-
bill: ''
|
|
186
|
-
},
|
|
187
|
-
// 启用发票管理需要对票号进行验证
|
|
188
|
-
hasValidateBill: false,
|
|
189
|
-
validateOk: false
|
|
190
|
-
}
|
|
191
|
-
},
|
|
192
|
-
ready () {
|
|
193
|
-
readyGen(this)
|
|
194
|
-
},
|
|
195
|
-
methods: {
|
|
196
|
-
async confirm () {
|
|
197
|
-
// 整理数据
|
|
198
|
-
let name = this.sortdata()
|
|
199
|
-
// 撤销操作请求
|
|
200
|
-
postGen(this, name)
|
|
201
|
-
},
|
|
202
|
-
clean () {
|
|
203
|
-
this.$dispatch('cancel', this.model)
|
|
204
|
-
},
|
|
205
|
-
// 判断type类型 整理数据
|
|
206
|
-
sortdata () {
|
|
207
|
-
this.model.record_id = this.data.id
|
|
208
|
-
let type = this.data.type
|
|
209
|
-
let name
|
|
210
|
-
// 根据type数据 选择调用的Logic
|
|
211
|
-
if (type === '过户') {
|
|
212
|
-
name = 'transferCancel'
|
|
213
|
-
} else if (type === '换新表' || type === '气表清零') {
|
|
214
|
-
name = 'changemeterCancel'
|
|
215
|
-
} else if (type === '机表收费') {
|
|
216
|
-
name = 'machineChargeCancelPay'
|
|
217
|
-
} else if (type === '物联网收费' || type === '物联网开户' || type === '卡表赠气' || type === '物联网赠费' || type === '卡表赠费' || type === '物联网赠气') {
|
|
218
|
-
name = 'iotMeterChargeCancel'
|
|
219
|
-
} else if (type === '开通') {
|
|
220
|
-
name = 'iotOpenCancel'
|
|
221
|
-
} else if (type === '卡表超用') {
|
|
222
|
-
name = 'cardOverCancel'
|
|
223
|
-
} else if (type === '超用收费') {
|
|
224
|
-
name = 'overuseCancel'
|
|
225
|
-
} else if (type === '其他收费') {
|
|
226
|
-
name = 'otherFeeRollback'
|
|
227
|
-
} else if (type === '维修收费') {
|
|
228
|
-
name = 'otherFeeRollback'
|
|
229
|
-
} else if (type === '补卡') {
|
|
230
|
-
name = 'replaceCardCancel'
|
|
231
|
-
} else if (type === '换表补气') {
|
|
232
|
-
name = 'iotChangeAddGasCancel'
|
|
233
|
-
} else if (type === '调价补费' || type === '调价退费') {
|
|
234
|
-
name = 'compensationCancel'
|
|
235
|
-
} else if (type === '预存缴费') {
|
|
236
|
-
name = 'depositChargeCancel'
|
|
237
|
-
} else if (type === '拆表') {
|
|
238
|
-
name = 'cancelCB'
|
|
239
|
-
} else if (type === '迁表') {
|
|
240
|
-
name = 'cancelmovemeter'
|
|
241
|
-
} else if (type === '气费减免') {
|
|
242
|
-
name = 'machineChargeCancelPay'
|
|
243
|
-
} else {
|
|
244
|
-
return
|
|
245
|
-
}
|
|
246
|
-
return name
|
|
247
|
-
},
|
|
248
|
-
getBillUrl (type) {
|
|
249
|
-
let name = ''
|
|
250
|
-
// 根据type数据 选择调用的Logic
|
|
251
|
-
if (type === '过户') {
|
|
252
|
-
name = 'rs/report/transfer_bill'
|
|
253
|
-
} else if (type === '换表') {
|
|
254
|
-
console.log('看看row..', this.row)
|
|
255
|
-
name = 'rs/report/change_meter'
|
|
256
|
-
} else if (type === '机表收费') {
|
|
257
|
-
name = 'rs/report/machine_bill'
|
|
258
|
-
} else if (type === '物联网收费') {
|
|
259
|
-
name = 'rs/report/pre_sell'
|
|
260
|
-
} else if (type === '超用收费') {
|
|
261
|
-
name = 'rs/report/overuse_bill'
|
|
262
|
-
} else if (type === '其他收费') {
|
|
263
|
-
name = 'rs/report/otherCharge_bill'
|
|
264
|
-
} else if (type === '补卡') {
|
|
265
|
-
name = 'rs/report/replace_sell'
|
|
266
|
-
}
|
|
267
|
-
return name
|
|
268
|
-
},
|
|
269
|
-
isNeedEticket (record, type) {
|
|
270
|
-
// TODO 需要其他类型再继续加
|
|
271
|
-
if (type === '补卡') {
|
|
272
|
-
// 判断卡费是否大于零
|
|
273
|
-
if (record.f_cardfees > 0) {
|
|
274
|
-
return true
|
|
275
|
-
}
|
|
276
|
-
} else if (type === '其他收费') {
|
|
277
|
-
if (record.f_collection > 0) {
|
|
278
|
-
return true
|
|
279
|
-
}
|
|
280
|
-
} else if (type === '超用收费') {
|
|
281
|
-
if (record.f_collection > 0) {
|
|
282
|
-
return true
|
|
283
|
-
}
|
|
284
|
-
} else if (type === '物联网表收费') {
|
|
285
|
-
if (record.f_collection > 0) {
|
|
286
|
-
return true
|
|
287
|
-
}
|
|
288
|
-
}
|
|
289
|
-
return false
|
|
290
|
-
},
|
|
291
|
-
validateBill (val) {
|
|
292
|
-
this.validateOk = !val.isOk
|
|
293
|
-
this.billData.bill = val.bill
|
|
294
|
-
},
|
|
295
|
-
printok () {
|
|
296
|
-
this.$dispatch('cancel-success')
|
|
297
|
-
},
|
|
298
|
-
printCancel () {
|
|
299
|
-
this.$dispatch('cancel')
|
|
300
|
-
},
|
|
301
|
-
cancelTypeChange () {
|
|
302
|
-
console.log('撤销类型。。', this.model)
|
|
303
|
-
if (this.model.f_cancel_type) {
|
|
304
|
-
this.hasValidateBill = this.model.f_cancel_type === 'newBill'
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
},
|
|
308
|
-
computed: {
|
|
309
|
-
cancelTypes () {
|
|
310
|
-
return [{label: '使用新票号', value: 'newBill'}, {label: '旧发票作废', value: 'abort'}]
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto">
|
|
3
|
+
<modal :show.sync="show" v-ref:modal large backdrop="false">
|
|
4
|
+
<header slot="modal-header" class="modal-header" style="text-align: center">
|
|
5
|
+
<h4 class="modal-title">{{data.type}}撤销</h4>
|
|
6
|
+
</header>
|
|
7
|
+
<article slot="modal-body" class="modal-body">
|
|
8
|
+
<validator name='v'>
|
|
9
|
+
<form class="form-horizontal select-overspread">
|
|
10
|
+
<div class="form-group" v-if="config.hasBillManage">
|
|
11
|
+
<label class=" col-sm-2 control-label">发票撤销类型:</label>
|
|
12
|
+
<div class="col-sm-2">
|
|
13
|
+
<v-select v-model="f_cancel_type"
|
|
14
|
+
placeholder='请选择'
|
|
15
|
+
:value.sync="model.f_cancel_type"
|
|
16
|
+
:options='cancelTypes'
|
|
17
|
+
@change='cancelTypeChange'
|
|
18
|
+
:value-single="true"
|
|
19
|
+
close-on-select clear-button>
|
|
20
|
+
</v-select>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="form-group" :class="[$v.f_cancel_reason.required ? 'has-error' : 'has-success']">
|
|
24
|
+
<label for="f_cancel_reason" class=" col-sm-2 control-label">撤销原因:</label>
|
|
25
|
+
<div class="col-sm-8">
|
|
26
|
+
<textarea class="form-control" v-model="model.f_cancel_reason" rows="3"
|
|
27
|
+
placeholder="请填写原因" v-validate:f_cancel_reason='{required: true}'></textarea>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div class="form-group" :class="[$v.payment.required ? 'has-error' : '']"
|
|
31
|
+
v-if="data.type ==='物联网收费'|| data.type === '机表收费' || data.type === '卡表收费'|| data.type === '超用收费' || data.type === '发卡售气'|| data.type === '其他收费' ">
|
|
32
|
+
<label class="col-sm-2 font_normal_body" title="参数名称:付款方式">收款方式:</label>
|
|
33
|
+
<input type="text" v-show="false" v-model="$refs.payment.selectedItems"
|
|
34
|
+
v-validate:payment='{required: true }'>
|
|
35
|
+
<div class="col-sm-4">
|
|
36
|
+
<v-select v-model="f_payment"
|
|
37
|
+
placeholder='请选择'
|
|
38
|
+
:value.sync="model.f_payment"
|
|
39
|
+
:options='paytype' clear-button v-ref:payment></v-select></div>
|
|
40
|
+
</div>
|
|
41
|
+
<validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
|
|
42
|
+
<upload v-if="file" :blodid="blodid" cols="col-sm-12" isremark="true" fusetype="签字图片"></upload>
|
|
43
|
+
|
|
44
|
+
</form>
|
|
45
|
+
</validator>
|
|
46
|
+
</article>
|
|
47
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
48
|
+
<button class="btn btn-success" @click="confirm()" :disabled="!$v.valid">确认</button>
|
|
49
|
+
<button class="btn btn-default" @click="clean()">取消</button>
|
|
50
|
+
</footer>
|
|
51
|
+
|
|
52
|
+
</modal>
|
|
53
|
+
<correct-bill :show="print" :bill-config='config' :bill-data='billData'
|
|
54
|
+
@printok="printok" @toggle="printCancel" :data='printModel' v-ref:printbill ></correct-bill>
|
|
55
|
+
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script>
|
|
60
|
+
import {HttpResetClass} from 'vue-client'
|
|
61
|
+
let postGen = async function (self, name) {
|
|
62
|
+
let url = 'rs/logic/' + name
|
|
63
|
+
debugger
|
|
64
|
+
|
|
65
|
+
// 获取冲正后的记录
|
|
66
|
+
let res = await self.$CancelService.cancel(url, self.model, self.data)
|
|
67
|
+
console.log('冲正后的记录。。', res, self.model)
|
|
68
|
+
|
|
69
|
+
// 判断需不需要判断冲正发票(发票管理)
|
|
70
|
+
if (self.config.hasPrint) {
|
|
71
|
+
if (self.model.f_cancel_type === 'newBill') {
|
|
72
|
+
// 显示发票信息,
|
|
73
|
+
self.printModel.id = res.data.record
|
|
74
|
+
self.printModel.f_type = res.data.type
|
|
75
|
+
self.printModel.f_use_type = self.model.f_use_type
|
|
76
|
+
self.billData.url = self.getBillUrl(self.data.type)
|
|
77
|
+
self.print = true
|
|
78
|
+
} else if (self.model.f_cancel_type === 'abort') {
|
|
79
|
+
await self.$CommonService.correctPaperBill(res.data.record, res.data.type, null, null, 'abort')
|
|
80
|
+
self.$dispatch('cancel-success')
|
|
81
|
+
}
|
|
82
|
+
} else {
|
|
83
|
+
self.$dispatch('cancel-success')
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// 判断需不需要冲正电子票
|
|
87
|
+
// if (self.isNeedEticket(getRecord.data, self.data.type)) {
|
|
88
|
+
// console.log('冲正打票,', getRecord.data.id, self.data.type)
|
|
89
|
+
// let getEticket = await self.$resetpost('rs/sql/singleTable', {
|
|
90
|
+
// data: {
|
|
91
|
+
// tablename: 't_eticket',
|
|
92
|
+
// condition: `f_sell_id = '${getRecord.data.id}' and f_type = '${self.data.type}'`
|
|
93
|
+
// }
|
|
94
|
+
// }, {resolveMsg: null, rejectMsg: '获取电子票明细失败!!'})
|
|
95
|
+
// console.log('获取电子票信息', getEticket)
|
|
96
|
+
// if (getEticket.data.length > 0) {
|
|
97
|
+
// await self.$CommonService.correctEticket(getRecord.data.id, self.data.type)
|
|
98
|
+
// }
|
|
99
|
+
// }
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
let readyGen = async function (self) {
|
|
103
|
+
self.blodid = self.data.id
|
|
104
|
+
await self.$getConfig(self, 'RecordCancel')
|
|
105
|
+
console.log('冲正业务config', self.config)
|
|
106
|
+
// 验证是否是卡表,如果是卡表提示卡表需要读卡撤销
|
|
107
|
+
console.log('卡看看有没有是卡表的标识', self.data)
|
|
108
|
+
|
|
109
|
+
// 查询获取表状态
|
|
110
|
+
let res = await self.$resetpost('rs/sql/sale_getUserfilesDetail', {
|
|
111
|
+
data: {
|
|
112
|
+
condition: `f_userfiles_id = '${self.data.f_userfiles_id}'`
|
|
113
|
+
}
|
|
114
|
+
}, {resolveMsg: null, rejectMsg: '获取客户信息失败'})
|
|
115
|
+
|
|
116
|
+
if (res.data[0].f_meter_type.includes('卡表') && self.data.type === '换表补气') {
|
|
117
|
+
self.$showAlert(`您这是${res.data[0].f_meter_type}客户,撤销需要进行读卡撤销。`, 'warning', 5000)
|
|
118
|
+
self.$dispatch('cancel')
|
|
119
|
+
}
|
|
120
|
+
if (res.data[0].f_meter_type.includes('机表') && self.data.type === '换表补气') {
|
|
121
|
+
self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
|
|
122
|
+
self.$dispatch('cancel')
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (res.data[0].f_meter_type.includes('物联网表') && (self.data.type === '' || self.data.type === '气表清零')) {
|
|
126
|
+
self.$showAlert(`您这是${res.data[0].f_meter_type}客户,暂不支持撤销。`, 'warning', 5000)
|
|
127
|
+
self.$dispatch('cancel')
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// 获取原来收费记录使用的发票类型
|
|
131
|
+
let param = {
|
|
132
|
+
id: self.data.id,
|
|
133
|
+
type: self.data.type
|
|
134
|
+
}
|
|
135
|
+
let oldUseType = await self.$resetpost('rs/logic/sale_getOldUseType', {data: param}, {resolveMsg: null, rejectMsg: '获取原始票据信息出错!!'})
|
|
136
|
+
console.log('获取原始票据信息。。。', oldUseType)
|
|
137
|
+
if (self.config.hasBillManage && self.config.cancelType === 'newBill' && oldUseType.data.billtype) {
|
|
138
|
+
self.model.f_use_type = oldUseType.data.f_use_type
|
|
139
|
+
self.model.f_bill_type = [oldUseType.data.billtype]
|
|
140
|
+
self.hasValidateBill = self.config.hasBillManage
|
|
141
|
+
}
|
|
142
|
+
self.model.f_cancel_type = self.config.cancelType
|
|
143
|
+
if (self.data.type === '物联网收费' || self.data.type === '机表收费' || self.data.type === '卡表收费' || self.data.type === '超用收费' || self.data.type === '发卡售气') {
|
|
144
|
+
let getWebHand = await self.$SqlService.singleTable('t_sellinggas', `id = '${self.data.id}'`)
|
|
145
|
+
console.log('-----a--a-a-a-a-a-', getWebHand)
|
|
146
|
+
self.model.f_payment = [getWebHand.data[0].f_payment]
|
|
147
|
+
}
|
|
148
|
+
if (self.data.type === '其他收费') {
|
|
149
|
+
let getWebHand = await self.$SqlService.singleTable('t_othercharge', `id = '${self.data.id}'`)
|
|
150
|
+
console.log('-----a--a-a-a-a-a-', getWebHand)
|
|
151
|
+
self.model.f_payment = [getWebHand.data[0].f_payment]
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
export default {
|
|
156
|
+
props: ['show', 'data', 'file'],
|
|
157
|
+
title: '操作撤销',
|
|
158
|
+
data () {
|
|
159
|
+
return {
|
|
160
|
+
config: {
|
|
161
|
+
hasPrint: true,
|
|
162
|
+
hasBillManage: true, // 默认不启用发票管理
|
|
163
|
+
cancelType: 'newBill'
|
|
164
|
+
},
|
|
165
|
+
blodid: '',
|
|
166
|
+
model: {
|
|
167
|
+
f_cancel_type: '',
|
|
168
|
+
f_cancel_reason: '',
|
|
169
|
+
f_cancel_name: this.$login.f.name,
|
|
170
|
+
f_operator: this.$login.f.name,
|
|
171
|
+
f_operatorid: this.$login.f.id,
|
|
172
|
+
f_orgid: this.$login.f.orgid,
|
|
173
|
+
f_orgname: this.$login.f.orgs,
|
|
174
|
+
f_depid: this.$login.f.depids,
|
|
175
|
+
f_depname: this.$login.f.deps,
|
|
176
|
+
record_id: ''
|
|
177
|
+
},
|
|
178
|
+
|
|
179
|
+
// 发票信息
|
|
180
|
+
printModel: {},
|
|
181
|
+
print: false,
|
|
182
|
+
paytype: this.$appdata.getParam('付款方式'),
|
|
183
|
+
billData: {
|
|
184
|
+
url: '',
|
|
185
|
+
bill: ''
|
|
186
|
+
},
|
|
187
|
+
// 启用发票管理需要对票号进行验证
|
|
188
|
+
hasValidateBill: false,
|
|
189
|
+
validateOk: false
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
ready () {
|
|
193
|
+
readyGen(this)
|
|
194
|
+
},
|
|
195
|
+
methods: {
|
|
196
|
+
async confirm () {
|
|
197
|
+
// 整理数据
|
|
198
|
+
let name = this.sortdata()
|
|
199
|
+
// 撤销操作请求
|
|
200
|
+
postGen(this, name)
|
|
201
|
+
},
|
|
202
|
+
clean () {
|
|
203
|
+
this.$dispatch('cancel', this.model)
|
|
204
|
+
},
|
|
205
|
+
// 判断type类型 整理数据
|
|
206
|
+
sortdata () {
|
|
207
|
+
this.model.record_id = this.data.id
|
|
208
|
+
let type = this.data.type
|
|
209
|
+
let name
|
|
210
|
+
// 根据type数据 选择调用的Logic
|
|
211
|
+
if (type === '过户') {
|
|
212
|
+
name = 'transferCancel'
|
|
213
|
+
} else if (type === '换新表' || type === '气表清零') {
|
|
214
|
+
name = 'changemeterCancel'
|
|
215
|
+
} else if (type === '机表收费') {
|
|
216
|
+
name = 'machineChargeCancelPay'
|
|
217
|
+
} else if (type === '物联网收费' || type === '物联网开户' || type === '卡表赠气' || type === '物联网赠费' || type === '卡表赠费' || type === '物联网赠气') {
|
|
218
|
+
name = 'iotMeterChargeCancel'
|
|
219
|
+
} else if (type === '开通') {
|
|
220
|
+
name = 'iotOpenCancel'
|
|
221
|
+
} else if (type === '卡表超用') {
|
|
222
|
+
name = 'cardOverCancel'
|
|
223
|
+
} else if (type === '超用收费') {
|
|
224
|
+
name = 'overuseCancel'
|
|
225
|
+
} else if (type === '其他收费') {
|
|
226
|
+
name = 'otherFeeRollback'
|
|
227
|
+
} else if (type === '维修收费') {
|
|
228
|
+
name = 'otherFeeRollback'
|
|
229
|
+
} else if (type === '补卡') {
|
|
230
|
+
name = 'replaceCardCancel'
|
|
231
|
+
} else if (type === '换表补气') {
|
|
232
|
+
name = 'iotChangeAddGasCancel'
|
|
233
|
+
} else if (type === '调价补费' || type === '调价退费') {
|
|
234
|
+
name = 'compensationCancel'
|
|
235
|
+
} else if (type === '预存缴费') {
|
|
236
|
+
name = 'depositChargeCancel'
|
|
237
|
+
} else if (type === '拆表') {
|
|
238
|
+
name = 'cancelCB'
|
|
239
|
+
} else if (type === '迁表') {
|
|
240
|
+
name = 'cancelmovemeter'
|
|
241
|
+
} else if (type === '气费减免') {
|
|
242
|
+
name = 'machineChargeCancelPay'
|
|
243
|
+
} else {
|
|
244
|
+
return
|
|
245
|
+
}
|
|
246
|
+
return name
|
|
247
|
+
},
|
|
248
|
+
getBillUrl (type) {
|
|
249
|
+
let name = ''
|
|
250
|
+
// 根据type数据 选择调用的Logic
|
|
251
|
+
if (type === '过户') {
|
|
252
|
+
name = 'rs/report/transfer_bill'
|
|
253
|
+
} else if (type === '换表') {
|
|
254
|
+
console.log('看看row..', this.row)
|
|
255
|
+
name = 'rs/report/change_meter'
|
|
256
|
+
} else if (type === '机表收费') {
|
|
257
|
+
name = 'rs/report/machine_bill'
|
|
258
|
+
} else if (type === '物联网收费') {
|
|
259
|
+
name = 'rs/report/pre_sell'
|
|
260
|
+
} else if (type === '超用收费') {
|
|
261
|
+
name = 'rs/report/overuse_bill'
|
|
262
|
+
} else if (type === '其他收费') {
|
|
263
|
+
name = 'rs/report/otherCharge_bill'
|
|
264
|
+
} else if (type === '补卡') {
|
|
265
|
+
name = 'rs/report/replace_sell'
|
|
266
|
+
}
|
|
267
|
+
return name
|
|
268
|
+
},
|
|
269
|
+
isNeedEticket (record, type) {
|
|
270
|
+
// TODO 需要其他类型再继续加
|
|
271
|
+
if (type === '补卡') {
|
|
272
|
+
// 判断卡费是否大于零
|
|
273
|
+
if (record.f_cardfees > 0) {
|
|
274
|
+
return true
|
|
275
|
+
}
|
|
276
|
+
} else if (type === '其他收费') {
|
|
277
|
+
if (record.f_collection > 0) {
|
|
278
|
+
return true
|
|
279
|
+
}
|
|
280
|
+
} else if (type === '超用收费') {
|
|
281
|
+
if (record.f_collection > 0) {
|
|
282
|
+
return true
|
|
283
|
+
}
|
|
284
|
+
} else if (type === '物联网表收费') {
|
|
285
|
+
if (record.f_collection > 0) {
|
|
286
|
+
return true
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
return false
|
|
290
|
+
},
|
|
291
|
+
validateBill (val) {
|
|
292
|
+
this.validateOk = !val.isOk
|
|
293
|
+
this.billData.bill = val.bill
|
|
294
|
+
},
|
|
295
|
+
printok () {
|
|
296
|
+
this.$dispatch('cancel-success')
|
|
297
|
+
},
|
|
298
|
+
printCancel () {
|
|
299
|
+
this.$dispatch('cancel')
|
|
300
|
+
},
|
|
301
|
+
cancelTypeChange () {
|
|
302
|
+
console.log('撤销类型。。', this.model)
|
|
303
|
+
if (this.model.f_cancel_type) {
|
|
304
|
+
this.hasValidateBill = this.model.f_cancel_type === 'newBill'
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
},
|
|
308
|
+
computed: {
|
|
309
|
+
cancelTypes () {
|
|
310
|
+
return [{label: '使用新票号', value: 'newBill'}, {label: '旧发票作废', value: 'abort'}]
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
</script>
|
|
@@ -149,7 +149,9 @@ let FileManageService = {
|
|
|
149
149
|
if (meter.gasmodel[0] == null) {
|
|
150
150
|
meter.f_gasmodel_id = ''
|
|
151
151
|
} else {
|
|
152
|
-
|
|
152
|
+
if (meter.gasmodel[0].id != null) {
|
|
153
|
+
meter.f_gasmodel_id = meter.gasmodel[0].id
|
|
154
|
+
}
|
|
153
155
|
}
|
|
154
156
|
|
|
155
157
|
if (meter.gasbrand[0] == null) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<div class="auto">
|
|
3
3
|
<div style="float: right">
|
|
4
4
|
<button @click="getQueryData()" class="button_search" >获取数据</button>
|
|
5
|
+
<button @click="changeChoose()" class="button_search" >历史卡表收费</button>
|
|
5
6
|
</div>
|
|
6
7
|
<validator name='v'>
|
|
7
8
|
<form novalidate class="form-horizontal">
|
|
@@ -183,6 +184,9 @@
|
|
|
183
184
|
})
|
|
184
185
|
this.$dispatch('success')
|
|
185
186
|
},
|
|
187
|
+
changeChoose () {
|
|
188
|
+
this.$dispatch('changeChoose')
|
|
189
|
+
},
|
|
186
190
|
async getQueryData () {
|
|
187
191
|
await this.$resetpost('rs/sql/machineRefundQuery', {
|
|
188
192
|
data: {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="auto">
|
|
3
3
|
<card-refund v-if="row.f_meter_type.indexOf( '卡表')>0" :data="row"></card-refund>
|
|
4
|
-
<
|
|
4
|
+
<card-history-refund v-if="row.f_meter_type === '物联网表' && all == 'history'" :data="row"></card-history-refund>
|
|
5
|
+
<iot-refund v-if="row.f_meter_type === '物联网表' && all == 'now'" :data="row"></iot-refund>
|
|
5
6
|
<machine-Refund v-if="row.f_meter_type === '机表'" :data="row"></machine-Refund>
|
|
6
7
|
</div>
|
|
7
8
|
|
|
@@ -10,21 +11,28 @@
|
|
|
10
11
|
import IotRefund from './IOTRefund'
|
|
11
12
|
import machineRefund from './machineRefund'
|
|
12
13
|
import cardRefund from './cardRefund'
|
|
14
|
+
import cardHistoryRefund from './cardHistoryRefund'
|
|
13
15
|
|
|
14
16
|
export default {
|
|
15
17
|
title: '退费管理',
|
|
16
18
|
components: {
|
|
17
19
|
IotRefund,
|
|
18
20
|
machineRefund,
|
|
19
|
-
cardRefund
|
|
21
|
+
cardRefund,
|
|
22
|
+
cardHistoryRefund
|
|
20
23
|
},
|
|
21
24
|
data () {
|
|
22
25
|
return {
|
|
23
|
-
|
|
26
|
+
all: 'now'
|
|
24
27
|
}
|
|
25
28
|
},
|
|
26
29
|
ready () {
|
|
27
30
|
|
|
31
|
+
},
|
|
32
|
+
events: {
|
|
33
|
+
changeChoose () {
|
|
34
|
+
this.all = 'history'
|
|
35
|
+
}
|
|
28
36
|
},
|
|
29
37
|
props: ['row']
|
|
30
38
|
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto">
|
|
3
|
+
<div style="float: right">
|
|
4
|
+
<button @click="getQueryData()" class="button_search" >获取数据</button>
|
|
5
|
+
</div>
|
|
6
|
+
<validator name='v'>
|
|
7
|
+
<form novalidate class="form-horizontal">
|
|
8
|
+
<div class="row">
|
|
9
|
+
<div class="col-sm-4 form-group">
|
|
10
|
+
<label class="font_normal_body">开始时间</label>
|
|
11
|
+
<datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_start_date"
|
|
12
|
+
class="datepicker"
|
|
13
|
+
placeholder="起始时间"
|
|
14
|
+
style="width:60%"
|
|
15
|
+
v-model="model.f_start_date"
|
|
16
|
+
v-ref:f_start_date
|
|
17
|
+
></datepicker>
|
|
18
|
+
</div>
|
|
19
|
+
<div class="col-sm-4 form-group" >
|
|
20
|
+
<label class="font_normal_body" >结束时间</label>
|
|
21
|
+
<datepicker :format="'yyyy-MM-dd HH:mm:ss'" :value.sync="model.f_end_date"
|
|
22
|
+
class="datepicker"
|
|
23
|
+
placeholder="结束时间"
|
|
24
|
+
style="width:60%"
|
|
25
|
+
v-model="model.f_end_date"
|
|
26
|
+
v-ref:f_end_date
|
|
27
|
+
></datepicker>
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<div class="row">
|
|
34
|
+
<div class="col-sm-4">
|
|
35
|
+
<label for="f_paper_account" class="font_normal_body ">累购金额</label>
|
|
36
|
+
<input class="input_search" style="width:60%" disabled v-model="model.f_preamount">
|
|
37
|
+
</div>
|
|
38
|
+
<div class="col-sm-4">
|
|
39
|
+
<label for="f_paper_account" class="font_normal_body ">累购气量</label>
|
|
40
|
+
<input class="input_search" style="width:60%" disabled v-model="model.f_pregas">
|
|
41
|
+
</div>
|
|
42
|
+
|
|
43
|
+
<div class="col-sm-4">
|
|
44
|
+
<label for="f_paper_account" class="font_normal_body ">待退金额</label>
|
|
45
|
+
<input class="input_search" style="width:60%" disabled v-model="model.f_refund_fee">
|
|
46
|
+
</div>
|
|
47
|
+
<div class="col-sm-4">
|
|
48
|
+
<label for="f_paper_account" class="font_normal_body ">已退金额</label>
|
|
49
|
+
<input class="input_search" style="width:60%" disabled v-model="model.f_refunded_fee">
|
|
50
|
+
</div>
|
|
51
|
+
<div class="col-sm-8">
|
|
52
|
+
<label for="f_paper_account" class="font_normal_body ">备  注</label>
|
|
53
|
+
<input class="input_search" style="width:60%" v-model="model.f_comments">
|
|
54
|
+
</div>
|
|
55
|
+
<div class="col-sm-4 form-group">
|
|
56
|
+
<label class="font_normal_body">退费金额</label>
|
|
57
|
+
<input class="input_search" style="width:60%"
|
|
58
|
+
type="number" v-model="model.f_refund_fee"
|
|
59
|
+
disabled
|
|
60
|
+
placeholder="退费金额">
|
|
61
|
+
</div>
|
|
62
|
+
<div class="col-sm-8">
|
|
63
|
+
<label for="f_paper_account" class="font_normal_body ">收款事由</label>
|
|
64
|
+
<input class="input_search" style="width:60%" v-model="model.f_reason">
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</form>
|
|
68
|
+
<validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
|
|
69
|
+
<print-bill :show="print" :bill-config='config' :bill-data='billData' :data='data' @toggle="close" @printok="printok" v-ref:printbill></print-bill>
|
|
70
|
+
<div style="text-align:right;">
|
|
71
|
+
<button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
|
|
72
|
+
<button class="button_clear btn-gn" @click="clean()">取消</button>
|
|
73
|
+
</div>
|
|
74
|
+
</validator>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<upload :blodid="data.f_userinfo_id" isremark="true" fusetype="退费管理"></upload>
|
|
78
|
+
</template>
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
<script>
|
|
82
|
+
let readyGen = async function (self) {
|
|
83
|
+
self.$refs.f_start_date.value = self.$login.toStandardTimeString()
|
|
84
|
+
self.$refs.f_end_date.value = self.$login.toStandardTimeString()
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export default {
|
|
88
|
+
title: '卡表退费',
|
|
89
|
+
data () {
|
|
90
|
+
return {
|
|
91
|
+
model: {
|
|
92
|
+
f_refunded_fee: '',
|
|
93
|
+
f_refund_fee: '',
|
|
94
|
+
f_comments: '',
|
|
95
|
+
f_reason: '',
|
|
96
|
+
f_pregas: '',
|
|
97
|
+
f_preamount: '',
|
|
98
|
+
f_price: 0
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
validateBill (val) {
|
|
102
|
+
this.validateOk = !val.isOk
|
|
103
|
+
this.billData.bill = val.bill
|
|
104
|
+
},
|
|
105
|
+
config: {
|
|
106
|
+
notShowFormula: false, // 不显示计算公式,默认显示
|
|
107
|
+
priceCalculation: false, // 划气量控制
|
|
108
|
+
showupload: true, // 默认显示附件上传组件
|
|
109
|
+
hasPrint: true, // 默认打票
|
|
110
|
+
floor: true, // 是否取整收费
|
|
111
|
+
hasBillManage: false, // 默认不启用发票管理
|
|
112
|
+
billType: '燃气费', // 票据类型(燃气费,其他费用,调用的发票代码不同)
|
|
113
|
+
printType: '普通收据', // 收据/电子票/专用发票/国税发票
|
|
114
|
+
payment: '现金缴费'
|
|
115
|
+
},
|
|
116
|
+
blodid: '',
|
|
117
|
+
hasValidateBill: false,
|
|
118
|
+
validateOk: false,
|
|
119
|
+
printModel: {},
|
|
120
|
+
print: false,
|
|
121
|
+
billUrl: '',
|
|
122
|
+
billData: {
|
|
123
|
+
url: 'rs/report/refund_sell',
|
|
124
|
+
operator: this.$login.f.name,
|
|
125
|
+
billnumber: '',
|
|
126
|
+
bill: ''
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
props: ['data'],
|
|
131
|
+
ready () {
|
|
132
|
+
readyGen(this)
|
|
133
|
+
},
|
|
134
|
+
methods: {
|
|
135
|
+
async confirm () {
|
|
136
|
+
let param = {
|
|
137
|
+
f_user_id: this.data.f_user_id,
|
|
138
|
+
f_userfiles_id: this.data.f_userfiles_id,
|
|
139
|
+
f_userinfo_id: this.data.f_userinfo_id,
|
|
140
|
+
version: this.data.version,
|
|
141
|
+
f_refund_gas: 0,
|
|
142
|
+
f_refund_fee: this.model.f_refund_fee,
|
|
143
|
+
f_comments: this.model.f_comments,
|
|
144
|
+
f_reason: this.model.f_reason,
|
|
145
|
+
f_balance: this.data.f_balance,
|
|
146
|
+
f_start_date: this.model.f_start_date,
|
|
147
|
+
f_end_date: this.model.f_end_date,
|
|
148
|
+
f_price_id: this.data.f_price_id,
|
|
149
|
+
f_total_gas: parseFloat(this.data.f_total_gas) - 0,
|
|
150
|
+
f_total_fee: parseFloat(this.data.f_total_fee) - parseFloat(this.model.f_refund_fee),
|
|
151
|
+
f_stairprice_id: this.data.f_stairprice_id,
|
|
152
|
+
operInfo: {
|
|
153
|
+
f_operator: this.$login.f.name,
|
|
154
|
+
f_operatorid: this.$login.f.id,
|
|
155
|
+
f_orgid: this.$login.f.orgid,
|
|
156
|
+
f_orgname: this.$login.f.orgs,
|
|
157
|
+
f_depid: this.$login.f.depids,
|
|
158
|
+
f_depname: this.$login.f.deps
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
console.log('退费传参', param)
|
|
162
|
+
let res = await this.$resetpost('rs/logic/cardHistoryRefund', {data: param}, {warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`, resolveMsg: '退费成功!!', rejectMsg: '退费失败!!请重试!!'}).then((res) => {
|
|
163
|
+
if (this.config.hasPrint) {
|
|
164
|
+
if (this.config.hasBillManage) {
|
|
165
|
+
// 启用发票管理,获取票据管理中的票号并存储记录
|
|
166
|
+
this.data.id = res.data.id
|
|
167
|
+
this.data.f_bill_type = '退费'
|
|
168
|
+
this.print = true
|
|
169
|
+
} else {
|
|
170
|
+
this.data.id = res.data.id
|
|
171
|
+
this.print = true
|
|
172
|
+
}
|
|
173
|
+
} else {
|
|
174
|
+
this.$dispatch('success')
|
|
175
|
+
}
|
|
176
|
+
})
|
|
177
|
+
},
|
|
178
|
+
async getQueryData () {
|
|
179
|
+
await this.$resetpost('rs/sql/cardRefundQuery', {
|
|
180
|
+
data: {
|
|
181
|
+
condition: `sg.f_userinfo_id='${this.data.f_userinfo_id}' and sg.f_operate_date >= '${this.model.f_start_date}' and
|
|
182
|
+
sg.f_operate_date <= '${this.model.f_end_date}' and sg.f_type = '卡表收费'`
|
|
183
|
+
}
|
|
184
|
+
}, {resolveMsg: null, rejectMsg: '获取数据失败!'}).then((res) => {
|
|
185
|
+
this.model.f_refunded_fee = res.data[0].f_refunded_fee
|
|
186
|
+
this.model.f_refund_fee = res.data[0].f_refund_fee
|
|
187
|
+
this.model.f_pregas = res.data[0].f_pregas
|
|
188
|
+
this.model.f_preamount = res.data[0].f_preamount
|
|
189
|
+
if(res.data[0].f_refund_fee) {
|
|
190
|
+
this.model.f_comments = '退费时间周期以及一共退费' + res.data[0].f_refund_fee + '元'
|
|
191
|
+
}
|
|
192
|
+
})
|
|
193
|
+
},
|
|
194
|
+
refundChange () {
|
|
195
|
+
this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
|
|
196
|
+
},
|
|
197
|
+
close () {
|
|
198
|
+
this.print = false
|
|
199
|
+
this.clean()
|
|
200
|
+
},
|
|
201
|
+
printok () {
|
|
202
|
+
// 收据打完,判断是否还有其他票据进行请求
|
|
203
|
+
for (let i = 0; i < this.model.f_print.length; i++) {
|
|
204
|
+
if (this.model.f_print[i] === '电子发票') {
|
|
205
|
+
this.$CommonService.openEticket(this.row.id, '售气收费')
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
this.$dispatch('success')
|
|
209
|
+
},
|
|
210
|
+
clean () {
|
|
211
|
+
this.$dispatch('refresh')
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
</script>
|
package/src/main.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
import Vue from 'vue'
|
|
2
|
-
import all from 'vue-client/src/all'
|
|
3
|
-
import App from './App'
|
|
4
|
-
import system from 'system-clients/src/system'
|
|
5
|
-
import sale from './sale'
|
|
6
|
-
import wenxi from './filiale/
|
|
7
|
-
// import FilialeSale from './filiale/yuansheng/sale'
|
|
8
|
-
import address from 'address-client/src/address'
|
|
9
|
-
import ldap from 'ldap-clients/src/ldap'
|
|
10
|
-
import VueClipboard from 'vue-clipboard2'
|
|
11
|
-
|
|
12
|
-
Vue.use(VueClipboard)
|
|
13
|
-
Vue.config.silent = true
|
|
14
|
-
|
|
15
|
-
all()
|
|
16
|
-
system(false)
|
|
17
|
-
sale()
|
|
18
|
-
wenxi()
|
|
19
|
-
// FilialeSale()
|
|
20
|
-
address()
|
|
21
|
-
ldap()
|
|
22
|
-
require('system-clients/src/styles/less/bootstrap.less')
|
|
23
|
-
|
|
24
|
-
new Vue({
|
|
25
|
-
el: 'body',
|
|
26
|
-
components: { App }
|
|
27
|
-
})
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import all from 'vue-client/src/all'
|
|
3
|
+
import App from './App'
|
|
4
|
+
import system from 'system-clients/src/system'
|
|
5
|
+
import sale from './sale'
|
|
6
|
+
import wenxi from './filiale/kelai/sale'
|
|
7
|
+
// import FilialeSale from './filiale/yuansheng/sale'
|
|
8
|
+
import address from 'address-client/src/address'
|
|
9
|
+
import ldap from 'ldap-clients/src/ldap'
|
|
10
|
+
import VueClipboard from 'vue-clipboard2'
|
|
11
|
+
|
|
12
|
+
Vue.use(VueClipboard)
|
|
13
|
+
Vue.config.silent = true
|
|
14
|
+
|
|
15
|
+
all()
|
|
16
|
+
system(false)
|
|
17
|
+
sale()
|
|
18
|
+
wenxi()
|
|
19
|
+
// FilialeSale()
|
|
20
|
+
address()
|
|
21
|
+
ldap()
|
|
22
|
+
require('system-clients/src/styles/less/bootstrap.less')
|
|
23
|
+
|
|
24
|
+
new Vue({
|
|
25
|
+
el: 'body',
|
|
26
|
+
components: { App }
|
|
27
|
+
})
|