apply-clients 3.1.51 → 3.1.54

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.51",
3
+ "version": "3.1.54",
4
4
  "description": "报建前端模块",
5
5
  "main": "src/index.js",
6
6
  "directories": {
@@ -121,8 +121,9 @@
121
121
  </criteria>
122
122
  <data-grid :model="model" partial='list' v-ref:grid class="list_area table_sy">
123
123
  <template partial='head'>
124
- <tr class="title">
124
+ <tr>
125
125
  <th>序号</th>
126
+ <th><div style="width:80px">流程操作</div></th>
126
127
  <th>报建编号</th>
127
128
  <th>当前环节</th>
128
129
  <th>客户名称/联系人</th>
@@ -131,7 +132,6 @@
131
132
  <th>地址</th>
132
133
  <th>报建类型</th>
133
134
  <th>报建日期</th>
134
- <th>操作</th>
135
135
  </tr>
136
136
  </template>
137
137
  <template partial='body'>
@@ -139,6 +139,18 @@
139
139
  <td style="text-align: center;">
140
140
  <nobr>{{$index+1}}</nobr>
141
141
  </td>
142
+ <td style="text-align: center;">
143
+ <dropdown>
144
+ <button @click="$parent.$parent.$parent.checkfuncs(row)" type="button" data-toggle="dropdown" style="border: 0px;background: none;">
145
+ <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
146
+ </button>
147
+ <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
148
+ <li v-for="(index,func) in $parent.$parent.$parent.funcs">
149
+ <a href="#" @click="$parent.$parent.$parent.$parent.func(func,row)">{{func.title}}</a>
150
+ </li>
151
+ </ul>
152
+ </dropdown>
153
+ </td>
142
154
  <td style="text-align: center;">
143
155
  <nobr><font>{{row.f_apply_num}}</font></nobr>
144
156
  </td>
@@ -163,18 +175,6 @@
163
175
  <td style="text-align: center;">
164
176
  <nobr>{{row.f_apply_date}}</nobr>
165
177
  </td>
166
- <td style="text-align: center;">
167
- <dropdown>
168
- <button @click="$parent.$parent.$parent.checkfuncs(row)" type="button" data-toggle="dropdown" style="border: 0px;background: none;">
169
- <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
170
- </button>
171
- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
172
- <li v-for="(index,func) in $parent.$parent.$parent.funcs">
173
- <a href="#" @click="$parent.$parent.$parent.$parent.func(func,row)">{{func.title}}</a>
174
- </li>
175
- </ul>
176
- </dropdown>
177
- </td>
178
178
  </tr>
179
179
  </template>
180
180
  </data-grid>
@@ -881,7 +881,7 @@ export default {
881
881
  async deleteDevice (row) {
882
882
  let data = {
883
883
  f_process_id: this.data.f_process_id,
884
- f_ticket_number: row.f_ticket_number,
884
+ f_charge_id: row.id,
885
885
  user: this.$login.f
886
886
  }
887
887
  let res = await this.$resetpost(
@@ -124,6 +124,7 @@
124
124
  <template partial='head'>
125
125
  <tr>
126
126
  <th>序号</th>
127
+ <th>流程操作</th>
127
128
  <th>报建编号</th>
128
129
  <th>客户名称/联系人</th>
129
130
  <th>当前状态</th>
@@ -133,7 +134,6 @@
133
134
  <th>地址</th>
134
135
  <th>报建类型</th>
135
136
  <th>报建日期</th>
136
- <th>操作</th>
137
137
  </tr>
138
138
  </template>
139
139
  <template partial='body'>
@@ -141,6 +141,18 @@
141
141
  <td style="text-align: center;">
142
142
  <nobr><font>{{$index+1}}</font></nobr>
143
143
  </td>
144
+ <td style="text-align: center;">
145
+ <dropdown>
146
+ <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
147
+ <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
148
+ </button>
149
+ <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
150
+ <li>
151
+ <a href="#" @click="$parent.$parent.$parent.click(row)">{{row.defname}}</a>
152
+ </li>
153
+ </ul>
154
+ </dropdown>
155
+ </td>
144
156
  <td style="text-align: center;">
145
157
  <nobr><font>{{row.f_apply_num}}</font></nobr>
146
158
  </td>
@@ -168,18 +180,6 @@
168
180
  <td style="text-align: center;">
169
181
  <nobr><font>{{row.f_apply_date}}</font></nobr>
170
182
  </td>
171
- <td style="text-align: center;">
172
- <dropdown>
173
- <button type="button" data-toggle="dropdown" style="border: 0px;background: none;">
174
- <span class="glyphicon glyphicon-th-list" style="position: inherit;"></span>
175
- </button>
176
- <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
177
- <li>
178
- <a href="#" @click="$parent.$parent.$parent.click(row)">{{row.defname}}</a>
179
- </li>
180
- </ul>
181
- </dropdown>
182
- </td>
183
183
  </tr>
184
184
  </template>
185
185
  </data-grid>
@@ -684,9 +684,8 @@
684
684
  },
685
685
  // 根据小区名称获取合同编号
686
686
  async getContractNumber() {
687
- console.log("进来了没有1")
688
687
  if (this.selectdata.defname == '申请登记') {
689
-
688
+ console.log("获取合同编号")
690
689
  for (let i = 0; i < this.show_data.fields.length; i++) {
691
690
  // console.log("进来了没有2")
692
691
  // console.log("选择框的名称:" + this.show_data.fields[i].label + "---小区名称的长度:" + this.show_data.fields[i].value.length)
@@ -847,16 +846,149 @@
847
846
 
848
847
 
849
848
 
850
- }
849
+ },
850
+ async stopApply () {
851
+ console.log('终止报建!!!!!')
852
+
853
+ if (this.show_data.defname === '报建受理') {
854
+ this.show_data.f_stop_reason = this.show_data.f_accept_result
855
+ }
856
+ if (this.show_data.defname === '现场勘察') {
857
+ this.show_data.f_stop_reason = this.show_data.f_project_describe
858
+ }
859
+ if(!this.show_data.f_stop_reason){
860
+ this.show_data.f_stop_reason = '终止'
861
+ }
862
+ let data = {
863
+ selectdata: this.show_data,
864
+ loginUser: this.$login.f,
865
+ model: {f_stop_remarks: this.show_data.f_stop_reason}
866
+ }
851
867
 
868
+ let res = await this.$resetpost(
869
+ `rs/logic/stopApply`,
870
+ {data: data},
871
+ {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
872
+ )
873
+
874
+ this.$dispatch('selfsearch')
875
+
876
+ },
877
+ // 获取片区
878
+ async getPcd () {
879
+ let data = {
880
+ tablename: 't_pcd',
881
+ condition: `f_filialeid = '${this.$login.f.orgid}'`
882
+ }
883
+ let http = new HttpResetClass()
884
+ let res = await http.load(
885
+ 'POST',
886
+ `rs/sql/applysingleTable`,
887
+ {data: data},
888
+ {resolveMsg: null, rejectMsg: '片区查询失败!!!'}
889
+ )
890
+
891
+ let pcd = res.data.map(item => {
892
+ return {
893
+ label: item.f_pcd,
894
+ value: item.f_pcd
895
+ }
896
+ })
897
+ for (const item of this.show_data.fields) {
898
+ if (item.label === '片区') {
899
+ item.options = pcd
900
+ }
901
+ }
902
+ },
903
+ // 获取街道
904
+ async getStreet (){
905
+ let http = new HttpResetClass()
906
+ let condition = "f_filialeid = " + this.$login.f.orgid
907
+ let res = await http.load('POST','rs/logic/apply_queryArea',{data:{condition:condition}}, {resolveMsg: null, rejectMsg: null})
908
+ let street = res.data.queryStreet.map(item=>{
909
+ return {
910
+ label: item.f_street,
911
+ value: item.f_street
912
+ }
913
+ })
914
+ for (const item of this.show_data.fields) {
915
+ if (item.label === '街道') {
916
+ item.options = street
917
+ }
918
+ }
919
+ }
852
920
  },
853
921
  events: {
922
+ async 'updateArea' (index) {
923
+ if (this.show_data.fields[index].value === '新小区') {
924
+ console.log("测试小区",index)
925
+ for (const item of this.show_data.fields) {
926
+ if (item.label === '小区') {
927
+ item.value = ''
928
+ item.hidden = true
929
+ }
930
+ if (item.label === '小区名称') {
931
+ item.value = ''
932
+ item.hidden = false
933
+ }
934
+ }
935
+ } else {
936
+ for (const item of this.show_data.fields) {
937
+ if (item.label === '小区名称') {
938
+ item.value = ''
939
+ item.hidden = true
940
+ }
941
+ if (item.label === '小区') {
942
+ item.value = ''
943
+ item.hidden = false
944
+ }
945
+ }
946
+ }
947
+ },
948
+ 'confirmBuildFiles'(index){
949
+ if (this.show_data.fields[index].value === '否') {
950
+ for (const item of this.show_data.buttons){
951
+ if (item.button_name === '提交') {
952
+ item.disabled = true
953
+ }
954
+ }
955
+ }
956
+ },
957
+ 'buildArea'(){
958
+ if(this.show_data.f_area_type === '新小区'){
959
+ // this.getPcd()
960
+ this.getStreet()
961
+ for (const item of this.show_data.fields) {
962
+ if (item.label === '县/区') {
963
+ item.required = true
964
+ item.hidden = false
965
+ }
966
+ if (item.label === '街道') {
967
+ item.required = true
968
+ item.hidden = false
969
+ }
970
+ if (item.label === '片区') {
971
+ item.required = true
972
+ item.hidden = false
973
+ }
974
+ if (item.label === '小区名称') {
975
+ item.required = true
976
+ item.hidden = false
977
+ }
978
+ }
979
+ }
980
+ },
854
981
  test(i, j){
855
982
  console.log('删除')
856
983
  console.log(i + '-----' +j)
857
984
  },
858
985
  // 获取view层button事件/
859
986
  async 'button'(model) {
987
+ //before事件
988
+ console.log("当前按钮",model.button)
989
+ if (model.button.before) {
990
+ await this[model.button.before]()
991
+ }
860
992
  // 点击重置按钮就重置数据
861
993
  if (model.button.button_name === '重置') {
862
994
  this.refurbish()
@@ -950,6 +1082,7 @@
950
1082
  this.$refs.service_show.data.fields[index].label === '县/区' ||
951
1083
  this.$refs.service_show.data.fields[index].label === '街道' ||
952
1084
  this.$refs.service_show.data.fields[index].label === '小区' ||
1085
+ this.$refs.service_show.data.fields[index].label === '小区名称' ||
953
1086
  this.$refs.service_show.data.fields[index].label === '楼号' ||
954
1087
  this.$refs.service_show.data.fields[index].label === '单元号' ||
955
1088
  this.$refs.service_show.data.fields[index].label === '楼层' ||
@@ -967,7 +1100,7 @@
967
1100
  if (this.$refs.service_show.data.fields[i].label === '街道' && this.$refs.service_show.data.fields[i].value) {
968
1101
  address += this.$refs.service_show.data.fields[i].value
969
1102
  }
970
- if (this.$refs.service_show.data.fields[i].label === '小区' && this.$refs.service_show.data.fields[i].value) {
1103
+ if ((this.$refs.service_show.data.fields[i].label === '小区名称' || this.$refs.service_show.data.fields[i].label === '小区') && this.$refs.service_show.data.fields[i].value) {
971
1104
  address += this.$refs.service_show.data.fields[i].value
972
1105
  }
973
1106
  if (this.$refs.service_show.data.fields[i].label === '楼号' && this.$refs.service_show.data.fields[i].value) {
@@ -1488,26 +1488,31 @@
1488
1488
  // }
1489
1489
  // })
1490
1490
  let http = new HttpResetClass()
1491
- let w = await http.load('POST', 'rs/logic/recordImport', data, {
1491
+ await http.load('POST', 'rs/logic/recordImport', data, {
1492
1492
  resolveMsg: null,
1493
1493
  rejectMsg: '导入失败'
1494
- })
1495
- if(w.data) {
1496
- this.iswork = false;
1494
+ }).then((res) => {
1495
+ if(res.data){
1496
+ this.iswork=false;
1497
1497
  this.load();
1498
1498
  this.closeFile();
1499
1499
  let mm = '';
1500
- for (var i = 0; i < w.data.msg.length; i++) {
1501
- mm += `${w.data.msg[i].msg}`
1500
+ for(let i = 0; i < res.data.msg.length; i++){
1501
+ mm+= `${res.data.msg[i].msg}`
1502
+ }
1503
+ let worry = '';
1504
+ for(let j = 0; j < res.data.worry.length; j++){
1505
+ worry += `${res.data.worry[j].msg}`
1502
1506
  }
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
+ let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm},提醒:${worry}`
1508
+ if (res.data.code == 500) {
1509
+ this.iswork=false;
1510
+ msg = res.data.msg
1507
1511
  }
1508
1512
  console.log("返回的数据:" + JSON.stringify(res.data))
1509
1513
  this.$showMessage(msg)
1510
1514
  }
1515
+ })
1511
1516
  // }catch(e){
1512
1517
  //
1513
1518
  // this.$showAlert('导入出错,请检查导入文件模板格式!','danger',2000);
@@ -1532,26 +1537,27 @@
1532
1537
  };
1533
1538
  console.log('即将转发的数据',data);
1534
1539
  let http = new HttpResetClass()
1535
- let result = await http.load('POST', 'rs/logic/incrementImport', data, {
1540
+ await http.load('POST', 'rs/logic/incrementImport', data, {
1536
1541
  resolveMsg: null,
1537
1542
  rejectMsg: '导入失败'
1538
- })
1539
- if(result.data){
1543
+ }).then((res) => {
1544
+ if(res.data){
1540
1545
  this.iswork=false;
1541
1546
  this.load();
1542
1547
  this.closeFile();
1543
1548
  let mm = '';
1544
- for(var i=0;i<result.data.msg.length;i++){
1545
- mm+= `${result.data.msg[i].msg}`
1549
+ for(var i=0;i<res.data.msg.length;i++){
1550
+ mm+= `${res.data.msg[i].msg}`
1546
1551
  }
1547
- let msg = `共导入${result.data.alllength}条,失败${result.data.errorlen}条,失败信息:${mm}`
1548
- if (result.data.code == 500) {
1552
+ let msg = `共导入${res.data.alllength}条,失败${res.data.errorlen}条,失败信息:${mm}`
1553
+ if (res.data.code == 500) {
1549
1554
  this.iswork=false;
1550
- msg = result.data.msg
1555
+ msg = res.data.msg
1551
1556
  }
1552
- console.log("返回的数据:" + JSON.stringify(result.data))
1557
+ console.log("返回的数据:" + JSON.stringify(res.data))
1553
1558
  this.$showMessage(msg)
1554
1559
  }
1560
+ })
1555
1561
  // try{
1556
1562
  // await axios.post('rs/logic/incrementImport',
1557
1563
  // data).then((res)=>{
@@ -366,6 +366,9 @@
366
366
  created () {
367
367
  // 初始化数据
368
368
  this.initializtion()
369
+ if (this.data.readyEvent) {
370
+ this.$dispatch(this.data.readyEvent)
371
+ }
369
372
  },
370
373
  methods: {
371
374
  // 按钮模态框确定
@@ -399,6 +402,9 @@
399
402
  }
400
403
  buttondatas.button_name = button.button_name
401
404
  buttondatas.button_index = index
405
+ if (button.before){
406
+ buttondatas.before = button.before
407
+ }
402
408
  if (button.button_fields) {
403
409
  button.button_fields.forEach(item => {
404
410
  buttondatas.button_fields[item.field] = item.value
@@ -480,6 +486,10 @@
480
486
  check (index) {
481
487
  // 是否禁用按钮
482
488
  this.disableButton()
489
+ if (this.data.fields[index].onchange) {
490
+ console.log("当前onchange",this.data.fields[index].onchange)
491
+ this.$dispatch(this.data.fields[index].onchange, index)
492
+ }
483
493
 
484
494
  this.$dispatch('check', index)
485
495
  // 如果有错误信息提示走错误信息判断处理