提交 43da1c008bd4744b78f48641ba552684499779b5

作者 wangyu
1 个父辈 adb11e81

附表相关逻辑优化

@@ -35,19 +35,19 @@ @@ -35,19 +35,19 @@
35 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindProjectChange" range="{{project}}"> 35 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindProjectChange" range="{{project}}">
36 <text class="text_gray7_34">所得项目</text> 36 <text class="text_gray7_34">所得项目</text>
37 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> 37 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
38 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{income_item}}"></input> 38 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{income_item}}" disabled="true"></input>
39 </picker> 39 </picker>
40 <view class="divide_line_30"></view> 40 <view class="divide_line_30"></view>
41 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductContent" range="{{deductcontent}}"> 41 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductContent" range="{{deductcontent}}">
42 <text class="text_gray7_34">减免事项名称</text> 42 <text class="text_gray7_34">减免事项名称</text>
43 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> 43 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
44 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{reduction_item}}"></input> 44 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{reduction_item}}" disabled="true"></input>
45 </picker> 45 </picker>
46 <view class="divide_line_30"></view> 46 <view class="divide_line_30"></view>
47 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductProperty" range="{{deductproperty}}"> 47 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductProperty" range="{{deductproperty}}">
48 <text class="text_gray7_34">减免性质名称</text> 48 <text class="text_gray7_34">减免性质名称</text>
49 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> 49 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
50 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{reduction_nature}}"></input> 50 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{reduction_nature}}" disabled="true"></input>
51 </picker> 51 </picker>
52 <view class="divide_line_30"></view> 52 <view class="divide_line_30"></view>
53 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 53 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
1 // pages/main/finalpay/donationDetail/donationDetail.js 1 // pages/main/finalpay/donationDetail/donationDetail.js
2 var app = getApp(); 2 var app = getApp();
3 var baseUrl = app.globalData.baseUrl; 3 var baseUrl = app.globalData.baseUrl;
  4 +const regex = /^[0-9a-zA-Z]{1,}$/
