apply-clients 3.5.5-10 → 3.5.5-101

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 (92) hide show
  1. package/build/dev-server.js +5 -9
  2. package/package.json +6 -4
  3. package/src/App.vue +25 -25
  4. package/src/components/QXClient.js +333 -0
  5. package/src/components/SignTools.js +65 -0
  6. package/src/components/android/AppTakePic.vue +182 -182
  7. package/src/components/android/Process/AppChargeList.vue +8 -0
  8. package/src/components/android/Process/AppExplorationUser.vue +1 -2
  9. package/src/components/android/Process/AppServiceControl.vue +1760 -1755
  10. package/src/components/product/Function/Service/FunctionServiceControl.vue +497 -497
  11. package/src/components/product/Install/ContractCharge.vue +3 -3
  12. package/src/components/product/Material/MaterialDetailed.vue +268 -268
  13. package/src/components/product/Process/Processes/contractModel.vue +49 -37
  14. package/src/components/product/ServiceView.vue +1028 -1028
  15. package/src/filiale/baiyin/android/ByAddMaterialScience.vue +2 -0
  16. package/src/filiale/fugou/android/AppAddMaterialScience.vue +444 -444
  17. package/src/filiale/fugou/android/AppAddReplacement.vue +512 -341
  18. package/src/filiale/fugou/android/AppDevicesManagement.vue +521 -519
  19. package/src/filiale/fugou/android/AppExplorationUser.vue +3 -3
  20. package/src/filiale/fugou/android/AppInstallationDetails.vue +542 -541
  21. package/src/filiale/fugou/android/AppServiceControl.vue +1894 -1836
  22. package/src/filiale/fugou/android/AppZhihuanManagement.vue +14 -2
  23. package/src/filiale/fugou/android/printCharge.vue +162 -162
  24. package/src/filiale/fugou/android.js +16 -16
  25. package/src/filiale/fugou/pc/AddReplacement.vue +511 -340
  26. package/src/filiale/fugou/pc/ApplyChargeList.vue +554 -480
  27. package/src/filiale/fugou/pc/Applybatchdispatch.vue +754 -0
  28. package/src/filiale/fugou/pc/ExplorationSelect.vue +524 -525
  29. package/src/filiale/fugou/pc/InstallationDetails.vue +646 -646
  30. package/src/filiale/fugou/pc/ServiceControl.vue +47 -20
  31. package/src/filiale/fugou/pc/ServiceView.vue +941 -941
  32. package/src/filiale/fugou/pc/StopApplyList.vue +291 -0
  33. package/src/filiale/fugou/pc/SupervisoryServiceControl.vue +881 -881
  34. package/src/filiale/fugou/pc/addMaterialScience.vue +481 -481
  35. package/src/filiale/fugou/pc/addressAndUserinfoManagement.vue +1 -1
  36. package/src/filiale/fugou/pc/chargeReport.vue +87 -15
  37. package/src/filiale/fugou/pc/devicesManagement.vue +484 -483
  38. package/src/filiale/fugou/pc/printChargepc.vue +148 -148
  39. package/src/filiale/fugou/pc.js +3 -1
  40. package/src/filiale/gongyi/android/AppAddMaterialScience.vue +493 -493
  41. package/src/filiale/gongyi/pc/addressAndUserinfoManagement.vue +187 -0
  42. package/src/filiale/gongyi/pc.js +2 -1
  43. package/src/filiale/hongda/pc/addMaterialScience.vue +2 -2
  44. package/src/filiale/jinhuang/android/AppAddMaterialScience.vue +635 -0
  45. package/src/filiale/jinhuang/android/AppServiceControl.vue +1842 -0
  46. package/src/filiale/jinhuang/android.js +7 -0
  47. package/src/filiale/jinhuang/pc/ContractList.vue +220 -0
  48. package/src/filiale/jinhuang/pc/ExplorationSelect.vue +511 -0
  49. package/src/filiale/jinhuang/pc/ServiceControl.vue +2016 -1925
  50. package/src/filiale/jinhuang/pc/SupervisoryList.vue +459 -0
  51. package/src/filiale/jinhuang/pc/addMaterialScience.vue +638 -0
  52. package/src/filiale/jinhuang/pc/addressAndUserinfoManagement.vue +41 -1
  53. package/src/filiale/jinhuang/pc.js +12 -8
  54. package/src/filiale/qianneng/android/AppChargeManagement.vue +686 -686
  55. package/src/filiale/qianneng/android/AppServiceView.vue +13 -13
  56. package/src/filiale/qianneng/android.js +15 -15
  57. package/src/filiale/qianneng/pc/ApplyMaterialDetailed.vue +261 -261
  58. package/src/filiale/qianneng/pc/Applybatchdispatch.vue +20 -3
  59. package/src/filiale/qianneng/pc/Applydetail.vue +1 -1
  60. package/src/filiale/qianneng/pc/FunctionServiceControl.vue +10 -3
  61. package/src/filiale/qianneng/pc/InstallFunction.vue +188 -188
  62. package/src/filiale/qianneng/pc/ServiceControl.vue +8 -3
  63. package/src/filiale/qianneng/pc.js +29 -29
  64. package/src/filiale/ruihua/pc/ServiceControl.vue +7 -1
  65. package/src/filiale/shexian/android/AppServiceControl.vue +1763 -1763
  66. package/src/filiale/shexian/android/AppSign.vue +152 -152
  67. package/src/filiale/yangchunboneng/android/AppChargeManagement.vue +527 -520
  68. package/src/filiale/yangchunboneng/android/AppContractCharge.vue +3 -3
  69. package/src/filiale/yangchunboneng/android/AppDevicesManagement.vue +645 -645
  70. package/src/filiale/yangchunboneng/android/AppExplorationUser.vue +72 -5
  71. package/src/filiale/yangchunboneng/android/AppInstallationMaterial.vue +37 -4
  72. package/src/filiale/yangchunboneng/android/AppProcessSupervisory.vue +331 -0
  73. package/src/filiale/yangchunboneng/android/AppServiceControl.vue +1879 -1703
  74. package/src/filiale/yangchunboneng/android/MaterIialOne.vue +21 -1
  75. package/src/filiale/yangchunboneng/android.js +2 -1
  76. package/src/filiale/yangchunboneng/pc/ApplyChargeList.vue +32 -4
  77. package/src/filiale/yangchunboneng/pc/ApplyUpload.vue +3 -3
  78. package/src/filiale/yangchunboneng/pc/ExplorationSelect.vue +612 -547
  79. package/src/filiale/yangchunboneng/pc/ServiceControl.vue +2114 -2112
  80. package/src/filiale/yangchunboneng/pc/ServiceView.vue +1007 -1007
  81. package/src/filiale/yangchunboneng/pc/StopApplyList.vue +294 -0
  82. package/src/filiale/yangchunboneng/pc/SupervisoryControl.vue +141 -0
  83. package/src/filiale/yangchunboneng/pc/SupervisoryList.vue +617 -605
  84. package/src/filiale/yangchunboneng/pc/SupervisoryListNew.vue +687 -683
  85. package/src/filiale/yangchunboneng/pc/SupervisoryServiceView.vue +1 -1
  86. package/src/filiale/yangchunboneng/pc/buildOrderList.vue +421 -0
  87. package/src/filiale/yangchunboneng/pc/chargeManagement.vue +1057 -1053
  88. package/src/filiale/yangchunboneng/pc/constructionInfo.vue +84 -0
  89. package/src/filiale/yangchunboneng/pc/devicesManagement.vue +574 -574
  90. package/src/filiale/yangchunboneng/pc/printBuildOrder.vue +175 -0
  91. package/src/filiale/yangchunboneng/pc.js +6 -1
  92. package/src/main.js +3 -3
