manage-client 3.2.6 → 3.2.10

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 (70) hide show
  1. package/build/dev-server.js +5 -3
  2. package/package.json +2 -2
  3. package/src/components/BasisEcharts/BarChart.vue +247 -247
  4. package/src/components/SellReport/BonSummary.vue +178 -244
  5. package/src/components/SellReport/DepartmentPrick.vue +1 -1
  6. package/src/components/SellReport/GasBaozhuangFee.vue +237 -237
  7. package/src/components/SellReport/ManageBusSummary.vue +219 -242
  8. package/src/components/SellReport/ManageGasPrice.vue +176 -241
  9. package/src/components/SellReport/NonResidentGas.vue +203 -244
  10. package/src/components/SellReport/OutletTable.vue +258 -258
  11. package/src/components/SellReport/ReportComponrnt/TieAnAccount.vue +501 -499
  12. package/src/components/SellReport/SaleMonthReport.vue +153 -227
  13. package/src/components/SellReport/SellingTable.vue +220 -220
  14. package/src/components/SellReport/UserSellingGas.vue +177 -251
  15. package/src/components/TelReport/ZhiHuanservice.vue +162 -161
  16. package/src/components/daping/GMap.vue +636 -636
  17. package/src/components/sale/businessquery/AccountQuery/ExpectGasList.vue +504 -504
  18. package/src/components/sale/businessquery/AccountQuery/PreGasList.vue +371 -371
  19. package/src/components/sale/businessquery/AccountQuery/SellingGasList.vue +404 -404
  20. package/src/components/sale/businessquery/FMYGasQuery.vue +713 -713
  21. package/src/components/sale/businessquery/MonthGasQuery.vue +467 -467
  22. package/src/components/sale/businessquery/OtherChargeQuery.vue +619 -619
  23. package/src/components/sale/businessquery/ProceedsOper.vue +417 -417
  24. package/src/components/sale/businessquery/YingShouMingXi.vue +525 -525
  25. package/src/components/sale/config/exportConfig.js +885 -885
  26. package/src/components/statistical/StatisticalAnalysis.vue +252 -247
  27. package/src/components/webmeter/DrillData/LostContactAnalysisList.vue +633 -633
  28. package/src/components/webmeter/DrillData/LostContactEcharts.vue +177 -177
  29. package/src/components/webmeter/DrillData/UserGasAll.vue +596 -596
  30. package/src/components/webmeter/DrillData/UserGasEform.vue +227 -227
  31. package/src/components/webmeter/DrillData/UserLostContactAnalysis.vue +585 -585
  32. package/src/components/webmeter/instruction/NewQueryInstruct.vue +443 -443
  33. package/src/components/webmeter/newwebmeter/NewException/TotalExceptionByMeter.vue +607 -607
  34. package/src/components/webmeter/newwebmeter/UserGasEchartsList.vue +284 -283
  35. package/src/components/webmeter/newwebmeter/UserGasList.vue +438 -438
  36. package/src/components/webmeter/newwebmeter/UserInstructEchartsList.vue +242 -242
  37. package/src/components/webmeter/newwebmeter/signAnalysisEcharts.vue +266 -266
  38. package/src/components/webmeter/newwebmeter/signAnalysisEform.vue +175 -175
  39. package/src/components/webmeter/newwebmeter/signAnalysisListMain.vue +387 -387
  40. package/src/components/webmeter/report/ReportList.vue +422 -422
  41. package/src/filiale/WEINAN/EchartsBox.vue +110 -110
  42. package/src/filiale/WEINAN/SiteManager.vue +191 -191
  43. package/src/filiale/WEINAN/UserGasList.vue +438 -0
  44. package/src/filiale/WEINAN/reportManage.js +12 -12
  45. package/src/filiale/WEINAN/sale.js +32 -29
  46. package/src/filiale/alashan/reportManage.js +10 -10
  47. package/src/filiale/jingzhou/ChargeQuery.vue +1243 -1243
  48. package/src/filiale/jingzhou/config/exportConfig.js +861 -861
  49. package/src/filiale/meihekou/UserGasEform.vue +267 -267
  50. package/src/filiale/meihekou/sale.js +26 -26
  51. package/src/filiale/rongchuang/SellingTable.vue +250 -250
  52. package/src/filiale/rongchuang/reportManage.js +11 -11
  53. package/src/filiale/shaoguan/RecordInfoQuery.vue +1108 -1108
  54. package/src/filiale/shaoguan/sale/businessquery/oldMeterList.vue +5 -0
  55. package/src/filiale/tongchuan/CriteriaPaged.vue +49 -0
  56. package/src/filiale/tongchuan/sale.js +16 -16
  57. package/src/filiale/wuhai/ChargeQuery.vue +1247 -0
  58. package/src/filiale/wuhai/sale.js +10 -0
  59. package/src/main.js +1 -1
  60. package/static/wuhai.json +1610 -1610
  61. package/.gradle/7.1/dependencies-accessors/dependencies-accessors.lock +0 -0
  62. package/.gradle/7.1/dependencies-accessors/gc.properties +0 -0
  63. package/.gradle/7.1/executionHistory/executionHistory.bin +0 -0
  64. package/.gradle/7.1/executionHistory/executionHistory.lock +0 -0
  65. package/.gradle/7.1/fileChanges/last-build.bin +0 -0
  66. package/.gradle/7.1/fileHashes/fileHashes.bin +0 -0
  67. package/.gradle/7.1/fileHashes/fileHashes.lock +0 -0
  68. package/.gradle/7.1/gc.properties +0 -0
  69. package/.gradle/buildOutputCleanup/outputFiles.bin +0 -0
  70. package/.gradle/configuration-cache/gc.properties +0 -0