4 Page({ 5 Page({
5 6
6 /** 7 /**
@@ -116,16 +117,16 @@ Page({ @@ -116,16 +117,16 @@ Page({
116 }) 117 })
117 return 118 return
118 } 119 }
119 - if (!this.data.donated_unit_code || this.data.donated_unit_code.length < 1) {  
120 - this.showToast("请填写受赠单位纳税人识别号") 120 + if (this.data.donated_unit_code.length > 0 && !regex.test(this.data.donated_unit_code)) {
  121 + this.showToast("受赠单位纳税人识别号格式有误")
121 return 122 return
122 } 123 }
123 if (!this.data.donated_unit_name || this.data.donated_unit_name.length < 1) { 124 if (!this.data.donated_unit_name || this.data.donated_unit_name.length < 1) {
124 this.showToast("请填写受赠单位名称") 125 this.showToast("请填写受赠单位名称")
125 return 126 return
126 } 127 }
127 - if (!this.data.donation_code || this.data.donation_code.length < 1) {  
128 - this.showToast("请填写捐赠凭证码") 128 + if (this.data.donation_code.length > 0 && !regex.test(this.data.donation_code)) {
  129 + this.showToast("捐赠凭证码格式有误")
129 return 130 return
130 } 131 }
131 if (!this.data.donation_year || this.data.donation_year.length < 1) { 132 if (!this.data.donation_year || this.data.donation_year.length < 1) {
@@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
62 <view class="divide_line_30"></view> 62 <view class="divide_line_30"></view>
63 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 63 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
64 <text class="text_gray7_34">报捐赠凭证号</text> 64 <text class="text_gray7_34">报捐赠凭证号</text>
65 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="donation_code" bindblur="getInputInfo" value="{{donation_code}}"></input> 65 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="donation_code" bindblur="getInputInfo" maxlength="20" value="{{donation_code}}"></input>
66 </view> 66 </view>
67 <view class="divide_line_30"></view> 67 <view class="divide_line_30"></view>
68 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 68 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
@@ -74,14 +74,14 @@ @@ -74,14 +74,14 @@
74 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 74 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
75 <text class='red_star_right_10'>*</text> 75 <text class='red_star_right_10'>*</text>
76 <text class="text_gray7_34">捐赠金额</text> 76 <text class="text_gray7_34">捐赠金额</text>
77 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' type="digit" id="donation_account" bindblur="getInputInfo" value="{{donation_account}}"></input> 77 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' type="digit" maxlength="20" id="donation_account" bindblur="getInputInfo" value="{{donation_account}}"></input>
78 </view> 78 </view>
79 <view class="divide_line_30"></view> 79 <view class="divide_line_30"></view>
80 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="deductRatioPicker" range="{{deductPick}}"> 80 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="deductRatioPicker" range="{{deductPick}}">
81 <text class='red_star_right_10'>*</text> 81 <text class='red_star_right_10'>*</text>
82 <text class="text_gray7_34">扣除比例</text> 82 <text class="text_gray7_34">扣除比例</text>
83 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> 83 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
84 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' name='' value="{{deduction_ratio}}%"></input> 84 + <input class='input_wrap' disabled="true" style='text-align: right;color:#000;' placeholder='请选择' name='' value="{{deduction_ratio}}%"></input>
85 </picker> 85 </picker>
86 <view class="divide_line_30"></view> 86 <view class="divide_line_30"></view>
87 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 87 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
@@ -90,7 +90,7 @@ @@ -90,7 +90,7 @@
90 </view> 90 </view>
91 </view> 91 </view>
92 92
93 - <view style="background:#fff;margin-top:20rpx;height:104rpx;display:flex;align-items:center;justify-content:center;margin-bottom:84rpx" bindtap="addItem"> 93 + <view style="background:#fff;margin-top:20rpx;height:104rpx;display:flex;align-items:center;justify-content:center;margin-bottom:168rpx" bindtap="addItem">
94 <image style="width:28rpx;height:28rpx;margin-right:16rpx" src="/images/add_extra.png"></image> 94 <image style="width:28rpx;height:28rpx;margin-right:16rpx" src="/images/add_extra.png"></image>
95 <text style="font-size:28rpx;color:#4986fe">继续添加</text> 95 <text style="font-size:28rpx;color:#4986fe">继续添加</text>
96 </view> 96 </view>
@@ -35,19 +35,19 @@ @@ -35,19 +35,19 @@
35 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindProjectChange" range="{{project}}"> 35 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindProjectChange" range="{{project}}">
36 <text class="text_gray7_34">所得项目</text> 36 <text class="text_gray7_34">所得项目</text>
37 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> 37 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
38 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{income_item}}"></input> 38 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{income_item}}" disabled="true"></input>
39 </picker> 39 </picker>
40 <view class="divide_line_30"></view> 40 <view class="divide_line_30"></view>
41 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductContent" range="{{deductcontent}}"> 41 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductContent" range="{{deductcontent}}">
42 <text class="text_gray7_34">减免事项名称</text> 42 <text class="text_gray7_34">减免事项名称</text>
43 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> 43 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
44 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{reduction_item}}"></input> 44 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' value="{{reduction_item}}" disabled="true"></input>
45 </picker> 45 </picker>
46 <view class="divide_line_30"></view> 46 <view class="divide_line_30"></view>
47 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductProperty" range="{{deductproperty}}"> 47 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="selector" bindchange="bindDeductProperty" range="{{deductproperty}}">
48 <text class="text_gray7_34">减免性质名称</text> 48 <text class="text_gray7_34">减免性质名称</text>
49 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> 49 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
50 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{reduction_nature}}"></input> 50 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{reduction_nature}}" disabled="true"></input>
51 </picker> 51 </picker>
52 <view class="divide_line_30"></view> 52 <view class="divide_line_30"></view>
53 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 53 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
@@ -11,6 +11,7 @@ Page({ @@ -11,6 +11,7 @@ Page({
11 currentTab:1, 11 currentTab:1,
12 year:"2019", 12 year:"2019",
13 incomeInfo:{}, 13 incomeInfo:{},
  14 + showExtraInfo:false
14 }, 15 },
15 16
16 /** 17 /**
@@ -36,7 +37,15 @@ Page({ @@ -36,7 +37,15 @@ Page({
36 */ 37 */
37 swichNav: function (e) { 38 swichNav: function (e) {
38 var that = this; 39 var that = this;
39 - 40 + if (e.target.dataset.current==3){
  41 + that.setData({
  42 + showExtraInfo: true
  43 + })
  44 + }else{
  45 + that.setData({
  46 + showExtraInfo: false
  47 + })
  48 + }
40 if (this.data.currentTab === e.target.dataset.current) { 49 if (this.data.currentTab === e.target.dataset.current) {
41 return false; 50 return false;
42 } else { 51 } else {
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 <view style="background:#fff;padding:30rpx;margin-top:20rpx"> 34 <view style="background:#fff;padding:30rpx;margin-top:20rpx">
35 <view style="margin-bottom:20rpx"> 35 <view style="margin-bottom:20rpx">
36 <text class="text_black3_34">免税收入</text> 36 <text class="text_black3_34">免税收入</text>
37 - <text class="float_right" style="font-size:14px;color:#4986FE" bindtap="freeIncomeDetail">查看附表</text> 37 + <text wx:if="{{showExtraInfo}}" class="float_right" style="font-size:14px;color:#4986FE" bindtap="freeIncomeDetail">查看附表</text>
38 </view> 38 </view>
39 <view> 39 <view>
40 <text class="text_black6_32">其他免税收入</text> 40 <text class="text_black6_32">其他免税收入</text>
@@ -97,7 +97,7 @@ @@ -97,7 +97,7 @@
97 <view style="background:#fff;padding:30rpx;margin-top:20rpx"> 97 <view style="background:#fff;padding:30rpx;margin-top:20rpx">
98 <view style="margin-bottom:20rpx"> 98 <view style="margin-bottom:20rpx">
99 <text class="text_black3_34">其他扣除</text> 99 <text class="text_black3_34">其他扣除</text>
100 - <text class="float_right" style="font-size:14px;color:#4986FE" bindtap="otherDeductDetail">查看附表</text> 100 + <text wx:if="{{showExtraInfo}}" class="float_right" style="font-size:14px;color:#4986FE" bindtap="otherDeductDetail">查看附表</text>
101 </view> 101 </view>
102 <view> 102 <view>
103 <text class="text_black6_32">年金</text> 103 <text class="text_black6_32">年金</text>
@@ -120,11 +120,11 @@ @@ -120,11 +120,11 @@
120 <view style="background:#fff;padding:30rpx;margin-top:20rpx"> 120 <view style="background:#fff;padding:30rpx;margin-top:20rpx">
121 <view style="margin-bottom:20rpx"> 121 <view style="margin-bottom:20rpx">
122 <text class="text_black3_34">捐赠扣除</text> 122 <text class="text_black3_34">捐赠扣除</text>
123 - <text class="float_right" style="font-size:14px;color:#4986FE" bindtap="donationDetail">查看明细</text> 123 + <text wx:if="{{showExtraInfo}}" class="float_right" style="font-size:14px;color:#4986FE" bindtap="donationDetail">查看明细</text>
124 </view> 124 </view>
125 <view> 125 <view>
126 <text class="text_black6_32">准予扣除的捐赠额</text> 126 <text class="text_black6_32">准予扣除的捐赠额</text>
127 - <text class="text_black6_32 float_right">{{incomeInfo.donation_deducted}}</text> 127 + <text class="text_black6_32 float_right">{{incomeInfo.year_donation_deducted}}</text>
128 </view> 128 </view>
129 <view style="margin-top:20rpx"> 129 <view style="margin-top:20rpx">
130 <text class="text_black6_32">全年一次性奖金</text> 130 <text class="text_black6_32">全年一次性奖金</text>
@@ -132,14 +132,14 @@ @@ -132,14 +132,14 @@
132 </view> 132 </view>
133 <view> 133 <view>
134 <text class="text_black6_32">准予扣除的捐赠额</text> 134 <text class="text_black6_32">准予扣除的捐赠额</text>
135 - <text class="text_black6_32 float_right">{{incomeInfo.year_donation_deducted}}</text> 135 + <text class="text_black6_32 float_right">{{incomeInfo.donation_deducted}}</text>
136 </view> 136 </view>
137 </view> 137 </view>
138 <!-- 减免/已缴纳税额 --> 138 <!-- 减免/已缴纳税额 -->
139 <view style="background:#fff;padding:30rpx;margin-top:20rpx"> 139 <view style="background:#fff;padding:30rpx;margin-top:20rpx">
140 <view style="margin-bottom:20rpx"> 140 <view style="margin-bottom:20rpx">
141 <text class="text_black3_34">减免/已缴纳税额</text> 141 <text class="text_black3_34">减免/已缴纳税额</text>
142 - <text class="float_right" style="font-size:14px;color:#4986FE" bindtap="deductOrPayedDetail">查看明细</text> 142 + <text wx:if="{{showExtraInfo}}" class="float_right" style="font-size:14px;color:#4986FE" bindtap="deductOrPayedDetail">查看明细</text>
143 </view> 143 </view>
144 <view> 144 <view>
145 <text class="text_black6_32">减免税额</text> 145 <text class="text_black6_32">减免税额</text>
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 var app = getApp(); 2 var app = getApp();
3 var baseUrl = app.globalData.baseUrl; 3 var baseUrl = app.globalData.baseUrl;
4 var format = require('../../../../utils/util.js'); 4 var format = require('../../../../utils/util.js');
  5 +const regex = /^[0-9a-zA-Z]{1,}$/
5 Page({ 6 Page({
6 7
7 /** 8 /**
@@ -157,6 +158,10 @@ Page({ @@ -157,6 +158,10 @@ Page({
157 this.showToast("请填写税延养老账号编号") 158 this.showToast("请填写税延养老账号编号")
158 return 159 return
159 } 160 }
  161 + if (!regex.test(this.data.tax_extension_account)) {
  162 + this.showToast("税延养老账户编号格式有误")
  163 + return
  164 + }
160 if (!this.data.option_start_time || this.data.option_start_time.length < 1000 || !this.data.option_end_time || this.data.option_end_time.length < 1000) { 165 if (!this.data.option_start_time || this.data.option_start_time.length < 1000 || !this.data.option_end_time || this.data.option_end_time.length < 1000) {
161 this.showToast("请选择申报扣除起止月") 166 this.showToast("请选择申报扣除起止月")
162 return 167 return
@@ -165,12 +170,8 @@ Page({ @@ -165,12 +170,8 @@ Page({
165 this.showToast("请填写报税校验码") 170 this.showToast("请填写报税校验码")
166 return 171 return
167 } 172 }
168 - if (!this.data.year_premium || this.data.year_premium.length < 1) {  
169 - this.showToast("请填写年度保费")  
170 - return  
171 - }  
172 - if (!this.data.month_premium || this.data.month_premium.length < 1) {  
173 - this.showToast("请填写月度保费") 173 + if (!regex.test(this.data.tax_check_code)) {
  174 + this.showToast("报税校验码格式有误")
174 return 175 return
175 } 176 }
176 if (!this.data.year_deduction || this.data.year_deduction.length < 1) { 177 if (!this.data.year_deduction || this.data.year_deduction.length < 1) {
@@ -182,7 +183,11 @@ Page({ @@ -182,7 +183,11 @@ Page({
182 183
183 goSubmit: function(type) { 184 goSubmit: function(type) {
184 if (!this.data.tax_extension_account || this.data.tax_extension_account.length < 1) { 185 if (!this.data.tax_extension_account || this.data.tax_extension_account.length < 1) {
185 - this.showToast("请填写税延养老账号编号") 186 + this.showToast("请填写税延养老账户编号")
  187 + return
  188 + }
  189 + if (!regex.test(this.data.tax_extension_account)) {
  190 + this.showToast("税延养老账号编号格式有误")
186 return 191 return
187 } 192 }
188 if (!this.data.option_start_time || this.data.option_start_time.length < 1000 || !this.data.option_end_time || this.data.option_end_time.length < 1000) { 193 if (!this.data.option_start_time || this.data.option_start_time.length < 1000 || !this.data.option_end_time || this.data.option_end_time.length < 1000) {
@@ -193,12 +198,8 @@ Page({ @@ -193,12 +198,8 @@ Page({
193 this.showToast("请填写报税校验码") 198 this.showToast("请填写报税校验码")
194 return 199 return
195 } 200 }
196 - if (!this.data.year_premium || this.data.year_premium.length < 1) {  
197 - this.showToast("请填写年度保费")  
198 - return  
199 - }  
200 - if (!this.data.month_premium || this.data.month_premium.length < 1) {  
201 - this.showToast("请填写月度保费") 201 + if (!regex.test(this.data.tax_check_code)) {
  202 + this.showToast("报税校验码格式有误")
202 return 203 return
203 } 204 }
204 if (!this.data.year_deduction || this.data.year_deduction.length < 1) { 205 if (!this.data.year_deduction || this.data.year_deduction.length < 1) {
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <view wx:for="{{infoList}}" style="background:#fff;margin-top:20rpx"> 9 <view wx:for="{{infoList}}" style="background:#fff;margin-top:20rpx">
10 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 10 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
11 <text class='red_star_right_10'>*</text> 11 <text class='red_star_right_10'>*</text>
12 - <text class="text_gray7_34">税延养老账编号</text> 12 + <text class="text_gray7_34">税延养老账编号</text>
13 <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.tax_extension_account}}"></input> 13 <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.tax_extension_account}}"></input>
14 </view> 14 </view>
15 <view class="divide_line_30"></view> 15 <view class="divide_line_30"></view>
@@ -54,28 +54,28 @@ @@ -54,28 +54,28 @@
54 <view wx:if="{{showAddView}}" style="background:#fff;margin-top:20rpx"> 54 <view wx:if="{{showAddView}}" style="background:#fff;margin-top:20rpx">
55 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 55 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
56 <text class='red_star_right_10'>*</text> 56 <text class='red_star_right_10'>*</text>
57 - <text class="text_gray7_34">税延养老账号编号</text>  
58 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="tax_extension_account" bindblur="getInputInfo" value="{{tax_extension_account}}"></input> 57 + <text class="text_gray7_34">税延养老账户编号</text>
  58 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="tax_extension_account" bindblur="getInputInfo" maxlength="20" value="{{tax_extension_account}}"></input>
59 </view> 59 </view>
60 <view class="divide_line_30"></view> 60 <view class="divide_line_30"></view>
61 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="date" bindchange="bindDatePicker" id="option_start_time"> 61 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="date" bindchange="bindDatePicker" id="option_start_time">
62 <text class='red_star_right_10'>*</text> 62 <text class='red_star_right_10'>*</text>
63 <text class="text_gray7_34">申报扣除期起</text> 63 <text class="text_gray7_34">申报扣除期起</text>
64 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> 64 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
65 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{option_start_date}}"></input> 65 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{option_start_date}}" disabled="true"></input>
66 </picker> 66 </picker>
67 <view class="divide_line_30"></view> 67 <view class="divide_line_30"></view>
68 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="date" bindchange="bindDatePicker" id="option_end_time"> 68 <picker style="height:104rpx;padding-left: 30rpx;background-color:#fff" mode="date" bindchange="bindDatePicker" id="option_end_time">
69 <text class='red_star_right_10'>*</text> 69 <text class='red_star_right_10'>*</text>
70 <text class="text_gray7_34">申报扣除期止</text> 70 <text class="text_gray7_34">申报扣除期止</text>
71 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> 71 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
72 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{option_end_date}}"></input> 72 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{option_end_date}}" disabled="true"></input>
73 </picker> 73 </picker>
74 <view class="divide_line_30"></view> 74 <view class="divide_line_30"></view>
75 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 75 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
76 <text class='red_star_right_10'>*</text> 76 <text class='red_star_right_10'>*</text>
77 <text class="text_gray7_34">报税校验码</text> 77 <text class="text_gray7_34">报税校验码</text>
78 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="tax_check_code" bindblur="getInputInfo" value="{{tax_check_code}}"></input> 78 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请输入' id="tax_check_code" bindblur="getInputInfo" maxlength="20" value="{{tax_check_code}}"></input>
79 </view> 79 </view>
80 <view class="divide_line_30"></view> 80 <view class="divide_line_30"></view>
81 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 81 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
@@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
2 var app = getApp(); 2 var app = getApp();
3 var baseUrl = app.globalData.baseUrl; 3 var baseUrl = app.globalData.baseUrl;
4 var format = require('../../../../utils/util.js'); 4 var format = require('../../../../utils/util.js');
  5 +const regex = /^[0-9a-zA-Z]{1,}$/
5 Page({ 6 Page({
6 7
7 /** 8 /**
@@ -131,16 +132,12 @@ Page({ @@ -131,16 +132,12 @@ Page({
131 this.showToast("请填写税优识别码") 132 this.showToast("请填写税优识别码")
132 return 133 return
133 } 134 }
134 - if (!this.data.date_policy || this.data.date_policy.length < 1000) {  
135 - this.showToast("请选择保单生效日期")  
136 - return  
137 - }  
138 - if (!this.data.year_premium || this.data.year_premium.length < 1) {  
139 - this.showToast("请填写年度保费") 135 + if (!regex.test(this.data.tax_code)) {
  136 + this.showToast("税优识别码格式有误")
140 return 137 return
141 } 138 }
142 - if (!this.data.month_premium || this.data.month_premium.length < 1) {  
143 - this.showToast("请填写月度保费") 139 + if (!this.data.date_policy || this.data.date_policy.length < 1000) {
  140 + this.showToast("请选择保单生效日期")
144 return 141 return
145 } 142 }
146 if (!this.data.year_deduction || this.data.year_deduction.length < 1) { 143 if (!this.data.year_deduction || this.data.year_deduction.length < 1) {
@@ -155,16 +152,12 @@ Page({ @@ -155,16 +152,12 @@ Page({
155 this.showToast("请填写税优识别码") 152 this.showToast("请填写税优识别码")
156 return 153 return
157 } 154 }
158 - if (!this.data.date_policy || this.data.date_policy.length < 1000) {  
159 - this.showToast("请选择保单生效日期")  
160 - return  
161 - }  
162 - if (!this.data.year_premium || this.data.year_premium.length < 1) {  
163 - this.showToast("请填写年度保费") 155 + if (!regex.test(this.data.tax_code)) {
  156 + this.showToast("税优识别码格式有误")
164 return 157 return
165 } 158 }
166 - if (!this.data.month_premium || this.data.month_premium.length < 1) {  
167 - this.showToast("请填写月度保费") 159 + if (!this.data.date_policy || this.data.date_policy.length < 1000) {
  160 + this.showToast("请选择保单生效日期")
168 return 161 return
169 } 162 }
170 if (!this.data.year_deduction || this.data.year_deduction.length < 1) { 163 if (!this.data.year_deduction || this.data.year_deduction.length < 1) {
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 9 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
10 <text class='red_star_right_10'>*</text> 10 <text class='red_star_right_10'>*</text>
11 <text class="text_gray7_34">税优识别码</text> 11 <text class="text_gray7_34">税优识别码</text>
12 - <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" value="{{item.tax_code}}"></input> 12 + <input class='input_wrap' style='text-align: right;color:#000;' disabled="true" maxlength="20" value="{{item.tax_code}}"></input>
13 </view> 13 </view>
14 <view class="divide_line_30"></view> 14 <view class="divide_line_30"></view>
15 <view class="divide_line_30"></view> 15 <view class="divide_line_30"></view>
@@ -50,7 +50,7 @@ @@ -50,7 +50,7 @@
50 <text class='red_star_right_10'>*</text> 50 <text class='red_star_right_10'>*</text>
51 <text class="text_gray7_34">保单生效日期</text> 51 <text class="text_gray7_34">保单生效日期</text>
52 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> 52 <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image>
53 - <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{effect_date}}"></input> 53 + <input class='input_wrap' style='text-align: right;color:#000;' placeholder='请选择' value="{{effect_date}}" disabled="true"></input>
54 </picker> 54 </picker>
55 <view class="divide_line_30"></view> 55 <view class="divide_line_30"></view>
56 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx"> 56 <view style="height:104rpx;padding:0 30rpx;background-color:#fff;margin-bottom:1rpx">
注册登录 后发表评论