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
@@ -1,23 +1,26 @@
1
1
  <template>
2
2
  <div class="auto select-overspread" v-if="refresh">
3
- <!--<div class="panel panel-info" v-if="!data.titlevisible">-->
4
- <!--<div class="panel-heading">-->
5
- <!--<h3 class="panel-title">-->
6
- <!--<span >{{data.title}}</span>-->
7
- <!--<span v-if="data.back_reason" style="color: red;font-family: 微软雅黑;font-weight: bold"> 请注意被退回原因为:{{data.back_reason}}</span>-->
8
- <!--</h3>-->
9
- <!--</div>-->
10
- <!--</div>-->
3
+ <div class="panel panel-info" v-if="!data.titlehidden">
4
+ <div class="panel-heading">
5
+ <h3 class="panel-title">
6
+ <span>{{data.title}}</span>
7
+ </h3>
8
+ </div>
9
+ </div>
11
10
  <validator name="v">
12
11
  <form class="form-horizontal">
13
- <div class="col-sm-11 form-group">
12
+ <div class="col-sm-12 form-group">
14
13
  <div v-for="(index,item) in data.fields">
15
14
  <!--input-->
16
- <div style="height: 34px" v-if="item.type==='input' || item.type==='number'" v-show="!item.hidden"
15
+ <div :style="item.style? item.style+';height: 34px;':'height: 34px;'"
16
+ v-if="item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email'"
17
+ v-show="!item.hidden"
17
18
  :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-4 form-group']">
18
- <label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-6'">{{item.label}}:</label>
19
- <div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'">
20
- <input class="form-control"
19
+ <label :style="item.label_style? item.label_style:''"
20
+ :class="item.label_bootstraped?item.label_bootstraped+' control-label-justify control-label':item.label_style?'':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
21
+ <div :style="item.value_style? item.value_style:''"
22
+ :class="item.value_bootstraped?item.value_bootstraped:item.value_style?'':'col-sm-6'">
23
+ <input class="form-control" style="background-color: #f7fbff;"
21
24
  :type="item.type"
22
25
  v-model="data.fields[index].value"
23
26
  :placeholder="item.placeholder"
@@ -27,35 +30,47 @@
27
30
  @change="select_change(index),disabled_check(data.fields[index].required,data.fields[index].value)"
28
31
  @blur="select_change(index),check_disable"
29
32
  />
33
+ <span
34
+ v-if="data.fields[index].error&&data.fields[index].error.msg&&data.fields[index].error.flag"
35
+ style="color: red">{{data.fields[index].error.msg}}</span>
30
36
  </div>
31
37
  </div>
32
38
  <!--时间datepicker-->
33
- <div style="height: 34px" v-if="item.type==='datepicker'" v-show="!item.hidden"
39
+ <div :style="item.style? item.style+';height: 34px;':'height: 34px;'" v-if="item.type==='datepicker'"
40
+ v-show="!item.hidden"
34
41
  :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-4 form-group']">
35
- <label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-6'">{{item.label}}:</label>
42
+ <label
43
+ :class="item.label_bootstraped?item.label_bootstraped+' control-label-justify control-label':'control-label control-label-justify col-sm-6'">{{item.label}}</label>
36
44
  <div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'">
37
45
  <datepicker
46
+ @change="select_change(index),disabled_check(data.fields[index].required,data.fields[index].value)"
47
+ @blur="select_change(index),check_disable"
38
48
  :placeholder="item.placeholder"
39
49
  :value.sync="data.fields[index].value"
40
- :format="'yyyy-MM-dd HH:mm:ss'"
50
+ :format="'yyyy-MM-dd'"
41
51
  v-model="data.fields[index].value"
42
- :readonly=true
52
+ :readonly="showadd_fields.fields[index].readonly"
43
53
  :disabled="item.disabled"
44
- @blur="check_disable"
45
54
  :show-reset-button="reset">
46
55
  </datepicker>
47
56
  </div>
57
+ <span
58
+ v-if="showadd_fields.fields[index].error&&showadd_fields.fields[index].error.msg&&showadd_fields.fields[index].error.flag"
59
+ style="color: red">{{showadd_fields.fields[index].error.msg}}</span>
48
60
  </div>
49
61
 
50
62
  <!--textarea-->
51
- <div v-if="item.type==='textarea'" v-show="!item.hidden"
63
+ <div :style="item.style? item.style:'height: 34px;'" v-if="item.type==='textarea'" v-show="!item.hidden"
52
64
  :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-12 form-group']">
