sale-client 4.2.94 → 4.2.96

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.
@@ -1,59 +1,83 @@
1
1
  <template>
2
- <div>
2
+ <div id="UserEssential">
3
3
  <validator name='v' @valid="$emit('valid')" @invalid="$emit('invalid')">
4
4
  <form class="form-horizontal select-overspread ">
5
5
  <div class="row">
6
- <div class="col-sm-4 form-group " :class="[$v.f_user_name.required ? 'has-error' : '']">
7
- <label for="f_user_name" class="font_normal_body">*客户姓名</label>
8
- <input type="text" v-model="baseinfo.base.f_user_name" v-validate:f_user_name='{required: true }'
9
- class="input_search" style="width:60%" placeholder="客户名称" v-next-el="phone">
6
+ <div class="col-sm-4 form-group " :class="[$v.f_user_name.required ? 'has-error' : '']"
7
+ v-if="getConfigShowItem('f_user_name')">
8
+ <label for="f_user_name" class="font_normal_body">*{{getConfigLabelName('f_user_name','用户姓名')}}</label>
9
+ <input type="text" v-model="baseinfo.base.f_user_name"
10
+ v-validate:f_user_name='getConfigValidate("f_user_name",true)'
11
+ class="input_search" style="width:60%" :placeholder="getConfigPlaceholder('f_user_name','用户姓名')" v-next-el="phone">
10
12
  </div>
11
13
  <div style="" class="col-sm-4 form-group"
12
- :class="[$v.f_user_phone.minlength || $v.f_user_phone.maxlength ? 'has-error' : '']">
13
- <label for="f_user_phone" class="font_normal_body">*客户电话</label>
14
+ :class="[$v.f_user_phone.minlength || $v.f_user_phone.maxlength ? 'has-error' : '']" v-if="getConfigShowItem('f_user_phone')">
15
+ <label for="f_user_phone" class="font_normal_body">*{{getConfigLabelName('f_user_phone','客户电话')}}</label>
14
16
  <input type="text" maxlength="11" v-model="baseinfo.base.f_user_phone"
15
- v-validate:f_user_phone="{minlength: 11, maxlength: 11 }" class="input_search" style="width:60%"
16
- placeholder="客户电话" v-el:phone v-next-el="area">
17
+ v-validate:f_user_phone=getConfigValidate("f_user_phone") class="input_search" style="width:55%"
18
+ :placeholder="getConfigPlaceholder('f_user_phone','客户电话')"
19
+ v-el:phone v-next-el="area">
17
20
  <button type="button" class="glyphicon glyphicon-plus" @click.stop="phoneManage()"></button>
18
21
  </div>
22
+
23
+ <div style=""
24
+ v-show="(formconfig && formconfig.f_rent_phone && formconfig.f_rent_phone.required) || !onlyshowmust"
25
+ :class="[$v.f_rent_phone.required ? 'has-error' : '']"
26
+ class="col-sm-4 form-group" v-if="getConfigShowItem('f_rent_phone')">
27
+ <label for="f_rent_phone" class="font_normal_body">&ensp;{{getConfigLabelName('f_rent_phone','曾用电话')}}</label>
28
+ <input type="text" v-model="baseinfo.base.f_rent_phone" class="input_search" style="width:60%"
29
+ v-validate:f_rent_phone=getConfigValidate("f_rent_phone",false)
30
+ :placeholder="getConfigPlaceholder('f_rent_phone','曾用电话')">
31
+ </div>
32
+
19
33
  <div class="col-sm-4 form-group" style="" v-if="true">
20
- <label for="f_user_state" class="font_normal_body">&ensp;客户状态</label>
34
+ <label for="f_user_state" class="font_normal_body">&ensp;{{getConfigLabelName('f_user_state','客户状态')}}</label>
21
35
  <v-select :value.sync="baseinfo.base.f_user_state"
22
36
  :disabled="true"
23
37
  :value-single="true"
24
- :options='userstates' placeholder='客户状态'
38
+ :options='userstates' :placeholder="getConfigPlaceholder('f_user_state','客户状态')"
25
39
  close-on-select></v-select>
26
40
  </div>
41
+ <div class="col-sm-4 form-group" style="" >
42
+ <label for="f_uservent_date" class="font_normal_body">&ensp;{{getConfigLabelName('f_uservent_date','通气日期')}}</label>
43
+ <datepicker style="width:60%" placeholder="用户通气日期"
44
+ v-model="baseinfo.base.f_uservent_date"
45
+ v-ref:f_uservent_date
46
+ :value.sync="baseinfo.base.f_uservent_date"
47
+ :format="'yyyy-MM-dd HH:mm:ss'"
48
+ ></datepicker>
49
+ </div>
27
50
  </div>
28
51
  <div class="row">
29
- <div style="" class="col-sm-4 form-group">
30
- <label for="f_credentials" class="font_normal_body">&ensp;证件类型</label>
52
+ <div style="" class="col-sm-4 form-group" v-if="getConfigShowItem('f_credentials')">
53
+ <label for="f_credentials" class="font_normal_body">&ensp;{{getConfigLabelName('f_credentials','证件类型')}}</label>
31
54
  <v-select id="idCardType" :value.sync="baseinfo.base.f_credentials"
32
55
  v-model="baseinfo.base.f_credentials"
33
56
  :value-single="true"
34
- :options='credentials' placeholder='证件类型'
57
+ :options='credentials'
58
+ :placeholder="getConfigPlaceholder('f_credentials','证件类型')"
35
59
  style="width: 65%"
36
60
  close-on-select></v-select>
37
61
  </div>
38
62
  <div style="" class="col-sm-8 form-group"
39
63
  :class="[$v.f_idnumber2.identityCardValid ? 'has-error' : '']"
