manage-client 3.2.100 → 3.2.103

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 (54) hide show
  1. package/.gradle/3.5.1/file-changes/last-build.bin +0 -0
  2. package/.gradle/3.5.1/taskHistory/taskHistory.lock +0 -0
  3. package/.gradle/buildOutputCleanup/built.bin +0 -0
  4. package/.gradle/buildOutputCleanup/cache.properties.lock +1 -0
  5. package/build/dev-server.js +177 -176
  6. package/package.json +1 -1
  7. package/src/components/SellReport/GasMoneyPublicMoney.vue +251 -251
  8. package/src/components/SellReport/NonResidentGas.vue +216 -216
  9. package/src/components/SellReport/ReportComponrnt/TieAnAccount.vue +507 -507
  10. package/src/components/SellReport/ReportItems.vue +246 -246
  11. package/src/components/sale/businessquery/ArrearsQuery.vue +934 -934
  12. package/src/components/sale/businessquery/ChangeMeterQuery.vue +676 -676
  13. package/src/components/sale/businessquery/InspectListGas.vue +552 -552
  14. package/src/components/sale/businessquery/InspectListUser.vue +449 -449
  15. package/src/components/sale/businessquery/sellingChargePrice.vue +10 -10
  16. package/src/components/sale/config/exportConfig.js +45 -1
  17. package/src/components/sale/config/tableConfig.js +48 -48
  18. package/src/components/webmeter/DrillData/UserGasAll.vue +1 -1
  19. package/src/components/webmeter/WebmeterQuery.vue +3 -0
  20. package/src/components/webmeter/gasAnalysis/WebmeterSettlementAnalysis.vue +432 -0
  21. package/src/components/webmeter/handplan/NewWebMeterHandPlan.vue +8 -1
  22. package/src/components/webmeter/instruction/NewQueryInstruct.vue +446 -446
  23. package/src/components/webmeter/newwebmeter/NewException/MeterExceptionList.vue +50 -9
  24. package/src/components/webmeter/report/ReportList.vue +4 -4
  25. package/src/components/webmeter/reportdata/ReportDataQuery.vue +279 -249
  26. package/src/filiale/liaoyuan/MeterQuery.vue +905 -905
  27. package/src/filiale/liaoyuan/RecordInfoQuery.vue +1163 -1163
  28. package/src/filiale/liaoyuan/ReportList.vue +421 -421
  29. package/src/filiale/macheng/FxGasTable.vue +236 -236
  30. package/src/filiale/macheng/ManageDayGas.vue +248 -248
  31. package/src/filiale/macheng/ManageHandSellMoney.vue +249 -249
  32. package/src/filiale/macheng/ManageMonthGas.vue +250 -250
  33. package/src/filiale/macheng/ManageOtherCharge.vue +251 -251
  34. package/src/filiale/macheng/ManageSellType.vue +287 -287
  35. package/src/filiale/macheng/MonthGasQuery.vue +470 -0
  36. package/src/filiale/macheng/RecordInfoQuery.vue +1023 -1023
  37. package/src/filiale/macheng/SellingTable.vue +219 -219
  38. package/src/filiale/macheng/UserBalanceReport.vue +178 -178
  39. package/src/filiale/macheng/config/DefaultPrint.js +7 -0
  40. package/src/filiale/macheng/config/exportConfig.js +74 -67
  41. package/src/filiale/macheng/reportManage.js +19 -19
  42. package/src/filiale/macheng/sale.js +12 -11
  43. package/src/filiale/meihekou/HandplanQuery.vue +1234 -1234
  44. package/src/filiale/meihekou/UserQuery.vue +773 -773
  45. package/src/filiale/qianneng/OtherChargeQuery.vue +646 -646
  46. package/src/filiale/rongchuang/SellingTable.vue +251 -251
  47. package/src/filiale/shaoguan/RecordInfoQuery.vue +1150 -1150
  48. package/src/webmeterManage.js +2 -0
  49. package/.gradle/4.4/fileContent/fileContent.lock +0 -0
  50. package/.gradle/4.4/taskHistory/taskHistory.bin +0 -0
  51. package/.gradle/4.4/taskHistory/taskHistory.lock +0 -0
  52. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  53. package/build/libs/ManageClient-3.1.0-17.jar +0 -0
  54. package/build/tmp/jar/MANIFEST.MF +0 -2
