提交 a3fb19a2b4d34a630806f4a105d1d8bab91446ce

作者 wangyu
2 个父辈 c3b459e2 94e57163

Merge branch 'dev2.0' into dev_wy

1 1 <template name="picker_cell_normal">
2   - <view class='item_body'>
  2 + <view class='item_body' hidden='{{hidden}}'>
3 3 <text hidden='{{!isrequre}}' style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
4 4 <view wx:if='{{isrequre||isblack}}'>
5 5 <text class='text_black_30 float_left' style='line-height: 90rpx;'>{{label}}</text>
... ...
... ... @@ -183,6 +183,16 @@ Page({
183 183 placeholder: '请选择赡养类型',
184 184 onChange: 'onPickerSelect'
185 185 },
  186 + shareMethodData: {
  187 + label: '分摊方式',
  188 + isrequre: true,
  189 + bindtype: 'share_method',
  190 + selected: '',
  191 + isblack: 'true',
  192 + values: ["赡养人平均分摊", "赡养人约定分摊", "被赡养人指定分摊"],
  193 + placeholder: '请选择分摊方式',
  194 + onChange: 'onPickerSelect'
  195 + },
186 196 oldercardtypeData: {
187 197 label: '被赡养人证照类型',
188 198 isrequre: true,
... ... @@ -518,7 +528,7 @@ Page({
518 528 title: title,
519 529 })
520 530 this.initOSS()
521   - if (options.datas && options.datas.length>0) {
  531 + if (options.datas && options.datas.length > 0 && options.datas !="undefined") {
522 532 this.handleTransData(JSON.parse(options.datas))
523 533 }
524 534 },
... ... @@ -1066,7 +1076,15 @@ Page({
1066 1076 if (this.data.supporttypeData.selected.length < 1) {
1067 1077 this.showToast('请选择赡养类型')
1068 1078 return
1069   - } else if (!formdata.supported_name || formdata.supported_name.length < 1) {
  1079 + }
  1080 + if (!this.data.shareMethodData.hidden) {
  1081 + if (this.data.shareMethodData.selected.length < 1){
  1082 + this.showToast('请选择分摊方式')
  1083 + return
  1084 + }
  1085 + newdata.share_method = this.data.shareMethodData.selected
  1086 + }
  1087 + if (!formdata.supported_name || formdata.supported_name.length < 1) {
1070 1088 this.showToast('请填写赡养人姓名')
1071 1089 return
1072 1090 } else if (this.data.oldercardtypeData.selected.length < 1) {
... ... @@ -1084,16 +1102,17 @@ Page({
1084 1102 this.showToast('请选择与纳税人关系')
1085 1103 return
1086 1104 }
1087   - if (!formdata.percentage || formdata.percentage.length < 1 || formdata.percentage > 100) {
1088   - this.showToast('请填写合理分摊比例')
1089   - return
1090   - } else {
1091   - newdata.percentage = parseFloat(formdata.percentage)
1092   - }
  1105 + // if (!formdata.percentage || formdata.percentage.length < 1 || formdata.percentage > 100) {
  1106 + // this.showToast('请填写合理分摊比例')
  1107 + // return
  1108 + // } else {
  1109 + // newdata.percentage = parseFloat(formdata.percentage)
  1110 + // }
1093 1111 newdata.birthday = this.data.olderbirthDate.datelong
1094 1112 newdata.relationship = this.data.older_relativeData.selected
1095   - newdata.support_type = this.data.supporttypeData.selected
1096   - newdata.id_card_type = this.data.oldercardtypeData.selected
  1113 + newdata.support_type = this.data.supporttypeData.selected =='独生子女'?'D':'S'
  1114 + newdata.id_card_type = '1' //this.data.oldercardtypeData.selected
  1115 + newdata.nation = "中国"
1097 1116 break;
1098 1117 case 'medical_fund':
1099 1118 subUrl = 'persontax/v1/medical-funds'
... ... @@ -1229,7 +1248,7 @@ Page({
1229 1248 var request_rent_address = this.getRentAddressRequest()
1230 1249 newdata.house_address = request_rent_address
1231 1250 console.log('request_working_address', request_working_address)
1232   -
  1251 + newdata.nation = "中国"
1233 1252 }
1234 1253 if (formdata.spouse_name || formdata.spouse_id_card_no || this.data.loverbirthDate.selected) {
1235 1254 if (!formdata.spouse_name || formdata.spouse_name.length < 1) {
... ... @@ -1467,9 +1486,19 @@ Page({
1467 1486 case 'support_type':
1468 1487 var support_typeData = this.data.supporttypeData
1469 1488 support_typeData.selected = support_typeData.values[e.detail.value]
  1489 + var share_methodData = this.data.shareMethodData
  1490 + share_methodData.hidden = e.detail.value == 0
1470 1491 this.setData({
1471 1492 oldersupport_lable: e.detail.value == 0 ? 'single' : 'together',
1472   - supporttypeData: support_typeData
  1493 + supporttypeData: support_typeData,
  1494 + shareMethodData: share_methodData
  1495 + })
  1496 + break;
  1497 + case 'share_method':
  1498 + var share_methodData = this.data.shareMethodData
  1499 + share_methodData.selected = share_methodData.values[e.detail.value]
  1500 + this.setData({
  1501 + shareMethodData: share_methodData
1473 1502 })
1474 1503 break;
1475 1504 case 'oldercardtype':
... ...
... ... @@ -117,6 +117,7 @@
117 117 <!-- 赡养老人 -->
118 118 <view wx:if="{{cur_index=='support_duty'}}" style='padding:0 30rpx;'>
119 119 <template is="picker_cell_normal" data="{{...supporttypeData}}" />
  120 + <template is="picker_cell_normal" data="{{...shareMethodData}}" />
120 121 <view class='divide_line_f5f5f5'></view>
121 122 <view style='height:90rpx'>
122 123 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
... ... @@ -147,17 +148,12 @@
147 148 <template is="picker_cell_normal" data="{{...older_relativeData}}" />
148 149
149 150 <view class='divide_line_f5f5f5'></view>
150   - <view style='height:90rpx;'>
  151 + <!-- <view style='height:90rpx;'>
151 152 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
152 153 <text class='text_black_30 float_left'>分摊比例</text>
153 154 <text class='text_black_30 float_right' style='line-height: 90rpx;margin-left:20rpx;text-align: right'>%</text>
154 155 <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入分摊比例' type='number' name='percentage' value='{{percentage}}'></input>
155   - </view>
156   - <!-- <view class='divide_line_f5f5f5'></view>
157   - <view style='height:90rpx'>
158   - <text class='text_black_30 float_left'>分摊比例</text>
159   - <input class='input_wrap float_right' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right' placeholder='请输入分摊比例' name='allocation_ratio'></input>
160   - </view> -->
  156 + </view> -->
161 157 </view>
162 158 <!-- 大病医疗 -->
163 159 <view wx:if="{{cur_index=='medical_fund'}}" style='padding:0 30rpx;'>
... ...
注册登录 后发表评论