apply-clients 3.3.222 → 3.4.2-FuGu-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 (114) hide show
  1. package/build/css-loaders.js +34 -0
  2. package/build/dev-android.js +101 -0
  3. package/build/dev-client.js +8 -0
  4. package/build/dev-server-app.js +76 -0
  5. package/build/dev-server.js +119 -0
  6. package/build/example-server.js +80 -0
  7. package/build/release.sh +28 -0
  8. package/build/utils.js +80 -0
  9. package/build/webpack.base.conf.js +85 -0
  10. package/build/webpack.baseandroid.conf.js +84 -0
  11. package/build/webpack.dev.conf.js +51 -0
  12. package/build/webpack.devandroid.conf.js +34 -0
  13. package/build/webpack.example.conf.js +49 -0
  14. package/build/webpack.prod.conf.js +60 -0
  15. package/build/webpack.prodandroid.conf.js +60 -0
  16. package/build/webpack.test.conf.js +31 -0
  17. package/dingding.html +23 -0
  18. package/index.html +1 -1
  19. package/package.json +4 -3
  20. package/src/AndroidApp.vue +18 -13
  21. package/src/App.vue +20 -20
  22. package/src/DingDingApp.vue +51 -0
  23. package/src/android.js +1 -1
  24. package/src/apply.js +75 -91
  25. package/src/applyAndroid.js +25 -54
  26. package/src/applyDingDing.js +12 -0
  27. package/src/components/android/AppOnetomany.vue +37 -21
  28. package/src/components/android/AppServiceView.vue +3 -7
  29. package/src/components/android/AppSign.vue +3 -3
  30. package/src/components/android/AppTakePic.vue +12 -13
  31. package/src/components/android/Process/AppExplorationUser.vue +88 -38
  32. package/src/components/android/Process/AppServiceControl.vue +87 -16
  33. package/src/components/android/Process/Processes/AppInstallationDetails.vue +90 -100
  34. package/src/components/android/ProgressReport/ProgressReportDetail.vue +64 -0
  35. package/src/components/android/ProgressReport/ProgressReportList.vue +209 -0
  36. package/src/components/android/Supervisory/AppProcessSupervisory.vue +73 -152
  37. package/src/components/android/Supervisory/AppSupervisoryCart.vue +29 -23
  38. package/src/components/android/TaskGraph.vue +125 -0
  39. package/src/components/build/Install/ExplorationUser.vue +304 -0
  40. package/src/components/build/Install/Process/zhongran/ZR_Design.vue +537 -0
  41. package/src/components/product/ApplyCharge/ApplyChargeList.vue +36 -50
  42. package/src/components/product/ApplyCharge/ApplyChargeSearch.vue +3 -3
  43. package/src/components/product/ApplyCharge/printCharge.vue +142 -0
  44. package/src/components/product/Function/InstallFunction.vue +11 -2
  45. package/src/components/product/Function/InstallInfoSelect.vue +29 -47
  46. package/src/components/product/Function/Service/FunctionServiceControl.vue +172 -6
  47. package/src/components/product/Onetomany.vue +105 -24
  48. package/src/components/product/Order/OrderApply.vue +30 -30
  49. package/src/components/product/Order/OrderApplyList.vue +78 -67
  50. package/src/components/product/Order/OrderMessage.vue +11 -88
  51. package/src/components/product/Process/ExplorationSelect.vue +176 -149
  52. package/src/components/product/Process/ExplorationUser.vue +95 -85
  53. package/src/components/product/Process/Processes/InstallationDetails.vue +440 -352
  54. package/src/components/product/Process/Processes/addressAndUserinfoManagement.vue +35 -9
  55. package/src/components/product/Process/Processes/chargeManagement.vue +634 -638
  56. package/src/components/product/Process/Processes/devicesManagement.vue +22 -2
  57. package/src/components/product/Process/Processes/selectApply.vue +1 -1
  58. package/src/components/product/Process/Service/ServiceControl.vue +1241 -883
  59. package/src/components/product/Process/Service/ShowBackReason.vue +33 -0
  60. package/src/components/product/ServiceView.vue +313 -423
  61. package/src/components/product/Stop/StopApply.vue +27 -25
  62. package/src/components/product/Stop/StopApplyList.vue +26 -11
  63. package/src/components/product/Supervisory/Service/SupervisoryServiceControl.vue +18 -349
  64. package/src/components/product/Supervisory/SupervisoryControl.vue +0 -8
  65. package/src/components/product/Supervisory/SupervisoryList.vue +27 -47
  66. package/src/components/product/Supervisory/SupervisoryhCart.vue +32 -54
  67. package/src/components/product/VueUtils/ApplyUpload.vue +273 -264
  68. package/src/components/product/VueUtils/HighMeter.vue +208 -0
  69. package/src/dingding.js +20 -0
  70. package/src/expandcssAndroid.less +879 -362
  71. package/src/main.js +1 -1
  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/Order/ApplyOrder.vue +0 -141
  75. package/src/components/android/Process/Processes/AppBuildSign.vue +0 -47
  76. package/src/components/android/Process/Processes/AppChargeManagement.vue +0 -468
  77. package/src/components/android/Process/Processes/AppDevicesManagement.vue +0 -490
  78. package/src/components/android/Process/Processes/AppSupplementalAgreement.vue +0 -297
  79. package/src/components/android/Process/Processes/AppjiaSign.vue +0 -47
  80. package/src/components/android/Process/Processes/AppjiafangSign.vue +0 -47
  81. package/src/components/android/Process/Processes/ApptechnologySign.vue +0 -47
  82. package/src/components/image/danwei.png +0 -0
  83. package/src/components/image/dizhi.png +0 -0
  84. package/src/components/image/dwg.jpg +0 -0
  85. package/src/components/image/name.png +0 -0
  86. package/src/components/image/phone.png +0 -0
  87. package/src/components/image/type.png +0 -0
  88. package/src/components/image/yasuobao.jpg +0 -0
  89. package/src/components/image/zaixiantousu1.png +0 -0
  90. package/src/components/image/zizhukaitong.png +0 -0
  91. package/src/components/image//346/210/221/347/232/204.png +0 -0
  92. package/src/components/product/Function/Inform.vue +0 -73
  93. package/src/components/product/Function/MarketSurvey.vue +0 -81
  94. package/src/components/product/Process/Processes/printCharge.vue +0 -121
  95. package/src/components/product/Process/ShowBackReason.vue +0 -33
  96. package/src/components/product/Supervisory/Service/printChargeNode.vue +0 -873
  97. package/src/components/product/VueUtils/GaoPaiYi/HighMeter.vue +0 -1090
  98. package/src/components/product/VueUtils/ToolsPage.vue +0 -51
  99. package/src/components/product/VueUtils/Tree.vue +0 -330
  100. package/src/filiale/wuan/android.js +0 -0
  101. package/src/filiale/wuan/pc.js +0 -4
  102. package/src/filiale/yuchuan/android/AppServiceView.vue +0 -599
  103. package/src/filiale/yuchuan/android/Process/AppServiceControl.vue +0 -414
  104. package/src/filiale/yuchuan/android/Process/Processes/AppInstallationDetails.vue +0 -456
  105. package/src/filiale/yuchuan/android/Reserve/ApplyReserve.vue +0 -200
  106. package/src/filiale/yuchuan/android/SiteSurvey/TaskGraph.vue +0 -137
  107. package/src/filiale/yuchuan/android.js +0 -8
  108. package/src/filiale/yuchuan/pc/Order/OrderApply.vue +0 -517
  109. package/src/filiale/yuchuan/pc/Order/OrderApplyList.vue +0 -343
  110. package/src/filiale/yuchuan/pc/Process/ExplorationSelect.vue +0 -356
  111. package/src/filiale/yuchuan/pc/Process/ExplorationUser.vue +0 -131
  112. package/src/filiale/yuchuan/pc/Process/Processes/MapCom.vue +0 -51
  113. package/src/filiale/yuchuan/pc/Process/Service/ServiceControl.vue +0 -517
  114. package/src/filiale/yuchuan/pc.js +0 -13