53
- <label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-2'">{{item.label}}:</label>
54
- <div :class="item.value_bootstraped?item.value_bootstraped:'col-sm-10'">
65
+ <label :style="item.label_style? item.label_style:''"
66
+ :class="item.label_bootstraped?item.label_bootstraped+' control-label-justify control-label':item.label_style?'':'control-label-justify control-label col-sm-3'">{{item.label}}</label>
67
+ <div :style="item.value_style? item.value_style:''"
68
+ :class="item.value_bootstraped?item.value_bootstraped:item.value_style?'':'col-sm-10'">
55
69
  <textarea
56
70
  :readonly="item.readonly"
57
71
  :disabled="item.disabled"
58
72
  class="form-control"
73
+ style="background-color: #f7fbff;"
59
74
  :rows="item.rows"
60
75
  v-model="data.fields[index].value"
61
76
  @change="disabled_check(data.fields[index].required,data.fields[index].value)"
@@ -66,10 +81,10 @@
66
81
  </div>
67
82
 
68
83
  <!--radio-->
69
- <div v-if="item.type==='radio'"
84
+ <div v-if="item.type==='radio'"
70
85
  :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-12 form-group']">
71
86
  <label v-if="item.label"
72
- :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-2'">{{item.label}}:</label>
87
+ :class="item.label_bootstraped?item.label_bootstraped+' control-label-justify control-label':'control-label-justify control-label col-sm-2'">{{item.label}}</label>
73
88
  <div
74
89
  :class="item.value_bootstraped?item.value_bootstraped:item.items.length%2 == 0?'col-sm-5': 'col-sm-3'"
75
90
  v-for="(index2,row) in item.items">
@@ -86,7 +101,8 @@
86
101
  <!--select-->
87
102
  <div style="height: 34px" v-if="item.type==='select'" v-show="!item.hidden"
88
103
  :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-4 form-group']">
89
- <label :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-6'">{{item.label}}:</label>
104
+ <label
105
+ :class="item.label_bootstraped?item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
90
106
  <input-select :class="item.value_bootstraped?item.value_bootstraped:'col-sm-6'" @blur="check_disable"
91
107
  @change="select_change(index),disabled_check(data.fields[index].required,data.fields[index].value)"
92
108
  :readonly="item.readonly" :disabled="item.disabled" :value.sync="data.fields[index].value"
@@ -99,9 +115,9 @@
99
115
  <div v-if="item.type==='checkbox'"
100
116
  :class="[data.fields[index].required&&!(data.fields[index].value) ? 'has-error' : '',data.fields[index].bootstraped?data.fields[index].bootstraped+' form-group':'col-sm-12 form-group']">
101
117
  <label v-if="item.label"
102
- :class="item.label_bootstraped?item.label_bootstraped+' control-label':'control-label col-sm-2'">{{item.label}}:</label>
118
+ :class="item.label_bootstraped?item.label_bootstraped+' control-label ':'control-label col-sm-2'">{{item.label}}</label>
103
119
  <div style="margin-top: 6px"
104
- :class="item.value_bootstraped?item.value_bootstraped:'control-label col-sm-2'"
120
+ :class="item.value_bootstraped?item.value_bootstraped:'control-label col-sm-2'"
105
121
  v-for="(index2,row) in item.items">
106
122
  <label class="font-size form-group col-sm-6">{{row.label}}</label>
107
123
  <input :readonly="item.readonly" :disabled="item.disabled" type="checkbox" class="col-sm-6"
@@ -110,62 +126,69 @@
110
126
  </div>
111
127
  </div>
112
128
  <!-- onetomany -->
113
- <div class="col-sm-12" v-for="(i,datagrid) in data.onetomany">
129
+ <div class="col-sm-12" v-for="(i,datagrid) in data.onetomany">
130
+ <h5 v-show="datagrid.title" style="text-align: center;color: darkcyan;background-color: #00A3F0">
131
+ {{datagrid.title}}</h5>
114
132
  <table v-show="!datagrid.hidden" class="table table-bordered table-striped table-hover">
115
- <tr style="background-color: #00A3F0" >
116
- <th><font color="white">序号</font></th>
117
- <th v-for="labels in datagrid.fields" style="text-align: center">
133
+ <tr style="background-color: #00A3F0">
134
+ <th style="text-align: center;border-color: #00A3F0"><font color="white">序号</font></th>
135
+ <th v-for="labels in datagrid.fields" style="text-align: center;border-color: #00A3F0">
118
136
  <nobr><font color="white">{{labels.label}}</font></nobr>
