apply-clients 3.3.29 → 3.3.33

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 (24) hide show
  1. package/package.json +1 -1
  2. package/src/apply.js +3 -0
  3. package/src/components/android/AppOnetomany.vue +31 -17
  4. package/src/components/android/Function/AppFunctionServiceControl.vue +18 -3
  5. package/src/components/android/Function/AppInstallFunction.vue +4 -0
  6. package/src/components/android/Process/AppExplorationUser.vue +306 -302
  7. package/src/components/android/Process/AppServiceControl.vue +756 -756
  8. package/src/components/android/Supervisory/AppProcessSupervisory.vue +4 -0
  9. package/src/components/product/Function/Service/FunctionServiceControl.vue +22 -1
  10. package/src/components/product/Material/MaterialDetailed.vue +213 -0
  11. package/src/components/product/OldApply/Handle/HandleApply.vue +20 -3
  12. package/src/components/product/OldApply/Monitor/MonitorApply.vue +6 -0
  13. package/src/components/product/OldApply/OldApply.vue +1 -1
  14. package/src/components/product/Onetomany.vue +101 -22
  15. package/src/components/product/Process/ExplorationSelect.vue +42 -6
  16. package/src/components/product/Process/Processes/InstallationDetails.vue +1 -1
  17. package/src/components/product/Process/Processes/Print/printBuildOrder.vue +215 -0
  18. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +11 -6
  19. package/src/components/product/Process/Service/ServiceControl.vue +18 -3
  20. package/src/components/product/ServiceView.vue +1 -1
  21. package/src/components/product/Stop/StopApply.vue +101 -103
  22. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +292 -20
  23. package/src/components/product/Supervisory/SupervisoryControl.vue +27 -0
  24. package/src/components/product/Supervisory/SupervisoryhCart.vue +1 -1
@@ -157,6 +157,10 @@
157
157
  <p class="col-xs-3 text-left font"><b>报建日期:</b></p>
158
158
  <p class="col-xs-9 text-left input-font">{{ row.f_apply_date }}</p>
159
159
  </div>
160
+ <div class="col-xs-12">
161
+ <p class="col-xs-3 text-left font"><b>施工备注:</b></p>
162
+ <p class="col-xs-9 text-left input-font">{{ row.f_construction_remarks }}</p>
163
+ </div>
160
164
 
161
165
  <div class="col-xs-12 text-right">
162
166
  <button class="btn btn-info" @click="$parent.$parent.$parent.click(row)">查看</button>
@@ -389,6 +389,11 @@
389
389
  {resolveMsg: null, rejectMsg: '删除失败!!!'}
390
390
  )
391
391
 
392
+ res = await this.$resetpost(
393
+ 'rs/entity/t_apply',
394
+ this.show_data
395
+ )
396
+
392
397
  this.$dispatch('breakControl', this.show_data)
393
398
  },
394
399
  async 'onetomanyupdate' (index, rowIndex) {
@@ -402,11 +407,21 @@
402
407
  data
403
408
  )
404
409
 
410
+ res = await this.$resetpost(
411
+ 'rs/entity/t_apply',
412
+ this.show_data
413
+ )
414
+
405
415
  this.$dispatch('breakControl', this.show_data)
406
416
  },
