sale-client 3.5.190 → 3.5.192

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.
Files changed (34) hide show
  1. package/build/dev-server.js +24 -158
  2. package/package.json +1 -1
  3. package/src/components/FilesManage/UserGeneralInfoTest.vue +1 -1
  4. package/src/components/FilesManageNew/UserGeneralInfoTest.vue +5 -1
  5. package/src/components/charge/business/CardMeterCenter.vue +33 -4
  6. package/src/components/charge/business/ShowCardSellGas.vue +30 -4
  7. package/src/components/revenue/machineHandManage/machineHandAudit.vue +21 -9
  8. package/src/filiale/chengtou/components/FilesManage/UploadIdCard.vue +543 -543
  9. package/src/filiale/gehua/FileManageNew/FileUserFiles.vue +14 -10
  10. package/src/filiale/gehua/UserGeneralInfoTest.vue +616 -616
  11. package/src/filiale/gehua/sale.js +50 -50
  12. package/src/filiale/qianneng/eticket/EticketPrint.vue +8 -6
  13. package/src/filiale/rizhao/HighMeterCard.vue +1068 -0
  14. package/src/filiale/rizhao/UploadIdCard.vue +543 -0
  15. package/src/filiale/rizhao/UserGeneralInfoTest.vue +17 -15
  16. package/src/filiale/rizhao/sale.js +5 -0
  17. package/src/main.js +1 -1
  18. package/yarn-error.log +9224 -0
  19. package/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
  20. package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
  21. package/.gradle/5.2.1/gc.properties +0 -0
  22. package/.gradle/7.5.1/checksums/checksums.lock +0 -0
  23. package/.gradle/7.5.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  24. package/.gradle/7.5.1/dependencies-accessors/gc.properties +0 -0
  25. package/.gradle/7.5.1/executionHistory/executionHistory.bin +0 -0
  26. package/.gradle/7.5.1/executionHistory/executionHistory.lock +0 -0
  27. package/.gradle/7.5.1/fileChanges/last-build.bin +0 -0
  28. package/.gradle/7.5.1/fileHashes/fileHashes.bin +0 -0
  29. package/.gradle/7.5.1/fileHashes/fileHashes.lock +0 -0
  30. package/.gradle/7.5.1/gc.properties +0 -0
  31. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  32. package/.gradle/buildOutputCleanup/cache.properties +0 -2
  33. package/.gradle/file-system.probe +0 -0
  34. package/.gradle/vcs-1/gc.properties +0 -0
@@ -1,150 +1,36 @@
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')
1
+ const express = require('express')
2
+ const webpack = require('webpack')
3
+ const config = require('./webpack.dev.conf')
4
+ const proxyMiddleware = require('http-proxy-middleware')
5
+ const app = express()
6
+ const compiler = webpack(config)
6
7
 
