sale-client 3.5.38 → 3.5.40

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,161 +1,161 @@
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://127.0.0.1:8080', bendi1 = 'http://121.36.106.17:8400/'
14
- // 公司测试服务
15
- var fuwu = 'http://192.168.50.4: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
- '/files': {
40
- target: fuwu
41
- },
42
- // 查找资源服务数据
43
- '/rs/search': {
44
- target: fuwu
45
- },
46
- // 查找资源服务数据
47
- '/rs/logic/getLogin': {
48
- target: fuwu
49
- },
50
- // 查找资源服务数据
51
- '/rs/logic/getInitData': {
52
- target: fuwu
53
- },
54
- '/rs/logic/getSaleInitData': {
55
- target: fuwu
56
- },
57
- '/invoice': {
58
- target: fuwu
59
- },
60
- // 用户登录服务地址
61
- '/rs/user': {
62
- target: fuwu
63
- },
64
- '/rs/path/getParams': {
65
- target: fuwu
66
- },
67
- '/rs/data': {
68
- target: fuwu
69
- },
70
- '/rs/license': {
71
- target: fuwu
72
- },
73
- '/rs/db': {
74
- target: fuwu
75
- },
76
- '/excel': {
77
- target: fuwu
78
- },
79
- '/rs/config': {
80
- target: fuwu
81
- },
82
- '/rs/sql/getLicenseById': {
83
- target: fuwu
84
- },
85
- '/rs/sql/manage_getarealist': {
86
- target: fuwu
87
- },
88
- '/rs/sql/manage_getstreetlist': {
89
- target: fuwu
90
- },
91
- '/rs/report': {
92
- target: 'http://121.36.106.17:8400/'
93
- },
94
- '/rs/vue': {
95
- target: fuwu
96
- },
97
- '/webmeter': {
98
- target: 'http://192.168.50.4:8450'
99
- },
100
- '/rs': {
101
- // target: 'http://192.168.30.63:8081/'
102
- // target: 'http://121.36.106.17:8400/'
103
- target: bendi
104
- }
105
- }
106
-
107
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
108
- publicPath: config.output.publicPath,
109
- stats: {
110
- colors: true,
111
- chunks: false
112
- }
113
- })
114
-
115
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
116
- // force page reload when html-webpack-plugin template changes
117
- compiler.plugin('compilation', function (compilation) {
118
- compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
119
- hotMiddleware.publish({action: 'reload'})
120
- cb()
121
- })
122
- })
123
-
124
- // proxy api requests
125
- Object.keys(proxyTable).forEach(function (context) {
126
- var options = proxyTable[context]
127
- if (typeof options === 'string') {
128
- options = {target: options}
129
- }
130
- app.use(proxyMiddleware(context, options))
131
- })
132
-
133
- // handle fallback for HTML5 history API
134
- app.use(require('connect-history-api-fallback')())
135
- // app.use(function (req, res, next) {
136
- // res.header('Access-Control-Allow-Origin', '*')
137
- // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
138
- // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
139
- // res.header('X-Powered-By', '3,2,1')
140
- // res.header('Access-Control-Allow-Credentials', 'true')
141
- // res.header('Content-Type', 'application/json;charset=utf-8')
142
- // next()
143
- // })
144
-
145
- // serve webpack bundle output
146
- app.use(devMiddleware)
147
-
148
- // enable hot-reload and state-preserving
149
- // compilation error display
150
- app.use(hotMiddleware)
151
-
152
- // serve pure static assets
153
- app.use('/static', express.static('./static'))
154
-
155
- module.exports = app.listen(8089, function (err) {
156
- if (err) {
157
- console.log(err)
158
- return
159
- }
160
- console.log('Listening at http://localhost:8089')
161
- })
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://39.108.82.124:8400/', bendi1 = 'http://121.36.106.17:8400/'
14
+ // 公司测试服务
15
+ var fuwu = 'http://39.108.82.124: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
+ '/files': {
40
+ target: fuwu
41
+ },
42
+ // 查找资源服务数据
43
+ '/rs/search': {
44
+ target: fuwu
45
+ },
46
+ // 查找资源服务数据
47
+ '/rs/logic/getLogin': {
48
+ target: fuwu
49
+ },
50
+ // 查找资源服务数据
51
+ '/rs/logic/getInitData': {
52
+ target: fuwu
53
+ },
54
+ '/rs/logic/getSaleInitData': {
55
+ target: fuwu
56
+ },
57
+ '/invoice': {
58
+ target: fuwu
59
+ },
60
+ // 用户登录服务地址
61
+ '/rs/user': {
62
+ target: fuwu
63
+ },
64
+ '/rs/path/getParams': {
65
+ target: fuwu
66
+ },
67
+ '/rs/data': {
68
+ target: fuwu
69
+ },
70
+ '/rs/license': {
71
+ target: fuwu
72
+ },
73
+ '/rs/db': {
74
+ target: fuwu
75
+ },
76
+ '/excel': {
77
+ target: fuwu
78
+ },
79
+ '/rs/config': {
80
+ target: fuwu
81
+ },
82
+ '/rs/sql/getLicenseById': {
83
+ target: fuwu
84
+ },
85
+ '/rs/sql/manage_getarealist': {
86
+ target: fuwu
87
+ },
88
+ '/rs/sql/manage_getstreetlist': {
89
+ target: fuwu
90
+ },
91
+ '/rs/report': {
92
+ target: 'http://121.36.106.17:8400/'
93
+ },
94
+ '/rs/vue': {
95
+ target: fuwu
96
+ },
97
+ '/webmeter': {
98
+ target: 'http://192.168.50.4:8450'
99
+ },
100
+ '/rs': {
101
+ // target: 'http://192.168.30.63:8081/'
102
+ // target: 'http://121.36.106.17:8400/'
103
+ target: bendi
104
+ }
105
+ }
106
+
107
+ var devMiddleware = require('webpack-dev-middleware')(compiler, {
108
+ publicPath: config.output.publicPath,
109
+ stats: {
110
+ colors: true,
111
+ chunks: false
112
+ }
113
+ })
114
+
115
+ var hotMiddleware = require('webpack-hot-middleware')(compiler)
116
+ // force page reload when html-webpack-plugin template changes
117
+ compiler.plugin('compilation', function (compilation) {
118
+ compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
119
+ hotMiddleware.publish({action: 'reload'})
120
+ cb()
121
+ })
122
+ })
123
+
124
+ // proxy api requests
125
+ Object.keys(proxyTable).forEach(function (context) {
126
+ var options = proxyTable[context]
127
+ if (typeof options === 'string') {
128
+ options = {target: options}
129
+ }
130
+ app.use(proxyMiddleware(context, options))
131
+ })
132
+
133
+ // handle fallback for HTML5 history API
134
+ app.use(require('connect-history-api-fallback')())
135
+ // app.use(function (req, res, next) {
136
+ // res.header('Access-Control-Allow-Origin', '*')
137
+ // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
138
+ // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
139
+ // res.header('X-Powered-By', '3,2,1')
140
+ // res.header('Access-Control-Allow-Credentials', 'true')
141
+ // res.header('Content-Type', 'application/json;charset=utf-8')
142
+ // next()
143
+ // })
144
+
145
+ // serve webpack bundle output
146
+ app.use(devMiddleware)
147
+
148
+ // enable hot-reload and state-preserving
149
+ // compilation error display
150
+ app.use(hotMiddleware)
151
+
152
+ // serve pure static assets
153
+ app.use('/static', express.static('./static'))
154
+
155
+ module.exports = app.listen(8089, function (err) {
156
+ if (err) {
157
+ console.log(err)
158
+ return
159
+ }
160
+ console.log('Listening at http://localhost:8089')
161
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.38",
3
+ "version": "3.5.40",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -102,6 +102,7 @@
102
102
  </footer>
103
103
  </modal>
104
104
  </div>
105
+ <work-busy :is-busy="seaching"></work-busy>
105
106
  </template>
106
107
 
107
108
  <script>
@@ -210,7 +211,8 @@ export default {
210
211
  },
211
212
  // 档案变更明细
212
213
  filechangeDetails: {rows: []},
213
- filechangeDetailsShow: false
214
+ filechangeDetailsShow: false,
215
+ seaching: false // 保存中
214
216
  }
215
217
  },