@@ -1,1028 +1,1028 @@
1
- <template>
2
- <div class="select-overspread" style="background-color: #ffffff;padding: 20px;overflow: scroll">
3
- <validator name='v' @valid="$emit('valid')" @invalid="$emit('invalid')">
4
- <form class="form-horizontal">
5
- <div class="form-group">
6
- <div v-for="(index,item) in data.fields">
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') && !item.hidden && (item.device === 'pc' || !item.device) && ( item.label != '证件号码')&&( item.label !== '身份证') && (item.label !== '用户电话')"
10
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
11
- <label :style="item.label_style ? item.label_style : ''"
12
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
13
- <div :style="item.value_style ? item.value_style:''"
14
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
15
- <input class="form-control input_view" style=""
16
- :type="item.type"
17
- v-model="data.fields[index].value"
18
- :placeholder="item.placeholder"
19
- :value="data.fields[index].value"
20
- :readonly="item.readonly"
21
- :disabled="item.disabled"
22
- @change="onchange(index)"
23
- @blur="onblur(index)"
24
- @input="oninput(index)"
25
- />
26
- </div>
27
- </div>
28
-
29
- <!--input-->
30
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
31
- v-if="(data.f_credentials != '身份证' && item.label === '证件号码')"
32
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
33
- <label :style="item.label_style ? item.label_style : ''"
34
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
35
- <div :style="item.value_style ? item.value_style:''"
36
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
37
- <input class="form-control input_view" style=""
38
- :type="item.type"
39
- v-model="data.fields[index].value"
40
- :placeholder="item.placeholder"
41
- :value="data.fields[index].value"
42
- :readonly="item.readonly"
43
- :disabled="item.disabled"
44
- @change="onchange(index)"
45
- @blur="onblur(index)"
46
- @input="oninput(index)"
47
- />
48
- </div>
49
- </div>
50
- <!--身份证验证-->
51
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
52
- v-if="(item.label==='身份证') || (data.f_credentials === '身份证' && item.label === '证件号码')"
53
- :class="[$v.f_idnumber2.identityCardValid ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
54
- <label :style="item.label_style ? item.label_style : ''"
55
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
56
- <div :style="item.value_style ? item.value_style:''"
57
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
58
- <input class="form-control input_view" style=""
59
- :type="item.type"
60
- maxlength="18"
61
- v-model="data.fields[index].value"
62
- :placeholder="item.placeholder"
63
- :value="data.fields[index].value"
64
- v-validate:f_idnumber2='{identityCardValid: true}'
65
- :readonly="item.readonly"
66
- :disabled="item.disabled"
67
- @change="onchange(index)"
68
- @blur="onblur(index)"
69
- @input="oninput(index)"
70
- />
71
- </div>
72
- </div>
73
-
74
-
75
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
76
- v-if="item.label === '用户电话'"
77
- :class="[$v.f_user_phone.minlength || $v.f_user_phone.maxlength ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
78
- <label :style="item.label_style ? item.label_style : ''"
79
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
80
- <div :style="item.value_style ? item.value_style:''"
81
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
82
- <input class="form-control input_view" style=""
83
- type="number"
84
- oninput="if(value.length > 11) value=value.slice(0,11)"
85
- v-validate:f_user_phone="{minlength: 7, maxlength: 11 }"
86
- v-model="data.fields[index].value"
87
- :placeholder="item.placeholder"
88
- :value="data.fields[index].value"
89
- onKeypress="return(/[\d\.]/.test(String.fromCharCode(event.keyCode)))"
90
- :readonly="item.readonly"
91
- :disabled="item.disabled"
92
- @change="onchange(index)"
93
- @blur="onblur(index)"
94
- @input="oninput(index)"
95
- />
96
- </div>
97
- </div>
98
-
99
-
100
-
101
- <!--时间datepicker-->
102
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
103
- v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)"
104
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped+' form-group':'col-sm-4 form-group']">
105
- <label
106
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label control-label-justify col-sm-6'">{{item.label}}</label>
107
- <div :style="item.value_style ? item.value_style:''"
108
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
109
- <datepicker
110
- @change="onchange(index)"
111
- @blur="onblur(index)"
112
- :placeholder="item.placeholder"
113
- :value.sync="data.fields[index].value"
114
- :format="item.format ? item.format : 'yyyy-MM-dd'"
115
- v-model="data.fields[index].value"
116
- :readonly="item.readonly"
117
- :disabled="item.disabled"
118
- :show-reset-button="reset">
119
- </datepicker>
120
- </div>
121
- </div>
122
-
123
- <!--textarea-->
124
- <div :style="item.style ? item.style+';margin-bottom: 20px':'margin-bottom: 20px'"
125
- v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)"
126
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
127
- <label :style="item.label_style ? item.label_style : ''"
128
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-3'">{{item.label}}</label>
129
- <div :style="item.value_style ? item.value_style:''"
130
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-10'">
131
- <textarea
132
- :readonly="item.readonly"
133
- :disabled="item.disabled"
134
- class="form-control input_view"
135
- style="width: 100%;height: 100%"
136
- :rows="item.rows"
137
- v-model="data.fields[index].value"
138
- :value="data.fields[index].value"
139
- @change="onchange(index)"
140
- @blur="onblur(index)"
141
- @input="oninput(index)"
142
- >
143
- </textarea>
144
- </div>
145
- </div>
146
-
147
- <!--select-->
148
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
149
- v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device) && !item.multiple"
150
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
151
- <label
152
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
153
- <div :style="item.value_style ? item.value_style:''"
154
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
155
- <input-select
156
- class="select select_list"
157
- @blur="onblur(index)"
158
- @change="onchange(index)"
159
- @select-search="selectSearch($arguments,index)"
160
- :readonly="item.readonly"
161
- :disable="item.disabled"
162
- :value.sync="data.fields[index].value"
163
- v-model="data.fields[index].value"
164
- :options='data.fields[index].options'
165
- :valueSingle="true"></input-select>
166
- </div>
167
- </div>
168
- <!--select 多选-->
169
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
170
- v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)&& item.multiple"
171
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
172
- <label
173
- :class="item.label_bootstraped ? item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
174
- <div :style="item.value_style ? item.value_style:''"
175
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
176
- <v-select
177
- width="100%"
178
- class="select select_list"
179
- @blur="onblur(index)"
180
- @change="onchange(index)"
181
- @select-search="selectSearch($arguments,index)"
182
- :readonly="item.readonly"
183
- :disable="item.disabled"
184
- :value.sync="data.fields[index].value"
185
- v-model="data.fields[index].value"
186
- :options='data.fields[index].options'
187
- :multiple="data.fields[index].multiple"
188
- :valueSingle="true"></v-select>
189
- </div>
190
- </div>
191
-
192
- <!--checkbox-->
193
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
194
- v-if="item.type==='checkbox' && !item.hidden && (item.device === 'pc' || !item.device)"
195
- :class="[item.required && item.value.length === 0 ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
196
- <label v-if="item.label"
197
- :class="item.label_bootstraped?item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
198
- <div :style="item.value_style ? item.value_style:''"
199
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
200
- <label class="checkbox-inline" v-for="(index2,row) in item.options">
201
- <input type="checkbox" class=""
202
- :readonly="data.fields[index].readonly"
203
- :disabled="data.fields[index].disabled"
204
- v-model="data.fields[index].value"
205
- :value="data.fields[index].options[index2].value"
206
- @change="onchange(index)"
207
- @blur="onblur(index)">
208
- {{row.label}}
209
- </label>
210
- </div>
211
- </div>
212
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
213
- v-if="item.type==='button'"
214
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
215
- <div :style="item.value_style ? item.value_style:''"
216
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
217
- <button class="button_search button_spacing" :style="item.button_styles" @click.prevent="printclick(index)" :hidden="item.hidden">
218
- {{ item.name }}
219
- </button>
220
- </div>
221
- </div>
222
- <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
223
- v-if="item.type==='Abutton'"
224
- :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
225
- <div :style="item.value_style ? item.value_style:''"
226
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
227
- <a type="button" class="btn btn-info head-but"
228
- :href="item.href" download>{{item.name}}</a>
229
- </div>
230
- </div>
231
- </div>
232
- <!--区域地址联动-->
233
- <div>
234
- <res-area-select-group
235
- v-if="(data.f_apply_type === '报警器报建' || data.f_apply_type === '工商业报警器报建') && data.defname === '工程施工' && data.title === '工程施工' && data.f_sub_state !='完工'"
236
- labelstyle = "control-label"
237
- @shiji-select = "getSelectShijiValue"
238
- @xian-select = "getSelectXianValue"
239
- @shequ-select = "getSelectShequValue"
240
- >
241
- </res-area-select-group>
242
- </div>
243
-
244
- <gaode-map
245
- v-if="(data.f_apply_type === '报警器报建' || data.f_apply_type === '工商业报警器报建') && data.defname === '工程施工' && data.title === '工程施工' && data.f_sub_state !='完工'"
246
- >
247
-
248
- </gaode-map>
249
-
250
- </div>
251
- <!-- onetomany -->
252
- <div class="" v-for="(index,item) in data.onetomany">
253
- <onetomany :selectdata="data" :onetomany="item" :index="index" v-if="item.device === 'pc' || !item.device"></onetomany>
254
- </div>
255
-
256
- <div v-for="(i,item) in data.components">
257
- <h3 v-if="item.device === 'pc'"><nbr >{{item.title}}</nbr></h3>
258
- <component v-if="item.device === 'pc' || !item.device" :is="item.name" :selectdata="data" :mark="item.mark"></component>
259
- </div>
260
-
261
- <!--自定义组件-->
262
- <slot>
263
- <!--<div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"-->
264
- <!-- v-if="data.f_apply_type === '报警器报建' && data.defname === '工程施工'"-->
265
- <!-- :class="[$v.f_idnumber2.identityCardValid ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">-->
266
-
267
- <!--<div class="col-sm-6 form-group "-->
268
- <!-- :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">-->
269
- <!-- <label class="font_normal_body">省&ensp;市&ensp;区</label>-->
270
- <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_pcd_id"-->
271
- <!-- v-validate:f_pcd_id='{required: true }'-->
272
- <!-- >-->
273
-
274
- <!-- <v-select :value.sync="model.f_pcd_id" :value-single="true"-->
275
- <!-- :options='pcdslist' placeholder='请选择2'-->
276
- <!-- close-on-select search="true" @change="pcdChange">-->
277
- <!-- </v-select>-->
278
- <!--</div>-->
279
- <!--<div class="col-sm-6 form-group "-->
280
- <!-- :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">-->
281
- <!-- <label class="font_normal_body">街道/乡镇</label>-->
282
- <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_street_id"-->
283
- <!-- >-->
284
- <!-- <v-select :value.sync="model.f_street_id" :value-single="true"-->
285
- <!-- :options='streetslist' placeholder='请选择'-->
286
- <!-- @change="streetChange"-->
287
- <!-- close-on-select search="true">-->
288
- <!-- </v-select>-->
289
-
290
- <!--</div>-->
291
- <!--<div class="col-sm-6 form-group "-->
292
- <!-- :class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">-->
293
- <!-- <label class="font_normal_body">集收单位</label>-->
294
- <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_residential_area_id"-->
295
- <!-- v-validate:f_residential_area_id='{required: true }'>-->
296
- <!-- <v-select :value.sync="model.f_residential_area_id" :value-single="true"-->
297
- <!-- :options='areaslist' placeholder='请选择'-->
298
- <!-- @change="" @select-search="selectSearch"-->
299
- <!-- close-on-select search="true">-->
300
- <!-- </v-select>-->
301
- <!--</div>-->
302
- <!--</div>-->
303
- </slot>
304
- <!--公司等属性-->
305
- <div class="col-sm-12 form-group text-center" style="padding-top:8px">
306
- <div class="col-sm-3 form-group center-block">
307
- <label class="col-sm-5">所属公司:</label>
308
- <div class="col-sm-6" style="text-align: left">
309
- {{model.orgs}}
310
- </div>
311
- </div>
312
- <div class="col-sm-3 form-group center-block">
313
- <label class="col-sm-5">部门:</label>
314
- <div class="col-sm-6" style="text-align: left">
315
- {{model.parentname}}
316
- </div>
317
- </div>
318
- <div class="col-sm-3 form-group center-block">
319
- <label class="col-sm-5">操作人:</label>
320
- <div class="col-sm-6 " style="text-align: left">
321
- {{model.operator}}
322
- </div>
323
- </div>
324
- <div class="col-sm-3 form-group center-block">
325
- <label class="col-sm-5">操作日期:</label>
326
- <div class="col-sm-6" style="text-align: left">
327
- {{model.operate_date}}
328
- </div>
329
- </div>
330
- </div>
331
- <!-- 按钮组 -->
332
- <div class="from-group col-sm-12 text-center">
333
- <!-- 按钮组 -->
334
- <button v-for="(index,button) in data.buttons"
335
- :disabled="(button.disabled && disable_button)"
336
- style="min-width:100px"
337
- :class="button.disabled && disable_button ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
338
- v-if="!button.hidden && button.button_name !=='提交'&& button.button_name !=='确认'"
339
- @click.prevent="click_but(button)"
340
- >
341
- {{button.button_name}}
342
- </button>
343
- <button v-for="(index,button) in data.buttons"
344
- :disabled="(button.disabled && disable_button) || (!$v.valid)"
345
- style="min-width:100px"
346
- :class="button.disabled && disable_button || (!$v.valid) ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
347
- v-if="!button.hidden && (button.button_name ==='提交'||button.button_name ==='确认')"
348
- @click.prevent="click_but(button)"
349
- >
350
- {{button.button_name}}
351
- </button>
352
- </div>
353
- <div class="from-group col-sm-12 text-center" style="height: 20px;">
354
-
355
- </div>
356
- <!-- 按钮模态框 -->
357
- <modal v-if="showButModal" :show.sync="showButModal" backdrop="false" large>
358
- <header slot="modal-header" class="modal-header">
359
- <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
360
- <span class="modal-title"><font
361
- size="3">{{data.button.button_name}}</font></span>
362
- </header>
363
- <article slot="modal-body" class="modal-body clearfix">
364
- <div class="form-group" style="padding: 0 150px">
365
- <div v-for="(index,item) in data.button.button_fields">
366
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
367
- v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
368
- <label :style="item.label_style ? item.label_style : ''"
369
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
370
- <div :style="item.value_style ? item.value_style : ''"
371
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
372
- <input class="form-control input_view"
373
- :placeholder="item.placeholder"
374
- :type="item.type"
375
- v-model="item.value"
376
- :value="item.value"
377
- :readonly="item.readonly"
378
- :disabled="item.disabled"
379
- @change="onbutchange(index)"
380
- @blur="onbutblur(index)"
381
- @input="onbutinput(index)"
382
- />
383
- </div>
384
- </div>
385
-
386
- <!--时间datepicker-->
387
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
388
- v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
389
- <label :style="item.label_style ? item.label_style : ''"
390
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
391
- <div :style="item.value_style ? item.value_style : ''"
392
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
393
- <datepicker
394
- :placeholder="item.placeholder"
395
- :value.sync="item.value"
396
- v-model="item.value"
397
- :readonly="item.readonly"
398
- :disabled="item.disabled"
399
- :format="item.format ? item.format : 'yyyy-MM-dd'"
400
- :show-reset-button="true"
401
- @change="onbutchange(index)"
402
- @blur="onbutblur(index)"
403
- ></datepicker>
404
- </div>
405
- </div>
406
-
407
- <!--select-->
408
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
409
- v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
410
- <label :style="item.label_style ? item.label_style : ''"
411
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
412
- <div :style="item.value_style ? item.value_style : ''"
413
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
414
- <input-select
415
- class="select select_list"
416
- :value.sync="item.value"
417
- v-model="item.value"
418
- :options='item.options'
419
- :readonly="item.readonly"
420
- :disable="item.disabled"
421
- :valueSingle="true"
422
- @blur="onbutblur(index)"
423
- @change="onbutchange(index)"
424
- ></input-select>
425
- </div>
426
- </div>
427
-
428
- <!--textarea-->
429
- <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
430
- v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
431
- <label :style="item.label_style ? item.label_style : ''"
432
- :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
433
- <div :style="item.value_style ? item.value_style : ''"
434
- :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
435
- <textarea
436
- class="form-control input_view"
437
- style="width: 100%;height: 100%"
438
- v-model="item.value"
439
- :value="item.value"
440
- :rows="item.rows"
441
- :readonly="item.readonly"
442
- :disabled="item.disabled"
443
- @change="onbutchange(index)"
444
- @blur="onbutblur(index)"
445
- @input="onbutinput(index)"
446
- ></textarea>
447
- </div>
448
- </div>
449
- </div>
450
- </div>
451
- </article>
452
- <footer slot="modal-footer" class="modal-footer">
453
- <button :class="disable_modal_button ? 'btn btn-default':'btn btn-primary'"
454
- :disabled="disable_modal_button" type="button" @click="confirmModal()">
455
- 确认
456
- </button>
457
- </footer>
458
- </modal>
459
- </form>
460
- </validator>
461
- </div>
462
- </template>
463
- <script>
464
- import Vue from 'vue'
465
- import {isEmpty} from '../Util'
466
- import {HttpResetClass} from 'vue-client'
467
- // Date格式化
468
- Date.prototype.Format = function (fmt) {
469
- var o = {
470
- 'M+': this.getMonth() + 1, // 月份
471
- 'd+': this.getDate(), // 日
472
- 'H+': this.getHours(), // 小时
473
- 'm+': this.getMinutes(), // 分
474
- 's+': this.getSeconds(), // 秒
475
- 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
476
- 'S': this.getMilliseconds() // 毫秒
477
- }
478
- if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
479
- for (var k in o) {
480
- if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
481
- }
482
- return fmt
483
- }
484
-
485
- export default {
486
- title: '报建业务通用组件',
487
- props: {
488
- data: {
489
- type: Object
490
- }
491
- },
492
- data () {
493
- return {
494
- model: {}, // 公司等属性
495
- disable_button: true, // 控制按钮禁用
496
- disable_modal_button: true, // 控制按钮禁用
497
- //初始化省市区数据
498
- pcdslist: [],
499
- //初始化街道数据
500
- streetslist: [],
501
- //初始化街道数据
502
- areaslist: [],
503
- showButModal: false,
504
- areaData:{
505
- sjvalue:'',
506
- xianvalue:'',
507
- sqvalue:'',
508
- },
509
- templatlng: {
510
- gaodetemplng: "",
511
- gaodetemplat: "",
512
- baidutemplng: "",
513
- baidutemplat: ""
514
- }
515
- }
516
- },
517
- watch: {
518
- deep: true
519
- },
520
- computed: {
521
-
522
- },
523
- created () {
524
- // 初始化数据
525
- this.initializtion()
526
- if (this.data.readyEvent) {
527
- this.$dispatch(this.data.readyEvent)
528
- }
529
- this.$dispatch('initializtionView')
530
- },
531
- methods: {
532
- printclick (index) {
533
- },
534
- // 初始化数据
535
- initializtion () {
536
- for (const item of this.data.fields) {
537
- this.data[item.field] = item.value
538
- }
539
-
540
- // 是否禁用按钮
541
- this.disableButton()
542
- // 公司等属性初始化
543
- if (this.data.orgs) {
544
- this.model.orgs = this.data.orgs
545
- } else {
546
- this.model.orgs = this.$login.f.orgs
547
- }
548
- if (this.data.parentname) {
549
- this.model.parentname = this.data.parentname
550
- } else {
551
- this.model.parentname = this.$login.f.f_department_name
552
- }
553
- if (this.data.operate_date) {
554
- this.model.operate_date = this.data.operate_date
555
- } else {
556
- this.model.operate_date = new Date().Format('yyyy-MM-dd')
557
- }
558
- if (this.data.operator) {
559
- this.model.operator = this.data.operator
560
- } else {
561
- this.model.operator = this.$login.f.name
562
- }
563
-
564
- this.initpcds(` j_orgid = '${this.$login.f.orgid}'`)
565
- },
566
- async getSelectShijiValue(sjvalue,sjlable) {
567
- this.areaData.sjvalue = sjvalue
568
- console.log("这是父级接收的市级值:",sjvalue,sjlable)
569
- this.data.areaData = this.areaData
570
-
571
- // 是否禁用按钮
572
- this.disableButton()
573
- },
574
- async getSelectXianValue(xianvalue,xianlable) {
575
- this.areaData.xianvalue = xianvalue
576
- this.data.areaData = this.areaData
577
- console.log("这是父级接收的县级值:",xianvalue,xianlable)
578
-
579
- // 是否禁用按钮
580
- this.disableButton()
581
- },
582
- async getSelectShequValue(sqvalue,sqlable) {
583
- this.areaData.sqvalue = sqvalue
584
- this.data.areaData = this.areaData
585
- console.log("这是父级接收的社区值:",sqvalue,sqlable)
586
-
587
- // 是否禁用按钮
588
- this.disableButton()
589
- },
590
- //初始化省市区,添加街道
591
- async initpcds(pconditon) {
592
- // console.log('initpcds', pconditon)
593
- // this.pcdslist = []
594
- // let HttpReset = new HttpResetClass()
595
- // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
596
- // data: {
597
- // items: '*',
598
- // tablename: 'j_bjqpcd',
599
- // orderitem: 'id',
600
- // condition: pconditon
601
- // }
602
- // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
603
- // let redata = []
604
- // req.data.forEach((row, n) => {
605
- // redata[n] = {
606
- // label: row.j_areaname,
607
- // value: row.j_areaid,
608
- // data: row,
609
- // id: row.id
610
- // }
611
- // })
612
- // console.log('市区', redata)
613
- // this.pcdslist = redata
614
- },
615
- //初始化街道 添加小区
616
- async initstreets(pconditon) {
617
- // console.log('市区32', pconditon)
618
- // this.streetslist = []
619
- // let HttpReset = new HttpResetClass()
620
- // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
621
- // data: {
622
- // items: '*',
623
- // tablename: 'j_bjqstreet',
624
- // orderitem: 'id',
625
- // condition: pconditon
626
- // }
627
- // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
628
- // let redata = []
629
- // req.data.forEach((row, n) => {
630
- // redata[n] = {
631
- // label: row.j_areaname,
632
- // value: row.j_areaid,
633
- // data: row,
634
- // id: row.id
635
- // }
636
- // })
637
- // console.log('市区333', redata)
638
- // this.streetslist = redata
639
- // this.model.f_iscity = this.findbyid(this.streetslist, this.model.f_street_id).f_iscity
640
- },
641
- //初始化小区添加小区
642
- async initareas(pconditon) {
643
- // if(this.usertype){
644
- // pconditon=pconditon+` and f_special='1' `
645
- // }
646
- // this.areaslist = []
647
- // let HttpReset = new HttpResetClass()
648
- // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=100', {
649
- // data: {
650
- // items: '*',
651
- // tablename: 'j_bjqarea',
652
- // orderitem: 'id',
653
- // condition: pconditon
654
- // }
655
- // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
656
- // let redata = []
657
- // req.data.forEach((row) => {
658
- // redata.push({
659
- // label: row.j_areaname,
660
- // value: row.j_areaid,
661
- // data: row,
662
- // id: row.id
663
- // })
664
- // })
665
- // console.log('市区666', redata)
666
- // if (redata.length>0){
667
- // this.areaslist = redata
668
- // }
669
- },
670
- //省/市/区变化
671
- async pcdChange(val) {
672
-
673
- // console.log("省/市/区变化", val)
674
- // console.log("省/市/区变化", ` f_pcd_id ='${val}' `)
675
- // if (val) {
676
- // //那就把[小区,街道]重新组织一下
677
- // await this.initstreets(` j_parentid ='${val}' `)
678
- // if (this.model.f_street_id) {
679
- // if (this.findbyid(this.streetslist, this.model.f_street_id)) {
680
- // let pcd_id = this.findbyid(this.streetslist, this.model.f_street_id).f_pcd_id
681
- // if (pcd_id != val) {
682
- // this.model.f_street_id = ''
683
- // }
684
- // } else {
685
- // this.model.f_street_id = ''
686
- // }
687
- //
688
- // //那就把[小区,街道]重新组织一下
689
- // if (this.model.f_street_id) {
690
- // await this.initareas(` j_parentid ='${this.model.f_street_id}' `)
691
- // if (this.model.f_residential_area_id) {
692
- // if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
693
- // let pcd_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_pcd_id
694
- // if (pcd_id != val) {
695
- // this.model.f_residential_area_id = ''
696
- // }
697
- // } else {
698
- // this.model.f_residential_area_id = ''
699
- // }
700
- //
701
- // }
702
- // }
703
- // }
704
- // }
705
- // this.$resetValidation()
706
- },
707
- //街道变化
708
- async streetChange(val) {
709
- // console.log("街道变化", val)
710
- // if (this.streetslist[0]) {
711
- // var street = ''
712
- // this.streetslist.forEach((item) => {
713
- // if (item.id === val) {
714
- // street = item.label
715
- // }
716
- // })
717
- // this.model.f_address = street
718
- // }
719
- // if (val) {
720
- // //那就把[小区]重新组织一下
721
- // await this.initareas(` j_parentid ='${val}' `)
722
- // if (this.model.f_residential_area_id) {
723
- // if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
724
- // let street_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_street_id
725
- // if (street_id != val) {
726
- // this.model.f_residential_area_id = ''
727
- // }
728
- // } else {
729
- // this.model.f_residential_area_id = ''
730
- // }
731
- //
732
- // }
733
- // }
734
- // this.$resetValidation()
735
- },
736
- // 是否禁用按钮
737
- disableButton () {
738
- let flag = false
739
- for (const field of this.data.fields) {
740
- if (field.required && !field.value && !field.hidden && field.value !== 0) {
741
- flag = true
742
- }
743
-
744
- // 任何选择框只要是否都不能提交
745
- if (field.type === 'select' && field.value === '否' && field.value_no_disable) {
746
- flag = true
747
- }
748
-
749
- if (field.type === 'checkbox' && field.required && field.value.length === 0) {
750
- flag = true
751
- }
752
- }
753
-
754
- //区域下拉框必选 流程模式为报警器报建
755
- if ((this.data.f_apply_type === '报警器报建' || this.data.f_apply_type === '工商业报警器报建') && this.data.defname === '工程施工' && this.data.title === '工程施工' && this.data.f_sub_state !='完工'){
756
- if (!flag){
757
- if (this.areaData.sjvalue ==null || this.areaData.sjvalue.length ==0 || this.areaData.sqvalue == null || this.areaData.sqvalue.length ==0
758
- || this.areaData.xianvalue == null || this.areaData.xianvalue.length == 0){
759
- console.log("区域为空禁止提交:",this.areaData)
760
- flag = true
761
- }
762
-
763
- if (this.templatlng.baidutemplat ==null || this.templatlng.baidutemplat.length ==0 || this.templatlng.baidutemplng == null || this.templatlng.baidutemplng.length ==0
764
- || this.templatlng.gaodetemplat == null || this.templatlng.gaodetemplat.length == 0 || this.templatlng.gaodetemplng == null || this.templatlng.gaodetemplng.length == 0){
765
- console.log("地图坐标为空禁止提交:",this.templatlng)
766
- flag = true
767
- }
768
- }
769
- }
770
- this.disable_button = flag
771
- },
772
- // 失去焦点且值最终发生变化触发
773
- async onchange (index) {
774
- // 是否禁用按钮
775
- this.disableButton()
776
-
777
- if (!isEmpty(this.data.fields[index].value)) {
778
- // 前缀、后缀
779
- if (this.data.fields[index].prefix) {
780
- this.data.fields[index].value = this.data.fields[index].prefix + this.data.fields[index].value
781
- }
782
- if (this.data.fields[index].suffix) {
783
- this.data.fields[index].value = this.data.fields[index].value + this.data.fields[index].suffix
784
- }
785
- }
786
-
787
- // data赋值
788
- this.data[this.data.fields[index].field] = this.data.fields[index].value
789
-
790
- if (this.data.fields[index].type === 'datepicker') {
791
- this.check_datepicker(index)
792
- }
793
-
794
- if (this.data.fields[index].onchange) {
795
- this.$dispatch(this.data.fields[index].onchange, index)
796
- }
797
- this.$dispatch('onchange', index)
798
- },
799
- // 失去焦点触发,无论值是否发生变化
800
- onblur (index) {
801
- this.disableButton()
802
-
803
- if (this.data.fields[index].onblur) {
804
- this.$dispatch(this.data.fields[index].onblur, index)
805
- }
806
-
807
- this.$dispatch('onblur', index)
808
- },
809
- oninput (index) {
810
- // 是否禁用按钮
811
- this.disableButton()
812
-
813
- if (this.data.fields[index].oninput) {
814
- this.$dispatch(this.data.fields[index].oninput, index)
815
- }
816
- this.$dispatch('oninput', index)
817
- },
818
- selectSearch(event, index) {
819
- if (this.data.fields[index].selectSearch) {
820
- this.$dispatch(this.data.fields[index].selectSearch, event[0], index)
821
- }
822
- this.$dispatch('selectSearch', event[0], index)
823
- },
824
- // 点击按钮组按钮
825
- async click_but (button) {
826
- //报警器区域地址
827
- this.data.areaData = this.areaData
828
- this.data.templatlng = this.templatlng
829
-
830
- this.disable_button = true
831
-
832
- this.data.fields.forEach(item => {
833
- this.data[item.field] = item.value
834
- })
835
-
836
- this.data.button = button
837
-
838
- if (button.button_fields && button.button_fields.length > 0) {
839
- this.showButModal = true
840
- return
841
- }
842
-
843
- if (this.data.button.event) {
844
- this.$dispatch(this.data.button.event)
845
- } else {
846
- this.$dispatch('button')
847
- }
848
-
849
- },
850
- confirmModal () {
851
- this.closeModal()
852
-
853
- this.data.button.button_fields.forEach(item => {
854
- this.data.button[item.field] = item.value
855
- })
856
-
857
- if (this.data.button.event) {
858
- this.$dispatch(this.data.button.event)
859
- } else {
860
- this.$dispatch('button')
861
- }
862
- },
863
- // 关闭模态框
864
- closeModal () {
865
- this.showButModal = false
866
- this.disable_modal_button = false
867
- },
868
- onbutchange (index) {
869
- // 是否禁用按钮
870
- this.disableModalButton()
871
-
872
- if (this.data.button.button_fields[index].onchange) {
873
- this.$dispatch(this.data.button.button_fields[index].onchange, index)
874
- } else {
875
- this.$dispatch('onbutchange', index)
876
- }
877
-
878
- },
879
- onbutblur (index) {
880
- this.disableModalButton()
881
-
882
- if (this.data.button.button_fields[index].onblur) {
883
- this.$dispatch(this.data.button.button_fields[index].onblur, index)
884
- } else {
885
- this.$dispatch('onbutblur', index)
886
- }
887
- },
888
- onbutinput (index) {
889
- // 是否禁用按钮
890
- this.disableModalButton()
891
-
892
- if (this.data.button.button_fields[index].oninput) {
893
- this.$dispatch(this.data.button.button_fields[index].oninput, index)
894
- } else {
895
- this.$dispatch('onbutinput', index)
896
- }
897
- },
898
- disableModalButton () {
899
- let flag = false
900
-
901
-
902
- for (const item of this.data.button.button_fields) {
903
- if (item.required && !item.value) {
904
- if (item.value === 0) {
905
- flag = false
906
- } else {
907
- flag = true
908
- }
909
- }
910
- }
911
-
912
- this.disable_modal_button = flag
913
- },
914
- check_datepicker (index) {
915
- // 时间格式检测
916
- if (!isEmpty(this.data.fields[index].value)) {
917
-
918
- let dateReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
919
- let timeReg = /^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
920
- let datetimeReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
921
- if (this.data.fields[index].format) {
922
- if (this.data.fields[index].format === 'yyyy-MM-dd') {
923
- if (!dateReg.test(this.data.fields[index].value)) {
924
- this.data.fields[index].value = ''
925
- this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
926
- }
927
- }
928
- if (this.data.fields[index].format === 'HH:mm:ss') {
929
- if (!timeReg.test(this.data.fields[index].value)) {
930
- this.data.fields[index].value = ''
931
- this.$showAlert(this.data.fields[index].label + '格式错误如:00:00:00', 'warning', 2000)
932
- }
933
- }
934
- if (this.data.fields[index].format === 'yyyy-MM-dd HH:mm:ss') {
935
- if (!datetimeReg.test(this.data.fields[index].value)) {
936
- this.data.fields[index].value = ''
937
- this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01 00:00:00', 'warning', 2000)
938
- }
939
- }
940
- } else {
941
- if (!dateReg.test(this.data.fields[index].value)) {
942
- this.data.fields[index].value = ''
943
- this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
944
- }
945
- }
946
- }
947
- }
948
- },
949
- events: {
950
-
951
- }
952
- }
953
- </script>
954
- <style>
955
- .datepicker{
956
- width: 100%!important;
957
- }
958
- .datepicker-input{
959
- background-color: #ffffff!important;
960
- width: 100%!important;
961
- }
962
- .datepicker-input:disabled{
963
- border: 1px solid #DDD!important;
964
- color: #ACA899!important;
965
- width: 100%!important;
966
- }
967
- </style>
968
- <style scoped>
969
- th{
970
- font-size: 15px !important;
971
- text-align: center !important;
972
- background-color: #dfedfb!important;
973
- color: #666666 !important;
974
- font-family: PINGFANG-BOLD !important;
975
- font-weight: normal!important;
976
- }
977
- /*清除model中的浮动*/
978
- .clearfix:after,.clearfix:before{
979
- display: table;
980
- }
981
- .clearfix:after{
982
- clear: both;
983
- }
984
-
985
- .input_view{
986
- padding: 8px;
987
- background-color: #ffffff;
988
- border-radius: 2px;
989
- border: solid 1px #c7c7c7!important;
990
- color: #333333!important;
991
- font-size: 15px!important;
992
- }
993
-
994
- .input_view[readonly]{
995
- border: 1px solid #DDD!important;
996
- color:#ACA899!important;
997
- }
998
- .input_view:disabled{
999
- border: 1px solid #DDD!important;
1000
- color:#ACA899!important;
1001
- }
1002
-
1003
- .control-label-justify {
1004
- display: inline-block;
1005
- vertical-align: top;
1006
- width: 110px;
1007
- text-align: justify;
1008
- font-family: PingFang-SC-Bold;
1009
- }
1010
-
1011
- .control-label-justify::after {
1012
- content: "";
1013
- display: inline-block;
1014
- width: 100%;
1015
- overflow: hidden;
1016
- height: 0;
1017
- }
1018
-
1019
- input::-webkit-outer-spin-button,
1020
- input::-webkit-inner-spin-button {
1021
- -webkit-appearance: none;
1022
- }
1023
-
1024
- input[type="number"] {
1025
- -moz-appearance: textfield;
1026
- }
1027
-
1028
- </style>
1
+ <template>
2
+ <div class="select-overspread" style="background-color: #ffffff;padding: 20px;overflow: scroll">
3
+ <validator name='v' @valid="$emit('valid')" @invalid="$emit('invalid')">
4
+ <form class="form-horizontal">
5
+ <div class="form-group">
6
+ <div v-for="(index,item) in data.fields">
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') && !item.hidden && (item.device === 'pc' || !item.device) && ( item.label != '证件号码')&&( item.label !== '身份证') && (item.label !== '用户电话')"
10
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
11
+ <label :style="item.label_style ? item.label_style : ''"
12
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
13
+ <div :style="item.value_style ? item.value_style:''"
14
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
15
+ <input class="form-control input_view" style=""
16
+ :type="item.type"
17
+ v-model="data.fields[index].value"
18
+ :placeholder="item.placeholder"
19
+ :value="data.fields[index].value"
20
+ :readonly="item.readonly"
21
+ :disabled="item.disabled"
22
+ @change="onchange(index)"
23
+ @blur="onblur(index)"
24
+ @input="oninput(index)"
25
+ />
26
+ </div>
27
+ </div>
28
+
29
+ <!--input-->
30
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
31
+ v-if="(data.f_credentials != '身份证' && item.label === '证件号码')"
32
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
33
+ <label :style="item.label_style ? item.label_style : ''"
34
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
35
+ <div :style="item.value_style ? item.value_style:''"
36
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
37
+ <input class="form-control input_view" style=""
38
+ :type="item.type"
39
+ v-model="data.fields[index].value"
40
+ :placeholder="item.placeholder"
41
+ :value="data.fields[index].value"
42
+ :readonly="item.readonly"
43
+ :disabled="item.disabled"
44
+ @change="onchange(index)"
45
+ @blur="onblur(index)"
46
+ @input="oninput(index)"
47
+ />
48
+ </div>
49
+ </div>
50
+ <!--身份证验证-->
51
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
52
+ v-if="(item.label==='身份证') || (data.f_credentials === '身份证' && item.label === '证件号码')"
53
+ :class="[$v.f_idnumber2.identityCardValid ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
54
+ <label :style="item.label_style ? item.label_style : ''"
55
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
56
+ <div :style="item.value_style ? item.value_style:''"
57
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
58
+ <input class="form-control input_view" style=""
59
+ :type="item.type"
60
+ maxlength="18"
61
+ v-model="data.fields[index].value"
62
+ :placeholder="item.placeholder"
63
+ :value="data.fields[index].value"
64
+ v-validate:f_idnumber2='{identityCardValid: true}'
65
+ :readonly="item.readonly"
66
+ :disabled="item.disabled"
67
+ @change="onchange(index)"
68
+ @blur="onblur(index)"
69
+ @input="oninput(index)"
70
+ />
71
+ </div>
72
+ </div>
73
+
74
+
75
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
76
+ v-if="item.label === '用户电话'"
77
+ :class="[$v.f_user_phone.minlength || $v.f_user_phone.maxlength ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
78
+ <label :style="item.label_style ? item.label_style : ''"
79
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
80
+ <div :style="item.value_style ? item.value_style:''"
81
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
82
+ <input class="form-control input_view" style=""
83
+ type="number"
84
+ oninput="if(value.length > 11) value=value.slice(0,11)"
85
+ v-validate:f_user_phone="{minlength: 7, maxlength: 11 }"
86
+ v-model="data.fields[index].value"
87
+ :placeholder="item.placeholder"
88
+ :value="data.fields[index].value"
89
+ onKeypress="return(/[\d\.]/.test(String.fromCharCode(event.keyCode)))"
90
+ :readonly="item.readonly"
91
+ :disabled="item.disabled"
92
+ @change="onchange(index)"
93
+ @blur="onblur(index)"
94
+ @input="oninput(index)"
95
+ />
96
+ </div>
97
+ </div>
98
+
99
+
100
+
101
+ <!--时间datepicker-->
102
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
103
+ v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)"
104
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped+' form-group':'col-sm-4 form-group']">
105
+ <label
106
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label-justify control-label' : 'control-label control-label-justify col-sm-6'">{{item.label}}</label>
107
+ <div :style="item.value_style ? item.value_style:''"
108
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
109
+ <datepicker
110
+ @change="onchange(index)"
111
+ @blur="onblur(index)"
112
+ :placeholder="item.placeholder"
113
+ :value.sync="data.fields[index].value"
114
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
115
+ v-model="data.fields[index].value"
116
+ :readonly="item.readonly"
117
+ :disabled="item.disabled"
118
+ :show-reset-button="reset">
119
+ </datepicker>
120
+ </div>
121
+ </div>
122
+
123
+ <!--textarea-->
124
+ <div :style="item.style ? item.style+';margin-bottom: 20px':'margin-bottom: 20px'"
125
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)"
126
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-12 form-group']">
127
+ <label :style="item.label_style ? item.label_style : ''"
128
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-3'">{{item.label}}</label>
129
+ <div :style="item.value_style ? item.value_style:''"
130
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-10'">
131
+ <textarea
132
+ :readonly="item.readonly"
133
+ :disabled="item.disabled"
134
+ class="form-control input_view"
135
+ style="width: 100%;height: 100%"
136
+ :rows="item.rows"
137
+ v-model="data.fields[index].value"
138
+ :value="data.fields[index].value"
139
+ @change="onchange(index)"
140
+ @blur="onblur(index)"
141
+ @input="oninput(index)"
142
+ >
143
+ </textarea>
144
+ </div>
145
+ </div>
146
+
147
+ <!--select-->
148
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
149
+ v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device) && !item.multiple"
150
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
151
+ <label
152
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
153
+ <div :style="item.value_style ? item.value_style:''"
154
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
155
+ <input-select
156
+ class="select select_list"
157
+ @blur="onblur(index)"
158
+ @change="onchange(index)"
159
+ @select-search="selectSearch($arguments,index)"
160
+ :readonly="item.readonly"
161
+ :disable="item.disabled"
162
+ :value.sync="data.fields[index].value"
163
+ v-model="data.fields[index].value"
164
+ :options='data.fields[index].options'
165
+ :valueSingle="true"></input-select>
166
+ </div>
167
+ </div>
168
+ <!--select 多选-->
169
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
170
+ v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)&& item.multiple"
171
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
172
+ <label
173
+ :class="item.label_bootstraped ? item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
174
+ <div :style="item.value_style ? item.value_style:''"
175
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
176
+ <v-select
177
+ width="100%"
178
+ class="select select_list"
179
+ @blur="onblur(index)"
180
+ @change="onchange(index)"
181
+ @select-search="selectSearch($arguments,index)"
182
+ :readonly="item.readonly"
183
+ :disable="item.disabled"
184
+ :value.sync="data.fields[index].value"
185
+ v-model="data.fields[index].value"
186
+ :options='data.fields[index].options'
187
+ :multiple="data.fields[index].multiple"
188
+ :valueSingle="true"></v-select>
189
+ </div>
190
+ </div>
191
+
192
+ <!--checkbox-->
193
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
194
+ v-if="item.type==='checkbox' && !item.hidden && (item.device === 'pc' || !item.device)"
195
+ :class="[item.required && item.value.length === 0 ? 'has-error' : '',item.bootstraped?item.bootstraped+' form-group':'col-sm-4 form-group']">
196
+ <label v-if="item.label"
197
+ :class="item.label_bootstraped?item.label_bootstraped+' control-label control-label-justify':'control-label-justify control-label col-sm-6'">{{item.label}}</label>
198
+ <div :style="item.value_style ? item.value_style:''"
199
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
200
+ <label class="checkbox-inline" v-for="(index2,row) in item.options">
201
+ <input type="checkbox" class=""
202
+ :readonly="data.fields[index].readonly"
203
+ :disabled="data.fields[index].disabled"
204
+ v-model="data.fields[index].value"
205
+ :value="data.fields[index].options[index2].value"
206
+ @change="onchange(index)"
207
+ @blur="onblur(index)">
208
+ {{row.label}}
209
+ </label>
210
+ </div>
211
+ </div>
212
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
213
+ v-if="item.type==='button'"
214
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
215
+ <div :style="item.value_style ? item.value_style:''"
216
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
217
+ <button class="button_search button_spacing" :style="item.button_styles" @click.prevent="printclick(index)" :hidden="item.hidden">
218
+ {{ item.name }}
219
+ </button>
220
+ </div>
221
+ </div>
222
+ <div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"
223
+ v-if="item.type==='Abutton'"
224
+ :class="[item.required && !(item.value) ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">
225
+ <div :style="item.value_style ? item.value_style:''"
226
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-6'">
227
+ <a type="button" class="btn btn-info head-but"
228
+ :href="item.href" download>{{item.name}}</a>
229
+ </div>
230
+ </div>
231
+ </div>
232
+ <!--区域地址联动-->
233
+ <div>
234
+ <res-area-select-group
235
+ v-if="(data.f_apply_type === '报警器报建' || data.f_apply_type === '工商业报警器报建') && data.defname === '工程施工' && data.title === '工程施工' && data.f_sub_state !='完工'"
236
+ labelstyle = "control-label"
237
+ @shiji-select = "getSelectShijiValue"
238
+ @xian-select = "getSelectXianValue"
239
+ @shequ-select = "getSelectShequValue"
240
+ >
241
+ </res-area-select-group>
242
+ </div>
243
+
244
+ <gaode-map
245
+ v-if="(data.f_apply_type === '报警器报建' || data.f_apply_type === '工商业报警器报建') && data.defname === '工程施工' && data.title === '工程施工' && data.f_sub_state !='完工'"
246
+ >
247
+
248
+ </gaode-map>
249
+
250
+ </div>
251
+ <!-- onetomany -->
252
+ <div class="" v-for="(index,item) in data.onetomany">
253
+ <onetomany :selectdata="data" :onetomany="item" :index="index" v-if="item.device === 'pc' || !item.device"></onetomany>
254
+ </div>
255
+
256
+ <div v-for="(i,item) in data.components">
257
+ <h3 v-if="item.device === 'pc'"><nbr >{{item.title}}</nbr></h3>
258
+ <component v-if="item.device === 'pc' || !item.device" :is="item.name" :selectdata="data" :mark="item.mark"></component>
259
+ </div>
260
+
261
+ <!--自定义组件-->
262
+ <slot>
263
+ <!--<div :style="item.style ? item.style+';height: 40px;margin-bottom: 20px':'height: 40px;margin-bottom: 20px'"-->
264
+ <!-- v-if="data.f_apply_type === '报警器报建' && data.defname === '工程施工'"-->
265
+ <!-- :class="[$v.f_idnumber2.identityCardValid ? 'has-error' : '',item.bootstraped ? item.bootstraped + ' form-group':'col-sm-4 form-group']">-->
266
+
267
+ <!--<div class="col-sm-6 form-group "-->
268
+ <!-- :class="[$v.f_pcd_id.required ? 'has-error' : 'has-success']">-->
269
+ <!-- <label class="font_normal_body">省&ensp;市&ensp;区</label>-->
270
+ <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_pcd_id"-->
271
+ <!-- v-validate:f_pcd_id='{required: true }'-->
272
+ <!-- >-->
273
+
274
+ <!-- <v-select :value.sync="model.f_pcd_id" :value-single="true"-->
275
+ <!-- :options='pcdslist' placeholder='请选择2'-->
276
+ <!-- close-on-select search="true" @change="pcdChange">-->
277
+ <!-- </v-select>-->
278
+ <!--</div>-->
279
+ <!--<div class="col-sm-6 form-group "-->
280
+ <!-- :class="[$v.f_street_id.required ? 'has-error' : 'has-success']">-->
281
+ <!-- <label class="font_normal_body">街道/乡镇</label>-->
282
+ <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_street_id"-->
283
+ <!-- >-->
284
+ <!-- <v-select :value.sync="model.f_street_id" :value-single="true"-->
285
+ <!-- :options='streetslist' placeholder='请选择'-->
286
+ <!-- @change="streetChange"-->
287
+ <!-- close-on-select search="true">-->
288
+ <!-- </v-select>-->
289
+
290
+ <!--</div>-->
291
+ <!--<div class="col-sm-6 form-group "-->
292
+ <!-- :class="[$v.f_residential_area_id.required ? 'has-error' : 'has-success']">-->
293
+ <!-- <label class="font_normal_body">集收单位</label>-->
294
+ <!-- <input type="text" style="width:41%" v-show="false" v-model="model.f_residential_area_id"-->
295
+ <!-- v-validate:f_residential_area_id='{required: true }'>-->
296
+ <!-- <v-select :value.sync="model.f_residential_area_id" :value-single="true"-->
297
+ <!-- :options='areaslist' placeholder='请选择'-->
298
+ <!-- @change="" @select-search="selectSearch"-->
299
+ <!-- close-on-select search="true">-->
300
+ <!-- </v-select>-->
301
+ <!--</div>-->
302
+ <!--</div>-->
303
+ </slot>
304
+ <!--公司等属性-->
305
+ <div class="col-sm-12 form-group text-center" style="padding-top:8px">
306
+ <div class="col-sm-3 form-group center-block">
307
+ <label class="col-sm-5">所属公司:</label>
308
+ <div class="col-sm-6" style="text-align: left">
309
+ {{model.orgs}}
310
+ </div>
311
+ </div>
312
+ <div class="col-sm-3 form-group center-block">
313
+ <label class="col-sm-5">部门:</label>
314
+ <div class="col-sm-6" style="text-align: left">
315
+ {{model.parentname}}
316
+ </div>
317
+ </div>
318
+ <div class="col-sm-3 form-group center-block">
319
+ <label class="col-sm-5">操作人:</label>
320
+ <div class="col-sm-6 " style="text-align: left">
321
+ {{model.operator}}
322
+ </div>
323
+ </div>
324
+ <div class="col-sm-3 form-group center-block">
325
+ <label class="col-sm-5">操作日期:</label>
326
+ <div class="col-sm-6" style="text-align: left">
327
+ {{model.operate_date}}
328
+ </div>
329
+ </div>
330
+ </div>
331
+ <!-- 按钮组 -->
332
+ <div class="from-group col-sm-12 text-center">
333
+ <!-- 按钮组 -->
334
+ <button v-for="(index,button) in data.buttons"
335
+ :disabled="(button.disabled && disable_button)"
336
+ style="min-width:100px"
337
+ :class="button.disabled && disable_button ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
338
+ v-if="!button.hidden && button.button_name !=='提交'&& button.button_name !=='确认'"
339
+ @click.prevent="click_but(button)"
340
+ >
341
+ {{button.button_name}}
342
+ </button>
343
+ <button v-for="(index,button) in data.buttons"
344
+ :disabled="(button.disabled && disable_button) || (!$v.valid)"
345
+ style="min-width:100px"
346
+ :class="button.disabled && disable_button || (!$v.valid) ? 'btn btn-default button_spacing' : 'btn btn-primary button_spacing'"
347
+ v-if="!button.hidden && (button.button_name ==='提交'||button.button_name ==='确认')"
348
+ @click.prevent="click_but(button)"
349
+ >
350
+ {{button.button_name}}
351
+ </button>
352
+ </div>
353
+ <div class="from-group col-sm-12 text-center" style="height: 20px;">
354
+
355
+ </div>
356
+ <!-- 按钮模态框 -->
357
+ <modal v-if="showButModal" :show.sync="showButModal" backdrop="false" large>
358
+ <header slot="modal-header" class="modal-header">
359
+ <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
360
+ <span class="modal-title"><font
361
+ size="3">{{data.button.button_name}}</font></span>
362
+ </header>
363
+ <article slot="modal-body" class="modal-body clearfix">
364
+ <div class="form-group" style="padding: 0 150px">
365
+ <div v-for="(index,item) in data.button.button_fields">
366
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
367
+ v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
368
+ <label :style="item.label_style ? item.label_style : ''"
369
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
370
+ <div :style="item.value_style ? item.value_style : ''"
371
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
372
+ <input class="form-control input_view"
373
+ :placeholder="item.placeholder"
374
+ :type="item.type"
375
+ v-model="item.value"
376
+ :value="item.value"
377
+ :readonly="item.readonly"
378
+ :disabled="item.disabled"
379
+ @change="onbutchange(index)"
380
+ @blur="onbutblur(index)"
381
+ @input="onbutinput(index)"
382
+ />
383
+ </div>
384
+ </div>
385
+
386
+ <!--时间datepicker-->
387
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
388
+ v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
389
+ <label :style="item.label_style ? item.label_style : ''"
390
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
391
+ <div :style="item.value_style ? item.value_style : ''"
392
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
393
+ <datepicker
394
+ :placeholder="item.placeholder"
395
+ :value.sync="item.value"
396
+ v-model="item.value"
397
+ :readonly="item.readonly"
398
+ :disabled="item.disabled"
399
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
400
+ :show-reset-button="true"
401
+ @change="onbutchange(index)"
402
+ @blur="onbutblur(index)"
403
+ ></datepicker>
404
+ </div>
405
+ </div>
406
+
407
+ <!--select-->
408
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
409
+ v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
410
+ <label :style="item.label_style ? item.label_style : ''"
411
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
412
+ <div :style="item.value_style ? item.value_style : ''"
413
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
414
+ <input-select
415
+ class="select select_list"
416
+ :value.sync="item.value"
417
+ v-model="item.value"
418
+ :options='item.options'
419
+ :readonly="item.readonly"
420
+ :disable="item.disabled"
421
+ :valueSingle="true"
422
+ @blur="onbutblur(index)"
423
+ @change="onbutchange(index)"
424
+ ></input-select>
425
+ </div>
426
+ </div>
427
+
428
+ <!--textarea-->
429
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
430
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
431
+ <label :style="item.label_style ? item.label_style : ''"
432
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
433
+ <div :style="item.value_style ? item.value_style : ''"
434
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
435
+ <textarea
436
+ class="form-control input_view"
437
+ style="width: 100%;height: 100%"
438
+ v-model="item.value"
439
+ :value="item.value"
440
+ :rows="item.rows"
441
+ :readonly="item.readonly"
442
+ :disabled="item.disabled"
443
+ @change="onbutchange(index)"
444
+ @blur="onbutblur(index)"
445
+ @input="onbutinput(index)"
446
+ ></textarea>
447
+ </div>
448
+ </div>
449
+ </div>
450
+ </div>
451
+ </article>
452
+ <footer slot="modal-footer" class="modal-footer">
453
+ <button :class="disable_modal_button ? 'btn btn-default':'btn btn-primary'"
454
+ :disabled="disable_modal_button" type="button" @click="confirmModal()">
455
+ 确认
456
+ </button>
457
+ </footer>
458
+ </modal>
459
+ </form>
460
+ </validator>
461
+ </div>
462
+ </template>
463
+ <script>
464
+ import Vue from 'vue'
465
+ import {isEmpty} from '../Util'
466
+ import {HttpResetClass} from 'vue-client'
467
+ // Date格式化
468
+ Date.prototype.Format = function (fmt) {
469
+ var o = {
470
+ 'M+': this.getMonth() + 1, // 月份
471
+ 'd+': this.getDate(), // 日
472
+ 'H+': this.getHours(), // 小时
473
+ 'm+': this.getMinutes(), // 分
474
+ 's+': this.getSeconds(), // 秒
475
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
476
+ 'S': this.getMilliseconds() // 毫秒
477
+ }
478
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
479
+ for (var k in o) {
480
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
481
+ }
482
+ return fmt
483
+ }
484
+
485
+ export default {
486
+ title: '报建业务通用组件',
487
+ props: {
488
+ data: {
489
+ type: Object
490
+ }
491
+ },
492
+ data () {
493
+ return {
494
+ model: {}, // 公司等属性
495
+ disable_button: true, // 控制按钮禁用
496
+ disable_modal_button: true, // 控制按钮禁用
497
+ //初始化省市区数据
498
+ pcdslist: [],
499
+ //初始化街道数据
500
+ streetslist: [],
501
+ //初始化街道数据
502
+ areaslist: [],
503
+ showButModal: false,
504
+ areaData:{
505
+ sjvalue:'',
506
+ xianvalue:'',
507
+ sqvalue:'',
508
+ },
509
+ templatlng: {
510
+ gaodetemplng: "",
511
+ gaodetemplat: "",
512
+ baidutemplng: "",
513
+ baidutemplat: ""
514
+ }
515
+ }
516
+ },
517
+ watch: {
518
+ deep: true
519
+ },
520
+ computed: {
521
+
522
+ },
523
+ created () {
524
+ // 初始化数据
525
+ this.initializtion()
526
+ if (this.data.readyEvent) {
527
+ this.$dispatch(this.data.readyEvent)
528
+ }
529
+ this.$dispatch('initializtionView')
530
+ },
531
+ methods: {
532
+ printclick (index) {
533
+ },
534
+ // 初始化数据
535
+ initializtion () {
536
+ for (const item of this.data.fields) {
537
+ this.data[item.field] = item.value
538
+ }
539
+
540
+ // 是否禁用按钮
541
+ this.disableButton()
542
+ // 公司等属性初始化
543
+ if (this.data.orgs) {
544
+ this.model.orgs = this.data.orgs
545
+ } else {
546
+ this.model.orgs = this.$login.f.orgs
547
+ }
548
+ if (this.data.parentname) {
549
+ this.model.parentname = this.data.parentname
550
+ } else {
551
+ this.model.parentname = this.$login.f.f_department_name
552
+ }
553
+ if (this.data.operate_date) {
554
+ this.model.operate_date = this.data.operate_date
555
+ } else {
556
+ this.model.operate_date = new Date().Format('yyyy-MM-dd')
557
+ }
558
+ if (this.data.operator) {
559
+ this.model.operator = this.data.operator
560
+ } else {
561
+ this.model.operator = this.$login.f.name
562
+ }
563
+
564
+ this.initpcds(` j_orgid = '${this.$login.f.orgid}'`)
565
+ },
566
+ async getSelectShijiValue(sjvalue,sjlable) {
567
+ this.areaData.sjvalue = sjvalue
568
+ console.log("这是父级接收的市级值:",sjvalue,sjlable)
569
+ this.data.areaData = this.areaData
570
+
571
+ // 是否禁用按钮
572
+ this.disableButton()
573
+ },
574
+ async getSelectXianValue(xianvalue,xianlable) {
575
+ this.areaData.xianvalue = xianvalue
576
+ this.data.areaData = this.areaData
577
+ console.log("这是父级接收的县级值:",xianvalue,xianlable)
578
+
579
+ // 是否禁用按钮
580
+ this.disableButton()
581
+ },
582
+ async getSelectShequValue(sqvalue,sqlable) {
583
+ this.areaData.sqvalue = sqvalue
584
+ this.data.areaData = this.areaData
585
+ console.log("这是父级接收的社区值:",sqvalue,sqlable)
586
+
587
+ // 是否禁用按钮
588
+ this.disableButton()
589
+ },
590
+ //初始化省市区,添加街道
591
+ async initpcds(pconditon) {
592
+ // console.log('initpcds', pconditon)
593
+ // this.pcdslist = []
594
+ // let HttpReset = new HttpResetClass()
595
+ // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=9999999', {
596
+ // data: {
597
+ // items: '*',
598
+ // tablename: 'j_bjqpcd',
599
+ // orderitem: 'id',
600
+ // condition: pconditon
601
+ // }
602
+ // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
603
+ // let redata = []
604
+ // req.data.forEach((row, n) => {
605
+ // redata[n] = {
606
+ // label: row.j_areaname,
607
+ // value: row.j_areaid,
608
+ // data: row,
609
+ // id: row.id
610
+ // }
611
+ // })
612
+ // console.log('市区', redata)
613
+ // this.pcdslist = redata
614
+ },
615
+ //初始化街道 添加小区
616
+ async initstreets(pconditon) {
617
+ // console.log('市区32', pconditon)
618
+ // this.streetslist = []
619
+ // let HttpReset = new HttpResetClass()
620
+ // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy', {
621
+ // data: {
622
+ // items: '*',
623
+ // tablename: 'j_bjqstreet',
624
+ // orderitem: 'id',
625
+ // condition: pconditon
626
+ // }
627
+ // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
628
+ // let redata = []
629
+ // req.data.forEach((row, n) => {
630
+ // redata[n] = {
631
+ // label: row.j_areaname,
632
+ // value: row.j_areaid,
633
+ // data: row,
634
+ // id: row.id
635
+ // }
636
+ // })
637
+ // console.log('市区333', redata)
638
+ // this.streetslist = redata
639
+ // this.model.f_iscity = this.findbyid(this.streetslist, this.model.f_street_id).f_iscity
640
+ },
641
+ //初始化小区添加小区
642
+ async initareas(pconditon) {
643
+ // if(this.usertype){
644
+ // pconditon=pconditon+` and f_special='1' `
645
+ // }
646
+ // this.areaslist = []
647
+ // let HttpReset = new HttpResetClass()
648
+ // let req = await HttpReset.load('POST', 'rs/sql/address_singleTableOrderBy?pageNo=1&pageSize=100', {
649
+ // data: {
650
+ // items: '*',
651
+ // tablename: 'j_bjqarea',
652
+ // orderitem: 'id',
653
+ // condition: pconditon
654
+ // }
655
+ // }, {resolveMsg: null, rejectMsg: '获取地址失败!'})
656
+ // let redata = []
657
+ // req.data.forEach((row) => {
658
+ // redata.push({
659
+ // label: row.j_areaname,
660
+ // value: row.j_areaid,
661
+ // data: row,
662
+ // id: row.id
663
+ // })
664
+ // })
665
+ // console.log('市区666', redata)
666
+ // if (redata.length>0){
667
+ // this.areaslist = redata
668
+ // }
669
+ },
670
+ //省/市/区变化
671
+ async pcdChange(val) {
672
+
673
+ // console.log("省/市/区变化", val)
674
+ // console.log("省/市/区变化", ` f_pcd_id ='${val}' `)
675
+ // if (val) {
676
+ // //那就把[小区,街道]重新组织一下
677
+ // await this.initstreets(` j_parentid ='${val}' `)
678
+ // if (this.model.f_street_id) {
679
+ // if (this.findbyid(this.streetslist, this.model.f_street_id)) {
680
+ // let pcd_id = this.findbyid(this.streetslist, this.model.f_street_id).f_pcd_id
681
+ // if (pcd_id != val) {
682
+ // this.model.f_street_id = ''
683
+ // }
684
+ // } else {
685
+ // this.model.f_street_id = ''
686
+ // }
687
+ //
688
+ // //那就把[小区,街道]重新组织一下
689
+ // if (this.model.f_street_id) {
690
+ // await this.initareas(` j_parentid ='${this.model.f_street_id}' `)
691
+ // if (this.model.f_residential_area_id) {
692
+ // if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
693
+ // let pcd_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_pcd_id
694
+ // if (pcd_id != val) {
695
+ // this.model.f_residential_area_id = ''
696
+ // }
697
+ // } else {
698
+ // this.model.f_residential_area_id = ''
699
+ // }
700
+ //
701
+ // }
702
+ // }
703
+ // }
704
+ // }
705
+ // this.$resetValidation()
706
+ },
707
+ //街道变化
708
+ async streetChange(val) {
709
+ // console.log("街道变化", val)
710
+ // if (this.streetslist[0]) {
711
+ // var street = ''
712
+ // this.streetslist.forEach((item) => {
713
+ // if (item.id === val) {
714
+ // street = item.label
715
+ // }
716
+ // })
717
+ // this.model.f_address = street
718
+ // }
719
+ // if (val) {
720
+ // //那就把[小区]重新组织一下
721
+ // await this.initareas(` j_parentid ='${val}' `)
722
+ // if (this.model.f_residential_area_id) {
723
+ // if (this.findbyid(this.areaslist, this.model.f_residential_area_id)) {
724
+ // let street_id = this.findbyid(this.areaslist, this.model.f_residential_area_id).f_street_id
725
+ // if (street_id != val) {
726
+ // this.model.f_residential_area_id = ''
727
+ // }
728
+ // } else {
729
+ // this.model.f_residential_area_id = ''
730
+ // }
731
+ //
732
+ // }
733
+ // }
734
+ // this.$resetValidation()
735
+ },
736
+ // 是否禁用按钮
737
+ disableButton () {
738
+ let flag = false
739
+ for (const field of this.data.fields) {
740
+ if (field.required && !field.value && !field.hidden && field.value !== 0) {
741
+ flag = true
742
+ }
743
+
744
+ // 任何选择框只要是否都不能提交
745
+ if (field.type === 'select' && field.value === '否' && field.value_no_disable) {
746
+ flag = true
747
+ }
748
+
749
+ if (field.type === 'checkbox' && field.required && field.value.length === 0) {
750
+ flag = true
751
+ }
752
+ }
753
+
754
+ //区域下拉框必选 流程模式为报警器报建
755
+ if ((this.data.f_apply_type === '报警器报建' || this.data.f_apply_type === '工商业报警器报建') && this.data.defname === '工程施工' && this.data.title === '工程施工' && this.data.f_sub_state !='完工'){
756
+ if (!flag){
757
+ if (this.areaData.sjvalue ==null || this.areaData.sjvalue.length ==0 || this.areaData.sqvalue == null || this.areaData.sqvalue.length ==0
758
+ || this.areaData.xianvalue == null || this.areaData.xianvalue.length == 0){
759
+ console.log("区域为空禁止提交:",this.areaData)
760
+ flag = true
761
+ }
762
+
763
+ if (this.templatlng.baidutemplat ==null || this.templatlng.baidutemplat.length ==0 || this.templatlng.baidutemplng == null || this.templatlng.baidutemplng.length ==0
764
+ || this.templatlng.gaodetemplat == null || this.templatlng.gaodetemplat.length == 0 || this.templatlng.gaodetemplng == null || this.templatlng.gaodetemplng.length == 0){
765
+ console.log("地图坐标为空禁止提交:",this.templatlng)
766
+ flag = true
767
+ }
768
+ }
769
+ }
770
+ this.disable_button = flag
771
+ },
772
+ // 失去焦点且值最终发生变化触发
773
+ async onchange (index) {
774
+ // 是否禁用按钮
775
+ this.disableButton()
776
+
777
+ if (!isEmpty(this.data.fields[index].value)) {
778
+ // 前缀、后缀
779
+ if (this.data.fields[index].prefix) {
780
+ this.data.fields[index].value = this.data.fields[index].prefix + this.data.fields[index].value
781
+ }
782
+ if (this.data.fields[index].suffix) {
783
+ this.data.fields[index].value = this.data.fields[index].value + this.data.fields[index].suffix
784
+ }
785
+ }
786
+
787
+ // data赋值
788
+ this.data[this.data.fields[index].field] = this.data.fields[index].value
789
+
790
+ if (this.data.fields[index].type === 'datepicker') {
791
+ this.check_datepicker(index)
792
+ }
793
+
794
+ if (this.data.fields[index].onchange) {
795
+ this.$dispatch(this.data.fields[index].onchange, index)
796
+ }
797
+ this.$dispatch('onchange', index)
798
+ },
799
+ // 失去焦点触发,无论值是否发生变化
800
+ onblur (index) {
801
+ this.disableButton()
802
+
803
+ if (this.data.fields[index].onblur) {
804
+ this.$dispatch(this.data.fields[index].onblur, index)
805
+ }
806
+
807
+ this.$dispatch('onblur', index)
808
+ },
809
+ oninput (index) {
810
+ // 是否禁用按钮
811
+ this.disableButton()
812
+
813
+ if (this.data.fields[index].oninput) {
814
+ this.$dispatch(this.data.fields[index].oninput, index)
815
+ }
816
+ this.$dispatch('oninput', index)
817
+ },
818
+ selectSearch(event, index) {
819
+ if (this.data.fields[index].selectSearch) {
820
+ this.$dispatch(this.data.fields[index].selectSearch, event[0], index)
821
+ }
822
+ this.$dispatch('selectSearch', event[0], index)
823
+ },
824
+ // 点击按钮组按钮
825
+ async click_but (button) {
826
+ //报警器区域地址
827
+ this.data.areaData = this.areaData
828
+ this.data.templatlng = this.templatlng
829
+
830
+ this.disable_button = true
831
+
832
+ this.data.fields.forEach(item => {
833
+ this.data[item.field] = item.value
834
+ })
835
+
836
+ this.data.button = button
837
+
838
+ if (button.button_fields && button.button_fields.length > 0) {
839
+ this.showButModal = true
840
+ return
841
+ }
842
+
843
+ if (this.data.button.event) {
844
+ this.$dispatch(this.data.button.event)
845
+ } else {
846
+ this.$dispatch('button')
847
+ }
848
+
849
+ },
850
+ confirmModal () {
851
+ this.closeModal()
852
+
853
+ this.data.button.button_fields.forEach(item => {
854
+ this.data.button[item.field] = item.value
855
+ })
856
+
857
+ if (this.data.button.event) {
858
+ this.$dispatch(this.data.button.event)
859
+ } else {
860
+ this.$dispatch('button')
861
+ }
862
+ },
863
+ // 关闭模态框
864
+ closeModal () {
865
+ this.showButModal = false
866
+ this.disable_modal_button = false
867
+ },
868
+ onbutchange (index) {
869
+ // 是否禁用按钮
870
+ this.disableModalButton()
871
+
872
+ if (this.data.button.button_fields[index].onchange) {
873
+ this.$dispatch(this.data.button.button_fields[index].onchange, index)
874
+ } else {
875
+ this.$dispatch('onbutchange', index)
876
+ }
877
+
878
+ },
879
+ onbutblur (index) {
880
+ this.disableModalButton()
881
+
882
+ if (this.data.button.button_fields[index].onblur) {
883
+ this.$dispatch(this.data.button.button_fields[index].onblur, index)
884
+ } else {
885
+ this.$dispatch('onbutblur', index)
886
+ }
887
+ },
888
+ onbutinput (index) {
889
+ // 是否禁用按钮
890
+ this.disableModalButton()
891
+
892
+ if (this.data.button.button_fields[index].oninput) {
893
+ this.$dispatch(this.data.button.button_fields[index].oninput, index)
894
+ } else {
895
+ this.$dispatch('onbutinput', index)
896
+ }
897
+ },
898
+ disableModalButton () {
899
+ let flag = false
900
+
901
+
902
+ for (const item of this.data.button.button_fields) {
903
+ if (item.required && !item.value) {
904
+ if (item.value === 0) {
905
+ flag = false
906
+ } else {
907
+ flag = true
908
+ }
909
+ }
910
+ }
911
+
912
+ this.disable_modal_button = flag
913
+ },
914
+ check_datepicker (index) {
915
+ // 时间格式检测
916
+ if (!isEmpty(this.data.fields[index].value)) {
917
+
918
+ let dateReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/
919
+ let timeReg = /^(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
920
+ let datetimeReg = /^[1-9]\d{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])\s+(20|21|22|23|[0-1]\d):[0-5]\d:[0-5]\d$/
921
+ if (this.data.fields[index].format) {
922
+ if (this.data.fields[index].format === 'yyyy-MM-dd') {
923
+ if (!dateReg.test(this.data.fields[index].value)) {
924
+ this.data.fields[index].value = ''
925
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
926
+ }
927
+ }
928
+ if (this.data.fields[index].format === 'HH:mm:ss') {
929
+ if (!timeReg.test(this.data.fields[index].value)) {
930
+ this.data.fields[index].value = ''
931
+ this.$showAlert(this.data.fields[index].label + '格式错误如:00:00:00', 'warning', 2000)
932
+ }
933
+ }
934
+ if (this.data.fields[index].format === 'yyyy-MM-dd HH:mm:ss') {
935
+ if (!datetimeReg.test(this.data.fields[index].value)) {
936
+ this.data.fields[index].value = ''
937
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01 00:00:00', 'warning', 2000)
938
+ }
939
+ }
940
+ } else {
941
+ if (!dateReg.test(this.data.fields[index].value)) {
942
+ this.data.fields[index].value = ''
943
+ this.$showAlert(this.data.fields[index].label + '格式错误如:2021-01-01', 'warning', 2000)
944
+ }
945
+ }
946
+ }
947
+ }
948
+ },
949
+ events: {
950
+
951
+ }
952
+ }
953
+ </script>
954
+ <style>
955
+ .datepicker{
956
+ width: 100%!important;
957
+ }
958
+ .datepicker-input{
959
+ background-color: #ffffff!important;
960
+ width: 100%!important;
961
+ }
962
+ .datepicker-input:disabled{
963
+ border: 1px solid #DDD!important;
964
+ color: #ACA899!important;
965
+ width: 100%!important;
966
+ }
967
+ </style>
968
+ <style scoped>
969
+ th{
970
+ font-size: 15px !important;
971
+ text-align: center !important;
972
+ background-color: #dfedfb!important;
973
+ color: #666666 !important;
974
+ font-family: PINGFANG-BOLD !important;
975
+ font-weight: normal!important;
976
+ }
977
+ /*清除model中的浮动*/
978
+ .clearfix:after,.clearfix:before{
979
+ display: table;
980
+ }
981
+ .clearfix:after{
982
+ clear: both;
983
+ }
984
+
985
+ .input_view{
986
+ padding: 8px;
987
+ background-color: #ffffff;
988
+ border-radius: 2px;
989
+ border: solid 1px #c7c7c7!important;
990
+ color: #333333!important;
991
+ font-size: 15px!important;
992
+ }
993
+
994
+ .input_view[readonly]{
995
+ border: 1px solid #DDD!important;
996
+ color:#ACA899!important;
997
+ }
998
+ .input_view:disabled{
999
+ border: 1px solid #DDD!important;
1000
+ color:#ACA899!important;
1001
+ }
1002
+
1003
+ .control-label-justify {
1004
+ display: inline-block;
1005
+ vertical-align: top;
1006
+ width: 110px;
1007
+ text-align: justify;
1008
+ font-family: PingFang-SC-Bold;
1009
+ }
1010
+
1011
+ .control-label-justify::after {
1012
+ content: "";
1013
+ display: inline-block;
1014
+ width: 100%;
1015
+ overflow: hidden;
1016
+ height: 0;
1017
+ }
1018
+
1019
+ input::-webkit-outer-spin-button,
1020
+ input::-webkit-inner-spin-button {
1021
+ -webkit-appearance: none;
1022
+ }
1023
+
1024
+ input[type="number"] {
1025
+ -moz-appearance: textfield;
1026
+ }
1027
+
1028
+ </style>