sale-client 3.6.496 → 3.6.498

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sale-client",
3
- "version": "3.6.496",
3
+ "version": "3.6.498",
4
4
  "description": "收费模块前台组件",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -2,7 +2,7 @@
2
2
  <div>
3
3
  <button @click="handleClick">渲染</button>
4
4
  <button @click="savePaper">保存</button>
5
- <iframe v-if="showSketchPage" :src="sketchPageSrc" id="aaaa2" style="width: 100%; height: 500px;"></iframe>
5
+ <iframe v-if="showSketchPage" :src="sketchPageSrc" id="aaaa2" style="width: 100%; height: 1050px;"></iframe>
6
6
  </div>
7
7
  </template>
8
8
 
@@ -144,7 +144,7 @@
144
144
  </button>
145
145
  </footer>
146
146
  </modal>
147
- <modal :show.sync="showModal" backdrop="false" :width="1000" v-if="paperButton">
147
+ <modal :show.sync="showModal" backdrop="false" :width="2300" v-if="paperButton">
148
148
  <div slot="modal-header" class="modal-header">
149
149
  <h4 class="modal-title">
150
150
  图纸编辑
@@ -21,8 +21,7 @@
21
21
  v-if="getConfigShowItem('f_defendcard',false)">
22
22
  <label class="font_normal_body">防盗卡号1</label>
23
23
  <input type="text" class="input_search" style="width:60%" v-model="row.f_defendcard"
24
- v-validate:f_defendcard=getConfigValidate("f_defendcard",false)
25
- :value.sync="row.f_defendcard"
24
+ v-validate:f_defendcard="getConfigValidate('f_defendcard',false)"
26
25
  placeholder='防盗卡号1' >
27
26
  </div>
28
27
  <div class="col-sm-4 form-group" :class="[$m.f_defendcard_two.required ? 'has-error' : '']"
@@ -30,8 +29,7 @@
30
29
  v-if="getConfigShowItem('f_defendcard_two',false)">
31
30
  <label class="font_normal_body">防盗卡号2</label>
32
31
  <input type="text" class="input_search" style="width:60%" v-model="row.f_defendcard_two"
33
- v-validate:f_defendcard_two=getConfigValidate("f_defendcard_two",false)
34
- :value.sync="row.f_defendcard_two"
32
+ v-validate:f_defendcard_two="getConfigValidate('f_defendcard_two',false)"
35
33
  placeholder='防盗卡号2' >
36
34
  </div>
37
35
  <div class="col-sm-4 form-group" v-if="getConfigShowItem('f_meter_base')"
@@ -147,7 +145,7 @@
147
145
  v-show="(formconfig && formconfig.f_aroundmeter && formconfig.f_aroundmeter.required) || !onlyshowmust"
148
146
  v-if="getConfigShowItem('f_aroundmeter')">
149
147
  <input type="text" v-show="false" v-model="row.f_aroundmeter"
150
- v-validate:f_aroundmeter=getConfigValidate("f_aroundmeter",false)>
148
+ v-validate:f_aroundmeter="getConfigValidate('f_aroundmeter',false)">
151
149
  <label for="gasmodel" class="font_normal_body w2" style="width: auto;letter-spacing: 2em;margin-right: -2em;margin-left: -2em;">&ensp;{{getConfigLabelName('f_aroundmeter','表向')}}</label>
152
150
  <v-select :value.sync="row.f_aroundmeter" :options='aroundmeters'
153
151
  :placeholder="getConfigPlaceholder('f_aroundmeter','表向')"
@@ -160,19 +158,18 @@
160
158
  <label for="f_gas_person" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em"
161
159
  class="font_normal_body">&ensp;{{getConfigLabelName('f_gas_person','通气人')}}</label>
162
160
  <input type="text" class="input_search" style="width:60%" v-model="row.f_gas_person"
163
- v-validate:f_gas_person=getConfigValidate("f_gas_person",false)
164
- placeholder='通气人'></input>
161
+ v-validate:f_gas_person="getConfigValidate('f_gas_person',false)"
162
+ placeholder='通气人'>
165
163
  </div>
166
164
  <div class="col-sm-4 form-group" :class="[$m.f_gas_date.required ? 'has-error' : '']"
167
165
  v-show="(formconfig && formconfig.f_gas_date && formconfig.f_gas_date.required) || !onlyshowmust"
168
166
  v-if="getConfigShowItem('f_gas_date')">
169
167
  <input type="text" v-model="$refs.f_gas_date.value" v-show="false"
170
- v-validate:f_gas_date=getConfigValidate("f_gas_date",false)>
168
+ v-validate:f_gas_date="getConfigValidate('f_gas_date',false)">
171
169
  <label for="f_gas_date" class="font_normal_body">&ensp;{{getConfigLabelName('f_gas_date','通气日期')}}</label>
172
170
  <datepicker style="width:60%" placeholder="通气日期"
173
171
  v-model="row.f_gas_date"
174
172
  v-ref:f_gas_date
175
- :value.sync="row.f_gas_date"
176
173
  :format="'yyyy-MM-dd HH:mm:ss'"
