apply-clients 3.1.50 → 3.1.51

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apply-clients",
3
- "version": "3.1.50",
3
+ "version": "3.1.51",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -56,6 +56,7 @@
56
56
  :value.sync="model.f_residential_area"
57
57
  :options='$parent.$parent.area'
58
58
  class="select select_list"
59
+ search="true"
59
60
  :value-single="true"
60
61
  close-on-select ></v-select>
61
62
  </div>
@@ -131,7 +132,7 @@
131
132
  :value.sync="model.f_charge_date"
132
133
  :format="'yyyy-MM-dd'"
133
134
  :show-reset-button="true"
134
- condition="c.f_charge_date <= '{} 23:59:59' and c.f_charge_date >= '{} 00:00:00'">
135
+ condition="ch.f_charge_date <= '{} 23:59:59' and ch.f_charge_date >= '{} 00:00:00'">
135
136
  </datepicker>
136
137
  </div>
137
138
  </div>
@@ -55,6 +55,7 @@
55
55
  :value.sync="model.f_residential_area"
56
56
  :options='$parent.$parent.area'
57
57
  class="select select_list"
58
+ search="true"
58
59
  :value-single="true"
59
60
  close-on-select ></v-select>
60
61
  </div>
@@ -60,6 +60,13 @@
60
60
  :disabled="$parent.$parent.mark === 1 || row.f_charge_state === '作废'"
61
61
  @click="$parent.$parent.showInvalidModal(row)"
62
62
  >作废</button>
63
+ <button
64
+ type="button"
65
+ name="button"
66
+ class="btn btn-link"
67
+ :disabled="$parent.$parent.mark === 1 || row.f_charge_state === '作废'"
68
+ @click="$parent.$parent.updateChargeModal(row)"
69
+ >修改</button>
63
70
  </nobr>
64
71
  </td>
65
72
  </tr>
@@ -74,10 +81,10 @@
74
81
  <article slot="modal-body" class="modal-body clearfix">
75
82
  <div v-if="data.f_apply_type === '散户报建'" class="form-group col-sm-12 panel panel-info">
76
83
  <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
77
- <div class="col-sm-6 text-left">设备信息</div>
84
+ <div class="col-sm-6 text-left">增值产品信息</div>
78
85
  </div>
79
86
  <div class="form-group col-sm-6">
80
- <label class="col-sm-4 control-label">设备品牌:</label>
87
+ <label class="col-sm-4 control-label">增值产品品牌:</label>
81
88
  <div class="col-sm-8">
82
89
  <input-select
83
90
  class="select select_list"
@@ -89,7 +96,7 @@
89
96
  </div>
90
97
  </div>
91
98
  <div class="form-group col-sm-6">
92
- <label class="col-sm-4 control-label">设备类型:</label>
99
+ <label class="col-sm-4 control-label">增值产品类型:</label>
93
100
  <div class="col-sm-8">
94
101
  <input-select
95
102
  class="select select_list"
@@ -101,7 +108,7 @@
101
108
  </div>
102
109
  </div>
103
110
  <div class="form-group col-sm-6">
104
- <label class="col-sm-4 control-label">设备数量:</label>
111
+ <label class="col-sm-4 control-label">增值产品数量:</label>
105
112
  <div class="col-sm-8">
106
113
  <input class="form-control input_view" style="" type="number"
107
114
  placeholder="设备数量"
@@ -159,7 +166,7 @@
159
166
  <div class="col-sm-6 text-left">设备信息</div>
160
167
  </div>
161
168
  <div class="form-group col-sm-6">
162
- <label class="col-sm-4 control-label">设备品牌:</label>
169
+ <label class="col-sm-4 control-label">增值产品品牌:</label>
163
170
  <div class="col-sm-8">
164
171
  <input-select
165
172
  class="select select_list"
@@ -171,7 +178,7 @@
171
178
  </div>
172
179
  </div>
173
180
  <div class="form-group col-sm-6">
174
- <label class="col-sm-4 control-label">设备类型:</label>
181
+ <label class="col-sm-4 control-label">增值产品类型:</label>
175
182
  <div class="col-sm-8">
176
183
  <input-select
