sale-client 4.2.25 → 4.2.27

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,7 +1,7 @@
1
1
  var path = require('path')
2
2
  var checkVersion = require('./versionCheck.js')
3
3
  checkVersion()
4
- const [ serverRul, localUrl ] = ['http://123.180.154.5:31467/', 'http://127.0.0.1:9026']
4
+ const [ serverRul, localUrl ] = ['http://192.168.50.67:31567', 'http://127.0.0.1:9026']
5
5
  var merge = require('webpack-merge')
6
6
  var baseConfig = require('./webpack.dev.conf')
7
7
  var devConfig = {
@@ -19,51 +19,51 @@ var devConfig = {
19
19
  children: false // 不输出子模块构建信息
20
20
  },
21
21
  proxy: {
22
- // '/api/af-revenue/logic/depositCharge': {
23
- // pathRewrite: {
24
- // '/api/af-revenue/logic': '/logic'
25
- // },
26
- // target: 'http://127.0.0.1:9026'
27
- // },
28
- // '/api/af-revenue/logic': {
29
- // pathRewrite: {
30
- // '/api/af-revenue/logic': '/logic'
31
- // },
32
- // target: localUrl
33
- // },
34
- // '/api/af-revenue/file': {
35
- // pathRewrite: {
36
- // '/api/af-revenue/file': '/file'
37
- // },
38
- // target: localUrl
39
- // },
40
- // 'api/af-revenue/entity/save': {
41
- // pathRewrite: {
42
- // '/api/af-revenue/entity/save': '/entity/save'
43
- // },
44
- // target: localUrl
45
- // },
46
- // '/singlepage': {
47
- // // pathRewrite: {
48
- // // '/weixin2/rs': '/rs'
49
- // // },
50
- // target: localUrl
51
- // },
52
- // '/weixin2/rs': {
53
- // pathRewrite: {
54
- // '/weixin2/rs': '/singlepage/weixin2/rs'
55
- // },
56
- // target: localUrl
57
- // },
58
- // '/api/af-revenue/sql': {
59
- // pathRewrite: {
60
- // '/api/af-revenue/sql': '/sql'
61
- // },
62
- // target: localUrl
63
- // },
64
- // '/rs/pay': {
65
- // target: serverRul
66
- // },
22
+ '/api/af-revenue/logic/depositCharge': {
23
+ pathRewrite: {
24
+ '/api/af-revenue/logic': '/logic'
25
+ },
26
+ target: 'http://127.0.0.1:9026'
27
+ },
28
+ '/api/af-revenue/logic': {
29
+ pathRewrite: {
30
+ '/api/af-revenue/logic': '/logic'
31
+ },
32
+ target: localUrl
33
+ },
34
+ '/api/af-revenue/file': {
35
+ pathRewrite: {
36
+ '/api/af-revenue/file': '/file'
37
+ },
38
+ target: localUrl
39
+ },
40
+ 'api/af-revenue/entity/save': {
41
+ pathRewrite: {
42
+ '/api/af-revenue/entity/save': '/entity/save'
43
+ },
44
+ target: localUrl
45
+ },
46
+ '/singlepage': {
47
+ // pathRewrite: {
48
+ // '/weixin2/rs': '/rs'
49
+ // },
50
+ target: localUrl
51
+ },
52
+ '/weixin2/rs': {
53
+ pathRewrite: {
54
+ '/weixin2/rs': '/singlepage/weixin2/rs'
55
+ },
56
+ target: localUrl
57
+ },
58
+ '/api/af-revenue/sql': {
59
+ pathRewrite: {
60
+ '/api/af-revenue/sql': '/sql'
61
+ },
62
+ target: localUrl
63
+ },
64
+ '/rs/pay': {
65
+ target: serverRul
66
+ },
67
67
  '/api': {
68
68
  target: serverRul,
69
69
  changeOrigin: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.2.25",
3
+ "version": "4.2.27",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -669,6 +669,22 @@ export default {
669
669
  this.addTaskModalShow = true
670
670
  },
671
671
  async confirmbefore () {
672
+ // 校验是否存在需提示的记录,若存在则询问是否继续
673
+ try {
674
+ console.log('123999999')
675
+ let http = new HttpResetClass()
676
+ let change = await http.load('POST', 'api/af-revenue/logic/validateOwe', {data: {f_userinfo_id: this.row.f_userinfo_id}}, {resolveMsg: null, rejectMsg: '获取异常出错!!'})
677
+ console.log('1239999998', change)
678
+ let hasUnhand = change && change.data && change.data.unhand && change.data.unhand.length > 0
679
+ let hasOwe = change && change.data && change.data.owe && change.data.owe.length > 0
680
+ if (hasUnhand || hasOwe) {
681
+ let r = await this.$showMessage('存在相关异常/欠费记录,是否继续换表?', ['confirm', 'cancel'])
682
+ if (r !== 'confirm') { return }
683
+ }
684
+ } catch (e) {
685
+ // 接口异常时不中断原流程,仅按原逻辑继续
686
+ console.log('validateOwe 接口异常:', e)
687
+ }
672
688
  if (this.model.metermessage.f_meter_type[0] !== '机表') {
673
689
  if (!this.config.hasArrearsChange && this.books.data && this.books.data.length > 0) {
674
690
  if (this.books.data[0].f_whether_pay === '否') {
@@ -0,0 +1,303 @@
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 form-group" :class="[$v.payment.required ? 'select-error' : '']">
7
+ <label class="font_normal_body" title="参数名称:付款方式">收款方式</label>
8
+ <input type="text" v-show="false" v-model="$refs.payment.selectedItems"
9
+ v-validate:payment='{required: true }'>
10
+ <v-select v-model="f_payment"
11
+ placeholder='请选择'
12
+ style="width:60%"
13
+ :value.sync="model.f_payment"
14
+ :options='paytype'
15
+ v-ref:payment
16
+ close-on-select clear-button></v-select>
17
+
18
+ </div>
19
+ <div class="col-sm-4 form-group">
20
+ <label for="f_print" class="font_normal_body">打印格式</label>
21
+
22
+ <v-select id="print"
23
+ v-model="f_print"
24
+ style="width:60%"
25
+ placeholder='请选择'
26
+ :value.sync="model.f_print"
27
+ :options='printstyle'
28
+ close-on-select clear-button>
29
+ </v-select>
30
+ </div>
31
+ <div class="col-sm-4 form-group">
32
+ <label class="font_normal_body"
33
+ title="参数值:计入/不计入,计入:更新档案结余及累购,不计入:只保存记录不对档案进行操作">计入累购</label>
34
+ <input v-show="false" v-model="model.f_add_gas" v-validate:f_operat_type='{required: true}'>
35
+ <v-select :value.sync="model.f_add_gas" value-single
36
+ :options='addGas' placeholder='请选择'
37
+ selected="是否计入累购"
38
+ style="width:60%"
39
+ close-on-select></v-select>
40
+ </div>
41
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按气量'">
42
+ <label class="font_normal_body">剩余气量</label>
43
+ <input class="input_search" style="width:60%" type="number" v-model="data.f_balance_gas" readonly>
44
+ </div>
45
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按气量'">
46
+ <label class="font_normal_body">核算单价</label>
47
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_price">
48
+ </div>
49
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按金额'">
50
+ <label class="font_normal_body">剩余金额</label>
51
+ <input class="input_search" style="width:60%" type="number" v-model="data.f_balance_amount" readonly>
52
+ </div>
53
+ <div class="col-sm-4 form-group" v-if="config.overBalance && data.f_collection_type === '按气量'"
54
+ :class="[$v.f_refund_gas.required || $v.f_refund_gas.dctest ? 'has-error' : 'has-success']">
55
+ <label class="font_normal_body">冲减气量</label>
56
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_gas"
57
+ v-validate:f_refund_gas='{required: true, dctest: [0, ">=" ]}' placeholder="冲减气量">
58
+ </div>
59
+ <div class="col-sm-4 form-group" v-if="!config.overBalance && data.f_collection_type === '按气量'"
60
+ :class="[$v.f_refund_gas.required || $v.f_refund_gas.dctest ? 'has-error' : 'has-success']">
61
+ <label class="font_normal_body">冲减气量</label>
62
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_gas"
63
+ v-validate:f_refund_gas='{required: true, dctest: [data.f_balance_gas, "<=" ]}'
64
+ placeholder="冲减气量">
65
+ </div>
66
+ </div>
67
+
68
+ <div class="row">
69
+
70
+ <div class="col-sm-8">
71
+ <label for="f_paper_account" class="font_normal_body ">&nbsp;&nbsp;&nbsp;备注&nbsp;&nbsp;&nbsp;</label>
72
+ <input class="input_search" style="width:80%" v-model="model.f_comments">
73
+ </div>
74
+ <div class="col-sm-4 form-group" v-if="data.f_collection_type === '按气量'">
75
+ <label class="font_normal_body">退费金额</label>
76
+ <input class="input_search" style="width:60%"
77
+ type="number" v-model="model.f_refund_fee"
78
+ placeholder="退费金额">
79
+ </div>
80
+ <div class="col-sm-4 form-group" v-if="!config.overBalance && data.f_collection_type === '按金额'"
81
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
82
+ <label class="font_normal_body">退费金额</label>
83
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
84
+ v-validate:f_refund_fee='{required: true, dctest: [data.f_balance_amount, "<=" ]}'
85
+ placeholder="退费金额">
86
+ </div>
87
+ <div class="col-sm-4 form-group" v-if="config.overBalance && data.f_collection_type === '按金额'"
88
+ :class="[$v.f_refund_fee.required || $v.f_refund_fee.dctest ? 'has-error' : 'has-success']">
89
+ <label class="font_normal_body">退费金额</label>
90
+ <input class="input_search" style="width:60%" type="number" v-model="model.f_refund_fee"
91
+ v-validate:f_refund_fee='{required: true, dctest: [0, ">=" ]}' placeholder="退费金额">
92
+ </div>
93
+ </div>
94
+ </form>
95
+ <div style="text-align:right;">
96
+ <button class="button_search btn-gn" @click="confirm()" :disabled='!$v.valid'>确认</button>
97
+ <button class="button_clear btn-gn" @click="clean()">取消</button>
98
+ </div>
99
+ </validator>
100
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
101
+ <!--<print-bill :show="print" :bill-manager='config.hasBillManage' v-ref:printbill :bill-url='billUrl' v-on:toggle="clean" @printok="printok" :data='printModel'></print-bill>-->
102
+ <print-bill :show="print" :bill-config='config' :bill-data='billData' v-on:toggle="clean" @printok="printok"
103
+ :data='printModel' v-ref:printbill></print-bill>
104
+ </div>
105
+
106
+ <upload :blodid="data.f_userinfo_id" :businessid="randomBusinessId" isremark="true" fusetype="退费管理"></upload>
107
+ </template>
108
+
109
+
110
+ <script>
111
+ let readyGen = async function (self) {
112
+ await self.$getConfig(self, 'IOTRefund')
113
+ // 默认打印格式
114
+ self.model.f_print = self.config.printType instanceof Array ? self.config.printType : [self.config.printType]
115
+ self.model.f_payment = [self.config.payment]
116
+
117
+ self.model.f_use_type = self.config.billType
118
+ self.model.f_bill_type = self.model.f_print
119
+ self.hasValidateBill = self.config.hasBillManage
120
+ }
121
+
122
+ export default {
123
+ title: '物联网表退费',
124
+ data () {
125
+ return {
126
+ config: {
127
+ showupload: false, // 默认不上传附件
128
+ hasPrint: false, // 默认打票
129
+ hasBillManage: false, // 默认不启用发票管理
130
+ overBalance: false, // 为true时退费金额可以大于余额
131
+ printType: '普通收据', // 收据/电子票/专用发票/国税发票
132
+ payment: '现金缴费',
133
+ billType: '燃气费'
134
+ },
135
+ model: {
136
+ f_refund_fee: '',
137
+ f_add_gas: '计入',
138
+ f_refund_gas: '',
139
+ f_comments: '',
140
+ f_payment: '',
141
+ f_print: '',
142
+ f_price: 0
143
+ },
144
+
145
+ blodid: '',
146
+ hasValidateBill: false,
147
+ randomBusinessId: '',
148
+ resid: [], // 存放新增的f_files表中id
149
+ validateOk: false,
150
+ addGas: [{label: '计入', value: '计入'}, {label: '不计入', value: '不计入'}],
151
+ printModel: {},
152
+ print: false,
153
+ billUrl: '',
154
+ billData: {
155
+ url: 'api/af-revenue/report/refund_sell',
156
+ bill: ''
157
+ },
158
+
159
+ // 下拉框值
160
+ paytype: [],
161
+ printstyle: this.$appdata.getParam('打印格式')
162
+ }
163
+ },
164
+ props: ['data'],
165
+ ready () {
166
+ if (this.data.f_civill_id) {
167
+ this.paytype = [{label: '单位余额', value: '单位余额'}, ...this.$appdata.getParam('付款方式')]
168
+ } else {
169
+ this.paytype = this.$appdata.getParam('付款方式')
170
+ }
171
+ readyGen(this)
172
+ this.getRandomId()
173
+ if (this.data.f_collection_type === '按气量') {
174
+ // this.$showAlert('按气量缴费的物联网表退费功能尚未开放!!', 'warning', 3000)
175
+ this.model.f_price = this.data.f_price
176
+
177
+ // this.$dispatch('refresh')
178
+ }
179
+ },
180
+ events: {
181
+ // 删除Resid数组元素
182
+ 'delResid' (val) {
183
+ this.resid.$remove({id: val, f_biobid: ''})
184
+ // this.resid.splice(this.resid.indexOf({id:val,f_biobid:''}),1);
185
+ },
186
+ // 增加Resid数组元素
187
+ 'resid' (val) {
188
+ this.resid.push({id: val, f_biobid: ''})
189
+ }
190
+ },
191
+ methods: {
192
+ getRandomId () {
193
+ this.randomBusinessId = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
194
+ let res = Math.random() * 16 | 0
195
+ let v = c == 'x' ? res : (res & 0x3 | 0x8)
196
+ return v.toString(16)
197
+ })
198
+ },
199
+ async confirm () {
200
+ if (this.data.f_collection_type === '按金额' && this.model.f_price) {
201
+ this.model.f_refund_gas = (this.model.f_refund_fee - 0) / (this.model.f_price - 0)
202
+ }
203
+ let param = {
204
+ f_user_id: this.data.f_user_id,
205
+ f_userfiles_id: this.data.f_userfiles_id,
206
+ version: this.data.version,
207
+ f_price: this.model.f_price,
208
+ f_add_gas: this.model.f_add_gas,
209
+ f_refund_gas: this.model.f_refund_gas,
210
+ f_refund_fee: this.model.f_refund_fee,
211
+ f_comments: this.model.f_comments,
212
+ f_collection_type: this.data.f_collection_type,
213
+ f_payment: this.model.f_payment[0],
214
+ f_print: this.model.f_print[0],
215
+ f_price_id: this.data.f_price_id,
216
+ f_total_gas: parseFloat(this.data.f_total_gas) - parseFloat(this.model.f_refund_gas),
217
+ f_total_fee: parseFloat(this.data.f_total_fee) - parseFloat(this.model.f_refund_fee),
218
+ f_stairprice_id: this.data.f_stairprice_id,
219
+ operInfo: {
220
+ f_operator: this.$login.f.name,
221
+ f_operatorid: this.$login.f.id,
222
+ f_orgid: this.$login.f.orgid,
223
+ f_orgname: this.$login.f.orgs,
224
+ f_depid: this.$login.f.depids,
225
+ f_depname: this.$login.f.deps
226
+ }
227
+ }
228
+ if (this.model.f_add_gas !== '计入') {
229
+ param.f_total_fee = this.data.f_total_fee
230
+ param.f_total_gas = this.data.f_total_gas
231
+ }
232
+ console.log('退费传参', param)
233
+ let res = await this.$resetpost('api/af-revenue/logic/iotRefund', {data: param}, {
234
+ warnMsg: `确定要对用户${this.data.f_user_name}进行退费吗?`,
235
+ resolveMsg: '退费成功!!',
236
+ rejectMsg: '退费失败!!请重试!!'
237
+ })
238
+ console.log('退费', res)
239
+ let param1 = []
240
+ for (let row of this.resid) {
241
+ param1.push({id: row.id})
242
+ }
243
+ let data = {
244
+ param: param1,
245
+ f_blobid: res.data.id
246
+ }
247
+ await this.$resetpost('api/af-revenue/logic/updatefiles', data)
248
+ console.log('退费this.config', this.config)
249
+ console.log('退费this.model', this.model)
250
+ if (this.config.hasPrint) {
251
+ if (this.model.f_print.indexOf('电子发票') == -1) {
252
+ console.log('this.config.hasBillManage', this.config.hasBillManage)
253
+ if (this.config.hasBillManage) {
254
+ // 启用发票管理,获取票据管理中的票号并存储记录
255
+ this.printModel.id = res.data.id
256
+ this.printModel.f_bill_type = '退费'
257
+ this.printModel.f_bill_style = this.model.f_print[0]
258
+ // this.billUrl = 'api/af-revenue/report/refund_sell'
259
+ this.print = true
260
+ } else {
261
+ this.printModel.id = res.data.id
262
+ // this.billUrl = 'api/af-revenue/report/refund_sell'
263
+ this.print = true
264
+ }
265
+ } else if (this.config.printType === '国税发票') {
266
+ // TODO
267
+ this.$dispatch('success')
268
+ } else if (this.config.printType === '电子发票') {
269
+ // TODO
270
+ this.$dispatch('success')
271
+ }
272
+ } else {
273
+ this.$dispatch('success')
274
+ }
275
+ },
276
+ refundChange () {
277
+ this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
278
+ },
279
+ clean () {
280
+ this.$dispatch('refresh')
281
+ },
282
+ printok () {
283
+ this.$dispatch('success')
284
+ },
285
+ validateBill (val) {
286
+ this.validateOk = !val.isOk
287
+ this.billData.bill = val.bill
288
+ }
289
+ },
290
+ watch: {
291
+ 'model.f_price' () {
292
+ if (this.data.f_collection_type === '按气量') {
293
+ this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
294
+ }
295
+ },
296
+ 'model.f_refund_gas' () {
297
+ if (this.data.f_collection_type === '按气量') {
298
+ this.model.f_refund_fee = (this.model.f_refund_gas - 0) * (this.model.f_price - 0)
299
+ }
300
+ }
301
+ }
302
+ }
303
+ </script>
@@ -23,4 +23,6 @@ export default function () {
23
23
  Vue.component('change-meter', (resolve) => { require(['./newchangemeter/ChangeMeter'], resolve) })
24
24
  // 清零
25
25
  Vue.component('reset-meter', (resolve) => { require(['./newchangemeter/ResetMeter'], resolve) })
26
+ // 物联网退费管理
27
+ Vue.component('iot-refund', (resolve) => { require(['./IOTRefund'], resolve) })
26
28
  }
package/src/main.js CHANGED
@@ -2,7 +2,7 @@ import Vue from 'vue'
2
2
  import all from 'vue-client/src/all'
3
3
  import App from './App'
4
4
  import system from 'system-clients/src/system'
5
- import FilialeSale from './filiale/jinhong/sale'
5
+ import FilialeSale from './filiale/ruihua/sale'
6
6
  import sale from './sale'
7
7
  import address from 'address-client/src/address'
8
8
  import ldap from 'ldap-clients/src/ldap'