216
218
  async ready () {
@@ -300,6 +302,7 @@ export default {
300
302
  if (this.row) {
301
303
  this.data.baseinfo.base.version = this.row.version
302
304
  }
305
+ this.seaching = true
303
306
  console.log('档案保存之前,。。。', this.data)
304
307
  if (this.data.meterinfo[0].f_gas_date != null) {
305
308
  this.data.addressinfo.f_address_state = '已通气'
@@ -343,6 +346,7 @@ export default {
343
346
  this.$error('重复提交')
344
347
  return
345
348
  }
349
+ this.seaching = false
346
350
  this.$dispatch('error', '档案保存', this.data, error)
347
351
  })
348
352
  },
@@ -535,7 +535,7 @@ let offlineWriteGen = async function (row) {
535
535
  throw new Error(`卡服务错误:${cardRes.data.Err}${cardRes.data.Exception},请联系开发人员处理!!`)
536
536
  } else {
537
537
  // 更新 上次写卡气量
538
- await getParamGen(row.f_userfiles_id, param.ql)
538
+ await modify(row.f_userfiles_id, param.ql)
539
539
  // 写卡成功 更新收费记录
540
540
  let update = {
541
541
  id: row.unWriteSell[0].id,
@@ -1006,8 +1006,8 @@ let sendCardSaleGasGenremanent = async function (model, row) {
1006
1006
  await modify(row.f_userfiles_id, params.ql)
1007
1007
  // 写卡成功
1008
1008
  // 更新卡密码
1009
- row.version = result.data.version - 1,
1010
- await Vue.CommonService.updatePassword(row, cardRes)
1009
+ row.version = result.data.version - 1
1010
+ await Vue.CommonService.updatePassword(row, cardRes)
1011
1011
  Vue.showAlert('补气购气成功', 'success', 2000)
1012
1012
  return result
1013
1013
  }
@@ -1,112 +1,112 @@
1
- <template>
2
- <div class="auto">
3
- <validator name='v'>
4
- <form novalidate class="form-horizontal">
5
- <div class="row">
6
- <div class="col-sm-4">
7
- <label for="f_paytype" class=" font_normal_body">付款方式:</label>
8
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_payment" disabled/>
9
- </div>
10
-
11
- <div class="col-sm-4">
12
- <label for="f_pregas" class=" font_normal_body">预购气量:</label>
13
- <input type="number" class="input_search" style="width: 60%" v-model="model.f_pregas" disabled>
14
- </div>
15
-
16
- <div class="col-sm-4">
17
- <label for="f_preamount" class=" font_normal_body">预购金额:</label>
18
- <input type="number" class="input_search" style="width: 60%" v-model="model.f_preamount" disabled>
19
- </div>
20
- </div>
21
- <div class="row" style="margin-top:6px;">
22
- <div class="col-sm-4">
23
- <label for="f_print" class="font_normal_body">收&ensp;款&ensp;人:</label>
24
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_operator" disabled>
25
- </div>
26
- <div class="col-sm-4">
27
- <label for="f_print" class="font_normal_body">部&emsp;&emsp;门:</label>
28
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_depname" disabled>
29
- </div>
30
- <div class="col-sm-4">
31
- <label for="f_print" class="font_normal_body">收费时间:</label>
32
- <input type="text" class="input_search" style="width: 60%" v-model="model.f_operate_date" disabled>
33
- </div>
34
- </div>
35
-
36
- <div class="row" style="margin-top:6px;">
37
-
38
- <div class="col-sm-12">
39
- <label for="f_comments" class="font_normal_body">备&emsp;&emsp;注</label>
40
- <input type="text" class="input_search" style="width:87%" v-model="model.f_comments" placeholder="备注"/>
41
- </div>
42
- </div>
43
- </form>
44
- <print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="close" @printok="printok" :data='row'></print-bill>
45
- <div style="text-align:right;margin-top:80px;margin-right:50px;">
46
- <button class="button_search" @click="confirm()" v-if="jurisdiction.includes('线下写卡')" :disabled='clickConfirm'>写卡</button>
47
- <button class="button_clear" @click="clean()">取消</button>
48
- </div>
49
- </validator>
50
- </div>
51
- </template>
52
- <script>
53
- /**
54
- *综合业务
55
- *卡表收费组件
56
- */
57
- import CardService from './CardService'
58
-
59
- // 执行保存逻辑
60
- let sellgasGen = async function (self) {
61
- try {
62
- self.row.cardInfo = self.cardData
63
- self.row.f_write_comments = self.model.f_comments
64
- await CardService.offlineWrite(self.row)
65
- // 开始打票
66
- self.clickConfirm = false
67
- self.$dispatch('success')
68
- } catch (error) {
69
- self.$showAlert(error, 'danger', 0)
70
- self.$dispatch('refresh')
71
- self.clickConfirm = false
72
- }
73
- }
74
-
75
- export default {
76
- title: '线下写卡',
77
- data () {
78
- return {
79
- model: {},
80
- clickConfirm: false,
81
- jurisdiction: this.$login.r
82
- }
83
- },
84
- props: ['row', 'cardData'],
85
- ready () {
86
- if (this.row.unWriteSell) {
87
- this.model = this.row.unWriteSell[0]
88
- }
89
- },
90
- methods: {
91
- confirm () {
92
- if (!this.cardData) {
93
- this.$showAlert('请先进行读卡再进行线下写卡', 'warning', 3000)
94
- return
95
- }
96
-
97
- this.clickConfirm = true
98
- this.$showMessage(`对用户${this.row.f_user_name}进行写卡操作。该操作只做写卡操作。确定要进行该操作吗?`, ['confirm', 'cancel']).then((res) => {
99
- if (res === 'confirm') {
100
- sellgasGen(this)
101
- }
102
- })
103
- },
104
- clean () {
105
- this.$dispatch('refresh', this.row)
106
- }
107
- }
108
- }
109
- </script>
110
-
111
- <style>
112
- </style>
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='v'>
4
+ <form novalidate class="form-horizontal">
5
+ <div class="row">
6
+ <div class="col-sm-4">
7
+ <label for="f_paytype" class=" font_normal_body">付款方式:</label>
8
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_payment" disabled/>
9
+ </div>
10
+
11
+ <div class="col-sm-4">
12
+ <label for="f_pregas" class=" font_normal_body">预购气量:</label>
13
+ <input type="number" class="input_search" style="width: 60%" v-model="model.f_pregas" disabled>
14
+ </div>
15
+
16
+ <div class="col-sm-4">
17
+ <label for="f_preamount" class=" font_normal_body">预购金额:</label>
18
+ <input type="number" class="input_search" style="width: 60%" v-model="model.f_preamount" disabled>
19
+ </div>
20
+ </div>
21
+ <div class="row" style="margin-top:6px;">
22
+ <div class="col-sm-4">
23
+ <label for="f_print" class="font_normal_body">收&ensp;款&ensp;人:</label>
24
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_operator" disabled>
25
+ </div>
26
+ <div class="col-sm-4">
27
+ <label for="f_print" class="font_normal_body">部&emsp;&emsp;门:</label>
28
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_depname" disabled>
29
+ </div>
30
+ <div class="col-sm-4">
31
+ <label for="f_print" class="font_normal_body">收费时间:</label>
32
+ <input type="text" class="input_search" style="width: 60%" v-model="model.f_operate_date" disabled>
33
+ </div>
34
+ </div>
35
+
36
+ <div class="row" style="margin-top:6px;">
37
+
38
+ <div class="col-sm-12">
39
+ <label for="f_comments" class="font_normal_body">备&emsp;&emsp;注</label>
40
+ <input type="text" class="input_search" style="width:87%" v-model="model.f_comments" placeholder="备注"/>
41
+ </div>
42
+ </div>
43
+ </form>
44
+ <print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="close" @printok="printok" :data='row'></print-bill>
45
+ <div style="text-align:right;margin-top:80px;margin-right:50px;">
46
+ <button class="button_search" @click="confirm()" v-if="jurisdiction.includes('线下写卡')" :disabled='clickConfirm'>写卡</button>
47
+ <button class="button_clear" @click="clean()">取消</button>
48
+ </div>
49
+ </validator>
50
+ </div>
51
+ </template>
52
+ <script>
53
+ /**
54
+ *综合业务
55
+ *卡表收费组件
56
+ */
57
+ import CardService from './CardService'
58
+
59
+ // 执行保存逻辑
60
+ let sellgasGen = async function (self) {
61
+ try {
62
+ self.row.cardInfo = self.cardData
63
+ self.row.f_write_comments = self.model.f_comments
64
+ await CardService.offlineWrite(self.row)
65
+ // 开始打票
66
+ self.clickConfirm = false
67
+ self.$dispatch('success')
68
+ } catch (error) {
69
+ self.$showAlert(error, 'danger', 0)
70
+ self.$dispatch('refresh')
71
+ self.clickConfirm = false
72
+ }
73
+ }
74
+
75
+ export default {
76
+ title: '线下写卡',
77
+ data () {
78
+ return {
79
+ model: {},
80
+ clickConfirm: false,
81
+ jurisdiction: this.$login.r
82
+ }
83
+ },
84
+ props: ['row', 'cardData'],
85
+ ready () {
86
+ if (this.row.unWriteSell) {
87
+ this.model = this.row.unWriteSell[0]
88
+ }
89
+ },
90
+ methods: {
91
+ confirm () {
92
+ if (!this.cardData) {
93
+ this.$showAlert('请先进行读卡再进行线下写卡', 'warning', 3000)
94
+ return
95
+ }
96
+
97
+ this.clickConfirm = true
98
+ this.$showMessage(`对用户${this.row.f_user_name}进行写卡操作。该操作只做写卡操作。确定要进行该操作吗?`, ['confirm', 'cancel']).then((res) => {
99
+ if (res === 'confirm') {
100
+ sellgasGen(this)
101
+ }
102
+ })
103
+ },
104
+ clean () {
105
+ this.$dispatch('refresh', this.row)
106
+ }
107
+ }
108
+ }
109
+ </script>
110
+
111
+ <style>
112
+ </style>
@@ -62,6 +62,7 @@
62
62
 
63
63
 
64
64
  </div>
65
+ <work-busy :is-busy="seaching"></work-busy>
65
66
 
66
67
 
67
68
 
@@ -173,7 +174,8 @@ export default {
173
174
  limit_gas: null,
174
175
  peopleNum: this.$appdata.getSingleValue('默认人口'),
175
176
  blodid: '', // 附件的临时id
176
- defaultMeterInfo: '' // 默认的表具信息
177
+ defaultMeterInfo: '', // 默认的表具信息
178
+ seaching: false // 保存中
177
179
  }
178
180
  },
179
181
  async ready () {
@@ -292,6 +294,7 @@ export default {
292
294
  // }
293
295
  },
294
296
  confirm () {
297
+ this.seaching = true
295
298
  this.data.addressinfo.f_address = this.$refs.useressential.addressinfo.f_address
296
299
  this.data.addressinfo.id = this.$refs.useressential.addressinfo.id
297
300
  this.data.oldaddressinfo = this.oldAddress
@@ -314,6 +317,7 @@ export default {
314
317
  this.$error('重复提交')
315
318
  return
316
319
  }
320
+ this.seaching = false
317
321
  this.$dispatch('error', '档案保存', this.data, error)
318
322
  })
319
323
  },