40
- v-if="baseinfo.base.f_credentials === '身份证'">
64
+ v-if="baseinfo.base.f_credentials === '身份证' && config.f_idnumber ">
41
65
  <label for="f_idnumber" class="font_normal_body">*证件号码</label>
42
66
  <input type="text" maxlength="18" v-model="baseinfo.base.f_idnumber"
43
67
  v-validate:f_idnumber2='{identityCardValid: true}' class="input_search" style="width:80%"
44
- placeholder="证件号码">
68
+ :placeholder="getConfigPlaceholder('f_idnumber','证件号码')">
45
69
  </div>
46
- <div style="" class="col-sm-8 form-group" v-if="baseinfo.base.f_credentials !== '身份证'">
70
+ <div style="" class="col-sm-8 form-group" v-if="baseinfo.base.f_credentials !== '身份证' || !config.f_idnumber ">
47
71
  <label class="font_normal_body">&ensp;证件号码</label>
48
72
  <input type="text" v-model="baseinfo.base.f_idnumber" class="input_search" style="width:80%"
49
- placeholder="证件号码">
73
+ :placeholder="getConfigPlaceholder('f_idnumber','证件号码')">
50
74
  </div>
51
75
  </div>
52
76
  <div class="row">
53
77
  <div class="col-sm-12 form-group" :class="[$v.f_address.required ? 'has-error' : '']">
54
78
  <label for="f_address" class="font_normal_body">*地址信息</label>
55
79
  <input type="text" v-model="addressinfo.f_address" :value.sync="addressinfo.f_address" v-validate:f_address='{required: true }'
56
- class="input_search" disabled="disabled" style="width:75%;" placeholder="用户地址" >
80
+ class="input_search" disabled="disabled" style="width:70%;" placeholder="用户地址" >
57
81
  <span>
58
82
  <button class="button_search button_spacing" type="button" style="width: max-content" v-if="!isedit" @click="selectaddress()">选择地址</button>
59
83
  <!-- <button class="button_search button_spacing" type="button" style="width: max-content" v-if="isedit" @click="modifyaddress()">修改地址</button>-->
@@ -62,114 +86,196 @@
62
86
  </div>
63
87
  </div>
64
88
  <div class="row">
65
- <div style="" class="col-sm-4 form-group">
66
- <label for="f_used_name" class="font_normal_body">&ensp;曾&ensp;用&ensp;名</label>
89
+ <div style=""
90
+ v-show="(formconfig && formconfig.f_used_name && formconfig.f_used_name.required) || !onlyshowmust"
91
+ :class="[$v.f_used_name.required ? 'has-error' : '']"
92
+ class="col-sm-4 form-group" v-if="getConfigShowItem('f_used_name')">
93
+ <label style="letter-spacing: 0.5em;margin-right: -0.5em" for="f_used_name" class="font_normal_body w3">{{getConfigLabelName('f_used_name','曾用名')}}</label>
67
94
  <input type="text" v-model="baseinfo.base.f_used_name" class="input_search" style="width:60%"
68
- placeholder="曾用名">
69
- </div>
70
- <div style="" class="col-sm-4 form-group">
71
- <label for="f_rent_phone" class="font_normal_body">&ensp;备用电话</label>
72
- <input type="text" v-model="baseinfo.base.f_rent_phone" class="input_search" style="width:60%"
73
- placeholder="备用电话">
95
+ v-validate:f_used_name=getConfigValidate("f_used_name",false)
96
+ :placeholder="getConfigPlaceholder('f_used_name','曾用名')">
74
97
  </div>
75
- <div class="col-sm-4 form-group" :class="[$v.f_people_num.dctest ? 'has-error' : '']">
76
- <label for="f_people_num" class="font_normal_body">&ensp;人&ensp;口&ensp;数</label>
77
- <input type="number" v-model="baseinfo.base.f_people_num" v-validate:f_people_num='{dctest: [0, ">=" ]}'
98
+ <div class="col-sm-4 form-group"
99
+ v-show="(formconfig && formconfig.f_people_num && formconfig.f_people_num.required) || !onlyshowmust"
100
+ :class="[$v.f_people_num.dctest ? 'has-error' : '']" v-if="getConfigShowItem('f_people_num')">
101
+ <label for="f_people_num" style="letter-spacing: 0.5em;margin-right: -0.5em" class="font_normal_body w3">{{getConfigLabelName('f_people_num','人口数')}}</label>
102
+ <input type="number" v-model="baseinfo.base.f_people_num" v-show="!peopleMax" v-validate:f_people_num='{dctest: [0, ">=" ]}'
78
103
  :disabled="!jurisdiction.includes('修改人口数')" class="input_search" style="width:60%"
79
104
  placeholder="家庭人口数">
105
+ <v-select id="f_people_num" :value.sync="baseinfo.base.f_people_num"
106
+ v-if="peopleMax"
107
+ v-model="baseinfo.base.f_people_num"
108
+ :value-single="true"
109
+ :options='peoplenums'
110
+ :placeholder="getConfigPlaceholder('f_people_num','家庭人口数')"
111
+ style="width: 65%"
112
+ close-on-select></v-select>
80
113
  </div>
81
114
  </div>
82
115
  <div class="row">
83
- <div style="" class="col-sm-4 form-group">
84
- <label for="f_balance" class="font_normal_body">&ensp;用户余额</label>
116
+ <div style=""
117
+ v-show="(formconfig && formconfig.f_balance && formconfig.f_balance.required) || !onlyshowmust"
118
+ :class="[$v.f_balance.required ? 'has-error' : '']"
119
+ class="col-sm-4 form-group" v-if="getConfigShowItem('f_balance')">
120
+ <label for="f_balance" class="font_normal_body">&ensp;{{getConfigLabelName('f_balance','用户余额')}}</label>
85
121
  <input type="text" v-model="baseinfo.base.f_balance" class="input_search" style="width:60%"
