提交 8730ed9d01abfe2fb9da7da66802874ec6a73961

作者 pangy
2 个父辈 1f7a59cd 7eb2b68a

Merge branch 'dev_py' into dev2.0

# Conflicts:
#	app.json
#	pages/main/taxperson/home.js
... ... @@ -62,14 +62,6 @@ App({
62 62 url: '../../getPhone/getPhone'
63 63 })
64 64 } else if (user && user.type == "1") {//注册用户
65   - if (relaunch) {
66   - // wx.reLaunch({ //重新加载
67   - // url: '../home/home'
68   - // })
69   - wx.reLaunch({
70   - url: '../guide/guide'
71   - })
72   - }
73 65 that.configOssUrl()
74 66 }
75 67 },
... ...
... ... @@ -13,12 +13,13 @@
13 13 "pages/main/addtionalreduce/lookandupdate/lookandupdate",
14 14 "pages/main/addtionalreduce/addextrainfo/addextrainfo",
15 15 "pages/main/addtionalreduce/additiondetail/additiondetail",
16   - "pages/main/advancepayment/home",
  16 + "pages/main/advancepayment/adPayHome",
17 17 "pages/main/finalpayment/home",
18 18 "pages/main/finalpayment/inputinfo/inputinfo",
19 19 "pages/main/finalpayment/historylist/historylist",
20 20 "pages/main/finalpayment/historydetail/historydetail",
21   - "pages/login/login"
  21 + "pages/login/login",
  22 + "pages/main/advancepayment/adPayDetails/adPayDetails"
22 23 ],
23 24 "window": {
24 25 "backgroundTextStyle": "light",
... ...
... ... @@ -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;
... ...
... ... @@ -7,7 +7,7 @@
7 7 <view wx:else>
8 8 <text class='text_666_30 float_left' style='line-height: 90rpx;'>{{label}}</text>
9 9 </view>
10   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
  10 + <image wx:if='{{!disabled}}' class='arrow_wrap' src='/images/arrow_right.png'></image>
11 11
12 12 <view class="weui-cell__bd">
13 13 <picker mode="{{mode?mode:'selector'}}" range-key="{{range_key}}" range="{{values}}" fields="{{fields}}" start="{{start}}" end="{{end}}" bindchange="{{onChange}}" bindcolumnchange="{{onColumnChange}}" disabled="{{disabled}}" id='{{bindtype}}'>
... ...
... ... @@ -64,7 +64,8 @@ Page({
64 64 app.globalData.tenant_id = tenant.id;
65 65 app.globalData.userInfo = user;
66 66 app.globalData.wx_open_id = user.wx_open_id;
67   -
  67 +
  68 + app.configOssUrl()
68 69 wx.reLaunch({
69 70 url: '../main/guide/guide'
70 71 })
... ...
  1 +// pages/main/advancepayment/adPayDetails/adPayDetails.js
  2 +var format = require('../../../../utils/util.js');
  3 +var app = getApp();
  4 +var baseUrl = app.globalData.baseUrl;
  5 +
  6 +Page({
  7 +
  8 + data: {
  9 + // tab切换
  10 + isshow: false,
  11 + currentTab: 0,
  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 + },
  42 + choosed_date: '',
  43 + long_date: 0
  44 + },
  45 + onLoad: function (options) {
  46 + if (options.date){
  47 + var mydate = new Date();
  48 + this.setData({
  49 + choosed_date: options.date,
  50 + })
  51 + }
  52 + if (!options.id) return
  53 +
  54 + const self = this
  55 + var Authorization = getApp().globalData.Authorization;
  56 + wx.showLoading()
  57 + wx.request({
  58 + url: baseUrl + "payroll/v1/tax/person-records/" + options.id,
  59 + header: {
  60 + 'Authorization': Authorization
  61 + },
  62 + success: function (result) {
  63 + console.log('成功', result)
  64 + if (result.personal_income){
  65 + self.setData({
  66 + taxDatas: result
  67 + })
  68 + }
  69 +
  70 + },
  71 + fail: function (res) {
  72 + console.log('失败', res)
  73 + },
  74 + complete: function () {
  75 + wx.hideLoading()
  76 + }
  77 +
  78 + })
  79 + },
  80 +
  81 +
  82 +
  83 +
  84 +})
\ No newline at end of file
... ...
  1 +{
  2 + "navigationBarTitleText": "预扣预缴详情"
  3 +}
\ No newline at end of file
... ...
1   -<!--pages/main/advancepayment/home.wxml-->
  1 +<!--pages/main/advancepayment/adPayDetails/adPayDetails.wxml-->
2 2 <view>
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>
  3 + <scroll-view style='margin-bottom:40rpx'>
  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   - <text class='text_666_30 float_left'>累计工资收入</text>
17   - <text class='text_333_30_bold float_right'>400000.00</text>
  15 + <text class='text_666_30 float_left'>当期收入额</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>
  22 + </view>
  23 + <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
  24 + <view style='padding:30rpx 0'>
  25 + <text class='text_666_30 float_left'>专项扣除合计</text>
  26 + <text class='text_number float_right'>{{taxDatas.special_deduction}}</text>
18 27 </view>
19 28 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
20 29 <view style='padding:30rpx 0'>
21   - <text class='text_666_30 float_left'>累计免税收入</text>
22   - <text class='text_333_30_bold 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>
23 32 </view>
24 33 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
25 34 <view style='padding:30rpx 0'>
26   - <text class='text_666_30 float_left'>累计基本减除费用</text>
27   - <text class='text_333_30_bold 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>
28 37 </view>
29 38 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
30 39 <view style='padding:30rpx 0'>
31   - <text class='text_666_30 float_left'>累计专项扣除额</text>
32   - <text class='text_333_30_bold 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>
33 42 </view>
34 43 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
35 44 <view style='padding:30rpx 0'>
36   - <text class='text_666_30 float_left'>累计专项附加扣除额</text>
37   - <text class='text_333_30_bold 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>
38 47 </view>
39 48 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
40 49 <view style='padding:30rpx 0'>
41   - <text class='text_666_30 float_left'>累计其他扣除额</text>
42   - <text class='text_333_30_bold 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>
43 52 </view>
44 53 <view class='divide_line_f5f5f5' style='margin-top:30rpx'></view>
45 54 <view style='padding:30rpx 0'>
46   - <text class='text_666_30 float_left'>累计预缴应纳税所得额</text>
47   - <text class='text_333_30_bold 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>
48 57 </view>
49 58 </view>
50 59 <view style='margin:30rpx;positive:relative;width:92%;height:312rpx'>
... ... @@ -52,23 +61,25 @@
52 61 <view>
53 62 <view class='view_bg_wrap' style='margin-top: 44rpx;'>
54 63 <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
55   - <text class='text_num_wrap'>3838.9</text>
  64 + <text class='text_num_wrap'>{{taxDatas.accumulated_withholding_tax}}</text>
56 65 <text class='text_text_wrap'>累计应预扣预缴税额</text>
57 66 </view>
58 67 <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
59 68 <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
60   - <text class='text_num_wrap'>10398.01</text>
  69 + <text class='text_num_wrap'>{{taxDatas.prepay_tax}}</text>
61 70 <text class='text_text_wrap'>已预扣预缴税额</text>
62 71 </view>
63   - <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
64   - <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
65   - <text class='text_num_wrap'>133.09</text>
66   - <text class='text_text_wrap'>本期应预扣预缴税额</text>
67   - </view>
  72 +
68 73 </view>
69 74
70 75 <view class='view_bg_wrap' style='margin-top: 180rpx;'>
71 76 <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
  77 + <text class='text_num_wrap'>{{taxDatas.refund_tax}}</text>
  78 + <text class='text_text_wrap'>本期应预扣预缴税额</text>
  79 + </view>
  80 +
  81 + <!-- <view style='width:2rpx;height:74rpx;background:#ffffff;'></view>
  82 + <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
72 83 <text class='text_num_wrap'>30.8%</text>
73 84 <text class='text_text_wrap'>使用税率</text>
74 85 </view>
... ... @@ -76,12 +87,12 @@
76 87 <view style='flex-grow: 1;text-align:center;display: flex;flex-direction: column;'>
77 88 <text class='text_num_wrap'>19106.91</text>
78 89 <text class='text_text_wrap'>速算扣除数</text>
79   - </view>
  90 + </view> -->
80 91 </view>
81 92 </view>
82 93 </view>
83 94
84   - <view style='padding-left:30rpx;background:#ffffff'>
  95 + <!-- <view style='padding-left:30rpx;background:#ffffff'>
85 96 <image class='icon_wrap' src="/images/rectangle_icon.png"></image>
86 97 <text style='padding-left:20rpx' class='text_gray_32'>工资明细</text>
87 98 </view>
... ... @@ -102,63 +113,6 @@
102 113 <text class='text_wrap_left'>实发工资</text>
103 114 <text class='text_wrap_right'>13860.00</text>
104 115 </view>
105   - </view>
106   - </scroll-view> -->
107   -
108   - <picker mode="date" fields="month" start="1970-01" end="2100-01" bindchange="datePickerChange">
109   - <view style='padding: 0 30rpx;background:#2F72E0'>
110   - <text class='text_white_28'>{{choosed_date}}</text>
111   - <view class='float_right'>
112   - <image class='arrow_wrap' src='/images/arrow_down.png'></image>
113   - </view>
114   - </view>
115   - </picker>
116   - <view class="swiper-tab" style='display:flex'>
117   - <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" style="margin:0 90rpx" data-current="0" bindtap="swichNav">预扣预缴</view>
118   - <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" style="margin:0 90rpx" data-current="1" bindtap="swichNav">工资明细</view>
119   - </view>
120   - <view style='height:10rpx;background:#f8f8f8'></view>
121   - <view class="swiper-box page" style="height:100%;margin-top:20rpx" bindchange="bindChange">
122   - <view wx:if="{{currentTab==0}}">
123   - <view wx:for="{{datas}}" style='margin-bottom:20rpx'>
124   - <view class='card_rectangle_bg_column' style='padding:30rpx'>
125   - <text style='text-align:left;font-size: 28rpx;color: #333;font-family: PingFangSC-Semibold;'>所得项目:工资薪金</text>
126   - <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view>
127   - <text class='text_666_28'>累计收入额:10800.00</text>
128   - <text class='text_666_28'>累计应缴纳所得额:43800.00</text>
129   - <text class='text_666_28'>累计应扣缴税额:1860.00</text>
130   - <text class='text_666_28'>已预交税额:1130.00</text>
131   - <text class='text_666_28'>本期应缴税额:730.00</text>
132   - </view>
133   - </view>
134   - </view>
135   - <view wx:else>
136   - <view wx:for="{{datas}}" style='margin-bottom:20rpx'>
137   - <view class='card_rectangle_bg_column' style='padding:30rpx'>
138   - <text style='text-align:left;font-size: 28rpx;color: #333;font-family: PingFangSC-Semibold;'>薪酬批次工资:业务部八月工资</text>
139   - <view class='divide_line_f5f5f5' style='margin:20rpx 0'></view>
140   - <text class='text_666_28'>发薪日:2018、10、31</text>
141   - <text class='text_666_28'>计薪时间:2018/10/01-2018/10/31</text>
142   - <text class='text_666_28'>应发额度:23460.00</text>
143   - <text class='text_666_28'>实发:13980.00</text>
144   - <view class='divide_line_f5f5f5' style='margin:20rpx 0'></view>
145   - <view wx:if="{{!isshow}}" bindtap='gospan'>
146   - <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>展开</text>
147   - <image class='head_image_wrap_down' src='/images/arrow_blue_down.png'></image>
148   - </view>
149   - <view wx:if="{{isshow}}" bindtap='gospan'>
150   - <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>收起</text>
151   - <image class='head_image_wrap_up' src='/images/arrow_blue_up.png'></image>
152   - </view>
153   - <view wx:if="{{isshow}}" wx:for="{{datas}}">
154   - <view>
155   - <text style='font-size:28rpx;color:#999;text-align:left'>中文姓名</text>
156   - <text style='font-size:28rpx;color:#999;text-align:right'>嘎嘎</text>
157   - </view>
158   - </view>
159   - </view>
160   - </view>
161   -
162   - </view>
163   - </view>
164   -</view>
\ No newline at end of file
  116 + </view> -->
  117 + </scroll-view>
  118 +</view>
... ...
  1 +/* pages/main/advancepayment/adPayDetails/adPayDetails.wxss */
  2 +@import "../adPayHome.wxss";
  3 +.text_number {
  4 + font-family: PingFangSC-Semibold;
  5 + font-size: 30rpx;
  6 + color: #FF9F00;
  7 +}
\ No newline at end of file
... ...
  1 +// pages/main/advancepayment/home.js
  2 +var format = require('../../../utils/util.js');
  3 +var app = getApp();
  4 +var baseUrl = app.globalData.baseUrl;
  5 +
  6 +Page({
  7 + loadCount:0,
  8 + timestamp: 0,
  9 + Authorization: null,
  10 + data: {
  11 + // tab切换
  12 + isshow : false,
  13 + currentTab: 0,
  14 + taxDatas: [{
  15 + "id": "154024896031100928",
  16 + "created_at": 1511525284,
  17 + "updated_at": 1511525284,
  18 + "tenant_id": "122371433052508160",
  19 + "taxation_method": "salary", // 个税申报类型:"0101"-工资薪金 "0401"-劳务报酬
  20 + "sub_taxation_method": "salary", // 正
  21 + "province": "北京市",
  22 + "province_code": "110000",
  23 + "city": "市辖区",
  24 + "city_code": "110100",
  25 + "district": "东城",
  26 + "district_code": "110101",
  27 + "name": "徐恒堂", //姓名
  28 + "credential_type": "身份证",
  29 + "credential_number": "110221198301270632", //证件号码
  30 + "personal_tax": 475.6, //本期应缴税额
  31 + "prepay_tax": 475.6, //已预交税额
  32 + "accumulated_taxable_income": 475.6, //累计应纳税所得额
  33 + "accumulated_withholding_tax": 475.6, //累计应扣缴税额
  34 + "prepay_tax": 475.6, //已预交税额
  35 + "option_date": 152135596800
  36 + }],
  37 + salaryDatas: {},
  38 + choosed_date: ''
  39 + },
  40 + onLoad: function(options) {
  41 + var mydate = new Date();
  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) {
  49 + var that = this
  50 + this.Authorization = getApp().globalData.Authorization;
  51 + wx.showLoading()
  52 + that.loadCount = 2
  53 + wx.request({
  54 + url: baseUrl + "payroll/v1/tax/person-records",
  55 + header: {
  56 + 'Authorization': this.Authorization
  57 + },
  58 + success: function (result) {
  59 + that.setData({
  60 + taxDatas: result.items
  61 + })
  62 +
  63 + },
  64 + fail: function (res) {
  65 + console.log('OSS init 失败', res)
  66 + },
  67 + complete: function () {
  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 + }
  94 + }
  95 + })
  96 +
  97 + },
  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 + },
  108 + // handleData: function (items) {
  109 + // for (var i = 0; i < items.length; ++i) {
  110 + // if (items.taxation_method)
  111 + // }
  112 + // },
  113 +
  114 + datePickerChange: function(e) {
  115 + console.log("e",e)
  116 + var timestamp = Date.parse(new Date(e.detail.value))/1000
  117 + this.setData({
  118 + choosed_date: format.yearFormString(timestamp) + "年" + format.monthFormString(timestamp)+"月"
  119 + })
  120 + this.dateStamp = timestamp
  121 + this.loadData(timestamp);
  122 + },
  123 +
  124 + /**
  125 + * 点击tab切换
  126 + */
  127 + swichNav: function (e) {
  128 + var that = this;
  129 +
  130 + if (this.data.currentTab === e.target.dataset.current) {
  131 + return false;
  132 + } else {
  133 + that.setData({
  134 + currentTab: e.target.dataset.current
  135 + })
  136 + }
  137 + },
  138 +
  139 + /**
  140 + * 滑动切换tab
  141 + */
  142 + bindChange: function (e) {
  143 +
  144 + var that = this;
  145 + that.setData({ currentTab: e.detail.current });
  146 + },
  147 +
  148 + gospan:function(e){
  149 + console.log(e)
  150 + this.setData({
  151 + isshow: !this.data.isshow
  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 + // })
  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['title'],
  187 + value: value
  188 + })
  189 + }
  190 + console.log('details', details)
  191 + return details
  192 + },
  193 +
  194 + goItemDetails: function (e) {
  195 + wx.navigateTo({
  196 + url: "adPayDetails/adPayDetails?id=" + e.currentTarget.id + "&date=" + this.data.choosed_date
  197 + })
  198 + },
  199 +})
