apply-clients 4.1.61 → 4.1.62-weinan

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 (48) hide show
  1. package/index.html +1 -1
  2. package/package.json +7 -5
  3. package/src/apply.js +81 -67
  4. package/src/applyAndroid.js +16 -3
  5. package/src/assets//345/210/240/351/231/244.png +0 -0
  6. package/src/components/app_apply/AppChargeManagement.vue +749 -0
  7. package/src/components/app_apply/AppInstallationDetails.vue +529 -0
  8. package/src/components/app_apply/AppProcessSupervisory.vue +214 -0
  9. package/src/components/app_apply/AppSupervisoryCart.vue +68 -0
  10. package/src/components/app_apply/AppTakePic.vue +146 -0
  11. package/src/components/app_apply/AppdevicesDetails.vue +867 -0
  12. package/src/components/app_apply/ApplyInfo.vue +1 -1
  13. package/src/components/app_apply/ApplyToDoList.vue +213 -86
  14. package/src/components/app_apply/PlaceControler.vue +51 -35
  15. package/src/components/app_apply/ServiceControl.vue +185 -12
  16. package/src/components/app_apply/ServiceView.vue +50 -11
  17. package/src/components/app_apply/materialshoufei.vue +243 -0
  18. package/src/components/product/ApplyCharge/ApplyChargeList.vue +6 -5
  19. package/src/components/product/Function/InstallInfoSelect.vue +40 -27
  20. package/src/components/product/Function/StopApplyCrrdList.vue +1 -1
  21. package/src/components/product/Function/functions/StopInstall.vue +7 -1
  22. package/src/components/product/Process/ExplorationSelect.vue +377 -355
  23. package/src/components/product/Process/ExplorationUser.vue +2 -2
  24. package/src/components/product/Process/Processes/InstallationDetails.vue +515 -452
  25. package/src/components/product/Process/Processes/UserFireInfo.vue +409 -0
  26. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +1597 -255
  27. package/src/components/product/Process/Processes/addressAndUserinfoManagementPro.vue +1221 -0
  28. package/src/components/product/Process/Processes/chargeManagement.vue +545 -539
  29. package/src/components/product/Process/Processes/devicesDetails.vue +843 -0
  30. package/src/components/product/Process/Processes/materialshoufei.vue +187 -0
  31. package/src/components/product/Process/Processes/printCharge.vue +4 -4
  32. package/src/components/product/Process/Processes/recordcancel.vue +50 -50
  33. package/src/components/product/Process/Processes/selectUserinfo.vue +199 -0
  34. package/src/components/product/Process/Processes/splitMaterial.vue +358 -0
  35. package/src/components/product/Process/Service/ServiceControl.vue +709 -82
  36. package/src/components/product/Process/ShowBackReason.vue +1 -0
  37. package/src/components/product/ServiceView.vue +816 -790
  38. package/src/components/product/Stop/StopApply.vue +101 -0
  39. package/src/components/product/Stop/StopApplyList.vue +266 -0
  40. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +6 -0
  41. package/src/components/product/Supervisory/SupervisoryControl.vue +124 -119
  42. package/src/components/product/Supervisory/SupervisoryList.vue +40 -27
  43. package/src/components/product/Supervisory/SupervisoryhCart.vue +0 -7
  44. package/src/components/product/Test.vue +8 -4
  45. package/src/components/product/VueUtils/ApplyUpload.vue +22 -7
  46. package/src/main.js +2 -0
  47. package/static/images/lefticon//347/237/251/345/275/2421183.png +0 -0
  48. package/dist.rar +0 -0