86
- placeholder="用户余额" :disabled="!jurisdiction.includes('档案信息查询修改')">
122
+ v-validate:f_balance=getConfigValidate("f_balance",false)
123
+ :placeholder="getConfigPlaceholder('f_balance','用户余额')"
124
+ :disabled="!jurisdiction.includes('档案信息查询修改')">
87
125
  </div>
88
- <div style="" class="col-sm-4 form-group">
89
- <label for="f_is_mgq" class="font_normal_body ">煤&ensp;改&ensp;气&ensp;</label>
126
+ <div style="" class="col-sm-4 form-group" v-if="getConfigShowItem('f_is_mgq')"
127
+ v-show="(formconfig && formconfig.f_is_mgq && formconfig.f_is_mgq.required) || !onlyshowmust"
128
+ :class="[$v.f_is_mgq.required ? 'has-error' : '']">
129
+ <label for="f_is_mgq" style="letter-spacing: 0.5em;margin-right: -0.5em" class="font_normal_body w3">{{getConfigLabelName('f_is_mgq','煤改气')}}</label>
130
+ <input type="text" v-show="false" v-model="baseinfo.base.f_is_mgq"
131
+ v-validate:f_is_mgq=getConfigValidate("f_is_mgq",false)>
90
132
  <v-select id="f_is_mgq" :value.sync="baseinfo.base.f_is_mgq" v-model="baseinfo.base.f_is_mgq"
91
- :options='mgq' placeholder='是否煤改气' style="width: 65%" close-on-select></v-select>
133
+ :placeholder="getConfigPlaceholder('f_is_mgq','是否煤改气')"
134
+ :options='mgq' style="width: 65%" close-on-select></v-select>
92
135
  </div>
93
- <div class="col-sm-4 form-group">
94
- <label for="f_contract" class="font_normal_body">&ensp;燃气本号</label>
95
- <input type="text" v-model="baseinfo.base.f_book_no" class="input_search" style="width:60%" placeholder="用户证号">
136
+ <div class="col-sm-4 form-group" v-if="getConfigShowItem('f_book_no')"
137
+ v-show="(formconfig && formconfig.f_book_no && formconfig.f_book_no.required) || !onlyshowmust"
138
+ :class="[$v.f_book_no.required ? 'has-error' : '']">
139
+ <label for="f_contract" class="font_normal_body">&ensp;{{getConfigLabelName('f_book_no','燃气本号')}}</label>
140
+ <input type="text" v-model="baseinfo.base.f_book_no" class="input_search" style="width:60%"
141
+ v-validate:f_book_no=getConfigValidate("f_book_no",false)
142
+ :placeholder="getConfigPlaceholder('f_book_no','用户证号')">
96
143
  </div>
97
144
  </div>
98
145
  <div class="row">
99
- <div style="" class="col-sm-4 form-group">
100
- <label for="f_rent_name" class="font_normal_body">&ensp;租户姓名</label>
146
+ <div style="" class="col-sm-4 form-group" v-if="getConfigShowItem('f_rent_name')"
147
+ v-show="(formconfig && formconfig.f_rent_name && formconfig.f_rent_name.required) || !onlyshowmust"
148
+ :class="[$v.f_rent_name.required ? 'has-error' : '']">
149
+ <label for="f_rent_name" class="font_normal_body">&ensp;{{getConfigLabelName('f_rent_name','租户姓名')}}</label>
101
150
  <input type="text" v-model="baseinfo.base.f_rent_name" class="input_search" style="width:60%"
102
- placeholder="租户姓名">
151
+ v-validate:f_rent_name=getConfigValidate("f_rent_name",false)
152
+ :placeholder="getConfigPlaceholder('f_rent_name','租户姓名')">
103
153
  </div>
104
- <div style="" class="col-sm-4 form-group">
105
- <label for="f_zuhu_phone" class="font_normal_body">&ensp;租户电话</label>
154
+ <div style="" class="col-sm-4 form-group" v-if="getConfigShowItem('f_zuhu_phone')"
155
+ v-show="(formconfig && formconfig.f_zuhu_phone && formconfig.f_zuhu_phone.required) || !onlyshowmust"
156
+ :class="[$v.f_zuhu_phone.required ? 'has-error' : '']">
157
+ <label for="f_zuhu_phone" class="font_normal_body">{{getConfigLabelName('f_zuhu_phone','租户电话')}}</label>
106
158
  <input type="text" v-model="baseinfo.base.f_zuhu_phone" class="input_search" style="width:60%"
107
- placeholder="租户电话">
108
- </div>
109
- <div style="" class="col-sm-4 form-group" :class="[$v.zbf.required ? 'has-error' : '']">
110
- <label for="f_whether_zbf" class="font_normal_body">&ensp;是否自闭阀</label>
111
- <input type="text" v-show="false" v-model="$refs.zbf.selectedItems"
112
- v-validate:zbf='{required: true }'>
113
- <v-select id="f_whether_zbf" :value.sync="baseinfo.base.f_whether_zbf" v-model="baseinfo.base.f_whether_zbf" :value-single="true"
114
- :options='zbf' placeholder='是否自闭阀' style="width: 65%" close-on-select v-ref:zbf></v-select>
159
+ v-validate:f_zuhu_phone=getConfigValidate("f_zuhu_phone",false)
160
+ :placeholder="getConfigPlaceholder('f_zuhu_phone','租户电话')">
115
161
  </div>
116
162
  </div>
117
163
  <div class="row">