177
174
  ></datepicker>
178
175
  </div>
@@ -182,16 +179,16 @@
182
179
  v-if="getConfigShowItem('f_gas_date')">
183
180
  <label for="f_position" class="font_normal_body" title="参数:安装位置">&ensp;{{getConfigLabelName('f_position','安装位置')}}</label>
184
181
  <input type="text" v-model="row.f_position" v-show="false"
185
- v-validate:f_position=getConfigValidate("f_position",false)>
182
+ v-validate:f_position="getConfigValidate('f_position',false)">
186
183
  <v-select :value.sync="row.f_position" v-model="row.f_position"
187
184
  :options='positions' placeholder='安装位置'
188
185
  close-on-select></v-select>
189
186
  </div>
190
187
  <div class="col-sm-4 form-group" v-show="false">
191
188
  <label for="f_remanent_gas" class="font_normal_body">剩余气量</label>
192
- <input type="number" class="input_search" style="width:60%" style="width:60%" v-model="row.f_remanent_gas"
189
+ <input type="number" class="input_search" style="width:60%" v-model="row.f_remanent_gas"
193
190
  placeholder='剩余气量'
194
- :disabled="f_userinfo_id"></input>
191
+ :disabled="f_userinfo_id">
195
192
  <!--<button type="button" name="button" class="btn btn-link" @click="modefiy('f_remanent_gas')" v-if="f_userinfo_id">修改</button>-->
196
193
  </div>
197
194
  <div class="col-sm-4 form-group" :class="[$m.f_install_person.required ? 'has-error' : '']"
@@ -199,7 +196,7 @@
199
196
  v-if="getConfigShowItem('f_install_person')">
200
197
  <label for="f_install_person" class="font_normal_body" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em">&ensp;{{getConfigLabelName('f_install_person','安装人')}}</label>
201
198
  <input type="text" v-model="row.f_install_person" v-show="false"
202
- v-validate:f_install_person=getConfigValidate("f_install_person",false)>
199
+ v-validate:f_install_person="getConfigValidate('f_install_person',false)">
203
200
  <v-select :value.sync="row.f_install_person" v-model="row.f_install_person"
204
201
  :options='installperson' placeholder='安装人'
205
202
  close-on-select></v-select>
@@ -209,10 +206,9 @@
209
206
  v-if="getConfigShowItem('f_subscribe_date')">
210
207
  <label for="f_subscribe_date" class="font_normal_body">&ensp;{{getConfigLabelName('f_subscribe_date','预约时间')}}</label>
211
208
  <input type="text" v-model="row.f_subscribe_date" v-show="false"
212
- v-validate:f_subscribe_date=getConfigValidate("f_subscribe_date",false)>
209
+ v-validate:f_subscribe_date="getConfigValidate('f_subscribe_date',false)">
213
210
  <datepicker style="width:60%" placeholder="预约通气时间"
214
211
  v-model="row.f_subscribe_date"
215
- :value.sync="row.f_subscribe_date"
216
212
  :format="'yyyy-MM-dd HH:mm:ss'"
217
213
  ></datepicker>
218
214
  </div>
@@ -220,7 +216,7 @@
220
216
  v-if="getConfigShowItem('f_meter_book_num')">
221
217
  <label for="f_position" class="font_normal_body" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em">&ensp;{{getConfigLabelName('f_meter_book_num','抄表册')}}</label>
222
218
  <input type="text" v-model="row.f_meter_book_num" v-show="false"
223
- v-validate:f_meter_book_num=getConfigValidate("f_meter_book_num",false)>
219
+ v-validate:f_meter_book_num="getConfigValidate('f_meter_book_num',false)">
224
220
  <v-select :value.sync="row.f_meter_book_num" v-model="row.f_meter_book_num"
225
221
  :options='meterbookoptions' placeholder='抄表册'
226
222
  close-on-select></v-select>
@@ -229,14 +225,12 @@
229
225
  v-show="(formconfig && formconfig.f_install_date && formconfig.f_install_date.required) || !onlyshowmust"
230
226
  v-if="getConfigShowItem('f_install_date')">
231
227
  <input type="text" v-model="row.f_install_date" v-show="false"
232
- v-validate:f_install_date=getConfigValidate("f_install_date",false)>
228
+ v-validate:f_install_date="getConfigValidate('f_install_date',false)">
233
229
  <label for="f_install_date" class="font_normal_body">&ensp;{{getConfigLabelName('f_install_date','安装日期')}}</label>
234
230
  <datepicker style="width:60%" id="startDate" placeholder="安装日期" width='100%'
235
231
  v-model="row.f_install_date"
236
- :value.sync="row.f_install_date"
237
- class="datepicker"
238
- v-ref:f_install_date
239
232
  :format="'yyyy-MM-dd HH:mm:ss'"
233
+ v-ref:f_install_date
240
234
  :show-reset-button="true">
241
235
  </datepicker>
242
236
  </div>
@@ -245,7 +239,7 @@
245
239
  v-if="getConfigShowItem('f_adjustable')">
246
240
  <label for="f_adjustable" class="font_normal_body" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em">&ensp;{{getConfigLabelName('f_adjustable','调压箱')}}</label>
