apply-clients 3.4.2 → 3.4.4

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 (130) hide show
  1. package/android.html +23 -23
  2. package/build/dev-server.js +119 -119
  3. package/build/webpack.base.conf.js +2 -1
  4. package/build/webpack.dev.conf.js +12 -0
  5. package/dingding.html +23 -0
  6. package/index.html +33 -33
  7. package/package.json +2 -1
  8. package/src/AndroidApp.vue +35 -35
  9. package/src/DingDingApp.vue +51 -0
  10. package/src/android.js +21 -21
  11. package/src/apply.js +38 -13
  12. package/src/applyAndroid.js +46 -32
  13. package/src/applyDingDing.js +12 -0
  14. package/src/components/android/AppOnetomany.vue +343 -301
  15. package/src/components/android/AppServiceView.vue +189 -10
  16. package/src/components/android/AppSign.vue +19 -7
  17. package/src/components/android/AppTakePic.vue +143 -143
  18. package/src/components/android/AreaSelect/AppQrcodeReader.vue +73 -0
  19. package/src/components/android/AreaSelect/AppResAreaMapGroup.vue +148 -0
  20. package/src/components/android/AreaSelect/AppResAreaSelect.vue +108 -0
  21. package/src/components/android/AreaSelect/AppResAreaSelectGroup.vue +142 -0
  22. package/src/components/android/Function/AppFunctionServiceControl.vue +344 -0
  23. package/src/components/android/Function/AppInstallFunction.vue +366 -0
  24. package/src/components/android/Process/AppExplorationUser.vue +500 -320
  25. package/src/components/android/Process/AppServiceControl.vue +999 -48
  26. package/src/components/android/Process/Processes/AppAddMaterialScience.vue +477 -0
  27. package/src/components/android/Process/Processes/AppBuildSign.vue +46 -0
  28. package/src/components/android/Process/Processes/AppChargeManagement.vue +637 -0
  29. package/src/components/android/Process/Processes/AppDevicesManagement.vue +519 -0
  30. package/src/components/android/Process/Processes/AppInstallationDetails.vue +116 -90
  31. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +298 -0
  32. package/src/components/android/Process/Processes/selectApply.vue +250 -0
  33. package/src/components/android/Process/Processes/selectUserinfo.vue +182 -0
  34. package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -64
  35. package/src/components/android/Supervisory/AppProcessSupervisory.vue +205 -71
  36. package/src/components/android/Supervisory/AppSupervisoryCart.vue +69 -34
  37. package/src/components/android/TaskGraph.vue +125 -125
  38. package/src/components/common/TabButton.vue +149 -0
  39. package/src/components/common/Tabs.vue +67 -0
  40. package/src/components/image/dwg.jpg +0 -0
  41. package/src/components/image/txt.jpg +0 -0
  42. package/src/components/image//345/221/250/345/217/243/346/224/266/346/254/276/344/270/223/347/224/250/347/253/240.png +0 -0
  43. package/src/components/image//350/245/277/345/215/216/346/224/266/346/254/276/344/270/223/347/224/250/347/253/240.png +0 -0
  44. package/src/components/image//351/203/270/345/237/216/346/224/266/346/254/276/344/270/223/347/224/250/347/253/240.png +0 -0
  45. package/src/components/image//351/241/271/345/237/216/346/224/266/346/254/276/344/270/223/347/224/250/347/253/240.png +0 -0
  46. package/src/components/image//351/271/277/351/202/221/346/224/266/346/254/276/344/270/223/347/224/250/347/253/240.png +0 -0
  47. package/src/components/product/ApplyCharge/ApplyChargeList.vue +272 -53
  48. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +3 -3
  49. package/src/components/product/AreaSelect/MyAreaSelect.vue +423 -0
  50. package/src/components/product/AreaSelect/ResAreaSelect.vue +106 -0
  51. package/src/components/product/AreaSelect/ResAreaSelectGroup.vue +150 -0
  52. package/src/components/product/AreaSelect/utils/EventListener.js +29 -0
  53. package/src/components/product/AreaSelect/utils/coerceBoolean.js +7 -0
  54. package/src/components/product/Business/BusinessApply.vue +269 -0
  55. package/src/components/product/Business/CivilApply.vue +269 -0
  56. package/src/components/product/Function/InstallFunction.vue +132 -125
  57. package/src/components/product/Function/InstallInfoSelect.vue +320 -292
  58. package/src/components/product/Function/Service/FunctionServiceControl.vue +445 -222
  59. package/src/components/product/GaoDeMapComponents/GaoDeMap.vue +231 -0
  60. package/src/components/product/GroupByApply/ApplyGroupByList.vue +253 -0
  61. package/src/components/product/GroupByApply/ApplyGroupByMain.vue +53 -0
  62. package/src/components/product/GroupByApply/ApplyGroupByPaper.vue +376 -0
  63. package/src/components/product/Install/InstallProject.vue +194 -0
  64. package/src/components/product/Material/MaterialDetailed.vue +262 -0
  65. package/src/components/product/OldApply/Handle/HandleApply.vue +337 -0
  66. package/src/components/product/OldApply/Monitor/MonitorApply.vue +360 -0
  67. package/src/components/product/OldApply/OldApply.vue +209 -0
  68. package/src/components/product/OldApply/OldApplyMessage.vue +420 -0
  69. package/src/components/product/Onetomany.vue +406 -377
  70. package/src/components/product/Print/BuildOrder/buildOrderList.vue +339 -0
  71. package/src/components/product/Print/BuildOrder/printBuildOrder.vue +157 -0
  72. package/src/components/product/Print/IgnitionBill/IgnitionBill.vue +259 -0
  73. package/src/components/product/Print/IgnitionBill/printIgnitionBill.vue +168 -0
  74. package/src/components/product/Process/ExplorationSelect.vue +495 -410
  75. package/src/components/product/Process/ExplorationUser.vue +189 -138
  76. package/src/components/product/Process/Processes/InstallationDetails.vue +25 -7
  77. package/src/components/product/Process/Processes/Print/printCharge.vue +41 -17
  78. package/src/components/product/Process/Processes/Print/printChargepc.vue +142 -0
  79. package/src/components/product/Process/Processes/Print/printRefund.vue +196 -0
  80. package/src/components/product/Process/Processes/addMaterialScience.vue +454 -0
  81. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +211 -207
  82. package/src/components/product/Process/Processes/chargeManagement.vue +20 -3
  83. package/src/components/product/Process/Processes/devicesManagement.vue +484 -478
  84. package/src/components/product/Process/Processes/selectApply.vue +2 -2
  85. package/src/components/product/Process/Service/ServiceControl.vue +638 -20
  86. package/src/components/product/Process/Service/ShowBackReason.vue +33 -33
  87. package/src/components/product/Process/ShowBackReason.vue +33 -0
  88. package/src/components/product/ServiceView.vue +357 -7
  89. package/src/components/product/Stop/StopApply.vue +101 -103
  90. package/src/components/product/Stop/StopApplyList.vue +271 -269
  91. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +884 -186
  92. package/src/components/product/Supervisory/SupervisoryControl.vue +137 -100
  93. package/src/components/product/Supervisory/SupervisoryList.vue +201 -30
  94. package/src/components/product/Supervisory/SupervisoryhCart.vue +130 -107
  95. package/src/components/product/VueUtils/ApplyUpload.vue +275 -273
  96. package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +1090 -0
  97. package/src/components/product/VueUtils/HighMeter.vue +208 -208
  98. package/src/components/product/VueUtils/ToolsPage.vue +51 -0
  99. package/src/components/product/VueUtils/Tree.vue +330 -0
  100. package/src/dingding.js +19 -0
  101. package/src/expandcssAndroid.less +517 -1034
  102. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +735 -731
  103. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +824 -824
  104. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetailsCivil.vue +650 -650
  105. package/src/filiale/yuchuan/android/Sign/AppSignTask.vue +182 -182
  106. package/src/filiale/yuchuan/android/Sign/BuildSign.vue +50 -50
  107. package/src/filiale/yuchuan/android/Sign/ConstructSign.vue +50 -50
  108. package/src/filiale/yuchuan/android/Sign/DesignSign.vue +50 -50
  109. package/src/filiale/yuchuan/android/Sign/SupervisorSign.vue +50 -50
  110. package/src/filiale/yuchuan/android/Task/Build/BuildTsak.vue +60 -60
  111. package/src/filiale/yuchuan/android/Task/Survey/SurveyTsak.vue +60 -60
  112. package/src/filiale/yuchuan/android.js +14 -14
  113. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +528 -528
  114. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +343 -343
  115. package/src/filiale/yuchuan/pc/Print/BuildOrder/buildOrderList.vue +264 -0
  116. package/src/filiale/yuchuan/pc/Print/BuildOrder/printBuildOrder.vue +152 -0
  117. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +149 -149
  118. package/src/filiale/yuchuan/pc/Process/Processes/ApplyMapCom.vue +67 -67
  119. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetails.vue +809 -809
  120. package/src/filiale/yuchuan/pc/Process/Processes/InstallationDetailsCivil.vue +595 -595
  121. package/src/filiale/yuchuan/pc/Process/Processes/Print/printCharge.vue +125 -0
  122. package/src/filiale/yuchuan/pc/Process/Processes/chargeManagement.vue +621 -470
  123. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +1108 -1074
  124. package/src/filiale/yuchuan/pc/Sign/SignRecord.vue +24 -0
  125. package/src/filiale/yuchuan/pc/Sign/SignRecordList.vue +174 -0
  126. package/src/filiale/yuchuan/pc.js +20 -12
  127. package/src/main.js +4 -1
  128. package/src/components/product/Function/StopApplyCrrdList.vue +0 -176
  129. package/src/components/product/Function/functions/ApplyRecordCancel.vue +0 -102
  130. package/src/components/product/Function/functions/StopInstall.vue +0 -106
