apply-clients 3.3.216 → 3.4.1

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 (96) hide show
  1. package/android.html +23 -23
  2. package/index.html +33 -33
  3. package/package.json +3 -3
  4. package/src/AndroidApp.vue +35 -30
  5. package/src/App.vue +20 -20
  6. package/src/android.js +21 -21
  7. package/src/apply.js +81 -90
  8. package/src/applyAndroid.js +1 -23
  9. package/src/components/android/AppOnetomany.vue +301 -285
  10. package/src/components/android/AppServiceView.vue +566 -570
  11. package/src/components/android/AppSign.vue +142 -142
  12. package/src/components/android/AppTakePic.vue +143 -144
  13. package/src/components/android/Process/AppExplorationUser.vue +320 -270
  14. package/src/components/android/Process/AppServiceControl.vue +757 -686
  15. package/src/components/android/Process/Processes/AppInstallationDetails.vue +456 -466
  16. package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -0
  17. package/src/components/android/ProgressReport/ProgressReportList.vue +209 -0
  18. package/src/components/android/Supervisory/AppProcessSupervisory.vue +73 -152
  19. package/src/components/android/Supervisory/AppSupervisoryCart.vue +121 -115
  20. package/src/components/android/TaskGraph.vue +125 -0
  21. package/src/components/product/ApplyCharge/ApplyChargeList.vue +36 -50
  22. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +3 -3
  23. package/src/components/product/Function/InstallFunction.vue +125 -122
  24. package/src/components/product/Function/InstallInfoSelect.vue +292 -318
  25. package/src/components/product/Function/Service/FunctionServiceControl.vue +222 -254
  26. package/src/components/product/Function/StopApplyCrrdList.vue +176 -0
  27. package/src/components/product/Function/functions/ApplyRecordCancel.vue +102 -0
  28. package/src/components/product/Function/functions/StopInstall.vue +106 -0
  29. package/src/components/product/Onetomany.vue +377 -296
  30. package/src/components/product/Order/OrderApply.vue +30 -30
  31. package/src/components/product/Order/OrderApplyList.vue +78 -67
  32. package/src/components/product/Order/OrderMessage.vue +11 -87
  33. package/src/components/product/Process/ExplorationSelect.vue +410 -369
  34. package/src/components/product/Process/ExplorationUser.vue +138 -128
  35. package/src/components/product/Process/Processes/InstallationDetails.vue +592 -504
  36. package/src/components/product/Process/Processes/Print/img/10101.png +0 -0
  37. package/src/components/product/Process/Processes/Print/img/1010109.png +0 -0
  38. package/src/components/product/Process/Processes/Print/img/1010110.png +0 -0
  39. package/src/components/product/Process/Processes/Print/img/1010111.png +0 -0
  40. package/src/components/product/Process/Processes/Print/img/1010112.png +0 -0
  41. package/src/components/product/Process/Processes/Print/printCharge.vue +142 -0
  42. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +207 -181
  43. package/src/components/product/Process/Processes/chargeManagement.vue +639 -638
  44. package/src/components/product/Process/Processes/devicesManagement.vue +22 -2
  45. package/src/components/product/Process/Processes/selectApply.vue +1 -1
  46. package/src/components/product/Process/Service/ServiceControl.vue +1254 -883
  47. package/src/components/product/Process/Service/ShowBackReason.vue +33 -0
  48. package/src/components/product/ServiceView.vue +631 -741
  49. package/src/components/product/Stop/StopApply.vue +103 -103
  50. package/src/components/product/Stop/StopApplyList.vue +269 -254
  51. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +186 -517
  52. package/src/components/product/Supervisory/SupervisoryControl.vue +100 -108
  53. package/src/components/product/Supervisory/SupervisoryList.vue +233 -253
  54. package/src/components/product/Supervisory/SupervisoryhCart.vue +107 -124
  55. package/src/components/product/VueUtils/ApplyUpload.vue +273 -264
  56. package/src/components/product/VueUtils/HighMeter.vue +208 -0
  57. package/src/expandcssAndroid.less +1034 -517
  58. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +548 -414
  59. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +754 -456
  60. package/src/filiale/yuchuan/android/Task/Survey/SurveyTsak.vue +60 -0
  61. package/src/filiale/yuchuan/android.js +7 -8
  62. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -517
  63. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +343 -343
  64. package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +270 -231
  65. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +147 -131
  66. package/src/filiale/yuchuan/pc/Process/Processes/ApplyMapCom.vue +66 -0
  67. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +759 -0
  68. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +470 -0
  69. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +879 -517
  70. package/src/filiale/yuchuan/pc.js +11 -13
  71. package/src/main.js +23 -23
  72. package/src/components/android/Function/AppFunctionServiceControl.vue +0 -329
  73. package/src/components/android/Function/AppInstallFunction.vue +0 -330
  74. package/src/components/android/Process/Processes/AppBuildSign.vue +0 -47
  75. package/src/components/android/Process/Processes/AppChargeManagement.vue +0 -468
  76. package/src/components/android/Process/Processes/AppDevicesManagement.vue +0 -490
  77. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +0 -297
  78. package/src/components/android/Process/Processes/AppjiaSign.vue +0 -47
  79. package/src/components/android/Process/Processes/AppjiafangSign.vue +0 -47
  80. package/src/components/android/Process/Processes/ApptechnologySign.vue +0 -47
  81. package/src/components/image/dwg.jpg +0 -0
  82. package/src/components/image/yasuobao.jpg +0 -0
  83. package/src/components/product/Function/Inform.vue +0 -73
  84. package/src/components/product/Function/MarketSurvey.vue +0 -81
  85. package/src/components/product/Process/Processes/printCharge.vue +0 -121
  86. package/src/components/product/Process/ShowBackReason.vue +0 -33
  87. package/src/components/product/Supervisory/Service/printChargeNode.vue +0 -873
  88. package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +0 -1090
  89. package/src/components/product/VueUtils/ToolsPage.vue +0 -51
  90. package/src/components/product/VueUtils/Tree.vue +0 -330
  91. package/src/filiale/wuan/android.js +0 -0
  92. package/src/filiale/wuan/pc.js +0 -4
  93. package/src/filiale/yuchuan/android/AppServiceView.vue +0 -599
  94. package/src/filiale/yuchuan/android/Reserve/ApplyReserve.vue +0 -200
  95. package/src/filiale/yuchuan/android/SiteSurvey/TaskGraph.vue +0 -137
  96. package/src/filiale/yuchuan/pc/Process/Processes/MapCom.vue +0 -51