119
137
  </th>
120
- <th style="text-align: center">
121
- <button type="button" @click="$dispatch('add',i)" class="btn btn-warning">
138
+ <th style="text-align: center;border-color: #00A3F0;padding: 0px">
139
+ <button type="button" @click="$dispatch('add',i)" class="btn btn-warning"
140
+ v-if="!data.onetomany[i].nopower && showprint">
122
141
  +
123
142
  </button>
124
143
  </th>
125
144
  </tr>
126
145
  <tr v-for="(j,row) in model.rows[i]">
127
146
  <td style="text-align: center">{{$index+1}}</td>
128
- <td v-for="key in surBodyData[i]" style="text-align: center">
147
+ <td v-for="key in surBodyData[i]" style="text-align: center">
129
148
  {{row[key]}}
130
149
  </td>
131
150
  <td style="text-align: center">
132
- <a href="#" @click="delete(i,j)">删除</a>
151
+ <a href="#" @click="delete(i,j)" v-if="!data.onetomany[i].nopower">删除</a>
133
152
  </td>
134
153
  </tr>
135
154
  </table>
136
155
  </div>
137
156
  </div>
138
- <div class="col-sm-11 form-group">
139
- <div class="form-group col-sm-6">
140
- <label class=" col-sm-4 control-label">所属公司:</label>
141
- <div class="col-sm-5">
142
- <input class="form-control" type="text" v-model="model.f_filiale" disabled>
157
+ <div class="col-sm-12 form-group text-center" style="padding-top:8px">
158
+ <div class="form-group col-sm-3 center-block">
159
+ <label class=" col-sm-5 control-label control-label-justify">所属公司:</label>
160
+ <div class="col-sm-6">
161
+ <input style="width: 150px" class="form-control" type="text" v-model="model.f_filiale" disabled>
143
162
  </div>
144
163
  </div>
145
- <div class="col-sm-6 form-group">
146
- <label class="control-label col-sm-6">部门:</label>
147
- <div class="col-sm-5">
148
- <input type="text" class="form-control" disabled v-model="model.f_parentname"/>
164
+ <!-- <div class="col-sm-1 form-group center-block">-->
165
+ <!-- </div>-->
166
+ <div class="col-sm-3 form-group center-block">
167
+ <label class="control-label control-label-justify col-sm-5">部门:</label>
168
+ <div class="col-sm-6">
169
+ <input style="width: 150px" type="text" class="form-control" disabled v-model="model.f_parentname"/>
149
170
  </div>
150
171
  </div>
151
- </div>
152
- <div class="col-sm-11 form-group">
153
- <div class="col-sm-6 form-group">
154
- <label class="control-label col-sm-4">操作日期:</label>
155
- <div class="col-sm-5">
156
- <input type="text" class="form-control" disabled v-model="model.f_operate_date"/>
172
+ <!-- <div class="col-sm-1 form-group center-block">-->
173
+ <!-- </div>-->
174
+ <div class="col-sm-3 form-group center-block">
175
+ <label class="control-label control-label-justify col-sm-5">操作人:</label>
176
+ <div class="col-sm-6 ">
177
+ <input style="width: 150px" type="text" class="form-control" disabled v-model="model.f_operator"/>
157
178
  </div>
158
179
  </div>
159
- <div class="col-sm-6 form-group">
160
- <label class="control-label col-sm-6">操作人:</label>
161
- <div class="col-sm-5">
162
- <input type="text" class="form-control" disabled v-model="model.f_operator"/>
180
+ <!-- <div class="col-sm-1 form-group center-block">-->
181
+ <!-- </div>-->
182
+ <div class="col-sm-3 form-group center-block">
183
+ <label class="control-label control-label-justify col-sm-5">操作日期:</label>
184
+ <div class="col-sm-6">
185
+ <input style="width: 95px" type="text" class="form-control" disabled v-model="model.f_operate_date"/>
163
186
  </div>
164
187
  </div>
165
188
  </div>
166
189
  </form>
167
190
  </validator>
168
- <div class="from-group col-sm-12">
191
+ <div class="from-group col-sm-11">
169
192
  <center>
170
193
  <!-- 按钮组 -->
171
194
  <button v-for="(index,button) in data.buttons"
@@ -205,49 +228,80 @@
205
228
 
206
229
 
207
230
  <!-- onetomany新增模态框 -->
