apply-clients 3.0.2 → 3.0.5-2

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 (66) hide show
  1. package/dist.zip +0 -0
  2. package/index.html +1 -1
  3. package/package.json +4 -3
  4. package/src/App.vue +126 -15
  5. package/src/apply.js +18 -0
  6. package/src/bootstrap/fonts/PingFangSC-Regular.ttf +0 -0
  7. package/src/bootstrap/less/bootstrap.less +1 -2
  8. package/src/bootstrap/less/standard.less +208 -0
  9. package/src/components/Util.js +4 -0
  10. package/src/components/app_apply/FieldExploration.vue +2 -2
  11. package/src/components/app_apply/Ventilation.vue +2 -2
  12. package/src/components/image/doc.jpg +0 -0
  13. package/src/components/image/excel.jpg +0 -0
  14. package/src/components/image/pdf.jpg +0 -0
  15. package/src/components/image//345/233/276/345/261/20212.png +0 -0
  16. package/src/components/image//345/233/276/345/261/20213.png +0 -0
  17. package/src/components/image//345/233/276/345/261/20216.png +0 -0
  18. package/src/components/image//345/244/232/350/276/271/345/275/2422.png +0 -0
  19. package/src/components/image//345/244/232/350/276/271/345/275/2422/346/213/267/350/264/235.png +0 -0
  20. package/src/components/image//346/244/255/345/234/2062.png +0 -0
  21. package/src/components/image//346/244/255/345/234/2065.png +0 -0
  22. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/235.png +0 -0
  23. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2352.png +0 -0
  24. package/src/components/image//346/244/255/345/234/2065/346/213/267/350/264/2353.png +0 -0
  25. package/src/components/image//347/273/2044.png +0 -0
  26. package/src/components/image//347/273/2045.png +0 -0
  27. package/src/components/image//347/273/2046.png +0 -0
  28. package/src/components/image//350/257/235/345/212/241/347/273/237/350/256/241/346/225/260/346/215/256/345/261/225/347/244/272.png +0 -0
  29. package/src/components/product/Function/InstallFunction.vue +9 -8
  30. package/src/components/product/Function/InstallInfoSelect.vue +98 -69
  31. package/src/components/product/Function/Service/FunctionServiceControl.vue +81 -3
  32. package/src/components/product/Function/functions/AddContract.vue +161 -139
  33. package/src/components/product/Function/functions/BuyerMessage.vue +522 -0
  34. package/src/components/product/Function/functions/InstallFee.vue +1117 -891
  35. package/src/components/product/MaterialBatchList.vue +109 -0
  36. package/src/components/product/MaterialBatchManage.vue +34 -0
  37. package/src/components/product/Procedures/ProceduresDataGrid.vue +1022 -0
  38. package/src/components/product/Process/ExplorationSelect.vue +208 -73
  39. package/src/components/product/Process/ExplorationUser.vue +94 -42
  40. package/src/components/product/Process/MaterialUseList.vue +159 -0
  41. package/src/components/product/Process/ModifyUserFiles.vue +15 -5
  42. package/src/components/product/Process/ProcessInfo/history_control.vue +139 -110
  43. package/src/components/product/Process/Processes/ApplyUpload.vue +279 -0
  44. package/src/components/product/Process/Processes/CustomerMaterialMessage.vue +501 -212
  45. package/src/components/product/Process/Processes/CustomerRecordMessage.vue +949 -753
  46. package/src/components/product/Process/Processes/ProjectSettlement.vue +549 -35
  47. package/src/components/product/Process/Processes/ReceiveBatch.vue +314 -168
  48. package/src/components/product/Process/Processes/Service/ApplyChangeHistory.vue +105 -0
  49. package/src/components/product/Process/Processes/Service/ApplyChargeSearch.vue +44 -16
  50. package/src/components/product/Process/Processes/Service/ServiceControl.vue +2495 -1008
  51. package/src/components/product/Process/Processes/Upload.vue +532 -0
  52. package/src/components/product/Process/ShowBackReason.vue +1 -1
  53. package/src/components/product/ServiceView.vue +364 -124
  54. package/src/components/product/Statistics/ApplyStatisticsROOT.vue +27 -0
  55. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +212 -23
  56. package/src/components/product/Supervisory/SupervisoryControl.vue +79 -29
  57. package/src/components/product/Supervisory/SupervisoryList.vue +182 -41
  58. package/src/components/product/Supervisory/SupervisoryhCart.vue +4 -2
  59. package/src/components/product/VueUtils/Tree.vue +330 -0
  60. package/src/components/product/VueUtils/rightview/InstallCardList2.vue +29 -38
  61. package/src/main.js +2 -0
  62. package/src/stores/ApplyLoadParams.js +1 -1
  63. package/src/stores/PagedListLogic.js +173 -0
  64. package/.npmignore +0 -12
  65. package/node_modules.7z +0 -0
  66. package/yarn.lock +0 -9008
