提交 2688f11dca7c5224b5761962a5bd579dd1a3fec5

作者 pangy
1 个父辈 2c711692

1、预扣预缴明细,

2、工资明细
3、自然人信息:添加家属
... ... @@ -65,6 +65,12 @@
65 65 font-size: 30rpx;
66 66 color: #999;
67 67 }
  68 +.text_777_30 {
  69 + font-family: PingFangSC-Regular;
  70 + font-size: 30rpx;
  71 + line-height: 90rpx;
  72 + color: #777;
  73 +}
68 74
69 75 .text_333_30 {
70 76 font-family: PingFangSC-Regular;
... ...
... ... @@ -9,11 +9,46 @@ Page({
9 9 // tab切换
10 10 isshow: false,
11 11 currentTab: 0,
12   - datas: {},
  12 + taxDatas: {
  13 + "id": "154024896031100928",
  14 + "created_at": 1511525284,
  15 + "updated_at": 1511525284,
  16 + "tenant_id": "122371433052508160",
  17 + "taxation_method": "salary", // 个税申报类型:"0101"-工资薪金 "0401"-劳务报酬
  18 + "sub_taxation_method": "salary", // 正常工资薪金子类型:"0101"-正常工资薪金 "0107"-内退一次性补偿 "0108"-解除劳动合同一次性补偿 "0109"-个人股票期权行权收入 "0110"-企业年金 "0111"-提前退休一次性补贴 "0103"-全年一次性奖金收入
  19 + "province": "北京市",
  20 + "province_code": "110000",
  21 + "city": "市辖区",
  22 + "city_code": "110100",
  23 + "district": "东城",
  24 + "district_code": "110101",
  25 + "name": "徐恒堂", //姓名
  26 + "credential_type": "居民身份证",
  27 + "credential_number": "110221198301270632", //证件号码
  28 + "option_date": 152135596800,
  29 + "personal_income": 475.6, //当期收入额
  30 + "tax_free_income": 475.6, //当期免税收入
  31 + "special_deduction": 475.6, //累计专项扣除(专项扣除合计)
  32 + "reduction_cost": 475.6, //累计基本减除(减除费用)
  33 + "special_additional_deduction": 475.6, //累计专项附加扣除(专项附加扣除合计)
  34 + "other_deduction": 475.6, //累计法定扣除(其他扣除合计)
  35 + "accumulated_taxable_income": 475.6, //累计应纳税所得额
  36 + "tax_rate": 0.6, //税率
  37 + "deduction_number": 475.6, //速算扣除数
  38 + "accumulated_withholding_tax": 475.6, //累计应扣缴税额
  39 + "prepay_tax": 475.6, //已预交税额
  40 + "refund_tax": 475.6, //本期应缴税额(应补退税额)
  41 + },
13 42 choosed_date: '',
14 43 long_date: 0
15 44 },
16 45 onLoad: function (options) {
  46 + if (options.date){
  47 + var mydate = new Date();
  48 + this.setData({
  49 + choosed_date: options.date,
  50 + })
  51 + }
17 52 if (!options.id) return
18 53
19 54 const self = this
... ... @@ -26,9 +61,12 @@ Page({
26 61 },
27 62 success: function (result) {
28 63 console.log('成功', result)
29   - self.setData({
30   - datas:result
31   - })
  64 + if (result.personal_income){
  65 + self.setData({
  66 + taxDatas: result
  67 + })
  68 + }
  69 +
32 70 },
33 71 fail: function (res) {
34 72 console.log('失败', res)
... ... @@ -38,11 +76,6 @@ Page({
38 76 }
39 77
40 78 })
41   -
42   - // this.setData({
43   - // choosed_date: mydate.getFullYear() + "年" + (mydate.getMonth() + 1) + "月",
44   - // long_date: mydate.getTime() / 1000
45   - // })
46 79 },
47 80
48 81
... ...
1 1 <!--pages/main/advancepayment/adPayDetails/adPayDetails.wxml-->
2 2 <view>
3 3 <scroll-view style='margin-bottom:40rpx'>
4   - <view style='padding:30rpx;background:#ffffff'>
5   - <picker mode="date" fields="month" start="1970-01" end="2100-01" bindchange="datePickerChange">
6   - <view>
7   - <text class='text_gray_32'>当前选择月份</text>
8   - <view class='float_right'>
9   - <text class='text_gray_32'>{{choosed_date}}</text>
10   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
11   - </view>
  4 + <view style='padding:0rpx 30rpx 30rpx 30rpx;background:#ffffff'>
  5 + <view>
  6 + <text class='text_gray_32'>{{choosed_date}}</text>
  7 + <view class='float_right'>
  8 + <image class='arrow_wrap' src='/images/arrow_right.png'></image>
12 9 </view>
13   - </picker>
  10 + </view>
  11 + <!-- <picker mode="date" fields="month" start="1970-01" end="2100-01" bindchange="datePickerChange">
  12 + </picker> -->
14 13 <view class='divide_line_f5f5f5'></view>
15 14 <view style='padding:30rpx 0'>
16 15 <text class='text_666_30 float_left'>当期收入额</text>
17   - <text class='text_number float_right'>400000.00</text>
  16 + <text class='text_number float_right'>{{taxDatas.personal_income}}</text>
  17 + </view>
  18 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  19 + <view style='padding:30rpx 0'>
  20 + <text class='text_666_30 float_left'>当期免税收入</text>
  21 + <text class='text_number float_right'>{{taxDatas.tax_free_income}}</text>
18 22 </view>
19 23 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
20 24 <view style='padding:30rpx 0'>
21   - <text class='text_666_30 float_left'>累计工资收入</text>
22   - <text class='text_number float_right'>400000.00</text>
  25 + <text class='text_666_30 float_left'>专项扣除合计</text>
  26 + <text class='text_number float_right'>{{taxDatas.special_deduction}}</text>
23 27 </view>
24 28 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
25 29 <view style='padding:30rpx 0'>
26   - <text class='text_666_30 float_left'>累计免税收入</text>
27   - <text class='text_number float_right'>40.00</text>
  30 + <text class='text_666_30 float_left'>减除费用</text>
  31 + <text class='text_number float_right'>{{taxDatas.reduction_cost}}</text>
28 32 </view>
29 33 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
30 34 <view style='padding:30rpx 0'>
31   - <text class='text_666_30 float_left'>累计基本减除费用</text>
32   - <text class='text_number float_right'>8000.00</text>
  35 + <text class='text_666_30 float_left'>专项附加扣除合计</text>
  36 + <text class='text_number float_right'>{{taxDatas.special_additional_deduction}}</text>
33 37 </view>
34 38 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
35 39 <view style='padding:30rpx 0'>
36   - <text class='text_666_30 float_left'>累计专项扣除额</text>
37   - <text class='text_number float_right'>84783.00</text>
  40 + <text class='text_666_30 float_left'>其他扣除合计</text>
  41 + <text class='text_number float_right'>{{taxDatas.other_deduction}}</text>
38 42 </view>
39 43 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
40 44 <view style='padding:30rpx 0'>
41   - <text class='text_666_30 float_left'>累计专项附加扣除额</text>
42   - <text class='text_number float_right'>32200.00</text>
  45 + <text class='text_666_30 float_left'>累计应纳税所得额</text>
  46 + <text class='text_number float_right'>{{taxDatas.accumulated_taxable_income}}</text>
43 47 </view>
44 48 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
45 49 <view style='padding:30rpx 0'>
46   - <text class='text_666_30 float_left'>累计其他扣除额</text>
47   - <text class='text_number float_right'>0.00</text>
  50 + <text class='text_666_30 float_left'>税率</text>
  51 + <text class='text_number float_right'>{{taxDatas.tax_rate}}%</text>
48 52 </view>
49 53 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
50 54 <view style='padding:30rpx 0'>
51   - <text class='text_666_30 float_left'>累计预缴应纳税所得额</text>
52   - <text class='text_number float_right'>32983000.00</text>
  55 + <text class='text_666_30 float_left'>速算扣除数</text>
  56 + <text class='text_number float_right'>{{taxDatas.deduction_number}}</text>
53 57 </view>
54 58 </view>
55 59 <view style='margin:30rpx;positive:relative;width:92%;height:312rpx'>
... ... @@ -57,12 +61,12 @@
57 61 <view>
58 62 <view class='view_bg_wrap' style='margin-top: 44rpx;'>
59 63 <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
60   - <text class='text_num_wrap'>3838.9</text>
  64 + <text class='text_num_wrap'>{{taxDatas.accumulated_withholding_tax}}</text>
61 65 <text class='text_text_wrap'>累计应预扣预缴税额</text>
62 66 </view>
63 67 <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
64 68 <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
65   - <text class='text_num_wrap'>10398.01</text>
  69 + <text class='text_num_wrap'>{{taxDatas.prepay_tax}}</text>
66 70 <text class='text_text_wrap'>已预扣预缴税额</text>
67 71 </view>
68 72
... ... @@ -70,7 +74,7 @@
70 74
71 75 <view class='view_bg_wrap' style='margin-top: 180rpx;'>
72 76 <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
73   - <text class='text_num_wrap'>133.09</text>
  77 + <text class='text_num_wrap'>{{taxDatas.refund_tax}}</text>
74 78 <text class='text_text_wrap'>本期应预扣预缴税额</text>
75 79 </view>
76 80
... ...
... ... @@ -4,12 +4,14 @@ var app = getApp();
4 4 var baseUrl = app.globalData.baseUrl;
5 5
6 6 Page({
7   -
  7 + loadCount:0,
  8 + timestamp: 0,
  9 + Authorization: null,
8 10 data: {
9 11 // tab切换
10 12 isshow : false,
11 13 currentTab: 0,
12   - datas: [{
  14 + taxDatas: [{
13 15 "id": "154024896031100928",
14 16 "created_at": 1511525284,
15 17 "updated_at": 1511525284,
... ... @@ -32,29 +34,30 @@ Page({
32 34 "prepay_tax": 475.6, //已预交税额
33 35 "option_date": 152135596800
34 36 }],
35   - choosed_date: '',
36   - long_date: 0
  37 + salaryDatas: {},
  38 + choosed_date: ''
37 39 },
38 40 onLoad: function(options) {
39 41 var mydate = new Date();
40   - this.setData({
41   - choosed_date: mydate.getFullYear() + "年" + (mydate.getMonth()+1)+"月",
42   - long_date: mydate.getTime()/1000
43   - })
44   -
45   -
  42 + this.setData({
  43 + choosed_date: mydate.getFullYear() + "年" + (mydate.getMonth()+1)+"月",
  44 + })
  45 + this.timestamp = (mydate.getTime() / 1000).toFixed(0)
  46 + this.loadData(this.timestamp);
  47 + },
  48 + loadData: function (timestamp) {
46 49 var that = this
47   - var Authorization = getApp().globalData.Authorization;
48   - //OSS 上传前init
  50 + this.Authorization = getApp().globalData.Authorization;
49 51 wx.showLoading()
  52 + that.loadCount = 2
50 53 wx.request({
51 54 url: baseUrl + "payroll/v1/tax/person-records",
52 55 header: {
53   - 'Authorization': Authorization
  56 + 'Authorization': this.Authorization
54 57 },
55 58 success: function (result) {
56 59 that.setData({
57   - datas: result.items
  60 + taxDatas: result.items
58 61 })
59 62
60 63 },
... ... @@ -62,11 +65,46 @@ Page({
62 65 console.log('OSS init 失败', res)
63 66 },
64 67 complete: function () {
65   - wx.hideLoading()
  68 + that.loadCount--
  69 + if (!that.loadCount) {
  70 + wx.hideLoading()
  71 + }
  72 + }
  73 + })
  74 + wx.request({
  75 + url: baseUrl + "payroll/v1/salary/person-records",
  76 + header: {
  77 + 'Authorization': this.Authorization
  78 + },
  79 + data: { 'cycle_date': timestamp },
  80 + success: function (result) {
  81 + console.log('rest', result.data)
  82 + that.setData({
  83 + salaryDatas: that.handleSalaryData(result.data.items)
  84 + })
  85 + },
  86 + fail: function (res) {
  87 + console.log('salary获取失败', res)
  88 + },
  89 + complete: function () {
  90 + that.loadCount--
  91 + if (!that.loadCount) {
  92 + wx.hideLoading()
  93 + }
66 94 }
67 95 })
  96 +
68 97 },
69 98
  99 + handleSalaryData: function (items) {
  100 + for (var i = 0; i < items.length; ++i) {
  101 + var item = items[i]
  102 + item.payroll_date = format.formatTime_date(item.payroll_date)
  103 + item.count_date = format.formatDate_min(item.start_time) + '-' + format.formatDate_min(item.end_time)
  104 + item.detals = this.handleDetailsData(item)
  105 + }
  106 + return items;
  107 + },
70 108 // handleData: function (items) {
71 109 // for (var i = 0; i < items.length; ++i) {
72 110 // if (items.taxation_method)
... ... @@ -75,13 +113,13 @@ Page({
75 113
76 114 datePickerChange: function(e) {
77 115 console.log("e",e)
78   - var datelong = Date.parse(new Date(e.detail.value))/1000
79   - console.log('datelong', datelong)
  116 + var timestamp = Date.parse(new Date(e.detail.value))/1000
80 117 this.setData({
81   - long_date: datelong,
82   - choosed_date: format.yearFormString(datelong) + "年" + format.monthFormString(datelong)+"月"
  118 + choosed_date: format.yearFormString(timestamp) + "年" + format.monthFormString(timestamp)+"月"
83 119 })
84   - },
  120 + this.dateStamp = timestamp
  121 + this.loadData(timestamp);
  122 + },
85 123
86 124 /**
87 125 * 点击tab切换
... ... @@ -112,10 +150,50 @@ Page({
112 150 this.setData({
113 151 isshow: !this.data.isshow
114 152 })
  153 + // console.log('idddddd',e.currentTarget.id)
  154 + // if (!e.currentTarget.id) return
  155 + // var that = this
  156 + // wx.showLoading()
  157 + // wx.request({
  158 + // url: baseUrl + "payroll/v1/salary/person-records/" + e.currentTarget.id,
  159 + // header: {
  160 + // 'Authorization': this.Authorization
  161 + // },
  162 + // data: {},
  163 + // success: function (result) {
  164 + // console.log('rest', result.data)
  165 + // that.handleDetailsData(result.data)
  166 + // },
  167 + // fail: function (res) {
  168 + // },
  169 + // complete: function () {
  170 + // wx.hideLoading()
  171 +
  172 + // }
  173 + // })
115 174 },
  175 +
  176 + handleDetailsData: function (data) {
  177 +
  178 + var titles = JSON.parse(data['slip_titles'])
  179 + var detail = JSON.parse(data['detail'])
  180 + var details = []
  181 + for (var i = 0; i < titles.length; ++i) {
  182 + var titleData = titles[i]
  183 + var value = detail[titleData['key']]
  184 +
  185 + details.push({
  186 + title: titleData['original_column'],
  187 + value: value
  188 + })
  189 + }
  190 + console.log('details', details)
  191 + return details
  192 + },
  193 +
116 194 goItemDetails: function (e) {
117 195 wx.navigateTo({
118   - url: "adPayDetails/adPayDetails?id=" + e.currentTarget.id
  196 + url: "adPayDetails/adPayDetails?id=" + e.currentTarget.id + "&date=" + this.data.choosed_date
119 197 })
120 198 },
121 199 })
\ No newline at end of file
... ...
... ... @@ -15,7 +15,7 @@
15 15 <view style='height:10rpx;background:#f8f8f8'></view>
16 16 <view class="swiper-box page" style="height:100%;margin-top:20rpx" bindchange="bindChange">
17 17 <view wx:if="{{currentTab==0}}">
18   - <view wx:for="{{datas}}" style='margin-bottom:20rpx'>
  18 + <view wx:for="{{taxDatas}}" style='margin-bottom:20rpx'>
19 19 <view class='card_rectangle_bg_column' style='padding:30rpx' id='{{item.id}}' bindtap='goItemDetails'>
20 20 <text style='text-align:left;font-size: 28rpx;color: #333;font-family: PingFangSC-Semibold;'>所得项目:{{item.taxation_method=='salary'?'工资薪金':'劳务报酬'}}</text>
21 21 <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view>
... ... @@ -28,17 +28,17 @@
28 28 </view>
29 29 </view>
30 30 </view>
31   - <view wx:else>
32   - <view wx:for="{{datas}}" style='margin-bottom:20rpx'>
  31 + <view wx:else> <!-- 工资明细 -->
  32 + <view wx:for="{{salaryDatas}}" style='margin-bottom:20rpx'>
33 33 <view class='card_rectangle_bg_column' style='padding:30rpx'>
34   - <text style='text-align:left;font-size: 28rpx;color: #333;font-family: PingFangSC-Semibold;'>薪酬批次工资:业务部八月工资</text>
  34 + <text style='text-align:left;font-size: 28rpx;color: #333;font-family: PingFangSC-Semibold;'>薪酬批次工资:{{}}</text>
35 35 <view class='divide_line_f5f5f5' style='margin:20rpx 0'></view>
36   - <text class='text_666_28'>发薪日:2018、10、31</text>
37   - <text class='text_666_28'>计薪时间:2018/10/01-2018/10/31</text>
38   - <text class='text_666_28'>应发额度:23460.00</text>
39   - <text class='text_666_28'>实发:13980.00</text>
  36 + <text class='text_666_28'>发薪日:{{item.payroll_date}}</text>
  37 + <text class='text_666_28'>计薪时间:{{item.count_date}}</text>
  38 + <text class='text_666_28'>应发额度:{{item.pay_salary}}</text>
  39 + <text class='text_666_28'>实发:{{item.salary}}</text>
40 40 <view class='divide_line_f5f5f5' style='margin:20rpx 0'></view>
41   - <view wx:if="{{!isshow}}" bindtap='gospan'>
  41 + <view wx:if="{{!isshow}}" bindtap='gospan' id='{{item.id}}'>
42 42 <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>展开</text>
43 43 <image class='head_image_wrap_down' src='/images/arrow_blue_down.png'></image>
44 44 </view>
... ... @@ -46,10 +46,10 @@
46 46 <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>收起</text>
47 47 <image class='head_image_wrap_up' src='/images/arrow_blue_up.png'></image>
48 48 </view>
49   - <view wx:if="{{isshow}}" wx:for="{{datas}}">
  49 + <view wx:if="{{isshow}}" wx:for="{{item.detals}}" wx:for-item='detal'>
50 50 <view>
51   - <text style='font-size:28rpx;color:#999;text-align:left'>中文姓名</text>
52   - <text style='font-size:28rpx;color:#999;text-align:right'>嘎嘎</text>
  51 + <text class='text_wrap_left' style='font-size:28rpx;color:#999;text-align:left'>{{detal.title}}</text>
  52 + <text class='text_wrap_right' style='font-size:28rpx;color:#999;text-align:right'>{{detal.value}}</text>
53 53 </view>
54 54 </view>
55 55 </view>
... ...
... ... @@ -24,12 +24,12 @@ Page({
24 24
25 25 relativeData: {
26 26 isrequre: true,
27   - label: '关系',
  27 + label: '与本人关系',
28 28 bindtype: 'relative',
29 29 selected: '',
30 30 disabled: false,
31 31 placeholder: '请选择关系',
32   - values: ["子女", "配偶"],
  32 + values: ["子","女" ,"配偶", "父母", "祖父母", "外祖父母"],
33 33 onChange: 'onPickerSelect'
34 34 },
35 35 personstatusData: {
... ... @@ -45,7 +45,7 @@ Page({
45 45 isrequre: true,
46 46 label: '证照类型',
47 47 bindtype: 'cardtype',
48   - selected: '',
  48 + selected: '居民身份证',
49 49 placeholder: '请选择证照类型',
50 50 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照',
51 51 '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证'
... ... @@ -69,6 +69,7 @@ Page({
69 69 onChange: 'onPickerSelect'
70 70 },
71 71 genderData: {
  72 + isblack:true,
72 73 label: '性别',
73 74 bindtype: 'gender',
74 75 selected: '',
... ... @@ -402,7 +403,7 @@ Page({
402 403 birthDate: that.data.birthDate,
403 404 card_number: id_info.id_card_number
404 405 })
405   -
  406 + this.dealIdInfo(id_info.id_card_number)
406 407 }
407 408 },
408 409 })
... ... @@ -625,7 +626,7 @@ Page({
625 626 },
626 627
627 628 formSubmit: function(e) {
628   - console.log("date", Date.parse(new Date(this.data.birthday)) / 1000)
  629 + // console.log("date", Date.parse(new Date(this.data.birthday)) / 1000)
629 630 var regMoney = /^[0-9]*(\.[0,10]{1,2})?$/;
630 631 var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/;
631 632 var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,}$/;
... ... @@ -647,10 +648,11 @@ Page({
647 648 // this.showtoast('有必填项未填写');
648 649 // return
649 650 // }
650   - else if (this.data.cardtypeData.selected.length < 1) {
651   - this.showtoast('有必填项未填写');
652   - return
653   - } else if (this.data.isIdCard && (this.data.card_number.length < 1 && formdata.id_card_no.length < 1)) {
  651 + // else if (this.data.cardtypeData.selected.length < 1) {
  652 + // this.showtoast('有必填项未填写');
  653 + // return
  654 + // }
  655 + else if (this.data.isIdCard && (this.data.card_number.length < 1 && formdata.id_card_no.length < 1)) {
654 656 this.showtoast('有必填项未填写');
655 657 return
656 658 } else if (this.data.isIdCard && !format.isIDCardNum(formdata.id_card_no)) {
... ... @@ -659,13 +661,15 @@ Page({
659 661 } else if (!this.data.isIdCard && (!formdata.id_card_no || formdata.id_card_no.length < 1)) {
660 662 this.showtoast('有必填项未填写');
661 663 return
662   - } else if (formdata.mobile.length < 1) {
663   - this.showtoast('有必填项未填写');
664   - return
665   - } else if (!regMobile.test(formdata.mobile)) {
666   - this.showtoast('请输入正确手机号');
667   - return
668   - }
  664 + }
  665 + // else if (formdata.mobile.length < 1) {
  666 + // this.showtoast('有必填项未填写');
  667 + // return
  668 + // }
  669 + // else if (!regMobile.test(formdata.mobile)) {
  670 + // this.showtoast('请输入正确手机号');
  671 + // return
  672 + // }
669 673 // else if (this.data.investInfo.selected.length < 1) {
670 674 // this.showtoast('有必填项未填写');
671 675 // return
... ... @@ -717,55 +721,57 @@ Page({
717 721 method: "POST",
718 722 data: {
719 723 'certification_status': that.getCertifyStatus(formdata),
720   - "name": that.data.name.length > 0 ? that.data.name : formdata.name,
721 724 "family_ties": that.data.relativeData.selected,
722   - "native": "中国",
723   - "id_card_type": that.data.cardtypeData.selected,
  725 + "id_card_type": '居民身份证',//that.data.cardtypeData.selected,
724 726 "id_card_no": formdata.id_card_no ? formdata.id_card_no : that.data.card_number,
  727 + "name": that.data.name.length > 0 ? that.data.name : formdata.name,
725 728 "gender": that.data.genderData.selected,
726   - "birth_date": that.data.long_birth_date,
727   - "profession": request_profession,
728   - "education": that.data.degreeData.selected,
729   - "taxpayer_no": formdata.taxpayer_no ? formdata.taxpayer_no : '',
730   - // "taxpayer_status": that.data.personstatusData.selected,
731   - "is_martyr_family": that.data.lieshuInfo.selected,
732   - "martyr_family_no": that.data.lieshuInfo.selected == '否' ? '' : formdata.martyr_family_no,
733   - "is_disability": that.data.disabilityInfo.selected,
734   - "disability_no": that.data.disabilityInfo.selected == '否' ? '' : formdata.disability_no,
735   - "is_lonely_man": that.data.lonelyolderInfo.selected,
  729 + //"age": formdata.age ? formdata.age : '',//不传
  730 + "native": "中国",
736 731 "is_overseas_personnel": "否",
737   - "comment": formdata.comment,
738   - "current_address": {
739   - "province_code": that.data.currentaddressInfo.address_code[0],
740   - "province": that.data.currentaddressInfo.address_value[0],
741   - "city_code": that.data.currentaddressInfo.address_code[1],
742   - "city": that.data.currentaddressInfo.address_value[1],
743   - "district_code": that.data.currentaddressInfo.address_code[2],
744   - "district": that.data.currentaddressInfo.address_value[2]
745   - },
746   - "current_address_detail": formdata.current_address_detail,
747   - "huji_address": {
748   - "province_code": that.data.birthaddressInfo.address_code[0],
749   - "province": that.data.birthaddressInfo.address_value[0],
750   - "city_code": that.data.birthaddressInfo.address_code[1],
751   - "city": that.data.birthaddressInfo.address_value[1],
752   - "district_code": that.data.birthaddressInfo.address_code[2],
753   - "district": that.data.birthaddressInfo.address_value[2]
754   - },
755   - "huji_address_detail": formdata.huji_address_detail.replace(/(^\s*)|(\s*$)/g, ""),
756   - "mobile": formdata.mobile + "",
757   - "contact_address": {
758   - "province_code": that.data.contactaddressInfo.address_code[0],
759   - "province": that.data.contactaddressInfo.address_value[0],
760   - "city_code": that.data.contactaddressInfo.address_code[1],
761   - "city": that.data.contactaddressInfo.address_value[1],
762   - "district_code": that.data.contactaddressInfo.address_code[2],
763   - "district": that.data.contactaddressInfo.address_value[2]
764   - },
765   - "contact_address_detail": formdata.contact_address_detail,
766   - "email": formdata.email,
767   - "bank": that.data.bankInfo.selected,
768   - "bank_account": formdata.bank_account,
  732 +
  733 + // "birth_date": that.data.long_birth_date,
  734 + // "profession": request_profession,
  735 + // "education": that.data.degreeData.selected,
  736 + // "taxpayer_no": formdata.taxpayer_no ? formdata.taxpayer_no : '',
  737 + // "taxpayer_status": that.data.personstatusData.selected,
  738 + // "is_martyr_family": that.data.lieshuInfo.selected,
  739 + // "martyr_family_no": that.data.lieshuInfo.selected == '否' ? '' : formdata.martyr_family_no,
  740 + // "is_disability": that.data.disabilityInfo.selected,
  741 + // "disability_no": that.data.disabilityInfo.selected == '否' ? '' : formdata.disability_no,
  742 + // "is_lonely_man": that.data.lonelyolderInfo.selected,
  743 + // "comment": formdata.comment,
  744 + // "current_address": {
  745 + // "province_code": that.data.currentaddressInfo.address_code[0],
  746 + // "province": that.data.currentaddressInfo.address_value[0],
  747 + // "city_code": that.data.currentaddressInfo.address_code[1],
  748 + // "city": that.data.currentaddressInfo.address_value[1],
  749 + // "district_code": that.data.currentaddressInfo.address_code[2],
  750 + // "district": that.data.currentaddressInfo.address_value[2]
  751 + // },
  752 + // "current_address_detail": formdata.current_address_detail,
  753 + // "huji_address": {
  754 + // "province_code": that.data.birthaddressInfo.address_code[0],
  755 + // "province": that.data.birthaddressInfo.address_value[0],
  756 + // "city_code": that.data.birthaddressInfo.address_code[1],
  757 + // "city": that.data.birthaddressInfo.address_value[1],
  758 + // "district_code": that.data.birthaddressInfo.address_code[2],
  759 + // "district": that.data.birthaddressInfo.address_value[2]
  760 + // },
  761 + // "huji_address_detail": formdata.huji_address_detail.replace(/(^\s*)|(\s*$)/g, ""),
  762 + // "mobile": formdata.mobile + "",
  763 + // "contact_address": {
  764 + // "province_code": that.data.contactaddressInfo.address_code[0],
  765 + // "province": that.data.contactaddressInfo.address_value[0],
  766 + // "city_code": that.data.contactaddressInfo.address_code[1],
  767 + // "city": that.data.contactaddressInfo.address_value[1],
  768 + // "district_code": that.data.contactaddressInfo.address_code[2],
  769 + // "district": that.data.contactaddressInfo.address_value[2]
  770 + // },
  771 + // "contact_address_detail": formdata.contact_address_detail,
  772 + // "email": formdata.email,
  773 + // "bank": that.data.bankInfo.selected,
  774 + // "bank_account": formdata.bank_account,
769 775 // "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : null,
770 776 // "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : null,
771 777 // "is_employee": that.data.employeeInfo.selected,
... ... @@ -833,8 +839,8 @@ Page({
833 839 var cardtype = this.data.cardtypeData.selected;
834 840 var card_no = formdata.id_card_no ? formdata.id_card_no : this.data.card_number;
835 841 var gender = this.data.genderData.selected;
836   - var birth_day = this.data.birthDate.selected;
837   - if (name == iddata.name && cardtype == '居民身份证' && card_no == iddata.id_card_number && gender == iddata.gender && birth_day == this.data.birthday) {
  842 + //var birth_day = this.data.birthDate.selected;
  843 + if (name == iddata.name && cardtype == '居民身份证' && card_no == iddata.id_card_number && gender == iddata.gender ){// && birth_day == this.data.birthday) {
838 844 return 'active'
839 845 } else {
840 846 return ''
... ... @@ -849,6 +855,91 @@ Page({
849 855 })
850 856 },
851 857
  858 + dealIdInfo: function (idCardNum) {
  859 + var info = this.analyzeIDCard(idCardNum)
  860 + console.log('info', info.age, info.sex)
  861 + if (info.age) {
  862 + this.setData({
  863 + age: info.age
  864 + })
  865 + }
  866 + if (info.sex) {
  867 + var gender_data = this.data.genderData
  868 + gender_data.selected = info.sex
  869 + this.setData({
  870 + genderData: gender_data
  871 + })
  872 + }
  873 +
  874 + },
  875 +
  876 + idChange: function (e) {
  877 + console.log('idCardNoChange', e.detail.value)
  878 + var idCardNo = e.detail.value
  879 + if (e.detail.value.length == 18){
  880 + if (!format.isIDCardNum(idCardNo)) {
  881 + wx.showToast({
  882 + image: "../../../../images/warn.png",
  883 + title: '身份证格式有误'
  884 + })
  885 + return;
  886 + }
  887 + this.dealIdInfo(idCardNo)
  888 + }
  889 + },
  890 + idDone: function (e) {
  891 +
  892 + var idCardNo = e.detail.value
  893 + if (!idCardNo.length) {
  894 + wx.showToast({
  895 + image: "../../../../images/warn.png",
  896 + title: '请输入身份证号'
  897 + })
  898 + return;
  899 + }
  900 + if (!format.isIDCardNum(idCardNo)) {
  901 + wx.showToast({
  902 + image: "../../../../images/warn.png",
  903 + title: '身份证格式有误'
  904 + })
  905 + return;
  906 + }
  907 +
  908 + },
  909 +
  910 + analyzeIDCard: function(IDCard){
  911 + var sexAndAge = {}
  912 + //获取用户身份证号码
  913 + var userCard = IDCard;
  914 + //如果身份证号码为undefind则返回空
  915 + if(!userCard) {
  916 + return sexAndAge;
  917 + }
  918 + //获取性别
  919 + if(parseInt(userCard.substr(16, 1)) % 2 == 1){
  920 + sexAndAge.sex = '男'
  921 + }else {
  922 + sexAndAge.sex = '女'
  923 + }
  924 + //获取出生年月日
  925 + //userCard.substring(6,10) + "-" + userCard.substring(10,12) + "-" + userCard.substring(12,14);
  926 + var yearBirth = userCard.substring(6, 10);
  927 + var monthBirth = userCard.substring(10, 12);
  928 + var dayBirth = userCard.substring(12, 14);
  929 + //获取当前年月日并计算年龄
  930 + var myDate = new Date();
  931 + var monthNow = myDate.getMonth() + 1;
  932 + var dayNow = myDate.getDay();
  933 + var age = myDate.getFullYear() - yearBirth;
  934 + if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) {
  935 + age--;
  936 + }
  937 + //得到年龄
  938 + sexAndAge.age = age;
  939 + //返回性别和年龄
  940 + return sexAndAge;
  941 +},
  942 +
852 943 /**
853 944 * 生命周期函数--监听页面隐藏
854 945 */
... ...
1 1 <!--pages/main/addinfo/addinfo.wxml-->
2 2 <import src="../../../common/picker_cell" />
3 3
4   -<view class='page'>
  4 +<view class='page__'>
5 5 <form bindsubmit='formSubmit'>
6 6
7   - <!-- 成员关系 -->
8   - <view class='head_wrap' hidden="{{isself}}">
9   - <text class='head_text_wrap1'>成员关系</text>
10   - </view>
11 7 <view class='data_list' hidden="{{isself}}">
12 8 <view class='data_item'>
13   - <view class='item_body'>
14   - <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
15   - <text class='text_black_30 float_left' style='line-height: 90rpx'>姓名</text>
16   - <input class='input_wrap float_right' placeholder='请填写姓名' name='name' value='{{name}}' placeholder-class='text_999_30' maxlength='15'></input>
17   - </view>
18   - <view class="divide_line"></view>
19   - <!-- <view class='item_body' bindtap='openpicker'>
20   - <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
21   - <text class='text_black_28 float_left'>关系</text>
22   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
23   - <text class='text_333_28 float_right'>请选择关系</text>
24   - </view> -->
25 9
26 10 <template is="picker_cell_normal" data="{{...relativeData}}" />
27   - </view>
28   - </view>
29   -
30   - <!-- 基本信息 -->
31   - <view class='head_wrap' bindtap='span' id='1'>
32   - <text class='head_text_wrap1'>基本信息</text>
33   - <text class='head_text_wrap2' hidden='{{!isshow01}}'>(点击收起非必填选项)</text>
34   - <text class='head_text_wrap2' hidden='{{isshow01}}'>(点击展开非必填选项)</text>
35   - <view style='float:right' wx:if='{{isshow01}}'>
36   - <image class='head_image_wrap_up' src='/images/arrow_up.png'></image>
37   - </view>
38   - <view wx:else style='float:right'>
39   - <image class='head_image_wrap_down' src='/images/arrow_down.png'></image>
40   - </view>
41   - <!-- <image class='{{isshow01}}?head_image_wrap_up:head_image_wrap_down' src="{{isshow01?'/images/arrow_up.png':'/images/arrow_down.png'}}"></image> -->
42   - </view>
43   -
44   - <view class='data_list'>
45   - <view class='data_item'>
46   - <view class='item_body' hidden="{{!isself}}">
47   - <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
48   - <text class='text_black_30 float_left' style='line-height: 90rpx'>姓名</text>
49   - <input class='input_wrap float_right' placeholder='请填写姓名' value='' placeholder-class='text_999_30' maxlength='15'></input>
50   - </view>
51 11 <view class="divide_line"></view>
52 12
53 13 <view class='item_body'>
54   - <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
55   - <text class='text_black_30 float_left' style='line-height: 90rpx'>国籍(地区)</text>
56   - <text class='text_999_30 float_right' >中国</text>
57   - </view>
58   - <view class="divide_line"></view>
59   -
60   - <!-- <view class='item_body'>
61   - <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
62   - <text class='text_black_28 float_left'>纳税人状态</text>
63   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
64   - <text class='text_333_28 float_right'>在职</text>
65   - </view> -->
66   -
67   - <!-- 注释2018/11/26 -->
68   - <!-- <template is="picker_cell_normal" data="{{...personstatusData}}" />
69   - <view class="divide_line"></view> -->
70   -
71   - <!-- <view class='item_body'>
72 14 <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
73 15 <text class='text_black_28 float_left'>证照类型</text>
74   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
75   - <text class='text_333_28 float_right'>居民身份证</text>
76   - </view> -->
77   - <template is="picker_cell_normal" data="{{...cardtypeData}}" />
  16 + <text class='text_777_30 float_right'>居民身份证</text>
  17 + </view>
78 18 <view class="divide_line"></view>
79 19
80 20 <view class='item_body'>
... ... @@ -83,272 +23,49 @@
83 23 <view wx:if="{{isIdCard}}" >
84 24 <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo'></image>
85 25 <!-- <text class='text_333_28 float_right'>{{card_number}}</text> -->
86   - <input class='input_wrap float_right' placeholder='请输入证件号码' placeholder-class='text_999_30' name='id_card_no' maxlength='24' value='{{card_number}}'></input>
  26 + <input class='input_wrap float_right' placeholder='请输入证件号码' placeholder-class='text_777_30' name='id_card_no' maxlength='18' value='{{card_number}}' bindblur="idDone" bindinput="idChange"></input>
87 27 </view>
88 28 <view wx:else>
89   - <input class='input_wrap float_right' placeholder='请输入证件号码' placeholder-class='text_999_30' name='id_card_no' maxlength='24' value='{{card_number}}'></input>
  29 + <input class='input_wrap float_right' placeholder='请输入证件号码' placeholder-class='text_777_30' name='id_card_no' maxlength='18' type="idcard" value='{{card_number}}' bindblur="idDone" bindinput="idChange"></input>
90 30 </view>
91 31 </view>
92 32 <view class="divide_line"></view>
93 33
94   - <!-- <view class='item_body'>
95   - <text class='head_red_star float_left'>*</text>
96   - <text class='text_black_28 float_left'>是否境外人员</text>
97   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
98   - <text class='text_333_28 float_right'>否</text>
99   - </view> -->
100   - <template is="picker_cell_normal" data="{{...forignerInfo}}" />
101   - <!-- 非必填部分 -->
102   - <view hidden='{{!isshow01}}'>
103   - <view class="divide_line"></view>
104   -
105   - <!-- <view class='item_body'>
106   - <text class='text_666_28 float_left'>性别</text>
107   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
108   - <text class='text_333_28 float_right'>男</text>
109   - </view> -->
110   - <template is="picker_cell_normal" data="{{...genderData}}" />
111   - <view class="divide_line"></view>
112   - <!-- <view class='item_body'>
113   - <text class='text_666_28 float_left'>出生年月</text>
114   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
115   - <text class='text_333_28 float_right'></text>
116   - </view> -->
117   - <template is="picker_cell_normal" data="{{...birthDate}}" />
118   - <view class="divide_line"></view>
119   - <!-- <view class='item_body'>
120   - <text class='text_666_28 float_left'>职业</text>
121   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
122   - <text class='text_333_28 float_right'></text>
123   - </view> -->
124   - <template is="picker_cell_normal" data="{{...professionData}}" />
125   - <view class="divide_line"></view>
126   - <!-- <view class='item_body'>
127   - <text class='text_666_28 float_left'>学历</text>
128   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
129   - <text class='text_333_28 float_right'></text>
130   - </view> -->
131   - <template is="picker_cell_normal" data="{{...degreeData}}" />
132   - <view class="divide_line"></view>
133   - <view class='item_body'>
134   - <text class='text_666_30 float_left'style='line-height: 90rpx'>纳税人识别号</text>
135   - <input class='input_wrap float_right' name='taxpayer_no' type='number' placeholder-class='text_999_30' placeholder='请输入纳税人识别号' maxlength='24'></input>
136   - </view>
137   - <view class="divide_line"></view>
138   - <!-- <view class='item_body'>
139   - <text class='text_666_28 float_left'>是否残疾</text>
140   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
141   - <text class='text_333_28 float_right'></text>
142   - </view> -->
143   - <template is="picker_cell_normal" data="{{...disabilityInfo}}" />
144   - <view class="divide_line" hidden="{{disabilityInfo.selected!='是'}}"></view>
145   - <view class='item_body' hidden="{{disabilityInfo.selected!='是'}}">
146   - <text class='text_666_30 float_left'>残疾证号</text>
147   - <input class='input_wrap float_right' name='disability_no' type='number' placeholder-class='text_999_30' placeholder='请输入残疾证号' maxlength='24'></input>
148   - </view>
149   - <view class="divide_line"></view>
150   - <!-- <view class='item_body'>
151   - <text class='text_666_28 float_left'>是否烈属</text>
152   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
153   - <text class='text_333_28 float_right'></text>
154   - </view> -->
155   - <template is="picker_cell_normal" data="{{...lieshuInfo}}" />
156   - <view class="divide_line" hidden="{{lieshuInfo.selected!='是'}}"></view>
157   - <view class='item_body' hidden="{{lieshuInfo.selected!='是'}}">
158   - <text class='text_666_30 float_left'>烈属证号</text>
159   - <input class='input_wrap float_right' name='martyr_family_no' type='number' placeholder-class='text_999_30' placeholder='请输入烈属证号' maxlength='24'></input>
160   - </view>
161   - <view class="divide_line"></view>
162   - <!-- <view class='item_body'>
163   - <text class='text_666_28 float_left'>是否孤老</text>
164   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
165   - <text class='text_333_28 float_right'></text>
166   - </view> -->
167   - <template is="picker_cell_normal" data="{{...lonelyolderInfo}}" />
168   - <view class="divide_line"></view>
169   - <view class='item_body'>
170   - <text class='text_666_30 float_left' style='line-height: 90rpx'>备注</text>
171   - <input class='input_wrap float_right' value='{{taxInfo.comment}}' name='comment' placeholder-class='text_999_30' placeholder='请输入备注' ></input>
172   - </view>
  34 + <view class='item_body'>
  35 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
  36 + <text class='text_black_30 float_left' style='line-height: 90rpx'>姓名</text>
  37 + <input class='input_wrap float_right' placeholder='请填写姓名' name='name' value='{{name}}' placeholder-class='text_777_30' maxlength='15'></input>
173 38 </view>
174   - </view>
175   - </view>
176 39
177   - <!-- 联系方式 -->
178   - <view class='head_wrap' style='margin-top:20rpx' bindtap='span' id='2'>
179   - <text class='head_text_wrap1'>联系方式</text>
180   - <text class='head_text_wrap2' hidden='{{!isshow02}}'>(点击收起非必填选项)</text>
181   - <text class='head_text_wrap2' hidden='{{isshow02}}'>(点击展开非必填选项)</text>
182   - <view style='float:right' wx:if='{{isshow02}}'>
183   - <image class='head_image_wrap_up' src='/images/arrow_up.png'></image>
184   - </view>
185   - <view wx:else style='float:right'>
186   - <image class='head_image_wrap_down' src='/images/arrow_down.png'></image>
187   - </view>
188   - </view>
189 40
190   - <view class='data_list'>
191   - <view class='data_item'>
192   - <!-- <view class='item_body'>
  41 + <view class='item_body' hidden="{{!isself}}">
193 42 <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
194   - <text class='text_black_28 float_left'>联系电话</text>
195   - <input class='input_wrap float_right' placeholder='请输入手机号' value='{{taxInfo.mobile}}' name='mobile' type='number' placeholder-class='text_999_28' maxlength='11'></input>
196   - </view> -->
197   - <!-- 非必填部分02 -->
198   - <view hidden='{{!isshow02}}'>
199   - <view class='item_body'>
200   - <text class='text_666_30 float_left' style='line-height: 90rpx'>联系电话</text>
201   - <input class='input_wrap float_right' placeholder='请输入手机号' value='{{taxInfo.mobile}}' name='mobile' type='number' placeholder-class='text_999_28' maxlength='11'></input>
  43 + <text class='text_black_30 float_left' style='line-height: 90rpx'>姓名</text>
  44 + <input class='input_wrap float_right' placeholder='请填写姓名' value='' placeholder-class='text_777_30' maxlength='15'></input>
202 45 </view>
203   - <!-- <view class="divide_line"></view> -->
204   - <!-- <view class='item_body'>
205   - <text class='text_666_28 float_left'>联系地址</text>
206   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
207   - <text class='text_333_28 float_right'></text>
208   - </view> -->
209   - <template is="picker_cell_normal" data="{{...contactaddressInfo}}" />
210   - <view class="divide_line"></view>
211   - <view class='item_body'>
212   - <text class='text_666_30 float_left' style='line-height: 90rpx'>详细地址</text>
213   - <input class='input_wrap float_right' name='contact_address_detail' placeholder-class='text_999_30' placeholder='请输入详细联系地址'></input>
214   - </view>
215   - <view class="divide_line"></view>
216   - <!-- <view class='item_body'>
217   - <text class='text_666_28 float_left'>开户银行</text>
218   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
219   - <text class='text_333_28 float_right'></text>
220   - </view> -->
221   - <template is="picker_cell_normal" data="{{...bankInfo}}" />
222   - <view class="divide_line"></view>
223   - <view class='item_body'>
224   - <text class='text_666_30 float_left' style='line-height: 90rpx'>银行账号</text>
225   - <input class='input_wrap float_right' name='bank_account' placeholder-class='text_999_30' placeholder='请输入银行账号' maxlength='24'></input>
226   - </view>
227   - <view class="divide_line"></view>
228   - <view class='item_body'>
229   - <text class='text_666_30 float_left' style='line-height: 90rpx'>电子邮箱</text>
230   - <input class='input_wrap float_right' name='email' placeholder-class='text_999_30' placeholder='请输入电子邮箱' maxlength='20'></input>
231   - </view>
232   - <view class="divide_line"></view>
233   - <!-- <view class='item_body'>
234   - <text class='text_666_28 float_left'>居住地</text>
235   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
236   - <text class='text_333_28 float_right'></text>
237   - </view> -->
238   - <template is="picker_cell_normal" data="{{...currentaddressInfo}}" />
239   - <view class="divide_line"></view>
240   - <view class='item_body'>
241   - <text class='text_666_30 float_left' style='line-height: 90rpx'>详细地址</text>
242   - <input class='input_wrap float_right' name='current_address_detail' placeholder-class='text_999_30' placeholder='请输入详细居住地址'></input>
243   - </view>
244   - <view class="divide_line"></view>
245   - <!-- <view class='item_body'>
246   - <text class='text_666_28 float_left'>户籍所在地</text>
247   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
248   - <text class='text_333_28 float_right'></text>
249   - </view> -->
250   - <template is="picker_cell_normal" data="{{...birthaddressInfo}}" />
  46 + <view class="divide_line"></view>
  47 +
  48 + <template is="picker_cell_normal" data="{{...genderData}}" />
251 49 <view class="divide_line"></view>
252 50 <view class='item_body'>
253   - <text class='text_666_30 float_left' style='line-height: 90rpx'>详细地址</text>
254   - <input class='input_wrap float_right' name='huji_address_detail' placeholder-class='text_999_30' placeholder='请输入详细户籍地址'></input>
  51 + <text class='text_black_30 float_left'style='line-height: 90rpx'>年龄</text>
  52 + <input class='input_wrap float_right' name='age' type='number' placeholder-class='text_777_30' placeholder='请输入年龄' maxlength='2' value='{{age}}'></input>
255 53 </view>
256 54 <view class="divide_line"></view>
257   - </view>
258 55
259   - </view>
260   - </view>
261 56
262   - <!-- 任职雇佣信息 -->
263   - <!-- <view class='head_wrap' style='margin-top:20rpx' bindtap='span' id='3'>
264   - <text class='head_text_wrap1'>任职受雇信息</text>
265   - <text class='head_text_wrap2' hidden='{{!isshow03}}'>(点击收起非必填选项)</text>
266   - <text class='head_text_wrap2' hidden='{{isshow03}}'>(点击展开非必填选项)</text>
267   - <view style='float:right' wx:if='{{isshow03}}'>
268   - <image class='head_image_wrap_up' src='/images/arrow_up.png'></image>
269   - </view>
270   - <view wx:else style='float:right'>
271   - <image class='head_image_wrap_down' src='/images/arrow_down.png'></image>
272   - </view>
273   - </view> -->
  57 + <view class='item_body'>
  58 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
  59 + <text class='text_black_30 float_left' style='line-height: 90rpx'>国籍</text>
  60 + <text class='text_777_30 float_right' >中国</text>
  61 + </view>
274 62
275   - <view class='data_list' hidden='true'>
276   - <view class='data_item'>
277   - <!-- <view class='item_body'>
278   - <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
279   - <text class='text_black_28 float_left'>是否股东、投资者</text>
280   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
281   - <text class='text_333_28 float_right'>是</text>
282   - </view> -->
283   - <template is="picker_cell_normal" data="{{...investInfo}}" />
284   - <view class="divide_line"></view>
285   - <!-- <view class='item_body'>
286   - <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
287   - <text class='text_black_28 float_left'>是否特定行业</text>
288   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
289   - <text class='text_333_28 float_right'></text>
290   - </view> -->
291   - <template is="picker_cell_normal" data="{{...specificIndustryInfo}}" />
292 63 <view class="divide_line"></view>
293   - <!-- <view class='item_body'>
294   - <text class='text_666_28 float_left'>是否雇员</text>
295   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
296   - <text class='text_333_28 float_right'></text>
297   - </view> -->
298   - <template is="picker_cell_normal" data="{{...employeeInfo}}" />
299   - <view hidden='{{!isshow03}}'>
300   - <view class="divide_line"></view>
301   - <view class='item_body'>
302   - <text class='text_666_30 float_left'style='line-height: 90rpx'>公司股本总额</text>
303   - <input class='input_wrap float_right' name='company_equity_total' type='digit' placeholder-class='text_999_30' placeholder='请输入股本总额(保留两位小数)' maxlength='13'></input>
304   - </view>
305   - <view class="divide_line"></view>
306   - <!-- <view class='item_body'>
307   - <text class='text_666_28 float_left'>在职受雇日期</text>
308   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
309   - <text class='text_333_28 float_right'></text>
310   - </view> -->
311   - <template is="picker_cell_normal" data="{{...startDate}}" />
312   -
313   - <view class="divide_line"></view>
314   - <!-- <view class='item_body'>
315   - <text class='text_666_28 float_left'>离职日期</text>
316   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
317   - <text class='text_333_28 float_right'></text>
318   - </view> -->
319   - <template is="picker_cell_normal" data="{{...endDate}}" />
320   - <view class="divide_line"></view>
321   - <view class='item_body'>
322   - <text class='text_666_30 float_left' style='line-height: 90rpx'>工号</text>
323   - <input class='input_wrap float_right' name='employee_no' placeholder-class='text_999_30' placeholder='请输入工号' maxlength='24'></input>
324   - </view>
325   - <view class="divide_line"></view>
326   - <!-- <view class='item_body'>
327   - <text class='text_666_28 float_left'>是否天使投资个人</text>
328   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
329   - <text class='text_333_28 float_right'></text>
330   - </view> -->
331   - <template is="picker_cell_normal" data="{{...investpersonalInfo}}" />
332   - <view class="divide_line" ></view>
333   - <view class='item_body' >
334   - <text class='text_666_30 float_left' style='line-height: 90rpx'>个人投资总额</text>
335   - <input class='input_wrap float_right' name='personal_equity_total' type='digit' placeholder-class='text_999_30' placeholder='请输入个人投资总额(保留两位小数)' maxlength='13'></input>
336   - </view>
337   - <view class="divide_line"></view>
338   - </view>
  64 + <template is="picker_cell_normal" data="{{...forignerInfo}}" />
339 65
340   -<!--
341   - <view style='width:100%'>
342   - <text class='text_666_28 float_left'>备注</text>
343   - <input class='extra_input float_right' value='' name='comment'></input>
344   - </view> -->
345 66 </view>
346   -
347 67 </view>
348 68
349   - <view hidden='{{isshow02}}' style='background:#f8f8f8;height:500rpx'></view>
350   - <view hidden='{{!isshow02}}' style='background:#f8f8f8;height:200rpx'></view>
351   -
352 69 <view class="btn_bottom">
353 70 <button class="btn_bottom" formType="submit"> 保存</button>
354 71 </view>
... ...
1 1 /* pages/main/addinfo/addinfo.wxss */
2 2
3 3 /* pages/main//editinfo/editinfo.wxss */
4   -
5   -.page {
  4 +page{
6 5 background: #f8f8f8;
7 6 }
  7 +.page{
  8 + background: #FFF;
  9 +}
8 10
9 11 .head_wrap {
10 12 height: 90rpx;
... ... @@ -105,3 +107,11 @@
105 107 width: 100%;
106 108 height: 2rpx;
107 109 }
  110 +
  111 +
  112 +.text_999_30 {
  113 + font-size: 30rpx;
  114 + color: #999;
  115 + text-align: right;
  116 + line-height: 80rpx;
  117 +}
\ No newline at end of file
... ...
1   -<view class='page'>
  1 +<view class='page' style='padding-bottom:160rpx;'>
2 2
3 3 <view wx:if="{{taxlist.length>0}}" hidden='{{!load_finish}}'>
4 4 <block wx:for="{{taxlist}}" wx:key="" indx='index'>
... ... @@ -44,10 +44,14 @@
44 44 </block>
45 45 </view>
46 46
47   - <view class='rectangle_dashed_bg' bindtap="goadd">
  47 + <!-- <view class='rectangle_dashed_bg' bindtap="goadd">
48 48 <view class='text_blue_28' style='text-align:center'>
49 49 十 添加家庭成员
50 50 </view>
  51 + </view> -->
  52 + <view class='bottom_btn_wrap' >
  53 + <view class='btn_blue_radius' bindtap="goadd">
  54 + <view class='text_white_34'>添加家庭成员</view>
  55 + </view>
51 56 </view>
52   -
53 57 </view>
\ No newline at end of file
... ...
... ... @@ -29,7 +29,20 @@
29 29 border: 3rpx dashed #d7e4fb;
30 30 border-radius: 8rpx;
31 31 }
32   -
  32 +.bottom_btn_wrap{
  33 + background: #FFFFFF;
  34 + box-shadow: 0 -2px 8px 0 rgba(208,208,208,0.30);
  35 + height: 136rpx;
  36 + width: 100%;
  37 + position: fixed;
  38 + bottom: 0;
  39 +}
  40 +.btn_blue_radius{
  41 + margin: 26rpx 30rpx;
  42 + background: #357AEB;
  43 + border-radius: 5px;
  44 + height: 84rpx;
  45 +}
33 46 .text_gray_bg {
34 47 height: 32rpx;
35 48 margin: 0rpx 20rpx;
... ... @@ -74,7 +87,13 @@
74 87 color: #fff;
75 88 line-height: 20px;
76 89 }
77   -
  90 +.text_white_34 {
  91 + font-family: PingFangSC-Regular;
  92 + font-size: 17px;
  93 + color: #FFFFFF;
  94 + text-align: center;
  95 + line-height: 42px;
  96 +}
78 97 .text_white_22 {
79 98 font-family: PingFangSC-Regular;
80 99 font-size: 22rpx;
... ...
... ... @@ -17,6 +17,13 @@ function formatTime_date(date) {
17 17 return [year, month, day].map(formatNumber).join('-')
18 18 }
19 19
  20 +function formatDate_min(date) {
  21 + var year = yearFormString(date)
  22 + var month = monthFormString(date)
  23 + var day = dayFormString(date)
  24 + return [year, month, day].map(formatNumber).join('/')
  25 +}
  26 +
20 27 function formatNumber(n) {
21 28 n = n.toString()
22 29 return n[1] ? n : '0' + n
... ... @@ -97,6 +104,7 @@ function isIDCardNum(idCardNo) {
97 104 module.exports = {
98 105 formatTime: formatTime,
99 106 formatTime_date: formatTime_date,
  107 + formatDate_min: formatDate_min,
100 108 formatDateString: formatDateString,
101 109 yearFormString: yearFormString,
102 110 monthFormString: monthFormString,
... ...
注册登录 后发表评论