247
241
  <input type="text" v-model="row.f_adjustable" v-show="false"
248
- v-validate:f_adjustable=getConfigValidate("f_adjustable",false)>
242
+ v-validate:f_adjustable="getConfigValidate('f_adjustable',false)">
249
243
  <v-select :value.sync="row.f_adjustable" :options='adjustables' placeholder='调压箱' close-on-select
250
244
  v-model='row.f_adjustable' :search='true'></v-select>
251
245
  </div>
@@ -254,11 +248,9 @@
254
248
  v-if="getConfigShowItem('f_hand_date')">
255
249
  <label for="f_hand_date" class="font_normal_body">&ensp;{{getConfigLabelName('f_hand_date','上次抄表')}}</label>
256
250
  <input type="text" v-model="row.f_hand_date" v-show="false"
257
- v-validate:f_hand_date=getConfigValidate("f_hand_date",false)>
251
+ v-validate:f_hand_date="getConfigValidate('f_hand_date',false)">
258
252
  <datepicker style="width:60%" id="f_hand_date" placeholder="上次抄表日期"
259
253
  v-model="row.f_hand_date"
260
- :value.sync="row.f_hand_date"
261
- class="datepicker"
262
254
  :format="'yyyy-MM-dd HH:mm:ss'"
263
255
  :show-reset-button="true">
264
256
  </datepicker>
@@ -268,8 +260,7 @@
268
260
  v-if="getConfigShowItem('f_price_ratio')">
269
261
  <label for="f_ratio" class="font_normal_body" style="width: auto;letter-spacing: 2em;margin-right: -2em;margin-left: -2em">&ensp;{{getConfigLabelName('f_price_ratio','比率')}}</label>
270
262
  <input type="number" class="input_search" style="width:60%" v-model="row.f_price_ratio"
271
- :value.sync="row.f_price_ratio"
272
- v-validate:f_price_ratio=getConfigValidate("f_price_ratio",false)
263
+ v-validate:f_price_ratio="getConfigValidate('f_price_ratio',false)"
273
264
  placeholder='比率'>
274
265
  </div>
275
266
  <div class="col-sm-4 form-group" :class="[$m.f_scrap_date.required ? 'has-error' : '']"
@@ -277,11 +268,9 @@
277
268
  v-if="getConfigShowItem('f_scrap_date')">
278
269
  <label for="f_scrap_date" class="font_normal_body">&ensp;{{getConfigLabelName('f_scrap_date','报废日期')}}</label>
279
270
  <input type="text" v-model="row.f_scrap_date" v-show="false"
280
- v-validate:f_scrap_date=getConfigValidate("f_scrap_date",false)>
271
+ v-validate:f_scrap_date="getConfigValidate('f_scrap_date',false)">
281
272
  <datepicker style="width:60%" id="ScrapDate" placeholder="报废日期" width='100%'
282
273
  v-model="row.f_scrap_date"
283
- :value.sync="row.f_scrap_date"
284
- class="datepicker"
285
274
  :format="'yyyy-MM-dd'"
286
275
  :show-reset-button="true">
287
276
  </datepicker>
@@ -296,7 +285,7 @@
296
285
  v-if="getConfigShowItem('f_garbage_fee')">
297
286
  <label for="gasmodel" class="font_normal_body" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em">&ensp;{{getConfigLabelName('f_garbage_fee','垃圾费')}}</label>
298
287
  <input type="text" v-model="row.f_garbage_fee" v-show="false"
299
- v-validate:f_garbage_fee=getConfigValidate("f_garbage_fee",false)>
288
+ v-validate:f_garbage_fee="getConfigValidate('f_garbage_fee',false)">
300
289
  <v-select :value.sync="row.f_garbage_fee" :options='garbagefee' placeholder='垃圾费' close-on-select
301
290
  :value-single="true"
302
291
  v-model='row.f_garbage_fee'></v-select>
@@ -306,7 +295,7 @@
306
295
  v-if="getConfigShowItem('f_inputtor')">
307
296
  <label class="font_normal_body" style="width: auto;letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em">&ensp;{{getConfigLabelName('f_inputtor','抄表员')}}</label>
308
297
  <input type="text" v-model="row.f_inputtor" v-show="false"
309
- v-validate:f_inputtor=getConfigValidate("f_inputtor",false)>
298
+ v-validate:f_inputtor="getConfigValidate('f_inputtor',false)">
310
299
  <v-select :value.sync="row.f_inputtor" v-model='row.f_inputtor'
311
300
  style="width:60%"
312
301
  :options='inputtores' placeholder='抄表员'
@@ -318,7 +307,7 @@
318
307
  v-if="getConfigShowItem('f_usetype')">
319
308
  <label for="f_usetype" class="font_normal_body" title="参数:使用类型">&ensp;{{getConfigLabelName('f_usetype','使用类型')}}</label>
320
309
  <input type="text" v-model="row.f_usetype" v-show="false"
321
- v-validate:f_usetype=getConfigValidate("f_usetype",false)>
310
+ v-validate:f_usetype="getConfigValidate('f_usetype',false)">
322
311
  <v-select :value.sync="row.f_usetype" v-model="row.f_usetype"