118
- <div class="col-sm-12 form-group">
119
- <label for="f_site_problems" class="font_normal_body ">&ensp;现场问题</label>
120
- <input class="input_search" style="width:86.5%;height: 40px" v-model="baseinfo.base.f_site_problems" placeholder="现场问题">
121
- </div>
122
- </div>
123
- <div class="row">
124
- <div style="" class="col-sm-8 form-group">
125
- <label for="f_zuhu_idnumber" class="font_normal_body">租户身份证</label>
126
- <input type="text" v-model="baseinfo.base.f_zuhu_idnumber" class="input_search" style="width:80%"
127
- placeholder="租户身份证">
164
+ <div style="" class="col-sm-8 form-group"
165
+ v-show="(formconfig && formconfig.f_zuhu_idnumber && formconfig.f_zuhu_idnumber.required) || !onlyshowmust"
166
+ v-if="getConfigShowItem('f_zuhu_idnumber')"
167
+ :class="[$v.f_zuhu_idnumber.required ? 'has-error' : '']">
168
+ <label for="f_zuhu_idnumber" class="font_normal_body">{{getConfigLabelName('f_zuhu_idnumber','租户身份证')}}</label>
169
+ <input type="text" v-model="baseinfo.base.f_zuhu_idnumber" class="input_search" style="width:80%"
170
+ v-validate:f_zuhu_idnumber=getConfigValidate("f_zuhu_idnumber",false)
171
+ :placeholder="getConfigPlaceholder('f_zuhu_idnumber','租户身份证')">
128
172
  </div>
129
- <div style="" class="col-sm-4 form-group">
130
- <label for="f_is_mgq" class="font_normal_body ">&ensp;付款类型</label>
173
+ <div style="" class="col-sm-4 form-group"
174
+ v-show="(formconfig && formconfig.f_cost_type && formconfig.f_cost_type.required) || !onlyshowmust"
175
+ v-if="getConfigShowItem('f_cost_type')">
176
+ <label for="f_is_mgq" class="font_normal_body ">&ensp;{{getConfigLabelName('f_cost_type','付款类型')}}</label>
131
177
  <v-select id="f_is_mgq" :value.sync="baseinfo.base.f_cost_type" v-model="baseinfo.base.f_cost_type"
132
- :options='costtype' placeholder='付款类型' style="width: 65%" close-on-select></v-select>
178
+ :options='costtype'
179
+ :placeholder="getConfigPlaceholder('f_cost_type','付款类型')" style="width: 65%" close-on-select></v-select>
133
180
  </div>
134
181
  </div>
135
182
  <div class="row">
136
- <div class="col-sm-8 form-group">
137
- <label for="f_contract" class="font_normal_body">&ensp;合同编号</label>
183
+ <div class="col-sm-8 form-group" v-if="getConfigShowItem('f_contract_id')"
184
+ v-show="(formconfig && formconfig.f_contract_id && formconfig.f_contract_id.required) || !onlyshowmust"
185
+ :class="[$v.f_contract_id.required ? 'has-error' : '']">
186
+ <label for="f_contract" class="font_normal_body">&ensp;{{getConfigLabelName('f_contract_id','合同编号')}}</label>
138
187
  <input type="text" v-model="baseinfo.base.f_contract_id" class="input_search" style="width:80%"
139
- placeholder="合同编号">
188
+ v-validate:f_contract_id=getConfigValidate("f_contract_id",false)
189
+ :placeholder="getConfigPlaceholder('f_contract_id','合同编号')">
140
190
  </div>
141
- <div class="col-sm-4 form-group">
142
- <label for="f_user_state" class="font_normal_body">&ensp;房屋类型</label>
143
- <input type="text" v-show="false" v-model="baseinfo.base.f_house_type">
191
+ <div class="col-sm-4 form-group" v-if="getConfigShowItem('f_house_type')"
192
+ v-show="(formconfig && formconfig.f_house_type && formconfig.f_house_type.required) || !onlyshowmust"
193
+ :class="[$v.f_house_type.required ? 'has-error' : '']">
194
+ <label for="f_user_state" class="font_normal_body">&ensp;{{getConfigLabelName('f_house_type','房屋类型')}}</label>
195
+ <input type="text" v-show="false" v-model="baseinfo.base.f_house_type"
196
+ v-validate:f_house_type=getConfigValidate("f_house_type",false)>
144
197
  <v-select :value.sync="baseinfo.base.f_house_type" :search="false" :value-single="true"
145
- :options='housetype' placeholder='房屋类型' close-on-select>
198
+ :options='housetype' close-on-select
199
+ :placeholder="getConfigPlaceholder('f_house_type','房屋类型')">
146
200
  </v-select>
147
201
  </div>
148
202
  </div>
149
203
  <div class="row">
150
- <div style="" class="col-sm-4 form-group">
151
- <label for="f_user_level" class="font_normal_body ">&ensp;用户等级</label>
204
+ <div style="" class="col-sm-4 form-group" v-if="getConfigShowItem('f_user_level')"
205
+ v-show="(formconfig && formconfig.f_user_level && formconfig.f_user_level.required) || !onlyshowmust"
206
+ :class="[$v.f_user_level.required ? 'has-error' : '']">
207
+ <label for="f_user_level" class="font_normal_body ">&ensp;{{getConfigLabelName('f_user_level','用户等级')}}</label>
208
+ <input type="text" v-show="false" v-model="baseinfo.base.f_user_level"
209
+ v-validate:f_user_level=getConfigValidate("f_user_level",false)>
152
210
  <v-select :value.sync="baseinfo.base.f_user_level" :search="false" :value-single="true"