@@ -1,790 +1,816 @@
1
- <template>
2
- <div class="select-overspread" style="background-color: #ffffff;padding: 20px;overflow: scroll">
3
- <validator name="v">
4
- <form class="form-horizontal">
5
- <div class="form-group">
6
- <div v-for="(index,item) in data.fields" style="">
7
- <!--input-->
8
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
9
- v-if="item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email'"
10
- v-show="!item.hidden"
11
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
12
- <label :style="item.label_style ? item.label_style : ''"
13
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
14
- <div :style="item.value_style ? item.value_style:''"
15
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
16
- <input class="form-control input_view" style=""
17
- :type="item.type"
18
- v-model="data.fields[index].value"
19
- :placeholder="item.placeholder"
20
- :value="data.fields[index].value"
21
- :readonly="item.readonly"
22
- :disabled="item.disabled"
23
- @change="onchange(index)"
24
- @blur="onblur(index)"
25
- @input="oninput(index)"
26
- />
27
- <span
28
- v-if="item.error&&item.error.msg&&item.error.flag"
29
- style="color: red">{{item.error.msg}}</span>
30
- </div>
31
- </div>
32
- <!--时间datepicker-->
33
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
34
- v-if="item.type==='datepicker'"
35
- v-show="!item.hidden"
36
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped+' form-group':'col-sm-4 form-group']">
37
- <label
38
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label control-label-justify col-sm-6'">{{item.label}}</label>
39
- <div :style="item.value_style ? item.value_style:''"
40
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
41
- <datepicker
42
- @change="onchange(index)"
43
- @blur="onblur(index)"
44
- :placeholder="item.placeholder"
45
- :value.sync="data.fields[index].value"
46
- :format="item.format ? item.format : 'yyyy-MM-dd'"
47
- v-model="data.fields[index].value"
48
- :readonly="item.readonly"
49
- :disabled="item.disabled"
50
- :show-reset-button="reset">
51
- </datepicker>
52
- </div>
53
- <span
54
- v-if="item.error&&item.error.msg&&item.error.flag"
55
- style="color: red">{{item.error.msg}}</span>
56
- </div>
57
-
58
- <!--textarea-->
59
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
60
- v-if="item.type==='textarea'" v-show="!item.hidden"
61
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
62
- <label :style="item.label_style ? item.label_style : ''"
63
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-3'">{{item.label}}</label>
64
- <div :style="item.value_style ? item.value_style:''"
65
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-10'">
66
- <textarea
67
- :readonly="item.readonly"
68
- :disabled="item.disabled"
69
- class="form-control input_view"
70
- style="width: 100%;height: 100%"
71
- :rows="item.rows"
72
- v-model="data.fields[index].value"
73
- :value="data.fields[index].value"
74
- @change="onchange(index)"
75
- @blur="onblur(index)"
76
- @input="oninput(index)"
77
- >
78
- </textarea>
79
- </div>
80
- <span
81
- v-if="item.error&&item.error.msg&&item.error.flag"
82
- style="color: red">{{item.error.msg}}</span>
83
- </div>
84
-
85
- <!--radio-->
86
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
87
- v-if="item.type==='radio'"
88
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
89
- <label v-if="item.label"
90
- :class="item.label_bootstraped?item.label_bootstraped+' control-label-justify control-label':'control-label-justify control-label col-sm-2'">{{item.label}}</label>
91
- <div
92
- :style="item.value_style ? item.value_style:''"
93
- :class="item.value_bootstraped?item.value_bootstraped:item.items.length%2 == 0?'col-sm-5': 'col-sm-3'"
94
- v-for="(index2,row) in item.items">
95
- <label :for="row.label"
96
- :class="item.items.length%2 == 0?'col-sm-3 control-label': 'col-sm-2 control-label'">{{row.label}}</label>
97
- <input @blur="onblur(index)"
98
- :class="item.items.length%2 == 0?'col-sm-3 control-label': 'col-sm-2 control-label'"
99
- :readonly="item.readonly" :disabled="item.disabled" style="margin-top: 10px" type="radio"
100
- :name="index" :id="row.label" v-bind:value="data.fields[index].items[index2].value"
101
- v-model="data.fields[index].value">
102
- </div>
103
- <span
104
- v-if="item.error&&item.error.msg&&item.error.flag"
105
- style="color: red">{{item.error.msg}}</span>
106
- </div>
107
-
108
- <!--select-->
109
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
110
- v-if="item.type==='select'" v-show="!item.hidden"
111
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
112
- <label
113
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
114
- <div :style="item.value_style ? item.value_style:''"
115
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
116
- <input-select
117
- class="select select_list"
118
- @blur="onblur(index)"
119
- @change="onchange(index)"
120
- :readonly="item.readonly"
121
- :disable="item.disabled"
122
- :value.sync="data.fields[index].value"
123
- v-model="data.fields[index].value"
124
- :options='data.fields[index].options'
125
- :valueSingle="true"></input-select>
126
- </div>
127
- <span
128
- v-if="item.error&&item.error.msg&&item.error.flag"
129
- style="color: red">{{item.error.msg}}</span>
130
- </div>
131
-
132
- <!--checkbox-->
133
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
134
- v-if="item.type==='checkbox'"
135
- :class="[item.required&&!(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
136
- <label v-if="item.label"
137
- :class="item.label_bootstraped?item.label_bootstraped+' control-label ':'control-label col-sm-2'">{{item.label}}</label>
138
- <div style="margin-top: 6px"
139
- :class="item.value_bootstraped?item.value_bootstraped:'control-label col-sm-2'"
140
- v-for="(index2,row) in item.items">
141
- <label class="font-size form-group col-sm-6">{{row.label}}</label>
142
- <input :readonly="item.readonly" :disabled="item.disabled" type="checkbox" class="col-sm-6"
143
- :id="row.label" v-model="data.fields[index].items[index2].value" @blur="onblur(index)" >
144
- </div>
145
- </div>
146
- </div>
147
- </div>
148
- <!-- onetomany -->
149
- <div class="" v-for="(i,item) in data.onetomany" style="overflow:auto;width:100%">
150
- <table v-show="!item.hidden" class="table table-bordered table-striped table-hover" style="white-space:nowrap">
151
- <tr>
152
- <th>序号</th>
153
- <th v-for="field in item.fields" v-if="!field.displayPosition || field.displayPosition === '*' || field.displayPosition === 'list'">
154
- <nobr>{{field.label}}</nobr>
155
- </th>
156
- <th v-if="!item.hiddenOperate">
157
- <button type="button" @click="add(i)" class="btn btn-info"
158
- v-if="showprint && !item.addHidden">
159
- <span v-if="item.addText === 'default' || !item.addText" class="glyphicon glyphicon-plus" aria-hidden="true"></span>
160
- <span v-else :style="item.addStyle">{{item.addText}}</span>
161
- </button>
162
- </th>
163
- </tr>
164
- <tr v-for="(j,row) in item.rows" style="">
165
- <td style="text-align: center">{{$index+1}}</td>
166
- <td v-for="key in item.fields" v-if="!key.displayPosition || key.displayPosition === '*' || key.displayPosition === 'list'" style="text-align: center">
167
- {{row[key.field]}}
168
- </td>
169
- <td style="text-align: center" v-if="!item.hiddenOperate">
170
- <span @click="update(i,j)" v-if="showprint && !item.updateHidden">
171
- <span v-if="item.updateText === 'default' || !item.updateText" class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
172
- <span v-else :style="item.updateStyle">{{item.updateText}}</span>
173
- </span>
174
- <span @click="delete(i,j)" v-if="showprint && !item.deleteHidden" style="margin-left: 10px">
175
- <span v-if="item.deleteText === 'default' || !item.deleteText" class="glyphicon glyphicon-trash" aria-hidden="true"></span>
176
- <span v-else :style="item.deleteStyle">{{item.deleteText}}</span>
177
- </span>
178
- </td>
179
- </tr>
180
- </table>
181
- </div>
182
-
183
- <div v-for="(i,item) in data.components">
184
- <component :is="item.name" :selectdata="data" :mark="item.mark" ></component>
185
- </div>
186
-
187
- <!--自定义组件-->
188
- <slot></slot>
189
- <!--公司等属性-->
190
- <div class="col-sm-12 form-group text-center" style="padding-top:8px">
191
- <div class="col-sm-3 form-group center-block">
192
- <label class="col-sm-5">所属公司:</label>
193
- <div class="col-sm-6" style="text-align: left">
194
- {{model.f_filiale}}
195
- </div>
196
- </div>
197
- <div class="col-sm-3 form-group center-block">
198
- <label class="col-sm-5">部门:</label>
199
- <div class="col-sm-6" style="text-align: left">
200
- {{model.f_parentname}}
201
- </div>
202
- </div>
203
- <div class="col-sm-3 form-group center-block">
204
- <label class="col-sm-5">操作人:</label>
205
- <div class="col-sm-6 " style="text-align: left">
206
- {{model.f_operator}}
207
- </div>
208
- </div>
209
- <div class="col-sm-3 form-group center-block">
210
- <label class="col-sm-5">操作日期:</label>
211
- <div class="col-sm-6" style="text-align: left">
212
- {{model.f_operate_date}}
213
- </div>
214
- </div>
215
- </div>
216
-
217
- </form>
218
- </validator>
219
-
220
- <!-- 按钮组 -->
221
- <div class="from-group col-sm-12" style="margin-top: 20px;height: 100px">
222
- <center>
223
- <!-- 按钮组 -->
224
- <button v-for="(index,button) in data.buttons"
225
- :disabled="(button.button_name==='提交'||button.button_name==='下发')&&disable_button" type="button"
226
- @click="clicked(index,button)"
227
- :class="(button.button_name==='提交'||button.button_name==='下发')&&disable_button?'btn btn-default':'btn btn-primary'"
228
- v-if="!button.hidden"
229
- style="min-width:100px; margin-right:50px;">
230
- {{button.button_name}}
231
- </button>
232
- </center>
233
- </div>
234
-
235
- <!-- onetomany模态框 -->
236
- <modal v-if="show" :show.sync="show" backdrop="false" :large="modalSize === 'large' ? true : false" :small="modalSize === 'small' ? true : false">
237
- <header slot="modal-header" class="modal-header">
238
- <button type="button" class="close" @click="closemodal(modeltitle)"><span>&times;</span></button>
239
- <span class="modal-title"><font
240
- size="3">{{modeltitle}}</font></span>
241
- </header>
242
- <article slot="modal-body" class="modal-body clearfix">
243
- <div
244
- :class="[item.required&&!(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped:'col-sm-12']"
245
- v-for="(index,item) in data.onetomany[onetomany_index].fields" v-if="!item.displayPosition || item.displayPosition === '*' || item.displayPosition === 'from'">
246
- <label v-show="!item.hidden" :class="item.label_bootstraped ? item.label_bootstraped + ' control-label' : 'control-label col-sm-3'" style="margin-top: 10px">{{item.label}}:</label>
247
- <div :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-7'" v-show="!item.hidden">
248
- <!--时间datepicker-->
249
- <datepicker
250
- v-if="item.type=='datepicker'"
251
- @change="onchange_modal(index)"
252
- @blur="onblur_modal(index)"
253
- :placeholder="item.placeholder"
254
- :value.sync="data.onetomany[onetomany_index].fields[index].value"
255
- :format="'yyyy-MM-dd'"
256
- v-model="data.onetomany[onetomany_index].fields[index].value"
257
- :readonly="item.readonly"
258
- :disabled="item.disabled"
259
- :show-reset-button="reset">
260
- </datepicker>
261
- <!--select-->
262
- <input-select
263
- @change="onchange_modal(index)"
264
- v-if="item.type=='select'"
265
- @blur="onblur_modal(index)"
266
- :value.sync="data.onetomany[onetomany_index].fields[index].value"
267
- v-model="data.onetomany[onetomany_index].fields[index].value"
268
- :options='data.onetomany[onetomany_index].fields[index].options'>
269
- </input-select>
270
- <!-- input -->
271
- <input v-if="item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email'"
272
- class="form-control"
273
- :type="item.type"
274
- v-model="data.onetomany[onetomany_index].fields[index].value"
275
- :placeholder="item.placeholder"
276
- :value="data.onetomany[onetomany_index].fields[index].value"
277
- :readonly="item.readonly"
278
- :disabled="item.disabled"
279
- @change="onchange_modal(index)"
280
- @blur="onblur_modal(index)"
281
- @input="oninput_modal(index)"
282
- />
283
- </div>
284
- </div>
285
- </article>
286
- <footer slot="modal-footer" class="modal-footer">
287
- <button :class="disable_button_onetomany?'btn btn-default':'btn btn-primary'"
288
- :disabled="disable_button_onetomany" type="button" @click="confirm_modal(modeltitle)">
289
- 确认
290
- </button>
291
- </footer>
292
- </modal>
293
-
294
- <!-- 按钮模态框 -->
295
- <modal v-if="showbutmodal" :show.sync="showbutmodal" v-ref:modal backdrop="false">
296
- <header slot="modal-header" class="modal-header">
297
- <button type="button" class="close" @click="closemodal('but')"><span>&times;</span></button>
298
- <h4 class="modal-title">{{model.button.button_name}}</h4>
299
- </header>
300
- <article slot="modal-body" class="modal-body">
301
- <div class="col-sm-12" v-for="(index,button) in data.buttons[model.button.button_index].button_fields">
302
- <label class="control-label col-sm-3" style="margin-top: 10px">{{button.label}}:</label>
303
- <div class="col-sm-7">
304
- <!--select-->
305
- <input-select v-if="button.type=='select'"
306
- :value.sync="data.buttons[model.button.button_index].button_fields[index].value"
307
- v-model="data.buttons[model.button.button_index].button_fields[index].value"
308
- :options='button.options'></input-select>
309
- <!-- input -->
310
- <input v-else type="text" class="form-control"
311
- v-model="data.buttons[model.button.button_index].button_fields[index].value"/>
312
- </div>
313
- </div>
314
- </article>
315
- <footer slot="modal-footer" style="border-top:none" class="modal-footer">
316
- <button type="button" class="btn btn-primary" :disabled="disable_button_but" @click='confirm_but_modal()'>确认</button>
317
- </footer>
318
- </modal>
319
-
320
- </div>
321
- </template>
322
- <script>
323
- import Vue from 'vue'
324
- import {HttpResetClass, PagedList} from "vue-client";
325
- // Date格式化
326
- Date.prototype.Format = function (fmt) {
327
- var o = {
328
- 'M+': this.getMonth() + 1, // 月份
329
- 'd+': this.getDate(), // 日
330
- 'H+': this.getHours(), // 小时
331
- 'm+': this.getMinutes(), // 分
332
- 's+': this.getSeconds(), //
333
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
334
- 'S': this.getMilliseconds() // 毫秒
335
- }
336
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
337
- for (var k in o) {
338
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
339
- }
340
- return fmt
341
- }
342
-
343
- export default {
344
- title: '报建业务通用组件',
345
- props: {
346
- data: {
347
- type: Object
348
- },
349
- showprint: {
350
- type: Boolean,
351
- default: true
352
- }
353
- },
354
- data () {
355
- return {
356
- model: {}, // 公司等属性
357
- disable_button: true, // 控制按钮禁用
358
- show: false, // 控制onetomany模态框
359
- disable_button_onetomany: true, // 控制onetomany模态框按钮
360
- onetomany_index: null, // 当前选择的下标
361
- update_onetomany_index: null, // 当前需要修改的下标
362
- modeltitle: null, // 模态框标题
363
- modalSize: null, // 模态框大小
364
- showbutmodal: false,
365
- showcheck:false,
366
- back: ''
367
- }
368
-
369
- },
370
- ready(){
371
- console.log(this.selectedData)
372
- console.log("7777777")
373
- console.log(this.data.onetomany)
374
- },
375
- watch: {
376
- deep: true
377
- },
378
- computed: {
379
-
380
- },
381
- created () {
382
- // 初始化数据
383
- this.initializtion()
384
- this.$dispatch('initializtionView')
385
-
386
- this.disableButton()
387
- },
388
- methods: {
389
- // 按钮模态框确定
390
- confirm_but_modal() {
391
- for (const item of this.data.buttons[this.model.button.button_index].button_fields) {
392
- this.model.button.button_fields[item.field] = item.value
393
- }
394
- this.showbutmodal = false
395
- this.disable_button_but = true
396
- this.$dispatch('button', this.model)
397
- },
398
- // 点击按钮组按钮
399
- async clicked(index, button) {
400
- this.disable_button = true
401
- console.log("this.data")
402
- console.log(this.data)
403
- // 组织model.fields数据
404
- for (const item of this.data.fields) {
405
- // checkbox特殊处理
406
- if (item.type === 'checkbox') {
407
- for (let j = 0; j < item.items.length; j++) {
408
- this.model[item.items[j].field] = item.items[j].value
409
- }
410
- } else {
411
- this.model[item.field] = item.value
412
- }
413
- }
414
- this.model.f_process_id = this.data.f_process_id
415
-
416
- // 初始化model.button数据
417
- let buttondatas = {
418
- button_fields: {}
419
- }
420
- buttondatas.button_name = button.button_name
421
- buttondatas.button_index = index
422
- if (button.button_fields) {
423
- for (const item of button.button_fields) {
424
- buttondatas.button_fields[item.field] = item.value
425
- }
426
- }
427
- this.model.button = buttondatas
428
- this.model.title = this.data.title
429
- this.model.fields = this.data.fields
430
- this.model.onetomany = this.data.onetomany
431
- if(this.data.defname === '通气点火') {
432
- if (this.data.processname === '工商户报建流程' || this.data.processname === '开发商集体报建流程') {
433
- let http = new HttpResetClass()
434
- let condition = `f_blobid = '${this.data.f_process_id}'`
435
- let res = await http.load('POST', 'rs/sql/singleTable', {
436
- data: {
437
- tablename: 't_files',
438
- condition: condition
439
- }
440
- }, {resolveMsg: null, rejectMsg: null})
441
- console.log("res_________________")
442
- console.log(res)
443
- if ( res.data.length === 0) {
444
- this.$showMessage("未上传图纸")
445
- }
446
- }
447
- }
448
- if(this.data.defname === '竣工验收') {
449
- if (this.data.processname !== '工商户报建流程' ) {
450
-
451
- }
452
- }
453
- if (button.button_name === '退回') {
454
- this.showbutmodal = true
455
- } else if (button.button_name === '下发') {
456
- this.showbutmodal = true
457
- } else if (button.button_name === '验收') {
458
- this.showbutmodal = true
459
- }else {
460
- this.$dispatch('button', this.model)
461
- }
462
- },
463
- // 初始化数据
464
- initializtion () {
465
- // 是否禁用按钮
466
- this.disableButton()
467
-
468
- // datepicker 没有值给当时值
469
- for (const item of this.data.fields) {
470
- if (item.type === 'datepicker' && !item.value) {
471
- item.value = new Date().Format('yyyy-MM-dd HH:mm:ss')
472
- }
473
- }
474
- // 公司等属性初始化
475
- if (this.data.filiale) {
476
- this.model.f_filiale = this.data.filiale
477
- } else {
478
- this.model.f_filiale = this.$login.f.orgs
479
- }
480
- if (this.data.f_parentname) {
481
- this.model.f_parentname = this.data.f_parentname
482
- } else {
483
- this.model.f_parentname = this.$login.f.f_department_name
484
- }
485
- if (this.data.operate_date) {
486
- this.model.f_operate_date = this.data.operate_date
487
- } else {
488
- this.model.f_operate_date = new Date().Format('yyyy-MM-dd')
489
- }
490
- if (this.data.operator) {
491
- this.model.f_operator = this.data.operator
492
- } else {
493
- this.model.f_operator = this.$login.f.name
494
- }
495
- },
496
-
497
-
498
- // 是否禁用按钮
499
- disableButton () {
500
- let fields = this.data.fields
501
-
502
- let flag = false
503
- for (const item of fields) {
504
- if (item.type !== 'checkbox' && item.required && !item.value) {
505
- if (item.value === 0) {
506
- flag = false
507
- } else {
508
- flag = true
509
- }
510
- }
511
- // 任何选择框只要是否都不能提交
512
- if (item.type === 'select' && item.value === '' && item.disabledButton) {
513
- flag = true
514
- }
515
- }
516
-
517
- let count = 0
518
- for (const item of fields) {
519
- if (item.type !== 'checkbox' && item.required) {
520
- count++
521
- }
522
- }
523
- if (count === 0) {
524
- flag = false
525
- }
526
-
527
- this.disable_button = flag
528
- },
529
- // 失去焦点触发,无论值是否发生变化
530
- onblur (index) {
531
- // 是否禁用按钮
532
- this.disableButton()
533
-
534
- this.$dispatch('onblur', index)
535
- // 如果有错误信息提示走错误信息判断处理
536
-
537
- if (this.data.fields[index].error || this.data.fields[index].type === 'datepicker') {
538
- this.$dispatch('error_check', index)
539
- }
540
- },
541
- // 失去焦点且值最终发生变化触发
542
- onchange (index) {
543
- // 是否禁用按钮
544
- this.disableButton()
545
-
546
- this.data.fields[index].value = this.data.fields[index].value.trim()
547
-
548
- if (this.data.fields[index].prefix && this.data.fields[index].value !== '') {
549
- this.data.fields[index].value = this.data.fields[index].prefix + this.data.fields[index].value
550
- }
551
-
552
- this.data[this.data.fields[index].field] = this.data.fields[index].value
553
-
554
- this.$dispatch('onchange', index)
555
-
556
- // 如果有错误信息提示走错误信息判断处理
557
- if (this.data.fields[index].error || this.data.fields[index].type === 'datepicker') {
558
- this.$dispatch('error_check', index)
559
- }
560
- },
561
- oninput (index) {
562
- // 是否禁用按钮
563
- this.disableButton()
564
-
565
- this.$dispatch('oninput', index)
566
-
567
- // 如果有错误信息提示走错误信息判断处理
568
- if (this.data.fields[index].error || this.data.fields[index].type === 'datepicker') {
569
- this.$dispatch('error_check', index)
570
- }
571
- },
572
- // 模态框确认按钮
573
- confirm_modal (title) {
574
- if (title === '新增') {
575
- if (this.data.onetomany[this.onetomany_index].addEvent === 'default' || !this.data.onetomany[this.onetomany_index].addEvent) {
576
- this.$dispatch('onetomanyadd', this.onetomany_index)
577
- } else {
578
- this.$dispatch(this.data.onetomany[this.onetomany_index].addEvent, this.onetomany_index)
579
- }
580
- } else {
581
- if (this.data.onetomany[this.onetomany_index].updateEvent === 'default' || !this.data.onetomany[this.onetomany_index].updateEvent) {
582
- this.$dispatch('onetomanyupdate', this.onetomany_index, this.update_onetomany_index)
583
- } else {
584
- this.$dispatch(this.data.onetomany[this.onetomany_index].updateEvent, this.onetomany_index, this.update_onetomany_index)
585
- }
586
- }
587
-
588
- this.closemodal()
589
- },
590
- // 删除
591
- delete (i, j) {
592
- this.$showMessage((this.data.onetomany[i].deleteMessage === 'default' || !this.data.onetomany[i].deleteMessage) ? '您确定要删除这条记录吗?' : this.data.onetomany[i].deleteMessage, ['confirm']).then((res) => {
593
- if (res === 'confirm') {
594
- if (this.data.onetomany[i].deleteEvent === 'default' || !this.data.onetomany[i].deleteEvent) {
595
- this.$dispatch('onetomanydelete', i, j)
596
- } else {
597
- this.$dispatch(this.data.onetomany[i].deleteEvent, i, j)
598
- }
599
- }
600
- })
601
- },
602
- // 修改
603
- update (i, j) {
604
- let onetomany = this.data.onetomany[i]
605
- let item = this.data.onetomany[i].rows[j]
606
- let count = 0
607
- for (let k = 0; k < onetomany.fields.length; k++) {
608
- // 防止初始化的时候没有value
609
- Vue.set(this.data.onetomany[i].fields[k], 'value', item[this.data.onetomany[i].fields[k].field])
610
-
611
- if (onetomany.fields[j].required) {
612
- count++
613
- }
614
- }
615
- if (count === 0) {
616
- this.disable_button_onetomany = false
617
- }
618
- this.modeltitle = '修改'
619
- this.modalSize = this.data.onetomany[i].modalSize
620
- this.onetomany_index = i
621
- this.update_onetomany_index = j
622
-
623
- this.$dispatch('openUpdateModel',i,j)
624
-
625
- this.show = true
626
- },
627
- // 添加
628
- add (index) {
629
- let count = 0
630
- for (const item of this.data.onetomany[index].fields) {
631
- if (item.type === 'datepicker') {
632
- item.value = new Date().Format('yyyy-MM-dd')
633
- }
634
- if (item.required) {
635
- count++
636
- }
637
- }
638
-
639
- if (count === 0) {
640
- this.disable_button_onetomany = false
641
- }
642
- this.modeltitle = '新增'
643
- this.modalSize = this.data.onetomany[index].modalSize
644
- this.onetomany_index = index
645
-
646
- this.$dispatch('openAddModel',index)
647
-
648
- this.show = true
649
- },
650
- // 关闭模态框
651
- closemodal (val) {
652
- if (val === 'but'){
653
- this.disableButton()
654
- this.showbutmodal = false
655
- return
656
- }
657
- for (const item of this.data.onetomany[this.onetomany_index].fields) {
658
- item.value = ''
659
- }
660
- this.show = false
661
- this.disable_button_onetomany = true
662
- this.onetomany_index = null
663
- this.update_onetomany_index = null
664
- this.modeltitle = null
665
- this.modalSize = null
666
- },
667
- // 是否禁用模态框按钮
668
- disableModalButton () {
669
- let fields = this.data.onetomany[this.onetomany_index].fields
670
-
671
- let flag = false
672
- for (const item of fields) {
673
- if (item.type !== 'checkbox' && item.required && !item.value) {
674
- if (item.value === 0) {
675
- flag = false
676
- } else {
677
- flag = true
678
- }
679
- }
680
- }
681
-
682
- let count = 0
683
- for (const item of fields) {
684
- if (item.type !== 'checkbox' && item.required) {
685
- count++
686
- }
687
- }
688
- if (count === 0) {
689
- flag = false
690
- }
691
- this.disable_button_onetomany = flag
692
- },
693
- // 监听模态框属性失去焦点
694
- onchange_modal (index) {
695
- this.disableModalButton()
696
- this.$dispatch('onchange_modal', this.onetomany_index, index)
697
- },
698
- // 监听模态框属性失去焦点
699
- onblur_modal (index) {
700
- this.disableModalButton()
701
- this.$dispatch('onblur_modal', this.onetomany_index, index)
702
- },
703
- // input输入属性值发生变化监听
704
- oninput_modal (index) {
705
- this.disableModalButton()
706
- this.$dispatch('oninput_modal', this.onetomany_index, index)
707
- }
708
- },
709
- events: {
710
-
711
- }
712
- }
713
- </script>
714
- <style>
715
- .datepicker{
716
- width: 100%!important;
717
- }
718
- .datepicker-input{
719
- background-color: #ffffff!important;
720
- width: 100%!important;
721
- }
722
- .datepicker-input:disabled{
723
- border: 1px solid #DDD!important;
724
- color: #ACA899!important;
725
- width: 100%!important;
726
- }
727
- </style>
728
- <style scoped>
729
- th{
730
- font-size: 15px !important;
731
- text-align: center !important;
732
- background-color: #dfedfb!important;
733
- color: #666666 !important;
734
- font-family: PINGFANG-BOLD !important;
735
- font-weight: normal!important;
736
- }
737
- /*清除model中的浮动*/
738
- .clearfix:after,.clearfix:before{
739
- display: table;
740
- }
741
- .clearfix:after{
742
- clear: both;
743
- }
744
-
745
- .input_view{
746
- padding: 8px;
747
- background-color: #ffffff;
748
- border-radius: 2px;
749
- border: solid 1px #c7c7c7!important;
750
- color: #333333!important;
751
- font-size: 15px!important;
752
- }
753
-
754
- .input_view[readonly]{
755
- border: 1px solid #DDD!important;
756
- /*background-color: #F5F5F5;*/
757
- color:#ACA899!important;
758
- }
759
- .input_view:disabled{
760
- border: 1px solid #DDD!important;
761
- /*background-color: #F5F5F5;*/
762
- color:#ACA899!important;
763
- }
764
-
765
- .control-label-justify {
766
- display: inline-block;
767
- vertical-align: top;
768
- width: 110px;
769
- text-align: justify;
770
- font-family: PingFang-SC-Bold;
771
- }
772
-
773
- .control-label-justify::after {
774
- content: "";
775
- display: inline-block;
776
- width: 70px;
777
- overflow: hidden;
778
- height: 0;
779
- }
780
-
781
- input::-webkit-outer-spin-button,
782
- input::-webkit-inner-spin-button {
783
- -webkit-appearance: none;
784
- }
785
-
786
- input[type="number"] {
787
- -moz-appearance: textfield;
788
- }
789
-
790
- </style>
1
+ <template>
2
+ <div class="select-overspread" style="background-color: #ffffff;padding: 20px;overflow: scroll">
3
+ <validator name="v">
4
+ <form class="form-horizontal">
5
+ <div class="form-group">
6
+ <div v-for="(index,item) in data.fields" style="">
7
+ <!--input-->
8
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
9
+ v-if="item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email'"
10
+ v-show="!item.hidden"
11
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
12
+ <label :style="item.label_style ? item.label_style : ''"
13
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
14
+ <div :style="item.value_style ? item.value_style:''"
15
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
16
+ <input class="form-control input_view" style=""
17
+ :type="item.type"
18
+ v-model="data.fields[index].value"
19
+ :placeholder="item.placeholder"
20
+ :value="data.fields[index].value"
21
+ :readonly="item.readonly"
22
+ :disabled="item.disabled"
23
+ @change="onchange(index)"
24
+ @blur="onblur(index)"
25
+ @input="oninput(index)"
26
+ />
27
+ <span
28
+ v-if="item.error&&item.error.msg&&item.error.flag"
29
+ style="color: red">{{item.error.msg}}</span>
30
+ </div>
31
+ </div>
32
+ <!--时间datepicker-->
33
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
34
+ v-if="item.type==='datepicker'"
35
+ v-show="!item.hidden"
36
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped+' form-group':'col-sm-4 form-group']">
37
+ <label
38
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label control-label-justify col-sm-6'">{{item.label}}</label>
39
+ <div :style="item.value_style ? item.value_style:''"
40
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
41
+ <datepicker
42
+ @change="onchange(index)"
43
+ @blur="onblur(index)"
44
+ :placeholder="item.placeholder"
45
+ :value.sync="data.fields[index].value"
46
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
47
+ v-model="data.fields[index].value"
48
+ :readonly="item.readonly"
49
+ :disabled="item.disabled"
50
+ :show-reset-button="reset">
51
+ </datepicker>
52
+ </div>
53
+ <span
54
+ v-if="item.error&&item.error.msg&&item.error.flag"
55
+ style="color: red">{{item.error.msg}}</span>
56
+ </div>
57
+
58
+ <!--textarea-->
59
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
60
+ v-if="item.type==='textarea'" v-show="!item.hidden"
61
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
62
+ <label :style="item.label_style ? item.label_style : ''"
63
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-3'">{{item.label}}</label>
64
+ <div :style="item.value_style ? item.value_style:''"
65
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-10'">
66
+ <textarea
67
+ :readonly="item.readonly"
68
+ :disabled="item.disabled"
69
+ class="form-control input_view"
70
+ style="width: 100%;height: 100%"
71
+ :rows="item.rows"
72
+ v-model="data.fields[index].value"
73
+ :value="data.fields[index].value"
74
+ @change="onchange(index)"
75
+ @blur="onblur(index)"
76
+ @input="oninput(index)"
77
+ >
78
+ </textarea>
79
+ </div>
80
+ <span
81
+ v-if="item.error&&item.error.msg&&item.error.flag"
82
+ style="color: red">{{item.error.msg}}</span>
83
+ </div>
84
+
85
+ <!--radio-->
86
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
87
+ v-if="item.type==='radio'"
88
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
89
+ <label v-if="item.label"
90
+ :class="item.label_bootstraped?item.label_bootstraped+' control-label-justify control-label':'control-label-justify control-label col-sm-2'">{{item.label}}</label>
91
+ <div
92
+ :style="item.value_style ? item.value_style:''"
93
+ :class="item.value_bootstraped?item.value_bootstraped:item.items.length%2 == 0?'col-sm-5': 'col-sm-3'"
94
+ v-for="(index2,row) in item.items">
95
+ <label :for="row.label"
96
+ :class="item.items.length%2 == 0?'col-sm-3 control-label': 'col-sm-2 control-label'">{{row.label}}</label>
97
+ <input @blur="onblur(index)"
98
+ :class="item.items.length%2 == 0?'col-sm-3 control-label': 'col-sm-2 control-label'"
99
+ :readonly="item.readonly" :disabled="item.disabled" style="margin-top: 10px" type="radio"
100
+ :name="index" :id="row.label" v-bind:value="data.fields[index].items[index2].value"
101
+ v-model="data.fields[index].value">
102
+ </div>
103
+ <span
104
+ v-if="item.error&&item.error.msg&&item.error.flag"
105
+ style="color: red">{{item.error.msg}}</span>
106
+ </div>
107
+
108
+ <!--select-->
109
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
110
+ v-if="item.type==='select'" v-show="!item.hidden"
111
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
112
+ <label
113
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
114
+ <div :style="item.value_style ? item.value_style:''"
115
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
116
+ <input-select
117
+ class="select select_list"
118
+ @blur="onblur(index)"
119
+ @change="onchange(index)"
120
+ :readonly="item.readonly"
121
+ :disable="item.disabled"
122
+ :value.sync="data.fields[index].value"
123
+ v-model="data.fields[index].value"
124
+ :options='data.fields[index].options'
125
+ :valueSingle="true"></input-select>
126
+ </div>
127
+ <span
128
+ v-if="item.error&&item.error.msg&&item.error.flag"
129
+ style="color: red">{{item.error.msg}}</span>
130
+ </div>
131
+
132
+ <!--checkbox-->
133
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
134
+ v-if="item.type==='checkbox'"
135
+ :class="[item.required&&!(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
136
+ <label v-if="item.label"
137
+ :class="item.label_bootstraped?item.label_bootstraped+' control-label ':'control-label col-sm-2'">{{item.label}}</label>
138
+ <div style="margin-top: 6px"
139
+ :class="item.value_bootstraped?item.value_bootstraped:'control-label col-sm-2'"
140
+ v-for="(index2,row) in item.items">
141
+ <label class="font-size form-group col-sm-6">{{row.label}}</label>
142
+ <input :readonly="item.readonly" :disabled="item.disabled" type="checkbox" class="col-sm-6"
143
+ :id="row.label" v-model="data.fields[index].items[index2].value" @blur="onblur(index)" >
144
+ </div>
145
+ </div>
146
+ </div>
147
+ </div>
148
+ <!-- onetomany -->
149
+ <div class="" v-for="(i,item) in data.onetomany" style="overflow:auto;width:100%">
150
+ <table v-show="!item.hidden" class="table table-bordered table-striped table-hover" style="white-space:nowrap">
151
+ <tr>
152
+ <th>序号</th>
153
+ <th v-for="field in item.fields" v-if="!field.displayPosition || field.displayPosition === '*' || field.displayPosition === 'list'">
154
+ <nobr>{{field.label}}</nobr>
155
+ </th>
156
+ <th v-if="!item.hiddenOperate">
157
+ <button type="button" @click="add(i)" class="btn btn-info"
158
+ v-if="showprint && !item.addHidden">
159
+ <span v-if="item.addText === 'default' || !item.addText" class="glyphicon glyphicon-plus" aria-hidden="true"></span>
160
+ <span v-else :style="item.addStyle">{{item.addText}}</span>
161
+ </button>
162
+ </th>
163
+ </tr>
164
+ <tr v-for="(j,row) in item.rows" style="">
165
+ <td style="text-align: center">{{$index+1}}</td>
166
+ <td v-for="key in item.fields" v-if="!key.displayPosition || key.displayPosition === '*' || key.displayPosition === 'list'" style="text-align: center">
167
+ {{row[key.field]}}
168
+ </td>
169
+ <td style="text-align: center" v-if="!item.hiddenOperate">
170
+ <span @click="update(i,j)" v-if="showprint && !item.updateHidden">
171
+ <span v-if="item.updateText === 'default' || !item.updateText" class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
172
+ <span v-else :style="item.updateStyle">{{item.updateText}}</span>
173
+ </span>
174
+ <span @click="delete(i,j)" v-if="showprint && !item.deleteHidden" style="margin-left: 10px">
175
+ <span v-if="item.deleteText === 'default' || !item.deleteText" class="glyphicon glyphicon-trash" aria-hidden="true"></span>
176
+ <span v-else :style="item.deleteStyle">{{item.deleteText}}</span>
177
+ </span>
178
+ </td>
179
+ </tr>
180
+ </table>
181
+ </div>
182
+
183
+ <div v-for="(i,item) in data.components">
184
+ <component :is="item.name" :selectdata="data" :mark="item.mark" ></component>
185
+ </div>
186
+
187
+ <!--自定义组件-->
188
+ <slot></slot>
189
+ <!--附件上传 -->
190
+ <apply-upload :blodid="data.f_process_id"
191
+ :isupload = "true"
192
+ :isdelete="true"
193
+ :isusetype="true"
194
+ :isremark = "true"
195
+ :takeimg="false"
196
+ :issearch="true"
197
+ :defname="data.defname">
198
+ </apply-upload>
199
+ <!--公司等属性-->
200
+ <div class="col-sm-12 form-group text-center" style="padding-top:8px">
201
+ <div class="col-sm-3 form-group center-block">
202
+ <label class="col-sm-5">所属公司:</label>
203
+ <div class="col-sm-6" style="text-align: left">
204
+ {{model.f_filiale}}
205
+ </div>
206
+ </div>
207
+ <div class="col-sm-3 form-group center-block">
208
+ <label class="col-sm-5">部门:</label>
209
+ <div class="col-sm-6" style="text-align: left">
210
+ {{model.f_parentname}}
211
+ </div>
212
+ </div>
213
+ <div class="col-sm-3 form-group center-block">
214
+ <label class="col-sm-5">操作人:</label>
215
+ <div class="col-sm-6 " style="text-align: left">
216
+ {{model.f_operator}}
217
+ </div>
218
+ </div>
219
+ <div class="col-sm-3 form-group center-block">
220
+ <label class="col-sm-5">操作日期:</label>
221
+ <div class="col-sm-6" style="text-align: left">
222
+ {{model.f_operate_date}}
223
+ </div>
224
+ </div>
225
+ </div>
226
+
227
+ </form>
228
+ </validator>
229
+
230
+ <!-- 按钮组 -->
231
+ <div class="from-group col-sm-12" style="margin-top: 20px;height: 100px">
232
+ <center>
233
+ <!-- 按钮组 -->
234
+ <button v-for="(index,button) in data.buttons"
235
+ :disabled="(button.button_name==='提交'||button.button_name==='下发')&&disable_button" type="button"
236
+ @click="clicked(index,button)"
237
+ :class="(button.button_name==='提交'||button.button_name==='下发')&&disable_button?'btn btn-default':'btn btn-primary'"
238
+ v-if="!button.hidden"
239
+ style="min-width:100px; margin-right:50px;">
240
+ {{button.button_name}}
241
+ </button>
242
+ </center>
243
+ </div>
244
+
245
+ <!-- onetomany模态框 -->
246
+ <modal v-if="show" :show.sync="show" backdrop="false" :large="modalSize === 'large' ? true : false" :small="modalSize === 'small' ? true : false">
247
+ <header slot="modal-header" class="modal-header">
248
+ <button type="button" class="close" @click="closemodal(modeltitle)"><span>&times;</span></button>
249
+ <span class="modal-title"><font
250
+ size="3">{{modeltitle}}</font></span>
251
+ </header>
252
+ <article slot="modal-body" class="modal-body clearfix">
253
+ <div
254
+ :class="[item.required&&!(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped:'col-sm-12']"
255
+ v-for="(index,item) in data.onetomany[onetomany_index].fields" v-if="!item.displayPosition || item.displayPosition === '*' || item.displayPosition === 'from'">
256
+ <label v-show="!item.hidden" :class="item.label_bootstraped ? item.label_bootstraped + ' control-label' : 'control-label col-sm-3'" style="margin-top: 10px">{{item.label}}:</label>
257
+ <div :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-7'" v-show="!item.hidden">
258
+ <!--时间datepicker-->
259
+ <datepicker
260
+ v-if="item.type=='datepicker'"
261
+ @change="onchange_modal(index)"
262
+ @blur="onblur_modal(index)"
263
+ :placeholder="item.placeholder"
264
+ :value.sync="data.onetomany[onetomany_index].fields[index].value"
265
+ :format="'yyyy-MM-dd'"
266
+ v-model="data.onetomany[onetomany_index].fields[index].value"
267
+ :readonly="item.readonly"
268
+ :disabled="item.disabled"
269
+ :show-reset-button="reset">
270
+ </datepicker>
271
+ <!--select-->
272
+ <input-select
273
+ @change="onchange_modal(index)"
274
+ v-if="item.type=='select'"
275
+ @blur="onblur_modal(index)"
276
+ :value.sync="data.onetomany[onetomany_index].fields[index].value"
277
+ v-model="data.onetomany[onetomany_index].fields[index].value"
278
+ :options='data.onetomany[onetomany_index].fields[index].options'>
279
+ </input-select>
280
+ <!-- input -->
281
+ <input v-if="item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email'"
282
+ class="form-control"
283
+ :type="item.type"
284
+ v-model="data.onetomany[onetomany_index].fields[index].value"
285
+ :placeholder="item.placeholder"
286
+ :value="data.onetomany[onetomany_index].fields[index].value"
287
+ :readonly="item.readonly"
288
+ :disabled="item.disabled"
289
+ @change="onchange_modal(index)"
290
+ @blur="onblur_modal(index)"
291
+ @input="oninput_modal(index)"
292
+ />
293
+ </div>
294
+ </div>
295
+ </article>
296
+ <footer slot="modal-footer" class="modal-footer">
297
+ <button :class="disable_button_onetomany?'btn btn-default':'btn btn-primary'"
298
+ :disabled="disable_button_onetomany" type="button" @click="confirm_modal(modeltitle)">
299
+ 确认
300
+ </button>
301
+ </footer>
302
+ </modal>
303
+
304
+ <!-- 按钮模态框 -->
305
+ <modal v-if="showbutmodal" :show.sync="showbutmodal" v-ref:modal backdrop="false">
306
+ <header slot="modal-header" class="modal-header">
307
+ <button type="button" class="close" @click="closemodal('but')"><span>&times;</span></button>
308
+ <h4 class="modal-title">{{model.button.button_name}}</h4>
309
+ </header>
310
+ <article slot="modal-body" class="modal-body">
311
+ <div class="col-sm-12" v-for="(index,button) in data.buttons[model.button.button_index].button_fields">
312
+ <label class="control-label col-sm-3" style="margin-top: 10px">{{button.label}}:</label>
313
+ <div class="col-sm-7">
314
+ <!--select-->
315
+ <input-select v-if="button.type=='select'"
316
+ :value.sync="data.buttons[model.button.button_index].button_fields[index].value"
317
+ v-model="data.buttons[model.button.button_index].button_fields[index].value"
318
+ :options='button.options'></input-select>
319
+ <!-- input -->
320
+ <input v-else type="text" class="form-control"
321
+ v-model="data.buttons[model.button.button_index].button_fields[index].value"/>
322
+ </div>
323
+ </div>
324
+ </article>
325
+ <footer slot="modal-footer" style="border-top:none" class="modal-footer">
326
+ <button type="button" class="btn btn-primary" :disabled="disable_button_but" @click='confirm_but_modal()'>确认</button>
327
+ </footer>
328
+ </modal>
329
+ </div>
330
+ </template>
331
+ <script>
332
+ import Vue from 'vue'
333
+ import {HttpResetClass, PagedList} from "vue-client";
334
+ // Date格式化
335
+ Date.prototype.Format = function (fmt) {
336
+ var o = {
337
+ 'M+': this.getMonth() + 1, // 月份
338
+ 'd+': this.getDate(), //
339
+ 'H+': this.getHours(), // 小时
340
+ 'm+': this.getMinutes(), // 分
341
+ 's+': this.getSeconds(), // 秒
342
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
343
+ 'S': this.getMilliseconds() // 毫秒
344
+ }
345
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
346
+ for (var k in o) {
347
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
348
+ }
349
+ return fmt
350
+ }
351
+
352
+ export default {
353
+ title: '报建业务通用组件',
354
+ props: {
355
+ data: {
356
+ type: Object
357
+ },
358
+ showprint: {
359
+ type: Boolean,
360
+ default: true
361
+ }
362
+ },
363
+ data() {
364
+ return {
365
+ model: {}, // 公司等属性
366
+ disable_button: true, // 控制按钮禁用
367
+ show: false, // 控制onetomany模态框
368
+ disable_button_onetomany: true, // 控制onetomany模态框按钮
369
+ onetomany_index: null, // 当前选择的下标
370
+ update_onetomany_index: null, // 当前需要修改的下标
371
+ modeltitle: null, // 模态框标题
372
+ modalSize: null, // 模态框大小
373
+ showbutmodal: false,
374
+ showcheck: false,
375
+ back: '',
376
+ }
377
+ },
378
+ ready() {
379
+ console.log("7777777")
380
+ console.log(this.data)
381
+ },
382
+ watch: {
383
+ deep: true,
384
+ },
385
+ created() {
386
+ // 初始化数据
387
+ this.initializtion()
388
+ this.$dispatch('initializtionView')
389
+
390
+ this.disableButton()
391
+ },
392
+ methods: {
393
+ // 按钮模态框确定
394
+ confirm_but_modal() {
395
+ for (const item of this.data.buttons[this.model.button.button_index].button_fields) {
396
+ this.model.button.button_fields[item.field] = item.value
397
+ }
398
+ this.showbutmodal = false
399
+ this.disable_button_but = true
400
+ this.$dispatch('button', this.model)
401
+ },
402
+ // 点击按钮组按钮
403
+ async clicked(index, button) {
404
+ this.disable_button = true
405
+ console.log("this.data")
406
+ console.log(this.data)
407
+ console.log(button)
408
+ // 组织model.fields数据
409
+ for (const item of this.data.fields) {
410
+ // checkbox特殊处理
411
+ if (item.type === 'checkbox') {
412
+ for (let j = 0; j < item.items.length; j++) {
413
+ this.model[item.items[j].field] = item.items[j].value
414
+ }
415
+ } else {
416
+ this.model[item.field] = item.value
417
+ }
418
+ }
419
+ this.model.f_process_id = this.data.f_process_id
420
+
421
+ // 初始化model.button数据
422
+ let buttondatas = {
423
+ button_fields: {}
424
+ }
425
+ buttondatas.button_name = button.button_name
426
+ buttondatas.button_index = index
427
+ if (button.button_fields) {
428
+ for (const item of button.button_fields) {
429
+ buttondatas.button_fields[item.field] = item.value
430
+ }
431
+ }
432
+ this.model.button = buttondatas
433
+ this.model.title = this.data.title
434
+ this.model.fields = this.data.fields
435
+ this.model.onetomany = this.data.onetomany
436
+ if (this.data.defname === '通气点火') {
437
+ if (this.data.processname === '工商户报建流程' || this.data.processname === '开发商集体报建流程') {
438
+ let http = new HttpResetClass()
439
+ let condition = `f_blobid = '${this.data.f_process_id}'`
440
+ let res = await http.load('POST', 'rs/sql/singleTable', {
441
+ data: {
442
+ tablename: 't_files',
443
+ condition: condition
444
+ }
445
+ }, {resolveMsg: null, rejectMsg: null})
446
+ console.log("res_________________")
447
+ console.log(res)
448
+ if (res.data.length === 0) {
449
+ this.$showMessage("未上传图纸")
450
+ return
451
+ }
452
+ }
453
+ }
454
+ // if (this.data.defname === '合同签订') {
455
+ // console.log("ddddd",this.data)
456
+ // }
457
+ // if (this.data.defname === '竣工验收') {
458
+ // // if (this.data.processname !== '工商户报建流程') {
459
+ // // let t=this.selecteddd
460
+ // // let diff = this.all.filter(function (val) {
461
+ // // return t.indexOf(val) === -1
462
+ // // })
463
+ // // console.log("diff", diff)
464
+ // // for(let index = 0;index < diff.length; index++){
465
+ // // let data = {
466
+ // // code:diff[index].f_userinfo_code
467
+ // // }
468
+ // // console.log("code", data.code)
469
+ // // let http = new HttpResetClass()
470
+ // // http.load('POST', 'rs/logic/batchcheck', {data:data}, {resolveMsg: null, rejectMsg: null})
471
+ // //
472
+ // // }
473
+ // // }
474
+ // }
475
+ if (button.button_name === '退回') {
476
+ this.showbutmodal = true
477
+ } else if (button.button_name === '下发') {
478
+ this.showbutmodal = true
479
+ } else if (button.button_name === '验收') {
480
+ this.showbutmodal = true
481
+ } else if (button.event) {
482
+ this.$dispatch(button.event)
483
+ } else {
484
+ this.$dispatch('button', this.model)
485
+ }
486
+ },
487
+ // 初始化数据
488
+ initializtion() {
489
+ // 是否禁用按钮
490
+ this.disableButton()
491
+
492
+ // datepicker 没有值给当时值
493
+ for (const item of this.data.fields) {
494
+ if (item.type === 'datepicker' && !item.value) {
495
+ item.value = new Date().Format('yyyy-MM-dd HH:mm:ss')
496
+ }
497
+ }
498
+ // 公司等属性初始化
499
+ if (this.data.filiale) {
500
+ this.model.f_filiale = this.data.filiale
501
+ } else {
502
+ this.model.f_filiale = this.$login.f.orgs
503
+ }
504
+ if (this.data.f_parentname) {
505
+ this.model.f_parentname = this.data.f_parentname
506
+ } else {
507
+ this.model.f_parentname = this.$login.f.f_department_name
508
+ }
509
+ if (this.data.operate_date) {
510
+ this.model.f_operate_date = this.data.operate_date
511
+ } else {
512
+ this.model.f_operate_date = new Date().Format('yyyy-MM-dd')
513
+ }
514
+ if (this.data.operator) {
515
+ this.model.f_operator = this.data.operator
516
+ } else {
517
+ this.model.f_operator = this.$login.f.name
518
+ }
519
+ },
520
+ // 是否禁用按钮
521
+ disableButton() {
522
+ let fields = this.data.fields
523
+
524
+ let flag = false
525
+ for (const item of fields) {
526
+ if (item.type !== 'checkbox' && item.required && !item.value) {
527
+ if (item.value === 0) {
528
+ flag = false
529
+ } else {
530
+ flag = true
531
+ }
532
+ }
533
+ // 任何选择框只要是否都不能提交
534
+ if (item.type === 'select' && (item.value === '否' || item.value === '未开工') && item.disabledButton) {
535
+ flag = true
536
+ }
537
+ // 任何选择框只要是否都不能提交
538
+ if (item.type === 'select' && item.label === '工程状态'&& item.value === '正在施工'&& item.disabledButton) {
539
+ flag = true
540
+ }
541
+ }
542
+
543
+ let count = 0
544
+ for (const item of fields) {
545
+ if (item.type !== 'checkbox' && item.required) {
546
+ count++
547
+ }
548
+ }
549
+ if (count === 0) {
550
+ flag = false
551
+ }
552
+
553
+ this.disable_button = flag
554
+ },
555
+ // 失去焦点触发,无论值是否发生变化
556
+ onblur(index) {
557
+ // 是否禁用按钮
558
+ this.disableButton()
559
+
560
+ this.$dispatch('onblur', index)
561
+ // 如果有错误信息提示走错误信息判断处理
562
+
563
+ if (this.data.fields[index].error && this.data.fields[index].type === 'datepicker') {
564
+ this.$dispatch('error_check', index)
565
+ }
566
+ },
567
+ // 失去焦点且值最终发生变化触发
568
+ onchange(index) {
569
+ // 是否禁用按钮
570
+ this.disableButton()
571
+
572
+ // this.data.fields[index].value = this.data.fields[index].value.trim()
573
+
574
+ if (this.data.fields[index].prefix && this.data.fields[index].value !== '') {
575
+ this.data.fields[index].value = this.data.fields[index].prefix + this.data.fields[index].value
576
+ }
577
+
578
+ this.data[this.data.fields[index].field] = this.data.fields[index].value
579
+
580
+ if (this.data.fields[index].onchange) {
581
+ this.$dispatch(this.data.fields[index].onchange, index)
582
+ }
583
+ this.$dispatch('onchange', index)
584
+
585
+ // 如果有错误信息提示走错误信息判断处理
586
+ if (this.data.fields[index].error && this.data.fields[index].type === 'datepicker') {
587
+ this.$dispatch('error_check', index)
588
+ }
589
+ },
590
+ oninput(index) {
591
+ // 是否禁用按钮
592
+ this.disableButton()
593
+
594
+ this.$dispatch('oninput', index)
595
+
596
+ // 如果有错误信息提示走错误信息判断处理
597
+ if (this.data.fields[index].error && this.data.fields[index].type === 'datepicker') {
598
+ this.$dispatch('error_check', index)
599
+ }
600
+ },
601
+ // 模态框确认按钮
602
+ confirm_modal(title) {
603
+ if (title === '新增') {
604
+ if (this.data.onetomany[this.onetomany_index].addEvent === 'default' || !this.data.onetomany[this.onetomany_index].addEvent) {
605
+ this.$dispatch('onetomanyadd', this.onetomany_index)
606
+ } else {
607
+ this.$dispatch(this.data.onetomany[this.onetomany_index].addEvent, this.onetomany_index)
608
+ }
609
+ } else {
610
+ if (this.data.onetomany[this.onetomany_index].updateEvent === 'default' || !this.data.onetomany[this.onetomany_index].updateEvent) {
611
+ this.$dispatch('onetomanyupdate', this.onetomany_index, this.update_onetomany_index)
612
+ } else {
613
+ this.$dispatch(this.data.onetomany[this.onetomany_index].updateEvent, this.onetomany_index, this.update_onetomany_index)
614
+ }
615
+ }
616
+
617
+ this.closemodal()
618
+ },
619
+ // 删除
620
+ delete(i, j) {
621
+ this.$showMessage((this.data.onetomany[i].deleteMessage === 'default' || !this.data.onetomany[i].deleteMessage) ? '您确定要删除这条记录吗?' : this.data.onetomany[i].deleteMessage, ['confirm']).then((res) => {
622
+ if (res === 'confirm') {
623
+ if (this.data.onetomany[i].deleteEvent === 'default' || !this.data.onetomany[i].deleteEvent) {
624
+ this.$dispatch('onetomanydelete', i, j)
625
+ } else {
626
+ this.$dispatch(this.data.onetomany[i].deleteEvent, i, j)
627
+ }
628
+ }
629
+ })
630
+ },
631
+ // 修改
632
+ update(i, j) {
633
+ let onetomany = this.data.onetomany[i]
634
+ let item = this.data.onetomany[i].rows[j]
635
+ let count = 0
636
+ for (let k = 0; k < onetomany.fields.length; k++) {
637
+ // 防止初始化的时候没有value
638
+ Vue.set(this.data.onetomany[i].fields[k], 'value', item[this.data.onetomany[i].fields[k].field])
639
+
640
+ if (onetomany.fields[j].required) {
641
+ count++
642
+ }
643
+ }
644
+ if (count === 0) {
645
+ this.disable_button_onetomany = false
646
+ }
647
+ this.modeltitle = '修改'
648
+ this.modalSize = this.data.onetomany[i].modalSize
649
+ this.onetomany_index = i
650
+ this.update_onetomany_index = j
651
+
652
+ this.$dispatch('openUpdateModel', i, j)
653
+
654
+ this.show = true
655
+ },
656
+ // 添加
657
+ add(index) {
658
+ let count = 0
659
+ for (const item of this.data.onetomany[index].fields) {
660
+ if (item.type === 'datepicker') {
661
+ item.value = new Date().Format('yyyy-MM-dd')
662
+ }
663
+ if (item.required) {
664
+ count++
665
+ }
666
+ }
667
+
668
+ if (count === 0) {
669
+ this.disable_button_onetomany = false
670
+ }
671
+ this.modeltitle = '新增'
672
+ this.modalSize = this.data.onetomany[index].modalSize
673
+ this.onetomany_index = index
674
+
675
+ this.$dispatch('openAddModel', index)
676
+
677
+ this.show = true
678
+ },
679
+ // 关闭模态框
680
+ closemodal(val) {
681
+ if (val === 'but') {
682
+ this.disableButton()
683
+ this.showbutmodal = false
684
+ return
685
+ }
686
+ for (const item of this.data.onetomany[this.onetomany_index].fields) {
687
+ item.value = ''
688
+ }
689
+ this.show = false
690
+ this.disable_button_onetomany = true
691
+ this.onetomany_index = null
692
+ this.update_onetomany_index = null
693
+ this.modeltitle = null
694
+ this.modalSize = null
695
+ },
696
+ // 是否禁用模态框按钮
697
+ disableModalButton() {
698
+ let fields = this.data.onetomany[this.onetomany_index].fields
699
+
700
+ let flag = false
701
+ for (const item of fields) {
702
+ if (item.type !== 'checkbox' && item.required && !item.value) {
703
+ if (item.value === 0) {
704
+ flag = false
705
+ } else {
706
+ flag = true
707
+ }
708
+ }
709
+ }
710
+
711
+ let count = 0
712
+ for (const item of fields) {
713
+ if (item.type !== 'checkbox' && item.required) {
714
+ count++
715
+ }
716
+ }
717
+ if (count === 0) {
718
+ flag = false
719
+ }
720
+ this.disable_button_onetomany = flag
721
+ },
722
+ // 监听模态框属性失去焦点
723
+ onchange_modal(index) {
724
+ this.disableModalButton()
725
+ this.$dispatch('onchange_modal', this.onetomany_index, index)
726
+ },
727
+ // 监听模态框属性失去焦点
728
+ onblur_modal(index) {
729
+ this.disableModalButton()
730
+ this.$dispatch('onblur_modal', this.onetomany_index, index)
731
+ },
732
+ // input输入属性值发生变化监听
733
+ oninput_modal(index) {
734
+ this.disableModalButton()
735
+ this.$dispatch('oninput_modal', this.onetomany_index, index)
736
+ }
737
+ }
738
+ }
739
+ </script>
740
+ <style>
741
+ .datepicker{
742
+ width: 100%!important;
743
+ }
744
+ .datepicker-input{
745
+ background-color: #ffffff!important;
746
+ width: 100%!important;
747
+ }
748
+ .datepicker-input:disabled{
749
+ border: 1px solid #DDD!important;
750
+ color: #ACA899!important;
751
+ width: 100%!important;
752
+ }
753
+ </style>
754
+ <style scoped>
755
+ th{
756
+ font-size: 15px !important;
757
+ text-align: center !important;
758
+ background-color: #dfedfb!important;
759
+ color: #666666 !important;
760
+ font-family: PINGFANG-BOLD !important;
761
+ font-weight: normal!important;
762
+ }
763
+ /*清除model中的浮动*/
764
+ .clearfix:after,.clearfix:before{
765
+ display: table;
766
+ }
767
+ .clearfix:after{
768
+ clear: both;
769
+ }
770
+
771
+ .input_view{
772
+ padding: 8px;
773
+ background-color: #ffffff;
774
+ border-radius: 2px;
775
+ border: solid 1px #c7c7c7!important;
776
+ color: #333333!important;
777
+ font-size: 15px!important;
778
+ }
779
+
780
+ .input_view[readonly]{
781
+ border: 1px solid #DDD!important;
782
+ /*background-color: #F5F5F5;*/
783
+ color:#ACA899!important;
784
+ }
785
+ .input_view:disabled{
786
+ border: 1px solid #DDD!important;
787
+ /*background-color: #F5F5F5;*/
788
+ color:#ACA899!important;
789
+ }
790
+
791
+ .control-label-justify {
792
+ display: inline-block;
793
+ vertical-align: top;
794
+ width: 110px;
795
+ text-align: justify;
796
+ font-family: PingFang-SC-Bold;
797
+ }
798
+
799
+ .control-label-justify::after {
800
+ content: "";
801
+ display: inline-block;
802
+ width: 70px;
803
+ overflow: hidden;
804
+ height: 0;
805
+ }
806
+
807
+ input::-webkit-outer-spin-button,
808
+ input::-webkit-inner-spin-button {
809
+ -webkit-appearance: none;
810
+ }
811
+
812
+ input[type="number"] {
813
+ -moz-appearance: textfield;
814
+ }
815
+
816
+ </style>