sale-client 3.5.60 → 3.5.62
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 +164 -171
- package/package.json +1 -1
- package/src/components/FilesManage/MeterinfoTest.vue +1 -1
- package/src/components/charge/business/OtherChargeNew.vue +2 -3
- package/src/components/revenue/Common/PrintBill.vue +132 -132
- package/src/components/revenue/base/UserList.vue +23 -4
- package/src/components/revenue/base/rightview/CardList.vue +4 -1
- package/src/components/revenue/comprehen/handAudit/MeterReadAudit.vue +4 -4
- package/src/components/revenue/machineHandManage/machineUploaded.vue +316 -0
- package/src/filiale/shangluo/sale.js +5 -1
- package/src/filiale/zhongyi/ChangeMeter.vue +979 -0
- package/src/filiale/zhongyi/FileUserFiles.vue +51 -29
- package/src/filiale/zhongyi/ReplaceCardManage.vue +421 -0
- package/src/filiale/zhongyi/sale.js +5 -2
- package/src/plugins/CardService.js +4 -2
- package/src/sale.js +2 -0
package/build/dev-server.js
CHANGED
|
@@ -1,171 +1,164 @@
|
|
|
1
|
-
var express = require('express')
|
|
2
|
-
var webpack = require('webpack')
|
|
3
|
-
var config = require('./webpack.dev.conf')
|
|
4
|
-
var proxyMiddleware = require('http-proxy-middleware')
|
|
5
|
-
// var httpProxy = require('http-proxy')
|
|
6
|
-
|
|
7
|
-
var app = express()
|
|
8
|
-
var compiler = webpack(config)
|
|
9
|
-
// var proxy = httpProxy.createProxyServer()
|
|
10
|
-
|
|
11
|
-
// Define HTTP proxies to your custom API backend
|
|
12
|
-
// https://github.com/chimurai/http-proxy-middleware
|
|
13
|
-
var bendi = 'http://121.36.106.17:8400', bendi1 = 'http://
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
// var fuwu = 'http://
|
|
21
|
-
//
|
|
22
|
-
//
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
//
|
|
26
|
-
//
|
|
27
|
-
// var fuwu = 'http://121.41.19.238:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
'/rs/
|
|
58
|
-
target:
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
'/rs/
|
|
65
|
-
target: fuwu
|
|
66
|
-
},
|
|
67
|
-
'/
|
|
68
|
-
target: fuwu
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
target:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
//
|
|
144
|
-
|
|
145
|
-
//
|
|
146
|
-
//
|
|
147
|
-
|
|
148
|
-
//
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
// serve
|
|
156
|
-
app.use(
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
module.exports = app.listen(8089, function (err) {
|
|
166
|
-
if (err) {
|
|
167
|
-
console.log(err)
|
|
168
|
-
return
|
|
169
|
-
}
|
|
170
|
-
console.log('Listening at http://localhost:8089')
|
|
171
|
-
})
|
|
1
|
+
var express = require('express')
|
|
2
|
+
var webpack = require('webpack')
|
|
3
|
+
var config = require('./webpack.dev.conf')
|
|
4
|
+
var proxyMiddleware = require('http-proxy-middleware')
|
|
5
|
+
// var httpProxy = require('http-proxy')
|
|
6
|
+
|
|
7
|
+
var app = express()
|
|
8
|
+
var compiler = webpack(config)
|
|
9
|
+
// var proxy = httpProxy.createProxyServer()
|
|
10
|
+
|
|
11
|
+
// Define HTTP proxies to your custom API backend
|
|
12
|
+
// https://github.com/chimurai/http-proxy-middleware
|
|
13
|
+
var bendi = 'http://121.36.106.17:8400', bendi1 = 'http://121.36.106.17:8400/'
|
|
14
|
+
// 公司测试服务
|
|
15
|
+
var fuwu = 'http://121.36.106.17:8400'
|
|
16
|
+
// var fuwu = 'http://121.36.106.17:8400/'
|
|
17
|
+
// 铜川正式
|
|
18
|
+
// var fuwu = 'http://61.134.55.234:9999/'
|
|
19
|
+
// 铜川测试
|
|
20
|
+
// var fuwu = 'http://61.134.55.234:9999/'
|
|
21
|
+
// var fuwu = 'http://60.222.250.39:8300/'
|
|
22
|
+
// 韶关
|
|
23
|
+
// var fuwu = 'http://119.146.1.106:8300/'
|
|
24
|
+
// 巩义测试服务
|
|
25
|
+
// var fuwu = 'http://192.168.0.227:8400'
|
|
26
|
+
// 燎原测试服务
|
|
27
|
+
// var fuwu = 'http://121.41.19.238:8400 '
|
|
28
|
+
// var fuwu = 'http://121.41.19.238:9001/'
|
|
29
|
+
|
|
30
|
+
// var fuwu = 'http://139.214.92.34:8301/'
|
|
31
|
+
|
|
32
|
+
var proxyTable = {
|
|
33
|
+
'/rs/logic/saleExport': {
|
|
34
|
+
target: fuwu
|
|
35
|
+
},
|
|
36
|
+
'/rs/logic/saleGetExportProgress': {
|
|
37
|
+
target: fuwu
|
|
38
|
+
},
|
|
39
|
+
'/rs/file': {
|
|
40
|
+
target: fuwu
|
|
41
|
+
},
|
|
42
|
+
'/files': {
|
|
43
|
+
target: fuwu
|
|
44
|
+
},
|
|
45
|
+
// 查找资源服务数据
|
|
46
|
+
'/rs/search': {
|
|
47
|
+
target: fuwu
|
|
48
|
+
},
|
|
49
|
+
// 查找资源服务数据
|
|
50
|
+
'/rs/logic/getLogin': {
|
|
51
|
+
target: fuwu
|
|
52
|
+
},
|
|
53
|
+
// 查找资源服务数据
|
|
54
|
+
'/rs/logic/getInitData': {
|
|
55
|
+
target: fuwu
|
|
56
|
+
},
|
|
57
|
+
'/rs/logic/getSaleInitData': {
|
|
58
|
+
target: fuwu
|
|
59
|
+
},
|
|
60
|
+
'/invoice': {
|
|
61
|
+
target: fuwu
|
|
62
|
+
},
|
|
63
|
+
// 用户登录服务地址
|
|
64
|
+
'/rs/user': {
|
|
65
|
+
target: fuwu
|
|
66
|
+
},
|
|
67
|
+
'/rs/path/getParams': {
|
|
68
|
+
target: fuwu
|
|
69
|
+
},
|
|
70
|
+
'/rs/data': {
|
|
71
|
+
target: fuwu
|
|
72
|
+
},
|
|
73
|
+
'/rs/license': {
|
|
74
|
+
target: fuwu
|
|
75
|
+
},
|
|
76
|
+
'/rs/db': {
|
|
77
|
+
target: fuwu
|
|
78
|
+
},
|
|
79
|
+
'/excel': {
|
|
80
|
+
target: fuwu
|
|
81
|
+
},
|
|
82
|
+
'/rs/config': {
|
|
83
|
+
target: fuwu
|
|
84
|
+
},
|
|
85
|
+
'/rs/sql/getLicenseById': {
|
|
86
|
+
target: fuwu
|
|
87
|
+
},
|
|
88
|
+
'/rs/sql/manage_getarealist': {
|
|
89
|
+
target: fuwu
|
|
90
|
+
},
|
|
91
|
+
'/rs/sql/manage_getstreetlist': {
|
|
92
|
+
target: fuwu
|
|
93
|
+
},
|
|
94
|
+
'/rs/report': {
|
|
95
|
+
target: 'http://121.36.106.17:8400/'
|
|
96
|
+
},
|
|
97
|
+
'/rs/vue': {
|
|
98
|
+
target: fuwu
|
|
99
|
+
},
|
|
100
|
+
'/webmeter': {
|
|
101
|
+
target: 'http://192.168.50.4:8450'
|
|
102
|
+
},
|
|
103
|
+
'/rs': {
|
|
104
|
+
// target: 'http://192.168.30.63:8081/'
|
|
105
|
+
// target: 'http://121.36.106.17:8400/'
|
|
106
|
+
target: bendi
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
var devMiddleware = require('webpack-dev-middleware')(compiler, {
|
|
111
|
+
publicPath: config.output.publicPath,
|
|
112
|
+
stats: {
|
|
113
|
+
colors: true,
|
|
114
|
+
chunks: false
|
|
115
|
+
}
|
|
116
|
+
})
|
|
117
|
+
|
|
118
|
+
var hotMiddleware = require('webpack-hot-middleware')(compiler)
|
|
119
|
+
// force page reload when html-webpack-plugin template changes
|
|
120
|
+
compiler.plugin('compilation', function (compilation) {
|
|
121
|
+
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
|
122
|
+
hotMiddleware.publish({action: 'reload'})
|
|
123
|
+
cb()
|
|
124
|
+
})
|
|
125
|
+
})
|
|
126
|
+
|
|
127
|
+
// proxy api requests
|
|
128
|
+
Object.keys(proxyTable).forEach(function (context) {
|
|
129
|
+
var options = proxyTable[context]
|
|
130
|
+
if (typeof options === 'string') {
|
|
131
|
+
options = {target: options}
|
|
132
|
+
}
|
|
133
|
+
app.use(proxyMiddleware(context, options))
|
|
134
|
+
})
|
|
135
|
+
|
|
136
|
+
// handle fallback for HTML5 history API
|
|
137
|
+
app.use(require('connect-history-api-fallback')())
|
|
138
|
+
// app.use(function (req, res, next) {
|
|
139
|
+
// res.header('Access-Control-Allow-Origin', '*')
|
|
140
|
+
// res.header('Access-Control-Allow-Headers', 'X-Requested-With')
|
|
141
|
+
// res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
|
|
142
|
+
// res.header('X-Powered-By', '3,2,1')
|
|
143
|
+
// res.header('Access-Control-Allow-Credentials', 'true')
|
|
144
|
+
// res.header('Content-Type', 'application/json;charset=utf-8')
|
|
145
|
+
// next()
|
|
146
|
+
// })
|
|
147
|
+
|
|
148
|
+
// serve webpack bundle output
|
|
149
|
+
app.use(devMiddleware)
|
|
150
|
+
|
|
151
|
+
// enable hot-reload and state-preserving
|
|
152
|
+
// compilation error display
|
|
153
|
+
app.use(hotMiddleware)
|
|
154
|
+
|
|
155
|
+
// serve pure static assets
|
|
156
|
+
app.use('/static', express.static('./static'))
|
|
157
|
+
|
|
158
|
+
module.exports = app.listen(8089, function (err) {
|
|
159
|
+
if (err) {
|
|
160
|
+
console.log(err)
|
|
161
|
+
return
|
|
162
|
+
}
|
|
163
|
+
console.log('Listening at http://localhost:8089')
|
|
164
|
+
})
|
package/package.json
CHANGED
|
@@ -700,7 +700,7 @@
|
|
|
700
700
|
},
|
|
701
701
|
async meternumberValidate () {
|
|
702
702
|
let http1 = new HttpResetClass()
|
|
703
|
-
let res1 = await http1.load('POST', '/rs/sql/getBrandAndType', {data: {condition: ` mi.f_meternumber = '${this.row.f_meternumber}'
|
|
703
|
+
let res1 = await http1.load('POST', '/rs/sql/getBrandAndType', {data: {condition: ` mi.f_meternumber = '${this.row.f_meternumber}'`}}, {resolveMsg: null, rejectMsg: '获取默认气表品牌型号失败!!'})
|
|
704
704
|
if (res1.data.length > 0) {
|
|
705
705
|
// 替换表号自带的气表品牌和型号
|
|
706
706
|
let meterbrands = this.meterbrands
|
|
@@ -48,7 +48,6 @@
|
|
|
48
48
|
<div class="col-sm-4" :class="{'has-success':row.f_unitprice,'has-error':!row.f_unitprice}">
|
|
49
49
|
<label style="" for="f_unitprice" class=" font_normal_body">*单 价</label>
|
|
50
50
|
<input class="input_search" style="width:60%" type="number" min="1" @blur.prevent="getcollection()"
|
|
51
|
-
v-validate:f_unitprice='{required: true, dctest: config.checkFlag?[0, ">=" ]: [0, ">" ] }'
|
|
52
51
|
v-model="row.f_unitprice"
|
|
53
52
|
:value.sync="row.f_unitprice"
|
|
54
53
|
placeholder="单价" v-next-el='sl'>
|
|
@@ -346,8 +345,8 @@ export default {
|
|
|
346
345
|
},
|
|
347
346
|
methods: {
|
|
348
347
|
setTypeprice (val) {
|
|
349
|
-
if (
|
|
350
|
-
let unitprice = this.$appdata.getSingleValue(this.model.otherdetail[val].f_typenumber)
|
|
348
|
+
if (this.model.otherdetail[val] && this.model.otherdetail[val].f_typenumber[0]) {
|
|
349
|
+
let unitprice = this.$appdata.getSingleValue(this.model.otherdetail[val].f_typenumber[0])
|
|
351
350
|
if (unitprice !== undefined) {
|
|
352
351
|
this.model.otherdetail[val].f_unitprice = unitprice
|
|
353
352
|
}
|
|
@@ -1,132 +1,132 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="auto form-horizontal" >
|
|
3
|
-
<modal :show.sync="show &&!billConfig.autoPrint" v-ref:modal large backdrop="false">
|
|
4
|
-
<header slot="modal-header" class="modal-header">
|
|
5
|
-
<h3 style="color:black" class="modal-title">收费发票</h3>
|
|
6
|
-
</header>
|
|
7
|
-
<article slot="modal-body" class="modal-body">
|
|
8
|
-
<!-- <div v-if="bill.data">-->
|
|
9
|
-
<!-- {{{bill.data}}}-->
|
|
10
|
-
<!-- </div>-->
|
|
11
|
-
<validator name='v'>
|
|
12
|
-
<form class="form-horizontal select-overspread">
|
|
13
|
-
<div class="row" style="display: flex;justify-content: center;" id='normal-bill' v-if="bill.data">
|
|
14
|
-
{{{bill.data}}}
|
|
15
|
-
</div>
|
|
16
|
-
</form>
|
|
17
|
-
</validator>
|
|
18
|
-
</article>
|
|
19
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
20
|
-
<div v-if="billConfig.hasBillManage">
|
|
21
|
-
<div class="col-sm-2" >
|
|
22
|
-
<span><strong>发票号:{{model.f_using_number}}</strong></span>
|
|
23
|
-
</div>
|
|
24
|
-
</div>
|
|
25
|
-
<button type="button" class="btn btn-success" @click='print(true)'>选择打印机打印</button>
|
|
26
|
-
<button type="button" class="btn btn-success" @click='print()' @keyup.enter="print()" v-el:confirmbutton>打印</button>
|
|
27
|
-
<report-print id='normal-bill' top='5mm' left='5mm' width='90%' height='80%' :notrepeat="true" :showbtn="false" v-ref:reportprint></report-print>
|
|
28
|
-
<button type="button" class="btn btn-default" @click='cancel()' v-if="!billConfig.hasBillManage">取消</button>
|
|
29
|
-
</footer>
|
|
30
|
-
</modal>
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
<script>
|
|
34
|
-
import { DataModel } from 'vue-client'
|
|
35
|
-
|
|
36
|
-
let getBillData = async function (self, val) {
|
|
37
|
-
console.log('temp:', self)
|
|
38
|
-
let temp = {
|
|
39
|
-
reprint: "'正常'",
|
|
40
|
-
operator: `'${self.$login.f.name}'`,
|
|
41
|
-
condition: self.data.id
|
|
42
|
-
}
|
|
43
|
-
if (self.data.fillgasid) {
|
|
44
|
-
temp.condition = `"${self.data.fillgasid}"`
|
|
45
|
-
}
|
|
46
|
-
console.log('self.billData.url:', self.billData.url)
|
|
47
|
-
self.bill = new DataModel(self.billData.url, temp)
|
|
48
|
-
await self.bill.search(self.data.id)
|
|
49
|
-
// 获取发票号
|
|
50
|
-
self.model.f_using_number = self.billData.bill.number
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export default {
|
|
54
|
-
title: '收费发票',
|
|
55
|
-
data () {
|
|
56
|
-
return {
|
|
57
|
-
model: {
|
|
58
|
-
f_using_number: null
|
|
59
|
-
},
|
|
60
|
-
bill: {},
|
|
61
|
-
messShow: false
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
props: ['show','data','billData', 'billConfig'],
|
|
65
|
-
ready () {
|
|
66
|
-
console.log('打票', this.billConfig, this.billData)
|
|
67
|
-
},
|
|
68
|
-
methods: {
|
|
69
|
-
// 确认按钮获得焦点
|
|
70
|
-
confirmbuttonfocus () {
|
|
71
|
-
this.$nextTick(() => {
|
|
72
|
-
this.$els.confirmbutton.focus()
|
|
73
|
-
})
|
|
74
|
-
},
|
|
75
|
-
cancel () {
|
|
76
|
-
this.$dispatch('toggle')
|
|
77
|
-
},
|
|
78
|
-
getbill () {
|
|
79
|
-
this.$refs.reportprint.isPrint = true
|
|
80
|
-
let val = true
|
|
81
|
-
getBillData(this, val).then(() => {
|
|
82
|
-
this.$emit('ready')
|
|
83
|
-
}).catch((error) => {
|
|
84
|
-
this.$emit('error', error)
|
|
85
|
-
})
|
|
86
|
-
},
|
|
87
|
-
async print (select) {
|
|
88
|
-
// 更新系统发票
|
|
89
|
-
try {
|
|
90
|
-
if (this.billConfig.hasBillManage) {
|
|
91
|
-
if (this.data.f_bill_type != '清算单') { await this.$CommonService.openPaperBill(this.data.id, this.data.f_bill_type, this.billConfig.billType, this.billData.bill, '正常') }
|
|
92
|
-
} else {
|
|
93
|
-
await this.$resetpost('rs/logic/sale_billReprint', {data: this.data}, {resolveMsg: null, rejectMsg: '票据补打出错!!'})
|
|
94
|
-
}
|
|
95
|
-
if (select) {
|
|
96
|
-
this.$refs.reportprint.print(true)
|
|
97
|
-
} else {
|
|
98
|
-
this.$refs.reportprint.print()
|
|
99
|
-
}
|
|
100
|
-
} catch (error) {
|
|
101
|
-
this.$dispatch('refresh')
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
},
|
|
105
|
-
watch: {
|
|
106
|
-
'show' (val) {
|
|
107
|
-
if (val) {
|
|
108
|
-
getBillData(this, val).then(() => {
|
|
109
|
-
if(this.billConfig.autoPrint){
|
|
110
|
-
this.print()
|
|
111
|
-
}
|
|
112
|
-
this.$emit('ready')
|
|
113
|
-
}).catch((error) => {
|
|
114
|
-
this.$emit('error', error)
|
|
115
|
-
})
|
|
116
|
-
this.confirmbuttonfocus()
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
events: {
|
|
121
|
-
'print' () {
|
|
122
|
-
// 对票据明细进行更新或插入操作
|
|
123
|
-
this.$dispatch('printok', '发票打印', this.data)
|
|
124
|
-
},
|
|
125
|
-
'print-error' () {
|
|
126
|
-
this.$dispatch('error', '发票打印', this.data, null)
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
</script>
|
|
131
|
-
<style >
|
|
132
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="auto form-horizontal" >
|
|
3
|
+
<modal :show.sync="show &&!billConfig.autoPrint" v-ref:modal large backdrop="false">
|
|
4
|
+
<header slot="modal-header" class="modal-header">
|
|
5
|
+
<h3 style="color:black" class="modal-title">收费发票</h3>
|
|
6
|
+
</header>
|
|
7
|
+
<article slot="modal-body" class="modal-body">
|
|
8
|
+
<!-- <div v-if="bill.data">-->
|
|
9
|
+
<!-- {{{bill.data}}}-->
|
|
10
|
+
<!-- </div>-->
|
|
11
|
+
<validator name='v'>
|
|
12
|
+
<form class="form-horizontal select-overspread">
|
|
13
|
+
<div class="row" style="display: flex;justify-content: center;" id='normal-bill' v-if="bill.data">
|
|
14
|
+
{{{bill.data}}}
|
|
15
|
+
</div>
|
|
16
|
+
</form>
|
|
17
|
+
</validator>
|
|
18
|
+
</article>
|
|
19
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
20
|
+
<div v-if="billConfig.hasBillManage">
|
|
21
|
+
<div class="col-sm-2" >
|
|
22
|
+
<span><strong>发票号:{{model.f_using_number}}</strong></span>
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<button type="button" class="btn btn-success" @click='print(true)'>选择打印机打印</button>
|
|
26
|
+
<button type="button" class="btn btn-success" @click='print()' @keyup.enter="print()" v-el:confirmbutton>打印</button>
|
|
27
|
+
<report-print id='normal-bill' top='5mm' left='5mm' width='90%' height='80%' :notrepeat="true" :showbtn="false" v-ref:reportprint></report-print>
|
|
28
|
+
<button type="button" class="btn btn-default" @click='cancel()' v-if="!billConfig.hasBillManage">取消</button>
|
|
29
|
+
</footer>
|
|
30
|
+
</modal>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
<script>
|
|
34
|
+
import { DataModel } from 'vue-client'
|
|
35
|
+
|
|
36
|
+
let getBillData = async function (self, val) {
|
|
37
|
+
console.log('temp:', self)
|
|
38
|
+
let temp = {
|
|
39
|
+
reprint: "'正常'",
|
|
40
|
+
operator: `'${self.$login.f.name}'`,
|
|
41
|
+
condition: self.data.id
|
|
42
|
+
}
|
|
43
|
+
if (self.data.fillgasid) {
|
|
44
|
+
temp.condition = `"${self.data.fillgasid}"`
|
|
45
|
+
}
|
|
46
|
+
console.log('self.billData.url:', self.billData.url)
|
|
47
|
+
self.bill = new DataModel(self.billData.url, temp)
|
|
48
|
+
await self.bill.search(self.data.id)
|
|
49
|
+
// 获取发票号
|
|
50
|
+
self.model.f_using_number = self.billData.bill.number
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default {
|
|
54
|
+
title: '收费发票',
|
|
55
|
+
data () {
|
|
56
|
+
return {
|
|
57
|
+
model: {
|
|
58
|
+
f_using_number: null
|
|
59
|
+
},
|
|
60
|
+
bill: {},
|
|
61
|
+
messShow: false
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
props: ['show','data','billData', 'billConfig'],
|
|
65
|
+
ready () {
|
|
66
|
+
console.log('打票', this.billConfig, this.billData)
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
// 确认按钮获得焦点
|
|
70
|
+
confirmbuttonfocus () {
|
|
71
|
+
this.$nextTick(() => {
|
|
72
|
+
this.$els.confirmbutton.focus()
|
|
73
|
+
})
|
|
74
|
+
},
|
|
75
|
+
cancel () {
|
|
76
|
+
this.$dispatch('toggle')
|
|
77
|
+
},
|
|
78
|
+
getbill () {
|
|
79
|
+
this.$refs.reportprint.isPrint = true
|
|
80
|
+
let val = true
|
|
81
|
+
getBillData(this, val).then(() => {
|
|
82
|
+
this.$emit('ready')
|
|
83
|
+
}).catch((error) => {
|
|
84
|
+
this.$emit('error', error)
|
|
85
|
+
})
|
|
86
|
+
},
|
|
87
|
+
async print (select) {
|
|
88
|
+
// 更新系统发票
|
|
89
|
+
try {
|
|
90
|
+
if (this.billConfig.hasBillManage) {
|
|
91
|
+
if (this.data.f_bill_type != '清算单') { await this.$CommonService.openPaperBill(this.data.id, this.data.f_bill_type, this.billConfig.billType, this.billData.bill, '正常') }
|
|
92
|
+
} else {
|
|
93
|
+
await this.$resetpost('rs/logic/sale_billReprint', {data: this.data}, {resolveMsg: null, rejectMsg: '票据补打出错!!'})
|
|
94
|
+
}
|
|
95
|
+
if (select) {
|
|
96
|
+
this.$refs.reportprint.print(true)
|
|
97
|
+
} else {
|
|
98
|
+
this.$refs.reportprint.print()
|
|
99
|
+
}
|
|
100
|
+
} catch (error) {
|
|
101
|
+
this.$dispatch('refresh')
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
watch: {
|
|
106
|
+
'show' (val) {
|
|
107
|
+
if (val) {
|
|
108
|
+
getBillData(this, val).then(() => {
|
|
109
|
+
if(this.billConfig.autoPrint){
|
|
110
|
+
this.print()
|
|
111
|
+
}
|
|
112
|
+
this.$emit('ready')
|
|
113
|
+
}).catch((error) => {
|
|
114
|
+
this.$emit('error', error)
|
|
115
|
+
})
|
|
116
|
+
this.confirmbuttonfocus()
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
events: {
|
|
121
|
+
'print' () {
|
|
122
|
+
// 对票据明细进行更新或插入操作
|
|
123
|
+
this.$dispatch('printok', '发票打印', this.data)
|
|
124
|
+
},
|
|
125
|
+
'print-error' () {
|
|
126
|
+
this.$dispatch('error', '发票打印', this.data, null)
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
</script>
|
|
131
|
+
<style >
|
|
132
|
+
</style>
|