153
- :options='userlevel' placeholder='用户等级' close-on-select>
211
+ :options='userlevel'
212
+ :placeholder="getConfigPlaceholder('f_user_level','用户等级')" close-on-select>
154
213
  </v-select>
155
214
  </div>
156
- <div class="col-sm-4 form-group">
157
- <label for="f_user_nature" class="font_normal_body" title="用户性质">&ensp;用气类型</label>
158
- <input type="text" v-show="false" v-model="baseinfo.base.f_user_nature">
215
+ <div class="col-sm-4 form-group" v-if="getConfigShowItem('f_user_nature')"
216
+ v-show="(formconfig && formconfig.f_user_nature && formconfig.f_user_nature.required) || !onlyshowmust"
217
+ :class="[$v.f_user_nature.required ? 'has-error' : '']">
218
+ <label for="f_user_nature" class="font_normal_body" title="用户性质">&ensp;{{getConfigLabelName('f_user_nature','用气类型')}}</label>
219
+ <input type="text" v-show="false" v-model="baseinfo.base.f_user_nature"
220
+ v-validate:f_user_nature=getConfigValidate("f_user_nature",false)>
159
221
  <v-select :value.sync="baseinfo.base.f_user_nature" :search="false" :value-single="true"
160
- :options='usernature' placeholder='用气类型' close-on-select>
222
+ :placeholder="getConfigPlaceholder('f_user_nature','用气类型')"
223
+ :options='usernature' close-on-select>
161
224
  </v-select>
162
225
  </div>
163
- <div class="col-sm-4 form-group">
164
- <label for="f_user_nature" class="font_normal_body">&ensp;档案编号</label>
226
+ <div class="col-sm-4 form-group" v-if="getConfigShowItem('f_olduserinfo_code')"
227
+ v-show="(formconfig && formconfig.f_olduserinfo_code && formconfig.f_olduserinfo_code.required) || !onlyshowmust"
228
+ :class="[$v.f_olduserinfo_code.required ? 'has-error' : '']">
229
+ <label for="f_user_nature" class="font_normal_body">&ensp;{{getConfigLabelName('f_olduserinfo_code','档案编号')}}</label>
165
230
  <input type="text" v-model="baseinfo.base.f_olduserinfo_code" class="input_search" style="width:60%"
166
- placeholder="档案编号">
231
+ v-validate:f_olduserinfo_code=getConfigValidate("f_olduserinfo_code",false)
232
+ :placeholder="getConfigPlaceholder('f_olduserinfo_code','档案编号')">
233
+ </div>
234
+ <div class="col-sm-4 form-group"
235
+ v-show="(formconfig && formconfig.f_gas_pointsnumber && formconfig.f_gas_pointsnumber.required) || !onlyshowmust"
236
+ :class="[$v.f_gas_pointsnumber.dctest ? 'has-error' : '']" v-if="getConfigShowItem('f_gas_pointsnumber')">
237
+ <label for="f_gas_pointsnumber" class="font_normal_body">{{getConfigLabelName('f_gas_pointsnumber','用气点数量')}}</label>
238
+ <v-select id="f_gas_pointsnumber" :value.sync="baseinfo.base.f_gas_pointsnumber"
239
+ v-model="baseinfo.base.f_gas_pointsnumber"
240
+ :value-single="true"
241
+ :options='pointsnums'
242
+ :placeholder="getConfigPlaceholder('f_gas_pointsnumber','用气点数量')"
243
+ style="width: 65%"
244
+ close-on-select></v-select>
245
+ </div>
246
+ <div class="col-sm-4 form-group" v-if="getConfigShowItem('f_reminder_amount')"
247
+ v-show="(formconfig && formconfig.f_reminder_amount && formconfig.f_reminder_amount.required) || !onlyshowmust"
248
+ :class="[$v.f_reminder_amount.required ? 'has-error' : '']" title="余额小于该值后,微信公众号或短信推送余额不足提醒">
249
+ <label for="f_reminder_amount" :style="{color: baseinfo.base.f_reminder_amount === null || baseinfo.base.f_reminder_amount === '' ? 'red' : null}" class="font_normal_body">{{getConfigLabelName('f_reminder_amount','提示金额高')}}</label>
250
+ <input type="number" v-model="baseinfo.base.f_reminder_amount" class="input_search" style="width:60%"
251
+ v-validate:f_reminder_amount=getConfigValidate("f_reminder_amount",false)
252
+ :placeholder="getConfigPlaceholder('f_reminder_amount','提示金额高')" @input="reminderAmountHandle">
253
+ </div>
254
+ <div class="col-sm-4 form-group" v-if="getConfigShowItem('f_reminder_amount_low')"
255
+ v-show="(formconfig && formconfig.f_reminder_amount_low && formconfig.f_reminder_amount_low.required) || !onlyshowmust"
256
+ :class="[$v.f_reminder_amount_low.required ? 'has-error' : '']" title="余额小于该值后,微信公众号或短信推送余额不足提醒">
257
+ <label for="f_reminder_amount_low" :style="{color: baseinfo.base.f_reminder_amount_low === null || baseinfo.base.f_reminder_amount_low === '' ? 'red' : null}" class="font_normal_body">{{getConfigLabelName('f_reminder_amount_low','提示金额低')}}</label>
258
+ <input type="number" v-model="baseinfo.base.f_reminder_amount_low" class="input_search" style="width:60%"
259
+ v-validate:f_reminder_amount_low=getConfigValidate("f_reminder_amount_low",false)
260
+ :placeholder="getConfigPlaceholder('f_reminder_amount_low','提示金额低')" @input="reminderAmountHandle2">
261
+ </div>
262
+ <div style="" class="col-sm-4 form-group" v-if="getConfigShowItem('f_reminder_phone')"
263
+ v-show="(formconfig && formconfig.f_reminder_phone && formconfig.f_reminder_phone.required) || !onlyshowmust"
264
+ :class="[$v.f_reminder_phone.required ? 'has-error' : '']">
265
+ <label for="f_reminder_phone" class="font_normal_body">{{getConfigLabelName('f_reminder_phone','报警号码')}}</label>
266
+ <input type="text" v-model="baseinfo.base.f_reminder_phone" class="input_search" style="width:60%"
267
+ v-validate:f_reminder_phone=getConfigValidate("f_reminder_phone",false)
268
+ :placeholder="getConfigPlaceholder('f_reminder_phone','报警号码')">
167
269
  </div>
