提交 9acba622b2c7172ead9b05d40a553df81d77abd1

作者 wangyu
2 个父辈 545da0ca bab549f2

Merge branch 'dev2.0' of http://192.144.137.25:8888/wangyu/naturalPersonTax into dev2.0

... ... @@ -183,6 +183,14 @@ Page({
183 183 placeholder: '请选择教育类型',
184 184 onChange: 'onPickerSelect'
185 185 },
  186 + certificateDate: {
  187 + label: '证书名称',
  188 + isrequre: true,
  189 + bindtype: 'certificate',
  190 + values: [],
  191 + placeholder: '请输入证书名称',
  192 + onChange: 'onPickerSelect'
  193 + },
186 194 edulevelData: {
187 195 label: '教育阶段',
188 196 isrequre: true,
... ... @@ -535,6 +543,7 @@ Page({
535 543 this.getTaxList()
536 544 }
537 545 } else if ("continuing_education" == options.status) {
  546 + this.getCertificates()
538 547 var studystart_date = this.data.studystartdate
539 548 studystart_date.label = "入学时间起"
540 549 var studyend_date = this.data.studyenddate
... ... @@ -778,7 +787,9 @@ Page({
778 787 setData.applydate = applydate
779 788
780 789 if (data.certification_name && data.certification_name.length) {
781   - setData.certification_name = data.certification_name
  790 + var certificateDate = this.data.certificateDate
  791 + certificateDate.selected = data.certification_name
  792 + setData.certificateDate = certificateDate
782 793 }
783 794 if (data.certification_no && data.certification_no.length) {
784 795 setData.certification_no = data.certification_no
... ... @@ -1072,7 +1083,9 @@ Page({
1072 1083 setData.applydate = applydate
1073 1084 }
1074 1085 if (data.certification_name && data.certification_name.length) {
1075   - setData.certification_name = data.certification_name
  1086 + var certificateDate = this.data.certificateDate
  1087 + certificateDate.selected = data.certification_name
  1088 + setData.certificateDate = certificateDate
1076 1089 }
1077 1090 if (data.certification_no && data.certification_no.length) {
1078 1091 setData.certification_no = data.certification_no
... ... @@ -1350,7 +1363,29 @@ Page({
1350 1363 }
1351 1364 })
1352 1365 },
1353   -
  1366 + getCertificates: function () {
  1367 + var that = this
  1368 + var Authorization = app.globalData.Authorization;
  1369 + var bank_info = that.data.bankInfo
  1370 + wx.request({
  1371 + url: baseUrl + 'persontax/v1/certification-list' ,
  1372 + header: {
  1373 + 'content-type': 'application/json', // 默认值
  1374 + "Authorization": Authorization
  1375 + },
  1376 + success: function (res) {
  1377 + console.log('certification', res)
  1378 + that.profs_cers = res.data.profession_certificates
  1379 + that.major_cers = res.data.major_certificates
  1380 + },
  1381 + fail(res) {
  1382 + console.log(res)
  1383 + },
  1384 + complete() {
  1385 + wx.hideLoading()
  1386 + }
  1387 + })
  1388 + },
1354 1389 handleBankinfo: function(data) {
1355 1390 var bank_name = []
1356 1391 for (var i = 0; i < data.length; i++) {
... ... @@ -1497,10 +1532,14 @@ Page({
1497 1532 return
1498 1533 }
1499 1534 }
1500   - if (!formdata.certification_name || formdata.certification_name.length < 1) {
1501   - this.showToast('请填写证书名称')
  1535 + // if (!formdata.certification_name || formdata.certification_name.length < 1) {
  1536 + // this.showToast('请填写证书名称')
  1537 + // return
  1538 + // }
  1539 + if (this.data.certificateDate.selected.length < 1) {
  1540 + this.showToast('请选择证书名称')
1502 1541 return
1503   - }
  1542 + }
1504 1543 if (!formdata.certification_no || formdata.certification_no.length < 1) {
1505 1544 this.showToast('请填写证书编号')
1506 1545 return
... ... @@ -1513,6 +1552,7 @@ Page({
1513 1552 // newdata.edu_type_lable = '1'
1514 1553 newdata.approval_date = this.data.applydate.datelong
1515 1554 newdata.education_type = this.data.edustyleData.selected == '技能人员职业资格' ? 'profession' : 'major'
  1555 + newdata.certification_name = this.data.certificateDate.selected
1516 1556 }
1517 1557 break;
1518 1558 case 'support_duty':
... ... @@ -2180,8 +2220,19 @@ Page({
2180 2220 case 'edu_style':
2181 2221 var edustyle_data = this.data.edustyleData
2182 2222 edustyle_data.selected = edustyle_data.values[e.detail.value]
  2223 + var certificateDate = this.data.certificateDate
  2224 + certificateDate.values = e.detail.value == '0' ? this.profs_cers : this.major_cers
  2225 + certificateDate.selected = ''
  2226 + this.setData({
  2227 + edustyleData: edustyle_data,
  2228 + certificateDate: certificateDate
  2229 + })
  2230 + break;
  2231 + case 'certificate':
  2232 + var certificateDate = this.data.certificateDate
  2233 + certificateDate.selected = certificateDate.values[e.detail.value]
2183 2234 this.setData({
2184   - edustyleData: edustyle_data
  2235 + certificateDate: certificateDate
2185 2236 })
2186 2237 break;
2187 2238 case 'edu_level':
... ...
... ... @@ -94,11 +94,12 @@
94 94 <view class='divide_line_30'></view>
95 95 <template is="picker_cell_normal" data="{{...applydate}}" />
96 96 <view class='divide_line_30'></view>
97   - <view style='height:90rpx'>
  97 + <template is="picker_cell_normal" data="{{...certificateDate}}" />
  98 + <!-- <view style='height:90rpx'>
98 99 <text class='red_star_right_10'>*</text>
99 100 <text class='text_777_30 float_left'>证书名称</text>
100 101 <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入证书名称' name='certification_name' value='{{certification_name}}'></input>
101   - </view>
  102 + </view> -->
102 103 <view class='divide_line_30'></view>
103 104 <view style='height:90rpx'>
104 105 <text class='red_star_right_10'>*</text>
... ...
注册登录 后发表评论