208
- <modal v-if="showadd" :show.sync="showadd" v-ref:modal backdrop="false">
209
- <header slot="modal-header" class="modal-header">
210
- <button type="button" class="close" @click="closemodal('新增')"><span>&times;</span></button>
211
- <h4 class="modal-title">新增</h4>
212
- </header>
213
- <article slot="modal-body" class="modal-body">
214
- <div class="col-sm-12" v-for="(index,showadd_field) in showadd_fields.fields">
215
- <label v-show = "!showadd_field.hidden" class="control-label col-sm-3" style="margin-top: 10px">{{showadd_field.label}}:</label>
216
- <div class="col-sm-7" v-show = "!showadd_field.hidden">
217
- <!--时间datepicker-->
218
- <div v-if="showadd_field.type=='datepicker'"
219
- :class="[showadd_fields[index].required&&!(showadd_fields.fields[index].value) ? 'has-error' : '']">
220
- <div >
221
- <datepicker
222
- :placeholder="showadd_field.placeholder"
223
- :value.sync="showadd_fields.fields[index].value"
224
- :format="'yyyy-MM-dd HH:mm:ss'"
225
- v-model="showadd_fields.fields[index].value"
226
- :readonly=true
227
- :disabled="showadd_fields.fields[index].disabled"
228
- @blur="check_disable"
229
- :show-reset-button="reset">
230
- </datepicker>
231
+ <div class="auto onetomanymodal"
232
+ style="z-index:8888;box-shadow: 0px 0px 100px 10px grey;position: fixed;"
233
+ v-if="showadd">
234
+
235
+ <div class="auto">
236
+
237
+ <div style="padding-top: 15px;padding-left: 15px;padding-right: 15px;">
238
+ <button type="button" class="close" @click="closemodal(modeltitle)"><span>&times;</span></button>
239
+ <span class="modal-title" style="border-bottom: 1px solid #e5e5e5;"><font
240
+ size="3">{{modeltitle}}</font></span>
241
+ </div>
242
+            
243
+ <div style="padding-top: 15px;border-top: 0px solid #e5e5e5;border-bottom: 0px solid #e5e5e5;">
244
+ <div class="col-sm-12" v-for="(index,showadd_field) in showadd_fields.fields" v-if="refresh_modal">
245
+ <label v-show="!showadd_field.hidden" class="control-label col-sm-3" style="margin-top: 10px">{{showadd_field.label}}:</label>
246
+ <div class="col-sm-7" v-show="!showadd_field.hidden">
247
+ <!--时间datepicker-->
248
+ <div v-if="showadd_field.type=='datepicker'"
249
+ :class="[showadd_fields[index].required&&!(showadd_fields.fields[index].value) ? 'has-error' : '']">
250
+ <div>
251
+ <datepicker
252
+ @change="select_change_modal(index),disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
253
+ @blur="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
254
+ :placeholder="showadd_field.placeholder"
255
+ :value.sync="showadd_fields.fields[index].value"
256
+ :format="'yyyy-MM-dd'"
257
+ v-model="showadd_fields.fields[index].value"
258
+ :readonly="showadd_fields.fields[index].readonly"
259
+ :disabled="showadd_fields.fields[index].disabled"
260
+ :show-reset-button="reset">
261
+ </datepicker>
262
+ </div>
231
263
  </div>
264
+ <!--select-->
265
+ <input-select
266
+ @change="select_change_modal(index),disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
267
+ v-if="showadd_field.type=='select'"
268
+ @blur="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
269
+ :mouseout="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
270
+ :value.sync="showadd_fields.fields[index].value"
271
+ v-model="showadd_fields.fields[index].value"
272
+ :options='showadd_fields.fields[index].options'>
273
+ </input-select>
274
+ <!-- input -->
275
+ <input :type="showadd_field.type"
276
+ @change="select_change_modal(index),check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
277
+ v-if="(showadd_field.type=='input'||showadd_field.type=='number')&&!showadd_field.hidden"
278
+ @blur="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
279
+ :mouseout="check_disable_modal,disabled_check_modal(showadd_fields.fields[index].required,showadd_fields.fields[index].value)"
280
+ :readonly="showadd_field.readonly" class="form-control"
281
+ v-model="showadd_fields.fields[index].value"
282
+ :value.sync="showadd_fields[index].value"/>
283
+ <span
284
+ v-if="showadd_fields.fields[index].error&&showadd_fields.fields[index].error.msg&&showadd_fields.fields[index].error.flag"
285
+ style="color: red">{{showadd_fields.fields[index].error.msg}}</span>
232
286
  </div>
