提交 0b52017374f0c9925b8ac23aef887af02a9fd5e1

作者 wangyu
1 个父辈 291e2f45

优化

@@ -7,18 +7,32 @@ Page({ @@ -7,18 +7,32 @@ Page({
7 * Page initial data 7 * Page initial data
8 */ 8 */
9 data: { 9 data: {
10 - support_duty_id:"",  
11 - name:"",  
12 - id_card_no:"" 10 + support_duty_id: "",
  11 + name: "",
  12 + nation: "",
  13 + id_card_no: "",
  14 + commonbirthDate: {
  15 + label: '共同赡养人出生日期',
  16 + isrequre: true,
  17 + bindtype: 'birthday',
  18 + selected: '',
  19 + isblack: 'true',
  20 + placeholder: '请选择出生日期',
  21 + mode: "date",
  22 + fields: "day",
  23 + start: '1970-01-01',
  24 + end: '2018-01-01',
  25 + onChange: 'onBirthdaySelect',
  26 + },
13 }, 27 },
14 28
15 /** 29 /**
16 * Lifecycle function--Called when page load 30 * Lifecycle function--Called when page load
17 */ 31 */
18 onLoad: function(options) { 32 onLoad: function(options) {
19 - console.log("onLoad",options) 33 + console.log("onLoad", options)
20 this.setData({ 34 this.setData({
21 - support_duty_id:options.id 35 + support_duty_id: options.id
22 }) 36 })
23 }, 37 },
24 38
@@ -33,24 +47,27 @@ Page({ @@ -33,24 +47,27 @@ Page({
33 * Lifecycle function--Called when page show 47 * Lifecycle function--Called when page show
34 */ 48 */
35 onShow: function() { 49 onShow: function() {
36 - var that = this  
37 - wx.getStorage({  
38 - key: 'id_info',  
39 - success: function(res) {  
40 - console.log('id_info', res.data)  
41 - if (res.data && res.data.length > 0) {  
42 - var id_info = JSON.parse(res.data)  
43 - if (that.data.name.length > 0 && id_info.name != that.data.name) {  
44 - that.showtoast("姓名冲突")  
45 - return  
46 - }  
47 - that.setData({  
48 - name: id_info.name,  
49 - id_card_no: id_info.id_card_number  
50 - }) 50 + var that = this
  51 + wx.getStorage({
  52 + key: 'id_info',
  53 + success: function(res) {
  54 + console.log('id_info', res.data)
  55 + if (res.data && res.data.length > 0) {
  56 + var id_info = JSON.parse(res.data)
  57 + if (that.data.name.length > 0 && id_info.name != that.data.name) {
  58 + that.showtoast("姓名冲突")
  59 + return
51 } 60 }
52 - },  
53 - }) 61 + var commonbirthDate = that.data.commonbirthDate
  62 + commonbirthDate.selected = id_info.birthday.year + '-' + id_info.birthday.month + '-' + id_info.birthday.day
  63 + commonbirthDate.datelong = Date.parse(new Date(commonbirthDate.selected)) / 1000
  64 + that.setData({
  65 + name: id_info.name,
  66 + id_card_no: id_info.id_card_number
  67 + })
  68 + }
  69 + },
  70 + })
54 wx.removeStorage({ 71 wx.removeStorage({
55 key: 'id_info', 72 key: 'id_info',
56 success(res) { 73 success(res) {
@@ -66,10 +83,10 @@ Page({ @@ -66,10 +83,10 @@ Page({
66 }, 83 },
67 84
68 85
69 - formSubmit: function (e) { 86 + formSubmit: function(e) {
70 console.log("formSubmit", e); 87 console.log("formSubmit", e);
71 var formdata = e.detail.value 88 var formdata = e.detail.value
72 - if (!formdata.name || formdata.name.length<1){ 89 + if (!formdata.name || formdata.name.length < 1) {
73 this.showToast("请输入姓名") 90 this.showToast("请输入姓名")
74 return; 91 return;
75 } else if (!formdata.id_card_no || formdata.id_card_no.length < 1) { 92 } else if (!formdata.id_card_no || formdata.id_card_no.length < 1) {
@@ -79,23 +96,26 @@ Page({ @@ -79,23 +96,26 @@ Page({
79 this.goAdd(formdata) 96 this.goAdd(formdata)
80 }, 97 },
81 98
82 - goAdd: function (formdata){ 99 + goAdd: function(formdata) {
83 var that = this; 100 var that = this;
84 var Authorization = getApp().globalData.Authorization; 101 var Authorization = getApp().globalData.Authorization;
85 wx.request({ 102 wx.request({
86 url: baseUrl + 'persontax/v1/co-supporters', 103 url: baseUrl + 'persontax/v1/co-supporters',
87 data: { 104 data: {
88 "support_duty_id": that.data.support_duty_id, 105 "support_duty_id": that.data.support_duty_id,
89 - "co_supporter": formdata.name , 106 + "co_supporter": formdata.name,
90 "id_card_type": "1", 107 "id_card_type": "1",
91 "id_card_no": formdata.id_card_no, 108 "id_card_no": formdata.id_card_no,
  109 + "birthday": that.data.commonbirthDate.datelong,
  110 + "nation": "中国",
  111 + "relation_ship": "兄、弟、姐、妹"
92 }, 112 },
93 header: { 113 header: {
94 'content-type': 'application/json', 114 'content-type': 'application/json',
95 "Authorization": Authorization 115 "Authorization": Authorization
96 }, 116 },
97 - method:"POST",  
98 - success: function (res) { 117 + method: "POST",
  118 + success: function(res) {
99 if (res && res.data) { 119 if (res && res.data) {
100 console.log("res", res) 120 console.log("res", res)
101 if (res && res.statusCode == 200) { 121 if (res && res.statusCode == 200) {
@@ -108,7 +128,17 @@ Page({ @@ -108,7 +128,17 @@ Page({
108 }) 128 })
109 }, 129 },
110 130
111 - showToast: function (data) { 131 + onBirthdaySelect: function(e) {
  132 + console.log('picker发送选择改变,携带值为', e)
  133 + var commonbirthDate = this.data.commonbirthDate
  134 + commonbirthDate.selected = e.detail.value
  135 + commonbirthDate.datelong = Date.parse(new Date(e.detail.value)) / 1000
  136 + this.setData({
  137 + commonbirthDate: commonbirthDate
  138 + })
  139 + },
  140 +
  141 + showToast: function(data) {
112 if (data && data.length > 0) { 142 if (data && data.length > 0) {
113 wx.showToast({ 143 wx.showToast({
114 title: data, 144 title: data,
1 <!--pages/main/addtionalreduce/adddupporters/adddupporters.wxml--> 1 <!--pages/main/addtionalreduce/adddupporters/adddupporters.wxml-->
  2 +<import src="../../../common/picker_cell" />
  3 +
2 <view class='page'> 4 <view class='page'>
3 <form bindsubmit='formSubmit'> 5 <form bindsubmit='formSubmit'>
4 <view style='height:90rpx;padding:0 30rpx'> 6 <view style='height:90rpx;padding:0 30rpx'>
@@ -23,11 +25,12 @@ @@ -23,11 +25,12 @@
23 </view> 25 </view>
24 </view> 26 </view>
25 <view class="divide_line"></view> 27 <view class="divide_line"></view>
26 - <view style='height:90rpx;padding:0 30rpx'> 28 + <template is="picker_cell_normal" data="{{...commonbirthDate}}" />
  29 + <!-- <view style='height:90rpx;padding:0 30rpx'>
27 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> 30 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
28 <text style='color:#777;font-size: 30rpx;line-height: 90rpx; float:left'>被赡养人出生日期</text> 31 <text style='color:#777;font-size: 30rpx;line-height: 90rpx; float:left'>被赡养人出生日期</text>
29 <text style='color:#333;font-size: 30rpx;line-height: 90rpx; float:right'>1949-09-19</text> 32 <text style='color:#333;font-size: 30rpx;line-height: 90rpx; float:right'>1949-09-19</text>
30 - </view> 33 + </view> -->
31 <view class="divide_line"></view> 34 <view class="divide_line"></view>
32 <view style='height:90rpx;padding:0 30rpx'> 35 <view style='height:90rpx;padding:0 30rpx'>
33 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> 36 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
@@ -36,6 +36,9 @@ Page({ @@ -36,6 +36,9 @@ Page({
36 lable: 0, 36 lable: 0,
37 title: '', 37 title: '',
38 isIdCard: true, 38 isIdCard: true,
  39 + workAddress_haschanged: false,
  40 + loanAddress_haschanged: false,
  41 + rentAddress_haschanged: false,
39 extrainfo_arr: ["请上传子女出生证明、学籍信息凭证、学费凭证、本人结婚证和分摊协议", "请上传学历学籍凭证", "请上传出生证明或关系证明、独生子女证、分摊协议、其他法定赡养人赡养证明", "请上传诊断书和医疗费用收据", "请上传首套房证明、还款证明、不动产登记证、结婚证和夫妻约定抵扣协议"], 42 extrainfo_arr: ["请上传子女出生证明、学籍信息凭证、学费凭证、本人结婚证和分摊协议", "请上传学历学籍凭证", "请上传出生证明或关系证明、独生子女证、分摊协议、其他法定赡养人赡养证明", "请上传诊断书和医疗费用收据", "请上传首套房证明、还款证明、不动产登记证、结婚证和夫妻约定抵扣协议"],
40 cur_index: 'support_duty', 43 cur_index: 'support_duty',
41 lovercardtypeData: { 44 lovercardtypeData: {
@@ -318,6 +321,7 @@ Page({ @@ -318,6 +321,7 @@ Page({
318 address_value: ['', ''], 321 address_value: ['', ''],
319 selected: '', 322 selected: '',
320 placeholder: '请选择城市', 323 placeholder: '请选择城市',
  324 + requestdata: {},
321 onChange: 'onPickerSelect' 325 onChange: 'onPickerSelect'
322 }, 326 },
323 houseLocateInfo: { 327 houseLocateInfo: {
@@ -330,6 +334,7 @@ Page({ @@ -330,6 +334,7 @@ Page({
330 address_code: ['', '', ''], 334 address_code: ['', '', ''],
331 address_value: ['', '', ''], 335 address_value: ['', '', ''],
332 selected: '', 336 selected: '',
  337 + requestdata: {},
333 placeholder: '请选择地址', 338 placeholder: '请选择地址',
334 onChange: 'onPickerSelect' 339 onChange: 'onPickerSelect'
335 }, 340 },
@@ -343,6 +348,7 @@ Page({ @@ -343,6 +348,7 @@ Page({
343 address_code: ['', '', ''], 348 address_code: ['', '', ''],
344 address_value: ['', '', ''], 349 address_value: ['', '', ''],
345 selected: '', 350 selected: '',
  351 + requestdata: {},
346 placeholder: '请选择地址', 352 placeholder: '请选择地址',
347 onChange: 'onPickerSelect' 353 onChange: 'onPickerSelect'
348 }, 354 },
@@ -577,13 +583,13 @@ Page({ @@ -577,13 +583,13 @@ Page({
577 case 'continuing_education': 583 case 'continuing_education':
578 var setData = {} 584 var setData = {}
579 if (data.education_type && data.education_type.length) { 585 if (data.education_type && data.education_type.length) {
580 - if ('title' == data.education_type){ 586 + if ('title' == data.education_type) {
581 var edutypeData = this.data.edutypeData 587 var edutypeData = this.data.edutypeData
582 edutypeData.selected = "学历继续教育" 588 edutypeData.selected = "学历继续教育"
583 setData.edutypeData = edutypeData 589 setData.edutypeData = edutypeData
584 - }else{ 590 + } else {
585 var edutypeData = this.data.edutypeData 591 var edutypeData = this.data.edutypeData
586 - edutypeData.selected = data.education_type =='major'?"专业技术人员职业资格":"技能人员职业资格" 592 + edutypeData.selected = data.education_type == 'major' ? "专业技术人员职业资格" : "技能人员职业资格"
587 setData.edutypeData = edutypeData 593 setData.edutypeData = edutypeData
588 } 594 }
589 } 595 }
@@ -618,7 +624,7 @@ Page({ @@ -618,7 +624,7 @@ Page({
618 } 624 }
619 if (data.certification_autority && data.certification_autority.length) { 625 if (data.certification_autority && data.certification_autority.length) {
620 setData.certification_autority = data.certification_autority 626 setData.certification_autority = data.certification_autority
621 - } 627 + }
622 this.setData(setData) 628 this.setData(setData)
623 break; 629 break;
624 case 'support_duty': 630 case 'support_duty':
@@ -687,17 +693,12 @@ Page({ @@ -687,17 +693,12 @@ Page({
687 loverbirthDate.selected = format.formatTime_date(data.spouse_birthday) 693 loverbirthDate.selected = format.formatTime_date(data.spouse_birthday)
688 loverbirthDate.datelong = data.spouse_birthday 694 loverbirthDate.datelong = data.spouse_birthday
689 setData.loverbirthDate = loverbirthDate 695 setData.loverbirthDate = loverbirthDate
690 - } 696 + }
691 if (data.loan_type && data.loan_type.length) { 697 if (data.loan_type && data.loan_type.length) {
692 var loantypeData = this.data.loantypeData 698 var loantypeData = this.data.loantypeData
693 loantypeData.selected = data.loan_type 699 loantypeData.selected = data.loan_type
694 setData.loantypeData = loantypeData 700 setData.loantypeData = loantypeData
695 } 701 }
696 - if (data.house_address && data.house_address.length) {  
697 - var houseLocateInfo = this.data.houseLocateInfo  
698 - houseLocateInfo.selected = data.house_address  
699 - setData.houseLocateInfo = houseLocateInfo  
700 - }  
701 if (data.house_detail_address && data.house_detail_address.length) { 702 if (data.house_detail_address && data.house_detail_address.length) {
702 setData.house_detail_address = data.house_detail_address 703 setData.house_detail_address = data.house_detail_address
703 } 704 }
@@ -737,11 +738,25 @@ Page({ @@ -737,11 +738,25 @@ Page({
737 leaseendDate.datelong = data.rent_end 738 leaseendDate.datelong = data.rent_end
738 setData.leaseendDate = leaseendDate 739 setData.leaseendDate = leaseendDate
739 } 740 }
740 - if (data.work_city && data.work_city.length) { 741 + if (data.work_city && data.work_city.province) {
741 var workingcityInfo = this.data.workingcityInfo 742 var workingcityInfo = this.data.workingcityInfo
742 - workingcityInfo.selected = data.work_city 743 + workingcityInfo.requestdata = data.work_city
  744 + workingcityInfo.selected = data.work_city.province + data.work_city.city
743 setData.workingcityInfo = workingcityInfo 745 setData.workingcityInfo = workingcityInfo
744 } 746 }
  747 + if (house_type == 'house_fund_loan' && data.house_address && data.house_address.province) {
  748 + var houseLocateInfo = this.data.houseLocateInfo
  749 + houseLocateInfo.requestdata = data.house_address
  750 + houseLocateInfo.selected = data.work_city.province + data.work_city.city + data.work_city.district
  751 + setData.houseLocateInfo = houseLocateInfo
  752 + }
  753 + if (house_type == 'house_fund_rent' && data.house_address && data.house_address.province) {
  754 + var rentLocateInfo = this.data.rentLocateInfo
  755 + rentLocateInfo.requestdata = data.house_address
  756 + rentLocateInfo.selected = data.work_city.province + data.work_city.city + data.work_city.district
  757 + setData.rentLocateInfo = rentLocateInfo
  758 + }
  759 +
745 this.setData(setData) 760 this.setData(setData)
746 break; 761 break;
747 } 762 }
@@ -1043,10 +1058,10 @@ Page({ @@ -1043,10 +1058,10 @@ Page({
1043 } else { 1058 } else {
1044 newdata.percentage = parseFloat(formdata.percentage) 1059 newdata.percentage = parseFloat(formdata.percentage)
1045 } 1060 }
1046 - newdata.older_birthday = this.data.olderbirthDate.datelong  
1047 - newdata.older_relative = this.data.older_relativeData.selected 1061 + newdata.birthday = this.data.olderbirthDate.datelong
  1062 + newdata.relationship = this.data.older_relativeData.selected
1048 newdata.support_type = this.data.supporttypeData.selected 1063 newdata.support_type = this.data.supporttypeData.selected
1049 - newdata.older_cardtype = this.data.oldercardtypeData.selected 1064 + newdata.id_card_type = this.data.oldercardtypeData.selected
1050 break; 1065 break;
1051 case 'medical_fund': 1066 case 'medical_fund':
1052 subUrl = 'persontax/v1/medical-funds' 1067 subUrl = 'persontax/v1/medical-funds'
@@ -1091,7 +1106,7 @@ Page({ @@ -1091,7 +1106,7 @@ Page({
1091 } else if (this.data.identifytypeData.selected.length < 1) { 1106 } else if (this.data.identifytypeData.selected.length < 1) {
1092 this.showToast('请选择证书类型') 1107 this.showToast('请选择证书类型')
1093 return 1108 return
1094 - } else if (!formdata.certification_no || formdata.certification_no.length < 1) { 1109 + } else if (!formdata.certification_no || formdata.certification_no.length < 1) {
1095 this.showToast('请填写证书号码') 1110 this.showToast('请填写证书号码')
1096 return 1111 return
1097 } else if (this.data.beforemarryData.selected.length < 1) { 1112 } else if (this.data.beforemarryData.selected.length < 1) {
@@ -1116,7 +1131,6 @@ Page({ @@ -1116,7 +1131,6 @@ Page({
1116 this.showToast('请选择贷款期限') 1131 this.showToast('请选择贷款期限')
1117 return 1132 return
1118 } 1133 }
1119 - newdata.house_location = this.data.houseLocateInfo.address_value[0] + this.data.houseLocateInfo.address_value[1] + this.data.houseLocateInfo.address_value[2]  
1120 newdata.loan_before_marry = this.data.beforemarryData.selected == "是" ? 'y' : 'n' 1134 newdata.loan_before_marry = this.data.beforemarryData.selected == "是" ? 'y' : 'n'
1121 newdata.loan_by_self = this.data.isselfData.selected == "是" ? 'y' : 'n' 1135 newdata.loan_by_self = this.data.isselfData.selected == "是" ? 'y' : 'n'
1122 newdata.identify_type = this.data.identifytypeData.selected 1136 newdata.identify_type = this.data.identifytypeData.selected
@@ -1125,6 +1139,9 @@ Page({ @@ -1125,6 +1139,9 @@ Page({
1125 newdata.loan_bank = this.data.bankInfo.selected 1139 newdata.loan_bank = this.data.bankInfo.selected
1126 newdata.payback_date = this.data.firstpaybackDate.selected 1140 newdata.payback_date = this.data.firstpaybackDate.selected
1127 newdata.loan_datelong = this.data.loandatelongData.selected 1141 newdata.loan_datelong = this.data.loandatelongData.selected
  1142 + var request_loan_address = that.getLoanAddressRequest()
  1143 + newdata.house_location = request_loan_address
  1144 +
1128 } else if (this.data.house_type == "house_fund_rent") { 1145 } else if (this.data.house_type == "house_fund_rent") {
1129 if (this.data.workingcityInfo.address_value.length < 1) { 1146 if (this.data.workingcityInfo.address_value.length < 1) {
1130 this.showToast('请选择工作城市') 1147 this.showToast('请选择工作城市')
@@ -1138,35 +1155,42 @@ Page({ @@ -1138,35 +1155,42 @@ Page({
1138 } else if (!formdata.lease_idno || formdata.lease_idno.length < 1) { 1155 } else if (!formdata.lease_idno || formdata.lease_idno.length < 1) {
1139 this.showToast('请填写纳税人识别号') 1156 this.showToast('请填写纳税人识别号')
1140 return 1157 return
1141 - } else if (!formdata.identify_no || formdata.identify_no.length < 1) {  
1142 - this.showToast('请填写出租方号码')  
1143 - return  
1144 - } else if (this.data.identifytypeData.selected.length < 1) { 1158 + }
  1159 + // else if (!formdata.identify_no || formdata.identify_no.length < 1) {
  1160 + // this.showToast('请填写出租方号码')
  1161 + // return
  1162 + // }
  1163 + else if (this.data.identifytypeData.selected.length < 1) {
1145 this.showToast('请选择证件类型') 1164 this.showToast('请选择证件类型')
1146 return 1165 return
1147 - } else if (this.data.rentLocateInfo.address_value.length < 1) {  
1148 - this.showToast('请选择房屋地址')  
1149 - return  
1150 } else if (!formdata.owner_id_cartd_no || formdata.owner_id_cartd_no.length < 1) { 1166 } else if (!formdata.owner_id_cartd_no || formdata.owner_id_cartd_no.length < 1) {
1151 this.showToast('请填写证件号码') 1167 this.showToast('请填写证件号码')
1152 return 1168 return
1153 - } else if (!formdata.rent_contract_no || formdata.rent_contract_no.length < 1) { 1169 + } else if (this.data.rentLocateInfo.address_value.length < 1) {
  1170 + this.showToast('请选择房屋地址')
  1171 + return
  1172 + }
  1173 + else if (!formdata.rent_contract_no || formdata.rent_contract_no.length < 1) {
1154 this.showToast('请填写租赁合同编号') 1174 this.showToast('请填写租赁合同编号')
1155 return 1175 return
1156 - }else if (this.data.leasestartDate.selected.length < 1) { 1176 + } else if (this.data.leasestartDate.selected.length < 1) {
1157 this.showToast('请选择日期') 1177 this.showToast('请选择日期')
1158 return 1178 return
1159 } else if (this.data.leaseendDate.selected.length < 1) { 1179 } else if (this.data.leaseendDate.selected.length < 1) {
1160 this.showToast('请选择日期') 1180 this.showToast('请选择日期')
1161 return 1181 return
1162 } 1182 }
1163 - newdata.house_address = this.data.rentLocateInfo.address_value[0] + this.data.rentLocateInfo.address_value[1] + this.data.rentLocateInfo.address_value[2]  
1164 - newdata.work_city = this.data.workingcityInfo.address_value[0] + this.data.workingcityInfo.address_value[1] + this.data.workingcityInfo.address_value[2]  
1165 newdata.lease_type = this.data.leasetypeData.selected 1183 newdata.lease_type = this.data.leasetypeData.selected
1166 newdata.certification_type = this.data.identifytypeData.selected 1184 newdata.certification_type = this.data.identifytypeData.selected
1167 newdata.rent_start = this.data.leasestartDate.selected 1185 newdata.rent_start = this.data.leasestartDate.selected
1168 newdata.rent_end = this.data.leaseendDate.selected 1186 newdata.rent_end = this.data.leaseendDate.selected
1169 - console.log('houseLocateInfo', this.data.houseLocateInfo) 1187 +
  1188 + var request_working_address = that.getWorkingAddressRequest()
  1189 + newdata.work_city = request_working_address
  1190 + var request_rent_address = that.getRentAddressRequest()
  1191 + newdata.house_address = request_rent_address
  1192 + console.log('request_working_address', this.data.request_working_address)
  1193 +
1170 } 1194 }
1171 if (formdata.spouse_name || formdata.spouse_id_card_no || this.data.loverbirthDate.selected) { 1195 if (formdata.spouse_name || formdata.spouse_id_card_no || this.data.loverbirthDate.selected) {
1172 if (!formdata.spouse_name || formdata.spouse_name.length < 1) { 1196 if (!formdata.spouse_name || formdata.spouse_name.length < 1) {
@@ -1488,7 +1512,10 @@ Page({ @@ -1488,7 +1512,10 @@ Page({
1488 house_address.selected = e.detail.value[0] + e.detail.value[1] + e.detail.value[2] 1512 house_address.selected = e.detail.value[0] + e.detail.value[1] + e.detail.value[2]
1489 1513
1490 } 1514 }
  1515 + house_address.address_value = e.detail.value
  1516 + house_address.address_code = e.detail.code
1491 this.setData({ 1517 this.setData({
  1518 + loanAddress_haschanged: true,
1492 houseLocateInfo: house_address 1519 houseLocateInfo: house_address
1493 }) 1520 })
1494 break; 1521 break;
@@ -1499,10 +1526,12 @@ Page({ @@ -1499,10 +1526,12 @@ Page({
1499 if (e.detail.value[0] == e.detail.value[1]) { 1526 if (e.detail.value[0] == e.detail.value[1]) {
1500 work_address.selected = e.detail.value[1] + e.detail.value[2] 1527 work_address.selected = e.detail.value[1] + e.detail.value[2]
1501 } else { 1528 } else {
1502 - work_address.selected = e.detail.value[0] + e.detail.value[1] + e.detail.value[2]  
1503 - 1529 + work_address.selected = e.detail.value[0] + e.detail.value[1]
1504 } 1530 }
  1531 + work_address.address_value = e.detail.value
  1532 + work_address.address_code = e.detail.code
1505 this.setData({ 1533 this.setData({
  1534 + workAddress_haschanged: true,
1506 workingcityInfo: work_address 1535 workingcityInfo: work_address
1507 }) 1536 })
1508 break; 1537 break;
@@ -1514,9 +1543,11 @@ Page({ @@ -1514,9 +1543,11 @@ Page({
1514 rent_address.selected = e.detail.value[1] + e.detail.value[2] 1543 rent_address.selected = e.detail.value[1] + e.detail.value[2]
1515 } else { 1544 } else {
1516 rent_address.selected = e.detail.value[0] + e.detail.value[1] + e.detail.value[2] 1545 rent_address.selected = e.detail.value[0] + e.detail.value[1] + e.detail.value[2]
1517 -  
1518 } 1546 }
  1547 + rent_address.address_value = e.detail.value
  1548 + rent_address.address_code = e.detail.code
1519 this.setData({ 1549 this.setData({
  1550 + rentAddress_haschanged: true,
1520 rentLocateInfo: rent_address 1551 rentLocateInfo: rent_address
1521 }) 1552 })
1522 break; 1553 break;
@@ -1601,6 +1632,52 @@ Page({ @@ -1601,6 +1632,52 @@ Page({
1601 // }) 1632 // })
1602 // }, 1633 // },
1603 1634
  1635 + getWorkingAddressRequest: function() {
  1636 + var that = this
  1637 + if (that.data.workAddress_haschanged) {
  1638 + return {
  1639 + "province_code": that.data.workingcityInfo.address_code[0],
  1640 + "province": that.data.workingcityInfo.address_value[0],
  1641 + "city_code": that.data.workingcityInfo.address_code[1],
  1642 + "city": that.data.workingcityInfo.address_value[1]
  1643 + }
  1644 + } else {
  1645 + return that.data.workingcityInfo.requestdata
  1646 + }
  1647 + },
  1648 +
  1649 + getRentAddressRequest: function() {
  1650 + var that = this
  1651 + if (that.data.rentAddress_haschanged) {
  1652 + return {
  1653 + "province_code": that.data.rentLocateInfo.address_code[0],
  1654 + "province": that.data.rentLocateInfo.address_value[0],
  1655 + "city_code": that.data.rentLocateInfo.address_code[1],
  1656 + "city": that.data.rentLocateInfo.address_value[1],
  1657 + "district_code": that.data.rentLocateInfo.address_code[2],
  1658 + "district": that.data.rentLocateInfo.address_value[2]
  1659 + }
  1660 + } else {
  1661 + return that.data.rentLocateInfo.requestdata
  1662 + }
  1663 + },
  1664 +
  1665 + getLoanAddressRequest: function() {
  1666 + var that = this
  1667 + if (that.data.loanAddress_haschanged) {
  1668 + return {
  1669 + "province_code": that.data.houseLocateInfo.address_code[0],
  1670 + "province": that.data.houseLocateInfo.address_value[0],
  1671 + "city_code": that.data.houseLocateInfo.address_code[1],
  1672 + "city": that.data.houseLocateInfo.address_value[1],
  1673 + "district_code": that.data.houseLocateInfo.address_code[2],
  1674 + "district": that.data.houseLocateInfo.address_value[2]
  1675 + }
  1676 + } else {
  1677 + return that.data.houseLocateInfo.requestdata
  1678 + }
  1679 + },
  1680 +
1604 showToast: function(data) { 1681 showToast: function(data) {
1605 if (data && data.length > 0) { 1682 if (data && data.length > 0) {
1606 wx.showToast({ 1683 wx.showToast({
@@ -120,7 +120,7 @@ @@ -120,7 +120,7 @@
120 <view style='height:90rpx'> 120 <view style='height:90rpx'>
121 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> 121 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
122 <text class='text_black_30 float_left'>被赡养人姓名</text> 122 <text class='text_black_30 float_left'>被赡养人姓名</text>
123 - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入被赡养人姓名' name='supported_name'></input> 123 + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入被赡养人姓名' name='supported_name' value='{{supported_name}}'></input>
124 </view> 124 </view>
125 <view class='divide_line_f5f5f5'></view> 125 <view class='divide_line_f5f5f5'></view>
126 <template is="picker_cell_normal" data="{{...oldercardtypeData}}" /> 126 <template is="picker_cell_normal" data="{{...oldercardtypeData}}" />
@@ -258,7 +258,7 @@ @@ -258,7 +258,7 @@
258 <view style='height:90rpx'> 258 <view style='height:90rpx'>
259 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> 259 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
260 <text class='text_black_30 float_left'>证件号码</text> 260 <text class='text_black_30 float_left'>证件号码</text>
261 - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入证号码' name='owner_id_cartd_no'></input> 261 + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入证号码' name='owner_id_cartd_no'></input>
262 </view> 262 </view>
263 </view> 263 </view>
264 <view style='height:20rpx;width:100%;background:#F8F8F8;'></view> 264 <view style='height:20rpx;width:100%;background:#F8F8F8;'></view>
注册登录 后发表评论