sale-client 4.2.36 → 4.2.37

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