@@ -0,0 +1,522 @@
1
+ <template>
2
+ <div class="auto col-sm-12" style="padding-right:5px;" v-if="templateshow">
3
+ <div class="panel panel-info">
4
+ <div class="panel-heading" v-if="title_show">
5
+ <h3 class="panel-title text-center"><span style="cursor: pointer;" class="pull-left">{{title}}</span></h3>
6
+ </div>
7
+ <div class="col-sm-12" v-for="(i,datagrid) in data.onetomany">
8
+ <table v-show="!datagrid.hidden" class="table table-bordered table-striped table-hover">
9
+ <tr style="background-color: #00A3F0">
10
+ <th style="border-color: #00A3F0"><font color="white">序号</font></th>
11
+ <th v-for="labels in datagrid.fields" style="text-align: center;border-color: #00A3F0">
12
+ <nobr><font color="white">{{labels.label}}</font></nobr>
13
+ </th>
14
+ <th style="text-align: center;border-color: #00A3F0;padding: 0px" v-if="showprint">
15
+ <button type="button" @click="$dispatch('add',i)" class="btn btn-warning">
16
+ +
17
+ </button>
18
+ </th>
19
+ </tr>
20
+ <tr v-for="(j,row) in model.rows[i]">
21
+ <td style="text-align: center">{{$index+1}}</td>
22
+ <td v-for="key in surBodyData[i]" style="text-align: center">
23
+ {{row[key]}}
24
+ </td>
25
+ <td style="text-align: center">
26
+ <a href="#" @click="revise(i,j)" v-if="showprint">修改</a>
27
+ |<a href="#" @click="deleted(i,j)" v-if="showprint">删除</a>
28
+ </td>
29
+ </tr>
30
+ </table>
31
+ </div>
32
+ <!-- onetomany新增模态框 -->
33
+ <div class="auto"
34
+ style="margin-left: 20vw;max-width: 700px;max-hight:500px;z-index:8888;box-shadow: 0px 0px 100px 10px grey;position: fixed;"
35
+ v-if="showadd">
36
+ <div class="auto" style="background-color:white;">
37
+ <div style="padding-top: 15px;padding-left: 15px;padding-right: 15px;border-bottom: 0px solid #e5e5e5;">
38
+ <span><font size="3">{{modeltitle}}</font></span>
39
+ <button type="button;float:right" class="close" @click="closemodal(modeltitle)"><span>&times;</span>
40
+ </button>
41
+ </div>
42
+            
43
+ <div style="padding-top: 15px;border-top: 1px solid #e5e5e5;border-bottom: 1px solid #e5e5e5;">
44
+ <div class="col-sm-12" v-for="(index,showadd_field) in showadd_fields.fields" v-if="refresh_modal">
45
+ <label
46
+ :class="showadd_field.required&&!showadd_fields.fields[index].value?'has-error control-label col-sm-3' : 'control-label col-sm-3'"
47
+ style="margin-top: 10px" v-if="!showadd_field.hidden">{{showadd_field.label}}:</label>
48
+ <div class="col-sm-7">
49
+ <!--时间datepicker-->
50
+ <div v-if="showadd_field.type=='datepicker'"
51
+ :class="[showadd_fields[index].required&&!(showadd_fields.fields[index].value) ? 'has-error' : '']">
52
+ <div>
53
+ <datepicker
54
+ :width="'100%'"
55
+ :placeholder="showadd_field.placeholder"
56
+ :value.sync="showadd_fields.fields[index].value"
57
+ :format="'yyyy-MM-dd HH:mm:ss'"
58
+ v-model="showadd_fields.fields[index].value"
59
+ :readonly=true
60
+ :disabled="showadd_fields.fields[index].disabled"
61
+ @blur="check_disable"
62
+ :show-reset-button="reset">
63
+ </datepicker>
64
+ </div>
65
+ </div>
66
+ <!--select-->
67
+ <input-select
68
+ @change="select_change_modal(index),disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
69
+ v-if="showadd_field.type=='select'"
70
+ :value.sync="showadd_fields.fields[index].value"
71
+ v-model="showadd_fields.fields[index].value"
72
+ :options='showadd_fields.fields[index].options'
73
+ :class="showadd_field.required&&!showadd_fields.fields[index].value?'has-error form-control' : 'form-control'"
74
+ @blur="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
75
+ :mouseout="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)">
76
+ </input-select>
77
+ <!-- input -->
78
+ <input :for="showadd_fields.fields[index].value" :type="showadd_field.type"
79
+ @change="select_change_modal(index),check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
80
+ v-if="(showadd_field.type=='input'||showadd_field.type=='number'||showadd_field.type=='email'||showadd_field.type=='url'||showadd_field.type=='range'||showadd_field.type=='search'||showadd_field.type=='color')&&!showadd_field.hidden"
81
+ v-model="showadd_fields.fields[index].value"
82
+ :value.sync="showadd_fields[index].value"
83
+ @blur="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
84
+ class="form-control"
85
+ :mouseout="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"/>
86
+ <span
87
+ v-if="showadd_fields.fields[index].error&&showadd_fields.fields[index].error.msg&&showadd_fields.fields[index].error.flag"
88
+ style="color: red">{{showadd_fields.fields[index].error.msg}}</span>
89
+ </div>
90
+ </div>
91
+          
92
+ </div>
93
+ <div
94
+ style="padding-top: 15px;padding-left: 15px;padding-right: 15px;text-align: right;border-top: 0px solid #e5e5e5;">
95
+ <button :class="disable_button_modal?'btn btn-default':'btn btn-primary'" v-show="showadd"
96
+ :disabled="disable_button_modal" type="button" @click="acknowledge(modeltitle)">
97
+ 确认
98
+ </button>
99
+ </div>
100
+  
101
+ </div>
102
+ </div>
103
+
104
+ </div>
105
+ </div>
106
+ </template>
107
+ <script>
108
+ import {HttpResetClass} from 'vue-client'
109
+ import Vue from 'vue'
110
+
111
+ export default {
112
+ title: '基本信息',
113
+ // props: ['griddata', 'gridtitle', 'selectdata'],
114
+ props: {
115
+ griddata: {
116
+ type: Object,
117
+ default: {}
118
+ },
119
+ selectdata: {
120
+ type: Object,
121
+ default: {}
122
+ },
123
+ showprint: {
124
+ type: Boolean,
125
+ default: true,
126
+ }
127
+ },
128
+ data() {
129
+ return {
130
+ templateshow: true,
131
+ title: '',
132
+ title_show: true,
133
+ tempid: null,
134
+ data: null,
135
+ surBodyData: [],
136
+ refresh: true, // 控制重新渲染
137
+ model: {
138
+ rows: [],
139
+ button: {
140
+ button_name: null,
141
+ button_index: null
142
+ },
143
+ f_filiale: null,
144
+ f_parentname: null,
145
+ f_operate_date: null,
146
+ f_operator: null
147
+ },
148
+ showadd: false, // onetomany 新增模态框
149
+ showadd_fields: [], // onetomany 新增模态框的字段配置
150
+ data: null,
151
+ showadd_index: null,
152
+ showmodal: false,
153
+ modeltitle: null,
154
+ refresh_modal: true,
155
+ disable_button_modal: true,
156
+ }
157
+ },
158
+ ready() {
159
+ this.title = '购买方信息'
160
+ this.data = {
161
+ onetomany: [
162
+ {
163
+ tables: ["t_buyer_info"],
164
+ safedelete: true,
165
+ hidden: false,
166
+ fields: [
167
+ {
168
+ label: "购货方名称",
169
+ type: "input",
170
+ bootstraped: "col-sm-4",
171
+ label_bootstraped: "col-sm-3",
172
+ value_bootstraped: "col-sm-9",
173
+ field: "f_buyer_name",
174
+ placeholder: "请输入",
175
+ required: true,
176
+ readonly: false
177
+ },
178
+ {
179
+ label: "购货方纳税人识别号",
180
+ type: "input",
181
+ bootstraped: "col-sm-4",
182
+ label_bootstraped: "col-sm-3",
183
+ value_bootstraped: "col-sm-9",
184
+ field: "f_buyer_identify",
185
+ placeholder: "请输入",
186
+ readonly: false,
187
+ required: true,
188
+ disabled: false,
189
+ error: {
190
+ flag: false,
191
+ msg: '购货方纳税人识别号必须为15位,18位或者20位'
192
+ }
193
+ },
194
+ {
195
+ label: "购货方地址、电话",
196
+ type: "input",
197
+ bootstraped: "col-sm-4",
198
+ label_bootstraped: "col-sm-3",
199
+ value_bootstraped: "col-sm-9",
200
+ field: "f_buyer_addphone",
201
+ placeholder: "请输入",
202
+ readonly: false,
203
+ disabled: false
204
+ },
205
+ {
206
+ label: "购货方开户行及账号",
207
+ type: "input",
208
+ bootstraped: "col-sm-4",
209
+ label_bootstraped: "col-sm-3",
210
+ value_bootstraped: "col-sm-9",
211
+ field: "f_buyer_bank",
212
+ placeholder: "请输入",
213
+ readonly: false,
214
+ disabled: false
215
+ },
216
+ {
217
+ label: "购货方电子邮箱",
218
+ type: "email",
219
+ bootstraped: "col-sm-4",
220
+ label_bootstraped: "col-sm-3",
221
+ value_bootstraped: "col-sm-9",
222
+ field: "f_buyer_email",
223
+ placeholder: "请输入",
224
+ readonly: false,
225
+ disabled: false
226
+ }
227
+ ]
228
+ }
229
+ ]
230
+ }
231
+ this.load()
232
+ },
233
+ methods: {
234
+ // 模态框级联操作预留
235
+ select_change_modal(index) {
236
+ if (this.showadd_fields.fields[index].value) {
237
+ this.showadd_fields[index] = {}
238
+ this.showadd_fields[index].value = this.showadd_fields.fields[index].value
239
+ } else if (this.showadd_fields[index] && this.showadd_fields[index].value) {
240
+ this.showadd_fields.fields[index].value = this.showadd_fields[index].value
241
+ }
242
+ this.refresh_modal = false
243
+ this.$nextTick(() => {
244
+ this.refresh_modal = true
245
+ })
246
+ // this.$dispatch('select_cascade_modal', index)
247
+ if (this.showadd_fields.fields[index].label == '购货方纳税人识别号') {
248
+ if (this.showadd_fields.fields[index].value.length != 15 && this.showadd_fields.fields[index].value.length != 18 && this.showadd_fields.fields[index].value.length != 20) {
249
+ this.showadd_fields.fields[index].error.flag = true
250
+ this.clear_showadd_fields_value(index)
251
+ } else {
252
+ this.showadd_fields.fields[index].error.flag = false
253
+ }
254
+ }
255
+ },
256
+ // 清理
257
+ clear_showadd_fields_value(index) {
258
+ this.showadd_fields.fields[index].value = ''
259
+ this.showadd_fields[index].value = ''
260
+ },
261
+ // 检测模态框按钮的disable
262
+ disabled_check_modal(required, value) {
263
+ if (required && value) {
264
+ this.disable_button_modal = false
265
+
266
+ let fields = this.showadd_fields.fields
267
+ let flag = false
268
+ for (let i = 0; i < fields.length; i++) {
269
+ if (fields[i].type !== 'checkbox' && fields[i].required && !fields[i].value) {
270
+ flag = true
271
+ }
272
+ }
273
+ this.disable_button_modal = flag
274
+ }
275
+ },
276
+ check_disable_modal() {
277
+ let fields = this.showadd_fields.fields
278
+ let flag = false
279
+ for (let i = 0; i < fields.length; i++) {
280
+ if (fields[i].type !== 'checkbox' && fields[i].required && !fields[i].value) {
281
+ flag = true
282
+ }
283
+ }
284
+ let count = 0
285
+ for (let i = 0; i < fields.length; i++) {
286
+ if (fields[i].type !== 'checkbox' && !fields[i].required) {
287
+ count++
288
+ }
289
+ }
290
+ if (count = 0) {
291
+ flag = false
292
+ }
293
+ this.disable_button_modal = flag
294
+ },
295
+ // 删除
296
+ deleted(i, j) {
297
+ this.$showMessage("您确定要删除这条记录吗?", ['confirm']).then((res) => {
298
+ if (res == 'confirm') {
299
+ this.onetomanydelete(i, j)
300
+ }
301
+ })
302
+ },
303
+ // 修改
304
+ revise(index, index2) {
305
+ this.showadd_fields = []
306
+ let templet = new Object()
307
+ templet = this.data.onetomany[index]
308
+ for (let j = 0; j < templet.fields.length; j++) {
309
+ if (templet.fields[j].type == 'input') {
310
+ templet[j] = {}
311
+ templet[j].value = this.model.rows[index][index2][templet.fields[j].field]
312
+ templet.fields[j].value = this.model.rows[index][index2][templet.fields[j].field]
313
+ } else {
314
+ templet.fields[j].value = this.model.rows[index][index2][templet.fields[j].field]
315
+ if (templet.fields[j].type == 'datepicker') {
316
+ templet.fields[j].value = new Date().Format("yyyy-MM-dd HH:mm:ss")
317
+ }
318
+ }
319
+ }
320
+ this.tempid = this.model.rows[index][index2].id
321
+ this.modeltitle = '修改'
322
+ this.showadd_fields = templet
323
+ this.showadd_index = index
324
+ this.showadd = true
325
+ },
326
+ async onetomanydelete(i, j) {
327
+ let http = new HttpResetClass()
328
+ let data = {
329
+ tables: this.data.onetomany[i].tables,
330
+ row: this.model.rows[i][j]
331
+ }
332
+ await http.load('POST', 'rs/logic/applyDeleteValue', {data: data}, {
333
+ resolveMsg: null,
334
+ rejectMsg: 'onetomanydelete失败'
335
+ }).then(() => {
336
+ this.$dispatch('selfsearch')
337
+ this.model.rows[i].splice(j, 1)
338
+ })
339
+ },
340
+ //获取view层confirm事件
341
+ async confirm(tables, row, showadd_index, j) {
342
+ var _this = this
343
+ for (let i = 0; i < tables.length; i++) {
344
+ let datas = {
345
+ tables: tables,
346
+ row: row
347
+ }
348
+ datas.row['f_process_id'] = this.selectdata.f_process_id
349
+ datas.row['f_apply_num'] = this.selectdata.f_apply_num
350
+ datas.row['f_filiale'] = this.selectdata.f_filiale
351
+ datas.row['f_operator'] = this.$login.f.name
352
+ datas.row['f_parentname'] = this.$login.f.f_parentname
353
+ datas.row['f_operator_date'] = new Date().Format("yyyy-MM-dd HH:mm:ss")
354
+ let http = new HttpResetClass()
355
+ if (tables[i] == 't_charge_record') {
356
+ await http.load('POST', 'rs/logic/applycharge', datas, {
357
+ resolveMsg: null,
358
+ rejectMsg: '收费保存失败'
359
+ }).then((res) => {
360
+ for (let i = 0; i < this.data.fields.length; i++) {
361
+
362
+ if (this.data.fields[i].label == '累计缴费金额') {
363
+ this.data.fields[i].value = res.data.f_cumulative_money
364
+ }
365
+
366
+ if (this.data.fields[i].label == '未结总金额') {
367
+ this.data.fields[i].value = res.data.f_unaccounts_money
368
+ }
369
+ }
370
+ })
371
+ } else {
372
+ await http.load('POST', 'rs/logic/saveentity', datas, {
373
+ resolveMsg: null,
374
+ rejectMsg: 'onetomany保存失败'
375
+ }).then((res) => {
376
+ this.load()
377
+ })
378
+ }
379
+ }
380
+ },
381
+ // 模态框点击确定按钮
382
+ acknowledge(val) {
383
+ let temp = {}
384
+ console.log('点击按钮后的this.showadd_fields.fields=>' + JSON.stringify(this.showadd_fields.fields))
385
+ for (let i = 0; i < this.showadd_fields.fields.length; i++) {
386
+ if (this.showadd_fields.fields[i].value) {
387
+ temp[this.showadd_fields.fields[i].field] = this.showadd_fields.fields[i].value
388
+ } else {
389
+ if(this.showadd_fields[i]&&this.showadd_fields[i].value){
390
+ temp[this.showadd_fields.fields[i].field] = this.showadd_fields[i].value
391
+ }
392
+ }
393
+ }
394
+ console.log('点击按钮后搜集到的页面数据temp=>' + JSON.stringify(temp))
395
+ if (val == '新增') {
396
+ console.log('即将新增记录,新增数据=>' + JSON.stringify(temp))
397
+ console.log('this.model.rows[this.showadd_index]=>' + JSON.stringify(this.model.rows[this.showadd_index]))
398
+ this.model.rows[this.showadd_index].push(temp)
399
+ this.confirm(this.data.onetomany[this.showadd_index].tables, temp, this.showadd_index, this.model.rows[this.showadd_index].length - 1)
400
+ this.closemodal(val)
401
+ } else if (val == '修改') {
402
+ console.log(`修改信息=======>${JSON.stringify(temp)}`)
403
+ temp.id = this.tempid
404
+ this.confirm(this.data.onetomany[this.showadd_index].tables, temp, this.showadd_index, this.model.rows[this.showadd_index].length - 1)
405
+ this.closemodal(val)
406
+ }
407
+ },
408
+ // 关闭模态框
409
+ closemodal() {
410
+ console.log('进入关闭模态框方法,先清空数据this.showadd_fields,目前数据=>' + JSON.stringify(this.showadd_fields))
411
+ for (let i = 0; i < this.showadd_fields.fields.length; i++) {
412
+ if (this.showadd_fields[i] && this.showadd_fields[i].value) {
413
+ this.showadd_fields[i].value = ''
414
+ }
415
+ if (this.showadd_fields.fields[i] && this.showadd_fields.fields[i].value) {
416
+ this.showadd_fields.fields[i].value = ''
417
+ }
418
+ }
419
+
420
+ this.showadd_fields = null
421
+ this.showadd = false
422
+ this.disable_button_modal = true
423
+ this.modeltitle = null
424
+ this.tempid = null
425
+ },
426
+ async load() {
427
+ let index = 0
428
+ this.model = Object.assign({}, this.model, this.griddata)
429
+ let http = new HttpResetClass()
430
+ let data = {
431
+ tablename: this.data.onetomany[index].tables[0],
432
+ condition: `f_apply_num = '${this.selectdata.f_apply_num}' and f_process_id='${this.selectdata.f_process_id}'`
433
+ }
434
+ let res = await http.load('POST', 'rs/sql/singleTable', {data: data}, {
435
+ resolveMsg: null,
436
+ rejectMsg: 'onetomany查询失败'
437
+ })
438
+ // 初始化 onetomany
439
+ let rows = []
440
+ console.log('查询返回结果res.data=>' + JSON.stringify(res.data))
441
+ this.data.onetomany[index].rows = res.data
442
+ console.log(JSON.stringify('this.data.onetomany[index].rows=>' + JSON.stringify(this.data.onetomany[index].rows)))
443
+
444
+ // 初始化onetomany中的fields
445
+ for (let j = 0; j < this.data.onetomany[index].fields.length; j++) {
446
+ // 如果配置类型为select,优先从参数列表获取options
447
+ if (this.data.onetomany[index].fields[j].type === 'select') {
448
+ let temp = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
449
+ if (temp && temp.length > 0) {
450
+ this.data.onetomany[index].fields[j].options = Vue.$appdata.getParam(this.data.onetomany[index].fields[j].label)
451
+ }
452
+ }
453
+ }
454
+ this.model.rows = []
455
+ this.surBodyData = []
456
+ if (this.data.onetomany && this.data.onetomany.length > 0) {
457
+ for (let i = 0; i < this.data.onetomany.length; i++) {
458
+ let temp = []
459
+ for (let j = 0; j < this.data.onetomany[i].fields.length; j++) {
460
+ temp.push(this.data.onetomany[i].fields[j].field)
461
+ }
462
+ this.surBodyData.push(temp)
463
+ }
464
+ for (let i = 0; i < this.data.onetomany.length; i++) {
465
+ if (this.data.onetomany[i].rows) {
466
+ this.model.rows.push(this.data.onetomany[i].rows)
467
+ }
468
+ }
469
+ }
470
+ this.templateshow = false
471
+ this.$nextTick(() => {
472
+ this.templateshow = true
473
+ })
474
+ }
475
+ },
476
+ events: {
477
+ 'add'(index) {
478
+ let templet = new Object()
479
+ templet = this.data.onetomany[index]
480
+ for (let j = 0; j < templet.fields.length; j++) {
481
+ templet.fields[j].value = ''
482
+ if (templet.fields[j].type == 'datepicker') {
483
+ templet.fields[j].value = new Date().Format("yyyy-MM-dd HH:mm:ss")
484
+ }
485
+ }
486
+ this.modeltitle = '新增'
487
+ this.showadd_fields = templet
488
+ this.showadd_index = index
489
+ this.showadd = true
490
+ }
491
+ },
492
+ computed: {},
493
+ watch: {
494
+ 'selectdata'(){
495
+ this.load()
496
+ },
497
+ deep:true
498
+ }
499
+ }
500
+
501
+ // Date格式化
502
+ Date.prototype.Format = function (fmt) {
503
+ var o = {
504
+ "M+": this.getMonth() + 1, //月份
505
+ "d+": this.getDate(), //日
506
+ "H+": this.getHours(), //小时
507
+ "m+": this.getMinutes(), //分
508
+ "s+": this.getSeconds(), //秒
509
+ "q+": Math.floor((this.getMonth() + 3) / 3), //季度
510
+ "S": this.getMilliseconds() //毫秒
511
+ };
512
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
513
+ for (var k in o)
514
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
515
+ return fmt;
516
+ }
517
+ </script>
518
+ <style scoped>
519
+ tr {
520
+ height: 34px;
521
+ }
522
+ </style>