正在显示
2 个修改的文件
包含
12 行增加
和
5 行删除
@@ -237,7 +237,12 @@ Page({ | @@ -237,7 +237,12 @@ Page({ | ||
237 | mobile: e.detail.value | 237 | mobile: e.detail.value |
238 | }) | 238 | }) |
239 | }, | 239 | }, |
240 | - | 240 | + nameInput: function (e) { |
241 | + console.log('bindinputname', e) | ||
242 | + this.setData({ | ||
243 | + name: e.detail.value | ||
244 | + }) | ||
245 | + }, | ||
241 | // =============其他数据选中处理============== | 246 | // =============其他数据选中处理============== |
242 | 247 | ||
243 | getIdInfo: function(e) { | 248 | getIdInfo: function(e) { |
@@ -269,10 +274,11 @@ Page({ | @@ -269,10 +274,11 @@ Page({ | ||
269 | this.showtoast('证照号码有误'); | 274 | this.showtoast('证照号码有误'); |
270 | return | 275 | return |
271 | } | 276 | } |
272 | - if (formdata.name.length < 1) { | 277 | + var name = formdata.person_name.length ? formdata.person_name : this.data.name |
278 | + if (name.length < 1 ) { | ||
273 | this.showtoast('姓名未填写'); | 279 | this.showtoast('姓名未填写'); |
274 | return | 280 | return |
275 | - } else if (!regname.test(formdata.name)) { | 281 | + } else if (!regname.test(name)) { |
276 | this.showtoast('请输入正确姓名'); | 282 | this.showtoast('请输入正确姓名'); |
277 | return | 283 | return |
278 | } | 284 | } |
@@ -302,6 +308,7 @@ Page({ | @@ -302,6 +308,7 @@ Page({ | ||
302 | goCommit: function(data) { | 308 | goCommit: function(data) { |
303 | var that = this | 309 | var that = this |
304 | var formdata = data | 310 | var formdata = data |
311 | + var name = formdata.person_name.length ? formdata.person_name : this.data.name | ||
305 | console.log("form_data", formdata); | 312 | console.log("form_data", formdata); |
306 | var Authorization = app.globalData.Authorization; | 313 | var Authorization = app.globalData.Authorization; |
307 | var url = baseUrl + 'persontax/v1/personal-taxes', method = "POST" | 314 | var url = baseUrl + 'persontax/v1/personal-taxes', method = "POST" |
@@ -320,7 +327,7 @@ Page({ | @@ -320,7 +327,7 @@ Page({ | ||
320 | "family_ties": that.data.relativeData.selected, | 327 | "family_ties": that.data.relativeData.selected, |
321 | "id_card_type": '居民身份证',//that.data.cardtypeData.selected, | 328 | "id_card_type": '居民身份证',//that.data.cardtypeData.selected, |
322 | "id_card_no": formdata.id_card_no ? formdata.id_card_no : that.data.card_number, | 329 | "id_card_no": formdata.id_card_no ? formdata.id_card_no : that.data.card_number, |
323 | - "name": formdata.name, | 330 | + "name": name, |
324 | "gender": that.data.genderData.selected, | 331 | "gender": that.data.genderData.selected, |
325 | "mobile": formdata.mobile, | 332 | "mobile": formdata.mobile, |
326 | //"age": formdata.age ? formdata.age : '',//不传 | 333 | //"age": formdata.age ? formdata.age : '',//不传 |
@@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
35 | <view class='item_body'> | 35 | <view class='item_body'> |
36 | <text class='red_star_right_10'>*</text> | 36 | <text class='red_star_right_10'>*</text> |
37 | <text class='text_777_30 float_left' style='line-height: 90rpx'>姓名</text> | 37 | <text class='text_777_30 float_left' style='line-height: 90rpx'>姓名</text> |
38 | - <input class='input_wrap float_right' placeholder='请填写姓名' name='name' value='{{name}}' placeholder-class='text_777_30' maxlength='15' disabled='{{isDisable}}'></input> | 38 | + <input class='input_wrap float_right' placeholder='请填写姓名' name='person_name' value='{{name}}' placeholder-class='text_777_30' maxlength='15' disabled='{{isDisable}}' bindinput='nameInput'></input> |
39 | </view> | 39 | </view> |
40 | <view class="divide_line_30"></view> | 40 | <view class="divide_line_30"></view> |
41 | 41 |
请
注册
或
登录
后发表评论