apply-clients 3.3.222 → 3.4.2-FuGu-4

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 (114) hide show
  1. package/build/css-loaders.js +34 -0
  2. package/build/dev-android.js +101 -0
  3. package/build/dev-client.js +8 -0
  4. package/build/dev-server-app.js +76 -0
  5. package/build/dev-server.js +119 -0
  6. package/build/example-server.js +80 -0
  7. package/build/release.sh +28 -0
  8. package/build/utils.js +80 -0
  9. package/build/webpack.base.conf.js +85 -0
  10. package/build/webpack.baseandroid.conf.js +84 -0
  11. package/build/webpack.dev.conf.js +51 -0
  12. package/build/webpack.devandroid.conf.js +34 -0
  13. package/build/webpack.example.conf.js +49 -0
  14. package/build/webpack.prod.conf.js +60 -0
  15. package/build/webpack.prodandroid.conf.js +60 -0
  16. package/build/webpack.test.conf.js +31 -0
  17. package/dingding.html +23 -0
  18. package/index.html +1 -1
  19. package/package.json +4 -3
  20. package/src/AndroidApp.vue +18 -13
  21. package/src/App.vue +20 -20
  22. package/src/DingDingApp.vue +51 -0
  23. package/src/android.js +1 -1
  24. package/src/apply.js +75 -91
  25. package/src/applyAndroid.js +25 -54
  26. package/src/applyDingDing.js +12 -0
  27. package/src/components/android/AppOnetomany.vue +37 -21
  28. package/src/components/android/AppServiceView.vue +3 -7
  29. package/src/components/android/AppSign.vue +3 -3
  30. package/src/components/android/AppTakePic.vue +12 -13
  31. package/src/components/android/Process/AppExplorationUser.vue +88 -38
  32. package/src/components/android/Process/AppServiceControl.vue +87 -16
  33. package/src/components/android/Process/Processes/AppInstallationDetails.vue +90 -100
  34. package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -0
  35. package/src/components/android/ProgressReport/ProgressReportList.vue +209 -0
  36. package/src/components/android/Supervisory/AppProcessSupervisory.vue +73 -152
  37. package/src/components/android/Supervisory/AppSupervisoryCart.vue +29 -23
  38. package/src/components/android/TaskGraph.vue +125 -0
  39. package/src/components/build/Install/ExplorationUser.vue +304 -0
  40. package/src/components/build/Install/Process/zhongran/ZR_Design.vue +537 -0
  41. package/src/components/product/ApplyCharge/ApplyChargeList.vue +36 -50
  42. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +3 -3
  43. package/src/components/product/ApplyCharge/printCharge.vue +142 -0
  44. package/src/components/product/Function/InstallFunction.vue +11 -2
  45. package/src/components/product/Function/InstallInfoSelect.vue +29 -47
  46. package/src/components/product/Function/Service/FunctionServiceControl.vue +172 -6
  47. package/src/components/product/Onetomany.vue +105 -24
  48. package/src/components/product/Order/OrderApply.vue +30 -30
  49. package/src/components/product/Order/OrderApplyList.vue +78 -67
  50. package/src/components/product/Order/OrderMessage.vue +11 -88
  51. package/src/components/product/Process/ExplorationSelect.vue +176 -149
  52. package/src/components/product/Process/ExplorationUser.vue +95 -85
  53. package/src/components/product/Process/Processes/InstallationDetails.vue +440 -352
  54. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +35 -9
  55. package/src/components/product/Process/Processes/chargeManagement.vue +634 -638
  56. package/src/components/product/Process/Processes/devicesManagement.vue +22 -2
  57. package/src/components/product/Process/Processes/selectApply.vue +1 -1
  58. package/src/components/product/Process/Service/ServiceControl.vue +1241 -883
  59. package/src/components/product/Process/Service/ShowBackReason.vue +33 -0
  60. package/src/components/product/ServiceView.vue +313 -423
  61. package/src/components/product/Stop/StopApply.vue +27 -25
  62. package/src/components/product/Stop/StopApplyList.vue +26 -11
  63. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +18 -349
  64. package/src/components/product/Supervisory/SupervisoryControl.vue +0 -8
  65. package/src/components/product/Supervisory/SupervisoryList.vue +27 -47
  66. package/src/components/product/Supervisory/SupervisoryhCart.vue +32 -54
  67. package/src/components/product/VueUtils/ApplyUpload.vue +273 -264
  68. package/src/components/product/VueUtils/HighMeter.vue +208 -0
  69. package/src/dingding.js +20 -0
  70. package/src/expandcssAndroid.less +879 -362
  71. package/src/main.js +1 -1
  72. package/src/components/android/Function/AppFunctionServiceControl.vue +0 -329
  73. package/src/components/android/Function/AppInstallFunction.vue +0 -330
  74. package/src/components/android/Order/ApplyOrder.vue +0 -141
  75. package/src/components/android/Process/Processes/AppBuildSign.vue +0 -47
  76. package/src/components/android/Process/Processes/AppChargeManagement.vue +0 -468
  77. package/src/components/android/Process/Processes/AppDevicesManagement.vue +0 -490
  78. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +0 -297
  79. package/src/components/android/Process/Processes/AppjiaSign.vue +0 -47
  80. package/src/components/android/Process/Processes/AppjiafangSign.vue +0 -47
  81. package/src/components/android/Process/Processes/ApptechnologySign.vue +0 -47
  82. package/src/components/image/danwei.png +0 -0
  83. package/src/components/image/dizhi.png +0 -0
  84. package/src/components/image/dwg.jpg +0 -0
  85. package/src/components/image/name.png +0 -0
  86. package/src/components/image/phone.png +0 -0
  87. package/src/components/image/type.png +0 -0
  88. package/src/components/image/yasuobao.jpg +0 -0
  89. package/src/components/image/zaixiantousu1.png +0 -0
  90. package/src/components/image/zizhukaitong.png +0 -0
  91. package/src/components/image//346/210/221/347/232/204.png +0 -0
  92. package/src/components/product/Function/Inform.vue +0 -73
  93. package/src/components/product/Function/MarketSurvey.vue +0 -81
  94. package/src/components/product/Process/Processes/printCharge.vue +0 -121
  95. package/src/components/product/Process/ShowBackReason.vue +0 -33
  96. package/src/components/product/Supervisory/Service/printChargeNode.vue +0 -873
  97. package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +0 -1090
  98. package/src/components/product/VueUtils/ToolsPage.vue +0 -51
  99. package/src/components/product/VueUtils/Tree.vue +0 -330
  100. package/src/filiale/wuan/android.js +0 -0
  101. package/src/filiale/wuan/pc.js +0 -4
  102. package/src/filiale/yuchuan/android/AppServiceView.vue +0 -599
  103. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +0 -414
  104. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +0 -456
  105. package/src/filiale/yuchuan/android/Reserve/ApplyReserve.vue +0 -200
  106. package/src/filiale/yuchuan/android/SiteSurvey/TaskGraph.vue +0 -137
  107. package/src/filiale/yuchuan/android.js +0 -8
  108. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +0 -517
  109. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +0 -343
  110. package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +0 -356
  111. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +0 -131
  112. package/src/filiale/yuchuan/pc/Process/Processes/MapCom.vue +0 -51
  113. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +0 -517
  114. package/src/filiale/yuchuan/pc.js +0 -13