233
- <!--select-->
234
- <input-select @change="select_change(index)" v-if="showadd_field.type=='select'" :value.sync="showadd_fields.fields[index].value"
235
- v-model="showadd_fields.fields[index].value"
236
- :options='showadd_fields.fields[index].options'>
237
- </input-select>
238
- <!-- input -->
239
- <input @change="select_change(index)" v-if="showadd_field.type=='input'" class="form-control" v-model="showadd_fields[index].value" :value.sync="showadd_fields[index].value"/>
240
287
  </div>
241
288
  </div>
242
- </article>
243
- <footer slot="modal-footer" style="border-top:none" class="modal-footer">
244
- <button v-show="showadd" type="button" class="btn btn-primary" @click="acknowledge('新增')">确认</button>
245
- </footer>
246
- </modal>
289
+
290
+ <div style="padding-top: 15px;padding-left: 15px;padding-right: 15px;text-align: right;">
291
+ <button :class="disable_button_modal?'btn btn-default':'btn btn-primary'" v-show="showadd"
292
+ :disabled="disable_button_modal" type="button" @click="acknowledge(modeltitle)">
293
+ 确认
294
+ </button>
295
+ </div>
296
+
297
+ </div>
298
+  
299
+ </div>
300
+
247
301
  </div>
248
302
  </template>
249
303
  <script>
250
- import Vue from 'vue'
304
+ import Vue from 'vue'
251
305
  // Date格式化
