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