@@ -1,296 +1,377 @@
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>&times;</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.$parent.onetomany.fields" v-if="!field.displayPosition || field.displayPosition === 'list'">
8
+ <nobr>{{field.label}}</nobr>
9
+ </th>
10
+ <th v-if="!$parent.$parent.onetomany.hiddenOperate">
11
+ <button :style="$parent.$parent.onetomany.add.style"
12
+ :class="$parent.$parent.onetomany.add.class ? $parent.$parent.onetomany.add.class + ' button_spacing' : 'button_new button_spacing'"
13
+ v-if="!$parent.$parent.onetomany.add.hidden"
14
+ @click.prevent="$parent.$parent.openAdd()" >
15
+ {{ $parent.$parent.onetomany.add.text || '添加' }}
16
+ </button>
17
+ <button :style="$parent.$parent.onetomany.import.style"
18
+ :class="$parent.$parent.onetomany.import.class ? $parent.$parent.onetomany.import.class + ' button_spacing' : 'button_export button_spacing'"
19
+ v-if="!$parent.$parent.onetomany.import.hidden"
20
+ @click.prevent="$parent.$parent.showFile = !$parent.$parent.showFile" >
21
+ {{ $parent.$parent.onetomany.import.text || '导入' }}
22
+ </button>
23
+ <a type="button" style="text-decoration: none"
24
+ class="button_export button_spacing"
25
+ v-if="$parent.$parent.onetomany.import.templateUrl"
26
+ :href="$parent.$parent.onetomany.import.templateUrl" download>模板下载</a>
27
+ <export-excel
28
+ v-if="!$parent.$parent.onetomany.export.hidden"
29
+ :data="$parent.$parent.getCondition"
30
+ :field="$parent.$parent.getField"
31
+ sqlurl="rs/logic/applyExportfile"
32
+ :sql-name="$parent.$parent.onetomany.export.sqlName || 'singleTable'"
33
+ :template-name="$parent.$parent.onetomany.export.templateName || '导出明细'"
34
+ :btn-name="$parent.$parent.onetomany.export.butName || '导出'"
35
+ :choose-col="true"></export-excel>
36
+ </th>
37
+ </tr>
38
+ </template>
39
+ <template partial='body'>
40
+ <tr>
41
+ <td style="text-align: center">
42
+ <nobr><font>{{$index+1}}</font></nobr>
43
+ </td>
44
+ <td class="text-center" style="text-align: center" v-for="key in $parent.$parent.onetomany.fields" v-if="!key.displayPosition || key.displayPosition === 'list'">
45
+ {{row[key.field]}}
46
+ </td>
47
+ <td style="text-align: center" v-if="!$parent.$parent.onetomany.hiddenOperate">
48
+ <button :style="$parent.$parent.onetomany.update.style"
49
+ :class="$parent.$parent.onetomany.update.class ? $parent.$parent.onetomany.update.class + ' button_spacing' : 'button_search button_spacing'"
50
+ v-if="!$parent.$parent.onetomany.update.hidden"
51
+ @click.prevent="$parent.$parent.openUpdate($index)" >
52
+ {{ $parent.$parent.onetomany.update.text || '修改' }}
53
+ </button>
54
+ <button :style="$parent.$parent.onetomany.delete.style"
55
+ :class="$parent.$parent.onetomany.delete.class ? $parent.$parent.onetomany.delete.class + ' button_spacing' : 'button_delete button_spacing'"
56
+ v-if="!$parent.$parent.onetomany.delete.hidden"
57
+ @click.prevent="$parent.$parent.openDelete($index)" >
58
+ {{ $parent.$parent.onetomany.delete.text || '删除' }}
59
+ </button>
60
+ </td>
61
+ </tr>
62
+ </template>
63
+ </data-grid>
64
+
65
+ <!-- onetomany模态框 -->
66
+ <modal v-if="showModal" :show.sync="showModal" backdrop="false" large>
67
+ <header slot="modal-header" class="modal-header">
68
+ <button type="button" class="close" @click="closeModal()"><span>&times;</span></button>
69
+ <span class="modal-title"><font
70
+ size="3">{{modelTitle}}</font></span>
71
+ </header>
72
+ <article slot="modal-body" class="modal-body clearfix">
73
+ <div class="form-group" style="padding: 0 150px">
74
+ <div v-for="(index,item) in onetomany.fields">
75
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group' : 'form-group']"
76
+ v-if="(item.type==='input' || item.type==='number'||item.type === 'tel'||item.type === 'email') && !item.hidden && (item.device === 'pc' || !item.device)">
77
+ <label :style="item.label_style ? item.label_style : ''"
78
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
79
+ <div :style="item.value_style ? item.value_style : ''"
80
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
81
+ <input class="form-control input_view"
82
+ :placeholder="item.placeholder"
83
+ :type="item.type"
84
+ v-model="item.value"
85
+ :value="item.value"
86
+ :readonly="item.readonly"
87
+ :disabled="item.disabled"
88
+ @change="onchange(index)"
89
+ @blur="onblur(index)"
90
+ @input="oninput(index)"
91
+ />
92
+ </div>
93
+ </div>
94
+
95
+ <!--时间datepicker-->
96
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
97
+ v-if="item.type==='datepicker' && !item.hidden && (item.device === 'pc' || !item.device)">
98
+ <label :style="item.label_style ? item.label_style : ''"
99
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
100
+ <div :style="item.value_style ? item.value_style : ''"
101
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
102
+ <datepicker
103
+ :placeholder="item.placeholder"
104
+ :value.sync="item.value"
105
+ v-model="item.value"
106
+ :readonly="item.readonly"
107
+ :disabled="item.disabled"
108
+ :format="item.format ? item.format : 'yyyy-MM-dd'"
109
+ :show-reset-button="true"
110
+ @change="onchange(index)"
111
+ @blur="onblur(index)"
112
+ ></datepicker>
113
+ </div>
114
+ </div>
115
+
116
+ <!--select-->
117
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
118
+ v-if="item.type==='select' && !item.hidden && (item.device === 'pc' || !item.device)">
119
+ <label :style="item.label_style ? item.label_style : ''"
120
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
121
+ <div :style="item.value_style ? item.value_style : ''"
122
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
123
+ <input-select
124
+ class="select select_list"
125
+ :value.sync="item.value"
126
+ v-model="item.value"
127
+ :options='item.options'
128
+ :readonly="item.readonly"
129
+ :disable="item.disabled"
130
+ :valueSingle="true"
131
+ @blur="onblur(index)"
132
+ @change="onchange(index)"
133
+ ></input-select>
134
+ </div>
135
+ </div>
136
+
137
+ <!--textarea-->
138
+ <div :style="item.style ? item.style : ''" :class="[item.required && !(item.value) ? 'has-error' : '', item.bootstraped ? item.bootstraped + ' form-group':'form-group']"
139
+ v-if="item.type==='textarea' && !item.hidden && (item.device === 'pc' || !item.device)">
140
+ <label :style="item.label_style ? item.label_style : ''"
141
+ :class="item.label_bootstraped ? item.label_bootstraped + ' control-label-justify control-label' : 'control-label-justify control-label col-sm-6'">{{item.label}}</label>
142
+ <div :style="item.value_style ? item.value_style : ''"
143
+ :class="item.value_bootstraped ? item.value_bootstraped : 'col-sm-9'">
144
+ <textarea
145
+ class="form-control input_view"
146
+ style="width: 100%;height: 100%"
147
+ v-model="item.value"
148
+ :value="item.value"
149
+ :rows="item.rows"
150
+ :readonly="item.readonly"
151
+ :disabled="item.disabled"
152
+ @change="onchange(index)"
153
+ @blur="onblur(index)"
154
+ @input="oninput(index)"
155
+ ></textarea>
156
+ </div>
157
+ </div>
158
+ </div>
159
+ </div>
160
+ </article>
161
+ <footer slot="modal-footer" class="modal-footer">
162
+ <button :class="disableButton ? 'btn btn-default':'btn btn-primary'"
163
+ :disabled="disableButton" type="button" @click="confirmModal()">
164
+ 确认
165
+ </button>
166
+ </footer>
167
+ </modal>
168
+
169
+ <modal v-if="showFile" :show.sync="showFile" v-ref:modal :backdrop="false" title="选择文件">
170
+ <header slot="modal-header" class="modal-header">
171
+ <button type="button" class="close" @click="closeFile()"><span>&times;</span></button>
172
+ <h4 class="modal-title">选择文件</h4>
173
+ </header>
174
+ <article slot="modal-body" class="modal-body">
175
+ <div class="form-group">
176
+ <file-upload class="my-file-uploader" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
177
+ </div>
178
+ </article>
179
+ <footer slot="modal-footer" class="modal-footer"></footer>
180
+ </modal>
181
+ </div>
182
+ </template>
183
+
184
+ <script>
185
+ import {HttpResetClass} from 'vue-client'
186
+ import Vue from 'vue'
187
+ export default {
188
+ title: 'onetomany',
189
+ props: {
190
+ selectdata: {
191
+ type: Object
192
+ },
193
+ onetomany: {
194
+ type: Object
195
+ },
196
+ index: {
197
+ type: Number
198
+ }
199
+ },
200
+ data () {
201
+ return {
202
+ disableButton: false,
203
+ showModal: false,
204
+ modelTitle: null,
205
+ rowIndex: null,
206
+ showFile: false
207
+ }
208
+ },
209
+ ready () {
210
+ },
211
+ methods: {
212
+ confirmModal () {
213
+ if (this.modelTitle === '新增') {
214
+ if (this.onetomany.add.event) {
215
+ this.$dispatch(this.onetomany.add.event, this.index)
216
+ } else {
217
+ this.$dispatch('onetomanyadd', this.index)
218
+ }
219
+ }
220
+ if (this.modelTitle === '修改') {
221
+ if (this.onetomany.update.event) {
222
+ this.$dispatch(this.onetomany.update.event, this.index, this.rowIndex)
223
+ } else {
224
+ this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
225
+ }
226
+ }
227
+
228
+ this.closeModal()
229
+ },
230
+ onchange (fieldIndex) {
231
+ this.disableModalButton()
232
+ if (this.onetomany.fields[fieldIndex].onchange) {
233
+ this.$dispatch(this.onetomany.fields[fieldIndex].onchange, this.index, fieldIndex)
234
+ } else {
235
+ this.$dispatch('onchangeModal', this.index, fieldIndex)
236
+ }
237
+ },
238
+ onblur (fieldIndex) {
239
+ this.disableModalButton()
240
+ if (this.onetomany.fields[fieldIndex].onblur) {
241
+ this.$dispatch(this.onetomany.fields[fieldIndex].onblur, this.index, fieldIndex)
242
+ } else {
243
+ this.$dispatch('onblurModal', this.index, fieldIndex)
244
+ }
245
+ },
246
+ oninput (fieldIndex) {
247
+ this.disableModalButton()
248
+ if (this.onetomany.fields[fieldIndex].oninput) {
249
+ this.$dispatch(this.onetomany.fields[fieldIndex].oninput, this.index, fieldIndex)
250
+ } else {
251
+ this.$dispatch('oninputModal', this.index, fieldIndex)
252
+ }
253
+ },
254
+ openDelete (rowIndex) {
255
+ this.$showMessage(this.onetomany.delete.message ? this.onetomany.delete.message : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
256
+ if (res === 'confirm') {
257
+ if (this.onetomany.delete.event) {
258
+ this.$dispatch(this.onetomany.delete.event, this.index, rowIndex)
259
+ } else {
260
+ this.$dispatch('onetomanydelete', this.index, rowIndex)
261
+ }
262
+ }
263
+ })
264
+ },
265
+ // 修改
266
+ openUpdate (rowIndex) {
267
+ let row = this.onetomany.rows[rowIndex]
268
+ for (const item of this.onetomany.fields) {
269
+ item.value = row[item.field]
270
+ }
271
+
272
+ this.disableModalButton()
273
+
274
+ this.modelTitle = '修改'
275
+ this.rowIndex = rowIndex
276
+
277
+ if (this.onetomany.update.openEvent) {
278
+ this.$dispatch(this.onetomany.update.openEvent, this.index, this.rowIndex)
279
+ }
280
+ this.$dispatch('openUpdateModel', this.index, this.rowIndex)
281
+
282
+ this.showModal = true
283
+ },
284
+ // 添加
285
+ openAdd () {
286
+ this.disableModalButton()
287
+ this.modelTitle = '新增'
288
+
289
+ if (this.onetomany.add.openEvent) {
290
+ this.$dispatch(this.onetomany.add.openEvent, this.index)
291
+ }
292
+ this.$dispatch('openAddModel', this.index)
293
+
294
+ this.showModal = true
295
+ },
296
+ closeModal () {
297
+ this.showModal = false
298
+ this.disableButton = false
299
+ this.modelTitle = null
300
+ this.rowIndex = null
301
+
302
+ for (const item of this.onetomany.fields) {
303
+ item.value = null
304
+ }
305
+ },
306
+ // 是否禁用按钮
307
+ disableModalButton () {
308
+ let flag = false
309
+
310
+ for (const field of this.onetomany.fields) {
311
+ if (field.required && !field.value && !field.hidden && field.value !== 0) {
312
+ flag = true
313
+ }
314
+ }
315
+
316
+ this.disableButton = flag
317
+ },
318
+ // 关闭文件上传对话框
319
+ closeFile () {
320
+ this.showFile = false
321
+ // 将选的文件清空
322
+ this.$refs.file.$el.querySelector('input').value = ''
323
+ }
324
+ },
325
+ computed: {
326
+ getField () {
327
+ if (this.onetomany.export.fields) {
328
+ return this.onetomany.export.fields
329
+ }
330
+ let field = {}
331
+ for (const item of this.onetomany.fields) {
332
+ if (item.displayPosition === 'form' || !item.displayPosition) {
333
+ field[item.field] = item.label
334
+ }
335
+ }
336
+ return field
337
+ },
338
+ getCondition () {
339
+ if (this.onetomany.export.condition) {
340
+ return this.onetomany.export.condition
341
+ }
342
+ return {
343
+ tablename: this.onetomany.tables[0],
344
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
345
+ }
346
+ }
347
+ },
348
+ events: {
349
+ async 'onFileUpload'(file, result) {
350
+ if (this.onetomany.import.event) {
351
+ this.$dispatch(this.onetomany.import.event, this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
352
+ } else {
353
+ this.$dispatch('importEvent', this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
354
+ }
355
+ }
356
+ }
357
+ }
358
+ </script>
359
+
360
+ <style scoped>
361
+ .control-label-justify {
362
+ display: inline-block;
363
+ vertical-align: top;
364
+ width: 110px;
365
+ text-align: justify;
366
+ font-family: PingFang-SC-Bold;
367
+ }
368
+
369
+ .control-label-justify::after {
370
+ content: "";
371
+ display: inline-block;
372
+ width: 100%;
373
+ overflow: hidden;
374
+ height: 0;
375
+ }
376
+
377
+ </style>