提交 c6c3375eda52961130b96e581833999497e0ccc2

作者 wangyu
2 个父辈 e4a61eee 0830a473

Merge branch 'dev2.0' into dev_wy

... ... @@ -147,8 +147,8 @@ App({
147 147 // baseUrl: "http://192.144.144.220:20000/",
148 148 // baseUrl: "http://154.8.229.55:20000/",
149 149 // baseUrl: "http://47.110.250.177:20000/",
150   - // baseUrl: "http://47.110.158.110:20000/",
151   - baseUrl: "https://api.workai.com.cn/",
  150 + baseUrl: "http://47.110.158.110:20000/",
  151 + // baseUrl: "https://api.workai.com.cn/",
152 152 OSSUrl: "", //"https://oss.workai.com.cn/",
153 153 userInfo: null,
154 154 hostInfo:null,
... ...
... ... @@ -313,10 +313,10 @@ Page({
313 313 },
314 314 studyEndDate: {
315 315 label: '受教育时间止',
316   - isrequre: true,
  316 + // isrequre: true,
317 317 bindtype: 'study_end_date',
318 318 selected: '',
319   - isblack: 'true',
  319 + // isblack: 'true',
320 320 values: ["是", "否"],
321 321 placeholder: '请选择时间',
322 322 onChange: 'onPickerSelect',
... ... @@ -500,32 +500,32 @@ Page({
500 500 label: '就读国家(地区)',
501 501 bindtype: 'school_country',
502 502 isrequre: true,
503   - selected: '中国(大陆)',
  503 + selected: '中国',
504 504 isblack: 'true',
505 505 values: [],
506   - placeholder: '中国(大陆)',
  506 + placeholder: '中国',
507 507 onChange: 'onPickerSelect',
508 508 },
509   - bankInfo: {
510   - label: '公积金贷款银行',
511   - bindtype: 'bank',
512   - maxWidth: 400,
513   - isrequre: true,
514   - placeholder: '请选择贷款银行',
515   - selected: '',
516   - values: [],
517   - onChange: 'onPickerSelect'
518   - },
519   - bankInfo_2: {
520   - label: '商业贷款银行',
521   - bindtype: 'bank_2',
522   - maxWidth: 430,
523   - isrequre: true,
524   - placeholder: '请选择贷款银行',
525   - selected: '',
526   - values: [],
527   - onChange: 'onPickerSelect'
528   - },
  509 + // bankInfo: {
  510 + // label: '公积金贷款银行',
  511 + // bindtype: 'bank',
  512 + // maxWidth: 400,
  513 + // isrequre: true,
  514 + // placeholder: '请选择贷款银行',
  515 + // selected: '',
  516 + // values: [],
  517 + // onChange: 'onPickerSelect'
  518 + // },
  519 + // bankInfo_2: {
  520 + // label: '商业贷款银行',
  521 + // bindtype: 'bank_2',
  522 + // maxWidth: 430,
  523 + // isrequre: true,
  524 + // placeholder: '请选择贷款银行',
  525 + // selected: '',
  526 + // values: [],
  527 + // onChange: 'onPickerSelect'
  528 + // },
529 529 edu_lable: "school",
530 530 oldersupport_lable: "",
531 531 img_path: "/images/upload_img.png"
... ... @@ -536,6 +536,7 @@ Page({
536 536 */
537 537 onLoad: function(options) {
538 538
  539 + this.getTaxHostInfo()
539 540 var pages = getCurrentPages()
540 541 var frontPage = pages[pages.length - 2]
541 542 console.log('---------frontPage', frontPage.data)
... ... @@ -590,7 +591,7 @@ Page({
590 591 deduction_amount: deduction_amount
591 592 })
592 593 } else if (frontPage.data.house_type == "rent" || frontPage.data.house_type == "house_fund_rent") {
593   - this.getbanklist()
  594 + // this.getbanklist()
594 595 if (options.isedit != 'true') {
595 596 this.getTaxList()
596 597 }
... ... @@ -604,7 +605,7 @@ Page({
604 605 reduce_typeData.selected = '年度'
605 606 }
606 607 } else if (frontPage.data.house_type == "house_fund_loan") {
607   - this.getbanklist()
  608 + // this.getbanklist()
608 609 if (options.isedit != 'true') {
609 610 this.getTaxList()
610 611 }
... ... @@ -642,6 +643,37 @@ Page({
642 643 }
643 644 }
644 645 },
  646 +
  647 + getTaxHostInfo: function () {
  648 + var that = this;
  649 + var Authorization = app.globalData.Authorization;
  650 + wx.request({
  651 + url: baseUrl + 'persontax/v1/personal-taxes',
  652 + method: "GET",
  653 + header: {
  654 + 'content-type': 'application/json', // 默认值
  655 + "Authorization": Authorization
  656 + },
  657 + data: {
  658 + 'all': true
  659 + },
  660 + success: function (res) {
  661 + if (res.statusCode == 200) {
  662 + var data = res.data
  663 + if (data.items && data.items.length > 0) {
  664 + for (var i = 0; i < data.items.length; i++) {
  665 + if (data.items[i].family_ties == "本人") {
  666 + app.globalData.hostInfo = data.items[i]
  667 + break;
  668 + }
  669 + }
  670 + }
  671 + }
  672 + }
  673 + })
  674 + },
  675 +
  676 +
645 677 getTaxList: function () {
646 678 var that = this;
647 679 wx.showLoading({
... ... @@ -973,9 +1005,9 @@ Page({
973 1005 setData.loan_contract_no = data.loan_contract_no
974 1006 }
975 1007 if (data.loan_bank && data.loan_bank.length) {
976   - var bank_data = this.data.bankInfo
977   - bank_data.selected = data.loan_bank
978   - setData.bankInfo = bank_data
  1008 + // var bank_data = this.data.bankInfo
  1009 + // bank_data.selected = data.loan_bank
  1010 + setData.loan_bank = data.loan_bank
979 1011 }
980 1012 var firstpayback_Date = this.data.firstpaybackDate
981 1013 firstpayback_Date.selected = format.formatTime_date(data.loan_start)
... ... @@ -988,9 +1020,10 @@ Page({
988 1020 setData.sec_loan_contract_no = data.sec_loan_contract_no
989 1021 }
990 1022 if (data.sec_loan_bank && data.sec_loan_bank.length) {
991   - var bank_data = this.data.bankInfo_2
992   - bank_data.selected = data.sec_loan_bank
993   - setData.bankInfo_2 = bank_data
  1023 + // var bank_data = this.data.bankInfo_2
  1024 + // bank_data.selected = data.sec_loan_bank
  1025 + // setData.bankInfo_2 = bank_data
  1026 + setData.sec_loan_bank = data.sec_loan_bank
994 1027 }
995 1028 var firstpaybackDate_2 = this.data.firstpaybackDate_2
996 1029 firstpaybackDate_2.selected = format.formatTime_date(data.sec_loan_start)
... ... @@ -1039,6 +1072,11 @@ Page({
1039 1072 setData.id_card_no = data.id_card_no
1040 1073 this.dealIdInfo(data.id_card_no, 'older_id_card_no_input')
1041 1074 }
  1075 + if (data.family_ties && data.family_ties.length) {
  1076 + var older_relativeData = this.data.older_relativeData
  1077 + older_relativeData.selected = data.family_ties
  1078 + setData.older_relativeData = older_relativeData
  1079 + }
1042 1080 this.setData(setData)
1043 1081 break;
1044 1082 case 'medical_fund':
... ... @@ -1185,36 +1223,36 @@ Page({
1185 1223 })
1186 1224 },
1187 1225
1188   - getbanklist: function() {
1189   - var that = this
1190   - var Authorization = app.globalData.Authorization;
1191   - var bank_info = that.data.bankInfo
1192   - var bank_info_2 = that.data.bankInfo_2
1193   - wx.request({
1194   - url: baseUrl + 'persontax/v1/bank-list',
1195   - method: "GET",
1196   - header: {
1197   - 'content-type': 'application/json', // 默认值
1198   - "Authorization": Authorization
1199   - },
1200   - success: function(res) {
1201   - console.log(res)
1202   - bank_info.values = res.data.banks//that.handleBankinfo(res.data.items)
1203   - bank_info_2.values = res.data.banks//that.handleBankinfo(res.data.items)
1204   - that.setData({
1205   - bankInfo: bank_info,
1206   - bankInfo_2: bank_info_2
1207   - })
1208   - console.log("bankInfo", that.data.bankInfo)
1209   - },
1210   - fail(res) {
1211   - console.log(res)
1212   - },
1213   - complete() {
1214   - wx.hideLoading()
1215   - }
1216   - })
1217   - },
  1226 + // getbanklist: function() {
  1227 + // var that = this
  1228 + // var Authorization = app.globalData.Authorization;
  1229 + // var bank_info = that.data.bankInfo
  1230 + // var bank_info_2 = that.data.bankInfo_2
  1231 + // wx.request({
  1232 + // url: baseUrl + 'persontax/v1/bank-list',
  1233 + // method: "GET",
  1234 + // header: {
  1235 + // 'content-type': 'application/json', // 默认值
  1236 + // "Authorization": Authorization
  1237 + // },
  1238 + // success: function(res) {
  1239 + // console.log(res)
  1240 + // bank_info.values = res.data.banks//that.handleBankinfo(res.data.items)
  1241 + // bank_info_2.values = res.data.banks//that.handleBankinfo(res.data.items)
  1242 + // that.setData({
  1243 + // bankInfo: bank_info,
  1244 + // bankInfo_2: bank_info_2
  1245 + // })
  1246 + // console.log("bankInfo", that.data.bankInfo)
  1247 + // },
  1248 + // fail(res) {
  1249 + // console.log(res)
  1250 + // },
  1251 + // complete() {
  1252 + // wx.hideLoading()
  1253 + // }
  1254 + // })
  1255 + // },
1218 1256 getCertificates: function () {
1219 1257 var that = this
1220 1258 var Authorization = app.globalData.Authorization;
... ... @@ -1249,13 +1287,13 @@ Page({
1249 1287 }
1250 1288 })
1251 1289 },
1252   - handleBankinfo: function(data) {
1253   - var bank_name = []
1254   - for (var i = 0; i < data.length; i++) {
1255   - bank_name.push(data[i].bank_name)
1256   - }
1257   - return bank_name
1258   - },
  1290 + // handleBankinfo: function(data) {
  1291 + // var bank_name = []
  1292 + // for (var i = 0; i < data.length; i++) {
  1293 + // bank_name.push(data[i].bank_name)
  1294 + // }
  1295 + // return bank_name
  1296 + // },
1259 1297
1260 1298 formSubmit: function(e) {
1261 1299 console.log("formSubmit", e);
... ... @@ -1277,6 +1315,10 @@ Page({
1277 1315 this.showToast('子女年龄小于3岁,不可申报')
1278 1316 return
1279 1317 }
  1318 + if (this.data.commonbirthDate.datelong < app.globalData.hostInfo.birth_date) {
  1319 + this.showToast('子女年龄不得大于本人');
  1320 + return
  1321 + }
1280 1322 if (!formdata.children_name || formdata.children_name.length < 1) {
1281 1323 this.showToast('请填写子女姓名')
1282 1324 return
... ... @@ -1302,8 +1344,8 @@ Page({
1302 1344 return
1303 1345 }
1304 1346 if (this.data.studyEndDate.selected.length < 1) {
1305   - this.showToast('请选择受教育时间止')
1306   - return
  1347 + // this.showToast('请选择受教育时间止')
  1348 + // return
1307 1349 }else{
1308 1350 var activedDate = (Date.parse(new Date('2019-01-01')) / 1000)
1309 1351 if (this.data.studyEndDate.datelong < activedDate) {
... ... @@ -1457,6 +1499,10 @@ Page({
1457 1499 this.showToast('被赡养人年龄不足60岁,不可申报')
1458 1500 return
1459 1501 }
  1502 + if (this.data.olderbirthDate.datelong > app.globalData.hostInfo.birth_date) {
  1503 + this.showToast('被赡养人年龄应大于本人');
  1504 + return
  1505 + }
1460 1506 if (this.data.older_relativeData.selected.length < 1) {
1461 1507 this.showToast('请选择与纳税人关系')
1462 1508 return
... ... @@ -1553,7 +1599,7 @@ Page({
1553 1599 if (!formdata.loan_contract_no || formdata.loan_contract_no.length < 1) {
1554 1600 this.showToast('请填写公积金贷款合同编号')
1555 1601 return
1556   - } else if (this.data.bankInfo.selected.length < 1) {
  1602 + } else if (!formdata.loan_bank || formdata.loan_bank.length < 1) {
1557 1603 this.showToast('请选择公积金贷款银行')
1558 1604 return
1559 1605 } else if (this.data.firstpaybackDate.selected.length < 1) {
... ... @@ -1563,7 +1609,7 @@ Page({
1563 1609 this.showToast('请填写公积金贷款期限')
1564 1610 return
1565 1611 }
1566   - newdata.loan_bank = this.data.bankInfo.selected
  1612 + newdata.loan_bank = formdata.loan_bank
1567 1613 newdata.loan_start = this.data.firstpaybackDate.datelong
1568 1614 newdata.loan_months = parseInt(formdata.loan_months)
1569 1615 }
... ... @@ -1571,7 +1617,7 @@ Page({
1571 1617 if (!formdata.sec_loan_contract_no || formdata.sec_loan_contract_no.length < 1) {
1572 1618 this.showToast('请填写商业贷款合同编号')
1573 1619 return
1574   - } else if (this.data.bankInfo_2.selected.length < 1) {
  1620 + } else if (!formdata.sec_loan_bank || formdata.sec_loan_bank.length < 1) {
1575 1621 this.showToast('请选择商业贷款银行')
1576 1622 return
1577 1623 } else if (this.data.firstpaybackDate_2.selected.length < 1) {
... ... @@ -1581,7 +1627,7 @@ Page({
1581 1627 this.showToast('请填写商业贷款期限')
1582 1628 return
1583 1629 }
1584   - newdata.sec_loan_bank = this.data.bankInfo_2.selected
  1630 + newdata.sec_loan_bank = formdata.sec_loan_bank
1585 1631 newdata.sec_loan_start = this.data.firstpaybackDate_2.datelong
1586 1632 newdata.sec_loan_months = parseInt(formdata.sec_loan_months)
1587 1633 }
... ... @@ -1734,6 +1780,7 @@ Page({
1734 1780 },
1735 1781 data: newdata,
1736 1782 success(res) {
  1783 + wx.hideLoading()
1737 1784 if (res && res.statusCode < 300) {
1738 1785 wx.navigateBack({
1739 1786 delta: 1
... ... @@ -1741,7 +1788,8 @@ Page({
1741 1788 } else {
1742 1789 wx.showToast({
1743 1790 title: res.data.message ? res.data.message : '请求出错',
1744   - icon: 'none'
  1791 + icon: 'none',
  1792 + duration: 2000
1745 1793 })
1746 1794 }
1747 1795 },
... ... @@ -2254,20 +2302,20 @@ Page({
2254 2302 this.showToast('终止日期不符合要求,无法申报')
2255 2303 }
2256 2304 break;
2257   - case 'bank':
2258   - var bank_data = this.data.bankInfo
2259   - bank_data.selected = bank_data.values[e.detail.value]
2260   - this.setData({
2261   - bankInfo: bank_data
2262   - })
2263   - break;
2264   - case 'bank_2':
2265   - var bank_data_2 = this.data.bankInfo_2
2266   - bank_data_2.selected = bank_data_2.values[e.detail.value]
2267   - this.setData({
2268   - bankInfo_2: bank_data_2
2269   - })
2270   - break;
  2305 + // case 'bank':
  2306 + // var bank_data = this.data.bankInfo
  2307 + // bank_data.selected = bank_data.values[e.detail.value]
  2308 + // this.setData({
  2309 + // bankInfo: bank_data
  2310 + // })
  2311 + // break;
  2312 + // case 'bank_2':
  2313 + // var bank_data_2 = this.data.bankInfo_2
  2314 + // bank_data_2.selected = bank_data_2.values[e.detail.value]
  2315 + // this.setData({
  2316 + // bankInfo_2: bank_data_2
  2317 + // })
  2318 + // break;
2271 2319 case 'house_locate':
2272 2320 console.log('house_locate', e)
2273 2321 var house_address = this.data.houseLocateInfo;
... ...
... ... @@ -235,8 +235,14 @@
235 235 <text class='text_777_30 float_left'>公积金贷款合同编号</text>
236 236 <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款合同编号' name='loan_contract_no' value='{{loan_contract_no}}' bindinput="loan_input" id='loan_contract_no'></input>
237 237 </view>
  238 + <!-- <view class='divide_line_30'></view>
  239 + <template is="picker_cell_normal" data="{{...bankInfo}}" /> -->
238 240 <view class='divide_line_30'></view>
239   - <template is="picker_cell_normal" data="{{...bankInfo}}" />
  241 + <view style='height:90rpx'>
  242 + <text class='red_star_right_10'>*</text>
  243 + <text class='text_777_30 float_left'>公积金贷款银行</text>
  244 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入贷款合同编号' name='loan_bank' value='{{loan_bank}}'></input>
  245 + </view>
240 246 <view class='divide_line_30'></view>
241 247 <template is="picker_cell_normal" data="{{...firstpaybackDate}}" />
242 248 <view class='divide_line_30'></view>
... ... @@ -254,8 +260,14 @@
254 260 <text class='text_777_30 float_left'>商业贷款合同编号</text>
255 261 <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;width:400rpx;' placeholder='请输入贷款合同编号' name='sec_loan_contract_no' value='{{sec_loan_contract_no}}' bindinput="loan_input" id='sec_loan_contract_no' ></input>
256 262 </view>
  263 + <!-- <view class='divide_line_30'></view>
  264 + <template is="picker_cell_normal" data="{{...bankInfo_2}}" /> -->
257 265 <view class='divide_line_30'></view>
258   - <template is="picker_cell_normal" data="{{...bankInfo_2}}" />
  266 + <view style='height:90rpx'>
  267 + <text class='red_star_right_10'>*</text>
  268 + <text class='text_777_30 float_left'>商业贷款银行</text>
  269 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入商业贷款银行' name='sec_loan_bank' value='{{sec_loan_bank}}'></input>
  270 + </view>
259 271 <view class='divide_line_30'></view>
260 272 <template is="picker_cell_normal" data="{{...firstpaybackDate_2}}" />
261 273 <view class='divide_line_30'></view>
... ...
... ... @@ -54,7 +54,7 @@
54 54 </view>
55 55 <view style='height:90rpx;width:100%;clear:both;'>
56 56 <text class='text_left'>就读国家(地区)</text>
57   - <text class='text_right_333'>{{datas.school_country&&datas.school_country.length>0?datas.school_country:'中国(大陆)'}}</text>
  57 + <text class='text_right_333'>{{datas.school_country&&datas.school_country.length>0?datas.school_country:'中国'}}</text>
58 58 </view>
59 59 <view style='width:100%;clear:both;'>
60 60 <text class='text_left'>就读学校名称</text>
... ...
... ... @@ -11,13 +11,15 @@ Page({
11 11 currentTab: 0,
12 12 taxDatas: {},
13 13 choosed_date: '',
14   - long_date: 0
  14 + long_date: 0,
  15 + isForeign:false
15 16 },
16 17 onLoad: function (options) {
17 18 if (options.date){
18 19 var mydate = new Date();
19 20 this.setData({
20 21 choosed_date: options.date,
  22 + isForeign: options.taxpayer_type == 'non-resident'
21 23 })
22 24 }
23 25 if (!options.id) return
... ... @@ -33,7 +35,7 @@ Page({
33 35 success: function (result) {
34 36 console.log('成功', result)
35 37 self.setData({
36   - taxDatas: result.data
  38 + taxDatas: that.handleTaxData(result.data)
37 39 })
38 40 },
39 41 fail: function (res) {
... ... @@ -46,7 +48,21 @@ Page({
46 48 })
47 49 },
48 50
49   -
  51 + handleTaxData: function (items) {
  52 + for (var i = 0; i < items.length; ++i) {
  53 + var item = items[i]
  54 + var donation_way
  55 + if (item.donation_way == 'quota') {
  56 + method = '限额扣除'
  57 + } else if (item.donation_way == 'full') {
  58 + method = '全额扣除'
  59 + } else if (item.donation_way == 'mix') {
  60 + method = '混合'
  61 + }
  62 + item.method = method
  63 + }
  64 + return items;
  65 + },
50 66
51 67
52 68 })
\ No newline at end of file
... ...
1 1 <!--pages/main/advancepayment/adPayDetails/adPayDetails.wxml-->
2 2 <view>
3 3 <scroll-view style='margin-bottom:40rpx'>
4   - <view style='padding:0rpx 30rpx 30rpx 30rpx;background:#ffffff'>
5   - <view>
6   - <text class='text_blue_32'>{{choosed_date}}</text>
7   - <view class='float_right'>
8   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
  4 + <view wx:if="{{!isForeign}}">
  5 + <view style='padding:0rpx 30rpx 30rpx 30rpx;background:#ffffff'>
  6 + <view>
  7 + <text class='text_blue_32'>{{choosed_date}}</text>
  8 + <view class='float_right'>
  9 + <image class='arrow_wrap' src='/images/arrow_right.png'></image>
  10 + </view>
  11 + </view>
  12 + <!-- <picker mode="date" fields="month" start="1970-01" end="2100-01" bindchange="datePickerChange">
  13 + </picker> -->
  14 + <view class='divide_line_f5f5f5'></view>
  15 + <view style='padding:30rpx 0'>
  16 + <text class='text_666_30 float_left'>当期收入额</text>
  17 + <text class='text_number float_right'>{{taxDatas.personal_income}}</text>
  18 + </view>
  19 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  20 + <view style='padding:30rpx 0'>
  21 + <text class='text_666_30 float_left'>当期免税收入</text>
  22 + <text class='text_number float_right'>{{taxDatas.tax_free_income}}</text>
  23 + </view>
  24 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  25 + <view style='padding:30rpx 0'>
  26 + <text class='text_666_30 float_left'>专项扣除合计</text>
  27 + <text class='text_number float_right'>{{taxDatas.special_deduction}}</text>
  28 + </view>
  29 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  30 + <view style='padding:30rpx 0'>
  31 + <text class='text_666_30 float_left'>减除费用</text>
  32 + <text class='text_number float_right'>{{taxDatas.reduction_cost}}</text>
  33 + </view>
  34 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  35 + <view style='padding:30rpx 0'>
  36 + <text class='text_666_30 float_left'>专项附加扣除合计</text>
  37 + <text class='text_number float_right'>{{taxDatas.special_additional_deduction}}</text>
  38 + </view>
  39 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  40 + <view style='padding:30rpx 0'>
  41 + <text class='text_666_30 float_left'>其他扣除合计</text>
  42 + <text class='text_number float_right'>{{taxDatas.other_deduction}}</text>
  43 + </view>
  44 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  45 + <view style='padding:30rpx 0'>
  46 + <text class='text_666_30 float_left'>累计应纳税所得额</text>
  47 + <text class='text_number float_right'>{{taxDatas.accumulated_taxable_income}}</text>
  48 + </view>
  49 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  50 + <view style='padding:30rpx 0'>
  51 + <text class='text_666_30 float_left'>税率</text>
  52 + <text class='text_number float_right'>{{taxDatas.tax_rate}}%</text>
  53 + </view>
  54 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  55 + <view style='padding:30rpx 0'>
  56 + <text class='text_666_30 float_left'>速算扣除数</text>
  57 + <text class='text_number float_right'>{{taxDatas.deduction_number}}</text>
9 58 </view>
10 59 </view>
11   - <!-- <picker mode="date" fields="month" start="1970-01" end="2100-01" bindchange="datePickerChange">
12   - </picker> -->
13   - <view class='divide_line_f5f5f5'></view>
14   - <view style='padding:30rpx 0'>
15   - <text class='text_666_30 float_left'>当期收入额</text>
16   - <text class='text_number float_right'>{{taxDatas.personal_income}}</text>
17   - </view>
18   - <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
19   - <view style='padding:30rpx 0'>
20   - <text class='text_666_30 float_left'>当期免税收入</text>
21   - <text class='text_number float_right'>{{taxDatas.tax_free_income}}</text>
22   - </view>
23   - <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
24   - <view style='padding:30rpx 0'>
25   - <text class='text_666_30 float_left'>专项扣除合计</text>
26   - <text class='text_number float_right'>{{taxDatas.special_deduction}}</text>
27   - </view>
28   - <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
29   - <view style='padding:30rpx 0'>
30   - <text class='text_666_30 float_left'>减除费用</text>
31   - <text class='text_number float_right'>{{taxDatas.reduction_cost}}</text>
32   - </view>
33   - <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
34   - <view style='padding:30rpx 0'>
35   - <text class='text_666_30 float_left'>专项附加扣除合计</text>
36   - <text class='text_number float_right'>{{taxDatas.special_additional_deduction}}</text>
37   - </view>
38   - <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
39   - <view style='padding:30rpx 0'>
40   - <text class='text_666_30 float_left'>其他扣除合计</text>
41   - <text class='text_number float_right'>{{taxDatas.other_deduction}}</text>
42   - </view>
43   - <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
44   - <view style='padding:30rpx 0'>
45   - <text class='text_666_30 float_left'>累计应纳税所得额</text>
46   - <text class='text_number float_right'>{{taxDatas.accumulated_taxable_income}}</text>
47   - </view>
48   - <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
49   - <view style='padding:30rpx 0'>
50   - <text class='text_666_30 float_left'>税率</text>
51   - <text class='text_number float_right'>{{taxDatas.tax_rate}}%</text>
52   - </view>
53   - <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
54   - <view style='padding:30rpx 0'>
55   - <text class='text_666_30 float_left'>速算扣除数</text>
56   - <text class='text_number float_right'>{{taxDatas.deduction_number}}</text>
  60 + <view style='margin:30rpx;positive:relative;width:92%;height:312rpx'>
  61 + <image class=' payment_img_bg ' src='/images/payment_bg.png ' style='position:absolute;z-index: 1;'></image>
  62 + <view>
  63 + <view class='view_bg_wrap' style='margin-top: 44rpx;'>
  64 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  65 + <text class='text_num_wrap'>{{taxDatas.accumulated_withholding_tax}}</text>
  66 + <text class='text_text_wrap'>累计应扣缴税额</text>
  67 + </view>
  68 + <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
  69 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  70 + <text class='text_num_wrap'>{{taxDatas.prepay_tax}}</text>
  71 + <text class='text_text_wrap'>已扣缴税额</text>
  72 + </view>
  73 +
  74 + </view>
  75 +
  76 + <view class='view_bg_wrap' style='margin-top: 180rpx;'>
  77 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  78 + <text class='text_num_wrap'>{{taxDatas.refund_tax}}</text>
  79 + <text class='text_text_wrap'>本期应缴税额</text>
  80 + </view>
  81 + </view>
  82 + </view>
57 83 </view>
58 84 </view>
59   - <view style='margin:30rpx;positive:relative;width:92%;height:312rpx'>
60   - <image class=' payment_img_bg ' src='/images/payment_bg.png ' style='position:absolute;z-index: 1;'></image>
61   - <view>
62   - <view class='view_bg_wrap' style='margin-top: 44rpx;'>
63   - <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
64   - <text class='text_num_wrap'>{{taxDatas.accumulated_withholding_tax}}</text>
65   - <text class='text_text_wrap'>累计应扣缴税额</text>
66   - </view>
67   - <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
68   - <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
69   - <text class='text_num_wrap'>{{taxDatas.prepay_tax}}</text>
70   - <text class='text_text_wrap'>已扣缴税额</text>
  85 +
  86 + <view wx:else>
  87 + <view style='padding:0rpx 30rpx 30rpx 30rpx;background:#ffffff'>
  88 + <view>
  89 + <text class='text_blue_32'>{{choosed_date}}</text>
  90 + <view class='float_right'>
  91 + <image class='arrow_wrap' src='/images/arrow_right.png'></image>
71 92 </view>
72   -
73 93 </view>
74   -
75   - <view class='view_bg_wrap' style='margin-top: 180rpx;'>
76   - <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
77   - <text class='text_num_wrap'>{{taxDatas.refund_tax}}</text>
78   - <text class='text_text_wrap'>本期应缴税额</text>
  94 + <!-- <picker mode="date" fields="month" start="1970-01" end="2100-01" bindchange="datePickerChange">
  95 + </picker> -->
  96 + <view class='divide_line_f5f5f5'></view>
  97 + <view style='padding:30rpx 0'>
  98 + <text class='text_666_30 float_left'>收入额</text>
  99 + <text class='text_number float_right'>{{taxDatas.personal_income}}</text>
  100 + </view>
  101 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  102 + <view style='padding:30rpx 0'>
  103 + <text class='text_666_30 float_left'>免税收入</text>
  104 + <text class='text_number float_right'>{{taxDatas.tax_free_income}}</text>
  105 + </view>
  106 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  107 + <view style='padding:30rpx 0'>
  108 + <text class='text_666_30 float_left'>其他扣除</text>
  109 + <text class='text_number float_right'>{{taxDatas.other_deduction}}</text>
  110 + </view>
  111 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  112 + <view style='padding:30rpx 0'>
  113 + <text class='text_666_30 float_left'>实际捐赠额</text>
  114 + <text class='text_number float_right'>{{taxDatas.actual_donation}}</text>
  115 + </view>
  116 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  117 + <view style='padding:30rpx 0'>
  118 + <text class='text_666_30 float_left'>捐赠方式</text>
  119 + <text class='text_number float_right'>{{taxDatas.donation_way}}</text>
  120 + </view>
  121 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  122 + <view style='padding:30rpx 0'>
  123 + <text class='text_666_30 float_left'>减免税额</text>
  124 + <text class='text_number float_right'>{{taxDatas.tax_savings}}</text>
  125 + </view>
  126 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  127 + <view style='padding:30rpx 0'>
  128 + <text class='text_666_30 float_left'>应纳税所得额</text>
  129 + <text class='text_number float_right'>{{taxDatas.accumulated_taxable_income}}</text>
  130 + </view>
  131 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  132 + <view style='padding:30rpx 0'>
  133 + <text class='text_666_30 float_left'>税率</text>
  134 + <text class='text_number float_right'>{{taxDatas.tax_rate}}%</text>
  135 + </view>
  136 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  137 + <view style='padding:30rpx 0'>
  138 + <text class='text_666_30 float_left'>速算扣除数</text>
  139 + <text class='text_number float_right'>{{taxDatas.deduction_number}}</text>
  140 + </view>
  141 + </view>
  142 + <view style='margin:30rpx;positive:relative;width:92%;height:312rpx'>
  143 + <image class=' payment_img_bg ' src='/images/payment_bg.png ' style='position:absolute;z-index: 1;'></image>
  144 + <view>
  145 + <view class='view_bg_wrap' style='margin-top: 44rpx;'>
  146 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  147 + <text class='text_num_wrap'>{{taxDatas.accumulated_withholding_tax}}</text>
  148 + <text class='text_text_wrap'>应扣缴税额</text>
  149 + </view>
  150 + <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
  151 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  152 + <text class='text_num_wrap'>{{taxDatas.prepay_tax}}</text>
  153 + <text class='text_text_wrap'>已扣缴税额</text>
  154 + </view>
79 155 </view>
80   -
81   - <!-- <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
82   - <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
83   - <text class='text_num_wrap'>30.8%</text>
84   - <text class='text_text_wrap'>使用税率</text>
  156 + <view class='view_bg_wrap' style='margin-top: 180rpx;'>
  157 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  158 + <text class='text_num_wrap'>{{taxDatas.refund_tax}}</text>
  159 + <text class='text_text_wrap'>应补(退)税额</text>
  160 + </view>
85 161 </view>
86   - <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
87   - <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
88   - <text class='text_num_wrap'>19106.91</text>
89   - <text class='text_text_wrap'>速算扣除数</text>
90   - </view> -->
91 162 </view>
92 163 </view>
93 164 </view>
94   -
95   - <!-- <view style='padding-left:30rpx;background:#ffffff'>
96   - <image class='icon_wrap' src="/images/rectangle_icon.png"></image>
97   - <text style='padding-left:20rpx' class='text_gray_32'>工资明细</text>
98   - </view>
99   - <view style='margin-top:2rpx;background:#ffffff;padding-bottom:30rpx'>
100   - <view style='padding:30rpx'>
101   - <text class='text_wrap_left'>公司名称</text>
102   - <text class='text_wrap_right'>北京小爱智能科技</text>
103   - </view>
104   - <view style='padding:30rpx'>
105   - <text class='text_wrap_left'>计薪时间</text>
106   - <text class='text_wrap_right'>2018/09/09 20:10</text>
107   - </view>
108   - <view style='padding:30rpx'>
109   - <text class='text_wrap_left'>发薪时间</text>
110   - <text class='text_wrap_right'>2018/09/10 09:00 </text>
111   - </view>
112   - <view style='padding:30rpx'>
113   - <text class='text_wrap_left'>实发工资</text>
114   - <text class='text_wrap_right'>13860.00</text>
115   - </view>
116   - </view> -->
  165 +
117 166 </scroll-view>
118 167 </view>
... ...
... ... @@ -9,7 +9,7 @@ Page({
9 9 Authorization: null,
10 10 data: {
11 11 // tab切换
12   - isshow : false,
  12 + // isshow : false,
13 13 currentTab: 0,
14 14 taxDatas: [],
15 15 salaryDatas: {},
... ... @@ -96,7 +96,11 @@ Page({
96 96 } else if (item.taxation_method == '0103') {
97 97 method = '全年一次性奖金'
98 98 }
99   - item.method = method
  99 + if (item.taxpayer_type == 'non-resident'){//非居民
  100 + item.method = '外籍人' + method
  101 + }else{
  102 + item.method = method
  103 + }
100 104 }
101 105 return items;
102 106 },
... ... @@ -106,6 +110,7 @@ Page({
106 110 item.payroll_date = format.formatTime_date(item.payroll_date)
107 111 item.count_date = format.formatDate_min(item.start_time) + '-' + format.formatDate_min(item.end_time)
108 112 item.detals = this.handleDetailsData(item)
  113 + item.isshow = false
109 114 }
110 115 return items;
111 116 },
... ... @@ -151,9 +156,14 @@ Page({
151 156
152 157 gospan:function(e){
153 158 console.log(e)
  159 + var item = this.data.salaryDatas[e.currentTarget.id]
  160 + item.isshow = !item.isshow
154 161 this.setData({
155   - isshow: !this.data.isshow
  162 + salaryDatas: this.data.salaryDatas
156 163 })
  164 + // this.setData({
  165 + // isshow: !this.data.isshow
  166 + // })
157 167 // console.log('idddddd',e.currentTarget.id)
158 168 // if (!e.currentTarget.id) return
159 169 // var that = this
... ... @@ -183,11 +193,14 @@ Page({
183 193 var detail = JSON.parse(data['detail'])
184 194 var details = []
185 195 for (var i = 0; i < titles.length; ++i) {
186   - var titleData = titles[i]
187   - var value = detail[titleData['key']]
188   -
  196 + var titleData = titles[i]
  197 + var value = detail[titleData['key']]
  198 + var title = titleData['title']
  199 + if (!title){
  200 + title = titleData['original_column']
  201 + }
189 202 details.push({
190   - title: titleData['title'],
  203 + title: title,
191 204 value: value
192 205 })
193 206 }
... ... @@ -196,8 +209,9 @@ Page({
196 209 },
197 210
198 211 goItemDetails: function (e) {
  212 + var item = this.data.taxDatas[e.currentTarget.id]
199 213 wx.navigateTo({
200   - url: "adPayDetails/adPayDetails?id=" + e.currentTarget.id + "&date=" + this.data.choosed_date
  214 + url: "adPayDetails/adPayDetails?id=" + item.id + "&date=" + this.data.choosed_date + "&taxpayer_type=" + item.taxpayer_type
201 215 })
202 216 },
203 217 })
\ No newline at end of file
... ...
... ... @@ -20,7 +20,7 @@
20 20 <view style='width:100%; font-family: PingFang-SC-Medium;font-size: 14px;color: #999999;letter-spacing: 0;text-align: center;'>还没有企业为您申报个税哦~</view>
21 21 </view>
22 22 <view wx:for="{{taxDatas}}" style='margin-bottom:20rpx'>
23   - <view class='card_rectangle_bg_column' style='padding:30rpx' id='{{item.id}}' bindtap='goItemDetails'>
  23 + <view class='card_rectangle_bg_column' style='padding:30rpx' id='{{index}}' bindtap='goItemDetails'>
24 24 <text class='text_blue_36'>扣缴义务人: {{item.declaring_unit}}</text>
25 25 <text class='text_blue_36'>所得项目: {{item.method}}</text>
26 26 <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view>
... ... @@ -40,23 +40,23 @@
40 40 </view>
41 41 <view wx:for="{{salaryDatas}}" style='margin-bottom:20rpx'>
42 42 <view class='card_rectangle_bg_column' style='padding:30rpx'>
43   - <text class='text_blue_36'>薪酬批次工资: {{item.program}}</text>
  43 + <text class='text_blue_36'>薪酬批次工资: {{item.cycle_name}}</text>
44 44 <view class='divide_line_f5f5f5' style='margin:20rpx 0'></view>
45 45 <text class='text_999_28'>发薪日:<text class='text_333_28'>{{item.payroll_date}}</text></text>
46 46 <text class='text_999_28'>计薪时间:<text class='text_333_28'>{{item.count_date}}</text></text>
47   - <text class='text_999_28'>应发额度:<text class='text_333_28'>{{item.pay_salary}}</text></text>
  47 + <text class='text_999_28'>应发金额:<text class='text_333_28'>{{item.pay_salary}}</text></text>
48 48 <text class='text_999_28'>实发:<text class='text_333_28 text_color_28'>¥{{item.salary}}</text></text>
49 49 <view class='divide_line_f5f5f5' style='margin:20rpx 0'></view>
50   - <view wx:if="{{!isshow}}" bindtap='gospan' id='{{item.id}}'>
  50 + <view wx:if="{{!item.isshow}}" bindtap='gospan' id='{{index}}'>
51 51 <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>展开</text>
52 52 <image class='head_image_wrap_down' src='/images/arrow_blue_down.png'></image>
53 53 </view>
54   - <view wx:if="{{isshow}}" bindtap='gospan'>
  54 + <view wx:if="{{item.isshow}}" bindtap='gospan' id='{{index}}'>
55 55 <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>收起</text>
56 56 <image class='head_image_wrap_up' src='/images/arrow_blue_up.png'></image>
57 57 <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view>
58 58 </view>
59   - <view wx:if="{{isshow}}" wx:for="{{item.detals}}" wx:for-item='detal'>
  59 + <view wx:if="{{item.isshow}}" wx:for="{{item.detals}}" wx:for-item='detal'>
60 60 <view>
61 61 <text class='text_999_28'>{{detal.title}}</text>
62 62 <text class='text_999_28' style='color:#333;text-align:right;float: right'>{{detal.value}}</text>
... ...
... ... @@ -2,6 +2,8 @@
2 2 var app = getApp();
3 3 var format = require('../../../../utils/util.js');
4 4 var baseUrl = app.globalData.baseUrl;
  5 +const cardTypeArray8 = ['居民身份证', '中国护照', '港澳居民居住证', '台湾居民居住证', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)'];
  6 +
5 7 Page({
6 8 cur_id:null,
7 9 /**
... ... @@ -36,14 +38,12 @@ Page({
36 38 },
37 39 cardtypeData: {
38 40 isrequre: true,
39   - disabled: true,
40 41 label: '证照类型',
41 42 bindtype: 'cardtype',
42   - selected: '居民身份证',
43 43 placeholder: '请选择证照类型',
44   - values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照',
45   - '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证'
46   - ],
  44 + values: cardTypeArray8,
  45 + // values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照','外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证'],
  46 + // range_key: 'name',
47 47 onChange: 'onPickerSelect'
48 48 },
49 49 forignerInfo: {
... ... @@ -58,14 +58,23 @@ Page({
58 58 genderData: {
59 59 label: '性别',
60 60 bindtype: 'gender',
61   - disabled: true,
  61 + isrequre: true,
  62 + // disabled: true,
62 63 selected: '',
63   - // placeholder: '请选择性别',
64   - placeholder: '性别',
  64 + placeholder: '请选择性别',
  65 + // placeholder: '性别',
65 66 values: ["男", "女"],
66 67 onChange: 'onPickerSelect'
67 68 },
68   -
  69 + countryData: {
  70 + label: '国籍',
  71 + bindtype: 'country',
  72 + isrequre: true,
  73 + selected: '',
  74 + // range_key:'name',
  75 + placeholder: '请选择国籍',
  76 + onChange: 'onPickerSelect',
  77 + },
69 78 },
70 79
71 80 /**
... ... @@ -77,8 +86,50 @@ Page({
77 86 this.cur_id = options.id
78 87 this.getpersonalTax(options.id)
79 88 }
  89 + this.getCountry()
  90 + },
  91 + //****************获取国籍数据************/
  92 + getCountry: function () {
  93 + var that = this
  94 + wx.showLoading({
  95 + title: '',
  96 + })
  97 + var Authorization = app.globalData.Authorization;
  98 + wx.request({
  99 + url: baseUrl + 'persontax/v1/nation-list',
  100 + method: "GET",
  101 + header: {
  102 + 'content-type': 'application/json', // 默认值
  103 + "Authorization": Authorization
  104 + },
  105 + success: function (res) {
  106 + var countrys = res.data
  107 + if (countrys.indexOf('中国') > -1) {
  108 + countrys.splice(countrys.indexOf('中国'), 1);
  109 + }
  110 + if (countrys.indexOf('中国台湾') > -1) {
  111 + countrys.splice(countrys.indexOf('中国台湾'), 1);
  112 + }
  113 + if (countrys.indexOf('香港') > -1) {
  114 + countrys.splice(countrys.indexOf('香港'), 1);
  115 + }
  116 + if (countrys.indexOf('澳门') > -1) {
  117 + countrys.splice(countrys.indexOf('澳门'), 1);
  118 + }
  119 + that.data.countryData.values = countrys
  120 + that.countrys = countrys
  121 + that.setData({
  122 + countryData: that.data.countryData,
  123 + })
  124 + },
  125 + fail(res) {
  126 + wx.hideLoading()
  127 + },
  128 + complete() {
  129 + wx.hideLoading()
  130 + }
  131 + })
80 132 },
81   -
82 133 //****************获取自然人数据************/
83 134 getpersonalTax: function (id) {
84 135 var that = this
... ... @@ -112,25 +163,28 @@ Page({
112 163 },
113 164 //对各参数初始赋值
114 165 handleDatas: function (tax_info) {
  166 + this.dealCardType(tax_info.id_card_type)//为防止干扰其他字段,需要先执行
115 167
116 168 var isDisable = tax_info.certification_status == 'active' && tax_info.id_card_no.length//已通过拍摄身份证认证过,不能修改
117 169
118 170 this.data.relativeData.selected = tax_info.family_ties
119   - // this.data.cardtypeData.selected = tax_info.id_card_type
120 171 this.data.genderData.selected = tax_info.gender
  172 + this.data.countryData.selected = tax_info.native
121 173 // this.data.genderData.disabled = isDisable
122 174
123 175 this.setData({
124 176 isDisable: isDisable,
125 177 relativeData: this.data.relativeData,
126 178 name: tax_info.name,
127   - // cardtypeData: this.data.cardtypeData,
  179 + cardtypeData: this.data.cardtypeData,
  180 + age: tax_info.age,
128 181 mobile: tax_info.mobile,
129 182 genderData: this.data.genderData,
130 183 isIdCard: '居民身份证' == tax_info.id_card_type ? true : false,
131   - card_number: tax_info.id_card_no
  184 + card_number: tax_info.id_card_no,
  185 + countryData: this.data.countryData
132 186 })
133   - this.dealIdInfo(tax_info.id_card_no)//处理了性别和年龄
  187 + // this.dealIdInfo(tax_info.id_card_no)//处理了性别和年龄
134 188 },
135 189
136 190 /**
... ... @@ -162,8 +216,9 @@ Page({
162 216 } else if (id_info.birthday.month < 10 && id_info.birthday.day < 10) {
163 217 birth_day = id_info.birthday.year + '-0' + id_info.birthday.month + '-0' + id_info.birthday.day;
164 218 }
165   - // var cardtype_Data = that.data.cardtypeData
166   - // cardtype_Data.selected = '居民身份证'
  219 + var cardtype_Data = that.data.cardtypeData
  220 + cardtype_Data.selected = '居民身份证'
  221 + // cardtypeData.selected_code = '1'
167 222 var gender_Data = that.data.genderData
168 223 gender_Data.selected = id_info.gender
169 224
... ... @@ -181,13 +236,13 @@ Page({
181 236 idInfoData: id_info,
182 237 name: id_info.name,
183 238 // birthday: birth_day,
184   - // cardtypeData: cardtype_Data,
  239 + cardtypeData: cardtype_Data,
185 240 genderData: gender_Data,
186 241 // long_birth_date: Date.parse(new Date(birth_day)) / 1000,
187 242 // birthDate: that.data.birthDate,
188 243 card_number: id_info.id_card_number
189 244 })
190   - that.dealIdInfo(id_info.id_card_number)
  245 + // that.dealIdInfo(id_info.id_card_number)
191 246 }
192 247 },
193 248 })
... ... @@ -199,6 +254,46 @@ Page({
199 254 })
200 255 },
201 256
  257 + dealCardType: function (new_type) {
  258 + var is_idcard = this.data.isIdCard
  259 + this.data.cardtypeData.selected = new_type
  260 +
  261 + if ('居民身份证' == new_type) {
  262 + is_idcard = true
  263 + this.data.genderData.disabled = true
  264 + } else {
  265 + is_idcard = false
  266 + this.data.genderData.disabled = false
  267 + }
  268 + this.data.overseas = '否'
  269 + if ('居民身份证' == new_type || '中国护照' == new_type) {
  270 + this.data.countryData.selected = '中国'
  271 + this.data.countryData.disabled = true
  272 + } else if (new_type.indexOf("港澳") != -1) {
  273 + this.data.countryData.values = ['中国香港', '中国澳门']
  274 + this.data.countryData.selected = ''
  275 + this.data.countryData.disabled = false
  276 + } else if (new_type.indexOf("台湾") != -1) {
  277 + this.data.countryData.selected = '中国台湾'
  278 + this.data.countryData.disabled = true
  279 + } else {
  280 + this.data.overseas = '是'
  281 + this.data.countryData.selected = ''
  282 + this.data.countryData.values = this.countrys ? this.countrys : []
  283 + this.data.countryData.disabled = false
  284 + }
  285 + this.setData({
  286 + isIdCard: is_idcard,
  287 + genderData: this.data.genderData,
  288 + countryData: this.data.countryData,
  289 + cardtypeData: this.data.cardtypeData,
  290 + overseas: this.data.overseas,
  291 + })
  292 +
  293 +
  294 + },
  295 +
  296 +
202 297 // =============普通单列picker选中处理==============
203 298 onPickerSelect: function(e) {
204 299 console.log('picker发送选择改变,携带值为', e)
... ... @@ -211,18 +306,15 @@ Page({
211 306 })
212 307 break;
213 308 case 'cardtype':
214   - var is_idcard = this.data.isIdCard
215   - var cardtype_data = this.data.cardtypeData
216   - cardtype_data.selected = cardtype_data.values[e.detail.value]
217   - if (0 == e.detail.value) {
218   - is_idcard = true
219   - } else {
220   - is_idcard = false
  309 + var cardtypeData = this.data.cardtypeData
  310 + var new_type = cardtypeData.values[e.detail.value] //['name']
  311 + // var new_type_code = cardtypeData.values[e.detail.value]['code']
  312 + if (new_type != cardtypeData.selected) {
  313 + this.dealCardType(new_type)
  314 + this.setData({
  315 + card_number: ""
  316 + })
221 317 }
222   - this.setData({
223   - isIdCard: is_idcard,
224   - cardtypeData: cardtype_data
225   - })
226 318 break;
227 319 case 'gender':
228 320 var gender_data = this.data.genderData
... ... @@ -231,7 +323,16 @@ Page({
231 323 genderData: gender_data
232 324 })
233 325 break;
234   -
  326 + case 'country':
  327 + var countryData = this.data.countryData
  328 + var new_country = countryData.values[e.detail.value]
  329 + if (new_country != countryData.selected) {
  330 + countryData.selected = new_country
  331 + this.setData({
  332 + countryData: countryData
  333 + })
  334 + }
  335 + break;
235 336 }
236 337
237 338 },
... ... @@ -263,7 +364,8 @@ Page({
263 364 // console.log("date", Date.parse(new Date(this.data.birthday)) / 1000)
264 365 var regMoney = /^[0-9]*(\.[0,10]{1,2})?$/;
265 366 var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/;
266   - var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,}$/;
  367 + var regname = /^[\u4E00-\u9FA5A-Za-z·s]{2,20}$/;
  368 + // var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,}$/;
267 369 var regEmail = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,20}[a-z0-9]+$");
268 370 var formdata = e.detail.value;
269 371 console.log("formdata", formdata);
... ... @@ -271,6 +373,7 @@ Page({
271 373 this.showtoast('请选择关系');
272 374 return
273 375 }
  376 + var rel = this.data.relativeData.selected
274 377 if (this.data.card_number.length < 1) {
275 378 this.showtoast('请填写证照号码');
276 379 return
... ... @@ -278,41 +381,52 @@ Page({
278 381 this.showtoast('证照号码有误');
279 382 return
280 383 }
281   - var rel = this.data.relativeData.selected
282   - var hostInfo = format.analyzeIDCard(app.globalData.hostInfo.id_card_no)
283   - if ((rel == '子' || rel =='女') && formdata.age > hostInfo.age) {
284   - this.showtoast('子女年龄有误');
285   - return
286   - }
287   - if (rel == '父母' && formdata.age < hostInfo.age) {
288   - this.showtoast('父母年龄有误');
289   - return
290   - }
291 384 var name = formdata.person_name.length ? formdata.person_name : this.data.name
292 385 if (name.length < 1 ) {
293   - this.showtoast('姓名未填写');
  386 + this.showtoast('请输入姓名');
294 387 return
295 388 } else if (!regname.test(name)) {
296 389 this.showtoast('请输入正确姓名');
297 390 return
298 391 }
299   - if (formdata.mobile.length > 0 && !format.isMobile(formdata.mobile)) {
300   - this.showtoast('手机号码有误');
  392 + if (this.data.genderData.selected.length < 1) {
  393 + this.showtoast('请选择性别');
301 394 return
302   - }
303   - if (this.data.genderData.selected == '男') {
304   - if (rel == '女'){
  395 + }else {
  396 + if (this.data.genderData.selected == '男') {
  397 + if (rel == '女') {
  398 + this.showtoast('关系和性别冲突');
  399 + return
  400 + }
  401 + } else {
  402 + if (rel == '子') {
  403 + this.showtoast('关系和性别冲突');
  404 + return
  405 + }
  406 + }
  407 + if (rel == '配偶' && this.data.genderData.selected == app.globalData.hostInfo.gender) {
305 408 this.showtoast('关系和性别冲突');
306 409 return
307 410 }
308   - }else{
309   - if (rel == '子') {
310   - this.showtoast('关系和性别冲突');
  411 + }
  412 + if (!formdata.age) {
  413 + this.showtoast('请填写年龄');
  414 + return
  415 + } else {
  416 + var host_birth = format.formatTime_date(app.globalData.hostInfo.birth_date)
  417 + var host_age = format.getAge(host_birth)
  418 + console.log('host_age',host_age,'hostInfo', app.globalData.hostInfo)
  419 + if ((rel == '子' || rel == '女') && formdata.age > host_age) {
  420 + this.showtoast('子女年龄有误');
  421 + return
  422 + }
  423 + if (rel == '父母' && formdata.age < host_age) {
  424 + this.showtoast('父母年龄有误');
311 425 return
312 426 }
313   - }
314   - if (rel == '配偶' && this.data.genderData.selected == app.globalData.hostInfo.gender) {
315   - this.showtoast('关系和性别冲突');
  427 + }
  428 + if (formdata.mobile.length > 0 && !format.isMobile(formdata.mobile)) {
  429 + this.showtoast('手机号码有误');
316 430 return
317 431 }
318 432 this.goCommit(formdata);
... ... @@ -338,14 +452,15 @@ Page({
338 452 data: {
339 453 'certification_status': that.getCertifyStatus(formdata),
340 454 "family_ties": that.data.relativeData.selected,
341   - "id_card_type": '居民身份证',//that.data.cardtypeData.selected,
  455 + "id_card_type": that.data.cardtypeData.selected,//_code,
342 456 "id_card_no": that.data.card_number,
343 457 "name": name,
344 458 "gender": that.data.genderData.selected,
345 459 "mobile": formdata.mobile,
346 460 //"age": formdata.age ? formdata.age : '',//不传
347   - "native": "中国",
348   - "is_overseas_personnel": "否",
  461 + "age": formdata.age ? formdata.age : '',
  462 + "native": that.data.countryData.selected,
  463 + "is_overseas_personnel": that.data.overseas,
349 464 },
350 465 header: {
351 466 'content-type': 'application/json', // 默认值
... ... @@ -391,7 +506,8 @@ Page({
391 506 wx.showToast({
392 507 title: title,
393 508 duration: 2000,
394   - image: '/images/error.png'
  509 + icon:'none'
  510 + // image: '/images/error.png'
395 511 })
396 512 },
397 513
... ... @@ -418,6 +534,9 @@ Page({
418 534 this.setData({
419 535 card_number: idCardNo
420 536 })
  537 + if (!this.data.isIdCard) {
  538 + return;
  539 + }
421 540 if (e.detail.value.length == 18){
422 541 if (!format.isIDCardNum(idCardNo)) {
423 542 wx.showToast({
... ... @@ -434,6 +553,9 @@ Page({
434 553 this.setData({
435 554 card_number: idCardNo
436 555 })
  556 + if (!this.data.isIdCard) {
  557 + return;
  558 + }
437 559 if (!idCardNo.length) {
438 560 wx.showToast({
439 561 image: "../../../../images/warn.png",
... ...
... ... @@ -10,12 +10,12 @@
10 10
11 11 <template is="picker_cell_normal" data="{{...relativeData}}" />
12 12 <view class="divide_line_30"></view>
13   -
14   - <view class='item_body'>
  13 + <template is="picker_cell_normal" data="{{...cardtypeData}}" />
  14 + <!-- <view class='item_body'>
15 15 <text class='red_star_right_10'>*</text>
16 16 <text class='text_777_30 float_left'>证照类型</text>
17 17 <text class='text_black_30 float_right' style='line-height: 90rpx'>居民身份证</text>
18   - </view>
  18 + </view> -->
19 19 <view class="divide_line_30"></view>
20 20
21 21 <view class='item_body'>
... ... @@ -27,7 +27,7 @@
27 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 28 </view>
29 29 <view wx:else>
30   - <input class='input_wrap' placeholder='请输入证照号码' placeholder-class='text_999_30' name='id_card_no' maxlength='18' 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' type="idcard" value='{{card_number}}' bindblur="idDone" bindinput="idChange" disabled='{{isDisable}}'></input>
31 31 </view>
32 32 </view>
33 33 <view class="divide_line_30"></view>
... ... @@ -42,22 +42,22 @@
42 42 <template is="picker_cell_normal" data="{{...genderData}}" />
43 43 <view class="divide_line_30"></view>
44 44 <view class='item_body'>
45   - <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>年龄</text>
46   - <input class='input_wrap' name='age' type='number' placeholder-class='text_999_30' placeholder='年龄' maxlength='2' value='{{age}}' disabled='true'></input>
  45 + <text class='red_star_right_10'>*</text>
  46 + <text class='text_777_30 float_left' style='line-height: 90rpx'>年龄</text>
  47 + <input class='input_wrap' name='age' type='number' placeholder-class='text_999_30' placeholder='年龄' maxlength='2' value='{{age}}' disabled='{{isIdCard}}'></input>
47 48 </view>
48   - <view class="divide_line_30"></view>
49   -
50   -
51   - <view class='item_body'>
  49 + <view class="divide_line_30"></view>
  50 + <template is="picker_cell_normal" data="{{...countryData}}" />
  51 + <!-- <view class='item_body'>
52 52 <text class='red_star_right_10'>*</text>
53 53 <text class='text_777_30 float_left' style='line-height: 90rpx'>国籍</text>
54 54 <text class='text_black_30 float_right' style='line-height: 90rpx' >中国</text>
55   - </view>
  55 + </view> -->
56 56 <view class="divide_line_30"></view>
57 57 <view class='item_body'>
58 58 <text class='red_star_right_10'>*</text>
59 59 <text class='text_777_30 float_left' style='line-height: 90rpx'>是否境外人员</text>
60   - <text class='text_black_30 float_right' style='line-height: 90rpx' ></text>
  60 + <text class='text_black_30 float_right' style='line-height: 90rpx' >{{overseas}}</text>
61 61 </view>
62 62 <!-- <template is="picker_cell_normal" data="{{...forignerInfo}}" /> -->
63 63 <view class="divide_line_30"></view>
... ...
1 1 var format = require('../../../../utils/util.js');
2 2 var app = getApp();
3 3 var baseUrl = app.globalData.baseUrl;
  4 +// var countryInfo = require('../../../../utils/country.js');
  5 +// const cardTypeArray = ['居民身份证', '中国护照', '港澳居民来往内地通行证', '港澳居民居住证', '台湾居民来往大陆通行证', '台湾居民居住证', '外国护照', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)'];
  6 +const cardTypeArray8 = ['居民身份证', '中国护照', '港澳居民居住证', '台湾居民居住证', '外国人永久居留身份证', '外国人工作许可证(A类)', '外国人工作许可证(B类)', '外国人工作许可证(C类)'];
  7 +// const cardTypeDicts = [{ 'code': '1', 'name': '居民身份证' }, { 'code': '2', 'name': '中国护照' }, { 'code': '3', 'name': '港澳居民来往内地通行证' }, { 'code': '4', 'name': '港澳居民居住证' }, { 'code': '5', 'name': '台湾居民来往大陆通行证' }, { 'code': '6', 'name': '台湾居民居住证' }, { 'code': '7', 'name': '外国护照' }, { 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)'}];
  8 +// const cardTypes8 = [{ 'code': '1', 'name': '居民身份证' }, { 'code': '2', 'name': '中国护照' }, { 'code': '4', 'name': '港澳居民居住证' }, { 'code': '6', 'name': '台湾居民居住证' }, { 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }];
  9 +
4 10 Page({
5 11
6 12 /**
... ... @@ -10,6 +16,7 @@ Page({
10 16 isshow01: false,
11 17 isshow02: false,
12 18 isshow03: false,
  19 + hasOtherCard:false,
13 20 taxInfo: {},
14 21 proffessionlist: {},
15 22 banklist: {},
... ... @@ -44,21 +51,56 @@ Page({
44 51 },
45 52 cardtypeData: {
46 53 isrequre: true,
47   - disabled: true,
48 54 label: '证照类型',
49 55 bindtype: 'cardtype',
50   - placeholder: '居民身份证',
  56 + placeholder: '请选择证照类型',
  57 + selected: '',
  58 + values: cardTypeArray8,
  59 + // range_key:'name',
  60 + // values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照',
  61 + // '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证'
  62 + // ],
  63 + onChange: 'onPickerSelect'
  64 + },
  65 + otherCardtypeData: {
  66 + isrequre: true,
  67 + label: '其他证照类型',
  68 + bindtype: 'other_cardtype',
  69 + placeholder: '请选择证照类型',
  70 + selected: '',
  71 + values: [],
  72 + // range_key: 'name',
  73 + onChange: 'onPickerSelect'
  74 + },
  75 + countryData: {
  76 + label: '国籍',
  77 + bindtype: 'country',
  78 + isrequre: true,
51 79 selected: '',
52   - values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照',
53   - '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证'
54   - ],
  80 + // range_key:'name',
  81 + placeholder: '请选择国籍',
  82 + onChange: 'onPickerSelect',
  83 + },
  84 + birthCountryData: {
  85 + isrequre: true,
  86 + label: '出生国家(地区)',
  87 + bindtype: 'brith_country',
  88 + placeholder: '请选择国籍',
  89 + onChange: 'onPickerSelect',
  90 + },
  91 + taxpayerTypeData: {
  92 + isrequre: true,
  93 + label: '纳税人类型',
  94 + bindtype: 'taxpayerType',
  95 + placeholder: '请选择纳税人类型',
  96 + values: ["居民", "非居民"],
55 97 onChange: 'onPickerSelect'
56   -},
  98 + },
57 99 forignerInfo: {
58 100 isrequre: true,
59 101 label: '是否境外人员',
60 102 bindtype: 'forigner',
61   - placeholder: '',
  103 + placeholder: '请选择',
62 104 disabled: true,
63 105 values: ["否", "是"],
64 106 onChange: 'onPickerSelect'
... ... @@ -73,8 +115,9 @@ Page({
73 115 },
74 116 genderData: {
75 117 label: '性别',
  118 + isrequre: true,
76 119 bindtype: 'gender',
77   - disabled: true,
  120 + // disabled: true,
78 121 placeholder: '性别',
79 122 values: ["男", "女"],
80 123 selected: '',
... ... @@ -159,14 +202,15 @@ Page({
159 202 },
160 203 // 时间picker
161 204 birthDate: {
162   - label: '出生年月',
163   - disabled:true,
  205 + label: '出生日期',
  206 + isrequre:true,
164 207 bindtype: 'birthday',
165 208 placeholder: '出生日期',
166 209 selected: '',
167 210 mode: "date",
168 211 fields: "day",
169 212 start: '1949-01-01',
  213 + end: format.curDateTime(),
170 214 onChange: 'birthdayChange',
171 215 },
172 216 startDate: {
... ... @@ -189,10 +233,32 @@ Page({
189 233 start: '2010-01-01',
190 234 onChange: 'endChange',
191 235 },
  236 +
  237 + firstEntryDate: {
  238 + label: '首次入境时间',
  239 + isrequre: true,
  240 + bindtype: 'entry_date',
  241 + placeholder: '出生日期',
  242 + selected: '',
  243 + mode: "date",
  244 + fields: "day",
  245 + onChange: 'onPickerSelect',
  246 + },
  247 + predictLeaveDate: {
  248 + label: '预计离境时间',
  249 + isrequre: true,
  250 + bindtype: 'leave_date',
  251 + placeholder: '出生日期',
  252 + selected: '',
  253 + mode: "date",
  254 + fields: "day",
  255 + onChange: 'onPickerSelect',
  256 + },
192 257 // 地址选择器
193 258 contactaddressInfo: {
194 259 label: '联系地址',
195 260 mode: 'region',
  261 + maxWidth: 490,
196 262 address_code: ['', '', ''],
197 263 address_value: ['', '', ''],
198 264 selected: '',
... ... @@ -227,7 +293,7 @@ Page({
227 293 * 生命周期函数--监听页面加载
228 294 */
229 295 onLoad: function(options) {
230   -
  296 +
231 297 console.log('options.id', options.id)
232 298 if (options.id && options.id.length > 0) {
233 299 this.setData({
... ... @@ -237,7 +303,54 @@ Page({
237 303 }
238 304 this.getproffessiondata()
239 305 this.getbanklist()
  306 + this.getCountry()
  307 + },
  308 +//****************获取国籍数据************/
  309 + getCountry: function () {
  310 + var that = this
  311 + wx.showLoading({
  312 + title: '',
  313 + })
  314 + var Authorization = app.globalData.Authorization;
  315 + wx.request({
  316 + url: baseUrl + 'persontax/v1/nation-list',
  317 + method: "GET",
  318 + header: {
  319 + 'content-type': 'application/json', // 默认值
  320 + "Authorization": Authorization
  321 + },
  322 + success: function (res) {
  323 + var countrys = res.data.concat()
  324 + that.data.birthCountryData.values = res.data
  325 + if (countrys.indexOf('中国') > -1) {
  326 + countrys.splice(countrys.indexOf('中国'), 1);
  327 + }
  328 + if (countrys.indexOf('中国台湾') > -1) {
  329 + countrys.splice(countrys.indexOf('中国台湾'), 1);
  330 + }
  331 + if (countrys.indexOf('香港') > -1) {
  332 + countrys.splice(countrys.indexOf('香港'), 1);
  333 + }
  334 + if (countrys.indexOf('澳门') > -1) {
  335 + countrys.splice(countrys.indexOf('澳门'), 1);
  336 + }
  337 + that.data.countryData.values = countrys
  338 + that.countrys = countrys
  339 + that.setData({
  340 + countryData: that.data.countryData,
  341 + birthCountryData: that.data.birthCountryData
  342 + })
  343 + },
  344 + fail(res) {
  345 + wx.hideLoading()
  346 + },
  347 + complete() {
  348 + wx.hideLoading()
  349 + }
  350 + })
240 351 },
  352 +
  353 +
241 354 //****************获取自然人数据************/
242 355 getpersonalTax: function(id) {
243 356 var that = this
... ... @@ -274,10 +387,12 @@ Page({
274 387 //对各参数初始赋值
275 388 handleDatas: function (tax_info) {
276 389 //todo
  390 + console.log('tax_info', tax_info)
277 391 var curdate = format.curDateTime()
278   - console.log('curdate', curdate)
  392 + this.dealCardType(tax_info.id_card_type)//为防止干扰其他字段,需要先执行
279 393
280 394 this.data.name = tax_info.name
  395 + this.data.other_name = tax_info.other_name
281 396 if (tax_info.certification_status == 'active' && tax_info.id_card_no.length) {//已通过拍摄身份证认证过,不能修改
282 397 this.data.genderData.disabled = true
283 398 this.data.birthDate.disabled = true
... ... @@ -285,14 +400,23 @@ Page({
285 400 }
286 401
287 402 this.data.personstatusData.selected = tax_info.taxpayer_status
288   -
289   - this.data.cardtypeData.selected = tax_info.id_card_type
290   - console.log('cardtypeData', this.data.cardtypeData)
  403 + this.data.cardtypeData.selected = tax_info.id_card_type //cardTypeDicts[parseInt(tax_info.id_card_type) - 1]['name']
  404 + // this.data.cardtypeData.selected_code = tax_info.id_card_type
291 405 this.data.card_number = tax_info.id_card_no
  406 +
  407 + this.data.otherCardtypeData.selected = tax_info.other_id_card_type //cardTypeDicts[parseInt(tax_info.other_id_card_type) - 1]['name']
  408 + // this.data.otherCardtypeData.selected_code = tax_info.other_id_card_type
  409 +
  410 + this.data.other_card_number = tax_info.other_id_card_no
  411 + this.data.overseas = tax_info.is_overseas_personnel
  412 + this.data.countryData.selected = tax_info.native
  413 + this.data.birthCountryData.selected = tax_info.birth_native
  414 + this.data.taxpayerTypeData.selected = tax_info.taxpayer_type =='resident'?'居民':'非居民'
  415 +
292 416 this.data.mobile = tax_info.mobile
293 417 this.data.investInfo.selected = tax_info.is_investor
294 418 this.data.specificIndustryInfo.selected = tax_info.is_specific_profession
295   - //非必填
  419 +
296 420 this.data.genderData.selected = tax_info.gender
297 421 if (tax_info.birth_date == -62135596800 || tax_info.birth_date == 0) {
298 422 this.data.birthDate.selected = ''
... ... @@ -300,7 +424,7 @@ Page({
300 424 // this.data.birthDate.selected = format.yearFormString(tax_info.birth_date) + '-' + format.monthFormString(tax_info.birth_date) + '-' + format.dayFormString(tax_info.birth_date)
301 425 this.data.birthDate.selected = format.formatTime_date(tax_info.birth_date)
302 426 }
303   -
  427 +//非必填
304 428 console.log('this.data.birthDate', new Date(tax_info.birth_date).toLocaleDateString())
305 429 if (tax_info.join_date > 1000) {
306 430 // this.data.startDate.selected = format.yearFormString(tax_info.join_date) + '-' + format.monthFormString(tax_info.join_date) + '-' + format.dayFormString(tax_info.join_date)
... ... @@ -309,7 +433,12 @@ Page({
309 433 if (tax_info.separate_date > 1000) {
310 434 this.data.endDate.selected = format.formatTime_date(tax_info.separate_date)
311 435 }
312   -
  436 + const firstEntryDate = format.formatTime_date(tax_info.first_entry_date)
  437 + const predictLeaveDate = format.formatTime_date(tax_info.predict_leave_date)
  438 + this.data.firstEntryDate.selected = (firstEntryDate.indexOf("01-01-01") == -1) ? firstEntryDate:''
  439 + this.data.firstEntryDate.datelong = tax_info.first_entry_date
  440 + this.data.predictLeaveDate.selected = (predictLeaveDate.indexOf("01-01-01") == -1) ? predictLeaveDate : ''
  441 + this.data.predictLeaveDate.datelong = tax_info.predict_leave_date
313 442 // this.data.professionData.selected = tax_info.profession.three_level_name
314 443
315 444 this.data.birthDate.end = curdate
... ... @@ -320,16 +449,18 @@ Page({
320 449 this.data.lieshuInfo.selected = tax_info.is_martyr_family
321 450 this.data.lonelyolderInfo.selected = tax_info.is_lonely_man
322 451 this.data.bankInfo.selected = tax_info.bank
323   - // this.data.contactaddressInfo.selected = tax_info.contact_address.province + tax_info.contact_address.city + tax_info.contact_address.district
  452 + this.data.contactaddressInfo.selected = tax_info.contact_address.province + tax_info.contact_address.city + tax_info.contact_address.district
324 453 this.data.currentaddressInfo.selected = tax_info.current_address.province + tax_info.current_address.city + tax_info.current_address.district
325 454 this.data.birthaddressInfo.selected = (tax_info.huji_address.province + tax_info.huji_address.city + tax_info.huji_address.district).replace(/(^\s*)|(\s*$)/g, "")
326 455 this.data.employeeInfo.selected = tax_info.is_employee
327 456 this.data.investpersonalInfo.selected = tax_info.is_business_angel
328 457 this.setData({
329   - huji_address_detail: tax_info.huji_address_detail.replace(/(^\s*)|(\s*$)/g, ""),
  458 + // huji_address_detail: tax_info.huji_address_detail.replace(/(^\s*)|(\s*$)/g, ""),
330 459 name: this.data.name,
  460 + other_name: this.data.other_name,
331 461 personstatusData: this.data.personstatusData,
332 462 cardtypeData: this.data.cardtypeData,
  463 + otherCardtypeData: this.data.otherCardtypeData,
333 464 mobile: this.data.mobile,
334 465 investInfo: this.data.investInfo,
335 466 specificIndustryInfo: this.data.specificIndustryInfo,
... ... @@ -355,9 +486,15 @@ Page({
355 486 startDate: this.data.startDate,
356 487 long_end_date: tax_info.separate_date ? tax_info.separate_date : 0,
357 488 endDate: this.data.endDate,
  489 + firstEntryDate: this.data.firstEntryDate,
  490 + predictLeaveDate: this.data.predictLeaveDate,
358 491 isIdCard: '居民身份证' == tax_info.id_card_type ? true : false,
359   - card_number: this.data.card_number
360   -
  492 + card_number: this.data.card_number,
  493 + other_card_number: this.data.other_card_number,
  494 + countryData: this.data.countryData,
  495 + birthCountryData: this.data.birthCountryData,
  496 + overseas: this.data.overseas,
  497 + taxpayerTypeData: this.data.taxpayerTypeData
361 498 })
362 499
363 500 },
... ... @@ -512,8 +649,9 @@ Page({
512 649 birth_day = id_info.birthday.year + '-0' + id_info.birthday.month + '-0' + id_info.birthday.day;
513 650 }
514 651
515   - var cardtype_Data = that.data.cardtypeData
516   - cardtype_Data.selected = '居民身份证'
  652 + var cardtypeData = that.data.cardtypeData
  653 + cardtypeData.selected = '居民身份证'
  654 + // cardtypeData.selected_code = '1'
517 655 var gender_Data = that.data.genderData
518 656 gender_Data.selected = id_info.gender
519 657
... ... @@ -535,7 +673,7 @@ Page({
535 673 idInfoData: id_info,
536 674 name: id_info.name,
537 675 birthday: birth_day,
538   - cardtypeData: cardtype_Data,
  676 + cardtypeData: cardtypeData,
539 677 genderData: gender_Data,
540 678 long_birth_date: Date.parse(new Date(birth_day)) / 1000,
541 679 birthDate: that.data.birthDate,
... ... @@ -572,6 +710,85 @@ Page({
572 710
573 711 },
574 712
  713 + dealCardType: function (new_type){
  714 + // console.log('cardtype_code', new_type_code)
  715 + console.log('cardtype', new_type)
  716 + var is_idcard = this.data.isIdCard
  717 + // const new_type = cardTypeDicts[parseInt(new_type_code)-1]['name']
  718 + // this.data.cardtypeData.selected_code = new_type_code
  719 + this.data.cardtypeData.selected = new_type
  720 + this.data.nameText = ''
  721 + if ('居民身份证' == new_type) {
  722 + is_idcard = true
  723 + this.data.genderData.disabled = true
  724 + this.data.birthDate.disabled = true
  725 + } else {
  726 + is_idcard = false
  727 + this.data.genderData.disabled = false
  728 + this.data.birthDate.disabled = false
  729 + }
  730 + this.data.hasOtherCard = true
  731 + this.data.overseas = '是'
  732 + this.data.taxpayerTypeData.disabled = false
  733 + this.data.taxpayerTypeData.selected = ''
  734 + if ('居民身份证' == new_type || '中国护照' == new_type) {
  735 + this.data.overseas = '否'
  736 + this.data.countryData.selected = '中国'
  737 + this.data.countryData.disabled = true
  738 + this.data.hasOtherCard = false
  739 + this.data.taxpayerTypeData.selected = '居民'
  740 + this.data.taxpayerTypeData.disabled = true
  741 + } else if (new_type.indexOf("港澳") != -1) {
  742 + this.data.countryData.values = ['中国香港', '中国澳门']
  743 + this.data.countryData.selected = ''
  744 + this.data.countryData.disabled = false
  745 + this.data.nameText = '英文名'
  746 + // if (new_type.indexOf('通行证') != -1){
  747 + // this.data.otherCardtypeData.values = [{ 'code': '4', 'name': '港澳居民居住证'}];
  748 + // }else{
  749 + this.data.otherCardtypeData.values = ['港澳居民来往内地通行证'];// [{ 'code': '3', 'name': '港澳居民来往内地通行证'}];
  750 + this.data.otherCardtypeData.selected = '港澳居民来往内地通行证';
  751 + // }
  752 + } else if (new_type.indexOf("台湾") != -1) {
  753 + this.data.countryData.selected = '中国台湾'
  754 + this.data.countryData.disabled = true
  755 + this.data.nameText = '英文名'
  756 + // if (new_type.indexOf('通行证') != -1) {
  757 + // this.data.otherCardtypeData.values = [{ 'code': '6', 'name': '台湾居民居住证' }];
  758 + // } else {
  759 + this.data.otherCardtypeData.values = ['台湾居民来往大陆通行证']; //[{ 'code': '5', 'name': '台湾居民来往大陆通行证' }];
  760 + this.data.otherCardtypeData.selected = '台湾居民来往大陆通行证';
  761 + // }
  762 +
  763 + } else {
  764 + this.data.countryData.selected = ''
  765 + this.data.countryData.values = this.countrys ? this.countrys : []
  766 + this.data.countryData.disabled = false
  767 + this.data.nameText = '中文名'
  768 + // if (new_type.indexOf("外国护照") != -1) {
  769 + // this.data.otherCardtypeData.values = [{ 'code': '8', 'name': '外国人永久居留身份证' }, { 'code': '9', 'name': '外国人工作许可证(A类)' }, { 'code': '10', 'name': '外国人工作许可证(B类)' }, { 'code': '11', 'name': '外国人工作许可证(C类)' }];
  770 + // } else {
  771 + this.data.otherCardtypeData.values = ['外国护照']; //[{ 'code': '7', 'name': '外国护照' }];
  772 + this.data.otherCardtypeData.selected = '外国护照';
  773 + // }
  774 + }
  775 + this.setData({
  776 + isIdCard: is_idcard,
  777 + hasOtherCard: this.data.hasOtherCard,
  778 + genderData: this.data.genderData,
  779 + birthDate: this.data.birthDate,
  780 + countryData: this.data.countryData,
  781 + cardtypeData: this.data.cardtypeData,
  782 + otherCardtypeData: this.data.otherCardtypeData,
  783 + nameText: this.data.nameText,
  784 + overseas: this.data.overseas,
  785 + taxpayerTypeData: this.data.taxpayerTypeData
  786 + })
  787 +
  788 +
  789 + },
  790 +
  791 +
575 792 onPickerSelect: function(e) {
576 793 console.log('picker发送选择改变,携带值为', e)
577 794 switch (e.currentTarget.id) {
... ... @@ -583,24 +800,64 @@ Page({
583 800 })
584 801 break;
585 802 case 'cardtype':
586   - var cardtype_data = this.data.cardtypeData
587   - var new_type = cardtype_data.values[e.detail.value]
588   - console.log('cardtype', cardtype_data.values[e.detail.value])
589   - if (new_type != this.data.cardtypeData.selected) {
590   - var is_idcard = this.data.isIdCard
591   - cardtype_data.selected = cardtype_data.values[e.detail.value]
592   - if (0 == e.detail.value) {
593   - is_idcard = true
594   - } else {
595   - is_idcard = false
  803 + var cardtypeData = this.data.cardtypeData
  804 + var new_type = cardtypeData.values[e.detail.value] //['name']
  805 + // var new_type_code = cardtypeData.values[e.detail.value]['code']
  806 + var selected = cardtypeData.selected
  807 + if (new_type != selected) {
  808 + this.dealCardType(new_type)
  809 + var setData = { card_number: ''}
  810 + if ((new_type.indexOf('外国人') != -1) && (selected.indexOf('外国人') != -1)) {
  811 + console.log('外国人', new_type, selected)
  812 + }else {
  813 + // this.data.otherCardtypeData.selected = ''
  814 + // setData.otherCardtypeData = this.data.otherCardtypeData
  815 + setData.other_card_number = ''
596 816 }
  817 + this.setData(setData)
  818 + }
  819 + break;
  820 + case 'other_cardtype':
  821 + var otherCardtypeData = this.data.otherCardtypeData
  822 + var new_type = otherCardtypeData.values[e.detail.value] //['name']
  823 + // var new_type_code = otherCardtypeData.values[e.detail.value]['code']
  824 +
  825 + if (new_type != otherCardtypeData.selected) {
  826 + otherCardtypeData.selected = new_type
  827 + // otherCardtypeData.selected_code = new_type_code
  828 + this.setData({
  829 + other_card_number: "",
  830 + otherCardtypeData: this.data.otherCardtypeData
  831 + })
  832 + }
  833 + break;
  834 + case 'country':
  835 + var countryData = this.data.countryData
  836 + var new_country = countryData.values[e.detail.value]
  837 + if (new_country != countryData.selected) {
  838 + countryData.selected = new_country
597 839 this.setData({
598   - card_number:"",
599   - isIdCard: is_idcard,
600   - cardtypeData: cardtype_data
  840 + countryData: countryData
601 841 })
602 842 }
603 843 break;
  844 + case 'brith_country':
  845 + var birthCountryData = this.data.birthCountryData
  846 + var new_country = birthCountryData.values[e.detail.value]
  847 + if (new_country != birthCountryData.selected) {
  848 + birthCountryData.selected = new_country
  849 + this.setData({
  850 + birthCountryData: birthCountryData
  851 + })
  852 + }
  853 + break;
  854 + case 'taxpayerType':
  855 + var taxpayerTypeData = this.data.taxpayerTypeData
  856 + taxpayerTypeData.selected = taxpayerTypeData.values[e.detail.value]
  857 + this.setData({
  858 + taxpayerTypeData: taxpayerTypeData
  859 + })
  860 + break;
604 861 case 'forigner':
605 862 var forigner_data = this.data.forignerInfo
606 863 forigner_data.selected = forigner_data.values[e.detail.value]
... ... @@ -689,6 +946,25 @@ Page({
689 946 investpersonalInfo: investpersonal_data
690 947 })
691 948 break;
  949 + case 'entry_date':
  950 + this.data.firstEntryDate.selected = e.detail.value
  951 + this.data.firstEntryDate.datelong = Date.parse(new Date(e.detail.value)) / 1000
  952 + this.data.predictLeaveDate.start = e.detail.value
  953 + if (this.data.firstEntryDate.datelong>this.data.predictLeaveDate.datelong){
  954 + this.data.predictLeaveDate.selected = ''
  955 + }
  956 + this.setData({
  957 + firstEntryDate: this.data.firstEntryDate,
  958 + predictLeaveDate: this.data.predictLeaveDate
  959 + })
  960 + break;
  961 + case 'leave_date':
  962 + this.data.predictLeaveDate.selected = e.detail.value
  963 + this.data.predictLeaveDate.datelong = Date.parse(new Date(e.detail.value)) / 1000
  964 + this.setData({
  965 + predictLeaveDate: this.data.predictLeaveDate
  966 + })
  967 + break;
692 968 }
693 969
694 970 },
... ... @@ -786,12 +1062,19 @@ Page({
786 1062 name: e.detail.value
787 1063 })
788 1064 },
789   -
  1065 + bindOtherName: function(e) {
  1066 + this.setData({
  1067 + other_name: e.detail.value
  1068 + })
  1069 + },
790 1070 idcardblur: function (e) {
791 1071 var idCardNo = e.detail.value
792 1072 this.setData({
793 1073 card_number: idCardNo
794 1074 })
  1075 + if (!this.data.isIdCard) {
  1076 + return;
  1077 + }
795 1078 if (!idCardNo.length) {
796 1079 wx.showToast({
797 1080 image: "../../../../images/warn.png",
... ... @@ -812,6 +1095,9 @@ Page({
812 1095 this.setData({
813 1096 card_number: idCardNo
814 1097 })
  1098 + if (!this.data.isIdCard) {
  1099 + return;
  1100 + }
815 1101 if (e.detail.value.length == 18) {
816 1102 if (!format.isIDCardNum(idCardNo)) {
817 1103 wx.showToast({
... ... @@ -858,10 +1144,10 @@ Page({
858 1144 },
859 1145
860 1146 formSubmit: function(e) {
861   - console.log("date", Date.parse(new Date(this.data.birthday)) / 1000)
862 1147 var regEmail = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,20}[a-z0-9]+$");
863 1148 var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/;
864   - var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/;
  1149 + var regname = /^[\u4E00-\u9FA5A-Za-z·s]{2,20}$/;
  1150 + // var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,20}$/;
865 1151 // var regMoney = /^[0-9]*(\.[0,9]{1,2})?$/;
866 1152 var regMoney = /^([1-9][\d]{0,10}|0)(\.[\d]{1,2})?$/
867 1153 var formdata = e.detail.value;
... ... @@ -880,6 +1166,43 @@ Page({
880 1166 this.showtoast('请输入正确姓名');
881 1167 return
882 1168 }
  1169 + if (this.data.genderData.selected.length < 1) {
  1170 + this.showtoast('请选择性别');
  1171 + return
  1172 + }
  1173 + if (this.data.birthDate.selected.length < 1) {
  1174 + this.showtoast('请选择出生日期');
  1175 + return
  1176 + }
  1177 + if (this.data.countryData.selected.length < 1) {
  1178 + this.showtoast('请选择国籍');
  1179 + return
  1180 + }
  1181 + if (this.data.taxpayerTypeData.selected.length < 1) {
  1182 + this.showtoast('请选择纳税人类型');
  1183 + return
  1184 + }
  1185 + if (this.data.hasOtherCard && !this.data.firstEntryDate.selected) {
  1186 + this.showtoast('请选择首次入境时间');
  1187 + return
  1188 + }
  1189 + if (this.data.hasOtherCard && !this.data.predictLeaveDate.selected) {
  1190 + this.showtoast('请选择预计离境时间');
  1191 + return
  1192 + }
  1193 + if (this.data.hasOtherCard && !this.data.otherCardtypeData.selected) {
  1194 + this.showtoast('请选择其他证照类型');
  1195 + return
  1196 + }
  1197 + if (this.data.hasOtherCard && !formdata.other_card_number.length) {
  1198 + this.showtoast('请输入其他证照号码');
  1199 + return
  1200 + }
  1201 + if (this.data.hasOtherCard && !this.data.birthCountryData.selected) {
  1202 + this.showtoast('请选择出生国家');
  1203 + return
  1204 + }
  1205 +
883 1206 if (this.data.mobile.length < 1) {
884 1207 this.showtoast('请输入手机号码');
885 1208 return
... ... @@ -887,23 +1210,28 @@ Page({
887 1210 this.showtoast('手机号码有误');
888 1211 return
889 1212 }
890   - if (this.data.curAddress_haschanged || this.data.taxInfo.current_address.province_code) {//选择了地址
  1213 + if (this.data.curAddress_haschanged) {//选择了地址 || this.data.taxInfo.current_address.province_code
891 1214 if (formdata.current_address_detail.length < 1) {
892 1215 this.showtoast('请填写详细居住地址');
893 1216 return
894 1217 }
895 1218 }
896   - if (this.data.birthAddress_haschanged || this.data.taxInfo.huji_address.province_code) {//选择了地址
  1219 + if (this.data.birthAddress_haschanged) {//选择了地址 || this.data.taxInfo.huji_address.province_code
897 1220 if (formdata.huji_address_detail.length < 1) {
898 1221 this.showtoast('请填写详细户籍地址');
899 1222 return
900 1223 }
901 1224 }
902   -
903   - // if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) {
904   - // this.showtoast('邮箱格式有误');
905   - // return
906   - // }
  1225 + if (this.data.contactAddress_haschanged) {//选择了地址 || this.data.taxInfo.contact_address.province_code
  1226 + if (formdata.contact_address_detail.length < 1) {
  1227 + this.showtoast('请填写详细联系地址');
  1228 + return
  1229 + }
  1230 + }
  1231 + if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) {
  1232 + this.showtoast('邮箱格式有误');
  1233 + return
  1234 + }
907 1235 // if (formdata.email && formdata.email.length > 0 && !format.checkEmail(formdata.email)) {
908 1236 // this.showtoast('邮箱格式有误');
909 1237 // return
... ... @@ -988,15 +1316,20 @@ Page({
988 1316 data: {
989 1317 'certification_status': that.getCertifyStatus(formdata),
990 1318 "name": that.data.name,
  1319 + "other_name": that.data.other_name,
991 1320 "family_ties": '本人',//that.data.relativeData.selected,
992   - "native": "中国",
993   - "taxpayer_type":"居民",
994   - "is_overseas_personnel": "否",
995   - "id_card_type": that.data.cardtypeData.selected,
  1321 + "native": that.data.countryData.selected,
  1322 + "taxpayer_type": that.data.taxpayerTypeData.selected == '居民' ? 'resident' :'non-resident',
  1323 + "is_overseas_personnel": that.data.overseas,
  1324 + 'birth_native': that.data.birthCountryData.selected,
  1325 + "id_card_type": that.data.cardtypeData.selected, //selected_code,
996 1326 "id_card_no": that.data.card_number,
  1327 + "other_id_card_type": that.data.otherCardtypeData.selected, //selected_code,
  1328 + "other_id_card_no": formdata.other_card_number,
997 1329 "gender": that.data.genderData.selected,
998 1330 "birth_date": that.data.long_birth_date,
999   -
  1331 + "first_entry_date": that.data.firstEntryDate.datelong,
  1332 + "predict_leave_date": that.data.predictLeaveDate.datelong,
1000 1333 "mobile": that.data.mobile,
1001 1334 "current_address": request_current_address,
1002 1335 "current_address_detail": formdata.current_address_detail,
... ... @@ -1017,8 +1350,8 @@ Page({
1017 1350 "is_lonely_man": that.data.lonelyolderInfo.selected,
1018 1351 "comment": formdata.comment,
1019 1352
1020   - // "contact_address": request_contact_address ? request_contact_address : that.data.taxInfo.contact_address_detail,
1021   - // "contact_address_detail": formdata.contact_address_detail.length > 0 ? formdata.contact_address_detail : that.data.taxInfo.contact_address_detail,
  1353 + "contact_address": request_contact_address,
  1354 + "contact_address_detail": formdata.contact_address_detail,
1022 1355
1023 1356 // "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : this.data.taxInfo.join_date,
1024 1357 // "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : this.data.taxInfo.separate_date,
... ... @@ -1126,7 +1459,8 @@ Page({
1126 1459 wx.showToast({
1127 1460 title: str,
1128 1461 duration: 2000,
1129   - image: '/images/error.png'
  1462 + icon:'none'
  1463 + // image: '/images/error.png'
1130 1464 })
1131 1465 },
1132 1466
... ...
... ... @@ -29,9 +29,10 @@
29 29 <text class='text_777_30 float_left' style='line-height: 90rpx'>证照号码</text>
30 30 <view>
31 31 <image wx:if="{{isIdCard}}" class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' hidden="{{taxInfo.certification_status=='active' && taxInfo.id_card_no.length>0}}"></image>
32   - <input class='input_wrap' disabled="{{taxInfo.certification_status=='active' && taxInfo.id_card_no.length>0}}" placeholder="请输入证照号码" value="{{card_number}}" name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum' type='idcard'></input>
  32 + <input class='input_wrap' disabled="{{taxInfo.certification_status=='active' && taxInfo.id_card_no.length>0}}" placeholder="请输入证照号码" value="{{card_number}}" name='id_card_no' maxlength='30' bindblur='idcardblur' bindinput = 'bindinputcardnum' type="{{isIdCard.length?'idcard':''}}"></input>
33 33 <!-- <input class='input_wrap' hidden="{{taxInfo.certification_status=='active'}}" placeholder="请输入证照号码" value='{{card_number}}' name='id_card_no' maxlength='18' bindblur='idcardblur' bindinput = 'bindinputcardnum'></input>
34 34 <input class='input_wrap' hidden="{{taxInfo.certification_status!='active'}}" placeholder="{{card_number?card_number:'身份证号获取失败'}}" name='id_card_no' disabled='true'></input> -->
  35 + <view class="divide_line_30"></view>
35 36 </view>
36 37 </view>
37 38 <view class='item_body' hidden="{{!isself}}">
... ... @@ -42,31 +43,57 @@
42 43 <input hidden="{{taxInfo.certification_status!='active'}}" class='input_wrap' placeholder="{{name}}" disabled="true" bindblur='bindinputname' style='line-height: 90rpx'></input> -->
43 44 </view>
44 45 <view class="divide_line_30"></view>
  46 + <template is="picker_cell_normal" data="{{...genderData}}" />
  47 + <view class="divide_line_30"></view>
  48 + <template is="picker_cell_normal" data="{{...birthDate}}" />
  49 + <view class="divide_line_30"></view>
  50 + <template is="picker_cell_normal" data="{{...countryData}}" />
45 51
46   - <view class='item_body'>
  52 + <!-- <view class='item_body'>
47 53 <text class='red_star_right_10'>*</text>
48 54 <text class='text_777_30 float_left' style='line-height: 90rpx'>国籍</text>
49 55 <text class='text_black_30 float_right' style='line-height: 90rpx'>中国</text>
50   - </view>
  56 + </view> -->
51 57 <view class="divide_line_30"></view>
52   - <view class='item_body'>
  58 + <template is="picker_cell_normal" data="{{...taxpayerTypeData}}" />
  59 + <!-- <view class='item_body'>
53 60 <text class='red_star_right_10'>*</text>
54 61 <text class='text_777_30 float_left' style='line-height: 90rpx'>纳税人类型</text>
55 62 <text class='text_black_30 float_right' style='line-height: 90rpx'>居民</text>
56   - </view>
  63 + </view> -->
57 64 <view class="divide_line_30"></view>
58 65 <view class='item_body'>
59 66 <text class='red_star_right_10'>*</text>
60 67 <text class='text_777_30 float_left' style='line-height: 90rpx'>是否境外人员</text>
61   - <text class='text_black_30 float_right' style='line-height: 90rpx'>否</text>
62   - </view>
63   - <view class="divide_line_30"></view>
64   -
65   - <view hidden='{{!isshow01}}'>
  68 + <text class='text_black_30 float_right' style='line-height: 90rpx'>{{overseas}}</text>
  69 + </view>
  70 + <view wx:if='{{hasOtherCard}}'>
  71 + <view class="divide_line_30"></view>
  72 + <template is="picker_cell_normal" data="{{...firstEntryDate}}" />
66 73 <view class="divide_line_30"></view>
67   - <template is="picker_cell_normal" data="{{...genderData}}" />
  74 + <template is="picker_cell_normal" data="{{...predictLeaveDate}}" />
68 75 <view class="divide_line_30"></view>
69   - <template is="picker_cell_normal" data="{{...birthDate}}" />
  76 + <template is="picker_cell_normal" data="{{...otherCardtypeData}}" />
  77 + <view class="divide_line_30"></view>
  78 + <view class='item_body'>
  79 + <text class='red_star_right_10'>*</text>
  80 + <text class='text_777_30 float_left' style='line-height: 90rpx'>其他证照号码</text>
  81 + <view>
  82 + <input class='input_wrap' placeholder="请输入证照号码" value="{{other_card_number}}" name='other_card_number' maxlength='30'></input>
  83 + </view>
  84 + </view>
  85 + <view class="divide_line_30"></view>
  86 + <template is="picker_cell_normal" data="{{...birthCountryData}}" />
  87 + </view>
  88 + <view hidden='{{!isshow01}}'>
  89 + <view wx:if='{{hasOtherCard}}'>
  90 + <view class="divide_line_30"></view>
  91 + <view class='item_body'>
  92 + <text class='text_777_30 float_left head_in' style='line-height: 90rpx'>{{nameText}}</text>
  93 + <input class='input_wrap' placeholder="请输入{{nameText}}" value='{{other_name}}' bindblur='bindOtherName' style='line-height: 90rpx'></input>
  94 + </view>
  95 +
  96 + </view>
70 97 </view>
71 98 </view>
72 99 </view>
... ... @@ -108,10 +135,19 @@
108 135 <view class="divide_line_30"></view>
109 136 <view class='item_body '>
110 137 <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>详细地址</text>
111   - <input class='input_wrap ' name='huji_address_detail' placeholder-class='text_999_30' placeholder='请输入详细户籍地址' value='{{huji_address_detail}}'></input>
  138 + <input class='input_wrap ' name='huji_address_detail' placeholder-class='text_999_30' placeholder='请输入详细户籍地址' value='{{taxInfo.huji_address_detail}}'></input>
112 139 </view>
113 140 <view class="divide_line_30"></view>
114   -
  141 + <view wx:if='{{hasOtherCard}}' >
  142 + <template is="picker_cell_normal" data="{{...contactaddressInfo}}" />
  143 + <view class="divide_line_30"></view>
  144 + <view class='item_body '>
  145 + <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>详细地址</text>
  146 + <input class='input_wrap ' name='contact_address_detail' placeholder-class='text_999_30' placeholder='请输入详细联系地址' value='{{taxInfo.contact_address_detail}}'></input>
  147 + </view>
  148 + <view class="divide_line_30"></view>
  149 + </view>
  150 +
115 151 <view class='item_body'>
116 152 <text class='text_666_30 float_left head_in' style='line-height: 90rpx'>电子邮箱</text>
117 153 <input class='input_wrap' name='email' value='{{taxInfo.email}}' placeholder='请输入电子邮箱' placeholder-class='text_999_30' maxlength='32'></input>
... ... @@ -224,9 +260,10 @@
224 260
225 261 </view>
226 262 </view>
227   -
228   - <view hidden='{{isshow02}}' style='background:#f8f8f8;height:500rpx'></view>
229   - <view hidden='{{!isshow02}}' style='background:#f8f8f8;height:200rpx'></view>
  263 + <view class="divide_line_30"></view>
  264 + <view style='background:#FFF;height:84rpx'></view>
  265 + <!-- <view hidden='{{isshow02}}' style='background:#f8f8f8;height:500rpx'></view>
  266 + <view hidden='{{!isshow02}}' style='background:#f8f8f8;height:200rpx'></view> -->
230 267
231 268 <view class="btn_bottom">
232 269 <button class="btn_bottom" formType="submit"> 保存</button>
... ...
注册登录 后发表评论