7
- var app = express()
8
- var compiler = webpack(config)
9
- // var proxy = httpProxy.createProxyServer()
8
+ // 自己改了这里不要提交 来回覆盖挺麻烦的
9
+ const [local, server] = ['http://127.0.0.1:8080', 'http://192.168.50.4:8400']
10
+ const port = 8089
10
11
 
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://192.168.50.4:8450'
16
- // 梅河口
17
- // var fuwu = 'http://139.214.92.34:8301'
18
- // 单县
19
- // var fuwu = 'http://119.187.112.234:8400'
20
- // 中盛
21
- // var fuwu = 'http://39.99.85.14:8400'
22
- // 燎原
23
- // var fuwu = 'http://121.36.106.17:8400'
24
- // 葛华
25
- var fuwu = 'http://219.138.226.181:8401'
26
- // 乌海
27
- // var fuwu = 'http://203.57.101.233:8400'
28
- // 铜川
29
- // var fuwu = 'http://61.134.55.234:9999/'
30
- // var fuwu = 'http://60.222.250.39:8300/'
31
- // 韶关
32
- // var fuwu = 'http://119.146.1.106:8300/'
33
- // 巩义测试服务
34
- // var fuwu = 'http://192.168.0.227:8400'
35
- // 燎原测试服务
36
- // var fuwu = 'http://121.41.19.238:8400 '
37
- // var fuwu = 'http://121.41.19.238:9001/'
38
-
39
- // var fuwu = 'http://139.214.92.34:8301/'
40
-
41
- var proxyTable = {
42
- // '/'
43
- // '/rs/logic/stopBasicLivingNew':{
44
- // target:'http://127.0.0.1:8080'
45
- // },
46
- // '/rs/logic/getBatchOperaPro':{
47
- // target:'http://127.0.0.1:8080'
48
- // },
49
- // '/rs/sql/sale_getUser':{
50
- // target:'http://127.0.0.1:8080'
51
- // },
52
- // '/rs/logic/getOperBtns':{
53
- // target:'http://127.0.0.1:8080'
54
- // },
55
- // '/rs/file/uploadFile':{
56
- // target:'http://127.0.0.1:8080'
57
- // },
58
- // '/rs/business/batchRunExcelDefault/filemanage_fileSave/newSettleFileImport':{
59
- // target:'http://127.0.0.1:8080'
60
- // },
61
- // '/rs/business/batchRunNew/BatchmachineDownHand/machineDownHand':{
62
- // target:'http:127.0.0.1:8080'
63
- // },
64
- // '/rs/sql/getDownPlan':{
65
- // target:'http:127.0.0.1:8080'
66
- // },
67
- // '/rs/logic/saleExport': {
68
- // target: fuwu
69
- // },
70
- // '/rs/logic/saleGetExportProgress': {
71
- // target: fuwu
72
- // },
73
- // '/rs/logic/getWarningMsg': {
74
- // target: 'http://localhost:8080/'
75
- // },
76
- '/rs/file': {
77
- target: fuwu
12
+ const proxyTable = {
13
+ '/text': {
14
+ target: local
78
15
  },
79
16
  '/files': {
80
- target: fuwu
81
- },
82
- // 查找资源服务数据
83
- '/rs/search': {
84
- target: fuwu
85
- },
86
- // 查找资源服务数据
87
- '/rs/logic/getLogin': {
88
- target: fuwu
89
- },
90
- // 查找资源服务数据
91
- '/rs/logic/getInitData': {
92
- target: fuwu
93
- },
94
- '/rs/logic/getSaleInitData': {
95
- target: fuwu
96
- },
97
- '/invoice': {
98
- target: fuwu
99
- },
100
- // 用户登录服务地址
101
- '/rs/user': {
102
- target: fuwu
103
- },
104
- '/rs/path/getParams': {
105
- target: fuwu
106
- },
107
- '/rs/data': {
108
- target: fuwu
109
- },
110
- '/rs/license': {
111
- target: fuwu
112
- },
113
- '/rs/db': {
114
- target: fuwu
17
+ target: server
115
18
  },
116
19
  '/excel': {
117
- target: fuwu
118
- },
119
- '/rs/config': {
120
- target: fuwu
121
- },
122
- '/rs/sql/getLicenseById': {
123
- target: fuwu
124
- },
125
- '/rs/sql/manage_getarealist': {
126
- target: fuwu
127
- },
128
- '/rs/sql/manage_getstreetlist': {
129
- target: fuwu
130
- },
131
- '/rs/report': {
132
- target: 'http://121.36.106.17:8400/'
133
- },
134
- '/rs/vue': {
135
- target: fuwu
20
+ target: server
136
21
  },
137
22
  '/webmeter': {
138
- target: 'http://192.168.50.4:8450'
23
+ target: server
24
+ },
25
+ '/rs/logic': {
26
+ target: server
139
27
  },
140
28
  '/rs': {
141
- // target: 'http://192.168.30.63:8081/'
142
- // target: 'http://121.36.106.17:8400/'
143
- target: fuwu
29
+ target: server
144
30
  }
145
31
  }
146
32
 
147
- var devMiddleware = require('webpack-dev-middleware')(compiler, {
33
+ const devMiddleware = require('webpack-dev-middleware')(compiler, {
148
34
  publicPath: config.output.publicPath,
149
35
  stats: {
150
36
  colors: true,
@@ -152,8 +38,7 @@ var devMiddleware = require('webpack-dev-middleware')(compiler, {
152
38
  }
153
39
  })
154
40
 
155
- var hotMiddleware = require('webpack-hot-middleware')(compiler)
156
- // force page reload when html-webpack-plugin template changes
41
+ const hotMiddleware = require('webpack-hot-middleware')(compiler)
157
42
  compiler.plugin('compilation', function (compilation) {
158
43
  compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
159
44
  hotMiddleware.publish({action: 'reload'})
@@ -161,41 +46,22 @@ compiler.plugin('compilation', function (compilation) {
161
46
  })
162
47
  })
163
48
 
164
- // proxy api requests
165
49
  Object.keys(proxyTable).forEach(function (context) {
166
- var options = proxyTable[context]
50
+ let options = proxyTable[context]
167
51
  if (typeof options === 'string') {
168
52
  options = {target: options}
169
53
  }
170
54
  app.use(proxyMiddleware(context, options))
171
55
  })
172
-
173
- // handle fallback for HTML5 history API
174
56
  app.use(require('connect-history-api-fallback')())
175
- // app.use(function (req, res, next) {
176
- // res.header('Access-Control-Allow-Origin', '*')
177
- // res.header('Access-Control-Allow-Headers', 'X-Requested-With')
178
- // res.header('Access-Control-Allow-Methods', 'PUT, POST, GET,DELETE, OPTIONS')
179
- // res.header('X-Powered-By', '3,2,1')
180
- // res.header('Access-Control-Allow-Credentials', 'true')
181
- // res.header('Content-Type', 'application/json;charset=utf-8')
182
- // next()
183
- // })
184
-
185
- // serve webpack bundle output
186
57
  app.use(devMiddleware)
187
-
188
- // enable hot-reload and state-preserving
189
- // compilation error display
190
58
  app.use(hotMiddleware)
191
-
192
- // serve pure static assets
193
59
  app.use('/static', express.static('./static'))
194
60
 
195
- module.exports = app.listen(8089, function (err) {
61
+ module.exports = app.listen(port, function (err) {
196
62
  if (err) {
197
63
  console.log(err)
198
64
  return
199
65
  }
200
- console.log('Listening at http://localhost:8089')
66
+ console.log('Listening at http://localhost:' + port)
201
67
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.5.190",
3
+ "version": "3.5.192",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -93,7 +93,7 @@
93
93
  </div>
94
94
  <div class="row">
95
95
  <div class="col-sm-2"></div>
96
- <input v-if="fileSaveData.reason==='其他'" class="input_search" style="width:60%" placeholder='修改原因' v-model="fileSaveData.modifyReason"/>
96
+ <input v-if="fileSaveData.reason ==='其他'" class="input_search" style="width:60%" placeholder='修改原因' v-model="fileSaveData.modifyReason"/>
97
97
  </div>
98
98
  </article>
99
99
  <footer slot="modal-footer" class="modal-footer">
@@ -57,7 +57,7 @@
57
57
  <footer slot="modal-footer" class="modal-footer">
58
58
  </footer>
59
59
  </modal>
60
- <high-meter-idcard :show.sync="highmetershow" v-if="highmetershow" @photo-finish="newPhoto()" v-on:confirminfo="confirmIdCard"></high-meter-idcard>
60
+ <high-meter-idcard :show.sync="highmetershow" v-if="highmetershow" @photo-finish="newPhoto" v-on:confirminfo="confirmIdCard"></high-meter-idcard>
61
61
  <user-flow-sheet :show="printflag" :bill-config='configs' :bill-data='billData' :data='newdata' v-on:toggle="close" @printok="printok" v-ref:printbill></user-flow-sheet>
62
62
 
63
63
 
@@ -111,6 +111,7 @@ export default {
111
111
  f_floor_suffix: '层',
112
112
  f_room_suffix: '室'
113
113
  },
114
+ headers: {'username': this.$login.f.name, 'blodid': '', 'fremarks': '', 'defname': '', 'fusetype': '档案信息'},
114
115
  data: {
115
116
  baseinfo: {
116
117
  base: {
@@ -337,6 +338,7 @@ export default {
337
338
  return new Blob([bytesCode], {type: 'image/jpeg'})
338
339
  },
339
340
  newPhoto (Imgbase64) {
341
+ //console.log('imgbase----->',Imgbase64)
340
342
  let form = new FormData()
341
343
  let xhr = new XMLHttpRequest()
342
344
  let formDataBoundary = '----WebkitFormBoundary' + 'GaoPaiYi'
@@ -345,6 +347,8 @@ export default {
345
347
  xhr.open('POST', 'rs/file/uploadFile')
346
348
 
347
349
  if (this.headers) {
350
+ console.log('this.blodid----->',this.blodid)
351
+ this.headers.blodid = this.blodid
348
352
  for (var header in this.headers) {
349
353
  xhr.setRequestHeader(header, encodeURIComponent(this.headers[header]))
350
354
  }
@@ -17,7 +17,7 @@
17
17
  <div class="col-sm-4" v-if="row.f_collection_type == '按气量'"
18
18
  :class="[$v.f_pregas.required || $v.f_pregas.dctest? 'has-error' : 'has-success']">
19
19
  <label for="f_pregas" class=" font_normal_body">*预购气量</label>
20
- <input class="input_search" style="width:60%" type="number"
20
+ <input class="input_search" style="width:60%" type="number" :disabled="config.calculatePreByCollection"
21
21
  @blur="pregas()" v-model="model.f_pregas" v-el:fpregas
22
22
  v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="预购气量"
23
23
  v-next-el='fcollection'>
@@ -26,13 +26,14 @@
26
26
  <label for="f_pregas" class=" font_normal_body">*预购气量</label>
27
27
  <input class="input_search" style="width:60%" type="number" v-el:fpregas
28
28
  @blur="pregas()" v-model="model.f_pregas" placeholder="预购气量"
29
- v-next-el='fcollection'>
29
+ v-next-el='fcollection' :disabled="config.calculatePreByCollection"/>
30
30
  </div>
31
31
  <div class="col-sm-4"
32
32
  :class="[$v.f_pregas.required || $v.f_pregas.dctest? 'has-error' : 'has-success']">
33
33
  <label for="f_pregas" class=" font_normal_body">*预购金额</label>
34
34
  <input class="input_search" style="width:60%" type="number"
35
35
  @blur="preamount()" v-model="model.f_preamount"
36
+ :disabled="config.calculatePreByCollection"
36
37
  v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ],dctest: [0, ">"]}' placeholder="预购金额"
37
38
  v-next-el='fcollection'>
38
39
  </div><!--
@@ -99,17 +100,20 @@
99
100
  <label for="f_collection" class=" font_normal_body">*收&emsp;&emsp;款</label>
100
101
  <input id="f_collection" class="input_search" style="width:60%" type="number" v-model="model.f_collection"
101
102
  v-validate:f_collection='{required: true, dctest: [(model.f_totalcost - 0), ">=" ] }'
103
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
102
104
  v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))" v-scale="[model.f_totalcost, 4]" :disabled="$refs.givechange.promptText != ''">
103
105
  </div>
104
106
  <div class="col-sm-3" v-if="row.f_collection_type === '按气量' && model.f_payment=='赠气' && row.f_meter_type.includes('卡表')"
105
107
  :class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error' : 'has-success']">
106
108
  <label for="f_collection" class=" font_normal_body"><font size="4px" style="font-weight:bold">*收&emsp;款</font></label>
107
109
  <input id="f_collection" class="input_search" style="width:60%;font-size: 18px;font-weight:bold;" type="number" v-model="model.f_collection"
110
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
108
111
  v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))" v-scale="[model.f_totalcost, 4]" :disabled="$refs.givechange.promptText != ''">
109
112
  </div>
110
113
  <div class="col-sm-3" v-if="row.f_collection_type === '按金额' && row.f_meter_type.includes('卡表')">
111
114
  <label for="f_collection" class=" font_normal_body"><font size="4px" style="font-weight:bold">*收&emsp;款</font></label>
112
115
  <input id="f_collection" class="input_search" style="width:50%;font-size: 18px;font-weight:bold;" type="number" v-model="model.f_collection"
116
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
113
117
  v-el:fcollection @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))" v-scale="[model.f_collection, 4]" :disabled="$refs.givechange.promptText != ''">
114
118
  </div>
115
119
  <div class="col-sm-4" v-if="!row.f_meter_type.includes('卡表')">
@@ -118,6 +122,7 @@
118
122
  <input id="f_collection" class="input_search" style="width:50%;font-size: 18px;font-weight:bold;"
119
123
  type="number" v-model="model.f_collection"
120
124
  v-el:fcollection
125
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
121
126
  @keyup.enter="checkInvoiceMsg((!$v.valid || validateOk || !islegal || clickConfirm))"
122
127
  v-scale="[model.f_collection, 4]" disabled>
123
128
  </div>
@@ -203,12 +208,12 @@
203
208
  <div style="text-align:right; height: 25%">
204
209
  <strong style="color:red;margin-right: 5px">{{ $refs.givechange.promptText }}</strong>
205
210
  <strong style="font-size: large" v-if="!config.notShowFormula">计算公式:{{calculatedetail ? calculatedetail : ' 暂无'}}</strong><br/>
206
- <payment-code-button :clickable="!$v.valid || validateOk || !islegal || clickConfirm"
211
+ <payment-code-button :clickable="!$v.valid || validateOk || !islegal || clickConfirm|| model.f_preamount === 0"
207
212
  :payment.sync="model.f_payment" :payment-data="paytype"
208
213
  @confirm-payment="confirm()">
209
214
  </payment-code-button>
210
215
  <button class="button_search btn-gn" type="submit" @click="checkInvoiceMsg()"
211
- :disabled='!$v.valid || validateOk || !islegal || clickConfirm'>确认
216
+ :disabled='!$v.valid || validateOk || !islegal || clickConfirm || model.f_preamount === 0'>确认
212
217
  </button>
213
218
  <button class="button_clear btn-gn" @click="clean()">取消</button>
214
219
  </div>
@@ -486,6 +491,7 @@
486
491
  serialShow: false,
487
492
  resid: [], // 存放新增的f_files表中id
488
493
  config: {
494
+ calculatePreByCollection: true, // 可以更具收款来反向计算预购
489
495
  notShowFormula: false, // 不显示计算公式,默认显示
490
496
  autoCollection: true, // 自动填写收款
491
497
  showupload: true, // 显示上传
@@ -631,6 +637,26 @@
631
637
  }
632
638
  },
633
639
  methods: {
640
+ // 根据收款金额计算划价信息
641
+ // 需要配置 calculatePreByCollection = true
642
+ async calculatePreByCollection() {
643
+ try {
644
+ this.model.f_collection = (this.model.f_collection - 0)
645
+ let calFee = ((this.model.f_collection - 0) + (this.row.f_balance)).toFixed(4)
646
+ // 通过收款进行划价
647
+ let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
648
+ this.model.f_pregas = parseInt(getGas.data.gas)
649
+ let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
650
+ this.model.chargeprice = dymoney2.data.chargeprice
651
+ Object.assign(this.model, this.model, dymoney2.data)
652
+ this.model.f_totalcost = dymoney2.data.chargenum
653
+ this.model.f_preamount = dymoney2.data.chargenum
654
+ this.calText(dymoney2.data.chargeprice)
655
+ } catch (error) {
656
+ this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
657
+ this.$dispatch('error', '发卡售气', this.model, error)
658
+ }
659
+ },
634
660
  // 校验发票信息
635
661
  checkInvoiceMsg (flag) {
636
662
  // 校验是否超出最大透支余额
@@ -865,6 +891,9 @@
865
891
  return this.model.f_balance
866
892
  }
867
893
  if (this.model.f_preamount) {
894
+ if (this.config.calculatePreByCollection) {
895
+ return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - this.model.f_preamount).toFixed(4)
896
+ }
868
897
  // if (this.row.f_collection_type === '按金额') {
869
898
  // return ((this.model.f_collection - 0) - (this.model.f_totalcost - 0)).toFixed(4)
870
899
  // } else {
@@ -18,7 +18,7 @@
18
18
  :class="[$v.f_pregas.required || $v.f_pregas.dctest? 'has-error' : 'has-success']">
19
19
  <label for="f_pregas" class=" font_normal_body">*预购气量</label>
20
20
  <input class="input_search" style="width:60%" type="number" id="fouces"
21
- @blur="pregas()" v-model="model.f_pregas"
21
+ @blur="pregas()" v-model="model.f_pregas" :disabled="config.calculatePreByCollection"
22
22
  v-validate:f_pregas='{required: true, dctest: [maxgas, "<=" ]}' placeholder="预购气量"
23
23
  v-next-el='sk'>
24
24
  </div>
@@ -28,7 +28,7 @@
28
28
  <label for="f_preamount" class=" font_normal_body">*预购金额</label>
29
29
  <input class="input_search" style="width:60%" type="number" v-model="model.f_preamount"
30
30
  @blur="preamount()" v-validate:f_preamount='{required: true, dctest: [maxmoney, "<=" ]}'
31
- placeholder="预购金额"
31
+ placeholder="预购金额" :disabled="config.calculatePreByCollection"
32
32
  v-scale="[model.f_preamount, 4]" placeholder="预购金额">
33
33
  </div>
34
34
  </div>
@@ -88,12 +88,14 @@
88
88
  :class="[$v.f_collection.required || $v.f_collection.dctest ? 'has-error' : 'has-success']">
89
89
  <label for="f_collection" class=" font_normal_body">*收&emsp;&emsp;款</label>
90
90
  <input class="input_search" style="width:60%" type="number" v-model="model.f_collection"
91
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
91
92
  v-validate:f_collection='{required: true, dctest: [(model.f_totalcost - 0) + (openFee - 0), ">=" ] }'
92
93
  v-el:sk v-scale="[model.f_collection, 4]" :disabled="$refs.givechange.promptText != ''">
93
94
  </div>
94
95
  <div class="col-sm-3 form-group" v-if="row.f_collection_type === '按金额'">
95
96
  <label for="f_collection" class=" font_normal_body">*收&emsp;&emsp;款</label>
96
97
  <input class="input_search" style="width:50%" type="number" v-model="model.f_collection"
98
+ @blur="config.calculatePreByCollection && calculatePreByCollection()"
97
99
  v-el:sk v-scale="[model.f_collection, 4]" :disabled="$refs.givechange.promptText != ''">
98
100
  </div>
99
101
  <div class="col-sm-1 form-group">
@@ -185,12 +187,12 @@
185
187
  <strong style="color:red;margin-right: 5px">{{ $refs.givechange.promptText }}</strong>
186
188
  <strong style="font-size: large"
187
189
  v-if="!config.notShowFormula">计算公式:{{ calculatedetail ? calculatedetail : ' 暂无' }}</strong><br/>
188
- <payment-code-button :clickable="!$v.valid || validateOk || !islegal || clickConfirm"
190
+ <payment-code-button :clickable="!$v.valid || validateOk || !islegal || clickConfirm || model.f_preamount === 0"
189
191
  :payment.sync="model.f_payment" :payment-data="paytype"
190
192
  @confirm-payment="confirm()">
191
193
  </payment-code-button>
192
194
  <button class="button_search btn-gn" @click="checkInvoiceMsg()"
193
- :disabled='!$v.valid || validateOk || !islegal || clickConfirm'>确认
195
+ :disabled='!$v.valid || validateOk || !islegal || clickConfirm || model.f_preamount === 0'>确认
194
196
  </button>
195
197
  <button class="button_clear btn-gn" @click="clean()">取消</button>
196
198
  </div>
@@ -461,6 +463,7 @@ export default {
461
463
  resid: [],
462
464
  config: {
463
465
  notShowFormula: false, // 不显示计算公式,默认显示
466
+ calculatePreByCollection: true, // 可以更具收款来反向计算预购
464
467
  showupload: true, // 默认不显示上传附件
465
468
  hasPrint: false, // 默认打票
466
469
  floor: true, // 是否取整收费
@@ -629,6 +632,26 @@ export default {
629
632
  }
630
633
  },
631
634
  methods: {
635
+ // 根据收款金额计算划价信息
636
+ // 需要配置 calculatePreByCollection = true
637
+ async calculatePreByCollection() {
638
+ try {
639
+ this.model.f_collection = (this.model.f_collection - 0)
640
+ let calFee = ((this.model.f_collection - 0) + (this.row.f_balance)).toFixed(4)
641
+ // 通过收款进行划价
642
+ let getGas = await this.$CommonService.feeCalculate(this.model, calFee)
643
+ this.model.f_pregas = parseInt(getGas.data.gas)
644
+ let dymoney2 = await this.$CommonService.gasCalculate(this.model, this.model.f_pregas)
645
+ this.model.chargeprice = dymoney2.data.chargeprice
646
+ Object.assign(this.model, this.model, dymoney2.data)
647
+ this.model.f_totalcost = dymoney2.data.chargenum
648
+ this.model.f_preamount = dymoney2.data.chargenum
649
+ this.calText(dymoney2.data.chargeprice)
650
+ } catch (error) {
651
+ this.$showAlert(`发卡售气划价错误,错误类型:${error}`, 'danger', 0)
652
+ this.$dispatch('error', '发卡售气', this.model, error)
653
+ }
654
+ },
632
655
  // 校验发票信息
633
656
  checkInvoiceMsg() {
634
657
  console.log(this.model.f_print[0])
@@ -858,6 +881,9 @@ export default {
858
881
  if (this.model.f_payment === '赠气') {
859
882
  return this.model.f_balance
860
883
  }
884
+ if (this.config.calculatePreByCollection) {
885
+ return ((this.model.f_collection - 0) + (this.row.f_balance - 0) - this.model.f_preamount).toFixed(4)
886
+ }
861
887
  if (this.model.f_preamount) {
862
888
  if ((this.row.f_balance - 0) > (this.model.f_preamount - 0)) {
863
889
  return ((this.row.f_balance - 0) - (this.model.f_preamount - 0) + (this.model.f_collection - 0)).toFixed(4)
@@ -394,7 +394,7 @@
394
394
  import * as Util from '../../../Util'
395
395
 
396
396
  let readyGen = async function (self) {
397
- self.$refs.paged.$refs.cri.model.startDate = self.$login.toStartAndEndDateString()[0]
397
+ self.$refs.paged.$refs.cri.model.startDate = self.$login.toStartAndEndDateString()[0]
398
398
  self.$refs.paged.$refs.cri.model.endDate = self.$login.toStandardDateString()
399
399
  await self.$LoadParams.loadMeterBook(self.f_filialeid)
400
400
  self.loadMeterBooks()
@@ -414,12 +414,13 @@
414
414
  dep: [],
415
415
  user: []
416
416
  },
417
- config:{
418
- examine: false,
417
+ config: {
418
+ examine: false
419
419
  },
420
420
  imgfilename: '',
421
421
  // 小区
422
422
  residentialArea: [],
423
+ inputtouPerson: [],
423
424
  imgshow: false,
424
425
  criteriaShow: false,
425
426
  orgCondtionStr: '',
@@ -444,8 +445,8 @@
444
445
  'f_adjustable_name': '调压箱名称',
445
446
  'f_inputtor': '抄表员'
446
447
  },
447
- auditState:[{label: '全部', value: ''}, {label: '已审核', value: '已抄表'}, {label: '未审核', value: '待审核'}],
448
- auditState1:[{label: '全部', value: ''}, {label: '审核失败', value: '审核失败'}],
448
+ auditState: [{label: '全部', value: ''}, {label: '已审核', value: '已抄表'}, {label: '未审核', value: '待审核'}],
449
+ auditState1: [{label: '全部', value: ''}, {label: '审核失败', value: '审核失败'}],
449
450
  meters: [{label: '全部', value: ''}, {label: '机表', value: '机表'}, {label: '物联网表', value: '物联网表'}],
450
451
  resultstate: this.$appdata.getParam('抄表结果状态'),
451
452
  meterstates: this.$appdata.getParam('抄表状态') ? [{
@@ -475,7 +476,7 @@
475
476
  methods: {
476
477
  // 修正本期底数
477
478
  amend (row) {
478
- let tablebase = window.prompt('请输入你要修正的底数值,上期底数:'+ row.f_meter_base)
479
+ let tablebase = window.prompt('请输入你要修正的底数值,上期底数:' + row.f_meter_base)
479
480
  if (!tablebase) return
480
481
  if (tablebase < 0) {
481
482
  this.$showAlert(`底数不能小于0,请注意!`, 'warning', 2000)
@@ -596,9 +597,9 @@
596
597
  this.imgshow = false
597
598
  },
598
599
  imgShow (val) {
599
- console.log("-----------val2:",val)
600
+ console.log('-----------val2:', val)
600
601
  this.imgfilename = `rs/image/file/` + val
601
- console.log("-----------imgfilename2:",this.imgfilename)
602
+ console.log('-----------imgfilename2:', this.imgfilename)
602
603
  this.imgshow = true
603
604
  },
604
605
  async getaddress () {
@@ -632,6 +633,17 @@
632
633
  } else {
633
634
  args.condition = `${args.condition}` + this.orgCondtionStr
634
635
  }
636
+ // 抄表员查询条件
637
+ this.inputtouPerson = this.$refs.paged.$refs.cri.model.f_inputtor
638
+ if (this.inputtouPerson.length !== 0) {
639
+ let str = JSON.stringify(this.inputtouPerson)
640
+ str = str.replace(/"/g, `'`)
641
+ str = str.replace(/\[/g, ``)
642
+ str = str.replace(/\]/g, ``)
643
+ console.log('=====抄表员model22222222222绑定====', str)
644
+ // 查询多个抄表员时条件
645
+ args.condition += ` and f_inputtor in ( ${str} )`
646
+ }
635
647
  this.excelCondition = args.condition
636
648
  this.$refs.paged.$refs.grid.selectInit()
637
649
  this.model.search(args.condition, args.model)
@@ -696,7 +708,7 @@
696
708
  },
697
709
  loadMeterBooks () {
698
710
  this.meterbooks = this.$GetSaleParam.getMeterBooks()
699
- },
711
+ }
700
712
 
701
713
  },
702
714
  computed: {