正在显示
2 个修改的文件
包含
23 行增加
和
16 行删除
| ... | ... | @@ -95,7 +95,7 @@ Page({ |
| 95 | 95 | label: '涉税事由', |
| 96 | 96 | bindtype: 'tax_reason', |
| 97 | 97 | placeholder: '请选择涉税事由', |
| 98 | - values: ["理由1", "理由2"], | |
| 98 | + values: ["任职受雇","提供临时劳务","转让财产","从事投资和经营活动","其他"], | |
| 99 | 99 | onChange: 'onPickerSelect', |
| 100 | 100 | }, |
| 101 | 101 | taxpayerTypeData: { |
| ... | ... | @@ -733,6 +733,7 @@ Page({ |
| 733 | 733 | // const new_type = cardTypeDicts[parseInt(new_type_code)-1]['name'] |
| 734 | 734 | // this.data.cardtypeData.selected_code = new_type_code |
| 735 | 735 | this.data.cardtypeData.selected = new_type |
| 736 | + this.data.otherCardtypeData.selected = '' | |
| 736 | 737 | this.data.nameText = '' |
| 737 | 738 | if ('居民身份证' == new_type) { |
| 738 | 739 | is_idcard = true |
| ... | ... | @@ -761,9 +762,11 @@ Page({ |
| 761 | 762 | this.data.nameText = '英文名' |
| 762 | 763 | if (new_type.indexOf('通行证') != -1){ |
| 763 | 764 | this.data.otherCardtypeData.values = ['港澳居民居住证'];// [{ 'code': '4', 'name': '港澳居民居住证'}]; |
| 765 | + this.data.otherCardtypeData.isrequre = false | |
| 764 | 766 | }else{ |
| 765 | 767 | this.data.otherCardtypeData.values = ['港澳居民来往内地通行证'];// [{ 'code': '3', 'name': '港澳居民来往内地通行证'}]; |
| 766 | - // this.data.otherCardtypeData.selected = '港澳居民来往内地通行证'; | |
| 768 | + this.data.otherCardtypeData.selected = '港澳居民来往内地通行证'; | |
| 769 | + this.data.otherCardtypeData.isrequre = true | |
| 767 | 770 | } |
| 768 | 771 | } else if (new_type.indexOf("台湾") != -1) { |
| 769 | 772 | this.data.countryData.selected = '中国台湾' |
| ... | ... | @@ -771,9 +774,11 @@ Page({ |
| 771 | 774 | this.data.nameText = '英文名' |
| 772 | 775 | if (new_type.indexOf('通行证') != -1) { |
| 773 | 776 | this.data.otherCardtypeData.values = ['台湾居民居住证'];//[{ 'code': '6', 'name': '台湾居民居住证' }]; |
| 777 | + this.data.otherCardtypeData.isrequre = false | |
| 774 | 778 | } else { |
| 775 | 779 | this.data.otherCardtypeData.values = ['台湾居民来往大陆通行证']; //[{ 'code': '5', 'name': '台湾居民来往大陆通行证' }]; |
| 776 | - // this.data.otherCardtypeData.selected = '台湾居民来往大陆通行证'; | |
| 780 | + this.data.otherCardtypeData.selected = '台湾居民来往大陆通行证'; | |
| 781 | + this.data.otherCardtypeData.isrequre = true | |
| 777 | 782 | } |
| 778 | 783 | |
| 779 | 784 | } else { |
| ... | ... | @@ -784,9 +789,11 @@ Page({ |
| 784 | 789 | if (new_type.indexOf("外国护照") != -1) { |
| 785 | 790 | // this.data.otherCardtypeData.values = [{ 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }]; |
| 786 | 791 | this.data.otherCardtypeData.values = ['外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)','外国人工作许可证(C类)']; |
| 792 | + this.data.otherCardtypeData.isrequre = false | |
| 787 | 793 | } else { |
| 788 | 794 | this.data.otherCardtypeData.values = ['外国护照']; //[{ 'code': '7', 'name': '外国护照' }]; |
| 789 | - // this.data.otherCardtypeData.selected = '外国护照'; | |
| 795 | + this.data.otherCardtypeData.selected = '外国护照'; | |
| 796 | + this.data.otherCardtypeData.isrequre = true | |
| 790 | 797 | } |
| 791 | 798 | } |
| 792 | 799 | this.setData({ |
| ... | ... | @@ -827,8 +834,6 @@ Page({ |
| 827 | 834 | if ((new_type.indexOf('外国人') != -1) && (selected.indexOf('外国人') != -1)) { |
| 828 | 835 | console.log('外国人', new_type, selected) |
| 829 | 836 | }else { |
| 830 | - this.data.otherCardtypeData.selected = '' | |
| 831 | - setData.otherCardtypeData = this.data.otherCardtypeData | |
| 832 | 837 | setData.other_card_number = '' |
| 833 | 838 | } |
| 834 | 839 | this.setData(setData) |
| ... | ... | @@ -1240,13 +1245,13 @@ Page({ |
| 1240 | 1245 | this.showtoast('请选择涉税事由'); |
| 1241 | 1246 | return |
| 1242 | 1247 | } |
| 1243 | - if (this.data.hasOtherCard && !this.data.otherCardtypeData.selected) { | |
| 1244 | - // this.showtoast('请选择其他证照类型'); | |
| 1245 | - // return | |
| 1248 | + if (this.data.hasOtherCard && !this.data.otherCardtypeData.selected && this.data.otherCardtypeData.isrequre) { | |
| 1249 | + this.showtoast('请选择其他证照类型'); | |
| 1250 | + return | |
| 1246 | 1251 | } |
| 1247 | - if (this.data.hasOtherCard && !formdata.other_card_number.length) { | |
| 1248 | - // this.showtoast('请输入其他证照号码'); | |
| 1249 | - // return | |
| 1252 | + if (this.data.hasOtherCard && !(formdata.other_card_number && formdata.other_card_number.length) && this.data.otherCardtypeData.isrequre) { | |
| 1253 | + this.showtoast('请输入其他证照号码'); | |
| 1254 | + return | |
| 1250 | 1255 | } else if (this.data.otherCardtypeData.selected.indexOf('居住证') > -1 && !reg_18_Number.test(formdata.other_card_number)) { |
| 1251 | 1256 | this.showtoast('其他证照号码有误'); |
| 1252 | 1257 | return | ... | ... |
| ... | ... | @@ -77,18 +77,20 @@ |
| 77 | 77 | <view class="divide_line_30"></view> |
| 78 | 78 | <template is="picker_cell_normal" data="{{...taxReasonData}}" /> |
| 79 | 79 | </view> |
| 80 | - <view hidden='{{!isshow01}}'> | |
| 81 | - <view wx:if='{{hasOtherCard}}'> | |
| 80 | + <view wx:if='{{hasOtherCard}}'> | |
| 81 | + <view wx:if='{{isshow01 || otherCardtypeData.isrequre}}'> | |
| 82 | 82 | <view class="divide_line_30"></view> |
| 83 | 83 | <template is="picker_cell_normal" data="{{...otherCardtypeData}}" /> |
| 84 | 84 | <view class="divide_line_30"></view> |
| 85 | 85 | <view class='item_body'> |
| 86 | - <!-- <text class='red_star_right_10'>*</text> --> | |
| 87 | - <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>其他证照号码</text> | |
| 86 | + <text wx:if='{{otherCardtypeData.isrequre}}' class='red_star_right_10'>*</text> | |
| 87 | + <text class="text_777_30 float_left {{otherCardtypeData.isrequre?'':'head_in'}}"style='line-height: 90rpx'>其他证照号码</text> | |
| 88 | 88 | <view> |
| 89 | 89 | <input class='input_wrap' placeholder="请输入证照号码" value="{{other_card_number}}" name='other_card_number' maxlength='20'></input> |
| 90 | 90 | </view> |
| 91 | 91 | </view> |
| 92 | + </view> | |
| 93 | + <view wx:if='{{isshow01}}'> | |
| 92 | 94 | <view class="divide_line_30"></view> |
| 93 | 95 | <view class='item_body'> |
| 94 | 96 | <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>{{nameText}}</text> | ... | ... |
请
注册
或
登录
后发表评论