323
312
  :options='usetype' placeholder='使用类型'
324
313
  close-on-select></v-select>
@@ -328,7 +317,7 @@
328
317
  v-if="getConfigShowItem('f_usestate')">
329
318
  <label for="f_position" class="font_normal_body" title="参数:使用状态">&ensp;{{getConfigLabelName('f_usestate','使用状态')}}</label>
330
319
  <input type="text" v-model="row.f_usestate" v-show="false"
331
- v-validate:f_usestate=getConfigValidate("f_usestate",false)>
320
+ v-validate:f_usestate="getConfigValidate('f_usestate',false)">
332
321
  <v-select :value.sync="row.f_usestate" v-model="row.f_usestate"
333
322
  :options='usestate' placeholder='使用状态'
334
323
  close-on-select></v-select>
@@ -339,8 +328,8 @@
339
328
  <label for="f_userfiles_address"
340
329
  class="font_normal_body">&ensp;{{getConfigLabelName('f_userfiles_address','安装地址')}}</label>
341
330
  <input type="text" class="input_search" style="width:80%" v-model="row.f_userfiles_address"
342
- v-validate:f_userfiles_address=getConfigValidate("f_userfiles_address",false)
343
- placeholder='安装地址'></input>
331
+ v-validate:f_userfiles_address="getConfigValidate('f_userfiles_address',false)"
332
+ placeholder='安装地址'>
344
333
  </div>
345
334
  <div class="col-sm-4 form-group" :class="[$m.f_alarm_code.required ? 'has-error' : '']"
346
335
  v-show="(formconfig && formconfig.f_alarm_code && formconfig.f_alarm_code.required) || !onlyshowmust"
@@ -348,15 +337,15 @@
348
337
  <label for="f_alarm_code"
349
338
  class="font_normal_body">&ensp;{{getConfigLabelName('f_alarm_code','报警器编码')}}</label>
350
339
  <input type="text" class="input_search" style="width:60%" v-model="row.f_alarm_code"
351
- v-validate:f_alarm_code=getConfigValidate("f_alarm_code",false)
352
- placeholder='报警器编码'></input>
340
+ v-validate:f_alarm_code="getConfigValidate('f_alarm_code',false)"
341
+ placeholder='报警器编码'>
353
342
  </div>
354
343
  <div class="col-sm-4 form-group" :class="[$m.f_force_measure.required ? 'has-error' : '']"
355
344
  v-show="(formconfig && formconfig.f_force_measure && formconfig.f_force_measure.required) || !onlyshowmust"
356
345
  v-if="getConfigShowItem('f_force_measure',false)">
357
346
  <label class="font_normal_body">{{getConfigLabelName('f_force_measure','三项强制措施')}}</label>
358
347
  <input type="text" v-model="$refs.measure.selectedItems" v-show="false"
359
- v-validate:f_force_measure=getConfigValidate("f_force_measure",false)>
348
+ v-validate:f_force_measure="getConfigValidate('f_force_measure',false)">
360
349
  <v-select :value.sync="row.f_force_measure" v-model="row.f_force_measure"
361
350
  :options='forceMeasure' placeholder='三项强制措施' :multiple="true"
362
351
  v-ref:measure>
@@ -658,7 +647,7 @@ let meterBookGen = function * (self) {
658
647
  }
659
648
  },
