正在显示
4 个修改的文件
包含
84 行增加
和
21 行删除
1 | // pages/main/addtionalreduce/addextrainfo/addextrainfo.js | 1 | // pages/main/addtionalreduce/addextrainfo/addextrainfo.js |
2 | var format = require('../../../../utils/util.js'); | 2 | var format = require('../../../../utils/util.js'); |
3 | -var countryInfo = require('../../../../utils/country.js'); | 3 | +// var countryInfo = require('../../../../utils/country.js'); |
4 | var OSSInit; | 4 | var OSSInit; |
5 | var app = getApp(); | 5 | var app = getApp(); |
6 | var baseUrl = app.globalData.baseUrl; | 6 | var baseUrl = app.globalData.baseUrl; |
@@ -384,7 +384,7 @@ Page({ | @@ -384,7 +384,7 @@ Page({ | ||
384 | selected: '', | 384 | selected: '', |
385 | isrequre: true, | 385 | isrequre: true, |
386 | isblack: 'true', | 386 | isblack: 'true', |
387 | - values: ["企业", "个人"], | 387 | + values: ["组织", "个人"], |
388 | placeholder: '请选择出租方类型', | 388 | placeholder: '请选择出租方类型', |
389 | onChange: 'onPickerSelect' | 389 | onChange: 'onPickerSelect' |
390 | }, | 390 | }, |
@@ -557,10 +557,14 @@ Page({ | @@ -557,10 +557,14 @@ Page({ | ||
557 | // deduction_amount = Deduce_amounts_year[nameKey] ? Deduce_amounts_year[nameKey] : 0 | 557 | // deduction_amount = Deduce_amounts_year[nameKey] ? Deduce_amounts_year[nameKey] : 0 |
558 | } | 558 | } |
559 | if ("children_education" == options.status) { | 559 | if ("children_education" == options.status) { |
560 | - this.loadCountry() | 560 | + this.getCountry() |
561 | if (options.isedit != 'true'){ | 561 | if (options.isedit != 'true'){ |
562 | this.getTaxList() | 562 | this.getTaxList() |
563 | } | 563 | } |
564 | + this.data.taxperson_relativeData.values = ['子','女'] | ||
565 | + this.setData({ | ||
566 | + taxperson_relativeData: this.data.taxperson_relativeData | ||
567 | + }) | ||
564 | } else if ("continuing_education" == options.status) { | 568 | } else if ("continuing_education" == options.status) { |
565 | this.getCertificates() | 569 | this.getCertificates() |
566 | var studystart_date = this.data.studystartdate | 570 | var studystart_date = this.data.studystartdate |
@@ -722,16 +726,56 @@ Page({ | @@ -722,16 +726,56 @@ Page({ | ||
722 | } | 726 | } |
723 | }) | 727 | }) |
724 | }, | 728 | }, |
725 | - loadCountry: function() { | ||
726 | - countryInfo.init(this) | ||
727 | - var countrylist = this.data.country | ||
728 | - var country_data = this.data.schoolCountryData | ||
729 | - for (var i = 0; i < countrylist.length; i++) { | ||
730 | - country_data.values.push(countrylist[i].name) | ||
731 | - } | ||
732 | - console.log("countrydata", country_data) | ||
733 | - this.setData({ | ||
734 | - schoolCountryData: country_data | 729 | + // loadCountry: function() { |
730 | + // countryInfo.init(this) | ||
731 | + // var countrylist = this.data.country | ||
732 | + // var country_data = this.data.schoolCountryData | ||
733 | + // for (var i = 0; i < countrylist.length; i++) { | ||
734 | + // country_data.values.push(countrylist[i].name) | ||
735 | + // } | ||
736 | + // console.log("countrydata", country_data) | ||
737 | + // this.setData({ | ||
738 | + // schoolCountryData: country_data | ||
739 | + // }) | ||
740 | + // }, | ||
741 | + | ||
742 | + //****************获取国籍数据************/ | ||
743 | + getCountry: function () { | ||
744 | + var that = this | ||
745 | + wx.showLoading() | ||
746 | + var Authorization = app.globalData.Authorization; | ||
747 | + wx.request({ | ||
748 | + url: baseUrl + 'persontax/v1/nation-list', | ||
749 | + method: "GET", | ||
750 | + header: { | ||
751 | + 'content-type': 'application/json', // 默认值 | ||
752 | + "Authorization": Authorization | ||
753 | + }, | ||
754 | + success: function (res) { | ||
755 | + var countrys = res.data.concat() | ||
756 | + if (countrys.indexOf('中国') > -1) { | ||
757 | + countrys.splice(countrys.indexOf('中国'), 1); | ||
758 | + } | ||
759 | + if (countrys.indexOf('中国台湾') > -1) { | ||
760 | + countrys.splice(countrys.indexOf('中国台湾'), 1); | ||
761 | + } | ||
762 | + if (countrys.indexOf('香港') > -1) { | ||
763 | + countrys.splice(countrys.indexOf('香港'), 1); | ||
764 | + } | ||
765 | + if (countrys.indexOf('澳门') > -1) { | ||
766 | + countrys.splice(countrys.indexOf('澳门'), 1); | ||
767 | + } | ||
768 | + // that.data.countryData.values = countrys | ||
769 | + that.data.schoolCountryData.values = res.data | ||
770 | + that.countrys = countrys | ||
771 | + that.setData({ | ||
772 | + // countryData: that.data.countryData, | ||
773 | + schoolCountryData: that.data.schoolCountryData | ||
774 | + }) | ||
775 | + }, | ||
776 | + complete() { | ||
777 | + wx.hideLoading() | ||
778 | + } | ||
735 | }) | 779 | }) |
736 | }, | 780 | }, |
737 | handlEditData: function (data) { | 781 | handlEditData: function (data) { |
@@ -741,6 +785,10 @@ Page({ | @@ -741,6 +785,10 @@ Page({ | ||
741 | switch (this.data.cur_index + '') { | 785 | switch (this.data.cur_index + '') { |
742 | case 'children_education': | 786 | case 'children_education': |
743 | var setData = {} | 787 | var setData = {} |
788 | + if (data.relationship && data.relationship.length) { | ||
789 | + this.data.taxperson_relativeData.selected = data.relationship | ||
790 | + setData.taxperson_relativeData = this.data.taxperson_relativeData | ||
791 | + } | ||
744 | var commonbirthDate = this.data.commonbirthDate | 792 | var commonbirthDate = this.data.commonbirthDate |
745 | commonbirthDate.selected = format.formatTime_date(data.birth_date) | 793 | commonbirthDate.selected = format.formatTime_date(data.birth_date) |
746 | commonbirthDate.datelong = data.birth_date | 794 | commonbirthDate.datelong = data.birth_date |
@@ -753,9 +801,11 @@ Page({ | @@ -753,9 +801,11 @@ Page({ | ||
753 | studystartdate.datelong = data.education_start | 801 | studystartdate.datelong = data.education_start |
754 | setData.studystartdate = studystartdate | 802 | setData.studystartdate = studystartdate |
755 | var studyEndDate = this.data.studyEndDate | 803 | var studyEndDate = this.data.studyEndDate |
756 | - studyEndDate.selected = format.formatTime_month(data.education_end) | ||
757 | - studyEndDate.datelong = data.education_end | ||
758 | - setData.studyEndDate = studyEndDate | 804 | + if (data.education_end > 0) { |
805 | + studyEndDate.selected = format.formatTime_month(data.education_end) | ||
806 | + studyEndDate.datelong = data.education_end | ||
807 | + setData.studyEndDate = studyEndDate | ||
808 | + } | ||
759 | var studyPeriodDate = this.data.studyPeriodDate | 809 | var studyPeriodDate = this.data.studyPeriodDate |
760 | if (data.education_period_end > 0){ | 810 | if (data.education_period_end > 0){ |
761 | studyPeriodDate.selected = format.formatTime_month(data.education_period_end) | 811 | studyPeriodDate.selected = format.formatTime_month(data.education_period_end) |
@@ -937,7 +987,7 @@ Page({ | @@ -937,7 +987,7 @@ Page({ | ||
937 | }) | 987 | }) |
938 | var leasetype_Data = this.data.leasetypeData | 988 | var leasetype_Data = this.data.leasetypeData |
939 | leasetype_Data.selected = data.owner_type | 989 | leasetype_Data.selected = data.owner_type |
940 | - this.data.cardtypeData.hidden = data.owner_type == "企业" | 990 | + this.data.cardtypeData.hidden = data.owner_type == "组织" |
941 | setData.leasetypeData = leasetype_Data, | 991 | setData.leasetypeData = leasetype_Data, |
942 | setData.cardtypeData = this.data.cardtypeData | 992 | setData.cardtypeData = this.data.cardtypeData |
943 | setData.owner_name = data.owner_name | 993 | setData.owner_name = data.owner_name |
@@ -1057,6 +1107,11 @@ Page({ | @@ -1057,6 +1107,11 @@ Page({ | ||
1057 | if (data.name && data.name.length) { | 1107 | if (data.name && data.name.length) { |
1058 | setData.children_name = data.name | 1108 | setData.children_name = data.name |
1059 | } | 1109 | } |
1110 | + if (data.family_ties && data.family_ties.length) { | ||
1111 | + var taxperson_relativeData = this.data.taxperson_relativeData | ||
1112 | + taxperson_relativeData.selected = data.family_ties | ||
1113 | + setData.taxperson_relativeData = taxperson_relativeData | ||
1114 | + } | ||
1060 | this.setData(setData) | 1115 | this.setData(setData) |
1061 | break; | 1116 | break; |
1062 | case 'support_duty': | 1117 | case 'support_duty': |
@@ -1327,6 +1382,11 @@ Page({ | @@ -1327,6 +1382,11 @@ Page({ | ||
1327 | // this.showToast('请选择子女出生日期') | 1382 | // this.showToast('请选择子女出生日期') |
1328 | // return | 1383 | // return |
1329 | // } | 1384 | // } |
1385 | + | ||
1386 | + if (this.data.taxperson_relativeData.selected.length < 1) { | ||
1387 | + this.showToast('请选择与纳税人关系') | ||
1388 | + return | ||
1389 | + } | ||
1330 | if (this.data.childrenpercentData.selected.length < 1) { | 1390 | if (this.data.childrenpercentData.selected.length < 1) { |
1331 | this.showToast('请选择分配比例') | 1391 | this.showToast('请选择分配比例') |
1332 | return | 1392 | return |
@@ -1654,7 +1714,7 @@ Page({ | @@ -1654,7 +1714,7 @@ Page({ | ||
1654 | this.showToast('请填写出租方名称') | 1714 | this.showToast('请填写出租方名称') |
1655 | return | 1715 | return |
1656 | } | 1716 | } |
1657 | - if (this.data.leasetypeData.selected=='企业'){ | 1717 | + if (this.data.leasetypeData.selected =='组织'){ |
1658 | if (!formdata.owner_credit_no || formdata.owner_credit_no.length < 1) { | 1718 | if (!formdata.owner_credit_no || formdata.owner_credit_no.length < 1) { |
1659 | this.showToast('请填写统一社会信用代码') | 1719 | this.showToast('请填写统一社会信用代码') |
1660 | return | 1720 | return |
@@ -2276,7 +2336,7 @@ Page({ | @@ -2276,7 +2336,7 @@ Page({ | ||
2276 | case 'lease_type': | 2336 | case 'lease_type': |
2277 | var leasetype_Data = this.data.leasetypeData | 2337 | var leasetype_Data = this.data.leasetypeData |
2278 | leasetype_Data.selected = leasetype_Data.values[e.detail.value] | 2338 | leasetype_Data.selected = leasetype_Data.values[e.detail.value] |
2279 | - this.data.cardtypeData.hidden = leasetype_Data.selected == "企业" | 2339 | + this.data.cardtypeData.hidden = leasetype_Data.selected == "组织" |
2280 | this.setData({ | 2340 | this.setData({ |
2281 | leasetypeData: leasetype_Data, | 2341 | leasetypeData: leasetype_Data, |
2282 | cardtypeData: this.data.cardtypeData | 2342 | cardtypeData: this.data.cardtypeData |
@@ -33,6 +33,8 @@ | @@ -33,6 +33,8 @@ | ||
33 | <text class='text_777_30 float_left'>国籍</text> | 33 | <text class='text_777_30 float_left'>国籍</text> |
34 | <text class='text_black_30 float_right' style='line-height: 90rpx;text-align:right' name='children_country'>中国</text> | 34 | <text class='text_black_30 float_right' style='line-height: 90rpx;text-align:right' name='children_country'>中国</text> |
35 | </view> | 35 | </view> |
36 | + <view class='divide_line_30'></view> | ||
37 | + <template is="picker_cell_normal" data="{{...taxperson_relativeData}}" /> | ||
36 | </view> | 38 | </view> |
37 | 39 | ||
38 | <view style='height:20rpx;width:100%;background:#F8F8F8;'></view> | 40 | <view style='height:20rpx;width:100%;background:#F8F8F8;'></view> |
@@ -38,6 +38,7 @@ Page({ | @@ -38,6 +38,7 @@ Page({ | ||
38 | }, | 38 | }, |
39 | cardtypeData: { | 39 | cardtypeData: { |
40 | isrequre: true, | 40 | isrequre: true, |
41 | + disabled: true, | ||
41 | label: '证照类型', | 42 | label: '证照类型', |
42 | bindtype: 'cardtype', | 43 | bindtype: 'cardtype', |
43 | placeholder: '请选择证照类型', | 44 | placeholder: '请选择证照类型', |
@@ -242,7 +243,7 @@ Page({ | @@ -242,7 +243,7 @@ Page({ | ||
242 | // birthDate: that.data.birthDate, | 243 | // birthDate: that.data.birthDate, |
243 | card_number: id_info.id_card_number | 244 | card_number: id_info.id_card_number |
244 | }) | 245 | }) |
245 | - // that.dealIdInfo(id_info.id_card_number) | 246 | + that.dealIdInfo(id_info.id_card_number) |
246 | } | 247 | } |
247 | }, | 248 | }, |
248 | }) | 249 | }) |
@@ -27,7 +27,7 @@ | @@ -27,7 +27,7 @@ | ||
27 | <input class='input_wrap' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='id_card_no' maxlength='18' value='{{card_number}}' bindblur="idDone" bindinput="idChange" disabled='{{isDisable}}' type='idcard' ></input> | 27 | <input class='input_wrap' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='id_card_no' maxlength='18' value='{{card_number}}' bindblur="idDone" bindinput="idChange" disabled='{{isDisable}}' type='idcard' ></input> |
28 | </view> | 28 | </view> |
29 | <view wx:else> | 29 | <view wx:else> |
30 | - <input class='input_wrap' placeholder='请输入证照号码' placeholder-class='text_999_30' name='id_card_no' maxlength='30' type="idcard" value='{{card_number}}' bindblur="idDone" bindinput="idChange" disabled='{{isDisable}}'></input> | 30 | + <input class='input_wrap' placeholder='请输入证照号码' placeholder-class='text_999_30' name='id_card_no' maxlength='30' value='{{card_number}}' bindblur="idDone" bindinput="idChange" disabled='{{isDisable}}'></input> |
31 | </view> | 31 | </view> |
32 | </view> | 32 | </view> |
33 | <view class="divide_line_30"></view> | 33 | <view class="divide_line_30"></view> |
请
注册
或
登录
后发表评论