@@ -1,4 +1,6 @@
1
1
  <template>
2
+ <work-busy :is-busy="showWork" v-show="showWork"></work-busy>
3
+
2
4
  <div class="col-sm-12" style="margin: 20px 0px;">
3
5
  <criteria-paged :model="model" v-ref:cp :pager="pager">
4
6
  <criteria partial='criteria' @condition-changed='$parent.searchCondition' v-ref:cri>
@@ -56,7 +58,7 @@
56
58
  <button
57
59
  type="button" name="button" class="btn btn-link"
58
60
  :disabled="row.f_cumulative_payment_money < $parent.$parent.$parent.selectdata.f_price && $parent.$parent.$parent.selectdata.f_apply_type !== '开发商集体报建'"
59
- @click="$parent.$parent.$parent.showUserFileModal(row)">
61
+ @click="$parent.$parent.$parent.showUserFileModal(row)">
60
62
  {{$parent.$parent.$parent.mark === 1 ? '查看' : row.f_userfiles_num > 0 ? '修正' : '添加'}}
61
63
  </button>
62
64
  </nobr>
@@ -73,417 +75,486 @@
73
75
  </header>
74
76
  <article slot="modal-body" class="modal-body">
75
77
  <div class="form-group">
76
- <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" multiple v-ref:file></file-upload>
78
+ <file-upload class="my-file-uploader" name="useraddressUploadFile" action="rs/file/uploadFile" tagname="确定" v-ref:file></file-upload>
77
79
  </div>
78
80
  </article>
79
81
  <footer slot="modal-footer" class="modal-footer"></footer>
80
82
  </modal>
81
83
 
82
- <validator name="v">
83
- <modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细">
84
- <header slot="modal-header" class="modal-header">
85
- <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
86
- <h4 class="modal-title">安装明细</h4>
87
- </header>
88
- <article slot="modal-body" class="modal-body clearfix">
89
- <div class="form-group col-sm-12">
90
- <label class="col-sm-2 control-label">地址信息:</label>
91
- <div class="col-sm-10">
92
- <input class="form-control input_view" style=""
93
- v-model="useradders.f_address"
94
- :value="useradders.f_address"
95
- :readonly="true"/>
96
- </div>
84
+ <modal v-if="showUserFile" :show.sync="showUserFile" v-ref:modal :large="true" :backdrop="false" title="安装明细">
85
+ <header slot="modal-header" class="modal-header">
86
+ <button type="button" class="close" @click="closeUserFile"><span>&times;</span></button>
87
+ <h4 class="modal-title">安装明细</h4>
88
+ </header>
89
+ <article slot="modal-body" class="modal-body clearfix">
90
+ <div class="form-group col-sm-12">
91
+ <label class="col-sm-2 control-label">地址信息:</label>
92
+ <div class="col-sm-10">
93
+ <input class="form-control input_view" style=""
94
+ v-model="useradders.f_address"
95
+ :value="useradders.f_address"
96
+ :readonly="true"/>
97
97
  </div>