660
649
  'row.f_user_type' (val) {
661
- if (val.length === 1) {
650
+ if (val && val.length === 1) {
662
651
  if (val[0] === '非民用') {
663
652
  this.showindustry = true
664
653
  } else {
@@ -14,7 +14,7 @@
14
14
  :class="[$v.f_user_phone.minlength || $v.f_user_phone.maxlength ? 'has-error' : '']" v-if="getConfigShowItem('f_user_phone')">
15
15
  <label for="f_user_phone" class="font_normal_body">*{{getConfigLabelName('f_user_phone','客户电话')}}</label>
16
16
  <input type="text" maxlength="11" v-model="baseinfo.base.f_user_phone"
17
- v-validate:f_user_phone=getConfigValidate("f_user_phone") class="input_search" style="width:60%"
17
+ v-validate:f_user_phone="getConfigValidate('f_user_phone')" class="input_search" style="width:60%"
18
18
  :placeholder="getConfigPlaceholder('f_user_phone','客户电话')"
19
19
  v-el:phone v-next-el="area">
20
20
  </div>
@@ -30,23 +30,27 @@
30
30
  <div class="row">
31
31
  <div style="" class="col-sm-4 form-group">
32
32
  <label for="f_credentials" class="font_normal_body">&ensp;证件类型</label>
33
- <v-select id="idCardType" :value.sync="baseinfo.base.f_credentials"
33
+ <v-select id="idCardType"
34
+ :value.sync="baseinfo.base.f_credentials"
34
35
  v-model="baseinfo.base.f_credentials"
35
36
  :value-single="true"
36
- :options='credentials' placeholder='证件类型'
37
+ :options='credentials'
38
+ placeholder='证件类型'
37
39
  style="width: 65%"
38
40
  close-on-select></v-select>
39
41
  </div>
40
42
  <div style="" class="col-sm-8 form-group"
41
- :class="[$v.f_idnumber2.identityCardValid ? 'has-error' : '']"
42
- v-if="(baseinfo.base.f_credentials === '身份证'|| baseinfo.base.f_credentials[0] === '身份证') && config.f_idnumber ">
43
+ key="身份证号码"
44
+ :class="[$v.f_idnumber.identityCardValid ? 'has-error' : '']"
45
+ v-if="baseinfo.base.f_credentials.includes('身份证')">
43
46
  <label for="f_idnumber" class="font_normal_body color-red">*证件号码</label>
44
47
  <input type="text" maxlength="18" v-model="baseinfo.base.f_idnumber"
45
- v-validate:f_idnumber2='{identityCardValid: true}' class="input_search" style="width:80%"
48
+ v-validate:f_idnumber='{identityCardValid: true}' class="input_search" style="width:80%"
46
49
  placeholder="证件号码">
47
50
  </div>
48
51
  <div style="" class="col-sm-8 form-group"
49
- v-if="(baseinfo.base.f_credentials !== '身份证'&&baseinfo.base.f_credentials[0] !== '身份证') || !config.f_idnumber ">
52
+ key="证件号码"
53
+ v-else>
50
54
  <label class="font_normal_body">&ensp;证件号码</label>
51
55
  <input type="text" v-model="baseinfo.base.f_idnumber" class="input_search" style="width:80%"
52
56
  placeholder="证件号码">
@@ -55,7 +59,7 @@
55
59
  <div class="row">
56
60
  <div class="col-sm-12 form-group" :class="[$v.f_address.required ? 'has-error' : '']">
57
61
  <label for="f_address" class="font_normal_body">*地址信息</label>
58
- <input type="text" v-model="addressinfo.f_address" :value.sync="addressinfo.f_address" v-validate:f_address='{required: true }'
62
+ <input type="text" v-model="addressinfo.f_address" v-validate:f_address="{required: true}"
59
63
  class="input_search" disabled="disabled" style="width:75%;" placeholder="用户地址" >
60
64
  <span>
61
65
  <button class="button_search button_spacing" type="button" style="width: max-content" v-if="!isedit" @click="selectaddress()">选择地址</button>
@@ -71,7 +75,7 @@
71
75
  class="col-sm-4 form-group" v-if="getConfigShowItem('f_used_name')">
72
76
  <label style="letter-spacing: 0.5em;margin-right: -0.5em;margin-left: -0.5em" for="f_used_name" class="font_normal_body w3">&ensp;{{getConfigLabelName('f_used_name','曾用名')}}</label>
73
77
  <input type="text" v-model="baseinfo.base.f_used_name" class="input_search" style="width:60%"
74
- v-validate:f_used_name=getConfigValidate("f_used_name",false)
78
+ v-validate:f_used_name="getConfigValidate('f_used_name',false)"
75
79
  :placeholder="getConfigPlaceholder('f_used_name','曾用名')">
76
80
  </div>
77
81
  <div style="" class="col-sm-4 form-group"
@@ -79,7 +83,7 @@
79
83
  :class="[$v.f_rent_phone.required ? 'has-error' : '']" v-if="getConfigShowItem('f_rent_phone')">
80
84
  <label for="f_rent_phone" class="font_normal_body">&ensp;备用电话</label>
81
85
  <input type="text" v-model="baseinfo.base.f_rent_phone" class="input_search" style="width:60%"
82
- v-validate:f_rent_phone=getConfigValidate("f_rent_phone",false)
86
+ v-validate:f_rent_phone="getConfigValidate('f_rent_phone',false)"
83
87
  placeholder="备用电话">
84
88
  </div>
85
89
  <div class="col-sm-4 form-group"
@@ -106,7 +110,7 @@
106
110
  class="col-sm-4 form-group" v-if="getConfigShowItem('f_balance')">
107
111
  <label for="f_balance" class="font_normal_body">&ensp;{{getConfigLabelName('f_balance','用户余额')}}</label>
108
112
  <input type="text" v-model="baseinfo.base.f_balance" class="input_search" style="width:60%"
109
- v-validate:f_balance=getConfigValidate("f_balance",false)
113
+ v-validate:f_balance="getConfigValidate('f_balance',false)"
110
114
  :placeholder="getConfigPlaceholder('f_balance','用户余额')"
111
115
  :disabled="!jurisdiction.includes('档案信息查询修改')">
112
116
  </div>
@@ -115,7 +119,7 @@
115
119
  :class="[$v.f_is_mgq.required ? 'has-error' : '']">
116
120
  <label for="f_is_mgq" style="letter-spacing: 0.5em;margin-right: -0.5em" class="font_normal_body w3">{{getConfigLabelName('f_is_mgq','煤改气')}}</label>
117
121
  <input type="text" v-show="false" v-model="baseinfo.base.f_is_mgq"
118
- v-validate:f_is_mgq=getConfigValidate("f_is_mgq",false)>
122
+ v-validate:f_is_mgq="getConfigValidate('f_is_mgq',false)">
119
123
  <v-select id="f_is_mgq" :value.sync="baseinfo.base.f_is_mgq" v-model="baseinfo.base.f_is_mgq"
120
124
  :placeholder="getConfigPlaceholder('f_is_mgq','是否煤改气')"
121
125
  :options='mgq' style="width: 65%" close-on-select></v-select>
@@ -125,7 +129,7 @@
125
129
  :class="[$v.f_book_no.required ? 'has-error' : '']">
126
130
  <label for="f_contract" class="font_normal_body">&ensp;{{getConfigLabelName('f_book_no','燃气本号')}}</label>
127
131
  <input type="text" v-model="baseinfo.base.f_book_no" class="input_search" style="width:60%"
128
- v-validate:f_book_no=getConfigValidate("f_book_no",false)
132
+ v-validate:f_book_no="getConfigValidate('f_book_no',false)"
129
133
  :placeholder="getConfigPlaceholder('f_book_no','用户证号')">
130
134
  </div>
131
135
  </div>
@@ -135,7 +139,7 @@
135
139
  :class="[$v.f_rent_name.required ? 'has-error' : '']">
136
140
  <label for="f_rent_name" class="font_normal_body">&ensp;{{getConfigLabelName('f_rent_name','租户姓名')}}</label>
137
141
  <input type="text" v-model="baseinfo.base.f_rent_name" class="input_search" style="width:60%"
138
- v-validate:f_rent_name=getConfigValidate("f_rent_name",false)
142
+ v-validate:f_rent_name="getConfigValidate('f_rent_name',false)"
139
143
  :placeholder="getConfigPlaceholder('f_rent_name','租户姓名')">
140
144
  </div>
141
145
  <div style="" class="col-sm-4 form-group" v-if="getConfigShowItem('f_zuhu_phone')"
@@ -143,7 +147,7 @@
143
147
  :class="[$v.f_zuhu_phone.required ? 'has-error' : '']">
144
148
  <label for="f_zuhu_phone" class="font_normal_body">{{getConfigLabelName('f_zuhu_phone','租户电话')}}</label>
145
149
  <input type="text" v-model="baseinfo.base.f_zuhu_phone" class="input_search" style="width:60%"
146
- v-validate:f_zuhu_phone=getConfigValidate("f_zuhu_phone",false)
150
+ v-validate:f_zuhu_phone="getConfigValidate('f_zuhu_phone',false)"
147
151
  :placeholder="getConfigPlaceholder('f_zuhu_phone','租户电话')">
148
152
  </div>
149
153
  <div style="" class="col-sm-4 form-group"
@@ -161,21 +165,15 @@
161
165
  :class="[$v.f_contract_id.required ? 'has-error' : '']">
162
166
  <label for="f_contract" class="font_normal_body">&ensp;{{getConfigLabelName('f_contract_id','合同编号')}}</label>
163
167
  <input type="text" v-model="baseinfo.base.f_contract_id" class="input_search" style="width:80%"
164
- v-validate:f_contract_id=getConfigValidate("f_contract_id",false)
168
+ v-validate:f_contract_id="getConfigValidate('f_contract_id',false)"
165
169
  :placeholder="getConfigPlaceholder('f_contract_id','合同编号')">
166
170
  </div>
167
- <!--<div style="" class="col-sm-4 form-group">-->
168
- <!--<label for="f_print_lc" class="font_normal_body ">&ensp;打印状态</label>-->
169
- <!--<v-select id="f_print_lc" :value.sync="baseinfo.base.f_print_lc" v-model="baseinfo.base.f_print_lc"-->
170
- <!--:value-single="true" :disabled="!jurisdiction.includes('档案信息查询修改')"-->
171
- <!--:options='mgq' placeholder='是否打印' style="width: 65%" close-on-select></v-select>-->
172
- <!--</div>-->
173
171
  <div class="col-sm-4 form-group"
174
172
  v-show="(formconfig && formconfig.f_contract_id && formconfig.f_contract_id.required) || !onlyshowmust"
175
173
  :class="[$v.f_contract_id.required ? 'has-error' : '']">
176
174
  <label for="f_print_dh" class="font_normal_body ">&ensp;{{getConfigLabelName('f_print_dh','打印类别')}}</label>
177
175
  <input type="text" v-show="false" v-model="baseinfo.base.f_print_dh"
178
- v-validate:f_print_dh=getConfigValidate("f_print_dh",false)>
176
+ v-validate:f_print_dh="getConfigValidate('f_print_dh',false)">
179
177
  <v-select id="f_print_dh" :value.sync="baseinfo.base.f_print_dh" v-model="baseinfo.base.f_print_dh"
180
178
  :value-single="true" :disabled="baseinfo.base.f_print_dh_stats" :search="false"
181
179
  :options='printstate' placeholder='流程单 | 点火单' style="width: 65%" close-on-select></v-select>
@@ -190,15 +188,19 @@
190
188
  <label for="f_paper_accoun" style="letter-spacing: 2em;margin-right: -2em;margin-left: -2em" class="font_normal_body w2">&ensp;{{getConfigLabelName('f_comments','备注')}}</label>
191
189
  <input class="input_search" style="width:86.5%;height: 40px" v-model="baseinfo.base.f_comments"
192
190
  :placeholder="getConfigPlaceholder('f_comments','请输入备注信息')"
193
- v-validate:f_comments=getConfigValidate("f_comments",false)>
191
+ v-validate:f_comments="getConfigValidate('f_comments',false)">
194
192
  </div>
195
- <div class="col-sm-4 form-group" v-if="getConfigShowItem('f_house_type')"
196
- v-show="(formconfig && formconfig.f_house_type && formconfig.f_house_type.required) || !onlyshowmust"
193
+
194
+ <div class="col-sm-4 form-group"
195
+ v-show="((formconfig && formconfig.f_house_type && formconfig.f_house_type.required) || !onlyshowmust) && getConfigShowItem('f_house_type')"
197
196
  :class="[$v.f_house_type.required ? 'has-error' : '']">
198
197
  <label for="f_user_state" class="font_normal_body">&ensp;{{getConfigLabelName('f_house_type','房屋类型')}}</label>
199
198
  <input type="text" v-show="false" v-model="baseinfo.base.f_house_type"
200
- v-validate:f_house_type=getConfigValidate("f_house_type",false)>
201
- <v-select :value.sync="baseinfo.base.f_house_type" :search="false" :value-single="true"
199
+ v-validate:f_house_type="getConfigValidate('f_house_type')"/>
200
+ <v-select :value.sync="baseinfo.base.f_house_type"
201
+ v-model="baseinfo.base.f_house_type"
202
+ :search="false"
203
+ :value-single="true"
202
204
  :options='housetype' close-on-select
203
205
  :placeholder="getConfigPlaceholder('f_house_type','房屋类型')">
204
206
  </v-select>
@@ -247,12 +249,13 @@
247
249
  </div>
248
250
  </form>
249
251
  </validator>
250
- <modal v-if="showselectaddress" :show.sync="showselectaddress" width="80%" title="地址信息" v-ref:modal large backdrop="false">
252
+ <modal v-if="showselectaddress" :show.sync="showselectaddress" width="80%" title="地址信息" v-ref:modal large
253
+ backdrop="false">
251
254
  <article slot="modal-body" class="modal-body" style="height: 700px;padding: 0!important;">
252
255
  <file-address-manage-new :is-select="isSelect" :fileinfo="addressinfo"
253
- @address-valid="doNothing" :showselectaddress.sync="showselectaddress"
256
+ @address-valid="doNothing" :showselectaddress.sync="showselectaddress"
254
257
  :f_filialeid="f_filialeid"
255
- v-ref:fileaddress ></file-address-manage-new>
258
+ v-ref:fileaddress></file-address-manage-new>
256
259
  </article>
257
260
  <footer slot="modal-footer" class="modal-footer">
258
261
  </footer>
@@ -262,7 +265,6 @@
262
265
 
263
266
  <script>
264
267
  import {HttpResetClass} from 'vue-client'
265
- // import HighMeter from '../../plugins/HighMeterPlugin'
266
268
 
267
269
  let getEditUserState = async function (self) {
268
270
  try {
@@ -293,6 +295,7 @@
293
295
  f_idnumber: true,
294
296
  f_house_type: true
295
297
  },
298
+ validateRules: {},
296
299
  inputtores: this.$appdata.getParam('抄表员'),
297
300
  credentials: this.$appdata.getParam('证件类型'),
298
301
  costtypes: this.$appdata.getParam('缴费类型'),
@@ -312,35 +315,64 @@
312
315
  }
313
316
  },
314
317
  ready () {
315
- console.log('f_filialeid222,,,', this.f_filialeid)
316
318
  getEditUserState(this)
317
319
  this.$resetValidation()
318
- // this.highMeterPlugin = new HighMeter(this,this.readIDCardCallback)
320
+ this.initValidateRules()
319
321
  },
320
322
  beforeDestroy () {
321
- console.log('销毁')
322
- // this.highMeterPlugin.Stop()
323
323
  },
324
324
  methods: {
325
- getConfigValidate (name, defaultVal) {
326
- this.$resetValidation()
327
- if (this.formconfig && this.formconfig[name]) {
328
- let Validate = {}
329
- if (this.formconfig[name].required) {
330
- Object.assign(Validate, {required: true})
325
+ initValidateRules() {
326
+ const fields = [
327
+ 'f_user_name', 'f_user_phone', 'f_idnumber', 'f_address', 'f_used_name',
328
+ 'f_rent_phone', 'f_people_num', 'f_balance', 'f_is_mgq', 'f_book_no',
329
+ 'f_rent_name', 'f_zuhu_phone', 'f_cost_type', 'f_contract_id', 'f_print_dh',
330
+ 'f_comments', 'f_house_type', 'f_bank_accopen', 'f_bank_account'
331
+ ]
332
+
333
+ fields.forEach(field => {
334
+ this.validateRules[field] = {}
335
+ })
336
+
337
+ this.validateRules['f_user_phone'] = { minlength: 11, maxlength: 11 }
338
+
339
+ this.updateValidateRules()
340
+ },
341
+
342
+ updateValidateRules() {
343
+ if (!this.formconfig) return
344
+
345
+ Object.keys(this.formconfig).forEach(field => {
346
+ const fieldConfig = this.formconfig[field]
347
+ const rules = {}
348
+
349
+ if (fieldConfig.required) {
350
+ rules.required = true
331
351
  }
332
- if (this.formconfig[name].minlength || this.formconfig[name].minlength === 0) {
333
- Object.assign(Validate, {minlength: this.formconfig[name].minlength})
352
+
353
+ if (fieldConfig.minlength || fieldConfig.minlength === 0) {
354
+ rules.minlength = fieldConfig.minlength
334
355
  }
335
- if (this.formconfig[name].maxlength) {
336
- Object.assign(Validate, {maxlength: this.formconfig[name].maxlength})
356
+
357
+ if (fieldConfig.maxlength) {
358
+ rules.maxlength = fieldConfig.maxlength
337
359
  }
338
- return Validate
360
+
361
+ this.validateRules[field] = Object.assign({}, this.validateRules[field], rules)
362
+ })
363
+ },
364
+
365
+ getConfigValidate (name, defaultVal) {
366
+ this.$resetValidation()
367
+
368
+ if (this.validateRules[name] && Object.keys(this.validateRules[name]).length > 0) {
369
+ return this.validateRules[name]
339
370
  } else if (name === 'f_user_phone') {
340
371
  return { minlength: 11, maxlength: 11 }
341
372
  } else if (defaultVal) {
342
373
  return {required: defaultVal}
343
374
  }
375
+
344
376
  return {}
345
377
  },
346
378
  getConfigShowItem (name, defaultVal = true) {
@@ -381,6 +413,12 @@
381
413
  doNothing () {
382
414
  // console.log('啥也不做')
383
415
  },
416
+ resetValidation () {
417
+ this.baseinfo = Object.assign({}, this.baseinfo)
418
+ this.$nextTick(() => {
419
+ this.$resetValidation();
420
+ })
421
+ },
384
422
  readIDCardCallback (compoent, msg) {
385
423
  // console.log('进入高拍仪',msg)
386
424
  if (msg.err !== 0) {
@@ -389,30 +427,27 @@
389
427
  // document.getElementById("idCardType").getElementsByClassName("btn-content")[0].innerHTML="身份证"
390
428
  compoent.baseinfo.base.f_idnumber = msg.strID
391
429
  compoent.baseinfo.base.f_user_name = msg.strName.trim()
392
- compoent.baseinfo.base.f_credentials = ['身份证']
430
+ compoent.baseinfo.base.f_credentials = '身份证'
393
431
  }
394
432
  },
395
433
  watch: {
396
- // 重置验证结果,当证件类型切换时,验证结果不能立即刷新,需要重置
397
- 'baseinfo.base.f_credentials[0]' () {
398
- // console.log('验证器重置')
399
- this.$resetValidation()
434
+ 'baseinfo.base.f_credentials' () {
435
+ this.$resetValidation();
400
436
  this.baseinfo.base.f_print_dh = (this.baseinfo.base.f_print_dh && this.baseinfo.base.f_print_dh != '' && this.baseinfo.base.f_print_dh != '否') ? this.baseinfo.base.f_print_dh : this.config.f_print_dh
401
437
  },
402
438
  'baseinfo.base.f_cost_type[0]' () {
403
- // console.log('验证器重置')
404
439
  this.$resetValidation()
405
440
  this.baseinfo.base.f_print_dh = (this.baseinfo.base.f_print_dh && this.baseinfo.base.f_print_dh != '' && this.baseinfo.base.f_print_dh != '否') ? this.baseinfo.base.f_print_dh : this.config.f_print_dh
406
441
  },
407
- // 当选择销户,需要给其提醒是否进行销户
408
- 'baseinfo.base.f_user_state' (val) {
409
- if (val[0] === '销户') {
410
- this.$showMessage('是否要对该客户进行销户操作?', ['confirm', 'cancel']).then((res) => {
411
- if (res !== 'confirm') {
412
- this.baseinfo.base.f_user_state = ['正常']
413
- }
414
- })
415
- }
442
+ 'baseinfo.base.f_house_type' () {
443
+ console.log(JSON.stringify(this.$v));
444
+ this.resetValidation()
445
+ },
446
+ 'formconfig': {
447
+ handler() {
448
+ this.updateValidateRules()
449
+ },
450
+ deep: true
416
451
  }
417
452
  },
418
453
  computed: {
@@ -430,10 +465,10 @@
430
465
  },
431
466
  events: {
432
467
  'confirmaddress' (res) {
433
- // console.log('选定地址', res)
434
468
  this.showselectaddress = false
435
469
  this.addressinfo.f_address = res.f_address
436
470
  this.addressinfo.id = res.id
471
+ console.log(res.f_house_type,"=========");
437
472
  if (res.f_house_type != null) {
438
473
  this.baseinfo.base.f_house_type = res.f_house_type
439
474
  }