\ No newline at end of file
... ...
  1 +<!--pages/main/advancepayment/home.wxml-->
  2 +<view>
  3 + <picker mode="date" fields="month" start="1970-01" end="2100-01" bindchange="datePickerChange">
  4 + <view style='padding: 0 30rpx;background:#2F72E0'>
  5 + <text class='text_white_28'>{{choosed_date}}</text>
  6 + <view class='float_right'>
  7 + <image class='arrow_wrap' src='/images/arrow_down.png'></image>
  8 + </view>
  9 + </view>
  10 + </picker>
  11 + <view class="swiper-tab" style='display:flex'>
  12 + <view class="swiper-tab-list {{currentTab==0 ? 'on' : ''}}" style="margin:0 90rpx" data-current="0" bindtap="swichNav">预扣预缴</view>
  13 + <view class="swiper-tab-list {{currentTab==1 ? 'on' : ''}}" style="margin:0 90rpx" data-current="1" bindtap="swichNav">工资明细</view>
  14 + </view>
  15 + <view style='height:10rpx;background:#f8f8f8'></view>
  16 + <view class="swiper-box page" style="height:100%;margin-top:20rpx" bindchange="bindChange">
  17 + <view wx:if="{{currentTab==0}}">
  18 + <view wx:for="{{taxDatas}}" style='margin-bottom:20rpx'>
  19 + <view class='card_rectangle_bg_column' style='padding:30rpx' id='{{item.id}}' bindtap='goItemDetails'>
  20 + <text style='text-align:left;font-size: 28rpx;color: #333;font-family: PingFangSC-Semibold;'>所得项目:{{item.taxation_method=='salary'?'工资薪金':'劳务报酬'}}</text>
  21 + <view class='divide_line_f5f5f5' style='margin:30rpx 0'></view>
  22 + <!-- <text class='text_666_28'>累计收入额:{{item.}}</text> -->
  23 + <!-- <text class='text_666_28'>当期收入额:{{item.}}</text> -->
  24 + <text class='text_666_28'>累计应缴纳所得额:{{item.accumulated_taxable_income}}</text>
  25 + <text class='text_666_28'>累计应扣缴税额:{{item.accumulated_withholding_tax}}</text>
  26 + <text class='text_666_28'>已预交税额:{{item.prepay_tax}}</text>
  27 + <text class='text_666_28'>本期应缴税额:{{item.personal_tax}}</text>
  28 + </view>
  29 + </view>
  30 + </view>
  31 + <view wx:else> <!-- 工资明细 -->
  32 + <view wx:for="{{salaryDatas}}" style='margin-bottom:20rpx'>
  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;'>薪酬批次工资: {{item.program}}</text>
  35 + <view class='divide_line_f5f5f5' style='margin:20rpx 0'></view>
  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 + <view class='divide_line_f5f5f5' style='margin:20rpx 0'></view>
  41 + <view wx:if="{{!isshow}}" bindtap='gospan' id='{{item.id}}'>
  42 + <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>展开</text>
  43 + <image class='head_image_wrap_down' src='/images/arrow_blue_down.png'></image>
  44 + </view>
  45 + <view wx:if="{{isshow}}" bindtap='gospan'>
  46 + <text style='font-size:28rpx;color:#4e8fe7;text-align:left'>收起</text>
  47 + <image class='head_image_wrap_up' src='/images/arrow_blue_up.png'></image>
  48 + </view>
  49 + <view wx:if="{{isshow}}" wx:for="{{item.detals}}" wx:for-item='detal'>
  50 + <view>
  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 + </view>
  54 + </view>
  55 + </view>
  56 + </view>
  57 +
  58 + </view>
  59 + </view>
  60 +</view>