@@ -1,377 +1,406 @@
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>
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
+ async confirmModal () {
213
+ //报警器设备型号校验
214
+ if (this.selectdata.f_apply_type === '报警器报建' || this.selectdata.f_apply_type === '工商业报警器报建'){
215
+ let data = {
216
+ f_material_name : "",
217
+ f_bjq_sid: "",
218
+ }
219
+ this.onetomany.fields.forEach(item=>{
220
+ if (item.label === '材料编号'){
221
+ data.f_bjq_sid = item.value
222
+ }
223
+ if (item.label === '材料名称'){
224
+ data.f_material_name = item.value
225
+ }
226
+ })
227
+ if (data.f_material_name.substr(0,3) === '报警器'){
228
+ let res = await this.$resetpost(
229
+ `ncc/rs/logic/bjqcheck`,
230
+ // `/rs/logic/bjqcheck`,
231
+ data
232
+ )
233
+ if (res.data.code != 200){
234
+ this.disableButton = true
235
+ this.$showMessage(res.data.msg)
236
+ return
237
+ }
238
+ }
239
+ }
240
+
241
+ if (this.modelTitle === '新增') {
242
+ if (this.onetomany.add.event) {
243
+ this.$dispatch(this.onetomany.add.event, this.index)
244
+ } else {
245
+ this.$dispatch('onetomanyadd', this.index)
246
+ }
247
+ this.closeModal()
248
+ }
249
+ if (this.modelTitle === '修改') {
250
+ if (this.onetomany.update.event) {
251
+ this.$dispatch(this.onetomany.update.event, this.index, this.rowIndex)
252
+ } else {
253
+ this.$dispatch('onetomanyupdate', this.index, this.rowIndex)
254
+ }
255
+ this.closeModal()
256
+ }
257
+ // this.closeModal()
258
+ },
259
+ onchange (fieldIndex) {
260
+ this.disableModalButton()
261
+ if (this.onetomany.fields[fieldIndex].onchange) {
262
+ this.$dispatch(this.onetomany.fields[fieldIndex].onchange, this.index, fieldIndex)
263
+ } else {
264
+ this.$dispatch('onchangeModal', this.index, fieldIndex)
265
+ }
266
+ },
267
+ onblur (fieldIndex) {
268
+ this.disableModalButton()
269
+ if (this.onetomany.fields[fieldIndex].onblur) {
270
+ this.$dispatch(this.onetomany.fields[fieldIndex].onblur, this.index, fieldIndex)
271
+ } else {
272
+ this.$dispatch('onblurModal', this.index, fieldIndex)
273
+ }
274
+ },
275
+ oninput (fieldIndex) {
276
+ this.disableModalButton()
277
+ if (this.onetomany.fields[fieldIndex].oninput) {
278
+ this.$dispatch(this.onetomany.fields[fieldIndex].oninput, this.index, fieldIndex)
279
+ } else {
280
+ this.$dispatch('oninputModal', this.index, fieldIndex)
281
+ }
282
+ },
283
+ openDelete (rowIndex) {
284
+ this.$showMessage(this.onetomany.delete.message ? this.onetomany.delete.message : '您确定要删除这条记录吗?', ['confirm']).then((res) => {
285
+ if (res === 'confirm') {
286
+ if (this.onetomany.delete.event) {
287
+ this.$dispatch(this.onetomany.delete.event, this.index, rowIndex)
288
+ } else {
289
+ this.$dispatch('onetomanydelete', this.index, rowIndex)
290
+ }
291
+ }
292
+ })
293
+ },
294
+ // 修改
295
+ openUpdate (rowIndex) {
296
+ let row = this.onetomany.rows[rowIndex]
297
+ for (const item of this.onetomany.fields) {
298
+ item.value = row[item.field]
299
+ }
300
+
301
+ this.disableModalButton()
302
+
303
+ this.modelTitle = '修改'
304
+ this.rowIndex = rowIndex
305
+
306
+ if (this.onetomany.update.openEvent) {
307
+ this.$dispatch(this.onetomany.update.openEvent, this.index, this.rowIndex)
308
+ }
309
+ this.$dispatch('openUpdateModel', this.index, this.rowIndex)
310
+
311
+ this.showModal = true
312
+ },
313
+ // 添加
314
+ openAdd () {
315
+ this.disableModalButton()
316
+ this.modelTitle = '新增'
317
+
318
+ if (this.onetomany.add.openEvent) {
319
+ this.$dispatch(this.onetomany.add.openEvent, this.index)
320
+ }
321
+ this.$dispatch('openAddModel', this.index)
322
+
323
+ this.showModal = true
324
+ },
325
+ closeModal () {
326
+ this.showModal = false
327
+ this.disableButton = false
328
+ this.modelTitle = null
329
+ this.rowIndex = null
330
+
331
+ for (const item of this.onetomany.fields) {
332
+ item.value = null
333
+ }
334
+ },
335
+ // 是否禁用按钮
336
+ disableModalButton () {
337
+ let flag = false
338
+
339
+ for (const field of this.onetomany.fields) {
340
+ if (field.required && !field.value && !field.hidden && field.value !== 0) {
341
+ flag = true
342
+ }
343
+ }
344
+
345
+ this.disableButton = flag
346
+ },
347
+ // 关闭文件上传对话框
348
+ closeFile () {
349
+ this.showFile = false
350
+ // 将选的文件清空
351
+ this.$refs.file.$el.querySelector('input').value = ''
352
+ }
353
+ },
354
+ computed: {
355
+ getField () {
356
+ if (this.onetomany.export.fields) {
357
+ return this.onetomany.export.fields
358
+ }
359
+ let field = {}
360
+ for (const item of this.onetomany.fields) {
361
+ if (item.displayPosition === 'form' || !item.displayPosition) {
362
+ field[item.field] = item.label
363
+ }
364
+ }
365
+ return field
366
+ },
367
+ getCondition () {
368
+ if (this.onetomany.export.condition) {
369
+ return this.onetomany.export.condition
370
+ }
371
+ return {
372
+ tablename: this.onetomany.tables[0],
373
+ condition: `f_process_id='${this.selectdata.f_process_id}'`
374
+ }
375
+ }
376
+ },
377
+ events: {
378
+ async 'onFileUpload'(file, result) {
379
+ if (this.onetomany.import.event) {
380
+ this.$dispatch(this.onetomany.import.event, this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
381
+ } else {
382
+ this.$dispatch('importEvent', this.index, this.onetomany.tables[0], this.onetomany.import.configName, result.f_downloadpath)
383
+ }
384
+ }
385
+ }
386
+ }
387
+ </script>
388
+
389
+ <style scoped>
390
+ .control-label-justify {
391
+ display: inline-block;
392
+ vertical-align: top;
393
+ width: 110px;
394
+ text-align: justify;
395
+ font-family: PingFang-SC-Bold;
396
+ }
397
+
398
+ .control-label-justify::after {
399
+ content: "";
400
+ display: inline-block;
401
+ width: 100%;
402
+ overflow: hidden;
403
+ height: 0;
404
+ }
405
+
406
+ </style>