252
306
  Date.prototype.Format = function (fmt) {
253
307
  var o = {
@@ -267,7 +321,15 @@ import Vue from 'vue'
267
321
 
268
322
  export default {
269
323
  title: '报建业务通用组件',
270
- props: ['data'],
324
+ props: {
325
+ data: {
326
+ type: Object
327
+ },
328
+ showprint: {
329
+ type: Boolean,
330
+ default: true
331
+ }
332
+ },
271
333
  data() {
272
334
  return {
273
335
  data: {
@@ -275,10 +337,10 @@ import Vue from 'vue'
275
337
  fields: []
276
338
  }
277
339
  },
278
- surBodyData:[],
340
+ surBodyData: [],
279
341
  refresh: true, // 控制重新渲染
280
342
  model: {
281
- rows:[],
343
+ rows: [],
282
344
  button: {
283
345
  button_name: null,
284
346
  button_index: null
@@ -291,9 +353,13 @@ import Vue from 'vue'
291
353
  showadd: false, // onetomany 新增模态框
292
354
  showadd_fields: [], // onetomany 新增模态框的字段配置
293
355
  data: null,
294
- showadd_index:null,
356
+ modeltitle: '',
357
+ tempid: null,
358
+ showadd_index: null,
295
359
  showmodal: false,
296
- disable_button: true
360
+ disable_button: true,
361
+ disable_button_modal: true,
362
+ refresh_modal: true
297
363
  }
298
364
  },
299
365
  created() {
@@ -301,26 +367,141 @@ import Vue from 'vue'
301
367
  this.initializtion()
302
368
  },
303
369
  events: {
304
- 'add'(index){
370
+ async 'add'(index) {
305
371
  let templet = new Object()
306
372
  templet = this.data.onetomany[index]
373
+ let count = 0
307
374
  for (let j = 0; j < templet.fields.length; j++) {
308
375
  templet.fields[j].value = ''
309
- if(templet.fields[j].type == 'datepicker'){
310
- templet.fields[j].value = new Date().Format("yyyy-MM-dd HH:mm:ss")
376
+ if (templet.fields[j].type == 'datepicker') {
377
+ templet.fields[j].value = new Date().Format("yyyy-MM-dd")
378
+ }
379
+ if (templet.fields[j].required) {
380
+ count++
311
381
  }
312
382
  }
383
+ if (count == 0) {
384
+ this.disable_button_modal = false
385
+ }
386
+ this.modeltitle = '新增'
313
387
  this.showadd_fields = templet
314
388
  this.showadd_index = index
315
389
  this.showadd = true
316
390
  }
317
391
  },
318
392
  methods: {
393
+ // 获取组件中的数据
394
+ getmodel() {
395
+ // 组织model.fields数据
396
+ let modeldatas = {}
397
+ for (let i = 0; i < this.data.fields.length; i++) {
398
+ // checkbox特殊处理
399
+ if (this.data.fields[i].type === 'checkbox') {
400
+ for (let j = 0; j < this.data.fields[i].items.length; j++) {
401
+ modeldatas[this.data.fields[i].items[j].field] = this.data.fields[i].items[j].value
402
+ }
403
+ } else {
404
+ modeldatas[this.data.fields[i].field] = this.data.fields[i].value
405
+ }
406
+ }
407
+ modeldatas.f_process_id = this.data.f_process_id
408
+ modeldatas.f_filiale = this.model.f_filiale
409
+ modeldatas.f_parentname = this.model.f_parentname
410
+ modeldatas.f_operator = this.model.f_operator
411
+ modeldatas.f_operate_date = this.model.f_operate_date
412
+ return modeldatas
413
+ },
414
+ // 修改
415
+ revise(index, index2) {
416
+ this.showadd_fields = []
417
+ let templet = new Object()
418
+ templet = this.data.onetomany[index]
419
+ for (let j = 0; j < templet.fields.length; j++) {
420
+ if (templet.fields[j].type == 'input') {
421
+ templet[j] = {}
422
+ templet[j].value = this.model.rows[index][index2][templet.fields[j].field]
423
+ templet.fields[j].value = this.model.rows[index][index2][templet.fields[j].field]
424
+ } else {
425
+ templet.fields[j].value = this.model.rows[index][index2][templet.fields[j].field]
426
+ if (templet.fields[j].type == 'datepicker') {
427
+ templet.fields[j].value = new Date().Format("yyyy-MM-dd")
428
+ }
429
+ }
430
+ }
431
+ this.tempid = this.model.rows[index][index2].id
432
+ this.modeltitle = '修改'
433
+ this.showadd_fields = templet
434
+ this.showadd_index = index
435
+ this.showadd = true
436
+ },
437
+ // 检测模态框按钮的disable
438
+ disabled_check_modal(required, value) {
439
+ if (required && value) {
440
+ this.disable_button_modal = false
441
+
442
+ let fields = this.showadd_fields.fields
443
+ let flag = false
444
+ for (let i = 0; i < fields.length; i++) {
445
+ if (fields[i].type !== 'checkbox' && fields[i].required && !fields[i].value) {
446
+ flag = true
447
+ }
448
+ }
449
+ this.disable_button_modal = flag
450
+ }
451
+ },
452
+ // 检测模态框按钮的disable,反向检查
453
+ check_disable_modal() {
454
+ let fields = this.showadd_fields.fields
455
+ let flag = false
456
+ for (let i = 0; i < fields.length; i++) {
457
+ if (fields[i].type !== 'checkbox' && fields[i].required && !fields[i].value) {
458
+ flag = true
459
+ }
460
+ }
461
+ let count = 0
462
+ for (let i = 0; i < fields.length; i++) {
463
+ if (fields[i].type !== 'checkbox' && !fields[i].required) {
464
+ count++
465
+ }
466
+ }
467
+ if (count == 0) {
468
+ flag = false
469
+ }
470
+ this.disable_button_modal = flag
471
+ },
472
+ // 模态框监听
473
+ select_change_modal(index) {
474
+ if (this.showadd_fields.fields[index].value) {
475
+ this.showadd_fields[index] = {}
476
+ this.showadd_fields[index].value = this.showadd_fields.fields[index].value
477
+ } else if (this.showadd_fields[index] && this.showadd_fields[index].value) {
478
+ this.showadd_fields.fields[index].value = this.showadd_fields[index].value
479
+ }
480
+ this.refresh_modal = false
481
+ this.$nextTick(() => {
482
+ this.refresh_modal = true
483
+ })
484
+ this.$dispatch('select_cascade_modal', this.showadd_index, index)
485
+ if (this.showadd_fields.fields[index].type == 'datepicker' || this.showadd_fields.fields[index].error) {
486
+ this.$dispatch('modal_error_check', this.showadd_index, index)
487
+ }
488
+ },
489
+ // 更新showadd模态框
490
+ update_showadd_fields_value(index, value) {
491
+ this.showadd_fields.fields[index].value = value
492
+ this.showadd_fields[index] = {}
493
+ this.showadd_fields[index].value = value
494
+ },
495
+ // 清理showadd模态框
496
+ clear_showadd_fields_value(index) {
497
+ this.showadd_fields.fields[index].value = ''
498
+ this.showadd_fields[index].value = ''
499
+ },
319
500
  // 删除
320
- delete(i,j){
321
- this.$showMessage("您确定要删除这条记录吗?",['confirm']).then((res)=>{
322
- if(res=='confirm'){
323
- this.$dispatch('onetomanydelete',i,j)
501
+ delete(i, j) {
502
+ this.$showMessage("您确定要删除这条记录吗?", ['confirm']).then((res) => {
503
+ if (res == 'confirm') {
504
+ this.$dispatch('onetomanydelete', i, j)
324
505
  }
325
506
  })
326
507
  },
@@ -347,36 +528,36 @@ import Vue from 'vue'
347
528
  count++
348
529
  }
349
530
  }
350
- if(count = 0){
531
+ if (count = 0) {
351
532
  flag = false
352
533
  }
353
534
  this.disable_button = flag
354
535
 
355
- this.model.rows =[]
536
+ this.model.rows = []
356
537
  this.surBodyData = []
357
- if(this.data.onetomany&&this.data.onetomany.length>0){
358
- for(let i = 0; i<this.data.onetomany.length;i++){
538
+ if (this.data.onetomany && this.data.onetomany.length > 0) {
539
+ for (let i = 0; i < this.data.onetomany.length; i++) {
359
540
  let temp = []
360
- for(let j = 0; j < this.data.onetomany[i].fields.length; j++){
541
+ for (let j = 0; j < this.data.onetomany[i].fields.length; j++) {
361
542
  temp.push(this.data.onetomany[i].fields[j].field)
362
543
  }
363
544
  this.surBodyData.push(temp)
364
545
  }
365
- for(let i=0;i<this.data.onetomany.length;i++){
366
- if(this.data.onetomany[i].rows){
546
+ for (let i = 0; i < this.data.onetomany.length; i++) {
547
+ if (this.data.onetomany[i].rows) {
367
548
  this.model.rows.push(this.data.onetomany[i].rows)
368
549
  }
369
550
  }
370
551
 
371
552
  }
372
553
  // datepicker 没有值给当时值
373
- if (this.data.fields&&this.data.fields.length>0) {
554
+ if (this.data.fields && this.data.fields.length > 0) {
374
555
  for (let i = 0; i < this.data.fields.length; i++) {
375
556
  if (this.data.fields[i].type === 'datepicker' && !this.data.fields[i].value) {
376
- this.data.fields[i].value = new Date().Format("yyyy-MM-dd HH:mm:ss")
557
+ this.data.fields[i].value = new Date().Format("yyyy-MM-dd")
377
558
  }
378
559
  }
379
- }else {
560
+ } else {
380
561
  this.disable_button = false
381
562
  }
382
563
  if (this.data.filiale) {
@@ -392,7 +573,7 @@ import Vue from 'vue'
392
573
  if (this.data.operate_date) {
393
574
  this.model.f_operate_date = this.data.operate_date
394
575
  } else {
395
- this.model.f_operate_date = new Date().Format("yyyy-MM-dd HH:mm:ss")
576
+ this.model.f_operate_date = new Date().Format("yyyy-MM-dd")
396
577
  }
397
578
  if (this.data.operator) {
398
579
  this.model.f_operator = this.data.operator
@@ -404,16 +585,15 @@ import Vue from 'vue'
404
585
  acknowledge(val) {
405
586
  if (val == '新增') {
406
587
  let temp = {}
407
- for(let i=0;i<this.showadd_fields.fields.length;i++){
408
- if(this.showadd_fields[i]){
409
- temp[this.showadd_fields.fields[i].field] = this.showadd_fields[i].value
410
- }else{
588
+ for (let i = 0; i < this.showadd_fields.fields.length; i++) {
589
+ if (this.showadd_fields.fields[i].value) {
411
590
  temp[this.showadd_fields.fields[i].field] = this.showadd_fields.fields[i].value
591
+ } else if (this.showadd_fields && this.showadd_fields[i] && this.showadd_fields[i].value) {
592
+ temp[this.showadd_fields.fields[i].field] = this.showadd_fields[i].value
412
593
  }
413
-
414
594
  }
415
595
  this.model.rows[this.showadd_index].push(temp)
416
- this.$dispatch('confirm',this.data.onetomany[this.showadd_index].tables,temp,this.showadd_index,this.model.rows[this.showadd_index].length-1)
596
+ this.$dispatch('confirm', this.data.onetomany[this.showadd_index].tables, temp, this.showadd_index, this.model.rows[this.showadd_index].length - 1)
417
597
  this.showadd_fields = null
418
598
  this.showadd_index = null
419
599
  this.closemodal(val)
@@ -427,10 +607,28 @@ import Vue from 'vue'
427
607
  },
428
608
  // 关闭模态框
429
609
  closemodal(val) {
610
+ if (this.showadd_fields && this.showadd_fields.fields && this.showadd_fields.fields.length) {
611
+ for (let i = 0; i < this.showadd_fields.fields.length; i++) {
612
+ if (this.showadd_fields[i] && this.showadd_fields[i].value) {
613
+ this.showadd_fields[i].value = ''
614
+ }
615
+ if (this.showadd_fields.fields[i] && this.showadd_fields.fields[i].value) {
616
+ this.showadd_fields.fields[i].value = ''
617
+ }
618
+ }
619
+ }
620
+
621
+ if (val != '新增' || val != '修改' || val != '删除') {
622
+ this.disable_button = false
623
+ }
430
624
  this.showmodal = false
431
625
  if (val == '新增') {
432
626
  this.showadd = false
433
627
  }
628
+ this.showadd_fields = null
629
+ this.disable_button_modal = true
630
+ this.modeltitle = null
631
+ this.tempid = null
434
632
  },
435
633
  // 点击按钮
436
634
  clicked(index, button) {
@@ -441,6 +639,7 @@ import Vue from 'vue'
441
639
  // temp['rows'] = this.model.rows
442
640
  // this.$dispatch('onetomanyevent',temp)
443
641
  // }
642
+ this.disable_button = true
444
643
  console.log(`点击了按钮index:${index}+button:${JSON.stringify(button)}`);
445
644
  // 组织model.fields数据
446
645
  let modeldatas = {}
@@ -471,6 +670,9 @@ import Vue from 'vue'
471
670
  if (button.button_node) {
472
671
  buttondatas.button_node = button.button_node
473
672
  }
673
+ if (button.button_person) {
674
+ buttondatas.button_person = button.button_person
675
+ }
474
676
  buttondatas.button_name = button.button_name
475
677
  buttondatas.button_index = index
476
678
  if (button.button_fields) {
@@ -487,9 +689,13 @@ import Vue from 'vue'
487
689
  this.$dispatch('button', this.model)
488
690
  }
489
691
  },
490
- // 级联操作预留
692
+ // 监听
491
693
  select_change(index) {
492
694
  this.$dispatch('select_cascade', index)
695
+ // 如果有错误信息提示走错误信息判断处理
696
+ if (this.data.fields[index].error || this.data.fields[index].type == 'datepicker') {
697
+ this.$dispatch('error_check', index)
698
+ }
493
699
  },
494
700
  // 检测按钮的disable
495
701
  disabled_check(required, value) {
@@ -522,7 +728,7 @@ import Vue from 'vue'
522
728
  if (this.data.operate_date) {
523
729
  this.model.f_operate_date = this.data.operate_date
524
730
  } else {
525
- this.model.f_operate_date = new Date().Format("yyyy-MM-dd HH:mm:ss")
731
+ this.model.f_operate_date = new Date().Format("yyyy-MM-dd")
526
732
  }
527
733
  if (this.data.operator) {
528
734
  this.model.f_operator = this.data.operator
@@ -555,7 +761,7 @@ import Vue from 'vue'
555
761
  count++
556
762
  }
557
763
  }
558
- if(count = 0){
764
+ if (count == 0) {
559
765
  flag = false
560
766
  }
561
767
  this.disable_button = flag
@@ -568,13 +774,47 @@ import Vue from 'vue'
568
774
  }
569
775
  </script>
570
776
  <style scoped>
571
- th{
777
+ th {
778
+
779
+ }
780
+
781
+ .control-label-justify {
782
+ display: inline-block;
783
+ vertical-align: top;
784
+ width: 90px;
785
+ text-align: justify;
786
+ font-family: PingFang-SC-Bold;
787
+ }
788
+
789
+ .control-label-justify::after {
790
+ content: "";
791
+ display: inline-block;
792
+ width: 70px;
793
+ overflow: hidden;
794
+ height: 0;
572
795
  }
796
+
573
797
  input::-webkit-outer-spin-button,
574
798
  input::-webkit-inner-spin-button {
575
799
  -webkit-appearance: none;
576
800
  }
577
- input[type="number"]{
801
+
802
+ input[type="number"] {
578
803
  -moz-appearance: textfield;
579
804
  }
805
+
806
+ .onetomanymodal {
807
+ background-color: #fff;
808
+ left: 40%;
809
+ margin: -300/2 0 0 -300/2;
810
+ position: fixed;
811
+ top: 15%;
812
+ width: 500px;
813
+ height: auto;
814
+ z-index: 25;
815
+ }
816
+
817
+ tr {
818
+ height: 34px;
819
+ }
580
820
  </style>