apply-clients 3.3.16 → 3.3.17
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.
- package/index.html +33 -33
- package/package.json +1 -1
- package/src/AndroidApp.vue +30 -30
- package/src/android.js +21 -21
- package/src/apply.js +3 -6
- package/src/applyAndroid.js +35 -35
- package/src/components/android/AppOnetomany.vue +285 -285
- package/src/components/android/AppServiceView.vue +570 -570
- package/src/components/android/AppTakePic.vue +143 -143
- package/src/components/android/Function/AppFunctionServiceControl.vue +329 -329
- package/src/components/android/Function/AppInstallFunction.vue +327 -327
- package/src/components/android/Process/AppExplorationUser.vue +268 -268
- package/src/components/android/Process/AppServiceControl.vue +711 -686
- package/src/components/android/Process/Processes/AppChargeManagement.vue +468 -468
- package/src/components/android/Process/Processes/AppDevicesManagement.vue +490 -490
- package/src/components/android/Process/Processes/AppInstallationDetails.vue +466 -466
- package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +297 -297
- package/src/components/android/Supervisory/AppProcessSupervisory.vue +261 -261
- package/src/components/android/Supervisory/AppSupervisoryCart.vue +115 -115
- package/src/components/product/ApplyCharge/ApplyChargeList.vue +265 -265
- package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +30 -30
- package/src/components/product/Function/InstallFunction.vue +122 -122
- package/src/components/product/Function/InstallInfoSelect.vue +289 -289
- package/src/components/product/Function/Service/FunctionServiceControl.vue +254 -254
- package/src/components/product/Onetomany.vue +296 -296
- package/src/components/product/Order/OrderApply.vue +47 -47
- package/src/components/product/Order/OrderApplyList.vue +62 -62
- package/src/components/product/Order/OrderMessage.vue +237 -237
- package/src/components/product/Process/ExplorationSelect.vue +145 -143
- package/src/components/product/Process/ExplorationUser.vue +128 -128
- package/src/components/product/Process/Processes/InstallationDetails.vue +421 -352
- package/src/components/product/Process/Processes/Print/img/10101.png +0 -0
- package/src/components/product/Process/Processes/Print/img/1010109.png +0 -0
- package/src/components/product/Process/Processes/Print/img/1010110.png +0 -0
- package/src/components/product/Process/Processes/Print/img/1010111.png +0 -0
- package/src/components/product/Process/Processes/Print/img/1010112.png +0 -0
- package/src/components/product/Process/Processes/{printCharge.vue → Print/printCharge.vue} +139 -121
- package/src/components/product/Process/Processes/Print/printRefund.vue +193 -0
- package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +181 -181
- package/src/components/product/Process/Processes/chargeManagement.vue +639 -639
- package/src/components/product/Process/Processes/devicesManagement.vue +458 -458
- package/src/components/product/Process/Processes/selectApply.vue +250 -250
- package/src/components/product/Process/Processes/selectUserinfo.vue +182 -182
- package/src/components/product/Process/Processes/supplementalAgreement.vue +298 -298
- package/src/components/product/Process/Service/ServiceControl.vue +916 -810
- package/src/components/product/Process/ShowBackReason.vue +33 -33
- package/src/components/product/ServiceView.vue +301 -307
- package/src/components/product/Stop/StopApplyList.vue +254 -254
- package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +512 -517
- package/src/components/product/Supervisory/SupervisoryControl.vue +100 -100
- package/src/components/product/Supervisory/SupervisoryList.vue +226 -226
- package/src/components/product/Supervisory/SupervisoryhCart.vue +124 -124
- package/src/components/product/VueUtils/ApplyUpload.vue +262 -262
- package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +1090 -1090
- package/src/main.js +23 -23
- package/src/components/product/Function/Inform.vue +0 -74
- package/src/components/product/Function/MarketSurvey.vue +0 -80
|
@@ -1,296 +1,296 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<data-grid :model="onetomany" class="list_area table_sy">
|
|
4
|
-
<template partial='head'>
|
|
5
|
-
<tr>
|
|
6
|
-
<th style="white-space: nowrap;">序号</th>
|
|
7
|
-
<th v-for="field in $parent.model.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
|
|
8
|
-
<nobr>{{field.label}}</nobr>
|
|
9
|
-
</th>
|
|
10
|
-
<th v-if="!$parent.model.hiddenOperate">
|
|
11
|
-
<button class="button_new" @click.prevent="$parent.$parent.openAdd()" v-if="!$parent.model.addHidden">
|
|
12
|
-
<span :style="$parent.model.addStyle">{{ $parent.model.addText ? $parent.model.addText : '添加' }}</span>
|
|
13
|
-
</button>
|
|
14
|
-
</th>
|
|
15
|
-
</tr>
|
|
16
|
-
</template>
|
|
17
|
-
<template partial='body'>
|
|
18
|
-
<tr>
|
|
19
|
-
<td style="text-align: center">
|
|
20
|
-
<nobr><font>{{$index+1}}</font></nobr>
|
|
21
|
-
</td>
|
|
22
|
-
<td class="text-center" style="text-align: center" v-for="key in $parent.model.fields" v-if="!key.displayPosition || key.displayPosition === 'list'">
|
|
23
|
-
{{row[key.field]}}
|
|
24
|
-
</td>
|
|
25
|
-
<td style="text-align: center" v-if="!$parent.model.hiddenOperate">
|
|
26
|
-
<button class="button_search button_spacing" @click.prevent="$parent.$parent.openUpdate($index)" v-if="!$parent.model.updateHidden">
|
|
27
|
-
<span :style="$parent.model.updateStyle">{{ $parent.model.updateText ? $parent.model.updateText : '修改' }}</span>
|
|
28
|
-
</button>
|
|
29
|
-
<button class="button_delete button_spacing" @click.prevent="$parent.$parent.openDelete($index)" v-if="!$parent.model.deleteHidden">
|
|
30
|
-
<span :style="$parent.model.deleteStyle">{{ $parent.model.deleteText ? $parent.model.deleteText : '删除' }}</span>
|
|
31
|
-
</button>
|
|
32
|
-
</td>
|
|
33
|
-
</tr>
|
|
34
|
-
</template>
|
|
35
|
-
</data-grid>
|
|
36
|
-
|
|
37
|
-
<!-- onetomany模态框 -->
|
|
38
|
-
<modal v-if="showModal" :show.sync="showModal" backdrop="false" large>
|
|
39
|
-
<header slot="modal-header" class="modal-header">
|
|
40
|
-
<button type="button" class="close" @click="closeModal()"><span>×</span></button>
|
|
41
|
-
<span class="modal-title"><font
|
|
42
|
-
size="3">{{modelTitle}}</font></span>
|
|
43
|
-
</header>
|
|
44
|
-
<article slot="modal-body" class="modal-body clearfix">
|
|
45
|
-
<div class="form-group" style="padding: 0 150px">
|
|
46
|
-
<div v-for="(index,item) in onetomany.fields">
|
|
47
|
-
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
|
|
48
|
-
v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
49
|
-
<label :style="item.label_style ? item.label_style : ''"
|
|
50
|
-
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
51
|
-
<div :style="item.value_style ? item.value_style : ''"
|
|
52
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
53
|
-
<input class="form-control input_view"
|
|
54
|
-
:placeholder="item.placeholder"
|
|
55
|
-
:type="item.type"
|
|
56
|
-
v-model="item.value"
|
|
57
|
-
:value="item.value"
|
|
58
|
-
:readonly="item.readonly"
|
|
59
|
-
:disabled="item.disabled"
|
|
60
|
-
@change="onchange(index)"
|
|
61
|
-
@blur="onblur(index)"
|
|
62
|
-
@input="oninput(index)"
|
|
63
|
-
/>
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<!--时间datepicker-->
|
|
68
|
-
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
69
|
-
v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
70
|
-
<label :style="item.label_style ? item.label_style : ''"
|
|
71
|
-
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
72
|
-
<div :style="item.value_style ? item.value_style : ''"
|
|
73
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
74
|
-
<datepicker
|
|
75
|
-
:placeholder="item.placeholder"
|
|
76
|
-
:value.sync="item.value"
|
|
77
|
-
v-model="item.value"
|
|
78
|
-
:readonly="item.readonly"
|
|
79
|
-
:disabled="item.disabled"
|
|
80
|
-
:format="item.format ? item.format : 'yyyy-MM-dd'"
|
|
81
|
-
:show-reset-button="true"
|
|
82
|
-
@change="onchange(index)"
|
|
83
|
-
@blur="onblur(index)"
|
|
84
|
-
></datepicker>
|
|
85
|
-
</div>
|
|
86
|
-
</div>
|
|
87
|
-
|
|
88
|
-
<!--select-->
|
|
89
|
-
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
90
|
-
v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
91
|
-
<label :style="item.label_style ? item.label_style : ''"
|
|
92
|
-
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
93
|
-
<div :style="item.value_style ? item.value_style : ''"
|
|
94
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
95
|
-
<input-select
|
|
96
|
-
class="select select_list"
|
|
97
|
-
:value.sync="item.value"
|
|
98
|
-
v-model="item.value"
|
|
99
|
-
:options='item.options'
|
|
100
|
-
:readonly="item.readonly"
|
|
101
|
-
:disable="item.disabled"
|
|
102
|
-
:valueSingle="true"
|
|
103
|
-
@blur="onblur(index)"
|
|
104
|
-
@change="onchange(index)"
|
|
105
|
-
></input-select>
|
|
106
|
-
</div>
|
|
107
|
-
</div>
|
|
108
|
-
|
|
109
|
-
<!--textarea-->
|
|
110
|
-
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
111
|
-
v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
112
|
-
<label :style="item.label_style ? item.label_style : ''"
|
|
113
|
-
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
114
|
-
<div :style="item.value_style ? item.value_style : ''"
|
|
115
|
-
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
116
|
-
<textarea
|
|
117
|
-
class="form-control input_view"
|
|
118
|
-
style="width: 100%;height: 100%"
|
|
119
|
-
v-model="item.value"
|
|
120
|
-
:value="item.value"
|
|
121
|
-
:rows="item.rows"
|
|
122
|
-
:readonly="item.readonly"
|
|
123
|
-
:disabled="item.disabled"
|
|
124
|
-
@change="onchange(index)"
|
|
125
|
-
@blur="onblur(index)"
|
|
126
|
-
@input="oninput(index)"
|
|
127
|
-
></textarea>
|
|
128
|
-
</div>
|
|
129
|
-
</div>
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
</article>
|
|
133
|
-
<footer slot="modal-footer" class="modal-footer">
|
|
134
|
-
<button :class="disableButton ? 'btn btn-default':'btn btn-primary'"
|
|
135
|
-
:disabled="disableButton" type="button" @click="confirmModal()">
|
|
136
|
-
确认
|
|
137
|
-
</button>
|
|
138
|
-
</footer>
|
|
139
|
-
</modal>
|
|
140
|
-
</div>
|
|
141
|
-
</template>
|
|
142
|
-
|
|
143
|
-
<script>
|
|
144
|
-
import {HttpResetClass} from 'vue-client'
|
|
145
|
-
import Vue from 'vue'
|
|
146
|
-
export default {
|
|
147
|
-
title: 'onetomany',
|
|
148
|
-
props: {
|
|
149
|
-
onetomany: {
|
|
150
|
-
type: Object
|
|
151
|
-
},
|
|
152
|
-
index: {
|
|
153
|
-
type: Number
|
|
154
|
-
}
|
|
155
|
-
},
|
|
156
|
-
data () {
|
|
157
|
-
return {
|
|
158
|
-
disableButton: false,
|
|
159
|
-
showModal: false,
|
|
160
|
-
modelTitle: null,
|
|
161
|
-
rowIndex: null
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
ready () {
|
|
165
|
-
},
|
|
166
|
-
methods: {
|
|
167
|
-
confirmModal () {
|
|
168
|
-
if (this.modelTitle === '新增') {
|
|
169
|
-
if (this.onetomany.addEvent) {
|
|
170
|
-
this.$dispatch(this.onetomany.addEvent, this.index)
|
|
171
|
-
} else {
|
|
172
|
-
this.$dispatch('onetomanyadd', this.index)
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
if (this.modelTitle === '修改') {
|
|
176
|
-
if (this.onetomany.updateEvent) {
|
|
177
|
-
this.$dispatch(this.onetomany.updateEvent, this.index, this.rowIndex)
|
|
178
|
-
} else {
|
|
179
|
-
this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
this.closeModal()
|
|
184
|
-
},
|
|
185
|
-
onchange (fieldIndex) {
|
|
186
|
-
this.disableModalButton()
|
|
187
|
-
if (this.onetomany.fields[fieldIndex].onchange) {
|
|
188
|
-
this.$dispatch(this.onetomany.fields[fieldIndex].onchange, this.index, fieldIndex)
|
|
189
|
-
} else {
|
|
190
|
-
this.$dispatch('onchangeModal', this.index, fieldIndex)
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
onblur (fieldIndex) {
|
|
194
|
-
this.disableModalButton()
|
|
195
|
-
if (this.onetomany.fields[fieldIndex].onblur) {
|
|
196
|
-
this.$dispatch(this.onetomany.fields[fieldIndex].onblur, this.index, fieldIndex)
|
|
197
|
-
} else {
|
|
198
|
-
this.$dispatch('onblurModal', this.index, fieldIndex)
|
|
199
|
-
}
|
|
200
|
-
},
|
|
201
|
-
oninput (fieldIndex) {
|
|
202
|
-
this.disableModalButton()
|
|
203
|
-
if (this.onetomany.fields[fieldIndex].oninput) {
|
|
204
|
-
this.$dispatch(this.onetomany.fields[fieldIndex].oninput, this.index, fieldIndex)
|
|
205
|
-
} else {
|
|
206
|
-
this.$dispatch('oninputModal', this.index, fieldIndex)
|
|
207
|
-
}
|
|
208
|
-
},
|
|
209
|
-
openDelete (rowIndex) {
|
|
210
|
-
this.$showMessage(this.onetomany.deleteMessage ? this.onetomany.deleteMessage : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
|
|
211
|
-
if (res === 'confirm') {
|
|
212
|
-
if (this.onetomany.deleteEvent) {
|
|
213
|
-
this.$dispatch(this.onetomany.deleteEvent, this.index, rowIndex)
|
|
214
|
-
} else {
|
|
215
|
-
this.$dispatch('onetomanydelete', this.index, rowIndex)
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
})
|
|
219
|
-
},
|
|
220
|
-
// 修改
|
|
221
|
-
openUpdate (rowIndex) {
|
|
222
|
-
let row = this.onetomany.rows[rowIndex]
|
|
223
|
-
for (const item of this.onetomany.fields) {
|
|
224
|
-
item.value = row[item.field]
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
this.disableModalButton()
|
|
228
|
-
|
|
229
|
-
this.modelTitle = '修改'
|
|
230
|
-
this.rowIndex = rowIndex
|
|
231
|
-
|
|
232
|
-
this.$dispatch('openUpdateModel', this.index, this.rowIndex)
|
|
233
|
-
|
|
234
|
-
this.showModal = true
|
|
235
|
-
},
|
|
236
|
-
// 添加
|
|
237
|
-
openAdd () {
|
|
238
|
-
this.disableModalButton()
|
|
239
|
-
this.modelTitle = '新增'
|
|
240
|
-
|
|
241
|
-
this.$dispatch('openAddModel', this.index)
|
|
242
|
-
|
|
243
|
-
this.showModal = true
|
|
244
|
-
},
|
|
245
|
-
closeModal () {
|
|
246
|
-
this.showModal = false
|
|
247
|
-
this.disableButton = false
|
|
248
|
-
this.modelTitle = null
|
|
249
|
-
this.rowIndex = null
|
|
250
|
-
|
|
251
|
-
for (const item of this.onetomany.fields) {
|
|
252
|
-
item.value = null
|
|
253
|
-
}
|
|
254
|
-
},
|
|
255
|
-
// 是否禁用按钮
|
|
256
|
-
disableModalButton () {
|
|
257
|
-
let flag = false
|
|
258
|
-
|
|
259
|
-
for (const field of this.onetomany.fields) {
|
|
260
|
-
if (field.required && !field.value) {
|
|
261
|
-
if (field.value === 0) {
|
|
262
|
-
flag = false
|
|
263
|
-
} else {
|
|
264
|
-
flag = true
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
this.disableButton = flag
|
|
270
|
-
}
|
|
271
|
-
},
|
|
272
|
-
computed: {
|
|
273
|
-
},
|
|
274
|
-
events: {
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
</script>
|
|
278
|
-
|
|
279
|
-
<style scoped>
|
|
280
|
-
.control-label-justify {
|
|
281
|
-
display: inline-block;
|
|
282
|
-
vertical-align: top;
|
|
283
|
-
width: 110px;
|
|
284
|
-
text-align: justify;
|
|
285
|
-
font-family: PingFang-SC-Bold;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.control-label-justify::after {
|
|
289
|
-
content: "";
|
|
290
|
-
display: inline-block;
|
|
291
|
-
width: 100%;
|
|
292
|
-
overflow: hidden;
|
|
293
|
-
height: 0;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<data-grid :model="onetomany" class="list_area table_sy">
|
|
4
|
+
<template partial='head'>
|
|
5
|
+
<tr>
|
|
6
|
+
<th style="white-space: nowrap;">序号</th>
|
|
7
|
+
<th v-for="field in $parent.model.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
|
|
8
|
+
<nobr>{{field.label}}</nobr>
|
|
9
|
+
</th>
|
|
10
|
+
<th v-if="!$parent.model.hiddenOperate">
|
|
11
|
+
<button class="button_new" @click.prevent="$parent.$parent.openAdd()" v-if="!$parent.model.addHidden">
|
|
12
|
+
<span :style="$parent.model.addStyle">{{ $parent.model.addText ? $parent.model.addText : '添加' }}</span>
|
|
13
|
+
</button>
|
|
14
|
+
</th>
|
|
15
|
+
</tr>
|
|
16
|
+
</template>
|
|
17
|
+
<template partial='body'>
|
|
18
|
+
<tr>
|
|
19
|
+
<td style="text-align: center">
|
|
20
|
+
<nobr><font>{{$index+1}}</font></nobr>
|
|
21
|
+
</td>
|
|
22
|
+
<td class="text-center" style="text-align: center" v-for="key in $parent.model.fields" v-if="!key.displayPosition || key.displayPosition === 'list'">
|
|
23
|
+
{{row[key.field]}}
|
|
24
|
+
</td>
|
|
25
|
+
<td style="text-align: center" v-if="!$parent.model.hiddenOperate">
|
|
26
|
+
<button class="button_search button_spacing" @click.prevent="$parent.$parent.openUpdate($index)" v-if="!$parent.model.updateHidden">
|
|
27
|
+
<span :style="$parent.model.updateStyle">{{ $parent.model.updateText ? $parent.model.updateText : '修改' }}</span>
|
|
28
|
+
</button>
|
|
29
|
+
<button class="button_delete button_spacing" @click.prevent="$parent.$parent.openDelete($index)" v-if="!$parent.model.deleteHidden">
|
|
30
|
+
<span :style="$parent.model.deleteStyle">{{ $parent.model.deleteText ? $parent.model.deleteText : '删除' }}</span>
|
|
31
|
+
</button>
|
|
32
|
+
</td>
|
|
33
|
+
</tr>
|
|
34
|
+
</template>
|
|
35
|
+
</data-grid>
|
|
36
|
+
|
|
37
|
+
<!-- onetomany模态框 -->
|
|
38
|
+
<modal v-if="showModal" :show.sync="showModal" backdrop="false" large>
|
|
39
|
+
<header slot="modal-header" class="modal-header">
|
|
40
|
+
<button type="button" class="close" @click="closeModal()"><span>×</span></button>
|
|
41
|
+
<span class="modal-title"><font
|
|
42
|
+
size="3">{{modelTitle}}</font></span>
|
|
43
|
+
</header>
|
|
44
|
+
<article slot="modal-body" class="modal-body clearfix">
|
|
45
|
+
<div class="form-group" style="padding: 0 150px">
|
|
46
|
+
<div v-for="(index,item) in onetomany.fields">
|
|
47
|
+
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
|
|
48
|
+
v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
49
|
+
<label :style="item.label_style ? item.label_style : ''"
|
|
50
|
+
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
51
|
+
<div :style="item.value_style ? item.value_style : ''"
|
|
52
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
53
|
+
<input class="form-control input_view"
|
|
54
|
+
:placeholder="item.placeholder"
|
|
55
|
+
:type="item.type"
|
|
56
|
+
v-model="item.value"
|
|
57
|
+
:value="item.value"
|
|
58
|
+
:readonly="item.readonly"
|
|
59
|
+
:disabled="item.disabled"
|
|
60
|
+
@change="onchange(index)"
|
|
61
|
+
@blur="onblur(index)"
|
|
62
|
+
@input="oninput(index)"
|
|
63
|
+
/>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<!--时间datepicker-->
|
|
68
|
+
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
69
|
+
v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
70
|
+
<label :style="item.label_style ? item.label_style : ''"
|
|
71
|
+
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
72
|
+
<div :style="item.value_style ? item.value_style : ''"
|
|
73
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
74
|
+
<datepicker
|
|
75
|
+
:placeholder="item.placeholder"
|
|
76
|
+
:value.sync="item.value"
|
|
77
|
+
v-model="item.value"
|
|
78
|
+
:readonly="item.readonly"
|
|
79
|
+
:disabled="item.disabled"
|
|
80
|
+
:format="item.format ? item.format : 'yyyy-MM-dd'"
|
|
81
|
+
:show-reset-button="true"
|
|
82
|
+
@change="onchange(index)"
|
|
83
|
+
@blur="onblur(index)"
|
|
84
|
+
></datepicker>
|
|
85
|
+
</div>
|
|
86
|
+
</div>
|
|
87
|
+
|
|
88
|
+
<!--select-->
|
|
89
|
+
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
90
|
+
v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
91
|
+
<label :style="item.label_style ? item.label_style : ''"
|
|
92
|
+
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
93
|
+
<div :style="item.value_style ? item.value_style : ''"
|
|
94
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
95
|
+
<input-select
|
|
96
|
+
class="select select_list"
|
|
97
|
+
:value.sync="item.value"
|
|
98
|
+
v-model="item.value"
|
|
99
|
+
:options='item.options'
|
|
100
|
+
:readonly="item.readonly"
|
|
101
|
+
:disable="item.disabled"
|
|
102
|
+
:valueSingle="true"
|
|
103
|
+
@blur="onblur(index)"
|
|
104
|
+
@change="onchange(index)"
|
|
105
|
+
></input-select>
|
|
106
|
+
</div>
|
|
107
|
+
</div>
|
|
108
|
+
|
|
109
|
+
<!--textarea-->
|
|
110
|
+
<div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
|
|
111
|
+
v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
|
|
112
|
+
<label :style="item.label_style ? item.label_style : ''"
|
|
113
|
+
:class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
|
|
114
|
+
<div :style="item.value_style ? item.value_style : ''"
|
|
115
|
+
:class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
|
|
116
|
+
<textarea
|
|
117
|
+
class="form-control input_view"
|
|
118
|
+
style="width: 100%;height: 100%"
|
|
119
|
+
v-model="item.value"
|
|
120
|
+
:value="item.value"
|
|
121
|
+
:rows="item.rows"
|
|
122
|
+
:readonly="item.readonly"
|
|
123
|
+
:disabled="item.disabled"
|
|
124
|
+
@change="onchange(index)"
|
|
125
|
+
@blur="onblur(index)"
|
|
126
|
+
@input="oninput(index)"
|
|
127
|
+
></textarea>
|
|
128
|
+
</div>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
</article>
|
|
133
|
+
<footer slot="modal-footer" class="modal-footer">
|
|
134
|
+
<button :class="disableButton ? 'btn btn-default':'btn btn-primary'"
|
|
135
|
+
:disabled="disableButton" type="button" @click="confirmModal()">
|
|
136
|
+
确认
|
|
137
|
+
</button>
|
|
138
|
+
</footer>
|
|
139
|
+
</modal>
|
|
140
|
+
</div>
|
|
141
|
+
</template>
|
|
142
|
+
|
|
143
|
+
<script>
|
|
144
|
+
import {HttpResetClass} from 'vue-client'
|
|
145
|
+
import Vue from 'vue'
|
|
146
|
+
export default {
|
|
147
|
+
title: 'onetomany',
|
|
148
|
+
props: {
|
|
149
|
+
onetomany: {
|
|
150
|
+
type: Object
|
|
151
|
+
},
|
|
152
|
+
index: {
|
|
153
|
+
type: Number
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
data () {
|
|
157
|
+
return {
|
|
158
|
+
disableButton: false,
|
|
159
|
+
showModal: false,
|
|
160
|
+
modelTitle: null,
|
|
161
|
+
rowIndex: null
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
ready () {
|
|
165
|
+
},
|
|
166
|
+
methods: {
|
|
167
|
+
confirmModal () {
|
|
168
|
+
if (this.modelTitle === '新增') {
|
|
169
|
+
if (this.onetomany.addEvent) {
|
|
170
|
+
this.$dispatch(this.onetomany.addEvent, this.index)
|
|
171
|
+
} else {
|
|
172
|
+
this.$dispatch('onetomanyadd', this.index)
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
if (this.modelTitle === '修改') {
|
|
176
|
+
if (this.onetomany.updateEvent) {
|
|
177
|
+
this.$dispatch(this.onetomany.updateEvent, this.index, this.rowIndex)
|
|
178
|
+
} else {
|
|
179
|
+
this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
this.closeModal()
|
|
184
|
+
},
|
|
185
|
+
onchange (fieldIndex) {
|
|
186
|
+
this.disableModalButton()
|
|
187
|
+
if (this.onetomany.fields[fieldIndex].onchange) {
|
|
188
|
+
this.$dispatch(this.onetomany.fields[fieldIndex].onchange, this.index, fieldIndex)
|
|
189
|
+
} else {
|
|
190
|
+
this.$dispatch('onchangeModal', this.index, fieldIndex)
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
onblur (fieldIndex) {
|
|
194
|
+
this.disableModalButton()
|
|
195
|
+
if (this.onetomany.fields[fieldIndex].onblur) {
|
|
196
|
+
this.$dispatch(this.onetomany.fields[fieldIndex].onblur, this.index, fieldIndex)
|
|
197
|
+
} else {
|
|
198
|
+
this.$dispatch('onblurModal', this.index, fieldIndex)
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
oninput (fieldIndex) {
|
|
202
|
+
this.disableModalButton()
|
|
203
|
+
if (this.onetomany.fields[fieldIndex].oninput) {
|
|
204
|
+
this.$dispatch(this.onetomany.fields[fieldIndex].oninput, this.index, fieldIndex)
|
|
205
|
+
} else {
|
|
206
|
+
this.$dispatch('oninputModal', this.index, fieldIndex)
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
openDelete (rowIndex) {
|
|
210
|
+
this.$showMessage(this.onetomany.deleteMessage ? this.onetomany.deleteMessage : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
|
|
211
|
+
if (res === 'confirm') {
|
|
212
|
+
if (this.onetomany.deleteEvent) {
|
|
213
|
+
this.$dispatch(this.onetomany.deleteEvent, this.index, rowIndex)
|
|
214
|
+
} else {
|
|
215
|
+
this.$dispatch('onetomanydelete', this.index, rowIndex)
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
})
|
|
219
|
+
},
|
|
220
|
+
// 修改
|
|
221
|
+
openUpdate (rowIndex) {
|
|
222
|
+
let row = this.onetomany.rows[rowIndex]
|
|
223
|
+
for (const item of this.onetomany.fields) {
|
|
224
|
+
item.value = row[item.field]
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
this.disableModalButton()
|
|
228
|
+
|
|
229
|
+
this.modelTitle = '修改'
|
|
230
|
+
this.rowIndex = rowIndex
|
|
231
|
+
|
|
232
|
+
this.$dispatch('openUpdateModel', this.index, this.rowIndex)
|
|
233
|
+
|
|
234
|
+
this.showModal = true
|
|
235
|
+
},
|
|
236
|
+
// 添加
|
|
237
|
+
openAdd () {
|
|
238
|
+
this.disableModalButton()
|
|
239
|
+
this.modelTitle = '新增'
|
|
240
|
+
|
|
241
|
+
this.$dispatch('openAddModel', this.index)
|
|
242
|
+
|
|
243
|
+
this.showModal = true
|
|
244
|
+
},
|
|
245
|
+
closeModal () {
|
|
246
|
+
this.showModal = false
|
|
247
|
+
this.disableButton = false
|
|
248
|
+
this.modelTitle = null
|
|
249
|
+
this.rowIndex = null
|
|
250
|
+
|
|
251
|
+
for (const item of this.onetomany.fields) {
|
|
252
|
+
item.value = null
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
// 是否禁用按钮
|
|
256
|
+
disableModalButton () {
|
|
257
|
+
let flag = false
|
|
258
|
+
|
|
259
|
+
for (const field of this.onetomany.fields) {
|
|
260
|
+
if (field.required && !field.value) {
|
|
261
|
+
if (field.value === 0) {
|
|
262
|
+
flag = false
|
|
263
|
+
} else {
|
|
264
|
+
flag = true
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
this.disableButton = flag
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
computed: {
|
|
273
|
+
},
|
|
274
|
+
events: {
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
</script>
|
|
278
|
+
|
|
279
|
+
<style scoped>
|
|
280
|
+
.control-label-justify {
|
|
281
|
+
display: inline-block;
|
|
282
|
+
vertical-align: top;
|
|
283
|
+
width: 110px;
|
|
284
|
+
text-align: justify;
|
|
285
|
+
font-family: PingFang-SC-Bold;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.control-label-justify::after {
|
|
289
|
+
content: "";
|
|
290
|
+
display: inline-block;
|
|
291
|
+
width: 100%;
|
|
292
|
+
overflow: hidden;
|
|
293
|
+
height: 0;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
</style>
|