168
270
  </div>
169
271
  <div class="row">
170
- <div style="" class="col-sm-12 form-group">
171
- <label for="f_paper_account" class="font_normal_body ">&ensp;备&emsp;&emsp;注</label>
172
- <input class="input_search" style="width:86.5%;height: 40px" v-model="baseinfo.base.f_comments"/>
272
+ <div style="" class="col-sm-12 form-group" v-if="getConfigShowItem('f_comments')"
273
+ v-show="(formconfig && formconfig.f_comments && formconfig.f_comments.required) || !onlyshowmust"
274
+ :class="[$v.f_comments.required ? 'has-error' : '']">
275
+ <label for="f_paper_accoun" class="font_normal_body">&ensp;{{getConfigLabelName('f_comments','备注')}}</label>
276
+ <input class="input_search" style="width:86.5%;height: 40px" v-model="baseinfo.base.f_comments"
277
+ :placeholder="getConfigPlaceholder('f_comments','请输入备注信息')"
278
+ v-validate:f_comments=getConfigValidate("f_comments",false)>
173
279
  </div>
174
280
  </div>
175
281
 
@@ -180,43 +286,55 @@
180
286
  <div v-if="baseinfo.base.f_cost_type[0] === '银行代扣'">
181
287
  <div class="row">
182
288
  <div class="col-sm-4 form-group"
183
- :class="[$v.f_bank_accopen.required ? 'has-error' : '']">
184
- <label for="f_username" class="font_normal_body">银行户名</label>
289
+ :class="[$v.f_bank_accopen.required ? 'has-error' : '']" v-if="getConfigShowItem('f_bank_accopen')">
290
+ <label for="f_username" class="font_normal_body">{{getConfigLabelName('f_bank_accopen','银行户名')}}</label>
185
291
  <input type="text" v-model="baseinfo.bank.f_bank_accopen"
186
- class="input_search" style="width:60%" id="f_username" placeholder="客户名称"
187
- v-validate:f_bank_accopen='{required: true}'
292
+ class="input_search" style="width:60%" id="f_username"
293
+ :placeholder="getConfigPlaceholder('f_bank_accopen','客户名称')"
294
+ v-validate:f_bank_accopen=getConfigValidate("f_bank_accopen",false)
188
295
  v-next-el="bankaccount">
189
296
  </div>
190
- <div class="col-sm-4 form-group" id=userfiles-useEssInf-银行名称>
191
- <label for="f_username" class="font_normal_body ">银行名称</label>
297
+ <div class="col-sm-4 form-group" id=userfiles-useEssInf-银行名称 v-if="getConfigShowItem('f_bank_name')"
298
+ :class="[$v.f_bank_name.required ? 'has-error' : '']">
299
+ <label for="f_username" class="font_normal_body ">{{getConfigLabelName('f_bank_name','银行名称')}}</label>
300
+ <input type="text" v-show="false" v-model="baseinfo.base.f_bank_name"
301
+ v-validate:f_bank_name=getConfigValidate("f_bank_name",false)>
192
302
  <v-select :value.sync="baseinfo.bank.f_bank_name"
193
- :options='banknames' placeholder='银行名称'
303
+ :options='banknames'
304
+ :placeholder="getConfigPlaceholder('f_bank_name','银行名称')"
194
305
  close-on-select></v-select>
195
306
  </div>
196
- <div class="col-sm-4 form-group">
197
- <label for="f_bank_idnumber" class="font_normal_body">缴费编号</label>
307
+ <div class="col-sm-4 form-group" v-if="getConfigShowItem('f_bank_pay_number')"
308
+ :class="[$v.f_bank_pay_number.required ? 'has-error' : '']">
309
+ <label for="f_bank_idnumber" class="font_normal_body">{{getConfigLabelName('f_bank_pay_number','缴费编号')}}</label>
198
310
  <input type="text" v-model="baseinfo.bank.f_bank_pay_number"
199
311
  class="input_search" style="width:60%"
200
- aria-describedby="helpBlock" placeholder="缴费编号" v-el:bankpaynumber>
312
+ v-validate:f_bank_pay_number=getConfigValidate("f_bank_pay_number",false)
313
+ :placeholder="getConfigPlaceholder('f_bank_pay_number','缴费编号')"
314
+ aria-describedby="helpBlock" v-el:bankpaynumber>
201
315
  </div>
202
- <div class="col-sm-12 form-group">
203
- <label for="f_bank_idnumber" class="font_normal_body">身份证号</label>
316
+ <div class="col-sm-12 form-group" v-if="getConfigShowItem('f_bank_idnumber')"
317
+ :class="[$v.f_bank_idnumber.required ? 'has-error' : '']">
318
+ <label for="f_bank_idnumber" class="font_normal_body">{{getConfigLabelName('f_bank_idnumber','身份证号')}}</label>
204
319
  <input type="text" v-model="baseinfo.bank.f_bank_idnumber"
205
320
  class="input_search" style="width:54%"
