sale-client 4.2.44 → 4.2.46

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 (67) hide show
  1. package/.gradle/5.2.1/fileChanges/last-build.bin +0 -0
  2. package/.gradle/5.2.1/fileHashes/fileHashes.lock +0 -0
  3. package/.gradle/5.2.1/gc.properties +0 -0
  4. package/.gradle/8.10/checksums/checksums.lock +0 -0
  5. package/.gradle/8.10/dependencies-accessors/gc.properties +0 -0
  6. package/.gradle/8.10/executionHistory/executionHistory.bin +0 -0
  7. package/.gradle/8.10/executionHistory/executionHistory.lock +0 -0
  8. package/.gradle/8.10/fileChanges/last-build.bin +0 -0
  9. package/.gradle/8.10/fileHashes/fileHashes.bin +0 -0
  10. package/.gradle/8.10/fileHashes/fileHashes.lock +0 -0
  11. package/.gradle/8.10/gc.properties +0 -0
  12. package/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
  13. package/.gradle/buildOutputCleanup/cache.properties +2 -0
  14. package/.gradle/file-system.probe +0 -0
  15. package/.gradle/vcs-1/gc.properties +0 -0
  16. package/build/dev-server.js +31 -50
  17. package/index.html +2 -7
  18. package/package.json +1 -1
  19. package/src/App.vue +1 -1
  20. package/src/components/revenue/HandManager/MeterBookUser.vue +726 -726
  21. package/src/components/revenue/comprehen/ComprehenOperation/QrPay/QrPaymentDetailed.vue +423 -423
  22. package/src/components/revenue/comprehen/Maintenance/hand/handOperate.vue +469 -469
  23. package/src/components/revenue/machineHandManage/ArrearsQuery.vue +938 -938
  24. package/src/components/webMeter/MeterManage/WebMeterBatchOperationValve.vue +970 -970
  25. package/src/filiale/alashan/eticket/EticketRecordList.vue +428 -428
  26. package/src/filiale/bayan/ChargeList.vue +1010 -1010
  27. package/src/filiale/bayan/StockListmain.vue +543 -543
  28. package/src/filiale/bazhong/UserInfoDetailManageNew.vue +245 -245
  29. package/src/filiale/bazhong/ic_detail/ChangeMeterQueryUser.vue +370 -370
  30. package/src/filiale/bazhong/sale.js +8 -8
  31. package/src/filiale/beifangshiye/OtherChargeNew.vue +625 -625
  32. package/src/filiale/jinhong/CardMeterCenterInner.vue +5 -0
  33. package/src/filiale/jinhong/IOTMeterCenterInner.vue +597 -592
  34. package/src/filiale/jinhong/InsuranceTemp.vue +2 -3
  35. package/src/filiale/jinhong/MachineMeterCenter.vue +5 -0
  36. package/src/filiale/lixianV3/ArrearsQuery.vue +938 -938
  37. package/src/filiale/lixianV3/InsuranceChargesDetails.vue +425 -425
  38. package/src/filiale/meihekou/common/userinfo_detail/ic_detail/MachineRecordQuery.vue +281 -281
  39. package/src/filiale/qianneng/revenue/sms/AccountMessageList.vue +508 -508
  40. package/src/filiale/qingjian/FileUserFiles.vue +5 -2
  41. package/src/filiale/ronghao/ArrearsQuery.vue +974 -974
  42. package/src/filiale/ronghao/CardService.js +2144 -2144
  43. package/src/filiale/ronghao/InsuranceManage.vue +58 -58
  44. package/src/filiale/ronghao/MachineChargeService.js +149 -149
  45. package/src/filiale/ronghao/NoCardMeterCenter.vue +534 -534
  46. package/src/filiale/ronghao/PaymentCode.vue +174 -174
  47. package/src/filiale/ronghao/PriceChangeCompensation/CompensationManage.vue +26 -26
  48. package/src/filiale/ronghao/PriceChangeCompensation/IotCompensation.vue +318 -318
  49. package/src/filiale/ronghao/PriceChangeCompensation/JbCompensation.vue +343 -343
  50. package/src/filiale/ronghao/PriceChangeCompensation/SurplusRecordDetail.vue +74 -74
  51. package/src/filiale/ronghao/ReplaceCardManage.vue +415 -415
  52. package/src/filiale/ronghao/Upload.vue +654 -654
  53. package/src/filiale/ronghao/cardDown.vue +1141 -1141
  54. package/src/filiale/ronghao/changemeterOperate.vue +315 -315
  55. package/src/filiale/ronghao/fillgasSpecific.vue +313 -313
  56. package/src/filiale/ronghao/ic_detail/ChargeRecordQuery.vue +106 -106
  57. package/src/filiale/ronghao/ic_detail/WatchCollection.vue +115 -115
  58. package/src/filiale/ronghao/ic_detail/WebHandQueryUser.vue +411 -411
  59. package/src/filiale/ronghao/machineDown.vue +1176 -1176
  60. package/src/filiale/ronghao/replacementSingleInfoOperation.vue +315 -315
  61. package/src/filiale/ronghao/specificInformation.vue +537 -537
  62. package/src/filiale/yangchun/ChargeList.vue +954 -954
  63. package/src/filiale/yuncheng/changemeterListMaintain.vue +504 -504
  64. package/src/filiale/zhongsheng/BlackListList.vue +293 -293
  65. package/src/filiale/zhongyi/HandQueryUser.vue +389 -389
  66. package/src/main.js +1 -1
  67. package/src/plugins/CardService.js +2217 -2217