177
184
  class="select select_list"
@@ -183,7 +190,7 @@
183
190
  </div>
184
191
  </div>
185
192
  <div class="form-group col-sm-6">
186
- <label class="col-sm-4 control-label">设备数量:</label>
193
+ <label class="col-sm-4 control-label">增值产品数量:</label>
187
194
  <div class="col-sm-8">
188
195
  <input class="form-control input_view" style="" type="number"
189
196
  placeholder="设备数量"
@@ -242,7 +249,7 @@
242
249
  close-on-select ></input-select>
243
250
  </div>
244
251
  </div>
245
- <div class="form-group col-sm-12" :class="charge.f_ticket_number ? '':'has-error'">
252
+ <div class="form-group col-sm-12">
246
253
  <label class="col-sm-2 control-label">票号:</label>
247
254
  <div class="col-sm-10">
248
255
  <input type="text"
@@ -319,7 +326,8 @@
319
326
  </div>
320
327
  </article>
321
328
  <footer slot="modal-footer" class="modal-footer">
322
- <button type="button" class="btn btn-primary" @click="saveCharge()">新增收费</button>
329
+ <button type="button" v-if="!showupdateCharge" class="btn btn-primary" @click="saveCharge()">新增收费</button>
330
+ <button type="button" v-if="showupdateCharge" class="btn btn-primary" @click="updateCharge()">确认修改</button>
323
331
  </footer>
324
332
  </modal>
325
333
  <modal v-if="showInvalid" :show.sync="showInvalid" v-ref:modal :large="true" :backdrop="false" title="作废收费">
@@ -330,10 +338,10 @@
330
338
  <article slot="modal-body" class="modal-body clearfix">
331
339
  <div v-for="(i, item) in model.userfile.devicesinfo" v-if="data.f_apply_type === '散户报建'" class="form-group col-sm-12 panel panel-info">
332
340
  <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
333
- <div class="col-sm-6 text-left">设备信息</div>
341
+ <div class="col-sm-6 text-left">增值产品信息</div>
334
342
  </div>
335
343
  <div class="form-group col-sm-6">
336
- <label class="col-sm-4 control-label">设备品牌:</label>
344
+ <label class="col-sm-4 control-label">增值产品品牌:</label>
337
345
  <div class="col-sm-8">
338
346
  <input-select
339
347
  class="select select_list"
@@ -345,7 +353,7 @@
345
353
  </div>
346
354
  </div>
347
355
  <div class="form-group col-sm-6">
348
- <label class="col-sm-4 control-label">设备类型:</label>
356
+ <label class="col-sm-4 control-label">增值产品类型:</label>
349
357
  <div class="col-sm-8">
350
358
  <input-select
351
359
  class="select select_list"
@@ -357,10 +365,10 @@
357
365
  </div>
358
366
  </div>
359
367
  <div class="form-group col-sm-6">
360
- <label class="col-sm-4 control-label">设备数量:</label>
368
+ <label class="col-sm-4 control-label">增值产品数量:</label>
361
369
  <div class="col-sm-8">
362
370
  <input class="form-control input_view" style="" type="number"
363
- placeholder="设备数量"
371
+ placeholder="增值产品数量"
364
372
  v-model="item.f_devices_num"
365
373
  :value="item.f_devices_num"
366
374
  readonly/>
@@ -512,7 +520,8 @@ export default {
512
520
  userfile: {
513
521
  devicesinfo: null
514
522
  },
515
- personList: []
523
+ personList: [],
524
+ showupdateCharge: false
516
525
  }
517
526
  },