206
- aria-describedby="helpBlock" placeholder="身份证号" v-el:bankidnumber>
321
+ :placeholder="getConfigPlaceholder('f_bank_idnumber','身份证号')"
322
+ v-validate:f_bank_idnumber=getConfigValidate("f_bank_idnumber",false)
323
+ aria-describedby="helpBlock" v-el:bankidnumber>
207
324
  </div>
208
325
  <div class="col-sm-12 form-group"
209
- :class="[$v.f_bank_account.required ? 'has-error' : '']">
210
- <label for="f_userid" class="font_normal_body">银行账号</label>
326
+ :class="[$v.f_bank_account.required ? 'has-error' : '']" v-if="getConfigShowItem('f_bank_account')">
327
+ <label for="f_userid" class="font_normal_body">{{getConfigLabelName('f_bank_account','银行账号')}}</label>
211
328
  <input type="text" v-model="baseinfo.bank.f_bank_account" class="input_search" style="width:54%"
212
- v-validate:f_bank_account='{required: true}' placeholder="银行账号" v-el:bankaccount
329
+ v-validate:f_bank_account=getConfigValidate("f_bank_account",true) v-el:bankaccount
330
+ :placeholder="getConfigPlaceholder('f_bank_account','银行账号')"
213
331
  v-next-el="bankidnumber">
214
332
  </div>
215
333
  </div>
216
334
  </div>
217
335
  </form>
218
336
  </validator>
219
- <modal v-if="showselectaddress" :show.sync="showselectaddress" width="80%" title="地址信息" v-ref:modal large backdrop="false">
337
+ <modal v-if="showselectaddress" :show.sync="showselectaddress" width="50%" height="80%" title="地址信息" v-ref:modal large backdrop="false">
220
338
  <article slot="modal-body" class="modal-body" style="height: 700px;padding: 0!important;">
221
339
  <file-address-manage :is-select="isSelect" :fileinfo="addressinfo"
222
340
  @address-valid="doNothing" :showselectaddress.sync="showselectaddress" v-ref:fileaddress ></file-address-manage>
@@ -230,6 +348,7 @@
230
348
 
231
349
  <script>
232
350
  import {HttpResetClass} from 'vue-client'
351
+ import form from "vue-resource/src/http/interceptor/form";
233
352
  // import HighMeter from '../../plugins/HighMeterPlugin'
234
353
 
235
354
  let getEditUserState = async function (self) {
@@ -238,6 +357,7 @@
238
357
  let result = await http.load('GET', `rs/vue/EditUserState.json`, {}, {resolveMsg: null, rejectMsg: null})
239
358
  console.log(result.data.EditUserState)
240
359
  self.edituserstate = result.data.EditUserState
360
+ Object.assign(self.config, result.data)
241
361
  } catch (e) {
242
362
  console.log(e)
243
363
  }
@@ -245,11 +365,14 @@
245
365
 
246
366
  export default {
247
367
  title: '基本信息',
248
- props: ['baseinfo', 'addressinfo', 'isedit', 'userphonelist'],
368
+ props: ['baseinfo', 'addressinfo', 'isedit', 'userphonelist', 'formconfig', 'onlyshowmust'],
249
369
  data () {
250
370
  return {
251
371
  showselectaddress: false,
252
372
  site: '',
373
+ config: {
374
+ f_idnumber: true
375
+ },
253
376
  showphone: false,
254
377
  areas: [],
255
378
  streets: [],
@@ -260,17 +383,19 @@
260
383
  banknames: this.$appdata.getParam('银行名称'),
261
384
  userstates: this.$appdata.getParam('用户状态'),
262
385
  mgq: this.$appdata.getParam('是否煤改气'),
386
+ peopleMax: this.$appdata.getSingleValue('最大人口数'),
387
+ pointsMax: this.$appdata.getSingleValue('最大用气点数量'),
263
388
  costtype: this.$appdata.getParam('付款类型'),
264
389
  usernature: this.$appdata.getParam('用户性质'),
265
390
  userlevel: this.$appdata.getParam('用户等级'),
266
- housetype: [{label: '楼房', value: '楼房'}, {label: '自建房', value: '自建房'}],
267
- zbf: [{label: '是', value: '是'}, {label: '否', value: '否'}],
391
+ housetype: this.$appdata.getParam('房屋类型'),
268
392
  jurisdiction: this.$login.r,
269
393
  edituserstate: false,
270
394
  // highMeterPlugin: {},
271
395
  readCardFlag: true,
272
396
 
273
- isSelect: false
397
+ isSelect: false,
398
+ rules: {}
274
399
  }
275
400
  },
276
401
  ready () {
@@ -282,6 +407,58 @@
282
407
  // this.highMeterPlugin.Stop()
283
408
  },
284
409
  methods: {
410
+ reminderAmountHandle (e) {
411
+ this.$emit('input', e.target.value)
412
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,1})/g)[0]) || null
413
+ this.baseinfo.base.f_reminder_amount = parseInt(e.target.value, 10)
414
+ },
415
+ reminderAmountHandle2 (e) {
416
+ this.$emit('input', e.target.value)
417
+ e.target.value = (e.target.value.match(/^\d*(\.?\d{0,1})/g)[0]) || null
418
+ this.baseinfo.base.f_reminder_amount_low = parseInt(e.target.value, 10)
419
+ },
420
+ getConfigValidate (name, defaultVal) {
421
+ this.$resetValidation()
422
+ if (this.formconfig && this.formconfig[name]) {
423
+ let Validate = {}
424
+ if (this.formconfig[name].required) {
425
+ Object.assign(Validate, {required: true})
426
+ }
427
+ if (this.formconfig[name].minlength || this.formconfig[name].minlength === 0) {
428
+ Object.assign(Validate, {minlength: this.formconfig[name].minlength})
429
+ }
430
+ if (this.formconfig[name].maxlength) {
431
+ Object.assign(Validate, {maxlength: this.formconfig[name].maxlength})
432
+ }
433
+ return Validate
434
+ } else if (name === 'f_user_phone') {
435
+ return { minlength: 11, maxlength: 11 }
436
+ } else if (defaultVal) {
437
+ return {required: defaultVal}
438
+ }
439
+ return {}
440
+ },
441
+ getConfigShowItem (name,defaultVal = true) {
442
+ if (this.formconfig && this.formconfig[name] && this.formconfig[name].hasOwnProperty('showItem')) {
443
+ return this.formconfig[name].showItem
444
+ } else {
445
+ return defaultVal
446
+ }
447
+ },
448
+ getConfigLabelName (name, defaultVal) {
449
+ if (this.formconfig && this.formconfig[name] && this.formconfig[name].labelName) {
450
+ return this.formconfig[name].labelName
451
+ } else {
452
+ return defaultVal
453
+ }
454
+ },
455
+ getConfigPlaceholder (name, defaultVal) {
456
+ if (this.formconfig && this.formconfig[name] && this.formconfig[name].placeholder) {
457
+ return this.formconfig[name].placeholder
458
+ } else {
459
+ return defaultVal
460
+ }
461
+ },
285
462
  selectaddress () {
286
463
  this.showselectaddress = true
287
464
  this.isSelect = true
@@ -314,6 +491,12 @@
314
491
  }