@@ -1,507 +1,507 @@
1
- <template>
2
- <button class="button_search button_spacing" @click="watchshowChange()">扎帐</button>
3
- <button class="button_search button_spacing" @click="history()">历史记录</button>
4
-
5
- <modal :show.sync="isHistory" v-ref:modal backdrop="false">
6
- <header slot="modal-header" class="modal-header text-center">
7
- <h4 class="modal-title"><span>历史记录</span><button style="margin-left: 90%;border-width: 0px;" @click="isHistory=!isHistory">×</button></h4>
8
- </header>
9
- <article slot="modal-body">
10
- <data-grid :model="models" partial='list' class="basic-main list_area table_sy" v-ref:grid>
11
- <template partial='head'>
12
- <tr>
13
- <th>
14
- <nobr>报表名称</nobr>
15
- </th>
16
- <th>
17
- <nobr>扎帐金额</nobr>
18
- </th>
19
- <th>
20
- <nobr>系统金额</nobr>
21
- </th>
22
- <th>
23
- <nobr>扎帐归属时间</nobr>
24
- </th>
25
- <th>
26
- <nobr>操作时间</nobr>
27
- </th>
28
- <th>
29
- <nobr>状态</nobr>
30
- </th>
31
- <th>
32
- <nobr>操作员</nobr>
33
- </th>
34
- <th>
35
- <nobr>备注</nobr>
36
- </th>
37
- <th>
38
- <nobr>操作</nobr>
39
- </th>
40
- </tr>
41
- </template>
42
- <template partial='body'>
43
- <td style="text-align: center;">
44
- <nobr>{{row.f_report_name}}</nobr>
45
- </td>
46
- <td style="text-align: center;">
47
- <nobr>{{row.f_fee}}</nobr>
48
- </td>
49
- <td style="text-align: center;">
50
- <nobr>{{row.f_report_fee}}</nobr>
51
- </td>
52
- <td style="text-align: center;">
53
- <nobr>{{row.f_end_date}}</nobr>
54
- </td>
55
- <td style="text-align: center;">
56
- <nobr>{{row.f_operate_date}}</nobr>
57
- </td>
58
-
59
- <td style="text-align: center;">
60
- <nobr>{{row.f_state}}</nobr>
61
- </td>
62
- <td style="text-align: center;">
63
- <nobr>{{row.f_operator}}</nobr>
64
- </td>
65
- <td style="text-align: center;">
66
- <nobr>{{row.f_remarks}}</nobr>
67
- </td>
68
- <td style="text-align: center;">
69
- <button v-if="row.f_operate_state == 1" class="button_search button_spacing" @click="$parent.$parent.$parent.repeal(row)">撤销</button>
70
- </td>
71
- </template>
72
- </data-grid>
73
- </article>
74
- <footer slot="modal-footer" class="modal-footer"></footer>
75
- </modal>
76
- <modal :show.sync="specialCircumstances && watchshow" v-ref:modal backdrop="false">
77
- <header slot="modal-header" class="modal-header text-center">
78
- <h4 class="modal-title">扎帐选择</h4>
79
- <input type="checkbox" class="" id="f_generations" :checked="fields.length === tieData.length" @click='checkedAll()' >
80
- <label for="f_generations" class="font-size">全选</label>
81
- </header>
82
- <article slot="modal-body">
83
- <div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">
84
- <div class="col-sm-3" v-for="(index, item) in tieData">
85
- <input type='checkbox' :id="'water-owe-details-'+index" :checked="fields.indexOf(item.name)>=0" name='checkboxinput' class='input-checkbox' @click='checkedOne(item.name)'>
86
- <label :for="'water-owe-details-'+index" class="font-size">{{item.name}}</label>
87
- </div>
88
- </div>
89
- </article>
90
- <footer slot="modal-footer" class="modal-footer">
91
- <center>
92
- <button type="button" class="btn btn-default" @click='watchshow = !watchshow'>取消</button>
93
- <button type="button" class="btn btn-success" @click='watchshowChange(1)'>确认</button>
94
- </center>
95
- </footer>
96
- </modal>
97
-
98
- <modal :show.sync="isTieModal" v-ref:modal large backdrop="false">
99
- <header slot="modal-header" class="modal-header">
100
- <h3 style="color:black" class="modal-title">请确认扎帐金额</h3>
101
- </header>
102
- <article slot="modal-body" class="modal-body">
103
- <validator name='v'>
104
- <form class="form-horizontal select-overspread">
105
- <div class="row">
106
- <div v-for="(key, value) in org" v-if ="value.trim()!=''" class="col-sm-4 form-group">
107
- <label class="font_normal_body">{{ key == 'f_orgname' ? '&emsp;&emsp;&emsp;&emsp;公司' : key == 'f_depname' ? '&emsp;&emsp;&emsp;&emsp;部门' : '&emsp;&emsp;&emsp;&emsp;人员' }}</label>
108
- <input type="text" style="width:60%" class="input_search" :value="value"
109
- disabled="disabled">
110
- </div>
111
- </div>
112
- <div class="row">
113
- <div class="col-sm-4 form-group" v-for="item in affirmDate">
114
- <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;{{item.name}}</label>
115
- <input type="text" style="width:60%" class="input_search" :value="item.val"
116
- disabled="disabled">
117
- </div>
118
- <div class="col-sm-4 form-group" >
119
- <label class="font_normal_body" for="startDate">上次扎帐日期</label>
120
- <datepicker id="startDate" placeholder="上次扎帐日期" style="width: 60%"
121
- v-model="startDate"
122
- :value.sync="startDate"
123
- :disabled-days-of-Week="[]"
124
- :format="'yyyy-MM-dd HH:mm:ss'"
125
- :disabled="true"
126
- :show-reset-button="reset">
127
- </datepicker>
128
- </div>
129
- <div class="col-sm-4 form-group" >
130
- <label class="font_normal_body" for="endDate">本次扎帐日期</label>
131
- <datepicker id="endDate" placeholder="本次扎帐日期" style="width: 60%"
132
- v-model="endDate"
133
- :value.sync="endDate"
134
- :disabled-days-of-Week="[]"
135
- :format="'yyyy-MM-dd HH:mm:ss'"
136
- :disabled="true"
137
- :show-reset-button="reset">
138
- </datepicker>
139
- </div>
140
- </div>
141
- <div class="row">
142
- <div class="col-sm-4 form-group" >
143
- <label class="font_normal_body">&emsp;系统总金额</label>
144
- <input type="text" style="width:60%" class="input_search" v-model="reportstr"
145
- disabled="disabled" placeholder="系统金额">
146
- </div>
147
- <div class="col-sm-4 form-group" >
148
- <label class="font_normal_body">&emsp;扎帐总金额</label>
149
- <input type="text" style="width:60%" class="input_search" v-model="f_fee"
150
- placeholder="扎帐金额">
151
- </div>
152
- </div>
153
- <div class="row">
154
- <div class="col-sm-11 form-group">
155
- <label class="font_normal_body"><nobr>&emsp;&emsp;&emsp;&emsp;备注</nobr></label>
156
- <textarea style="resize:none;width:95%;" class="input_search"
157
- v-model='f_remarks' ></textarea>
158
- </div>
159
- </div>
160
- </form>
161
- </validator>
162
- </article>
163
- <footer slot="modal-footer" class="modal-footer">
164
- <button class="btn btn-success" @click="searchData">确认扎帐</button>
165
- <button class="btn btn-default" @click="isTieModal = !isTieModal">取消</button>
166
- </footer>
167
- </modal>
168
- </template>
169
-
170
- <script>
171
- import {DataModel, HttpResetClass, PagedList} from "vue-client"
172
-
173
- let valdef = async function (self) {
174
- // 读取扎帐配置
175
- await self.$getConfig(self, 'TieConfig')
176
- if (self.defaultfield) {
177
- self.fields = [...self.defaultfield]
178
- }
179
- self.getStartDate ()
180
- console.log('扎帐配置信息', self.config)
181
- }
182
- export default {
183
- title: '扎帐组件',
184
- props: {
185
- model: {},
186
- endDate: '',
187
- // 扎帐金额
188
- reportFee: {
189
- default: ''
190
- },
191
- // 带有特殊标记的扎帐金额字符串
192
- feeStr: {
193
- default: '#()'
194
- },
195
- // 特殊情况
196
- specialCircumstances: false,
197
- // 筛选出标记的扎帐金额正则表达式 默认 #()
198
- regex: {
199
- default: /#(.+?)\)/g
200
- },
201
- // 报表所选 公司 部门 人员 {f_orgname,f_depname,f_operator}
202
- org: {},
203
- // 筛选出标记的扎帐金额所对应的列名正则表达式 默认 ^()
204
- titRegex: {
205
- default: /\^(.+?)\)/g
206
- },
207
- // 删掉掉标记的正则表达式
208
- rep: {
209
- default: /\[|\]|&|@|!|#|%|\{|\}|\(|\)|\$|\^/g
210
- },
211
-
212
- // 默认列
213
- defaultfield: []
214
- },
215
- data () {
216
- return {
217
- config: {
218
- // // 配置需要扎帐公司部门 如需全部扎帐 orgname: '*',
219
- // isOrgname: true, // true表示不能跨公司
220
- // isDepname: true, // true表示不能跨部门
221
- // isUser: true, // true表示不能跨人员
222
- // orgname: ['巩义市燃气有限公司'],
223
- // depname: ['嵩山路营业厅', '人民路营业厅']
224
- },
225
- // 上次扎帐日期
226
- startDate: '',
227
- models: {rows:[]},
228
- watchshow: false,
229
- isTieModal: false,
230
- f_orgid: this.$login.f.orgid,
231
- f_orgname: this.$login.f.orgs,
232
- f_depid: this.$login.f.depids,
233
- f_depname: this.$login.f.deps,
234
- f_operator_id: this.$login.f.id,
235
- f_operator: this.$login.f.name,
236
- f_remarks: '',
237
- reportstr: '',
238
- isHistory: false,
239
- f_fee: '',
240
- // 扎帐数据 [{name: xxx,val: xxx}]
241
- tieData: [],
242
- condition: '',
243
- fields: [],
244
- isCheckedAll: false,
245
- affirmDate: []
246
- }
247
- },
248
- ready () {
249
- console.log('加载扎帐组件')
250
- valdef(this)
251
- },
252
- methods: {
253
- async getStartDate () {
254
- // 获取上次扎帐日期
255
- let condition = `f_report_path='${this.model.f_report_path}' and f_state = '有效'`
256
- if (this.config.isOrgname) {
257
- condition += ' and f_orgid = ' + this.f_orgid
258
- }
259
- if (this.config.isDepname) {
260
- condition += ' and f_depid = ' + this.f_depid
261
- }
262
- if (this.config.isUser) {
263
- condition += ' and f_operator_id = ' + this.f_operator_id
264
- }
265
- this.condition = condition
266
- let querys= await this.$resetpost('rs/sql/PrickBillQuery?pageNo=1&pageSize=7',
267
- {data:{condition:condition}},{resolveMsg:null,rejectMsg:'查询出错'})
268
- this.models.rows = querys.data
269
- if (querys.data.length === 0){
270
- this.$dispatch('update', '')
271
- }
272
- },
273
- history() {
274
- this.isHistory = !this.isHistory
275
- this.getStartDate()
276
- },
277
- repeal(val){
278
- console.log('撤销信息', val)
279
- let data = {
280
- flag: 2,
281
- f_orgid: this.$login.f.orgid,
282
- f_orgname: this.$login.f.orgs,
283
- f_depid: this.$login.f.depids,
284
- f_depname: this.$login.f.deps,
285
- f_operator_id: this.$login.f.id,
286
- f_operator: this.$login.f.name,
287
- data: {
288
- id: val.id,
289
- f_state: '无效'
290
- }
291
- }
292
- if(this.$login.r.includes('扎帐撤销权限')) {
293
- data.flag = 3
294
- }
295
- this.$resetpost('rs/logic/SaveTieAnAccount',
296
- {data:data},
297
- {resolveMsg:null,rejectMsg:null}).then(res =>{
298
- switch (res.data) {
299
- case 202 :
300
- this.$showAlert('撤销成功', 'success', 3000)
301
- this.getStartDate()
302
- this.isHistory = !this.isHistory
303
- break
304
- case 201 : this.$showAlert('撤销失败,该条记录不是当天扎帐记录,不能撤销!', 'warning', 3000)
305
- break
306
- }
307
- })
308
- },
309
- watchshowChange (val) {
310
- if (val) {
311
- if (!this.fields[0]) return
312
- this.getStartDate()
313
- this.isTieModal = true
314
- this.watchshow = false
315
- this.f_fee = this.reportstr = this.sumMoney(this.tieData, this.fields)
316
- return
317
- }
318
- // 判断是否配置需扎帐的公司
319
- if (JSON.stringify(this.config) === '{}') {
320
- this.$showAlert(`未配置扎帐信息TieConfig.json 例:
321
- {
322
- isOrgname: true, // true表示不能跨公司
323
- isDepname: true, // true表示不能跨部门
324
- isUser: true, // true表示不能跨人员
325
- orgname: ['公司名',...], // '*' 表示全部
326
- depname: ['部门名',...] // '*' 表示全部
327
- }`, 'warning', 4000)
328
- return
329
- }
330
- // 判断报表是否有数据
331
- if ((this.feeStr == null || this.feeStr === '#()') && this.reportFee === '') {
332
- this.$showAlert('未查询数据', 'warning', 4000)
333
- return
334
- }
335
- // 判断 是否是扎帐公司
336
- if (this.config.orgname !== '*' && !this.config.orgname.includes(this.f_orgname)) {
337
- this.$showAlert('禁止扎帐 账号所属分公司无需扎帐', 'warning', 4000)
338
- return
339
- }
340
- // 判断 是否是扎帐部门
341
- if (this.config.depname !== '*' && !this.config.depname.includes(this.f_depname)) {
342
- this.$showAlert('禁止扎帐 账号所属部门无需扎帐', 'warning', 4000)
343
- return
344
- }
345
- // 本公司只能扎本公司的
346
- if (this.config.isOrgname && this.f_orgname !== this.org.f_orgname) {
347
- console.log('本公司只能扎本公司的', this.config.isOrgname, this.f_orgname, this.org.f_orgname[0])
348
- this.$showAlert('禁止跨分公司扎帐', 'warning', 4000)
349
- return
350
- }
351
- // 本部门只能扎本部门的
352
- if (this.config.isDepname && this.f_depname !== this.org.f_depname) {
353
- console.log('本公司只能扎本部门的', this.config.isDepname, this.f_depname, this.org.f_depname[0])
354
- this.$showAlert('禁止跨部门扎帐', 'warning', 4000)
355
- return
356
- }
357
- // 本人只能扎本人的
358
- if (this.config.isUser && this.f_operator !== this.org.f_operator) {
359
- this.$showAlert('请选择人员 \"' + this.f_operator + '\"进行扎帐', 'warning', 4000)
360
- return
361
- }
362
- this.$dispatch('special', this)
363
-
364
- if (this.specialCircumstances) {
365
- this.watchshow = true
366
- } else {
367
- this.isTieModal = true
368
- }
369
-
370
- },
371
- getBracketStr (val) {
372
- let item = []
373
- if (this.reportFee != '') {
374
- item.push({name: '总金额', val: this.reportFee})
375
- return
376
- }
377
- if (val == null || val == '') {
378
- item.push({name: '总金额', val: 0})
379
- return
380
- }
381
- let regex = this.regex
382
- let rep = this.rep
383
- let moneys = val.toString().match(regex)
384
- let titles = val.toString().match(this.titRegex)
385
- if (titles && titles.length > 0) {
386
- for (let i = 0; i < titles.length; i++) {
387
- let name = titles[i].toString().replace(rep, '').trim()
388
- let value = moneys[i].toString().replace(rep, '').trim()
389
- item.push({name: name, val: value})
390
- }
391
- }
392
- this.tieData = item
393
- },
394
- sumMoney (obj, conf) {
395
- this.affirmDate = obj.filter(x => conf.includes(x.name))
396
- let option = obj.filter(x => conf.includes(x.name)).map(x => parseFloat(x.val)).reduce((x, y) => x + y, 0)
397
- return option.toFixed(2)
398
- },
399
-
400
- searchData () {
401
- if (parseFloat(this.reportstr) != parseFloat(this.f_fee)) {
402
- this.$showAlert('扎帐金额有误,无法保存', 'warning', 3000)
403
- return
404
- }
405
- let condition = ''
406
-
407
- for (let [key,val] of Object.entries(this.org)) {
408
- condition += val + '.'
409
- }
410
- let info = {
411
- saveData: [],
412
- condition: this.condition,
413
- flag: '1' // 1表示保存
414
- }
415
- for (let rs of this.affirmDate) {
416
- let xx = {
417
- f_report_name: this.model.f_report_name,
418
- f_report_path: this.model.f_report_path,
419
- f_report_type: this.model.f_report_type,
420
- f_report_fee: rs.val,
421
- f_fee: rs.val,
422
- f_state: '有效',
423
- f_end_date: this.endDate,
424
- startDate: this.startDate,
425
- f_orgid: this.f_orgid,
426
- f_orgname: this.f_orgname,
427
- f_depid: this.f_depid,
428
- f_depname: this.f_depname,
429
- f_operator_id: this.f_operator_id,
430
- f_operator: this.f_operator,
431
- f_remarks: this.f_remarks,
432
- f_condition: condition + rs.name
433
- }
434
- info.saveData.push(xx)
435
- }
436
- let HttpReset = new HttpResetClass()
437
- HttpReset.load('POST', 'rs/logic/SaveTieAnAccount', info,
438
- {resolveMsg: null, rejectMsg: null}).then((res) => {
439
- switch (res.data) {
440
- case 200 :
441
- this.$showAlert('保存成功', 'success', 3000)
442
- this.getStartDate()
443
- break
444
- case 201 : this.$showAlert('重复扎帐', 'warning', 3000)
445
- break
446
- }
447
- this.watchshow = false
448
- this.isTieModal = false
449
- })
450
- },
451
- checkedOne (name) {
452
- let nameIndex = this.fields.indexOf(name)
453
- if (nameIndex >= 0) {
454
- // 如果已经包含, 则去除(单选按钮由选中变为非选中状态)
455
- this.fields.splice(nameIndex, 1)
456
- } else {
457
- // 选中该checkbox
458
- this.fields.push(name)
459
- if (this.fields.length === this.tieData.length) {
460
- this.isCheckedAll = true
461
- } else {
462
- this.isCheckedAll = false
463
- }
464
- }
465
- },
466
- checkedAll () {
467
- this.isCheckedAll = !this.isCheckedAll
468
- if (this.isCheckedAll) {
469
- // 全选时
470
- this.fields = this.tieData.map(n => n.name)
471
- } else {
472
- this.fields = []
473
- }
474
- }
475
- },
476
- watch: {
477
- 'fields' (val) {
478
- this.f_fee = this.reportstr = this.sumMoney(this.tieData, val)
479
- },
480
- 'getOrg' (val) {
481
- console.log("org========> ", val )
482
- },
483
- 'feeStr' (val) {
484
- this.getBracketStr(val)
485
- if(!this.specialCircumstances) {
486
- this.fields = this.tieData.map(x => x.name)
487
- }
488
- },
489
- 'models.rows' (val) {
490
- if (val && val.length > 0) {
491
- this.startDate = val.map(x => x.f_end_date)[0].toString() // 获取 上次扎帐时间
492
- console.log('opopopopopo:', this.startDate)
493
- this.$dispatch('update', this.startDate)
494
- }
495
- }
496
- },
497
- computed: {
498
-
499
- }
500
- }
501
- </script>
502
-
503
- <style scoped>
504
-
505
- </style>
506
-
507
-
1
+ <template>
2
+ <button class="button_search button_spacing" @click="watchshowChange()">扎帐</button>
3
+ <button class="button_search button_spacing" @click="history()">历史记录</button>
4
+
5
+ <modal :show.sync="isHistory" v-ref:modal backdrop="false">
6
+ <header slot="modal-header" class="modal-header text-center">
7
+ <h4 class="modal-title"><span>历史记录</span><button style="margin-left: 90%;border-width: 0px;" @click="isHistory=!isHistory">×</button></h4>
8
+ </header>
9
+ <article slot="modal-body">
10
+ <data-grid :model="models" partial='list' class="basic-main list_area table_sy" v-ref:grid>
11
+ <template partial='head'>
12
+ <tr>
13
+ <th>
14
+ <nobr>报表名称</nobr>
15
+ </th>
16
+ <th>
17
+ <nobr>扎帐金额</nobr>
18
+ </th>
19
+ <th>
20
+ <nobr>系统金额</nobr>
21
+ </th>
22
+ <th>
23
+ <nobr>扎帐归属时间</nobr>
24
+ </th>
25
+ <th>
26
+ <nobr>操作时间</nobr>
27
+ </th>
28
+ <th>
29
+ <nobr>状态</nobr>
30
+ </th>
31
+ <th>
32
+ <nobr>操作员</nobr>
33
+ </th>
34
+ <th>
35
+ <nobr>备注</nobr>
36
+ </th>
37
+ <th>
38
+ <nobr>操作</nobr>
39
+ </th>
40
+ </tr>
41
+ </template>
42
+ <template partial='body'>
43
+ <td style="text-align: center;">
44
+ <nobr>{{row.f_report_name}}</nobr>
45
+ </td>
46
+ <td style="text-align: center;">
47
+ <nobr>{{row.f_fee}}</nobr>
48
+ </td>
49
+ <td style="text-align: center;">
50
+ <nobr>{{row.f_report_fee}}</nobr>
51
+ </td>
52
+ <td style="text-align: center;">
53
+ <nobr>{{row.f_end_date}}</nobr>
54
+ </td>
55
+ <td style="text-align: center;">
56
+ <nobr>{{row.f_operate_date}}</nobr>
57
+ </td>
58
+
59
+ <td style="text-align: center;">
60
+ <nobr>{{row.f_state}}</nobr>
61
+ </td>
62
+ <td style="text-align: center;">
63
+ <nobr>{{row.f_operator}}</nobr>
64
+ </td>
65
+ <td style="text-align: center;">
66
+ <nobr>{{row.f_remarks}}</nobr>
67
+ </td>
68
+ <td style="text-align: center;">
69
+ <button v-if="row.f_operate_state == 1" class="button_search button_spacing" @click="$parent.$parent.$parent.repeal(row)">撤销</button>
70
+ </td>
71
+ </template>
72
+ </data-grid>
73
+ </article>
74
+ <footer slot="modal-footer" class="modal-footer"></footer>
75
+ </modal>
76
+ <modal :show.sync="specialCircumstances && watchshow" v-ref:modal backdrop="false">
77
+ <header slot="modal-header" class="modal-header text-center">
78
+ <h4 class="modal-title">扎帐选择</h4>
79
+ <input type="checkbox" class="" id="f_generations" :checked="fields.length === tieData.length" @click='checkedAll()' >
80
+ <label for="f_generations" class="font-size">全选</label>
81
+ </header>
82
+ <article slot="modal-body">
83
+ <div class="auto col-sm-11 col-md-offset-1" style="margin-top: 10px;">
84
+ <div class="col-sm-3" v-for="(index, item) in tieData">
85
+ <input type='checkbox' :id="'water-owe-details-'+index" :checked="fields.indexOf(item.name)>=0" name='checkboxinput' class='input-checkbox' @click='checkedOne(item.name)'>
86
+ <label :for="'water-owe-details-'+index" class="font-size">{{item.name}}</label>
87
+ </div>
88
+ </div>
89
+ </article>
90
+ <footer slot="modal-footer" class="modal-footer">
91
+ <center>
92
+ <button type="button" class="btn btn-default" @click='watchshow = !watchshow'>取消</button>
93
+ <button type="button" class="btn btn-success" @click='watchshowChange(1)'>确认</button>
94
+ </center>
95
+ </footer>
96
+ </modal>
97
+
98
+ <modal :show.sync="isTieModal" v-ref:modal large backdrop="false">
99
+ <header slot="modal-header" class="modal-header">
100
+ <h3 style="color:black" class="modal-title">请确认扎帐金额</h3>
101
+ </header>
102
+ <article slot="modal-body" class="modal-body">
103
+ <validator name='v'>
104
+ <form class="form-horizontal select-overspread">
105
+ <div class="row">
106
+ <div v-for="(key, value) in org" v-if ="value.trim()!=''" class="col-sm-4 form-group">
107
+ <label class="font_normal_body">{{ key == 'f_orgname' ? '&emsp;&emsp;&emsp;&emsp;公司' : key == 'f_depname' ? '&emsp;&emsp;&emsp;&emsp;部门' : '&emsp;&emsp;&emsp;&emsp;人员' }}</label>
108
+ <input type="text" style="width:60%" class="input_search" :value="value"
109
+ disabled="disabled">
110
+ </div>
111
+ </div>
112
+ <div class="row">
113
+ <div class="col-sm-4 form-group" v-for="item in affirmDate">
114
+ <label class="font_normal_body">&emsp;&emsp;&emsp;&emsp;{{item.name}}</label>
115
+ <input type="text" style="width:60%" class="input_search" :value="item.val"
116
+ disabled="disabled">
117
+ </div>
118
+ <div class="col-sm-4 form-group" >
119
+ <label class="font_normal_body" for="startDate">上次扎帐日期</label>
120
+ <datepicker id="startDate" placeholder="上次扎帐日期" style="width: 60%"
121
+ v-model="startDate"
122
+ :value.sync="startDate"
123
+ :disabled-days-of-Week="[]"
124
+ :format="'yyyy-MM-dd HH:mm:ss'"
125
+ :disabled="true"
126
+ :show-reset-button="reset">
127
+ </datepicker>
128
+ </div>
129
+ <div class="col-sm-4 form-group" >
130
+ <label class="font_normal_body" for="endDate">本次扎帐日期</label>
131
+ <datepicker id="endDate" placeholder="本次扎帐日期" style="width: 60%"
132
+ v-model="endDate"
133
+ :value.sync="endDate"
134
+ :disabled-days-of-Week="[]"
135
+ :format="'yyyy-MM-dd HH:mm:ss'"
136
+ :disabled="true"
137
+ :show-reset-button="reset">
138
+ </datepicker>
139
+ </div>
140
+ </div>
141
+ <div class="row">
142
+ <div class="col-sm-4 form-group" >
143
+ <label class="font_normal_body">&emsp;系统总金额</label>
144
+ <input type="text" style="width:60%" class="input_search" v-model="reportstr"
145
+ disabled="disabled" placeholder="系统金额">
146
+ </div>
147
+ <div class="col-sm-4 form-group" >
148
+ <label class="font_normal_body">&emsp;扎帐总金额</label>
149
+ <input type="text" style="width:60%" class="input_search" v-model="f_fee"
150
+ placeholder="扎帐金额">
151
+ </div>
152
+ </div>
153
+ <div class="row">
154
+ <div class="col-sm-11 form-group">
155
+ <label class="font_normal_body"><nobr>&emsp;&emsp;&emsp;&emsp;备注</nobr></label>
156
+ <textarea style="resize:none;width:95%;" class="input_search"
157
+ v-model='f_remarks' ></textarea>
158
+ </div>
159
+ </div>
160
+ </form>
161
+ </validator>
162
+ </article>
163
+ <footer slot="modal-footer" class="modal-footer">
164
+ <button class="btn btn-success" @click="searchData">确认扎帐</button>
165
+ <button class="btn btn-default" @click="isTieModal = !isTieModal">取消</button>
166
+ </footer>
167
+ </modal>
168
+ </template>
169
+
170
+ <script>
171
+ import {DataModel, HttpResetClass, PagedList} from "vue-client"
172
+
173
+ let valdef = async function (self) {
174
+ // 读取扎帐配置
175
+ await self.$getConfig(self, 'TieConfig')
176
+ if (self.defaultfield) {
177
+ self.fields = [...self.defaultfield]
178
+ }
179
+ self.getStartDate ()
180
+ console.log('扎帐配置信息', self.config)
181
+ }
182
+ export default {
183
+ title: '扎帐组件',
184
+ props: {
185
+ model: {},
186
+ endDate: '',
187
+ // 扎帐金额
188
+ reportFee: {
189
+ default: ''
190
+ },
191
+ // 带有特殊标记的扎帐金额字符串
192
+ feeStr: {
193
+ default: '#()'
194
+ },
195
+ // 特殊情况
196
+ specialCircumstances: false,
197
+ // 筛选出标记的扎帐金额正则表达式 默认 #()
198
+ regex: {
199
+ default: /#(.+?)\)/g
200
+ },
201
+ // 报表所选 公司 部门 人员 {f_orgname,f_depname,f_operator}
202
+ org: {},
203
+ // 筛选出标记的扎帐金额所对应的列名正则表达式 默认 ^()
204
+ titRegex: {
205
+ default: /\^(.+?)\)/g
206
+ },
207
+ // 删掉掉标记的正则表达式
208
+ rep: {
209
+ default: /\[|\]|&|@|!|#|%|\{|\}|\(|\)|\$|\^/g
210
+ },
211
+
212
+ // 默认列
213
+ defaultfield: []
214
+ },
215
+ data () {
216
+ return {
217
+ config: {
218
+ // // 配置需要扎帐公司部门 如需全部扎帐 orgname: '*',
219
+ // isOrgname: true, // true表示不能跨公司
220
+ // isDepname: true, // true表示不能跨部门
221
+ // isUser: true, // true表示不能跨人员
222
+ // orgname: ['巩义市燃气有限公司'],
223
+ // depname: ['嵩山路营业厅', '人民路营业厅']
224
+ },
225
+ // 上次扎帐日期
226
+ startDate: '',
227
+ models: {rows:[]},
228
+ watchshow: false,
229
+ isTieModal: false,
230
+ f_orgid: this.$login.f.orgid,
231
+ f_orgname: this.$login.f.orgs,
232
+ f_depid: this.$login.f.depids,
233
+ f_depname: this.$login.f.deps,
234
+ f_operator_id: this.$login.f.id,
235
+ f_operator: this.$login.f.name,
236
+ f_remarks: '',
237
+ reportstr: '',
238
+ isHistory: false,
239
+ f_fee: '',
240
+ // 扎帐数据 [{name: xxx,val: xxx}]
241
+ tieData: [],
242
+ condition: '',
243
+ fields: [],
244
+ isCheckedAll: false,
245
+ affirmDate: []
246
+ }
247
+ },
248
+ ready () {
249
+ console.log('加载扎帐组件')
250
+ valdef(this)
251
+ },
252
+ methods: {
253
+ async getStartDate () {
254
+ // 获取上次扎帐日期
255
+ let condition = `f_report_path='${this.model.f_report_path}' and f_state = '有效'`
256
+ if (this.config.isOrgname) {
257
+ condition += ' and f_orgid = ' + this.f_orgid
258
+ }
259
+ if (this.config.isDepname) {
260
+ condition += ' and f_depid = ' + this.f_depid
261
+ }
262
+ if (this.config.isUser) {
263
+ condition += ' and f_operator_id = ' + this.f_operator_id
264
+ }
265
+ this.condition = condition
266
+ let querys= await this.$resetpost('rs/sql/PrickBillQuery?pageNo=1&pageSize=7',
267
+ {data:{condition:condition}},{resolveMsg:null,rejectMsg:'查询出错'})
268
+ this.models.rows = querys.data
269
+ if (querys.data.length === 0){
270
+ this.$dispatch('update', '')
271
+ }
272
+ },
273
+ history() {
274
+ this.isHistory = !this.isHistory
275
+ this.getStartDate()
276
+ },
277
+ repeal(val){
278
+ console.log('撤销信息', val)
279
+ let data = {
280
+ flag: 2,
281
+ f_orgid: this.$login.f.orgid,
282
+ f_orgname: this.$login.f.orgs,
283
+ f_depid: this.$login.f.depids,
284
+ f_depname: this.$login.f.deps,
285
+ f_operator_id: this.$login.f.id,
286
+ f_operator: this.$login.f.name,
287
+ data: {
288
+ id: val.id,
289
+ f_state: '无效'
290
+ }
291
+ }
292
+ if(this.$login.r.includes('扎帐撤销权限')) {
293
+ data.flag = 3
294
+ }
295
+ this.$resetpost('rs/logic/SaveTieAnAccount',
296
+ {data:data},
297
+ {resolveMsg:null,rejectMsg:null}).then(res =>{
298
+ switch (res.data) {
299
+ case 202 :
300
+ this.$showAlert('撤销成功', 'success', 3000)
301
+ this.getStartDate()
302
+ this.isHistory = !this.isHistory
303
+ break
304
+ case 201 : this.$showAlert('撤销失败,该条记录不是当天扎帐记录,不能撤销!', 'warning', 3000)
305
+ break
306
+ }
307
+ })
308
+ },
309
+ watchshowChange (val) {
310
+ if (val) {
311
+ if (!this.fields[0]) return
312
+ this.getStartDate()
313
+ this.isTieModal = true
314
+ this.watchshow = false
315
+ this.f_fee = this.reportstr = this.sumMoney(this.tieData, this.fields)
316
+ return
317
+ }
318
+ // 判断是否配置需扎帐的公司
319
+ if (JSON.stringify(this.config) === '{}') {
320
+ this.$showAlert(`未配置扎帐信息TieConfig.json 例:
321
+ {
322
+ isOrgname: true, // true表示不能跨公司
323
+ isDepname: true, // true表示不能跨部门
324
+ isUser: true, // true表示不能跨人员
325
+ orgname: ['公司名',...], // '*' 表示全部
326
+ depname: ['部门名',...] // '*' 表示全部
327
+ }`, 'warning', 4000)
328
+ return
329
+ }
330
+ // 判断报表是否有数据
331
+ if ((this.feeStr == null || this.feeStr === '#()') && this.reportFee === '') {
332
+ this.$showAlert('未查询数据', 'warning', 4000)
333
+ return
334
+ }
335
+ // 判断 是否是扎帐公司
336
+ if (this.config.orgname !== '*' && !this.config.orgname.includes(this.f_orgname)) {
337
+ this.$showAlert('禁止扎帐 账号所属分公司无需扎帐', 'warning', 4000)
338
+ return
339
+ }
340
+ // 判断 是否是扎帐部门
341
+ if (this.config.depname !== '*' && !this.config.depname.includes(this.f_depname)) {
342
+ this.$showAlert('禁止扎帐 账号所属部门无需扎帐', 'warning', 4000)
343
+ return
344
+ }
345
+ // 本公司只能扎本公司的
346
+ if (this.config.isOrgname && this.f_orgname !== this.org.f_orgname) {
347
+ console.log('本公司只能扎本公司的', this.config.isOrgname, this.f_orgname, this.org.f_orgname[0])
348
+ this.$showAlert('禁止跨分公司扎帐', 'warning', 4000)
349
+ return
350
+ }
351
+ // 本部门只能扎本部门的
352
+ if (this.config.isDepname && this.f_depname !== this.org.f_depname) {
353
+ console.log('本公司只能扎本部门的', this.config.isDepname, this.f_depname, this.org.f_depname[0])
354
+ this.$showAlert('禁止跨部门扎帐', 'warning', 4000)
355
+ return
356
+ }
357
+ // 本人只能扎本人的
358
+ if (this.config.isUser && this.f_operator !== this.org.f_operator) {
359
+ this.$showAlert('请选择人员 \"' + this.f_operator + '\"进行扎帐', 'warning', 4000)
360
+ return
361
+ }
362
+ this.$dispatch('special', this)
363
+
364
+ if (this.specialCircumstances) {
365
+ this.watchshow = true
366
+ } else {
367
+ this.isTieModal = true
368
+ }
369
+
370
+ },
371
+ getBracketStr (val) {
372
+ let item = []
373
+ if (this.reportFee != '') {
374
+ item.push({name: '总金额', val: this.reportFee})
375
+ return
376
+ }
377
+ if (val == null || val == '') {
378
+ item.push({name: '总金额', val: 0})
379
+ return
380
+ }
381
+ let regex = this.regex
382
+ let rep = this.rep
383
+ let moneys = val.toString().match(regex)
384
+ let titles = val.toString().match(this.titRegex)
385
+ if (titles && titles.length > 0) {
386
+ for (let i = 0; i < titles.length; i++) {
387
+ let name = titles[i].toString().replace(rep, '').trim()
388
+ let value = moneys[i].toString().replace(rep, '').trim()
389
+ item.push({name: name, val: value})
390
+ }
391
+ }
392
+ this.tieData = item
393
+ },
394
+ sumMoney (obj, conf) {
395
+ this.affirmDate = obj.filter(x => conf.includes(x.name))
396
+ let option = obj.filter(x => conf.includes(x.name)).map(x => parseFloat(x.val)).reduce((x, y) => x + y, 0)
397
+ return option.toFixed(2)
398
+ },
399
+
400
+ searchData () {
401
+ if (parseFloat(this.reportstr) != parseFloat(this.f_fee)) {
402
+ this.$showAlert('扎帐金额有误,无法保存', 'warning', 3000)
403
+ return
404
+ }
405
+ let condition = ''
406
+
407
+ for (let [key,val] of Object.entries(this.org)) {
408
+ condition += val + '.'
409
+ }
410
+ let info = {
411
+ saveData: [],
412
+ condition: this.condition,
413
+ flag: '1' // 1表示保存
414
+ }
415
+ for (let rs of this.affirmDate) {
416
+ let xx = {
417
+ f_report_name: this.model.f_report_name,
418
+ f_report_path: this.model.f_report_path,
419
+ f_report_type: this.model.f_report_type,
420
+ f_report_fee: rs.val,
421
+ f_fee: rs.val,
422
+ f_state: '有效',
423
+ f_end_date: this.endDate,
424
+ startDate: this.startDate,
425
+ f_orgid: this.f_orgid,
426
+ f_orgname: this.f_orgname,
427
+ f_depid: this.f_depid,
428
+ f_depname: this.f_depname,
429
+ f_operator_id: this.f_operator_id,
430
+ f_operator: this.f_operator,
431
+ f_remarks: this.f_remarks,
432
+ f_condition: condition + rs.name
433
+ }
434
+ info.saveData.push(xx)
435
+ }
436
+ let HttpReset = new HttpResetClass()
437
+ HttpReset.load('POST', 'rs/logic/SaveTieAnAccount', info,
438
+ {resolveMsg: null, rejectMsg: null}).then((res) => {
439
+ switch (res.data) {
440
+ case 200 :
441
+ this.$showAlert('保存成功', 'success', 3000)
442
+ this.getStartDate()
443
+ break
444
+ case 201 : this.$showAlert('重复扎帐', 'warning', 3000)
445
+ break
446
+ }
447
+ this.watchshow = false
448
+ this.isTieModal = false
449
+ })
450
+ },
451
+ checkedOne (name) {
452
+ let nameIndex = this.fields.indexOf(name)
453
+ if (nameIndex >= 0) {
454
+ // 如果已经包含, 则去除(单选按钮由选中变为非选中状态)
455
+ this.fields.splice(nameIndex, 1)
456
+ } else {
457
+ // 选中该checkbox
458
+ this.fields.push(name)
459
+ if (this.fields.length === this.tieData.length) {
460
+ this.isCheckedAll = true
461
+ } else {
462
+ this.isCheckedAll = false
463
+ }
464
+ }
465
+ },
466
+ checkedAll () {
467
+ this.isCheckedAll = !this.isCheckedAll
468
+ if (this.isCheckedAll) {
469
+ // 全选时
470
+ this.fields = this.tieData.map(n => n.name)
471
+ } else {
472
+ this.fields = []
473
+ }
474
+ }
475
+ },
476
+ watch: {
477
+ 'fields' (val) {
478
+ this.f_fee = this.reportstr = this.sumMoney(this.tieData, val)
479
+ },
480
+ 'getOrg' (val) {
481
+ console.log("org========> ", val )
482
+ },
483
+ 'feeStr' (val) {
484
+ this.getBracketStr(val)
485
+ if(!this.specialCircumstances) {
486
+ this.fields = this.tieData.map(x => x.name)
487
+ }
488
+ },
489
+ 'models.rows' (val) {
490
+ if (val && val.length > 0) {
491
+ this.startDate = val.map(x => x.f_end_date)[0].toString() // 获取 上次扎帐时间
492
+ console.log('opopopopopo:', this.startDate)
493
+ this.$dispatch('update', this.startDate)
494
+ }
495
+ }
496
+ },
497
+ computed: {
498
+
499
+ }
500
+ }
501
+ </script>
502
+
503
+ <style scoped>
504
+
505
+ </style>
506
+
507
+