518
527
  ready () {
@@ -566,6 +575,49 @@ export default {
566
575
  e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null
567
576
  this.charge.f_amount_words = this.smalltoBIG(e.target.value)
568
577
  },
578
+ async updateChargeModal(row) {
579
+
580
+ this.charge = row
581
+ if (this.data.f_apply_type === '散户报建'){
582
+ await this.openDevicesModal(row)
583
+ }
584
+
585
+ this.showupdateCharge = true
586
+ this.showCharge = true
587
+ },
588
+ async updateCharge() {
589
+ if(this.data.f_apply_type === '散户报建'){
590
+ for (let i = 0; i < this.data.fields.length; i++) {
591
+ if (this.data.fields[i].label === '应交金额') {
592
+ this.data.f_due_money = this.data.fields[i].value
593
+ }
594
+ if (this.data.fields[i].label === '合同价格') {
595
+ this.data.f_contract_money = this.data.fields[i].value
596
+ console.log("合同金额",this.data.f_contract_money)
597
+ }
598
+ }
599
+ }
600
+ let data = {
601
+ charge: this.charge,
602
+ selectdata: this.data
603
+ }
604
+ console.log()
605
+ if (this.data.f_apply_type === '散户报建' && this.userfile.devicesinfo !== null){
606
+
607
+ data.userfile = this.userfile
608
+ data.user = this.$login.f
609
+ data.userfile.devicesinfo.f_ticket_number = this.charge.f_ticket_number
610
+ }
611
+ let res = await this.$resetpost(
612
+ `rs/logic/updateCharge`,
613
+ data
614
+ )
615
+ this.showCharge = false
616
+ this.showupdateCharge = false
617
+ this.charge = {}
618
+
619
+ this.$dispatch('breakControl', res.data)
620
+ },
569
621
  async saveCharge() {
570
622
  this.apply_data()
571
623
  // if (isEmpty(this.charge.f_useraddress_id) && this.selectdata.f_apply_type !== '开发商集体报建') {
@@ -619,15 +671,13 @@ export default {
619
671
  data.userfile.devicesinfo.f_ticket_number = this.charge.f_ticket_number
620
672
  }
621
673
  console.log("开始收费:" + JSON.stringify(data))
622
- try {
623
- let res = await http.load('POST', 'rs/logic/addCharge', {data: data}, {
624
- resolveMsg: null,
625
- rejectMsg: null
626
- })
627
- this.update_data()
628
- } catch (e) {
629
- this.$showAlert(e.data, 'danger', 3000)
630
- }
674
+ let res
675
+
676
+ res = await http.load('POST', 'rs/logic/addCharge', {data: data}, {
677
+ resolveMsg: null,
678
+ rejectMsg: null
679
+ })
680
+
631
681
  if (this.data.f_apply_type === '散户报建' && this.userfile.devicesinfo){
632
682
  // this.addDevice()
633
683
  }
@@ -638,7 +688,7 @@ export default {
638
688
  this.charge.f_charge_remarks = ''
639
689
  this.charge.f_charge_date = ''
640
690
  this.charge.f_ticket_number = ''
641
- this.search()
691
+ this.$dispatch('breakControl', res.data)
642
692
  },
643
693
  // 金额转大写
644
694
  smalltoBIG(n) {
@@ -727,6 +777,14 @@ export default {
727
777
  },
728
778
  async apply_data () {
729
779
  for (let i = 0; i < this.data.fields.length; i++) {
780
+ if(this.data.f_apply_type === '散户报建') {
781
+ if (this.data.fields[i].label === '合同价格') {
782
+ this.data.f_contract_money = this.data.fields[i].value
783
+ }
784
+ if (this.data.fields[i].label === '应交金额') {
785
+ this.data.f_due_money = this.data.fields[i].value
786
+ }
787
+ }
730
788
  if (this.data.fields[i].label == '应交金额') {
731
789
  this.applydata.f_due_money = this.data.fields[i].value
732
790
  console.log("应交金额:" + this.data.fields[i].value)
@@ -753,12 +811,12 @@ export default {
753
811
  async update_data () {
754
812
  for (let i = 0; i < this.data.fields.length; i++) {
755
813
  if (this.data.fields[i].label == '累计缴费金额') {
756
- this.data.fields[i].value = Number(this.applydata.f_cumulative_money) + Number(this.charge.f_charge_money)
757
- this.data.f_cumulative_money = Number(this.applydata.f_cumulative_money) + Number(this.charge.f_charge_money)
814
+ this.data.fields[i].value = Number(this.data.f_cumulative_money) + Number(this.charge.f_charge_money)
815
+ this.data.f_cumulative_money = Number(this.data.f_cumulative_money) + Number(this.charge.f_charge_money)
758
816
  }
759
817
  if (this.data.fields[i].label == '欠费金额') {
760
- this.data.fields[i].value = Number(this.applydata.f_arrears_money) - Number(this.charge.f_charge_money)
761
- this.data.f_arrears_money = Number(this.applydata.f_arrears_money) - Number(this.charge.f_charge_money)
818
+ this.data.fields[i].value = Number(this.data.f_arrears_money) - Number(this.charge.f_charge_money)
819
+ this.data.f_arrears_money = Number(this.data.f_arrears_money) - Number(this.charge.f_charge_money)
762
820
  }
763
821
  }
764
822
  if (this.data.f_apply_type === '散户报建'){
@@ -780,16 +838,18 @@ export default {
780
838
  for (let i = 0; i < this.data.fields.length; i++) {
781
839
  if (this.data.fields[i].label == '累计缴费金额') {
782
840
  this.data.fields[i].value = Number(this.data.f_cumulative_money) - Number(row.f_charge_money)
841
+ this.data.f_cumulative_money = this.data.fields[i].value
783
842
  }
784
843
  if (this.data.fields[i].label == '欠费金额') {
785
844
  this.data.fields[i].value = Number(this.data.f_arrears_money) + Number(row.f_charge_money)
845
+ this.data.f_arrears_money = this.data.fields[i].value
786
846
  }
787
847
  }
788
848
  },
789
849
  async openDevicesModal (row) {
790
850
  let data = {
791
851
  tablename: 't_devices',
792
- condition: `f_process_id = '${this.data.f_process_id}' and f_ticket_number = '${row.f_ticket_number}' and f_devices_state = '有效'`
852
+ condition: `f_process_id = '${this.data.f_process_id}' and f_charge_id = '${row.id}' and f_devices_state = '有效'`
793
853
  }
794
854
  let res = await this.$resetpost(
795
855
  `rs/sql/singleTable`,
@@ -797,8 +857,12 @@ export default {
797
857
  {resolveMsg: null, rejectMsg: '设备查询失败!!!'}
798
858
  )
799
859
 
800
- Vue.set(this.model.userfile, 'devicesinfo', res.data)
801
- console.log("设备信息",this.model.userfile.devicesinfo)
860
+ if (res.data.length > 0){
861
+ Vue.set(this.model.userfile, 'devicesinfo', res.data)
862
+ Vue.set(this.userfile, 'devicesinfo', res.data[0])
863
+ console.log("设备信息",this.model.userfile.devicesinfo)
864
+ console.log("设备信息",this.userfile.devicesinfo)
865
+ }
802
866
  },
803
867
  async addDevice () {
804
868
  let data = {
@@ -830,10 +894,12 @@ export default {
830
894
  closeModal() {
831
895
  this.showCharge = false
832
896
  this.showInvalid = false
897
+ this.showupdateCharge = false
833
898
  if (this.data.f_apply_type === '散户报建') {
834
899
  this.model.userfile = null
835
900
  }
836
901
  this.charge = {}
902
+ this.userfile.devicesinfo = null
837
903
  this.chargeUseraddress = null
838
904
  this.search()
839
905
  },
@@ -50,6 +50,7 @@
50
50
  :value.sync="model.f_residential_area"
51
51
  :options='$parent.$parent.area'
52
52
  class="select select_list"
53
+ search="true"
53
54
  :value-single="true"
54
55
  close-on-select ></v-select>
55
56
  </div>
@@ -110,7 +110,7 @@
110
110
  <nobr><font>{{ $index+1 }}</font></nobr>
111
111
  </td>
112
112
  <td style="text-align: center;">
113
- <nobr><font>{{ row.f_operation_date }}</font></nobr>
113
+ <nobr><font>{{ row.f_charge_date }}</font></nobr>
114
114
  </td>
115
115
  <td style="text-align: center;">
116
116
  <nobr><font>{{ row.f_user_name }}</font></nobr>
@@ -188,7 +188,7 @@ export default {
188
188
  sum: 0
189
189
  },
190
190
  getfield: {
191
- 'f_operation_date': ' 收 费 时 间 ',
191
+ 'f_charge_date': ' 收 费 时 间 ',
192
192
  'f_user_name': ' 姓 名 ',
193
193
  'f_phone': ' 电 话 ',
194
194
  'f_residential_area': ' 小 区 名 称 ',
@@ -1488,27 +1488,26 @@
1488
1488
  // }
1489
1489
  // })
1490
1490
  let http = new HttpResetClass()
1491
- await http.load('POST', 'rs/logic/recordImport', data, {
1491
+ let w = await http.load('POST', 'rs/logic/recordImport', data, {
1492
1492
  resolveMsg: null,
1493
1493
  rejectMsg: '导入失败'
1494
- }).then((res) => {
1495
- if(res.data){
1496
- this.iswork=false;
1494
+ })
1495
+ if(w.data) {
1496
+ this.iswork = false;
1497
1497
  this.load();
1498
1498
  this.closeFile();
1499
1499
  let mm = '';
1500
- for(var i=0;i<res.data.msg.length;i++){
1501
- mm+= `${res.data.msg[i].msg}`
1500
+ for (var i = 0; i < w.data.msg.length; i++) {
1501
+ mm += `${w.data.msg[i].msg}`
1502
1502
  }
1503
- let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
1504
- if (res.data.code == 500) {
1505
- this.iswork=false;
1506
- msg = res.data.msg
1503
+ let msg = `共导入${w.data.alllength}条,失败${w.data.errorlen}条,失败信息:${mm}`
1504
+ if (w.data.code === 500) {
1505
+ this.iswork = false;
1506
+ msg = w.data.msg
1507
1507
  }
1508
1508
  console.log("返回的数据:" + JSON.stringify(res.data))
1509
1509
  this.$showMessage(msg)
1510
1510
  }
1511
- })
1512
1511
  // }catch(e){
1513
1512
  //
1514
1513
  // this.$showAlert('导入出错,请检查导入文件模板格式!','danger',2000);
@@ -1533,27 +1532,26 @@
1533
1532
  };
1534
1533
  console.log('即将转发的数据',data);
1535
1534
  let http = new HttpResetClass()
1536
- await http.load('POST', 'rs/logic/incrementImport', data, {
1535
+ let result = await http.load('POST', 'rs/logic/incrementImport', data, {
1537
1536
  resolveMsg: null,
1538
1537
  rejectMsg: '导入失败'
1539
- }).then((res) => {
1540
- if(res.data){
1538
+ })
1539
+ if(result.data){
1541
1540
  this.iswork=false;
1542
1541
  this.load();
1543
1542
  this.closeFile();
1544
1543
  let mm = '';
1545
- for(var i=0;i<res.data.msg.length;i++){
1546
- mm+= `${res.data.msg[i].msg}`
1544
+ for(var i=0;i<result.data.msg.length;i++){
1545
+ mm+= `${result.data.msg[i].msg}`
1547
1546
  }
1548
- let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
1549
- if (res.data.code == 500) {
1547
+ let msg = `共导入${result.data.alllength}条,失败${result.data.errorlen}条,失败信息:${mm}`
1548
+ if (result.data.code == 500) {
1550
1549
  this.iswork=false;
1551
- msg = res.data.msg
1550
+ msg = result.data.msg
1552
1551
  }
1553
- console.log("返回的数据:" + JSON.stringify(res.data))
1552
+ console.log("返回的数据:" + JSON.stringify(result.data))
1554
1553
  this.$showMessage(msg)
1555
1554
  }
1556
- })
1557
1555
  // try{
1558
1556
  // await axios.post('rs/logic/incrementImport',
1559
1557
  // data).then((res)=>{
@@ -55,6 +55,7 @@
55
55
  condition="u.f_residential_area = '{}'"
56
56
  :value.sync="model.f_residential_area"
57
57
  :options='$parent.$parent.area'
58
+ search="true"
58
59
  class="select select_list"
59
60
  :value-single="true"
60
61
  close-on-select ></v-select>
@@ -55,6 +55,7 @@
55
55
  :value.sync="model.f_residential_area"
56
56
  :options='$parent.$parent.area'
57
57
  class="select select_list"
58
+ search="true"
58
59
  :value-single="true"
59
60
  close-on-select ></v-select>
60
61
  </div>