@@ -150,13 +150,158 @@
150
150
  this.$nextTick(() => {
151
151
  this.showview = true
152
152
  })
153
+ },
154
+ // 金额转大写
155
+ smalltoBIG(n) {
156
+ let fraction = ['角', '分'];
157
+ let digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
158
+ let unit = [['元', '万', '亿'], ['', '拾', '佰', '仟']];
159
+ let head = n < 0 ? '欠' : '';
160
+ n = Math.abs(n);
161
+
162
+ let s = '';
163
+
164
+ for (var i = 0; i < fraction.length; i++) {
165
+ s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
166
+ }
167
+ s = s || '整';
168
+ n = Math.floor(n);
169
+
170
+ for (var i = 0; i < unit[0].length && n > 0; i++) {
171
+ let p = '';
172
+ for (var j = 0; j < unit[1].length && n > 0; j++) {
173
+ p = digit[n % 10] + unit[1][j] + p;
174
+ n = Math.floor(n / 10);
175
+ }
176
+ s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
177
+ }
178
+ return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整')
179
+ },
180
+ getLableValue(label) {
181
+ for (const item of this.show_data.fields) {
182
+ if (item.label === label && item.type !== 'number') {
183
+ return item.value || ''
184
+ }
185
+ if (item.label === label && item.type === 'number') {
186
+ return item.value || 0
187
+ }
188
+ }
189
+ },
190
+ getLableOptions(label) {
191
+ for (const item of this.show_data.fields) {
192
+ if (item.label === label) {
193
+ return item.options
194
+ }
195
+ }
196
+ },
197
+ setLabelValue(label, value) {
198
+ for (const item of this.show_data.fields) {
199
+ if (item.label === label) {
200
+ item.value = value
201
+ this.show_data[item.field] = value
202
+ }
203
+ }
204
+ },
205
+ setLabelOptions(label, options) {
206
+ for (const item of this.show_data.fields) {
207
+ if (item.label === label) {
208
+ item.options = options
209
+ }
210
+ }
211
+ },
212
+ showLabels(...labels) {
213
+ for (const item of this.show_data.fields) {
214
+ if (labels.includes(item.label)) {
215
+ item.hidden = false
216
+ }
217
+ }
218
+ },
219
+ hideLabels(...labels) {
220
+ for (const item of this.show_data.fields) {
221
+ if (labels.includes(item.label)) {
222
+ item.hidden = true
223
+ }
224
+ }
225
+ },
226
+ showButtons(...buttons) {
227
+ for (const item of this.show_data.buttons) {
228
+ if (buttons.includes(item.button_name)) {
229
+ item.hidden = false
230
+ }
231
+ }
232
+ },
233
+ hideButtons(...buttons) {
234
+ for (const item of this.show_data.buttons) {
235
+ if (buttons.includes(item.button_name)) {
236
+ item.hidden = true
237
+ }
238
+ }
239
+ },
240
+ requiredLabels(...labels) {
241
+ for (const item of this.show_data.fields) {
242
+ if (labels.includes(item.label)) {
243
+ item.required = true
244
+ }
245
+ }
246
+ },
247
+ electiveLabels(...labels) {
248
+ for (const item of this.show_data.fields) {
249
+ if (labels.includes(item.label)) {
250
+ item.required = false
251
+ }
252
+ }
253
+ },
254
+ readonlyLabels(...labels) {
255
+ for (const item of this.show_data.fields) {
256
+ if (labels.includes(item.label)) {
257
+ item.readonly = true
258
+ item.disabled = true
259
+ }
260
+ }
261
+ },
262
+ readwriteLabels(...labels) {
263
+ for (const item of this.show_data.fields) {
264
+ if (labels.includes(item.label)) {
265
+ item.readonly = false
266
+ item.disabled = false
267
+ }
268
+ }
269
+ },
270
+ disabledButtons(...buttons) {
271
+ for (const item of this.show_data.buttons) {
272
+ if (buttons.includes(item.button_name)) {
273
+ item.disabled = true
274
+ }
275
+ }
276
+ },
277
+ enableButtons(...buttons) {
278
+ for (const item of this.show_data.buttons) {
279
+ if (buttons.includes(item.button_name)) {
280
+ item.disabled = false
281
+ }
282
+ }
283
+ },
284
+ async checkDuplicate(index) {
285
+ let http = new HttpResetClass()
286
+ let data = {
287
+ tablename: 't_apply',
288
+ condition: `${this.show_data.fields[index].field} = '${this.show_data.fields[index].value}'`
289
+ }
290
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
291
+ resolveMsg: null,
292
+ rejectMsg: `${this.show_data.fields[index].label}查询失败`
293
+ })
294
+ if (res.data.length > 0) {
295
+ this.show_data.fields[index].value = null
296
+ this.$showAlert(`${this.show_data.fields[index].label}已存在!!!`, 'warning', 3000)
297
+ }
153
298
  }