98
+ </div>
98
99
 
99
- <div v-for="(i, item) in userinfo.userfiles" class="form-group col-sm-12 panel panel-info">
100
- <div class="panel-heading head" style="background-color: #e8f4ff;margin-bottom: 10px">表具{{$index+1}}信息</div>
101
- <div class="form-group col-sm-6" :class="[$v.gasbrand.required ? 'has-error' : '']">
102
- <label class="col-sm-4 control-label">气表品牌:</label>
103
- <div class="col-sm-8">
104
- <input type="text" v-show="false" v-model="item.gasbrand.id" v-validate:gasbrand = "['required']" >
105
- <input-select
106
- class="select select_list"
107
- :value.sync="item.gasbrand"
108
- v-model="item.gasbrand"
109
- :options="meterbrands"
110
- @change="gasbrandChange(i)"
111
- :disable="mark === 1"
112
- :valueSingle="true"></input-select>
113
- </div>
100
+ <div v-for="(i, item) in userinfo.userfiles" class="form-group col-sm-12 panel panel-info">
101
+ <div class="panel-heading head col-sm-12" style="background-color: #e8f4ff;margin-bottom: 10px">
102
+ <div class="col-sm-6 text-left">表具{{$index+1}}信息</div>
103
+ <div class="col-sm-6 text-right"><button
104
+ class="button_delete button_spacing"
105
+ v-if="!item.f_userfiles_id"
106
+ @click.prevent="deleteUserFile(i)"
107
+ >删除</button></div>
108
+ </div>
109
+ <div class="form-group col-sm-6" :class="[item.gasbrand ? '' : 'has-error']">
110
+ <label class="col-sm-4 control-label">气表品牌:</label>
111
+ <div class="col-sm-8">
112
+ <input-select
113
+ class="select select_list"
114
+ :value.sync="item.gasbrand"
115
+ v-model="item.gasbrand"
116
+ :options="meterbrands"
117
+ @change="gasbrandChange(i)"
118
+ :disable="mark === 1"
119
+ :valueSingle="true"></input-select>
114
120
  </div>
115
- <div class="form-group col-sm-6" :class="[$v.gasmodel.required ? 'has-error' : '']">
116
- <label class="col-sm-4 control-label">气表型号:</label>
117
- <div class="col-sm-8">
118
- <input type="text" v-show="false" v-model="item.gasmodel.f_meter_style" :value.sync="item.gasmodel.f_meter_style" v-validate:gasmodel = "['required']" >
119
- <input-select
120
- class="select select_list"
121
- :value.sync="item.gasmodel"
122
- v-model="item.gasmodel"
123
- :options.sync="item.gasbrand.gasmodel"
124
- @change="gasmodelChange(i)"
125
- :disable="mark === 1"
126
- :valueSingle="true"></input-select>
127
- </div>
121
+ </div>
122
+ <div class="form-group col-sm-6" :class="[item.gasmodel ? '' : 'has-error']">
123
+ <label class="col-sm-4 control-label">气表型号:</label>
124
+ <div class="col-sm-8">
125
+ <input-select
126
+ class="select select_list"
127
+ :value.sync="item.gasmodel"
128
+ v-model="item.gasmodel"
129
+ :options.sync="item.gasbrand.gasmodel"
130
+ @change="gasmodelChange(i)"
131
+ :disable="mark === 1"
132
+ :valueSingle="true"></input-select>
128
133
  </div>
129
- <div class="form-group col-sm-6" :class="[$v.f_meternumber.required ? 'has-error' : '']">
130
- <label class="col-sm-4 control-label">表&emsp;&emsp;号:</label>
131
- <div class="col-sm-8">
132
- <input class="form-control input_view" style=""
133
- placeholder="表号"
134
- v-validate:f_meternumber = "['required']"
135
- v-model="item.f_meternumber"
136
- :value="item.f_meternumber"
137
- @change="meternumberValidate(i)"
138
- :readonly="mark === 1"/>
139
- </div>
134
+ </div>
135
+ <div class="form-group col-sm-6" :class="[item.f_meternumber ? '' : 'has-error']">
136
+ <label class="col-sm-4 control-label">表&emsp;&emsp;号:</label>
137
+ <div class="col-sm-8">
138
+ <input class="form-control input_view" style=""
139
+ placeholder="表号"
140
+ v-model="item.f_meternumber"
141
+ :value="item.f_meternumber"
142
+ @change="meternumberValidate(i)"
143
+ :readonly="mark === 1"/>
140
144
  </div>
141
- <div class="form-group col-sm-6">
142
- <label class="col-sm-4 control-label">表&ensp;封&ensp;号:</label>
143
- <div class="col-sm-8">
144
- <input class="form-control input_view" style=""
145
- placeholder="表封号"
146
- v-model="item.f_metertitles"
147
- :value="item.f_metertitles"
148
- :readonly="mark === 1"/>
149
- </div>
145
+ </div>
146
+ <div class="form-group col-sm-6">
147
+ <label class="col-sm-4 control-label">表&ensp;封&ensp;号:</label>
148
+ <div class="col-sm-8">
149
+ <input class="form-control input_view" style=""
150
+ placeholder="表封号"
151
+ v-model="item.f_metertitles"
152
+ :value="item.f_metertitles"
153
+ :readonly="mark === 1"/>
150
154
  </div>
