正在显示
2 个修改的文件
包含
38 行增加
和
20 行删除
... | ... | @@ -18,7 +18,7 @@ Page({ |
18 | 18 | title: '', |
19 | 19 | isIdCard:true, |
20 | 20 | extrainfo_arr: ["请上传子女出生证明、学籍信息凭证、学费凭证、本人结婚证和分摊协议", "请上传学历学籍凭证", "请上传出生证明或关系证明、独生子女证、分摊协议、其他法定赡养人赡养证明", "请上传诊断书和医疗费用收据", "请上传首套房证明、还款证明、不动产登记证、结婚证和夫妻约定抵扣协议"], |
21 | - cur_index: 'children_education', | |
21 | + cur_index: 'medical_fund', | |
22 | 22 | lovercardtypeData: { |
23 | 23 | label: '身份证件类型', |
24 | 24 | bindtype: 'lovercardtype', |
... | ... | @@ -45,11 +45,12 @@ Page({ |
45 | 45 | }, |
46 | 46 | taxperson_relativeData: { |
47 | 47 | label: '与纳税人的关系', |
48 | + isrequre: true, | |
48 | 49 | bindtype: 'taxperson_relative', |
49 | 50 | selected: '', |
50 | 51 | isblack: 'true', |
51 | 52 | placeholder: '请选择与纳税人的关系', |
52 | - values: ["父子", "父女", "母子", "母女"], | |
53 | + values: ["本人", "配偶", "子女"], | |
53 | 54 | onChange: 'onPickerSelect' |
54 | 55 | }, |
55 | 56 | childrencardtypeData: { |
... | ... | @@ -148,9 +149,11 @@ Page({ |
148 | 149 | onChange: 'onPickerSelect' |
149 | 150 | }, |
150 | 151 | cardtypeData: { |
151 | - label: '证件类型', | |
152 | + label: '身份证件类型', | |
153 | + isrequre: true, | |
152 | 154 | bindtype: 'cardtype', |
153 | - selected: '', | |
155 | + selected: '居民身份证', | |
156 | + disabled: true, | |
154 | 157 | isblack: 'true', |
155 | 158 | placeholder: '请选择证件类型', |
156 | 159 | values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照', |
... | ... | @@ -529,8 +532,10 @@ Page({ |
529 | 532 | console.log("formSubmit", e); |
530 | 533 | var formdata = e.detail.value |
531 | 534 | var newdata = formdata; |
535 | + var subUrl = '' | |
532 | 536 | switch (this.data.cur_index + '') { |
533 | 537 | case 'children_education': |
538 | + subUrl = 'persontax/v1/children-educations' | |
534 | 539 | if (!formdata.children_id_card_no || formdata.children_id_card_no.length < 1) { |
535 | 540 | this.showToast('请填写子女证件号码') |
536 | 541 | return |
... | ... | @@ -595,6 +600,7 @@ Page({ |
595 | 600 | newdata.nation = "中国" |
596 | 601 | break; |
597 | 602 | case 'continuing_education': |
603 | + subUrl = 'persontax/v1/continuing-educations' | |
598 | 604 | if (this.data.edutypeData.selected.length < 1) { |
599 | 605 | this.showToast('请选择教育类别') |
600 | 606 | return |
... | ... | @@ -639,6 +645,7 @@ Page({ |
639 | 645 | } |
640 | 646 | break; |
641 | 647 | case 'support_duty': |
648 | + // subUrl = 'persontax/v1/continuing-educations' | |
642 | 649 | if (this.data.supporttypeData.selected.length < 1) { |
643 | 650 | this.showToast('请选择赡养类型') |
644 | 651 | return |
... | ... | @@ -669,29 +676,34 @@ Page({ |
669 | 676 | newdata.older_cardtype = this.data.oldercardtypeData.selected |
670 | 677 | break; |
671 | 678 | case 'medical_fund': |
679 | + subUrl = 'persontax/v1/medical-funds' | |
672 | 680 | if (!formdata.name || formdata.name.length < 1) { |
673 | 681 | this.showToast('请填写姓名') |
674 | 682 | return |
675 | 683 | } else if (this.data.cardtypeData.selected.length < 1) { |
676 | - this.showToast('请选择赡养人证件类型') | |
684 | + this.showToast('请选择证件类型') | |
677 | 685 | return |
678 | - } else if (!formdata.idno || formdata.idno.length < 1) { | |
686 | + } else if (!formdata.id_card_no || formdata.id_card_no.length < 1) { | |
679 | 687 | this.showToast('请填写证件号码') |
680 | 688 | return |
681 | 689 | } else if (this.data.taxperson_relativeData.selected.length < 1) { |
682 | 690 | this.showToast('请选择与纳税人关系') |
683 | 691 | return |
684 | - } else if (!formdata.total_money || formdata.reduce_money < 0) { | |
692 | + } else if (!formdata.total_amount || formdata.total_amount < 0) { | |
685 | 693 | this.showToast('请填写医疗支出总金额') |
686 | 694 | return |
687 | - } else if (!formdata.personal_money || formdata.personal_money < 0) { | |
695 | + } else if (!formdata.amount_by_person || formdata.amount_by_person < 0) { | |
688 | 696 | this.showToast('请填写个人负担金额') |
689 | 697 | return |
690 | 698 | } |
691 | - newdata.cardtype = this.data.cardtypeData.selected | |
692 | - newdata.taxperson_relative = this.data.taxperson_relativeData.selected | |
699 | + | |
700 | + newdata.total_amount = parseFloat(formdata.total_amount) | |
701 | + newdata.amount_by_person = parseFloat(formdata.amount_by_person) | |
702 | + newdata.id_card_type = this.data.cardtypeData.selected | |
703 | + newdata.relationship = this.data.taxperson_relativeData.selected | |
693 | 704 | break; |
694 | 705 | case 'house_fund': |
706 | + // subUrl = 'persontax/v1/medical-funds' | |
695 | 707 | console.log('TITLE', this.data.title) |
696 | 708 | if (!formdata.lover_name || formdata.lover_name.length < 1) { |
697 | 709 | this.showToast('请填写配偶姓名') |
... | ... | @@ -779,14 +791,16 @@ Page({ |
779 | 791 | // this.showToast('请填写扣除金额') |
780 | 792 | // return |
781 | 793 | // } |
782 | - newdata.deduction_type = this.data.reducetypeData.selected | |
783 | - newdata.deduction_amount = this.data.deduction_amount//formdata.reduce_money | |
794 | + if (this.data.cur_index != 'medical_fund'){ | |
795 | + newdata.deduction_type = this.data.reducetypeData.selected | |
796 | + newdata.deduction_amount = this.data.deduction_amount//formdata.reduce_money | |
797 | + } | |
784 | 798 | newdata.legal_entity_id = this.legal_entity_id |
785 | 799 | newdata.legal_entity = this.legal_entity |
786 | - this.addDatas(newdata) | |
800 | + this.addDatas(newdata, subUrl) | |
787 | 801 | }, |
788 | 802 | |
789 | - addDatas: function (newdata){ | |
803 | + addDatas: function (newdata,subUrl){ | |
790 | 804 | wx.showModal({ |
791 | 805 | title: '确认要提交申报吗?', |
792 | 806 | content: '确认后将不能修改', |
... | ... | @@ -798,7 +812,7 @@ Page({ |
798 | 812 | var that = this; |
799 | 813 | var Authorization = app.globalData.Authorization; |
800 | 814 | wx.request({ |
801 | - url: baseUrl + 'persontax/v1/children-educations', | |
815 | + url: baseUrl + subUrl, | |
802 | 816 | method: "POST", |
803 | 817 | header: { |
804 | 818 | 'content-type': 'application/json', | ... | ... |
... | ... | @@ -138,28 +138,32 @@ |
138 | 138 | <!-- 大病医疗 --> |
139 | 139 | <view wx:if="{{cur_index=='medical_fund'}}" style='padding:0 30rpx;'> |
140 | 140 | <view style='height:90rpx'> |
141 | + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> | |
141 | 142 | <text class='text_black_30 float_left'>姓名</text> |
142 | - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入姓名' name='name'></input> | |
143 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入姓名' name='name' value='{{name}}'></input> | |
143 | 144 | </view> |
144 | 145 | <view class='divide_line_f5f5f5'></view> |
145 | 146 | |
146 | 147 | <template is="picker_cell_normal" data="{{...cardtypeData}}" /> |
147 | 148 | <view class='divide_line_f5f5f5'></view> |
148 | 149 | <view style='height:90rpx'> |
150 | + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> | |
149 | 151 | <text class='text_black_30 float_left'>身份证件号码</text> |
150 | - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入身份证件号码' name='idno'></input> | |
152 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入身份证件号码' name='id_card_no' value='{{id_card_no}}'></input> | |
151 | 153 | </view> |
152 | 154 | <view class='divide_line_f5f5f5'></view> |
153 | 155 | <template is="picker_cell_normal" data="{{...taxperson_relativeData}}" /> |
154 | 156 | <view class='divide_line_f5f5f5'></view> |
155 | 157 | <view style='height:90rpx'> |
158 | + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> | |
156 | 159 | <text class='text_black_30 float_left'>医疗支出总金额</text> |
157 | - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入总金额' type='digit' name='total_money'></input> | |
160 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入总金额' type='digit' name='total_amount' value='{{total_amount}}'></input> | |
158 | 161 | </view> |
159 | 162 | <view class='divide_line_f5f5f5'></view> |
160 | 163 | <view style='height:90rpx'> |
164 | + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text> | |
161 | 165 | <text class='text_black_30 float_left'>个人负担金额</text> |
162 | - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入金额' type='digit' name='personal_money'></input> | |
166 | + <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入金额' type='digit' name='amount_by_person' value='{{total_amount}}'></input> | |
163 | 167 | </view> |
164 | 168 | </view> |
165 | 169 | <!-- 住房 --> |
... | ... | @@ -220,7 +224,7 @@ |
220 | 224 | </view> |
221 | 225 | </view> |
222 | 226 | |
223 | - <view style='padding:0 30rpx;'> | |
227 | + <view style='padding:0 30rpx;' wx:if="{{cur_index!='medical_fund'}}"> | |
224 | 228 | <view class='divide_line_f5f5f5'></view> |
225 | 229 | <template is="picker_cell_normal" data="{{...reducetypeData}}" /> |
226 | 230 | <view class='divide_line_f5f5f5'></view> | ... | ... |
请
注册
或
登录
后发表评论