154
299
  },
155
300
  events: {
156
301
  async 'stopApply' () {
157
302
 
158
303
  let data = {
159
- data: this.show_data,
304
+ apply: this.show_data,
160
305
  user: this.$login.f
161
306
  }
162
307
 
@@ -166,12 +311,12 @@
166
311
  {resolveMsg: null, rejectMsg: '终止报建失败!!!'}
167
312
  )
168
313
 
169
- this.$dispatch('search')
314
+ this.$dispatch('loadPage')
170
315
  },
171
316
  async 'pauseApply' () {
172
317
 
173
318
  let data = {
174
- data: this.show_data,
319
+ apply: this.show_data,
175
320
  user: this.$login.f
176
321
  }
177
322
 
@@ -181,7 +326,7 @@
181
326
  {resolveMsg: null, rejectMsg: '暂停报建失败!!!'}
182
327
  )
183
328
 
184
- this.$dispatch('search')
329
+ this.$dispatch('loadPage')
185
330
  },
186
331
  // 获取view层button事件
187
332
  async 'button' (){
@@ -192,7 +337,7 @@
192
337
  {resolveMsg: null, rejectMsg: '数据保存失败!!!'}
193
338
  )
194
339
 
195
- this.$dispatch('search')
340
+ this.$dispatch('loadPage')
196
341
  },