151
- <div class="form-group col-sm-6">
152
- <label class="col-sm-4 control-label">表&ensp;读&ensp;数:</label>
153
- <div class="col-sm-8">
154
- <input class="form-control input_view" style=""
155
- type="number"
156
- placeholder="表读数"
157
- v-model="item.f_meter_base"
158
- :value="item.f_meter_base"
159
- :readonly="mark === 1"/>
160
- </div>
155
+ </div>
156
+ <div class="form-group col-sm-6">
157
+ <label class="col-sm-4 control-label">表&ensp;读&ensp;数:</label>
158
+ <div class="col-sm-8">
159
+ <input class="form-control input_view" style=""
160
+ type="number"
161
+ placeholder="表读数"
162
+ v-model="item.f_meter_base"
163
+ :value="item.f_meter_base"
164
+ :readonly="mark === 1"/>
161
165
  </div>
162
- <div class="form-group col-sm-6">
163
- <label class="col-sm-4 control-label">初始底数:</label>
164
- <div class="col-sm-8">
165
- <input class="form-control input_view" style=""
166
- type="number"
167
- v-model="item.f_initial_base"
168
- :value="item.f_initial_base"
169
- placeholder="初始底数"
170
- :readonly="mark === 1"/>
171
- </div>
166
+ </div>
167
+ <div class="form-group col-sm-6">
168
+ <label class="col-sm-4 control-label">初始底数:</label>
169
+ <div class="col-sm-8">
170
+ <input class="form-control input_view" style=""
171
+ type="number"
172
+ v-model="item.f_initial_base"
173
+ :value="item.f_initial_base"
174
+ placeholder="初始底数"
175
+ :readonly="mark === 1"/>
172
176
  </div>
173
- <div class="form-group col-sm-6">
174
- <label class="col-sm-4 control-label">表&emsp;&emsp;向:</label>
175
- <div class="col-sm-8">
176
- <input-select
177
- class="select select_list"
178
- :value.sync="item.f_aroundmeter"
179
- v-model="item.f_aroundmeter"
180
- :options="aroundmeters"
181
- :disable="mark === 1"
182
- :valueSingle="true"></input-select>
183
- </div>
177
+ </div>
178
+ <div class="form-group col-sm-6">
179
+ <label class="col-sm-4 control-label">表&emsp;&emsp;向:</label>
180
+ <div class="col-sm-8">
181
+ <input-select
182
+ class="select select_list"
183
+ :value.sync="item.f_aroundmeter"
184
+ v-model="item.f_aroundmeter"
185
+ :options="aroundmeters"
186
+ :disable="mark === 1"
187
+ :valueSingle="true"></input-select>
184
188
  </div>
185
- <div class="form-group col-sm-6">
186
- <label class="col-sm-4 control-label">安装位置:</label>
187
- <div class="col-sm-8">
188
- <input-select
189
- class="select select_list"
190
- :value.sync="item.f_position"
191
- v-model="item.f_position"
192
- :options="positions"
193
- :disable="mark === 1"
194
- :valueSingle="true"></input-select>
195
- </div>
189
+ </div>
190
+ <div class="form-group col-sm-6">
191
+ <label class="col-sm-4 control-label">安装位置:</label>
192
+ <div class="col-sm-8">
193
+ <input-select
194
+ class="select select_list"
195
+ :value.sync="item.f_position"
196
+ v-model="item.f_position"
197
+ :options="positions"
198
+ :disable="mark === 1"
199
+ :valueSingle="true"></input-select>
196
200
  </div>
197
- <div class="form-group col-sm-6">
198
- <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
199
- <div class="col-sm-8">
200
- <input-select
201
- class="select select_list"
202
- :value.sync="item.f_install_person"
203
- v-model="item.f_install_person"
204
- :options="installperson"
205
- :disable="mark === 1"
206
- :valueSingle="true"></input-select>
207
- </div>
201
+ </div>
202
+ <div class="form-group col-sm-6">
203
+ <label class="col-sm-4 control-label">安&ensp;装&ensp;人:</label>
204
+ <div class="col-sm-8">
205
+ <input class="form-control input_view" style=""
206
+ v-model="item.f_install_person"
207
+ :value.sync="installperson(item.f_install_person)"
208
+ placeholder="安装人"
209
+ readonly/>
210
+ <!-- <input-select-->
211
+ <!-- class="select select_list"-->
212
+ <!-- :value.sync="item.f_install_person"-->
213
+ <!-- v-model="item.f_install_person"-->
214
+ <!-- :options="installperson"-->
215
+ <!-- :disable="mark === 1"-->
216
+ <!-- :valueSingle="true"></input-select>-->
208
217
  </div>
209
- <div class="form-group col-sm-6">
218
+ </div>
219
+ <div class="form-group col-sm-6">
210
220
  <label class="col-sm-4 control-label">安装日期:</label>
211
221
  <div class="col-sm-8">
212
- <datepicker
213
- placeholder="安装日期"
214
- :value.sync="item.f_install_date"
215
- v-model="item.f_install_date"
216
- format="yyyy-MM-dd HH:mm:ss"
217
- :disabled="mark === 1"
218
- :show-reset-button="reset">
219
- </datepicker>
222
+ <input class="form-control input_view" style=""
223
+ v-model="item.f_install_date"
224
+ :value.sync="installdate(item.f_install_date)"
225
+ placeholder="安装日期"
226
+ readonly/>
227
+ <!-- <datepicker-->
228
+ <!-- placeholder="安装日期"-->
229
+ <!-- :value.sync="item.f_install_date"-->
230
+ <!-- v-model="item.f_install_date"-->
231
+ <!-- format="yyyy-MM-dd HH:mm:ss"-->
232
+ <!-- :disabled="mark === 1"-->
233
+ <!-- :show-reset-button="reset">-->
234
+ <!-- </datepicker>-->
220
235
  </div>