@@ -1,537 +1,537 @@
1
- <template>
2
- <div class="auto">
3
- <validator name='a' @valid="addressValid(true)" @invalid="addressValid(false)">
4
- <form class="form-horizontal">
5
- <div class="row">
6
- <div class="col-sm-4">
7
- <label class="font_normal_body">用户姓名</label>
8
- <input type="text" v-model="model.f_user_name" disabled=disabled style="width: 60%" class="input_search">
9
- </div>
10
- <div class="col-sm-4">
11
- <label class="font_normal_body">付款方式</label>
12
- <v-select :value.sync="model.f_payment" :value-single="true"
13
- v-model="model.f_payment"
14
- class="select_list select"
15
- :options='payments'
16
- close-on-select>
17
- </v-select>
18
- </div>
19
- <!-- <div class="col-sm-4">-->
20
- <!-- <label class="font_normal_body">缴费类型</label>-->
21
- <!-- <input type="text" v-model="model.payment" style="width: 60%" class="input_search">-->
22
- <!-- </div>-->
23
- <div class="col-sm-4">
24
- <label class="font_normal_body">收据类型</label>
25
- <v-select :value.sync="model.f_bill_style" :value-single="true"
26
- v-model="model.f_bill_style"
27
- class="select_list select"
28
- :options='bill_styles'
29
- close-on-select>
30
- </v-select>
31
- </div>
32
- <!-- <div class="col-sm-4">-->
33
- <!-- <label class="font_normal_body">收据类型</label>-->
34
- <!-- <input type="text" v-model="model.bill_style" style="width: 60%" class="input_search">-->
35
- <!-- </div>-->
36
- <div class="col-sm-4" title="参数:操作时间, 权限:【其他收费金额修改】">
37
- <label class="font_normal_body">缴费金额</label>
38
- <input type="text" v-model="model.f_collection" :disabled="!editcollection" style="width: 60%"
39
- class="input_search">
40
- </div>
41
- <div class="col-sm-4">
42
- <label class="font_normal_body">收费时间</label>
43
- <datepicker id="operate_date"
44
- placeholder="收费时间"
45
- style="width:60%"
46
- v-model="model.f_operate_date"
47
- :value.sync="model.f_operate_date"
48
- :format="'yyyy-MM-dd HH:mm:ss'">
49
- </datepicker>
50
- </div>
51
- <div class="col-sm-4 form-group">
52
- <label class="font_normal_body" title="参数:操作人员">操作人员</label>
53
- <v-select :value.sync="model.f_operatorid"
54
- v-model="model.f_operatorid"
55
- :value-single="true"
56
- @change="selectoperator()"
57
- :options='foperator'
58
- close-on-select>
59
- </v-select>
60
- <!-- @click="selectoperator"-->
61
- </div>
62
- <div class="col-sm-4 form-group">
63
- <label class="font_normal_body">支付流水号</label>
64
- <input type="text" v-model="model.f_serial_id" style="width: 60%" class="input_search">
65
- </div>
66
- <div class="col-sm-12 form-group">
67
- <label class="font_normal_body">备&emsp;&emsp;注</label>
68
- <input type="text" v-model="model.f_comments" style="width: 60%" class="input_search">
69
-
70
- </div>
71
- </div>
72
- </form>
73
- <div style="float: right">
74
- <button class="button_search" @click="save">保存</button>
75
- <button class="button_clear" @click="cancel">取消</button>
76
- </div>
77
- <form novalidate class="form-horizontal">
78
- <p></p>
79
- <p class="bg-info text-center" style="padding: 8px;font-size: 20px">其他维护明细</p>
80
- <!-- <data-grid :model="inData" v-ref:grid partial='list'>
81
- <template partial='head'>-->
82
- <table style="width: 600px">
83
- <tr>
84
- <th style="text-align: center">序号</th>
85
- <th style="text-align: center">品牌及类别</th>
86
- <th style="text-align: center">数量</th>
87
- <th style="text-align: center">单价</th>
88
- <th style="text-align: center">规格</th>
89
- <th style="text-align: center"> 型号</th>
90
- <th style="text-align: center"> 操作</th>
91
- </tr>
92
- <tr v-for="row in recordlist ">
93
- <td style="text-align: center;">{{ $index + 1 }}</td>
94
- <td style="text-align: center;">{{ row.brand_spec }}</td>
95
- <td style="text-align: center;">{{ row.number }}</td>
96
- <td style="text-align: center;">{{ row.unitprice }}</td>
97
- <td style="text-align: center;">{{ row.typename }}</td>
98
- <td style="text-align: center;">{{ row.typenumber }}</td>
99
- <td style="text-align: center;">
100
- <button class="button_new" type="button" @click="editBeizhu(row)">编辑</button>
101
- </td>
102
- </tr>
103
- </table>
104
- </form>
105
- <modal :show.sync="editshow" v-ref:modal backdrop='false'>
106
- <article slot="modal-body" class="modal-body">
107
- <div class="row auto">
108
- <div class="form-group form-input-group">
109
- <label for="" class="control-label">品牌:</label>
110
- <v-select :value.sync="mingxi.brand_spec"
111
- :value-single="true"
112
- v-model="mingxi.brand_spec"
113
- class="select_list select"
114
- :options='brand_specs'
115
- close-on-select>
116
- </v-select>
117
- </div>
118
- </div>
119
- <div class="row auto">
120
- <div class="form-group form-input-group" title="权限:【其他收费金额修改】">
121
- <label for="" class="control-label">数量:</label>
122
- <input type="text" width="300px" class="form-control" v-model="mingxi.number" :disabled="!editcollection">
123
- </div>
124
- </div>
125
- <div class="row auto">
126
- <div class="form-group form-input-group" title="权限:【其他收费金额修改】">
127
- <label for="" class="control-label">单价:</label>
128
- <input type="text" width="300px" class="form-control" v-model="mingxi.unitprice"
129
- :disabled="!editcollection">
130
- </div>
131
- </div>
132
- <div class="row auto">
133
- <div class="form-group form-input-group">
134
- <label for="" class="control-label">规格:</label>
135
- <v-select :value.sync="mingxi.typename" :value-single="true"
136
- v-model="mingxi.typename"
137
- class="select_list select"
138
- :options='typeNameList'
139
- close-on-select>
140
- </v-select>
141
- </div>
142
- </div>
143
- <div class="row auto">
144
- <div class="form-group form-input-group">
145
- <label for="" class="control-label">型号:</label>
146
- <v-select :value.sync="mingxi.typenumber"
147
- :value-single="true"
148
- v-model="mingxi.typenumber"
149
- class="select_list select"
150
- :options='typeNumberList'
151
- close-on-select>
152
- </v-select>
153
- </div>
154
- </div>
155
- </article>
156
- <footer slot="modal-footer" class="modal-footer">
157
- <button type="button" class="btn btn-default" @click='editclose' id="vc-messagebox-close">取消</button>
158
- <button type="button" class="btn btn-success" @click='updatedefail' id="vc-messagebox-confirm">确认</button>
159
- </footer>
160
- </modal>
161
- <!--<split-price :showdata="model" :pricesplit="priceSplit" v-if="priceSplit" ></split-price>-->
162
- </validator>
163
- </div>
164
- </template>
165
- <script>
166
- import {HttpResetClass} from 'vue-client'
167
- import * as Util from '../../Util'
168
-
169
- let readyGen = async function (self) {
170
- self.getMaterial()
171
- await self.$LoadParams.loadParam(self.f_filialeid)
172
- await self.$GetSaleParam.initinputtor()
173
- await self.initoperator()
174
- }
175
- // var data
176
- export default {
177
- title: '基本信息',
178
-
179
- data () {
180
- return {
181
- brand_specs: [],
182
- bill_styles: this.$appdata.getParam('打印格式') ? [{
183
- label: '全部',
184
- value: ''
185
- }, ...this.$appdata.getParam('打印格式')] : [],
186
- payments: this.$appdata.getParam('付款方式') ? [{
187
- label: '全部',
188
- value: ''
189
- }, ...this.$appdata.getParam('付款方式')] : [],
190
- editshow: false,
191
- editcollection: false,
192
- mingxi: '',
193
- oldmingxi: '',
194
- brand_spec: '',
195
- unitprice: '',
196
- typeNameList: [],
197
- foperator: [],
198
- typeNumberList: [],
199
- materialInfoList: [],
200
- // 操作记录表
201
- recordList3: [],
202
- total: '',
203
- // 明细操作记录
204
- recordList2: [],
205
- // 其他记录
206
- fileNameSet: {
207
- f_payment: '缴费类型',
208
- f_bill_style: '收据类型',
209
- f_collection: '缴费金额',
210
- f_serial_id: '支付流水号',
211
- f_operate_date: '缴费时间',
212
- f_comments: '备注',
213
- name: '用户姓名',
214
- f_operator: '操作人'
215
- },
216
- // 其他记录明细
217
- fileNameSet2: {
218
- brand_spec: '品牌类别',
219
- number: '数量',
220
- unitprice: '单价',
221
- typename: '规格',
222
- typenumber: '型号',
223
- operator: '操作人'
224
- }
225
- }
226
- },
227
- props: {
228
- model: Object,
229
- oldmodel: Object,
230
- // recordList:Array
231
- recordlist: Array
232
- },
233
- ready () {
234
- if (this.$login.r.includes('其他收费金额修改')) {
235
- this.editcollection = true
236
- }
237
- this.cou()
238
- this.oldmodel = JSON.parse(JSON.stringify(this.model))
239
- console.log(this.model)
240
- readyGen(this)
241
- },
242
- created () {
243
- },
244
- methods: {
245
- findById (list, name) {
246
- let result
247
- list.forEach((row, n) => {
248
- if (name == row.value) {
249
- result = row.data
250
- }
251
- })
252
- return result
253
- },
254
- getMaterial () {
255
- let http = new HttpResetClass()
256
- http.load('POST', '/api/af-revenue/logic/getMaterialInfo', {
257
- f_org_id: this.$login.f.orgid
258
- }, {resolveMsg: null, rejectMsg: null}).then(res => {
259
- // 遍历原始数据
260
- this.materialInfoList = res.data
261
- this.materialInfoList.forEach(item => {
262
- if (item.type === '分类') {
263
- const category = {
264
- value: item.name,
265
- label: item.name,
266
- data: item
267
- }
268
- this.brand_specs.push(category)
269
- }
270
- if (item.type === '品名') {
271
- const category = {
272
- value: item.name,
273
- label: item.name,
274
- data: item
275
- }
276
- this.typeNameList.push(category)
277
- }
278
- if (item.type === '型号') {
279
- const category = {
280
- value: item.name,
281
- label: item.name
282
- }
283
- this.typeNumberList.push(category)
284
- }
285
- })
286
- })
287
- },
288
- initoperator () {
289
- this.foperator = []
290
- console.log('this.$login', this.$login, this.oldmodel, this.model)
291
- let arr = this.$GetSaleParam.inputtors.filter((res) => {
292
- if (res.rolestr != null && res.rolestr != '') {
293
- return (res.rolestr.indexOf('收费员') > -1 || res.rolestr.indexOf('话务员') > -1) && res.f_orgid == this.$login.f.orgid
294
- }
295
- })
296
- arr.forEach((res) => {
297
- this.foperator.push({label: res.name, value: res.id})
298
- })
299
- },
300
- setTypename (val) {
301
- const result = this.findById(this.brand_specs, val)
302
- if (result) {
303
- this.typeNameList = []
304
- console.log('setTypename', result)
305
- this.materialInfoList.forEach(item => {
306
- if (item.type === '品名' && result.id.toString() === item.parent_id.toString()) {
307
- const category = {
308
- value: item.name,
309
- label: item.name,
310
- data: item
311
- }
312
- this.typeNameList.push(category)
313
- }
314
- })
315
- }
316
- },
317
- setTypeNumberList (val) {
318
- const result = this.findById(this.typeNameList, val)
319
- if (result) {
320
- this.typeNumberList = []
321
- console.log('setTypeNumberList', result)
322
- this.materialInfoList.forEach(item => {
323
- if (item.type === '型号' && result.id.toString() === item.parent_id.toString()) {
324
- const category = {
325
- value: item.name,
326
- label: item.name
327
- }
328
- this.typeNumberList.push(category)
329
- }
330
- })
331
- }
332
- },
333
- selectoperator () {
334
- let id = this.model.f_operatorid
335
- if (!this.model.f_operatorid) {
336
- return
337
- }
338
- let http = new HttpResetClass()
339
- http.load('POST', 'api/af-revenue/sql/saleSingleTable',
340
- {
341
- data: {
342
- tablename: 't_user',
343
- condition: `id = '${id}'`
344
- }
345
- },
346
- {resolveMsg: null, rejectMsg: null}).then((res) => {
347
- console.log('kanak,res', res)
348
- if (res.data.length > 0) {
349
- this.model.f_operator = res.data[0].name
350
- } else {
351
- this.model.f_operatorid = ''
352
- this.$showAlert('操作员信息未找到', 'warning', 2000)
353
- }
354
- console.log('this.f_operatorid', this.model.f_operator)
355
- })
356
- },
357
- editclose () {
358
- this.mingxi = ''
359
- this.editshow = false
360
- },
361
- editBeizhu (val) {
362
- this.editshow = true
363
- this.mingxi = val
364
- this.oldmingxi = val
365
- this.mingxi = JSON.parse(JSON.stringify(val))
366
- this.oldmingxi = JSON.parse(JSON.stringify(val))
367
- },
368
- async saveOtherdetail () {
369
- for (var item in this.mingxi) {
370
- if (this.mingxi[item] instanceof Array) {
371
- this.mingxi[item] = this.mingxi[item].length > 0 ? this.mingxi[item][0] : ''
372
- }
373
- if (this.mingxi[item] != this.oldmingxi[item]) {
374
- var car3 = {
375
- tablename: 't_othercharge_detail',
376
- chinesename: this.fileNameSet2[item] != '' ? this.fileNameSet2[item] : '',
377
- // chinesename: this.fileNameSet2[item],
378
- oldvalue: this.oldmingxi[item],
379
- newvalue: this.mingxi[item],
380
- modifitime: Util.toStandardTimeString(),
381
- fieldname: item,
382
- state: '有效',
383
- charge_detail_id: this.mingxi.did,
384
- operator: this.$login.f.name != '' ? this.$login.f.name : ''
385
- }
386
- this.recordList2.push(car3)
387
- // 该方法并未对chinesename fieldname operator等进行判断赋值,此暂写为定值
388
- console.log(car3)
389
- }
390
- }
391
- await this.$resetpost('api/af-revenue/logic/savedetailoperting', {
392
- data: {
393
- recordlist2: this.recordList2
394
- }
395
- }, {
396
- resolveMsg: '修改成功',
397
- rejectMsg: '未通过,修改出错!!!'
398
- })
399
- },
400
- // 修改其他记录明细
401
- async updatedefail () {
402
- this.editshow = false
403
- let param = {
404
- f_number: this.mingxi.number,
405
- f_unitprice: this.mingxi.unitprice,
406
- f_brand_spec: this.mingxi.brand_spec,
407
- f_typenumber: this.mingxi.typenumber,
408
- f_typename: this.mingxi.typename,
409
- id: this.mingxi.did
410
- }
411
- await this.$resetpost('api/af-revenue/logic/updatedetail', {data: param}, {
412
- resolveMsg: '修改成功',
413
- rejectMsg: '未通过,修改出错!!!'
414
- })
415
- this.saveOtherdetail()
416
- this.$dispatch('close')
417
- this.$dispatch('refresh')
418
- },
419
- // 计算总金额
420
- cou () {
421
- let sum = []
422
- this.recordlist.forEach((item, index) => {
423
- var sub = item.number * item.unitprice
424
- console.log(sub)
425
- sum.push(sub)
426
- })
427
- console.log(sum)
428
- let res = 0
429
- for (let i = 0; i < sum.length; i++) {
430
- res += sum[i]
431
- }
432
- console.log(res)
433
- this.total = res
434
- },
435
- cancel () {
436
- this.$dispatch('close')
437
- this.$dispatch('refresh')
438
- },
439
- // 保存操作记录
440
- async save2 () {
441
- for (var item in this.model) {
442
- if (this.model[item] instanceof Array) {
443
- this.model[item] = this.model[item].length > 0 ? this.model[item][0] : ''
444
- }
445
- if (this.model[item] != this.oldmodel[item]) {
446
- var car2 = {
447
- tablename: 't_othercharge',
448
- chinesename: this.fileNameSet[item],
449
- oldvalue: this.oldmodel[item],
450
- newvalue: this.model[item],
451
- modifitime: Util.toStandardTimeString(),
452
- fieldname: item,
453
- state: '有效',
454
- othercharge_id: this.model.id,
455
- operator: this.$login.f.name != '' ? this.$login.f.name : '',
456
- f_operator: this.$login.f.name,
457
- f_operatorid: this.$login.f.id,
458
- f_orgid: this.$login.f.orgid,
459
- f_orgname: this.$login.f.orgs,
460
- f_depid: this.$login.f.depids,
461
- f_depname: this.$login.f.deps
462
- }
463
- this.recordList3.push(car2)
464
- // 该方法并未对chinesename fieldname operator等进行判断赋值,此暂写为定值
465
- console.log(car2)
466
- }
467
- }
468
- let condition = this.model.id
469
- await this.$resetpost('api/af-revenue/logic/operationRecord', {
470
- data: {
471
- recordlist3: this.recordList3,
472
- condition: condition
473
- }
474
- }, {
475
- resolveMsg: '修改成功',
476
- rejectMsg: '未通过,修改出错!!!'
477
- })
478
- console.log('this.model', this.model)
479
- this.$dispatch('close')
480
- this.$dispatch('refresh')
481
- },
482
- // 修改其他记录
483
- async save () {
484
- // let condition = " f_collection='" + this.model.collection + "' , f_unitprice='"+ this.model.collection+"' where f_othercharge_id= '"+this.model.id+"'"
485
- this.model.f_collection = this.total
486
- let param = {
487
- f_user_name: this.model.f_user_name,
488
- f_comments: this.model.f_comments,
489
- f_payment: this.model.f_payment,
490
- f_collection: this.model.f_collection,
491
- f_bill_style: this.model.f_bill_style,
492
- f_serial_id: this.model.f_serial_id ? this.model.f_serial_id : '',
493
- f_operate_date: this.model.f_operate_date,
494
- f_operator: this.model.f_operator,
495
- f_operatorid: this.model.f_operatorid ? this.model.f_operatorid : '',
496
- id: this.model.id
497
- }
498
- await this.$resetpost('api/af-revenue/logic/saveotherrecord', {data: param}, {
499
- resolveMsg: '修改成功',
500
- rejectMsg: '未通过,修改出错!!!'
501
- })
502
- this.save2()
503
- this.$dispatch('close')
504
- this.$dispatch('refresh')
505
- }
506
- },
507
- computed: {},
508
- watch: {
509
- 'model.f_user_name' () {
510
- if (this.model.f_operator) {
511
- this.selectoperator()
512
- }
513
- },
514
- 'mingxi.brand_spec' (val) {
515
- if (val) {
516
- this.setTypename(val)
517
- }
518
- },
519
- 'mingxi.typename' (val) {
520
- if (val) {
521
- this.setTypeNumberList(val)
522
- }
523
- },
524
- 'model.operator' () {
525
- if (this.model.f_operator) {
526
- this.selectoperator()
527
- }
528
- },
529
- recordlist: {
530
- handler (val) {
531
- console.log('数组值有了')
532
- this.cou()
533
- }
534
- }
535
- }
536
- }
537
- </script>
1
+ <template>
2
+ <div class="auto">
3
+ <validator name='a' @valid="addressValid(true)" @invalid="addressValid(false)">
4
+ <form class="form-horizontal">
5
+ <div class="row">
6
+ <div class="col-sm-4">
7
+ <label class="font_normal_body">用户姓名</label>
8
+ <input type="text" v-model="model.f_user_name" disabled=disabled style="width: 60%" class="input_search">
9
+ </div>
10
+ <div class="col-sm-4">
11
+ <label class="font_normal_body">付款方式</label>
12
+ <v-select :value.sync="model.f_payment" :value-single="true"
13
+ v-model="model.f_payment"
14
+ class="select_list select"
15
+ :options='payments'
16
+ close-on-select>
17
+ </v-select>
18
+ </div>
19
+ <!-- <div class="col-sm-4">-->
20
+ <!-- <label class="font_normal_body">缴费类型</label>-->
21
+ <!-- <input type="text" v-model="model.payment" style="width: 60%" class="input_search">-->
22
+ <!-- </div>-->
23
+ <div class="col-sm-4">
24
+ <label class="font_normal_body">收据类型</label>
25
+ <v-select :value.sync="model.f_bill_style" :value-single="true"
26
+ v-model="model.f_bill_style"
27
+ class="select_list select"
28
+ :options='bill_styles'
29
+ close-on-select>
30
+ </v-select>
31
+ </div>
32
+ <!-- <div class="col-sm-4">-->
33
+ <!-- <label class="font_normal_body">收据类型</label>-->
34
+ <!-- <input type="text" v-model="model.bill_style" style="width: 60%" class="input_search">-->
35
+ <!-- </div>-->
36
+ <div class="col-sm-4" title="参数:操作时间, 权限:【其他收费金额修改】">
37
+ <label class="font_normal_body">缴费金额</label>
38
+ <input type="text" v-model="model.f_collection" :disabled="!editcollection" style="width: 60%"
39
+ class="input_search">
40
+ </div>
41
+ <div class="col-sm-4">
42
+ <label class="font_normal_body">收费时间</label>
43
+ <datepicker id="operate_date"
44
+ placeholder="收费时间"
45
+ style="width:60%"
46
+ v-model="model.f_operate_date"
47
+ :value.sync="model.f_operate_date"
48
+ :format="'yyyy-MM-dd HH:mm:ss'">
49
+ </datepicker>
50
+ </div>
51
+ <div class="col-sm-4 form-group">
52
+ <label class="font_normal_body" title="参数:操作人员">操作人员</label>
53
+ <v-select :value.sync="model.f_operatorid"
54
+ v-model="model.f_operatorid"
55
+ :value-single="true"
56
+ @change="selectoperator()"
57
+ :options='foperator'
58
+ close-on-select>
59
+ </v-select>
60
+ <!-- @click="selectoperator"-->
61
+ </div>
62
+ <div class="col-sm-4 form-group">
63
+ <label class="font_normal_body">支付流水号</label>
64
+ <input type="text" v-model="model.f_serial_id" style="width: 60%" class="input_search">
65
+ </div>
66
+ <div class="col-sm-12 form-group">
67
+ <label class="font_normal_body">备&emsp;&emsp;注</label>
68
+ <input type="text" v-model="model.f_comments" style="width: 60%" class="input_search">
69
+
70
+ </div>
71
+ </div>
72
+ </form>
73
+ <div style="float: right">
74
+ <button class="button_search" @click="save">保存</button>
75
+ <button class="button_clear" @click="cancel">取消</button>
76
+ </div>
77
+ <form novalidate class="form-horizontal">
78
+ <p></p>
79
+ <p class="bg-info text-center" style="padding: 8px;font-size: 20px">其他维护明细</p>
80
+ <!-- <data-grid :model="inData" v-ref:grid partial='list'>
81
+ <template partial='head'>-->
82
+ <table style="width: 600px">
83
+ <tr>
84
+ <th style="text-align: center">序号</th>
85
+ <th style="text-align: center">品牌及类别</th>
86
+ <th style="text-align: center">数量</th>
87
+ <th style="text-align: center">单价</th>
88
+ <th style="text-align: center">规格</th>
89
+ <th style="text-align: center"> 型号</th>
90
+ <th style="text-align: center"> 操作</th>
91
+ </tr>
92
+ <tr v-for="row in recordlist ">
93
+ <td style="text-align: center;">{{ $index + 1 }}</td>
94
+ <td style="text-align: center;">{{ row.brand_spec }}</td>
95
+ <td style="text-align: center;">{{ row.number }}</td>
96
+ <td style="text-align: center;">{{ row.unitprice }}</td>
97
+ <td style="text-align: center;">{{ row.typename }}</td>
98
+ <td style="text-align: center;">{{ row.typenumber }}</td>
99
+ <td style="text-align: center;">
100
+ <button class="button_new" type="button" @click="editBeizhu(row)">编辑</button>
101
+ </td>
102
+ </tr>
103
+ </table>
104
+ </form>
105
+ <modal :show.sync="editshow" v-ref:modal backdrop='false'>
106
+ <article slot="modal-body" class="modal-body">
107
+ <div class="row auto">
108
+ <div class="form-group form-input-group">
109
+ <label for="" class="control-label">品牌:</label>
110
+ <v-select :value.sync="mingxi.brand_spec"
111
+ :value-single="true"
112
+ v-model="mingxi.brand_spec"
113
+ class="select_list select"
114
+ :options='brand_specs'
115
+ close-on-select>
116
+ </v-select>
117
+ </div>
118
+ </div>
119
+ <div class="row auto">
120
+ <div class="form-group form-input-group" title="权限:【其他收费金额修改】">
121
+ <label for="" class="control-label">数量:</label>
122
+ <input type="text" width="300px" class="form-control" v-model="mingxi.number" :disabled="!editcollection">
123
+ </div>
124
+ </div>
125
+ <div class="row auto">
126
+ <div class="form-group form-input-group" title="权限:【其他收费金额修改】">
127
+ <label for="" class="control-label">单价:</label>
128
+ <input type="text" width="300px" class="form-control" v-model="mingxi.unitprice"
129
+ :disabled="!editcollection">
130
+ </div>
131
+ </div>
132
+ <div class="row auto">
133
+ <div class="form-group form-input-group">
134
+ <label for="" class="control-label">规格:</label>
135
+ <v-select :value.sync="mingxi.typename" :value-single="true"
136
+ v-model="mingxi.typename"
137
+ class="select_list select"
138
+ :options='typeNameList'
139
+ close-on-select>
140
+ </v-select>
141
+ </div>
142
+ </div>
143
+ <div class="row auto">
144
+ <div class="form-group form-input-group">
145
+ <label for="" class="control-label">型号:</label>
146
+ <v-select :value.sync="mingxi.typenumber"
147
+ :value-single="true"
148
+ v-model="mingxi.typenumber"
149
+ class="select_list select"
150
+ :options='typeNumberList'
151
+ close-on-select>
152
+ </v-select>
153
+ </div>
154
+ </div>
155
+ </article>
156
+ <footer slot="modal-footer" class="modal-footer">
157
+ <button type="button" class="btn btn-default" @click='editclose' id="vc-messagebox-close">取消</button>
158
+ <button type="button" class="btn btn-success" @click='updatedefail' id="vc-messagebox-confirm">确认</button>
159
+ </footer>
160
+ </modal>
161
+ <!--<split-price :showdata="model" :pricesplit="priceSplit" v-if="priceSplit" ></split-price>-->
162
+ </validator>
163
+ </div>
164
+ </template>
165
+ <script>
166
+ import {HttpResetClass} from 'vue-client'
167
+ import * as Util from '../../Util'
168
+
169
+ let readyGen = async function (self) {
170
+ self.getMaterial()
171
+ await self.$LoadParams.loadParam(self.f_filialeid)
172
+ await self.$GetSaleParam.initinputtor()
173
+ await self.initoperator()
174
+ }
175
+ // var data
176
+ export default {
177
+ title: '基本信息',
178
+
179
+ data () {
180
+ return {
181
+ brand_specs: [],
182
+ bill_styles: this.$appdata.getParam('打印格式') ? [{
183
+ label: '全部',
184
+ value: ''
185
+ }, ...this.$appdata.getParam('打印格式')] : [],
186
+ payments: this.$appdata.getParam('付款方式') ? [{
187
+ label: '全部',
188
+ value: ''
189
+ }, ...this.$appdata.getParam('付款方式')] : [],
190
+ editshow: false,
191
+ editcollection: false,
192
+ mingxi: '',
193
+ oldmingxi: '',
194
+ brand_spec: '',
195
+ unitprice: '',
196
+ typeNameList: [],
197
+ foperator: [],
198
+ typeNumberList: [],
199
+ materialInfoList: [],
200
+ // 操作记录表
201
+ recordList3: [],
202
+ total: '',
203
+ // 明细操作记录
204
+ recordList2: [],
205
+ // 其他记录
206
+ fileNameSet: {
207
+ f_payment: '缴费类型',
208
+ f_bill_style: '收据类型',
209
+ f_collection: '缴费金额',
210
+ f_serial_id: '支付流水号',
211
+ f_operate_date: '缴费时间',
212
+ f_comments: '备注',
213
+ name: '用户姓名',
214
+ f_operator: '操作人'
215
+ },
216
+ // 其他记录明细
217
+ fileNameSet2: {
218
+ brand_spec: '品牌类别',
219
+ number: '数量',
220
+ unitprice: '单价',
221
+ typename: '规格',
222
+ typenumber: '型号',
223
+ operator: '操作人'
224
+ }
225
+ }
226
+ },
227
+ props: {
228
+ model: Object,
229
+ oldmodel: Object,
230
+ // recordList:Array
231
+ recordlist: Array
232
+ },
233
+ ready () {
234
+ if (this.$login.r.includes('其他收费金额修改')) {
235
+ this.editcollection = true
236
+ }
237
+ this.cou()
238
+ this.oldmodel = JSON.parse(JSON.stringify(this.model))
239
+ console.log(this.model)
240
+ readyGen(this)
241
+ },
242
+ created () {
243
+ },
244
+ methods: {
245
+ findById (list, name) {
246
+ let result
247
+ list.forEach((row, n) => {
248
+ if (name == row.value) {
249
+ result = row.data
250
+ }
251
+ })
252
+ return result
253
+ },
254
+ getMaterial () {
255
+ let http = new HttpResetClass()
256
+ http.load('POST', '/api/af-revenue/logic/getMaterialInfo', {
257
+ f_org_id: this.$login.f.orgid
258
+ }, {resolveMsg: null, rejectMsg: null}).then(res => {
259
+ // 遍历原始数据
260
+ this.materialInfoList = res.data
261
+ this.materialInfoList.forEach(item => {
262
+ if (item.type === '分类') {
263
+ const category = {
264
+ value: item.name,
265
+ label: item.name,
266
+ data: item
267
+ }
268
+ this.brand_specs.push(category)
269
+ }
270
+ if (item.type === '品名') {
271
+ const category = {
272
+ value: item.name,
273
+ label: item.name,
274
+ data: item
275
+ }
276
+ this.typeNameList.push(category)
277
+ }
278
+ if (item.type === '型号') {
279
+ const category = {
280
+ value: item.name,
281
+ label: item.name
282
+ }
283
+ this.typeNumberList.push(category)
284
+ }
285
+ })
286
+ })
287
+ },
288
+ initoperator () {
289
+ this.foperator = []
290
+ console.log('this.$login', this.$login, this.oldmodel, this.model)
291
+ let arr = this.$GetSaleParam.inputtors.filter((res) => {
292
+ if (res.rolestr != null && res.rolestr != '') {
293
+ return (res.rolestr.indexOf('收费员') > -1 || res.rolestr.indexOf('话务员') > -1) && res.f_orgid == this.$login.f.orgid
294
+ }
295
+ })
296
+ arr.forEach((res) => {
297
+ this.foperator.push({label: res.name, value: res.id})
298
+ })
299
+ },
300
+ setTypename (val) {
301
+ const result = this.findById(this.brand_specs, val)
302
+ if (result) {
303
+ this.typeNameList = []
304
+ console.log('setTypename', result)
305
+ this.materialInfoList.forEach(item => {
306
+ if (item.type === '品名' && result.id.toString() === item.parent_id.toString()) {
307
+ const category = {
308
+ value: item.name,
309
+ label: item.name,
310
+ data: item
311
+ }
312
+ this.typeNameList.push(category)
313
+ }
314
+ })
315
+ }
316
+ },
317
+ setTypeNumberList (val) {
318
+ const result = this.findById(this.typeNameList, val)
319
+ if (result) {
320
+ this.typeNumberList = []
321
+ console.log('setTypeNumberList', result)
322
+ this.materialInfoList.forEach(item => {
323
+ if (item.type === '型号' && result.id.toString() === item.parent_id.toString()) {
324
+ const category = {
325
+ value: item.name,
326
+ label: item.name
327
+ }
328
+ this.typeNumberList.push(category)
329
+ }
330
+ })
331
+ }
332
+ },
333
+ selectoperator () {
334
+ let id = this.model.f_operatorid
335
+ if (!this.model.f_operatorid) {
336
+ return
337
+ }
338
+ let http = new HttpResetClass()
339
+ http.load('POST', 'api/af-revenue/sql/saleSingleTable',
340
+ {
341
+ data: {
342
+ tablename: 't_user',
343
+ condition: `id = '${id}'`
344
+ }
345
+ },
346
+ {resolveMsg: null, rejectMsg: null}).then((res) => {
347
+ console.log('kanak,res', res)
348
+ if (res.data.length > 0) {
349
+ this.model.f_operator = res.data[0].name
350
+ } else {
351
+ this.model.f_operatorid = ''
352
+ this.$showAlert('操作员信息未找到', 'warning', 2000)
353
+ }
354
+ console.log('this.f_operatorid', this.model.f_operator)
355
+ })
356
+ },
357
+ editclose () {
358
+ this.mingxi = ''
359
+ this.editshow = false
360
+ },
361
+ editBeizhu (val) {
362
+ this.editshow = true
363
+ this.mingxi = val
364
+ this.oldmingxi = val
365
+ this.mingxi = JSON.parse(JSON.stringify(val))
366
+ this.oldmingxi = JSON.parse(JSON.stringify(val))
367
+ },
368
+ async saveOtherdetail () {
369
+ for (var item in this.mingxi) {
370
+ if (this.mingxi[item] instanceof Array) {
371
+ this.mingxi[item] = this.mingxi[item].length > 0 ? this.mingxi[item][0] : ''
372
+ }
373
+ if (this.mingxi[item] != this.oldmingxi[item]) {
374
+ var car3 = {
375
+ tablename: 't_othercharge_detail',
376
+ chinesename: this.fileNameSet2[item] != '' ? this.fileNameSet2[item] : '',
377
+ // chinesename: this.fileNameSet2[item],
378
+ oldvalue: this.oldmingxi[item],
379
+ newvalue: this.mingxi[item],
380
+ modifitime: Util.toStandardTimeString(),
381
+ fieldname: item,
382
+ state: '有效',
383
+ charge_detail_id: this.mingxi.did,
384
+ operator: this.$login.f.name != '' ? this.$login.f.name : ''
385
+ }
386
+ this.recordList2.push(car3)
387
+ // 该方法并未对chinesename fieldname operator等进行判断赋值,此暂写为定值
388
+ console.log(car3)
389
+ }
390
+ }
391
+ await this.$resetpost('api/af-revenue/logic/savedetailoperting', {
392
+ data: {
393
+ recordlist2: this.recordList2
394
+ }
395
+ }, {
396
+ resolveMsg: '修改成功',
397
+ rejectMsg: '未通过,修改出错!!!'
398
+ })
399
+ },
400
+ // 修改其他记录明细
401
+ async updatedefail () {
402
+ this.editshow = false
403
+ let param = {
404
+ f_number: this.mingxi.number,
405
+ f_unitprice: this.mingxi.unitprice,
406
+ f_brand_spec: this.mingxi.brand_spec,
407
+ f_typenumber: this.mingxi.typenumber,
408
+ f_typename: this.mingxi.typename,
409
+ id: this.mingxi.did
410
+ }
411
+ await this.$resetpost('api/af-revenue/logic/updatedetail', {data: param}, {
412
+ resolveMsg: '修改成功',
413
+ rejectMsg: '未通过,修改出错!!!'
414
+ })
415
+ this.saveOtherdetail()
416
+ this.$dispatch('close')
417
+ this.$dispatch('refresh')
418
+ },
419
+ // 计算总金额
420
+ cou () {
421
+ let sum = []
422
+ this.recordlist.forEach((item, index) => {
423
+ var sub = item.number * item.unitprice
424
+ console.log(sub)
425
+ sum.push(sub)
426
+ })
427
+ console.log(sum)
428
+ let res = 0
429
+ for (let i = 0; i < sum.length; i++) {
430
+ res += sum[i]
431
+ }
432
+ console.log(res)
433
+ this.total = res
434
+ },
435
+ cancel () {
436
+ this.$dispatch('close')
437
+ this.$dispatch('refresh')
438
+ },
439
+ // 保存操作记录
440
+ async save2 () {
441
+ for (var item in this.model) {
442
+ if (this.model[item] instanceof Array) {
443
+ this.model[item] = this.model[item].length > 0 ? this.model[item][0] : ''
444
+ }
445
+ if (this.model[item] != this.oldmodel[item]) {
446
+ var car2 = {
447
+ tablename: 't_othercharge',
448
+ chinesename: this.fileNameSet[item],
449
+ oldvalue: this.oldmodel[item],
450
+ newvalue: this.model[item],
451
+ modifitime: Util.toStandardTimeString(),
452
+ fieldname: item,
453
+ state: '有效',
454
+ othercharge_id: this.model.id,
455
+ operator: this.$login.f.name != '' ? this.$login.f.name : '',
456
+ f_operator: this.$login.f.name,
457
+ f_operatorid: this.$login.f.id,
458
+ f_orgid: this.$login.f.orgid,
459
+ f_orgname: this.$login.f.orgs,
460
+ f_depid: this.$login.f.depids,
461
+ f_depname: this.$login.f.deps
462
+ }
463
+ this.recordList3.push(car2)
464
+ // 该方法并未对chinesename fieldname operator等进行判断赋值,此暂写为定值
465
+ console.log(car2)
466
+ }
467
+ }
468
+ let condition = this.model.id
469
+ await this.$resetpost('api/af-revenue/logic/operationRecord', {
470
+ data: {
471
+ recordlist3: this.recordList3,
472
+ condition: condition
473
+ }
474
+ }, {
475
+ resolveMsg: '修改成功',
476
+ rejectMsg: '未通过,修改出错!!!'
477
+ })
478
+ console.log('this.model', this.model)
479
+ this.$dispatch('close')
480
+ this.$dispatch('refresh')
481
+ },
482
+ // 修改其他记录
483
+ async save () {
484
+ // let condition = " f_collection='" + this.model.collection + "' , f_unitprice='"+ this.model.collection+"' where f_othercharge_id= '"+this.model.id+"'"
485
+ this.model.f_collection = this.total
486
+ let param = {
487
+ f_user_name: this.model.f_user_name,
488
+ f_comments: this.model.f_comments,
489
+ f_payment: this.model.f_payment,
490
+ f_collection: this.model.f_collection,
491
+ f_bill_style: this.model.f_bill_style,
492
+ f_serial_id: this.model.f_serial_id ? this.model.f_serial_id : '',
493
+ f_operate_date: this.model.f_operate_date,
494
+ f_operator: this.model.f_operator,
495
+ f_operatorid: this.model.f_operatorid ? this.model.f_operatorid : '',
496
+ id: this.model.id
497
+ }
498
+ await this.$resetpost('api/af-revenue/logic/saveotherrecord', {data: param}, {
499
+ resolveMsg: '修改成功',
500
+ rejectMsg: '未通过,修改出错!!!'
501
+ })
502
+ this.save2()
503
+ this.$dispatch('close')
504
+ this.$dispatch('refresh')
505
+ }
506
+ },
507
+ computed: {},
508
+ watch: {
509
+ 'model.f_user_name' () {
510
+ if (this.model.f_operator) {
511
+ this.selectoperator()
512
+ }
513
+ },
514
+ 'mingxi.brand_spec' (val) {
515
+ if (val) {
516
+ this.setTypename(val)
517
+ }
518
+ },
519
+ 'mingxi.typename' (val) {
520
+ if (val) {
521
+ this.setTypeNumberList(val)
522
+ }
523
+ },
524
+ 'model.operator' () {
525
+ if (this.model.f_operator) {
526
+ this.selectoperator()
527
+ }
528
+ },
529
+ recordlist: {
530
+ handler (val) {
531
+ console.log('数组值有了')
532
+ this.cou()
533
+ }
534
+ }
535
+ }
536
+ }
537
+ </script>