正在显示
2 个修改的文件
包含
129 行增加
和
47 行删除
| @@ -66,7 +66,7 @@ Page({ | @@ -66,7 +66,7 @@ Page({ | ||
| 66 | lovercardtypeData: { | 66 | lovercardtypeData: { |
| 67 | label: '配偶证照类型', | 67 | label: '配偶证照类型', |
| 68 | bindtype: 'lovercardtype', | 68 | bindtype: 'lovercardtype', |
| 69 | - // selected: '居民身份证', | 69 | + selected: '', |
| 70 | disabled: true, | 70 | disabled: true, |
| 71 | placeholder: '请选择证照类型', | 71 | placeholder: '请选择证照类型', |
| 72 | values: cardTypeArray, | 72 | values: cardTypeArray, |
| @@ -119,7 +119,7 @@ Page({ | @@ -119,7 +119,7 @@ Page({ | ||
| 119 | label: '子女证照类型', | 119 | label: '子女证照类型', |
| 120 | isrequre: true, | 120 | isrequre: true, |
| 121 | bindtype: 'childrencardtype', | 121 | bindtype: 'childrencardtype', |
| 122 | - selected: '居民身份证', | 122 | + selected: '', |
| 123 | // disabled: true, | 123 | // disabled: true, |
| 124 | isblack: 'true', | 124 | isblack: 'true', |
| 125 | placeholder: '请选择证照类型', | 125 | placeholder: '请选择证照类型', |
| @@ -225,7 +225,7 @@ Page({ | @@ -225,7 +225,7 @@ Page({ | ||
| 225 | isrequre: true, | 225 | isrequre: true, |
| 226 | // disabled: true, | 226 | // disabled: true, |
| 227 | bindtype: 'oldercardtype', | 227 | bindtype: 'oldercardtype', |
| 228 | - selected: '居民身份证', | 228 | + selected: '', |
| 229 | isblack: 'true', | 229 | isblack: 'true', |
| 230 | placeholder: '请选择被赡养人证照类型', | 230 | placeholder: '请选择被赡养人证照类型', |
| 231 | values: cardTypeArray, | 231 | values: cardTypeArray, |
| @@ -234,8 +234,8 @@ Page({ | @@ -234,8 +234,8 @@ Page({ | ||
| 234 | cardtypeData: { | 234 | cardtypeData: { |
| 235 | label: '证照类型', | 235 | label: '证照类型', |
| 236 | isrequre: true, | 236 | isrequre: true, |
| 237 | - bindtype: 'cardtype', | ||
| 238 | - selected: '居民身份证', | 237 | + bindtype: 'ownercardtype', |
| 238 | + selected: '', | ||
| 239 | // disabled: true, | 239 | // disabled: true, |
| 240 | isblack: 'true', | 240 | isblack: 'true', |
| 241 | placeholder: '证照类型', | 241 | placeholder: '证照类型', |
| @@ -555,7 +555,7 @@ Page({ | @@ -555,7 +555,7 @@ Page({ | ||
| 555 | * Lifecycle function--Called when page load | 555 | * Lifecycle function--Called when page load |
| 556 | */ | 556 | */ |
| 557 | onLoad: function(options) { | 557 | onLoad: function(options) { |
| 558 | - | 558 | + this.getCountry() |
| 559 | this.getTaxHostInfo() | 559 | this.getTaxHostInfo() |
| 560 | var pages = getCurrentPages() | 560 | var pages = getCurrentPages() |
| 561 | var frontPage = pages[pages.length - 2] | 561 | var frontPage = pages[pages.length - 2] |
| @@ -577,7 +577,6 @@ Page({ | @@ -577,7 +577,6 @@ Page({ | ||
| 577 | // deduction_amount = Deduce_amounts_year[nameKey] ? Deduce_amounts_year[nameKey] : 0 | 577 | // deduction_amount = Deduce_amounts_year[nameKey] ? Deduce_amounts_year[nameKey] : 0 |
| 578 | } | 578 | } |
| 579 | if ("children_education" == options.status) { | 579 | if ("children_education" == options.status) { |
| 580 | - this.getCountry() | ||
| 581 | if (options.isedit != 'true'){ | 580 | if (options.isedit != 'true'){ |
| 582 | this.getTaxList() | 581 | this.getTaxList() |
| 583 | } | 582 | } |
| @@ -770,9 +769,15 @@ Page({ | @@ -770,9 +769,15 @@ Page({ | ||
| 770 | // }, | 769 | // }, |
| 771 | 770 | ||
| 772 | //****************获取国籍数据************/ | 771 | //****************获取国籍数据************/ |
| 773 | - getCountry: function () { | 772 | + getCountry: function (cb) { |
| 774 | var that = this | 773 | var that = this |
| 775 | wx.showLoading() | 774 | wx.showLoading() |
| 775 | + if (that.countrys && that.countrys.length > 0) { | ||
| 776 | + typeof cb == "function" && cb(that.countrys) | ||
| 777 | + console.log('----直接取值') | ||
| 778 | + wx.hideLoading() | ||
| 779 | + return | ||
| 780 | + } | ||
| 776 | var Authorization = app.globalData.Authorization; | 781 | var Authorization = app.globalData.Authorization; |
| 777 | wx.request({ | 782 | wx.request({ |
| 778 | url: baseUrl + 'persontax/v1/nation-list', | 783 | url: baseUrl + 'persontax/v1/nation-list', |
| @@ -799,10 +804,9 @@ Page({ | @@ -799,10 +804,9 @@ Page({ | ||
| 799 | that.data.schoolCountryData.values = res.data | 804 | that.data.schoolCountryData.values = res.data |
| 800 | that.countrys = countrys | 805 | that.countrys = countrys |
| 801 | that.setData({ | 806 | that.setData({ |
| 802 | - ///////////////////////////需对照addinfo完善 | ||
| 803 | - // countryData: that.data.countryData, | ||
| 804 | schoolCountryData: that.data.schoolCountryData | 807 | schoolCountryData: that.data.schoolCountryData |
| 805 | }) | 808 | }) |
| 809 | + typeof cb == "function" && cb(countrys) | ||
| 806 | }, | 810 | }, |
| 807 | complete() { | 811 | complete() { |
| 808 | wx.hideLoading() | 812 | wx.hideLoading() |
| @@ -824,8 +828,8 @@ Page({ | @@ -824,8 +828,8 @@ Page({ | ||
| 824 | setData.taxperson_relativeData = this.data.taxperson_relativeData | 828 | setData.taxperson_relativeData = this.data.taxperson_relativeData |
| 825 | } | 829 | } |
| 826 | var commonbirthDate = this.data.commonbirthDate | 830 | var commonbirthDate = this.data.commonbirthDate |
| 827 | - commonbirthDate.selected = format.formatTime_date(data.birth_date) | ||
| 828 | - commonbirthDate.datelong = data.birth_date | 831 | + commonbirthDate.selected = format.formatTime_date(data.children_birthday) |
| 832 | + commonbirthDate.datelong = data.children_birthday | ||
| 829 | setData.commonbirthDate = commonbirthDate | 833 | setData.commonbirthDate = commonbirthDate |
| 830 | var childrenpercentData = this.data.childrenpercentData | 834 | var childrenpercentData = this.data.childrenpercentData |
| 831 | childrenpercentData.selected = data.percent + '%' | 835 | childrenpercentData.selected = data.percent + '%' |
| @@ -954,9 +958,11 @@ Page({ | @@ -954,9 +958,11 @@ Page({ | ||
| 954 | this.dealCardType(data.id_card_type, 'oldercardtype')//为防止干扰其他字段,需要先执行 | 958 | this.dealCardType(data.id_card_type, 'oldercardtype')//为防止干扰其他字段,需要先执行 |
| 955 | var setData = {} | 959 | var setData = {} |
| 956 | var olderbirthDate = this.data.olderbirthDate | 960 | var olderbirthDate = this.data.olderbirthDate |
| 957 | - olderbirthDate.selected = format.formatTime_date(data.birth_date) | ||
| 958 | - olderbirthDate.datelong = data.birth_date | 961 | + olderbirthDate.selected = format.formatTime_date(data.birthday) |
| 962 | + olderbirthDate.datelong = data.birthday | ||
| 959 | setData.olderbirthDate = olderbirthDate | 963 | setData.olderbirthDate = olderbirthDate |
| 964 | + this.data.olderCountryData.selected = data.nation | ||
| 965 | + setData.olderCountryData = this.data.olderCountryData | ||
| 960 | if (data.supported_name && data.supported_name.length) { | 966 | if (data.supported_name && data.supported_name.length) { |
| 961 | setData.supported_name = data.supported_name | 967 | setData.supported_name = data.supported_name |
| 962 | } | 968 | } |
| @@ -1008,7 +1014,7 @@ Page({ | @@ -1008,7 +1014,7 @@ Page({ | ||
| 1008 | if (data.spouse_name && data.spouse_name.length) { | 1014 | if (data.spouse_name && data.spouse_name.length) { |
| 1009 | setData.spouse_name = data.spouse_name | 1015 | setData.spouse_name = data.spouse_name |
| 1010 | } | 1016 | } |
| 1011 | - this.dealCardType(data.spouse_id_card_type, 'lovercardtype') | 1017 | + this.dealCardType(data.id_card_type, 'lovercardtype') |
| 1012 | if (data.id_card_no && data.id_card_no.length) { | 1018 | if (data.id_card_no && data.id_card_no.length) { |
| 1013 | setData.spouse_id_card_no = data.id_card_no | 1019 | setData.spouse_id_card_no = data.id_card_no |
| 1014 | if ('居民身份证' == data.id_card_type) { | 1020 | if ('居民身份证' == data.id_card_type) { |
| @@ -1016,6 +1022,7 @@ Page({ | @@ -1016,6 +1022,7 @@ Page({ | ||
| 1016 | } | 1022 | } |
| 1017 | } | 1023 | } |
| 1018 | if (this.data.house_type == 'house_fund_rent'){ | 1024 | if (this.data.house_type == 'house_fund_rent'){ |
| 1025 | + this.dealCardType(data.owner_id_card_type, 'ownercardtype')//为防止干扰其他字段,需要先执行 | ||
| 1019 | var workingcityInfo = this.data.workingcityInfo | 1026 | var workingcityInfo = this.data.workingcityInfo |
| 1020 | workingcityInfo.requestdata = data.work_city | 1027 | workingcityInfo.requestdata = data.work_city |
| 1021 | workingcityInfo.selected = data.work_city.province + data.work_city.city | 1028 | workingcityInfo.selected = data.work_city.province + data.work_city.city |
| @@ -1415,6 +1422,10 @@ Page({ | @@ -1415,6 +1422,10 @@ Page({ | ||
| 1415 | switch (this.data.cur_index + '') { | 1422 | switch (this.data.cur_index + '') { |
| 1416 | case 'children_education': | 1423 | case 'children_education': |
| 1417 | subUrl = 'persontax/v1/children-educations' | 1424 | subUrl = 'persontax/v1/children-educations' |
| 1425 | + if (this.data.childrencardtypeData.selected.length < 1) { | ||
| 1426 | + this.showToast('请选择证照类型') | ||
| 1427 | + return | ||
| 1428 | + } | ||
| 1418 | if (!formdata.children_id_card_no || formdata.children_id_card_no.length < 1) { | 1429 | if (!formdata.children_id_card_no || formdata.children_id_card_no.length < 1) { |
| 1419 | this.showToast('请填写子女证照号码') | 1430 | this.showToast('请填写子女证照号码') |
| 1420 | return | 1431 | return |
| @@ -1435,11 +1446,14 @@ Page({ | @@ -1435,11 +1446,14 @@ Page({ | ||
| 1435 | this.showToast('请填写子女姓名') | 1446 | this.showToast('请填写子女姓名') |
| 1436 | return | 1447 | return |
| 1437 | } | 1448 | } |
| 1438 | - // if (this.data.commonbirthDate.selected.length < 1) { | ||
| 1439 | - // this.showToast('请选择子女出生日期') | ||
| 1440 | - // return | ||
| 1441 | - // } | ||
| 1442 | - | 1449 | + if (this.data.commonbirthDate.selected.length < 1) { |
| 1450 | + this.showToast('请选择子女出生日期') | ||
| 1451 | + return | ||
| 1452 | + } | ||
| 1453 | + if (this.data.countryData.selected.length < 1) { | ||
| 1454 | + this.showToast('请选择国籍') | ||
| 1455 | + return | ||
| 1456 | + } | ||
| 1443 | if (this.data.taxperson_relativeData.selected.length < 1) { | 1457 | if (this.data.taxperson_relativeData.selected.length < 1) { |
| 1444 | this.showToast('请选择与纳税人关系') | 1458 | this.showToast('请选择与纳税人关系') |
| 1445 | return | 1459 | return |
| @@ -1487,7 +1501,10 @@ Page({ | @@ -1487,7 +1501,10 @@ Page({ | ||
| 1487 | if (!formdata.spouse_name || formdata.spouse_name.length < 1) { | 1501 | if (!formdata.spouse_name || formdata.spouse_name.length < 1) { |
| 1488 | this.showToast('请填写配偶姓名') | 1502 | this.showToast('请填写配偶姓名') |
| 1489 | return | 1503 | return |
| 1490 | - } else if (!formdata.spouse_id_card_no || formdata.spouse_id_card_no.length < 1) { | 1504 | + } if (this.data.lovercardtypeData.selected.length < 1) { |
| 1505 | + this.showToast('请选择配偶证照类型') | ||
| 1506 | + return | ||
| 1507 | + } if (!formdata.spouse_id_card_no || formdata.spouse_id_card_no.length < 1) { | ||
| 1491 | this.showToast('请填写配偶证照号码') | 1508 | this.showToast('请填写配偶证照号码') |
| 1492 | return | 1509 | return |
| 1493 | } else if (this.data.isIdCard_lover && !format.isIDCardNum(formdata.spouse_id_card_no)) { | 1510 | } else if (this.data.isIdCard_lover && !format.isIDCardNum(formdata.spouse_id_card_no)) { |
| @@ -1497,8 +1514,13 @@ Page({ | @@ -1497,8 +1514,13 @@ Page({ | ||
| 1497 | this.showToast('请选择配偶出生日期') | 1514 | this.showToast('请选择配偶出生日期') |
| 1498 | return | 1515 | return |
| 1499 | } | 1516 | } |
| 1517 | + if (this.data.loverCountryData.selected.length < 1) { | ||
| 1518 | + this.showToast('请选择配偶国籍') | ||
| 1519 | + return | ||
| 1520 | + } | ||
| 1500 | newdata.spouse_id_card_type = this.data.lovercardtypeData.selected | 1521 | newdata.spouse_id_card_type = this.data.lovercardtypeData.selected |
| 1501 | newdata.spouse_birthday = this.data.loverbirthDate.datelong | 1522 | newdata.spouse_birthday = this.data.loverbirthDate.datelong |
| 1523 | + newdata.nation = this.data.loverCountryData.selected | ||
| 1502 | } | 1524 | } |
| 1503 | newdata.has_spouse = this.data.hasLover?'y':'n' | 1525 | newdata.has_spouse = this.data.hasLover?'y':'n' |
| 1504 | newdata.relationship = this.data.taxperson_relativeData.selected | 1526 | newdata.relationship = this.data.taxperson_relativeData.selected |
| @@ -1511,7 +1533,6 @@ Page({ | @@ -1511,7 +1533,6 @@ Page({ | ||
| 1511 | newdata.education_period = this.data.childedudegreeData.selected | 1533 | newdata.education_period = this.data.childedudegreeData.selected |
| 1512 | newdata.school_country = this.data.schoolCountryData.selected | 1534 | newdata.school_country = this.data.schoolCountryData.selected |
| 1513 | newdata.children_nation = this.data.countryData.selected//"中国" | 1535 | newdata.children_nation = this.data.countryData.selected//"中国" |
| 1514 | - newdata.nation = "中国" | ||
| 1515 | break; | 1536 | break; |
| 1516 | case 'continuing_education': | 1537 | case 'continuing_education': |
| 1517 | subUrl = 'persontax/v1/continuing-educations' | 1538 | subUrl = 'persontax/v1/continuing-educations' |
| @@ -1602,16 +1623,16 @@ Page({ | @@ -1602,16 +1623,16 @@ Page({ | ||
| 1602 | this.showToast('请选择被赡养人证照类型') | 1623 | this.showToast('请选择被赡养人证照类型') |
| 1603 | return | 1624 | return |
| 1604 | } else if (!formdata.id_card_no || formdata.id_card_no.length < 1) { | 1625 | } else if (!formdata.id_card_no || formdata.id_card_no.length < 1) { |
| 1605 | - this.showToast('请填写被赡养人证照号') | 1626 | + this.showToast('请填写证照号') |
| 1606 | return | 1627 | return |
| 1607 | } else if (this.data.isIdCard_older && !format.isIDCardNum(formdata.id_card_no)) { | 1628 | } else if (this.data.isIdCard_older && !format.isIDCardNum(formdata.id_card_no)) { |
| 1608 | this.showToast('被赡养人身份证格式有误') | 1629 | this.showToast('被赡养人身份证格式有误') |
| 1609 | return | 1630 | return |
| 1610 | } | 1631 | } |
| 1611 | - // if (this.data.olderbirthDate.selected.length < 1) { | ||
| 1612 | - // this.showToast('请选择被赡养人出生日期') | ||
| 1613 | - // return | ||
| 1614 | - // } | 1632 | + if (this.data.olderbirthDate.selected.length < 1) { |
| 1633 | + this.showToast('请选择出生日期') | ||
| 1634 | + return | ||
| 1635 | + } | ||
| 1615 | if (format.getAge(this.data.olderbirthDate.selected) < 60) { | 1636 | if (format.getAge(this.data.olderbirthDate.selected) < 60) { |
| 1616 | this.showToast('被赡养人年龄不足60岁,不可申报') | 1637 | this.showToast('被赡养人年龄不足60岁,不可申报') |
| 1617 | return | 1638 | return |
| @@ -1620,6 +1641,10 @@ Page({ | @@ -1620,6 +1641,10 @@ Page({ | ||
| 1620 | this.showToast('被赡养人年龄应大于本人'); | 1641 | this.showToast('被赡养人年龄应大于本人'); |
| 1621 | return | 1642 | return |
| 1622 | } | 1643 | } |
| 1644 | + if (this.data.olderCountryData.selected.length < 1) { | ||
| 1645 | + this.showToast('请选择国籍') | ||
| 1646 | + return | ||
| 1647 | + } | ||
| 1623 | if (this.data.older_relativeData.selected.length < 1) { | 1648 | if (this.data.older_relativeData.selected.length < 1) { |
| 1624 | this.showToast('请选择与纳税人关系') | 1649 | this.showToast('请选择与纳税人关系') |
| 1625 | return | 1650 | return |
| @@ -1637,8 +1662,8 @@ Page({ | @@ -1637,8 +1662,8 @@ Page({ | ||
| 1637 | } | 1662 | } |
| 1638 | newdata.birthday = this.data.olderbirthDate.datelong | 1663 | newdata.birthday = this.data.olderbirthDate.datelong |
| 1639 | newdata.relationship = this.data.older_relativeData.selected | 1664 | newdata.relationship = this.data.older_relativeData.selected |
| 1640 | - newdata.id_card_type = '居民身份证' //this.data.oldercardtypeData.selected | ||
| 1641 | - newdata.nation = "中国" | 1665 | + newdata.id_card_type = this.data.oldercardtypeData.selected |
| 1666 | + newdata.nation = this.data.olderCountryData.selected | ||
| 1642 | break; | 1667 | break; |
| 1643 | case 'medical_fund': | 1668 | case 'medical_fund': |
| 1644 | subUrl = 'persontax/v1/medical-funds' | 1669 | subUrl = 'persontax/v1/medical-funds' |
| @@ -1676,7 +1701,7 @@ Page({ | @@ -1676,7 +1701,7 @@ Page({ | ||
| 1676 | 1701 | ||
| 1677 | newdata.total_amount = parseFloat(formdata.total_amount) | 1702 | newdata.total_amount = parseFloat(formdata.total_amount) |
| 1678 | newdata.amount_by_person = parseFloat(formdata.amount_by_person) | 1703 | newdata.amount_by_person = parseFloat(formdata.amount_by_person) |
| 1679 | - newdata.id_card_type = '居民身份证'//this.data.cardtypeData.selected | 1704 | + newdata.id_card_type = this.data.cardtypeData.selected |
| 1680 | newdata.relationship = this.data.taxperson_relativeData.selected | 1705 | newdata.relationship = this.data.taxperson_relativeData.selected |
| 1681 | newdata.patient_birthday = this.data.commonbirthDate.datelong | 1706 | newdata.patient_birthday = this.data.commonbirthDate.datelong |
| 1682 | newdata.patient_nation = "中国" | 1707 | newdata.patient_nation = "中国" |
| @@ -1778,14 +1803,18 @@ Page({ | @@ -1778,14 +1803,18 @@ Page({ | ||
| 1778 | } | 1803 | } |
| 1779 | newdata.owner_id_card_no = '' | 1804 | newdata.owner_id_card_no = '' |
| 1780 | } else{ | 1805 | } else{ |
| 1806 | + if (this.data.cardtypeData.selected.length < 1) { | ||
| 1807 | + this.showToast('请选择证照类型') | ||
| 1808 | + return | ||
| 1809 | + } | ||
| 1781 | if (!formdata.owner_id_card_no || formdata.owner_id_card_no.length < 1) { | 1810 | if (!formdata.owner_id_card_no || formdata.owner_id_card_no.length < 1) { |
| 1782 | this.showToast('请填写证照号码') | 1811 | this.showToast('请填写证照号码') |
| 1783 | return | 1812 | return |
| 1784 | - } else if (!format.isIDCardNum(formdata.owner_id_card_no)) { | 1813 | + } else if (this.data.isIdCard_owner && !format.isIDCardNum(formdata.owner_id_card_no)) { |
| 1785 | this.showToast('身份证格式有误') | 1814 | this.showToast('身份证格式有误') |
| 1786 | return | 1815 | return |
| 1787 | } | 1816 | } |
| 1788 | - newdata.owner_id_card_type = '居民身份证'//this.data.cardtypeData.selected | 1817 | + newdata.owner_id_card_type = this.data.cardtypeData.selected |
| 1789 | } | 1818 | } |
| 1790 | // if (this.data.rentLocateInfo.address_value[0].length < 1) { | 1819 | // if (this.data.rentLocateInfo.address_value[0].length < 1) { |
| 1791 | // this.showToast('请选择房屋地址') | 1820 | // this.showToast('请选择房屋地址') |
| @@ -1832,6 +1861,10 @@ Page({ | @@ -1832,6 +1861,10 @@ Page({ | ||
| 1832 | if (!formdata.spouse_name || formdata.spouse_name.length < 1) { | 1861 | if (!formdata.spouse_name || formdata.spouse_name.length < 1) { |
| 1833 | this.showToast('请填写配偶姓名') | 1862 | this.showToast('请填写配偶姓名') |
| 1834 | return | 1863 | return |
| 1864 | + } | ||
| 1865 | + if (this.data.lovercardtypeData.selected.length < 1) { | ||
| 1866 | + this.showToast('请选择配偶证照类型') | ||
| 1867 | + return | ||
| 1835 | } else if (!formdata.spouse_id_card_no || formdata.spouse_id_card_no.length < 1) { | 1868 | } else if (!formdata.spouse_id_card_no || formdata.spouse_id_card_no.length < 1) { |
| 1836 | this.showToast('请填写配偶证照号码') | 1869 | this.showToast('请填写配偶证照号码') |
| 1837 | return | 1870 | return |
| @@ -1842,10 +1875,14 @@ Page({ | @@ -1842,10 +1875,14 @@ Page({ | ||
| 1842 | this.showToast('请选择配偶出生日期') | 1875 | this.showToast('请选择配偶出生日期') |
| 1843 | return | 1876 | return |
| 1844 | } | 1877 | } |
| 1878 | + if (this.data.loverCountryData.selected.length < 1) { | ||
| 1879 | + this.showToast('请选择配偶国籍') | ||
| 1880 | + return | ||
| 1881 | + } | ||
| 1845 | newdata.id_card_no = newdata.spouse_id_card_no ? newdata.spouse_id_card_no : '' | 1882 | newdata.id_card_no = newdata.spouse_id_card_no ? newdata.spouse_id_card_no : '' |
| 1846 | newdata.id_card_type = this.data.lovercardtypeData.selected | 1883 | newdata.id_card_type = this.data.lovercardtypeData.selected |
| 1847 | newdata.birthday = this.data.loverbirthDate.datelong | 1884 | newdata.birthday = this.data.loverbirthDate.datelong |
| 1848 | - newdata.nation = "中国" | 1885 | + newdata.nation = this.data.loverCountryData.selected |
| 1849 | } | 1886 | } |
| 1850 | newdata.has_spouse = this.data.hasLover ? 'y' : 'n' | 1887 | newdata.has_spouse = this.data.hasLover ? 'y' : 'n' |
| 1851 | break; | 1888 | break; |
| @@ -1943,6 +1980,11 @@ Page({ | @@ -1943,6 +1980,11 @@ Page({ | ||
| 1943 | return; | 1980 | return; |
| 1944 | } | 1981 | } |
| 1945 | break; | 1982 | break; |
| 1983 | + case 'owner_id_card_no_input': | ||
| 1984 | + if (!this.data.isIdCard_owner) { | ||
| 1985 | + return; | ||
| 1986 | + } | ||
| 1987 | + break; | ||
| 1946 | } | 1988 | } |
| 1947 | var idCardNo = e.detail.value | 1989 | var idCardNo = e.detail.value |
| 1948 | if (e.detail.value.length == 18) { | 1990 | if (e.detail.value.length == 18) { |
| @@ -1974,11 +2016,16 @@ Page({ | @@ -1974,11 +2016,16 @@ Page({ | ||
| 1974 | return; | 2016 | return; |
| 1975 | } | 2017 | } |
| 1976 | break; | 2018 | break; |
| 2019 | + case 'owner_id_card_no_input': | ||
| 2020 | + if (!this.data.isIdCard_owner) { | ||
| 2021 | + return; | ||
| 2022 | + } | ||
| 2023 | + break; | ||
| 1977 | } | 2024 | } |
| 1978 | var idCardNo = e.detail.value | 2025 | var idCardNo = e.detail.value |
| 1979 | if (!idCardNo.length) { | 2026 | if (!idCardNo.length) { |
| 1980 | wx.showToast({ | 2027 | wx.showToast({ |
| 1981 | - title: '请输入身份证号', | 2028 | + title: '请输入证照号码', |
| 1982 | icon: 'none' | 2029 | icon: 'none' |
| 1983 | }) | 2030 | }) |
| 1984 | return; | 2031 | return; |
| @@ -2124,6 +2171,7 @@ Page({ | @@ -2124,6 +2171,7 @@ Page({ | ||
| 2124 | }, | 2171 | }, |
| 2125 | 2172 | ||
| 2126 | dealCardType: function (new_type,witch) { | 2173 | dealCardType: function (new_type,witch) { |
| 2174 | + console.log('new_type', new_type) | ||
| 2127 | var is_idcard, cardtypeData, countryData, birthDate | 2175 | var is_idcard, cardtypeData, countryData, birthDate |
| 2128 | switch (witch) { | 2176 | switch (witch) { |
| 2129 | case 'childrencardtype': | 2177 | case 'childrencardtype': |
| @@ -2141,6 +2189,15 @@ Page({ | @@ -2141,6 +2189,15 @@ Page({ | ||
| 2141 | cardtypeData = this.data.oldercardtypeData | 2189 | cardtypeData = this.data.oldercardtypeData |
| 2142 | birthDate = this.data.olderbirthDate | 2190 | birthDate = this.data.olderbirthDate |
| 2143 | break; | 2191 | break; |
| 2192 | + case 'ownercardtype': | ||
| 2193 | + cardtypeData = this.data.cardtypeData | ||
| 2194 | + cardtypeData.selected = new_type | ||
| 2195 | + this.setData({ | ||
| 2196 | + cardtypeData: cardtypeData, | ||
| 2197 | + isIdCard_owner: ('居民身份证' == new_type), | ||
| 2198 | + }) | ||
| 2199 | + return; | ||
| 2200 | + break; | ||
| 2144 | } | 2201 | } |
| 2145 | 2202 | ||
| 2146 | cardtypeData.selected = new_type | 2203 | cardtypeData.selected = new_type |
| @@ -2165,7 +2222,7 @@ Page({ | @@ -2165,7 +2222,7 @@ Page({ | ||
| 2165 | countryData.selected = '' | 2222 | countryData.selected = '' |
| 2166 | countryData.values = this.countrys ? this.countrys : [] | 2223 | countryData.values = this.countrys ? this.countrys : [] |
| 2167 | countryData.disabled = false | 2224 | countryData.disabled = false |
| 2168 | - } | 2225 | + } |
| 2169 | switch (witch) { | 2226 | switch (witch) { |
| 2170 | case 'childrencardtype': | 2227 | case 'childrencardtype': |
| 2171 | this.setData({ | 2228 | this.setData({ |
| @@ -2192,6 +2249,28 @@ Page({ | @@ -2192,6 +2249,28 @@ Page({ | ||
| 2192 | }) | 2249 | }) |
| 2193 | break; | 2250 | break; |
| 2194 | } | 2251 | } |
| 2252 | + if (countryData.values && countryData.values.length < 1) { | ||
| 2253 | + console.log('-----countrys 还未加载完成 ') | ||
| 2254 | + var that = this, setData = {} | ||
| 2255 | + this.getCountry(function (countrys){ | ||
| 2256 | + console.log('-----countrys 加载完成 ', witch) | ||
| 2257 | + switch (witch) { | ||
| 2258 | + case 'childrencardtype': | ||
| 2259 | + that.data.countryData.values = countrys | ||
| 2260 | + setData.countryData = that.data.childrencardtypeData | ||
| 2261 | + break; | ||
| 2262 | + case 'lovercardtype': | ||
| 2263 | + that.data.loverCountryData.values = countrys | ||
| 2264 | + setData.loverCountryData = that.data.loverCountryData | ||
| 2265 | + break; | ||
| 2266 | + case 'oldercardtype': | ||
| 2267 | + that.data.olderCountryData.values = countrys | ||
| 2268 | + setData.olderCountryData = that.data.olderCountryData | ||
| 2269 | + break; | ||
| 2270 | + } | ||
| 2271 | + that.setData(setData) | ||
| 2272 | + }) | ||
| 2273 | + } | ||
| 2195 | 2274 | ||
| 2196 | }, | 2275 | }, |
| 2197 | onPickerSelect: function(e) { | 2276 | onPickerSelect: function(e) { |
| @@ -2527,12 +2606,15 @@ Page({ | @@ -2527,12 +2606,15 @@ Page({ | ||
| 2527 | return | 2606 | return |
| 2528 | } | 2607 | } |
| 2529 | break; | 2608 | break; |
| 2530 | - case 'cardtype': | ||
| 2531 | - var cardtype_Data = this.data.cardtypeData | ||
| 2532 | - cardtype_Data.selected = cardtype_Data.values[e.detail.value] | ||
| 2533 | - this.setData({ | ||
| 2534 | - cardtypeData: cardtype_Data | ||
| 2535 | - }) | 2609 | + case 'ownercardtype': |
| 2610 | + var cardtypeData = this.data.cardtypeData | ||
| 2611 | + var new_type = cardtypeData.values[e.detail.value] | ||
| 2612 | + if (new_type != cardtypeData.selected) { | ||
| 2613 | + this.dealCardType(new_type, 'ownercardtype') | ||
| 2614 | + this.setData({ | ||
| 2615 | + owner_id_card_no: "" | ||
| 2616 | + }) | ||
| 2617 | + } | ||
| 2536 | break; | 2618 | break; |
| 2537 | case 'identify_type': | 2619 | case 'identify_type': |
| 2538 | var identifytype_Data = this.data.identifytypeData | 2620 | var identifytype_Data = this.data.identifytypeData |
| @@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
| 13 | <text class='text_777_30 float_left' style='line-height: 90rpx'>子女证照号码</text> | 13 | <text class='text_777_30 float_left' style='line-height: 90rpx'>子女证照号码</text> |
| 14 | <view wx:if="{{isIdCard}}"> | 14 | <view wx:if="{{isIdCard}}"> |
| 15 | <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="children_id_card_no" hidden='{{!isIdCard_child}}'></image> | 15 | <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="children_id_card_no" hidden='{{!isIdCard_child}}'></image> |
| 16 | - <input class='input_wrap' style='color:#000;' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='children_id_card_no' maxlength='18' value='{{children_id_card_no}}' bindinput="idChange" bindblur="idDone" id='children_id_card_no_input'></input> | 16 | + <input class='input_wrap' style='color:#000;' placeholder='请输入证照号码' placeholder-class='text_999_30' name='children_id_card_no' maxlength='18' value='{{children_id_card_no}}' bindinput="idChange" bindblur="idDone" id='children_id_card_no_input'></input> |
| 17 | </view> | 17 | </view> |
| 18 | <!-- <view wx:else> | 18 | <!-- <view wx:else> |
| 19 | <input class='input_wrap' placeholder='请输入证照号码' placeholder-class='text_999_30' name='children_id_card_no' maxlength='18' type='idcard' value='{{children_id_card_no}}'></input> | 19 | <input class='input_wrap' placeholder='请输入证照号码' placeholder-class='text_999_30' name='children_id_card_no' maxlength='18' type='idcard' value='{{children_id_card_no}}'></input> |
| @@ -138,7 +138,7 @@ | @@ -138,7 +138,7 @@ | ||
| 138 | <text class='text_777_30 float_left'>被赡养人证照号码</text> | 138 | <text class='text_777_30 float_left'>被赡养人证照号码</text> |
| 139 | <view> | 139 | <view> |
| 140 | <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="older_id_card_no" hidden='{{!isIdCard_older}}'></image> | 140 | <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="older_id_card_no" hidden='{{!isIdCard_older}}'></image> |
| 141 | - <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入或拍摄身份证' maxlength='18' type='idcard' name='id_card_no' value='{{id_card_no}}' bindinput="idChange" bindblur="idDone" id="older_id_card_no_input"></input> | 141 | + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入证照号码' maxlength='18' type='idcard' name='id_card_no' value='{{id_card_no}}' bindinput="idChange" bindblur="idDone" id="older_id_card_no_input"></input> |
| 142 | </view> | 142 | </view> |
| 143 | </view> | 143 | </view> |
| 144 | <view class='divide_line_30'></view> | 144 | <view class='divide_line_30'></view> |
| @@ -176,7 +176,7 @@ | @@ -176,7 +176,7 @@ | ||
| 176 | <text class='text_777_30 float_left'>病人证照号码</text> | 176 | <text class='text_777_30 float_left'>病人证照号码</text> |
| 177 | <view> | 177 | <view> |
| 178 | <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="medical_id_card_no"></image> | 178 | <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="medical_id_card_no"></image> |
| 179 | - <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:380rpx;color:#000;' placeholder='请输入或拍摄身份证' name='id_card_no' type='idcard' value='{{id_card_no}}' bindinput="idChange" id="medical_id_card_no_input"></input> | 179 | + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;width:380rpx;color:#000;' placeholder='请输入证照号码' name='id_card_no' type='idcard' value='{{id_card_no}}' bindinput="idChange" id="medical_id_card_no_input"></input> |
| 180 | </view> | 180 | </view> |
| 181 | </view> | 181 | </view> |
| 182 | <view class='divide_line_30'></view> | 182 | <view class='divide_line_30'></view> |
| @@ -308,8 +308,8 @@ | @@ -308,8 +308,8 @@ | ||
| 308 | <text class='red_star_right_10'>*</text> | 308 | <text class='red_star_right_10'>*</text> |
| 309 | <text class='text_777_30 float_left'>证照号码</text> | 309 | <text class='text_777_30 float_left'>证照号码</text> |
| 310 | <view> | 310 | <view> |
| 311 | - <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="owner_id_card_no"></image> | ||
| 312 | - <input class='input_wrap' placeholder-class='text_999_30 float_right' style=' line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入或拍摄身份证' maxlength='18' type='idcard' name='owner_id_card_no' value='{{owner_id_card_no}}' bindinput="idChange" id='owner_id_card_no_input'></input> | 311 | + <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="owner_id_card_no" hidden='{{!isIdCard_owner}}'></image> |
| 312 | + <input class='input_wrap' placeholder-class='text_999_30 float_right' style=' line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入证照号码' maxlength='18' type='idcard' name='owner_id_card_no' value='{{owner_id_card_no}}' bindinput="idChange" bindblur="idDone" id='owner_id_card_no_input'></input> | ||
| 313 | </view> | 313 | </view> |
| 314 | </view> | 314 | </view> |
| 315 | </view> | 315 | </view> |
| @@ -368,7 +368,7 @@ | @@ -368,7 +368,7 @@ | ||
| 368 | <text class='text_777_30 float_left head_in'>配偶证照号码</text> | 368 | <text class='text_777_30 float_left head_in'>配偶证照号码</text> |
| 369 | <view> | 369 | <view> |
| 370 | <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' hidden='{{hasGetLover || !isIdCard_lover}}' id="spouse_id_card_no"></image> | 370 | <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' hidden='{{hasGetLover || !isIdCard_lover}}' id="spouse_id_card_no"></image> |
| 371 | - <input class='input_wrap' style='color:#000;' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='spouse_id_card_no' maxlength='18' type='idcard' value='{{spouse_id_card_no}}' bindinput="idChange" bindblur="idDone" id='spouse_id_card_no_input' disabled='{{hasGetLover}}'></input> | 371 | + <input class='input_wrap' style='color:#000;' placeholder='请输入证照号码' placeholder-class='text_999_30' name='spouse_id_card_no' maxlength='18' type='idcard' value='{{spouse_id_card_no}}' bindinput="idChange" bindblur="idDone" id='spouse_id_card_no_input' disabled='{{hasGetLover}}'></input> |
| 372 | </view> | 372 | </view> |
| 373 | </view> | 373 | </view> |
| 374 | <view class='divide_line_30'></view> | 374 | <view class='divide_line_30'></view> |
请
注册
或
登录
后发表评论