221
236
  </div>
222
- </div>
237
+ </div>
223
238
 
224
- </article>
225
- <footer slot="modal-footer" class="modal-footer">
226
- <template v-if="mark !== 1">
227
- <!-- 去除一户多表 -->
228
- <button type="button" class="btn btn-primary" @click="addUserFile">添加表具</button>
229
- <button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
230
- </template>
231
- </footer>
232
- </modal>
233
- </validator>
239
+ </article>
240
+ <footer slot="modal-footer" class="modal-footer">
241
+ <template v-if="mark !== 1">
242
+ <!-- 去除一户多表 -->
243
+ <button type="button" class="btn btn-primary" @click="addUserFile" v-if="false">添加表具</button>
244
+ <button type="button" class="btn btn-primary" @click="saveUserFile" :disabled="!$v.valid">确认</button>
245
+ </template>
246
+ </footer>
247
+ </modal>
234
248
  </template>
235
249
  <script>
236
- import Vue from 'vue'
237
- import {PagedList} from 'vue-client'
238
- import {HttpResetClass} from 'vue-client'
239
- import {isEmpty} from '../../../Util'
250
+ import Vue from 'vue'
251
+ import {PagedList} from 'vue-client'
252
+ import {HttpResetClass} from 'vue-client'
253
+ import {isEmpty} from '../../../Util'
254
+ // Date格式化
255
+ Date.prototype.Format = function (fmt) {
256
+ var o = {
257
+ 'M+': this.getMonth() + 1, // 月份
258
+ 'd+': this.getDate(), // 日
259
+ 'H+': this.getHours(), // 小时
260
+ 'm+': this.getMinutes(), // 分
261
+ 's+': this.getSeconds(), // 秒
262
+ 'q+': Math.floor((this.getMonth() + 3) / 3), // 季度
263
+ 'S': this.getMilliseconds() // 毫秒
264
+ }
265
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + '').substr(4 - RegExp.$1.length))
266
+ for (var k in o) {
267
+ if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
268
+ }
269
+ return fmt
270
+ }
240
271
 