197
342
  // 失去焦点出触发事件
198
343
  'onchange' (index) {
@@ -219,6 +364,11 @@
219
364
  {resolveMsg: null, rejectMsg: '删除失败!!!'}
220
365
  )
221
366
 
367
+ res = await this.$resetpost(
368
+ 'rs/entity/t_apply',
369
+ this.show_data
370
+ )
371
+
222
372
  this.$dispatch('breakControl', this.show_data)
223
373
  },
224
374
  async 'onetomanyupdate' (index, rowIndex) {
@@ -232,11 +382,21 @@
232
382
  data
233
383
  )
234
384
 
385
+ res = await this.$resetpost(
386
+ 'rs/entity/t_apply',
387
+ this.show_data
388
+ )
389
+
235
390
  this.$dispatch('breakControl', this.show_data)
236
391
  },
237
392
  async 'onetomanyadd' (index) {
238
393
  let data = {
239
- f_process_id : this.show_data.f_process_id
394
+ f_process_id : this.show_data.f_process_id,
395
+ f_operator_id: this.$login.f.id,
396
+ f_operator: this.$login.f.name,
397
+ f_operation_date: new Date().Format('yyyy-MM-dd HH:mm:ss'),
398
+ f_orgid: this.$login.f.orgid,
399
+ f_orgname: this.$login.f.orgs
240
400
  }
241
401
  this.show_data.onetomany[index].fields.forEach(item => {
242
402
  data[item.field] = item.value
@@ -245,6 +405,12 @@
245
405
  `rs/entity/${this.show_data.onetomany[index].tables[0]}`,
246
406
  data
247
407
  )
408
+
409
+ res = await this.$resetpost(
410
+ 'rs/entity/t_apply',
411
+ this.show_data
412
+ )
413
+
248
414
  this.$dispatch('breakControl', this.show_data)
249
415
  }
250
416
  },
