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.
@@ -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://127.0.0.1:8080/'// 公司测试服务
14
- var fuwu = 'http://121.36.106.17:8400'
15
- // var fuwu = 'http://121.36.106.17:8400/'
16
- // 铜川正式
17
- // var fuwu = 'http://61.134.55.234:9999/'
18
- // 铜川测试
19
- // var fuwu = 'http://61.134.55.234:9999/'
20
- // var fuwu = 'http://60.222.250.39:8300/'
21
- // 韶关
22
- // var fuwu = 'http://119.146.1.106:8300/'
23
- // 巩义测试服务
24
- // var fuwu = 'http://192.168.0.227:8400'
25
- // 燎原测试服务
26
- // var fuwu = 'http://121.41.19.238:8400 '
27
- // var fuwu = 'http://121.41.19.238:9001/'
28
-
29
- // var fuwu = 'http://139.214.92.34:8301/'
30
-
31
- var proxyTable = {
32
- '/rs/logic/saleExport': {
33
- target: fuwu
34
- },
35
- '/rs/logic/saleGetExportProgress': {
36
- target: fuwu
37
- },
38
- '/rs/file': {
39
- target: fuwu
40
- },
41
- '/files': {
42
- target: fuwu
43
- },
44
- // 查找资源服务数据
45
- '/rs/search': {
46
- target: fuwu
47
- },
48
- // 查找资源服务数据
49
- '/rs/logic/getLogin': {
50
- target: fuwu
51
- },
52
- // 查找资源服务数据
53
- '/rs/logic/getInitData': {
54
- target: fuwu
55
- },
56
- // 查找资源服务数据
57
- '/rs/entity/t_material_info': {
58
- target: bendi1
59
- },
60
- // 查找资源服务数据
61
- '/rs/logic/query_material': {
62
- target: bendi1
63
- },
64
- '/rs/logic/getSaleInitData': {
65
- target: fuwu
66
- },
67
- '/invoice': {
68
- target: fuwu
69
- },
70
- // 用户登录服务地址
71
- '/rs/user': {
72
- target: fuwu
73
- },
74
- '/rs/path/getParams': {
75
- target: fuwu
76
- },
77
- '/rs/data': {
78
- target: fuwu
79
- },
80
- '/rs/license': {
81
- target: fuwu
82
- },
83
- '/rs/db': {
84
- target: fuwu
85
- },
86
- '/excel': {
87
- target: fuwu
88
- },
89
- '/rs/config': {
90
- target: fuwu
91
- },
92
- '/rs/sql/getLicenseById': {
93
- target: fuwu
94
- },
95
- '/rs/sql/manage_getarealist': {
96
- target: fuwu
97
- },
98
- '/rs/sql/manage_getstreetlist': {
99
- target: fuwu
100
- },
101
- '/rs/report': {
102
- target: 'http://121.36.106.17:8400/'
103
- },
104
- '/rs/vue': {
105
- target: fuwu
106
- },
107
- '/webmeter': {
108
- target: 'http://192.168.50.4:8450'
109
- },
110
- '/rs': {
111
- // target: 'http://192.168.30.63:8081/'
112
- // target: 'http://121.36.106.17:8400/'
113
- target: bendi
114
- }
115
- }
116
-
117
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
118
- publicPath: config.output.publicPath,
119
- stats: {
120
- colors: true,
121
- chunks: false
122
- }
123
- })
124
-
125
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
126
- // force page reload when html-webpack-plugin template changes
127
- compiler.plugin('compilation', function (compilation) {
128
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
129
- hotMiddleware.publish({action: 'reload'})
130
- cb()
131
- })
132
- })
133
-
134
- // proxy api requests
135
- Object.keys(proxyTable).forEach(function (context) {
136
- var options = proxyTable[context]
137
- if (typeof options === 'string') {
138
- options = {target: options}
139
- }
140
- app.use(proxyMiddleware(context, options))
141
- })
142
-
143
- // handle fallback for HTML5 history API
144
- app.use(require('connect-history-api-fallback')())
145
- // app.use(function (req, res, next) {
146
- // res.header('Access-Control-Allow-Origin', '*')
147
- // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
148
- // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
149
- // res.header('X-Powered-By', '3,2,1')
150
- // res.header('Access-Control-Allow-Credentials', 'true')
151
- // res.header('Content-Type', 'application/json;charset=utf-8')
152
- // next()
153
- // })
154
-
155
- // serve webpack bundle output
156
- app.use(devMiddleware)
157
-
158
- // enable hot-reload and state-preserving
159
- // compilation error display
160
- app.use(hotMiddleware)
161
-
162
- // serve pure static assets
163
- app.use('/static', express.static('./static'))
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.60",
3
+ "version": "3.5.62",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -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}' and mi.f_filialeid= '${this.$login.f.orgid}'`}}, {resolveMsg: null, rejectMsg: '获取默认气表品牌型号失败!!'})
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">*单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;价</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 (val && this.model.otherdetail[val] && this.model.otherdetail[val].f_typenumber) {
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>