241
- export default {
242
- title: '安装明细',
243
- props: {
244
- selectdata: {
245
- type: Object
272
+ export default {
273
+ title: '安装明细',
274
+ props: {
275
+ selectdata: {
276
+ type: Object
277
+ },
278
+ mark: {
279
+ type: Number,
280
+ default: 0
281
+ }
282
+ },
283
+ data () {
284
+ return {
285
+ showFile: false,
286
+ showUserFile: false,
287
+ model: new PagedList('rs/sql/getAddresAndUserinfoAndUserfilesAmount', 20, null),
288
+ meterbrands: [], // 气表品牌
289
+ useradders: null,
290
+ userinfo: {},
291
+ getfield: {
292
+ 'f_address': '地址',
293
+ 'f_user_name': '用户姓名/单位名称',
294
+ 'f_meternumber': '表号',
295
+ 'f_gasbrand': '气表品牌',
296
+ 'f_gasmodel': '气表型号',
297
+ 'f_metertitles': '表封号',
298
+ 'f_meter_base': '表读数',
299
+ 'f_initial_base': '初始底数',
300
+ 'f_aroundmeter': '表向',
301
+ 'f_position': '安装位置'
246
302
  },
247
- mark: {
248
- type: Number,
249
- default: 0
250
- }
303
+ showWork: false
304
+ }
305
+ },
306
+ ready () {
307
+ this.search()
308
+ this.getMeterbrands()
309
+ if (this.selectdata.f_apply_type === '团购报建') {
310
+ this.notInstalled()
311
+ }
312
+ },
313
+ methods: {
314
+ // 删除未保存的表具
315
+ async deleteUserFile (index) {
316
+ this.userinfo.userfiles.splice(index, 1)
251
317
  },
252
- data () {
253
- return {
254
- showFile: false,
255
- showUserFile: false,
256
- model: new PagedList('rs/sql/getAddresAndUserinfoAndUserfilesAmount', 20),
257
- meterbrands: [], // 气表品牌
258
- useradders: null,
259
- userinfo: {},
260
- getfield: {
261
- 'f_address': '地址',
262
- 'f_user_name': '用户姓名/单位名称',
263
- 'f_meternumber': '表号',
264
- 'f_gasbrand': '气表品牌',
265
- 'f_gasmodel': '气表型号',
266
- 'f_metertitles': '表封号',
267
- 'f_meter_base': '表读数',
268
- 'f_initial_base': '初始底数',
269
- 'f_aroundmeter': '表向',
270
- 'f_position': '安装位置',
271
- 'f_install_person': '安装人',
272
- 'f_install_date': '安装日期'
318
+ // 追加表具
319
+ addUserFile() {
320
+ this.userinfo.userfiles.push({})
321
+ },
322
+ // 保存档案
323
+ async saveUserFile() {
324
+ // 检查必填项
325
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
326
+ let userfile = this.userinfo.userfiles[i]
327
+ if (userfile.f_gasbrand_id === null || userfile.f_gasbrand_id === '') {
328
+ this.$showMessage(`表具${i+1}气表品牌没有选择!!!`)
329
+ return
330
+ }
331
+ if (userfile.f_gasmodel_id === null || userfile.f_gasmodel_id === '') {
332
+ this.$showMessage(`表具${i+1}气表型号没有选择!!!`)
333
+ return
334
+ }
335
+ if (userfile.f_meternumber === null || userfile.f_meternumber === '') {
336
+ this.$showMessage(`表具${i+1}表号没有填写!!!`)
337
+ return
273
338
  }
274
339
  }
340
+ let data = {
341
+ user: this.$login.f,
342
+ useradders: this.useradders,
343
+ userinfo: this.userinfo,
344
+ selectdata: this.selectdata
345
+ }
346
+ let res = await this.$resetpost('rs/logic/addInstallationDetails', {data:data}, {
347
+ resolveMsg: null,
348
+ rejectMsg: '表具添加失败!!!'
349
+ })
350
+ this.$dispatch('breakControl', this.selectdata)
275
351
  },
276
- ready () {
277
- this.search()
278
- this.getMeterbrands()
279
- this.model.f_process_id=this.selectdata.f_process_id
280
- },
281
- methods: {
282
- // 追加表具
283
- addUserFile() {
284
- this.userinfo.userfiles.push({})
285
- },
286
- // 保存档案
287
- async saveUserFile() {
352
+ // 检查表号是否存在
353
+ async meternumberValidate(i) {
354
+ if (!this.userinfo.userfiles[i].f_gasbrand_id) {
355
+ this.userinfo.userfiles[i].f_meternumber = ''
356
+ this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
357
+ return
358
+ }
359
+ if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
288
360
  let data = {
289
- user: this.$login.f,
290
- useradders: this.useradders,
291
- userinfo: this.userinfo,
292
- selectdata: this.selectdata
361
+ f_meternumber: this.userinfo.userfiles[i].f_meternumber,
362
+ f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
363
+ }
364
+ if (this.userinfo.userfiles[i].f_userfiles_id) {
365
+ data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
293
366
  }
294
- let res = await this.$resetpost('rs/logic/addInstallationDetails', {data:data}, {
367
+ let res = await this.$resetpost('rs/logic/meterbrandsNumberValidate', {data:data}, {
295
368
  resolveMsg: null,
296
- rejectMsg: '表具添加失败!!!'
369
+ rejectMsg: '表号验证失败!!'
297
370
  })
298
- this.$dispatch('breakControl', this.selectdata)
299
- },
300
- // 检查表号是否存在
301
- async meternumberValidate(i) {
302
- if (!this.userinfo.userfiles[i].f_gasbrand_id) {
371
+ if (res.data) {
303
372
  this.userinfo.userfiles[i].f_meternumber = ''
304
- this.$showAlert('请先选择气表品牌!!!', 'warning', 3000)
305
- return
373
+ this.$showAlert('表号已存在!!', 'warning', 3000)
306
374
  }
307
- if (this.userinfo.userfiles[i].f_gasbrand_id && this.userinfo.userfiles[i].f_meternumber) {
308
- let data = {
309
- f_meternumber: this.userinfo.userfiles[i].f_meternumber,
310
- f_gasbrand_id: this.userinfo.userfiles[i].f_gasbrand_id
311
- }
312
- if (this.userinfo.userfiles[i].f_userfiles_id) {
313
- data.f_userfiles_id = this.userinfo.userfiles[i].f_userfiles_id
314
- }
315
- let res = await this.$resetpost('rs/logic/meterbrandsNumberValidate', {data:data}, {
316
- resolveMsg: null,
317
- rejectMsg: '表号验证失败!!'
318
- })
319
- if (res.data) {
320
- this.userinfo.userfiles[i].f_meternumber = ''
321
- this.$showAlert('表号已存在!!', 'warning', 3000)
322
- }
323
- }
324
- },
325
- // 选择气表型号
326
- gasmodelChange(i) {
327
- if (this.userinfo.userfiles[i].gasmodel) {
328
- this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
329
- }
330
- },
331
- // 选择气表品牌
332
- gasbrandChange(i) {
333
- // 清空已保存的气表型号
334
- this.userinfo.userfiles[i].f_gasmodel_id = null
335
- this.userinfo.userfiles[i].gasmodel = null
375
+ }
376
+ },
377
+ // 选择气表型号
378
+ gasmodelChange(i) {
379
+ if (this.userinfo.userfiles[i].gasmodel) {
380
+ this.userinfo.userfiles[i].f_gasmodel_id = this.userinfo.userfiles[i].gasmodel.id
381
+ }
382
+ },
383
+ // 选择气表品牌
384
+ gasbrandChange(i) {
385
+ // 清空已保存的气表型号
386
+ this.userinfo.userfiles[i].f_gasmodel_id = null
387
+ this.userinfo.userfiles[i].gasmodel = null
336
388
 
337
- if (this.userinfo.userfiles[i].gasbrand) {
338
- // 气表品牌id
339
- this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
340
- // 气表分类
341
- this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
342
- }
343
- },
344
- // 打开安装明细
345
- async showUserFileModal (row) {
346
- this.useradders = row
389
+ if (this.userinfo.userfiles[i].gasbrand) {
390
+ // 气表品牌id
391
+ this.userinfo.userfiles[i].f_gasbrand_id = this.userinfo.userfiles[i].gasbrand.id
392
+ // 气表分类
393
+ this.userinfo.userfiles[i].f_meter_classify = this.userinfo.userfiles[i].gasbrand.f_meter_type
394
+ }
395
+ },
396
+ // 打开安装明细
397
+ async showUserFileModal (row) {
398
+ this.useradders = row
347
399
 
348
- let http = new HttpResetClass()
349
- let data = {
350
- condition: `f_userinfo_id = '${row.f_userinfo_id}'`
351
- }
352
- let res = await http.load('POST', 'rs/logic/getUserinfoAndUserfiles', {data:data}, {
353
- resolveMsg: null,
354
- rejectMsg: null
355
- })
400
+ let http = new HttpResetClass()
401
+ let data = {
402
+ condition: `f_userinfo_id = '${row.f_userinfo_id}'`
403
+ }
404
+ let res = await http.load('POST', 'rs/logic/getUserinfoAndUserfiles', {data:data}, {
405
+ resolveMsg: null,
406
+ rejectMsg: null
407
+ })
356
408
 
357
- this.userinfo = res.data
409
+ this.userinfo = res.data
358
410
 
359
- // 已有表具的 气表信息补充
360
- for (let i = 0; i < this.userinfo.userfiles.length; i++) {
361
- for (const item of this.meterbrands) {
362
- if (item.value.id === this.userinfo.userfiles[i].f_gasbrand_id) {
363
- // this.userinfo.userfiles[i].gasbrand = item.value // 防止双向绑定失败
364
- Vue.set(this.userinfo.userfiles[i], 'gasbrand', item.value)
365
- }
411
+ // 已有表具的 气表信息补充
412
+ for (let i = 0; i < this.userinfo.userfiles.length; i++) {
413
+ for (const item of this.meterbrands) {
414
+ if (item.value.id === this.userinfo.userfiles[i].f_gasbrand_id) {
415
+ // this.userinfo.userfiles[i].gasbrand = item.value // 防止双向绑定失败
416
+ Vue.set(this.userinfo.userfiles[i], 'gasbrand', item.value)
366
417
  }
367
- if (this.userinfo.userfiles[i].gasbrand) {
368
- for (const item of this.userinfo.userfiles[i].gasbrand.gasmodel) {
369
- if (item.value.id === this.userinfo.userfiles[i].f_gasmodel_id) {
370
- // this.userinfo.userfiles[i].gasmodel = item.value
371
- Vue.set(this.userinfo.userfiles[i], 'gasmodel', item.value)
372
- }
418
+ }
419
+ if (this.userinfo.userfiles[i].gasbrand) {
420
+ for (const item of this.userinfo.userfiles[i].gasbrand.gasmodel) {
421
+ if (item.value.id === this.userinfo.userfiles[i].f_gasmodel_id) {
422
+ // this.userinfo.userfiles[i].gasmodel = item.value
423
+ Vue.set(this.userinfo.userfiles[i], 'gasmodel', item.value)
373
424
  }
374
425
  }
375
426
  }
427
+ }
376
428
 
377
- this.showUserFile = true
378
- },
379
- // 获取气表品牌
380
- async getMeterbrands() {
381
- let http = new HttpResetClass()
382
- let data = {
383
- f_orgid: this.$login.f.orgid
384
- }
385
- let res = await http.load('POST', 'rs/logic/getMeterbrands', {data:data}, {
429
+ this.showUserFile = true
430
+ },
431
+ // 获取气表品牌
432
+ async getMeterbrands() {
433
+ let http = new HttpResetClass()
434
+ let data = {
435
+ f_orgid: this.$login.f.orgid
436
+ }
437
+ let res = await http.load('POST', 'rs/logic/getMeterbrands', {data:data}, {
438
+ resolveMsg: null,
439
+ rejectMsg: null
440
+ })
441
+ this.meterbrands = res.data
442
+ },
443
+ async notInstalled () {
444
+ let http = new HttpResetClass()
445
+ let data = {
446
+ condition: `ui.f_process_id = '${this.selectdata.f_process_id}' and uf.f_table_state = '待开通'`
447
+ }
448
+ let res = await http.load(
449
+ 'POST',
450
+ 'rs/sql/countApplyUserinfo',
451
+ {data: data},
452
+ {
386
453
  resolveMsg: null,
387
- rejectMsg: null
454
+ rejectMsg: '安装数量查询失败!!!'
388
455
  })
389
- this.meterbrands = res.data
390
- },
391
- async notInstalled () {
392
- let http = new HttpResetClass()
393
- let data = {
394
- condition: `ui.f_process_id = '${this.selectdata.f_process_id}' and uf.f_table_state = '待开通'`
395
- }
396
- let res = await http.load(
397
- 'POST',
398
- 'rs/sql/countApplyUserinfo',
399
- {data: data},
400
- {
401
- resolveMsg: null,
402
- rejectMsg: '安装数量查询失败!!!'
403
- })
404
456
 
405
- for (const item of this.selectdata.fields) {
406
- if (item.label === '已安装户数') {
407
- item.value = this.selectdata.f_apply_count - res.data[0].num
408
- }
409
- if (item.label === '未安装户数') {
410
- item.value = res.data[0].num
411
- }
457
+ for (const item of this.selectdata.fields) {
458
+ if (item.label === '已安装户数') {
459
+ item.value = this.selectdata.f_apply_count - res.data[0].num
412
460
  }
413
- },
414
- searchCondition (args) {
415
-
416
- if (this.selectdata.f_apply_type === '团购转散户' || this.selectdata.f_apply_type === '改管报建' || this.selectdata.f_apply_type === '增容报建') {
417
- args.condition = args.condition + `and ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
418
- } else {
419
- args.condition = args.condition + `and ua.f_process_id = '${this.selectdata.f_process_id}'`
461
+ if (item.label === '未安装户数') {
462
+ item.value = res.data[0].num
420
463
  }
421
-
422
- this.model.search(args.condition, args.model)
423
- },
424
- // 查询
425
- async search () {
426
- this.$refs.cp.$refs.cri.search()
427
- },
428
- // 关闭安装明细
429
- closeUserFile() {
430
- this.showUserFile = false
431
- this.useradders = null
432
- this.userinfo = {}
433
- this.search()
434
- },
435
- // 关闭文件上传对话框
436
- closeFile() {
437
- this.showFile = false
438
- // 将选的文件清空
439
- this.$refs.file.$el.querySelector('input').value = ''
440
- this.search()
441
464
  }
442
465
  },
443
- events: {
444
- async 'onFileUpload'(file, result) {
445
- let data = {
446
- selectdata: this.selectdata,
447
- filepath: result.f_downloadpath,
448
- user: this.$login.f
449
- }
450
- let res = await this.$resetpost(`rs/logic/importAddInstallationDetails`, {data:data}, {resolveMsg: null, rejectMsg: '导入失败!!!', silent: true}, 0)
466
+ searchCondition (args) {
451
467
 
452
- this.$dispatch('breakControl', this.selectdata)
468
+ if (this.selectdata.f_apply_type === '团购转散户' || this.selectdata.f_apply_type === '改管报建' || this.selectdata.f_apply_type === '增容报建') {
469
+ args.condition = args.condition + `and ui.f_userinfo_id = '${this.selectdata.f_userinfo_id}'`
470
+ } else {
471
+ args.condition = args.condition + `and ua.f_process_id = '${this.selectdata.f_process_id}'`
453
472
  }
473
+
474
+ this.model.search(args.condition, args.model)
454
475
  },
455
- computed: {
456
- pager () {
457
- return this.selectdata.f_apply_type === '团购报建'
458
- },
459
- getCondition () {
460
- let condition = `ua.f_process_id = '${this.selectdata.f_process_id}' and nvl(uf.quantity, 0) < 1`
476
+ // 查询
477
+ async search () {
478
+ this.$refs.cp.$refs.cri.search()
479
+ },
480
+ // 关闭安装明细
481
+ closeUserFile() {
482
+ this.showUserFile = false
483
+ this.useradders = null
484
+ this.userinfo = {}
485
+ this.search()
486
+ },
487
+ // 关闭文件上传对话框
488
+ closeFile() {
489
+ this.showWork = false
490
+ this.showFile = false
491
+ // 将选的文件清空
492
+ this.$refs.file.$el.querySelector('input').value = ''
493
+ this.search()
494
+ }
495
+ },
496
+ events: {
497
+ 'beforeFileUpload' (file) {
498
+ this.showWork = true
499
+ },
500
+ async 'onFileUpload'(file, result) {
501
+ let data = {
502
+ selectdata: this.selectdata,
503
+ filepath: result.f_downloadpath,
504
+ user: this.$login.f
505
+ }
506
+ try {
507
+ let res = await this.$resetpost(`rs/logic/importAddInstallationDetails`, {data: data}, {
508
+ resolveMsg: null,
509
+ rejectMsg: '导入失败!!!',
510
+ silent: true
511
+ }, 0)
512
+ } catch (e) {
513
+ this.closeFile()
514
+ }
515
+ this.$dispatch('breakControl', this.selectdata)
516
+ }
517
+ },
518
+ computed: {
519
+ pager () {
520
+ return this.selectdata.f_apply_type === '团购报建'
521
+ },
522
+ getCondition () {
523
+ let condition = `ua.f_process_id = '${this.selectdata.f_process_id}' and nvl(uf.quantity, 0) < 1`
461
524
 
462
- return {
463
- condition: condition
525
+ return {
526
+ condition: condition
527
+ }
528
+ },
529
+ // 安装人
530
+ installperson() {
531
+ return function (f_install_person) {
532
+ if (isEmpty(f_install_person)) {
533
+ return this.$login.f.name
464
534
  }
465
- },
466
- // 安装人
467
- installperson() {
468
- return this.$login.f.f_installman.map(item => {
469
- return {
470
- label: item.name,
471
- value: item.name
472
- }
473
- })
474
- },
475
- // 表向
476
- aroundmeters() {
477
- return this.$appdata.getParam('左右表')
478
- },
479
- // 安装位置
480
- positions() {
481
- return this.$appdata.getParam('安装位置')
535
+ return f_install_person
482
536
  }
483
537
  },
484
- watch: {
538
+ installdate() {
539
+ return function (f_install_date) {
540
+ if (isEmpty(f_install_date)) {
541
+ return new Date().Format('yyyy-MM-dd HH:mm:ss')
542
+ }
543
+ return f_install_date
544
+ }
545
+ },
546
+ // 表向
547
+ aroundmeters() {
548
+ return this.$appdata.getParam('左右表')
549
+ },
550
+ // 安装位置
551
+ positions() {
552
+ return this.$appdata.getParam('安装位置')
485
553
  }
554
+ },
555
+ watch: {
486
556
  }
557
+ }
487
558
  </script>
488
559
  <style scoped>
489
560
  .head-but{
@@ -501,4 +572,21 @@
501
572
  .clearfix:after{
502
573
  clear: both;
503
574
  }
575
+ .input_view{
576
+ padding: 8px;
577
+ background-color: #ffffff;
578
+ border-radius: 2px;
579
+ border: solid 1px #c7c7c7!important;
580
+ color: #333333!important;
581
+ font-size: 15px!important;
582
+ }
583
+
584
+ .input_view[readonly]{
585
+ border: 1px solid #DDD!important;
586
+ color:#ACA899!important;
587
+ }
588
+ .input_view:disabled{
589
+ border: 1px solid #DDD!important;
590
+ color:#ACA899!important;
591
+ }
504
592
  </style>