@@ -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,6 +274,9 @@ export default {
229
274
  this.modelTitle = '修改'
230
275
  this.rowIndex = rowIndex
231
276
 
277
+ if (this.onetomany.update.openEvent) {
278
+ this.$dispatch(this.onetomany.update.openEvent, this.index, this.rowIndex)
279
+ }
232
280
  this.$dispatch('openUpdateModel', this.index, this.rowIndex)
233
281
 
234
282
  this.showModal = true
@@ -238,6 +286,9 @@ export default {
238
286
  this.disableModalButton()
239
287
  this.modelTitle = '新增'
240
288
 
289
+ if (this.onetomany.add.openEvent) {
290
+ this.$dispatch(this.onetomany.add.openEvent, this.index)
291
+ }
241
292
  this.$dispatch('openAddModel', this.index)
242
293
 
243
294
  this.showModal = true
@@ -257,21 +308,51 @@ export default {
257
308
  let flag = false
258
309
 
259
310
  for (const field of this.onetomany.fields) {
260
- if (field.required && !field.value) {
261
- if (field.value === 0) {
262
- flag = false
263
- } else {
264
- flag = true
265
- }
311
+ if (field.required && !field.value && !field.hidden && field.value !== 0) {
312
+ flag = true
266
313
  }
267
314
  }
268
315
 
269
316
  this.disableButton = flag
317
+ },
318
+ // 关闭文件上传对话框
319
+ closeFile () {
320
+ this.showFile = false
321
+ // 将选的文件清空
322
+ this.$refs.file.$el.querySelector('input').value = ''
270
323
  }
271
324
  },
272
325
  computed: {
326
+ getField () {
327
+ if (this.onetomany.export.fields) {
328
+ return this.onetomany.export.fields
329
+ }
330
+ let field = {}
331
+ for (const item of this.onetomany.fields) {
332
+ if (item.displayPosition === 'form' || !item.displayPosition) {
333
+ field[item.field] = item.label
334
+ }
335
+ }
336
+ return field
337
+ },
338
+ getCondition () {
339
+ if (this.onetomany.export.condition) {
340
+ return this.onetomany.export.condition
341
+ }
342
+ return {
343
+ tablename: this.onetomany.tables[0],
344
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
345
+ }
346
+ }
273
347
  },
274
348
  events: {
349
+ async 'onFileUpload'(file, result) {
350
+ if (this.onetomany.import.event) {
351
+ this.$dispatch(this.onetomany.import.event, this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
352
+ } else {
353
+ this.$dispatch('importEvent', this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
354
+ }
355
+ }
275
356
  }
276
357
  }
277
358
  </script>
@@ -9,39 +9,39 @@
9
9
  </div>
10
10
  </template>
11
11
  <script>
12
- import Vue from 'vue'
13
- import {HttpResetClass} from 'vue-client'
14
- export default {
15
- title: '预约报建',
16
- data () {
17
- return {
18
- showRight: false,
19
- type: null,
20
- selectdata: null
21
- }
22
- },
23
- methods: {
24
- },
25
- events: {
26
- 'handleOrder' (type, row) {
27
- this.showRight = false
12
+ import Vue from 'vue'
13
+ import {HttpResetClass} from 'vue-client'
14
+ export default {
15
+ title: '预约报建',
16
+ data () {
17
+ return {
18
+ showRight: false,
19
+ type: null,
20
+ selectdata: null
21
+ }
22
+ },
23
+ methods: {
24
+ },
25
+ events: {
26
+ 'handleOrder' (type, row) {
27
+ this.showRight = false
28
28
 
29
- this.type = type
30
- this.selectdata = row
29
+ this.type = type
30
+ this.selectdata = row
31
31
 
32
- this.$nextTick(() => {
33
- this.showRight = true
34
- })
35
- },
36
- 'search' () {
37
- this.selectdata = null
38
- this.showRight = false
39
- this.type = null
32
+ this.$nextTick(() => {
33
+ this.showRight = true
34
+ })
35
+ },
36
+ 'search' () {
37
+ this.selectdata = null
38
+ this.showRight = false
39
+ this.type = null
40
40
 
41
- this.$refs.query.$refs.cp.$refs.cri.search()
41
+ this.$refs.query.$refs.cp.$refs.cri.search()
42
+ }
43
+ },
44
+ watch: {
42
45
  }
43
- },
44
- watch: {
45
46
  }
46
- }
47
47
  </script>