@@ -1,499 +1,501 @@
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-6 form-group">
107
- <label class="font_normal_body">{{ key == 'f_orgname' ? '公司' : key == 'f_depname' ? '部门' : '人员' }}</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="col-sm-6 font_normal_body">{{item.name}}</label>
115
- <input type="text" style="width:60%" class="input_search" :value="item.val"
116
- disabled="disabled">
117
- </div>
118
- </div>
119
- <div class="row">
120
- <div class="col-sm-4 form-group" >
121
- <label class="col-sm-6 font_normal_body" for="startDate">上次扎帐日期</label>
122
- <datepicker id="startDate" placeholder="上次扎帐日期" style="width: 60%"
123
- v-model="startDate"
124
- :value.sync="startDate"
125
- :disabled-days-of-Week="[]"
126
- :format="'yyyy-MM-dd'"
127
- :disabled="true"
128
- :show-reset-button="reset">
129
- </datepicker>
130
- </div>
131
- </div>
132
- <div class="row" >
133
- <div class="col-sm-4 form-group" >
134
- <label class="col-sm-6 font_normal_body" for="endDate">本次扎帐日期</label>
135
- <datepicker id="endDate" placeholder="本次扎帐日期" style="width: 60%"
136
- v-model="endDate"
137
- :value.sync="endDate.substring(0,10)"
138
- :disabled-days-of-Week="[]"
139
- :format="'yyyy-MM-dd'"
140
- :disabled="true"
141
- :show-reset-button="reset">
142
- </datepicker>
143
- </div>
144
- </div>
145
- <div class="row">
146
- <div class="col-sm-4 form-group" >
147
- <label class="col-sm-6 font_normal_body">&emsp;系统总金额</label>
148
- <input type="text" style="width:60%" class="input_search" v-model="reportstr"
149
- disabled="disabled" placeholder="系统金额">
150
- </div>
151
- </div>
152
- <div class="row">
153
- <div class="col-sm-4 form-group" >
154
- <label class="col-sm-6 font_normal_body">&emsp;扎帐总金额</label>
155
- <input type="text" style="width:60%" class="input_search" v-model="f_fee"
156
- placeholder="扎帐金额">
157
- </div>
158
- </div><br>
159
- <div class="row">
160
- <div class="col-sm-11 form-group">
161
- <label class="col-sm-2 font_normal_body"><nobr>&emsp;&emsp;&emsp;&emsp;备注</nobr></label>
162
- <textarea style="resize:none;width:60%;height: 70px;" class="input_search"
163
- v-model='f_remarks' ></textarea>
164
- </div>
165
- </div>
166
-
167
- </form>
168
- </validator>
169
- </article>
170
- <footer slot="modal-footer" class="modal-footer">
171
- <button class="btn btn-success" @click="searchData">确认扎帐</button>
172
- <button class="btn btn-default" @click="isTieModal = !isTieModal">取消</button>
173
- </footer>
174
- </modal>
175
- </template>
176
-
177
- <script>
178
- import {DataModel, HttpResetClass, PagedList} from "vue-client"
179
-
180
- let valdef = async function (self) {
181
- // 读取扎帐配置
182
- await self.$getConfig(self, 'TieConfig')
183
- if (self.defaultfield) {
184
- self.fields = [...self.defaultfield]
185
- }
186
- self.getStartDate ()
187
- console.log('扎帐配置信息', self.config)
188
- }
189
- export default {
190
- title: '扎帐组件',
191
- props: {
192
- model: {},
193
- endDate: '',
194
- // 扎帐金额
195
- reportFee: {
196
- default: ''
197
- },
198
- // 带有特殊标记的扎帐金额字符串
199
- feeStr: {
200
- default: '#()'
201
- },
202
- // 特殊情况
203
- specialCircumstances: false,
204
- // 筛选出标记的扎帐金额正则表达式 默认 #()
205
- regex: {
206
- default: /#(.+?)\)/g
207
- },
208
- // 报表所选 公司 部门 人员 {f_orgname,f_depname,f_operator}
209
- org: {},
210
- // 筛选出标记的扎帐金额所对应的列名正则表达式 默认 ^()
211
- titRegex: {
212
- default: /\^(.+?)\)/g
213
- },
214
- // 删掉掉标记的正则表达式
215
- rep: {
216
- default: /\[|\]|&|@|!|#|%|\{|\}|\(|\)|\$|\^/g
217
- },
218
-
219
- // 默认列
220
- defaultfield: []
221
- },
222
- data () {
223
- return {
224
- config: {
225
- // // 配置需要扎帐公司部门 如需全部扎帐 orgname: '*',
226
- // isOrgname: true, // true表示不能跨公司
227
- // isDepname: true, // true表示不能跨部门
228
- // isUser: true, // true表示不能跨人员
229
- // orgname: ['巩义市燃气有限公司'],
230
- // depname: ['嵩山路营业厅', '人民路营业厅']
231
- },
232
- // 上次扎帐日期
233
- startDate: '',
234
- models: {rows:[]},
235
- watchshow: false,
236
- isTieModal: false,
237
- f_orgid: this.$login.f.orgid,
238
- f_orgname: this.$login.f.orgs,
239
- f_depid: this.$login.f.depids,
240
- f_depname: this.$login.f.deps,
241
- f_operatorid: this.$login.f.id,
242
- f_operator: this.$login.f.name,
243
- f_remarks: '',
244
- reportstr: '',
245
- isHistory: false,
246
- f_fee: '',
247
- // 扎帐数据 [{name: xxx,val: xxx}]
248
- tieData: [],
249
- condition: '',
250
- fields: [],
251
- isCheckedAll: false,
252
- affirmDate: []
253
- }
254
- },
255
- ready () {
256
- console.log('加载扎帐组件')
257
- valdef(this)
258
- },
259
- methods: {
260
- async getStartDate () {
261
- // 获取上次扎帐日期
262
- console.log(typeof this.f_orgid, this.f_orgid)
263
- console.log(typeof this.f_depid, this.f_depid)
264
- let condition = `f_report_path='${this.model.f_report_path}' and f_state = '有效'`
265
- if (this.config.isOrgname) {
266
- condition += ' and f_orgid = ' + this.f_orgid
267
- }
268
- if (this.config.isDepname) {
269
- condition += ' and f_depid = ' + this.f_depid
270
- }
271
- if (this.config.isUser) {
272
- condition += ' and f_operatorid = ' + this.f_operatorid
273
- }
274
- this.condition = condition
275
- let querys= await this.$resetpost('rs/sql/PrickBillQuery?pageNo=1&pageSize=7',
276
- {data:{condition:condition}},{resolveMsg:null,rejectMsg:'查询出错'})
277
- this.models.rows = querys.data
278
- },
279
- history() {
280
- this.isHistory = !this.isHistory
281
- this.getStartDate()
282
- },
283
- repeal(val){
284
- console.log('撤销信息', val)
285
- let data = {
286
- flag: 2,
287
- data: {
288
- id: val.id,
289
- f_state: '无效'
290
- }
291
- }
292
- this.$resetpost('rs/logic/SaveTieAnAccount',
293
- {data:data},
294
- {resolveMsg:null,rejectMsg:null}).then(res =>{
295
- switch (res.data) {
296
- case 200 : this.$showAlert('撤销成功', 'success', 3000)
297
- this.isHistory = !this.isHistory
298
- break
299
- case 201 : this.$showAlert('撤销失败', 'warning', 3000)
300
- break
301
- }
302
- })
303
- },
304
- watchshowChange (val) {
305
- if (val) {
306
- if (!this.fields[0]) return
307
- this.getStartDate()
308
- this.isTieModal = true
309
- this.watchshow = false
310
- this.f_fee = this.reportstr = this.sumMoney(this.tieData, this.fields)
311
- return
312
- }
313
- // 判断是否配置需扎帐的公司
314
- if (JSON.stringify(this.config) === '{}') {
315
- this.$showAlert(`未配置扎帐信息TieConfig.json 例:
316
- {
317
- isOrgname: true, // true表示不能跨公司
318
- isDepname: true, // true表示不能跨部门
319
- isUser: true, // true表示不能跨人员
320
- orgname: ['公司名',...], // '*' 表示全部
321
- depname: ['部门名',...] // '*' 表示全部
322
- }`, 'warning', 4000)
323
- return
324
- }
325
- // 判断报表是否有数据
326
- if ((this.feeStr == null || this.feeStr === '#()') && this.reportFee === '') {
327
- this.$showAlert('未查询数据', 'warning', 4000)
328
- return
329
- }
330
- // 判断 是否是扎帐公司
331
- if (this.config.orgname !== '*' && !this.config.orgname.includes(this.f_orgname)) {
332
- this.$showAlert('禁止扎帐 账号所属分公司无需扎帐', 'warning', 4000)
333
- return
334
- }
335
- // 判断 是否是扎帐部门
336
- if (this.config.depname !== '*' && !this.config.depname.includes(this.f_depname)) {
337
- this.$showAlert('禁止扎帐 账号所属部门无需扎帐', 'warning', 4000)
338
- return
339
- }
340
- // 本公司只能扎本公司的
341
- if (this.config.isOrgname && this.f_orgname !== this.org.f_orgname) {
342
- console.log('本公司只能扎本公司的', this.config.isOrgname, this.f_orgname, this.org.f_orgname[0])
343
- this.$showAlert('禁止跨分公司扎帐', 'warning', 4000)
344
- return
345
- }
346
- // 本部门只能扎本部门的
347
- if (this.config.isDepname && this.f_depname !== this.org.f_depname) {
348
- this.$showAlert('禁止跨部门扎帐', 'warning', 4000)
349
- return
350
- }
351
- // 本人只能扎本人的
352
- if (this.config.isUser && this.f_operator !== this.org.f_operator) {
353
- this.$showAlert('请选择人员 \"' + this.f_operator + '\"进行扎帐', 'warning', 4000)
354
- return
355
- }
356
- this.$dispatch('special', this)
357
-
358
- if (this.specialCircumstances) {
359
- this.watchshow = true
360
- } else {
361
- this.isTieModal = true
362
- }
363
-
364
- },
365
- getBracketStr (val) {
366
- let item = []
367
- if (this.reportFee != '') {
368
- item.push({name: '总金额', val: this.reportFee})
369
- return
370
- }
371
- if (val == null || val == '') {
372
- item.push({name: '总金额', val: 0})
373
- return
374
- }
375
- let regex = this.regex
376
- let rep = this.rep
377
- let moneys = val.toString().match(regex)
378
- let titles = val.toString().match(this.titRegex)
379
- console.log('---titles---|||||||', titles)
380
- if (titles && titles.length > 0) {
381
- for (let i = 0; i < titles.length; i++) {
382
- let name = titles[i].toString().replace(rep, '').trim()
383
- let value = moneys[i].toString().replace(rep, '').trim()
384
- item.push({name: name, val: value})
385
- }
386
- console.log('=======itme==========>>>>>>>', item)
387
- }
388
- this.tieData = item
389
- },
390
- sumMoney (obj, conf) {
391
- this.affirmDate = obj.filter(x => conf.includes(x.name))
392
- let option = obj.filter(x => conf.includes(x.name)).map(x => parseFloat(x.val)).reduce((x, y) => x + y, 0)
393
- console.log('>>>>', option)
394
- return option.toFixed(2)
395
- },
396
-
397
- searchData () {
398
- if (parseFloat(this.reportstr) != parseFloat(this.f_fee)) {
399
- this.$showAlert('扎帐金额有误,无法保存', 'warning', 3000)
400
- return
401
- }
402
- let condition = ''
403
-
404
- for (let [key,val] of Object.entries(this.org)) {
405
- condition += val + '.'
406
- }
407
- let info = {
408
- saveData: [],
409
- condition: this.condition,
410
- flag: '1' // 1表示保存
411
- }
412
- for (let rs of this.affirmDate) {
413
- let xx = {
414
- f_report_name: this.model.f_report_name,
415
- f_report_path: this.model.f_report_path,
416
- f_report_type: this.model.f_report_type,
417
- f_report_fee: rs.val,
418
- f_fee: rs.val,
419
- f_state: '有效',
420
- f_end_date: this.endDate,
421
- startDate: this.startDate,
422
- f_orgid: this.f_orgid,
423
- f_orgname: this.f_orgname,
424
- f_depid: this.f_depid,
425
- f_depname: this.f_depname,
426
- f_operatorid: this.f_operatorid,
427
- f_operator: this.f_operator,
428
- f_remarks: this.f_remarks,
429
- f_condition: condition + rs.name
430
- }
431
- info.saveData.push(xx)
432
- }
433
- console.log('xxzz', info)
434
- let HttpReset = new HttpResetClass()
435
- HttpReset.load('POST', 'rs/logic/SaveTieAnAccount', info,
436
- {resolveMsg: null, rejectMsg: null}).then((res) => {
437
- switch (res.data) {
438
- case 200 : this.$showAlert('保存成功', 'success', 3000)
439
- break
440
- case 201 : this.$showAlert('重复扎帐', 'warning', 3000)
441
- break
442
- }
443
- this.watchshow = false
444
- this.isTieModal = false
445
- })
446
- },
447
- checkedOne (name) {
448
- let nameIndex = this.fields.indexOf(name)
449
- if (nameIndex >= 0) {
450
- // 如果已经包含, 则去除(单选按钮由选中变为非选中状态)
451
- this.fields.splice(nameIndex, 1)
452
- } else {
453
- // 选中该checkbox
454
- this.fields.push(name)
455
- if (this.fields.length === this.tieData.length) {
456
- this.isCheckedAll = true
457
- } else {
458
- this.isCheckedAll = false
459
- }
460
- }
461
- },
462
- checkedAll () {
463
- this.isCheckedAll = !this.isCheckedAll
464
- if (this.isCheckedAll) {
465
- // 全选时
466
- this.fields = this.tieData.map(n => n.name)
467
- } else {
468
- this.fields = []
469
- }
470
- }
471
- },
472
- watch: {
473
- 'fields' (val) {
474
- this.f_fee = this.reportstr = this.sumMoney(this.tieData, val)
475
- },
476
- 'getOrg' (val) {
477
- console.log("org========> ", val )
478
- },
479
- 'feeStr' (val) {
480
- this.getBracketStr(val)
481
- if(!this.specialCircumstances) {
482
- this.fields = this.tieData.map(x => x.name)
483
- }
484
- },
485
- 'models.rows' (val) {
486
- this.startDate = val.map(x => x.f_end_date.substring(0,10))[0].toString() // 获取 上次扎帐时间
487
- }
488
- },
489
- computed: {
490
-
491
- }
492
- }
493
- </script>
494
-
495
- <style scoped>
496
-
497
- </style>
498
-
499
-
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-6 form-group">
107
+ <label class="font_normal_body">{{ key == 'f_orgname' ? '公司' : key == 'f_depname' ? '部门' : '人员' }}</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="col-sm-6 font_normal_body">{{item.name}}</label>
115
+ <input type="text" style="width:60%" class="input_search" :value="item.val"
116
+ disabled="disabled">
117
+ </div>
118
+ </div>
119
+ <div class="row">
120
+ <div class="col-sm-4 form-group" >
121
+ <label class="col-sm-6 font_normal_body" for="startDate">上次扎帐日期</label>
122
+ <datepicker id="startDate" placeholder="上次扎帐日期" style="width: 60%"
123
+ v-model="startDate"
124
+ :value.sync="startDate"
125
+ :disabled-days-of-Week="[]"
126
+ :format="'yyyy-MM-dd'"
127
+ :disabled="true"
128
+ :show-reset-button="reset">
129
+ </datepicker>
130
+ </div>
131
+ </div>
132
+ <div class="row" >
133
+ <div class="col-sm-4 form-group" >
134
+ <label class="col-sm-6 font_normal_body" for="endDate">本次扎帐日期</label>
135
+ <datepicker id="endDate" placeholder="本次扎帐日期" style="width: 60%"
136
+ v-model="endDate"
137
+ :value.sync="endDate.substring(0,10)"
138
+ :disabled-days-of-Week="[]"
139
+ :format="'yyyy-MM-dd'"
140
+ :disabled="true"
141
+ :show-reset-button="reset">
142
+ </datepicker>
143
+ </div>
144
+ </div>
145
+ <div class="row">
146
+ <div class="col-sm-4 form-group" >
147
+ <label class="col-sm-6 font_normal_body">&emsp;系统总金额</label>
148
+ <input type="text" style="width:60%" class="input_search" v-model="reportstr"
149
+ disabled="disabled" placeholder="系统金额">
150
+ </div>
151
+ </div>
152
+ <div class="row">
153
+ <div class="col-sm-4 form-group" >
154
+ <label class="col-sm-6 font_normal_body">&emsp;扎帐总金额</label>
155
+ <input type="text" style="width:60%" class="input_search" v-model="f_fee"
156
+ placeholder="扎帐金额">
157
+ </div>
158
+ </div><br>
159
+ <div class="row">
160
+ <div class="col-sm-11 form-group">
161
+ <label class="col-sm-2 font_normal_body"><nobr>&emsp;&emsp;&emsp;&emsp;备注</nobr></label>
162
+ <textarea style="resize:none;width:60%;height: 70px;" class="input_search"
163
+ v-model='f_remarks' ></textarea>
164
+ </div>
165
+ </div>
166
+
167
+ </form>
168
+ </validator>
169
+ </article>
170
+ <footer slot="modal-footer" class="modal-footer">
171
+ <button class="btn btn-success" @click="searchData">确认扎帐</button>
172
+ <button class="btn btn-default" @click="isTieModal = !isTieModal">取消</button>
173
+ </footer>
174
+ </modal>
175
+ </template>
176
+
177
+ <script>
178
+ import {DataModel, HttpResetClass, PagedList} from "vue-client"
179
+
180
+ let valdef = async function (self) {
181
+ // 读取扎帐配置
182
+ await self.$getConfig(self, 'TieConfig')
183
+ if (self.defaultfield) {
184
+ self.fields = [...self.defaultfield]
185
+ }
186
+ self.getStartDate ()
187
+ console.log('扎帐配置信息', self.config)
188
+ }
189
+ export default {
190
+ title: '扎帐组件',
191
+ props: {
192
+ model: {},
193
+ endDate: '',
194
+ // 扎帐金额
195
+ reportFee: {
196
+ default: ''
197
+ },
198
+ // 带有特殊标记的扎帐金额字符串
199
+ feeStr: {
200
+ default: '#()'
201
+ },
202
+ // 特殊情况
203
+ specialCircumstances: false,
204
+ // 筛选出标记的扎帐金额正则表达式 默认 #()
205
+ regex: {
206
+ default: /#(.+?)\)/g
207
+ },
208
+ // 报表所选 公司 部门 人员 {f_orgname,f_depname,f_operator}
209
+ org: {},
210
+ // 筛选出标记的扎帐金额所对应的列名正则表达式 默认 ^()
211
+ titRegex: {
212
+ default: /\^(.+?)\)/g
213
+ },
214
+ // 删掉掉标记的正则表达式
215
+ rep: {
216
+ default: /\[|\]|&|@|!|#|%|\{|\}|\(|\)|\$|\^/g
217
+ },
218
+
219
+ // 默认列
220
+ defaultfield: []
221
+ },
222
+ data () {
223
+ return {
224
+ config: {
225
+ // // 配置需要扎帐公司部门 如需全部扎帐 orgname: '*',
226
+ // isOrgname: true, // true表示不能跨公司
227
+ // isDepname: true, // true表示不能跨部门
228
+ // isUser: true, // true表示不能跨人员
229
+ // orgname: ['巩义市燃气有限公司'],
230
+ // depname: ['嵩山路营业厅', '人民路营业厅']
231
+ },
232
+ // 上次扎帐日期
233
+ startDate: '',
234
+ models: {rows:[]},
235
+ watchshow: false,
236
+ isTieModal: false,
237
+ f_orgid: this.$login.f.orgid,
238
+ f_orgname: this.$login.f.orgs,
239
+ f_depid: this.$login.f.depids,
240
+ f_depname: this.$login.f.deps,
241
+ f_operatorid: this.$login.f.id,
242
+ f_operator: this.$login.f.name,
243
+ f_remarks: '',
244
+ reportstr: '',
245
+ isHistory: false,
246
+ f_fee: '',
247
+ // 扎帐数据 [{name: xxx,val: xxx}]
248
+ tieData: [],
249
+ condition: '',
250
+ fields: [],
251
+ isCheckedAll: false,
252
+ affirmDate: []
253
+ }
254
+ },
255
+ ready () {
256
+ console.log('加载扎帐组件')
257
+ valdef(this)
258
+ },
259
+ methods: {
260
+ async getStartDate () {
261
+ // 获取上次扎帐日期
262
+ console.log(typeof this.f_orgid, this.f_orgid)
263
+ console.log(typeof this.f_depid, this.f_depid)
264
+ let condition = `f_report_path='${this.model.f_report_path}' and f_state = '有效'`
265
+ if (this.config.isOrgname) {
266
+ condition += ' and f_orgid = ' + this.f_orgid
267
+ }
268
+ if (this.config.isDepname) {
269
+ condition += ' and f_depid = ' + this.f_depid
270
+ }
271
+ if (this.config.isUser) {
272
+ condition += ' and f_operatorid = ' + this.f_operatorid
273
+ }
274
+ this.condition = condition
275
+ let querys= await this.$resetpost('rs/sql/PrickBillQuery?pageNo=1&pageSize=7',
276
+ {data:{condition:condition}},{resolveMsg:null,rejectMsg:'查询出错'})
277
+ this.models.rows = querys.data
278
+ },
279
+ history() {
280
+ this.isHistory = !this.isHistory
281
+ this.getStartDate()
282
+ },
283
+ repeal(val){
284
+ console.log('撤销信息', val)
285
+ let data = {
286
+ flag: 2,
287
+ data: {
288
+ id: val.id,
289
+ f_state: '无效'
290
+ }
291
+ }
292
+ this.$resetpost('rs/logic/SaveTieAnAccount',
293
+ {data:data},
294
+ {resolveMsg:null,rejectMsg:null}).then(res =>{
295
+ switch (res.data) {
296
+ case 200 : this.$showAlert('撤销成功', 'success', 3000)
297
+ this.isHistory = !this.isHistory
298
+ break
299
+ case 201 : this.$showAlert('撤销失败', 'warning', 3000)
300
+ break
301
+ }
302
+ })
303
+ },
304
+ watchshowChange (val) {
305
+ if (val) {
306
+ if (!this.fields[0]) return
307
+ this.getStartDate()
308
+ this.isTieModal = true
309
+ this.watchshow = false
310
+ this.f_fee = this.reportstr = this.sumMoney(this.tieData, this.fields)
311
+ return
312
+ }
313
+ // 判断是否配置需扎帐的公司
314
+ if (JSON.stringify(this.config) === '{}') {
315
+ this.$showAlert(`未配置扎帐信息TieConfig.json 例:
316
+ {
317
+ isOrgname: true, // true表示不能跨公司
318
+ isDepname: true, // true表示不能跨部门
319
+ isUser: true, // true表示不能跨人员
320
+ orgname: ['公司名',...], // '*' 表示全部
321
+ depname: ['部门名',...] // '*' 表示全部
322
+ }`, 'warning', 4000)
323
+ return
324
+ }
325
+ // 判断报表是否有数据
326
+ if ((this.feeStr == null || this.feeStr === '#()') && this.reportFee === '') {
327
+ this.$showAlert('未查询数据', 'warning', 4000)
328
+ return
329
+ }
330
+ // 判断 是否是扎帐公司
331
+ if (this.config.orgname !== '*' && !this.config.orgname.includes(this.f_orgname)) {
332
+ this.$showAlert('禁止扎帐 账号所属分公司无需扎帐', 'warning', 4000)
333
+ return
334
+ }
335
+ // 判断 是否是扎帐部门
336
+ if (this.config.depname !== '*' && !this.config.depname.includes(this.f_depname)) {
337
+ this.$showAlert('禁止扎帐 账号所属部门无需扎帐', 'warning', 4000)
338
+ return
339
+ }
340
+ // 本公司只能扎本公司的
341
+ if (this.config.isOrgname && this.f_orgname !== this.org.f_orgname) {
342
+ console.log('本公司只能扎本公司的', this.config.isOrgname, this.f_orgname, this.org.f_orgname[0])
343
+ this.$showAlert('禁止跨分公司扎帐', 'warning', 4000)
344
+ return
345
+ }
346
+ // 本部门只能扎本部门的
347
+ if (this.config.isDepname && this.f_depname !== this.org.f_depname) {
348
+ this.$showAlert('禁止跨部门扎帐', 'warning', 4000)
349
+ return
350
+ }
351
+ // 本人只能扎本人的
352
+ if (this.config.isUser && this.f_operator !== this.org.f_operator) {
353
+ this.$showAlert('请选择人员 \"' + this.f_operator + '\"进行扎帐', 'warning', 4000)
354
+ return
355
+ }
356
+ this.$dispatch('special', this)
357
+
358
+ if (this.specialCircumstances) {
359
+ this.watchshow = true
360
+ } else {
361
+ this.isTieModal = true
362
+ }
363
+
364
+ },
365
+ getBracketStr (val) {
366
+ let item = []
367
+ if (this.reportFee != '') {
368
+ item.push({name: '总金额', val: this.reportFee})
369
+ return
370
+ }
371
+ if (val == null || val == '') {
372
+ item.push({name: '总金额', val: 0})
373
+ return
374
+ }
375
+ let regex = this.regex
376
+ let rep = this.rep
377
+ let moneys = val.toString().match(regex)
378
+ let titles = val.toString().match(this.titRegex)
379
+ console.log('---titles---|||||||', titles)
380
+ if (titles && titles.length > 0) {
381
+ for (let i = 0; i < titles.length; i++) {
382
+ let name = titles[i].toString().replace(rep, '').trim()
383
+ let value = moneys[i].toString().replace(rep, '').trim()
384
+ item.push({name: name, val: value})
385
+ }
386
+ console.log('=======itme==========>>>>>>>', item)
387
+ }
388
+ this.tieData = item
389
+ },
390
+ sumMoney (obj, conf) {
391
+ this.affirmDate = obj.filter(x => conf.includes(x.name))
392
+ let option = obj.filter(x => conf.includes(x.name)).map(x => parseFloat(x.val)).reduce((x, y) => x + y, 0)
393
+ console.log('>>>>', option)
394
+ return option.toFixed(2)
395
+ },
396
+
397
+ searchData () {
398
+ if (parseFloat(this.reportstr) != parseFloat(this.f_fee)) {
399
+ this.$showAlert('扎帐金额有误,无法保存', 'warning', 3000)
400
+ return
401
+ }
402
+ let condition = ''
403
+
404
+ for (let [key,val] of Object.entries(this.org)) {
405
+ condition += val + '.'
406
+ }
407
+ let info = {
408
+ saveData: [],
409
+ condition: this.condition,
410
+ flag: '1' // 1表示保存
411
+ }
412
+ for (let rs of this.affirmDate) {
413
+ let xx = {
414
+ f_report_name: this.model.f_report_name,
415
+ f_report_path: this.model.f_report_path,
416
+ f_report_type: this.model.f_report_type,
417
+ f_report_fee: rs.val,
418
+ f_fee: rs.val,
419
+ f_state: '有效',
420
+ f_end_date: this.endDate,
421
+ startDate: this.startDate,
422
+ f_orgid: this.f_orgid,
423
+ f_orgname: this.f_orgname,
424
+ f_depid: this.f_depid,
425
+ f_depname: this.f_depname,
426
+ f_operatorid: this.f_operatorid,
427
+ f_operator: this.f_operator,
428
+ f_remarks: this.f_remarks,
429
+ f_condition: condition + rs.name
430
+ }
431
+ info.saveData.push(xx)
432
+ }
433
+ console.log('xxzz', info)
434
+ let HttpReset = new HttpResetClass()
435
+ HttpReset.load('POST', 'rs/logic/SaveTieAnAccount', info,
436
+ {resolveMsg: null, rejectMsg: null}).then((res) => {
437
+ switch (res.data) {
438
+ case 200 : this.$showAlert('保存成功', 'success', 3000)
439
+ break
440
+ case 201 : this.$showAlert('重复扎帐', 'warning', 3000)
441
+ break
442
+ }
443
+ this.watchshow = false
444
+ this.isTieModal = false
445
+ })
446
+ },
447
+ checkedOne (name) {
448
+ let nameIndex = this.fields.indexOf(name)
449
+ if (nameIndex >= 0) {
450
+ // 如果已经包含, 则去除(单选按钮由选中变为非选中状态)
451
+ this.fields.splice(nameIndex, 1)
452
+ } else {
453
+ // 选中该checkbox
454
+ this.fields.push(name)
455
+ if (this.fields.length === this.tieData.length) {
456
+ this.isCheckedAll = true
457
+ } else {
458
+ this.isCheckedAll = false
459
+ }
460
+ }
461
+ },
462
+ checkedAll () {
463
+ this.isCheckedAll = !this.isCheckedAll
464
+ if (this.isCheckedAll) {
465
+ // 全选时
466
+ this.fields = this.tieData.map(n => n.name)
467
+ } else {
468
+ this.fields = []
469
+ }
470
+ }
471
+ },
472
+ watch: {
473
+ 'fields' (val) {
474
+ this.f_fee = this.reportstr = this.sumMoney(this.tieData, val)
475
+ },
476
+ 'getOrg' (val) {
477
+ console.log("org========> ", val )
478
+ },
479
+ 'feeStr' (val) {
480
+ this.getBracketStr(val)
481
+ if(!this.specialCircumstances) {
482
+ this.fields = this.tieData.map(x => x.name)
483
+ }
484
+ },
485
+ 'models.rows' (val) {
486
+ if (val && val.length > 0) {
487
+ this.startDate = val.map(x => x.f_end_date.substring(0,10))[0].toString() // 获取 上次扎帐时间
488
+ }
489
+ }
490
+ },
491
+ computed: {
492
+
493
+ }
494
+ }
495
+ </script>
496
+
497
+ <style scoped>
498
+
499
+ </style>
500
+
501
+