\ No newline at end of file
... ...
... ... @@ -54,7 +54,7 @@
54 54 margin-top:20rpx
55 55 }
56 56
57   -/* .payment_img_bg {
  57 +.payment_img_bg {
58 58 width: 92%;
59 59 height: 312rpx;
60 60 }
... ... @@ -106,4 +106,4 @@
106 106 color: #000;
107 107 text-align: right;
108 108 float: right
109   -} */
  109 +}
... ...
1   -// pages/main/advancepayment/home.js
2   -var format = require('../../../utils/util.js');
3   -var app = getApp();
4   -var baseUrl = app.globalData.baseUrl;
5   -
6   -Page({
7   -
8   - /**
9   - * Page initial data
10   - */
11   - data: {
12   - // tab切换
13   - isshow : false,
14   - currentTab: 0,
15   - datas:["","",""],
16   - choosed_date: '',
17   - long_date: 0
18   - },
19   -
20   - /**
21   - * Lifecycle function--Called when page load
22   - */
23   - onLoad: function(options) {
24   - var mydate = new Date();
25   - this.setData({
26   - choosed_date: mydate.getFullYear() + "年" + (mydate.getMonth()+1)+"月",
27   - long_date: mydate.getTime()/1000
28   - })
29   - },
30   -
31   - /**
32   - * Lifecycle function--Called when page is initially rendered
33   - */
34   - onReady: function() {
35   -
36   - },
37   -
38   - /**
39   - * Lifecycle function--Called when page show
40   - */
41   - onShow: function() {
42   -
43   - },
44   -
45   - datePickerChange: function(e) {
46   - console.log("e",e)
47   - var datelong = Date.parse(new Date(e.detail.value))/1000
48   - console.log('datelong', datelong)
49   - this.setData({
50   - long_date: datelong,
51   - choosed_date: format.yearFormString(datelong) + "年" + format.monthFormString(datelong)+"月"
52   - })
53   - },
54   -
55   - /**
56   - * 点击tab切换
57   - */
58   - swichNav: function (e) {
59   - var that = this;
60   -
61   - if (this.data.currentTab === e.target.dataset.current) {
62   - return false;
63   - } else {
64   - that.setData({
65   - currentTab: e.target.dataset.current
66   - })
67   - }
68   - },
69   -
70   - /**
71   - * 滑动切换tab
72   - */
73   - bindChange: function (e) {
74   -
75   - var that = this;
76   - that.setData({ currentTab: e.detail.current });
77   - },
78   -
79   - gospan:function(e){
80   - console.log(e)
81   - this.setData({
82   - isshow: !this.data.isshow
83   - })
84   - },
85   -
86   - /**
87   - * Lifecycle function--Called when page hide
88   - */
89   - onHide: function() {
90   -
91   - },
92   -
93   - /**
94   - * Lifecycle function--Called when page unload
95   - */
96   - onUnload: function() {
97   -
98   - },
99   -
100   - /**
101   - * Page event handler function--Called when user drop down
102   - */
103   - onPullDownRefresh: function() {
104   -
105   - },
106   -
107   - /**
108   - * Called when page reach bottom
109   - */
110   - onReachBottom: function() {
111   -
112   - },
113   -
114   - /**
115   - * Called when user click on the top right corner to share
116   - */
117   - onShareAppMessage: function() {
118   -
119   - }
120   -})
\ No newline at end of file
... ... @@ -97,7 +97,7 @@ Page({
97 97 */
98 98 goAdvancePayment: function () {
99 99 wx.navigateTo({
100   - url: '../advancepayment/home',
  100 + url: '../advancepayment/adPayHome',
101 101 })
102 102 },
103 103
... ...
... ... @@ -3,11 +3,12 @@ var app = getApp();
3 3 var format = require('../../../../utils/util.js');
4 4 var baseUrl = app.globalData.baseUrl;
5 5 Page({
6   -
  6 + cur_id:null,
7 7 /**
8 8 * 页面的初始数据
9 9 */
10 10 data: {
  11 + isEnable: true,
11 12 isshow01: false,
12 13 isshow02: false,
13 14 isshow03: false,
... ... @@ -24,28 +25,19 @@ Page({
24 25
25 26 relativeData: {
26 27 isrequre: true,
27   - label: '关系',
  28 + label: '与本人关系',
28 29 bindtype: 'relative',
29 30 selected: '',
30 31 disabled: false,
31 32 placeholder: '请选择关系',
32   - values: ["子女", "配偶"],
33   - onChange: 'onPickerSelect'
34   - },
35   - personstatusData: {
36   - isrequre: true,
37   - label: '纳税人状态',
38   - bindtype: 'personstatus',
39   - selected: '',
40   - placeholder: '请选择纳税人状态',
41   - values: ["正常", "非正常"],
  33 + values: ["子","女" ,"配偶", "父母", "祖父母", "外祖父母"],
42 34 onChange: 'onPickerSelect'
43 35 },
44 36 cardtypeData: {
45 37 isrequre: true,
46 38 label: '证照类型',
47 39 bindtype: 'cardtype',
48   - selected: '',
  40 + selected: '居民身份证',
49 41 placeholder: '请选择证照类型',
50 42 values: ["居民身份证", "军官证", '士兵证', '武警警官证', '港澳居民来往内地通行证', '外交官证', '中国护照',
51 43 '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证'
... ... @@ -61,14 +53,8 @@ Page({
61 53 values: ["否", "是"],
62 54 onChange: 'onPickerSelect'
63 55 },
64   - bankInfo: {
65   - label: '开户银行',
66   - bindtype: 'bank',
67   - selected: '',
68   - placeholder: '请选择开户银行',
69   - onChange: 'onPickerSelect'
70   - },
71 56 genderData: {
  57 + isblack:true,
72 58 label: '性别',
73 59 bindtype: 'gender',
74 60 selected: '',
... ... @@ -76,278 +62,73 @@ Page({
76 62 values: ["男", "女"],
77 63 onChange: 'onPickerSelect'
78 64 },
79   - professionData: {
80   - mode: 'multiSelector',
81   - label: '职业',
82   - bindtype: 'profession',
83   - selected: '',
84   - range_key: 'label',
85   - placeholder: '请选择职业',
86   - onChange: 'onPickerSelect'
87   - },
88   - degreeData: {
89   - label: '学历',
90   - bindtype: 'degree',
91   - selected: '',
92   - placeholder: '请选择学历',
93   - values: ["研究生", "大学本科", '大学本科以下'],
94   - onChange: 'onPickerSelect'
95   - },
96   - disabilityInfo: {
97   - label: '是否残疾',
98   - bindtype: 'disable',
99   - selected: '',
100   - placeholder: '请选择是否残疾',
101   - values: ["否", "是"],
102   - onChange: 'onPickerSelect'
103   - },
104   - lieshuInfo: {
105   - label: '是否烈属',
106   - bindtype: 'lieshu',
107   - selected: '',
108   - placeholder: '请选择是否烈属',
109   - values: ["否", "是"],
110   - onChange: 'onPickerSelect'
111   - },
112   - lonelyolderInfo: {
113   - label: '是否孤老',
114   - bindtype: 'lonelyolder',
115   - selected: '',
116   - placeholder: '请选择是否孤老',
117   - values: ["否", "是"],
118   - onChange: 'onPickerSelect'
119   - },
120   - investInfo: {
121   - isrequre: true,
122   - label: '是否股东、投资者',
123   - bindtype: 'invest',
124   - selected: '',
125   - placeholder: '请选择是否股东、投资者',
126   - values: ["否", "是"],
127   - onChange: 'onPickerSelect'
128   - },
129   - specificIndustryInfo: {
130   - isrequre: true,
131   - label: '是否特定行业',
132   - bindtype: 'specificIndustry',
133   - selected: '',
134   - placeholder: '请选择是否特定行业',
135   - values: ["否", "是"],
136   - onChange: 'onPickerSelect'
137   - },
138   - employeeInfo: {
139   - isrequre: true,
140   - label: '是否雇员',
141   - bindtype: 'employee',
142   - selected: '',
143   - placeholder: '请选择是否雇员',
144   - values: ["否", "是"],
145   - onChange: 'onPickerSelect'
146   - },
147   - investpersonalInfo: {
148   - label: '是否天使投资个人',
149   - bindtype: 'investpersonal',
150   - selected: '',
151   - placeholder: '请选择是否天使投资个人',
152   - values: ["否", "是"],
153   - onChange: 'onPickerSelect'
154   - },
155   - // 时间picker
156   - birthDate: {
157   - label: '出生年月',
158   - bindtype: 'birthday',
159   - selected: '',
160   - placeholder: '请选择出生日期',
161   - mode: "date",
162   - fields: "day",
163   - start: '1949-01-01',
164   - onChange: 'birthdayChange',
165   - },
166   - startDate: {
167   - label: '任职受雇日期',
168   - bindtype: 'startday',
169   - selected: '',
170   - placeholder: '请选择受雇日期',
171   - mode: "date",
172   - fields: "day",
173   - start: '1990-01-01',
174   - onChange: 'startChange',
175   - },
176   - endDate: {
177   - label: '离职日期',
178   - bindtype: 'endday',
179   - selected: '',
180   - placeholder: '请选择离职日期',
181   - mode: "date",
182   - fields: "day",
183   - start: '2010-01-01',
184   - onChange: 'endChange',
185   - },
186   - // 地址选择器
187   - contactaddressInfo: {
188   - label: '联系地址',
189   - mode: 'region',
190   - address_code: ['', '', ''],
191   - address_value: ['', '', ''],
192   - selected: '',
193   - placeholder: '请选择联系地址',
194   - onChange: 'contactAddressSelect'
195   - },
196   - currentaddressInfo: {
197   - label: '居住地',
198   - mode: 'region',
199   - address_code: ['', '', ''],
200   - address_value: ['', '', ''],
201   - selected: '',
202   - placeholder: '请选择居住地',
203   - onChange: 'currentAddressSelect'
204   - },
205   - birthaddressInfo: {
206   - label: '户籍所在地',
207   - mode: 'region',
208   - address_code: ['', '', ''],
209   - address_value: ['', '', ''],
210   - selected: '',
211   - placeholder: '请选择户籍所在地',
212   - onChange: 'birthAddressSelect'
213   - },
214   - title: '',
215   - condition: false
  65 +
216 66 },
217 67
218 68 /**
219 69 * 生命周期函数--监听页面加载
220 70 */
221 71 onLoad: function(options) {
222   - this.handleData()
223   - this.getproffessiondata()
224   - this.getbanklist()
225   - },
226   -
227   - handleData: function() {
228   - var curdate = format.curDateTime()
229   - console.log('curdate', curdate)
230   - this.data.birthDate.end = curdate
231   - this.data.startDate.end = curdate
232   - this.data.endDate.end = curdate
  72 + console.log('options.id', options.id)
  73 + if (options.id && options.id.length > 0) {
  74 + this.cur_id = options.id
  75 + this.getpersonalTax(options.id)
  76 + }
233 77 },
234 78
235   - getproffessiondata: function() {
  79 + //****************获取自然人数据************/
  80 + getpersonalTax: function (id) {
236 81 var that = this
  82 + wx.showLoading({
  83 + title: '',
  84 + })
237 85 var Authorization = app.globalData.Authorization;
238   - var proffession_info = that.data.professionData
239 86 wx.request({
240   - url: baseUrl + 'common/v1/professions',
  87 + url: baseUrl + 'persontax/v1/personal-taxes/' + id,
241 88 method: "GET",
242 89 header: {
243 90 'content-type': 'application/json', // 默认值
244 91 "Authorization": Authorization
245 92 },
246   - success: function(res) {
247   - proffession_info.values = that.handleProfession(res.data.items)
248   - console.log('proffession_info------', proffession_info)
  93 + success: function (res) {
  94 + console.log('taxInfo', res)
249 95 that.setData({
250   - proffessionlist: res.data.items,
251   - professionData: proffession_info
  96 + taxInfo: res.data,
  97 + isself: res.data.family_ties ? false : true
252 98 })
  99 + that.handleDatas(res.data)
253 100 },
254 101 fail(res) {
255 102 console.log(res)
  103 + wx.hideLoading()
  104 + },
  105 + complete() {
  106 + wx.hideLoading()
256 107 }
257 108 })
258 109 },
  110 + //对各参数初始赋值
  111 + handleDatas: function (tax_info) {
259 112
260   - handleProfession: function(items) {
261   - var new_profession_data = []
262   - var list = [],
263   - tempTwo = {},
264   - tempOne = {},
265   - tempThree = {};
266   - items.map((d) => {
267   - if (!tempOne[d.one_level_code]) {
268   - tempOne[d.one_level_code] = {
269   - "value": d.one_level_code,
270   - "label": d.one_level_name,
271   - "children": []
272   - };
273   - }
274   - if (!tempTwo[d.two_level_code]) {
275   - var districtArray = [];
276   - districtArray.push({
277   - "value": d.three_level_code,
278   - "label": d.three_level_name,
279   - "children": []
280   - });
281   -
282   - tempTwo[d.two_level_code] = {
283   - "value": d.two_level_code,
284   - "label": d.two_level_name,
285   - "children": districtArray
286   - };
287   -
288   - } else {
289   - if (!tempThree[d.three_level_code]) {
290   - tempTwo[d.two_level_code].children.push({
291   - "value": d.three_level_code,
292   - "label": d.three_level_name,
293   - "children": []
294   - });
295   - tempThree[d.three_level_code] = "y"
296   - }
297   - }
298   - });
299   - items.map((d) => {
300   - if (tempTwo[d.two_level_code]) {
301   - tempOne[d.one_level_code].children.push(tempTwo[d.two_level_code]);
302   - tempTwo[d.two_level_code] = null;
303   - }
304   - });
305   - for (var key in tempOne) {
306   - list.push(tempOne[key]);
307   - }
308   - new_profession_data = [list, list[0].children, list[0].children[0].children]
309   - console.log('new_profession_data', new_profession_data)
310   - return new_profession_data;
311   -
312   - },
  113 + var isDisable = tax_info.certification_status != 'active'//已通过拍摄身份证认证过,不能修改
313 114
314   - getbanklist: function() {
315   - var that = this
316   - var Authorization = app.globalData.Authorization;
317   - var bank_info = that.data.bankInfo
318   - wx.request({
319   - url: baseUrl + 'walletmgm/v1/bankinfos',
320   - method: "GET",
321   - header: {
322   - 'content-type': 'application/json', // 默认值
323   - "Authorization": Authorization
324   - },
325   - success: function(res) {
326   - console.log(res)
327   - if (res.data && res.data.items && res.data.items.length > 0) {
328   - bank_info.values = that.handleBankinfo(res.data.items)
329   -
330   - that.setData({
331   - banklist: res.data.items,
332   - bankInfo: bank_info
333   - })
334   - }
335   - console.log("bankInfo", that.data.bankInfo)
336   - },
337   - fail(res) {
338   - console.log(res)
339   - }
  115 + this.data.relativeData.selected = tax_info.family_ties
  116 + // this.data.cardtypeData.selected = tax_info.id_card_type
  117 + this.data.genderData.selected = tax_info.gender
  118 + this.data.genderData.disabled = isDisable
  119 +
  120 + this.setData({
  121 + isDisable: isDisable,
  122 + relativeData: this.data.relativeData,
  123 + name: tax_info.name,
  124 + // cardtypeData: this.data.cardtypeData,
  125 + genderData: this.data.genderData,
  126 + isIdCard: '居民身份证' == tax_info.id_card_type ? true : false,
  127 + card_number: tax_info.id_card_no
340 128 })
  129 + this.dealIdInfo(tax_info.id_card_no)//处理了性别和年龄
341 130 },
342   -
343   - handleBankinfo: function(data) {
344   - var bank_name = []
345   - for (var i = 0; i < data.length; i++) {
346   - bank_name.push(data[i].bank_name)
347   - }
348   - return bank_name
349   - },
350   -
  131 +
351 132 /**
352 133 * 生命周期函数--监听页面初次渲染完成
353 134 */
... ... @@ -377,8 +158,8 @@ Page({
377 158 } else if (id_info.birthday.month < 10 && id_info.birthday.day < 10) {
378 159 birth_day = id_info.birthday.year + '-0' + id_info.birthday.month + '-0' + id_info.birthday.day;
379 160 }
380   - var cardtype_Data = that.data.cardtypeData
381   - cardtype_Data.selected = '居民身份证'
  161 + // var cardtype_Data = that.data.cardtypeData
  162 + // cardtype_Data.selected = '居民身份证'
382 163 var gender_Data = that.data.genderData
383 164 gender_Data.selected = id_info.gender
384 165
... ... @@ -396,13 +177,13 @@ Page({
396 177 idInfoData: id_info,
397 178 name: id_info.name,
398 179 birthday: birth_day,
399   - cardtypeData: cardtype_Data,
  180 + // cardtypeData: cardtype_Data,
400 181 genderData: gender_Data,
401 182 long_birth_date: Date.parse(new Date(birth_day)) / 1000,
402 183 birthDate: that.data.birthDate,
403 184 card_number: id_info.id_card_number
404 185 })
405   -
  186 + this.dealIdInfo(id_info.id_card_number)
406 187 }
407 188 },
408 189 })
... ... @@ -414,23 +195,6 @@ Page({
414 195 })
415 196 },
416 197
417   - span: function(e) {
418   - console.log(e)
419   - if ("1" == e.target.id) {
420   - this.setData({
421   - isshow01: !this.data.isshow01
422   - })
423   - } else if ("2" == e.target.id) {
424   - this.setData({
425   - isshow02: !this.data.isshow02
426   - })
427   - } else if ("3" == e.target.id) {
428   - this.setData({
429   - isshow03: !this.data.isshow03
430   - })
431   - }
432   -
433   - },
434 198 // =============普通单列picker选中处理==============
435 199 onPickerSelect: function(e) {
436 200 console.log('picker发送选择改变,携带值为', e)
... ... @@ -442,13 +206,6 @@ Page({
442 206 relativeData: relative_data
443 207 })
444 208 break;
445   - case 'personstatus':
446   - var personstatus_data = this.data.personstatusData
447   - personstatus_data.selected = personstatus_data.values[e.detail.value]
448   - this.setData({
449   - personstatusData: personstatus_data
450   - })
451   - break;
452 209 case 'cardtype':
453 210 var is_idcard = this.data.isIdCard
454 211 var cardtype_data = this.data.cardtypeData
... ... @@ -463,20 +220,6 @@ Page({
463 220 cardtypeData: cardtype_data
464 221 })
465 222 break;
466   - case 'forigner':
467   - var forigner_data = this.data.forignerInfo
468   - forigner_data.selected = forigner_data.values[e.detail.value]
469   - this.setData({
470   - forignerInfo: forigner_data
471   - })
472   - break;
473   - case 'bank':
474   - var bank_data = this.data.bankInfo
475   - bank_data.selected = bank_data.values[e.detail.value]
476   - this.setData({
477   - bankInfo: bank_data
478   - })
479   - break;
480 223 case 'gender':
481 224 var gender_data = this.data.genderData
482 225 gender_data.selected = gender_data.values[e.detail.value]
... ... @@ -484,134 +227,11 @@ Page({
484 227 genderData: gender_data
485 228 })
486 229 break;
487   - case 'profession':
488   - var profession_data = this.data.professionData
489   - console.log(profession_data.values[e.detail.value[e.detail.value[0]]][0])
490   - var profession_name = profession_data.values[e.detail.value[e.detail.value[0]]][0].children[e.detail.value[1]].children[e.detail.value[2]].label
491   - profession_data.selected = profession_name
492   - this.setData({
493   - profession_index: e.detail.value,
494   - professionData: profession_data
495   - })
496   - break;
497   - case 'degree':
498   - var degree_data = this.data.degreeData
499   - degree_data.selected = degree_data.values[e.detail.value]
500   - this.setData({
501   - degreeData: degree_data
502   - })
503   - break;
504   - case 'disable':
505   - var disable_data = this.data.disabilityInfo
506   - disable_data.selected = disable_data.values[e.detail.value]
507   - this.setData({
508   - disabilityInfo: disable_data
509   - })
510   - break;
511   - case 'lieshu':
512   - var lieshu_data = this.data.lieshuInfo
513   - lieshu_data.selected = lieshu_data.values[e.detail.value]
514   - this.setData({
515   - lieshuInfo: lieshu_data
516   - })
517   - break;
518   - case 'lonelyolder':
519   - var lonelyolder_data = this.data.lonelyolderInfo
520   - lonelyolder_data.selected = lonelyolder_data.values[e.detail.value]
521   - this.setData({
522   - lonelyolderInfo: lonelyolder_data
523   - })
524   - break;
525   - case 'invest':
526   - var invest_data = this.data.investInfo
527   - invest_data.selected = invest_data.values[e.detail.value]
528   - this.setData({
529   - investInfo: invest_data
530   - })
531   - break;
532   - case 'specificIndustry':
533   - var specificIndustry_data = this.data.specificIndustryInfo
534   - specificIndustry_data.selected = specificIndustry_data.values[e.detail.value]
535   - this.setData({
536   - specificIndustryInfo: specificIndustry_data
537   - })
538   - break;
539   - case 'employee':
540   - var employee_data = this.data.employeeInfo
541   - employee_data.selected = employee_data.values[e.detail.value]
542   - this.setData({
543   - employeeInfo: employee_data
544   - })
545   - break;
546   - case 'investpersonal':
547   - var investpersonal_data = this.data.investpersonalInfo
548   - investpersonal_data.selected = investpersonal_data.values[e.detail.value]
549   - this.setData({
550   - investpersonalInfo: investpersonal_data
551   - })
552   - break;
  230 +
553 231 }
554 232
555 233 },
556 234
557   - // =============日期picker选中处理==============
558   - birthdayChange: function(e) {
559   - var birth_date = this.data.birthDate;
560   - birth_date.selected = e.detail.value
561   - console.log('long_birth_date', Date.parse(new Date(e.detail.value)) / 1000)
562   - this.setData({
563   - long_birth_date: (Date.parse(new Date(e.detail.value)) / 1000),
564   - birthDate: birth_date
565   - })
566   - },
567   -
568   - startChange: function(e) {
569   - var start_date = this.data.startDate;
570   - start_date.selected = e.detail.value
571   - this.setData({
572   - startDate: start_date
573   - })
574   - },
575   -
576   - endChange: function(e) {
577   - var end_date = this.data.endDate;
578   - end_date.selected = e.detail.value
579   - this.setData({
580   - endDate: end_date
581   - })
582   - },
583   -
584   - // =============地区picker选中处理==============
585   -
586   - contactAddressSelect: function(e) {
587   - console.log('contactAddressSelect', e)
588   - var contact_address = this.data.contactaddressInfo;
589   - contact_address.address_value = e.detail.value
590   - contact_address.address_code = e.detail.code
591   - this.setData({
592   - contactaddressInfo: contact_address
593   - })
594   - },
595   -
596   - currentAddressSelect: function(e) {
597   - console.log('currentAddressSelect', e)
598   - var current_address = this.data.currentaddressInfo;
599   - current_address.address_value = e.detail.value
600   - current_address.address_code = e.detail.code
601   - this.setData({
602   - currentaddressInfo: current_address
603   - })
604   - },
605   -
606   - birthAddressSelect: function(e) {
607   - console.log('birthAddressSelect', e)
608   - var birth_address = this.data.birthaddressInfo;
609   - birth_address.address_value = e.detail.value
610   - birth_address.address_code = e.detail.code
611   - this.setData({
612   - birthaddressInfo: birth_address
613   - })
614   - },
615 235
616 236 // =============其他数据选中处理==============
617 237
... ... @@ -625,7 +245,7 @@ Page({
625 245 },
626 246
627 247 formSubmit: function(e) {
628   - console.log("date", Date.parse(new Date(this.data.birthday)) / 1000)
  248 + // console.log("date", Date.parse(new Date(this.data.birthday)) / 1000)
629 249 var regMoney = /^[0-9]*(\.[0,10]{1,2})?$/;
630 250 var regMobile = /^(13[0-9]|14[5-9]|15[012356789]|166|17[0-8]|18[0-9]|19[8-9])[0-9]{8}$/;
631 251 var regname = /^[\u4E00-\u9FA5\uf900-\ufa2d·s]{2,}$/;
... ... @@ -643,14 +263,7 @@ Page({
643 263 this.showtoast('有必填项未填写');
644 264 return
645 265 }
646   - // else if (this.data.personstatusData.selected.length < 1) {
647   - // this.showtoast('有必填项未填写');
648   - // return
649   - // }
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)) {
  266 + else if (this.data.isIdCard && (this.data.card_number.length < 1 && formdata.id_card_no.length < 1)) {
654 267 this.showtoast('有必填项未填写');
655 268 return
656 269 } else if (this.data.isIdCard && !format.isIDCardNum(formdata.id_card_no)) {
... ... @@ -659,34 +272,11 @@ Page({
659 272 } else if (!this.data.isIdCard && (!formdata.id_card_no || formdata.id_card_no.length < 1)) {
660 273 this.showtoast('有必填项未填写');
661 274 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   - }
669   - // else if (this.data.investInfo.selected.length < 1) {
670   - // this.showtoast('有必填项未填写');
671   - // return
672   - // } else if (this.data.specificIndustryInfo.selected.length < 1) {
673   - // this.showtoast('有必填项未填写');
674   - // return
675   - // } else if (this.data.employeeInfo.selected.length < 1) {
676   - // this.showtoast('有必填项未填写');
677   - // return
678   - // }
  275 + }
679 276 else if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) {
680 277 this.showtoast('请输入正确邮箱');
681 278 return
682 279 }
683   - // else if (formdata.company_equity_total && formdata.company_equity_total.length > 0 && !regMoney.test(formdata.company_equity_total)) {
684   - // this.showtoast('请输入正确金额');
685   - // return
686   - // } else if (formdata.personal_equity_total && formdata.personal_equity_total.length > 0 && !regMoney.test(formdata.personal_equity_total)) {
687   - // this.showtoast('请输入正确金额');
688   - // return
689   - // }
690 280 var new_card_num = ''
691 281 if (this.data.isIdCard) {
692 282 if (this.data.card_number.length > 0) {
... ... @@ -711,70 +301,28 @@ Page({
711 301 var formdata = data
712 302 console.log("form_data", formdata);
713 303 var Authorization = app.globalData.Authorization;
714   - var request_profession = that.getProfessionRequest()
  304 + var url = baseUrl + 'persontax/v1/personal-taxes', method = "POST"
  305 + if (this.cur_id.length){
  306 + url = baseUrl + 'persontax/v1/personal-taxes/' + this.cur_id
  307 + method = "PUT"
  308 + }
  309 + console.log('this.cur_id', this.cur_id)
  310 + wx.showLoading({
  311 + title: '',
  312 + })
715 313 wx.request({
716   - url: baseUrl + 'persontax/v1/personal-taxes',
717   - method: "POST",
  314 + url: url,
  315 + method: method,
718 316 data: {
719 317 'certification_status': that.getCertifyStatus(formdata),
720   - "name": that.data.name.length > 0 ? that.data.name : formdata.name,
721 318 "family_ties": that.data.relativeData.selected,
722   - "native": "中国",
723   - "id_card_type": that.data.cardtypeData.selected,
  319 + "id_card_type": '居民身份证',//that.data.cardtypeData.selected,
724 320 "id_card_no": formdata.id_card_no ? formdata.id_card_no : that.data.card_number,
  321 + "name": formdata.name,
725 322 "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,
  323 + //"age": formdata.age ? formdata.age : '',//不传
  324 + "native": "中国",
736 325 "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,
769   - // "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : null,
770   - // "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : null,
771   - // "is_employee": that.data.employeeInfo.selected,
772   - // "is_specific_profession": that.data.specificIndustryInfo.selected,
773   - // "is_investor": that.data.investInfo.selected,
774   - // "is_business_angel": that.data.investpersonalInfo.selected,
775   - // "company_equity_total": parseFloat(formdata.company_equity_total),
776   - // "personal_equity_total": parseFloat(formdata.personal_equity_total),
777   - // "employee_no": formdata.employee_no
778 326 },
779 327 header: {
780 328 'content-type': 'application/json', // 默认值
... ... @@ -792,40 +340,15 @@ Page({
792 340 content: '',
793 341 })
794 342 }
795   -
  343 + wx.hideLoading()
796 344 },
797 345 fail(res) {
798 346 console.log(res)
  347 + wx.hideLoading()
799 348 }
800 349 })
801 350 },
802 351
803   - getProfessionRequest: function() {
804   - var that = this
805   - var pro_index = that.data.profession_index
806   -
807   - if (pro_index.length == 3) {
808   - var profession_data_info = that.data.professionData.values[pro_index[pro_index[0]]][0]
809   - console.log('profession_datas', profession_data_info)
810   - return {
811   - "one_level_code": profession_data_info.value,
812   - "one_level_name": profession_data_info.label,
813   - "two_level_code": profession_data_info.children[pro_index[1]].value,
814   - "two_level_name": profession_data_info.children[pro_index[1]].label,
815   - "three_level_code": profession_data_info.children[pro_index[1]].children[pro_index[2]].value,
816   - "three_level_name": profession_data_info.children[pro_index[1]].children[pro_index[2]].label
817   - }
818   - } else {
819   - return {
820   - "one_level_code": '',
821   - "one_level_name": '',
822   - "two_level_code": '',
823   - "two_level_name": '',
824   - "three_level_code": '',
825   - "three_level_name": ''
826   - }
827   - }
828   - },
829 352
830 353 getCertifyStatus: function(formdata) {
831 354 var iddata = this.data.idInfoData;
... ... @@ -833,8 +356,8 @@ Page({
833 356 var cardtype = this.data.cardtypeData.selected;
834 357 var card_no = formdata.id_card_no ? formdata.id_card_no : this.data.card_number;
835 358 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) {
  359 + //var birth_day = this.data.birthDate.selected;
  360 + if (name == iddata.name && cardtype == '居民身份证' && card_no == iddata.id_card_number && gender == iddata.gender ){// && birth_day == this.data.birthday) {
838 361 return 'active'
839 362 } else {
840 363 return ''
... ... @@ -849,6 +372,90 @@ Page({
849 372 })
850 373 },
851 374
  375 + dealIdInfo: function (idCardNum) {
  376 + var info = this.analyzeIDCard(idCardNum)
  377 + console.log('info', info.age, info.sex)
  378 + if (info.age) {
  379 + this.setData({
  380 + age: info.age
  381 + })
  382 + }
  383 + if (info.sex) {
  384 + var gender_data = this.data.genderData
  385 + gender_data.selected = info.sex
  386 + this.setData({
  387 + genderData: gender_data
  388 + })
  389 + }
  390 + },
  391 +
  392 + idChange: function (e) {
  393 + console.log('idCardNoChange', e.detail.value)
  394 + var idCardNo = e.detail.value
  395 + if (e.detail.value.length == 18){
  396 + if (!format.isIDCardNum(idCardNo)) {
  397 + wx.showToast({
  398 + image: "../../../../images/warn.png",
  399 + title: '身份证格式有误'
  400 + })
  401 + return;
  402 + }
  403 + this.dealIdInfo(idCardNo)
  404 + }
  405 + },
  406 + idDone: function (e) {
  407 +
  408 + var idCardNo = e.detail.value
  409 + if (!idCardNo.length) {
  410 + wx.showToast({
  411 + image: "../../../../images/warn.png",
  412 + title: '请输入身份证号'
  413 + })
  414 + return;
  415 + }
  416 + if (!format.isIDCardNum(idCardNo)) {
  417 + wx.showToast({
  418 + image: "../../../../images/warn.png",
  419 + title: '身份证格式有误'
  420 + })
  421 + return;
  422 + }
  423 +
  424 + },
  425 +
  426 + analyzeIDCard: function(IDCard){
  427 + var sexAndAge = {}
  428 + //获取用户身份证号码
  429 + var userCard = IDCard;
  430 + //如果身份证号码为undefind则返回空
  431 + if(!userCard) {
  432 + return sexAndAge;
  433 + }
  434 + //获取性别
  435 + if(parseInt(userCard.substr(16, 1)) % 2 == 1){
  436 + sexAndAge.sex = '男'
  437 + }else {
  438 + sexAndAge.sex = '女'
  439 + }
  440 + //获取出生年月日
  441 + //userCard.substring(6,10) + "-" + userCard.substring(10,12) + "-" + userCard.substring(12,14);
  442 + var yearBirth = userCard.substring(6, 10);
  443 + var monthBirth = userCard.substring(10, 12);
  444 + var dayBirth = userCard.substring(12, 14);
  445 + //获取当前年月日并计算年龄
  446 + var myDate = new Date();
  447 + var monthNow = myDate.getMonth() + 1;
  448 + var dayNow = myDate.getDay();
  449 + var age = myDate.getFullYear() - yearBirth;
  450 + if (monthNow < monthBirth || (monthNow == monthBirth && dayNow < dayBirth)) {
  451 + age--;
  452 + }
  453 + //得到年龄
  454 + sexAndAge.age = age;
  455 + //返回性别和年龄
  456 + return sexAndAge;
  457 +},
  458 +
852 459 /**
853 460 * 生命周期函数--监听页面隐藏
854 461 */
... ...
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,42 @@
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" disabled='{{isDisable}}'></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" disabled='{{isDisable}}'></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>
  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' disabled='{{isDisable}}'></input>
  38 + </view>
  39 + <view class="divide_line"></view>
104 40
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}}" />
  41 + <template is="picker_cell_normal" data="{{...genderData}}" />
132 42 <view class="divide_line"></view>
133 43 <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>
  44 + <text class='text_black_30 float_left'style='line-height: 90rpx'>年龄</text>
  45 + <input class='input_wrap float_right' name='age' type='number' placeholder-class='text_777_30' placeholder='请输入年龄' maxlength='2' value='{{age}}' disabled='{{isDisable}}'></input>
136 46 </view>
137 47 <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>
173   - </view>
174   - </view>
175   - </view>
176 48
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 49
190   - <view class='data_list'>
191   - <view class='data_item'>
192   - <!-- <view class='item_body'>
193   - <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 50 <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>
202   - </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}}" />
251   - <view class="divide_line"></view>
252   - <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>
255   - </view>
256   - <view class="divide_line"></view>
  51 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
  52 + <text class='text_black_30 float_left' style='line-height: 90rpx'>国籍</text>
  53 + <text class='text_777_30 float_right' >中国</text>
257 54 </view>
258 55
259   - </view>
260   - </view>
261   -
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> -->
274   -
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 56 <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>
  57 + <template is="picker_cell_normal" data="{{...forignerInfo}}" />
339 58
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 59 </view>
346   -
347 60 </view>
348 61
349   - <view hidden='{{isshow02}}' style='background:#f8f8f8;height:500rpx'></view>
350   - <view hidden='{{!isshow02}}' style='background:#f8f8f8;height:200rpx'></view>
351   -
352 62 <view class="btn_bottom">
353 63 <button class="btn_bottom" formType="submit"> 保存</button>
354 64 </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,14 @@
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 +}
  118 +input[disabled]{
  119 + color: #777;
  120 +}
\ No newline at end of file
... ...
... ... @@ -61,7 +61,7 @@ Page({
61 61 '外国护照', '香港永久性居民身份证', '澳门特别行政区永久性居民身份证', '台湾身份证', '台湾居民来往大陆通行证', '外国人永久居留证'
62 62 ],
63 63 onChange: 'onPickerSelect'
64   - },
  64 +},
65 65 forignerInfo: {
66 66 isrequre: true,
67 67 label: '是否境外人员',
... ... @@ -205,7 +205,7 @@ Page({
205 205 onChange: 'contactAddressSelect'
206 206 },
207 207 currentaddressInfo: {
208   - label: '居住地',
  208 + label: '经常居住地址',
209 209 mode: 'region',
210 210 address_code: ['', '', ''],
211 211 address_value: ['', '', ''],
... ... @@ -214,7 +214,7 @@ Page({
214 214 onChange: 'currentAddressSelect'
215 215 },
216 216 birthaddressInfo: {
217   - label: '户籍所在地',
  217 + label: '户籍地址',
218 218 mode: 'region',
219 219 address_code: ['', '', ''],
220 220 address_value: ['', '', ''],
... ... @@ -241,7 +241,7 @@ Page({
241 241 this.getproffessiondata()
242 242 this.getbanklist()
243 243 },
244   -
  244 +//****************获取自然人数据************/
245 245 getpersonalTax: function(id) {
246 246 var that = this
247 247 wx.showLoading({
... ... @@ -262,7 +262,7 @@ Page({
262 262 // isself: '魏先森' != res.data.name ? false : true
263 263 isself: res.data.family_ties ? false : true
264 264 })
265   - that.handleDatas()
  265 + that.handleDatas(res.data)
266 266 },
267 267 fail(res) {
268 268 console.log(res)
... ... @@ -275,12 +275,11 @@ Page({
275 275 },
276 276
277 277 //对各参数初始赋值
278   - handleDatas: function() {
  278 + handleDatas: function (tax_info) {
279 279 //todo
280 280 var curdate = format.curDateTime()
281 281 console.log('curdate', curdate)
282 282
283   - var tax_info = this.data.taxInfo
284 283 this.data.name = tax_info.name
285 284 if (this.data.isself) {
286 285 this.data.relativeData.disabled = true
... ... @@ -289,7 +288,7 @@ Page({
289 288 this.data.relativeData.disabled = false
290 289 this.data.relativeData.selected = tax_info.family_ties
291 290 }
292   - if (tax_info.certification_status == 'active') {
  291 + if (tax_info.certification_status == 'active') {//已通过拍摄身份证认证过,不能修改
293 292 this.data.genderData.disabled = true
294 293 this.data.birthDate.disabled = true
295 294 this.data.cardtypeData.disabled = true
... ... @@ -331,7 +330,7 @@ Page({
331 330 this.data.lieshuInfo.selected = tax_info.is_martyr_family
332 331 this.data.lonelyolderInfo.selected = tax_info.is_lonely_man
333 332 this.data.bankInfo.selected = tax_info.bank
334   - this.data.contactaddressInfo.selected = tax_info.contact_address.province + tax_info.contact_address.city + tax_info.contact_address.district
  333 + // this.data.contactaddressInfo.selected = tax_info.contact_address.province + tax_info.contact_address.city + tax_info.contact_address.district
335 334 this.data.currentaddressInfo.selected = tax_info.current_address.province + tax_info.current_address.city + tax_info.current_address.district
336 335 this.data.birthaddressInfo.selected = (tax_info.huji_address.province + tax_info.huji_address.city + tax_info.huji_address.district).replace(/(^\s*)|(\s*$)/g, "")
337 336 this.data.employeeInfo.selected = tax_info.is_employee
... ... @@ -923,31 +922,36 @@ Page({
923 922 "name": that.data.name,
924 923 "family_ties": that.data.relativeData.selected,
925 924 "native": "中国",
  925 + "taxpayer_type":"居民",
  926 + "is_overseas_personnel": "否",
926 927 "id_card_type": that.data.cardtypeData.selected,
927 928 "id_card_no": that.data.card_number,
928 929 "gender": that.data.genderData.selected,
929 930 "birth_date": that.data.long_birth_date,
930   - "profession": request_profession,
931   - "education": that.data.degreeData.selected,
932   - "taxpayer_no": formdata.taxpayer_no ? formdata.taxpayer_no : that.data.taxInfo.taxpayer_no,
933   - // "taxpayer_status": that.data.personstatusData.selected,
934   - "is_martyr_family": that.data.lieshuInfo.selected,
935   - "martyr_family_no": that.data.lieshuInfo.selected == '否' ? '' : (formdata.martyr_family_no.length > 0 ? formdata.martyr_family_no : that.data.taxInfo.martyr_family_no),
936   - "is_disability": that.data.disabilityInfo.selected,
937   - "disability_no": that.data.disabilityInfo.selected == '否' ? '' : (formdata.disability_no.length > 0 ? formdata.disability_no : that.data.taxInfo.disability_no),
938   - "is_lonely_man": that.data.lonelyolderInfo.selected,
939   - "is_overseas_personnel": "否",
940   - "comment": formdata.comment.length > 0 ? formdata.comment : that.data.taxInfo.comment,
  931 +
  932 + "mobile": that.data.mobile,
941 933 "current_address": request_current_address,
942 934 "current_address_detail": formdata.current_address_detail ? formdata.current_address_detail : that.data.taxInfo.current_address_detail,
943 935 "huji_address": request_birth_address,
944 936 "huji_address_detail": formdata.huji_address_detail.replace(/(^\s*)|(\s*$)/g, "").length > 0 ? formdata.huji_address_detail.replace(/(^\s*)|(\s*$)/g, "") : that.data.huji_address_detail,
945   - "mobile": that.data.mobile,
946   - "contact_address": request_contact_address ? request_contact_address : that.data.taxInfo.contact_address_detail,
947   - "contact_address_detail": formdata.contact_address_detail.length > 0 ? formdata.contact_address_detail : that.data.taxInfo.contact_address_detail,
948 937 "email": formdata.email.length > 0 ? formdata.email : that.data.taxInfo.email,
  938 +
  939 + "profession": request_profession,
  940 + "education": that.data.degreeData.selected,
949 941 "bank": that.data.bankInfo.selected,
950 942 "bank_account": formdata.bank_account.length > 0 ? formdata.bank_account : that.data.taxInfo.bank_account,
  943 + // "taxpayer_no": formdata.taxpayer_no ? formdata.taxpayer_no : that.data.taxInfo.taxpayer_no,
  944 + // "taxpayer_status": that.data.personstatusData.selected,
  945 + "is_disability": that.data.disabilityInfo.selected,
  946 + "disability_no": that.data.disabilityInfo.selected == '否' ? '' : (formdata.disability_no.length > 0 ? formdata.disability_no : that.data.taxInfo.disability_no),
  947 + "is_martyr_family": that.data.lieshuInfo.selected,
  948 + "martyr_family_no": that.data.lieshuInfo.selected == '否' ? '' : (formdata.martyr_family_no.length > 0 ? formdata.martyr_family_no : that.data.taxInfo.martyr_family_no),
  949 + "is_lonely_man": that.data.lonelyolderInfo.selected,
  950 + "comment": formdata.comment.length > 0 ? formdata.comment : that.data.taxInfo.comment,
  951 +
  952 + // "contact_address": request_contact_address ? request_contact_address : that.data.taxInfo.contact_address_detail,
  953 + // "contact_address_detail": formdata.contact_address_detail.length > 0 ? formdata.contact_address_detail : that.data.taxInfo.contact_address_detail,
  954 +
951 955 // "join_date": that.data.startDate.selected.length > 0 ? Date.parse(new Date(that.data.startDate.selected)) / 1000 : this.data.taxInfo.join_date,
952 956 // "separate_date": that.data.endDate.selected.length > 0 ? Date.parse(new Date(that.data.endDate.selected)) / 1000 : this.data.taxInfo.separate_date,
953 957 // "is_employee": that.data.employeeInfo.selected,
... ...
... ... @@ -62,7 +62,18 @@
62 62 <text class='text_999_30 float_right' style='line-height: 90rpx'>中国</text>
63 63 </view>
64 64 <view class="divide_line"></view>
65   -
  65 + <view class='item_body'>
  66 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
  67 + <text class='text_black_30 float_left' style='line-height: 90rpx'>纳税人类型</text>
  68 + <text class='text_999_30 float_right' style='line-height: 90rpx'>居民</text>
  69 + </view>
  70 + <view class="divide_line"></view>
  71 + <view class='item_body'>
  72 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
  73 + <text class='text_black_30 float_left' style='line-height: 90rpx'>是否境外人员</text>
  74 + <text class='text_999_30 float_right' style='line-height: 90rpx'>否</text>
  75 + </view>
  76 + <view class="divide_line"></view>
66 77 <!-- <view class='item_body'>
67 78 <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
68 79 <text class='text_black_28 float_left'>纳税人状态</text>
... ... @@ -99,7 +110,6 @@
99 110 bindblur='bindinputcardnum' maxlength='24'></input>
100 111 </view>
101 112 </view>
102   - <view class="divide_line"></view>
103 113
104 114 <!-- <view class='item_body'>
105 115 <text class='head_red_star float_left'>*</text>
... ... @@ -107,7 +117,7 @@
107 117 <image class='arrow_wrap' src='/images/arrow_right.png'></image>
108 118 <text class='text_333_28 float_right'>否</text>
109 119 </view> -->
110   - <template is="picker_cell_normal" data="{{...forignerInfo}}" />
  120 + <!-- <template is="picker_cell_normal" data="{{...forignerInfo}}" /> -->
111 121 <!-- 非必填部分 -->
112 122 <view hidden='{{!isshow01}}'>
113 123 <view class="divide_line"></view>
... ... @@ -124,62 +134,7 @@
124 134 <image class='arrow_wrap' src='/images/arrow_right.png'></image>
125 135 <text class='text_333_28 float_right'></text>
126 136 </view> -->
127   - <template is="picker_cell_normal" data="{{...birthDate}}" />
128   - <view class="divide_line"></view>
129   - <!-- <view class='item_body'>
130   - <text class='text_666_28 float_left'>职业</text>
131   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
132   - <text class='text_333_28 float_right'></text>
133   - </view> -->
134   - <template is="picker_cell_normal" data="{{...professionData}}" />
135   - <view class="divide_line"></view>
136   - <!-- <view class='item_body'>
137   - <text class='text_666_28 float_left'>学历</text>
138   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
139   - <text class='text_333_28 float_right'></text>
140   - </view> -->
141   - <template is="picker_cell_normal" data="{{...degreeData}}" />
142   - <view class="divide_line"></view>
143   - <view class='item_body'>
144   - <text class='text_666_30 float_left' style='line-height: 90rpx'>纳税人识别号</text>
145   - <input class='input_wrap float_right' name='taxpayer_no' type='number' value='{{taxInfo.taxpayer_no}}' placeholder-class='text_999_30' placeholder='请输入纳税人识别号' maxlength='24'></input>
146   - </view>
147   - <view class="divide_line"></view>
148   - <!-- <view class='item_body'>
149   - <text class='text_666_28 float_left'>是否残疾</text>
150   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
151   - <text class='text_333_28 float_right'></text>
152   - </view> -->
153   - <template is="picker_cell_normal" data="{{...disabilityInfo}}" />
154   - <view class="divide_line" hidden="{{disabilityInfo.selected!='是'}}"></view>
155   - <view class='item_body' hidden="{{disabilityInfo.selected!='是'}}">
156   - <text class='text_666_30 float_left'>残疾证号</text>
157   - <input class='input_wrap float_right' name='disability_no' type='number' value='{{taxInfo.disability_no}}' placeholder-class='text_999_30' placeholder='请输入残疾证号' maxlength='24'></input>
158   - </view>
159   - <view class="divide_line"></view>
160   - <!-- <view class='item_body'>
161   - <text class='text_666_28 float_left'>是否烈属</text>
162   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
163   - <text class='text_333_28 float_right'></text>
164   - </view> -->
165   - <template is="picker_cell_normal" data="{{...lieshuInfo}}" />
166   - <view class="divide_line" hidden="{{lieshuInfo.selected!='是'}}"></view>
167   - <view class='item_body' hidden="{{lieshuInfo.selected!='是'}}">
168   - <text class='text_666_30 float_left'>烈属证号</text>
169   - <input class='input_wrap float_right' name='martyr_family_no' type='number' value='{{taxInfo.martyr_family_no}}' placeholder-class='text_999_30' placeholder='请输入烈属证号' maxlength='24'></input>
170   - </view>
171   - <view class="divide_line"></view>
172   - <!-- <view class='item_body'>
173   - <text class='text_666_28 float_left'>是否孤老</text>
174   - <image class='arrow_wrap' src='/images/arrow_right.png'></image>
175   - <text class='text_333_28 float_right'></text>
176   - </view> -->
177   - <template is="picker_cell_normal" data="{{...lonelyolderInfo}}" />
178   - <view class="divide_line"></view>
179   - <view class='item_body'>
180   - <text class='text_666_30 float_left' style='line-height: 90rpx'>备注</text>
181   - <input class='input_wrap float_right' value='{{taxInfo.comment}}' name='comment' placeholder-class='text_999_30' placeholder='请输入备注'></input>
182   - </view>
  137 + <template is="picker_cell_normal" data="{{...birthDate}}" />
183 138 </view>
184 139 </view>
185 140 </view>
... ... @@ -199,6 +154,11 @@
199 154
200 155 <view class='data_list'>
201 156 <view class='data_item'>
  157 + <view class='item_body'>
  158 + <text style='color:red;font-size: 30rpx;line-height: 90rpx;float:left'>*</text>
  159 + <text class='text_black_30 float_left' style='line-height: 90rpx'>手机号码</text>
  160 + <input class='input_wrap float_right' placeholder="请输入手机号" value='{{mobile}}' name='mobile' type='number' maxlength='11' bindblur='bindinputmobile'></input>
  161 + </view>
202 162 <!-- <view class='item_body'>
203 163 <text style='color:red;font-size: 28rpx;line-height: 80rpx;float:left'>*</text>
204 164 <text class='text_black_30 float_left' style='line-height: 90rpx'>联系电话</text>
... ... @@ -208,42 +168,25 @@
208 168 maxlength='11' bindblur='bindinputmobile'></input>
209 169 </view> -->
210 170 <!-- 非必填部分02 -->
211   - <view hidden='{{!isshow02}}'>
212   - <view class="divide_line"></view>
213   - <view class='item_body'>
214   - <text class='text_666_30 float_left' style='line-height: 90rpx'>联系电话</text>
215   - <input class='input_wrap float_right' placeholder="请输入手机号" value='{{mobile}}' name='mobile' type='number' maxlength='11' bindblur='bindinputmobile'></input>
216   - </view>
  171 + <view hidden='{{!isshow02}}'>
217 172 <view class="divide_line"></view>
218 173 <!-- <view class='item_body'>
219 174 <text class='text_666_28 float_left'>联系地址</text>
220 175 <image class='arrow_wrap' src='/images/arrow_right.png'></image>
221 176 <text class='text_333_28 float_right'></text>
222 177 </view> -->
223   - <template is="picker_cell_normal" data="{{...contactaddressInfo}}" />
  178 + <!-- <template is="picker_cell_normal" data="{{...contactaddressInfo}}" />
224 179 <view class="divide_line"></view>
225 180 <view class='item_body'>
226 181 <text class='text_666_30 float_left' style='line-height: 90rpx'>详细地址</text>
227 182 <input class='input_wrap float_right' name='contact_address_detail' value='{{taxInfo.contact_address_detail}}' placeholder-class='text_999_30' placeholder='请输入详细联系地址'></input>
228 183 </view>
229   - <view class="divide_line"></view>
  184 + <view class="divide_line"></view> -->
230 185 <!-- <view class='item_body'>
231 186 <text class='text_666_28 float_left'>开户银行</text>
232 187 <image class='arrow_wrap' src='/images/arrow_right.png'></image>
233 188 <text class='text_333_28 float_right'></text>
234 189 </view> -->
235   - <template is="picker_cell_normal" data="{{...bankInfo}}" />
236   - <view class="divide_line"></view>
237   - <view class='item_body'>
238   - <text class='text_666_30 float_left' style='line-height: 90rpx'>银行账号</text>
239   - <input class='input_wrap float_right' name='bank_account' value='{{taxInfo.bank_account}}' placeholder-class='text_999_30' placeholder='请输入银行账号' maxlength='24'></input>
240   - </view>
241   - <view class="divide_line"></view>
242   - <view class='item_body'>
243   - <text class='text_666_30 float_left' style='line-height: 90rpx'>电子邮箱</text>
244   - <input class='input_wrap float_right' name='email' value='{{taxInfo.email}}' placeholder='请输入电子邮箱' placeholder-class='text_999_30' maxlength='20'></input>
245   - </view>
246   - <view class="divide_line"></view>
247 190 <!-- <view class=' item_body '>
248 191 <text class='text_666_28 float_left '>居住地</text>
249 192 <image class='arrow_wrap ' src='/images/arrow_right.png '></image>
... ... @@ -268,11 +211,103 @@
268 211 <input class='input_wrap float_right ' name='huji_address_detail' placeholder-class='text_999_30' placeholder='请输入详细户籍地址' value='{{huji_address_detail}}'></input>
269 212 </view>
270 213 <view class="divide_line"></view>
  214 +
  215 + <view class='item_body'>
  216 + <text class='text_666_30 float_left' style='line-height: 90rpx'>电子邮箱</text>
  217 + <input class='input_wrap float_right' name='email' value='{{taxInfo.email}}' placeholder='请输入电子邮箱' placeholder-class='text_999_30' maxlength='20'></input>
  218 + </view>
271 219 </view>
272 220
273 221 </view>
274 222 </view>
275 223
  224 +<!-- 其他信息 -->
  225 +
  226 + <view class='head_wrap' style='margin-top:20rpx' bindtap='span' id='3'>
  227 + <text class='head_text_wrap1'>其他信息</text>
  228 + <text class='head_text_wrap2' hidden='{{!isshow03}}'>(点击收起非必填选项)</text>
  229 + <text class='head_text_wrap2' hidden='{{isshow03}}'>(点击展开非必填选项)</text>
  230 + <view style='float:right' wx:if='{{isshow03}}'>
  231 + <image class='head_image_wrap_up' src='/images/arrow_up.png'></image>
  232 + </view>
  233 + <view wx:else style='float:right'>
  234 + <image class='head_image_wrap_down' src='/images/arrow_down.png'></image>
  235 + </view>
  236 + </view>
  237 + <view class='data_list'>
  238 + <view class='data_item'>
  239 + <view hidden='{{!isshow03}}'>
  240 + <!-- <view class='item_body'>
  241 + <text class='text_666_28 float_left'>职业</text>
  242 + <image class='arrow_wrap' src='/images/arrow_right.png'></image>
  243 + <text class='text_333_28 float_right'></text>
  244 + </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="{{...degreeData}}" />
  251 + <view class="divide_line"></view>
  252 + <template is="picker_cell_normal" data="{{...professionData}}" />
  253 + <view class="divide_line"></view>
  254 + <template is="picker_cell_normal" data="{{...bankInfo}}" />
  255 + <view class="divide_line"></view>
  256 + <view class='item_body'>
  257 + <text class='text_666_30 float_left' style='line-height: 90rpx'>银行账号</text>
  258 + <input class='input_wrap float_right' name='bank_account' value='{{taxInfo.bank_account}}' placeholder-class='text_999_30' placeholder='请输入银行账号' maxlength='24'></input>
  259 + </view>
  260 + <view class="divide_line"></view>
  261 +
  262 + <!-- <view class='item_body'>
  263 + <text class='text_666_30 float_left' style='line-height: 90rpx'>纳税人识别号</text>
  264 + <input class='input_wrap float_right' name='taxpayer_no' type='number' value='{{taxInfo.taxpayer_no}}' placeholder-class='text_999_30' placeholder='请输入纳税人识别号' maxlength='24'></input>
  265 + </view>
  266 + <view class="divide_line"></view> -->
  267 + <!-- <view class='item_body'>
  268 + <text class='text_666_28 float_left'>是否残疾</text>
  269 + <image class='arrow_wrap' src='/images/arrow_right.png'></image>
  270 + <text class='text_333_28 float_right'></text>
  271 + </view> -->
  272 + <template is="picker_cell_normal" data="{{...disabilityInfo}}" />
  273 + <view class="divide_line" hidden="{{disabilityInfo.selected!='是'}}"></view>
  274 + <view class='item_body' hidden="{{disabilityInfo.selected!='是'}}">
  275 + <text class='text_666_30 float_left'>残疾证号</text>
  276 + <input class='input_wrap float_right' name='disability_no' type='number' value='{{taxInfo.disability_no}}' placeholder-class='text_999_30' placeholder='请输入残疾证号' maxlength='24'></input>
  277 + </view>
  278 + <view class="divide_line"></view>
  279 + <!-- <view class='item_body'>
  280 + <text class='text_666_28 float_left'>是否烈属</text>
  281 + <image class='arrow_wrap' src='/images/arrow_right.png'></image>
  282 + <text class='text_333_28 float_right'></text>
  283 + </view> -->
  284 + <template is="picker_cell_normal" data="{{...lieshuInfo}}" />
  285 + <view class="divide_line" hidden="{{lieshuInfo.selected!='是'}}"></view>
  286 + <view class='item_body' hidden="{{lieshuInfo.selected!='是'}}">
  287 + <text class='text_666_30 float_left'>烈属证号</text>
  288 + <input class='input_wrap float_right' name='martyr_family_no' type='number' value='{{taxInfo.martyr_family_no}}' placeholder-class='text_999_30' placeholder='请输入烈属证号' maxlength='24'></input>
  289 + </view>
  290 + <view class="divide_line"></view>
  291 + <!-- <view class='item_body'>
  292 + <text class='text_666_28 float_left'>是否孤老</text>
  293 + <image class='arrow_wrap' src='/images/arrow_right.png'></image>
  294 + <text class='text_333_28 float_right'></text>
  295 + </view> -->
  296 + <template is="picker_cell_normal" data="{{...lonelyolderInfo}}" />
  297 + <view class="divide_line"></view>
  298 + <view class='item_body'>
  299 + <text class='text_666_30 float_left' style='line-height: 90rpx'>备注</text>
  300 + <input class='input_wrap float_right' value='{{taxInfo.comment}}' name='comment' placeholder-class='text_999_30' placeholder='请输入备注'></input>
  301 + </view>
  302 +
  303 +
  304 + </view>
  305 +
  306 +</view>
  307 + </view>
  308 +
  309 +
  310 +
276 311 <!-- 任职雇佣信息 -->
277 312 <!-- <view class='head_wrap ' style='margin-top:20rpx ' bindtap='span' id='3'>
278 313 <text class='head_text_wrap1 '>任职受雇信息</text>
... ...
... ... @@ -2,7 +2,7 @@
2 2 var app = getApp();
3 3 var baseUrl = app.globalData.baseUrl;
4 4 Page({
5   -
  5 + self_id:null,
6 6 /**
7 7 * 页面的初始数据
8 8 */
... ... @@ -102,7 +102,8 @@ Page({
102 102 data.items[i].newidnum = this.formatIdNum(data.items[i].id_card_no)
103 103 if (i == 0) {
104 104 data.items[i].relative = "本人"
105   - } else {
  105 + this.self_id = data.items[i].id
  106 + }else{
106 107 data.items[i].relative = data.items[i].family_ties
107 108 }
108 109 datalist.push(data.items[i])
... ... @@ -135,7 +136,7 @@ Page({
135 136
136 137 getStatus: function (data) {
137 138 console.log('data', data)
138   - if (data[0].family_ties.length < 1 && data[0].name.length > 0 && data[0].taxpayer_status.length > 0 && data[0].id_card_type.length > 0 && data[0].id_card_no.length > 0 && data[0].mobile.length > 0 && data[0].is_investor.length > 0 && data[0].is_specific_profession.length > 0) {
  139 + if (data[0].family_ties.length < 1 && data[0].name.length > 0 && data[0].id_card_type.length > 0 && data[0].id_card_no.length > 0 && data[0].mobile.length > 0) {
139 140 this.setData({
140 141 text_tip: '去查看'
141 142 })
... ... @@ -155,6 +156,11 @@ Page({
155 156
156 157 goedit: function (e) {
157 158 console.log(e)
  159 + if (this.self_id != e.currentTarget.id){
  160 + wx.navigateTo({
  161 + url: 'addinfo/addinfo?id=' + e.currentTarget.id,
  162 + })
  163 + }
158 164 wx.navigateTo({
159 165 url: 'editinfo/editinfo?id=' + e.currentTarget.id,
160 166 })
... ...
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,
... ...
注册登录 后发表评论