407
417
  async 'onetomanyadd' (index) {
408
418
  let data = {
409
- f_process_id : this.show_data.f_process_id
419
+ f_process_id : this.show_data.f_process_id,
420
+ f_operator_id: this.$login.f.id,
421
+ f_operator: this.$login.f.name,
422
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
423
+ f_orgid: this.$login.f.orgid,
424
+ f_orgname: this.$login.f.orgs
410
425
  }
411
426
  this.show_data.onetomany[index].fields.forEach(item => {
412
427
  data[item.field] = item.value
@@ -415,6 +430,12 @@
415
430
  `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
416
431
  data
417
432
  )
433
+
434
+ res = await this.$resetpost(
435
+ 'rs/entity/t_apply',
436
+ this.show_data
437
+ )
438
+
418
439
  this.$dispatch('breakControl', this.show_data)
419
440
  }
420
441
  },
@@ -0,0 +1,213 @@
1
+ <template>
2
+ <div class="flex-row">
3
+ <div class="basic-main">
4
+ <criteria-paged :model="model" v-ref:cp>
5
+ <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
6
+ <div class="form-horizontal select-overspread container-fluid auto" partial>
7
+ <div class="row">
8
+ <div class="form-group col-sm-3">
9
+ <label class="font_normal_body">组织机构:</label>
10
+ <res-select
11
+ restype='organization'
12
+ :initresid='$parent.$parent.curorgid'
13
+ @res-select="$parent.$parent.getorg"
14
+ is-mul="false"
15
+ ></res-select>
16
+ </div>
17
+ <div class="form-group col-sm-3">
18
+ <label class="font_normal_body">工程编号:</label>
19
+ <input type="text" style="width: 60%" class="input_search" placeholder='工程编号' v-model="model.f_apply_num"
20
+ v-on:keyup.enter="$parent.$parent.search()"
21
+ condition="a.f_apply_num = '{}'">
22
+ </div>
23
+ <div class="form-group col-sm-3">
24
+ <label class="font_normal_body">操作人:</label>
25
+ <input type="text" style="width: 60%" class="input_search" placeholder='操作人' v-model="model.f_operator"
26
+ v-on:keyup.enter="$parent.$parent.search()"
27
+ condition="ma.f_operator like '%{}%'">
28
+ </div>
29
+ <div class="form-group col-sm-3 button-range">
30
+ <button class="button_search button_spacing" @click="$parent.$parent.search()" v-el:cx>查询</button>
31
+ <button class="button_clear button_spacing" @click="$parent.$parent.clear()">清空</button>
32
+ <export-excel :data="$parent.$parent.getCondition"
33
+ :field="$parent.$parent.getfield"
34
+ sqlurl="rs/logic/applyExportfile"
35
+ sql-name="applyGetMaterial"
36
+ template-name='材料明细导出'
37
+ :choose-col="true"></export-excel>
38
+ <div
39
+ :class="{'button_shrink_top':$parent.$parent.criteriaShow,'button_shrink_bottom':!$parent.$parent.criteriaShow}"
40
+ @click="$parent.$parent.criteriaShow = !$parent.$parent.criteriaShow"
41
+ class="button_spacing"
42
+ style="float: right">
43
+ </div>
44
+ </div>
45
+ </div>
46
+ <div class="row" v-show="$parent.$parent.criteriaShow">
47
+ <div class="form-group col-sm-3">
48
+ <label class="font_normal_body">材料名称:</label>
49
+ <input type="text" style="width: 60%" class="input_search" placeholder='材料名称' v-model="model.f_material_name"
50
+ v-on:keyup.enter="$parent.$parent.search()"
51
+ condition="ma.f_material_name = '{}'">
52
+ </div>
53
+ <div class="form-group col-sm-3">
54
+ <label class="font_normal_body">材料型号:</label>
55
+ <input type="text" style="width: 60%" class="input_search" placeholder='材料型号' v-model="model.f_material_style"
56
+ v-on:keyup.enter="$parent.$parent.search()"
57
+ condition="ma.f_material_style = '{}'">
58
+ </div>
59
+ <div class="form-group col-sm-3">
60
+ <label class="font_normal_body">材料单位:</label>
61
+ <input type="text" style="width: 60%" class="input_search" placeholder='材料单位' v-model="model.f_material_unit"
62
+ v-on:keyup.enter="$parent.$parent.search()"
63
+ condition="ma.f_material_unit = '{}'">
64
+ </div>
65
+ <div class="form-group col-sm-3">
66
+ <label class="font_normal_body">材料数量:</label>
67
+ <input type="text" style="width: 60%" class="input_search" placeholder='材料数量' v-model="model.f_material_number"
68
+ v-on:keyup.enter="$parent.$parent.search()"
69
+ condition="ma.f_material_number = '{}'">
70
+ </div>
71
+ <div class="form-group col-sm-3">
72
+ <label for="startDate" class="font_normal_body">开始时间:</label>
73
+ <datepicker id="startDate" placeholder="开始日期"
74
+ style="width: 60%!important;"
75
+ v-model="model.startDate"
76
+ :value.sync="model.startDate"
77
+ :format="'yyyy-MM-dd 00:00:00'"
78
+ :show-reset-button="true"
79
+ condition="ma.f_operation_date >= '{}'">
80
+ </datepicker>
81
+ </div>
82
+ <div class="form-group col-sm-3">
83
+ <label for="endDate" class="font_normal_body">结束时间:</label>
84
+ <datepicker id="endDate" placeholder="结束日期"
85
+ style="width: 60%!important;"
86
+ v-model="model.endDate"
87
+ :value.sync="model.endDate"
88
+ :format="'yyyy-MM-dd 23:59:59'"
89
+ :show-reset-button="true"
90
+ condition="ma.f_operation_date <= '{}'">
91
+ </datepicker>
92
+ </div>
93
+ </div>
94
+ </div>
95
+ </criteria>
96
+ <data-grid :model="model" partial='list' v-ref:grid style="overflow: auto" class="list_area table_sy">
97
+ <template partial='head'>
98
+ <tr>
99
+ <th>序号</th>
100
+ <th>工程编号</th>
101
+ <th>材料名称</th>
102
+ <th>材料型号</th>
103
+ <th>材料单位</th>
104
+ <th>材料数量</th>
105
+ <th>操作人</th>
106
+ <th>操作时间</th>
107
+ </tr>
108
+ </template>
109
+ <template partial='body'>
110
+ <tr >
111
+ <td style="text-align: center;">
112
+ <nobr><font>{{$index+1}}</font></nobr>
113
+ </td>
114
+ <td style="text-align: center;">
115
+ <nobr><font>{{row.f_apply_num}}</font></nobr>
116
+ </td>
117
+ <td style="text-align: center;">
118
+ <nobr><font>{{row.f_material_name}}</font></nobr>
119
+ </td>
120
+ <td style="text-align: center;">
121
+ <nobr><font>{{row.f_material_style}}</font></nobr>
122
+ </td>
123
+ <td style="text-align: center;">
124
+ <nobr><font>{{row.f_material_unit}}</font></nobr>
125
+ </td>
126
+ <td style="text-align: center;">
127
+ <nobr><font>{{row.f_material_number}}</font></nobr>
128
+ </td>
129
+ <td style="text-align: center;">
130
+ <nobr><font>{{row.f_operator}}</font></nobr>
131
+ </td>
132
+ <td style="text-align: center;">
133
+ <nobr><font>{{row.f_operation_date}}</font></nobr>
134
+ </td>
135
+ </tr>
136
+ </template>
137
+ </data-grid>
138
+ </criteria-paged>
139
+ </div>
140
+ </div>
141
+ </template>
142
+
143
+ <script>
144
+ import {PagedList} from 'vue-client'
145
+ import {HttpResetClass} from 'vue-client'
146
+ export default {
147
+ title: '报建收费列表',
148
+ data () {
149
+ return {
150
+ model: new PagedList('rs/sql/applyGetMaterial', 30, null),
151
+ curorgid: [this.$login.f.orgid],
152
+ applytype: [{label: '全部', value: ''}, ...this.$appdata.getParam('报建类型')],
153
+ paymentMethod: [{label: '全部', value: ''}, ...this.$appdata.getParam('付款方式')],
154
+ chargeStatus: [
155
+ {label: '全部', value: ''},
156
+ {label: '有效', value: '有效'},
157
+ {label: '作废', value: '作废'},
158
+ {label: '退款', value: '退款'}
159
+ ],
160
+ criteriaShow: false,
161
+ chargeAll: {
162
+ count: 0,
163
+ sum: 0
164
+ },
165
+ getfield: {
166
+ 'f_apply_num': '工程编号',
167
+ 'f_material_name': '材料名称',
168
+ 'f_material_style': '材料型号',
169
+ 'f_material_unit': '材料单位',
170
+ 'f_material_number': '材料数量',
171
+ 'f_operator': '操作人',
172
+ 'f_operation_date': '操作时间'
173
+ }
174
+ }
175
+ },
176
+ ready () {
177
+ // 调用查询
178
+ this.search()
179
+ },
180
+ methods: {
181
+ clear () {
182
+ Object.keys(this.$refs.cp.$refs.cri.model).forEach((key) => {
183
+ this.$refs.cp.$refs.cri.model[key] = ''
184
+ })
185
+ },
186
+ searchCondition (args) {
187
+ args.condition = args.condition + ` and ma.f_orgid = '${this.curorgid[0]}'`
188
+ this.model.search(args.condition, args.model)
189
+ },
190
+ // 查询
191
+ search () {
192
+ this.$refs.cp.$refs.cri.search()
193
+ },
194
+ getorg (val) {
195
+ if (val.length <= 0) {
196
+ return
197
+ }
198
+ this.curorgid = val
199
+ this.search()
200
+ }
201
+ },
202
+ computed: {
203
+ getCondition () {
204
+ return {
205
+ condition: this.$refs.cp.$refs.cri.condition
206
+ }
207
+ }
208
+ }
209
+ }
210
+ </script>
211
+
212
+ <style scoped>
213
+ </style>
@@ -39,6 +39,12 @@
39
39
  </div>
40
40
  </div>
41
41
  <div class="row" v-show="$parent.$parent.criteriaShow">
42
+ <div class="form-group col-sm-3">
43
+ <label class="font_normal_body">客户编号:</label>
44
+ <input type="text" style="width:60%" class="input_search" placeholder='客户编号' v-model="model.f_userinfo_code"
45
+ v-on:keyup.enter="$parent.$parent.search()"
46
+ condition="f_userinfo_code = '{}'">
47
+ </div>
42
48
  <div class="form-group col-sm-3">
43
49
  <label class="font_normal_body">联系电话:</label>
44
50
  <input type="text" style="width:60%" class="input_search" placeholder='联系电话' v-model="model.f_phone"
@@ -175,8 +181,8 @@
175
181
  </button>
176
182
  <ul slot="dropdown-menu" class="dropdown-menu dropdown-menu-right">
177
183
  <li>
178
- <a href="#" @click="$parent.$parent.$parent.click(row)">{{row.f_sub_state}}</a>
179
- <a href="#" @click="$parent.$parent.$parent.stopApply(row)">异常终止</a>
184
+ <a href="#" v-if="this.$login.f.rolesnames.indexOf('工程部派工') !== -1 || this.$login.f.rolesnames.indexOf('运营部派工') !== -1 || (this.$login.f.rolesnames.indexOf('营业厅报装') !== -1 && row.f_sub_state === '待点火')" @click="$parent.$parent.$parent.click(row)">{{row.f_sub_state}}</a>
185
+ <a href="#" v-if="this.$login.f.rolesnames.indexOf('营业厅报装') !== -1 || this.$login.f.rolesnames.indexOf('运营部派工') !== -1" @click="$parent.$parent.$parent.stopApply(row)">异常终止</a>
180
186
  </li>
181
187
  </ul>
182
188
  </dropdown>
@@ -235,7 +241,18 @@ export default {
235
241
  this.$dispatch('openApply', row, 'handle')
236
242
  },
237
243
  searchCondition (args) {
238
- args.condition = args.condition + ` and f_orgid = '${this.curorgid[0]}' and f_sub_state != '完工' and f_sub_state != '终止'`
244
+ args.condition = args.condition + ` and f_orgid = '${this.curorgid[0]}'`
245
+
246
+ if (this.$login.f.rolesnames.indexOf('工程部派工') !== -1 && this.$login.f.rolesnames.indexOf('运营部派工') !== -1) {
247
+ args.condition = args.condition + ` and (f_sub_state = '待安装' or f_sub_state = '待点火')`
248
+ } else if (this.$login.f.rolesnames.indexOf('工程部派工') !== -1) {
249
+ args.condition = args.condition + ` and f_sub_state = '待安装'`
250
+ } else if (this.$login.f.rolesnames.indexOf('运营部派工') !== -1) {
251
+ args.condition = args.condition + ` and f_sub_state = '待点火'`
252
+ } else {
253
+ args.condition = args.condition + ` and (f_sub_state = '待安装' or f_sub_state = '待点火')`
254
+ }
255
+
239
256
  this.model.search(args.condition, args.model)
240
257
  },
241
258
  search () {
@@ -39,6 +39,12 @@
39
39
  </div>
40
40
  </div>
41
41
  <div class="row" v-show="$parent.$parent.criteriaShow">
42
+ <div class="form-group col-sm-3">
43
+ <label class="font_normal_body">客户编号:</label>
44
+ <input type="text" style="width:60%" class="input_search" placeholder='客户编号' v-model="model.f_userinfo_code"
45
+ v-on:keyup.enter="$parent.$parent.search()"
46
+ condition="f_userinfo_code = '{}'">
47
+ </div>
42
48
  <div class="form-group col-sm-3">
43
49
  <label class="font_normal_body">联系电话:</label>
44
50
  <input type="text" style="width:60%" class="input_search" placeholder='联系电话' v-model="model.f_phone"
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <tab-button v-ref:list>
3
- <tabs header="数据处理">
3
+ <tabs header="数据处理" v-if="this.$login.f.rolesnames.indexOf('工程部派工') !== -1 || this.$login.f.rolesnames.indexOf('运营部派工') !== -1 || this.$login.f.rolesnames.indexOf('营业厅报装') !== -1">
4
4
  <handle-old-apply v-ref:handle></handle-old-apply>
5
5
  </tabs>
6
6
  <tabs header="数据查看">
@@ -4,13 +4,35 @@
4
4
  <template partial='head'>
5
5
  <tr>
6
6
  <th style="white-space: nowrap;">序号</th>
7
- <th v-for="field in $parent.model.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
7
+ <th v-for="field in $parent.$parent.onetomany.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
8
8
  <nobr>{{field.label}}</nobr>
9
9
  </th>
10
- <th v-if="!$parent.model.hiddenOperate">
11
- <button class="button_new" @click.prevent="$parent.$parent.openAdd()" v-if="!$parent.model.addHidden">
12
- <span :style="$parent.model.addStyle">{{ $parent.model.addText ? $parent.model.addText : '添加' }}</span>
10
+ <th v-if="!$parent.$parent.onetomany.hiddenOperate">
11
+ <button :style="$parent.$parent.onetomany.add.style"
12
+ :class="$parent.$parent.onetomany.add.class ? $parent.$parent.onetomany.add.class + ' button_spacing' : 'button_new button_spacing'"
13
+ v-if="!$parent.$parent.onetomany.add.hidden"
14
+ @click.prevent="$parent.$parent.openAdd()" >
15
+ {{ $parent.$parent.onetomany.add.text || '添加' }}
13
16
  </button>
17
+ <button :style="$parent.$parent.onetomany.import.style"
18
+ :class="$parent.$parent.onetomany.import.class ? $parent.$parent.onetomany.import.class + ' button_spacing' : 'button_export button_spacing'"
19
+ v-if="!$parent.$parent.onetomany.import.hidden"
20
+ @click.prevent="$parent.$parent.showFile = !$parent.$parent.showFile" >
21
+ {{ $parent.$parent.onetomany.import.text || '导入' }}
22
+ </button>
23
+ <a type="button" style="text-decoration: none"
24
+ class="button_export button_spacing"
25
+ v-if="$parent.$parent.onetomany.import.templateUrl"
26
+ :href="$parent.$parent.onetomany.import.templateUrl" download>模板下载</a>
27
+ <export-excel
28
+ v-if="!$parent.$parent.onetomany.export.hidden"
29
+ :data="$parent.$parent.getCondition"
30
+ :field="$parent.$parent.getField"
31
+ sqlurl="rs/logic/applyExportfile"
32
+ :sql-name="$parent.$parent.onetomany.export.sqlName || 'singleTable'"
33
+ :template-name="$parent.$parent.onetomany.export.templateName || '导出明细'"
34
+ :btn-name="$parent.$parent.onetomany.export.butName || '导出'"
35
+ :choose-col="true"></export-excel>
14
36
  </th>
15
37
  </tr>
16
38
  </template>
@@ -19,15 +41,21 @@
19
41
  <td style="text-align: center">
20
42
  <nobr><font>{{$index+1}}</font></nobr>
21
43
  </td>
22
- <td class="text-center" style="text-align: center" v-for="key in $parent.model.fields" v-if="!key.displayPosition || key.displayPosition === 'list'">
44
+ <td class="text-center" style="text-align: center" v-for="key in $parent.$parent.onetomany.fields" v-if="!key.displayPosition || key.displayPosition === 'list'">
23
45
  {{row[key.field]}}
24
46
  </td>
25
- <td style="text-align: center" v-if="!$parent.model.hiddenOperate">
26
- <button class="button_search button_spacing" @click.prevent="$parent.$parent.openUpdate($index)" v-if="!$parent.model.updateHidden">
27
- <span :style="$parent.model.updateStyle">{{ $parent.model.updateText ? $parent.model.updateText : '修改' }}</span>
47
+ <td style="text-align: center" v-if="!$parent.$parent.onetomany.hiddenOperate">
48
+ <button :style="$parent.$parent.onetomany.update.style"
49
+ :class="$parent.$parent.onetomany.update.class ? $parent.$parent.onetomany.update.class + ' button_spacing' : 'button_search button_spacing'"
50
+ v-if="!$parent.$parent.onetomany.update.hidden"
51
+ @click.prevent="$parent.$parent.openUpdate($index)" >
52
+ {{ $parent.$parent.onetomany.update.text || '修改' }}
28
53
  </button>
29
- <button class="button_delete button_spacing" @click.prevent="$parent.$parent.openDelete($index)" v-if="!$parent.model.deleteHidden">
30
- <span :style="$parent.model.deleteStyle">{{ $parent.model.deleteText ? $parent.model.deleteText : '删除' }}</span>
54
+ <button :style="$parent.$parent.onetomany.delete.style"
55
+ :class="$parent.$parent.onetomany.delete.class ? $parent.$parent.onetomany.delete.class + ' button_spacing' : 'button_delete button_spacing'"
56
+ v-if="!$parent.$parent.onetomany.delete.hidden"
57
+ @click.prevent="$parent.$parent.openDelete($index)" >
58
+ {{ $parent.$parent.onetomany.delete.text || '删除' }}
31
59
  </button>
32
60
  </td>
33
61
  </tr>
@@ -137,6 +165,19 @@
137
165
  </button>
138
166
  </footer>
139
167
  </modal>
168
+
169
+ <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
170
+ <header slot="modal-header" class="modal-header">
171
+ <button type="button" class="close" @click="closeFile()"><span>&times;</span></button>
172
+ <h4 class="modal-title">选择文件</h4>
173
+ </header>
174
+ <article slot="modal-body" class="modal-body">
175
+ <div class="form-group">
176
+ <file-upload class="my-file-uploader" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
177
+ </div>
178
+ </article>
179
+ <footer slot="modal-footer" class="modal-footer"></footer>
180
+ </modal>
140
181
  </div>
141
182
  </template>
142
183
 
@@ -146,6 +187,9 @@ import Vue from 'vue'
146
187
  export default {
147
188
  title: 'onetomany',
148
189
  props: {
190
+ selectdata: {
191
+ type: Object
192
+ },
149
193
  onetomany: {
150
194
  type: Object
151
195
  },
@@ -158,7 +202,8 @@ export default {
158
202
  disableButton: false,
159
203
  showModal: false,
160
204
  modelTitle: null,
161
- rowIndex: null
205
+ rowIndex: null,
206
+ showFile: false
162
207
  }
163
208
  },
164
209
  ready () {
@@ -166,15 +211,15 @@ export default {
166
211
  methods: {
167
212
  confirmModal () {
168
213
  if (this.modelTitle === '新增') {
169
- if (this.onetomany.addEvent) {
170
- this.$dispatch(this.onetomany.addEvent, this.index)
214
+ if (this.onetomany.add.event) {
215
+ this.$dispatch(this.onetomany.add.event, this.index)
171
216
  } else {
172
217
  this.$dispatch('onetomanyadd', this.index)
173
218
  }
174
219
  }
175
220
  if (this.modelTitle === '修改') {
176
- if (this.onetomany.updateEvent) {
177
- this.$dispatch(this.onetomany.updateEvent, this.index, this.rowIndex)
221
+ if (this.onetomany.update.event) {
222
+ this.$dispatch(this.onetomany.update.event, this.index, this.rowIndex)
178
223
  } else {
179
224
  this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
180
225
  }
@@ -207,10 +252,10 @@ export default {
207
252
  }
208
253
  },
209
254
  openDelete (rowIndex) {
210
- this.$showMessage(this.onetomany.deleteMessage ? this.onetomany.deleteMessage : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
255
+ this.$showMessage(this.onetomany.delete.message ? this.onetomany.delete.message : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
211
256
  if (res === 'confirm') {
212
- if (this.onetomany.deleteEvent) {
213
- this.$dispatch(this.onetomany.deleteEvent, this.index, rowIndex)
257
+ if (this.onetomany.delete.event) {
258
+ this.$dispatch(this.onetomany.delete.event, this.index, rowIndex)
214
259
  } else {
215
260
  this.$dispatch('onetomanydelete', this.index, rowIndex)
216
261
  }
@@ -229,8 +274,8 @@ export default {
229
274
  this.modelTitle = '修改'
230
275
  this.rowIndex = rowIndex
231
276
 
232
- if (this.onetomany.openUpdateEvent) {
233
- this.$dispatch(this.onetomany.openUpdateEvent, this.index, this.rowIndex)
277
+ if (this.onetomany.update.openEvent) {
278
+ this.$dispatch(this.onetomany.update.openEvent, this.index, this.rowIndex)
234
279
  }
235
280
  this.$dispatch('openUpdateModel', this.index, this.rowIndex)
236
281
 
@@ -241,8 +286,8 @@ export default {
241
286
  this.disableModalButton()
242
287
  this.modelTitle = '新增'
243
288
 
244
- if (this.onetomany.openAddEvent) {
245
- this.$dispatch(this.onetomany.openAddEvent, this.index)
289
+ if (this.onetomany.add.openEvent) {
290
+ this.$dispatch(this.onetomany.add.openEvent, this.index)
246
291
  }
247
292
  this.$dispatch('openAddModel', this.index)
248
293
 
@@ -273,11 +318,45 @@ export default {
273
318
  }
274
319
 
275
320
  this.disableButton = flag
321
+ },
322
+ // 关闭文件上传对话框
323
+ closeFile () {
324
+ this.showFile = false
325
+ // 将选的文件清空
326
+ this.$refs.file.$el.querySelector('input').value = ''
276
327
  }
277
328
  },
278
329
  computed: {
330
+ getField () {
331
+ if (this.onetomany.export.fields) {
332
+ return this.onetomany.export.fields
333
+ }
334
+ let field = {}
335
+ for (const item of this.onetomany.fields) {
336
+ if (item.displayPosition === 'form' || !item.displayPosition) {
337
+ field[item.field] = item.label
338
+ }
339
+ }
340
+ return field
341
+ },
342
+ getCondition () {
343
+ if (this.onetomany.export.condition) {
344
+ return this.onetomany.export.condition
345
+ }
346
+ return {
347
+ tablename: this.onetomany.tables[0],
348
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
349
+ }
350
+ }
279
351
  },
280
352
  events: {
353
+ async 'onFileUpload'(file, result) {
354
+ if (this.onetomany.import.event) {
355
+ this.$dispatch(this.onetomany.import.event, this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
356
+ } else {
357
+ this.$dispatch('importEvent', this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
358
+ }
359
+ }
281
360
  }
282
361
  }
283
362
  </script>
@@ -19,12 +19,12 @@
19
19
  v-on:keyup.enter="$parent.$parent.search()"
20
20
  condition="f_apply_num = '{}'">
21
21
  </div>
22
- <div class="form-group col-sm-3">
23
- <label class="font_normal_body">客户名称:</label>
24
- <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
25
- v-on:keyup.enter="$parent.$parent.search()" condition="f_user_name like '%{}%'" placeholder='客户名称'>
26
- </div>
27
22
  <div class="form-group col-sm-3 button-range">
23
+ <a type="button" class="button_new button_spacing" v-if="$parent.$parent.projectStart"
24
+ href="/apply/download/excel/散户报装模板.xlsx" download>模板下载</a>
25
+ <button class="button_new button_spacing" style="width: max-content"
26
+ v-if="$parent.$parent.projectStart"
27
+ @click="$parent.$parent.showFile = !$parent.$parent.showFile">批量散户导入</button>
28
28
  <button class="button_new button_spacing" style="width: max-content"
29
29
  v-if="$parent.$parent.projectStart"
30
30
  @click="$parent.$parent.showModal = !$parent.$parent.showModal">工程发起</button>
@@ -39,6 +39,11 @@
39
39
  </div>
40
40
  </div>
41
41
  <div class="row" v-show="$parent.$parent.criteriaShow">
42
+ <div class="form-group col-sm-3">
43
+ <label class="font_normal_body">客户名称:</label>
44
+ <input type="text" style="width:60%" class="input_search" v-model="model.f_user_name"
45
+ v-on:keyup.enter="$parent.$parent.search()" condition="f_user_name like '%{}%'" placeholder='客户名称'>
46
+ </div>
42
47
  <div class="form-group col-sm-3">
43
48
  <label class="font_normal_body">联系电话:</label>
44
49
  <input type="text" style="width:60%" class="input_search" placeholder='联系电话' v-model="model.f_phone"
@@ -214,6 +219,19 @@
214
219
  </div>
215
220
  </div>
216
221
  </modal>
222
+
223
+ <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
224
+ <header slot="modal-header" class="modal-header">
225
+ <button type="button" class="close" @click="closeFile"><span>&times;</span></button>
226
+ <h4 class="modal-title">选择文件</h4>
227
+ </header>
228
+ <article slot="modal-body" class="modal-body">
229
+ <div class="form-group">
230
+ <file-upload class="my-file-uploader" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
231
+ </div>
232
+ </article>
233
+ <footer slot="modal-footer" class="modal-footer"></footer>
234
+ </modal>
217
235
  </div>
218
236
  </template>
219
237
  <script>
@@ -237,7 +255,8 @@ import {HttpResetClass, PagedList} from 'vue-client'
237
255
  applytype: [{label: '全部', value: ''}, ...this.$appdata.getParam('报建类型')],
238
256
  defnames: [{label: '全部', value: ''}], // 流程节点
239
257
  applyNatures: [{label: '全部', value: ''}], // 报建性质
240
- criteriaShow: false
258
+ criteriaShow: false,
259
+ showFile: false
241
260
  }
242
261
  },
243
262
  ready () {
@@ -245,6 +264,12 @@ import {HttpResetClass, PagedList} from 'vue-client'
245
264
  this.search()
246
265
  },
247
266
  methods: {
267
+ closeFile () {
268
+ this.showFile = false
269
+ // 将选的文件清空
270
+ this.$refs.file.$el.querySelector('input').value = ''
271
+ this.search()
272
+ },
248
273
  // 点击操作
249
274
  click (val) {
250
275
  this.$dispatch('apply', val)
@@ -377,6 +402,17 @@ import {HttpResetClass, PagedList} from 'vue-client'
377
402
  }
378
403
  }
379
404
  }
405
+ },
406
+ events: {
407
+ async 'onFileUpload'(file, result) {
408
+ let data = {
409
+ filepath: result.f_downloadpath,
410
+ user: this.$login.f
411
+ }
412
+ let res = await this.$resetpost(`rs/logic/importApply`, {data:data}, {resolveMsg: null, rejectMsg: '导入失败!!!', silent: true}, 0)
413
+
414
+ this.closeFile()
415
+ }
380
416
  }
381
417
  }
382
418
  </script>
@@ -73,7 +73,7 @@
73
73
  </header>
74
74
  <article slot="modal-body" class="modal-body">
75
75
  <div class="form-group">
76
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
76
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
77
77
  </div>
78
78
  </article>
79
79
  <footer slot="modal-footer" class="modal-footer"></footer>