sale-client 4.0.75-preview → 4.0.76-preview

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://222.83.114.229:31785/', 'http://222.83.114.229:31785/']
4
+ const [ serverRul, localUrl ] = ['http://192.168.50.67:31467/', 'http://localhost:9026/']
5
5
  var merge = require('webpack-merge')
6
6
  var baseConfig = require('./webpack.dev.conf')
7
7
  var devConfig = {
@@ -20,9 +20,9 @@ var devConfig = {
20
20
  },
21
21
  proxy: {
22
22
  '/api/af-revenue/logic': {
23
- // pathRewrite: {
24
- // '/api/af-revenue/logic': '/logic'
25
- // },
23
+ pathRewrite: {
24
+ '/api/af-revenue/logic': '/logic'
25
+ },
26
26
  target: localUrl
27
27
  },
28
28
  '/api/af-revenue/file': {
@@ -38,9 +38,9 @@ var devConfig = {
38
38
  target: 'http://410663id1ia4.vicp.fun'
39
39
  },
40
40
  '/api/af-revenue/sql': {
41
- // pathRewrite: {
42
- // '/api/af-revenue/sql': '/sql'
43
- // },
41
+ pathRewrite: {
42
+ '/api/af-revenue/sql': '/sql'
43
+ },
44
44
  target: localUrl
45
45
  },
46
46
  '/api': {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "4.0.75-preview",
3
+ "version": "4.0.76-preview",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -0,0 +1,395 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="span" style="overflow-y: scroll">
4
+ <form novalidate class="form-horizontal">
5
+ <p class="bg-info text-center" style="padding: 8px;">上次购气信息</p>
6
+ <div class="row" style="margin-top:6px;">
7
+ <label class=" col-sm-2 control-label">预购气量</label>
8
+ <div class="col-sm-2" >
9
+ <input class="form-control" type="number" v-model="model.f_pregas" placeholder="预购气量" disabled>
10
+ </div>
11
+ <label class=" col-sm-2 control-label">预购金额</label>
12
+ <div class="col-sm-2">
13
+ <input class="form-control" type="number" v-model="model.f_preamount" placeholder="预购金额" disabled>
14
+ </div>
15
+ <label class=" col-sm-2 control-label">撤销类型</label>
16
+ <div class="col-sm-2">
17
+ <input class="form-control" type="text" v-model="model.f_canceltype" placeholder="撤销类型" disabled>
18
+ </div>
19
+ </div>
20
+ <div class="row" style="margin-top:6px;">
21
+ <label class=" col-sm-2 control-label">上期结余</label>
22
+ <div class="col-sm-2">
23
+ <input class="form-control" type="number" v-model="model.f_balance" placeholder="上期结余" disabled>
24
+ </div>
25
+ <label class="col-sm-2 control-label">本期结余</label>
26
+ <div class="col-sm-2">
27
+ <input class="form-control" type="number" v-model="model.f_curbalance" placeholder="本期结余" disabled>
28
+ </div>
29
+ <label class="col-sm-2 control-label">收款</label>
30
+ <div class="col-sm-2">
31
+ <input class="form-control" type="number" v-model="model.f_collection" placeholder="收款" disabled>
32
+ </div>
33
+ </div>
34
+ <div class="row" style="margin-top:6px;">
35
+ <label class=" col-sm-2 control-label">售气时间</label>
36
+ <div class="col-sm-2" >
37
+ <input class="form-control" type="text" v-model="model.f_date" disabled>
38
+ </div>
39
+ <label class="col-sm-2 control-label">操作员</label>
40
+ <div class="col-sm-2">
41
+ <input class="form-control" type="text" v-model="model.f_operator" disabled>
42
+ </div>
43
+ <label class="col-sm-2 control-label" title="参数名称:退款方式">退款方式</label>
44
+ <div class="col-sm-2">
45
+ <v-select v-model="f_payment"
46
+ placeholder='请选择'
47
+ :value.sync="model.f_payment"
48
+ :options='refundtype' clear-button></v-select>
49
+ </div>
50
+ <!--<label for="f_outlets" class="col-sm-2 control-label" style="width:15%">网点:</label>-->
51
+ <!--<div class="col-sm-2">-->
52
+ <!--<input class="form-control" type="text" v-model="model.f_outlets" disabled>-->
53
+ <!--</div>-->
54
+ </div>
55
+
56
+ <div v-if="model.f_fillgas_id">
57
+ <p class="bg-info text-center" style="padding: 8px;" >相关补气信息</p>
58
+ <div class="row" style="margin-top:6px;">
59
+ <label class=" col-sm-2 control-label">预购气量</label>
60
+ <div class="col-sm-2" >
61
+ <input class="form-control" type="number" v-model="xmodel.f_pregas" placeholder="预购气量" disabled>
62
+ </div>
63
+ <label class=" col-sm-2 control-label">预购金额</label>
64
+ <div class="col-sm-2">
65
+ <input class="form-control" type="number" v-model="xmodel.f_preamount" placeholder="预购金额" disabled>
66
+ </div>
67
+ <label class=" col-sm-2 control-label">撤销类型</label>
68
+ <div class="col-sm-2">
69
+ <input class="form-control" type="text" v-model="xmodel.f_canceltype" placeholder="撤销类型" disabled>
70
+ </div>
71
+ </div>
72
+ <div class="row" style="margin-top:6px;">
73
+ <label class=" col-sm-2 control-label">上期结余</label>
74
+ <div class="col-sm-2">
75
+ <input class="form-control" type="number" v-model="xmodel.f_balance" placeholder="上期结余" disabled>
76
+ </div>
77
+ <label class="col-sm-2 control-label">本期结余</label>
78
+ <div class="col-sm-2">
79
+ <input class="form-control" type="number" v-model="xmodel.f_curbalance" placeholder="本期结余" disabled>
80
+ </div>
81
+ <label class="col-sm-2 control-label">收款</label>
82
+
83
+ <div class="col-sm-2">
84
+ <input class="form-control" type="number" v-model="xmodel.f_collection" placeholder="收款" disabled>
85
+ </div>
86
+ </div>
87
+ <div class="row" style="margin-top:6px;">
88
+ <label class=" col-sm-2 control-label">售气时间</label>
89
+ <div class="col-sm-2" >
90
+ <input class="form-control" type="text" v-model="xmodel.f_date" disabled>
91
+ </div>
92
+ <label class="col-sm-2 control-label">操作员</label>
93
+ <div class="col-sm-2">
94
+ <input class="form-control" type="text" v-model="xmodel.f_operator" disabled>
95
+ </div>
96
+ <!--<label for="f_outlets" class="col-sm-2 control-label" style="width:15%">网点:</label>-->
97
+ <!--<div class="col-sm-2">-->
98
+ <!--<input class="form-control" type="text" v-model="model.f_outlets" disabled>-->
99
+ <!--</div>-->
100
+ </div>
101
+ </div>
102
+ </form>
103
+ <div style="text-align:right;margin-right:50px;height: auto">
104
+ <button class="btn btn-success width-60" @click="cancel()" :disabled="isToday" v-if="jurisdiction.includes('购气撤销')">购气撤销</button>
105
+ <button class="button_clear" @click="clean()">取消</button>
106
+ </div>
107
+
108
+ <modal v-if="show" :show.sync="show" v-ref:modal backdrop="false">
109
+ <header slot="modal-header" class="modal-header">
110
+ <h4 class="modal-title">撤销原因</h4>
111
+ </header>
112
+ <article slot="modal-body" class="modal-body">
113
+ <validator name='v'>
114
+ <form class="form-horizontal select-overspread">
115
+ <div class="form-group" v-if="config.hasBillManage && model.f_bill_style">
116
+ <label class=" col-sm-3 control-label">发票撤销类型:</label>
117
+ <div class="col-sm-4">
118
+ <v-select v-model="f_cancel_type"
119
+ placeholder='请选择'
120
+ :value.sync="correctModel.f_cancel_type"
121
+ :options='cancelTypes'
122
+ @change="cancelTypeChange"
123
+ :value-single="true"
124
+ close-on-select clear-button>
125
+ </v-select>
126
+ </div>
127
+ </div>
128
+ <div class="form-group" :class="[$v.f_cancel_reason.required ? 'has-error' : 'has-success']">
129
+ <label class=" col-sm-3 control-label">撤销原因:</label>
130
+ <div class="col-sm-8">
131
+ <textarea class="form-control" v-model="correctModel.f_cancel_reason" rows="3"
132
+ placeholder="请填写原因" v-validate:f_cancel_reason='{required: true}'></textarea>
133
+ </div>
134
+ </div>
135
+ </form>
136
+ </validator>
137
+ <validate-bill v-if="hasValidateBill" :data="model" @validate-bill="validateBill"></validate-bill>
138
+ </article>
139
+ <footer slot="modal-footer" class="modal-footer">
140
+ <button v-show="show" type="button" class="button_search" @click='confirm()' :disabled="!correctModel.f_cancel_reason">确认</button>
141
+ <button v-show="show" type="button" class="button_clear" @click='close'>取消</button>
142
+ </footer>
143
+ </modal>
144
+ <correct-bill :show="print" :bill-config='config' :bill-data='billData'
145
+ @printok="printok" @toggle="printCancel" :data='printModel' v-ref:printbill ></correct-bill>
146
+ </div>
147
+ </div>
148
+ </template>
149
+ <script>
150
+ /**
151
+ *综合业务
152
+ *卡表收费组件
153
+ */
154
+
155
+ let cardChargeCancelGen = async function (self) {
156
+ // 冲正记录
157
+ self.row.cardInfo = self.cardData
158
+ self.model = Object.assign({}, self.model, self.correctModel)
159
+ let res = null
160
+ if (self.xmodel.id) {
161
+ res = await self.$CancelService.cardAndFillGasCancel(self.model, self.xmodel, self.row)
162
+ } else {
163
+ res = await self.$CancelService.cardChargeCancel(self.model, self.row)
164
+ }
165
+
166
+ console.log('冲正返回。。', res, self.model, self.config, self.correctModel)
167
+
168
+ if (self.model.f_bill_style.includes('普通收据') && self.config.hasBillManage) {
169
+ // 冲正发票管理数据
170
+ if (self.correctModel.f_cancel_type === 'newBill') {
171
+ // 显示发票信息
172
+ self.printModel.id = res.data.record.id
173
+ self.printModel.f_type = res.data.type
174
+ self.printModel.f_bill_style = res.data.record.f_bill_style
175
+ self.billData.url = self.getBillUrl(res.data.type)
176
+ console.log('普通收据打印。。。', self.printModel, self.billUrl)
177
+ self.print = true
178
+ } else if (self.correctModel.f_cancel_type === 'abort') {
179
+ await self.$CommonService.correctPaperBill(res.data.record.id, res.data.type, null, null, 'abort')
180
+ self.$dispatch('refresh')
181
+ }
182
+ } else if (self.model.f_bill_style.includes('电子发票')) {
183
+ // 冲正电子票
184
+ // await self.$CommonService.correctEticket(self.model.id, self.model.f_canceltype)
185
+ self.$dispatch('success')
186
+ } else {
187
+ self.$dispatch('success')
188
+ }
189
+ }
190
+
191
+ let readyGen = async function (self) {
192
+ await self.$getConfig(self, 'RecordCancel')
193
+ console.log('冲正业务config', self.config)
194
+ self.correctModel.f_cancel_type = self.config.cancelType
195
+
196
+ self.model.f_price_id = self.row.f_price_id
197
+ self.model.f_user_id = self.row.f_user_id
198
+ self.model.f_user_name = self.row.f_user_name
199
+ self.model.f_userinfo_id = self.row.f_userinfo_id
200
+ let res = await self.$resetpost('api/af-revenue/sql/gasCancel', {data: {f_user_id: self.model.f_user_id}}, {resolveMsg: null, rejectMsg: '获取记录失败!!'})
201
+ console.log('GASCANCEL:', res.data)
202
+ self.model.id = res.data[0].id
203
+ self.model.f_pregas = res.data[0].f_pregas
204
+ self.model.f_preamount = res.data[0].f_preamount
205
+ self.model.f_curbalance = res.data[0].f_curbalance
206
+ self.model.f_collection = res.data[0].f_collection
207
+ self.model.f_balance = res.data[0].f_balance
208
+ self.model.f_user_balance = res.data[0].f_user_balance
209
+ self.model.f_canceltype = res.data[0].f_canceltype
210
+ self.model.f_bill_style = res.data[0].f_bill_style
211
+ self.model.f_operator = res.data[0].f_operator
212
+ self.model.f_date = res.data[0].f_date
213
+ self.model.f_payment = [res.data[0].f_payment]
214
+ if (res.data[0].f_fillgas_id && res.data[0].f_fillgas_id.length > 0) {
215
+ self.model.f_fillgas_id = res.data[0].f_fillgas_id
216
+ // 开始给关联购气信息赋值
217
+ for (var i = 0; i < res.data.length; i++) {
218
+ console.log('换表关联信息。。', res.data[0].f_fillgas_id, res.data[i].id)
219
+ if (res.data[0].f_fillgas_id == res.data[i].id) {
220
+ self.$showAlert('此卡存在关联购气信息,请谨慎核对!!!', 'warning', 2000)
221
+ self.xmodel.id = res.data[i].id
222
+ self.xmodel.f_pregas = res.data[i].f_pregas
223
+ self.xmodel.f_preamount = res.data[i].f_preamount
224
+ self.xmodel.f_curbalance = res.data[i].f_curbalance
225
+ self.xmodel.f_collection = res.data[i].f_collection
226
+ self.xmodel.f_balance = res.data[i].f_balance
227
+ self.xmodel.f_user_balance = res.data[i].f_user_balance
228
+ self.xmodel.f_canceltype = res.data[i].f_canceltype
229
+ self.xmodel.f_bill_style = res.data[i].f_bill_style
230
+ self.xmodel.f_operator = res.data[i].f_operator
231
+ self.xmodel.f_date = res.data[i].f_date
232
+ // 跳出循环
233
+ break
234
+ }
235
+ // this.radio[index].$set(i,true)
236
+ }
237
+ }
238
+ if (self.config.cancletime && !self.$login.f.rolesnames.includes('管理员')) {
239
+ self.isToday = new Date().toDateString() !== new Date(res.data[0].f_date).toDateString()
240
+ }
241
+
242
+ if (self.config.hasBillManage && self.config.cancelType === 'newBill' && self.model.f_bill_style) {
243
+ // 获取原来收费记录使用的发票类型
244
+ let param = {
245
+ id: res.data[0].id,
246
+ type: res.data[0].f_canceltype
247
+ }
248
+ let oldUseType = await self.$resetpost('api/af-revenue/logic/sale_getOldUseType', {data: param}, {resolveMsg: null, rejectMsg: '获取原始票据信息出错!!'})
249
+ console.log('获取原始票据信息。。。', oldUseType)
250
+
251
+ self.model.f_use_type = oldUseType.data.f_use_type
252
+ self.model.f_bill_type = [res.data[0].f_bill_style]
253
+ self.hasValidateBill = self.config.hasBillManage
254
+ }
255
+ }
256
+
257
+ export default {
258
+ title: '卡表冲正',
259
+ data () {
260
+ return {
261
+ config: {
262
+ cancleother: false, // 默认可以撤销别人的操作
263
+ hasBillManage: false, // 默认不启用发票管理
264
+ cancelType: 'newBill',
265
+ cancletime: false // 是否限制当天不能冲正
266
+ },
267
+ model: {
268
+ f_payment: '',
269
+ f_pregas: '',
270
+ f_preamount: '',
271
+ f_totalcost: '',
272
+ f_curbalance: '',
273
+ f_collection: '',
274
+ f_balance: '',
275
+ f_user_balance: '',
276
+ f_canceltype: '',
277
+ f_operator: '',
278
+ f_date: '',
279
+ f_fillgas_id: null
280
+ },
281
+ // 关联购气信息
282
+ xmodel: {
283
+ f_payment: '',
284
+ f_pregas: '',
285
+ f_preamount: '',
286
+ f_totalcost: '',
287
+ f_curbalance: '',
288
+ f_collection: '',
289
+ f_balance: '',
290
+ f_user_balance: '',
291
+ f_canceltype: '',
292
+ f_operator: '',
293
+ f_date: ''
294
+ },
295
+ show: false,
296
+ isToday: false,
297
+
298
+ refundtype: this.$appdata.getParam('退款方式'),
299
+ correctModel: {
300
+ f_cancel_type: '',
301
+ f_cancel_reason: ''
302
+ },
303
+ printModel: {},
304
+ print: false,
305
+ billUrl: '',
306
+ billData: {
307
+ url: '',
308
+ bill: ''
309
+ },
310
+
311
+ // 启用发票管理需要对票号进行验证
312
+ hasValidateBill: false,
313
+ validateOk: false,
314
+
315
+ jurisdiction: this.$login.r
316
+
317
+ }
318
+ },
319
+ props: ['row', 'cardData'],
320
+ ready () {
321
+ readyGen(this)
322
+ },
323
+ watch: {
324
+ 'row' (val) {
325
+ this.model.f_price_id = val.f_price_id
326
+ this.model.f_user_id = val.f_user_id
327
+ this.model.f_userinfo_id = val.f_userinfo_id
328
+ }
329
+ },
330
+ methods: {
331
+ cancel () {
332
+ if (this.config.cancleother && !this.$login.f.rolesnames.includes('管理员')) {
333
+ if (this.model.f_operator != this.$login.f.name) {
334
+ this.$showAlert('不能撤销不是自己进行的操作', 'warning', 1500)
335
+ return
336
+ }
337
+ }
338
+ if (this.config.cancletime && !this.$login.f.rolesnames.includes('管理员')) {
339
+ let a = this.$login.toStandardDateString() + ' 00:00:00'
340
+ if (this.model.f_date < a) {
341
+ this.$showAlert('不能撤销不是当天的操作', 'warning', 1500)
342
+ return
343
+ }
344
+ }
345
+ this.show = true
346
+ },
347
+ close () {
348
+ this.show = false
349
+ },
350
+ confirm () {
351
+ // 关闭 modal框
352
+ this.close()
353
+ console.log('看看有没有撤销原因', this.model)
354
+ cardChargeCancelGen(this)
355
+ },
356
+ clean () {
357
+ this.$info('取消操作')
358
+ this.$dispatch('cancelclean', this.row)
359
+ },
360
+ getBillUrl (type) {
361
+ let name = ''
362
+ // 根据type数据 选择调用的Logic
363
+ if (type === '卡表收费') {
364
+ name = 'api/af-revenue/report/card_bill'
365
+ } else if (type === '发卡售气') {
366
+ name = 'api/af-revenue/report/sendCard_bill'
367
+ }
368
+ return name
369
+ },
370
+ printok () {
371
+ this.show = false
372
+ this.print = false
373
+ this.$dispatch('success')
374
+ },
375
+ printCancel () {
376
+ this.$dispatch('refresh')
377
+ },
378
+ validateBill (val) {
379
+ this.validateOk = !val.isOk
380
+ this.billData.bill = val.bill
381
+ },
382
+ cancelTypeChange () {
383
+ this.hasValidateBill = this.correctModel.f_cancel_type === 'newBill'
384
+ }
385
+ },
386
+ computed: {
387
+ cancelTypes () {
388
+ return [{label: '使用新票号', value: 'newBill'}, {label: '旧发票作废', value: 'abort'}]
389
+ }
390
+ }
391
+ }
392
+ </script>
393
+
394
+ <style>
395
+ </style>
@@ -4,13 +4,13 @@
4
4
  <form novalidate class="form-horizontal">
5
5
  <div class="row">
6
6
  <div class="col-sm-4 form-group" :class="[$v.payment.required ? 'select-error' : '']">
7
- <label class="font_normal_body" title="参数名称:付款方式">付款方式</label>
7
+ <label class="font_normal_body" title="参数名称:退款方式">退款方式</label>
8
8
  <input type="text" v-show="false" v-model="$refs.payment.selectedItems" v-validate:payment='{required: true }'>
9
9
  <v-select v-model="f_payment"
10
10
  placeholder='请选择'
11
11
  style="width:60%"
12
12
  :value.sync="model.f_payment"
13
- :options='paytype'
13
+ :options='refundtype'
14
14
  v-ref:payment
15
15
  close-on-select clear-button></v-select>
16
16
 
@@ -152,7 +152,7 @@
152
152
  },
153
153
 
154
154
  // 下拉框值
155
- paytype: this.$appdata.getParam('付款方式'),
155
+ refundtype: this.$appdata.getParam('退款方式'),
156
156
  printstyle: this.$appdata.getParam('打印格式')
157
157
  }
158
158
  },
@@ -47,4 +47,6 @@ export default function () {
47
47
  Vue.component('transfer-manage', (resolve) => { require(['./TransferManage'], resolve) })
48
48
  // 档案管理 --批量销户
49
49
  Vue.component('batch-cancellation', (resolve) => { require(['./BatchCancellation'], resolve) })
50
+ // 购气撤销
51
+ Vue.component('card-meter-charge-cancel', (resolve) => { require(['./CardMeterChargeCancel'], resolve) })
50
52
  }
package/src/main.js CHANGED
@@ -3,7 +3,7 @@ import all from 'vue-client/src/all'
3
3
  import App from './App'
4
4
  import system from 'system-clients/src/system'
5
5
  import sale from './sale'
6
- import FilialeSale from './filiale/dexin/sale'
6
+ import FilialeSale from './filiale/ronghao/sale'
7
7
  import address from 'address-client/src/address'
8
8
  import ldap from 'ldap-clients/src/ldap'
9
9
  import VueClipboard from 'vue-clipboard2'
File without changes
File without changes