315
492
  },
316
493
  watch: {
494
+ 'baseinfo.base.f_userinfo_id' (val) {
495
+ if(this.formconfig.f_reminder_amount!=null){
496
+ if (this.baseinfo.base.f_reminder_amount === null && this.formconfig.f_reminder_amount.required) {
497
+ this.$showAlert('当前用户还未设置余额提示金额,请在提示金额字段进行设置', 'warning', 3000)
498
+ }}
499
+ },
317
500
  // 重置验证结果,当证件类型切换时,验证结果不能立即刷新,需要重置
318
501
  'baseinfo.base.f_credentials[0]' () {
319
502
  console.log('验证器重置')
@@ -334,7 +517,30 @@
334
517
  // // }
335
518
  // }
336
519
  },
337
- computed: {},
520
+ computed: {
521
+ peoplenums () {
522
+ let peopleMax = this.$appdata.getSingleValue('最大人口数') ? this.$appdata.getSingleValue('最大人口数') : 0
523
+ let nums = []
524
+ for (let i = 1; i <= peopleMax; i++) {
525
+ let temp = {}
526
+ temp.label = i
527
+ temp.value = i
528
+ nums.push(temp)
529
+ }
530
+ return nums
531
+ },
532
+ pointsnums () {
533
+ let pointsMax = this.$appdata.getSingleValue('最大用气点数量') ? this.$appdata.getSingleValue('最大用气点数量') : 10
534
+ let nums = []
535
+ for (let i = 1; i <= pointsMax; i++) {
536
+ let temp = {}
537
+ temp.label = i
538
+ temp.value = i
539
+ nums.push(temp)
540
+ }
541
+ return nums
542
+ }
543
+ },
338
544
  events: {
339
545
  'confirmaddress' (res) {
340
546
  console.log('选定地址', res)
@@ -346,3 +552,73 @@
346
552
  }
347
553
  }
348
554
  </script>
555
+ <style scoped lang="less">
556
+ // 两个字符占用4个字符距离
557
+ .w2 {
558
+ letter-spacing:2em; /*如果需要y个字两端对齐,则为(x-y)/(y-1),这里是(4-2)/(2-1)=2em */
559
+ margin-right:-2em; /*同上*/
560
+ }
561
+ // 三个字符占用4个字符距离
562
+ .w3 {
563
+ letter-spacing: 0.5em;
564
+ margin-right: -0.5em
565
+ }
566
+
567
+ #UserEssential{
568
+ // 去掉number类型输入框的上下箭头
569
+ input[type="number"] {
570
+ &::-webkit-inner-spin-button,
571
+ &::-webkit-outer-spin-button {
572
+ -webkit-appearance: none;
573
+ margin: 0;
574
+ }
575
+
576
+ & {
577
+ -moz-appearance: textfield;
578
+ }
579
+ }
580
+ #addboxmap {
581
+ height: 300px;
582
+ }
583
+ .glyphicon-map-marker:hover {
584
+ color: red;
585
+ }
586
+ .glyphicon-map-marker {
587
+ color: blue;
588
+ cursor: pointer;
589
+ }
590
+ .scrollbar() {
591
+ .font_normal_body {
592
+ width: 73px;
593
+ overflow: auto;
594
+ white-space: nowrap;
595
+ // 指滚动条两边的按钮
596
+ &::-webkit-scrollbar-button {
597
+ display: none;
598
+ }
599
+ // 滚动条的宽度
600
+ &::-webkit-scrollbar {
601
+ width: 5px !important;
602
+ height: 5px !important;
603
+ }
604
+ // 滚动条的设置
605
+ &::-webkit-scrollbar-thumb {
606
+ background-color: #ddd;
607
+ background-clip: padding-box;
608
+ }
609
+ &::-webkit-scrollbar-thumb:hover {
610
+ background-color: #bbb;
611
+ }
612
+ &::-webkit-scrollbar-track {
613
+ /*滚动条里面轨道*/
614
+ box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
615
+ background: #ededed;
616
+ }
617
+ }
618
+ }
619
+
620
+ .col-sm-4 ,.col-sm-12 ,.col-sm-8{
621
+ .scrollbar();
622
+ }
623
+ }
624
+ </style>