@@ -0,0 +1,440 @@
1
+ <template >
2
+ <div class="auto">
3
+ <div class="auto form-group-new row">
4
+ <div class="col-sm-6" style="height:auto;width:49%;">
5
+ <p style="font-weight: bold;margin: 0"><img src="../../../../static/mainicon/矩形1828.png"/>&nbsp;&nbsp;基本信息</p>
6
+ <!-- 第一行数据-->
7
+ <div class="col-sm-4">
8
+ <label class="font_normal_body_new">客户编号</label>
9
+ <input class="input-underline" style="width:60%" :value="row.f_userinfo_code" readonly>
10
+ </div>
11
+ <div class="col-sm-4">
12
+ <label class="font_normal_body_new">客户姓名</label>
13
+ <input class="input-underline" style="width:60%" :value="row.f_user_name" readonly>
14
+ </div>
15
+ <div class="col-sm-4">
16
+ <label class="font_normal_body_new">用户状态</label>
17
+ <input class="input-underline" style="width:60%" :value="row.f_user_state" readonly>
18
+ </div>
19
+ <div class="col-sm-8">
20
+ <label class="font_normal_body_new">客户地址</label>
21
+ <input class="input-underline" style="width:80%" :value="row.f_address" readonly>
22
+ </div>
23
+ <div class="col-sm-4">
24
+ <label class="font_normal_body_new">客户电话</label>
25
+ <input class="input-underline" style="width:60%" :value="row.f_user_phone" readonly>
26
+ </div>
27
+ <div class="col-sm-4">
28
+ <label class="font_normal_body_new">客户类型</label>
29
+ <input class="input-underline" style="width:60%" :value="row.f_user_type" readonly>
30
+ </div>
31
+ <div class="col-sm-4">
32
+ <label class="font_normal_body_new">用气性质</label>
33
+ <input class="input-underline" style="width:60%" :value="row.f_gasproperties" readonly>
34
+ </div>
35
+ <div class="col-sm-4">
36
+ <label class="font_normal_body_new">证件类型</label>
37
+ <input class="input-underline" style="width:60%" :value="row.f_credentials" readonly>
38
+ </div>
39
+ <div class="col-sm-8">
40
+ <label class="font_normal_body_new">证件号码</label>
41
+ <input class="input-underline" style="width:80%" :value="row.f_idnumber" readonly>
42
+ </div>
43
+ <div class="col-sm-4">
44
+ <label class="font_normal_body_new">用户状态</label>
45
+ <input class="input-underline" style="width:60%" :value="row.f_user_state" readonly>
46
+ </div>
47
+ <div class="col-sm-4">
48
+ <label class="font_normal_body_new">账户余额</label>
49
+ <input class="input-underline" style="width:60%" :value="row.f_balance" readonly>
50
+ </div>
51
+ <div class="col-sm-4">
52
+ <label class="font_normal_body_new">人&ensp;口&ensp;数</label>
53
+ <input class="input-underline" style="width:60%" :value="row.f_people_num" readonly>
54
+ </div>
55
+
56
+ </div>
57
+ <div class="col-sm-6" style="height:auto;width:49%;">
58
+ <p style="font-weight: bold;margin: 0"><img src="../../../../static/mainicon/矩形1828.png"/>&nbsp;&nbsp;表具信息</p>
59
+ <div class="col-sm-4">
60
+ <label class="font_normal_body_new">表&emsp;号&emsp;</label>
61
+ <input class="input-underline" style="width:60%" :value="row.f_meternumber" readonly>
62
+ </div>
63
+ <div class="col-sm-4">
64
+ <label class="font_normal_body_new">气表状态</label>
65
+ <input class="input-underline" style="width:60%" :value="row.f_table_state" readonly>
66
+ </div>
67
+ <div class="col-sm-4">
68
+ <label class="font_normal_body_new">当前底数</label>
69
+ <input class="input-underline" style="width:60%" :value="row.f_meter_base" readonly>
70
+ </div>
71
+
72
+ <div class="col-sm-4">
73
+ <label class="font_normal_body_new">气表品牌</label>
74
+ <input class="input-underline" style="width:60%" :value="row.f_meter_brand" readonly>
75
+ </div>
76
+
77
+ <div class="col-sm-4">
78
+ <label class="font_normal_body_new">气价名称</label>
79
+ <input class="input-underline" style="width:60%" :value="row.f_price_name" readonly>
80
+ </div>
81
+ <div class="col-sm-4">
82
+ <label class="font_normal_body_new">气价类型</label>
83
+ <input class="input-underline" style="width:60%" :value="row.f_price_type" readonly>
84
+ </div>
85
+ <div class="col-sm-4">
86
+ <label class="font_normal_body_new">价格详情</label>
87
+ <input class="input-underline" style="width:60%" :value="row.f_detailprice" readonly>
88
+ </div>
89
+ <div class="col-sm-4">
90
+ <label class="font_normal_body_new" title="最后上报时间">上报时间</label>
91
+ <input class="input-underline" style="width:60%" :value="row.f_meteread_date ? row.f_meteread_date : '暂无'" readonly>
92
+ </div>
93
+ <div v-if="row.f_collection_type == '按金额'" class="col-sm-4">
94
+ <label class="font_normal_body_new">累购金额</label>
95
+ <input class="input-underline" style="width:60%" :value="row.total_fee" readonly>
96
+ </div>
97
+ <div v-if="row.f_collection_type == '按气量'">
98
+ <div class="col-sm-4">
99
+ <label class="font_normal_body_new">累购气量</label>
100
+ <input class="input-underline" style="width:60%" :value="row.f_total_gas" readonly>
101
+ </div>
102
+ <div class="col-sm-4">
103
+ <label class="font_normal_body_new">最后结算时间</label>
104
+ <input class="input-underline" style="width:45%" :value="row.f_hand_date ? row.f_hand_date :'暂无'" readonly>
105
+ </div>
106
+ </div>
107
+ <div v-if="row.f_meter_type.includes('物联网表')" >
108
+ <div class="col-sm-4">
109
+ <label class="font_normal_body_new">物联网次数</label>
110
+ <input class="input-underline" style="width:55%" :value="row.f_iot_times" readonly>
111
+ </div>
112
+ <div class="col-sm-4">
113
+ <label class="font_normal_body_new">表剩余金额</label>
114
+ <input class="input-underline" style="width:55%" :value="row.f_balance_amount" readonly>
115
+ </div>
116
+ <div class="col-sm-4">
117
+ <label class="font_normal_body_new">阀门状态</label>
118
+ <input class="input-underline" style="width:60%" :value="row.f_valvestate == 0 ? '已开阀' : '已关阀'" readonly>
119
+ </div>
120
+ <div class="col-sm-4">
121
+ <label class="font_normal_body_new">累计上报次数</label>
122
+ <input class="input-underline" style="width:45%" :value="row.f_meteread_number ? row.f_meteread_number : 0" readonly>
123
+ </div>
124
+ <div class="col-sm-4">
125
+ <label class="font_normal_body_new">是否自动阀控</label>
126
+ <input class="input-underline" style="width:45%" :value="row.f_network_valve == '1' ? '是' : '否'" readonly>
127
+ </div>
128
+ </div>
129
+ <div v-if="row.f_collection_type == '按气量'" >
130
+ <div class="col-sm-4">
131
+ <label class="font_normal_body_new">表剩余气量</label>
132
+ <input class="input-underline" style="width:55%" :value="row.f_balance_gas" readonly>
133
+ </div>
134
+ <div class="col-sm-4">
135
+ <label class="font_normal_body_new">累计用气金额</label>
136
+ <input class="input-underline" style="width:45%" :value="row.f_total_usegas_amount" readonly>
137
+ </div>
138
+ </div>
139
+ <div class="col-sm-4">
140
+ <label class="font_normal_body_new">写卡次数</label>
141
+ <input class="input-underline" style="width:45%" :value="row.f_times" readonly>
142
+ </div>
143
+ <div class="col-sm-4">
144
+ <label class="font_normal_body_new">抄表册名</label>
145
+ <input class="input-underline" style="width:45%" :value="(row.f_book_code!=null ? '['+row.f_book_code + '] ' : '') + (row.f_book_name!=null ? row.f_book_name:'')" readonly>
146
+ </div>
147
+ <div class="col-sm-4">
148
+ <label class="font_normal_body_new">抄表册册序号</label>
149
+ <input class="input-underline" style="width:45%" :value="row.f_meter_book_sort" readonly>
150
+ </div>
151
+ </div>
152
+ <div class="auto" style="float: right;">
153
+ <button class="button_clear " @click="cancelmain()" >返回</button>
154
+ <button class="button_search" type="button" @click="goChargeManage">去收费</button>
155
+ <button v-if="row.f_meter_brand.includes('西美')&&row.f_meter_type.includes('物联网表')"
156
+ class="button_search" type="button" @click="clearBarrier">清除障碍</button>
157
+ <button v-if="row.f_meter_type.includes('物联网表')"
158
+ class="button_search" type="button" @click="openUser">开户</button>
159
+ <button v-if="row.f_meter_type.includes('物联网表')"
160
+ class="button_search" type="button" @click="valvecontrol">开关阀</button>
161
+ <button v-if="row.f_meter_type.includes('物联网表')"
162
+ class="button_search" type="button" @click="zdfk">开关自动阀控</button>
163
+ <div
164
+ :class="{'button_shrink_top':criteriaShow,'button_shrink_bottom':!criteriaShow}"
165
+ @click="criteriaShow=!criteriaShow"
166
+ class="button_spacing"
167
+ style="float: right"></div>
168
+ </div>
169
+ </div>
170
+
171
+ <div class="auto row">
172
+ <div class="col-sm-6" style="width:49%;"></div>
173
+ <div class="auto form-group-new">
174
+ <div class="col-sm-6" style="height:auto;width:49%;" v-show="criteriaShow">
175
+ <div class="col-sm-4">
176
+ <label class="font_normal_body_new">气表型号</label>
177
+ <input class="input-underline" style="width:60%" :value="row.f_meter_style" readonly>
178
+ </div>
179
+ <div class="col-sm-4">
180
+ <label class="font_normal_body_new">气表类型</label>
181
+ <input class="input-underline" style="width:60%" :value="row.f_meter_type" readonly>
182
+ </div>
183
+ <div class="col-sm-4">
184
+ <label class="font_normal_body_new">初始底数</label>
185
+ <input class="input-underline" style="width:60%" :value="row.f_initial_base" readonly>
186
+ </div>
187
+ <div class="col-sm-4">
188
+ <label class="font_normal_body_new">左&ensp;右&ensp;表</label>
189
+ <input class="input-underline" style="width:60%" :value="row.f_aroundmeter" readonly>
190
+ </div>
191
+ <div class="col-sm-4">
192
+ <label class="font_normal_body_new">建表日期</label>
193
+ <input class="input-underline" style="width:60%" :value="row.f_input_date.substring(0,7)" readonly>
194
+ </div>
195
+ <div v-if="devices.length > 0" v-show="false" style="height: auto" >
196
+ <p style="font-weight: bold;margin: 0">设备信息</p>
197
+ <div class="panel-heading" style="height: 30px">
198
+ <h4 style="display:inline-block;margin-top: auto">设备信息</h4>
199
+ </div>
200
+ <div v-for="device in devices">
201
+
202
+ <form class="form-horizontal">
203
+ <div class="col-sm-4">
204
+ <label class="font_normal_body_new">设备类型</label>
205
+ <input class="input-underline" style="width:60%" :value="device.f_devices_type" readonly>
206
+ </div>
207
+ <div class="col-sm-4">
208
+ <label class="font_normal_body_new">设备品牌</label>
209
+ <input class="input-underline" style="width:60%" :value="device.f_brand" readonly>
210
+ </div>
211
+ <div class="col-sm-4">
212
+ <label class="font_normal_body_new">设备型号</label>
213
+ <input class="input-underline" style="width:60%" :value="device.f_devices_model" readonly>
214
+ </div>
215
+ <div class="col-sm-4">
216
+ <label class="font_normal_body_new">设备数量</label>
217
+ <input class="input-underline" style="width:60%" :value="device.f_devices_num" readonly>
218
+ </div>
219
+ </form>
220
+ </div>
221
+ </div>
222
+ </div>
223
+ </div>
224
+ </div>
225
+ <!--阀控管理弹框-->
226
+ <modal :show.sync="valve">
227
+ <header slot="modal-header" class="modal-header">
228
+ <button type="button" class="close" @click="close()"><span>&times;</span></button>
229
+ <h4 class="modal-title" align="center">阀控管理</h4>
230
+ </header>
231
+ <article slot="modal-body" class="modal-body">
232
+ <div class="form-group " style="padding-left: 8px">
233
+ <label class="font_normal_body" >操作原因</label>
234
+ <textarea class="form-control" style="width:80%" v-model="operateReason" rows="3" placeholder="请填写操作原因"></textarea>
235
+ </div>
236
+ </article>
237
+ <footer slot="modal-footer" class="modal-footer">
238
+ <button type="button" class="button_search btn-ln fr" @click='valveoperate(true)'>开阀</button>
239
+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
240
+ <button type="button" class="btn btn-info btn-ln fr" @click='valveoperate(false)'>关阀</button>
241
+ </footer>
242
+ </modal>
243
+ </div>
244
+ </template>
245
+
246
+ <script>
247
+ import {HttpResetClass} from 'vue-client'
248
+ import Vue from 'vue'
249
+ export default {
250
+ title: '基本信息',
251
+ props: ['row'],
252
+ data () {
253
+ return {
254
+ criteriaShow: false,
255
+ devices: [],
256
+ valveLimit: false,
257
+ // 开关阀操作原因
258
+ operateReason: '',
259
+ valve: false
260
+ }
261
+ },
262
+
263
+ ready () {
264
+ this.getDevice()
265
+ this.valveLimit = this.$login.r.includes('开关阀权限')
266
+ },
267
+ methods: {
268
+ // 发送请求去数据
269
+ async getDevice () {
270
+ if (this.row) {
271
+ let http = new HttpResetClass()
272
+ let condition = `f_userinfo_id = '${this.row.f_userinfo_id}'`
273
+ let getDevices = await http.load('POST', 'rs/sql/sale_GetDevicesInfo', {data: {condition: condition}}, {rejectMsg: '获取设备信息出错!!', resolveMsg: null})
274
+ this.devices = getDevices.data
275
+ }
276
+ },
277
+
278
+ // 返回
279
+ cancelmain () {
280
+ this.$emit('cancel-main')
281
+ },
282
+ clearBarrier(){
283
+ // 地址
284
+ // 127.0.0.1:8445
285
+ // 参数
286
+ let datas = {
287
+ moduleName:"XiMeiSystem", // 固定值
288
+ content:{
289
+ tradeCode:"3015",// 固定值
290
+ appid: "yysf", // 固定值
291
+ partner: "cqsemay_bcts", // 固定值
292
+ version:"v1", // 固定值
293
+ tasked:this.getuuid(), // 任务id
294
+ notifyUrl:"http://192.168.2.10:8445/webmeter/rs/logic/XiMeiSystemCallBack", // 固定值
295
+ meterNo: this.row.f_meternumber,// 表号
296
+ signType:" MD5" //固定值
297
+ },
298
+ title: "清除异常", // 固定值
299
+ type: "清除异常", // 固定值
300
+ inputtor:this.row.f_operator, // 操作人
301
+ userId:this.row.f_userfiles_id, // 表档案ID
302
+ dataId: null // 操作记录ID
303
+ }
304
+ this.$resetpost('/webmeter/rs/logic/syncSaveSetParamsTemplate', {data: datas},{resolveMsg: `清理成功`, rejectMsg: `清理失败`}).then(res => {
305
+ })
306
+ },
307
+ getuuid(){
308
+ let uuidA = '';
309
+ var s = [];
310
+ var hexDigits = '0123456789abcdef';
311
+ for (var i = 0; i < 36; i++) {
312
+ s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
313
+ }
314
+ s[14] = '4';
315
+ s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
316
+ s[8] = s[13] = s[18] = s[23] = '-';
317
+ uuidA = s.join('');
318
+ return uuidA;
319
+ },
320
+ async goChargeManage () {
321
+ if (this.$login.r.includes('收费')){
322
+ await this.$copyText(this.row.f_userinfo_code)
323
+ this.$showAlert(`用户编号已复制到剪切板!`, 'success', 2000)
324
+ this.$goto('charge-manage', {f: this.$login.f}, 'main')
325
+ } else {
326
+ this.showAlert('您没有收费权限,请联系管理员!!', 'warning', 3000)
327
+ }
328
+
329
+ },
330
+ openUser () {
331
+ if (this.$login.r.includes('开户')) {
332
+ this.$showMessage(`是否需要给用户进行开户?`, ['confirm', 'cancel']).then(async (res) => {
333
+ if (res === 'confirm') {
334
+ let data = {
335
+ f_userfiles_id: this.row.f_userfiles_id
336
+ }
337
+ this.$resetpost('rs/logic/startup',data)
338
+ }
339
+ })
340
+ } else {
341
+ this.$showAlert('您没有开户权限,请联系管理员!!', 'warning', 3000)
342
+ }
343
+ },
344
+ // 阀控管理
345
+ zdfk () {
346
+ if (this.$login.r.includes('开关自动阀控')) {
347
+ let data = {
348
+ f_userfiles_id: this.row.f_userfiles_id
349
+ }
350
+ if (this.row.f_network_valve !== '1') {
351
+ this.$resetpost('rs/logic/openzdfk', data, {resolveMsg: '关闭自动阀控成功。', rejectMsg: '关闭自动阀控失败!!!'})
352
+ this.row.f_network_valve = '1'
353
+ } else {
354
+ this.$resetpost('rs/logic/closezdfk', data, {resolveMsg: '开启自动阀控成功。', rejectMsg: '开启自动阀控失败!!!'})
355
+ this.row.f_network_valve = null
356
+ }
357
+ } else {
358
+ this.$showAlert('您没有开关自动阀控权限,请联系管理员!!', 'warning', 3000)
359
+ }
360
+ },
361
+ // 阀控管理
362
+ valvecontrol () {
363
+ if (this.$login.r.includes('开关阀')) {
364
+ this.valve = true
365
+ } else {
366
+ this.$showAlert('您没有开关阀权限,请联系管理员!!', 'warning', 3000)
367
+ }
368
+ },
369
+ close () {
370
+ this.valve = false
371
+ this.operateReason = ''
372
+ },
373
+ // 开关阀操作
374
+ async valveoperate (oper) {
375
+ let msg = oper ? '开阀' : '关阀'
376
+ let datas = {
377
+ instructType: '阀门控制',
378
+ instructTitle: `手动${msg}`,
379
+ condition: `t_userfiles.f_userfiles_id='${this.row.f_userfiles_id}'`,
380
+ meterBrandName: this.row.f_alias,
381
+ f_instruct_state: '待发送',
382
+ inputtor: Vue.$login.f.name,
383
+ reasonInfo: this.operateReason,
384
+ meternumberf: this.row.f_meternumber,
385
+ contentData: {isOpen: oper ? 1 : 0}
386
+ }
387
+ await this.$resetpost('rs/logic/iot_saveInstruct', {data: datas},
388
+ {warnMsg: `确定要进行${msg}操作吗?`, resolveMsg: `${msg}成功`, rejectMsg: `${msg}失败`}).then(res => {
389
+ this.valve = false
390
+ this.operateReason = ''
391
+ })
392
+ }
393
+ },
394
+ watch: {
395
+ 'row' () {
396
+ this.getDevice()
397
+ }
398
+ }
399
+ }
400
+ </script>
401
+ <style scoped lang="less">
402
+ .form-group-new > div {
403
+ height: 3% !important;
404
+
405
+ }
406
+
407
+ .datapanel {
408
+ color: #333;
409
+ background-color: white;
410
+ box-shadow: darkgrey 0.5px 0.5px 0.5px 0.5px ;
411
+ padding: 10px 30px 10px 30px;
412
+ height: auto;
413
+ border-radius:15px;
414
+ }
415
+
416
+ .input-underline {
417
+ border-bottom: 1px solid #dbdbdb;
418
+ border-top: 0px;
419
+ border-left: 0px;
420
+ border-right: 0px;
421
+ }
422
+ .font_normal_body_new {
423
+ font-weight: 100;
424
+ float: left;
425
+ margin-top: 0px;
426
+ font-size: 1.4rem !important;
427
+ line-height: 30px;
428
+ }
429
+
430
+ .col-sm-4,.col-sm-8{
431
+ display: flex;
432
+ align-items: center;
433
+ margin: 7px 0;
434
+
435
+ label{
436
+ line-height: unset;
437
+ margin-bottom: 0;
438
+ }
439
+ }
440
+ </style>
@@ -22,6 +22,7 @@ let specialComp = {
22
22
  // 收费页面的流水查询
23
23
  'meter-charge-record-query': (resolve) => { require(['./ChargeRecordQuery'], resolve) },
24
24
  // 用户基本信息test(预备户)
25
- 'file-user-essential-info-new': (resolve) => { require(['./UserEssentialInfoTest'], resolve) }
25
+ 'file-user-essential-info-new': (resolve) => { require(['./UserEssentialInfoTest'], resolve) },
26
+ 'user-base-info-new': (resolve) => { require(['./UserBaseInfoNew'], resolve) }
26
27
  }
27
28
  exports.specialComp = specialComp